How to remove a "lost" task bar in eclipse - eclipse

In my eclipse Mars I have two task bars with only red corners as items:
How can I remove this both task bars? I have already disable all checkboxes under "Window" - "Perspective" - "Customize Perspective...". The both toolbars are still there. Also I cannot do a left or right click on these both toolbars ...
EDIT:
Ok, after reinstalling the "JBoss Developer Studio" PlugIn I get (instead of the red corners):
But I still cant remove these toolbars ...

The file where the workbench layout is stored is
<your-workspace>/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi
I had something similar happen once and was able to manually edit that file (with some trial-and-error) to get rid of the duplicate, unwanted toolbars. I can't really recommend it, though, as it's a very error-prone process. If you do decide to attempt it, make sure to make backups of the file before you being.
Alternatively, you can try just deleting that file (rename it or move it somewhere else) and see if Eclipse will re-create it automatically.
A better alternative is probably to export your workspace preferences then create a new workspace. You can import your projects and exported preferences into the new one.

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

Messed up Eclipse window layout

I accidently messed up the default eclipse layout now I can't get it back the way it used to be. HERE is a picture. What really annoys me is that eclipse now is taking up unnecessary space at the top. What I want gone, but can't get rid of is the bar all the to the right with "Java" in it. Right clicking won't help at all. Second, I want to get rid of the bar left to this "Java"-bar. As you can see it doesn't really have ANY FUNCTIONALITY AT ALL(??). To get rid of this strange bar is the most important thing since this will move up "Java" and Quicksearch to the placement above.
Edit: Just so to be clarify, THIS bar is what I mean which woul solve everything.
Actually, the most helpful thing would be to restore the whole Eclipse layout to default. I have tried Window->Restore Perspective but it doesn't help me :(
Thanks!
right mouse click on the perspective(top-right "Java") and select Reset. This will fix the perspective.
EDIT: It seems to be a bug in Eclipse Juno. A suggestion is to delete the workbench.xmi file, but it doesn't work for everybody...
So If it doesnt work, you have to install your eclipse again.
There are different things you might try:
You should be able to drag and drop the bar to a location where it
automatically docks and does not disturb you (e.g. at the bottom)
Right click the emtpy bar and choose "hide toolbar"
If everything fails: Delete your eclipse installation and load a new one. Don't delete your workspace and point the new installation to your current workspace. You will have all your projects as they are now.
As a workaround, until this bug will be resolved, you can edit eclipse\plugins\org.eclipse.platform_4.2.1.v201209141800\css\e4_classic_winxp.css.
Append following code.
.MToolBar.Draggable {
handle-image: url(./winXPHandle.png);
}
.MToolControl.Draggable {
handle-image: url(./winXPHandle.png);
}
Source: https://bugs.eclipse.org/bugs/show_bug.cgi?id=389594#c4
I had to click on reset for all my perspectives, then exit eclipse, and re-open it. Worked for me.

How do I make eclipse (Indigo) collapse empty (parent) packages?

What I want to do is simply use the eclipse package explorer in hierarchical view but with empty packages being collapsed so I don't have to open 5+ packages to find the first Java file.
I'm not even sure how I did it in previous versions, but I've never had any trouble finding it before, it just seems to be gone now. I have a feeling there was a "flatten hierarchy" tick-box somewhere.
To clarify I get this:
com
example
etc
file1.java
Rather than:
com.example.etc
file1.java
I'm using Eclipse Indigo (v. 3.7.1)
Open the View menu (small triangle in top right corner), open filters and check Empty parent packages.
In most cases it works, but in case of existing projects it does not always work as expected. If you seem to have troubles, try to export the project, remove it, then re-add the exported version (or re-checkout from your VCS).
Assuming the view filter is engaged properly, perhaps your source folders are not as "empty" as you think.
For example, on Apple OS X, Eclipse will detect .DS_STORE entires along your src/package/hierarchy, making the parent packages technically non-empty.
Delete any such hidden files and refresh your project.
Window - Preferences - Java - Appearance - Abbreviate package names
And enter the following rule:
com.example.etc={cee}
I don't know what the problem actually was, but I couldn't get it fixed until I gave up altogether and reinstalled the OS (it was a fresh install anyway), and eclipse. It was completely fine after that. :\
Click on the arrow at the top right of the "Package explorer" and choose "Package presentation -> flat"
Try to restart Eclipse once in a while. I had trouble getting it to work, and after an Eclipse restart it suddenly was working again.

How to programmatically reload a text editor in Eclipse?

In Eclipse, if I change a file programmatically, and it is open in a text editor, it doesn't always reload, not even when refreshing the resource programmatically. How can I forcibly reload the text editor from code so that it show the changed file contents?
In your project explorer or navigator, you can right-click on the file that's currently open and select refresh. This has always worked for me, even when editing files with several programs. Make sure to click the file itself, not parent objects like packages or folders or projects.
Edit
Refreshing programmatically? I would look into an Eclipse scripting tool:
http://eclipse-shell.sourceforge.net/
I guess there was another one called Monkey, but it doesn't appear to be maintained.
I don't know of any possibility to programmatically reload the file.
Some editors (e.g. GMF editors) look for changes in the underlying files, and refresh themselves, but this is not required at all.
I don't think that a forced reload is an option implemented globally, as in some cases there could be some merging steps involved that can be quite erroneous.
My ideas to solve this:
Have a specific editor that refreshes its content when the used resource changes (this can be timeconsuming);
Or close the editors of the file and reopen them (this is ugly in the eye of the user).
Since the Luna release of eclipse there's no need to reload files with F5/manual Refresh.
Really nice, especially as there was a bug with the F5 key binding.