Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » folding in the editor?
folding in the editor? [message #75480] Fri, 11 July 2003 18:35 Go to next message
Eclipse UserFriend
Originally posted by: robinson.cs.stanford.edu

Hello,

We're writing an Eclipse plugin to display the results of some program
analysis research. It would be very useful if the Eclipse Java editor and
CDT's C/C++ editor supported folding. By "folding," I mean the ability to
selectively hide parts of the source code, with a visual indication that
some of it is not being shown. In this way, we could effectively display
program slices (specific lines of code that are relevant to certain parts
of the analysis results).

For example, we'd ideally like to be able to take code that looks like this:

int foo(int a)
{
int someVar;
int someOtherVar;

someVar = a;
someOtherVar = globalV;

if (someVar == 10) {
someOtherVar++;
for (int i = 0; i < 5; i++) {
cout << i << endl;
}
someVar -= 5;
}

return someVar;
}

And then if we wanted to focus only on lines that affected "someVar," for
instance, we could use folding to display this in the editor:

int foo(int a) {
int someVar;
+ ...
if (someVar == 10) {
+ ...
someVar -= 5;
}

return someVar;
}

But when this is displayed in the editor, the line numbers reflect the
real line numbers in the full source code, etc. The plus signs might be
clickable to allow the user to reveal the elided code.

I know that Emacs has this functionality, but I haven't seen anything like
this in Eclipse. Does support for this exist?

Thanks,
Will Robinson
Re: folding in the editor? [message #75498 is a reply to message #75480] Fri, 11 July 2003 20:22 Go to previous messageGo to next message
Jeff Hunter is currently offline Jeff HunterFriend
Messages: 73
Registered: July 2009
Member
Will Robinson wrote:
> Hello,
>
> We're writing an Eclipse plugin to display the results of some program
> analysis research. It would be very useful if the Eclipse Java editor and
> CDT's C/C++ editor supported folding. By "folding," I mean the ability to
> selectively hide parts of the source code, with a visual indication that
> some of it is not being shown. In this way, we could effectively display
> program slices (specific lines of code that are relevant to certain parts
> of the analysis results).

Danger, Will Robinson! (Yes, I'm an ass, I'm sure you probably get that
a lot, but I couldn't resist. :-))

There is no support for this in the Java editor, but you might wish to
add your comments to the following bug:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=9355

I don't know if there is a similar bug for the C/C++ editor.

Jeff
Re: folding in the editor? [message #75512 is a reply to message #75498] Fri, 11 July 2003 21:58 Go to previous messageGo to next message
Vladimir Blagojevic is currently offline Vladimir BlagojevicFriend
Messages: 71
Registered: July 2009
Member
> > We're writing an Eclipse plugin to display the results of some program
> > analysis research. It would be very useful if the Eclipse Java editor
and
> > CDT's C/C++ editor supported folding. By "folding," I mean the ability
to
> > selectively hide parts of the source code, with a visual indication that

This is a commited item for 3.0. See
http://www.eclipse.org/eclipse/development/eclipse_project_p lan_3_0.html
Do a text search on "folding" - it is a first match.

Regards.
Re: folding in the editor? [message #75546 is a reply to message #75480] Sat, 12 July 2003 19:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kgwzamboni-news.zambonistiscan.com

It thought SlickEdit provided a plugin for their editor
which provided those kinds of features.
(But then it is not free)
--
Remove zamboni to reply.
All the above is hearsay and the not quaranteed.
Re: folding in the editor? [message #75578 is a reply to message #75512] Mon, 14 July 2003 14:57 Go to previous messageGo to next message
John Camelon is currently offline John CamelonFriend
Messages: 50
Registered: July 2009
Member
This is currently not on our 3.0 task-list, but if you raise an enhancement
request for it perhaps it can be.

JohnC

"Vladimir Blagojevic" <vladimir@cs.yorku.ca> wrote in message
news:benbte$oc8$1@eclipse.org...
>
> > > We're writing an Eclipse plugin to display the results of some program
> > > analysis research. It would be very useful if the Eclipse Java editor
> and
> > > CDT's C/C++ editor supported folding. By "folding," I mean the
ability
> to
> > > selectively hide parts of the source code, with a visual indication
that
>
> This is a commited item for 3.0. See
> http://www.eclipse.org/eclipse/development/eclipse_project_p lan_3_0.html
> Do a text search on "folding" - it is a first match.
>
> Regards.
>
>
Re: folding in the editor? [message #75596 is a reply to message #75546] Mon, 14 July 2003 20:34 Go to previous messageGo to next message
Fred A. Kulack is currently offline Fred A. KulackFriend
Messages: 17
Registered: July 2009
Junior Member
"K W" <kgwzamboni-news@zambonistiscan.com> wrote in message
news:PNE21WKuwwiy-pn2-s5XxsdS7UWco@zamboni.stiscan.com...> It thought
SlickEdit provided a plugin for their editor
> which provided those kinds of features.
> (But then it is not free)

Correct. Lots of other cool features too.
Edit files outside of the workspace, block copy/paste, editor macro
language,
plethora of other features.
Re: folding in the editor? [message #82213 is a reply to message #75596] Mon, 06 October 2003 05:15 Go to previous message
Eclipse UserFriend
Originally posted by: john.mlist.arrizza.com

"Fred A. Kulack" <kulack@us.ibm.com> wrote in message
news:bev43d$qv2$1@eclipse.org...
> Correct. Lots of other cool features too.
> Edit files outside of the workspace, block copy/paste, editor macro
> language,
> plethora of other features.

(as an aside: Folding was done in IBM's ISPF mainframe editor)


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.521 / Virus Database: 319 - Release Date: 9/23/2003
Previous Topic:"batch" key mappings
Next Topic:Hello World: Exec error:Launching failed
Goto Forum:
  


Current Time: Fri Sep 27 04:01:49 GMT 2024

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

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

Back to the top