Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » folding in the editor?
folding in the editor? [message #92067] Fri, 11 July 2003 14: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 #92168 is a reply to message #92067] Fri, 11 July 2003 16:22 Go to previous messageGo to next message
Eclipse UserFriend
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 #92208 is a reply to message #92168] Fri, 11 July 2003 17:58 Go to previous message
Eclipse UserFriend
> > 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.
Previous Topic:Eclipse 2.1.1 slow loading
Next Topic:Re: CVS Graph plugin for Eclipse available
Goto Forum:
  


Current Time: Thu Jul 17 02:29:38 EDT 2025

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

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

Back to the top