Code Folding

Questions and answers regarding the use of eclipse environment as seen in Servoy Developer

Code Folding

Postby jgarfield » Thu Apr 12, 2012 6:58 pm

Anyone out there know of a way to extend the code folding to include more than just comments and functions?

I would absolutely love to be able to fold if statements and loops.

:D
Programmer.
adBlocks
http://www.adblocks.com
jgarfield
 
Posts: 223
Joined: Wed Sep 28, 2005 9:02 pm
Location: Boston, US

Re: Code Folding

Postby lwjwillemsen » Thu Apr 12, 2012 8:00 pm

+10 !
Lambert Willemsen
Vision Development BV
lwjwillemsen
 
Posts: 680
Joined: Sat Mar 14, 2009 5:39 pm
Location: The Netherlands

Re: Code Folding

Postby jcompagner » Fri Apr 13, 2012 10:31 am

personally i find that horribly, then you can really just overlook pieces of code... (it makes it really more messy..)
Also java editor also doesn't have that .. Why would that be....

You can make a feature request (or look if there is already on and vote on it)
But it wont becoming anytime soon, for example not in 6.1
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Code Folding

Postby IT2Be » Fri Apr 13, 2012 11:44 am

I agree with Johan here.

I even don't like it for comments (I don't just comment for fun :) )...
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Re: Code Folding

Postby jgarfield » Fri Apr 13, 2012 3:15 pm

Ah you guys....It must be nice to live in a world where all of your code never takes up more than the height of your screen :wink:

I'm certainly not arguing in favor of having foldable code automatically folded when I first view it, which yes, could lead to someone missing it if they weren't reading carefully, but gee whiz, sometimes when I'm debugging or reviewing large control structures to make sure they have full coverage, it sure would be nice to hide away pieces of code that I've identified aren't immediately important to what I'm trying to accomplish.

I'm also not trying to tell you that you should have to use code folding if it doesn't fit your style or working. Marcel, you might be interested to know you can turn off code folding in the Preferences for your Eclipse and always see all your comments in all their glory.

All I'm really saying is that some people would probably find this tool incredibly useful.

As for why the Java editor doesn't have it, I have to assume you only mean in Eclipse, and that's a very good question. I personally find it incredibly surprising considering the vast number of relatively popular IDEs and text editors that do support this either natively or with a plugin. For example vim, emacs, NetBeans, XCode, Visual Studio, gedit, jEdit, Notepad++, and my personal new favorite Sublime Text, just to name a few...I could probably go on...

Anyways... good call on checking for existing requests, I found (and voted for) one here: https://support.servoy.com/browse/SVY-542

That one is looking for more than just Indentation Folding, but also Token Folding. I don't personally have a use for Token folding...Indent is enough for me, but hey, who am I say it's a bad idea :D

Johan, remind me to buy you a few beers at ServoyWorld so we can argue about this like proper geeks.
Programmer.
adBlocks
http://www.adblocks.com
jgarfield
 
Posts: 223
Joined: Wed Sep 28, 2005 9:02 pm
Location: Boston, US

Re: Code Folding

Postby AlanBourke » Fri Apr 13, 2012 4:12 pm

It would be nice if it could be done along the lines of Visual Studio C#, i.e. you can selectively collapse any section of code by wrapping it in #region / #endregion .
-------------------------------------------------------------------------------------------
Servoy SAN Developer
User avatar
AlanBourke
 
Posts: 198
Joined: Tue Aug 02, 2011 3:32 pm
Location: Dublin, Ireland

Re: Code Folding

Postby david » Tue Apr 17, 2012 9:58 pm

jgarfield wrote:All I'm really saying is that some people would probably find this tool incredibly useful.

As for why the Java editor doesn't have it, I have to assume you only mean in Eclipse, and that's a very good question. I personally find it incredibly surprising considering the vast number of relatively popular IDEs and text editors that do support this either natively or with a plugin. For example vim, emacs, NetBeans, XCode, Visual Studio, gedit, jEdit, Notepad++, and my personal new favorite Sublime Text, just to name a few...I could probably go on...


Going on...Ace example: http://ace.ajax.org/build/kitchen-sink.html
David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1727
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Re: Code Folding

Postby ROCLASI » Tue Apr 17, 2012 11:28 pm

jgarfield wrote:Anyways... good call on checking for existing requests, I found (and voted for) one here: https://support.servoy.com/browse/SVY-542

Voted +1.
Use it all the time in other languages and editors (like BBEdit, 20 years old and still going STRONG).
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Code Folding

Postby mattfrizzell » Thu Apr 26, 2012 7:36 pm

I personally enjoy wearing out my down arrow keys after lining up my cursor with an IF to find the appropriate ELSE further on down the screen. Personal preference I guess. :D
Matt Frizzell
adBlocks
www.adblocks.com
mattfrizzell
 
Posts: 51
Joined: Mon Aug 21, 2006 4:00 pm

Re: Code Folding

Postby jcompagner » Fri Apr 27, 2012 2:06 pm

why don't you just double click just besides the { ?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Code Folding

Postby rafig » Fri Apr 27, 2012 3:24 pm

jcompagner wrote:why don't you just double click just besides the { ?

(just inside the bracket section) who knew that!
great, thanks!
Rafi
Servoy Certified Developer
Image
rafig
 
Posts: 708
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK


Return to Eclipse Environment

Who is online

Users browsing this forum: No registered users and 1 guest