It should be so the imports can be folded like the other assets.
Works for me. Do you have a specific file this isn't working with?
I guess for some Java files it works, but for others it doesn't.
One example where it does not work is in fastopen plugin, the FastOpenPlugin.java
When I parse it, sometimes I only see one import in the sidekick tree, other times I see all of the imports.
But regardless, the imports section is not foldable.
Tested with JavaSideKick 3.1.5, SideKick 1.4, jEdit 5.2pre1, and FastOpenPlugin.java and it works fine. Any other file you're seeing this doesn't work with?
Actually, I see that 3.1.5 was released about a year and a half ago and there are some decent changes since then. Are you using the release version or did you build it from trunk?
For another example, try GUIUtilities.java from jEdit's source, however, you have to modify the buffer-local properties at the top from folding=explicit to folding=sidekick to see the problem.
After updating to the latest trunk of JavaSideKick, my original example where i saw the problem in FastOpenPlugin.java, it seems to be fixed now. So I am not sure why GUIUtilities still has problems but FastOpen.java imports fold fine now.
I'm not sure either. GUIUtilities.java works fine for me too.
For you, does it really fold all imports from lines 25-71?
For me, I get 4 different folding regions!!
Oh, you're talking about the folding in the text area, right? I also have 4 different folding regions, but not that's part of JavaSideKick, it's part of SideKick itself. JavaSideKick doesn't provide a fold handler of it own, maybe it should?
Fixed in revision 23467. Part of the fix is in SideKick, part is in JavaSideKick. Due to the way imports are handled, I did end up adding a fold handler in JavaSideKick. One thing I noticed is that if you add lines in the imports area of a file, there may be extra folds created until the file is reparsed. Setting SideKick to parse on keystroke eliminates that problem.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.