PyDev: project not visible - eclipse

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.

Related

Eclipse Neon CDT missing manage configurations button

I created a C project in eclipse neon and I am trying to delete some of the build configurations. However I can not get to the manage configurations dialog I am used to. The button seems to be missing. Did it go somewhere else or is my eclipse just buggy?
I think this window is supposed to look more like this. See how there is a manage configurations button next to the dropdown at the top.
I just tried switching workspaces and when I use a clean workspace I can see the button.
While the aforementioned hacks indeed work, such an approach is impossible when one already has many projects and now wishes to target another architecture.
I have found another way.
Right click on the project and select, from the pop-up menu,Build Configurations, and one of the menu items is Manage. This behaves as the disappearing Manage Configurations button.
PS: this is still a problem with Oxygen 3.

Can't see Java Working Set Folder Eclipse

I have a little problem and I hope someone can help me.
I'm using Eclipse, and i'm trying to add a Java Working Set folder to my Workspace.
The problem is that when I try to do it (right click, new, Java Working Set, and set the name) the first time works fine, but I can't see any change in the workspace (no folder appear), I have tryed to refresh the workspace but it doesn't work (and close and open Eclipse).
When I try to create it again, it says: "a working set with that name already exists", but I can't see it.
Can you help me please?
Working Sets are not folders, they are just a collection of objects.
You may be thinking about how Package Explorer displays projects. You can tell Package Explorer to show Working Sets by selecting 'Top Level Elements > Working Sets' in the view menu (click the small down pointing triangle at the top right of the view).

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.

Eclipse: shortcut for "open project"?

Is there a shortcut in Eclipse for "open project"? Ideally, I'd like something like the "Open Resource" dialog.
I want this because I have a "testing" project, which I use whenever I want to try something out… But it's annoying to scroll through the massive Navigator trying to find it and click it when it gets closed.
Not by default. The action is defined here, with no keyboard shortcut.
http://eclipse-tools.sourceforge.net/Keyboard_shortcuts_(3.0).pdf
You could add a Working Set that contains only your test project, and use 'Select Working Set...' functionality from the Navigator tab's view menu:
While this won't open the project for you, it WILL make it the only thing you see in navigator or package explorer.
Once you've added it, it will be in a list and you won't need to open the 'Select Working Set...' dialog, just select 'my test project' from the popup menu. It's triggered by that small triangle in the upper right of Navigator, I'm not sure if there is a shortcut.
To switch back to your normal work, simply 'Deselect Working Set' and you will then see everything again.
I also find the 'Collapse All' button/shortcut to be handy when finding things in the Package Explorer or Navigator tabs.
I'll offer a solution to a problem I've had which, if I've interpreted the question correctly, is very similar to yours.
I find that when I have a lot of projects with loads of expanded directories/packages inside Project Explorer, trying to find a particular project is irritating because I have to scroll through all this. I could collapse all projects down but then I also lose my current position in every project.
I'd just like to be able to search for a particular project by name and open it, in the Project Explorer tree. Opening a file inside the project using Open Resource isn't a good enough workaround, as having to think of the name of a file inside that project completely out of context is often equally annoying!
A solution that works great (at least in Eclipse Juno, Mac OSX) is, with the Project Explorer focused, to hold Shift and start typing the project name. This dynamically selects the best matching project in the Explorer as you type. Then with your hands still on the keyboard you can use the arrow keys to open up and browse the project.
It ain't pretty but it gets the job done, and saves some valuable seconds :)
You could also:
switch workspace (in a workspace with only this test project in it) (no shortcut: you can define one)
install mylyn and select a "test" task (which would immediately empty your Navigator view, leaving only the relevant classes/methods).
If the test project is already opened and you know the name of the class in it, you could go to this class with Navigate -> Open Type (There is a shorcut also, on mac osx is Shift + Command + T)
I find it easier to move with this method, but I didn't know it until someone else showed me, maybe it helps.
You can set a shortcut at Preferences->General->Keys, search for Open Project. However, for me it does not work from the editor itself. I have to click the package explorer, for example. Also, if you have a lot of projects, there will be a huge list of them as well, as expected.

How do I limit task tags to current project in Eclipse?

Eclipse currently shows the task tags (// TODO) from all open projects. I would be grateful if anyone could point out the preference, where I could restrict the scope of tasks displayed (e.g. only tasks from current project).
In Eclipse Helios (3.6) you can configure the scope.
Down arrow at the top right -> Configure Contents:
Select a configuration on the left (or create a new one) and on the right in the Scope section select "On any element in same project".
There should be a down arrow in the top-right with several options in it. For the old Eclipse the option you want is Filters... And for the newer Eclipse the option is now Configure Contents. At the top of the Configure Contents dialog is a scope selection with options you want, I think.. If not check preferences and search for tasks, or scope. It should be in there somewhere.
Close projects that you aren't working on. Tasks show for any part of the workspace, so remove projects that you arent working on by doing a close operation. (right click on the project in the project explorer and then "close project")
Configure Contents... can be used to filter to things like working sets (if you're not already using working sets, you should), but yet another way is to use Mylyn to filter out any UI elements not relevant for what you're currently working on.
In Eclipse 2019-06:
1- Open the Tasks window.
2- Click on the arrow pointing down ▽.
3- Click on Filters...
4- In the Configurations panel on the left select TODOs (or any configuration that you have saved).
5- Under Scope select On elements in selected projects
6- Click on Apply and Close
Now the task view will only show the tasks of the project where you are at the moment.
Simply close the projects you are not working on.
You can leave them in the workspace, too.
In Eclipse Juno 4.2.1, I found that it's possible to disable specific projects TODO tasks.
In the projects properties open:
Java Compiler > Task Tags
From that page check the option "Enable project specific settings" and remove the TODO entry from the list below, after that the TODO comments from that project won't be shown in Tasks.
You could also remove other tags from the list.
Filtering by working sets works fine, but I had to put the packages into a working set, rather than the whole project.
AFAIK the Eclipse task list is workspace-based and cannot really be filtered by default.