How to change toolbar button order in eclipse 4.2? - eclipse

With the old version, we just needed to drag and drop to change the positions toolbar's button. But with juno, how do we do this?

I don't believe you can re-order them in Eclipse 4.2.
However, you can choose to hide them:
- Window -> Customize Perspective -> Tool Bar Visibility

This is bug 364046, and has supposedly been fixed but is not yet released.
In the meantime, you can reorder the perspective buttons using the Live Application Model View. I am not sure what you need to install to get this view -- Eclipse e4 Tools perhaps?
I didn't see the view in the Show View dialog but it shows up with Ctrl-3.
Once you get the live application model view up, you need to find the Perspectives Stack,
which I found under Windows->Trimmed Window->Controls->PartSashContainer->Perspectives Stack.
Then you can reorder either by dragging/dropping in the tree view, or by the up/down buttons in the editor. I had to restart Eclipse to see the changes.

until the bug is fixed, i've found that one can:
figure out the order of the perspective items you are interested in
close all perspectives (or at least all that are in the wrong order
re-open in the order preferred.
if switching the last 2, just close the 2nd to last one, then re-open it, and it will be the last one.
if you want to move the first one to the last position, close it, then re-open.
if you want to move the last one to the first position, well ... you'll have to close all the others, then re-open them in the order you want.
this might involve less work than pulling in the "live application model view". at the very least, it just worked for me after coming to this question in hopes of seeing a real answer to the problem.

Related

Complete Removal of Eclipse plugin

I use Eclipse Neon under Windows 10.
I installed a plugin (MonjaDB) using Eclipse Market Place. As I didn't find the plugin to be very useful I uninstalled it using Help->About->Installation Details->Installed Software->Uninstall. Sadly, however, this didn't seem to fully remove the plugin.
I now have a small red square on the right hand side of my workspace in the shortcut toolbar. This cannot be removed using the close option. I went so far as to remove my installation of Eclipse and the .eclipse directory in my home area but after a reinstall the square is still there.
Presumably this means that it is somehow associated with the project in my workspace?? Does anyone have any ideas how to remove this annoying square?
EDIT:
I have noticed two things
The MonjaDB perspective is hanging around somehow and
If I press the little red square on the right it opens an empty tab in the tab set to the right (where mylyn sits) with the title of DB Tree but I cannot remove it.
I have added three screen shots
MonjaDb perspective Partly Active
It seems like your current perspective is the one that was uninstalled. Just try opening a new one via the Open Perspective toolbar button that's close to thevred square, and then you can try right-click > Close on the red square.
At least a part of this is intentional...when the implementation class of a view no longer exists we leave the view 'open' but are supposed to show an "Error Part'. The reason to leave it up is to handle cases where a user has installed a new eclipse and opens his old workspace before installing the extensions. If we were to remove the views the user would have to set up their perspectives again once they had installed the extension.
Note that resetting the perspective won't work because the class implementing IPespectiveFactory no longer exists.
Closing the perspective and opening a new, different, one should work. If the perspective you open has visible views that are no longer available you should just close them.

how to remove google sign in button in eclipse

I'm facing a wierd problem. My eclipse, has a google signin button which is occupying some of the space which I do not want to happen. Initially it had "Sign-in to Google" text along with it. I've followed some blog post and set accordingly to show just the icon (I don't remember that blog post link).
But now, the icon is getting replicating .. it is being shown 12 times. It is actually creating childs :P
I've gone through all the options present in Customize Perspective menu, none of them had this button listed. Can someone help me in removing that google sign button from my perspective? One possible suspect is- my eclipse crashes when I suspend and wakeup my machine.
You can use the Window > Reset Perspective... menu command to reset the perspective to its default state, which might eliminate that toolbar and buttons. If that fails, I would create a new workspace and import the projects into it using File > Import > Existing Projects into Workspace.
If you want to try to salvage your existing workspace, it's possible to do so my manually editing Eclipse's internal file that stores your Workbench layout, but it's a bit tricky. Here are the steps I've followed to eliminate a similar repeated toolbar item:
Exit Eclipse.
Find the Workbench layout file, it's path is <workbench>\.metadata\.plugins\org.eclipse.e4.workbench\workbench.xmi. Make a backup of this file before you touch it - this is essential because it's easy to corrupt the file if you change the wrong things.
Open the file in your favorite XML-aware editor - most packages of Eclipse include the XML editor that works just fine1, but be aware that if you use Eclipse to edit the file you can't have Eclipse open on the workspace that contains the workbench.xmi you want to edit.
Find the section of <trimBars> nodes in the XML; from there you have to determine which <trimBars> node you need to edit. In your case it looks like a vertical one, probably with a side="Right" attribute.
Under the correct <trimBars> node you'll find multiple <chlidren> nodes, each with an elementId attribute that should help you identify it; you're looking for <children> nodes that are identified as something related to the Google plugin.
Delete the <children> nodes that seem related to the unwanted toolbar buttons. In your case, it appears that there is an entire toolbar that you might want to eliminate, so you might want to delete the entire containing <trimBars> node.
Save the file and start Eclipse on that workspace.
1Some packages of Eclipse include EMF tools that will open it in a special XMI editor that does not provide a view of the source, only a structural tree view. Depending on how you like to work with XML, this might be easier than editing raw XML.
This is not a perspective but a view. You can hover over that bar with the buttons and click Alt+Shift+F1 to check where this View comes from. Then you can either disable/uninstall the contributing feature (Help -> Installation Details) or check where the feature came from.
If it comes from the IDE, you can open a bug for it. If it is contributed from a third party plugin, contact the developers of that plugin.
There is an eclipse bug concerning duplicate view toolbar buttons in Luna that has recently closed as well. Maybe this solves your problem as well.
Edit: Taken from this bug:
root cause is that in Luna 4.4M5 WorkbenchWindowControlContribution.createControl is called twice, the
first time with a null value for
WorkbenchWindowControlContribution.getWorkbenchWindow() while it is
still being created. This is related to what has been reported here
https://bugs.eclipse.org/bugs/show_bug.cgi?id=427452
second cause is that my createControl(Composite parent) method was calling PlatformUI.getWorkbench().getActiveWorkbenchWindow() instead
of WorkbenchWindowControlContribution.getWorkbenchWindow(). This
resulted in an attempt to create a new Workbench Window, which
recursively calls createControl() again. This has already been
reported here https://bugs.eclipse.org/bugs/show_bug.cgi?id=366708

How can I close an empty pane in Eclipse

I often end up with lots of empty panes in Eclipse that can only be minimized but not destroyed. How do I close these?
Update:
In this screenshot you can see two minimized on the upper left and several on the right hand side. In the center are four more. They only seem to be restorable in the Debug mode.
http://img406.imageshack.us/img406/9900/eclipse1.png
this happened to me, too. What worked for me (based on FilmJ and douncon's comments) was to open a class file, then drag that tab over the top of the empty pane.
Select Window -> Reset Perspective. That should reset the current perspective (what you call "mode") to its' initial state, (hopefully) closing all irrelevant views.
Something seems terribly wrong with your Eclipse. Maybe you should reinstall it. It is possible that you installed a buggy plugin.
First of all, what do you mean by pane? Eclipse has:
Windows (Eclipse itself, e.g. instance)
Documents (tabs)
Views (properties, tasks, explorer, etc)
If by 'pane' you mean document editors, you have problems either with your Eclipse version or most likely one of the installed plugins.
Each View also can be closed (except maybe some project types (perspectives) of which I'm not aware). For CDT (C/C++) you can close practically everything.
I'll recommend you download latest Eclipse version with no plugins, extract it to different folder, and check if that happens again. If yes, please explain more in details (like Eclipse version, perspective you are using, any side plugins, etc).
Also a good places are Eclipse community forum, mailing list and bugz :-)
I had the same problem. For me it helped to go into the right perspective and activate the functionality that caused the window in the first place. Once I reactivated the functionality, in my case "QNX Memory Analysis perspective", I was able to close all the windows one by one.
The conclusion is you have to refill the empty windows with content and then you will be able to close them properly.
So, it's really very easy for this to happen, if you open an editor that's incompatible with the existing editor, you can often end up having to place it outside of the tab list in one of your editor panes, then you might clear or copy that, typically while trying to add that view to a tab list.
In any case, what it's done is create a new editor, and all you need to do is drag some file to that empty editor window giving it some form of context, then close it.
I had the same issue. I followed #zvikico, but instead of just resetting, I first reset and then closed all the perspectives. Please follow the following to fix the problem. It worked for me:
Window -> Perspective -> Reset perspective..
After resetting follow below:
Window -> Perspective -> Close All Perspectives

Eclipse: Nested Editor Tabs?

Is anyone aware of any method (or external plugin) that would allow for nested editor tabs? It would be nice to be able to group related open files into their own "master" tabs, but I'm not sure if this is even possible. Any ideas?
This is totally non-obvious, and I discovered it by accident, but...
If you click on a tab and start dragging it downwards, once you get more than half-way down the editor pane, a horizontal line will appear. Let go, and now you'll have two different editor panes, each with tabs of documents. Now you can drag tabs up and down between the two panes to see different documents at the same time.
I think that's as close as you can get.
I think the best you can currently do is "Window->New Window" and then use each new window as a separate "tab" of related editors. Not exactly ideal, I admit.
It's a cool idea though, especially if you could have shortcuts or something that open groups of editors with a single command.
This definitely isn't possible in the current RCP. You might be able to construct an editor component which created a CTabFolder and delegated to other editor components, but I'm not sure how well that would work.
There are Perspectives in Eclipse that you might use to achieve something close, they are more global things though...
But I agree with you, I would like this feature as well! This would be also very useful when editing many files that have the same name but come from different packages, because now it's a mess >_<
For me the utility of such a feature is to reduce context switching time. I'm working on project A, have lots of editors open, now I need to drop that and work on project B. I want to keep all the editors open associated with project A but hide them while I work on B. When I'm done with B, I can pick up right where I left off in A without having to find and open all those A files again; I can even leave them unsaved indefinitely, since Juno never crashes!! :)
I have used the New Window feature, and it's great, but the new window needs a bunch of configuration (closing Views I don't need, moving stuff around to where I want it, opening Views I had open in the old window, and so on) before I can get to work. It also uses a lot more memory than a simple tab group would since it seems to be a complete new copy of Eclipse.
The split-window feature is great and I use it all the time. It is indeed tab groups, and if there were a way to hide a tab group, and for each tab group to have its own tab list (the thing you get when you click ">>5" so you can see editors you have open that don't fit in the tab header), it would totally fill the bill.

Source Editor Tab order in Netbeans 6.5

I recently switched to Netbeans from Eclipse, and the one thing that I liked about Eclipse I'd like to get in Netbeans:
The order of the tabs at the top of the Source Editor in Eclipse seems to be related to most recently used, so if I have a group of 5 files I'm working on at one time, they are all likely to be visible in the tab list, no matter how many tabs I have open.
In Netbeans, this isn't the case - I don't know what the order is, but it isn't useful for switching between my active files quickly - its usually faster to re-open the file to switch to the correct tab than to actually use the tab system.
Is there an option setting or a plugin that can change this behavior to something more like Eclipse?
By default the tabs in NetBeans are ordered acording to when they were opened. I don't think there's a way how to change it right in NetBeans and don't know about any plugin neither. I think this behaviour is just a matter of taste - I was used to NetBeans behaviour and when I'm using Eclipse, I always get confused about shuffled tabs. But as Kevin said you can drag the tabs to change their order.
When you press CTRL + TAB, the documents in the popup window are ordered acording to last used. This might be usefull for you.
Another (partial) solution might be docking a documents window (Window -> Documents) which contains opened documents and where documents are ordered alphabetically. It's better than re-openenig the files (as you wrote) especially if youre files are spread in different packages and you can't see them in projects/files view on one screen.
I don't think it does. However, you can drag the tabs to the positions you want them in. I would suggest just ordering by your liking manually.