Is that possible to show info about class which is currently editing? - eclipse

In intelliJ IDEA I can always see what class I'm working on because of clear path to this class shown in the top bar. Is there a possibility to have something like that in Eclipse?

Yes. You can turn on "breadcrumbs" in the Java editor. I can never remember the key binding, but there's a button for it on the default toolbar.
Alternatively, you can have either the Project Explorer or the Package Explorer (depending on which you prefer/use) link with the editor so that the currently edited file is always shown in those views. It's the button on the view toolbar with the two yellow arrows.

Related

Is there a way to programmatically change the color of an editor tab in my Eclipse Plugin?

I have a SharedHeaderFormEditor in my Eclipse RCP plugin.
One of my requirements is to draw attention to the editor's tab when something happens outside of the editor and it needs a refresh.
Some of the ideas discussed included
changing the color of the tab
adding an icon to the editor's text (instead of the standard * for a dirty editor)
Are either of those possible? I've been looking around and have not found anything that could address this issue.
Thanks!
ViewPart and EditorPart both allow changing the title label and icon (setPartName(…) and setTitleImage(…) respectively). The Eclipse Workbench also offers an IWorkbenchPartProgressService to each part, which allows a part to indicate that it's busy (via incrementBusy()/decrementBusy()) and that its content has changed (via warnOfContentChange()). You can see this used in the Search and Console views (org.eclipse.search2.internal.ui.SearchView and org.eclipse.ui.internal.console.ConsoleView).

Eclipse IDE - What are breadcrumbs, and how do I disable them? [duplicate]

How can I disable the Java editor breadcrumb in Eclipse?
If you are referring to the breadcrumbs in the help file of a RCP application, there is only a manual way to do it.
Since Ganymede 3.4M5:
Michael Borgwardt mentions the toolbar icon
Slava Semushin provides a native shortcut based on Ctrl+3+bread, which points directly to the Toggle Java Editor Breadcrumb option.
Shachi reminds us below that you can right-click on any icon on the breadcrumb, and select the entry named "Hide Breadcrumb".
Original answer (manual way, through key mapping)
Find the file org.eclipse.help.webapp\advanced\breadcrumbs.css and replace its contents with.
.help_breadcrumbs {
display: none;
}
For the Java Editor breadcrumb, you need to assign a shortcut to the "Toggle Java Editor Breadcrumb" command (I have tested Alt+B, for instance)
That shortcut will make the breadcrumb bar appear/disappear at will.
With the editor window focussed, look for this icon in your toolbar:
And click on it. That's all. The icon is present by default, but can be deactivated, in which case you have to activated as in MvanGeest's answer.
Another way which works for me at Eclipse Indigo (3.7): press Ctrl+3 and type bread, after that click on item Toggle Java Editor Breadcrumb.
RightClick on any icon on breadcrumb.
There is an option named HIDE BREADCRUMB.
Click it and you are done. :D
Look for this icon in the toolbar:
This button toggles the Breadcrumb view on/off.
(I'm using Eclipse 3.7, and it's there by default)
Here it is :
In the toolbar, toggle bread crumb option.
Something like http://loadcontext.blogspot.com/2008/08/eclipse-34-breadcrumbs-hide-and-show.html?
Customize Perspective, choose the
Commands tab. In the Available command
group, choose Java Editor
Presentation. The Toolbar details
shows the button for Toggle
Breadcrumbs, which looks like a folder
with a C in a circle with a black
triangle on top of it.
Despite my absolute lack of experience with Eclipse, I suppose this setting must appear in other Presentation items too. After the button's enabled, all you have to do is click it. Or not?
Change property breadcrumb.org.eclipse.jdt.ui.JavaPerspective from true to false
in your org.eclipse.jdt.ui.prefs file.
In Juno: type 'Bread' and select 'Toggle Java Editor Breadcrumb'
It very simple just right click in your class editor then select bread crumb or directly right click in top of your class in tool bar then select hide breadcrumb then its done.
When you see the BreadCrumb toolbar, right-click on the green class icon and then from the menu options click on Hide Breadcrumb.

How do I get rid of this toolbar in Eclipse?

How do I get rid of this toolbar shown in the picture? I fatfingered some keys and now I can't get rid of it, primarily because I'm not 100% sure what it is...
This is in the normal Java perspective. I've tried resetting the perspective, but that didn't work.
The annoying toolbar you're describing is called the Java Editor Breadcrumb (see Eclipse documentation)
It can be disabled by pressing Ctrl + 3 and toggling Java Editor Breadcrumb
That's the breadcrumb bar. It shows the details of the location of the class you're currently editing. It's useful to quickly see if you're editing the correct class, and you can use it to navigate to other locations in your project as well.
If you want to turn it off click this button in the toolbar:

Hide Eclipse Menu Bar (auto-hide)

I'm trying to hide Eclipse menu bar to save some screen real estate. I found I can do this using perspectives but that would permanently take out the menu from that perspective. The behavior that I want to get is something along of auto-hide, so that the menu remains hidden until I hit ALT+F for example or any other ALT key combo.
Is there's a setting or a plugin that can do this?
Thanks!
This is just a work around. Create two perspectives.
First one named - With Menu.
Second one named - Without Menu.
In the "Without Menu" perspective remove all menu items and Save.
To create the effect of hiding and showing, switch between perspectives by using
Ctrl+F8.
Theres a fast view option- just right click the tab and select Fast View. It'll bring the entire window down to the eclipse taskbar. You can recover the window by just clicking on it's icon.
Source: https://bugs.eclipse.org/bugs/show_bug.cgi?id=56119
Have a look here Is there a Macro Recorder for Eclipse? You could set up the macro so respond to ALT+F possibly.

How to Display Current Function in Eclipse

I miss a certain functionality in Eclipse. I would like to know the name of the current function the cursor is currently inside. This is useful when browsing unknown code using the search function, for example.
Any idea how to show it? Maybe a plugin?
I'm using the "Toggle Breadcrumb" option from toolbar:
It shows a nice breadcrumb, ending with current function name.
It's quite handy for me, as Outline becomes cumbersome to use if you have zilions of functions.
It produces the following structure above your Java Editor (truncated at the picture below):
The "Outline" view shows the current function.
It may be necessary to enable the 'Link to Editor' option in the Outline View dropdown menu. This might be off by default for CDT.
I was looking for something similar (Xcode-like bar at the top showing the current function, where you can also go to another function by clicking on it to open a popup list of functions). Here is what I settled on with Eclipse 3.5.1 CDT:
I moved the Outline view to the top, resized it to make it a 1-line horizontal strip (don't make it too narrow), and selected "Link With Editor" in its menu, so that it always shows the current function. However, this doesn't open a popup list like Xcode. For that functionality, I assigned a shortcut to the "Show Outline" command which does open a popup list of all functions.
The Eclipse function 'show outline' will pop up a list of outline objects, and it will highlight the object your cursor is inside in grey. It's typically bound to 'ctrl-o' (the letter 'o', not zero), but you can re-bind it as you see fit. I'm running Eclipse with the CDT plugin and it works pretty well for me.
To enable the breadcrumb invoke Toggle Java Editor Breadcrumb in the toolbar or press Alt+Shift+B in the Java editor.
You can also display the Quick Outline (ctrl+o). This way you see the context quickly without having to have a permanent Outline Window linked to the Editor.
Use the "Link With Editor" option on the outline menu
Press Ctrl+o (cursor is currently inside a function at a particular line).
It highlights the current method, or name of the class if the cursor is outside the method body.
You can click on highlighted method.
It has got inline search feature ...start typing name of the method to navigate to the specified method or method with matching search pattern.
If you press again Ctrl+o to shows the inherited members/methods.
Using outline with "link with editor" option worked also for me, thanks!
Just an addition, you can move outline pane in to the same window group as search, progress etc. saves the space in your perspective instead of keeping it at another group.