Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Code Folding Plug-in
Code Folding Plug-in [message #159737] Fri, 21 May 2004 03:21 Go to next message
R.J. Lorimer is currently offline R.J. LorimerFriend
Messages: 21
Registered: July 2009
Junior Member
I have a first code of a 'foldingStructureProvider' posted on my website.
Here is a quick list of added features:

* Collapsable Source file headers (how they missed this feature I do
not know - it's the longest comment in the file!)

* Control comment block and javadoc collapsing independently.

* ALL Control structures are now collapsable. Yes, this means if, else,
try, catch, while, for, named blocks, switches, and even static
initializers.

* Filter folding structures by # of lines. One of the things I noticed
in building this plug-in was that when you add if/else/while/for etc as
foldable regions, you get a WHOLE LOT of arrows. To counter that, you
can specify the minimum # of lines a structure should have before it
should become foldable.


http://www.coffee-bytes.com/servlet/ShowEntryForId?id=70
Give it a shot! (You will inevitably find bugs in the process)

R.J.
Re: Code Folding Plug-in [message #159749 is a reply to message #159737] Fri, 21 May 2004 12:21 Go to previous messageGo to next message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
Hello,
Is it possible that arbitrary region text in Java file be foldable ?
I want select any region text and with popup menu colapse and fold it

Regards
Haris Peco
R.J. Lorimer wrote:

> I have a first code of a 'foldingStructureProvider' posted on my website.
> Here is a quick list of added features:
>
> * Collapsable Source file headers (how they missed this feature I do
> not know - it's the longest comment in the file!)
>
> * Control comment block and javadoc collapsing independently.
>
> * ALL Control structures are now collapsable. Yes, this means if, else,
> try, catch, while, for, named blocks, switches, and even static
> initializers.
>
> * Filter folding structures by # of lines. One of the things I noticed
> in building this plug-in was that when you add if/else/while/for etc as
> foldable regions, you get a WHOLE LOT of arrows. To counter that, you
> can specify the minimum # of lines a structure should have before it
> should become foldable.
>
>
> http://www.coffee-bytes.com/servlet/ShowEntryForId?id=70
> Give it a shot! (You will inevitably find bugs in the process)
>
> R.J.
Re: Code Folding Plug-in [message #159752 is a reply to message #159737] Fri, 21 May 2004 11:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rndzank.comcast.net.not_this.net

R.J., is there a chance to make collapsable also continuous line
comments section? (in addition to block comments)
I have a situation with long file headers that are not block comments.

Thanks

r.

P.S. Very good plugin, I forgot to tell you. Thanks.



R.J. Lorimer wrote:

> I have a first code of a 'foldingStructureProvider' posted on my website.
> Here is a quick list of added features:
>
> * Collapsable Source file headers (how they missed this feature I do
> not know - it's the longest comment in the file!)
>
> * Control comment block and javadoc collapsing independently.
>
> * ALL Control structures are now collapsable. Yes, this means if, else,
> try, catch, while, for, named blocks, switches, and even static
> initializers.
>
> * Filter folding structures by # of lines. One of the things I noticed
> in building this plug-in was that when you add if/else/while/for etc as
> foldable regions, you get a WHOLE LOT of arrows. To counter that, you
> can specify the minimum # of lines a structure should have before it
> should become foldable.
>
>
> http://www.coffee-bytes.com/servlet/ShowEntryForId?id=70
> Give it a shot! (You will inevitably find bugs in the process)
>
> R.J.
Re: Code Folding Plug-in [message #159755 is a reply to message #159752] Fri, 21 May 2004 12:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: scheglov_ke.nlmk.ru

Richard Nemec <rndzank.comcast.net@not_this.net> wrote:


BTW, I am not sure, is this bug in Eclipse or this plugin,
but I saw problem with printing /* */ comments, it collapsed it directly
after printing and when I undo, adds '*' in random location.
In general folding looks as good idea, with bad implementation. :-(

> R.J., is there a chance to make collapsable also continuous line
> comments section? (in addition to block comments)
> I have a situation with long file headers that are not block comments.

> Thanks

> r.

> P.S. Very good plugin, I forgot to tell you. Thanks.



> R.J. Lorimer wrote:

>> I have a first code of a 'foldingStructureProvider' posted on my website.
>> Here is a quick list of added features:
>>
>> * Collapsable Source file headers (how they missed this feature I do
>> not know - it's the longest comment in the file!)
>>
>> * Control comment block and javadoc collapsing independently.
>>
>> * ALL Control structures are now collapsable. Yes, this means if, else,
>> try, catch, while, for, named blocks, switches, and even static
>> initializers.
>>
>> * Filter folding structures by # of lines. One of the things I noticed
>> in building this plug-in was that when you add if/else/while/for etc as
>> foldable regions, you get a WHOLE LOT of arrows. To counter that, you
>> can specify the minimum # of lines a structure should have before it
>> should become foldable.
>>
>>
>> http://www.coffee-bytes.com/servlet/ShowEntryForId?id=70
>> Give it a shot! (You will inevitably find bugs in the process)
>>
>> R.J.

--
SY, Konstantin.
Advanced Eclipse SWT Designer (http://www.swt-designer.com)
Re: Code Folding Plug-in [message #159930 is a reply to message #159752] Fri, 21 May 2004 20:03 Go to previous messageGo to next message
R.J. Lorimer is currently offline R.J. LorimerFriend
Messages: 21
Registered: July 2009
Junior Member
Richard, I could implement this yes; I will make some consideration in
to implementing a strategy for that. I have a couple bugs to fix on the
way as well.

Richard Nemec wrote:
> R.J., is there a chance to make collapsable also continuous line
> comments section? (in addition to block comments)
> I have a situation with long file headers that are not block comments.
>
> Thanks
>
> r.
>
> P.S. Very good plugin, I forgot to tell you. Thanks.
>
Re: Code Folding Plug-in [message #159937 is a reply to message #159752] Fri, 21 May 2004 20:04 Go to previous messageGo to next message
R.J. Lorimer is currently offline R.J. LorimerFriend
Messages: 21
Registered: July 2009
Junior Member
Richard, I could implement this yes; I will make some consideration in
to implementing a strategy for that. I have a couple bugs to fix on the
way as well.

Richard Nemec wrote:
> R.J., is there a chance to make collapsable also continuous line
> comments section? (in addition to block comments)
> I have a situation with long file headers that are not block comments.
>
> Thanks
>
> r.
>
> P.S. Very good plugin, I forgot to tell you. Thanks.
>
Re: Code Folding Plug-in [message #159944 is a reply to message #159755] Fri, 21 May 2004 20:08 Go to previous messageGo to next message
R.J. Lorimer is currently offline R.J. LorimerFriend
Messages: 21
Registered: July 2009
Junior Member
Konstantin,

I'm not 100% sure I understand what you are describing.

Could you provide any more detail?

R.J.

Konstantin Scheglov wrote:

> Richard Nemec <rndzank.comcast.net@not_this.net> wrote:
>
>
> BTW, I am not sure, is this bug in Eclipse or this plugin,
> but I saw problem with printing /* */ comments, it collapsed it directly
> after printing and when I undo, adds '*' in random location.
> In general folding looks as good idea, with bad implementation. :-(
>
Re: Code Folding Plug-in [message #159952 is a reply to message #159749] Fri, 21 May 2004 20:09 Go to previous messageGo to next message
R.J. Lorimer is currently offline R.J. LorimerFriend
Messages: 21
Registered: July 2009
Junior Member
Haris,

Yes, it should be possible, although it requires some additional work.

It would also be possible to fold a region between two user defined
comments; again - with additional work. I'll see what I can come up with
for this feature request for you.

R.J.

snpe wrote:

> Hello,
> Is it possible that arbitrary region text in Java file be foldable ?
> I want select any region text and with popup menu colapse and fold it
>
> Regards
> Haris Peco
> R.J. Lorimer wrote:
>
>
>>I have a first code of a 'foldingStructureProvider' posted on my website.
>>Here is a quick list of added features:
>>
>>* Collapsable Source file headers (how they missed this feature I do
>>not know - it's the longest comment in the file!)
>>
>>* Control comment block and javadoc collapsing independently.
>>
>>* ALL Control structures are now collapsable. Yes, this means if, else,
>>try, catch, while, for, named blocks, switches, and even static
>>initializers.
>>
>>* Filter folding structures by # of lines. One of the things I noticed
>>in building this plug-in was that when you add if/else/while/for etc as
>>foldable regions, you get a WHOLE LOT of arrows. To counter that, you
>>can specify the minimum # of lines a structure should have before it
>>should become foldable.
>>
>>
>>http://www.coffee-bytes.com/servlet/ShowEntryForId?id=70
>>Give it a shot! (You will inevitably find bugs in the process)
>>
>>R.J.
>
>
Re: Code Folding Plug-in [message #160251 is a reply to message #159944] Mon, 24 May 2004 09:44 Go to previous message
Eclipse UserFriend
Originally posted by: scheglov_ke.nlmk.ru

R.J. Lorimer <rjlorimer@coffee-bytes.com> wrote:

> I'm not 100% sure I understand what you are describing.
> Could you provide any more detail?
Sorry, I don't remember details.
May be this was really my problem.

--
SY, Konstantin.
Advanced Eclipse SWT Designer (http://www.swt-designer.com)
Previous Topic:Incremental Java Parser
Next Topic:Newbie question on OpenTypeSelectionDialog
Goto Forum:
  


Current Time: Tue Jul 16 12:00:37 GMT 2024

Powered by FUDForum. Page generated in 0.04822 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top