Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Possible to collapse part of the code?
Possible to collapse part of the code? [message #171616] Tue, 19 September 2006 18:37 Go to next message
Eclipse UserFriend
Originally posted by: asd.asd.com

I use eclipse 3.2. Is it possible to collapse a part of the code by
selecting it with with mouse and select some kind of collapse function?

Johs
Re: Possible to collapse part of the code? [message #171643 is a reply to message #171616] Tue, 19 September 2006 21:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wharley.bea.com

"Johs32" <asd@asd.com> wrote in message
news:eepddn$lln$1@utils.eclipse.org...
>I use eclipse 3.2. Is it possible to collapse a part of the code by
>selecting it with with mouse and select some kind of collapse function?

Yes. It's called "code folding". When you're viewing Java code you should
see lots of little +'s and -'s along the left margin; those expand and
collapse corresponding blocks of code. There is a dialog that controls the
default folding behavior (e.g., by default imports are collapsed).
Re: Possible to collapse part of the code? [message #171662 is a reply to message #171643] Tue, 19 September 2006 22:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: thom.nospam.com

Walter Harley wrote:
> "Johs32" <asd@asd.com> wrote in message
> news:eepddn$lln$1@utils.eclipse.org...
>> I use eclipse 3.2. Is it possible to collapse a part of the code by
>> selecting it with with mouse and select some kind of collapse function?
>
> Yes. It's called "code folding". When you're viewing Java code you should
> see lots of little +'s and -'s along the left margin; those expand and
> collapse corresponding blocks of code. There is a dialog that controls the
> default folding behavior (e.g., by default imports are collapsed).
>
>
Is there a way of seeing this behavior universally? Across all
perspectives?
Re: Possible to collapse part of the code? [message #171739 is a reply to message #171643] Wed, 20 September 2006 13:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: asd.asd.com

"Walter Harley" <wharley@bea.com> skrev i en meddelelse
news:eepma6$s5t$1@utils.eclipse.org...
> "Johs32" <asd@asd.com> wrote in message
> news:eepddn$lln$1@utils.eclipse.org...
>>I use eclipse 3.2. Is it possible to collapse a part of the code by
>>selecting it with with mouse and select some kind of collapse function?
>
> Yes. It's called "code folding". When you're viewing Java code you
> should see lots of little +'s and -'s along the left margin; those expand
> and collapse corresponding blocks of code. There is a dialog that
> controls the default folding behavior (e.g., by default imports are
> collapsed).
>

but it only apply to methods. In a method I have:

int i;
int p;

Now I would like to only fold these two lines, is that possible?
Re: Possible to collapse part of the code? [message #171810 is a reply to message #171739] Wed, 20 September 2006 15:38 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Johs32 wrote:

>"Walter Harley" <wharley@bea.com> skrev i en meddelelse
>news:eepma6$s5t$1@utils.eclipse.org...
>
>
>>"Johs32" <asd@asd.com> wrote in message
>>news:eepddn$lln$1@utils.eclipse.org...
>>
>>
>>>I use eclipse 3.2. Is it possible to collapse a part of the code by
>>>selecting it with with mouse and select some kind of collapse function?
>>>
>>>
>>Yes. It's called "code folding". When you're viewing Java code you
>>should see lots of little +'s and -'s along the left margin; those expand
>>and collapse corresponding blocks of code. There is a dialog that
>>controls the default folding behavior (e.g., by default imports are
>>collapsed).
>>
>>
>>
>
>but it only apply to methods. In a method I have:
>
>int i;
>int p;
>
>Now I would like to only fold these two lines, is that possible?
>
>
No. There's a feature request in bugzilla for this.

Dani

>
>
>
Re: Possible to collapse part of the code? [message #171857 is a reply to message #171662] Wed, 20 September 2006 17:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse4.rizzoweb.com

Thom Rosario wrote:
> Walter Harley wrote:
>> "Johs32" <asd@asd.com> wrote in message
>> news:eepddn$lln$1@utils.eclipse.org...
>>> I use eclipse 3.2. Is it possible to collapse a part of the code by
>>> selecting it with with mouse and select some kind of collapse function?
>> Yes. It's called "code folding". When you're viewing Java code you should
>> see lots of little +'s and -'s along the left margin; those expand and
>> collapse corresponding blocks of code. There is a dialog that controls the
>> default folding behavior (e.g., by default imports are collapsed).
>>
>>
> Is there a way of seeing this behavior universally? Across all
> perspectives?

It is specific to the type of Editor, not the Perspective. Only some
editors support folding (Java, Ant, and JavaScript editors are the ones
I know of).

--
Hope this helps,
Eric
Re: Possible to collapse part of the code? [message #171872 is a reply to message #171857] Wed, 20 September 2006 17:26 Go to previous message
Eclipse UserFriend
Originally posted by: thom.nospam.com

Eric Rizzo wrote:
> Thom Rosario wrote:
>> Walter Harley wrote:
>>> "Johs32" <asd@asd.com> wrote in message
>>> news:eepddn$lln$1@utils.eclipse.org...
>>>> I use eclipse 3.2. Is it possible to collapse a part of the code by
>>>> selecting it with with mouse and select some kind of collapse function?
>>> Yes. It's called "code folding". When you're viewing Java code you
>>> should see lots of little +'s and -'s along the left margin; those
>>> expand and collapse corresponding blocks of code. There is a dialog
>>> that controls the default folding behavior (e.g., by default imports
>>> are collapsed).
>>>
>> Is there a way of seeing this behavior universally? Across all
>> perspectives?
>
> It is specific to the type of Editor, not the Perspective. Only some
> editors support folding (Java, Ant, and JavaScript editors are the ones
> I know of).
>
I figured as much -- I was mostly just being hopeful :)
Previous Topic:Flakiness with Navigator and linked folders
Next Topic:Update location of Problemmarker when a line is insert
Goto Forum:
  


Current Time: Sat Apr 27 03:57:45 GMT 2024

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

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

Back to the top