The "One Laptop Per Child" project has a great device ready to ship, but there's no Java on there. Let's think about working together to put Java on OLPC!
One of the things that we constantly do as developers is to visually disassemble content we see and focus on the parts we're interested in. As the amount of code and content in our application grows, it becomes increasingly difficult and tedious to find and digest the interesting content; classes get longer, and they get more methods with deeper indentation. You get the idea.
One feature has been there since the beginning, and it seems like the only developers that know about it are either a.) those that came from VisualAge, or b.) those who think it's a bug because they turned it on accidentally.
The feature I'm referring to is the 'Show Source of Selected Element Only' feature. This functionality trims out everything in the editor except the item you have currently requested; which when you're using tools like the quick outline (
Ctrl+O) can really help the process of visually scanning source code. This behavior is actually a leftover from the VisualAge roots of Eclipse; the UI for VisualAge for Java was centered around the behavior of showing only what you were editing.
The toolbar item for this feature looks like this:
If you don't have that toolbar item, it can be added by going to
Window->Customize Perspective->Commands (tab)->Editor Presentation
and adding it to your toolbar. If you have this feature turned off, you may have an outline selection like this, and you'd see this in the editor:
If you have it turned on, here is what you will see instead:
This feature of Eclipse is an oldie but a goodie. In my opinion, it was drastically improved by the introduction of the quick outline functionality which acting as your primary form of navigation makes the behavior a naturally helpful utility. One advantage this feature has is that it works in any editor that has outline view support.
Thanks for the link. I did, in fact, reference mylar in this article. Unfortunately at the moment I don't have the time to post tips for specifically working with Mylar, but I do plan to in the future.
This tip is also useful for those in the industry who want to have some visual decluttering, but don't have the ability (or don't want to?) run Java 5 (a requirement of Mylar).
Perhaps it exist(s|ted) already. I "discovered" this feature by accident - either I clicked the button inadvertedly of I hit some strange key combination.
In consequence I was completly pissed - once selected a method in the outloook all members where gone. I drove me insane and I reinstalled Eclipse. Desaster stroke some days later and this tiome a co-worker remarked the VisualAge also had this annoying habit.
Finanlly we found the button and removed it. I cannot a imagine a single good use of this function.
Show Source of Selected Element Only
At 8:57 PM on Apr 17, 2006, R.J. Lorimer
wrote:
One of the things that we constantly do as developers is to visually disassemble content we see and focus on the parts we're interested in. As the amount of code and content in our application grows, it becomes increasingly difficult and tedious to find and digest the interesting content; classes get longer, and they get more methods with deeper indentation. You get the idea.
As Eclipse has evolved, several tools have been implemented to help this process. Code folding is one such tool, and another is Mylar . Mylar is a topic I definitely want to cover in more detail here at EclipseZone; Riyad did a great piece on it as a spotlight feature . But, I digress.
One feature has been there since the beginning, and it seems like the only developers that know about it are either a.) those that came from VisualAge, or b.) those who think it's a bug because they turned it on accidentally.
The feature I'm referring to is the 'Show Source of Selected Element Only' feature. This functionality trims out everything in the editor except the item you have currently requested; which when you're using tools like the quick outline (
Ctrl+O) can really help the process of visually scanning source code. This behavior is actually a leftover from the VisualAge roots of Eclipse; the UI for VisualAge for Java was centered around the behavior of showing only what you were editing.The toolbar item for this feature looks like this:
If you don't have that toolbar item, it can be added by going to
Window->Customize Perspective->Commands (tab)->Editor Presentationand adding it to your toolbar. If you have this feature turned off, you may have an outline selection like this, and you'd see this in the editor:If you have it turned on, here is what you will see instead:
This feature of Eclipse is an oldie but a goodie. In my opinion, it was drastically improved by the introduction of the quick outline functionality which acting as your primary form of navigation makes the behavior a naturally helpful utility. One advantage this feature has is that it works in any editor that has outline view support.
Until next time,
R.J. Lorimer
Contributing Editor -rj -at- javalobby.orgAuthor -http://www.coffee-bytes.comSoftware Consultant -http://www.numbersix.com8 replies so far (
Post your own)
Re: Show Source of Selected Element Only
If you really want that old Smalltalk feel, you've got to use this feature with the Java Browsing perspective...Re: Show Source of Selected Element Only
No doubtRe: Show Source of Selected Element Only
it seems no shortcut key with this function?Re: Show Source of Selected Element Only
Good Question Jin. I didn't find one, no. If you think it would be convenient, you should open a bug .Re: Show Source of Selected Element Only
You should be checking out mylar (http://www.eclipse.org/mylar)Re: Show Source of Selected Element Only
Paul,Thanks for the link. I did, in fact, reference mylar in this article. Unfortunately at the moment I don't have the time to post tips for specifically working with Mylar, but I do plan to in the future.
This tip is also useful for those in the industry who want to have some visual decluttering, but don't have the ability (or don't want to?) run Java 5 (a requirement of Mylar).
Regards!
Re: Show Source of Selected Element Only
Sorry, scan-read the post. Big mylar fan tooRe: Show Source of Selected Element Only
Perhaps it exist(s|ted) already. I "discovered" this feature by accident - either I clicked the button inadvertedly of I hit some strange key combination.In consequence I was completly pissed - once selected a method in the outloook all members where gone. I drove me insane and I reinstalled Eclipse. Desaster stroke some days later and this tiome a co-worker remarked the VisualAge also had this annoying habit.
Finanlly we found the button and removed it. I cannot a imagine a single good use of this function.