Page 1 of 1

Folding in Eclipse

Posted: Tue Jan 18, 2005 10:33 pm
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

Posted: Wed Jan 19, 2005 12:15 pm
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

But found

Posted: Wed Jan 19, 2005 3:06 pm
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.

Current position goes out of view

Posted: Wed Jan 19, 2005 3:08 pm
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.

Re: Current position goes out of view

Posted: Wed Jan 19, 2005 3:20 pm
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.

Posted: Wed Jan 19, 2005 3:40 pm
by george
Hi David,

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

Best Regards,
George

Posted: Tue Jan 25, 2005 5:31 am
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.

Posted: Tue Jan 25, 2005 9:52 am
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

Posted: Tue Jan 25, 2005 3:11 pm
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

Posted: Fri Apr 22, 2005 5:17 pm
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

Posted: Mon Apr 25, 2005 11:33 am
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