Folding in Eclipse

Having trouble installing Oxygen? Got a bug to report? Post it all here.
beleta
Posts: 4
Joined: Sun Oct 17, 2004 2:48 am
Location: Barcelona

Folding in Eclipse

Post by beleta »

It seems that the new Folding feature of <oXigen/> 5.1 does not work too well within Eclipse.

Problems encountered;

1) Many elements do no get the folding symbol
2) The Folding context menu remains grayed out most of the time.

Best regards.

Jose M Beleta
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

In the standalone version we implemented the folding support entirely and we used a light model for that, In Eclipse the folding is provided by the platform and they have a heavy model, that means that the editor becames slower if there is a large number of possible folds. To allow a good performance we decided to set a fold only if a specific number of lines are to be collapsed. By default this value is set to 4, thus you will see a fold only if between the start tag and end tag are at least 3 lines. You can change this from Window->Preferences -- oXygen - Editor - Minimum fold range. If you set that to 1 you will get a behavior similar with the one from the standalone version.
Also oXygen will set a fold only if after the end tag there in nothing else, that is if you have something like

<tag>
...
</tag> some text here

then oXygen will not consider that as a possible fold.

Re 2) - you need to have the caret on the fold start line to have the actions enabled.

Best Regards,
George
David Pérez
Posts: 8
Joined: Tue Aug 24, 2004 10:34 am

But found

Post by David Pérez »

Under Eclipse 3.01 and the new Oxygen 5.1 I have found a bug.
If I have something folded and select below a range of lines in order to indent them by pressing Tab, wrong lines are indented. Those lines are above the original ones.

Can provide screenshots if necessary.
David Pérez
Posts: 8
Joined: Tue Aug 24, 2004 10:34 am

Current position goes out of view

Post by David Pérez »

When I hit a key, many times the current line goes out of view. If I press another key, I see again what I'm modifying

I find this very confusing. :shock: and annoying.
David Pérez
Posts: 8
Joined: Tue Aug 24, 2004 10:34 am

Re: Current position goes out of view

Post by David Pérez »

David Pérez wrote:When I hit a key, many times the current line goes out of view. If I press another key, I see again what I'm modifying

I find this very confusing. :shock: and annoying.
Those keys that make lose the current scroll position are: End, Home and Tab.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi David,

Thanks, we were able to reproduce these problems. I will update this entry as we progress.

Best Regards,
George
steven at xsoftware
Posts: 3
Joined: Wed Nov 24, 2004 5:54 am

Post by steven at xsoftware »

Can you guys please please fix this as soon as you can? This is the most annoying "feature" I have used for a long time.

The rest of the changes and the concept of folding is pretty damn good though.

Look forward to seeing this updated.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi Steven, David,

The problem is solved.
Now a few details about it. In the standalone version we implemented the folding support implementing only a different view of the same document. In Eclipse the framework defines a new view but also a new document. For the smart home, smart end, and block indent actions we need the line information and that was, in the Eclipse case, from the projected document instead of the real document. Then the change was applied on the real document but having a smaller line number thus the observed behavior.
We will make available an updated oxygen.jar really soon and I will post its location here.

Best Regards,
George
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Here it is:
http://www.oxygenxml.com/update/oxygenEclipse.jar

The [eclipse/plugins]/com.oxygenxml.editor_5.1.0/lib/oxygenEclipse.jar should be replaced with the above. one

Best Regards,
George
wavegroom
Posts: 2
Joined: Fri Apr 22, 2005 4:59 pm

Post by wavegroom »

I still have a problem with the folding feature in eclipse.
Folding works for files wich are in my workspace, but not with linked files.

Try this New File -> Advanced "Link to file in the file system", add file.

OS: Mac OS X 10.3
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

oXygen is derived from the Eclipse TextEditor and the problem with the linked files seems to be inherited from the TextEditor. When the text editor will be fixed in Eclipse to have the VerticalRuler (the object that contains the annotations, line numbers, folds) then oXygen should have the folding support working. We will also investigate this to see if there is something we can do about this.

Best Regards,
George
Post Reply