folding in the editor? [message #75480] |
Fri, 11 July 2003 18:35 |
Eclipse User |
|
|
|
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 |
Jeff Hunter 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 #75546 is a reply to message #75480] |
Sat, 12 July 2003 19:59 |
Eclipse User |
|
|
|
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 #82213 is a reply to message #75596] |
Mon, 06 October 2003 05:15 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03669 seconds