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

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.

Related

Netbeans 8.2 wont apply themes

For some reason, Netbeans IDE 8.2 won't apply any different themes than the original one. Has anyone else had an issue with this? I have applied the new theme and restarted the application many times without success. Thank you.
It's very hard to identify what is wrong since everything in your screenshot looks perfect, and Sublime-Theme works for me using NetBeans 8.2 on Windows 10. See the file with the tab NewServlet.java in the screen shot below.
Note that using Sublime-Theme does not impact everything. For example, the Projects and Navigator panels don't change. Since your screen shot only showed the Options window, and the Start Page doesn't change in the editor either, are you absolutely certain that none of your files in the editor are using Sublime-Theme?
Also, you say that "Netbeans IDE 8.2 won't apply any different themes than the original one", but NetBeans comes bundled with several themes, such as NetBeans and NetBeans 5.5 as shown in the screen shot below. How many options are shown in the profile drop list for you? If you select a different theme from the Profile list and click Apply the rendering of your files in the editor should change immediately. Is that happening?
If so, the problem is probably confined to the installation of Sublime-Theme. Try deleting Sublime-Theme (the button is in the top right corner of your screen shot), and then import the zip file again to see if that fixes the problem. Also, verify that the Sublime-Theme zip file you downloaded can be manually unzipped since it might be a corrupt file.
Another thing to try is using some alternative plugins. Select Tools -> Plugins -> Available Plugins and then install Dark Look and Feel Themes and Darcula LAF for NetBeans. If those don't work either then there is something fundamentally wrong with the installation of NetBeans.
Finally, this article titled The complete guide to tuning the appearance of NetBeans may be helpful.

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 a "lost" task bar in 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.

PyDev: project not visible

I was using PyDEV without issue but recently when I create a project in Eclipse the project is not visible in the PyDev perspective but is visible in the Java perspective. My project is a python project. It seems that the perspectives are a little mixed up.
Is there a way to fix this?
My solution was:
Going to PyDev Package Explorer
Click View Menu button (arrow pointing down, top left area of the Package Explorer panel)
Top Level Elements
Click Projects
Maybe you added some filter which is hiding it in the PyDev package explorer?
I.e.: have you tried going to the PyDev package explorer filters (in PyDev package explorer > Ctrl+F10 > Customize View).
Or maybe you set the top-level to working sets and don't have a working set on PyDev? (i.e.: Ctrl+F10 > top level elements)
Or maybe you selected a working set which has nothing? (i.e.: Ctrl+F10 > select working set)
I know this is an old question, but I've had to deal with this specific problem in Eclipse 4 Luna, and I have an idea for what's wrong.
Use Package Explorer instead of PyDev Package Explorer.
The native Package Explorer, when in working set view, appears to automatically create and populate the working set "Other Projects." PyDev's explorer does not appear to do this, at least not on my default Luna installation. As well, PyDev's assignment of projects to working sets appears broken on Eclipse 4 Luna, so users of PyDev Package Explorer may have trouble finding their projects between views.
Enable Package Explorer:
- Window -> Show View -> Package Explorer
If Package Explorer not in menu:
Window -> Customize Perspective
Click the Menu Visibility tab.
Expand Window
Expand Show View
Find Package Explorer and put a check in it.
OK
Click Window then Show View, choose Package Explorer and rejoice.
I hope this helps at least one of you. I'm terribly new to Eclipse, and it is probably the single most unfriendly thing I've ever had to use. Good luck!
I had the same problem. Newly created projects did not show up. This is what brought me to this question. While looking at the answer provided by #alecor_Dev, which does not answer to the question, at least in my case, I managed to solve mine.
If you have a working set created and selected new projects will not show up. The easiest way to test is to go to:
PyDev Package Explore->View Menu button (pointing down)-> Deselect Working Set.
If you has a working set but more projects in that workspace more projects will show up.
If you want to keep the view clean you can go back to your working set but add the new project by editing the working set:
PyDev Package Explore->View Menu button (pointing down)-> Edit Active Woking Set.
And click on the project you want to add or remove.
I hope that this will help other with similar issues. While working set are a convenient way to declutter the view, can add to confusion.
I Suggest to #Fabio Zadrozny to add some visible way of marking that we are working inside a working set.
I hope that #medPhys-pl can confirm this although he moved to LiClipse. Obviously, there can be other causes that can create this kind of behaviour, but the initial description of the problem seems very similar to mine and I hope that it will solve other people's issues.

cant see the errors in my project - Exclamation mark

When I'm trying to run my project it said that i have an errors in my project, but i can't see any. I have an Exclamation mark on my project. If I'm trying to run other project, it is run perfectly.
Before that happened, I played a little bit with the project library and tried to copy some jars to the library. I tried to copy the jars manual to.
Thanks!
did you try the "Problems" View? This should show additional information.
The easiest Way to get there:
Ctrl + 3, then type "Problems".
-Hannes
Besides the "Problems" view, there is also the Console that could give you some hints.
For the Console View, there is the problem that it can show different subviews; for example it can show the console for Android or the console for DDMS. In the toolbar at the upper right of the Console view, you will find the control to choose the right console to display. Be sure to choose the "Android Console".
Another possibility is to use the "Fix Project Properties" that you will find by right clicking on the projet => Android Tools -> Fix Project Properties. This will fixes some but not all the potential problems that you might have introduced in your project.
For the rest, check in detail all properties of the project.