How to link Eclipse editor window to Eclipse project - eclipse

I'm running into an issue in Eclipse where the editor pane is not linked to the project in the Package Explorer window. For instance, if I click on a project in the package explorer and then open a Problems window that is set to Configure Contents > uncheck Show all items > set Scope to On any element in same project, it will show any applicable errors or warnings, but as soon as I open one of the class files with an error/warning in it, in the editor pane, the problems list goes blank as the editor pane does not appear to link the active tab to the active project. Simply clicking the Package Explorer window will then repopulate the problems tab until focus goes back to the editor window/tab.
This used to work with older versions of Eclipse, but ever since I updated Eclipse, it no longer does this and I don't recall which version it was that I had been using. I've also downloaded a completely clean copy of Eclipse Luna (latest version) and simply imported the old projects and still the same issue.
Is there any way to change it so the active tab in the editor points to its associated project? It's quite frustrating having to click the Package Explorer window every time I want to look at a list of problems or tasks for a specific project.
Edit: I've narrowed the issue down to minimized windows only and provided an example of the issue below.
Both windows are restricted to "Show issue on project" rather than showing all issues. Notice how the "Tasks" window works as intended while the "Problems" window does not.

Found the issue... sort of. Apparently, if you minimize the problems tab, then try to access it via the minimized icon for the tab, it loses the correct focusing to tell you what the problems are. My previous version was setup in exactly the same way and had no issues, so they must have changed something that broke this. Going to look at submitting this to the Eclipse team, as a bug.

Related

Which preference controls whether multiple selection is available to Package Explorer in Eclipse?

It used to be the case that if I selected two files (or directories) in Package Explorer, I could then right click and use Compare With -> Each Other.
Recently I have found that my workspaces now only allow either a single file or a contiguous range of file to be selected. In other words, Click...Shift+Click does what I expect, but Click...Ctrl+Click doesn't.
Since this works fine for colleagues working with exactly the same version of eclipse (we all module load the same Eclipse deployment) I have to assume that it is a preference of some kind.
Unfortunately, after having gone through the preferences page with a fine tooth comb, I can't see anything which might control this behaviour.
So, can anyone think of a reason why multi-selection may be failing or disables in my explorer, but not that of some of my colleagues?
Note I am working with Eclipse Juno, though I have seen this with previous versions too, on Red Hat Enterprise Linux 6, using the Gnome Desktop Environment.
After many attempts and many failures, I eventually managed to track down this problem.
It seems that if the Gnome preference "Show position of pointer when the Control key is pressed" is enabled† then multi-selection fails in Eclipse.
To fix it, I simply disabled "Show position of pointer when the Control key is pressed"†.
† On my Red Hat Enterprise Linux 6 installation this is located in: System > Preferences > Mouse > General tab, Locate Pointer section
The thing which finally gave my a hint was identifying that this was probably due to the same underlying problem as another I was having with the NoMachine NX client, where the nxclient wasn't passing Ctrl key presses to the remote end at all. See the bug report Enabling Gnome Accessibility option prevents "ctrl" key from being recognized in NX window
After my Eclipse Bugzilla account is created,
I have added a bug report for this problem to the Eclipse Bugzilla: Bug 417573

can Eclipse display multiple Variable windows at a time?

Eclipse allows multiple source windows (obviously) and even multiple console windows to be open at the same time.
I'm looking to see if there is a way to open multiple Variable windows at a time. While debugging I sometimes want to visually compare several structures and this would be easier if I could open each object in its own Variable window.
Thanks.
Yes, in the upper right hand corner of the Variables window, there should be a button 'Open New View'.
EDIT: I'm not sure if this is necessarily the best way to get what you want, but it worked for me. I just downloaded a fresh Kepler install, and you can get the "Open New View" button by installing the C/C++ Development Tools. To install go to Help > Install New Software.
Note: I had to clean my workspace after installing because I was getting "Editor does not contain a main type errors". But after that everything worked fine and the button was available.
Hope this helps!

Can I set Eclipse to only emit errors, warnings, etc. for the current project?

I want to be able to ignore warnings in other projects in my workspace when I'm concentrating on my current project. I looked through Window | Preferences and saw no such option. Eclipse obviously knows which project is current, because when I mash F11 it runs (or tries to).
In the Problems view, click the little triangle thinggie on the right, and select Show -> Errors/Warnings on selection. Then it will show the errors from the currently selected project/file, etc.
You can either Close Project all other projects, you can set a filter on the Problems View to only show errors for the current project, or use Mylin to limit the scope of what you are currently seeing.
I just upgraded Eclipse (Helios) to the latest version of the SDK and LogCat shows my current application automagically.
You can make use of Working Sets to put projects into logical groups.

Developing an Eclipse Plugin and adding a submenu item to navigator

This is my first attempt at an Eclipse plugin- the plugin architecture is vast and a little overwhelming, but I've found a number of tutorials and how-to's online which is helping, but trying to do the following is driving me nuts:
I want to add a submenu item that is available in the navigator context menu when you right click on an Eclipse project.
I can get a submenu to appear on a project file or folder, but absolutely no idea how to have it appear on a project.
Would someone be so kind as to provide me with step by step instructions, starting with creating a new plugin-project? This is probably a lot to ask, but I can't seem to find an online guide that has just the right amount of detail. I specifically want to use the plugin-project wizard rather than hand code a plugin.xml file as I am not very familiar with the Eclipse plugin architecture.
Ok- I got it- it was simple, but I got lost in the noise of the API-
Create a new Plug-in Project using the Plugin-Project Wizard and when the wizard has launched...
1.
On the Plug-in Project page, use anything as the project name and 3.5 as target platform eclipse version
2.
On the Content page, skip ahead and just press next
3.
On the Templates page, select "plug-in with a popup menu" and press next
4.
On the Sample Popup Menu page, you will see that eclipse has prefilled the field
"Target Object's Class" with a value of "org.eclipse.core.resources.IFile".
This means that when your popup menu will only appear when you right-click on a file in
a project. As we want the menu to appear when we right click on a Project when
we are using the Navigator view, simply use "org.eclipse.core.resources.IProject" instead
5.
Finish
You can validate that your pop-up will appear as expected by right-clicking the MF file
and "Run-as" > Eclipse Application
Now to refactor the resulting code to use menuContributions and commands rather than objectContributions and actions :)
I think you have a similar question (menu in the package explorer) here:
Renaming packages in Eclipse (thanks to Rich Seller)
This could be a good start, and is a complete plugin project.
You should look into the Eclipse Common Navigator Framework there are a few tutorials on this side that tell you what to do in detail The Project Explorer is an implementation of the CNF. You should also consider using the Platform Commands to add your commands (and popup menu item) to the popup menu associated with the project explorer. It's somewhat easier to use commands than actions. You should be able to do it with by adding a Command in your plugin extensions. Unfortunately off the top of my head I don't know the right incantation to have the command appear in the project explorer. But you will be able to find it in these resources.

Eclipse Search Menus disabled randomly

I use Eclipse 3.3 in my daily work, and have also used Eclipse 3.2 extensively as well. In both versions, sometimes the Search options (Java Search, File Search, etc) in the menu get disabled, seemingly at random times. However, with Ctrl+H, I am able to access the search functionality. Does anyone know why this happens? Has it been fixed in Eclipse 3.4?
window > close all perspective works for me.
Using Eclipse 4.3(!) this happened to me after doing a case-sensitive search.
Window -> Close All Perspectives didn't fix it and neither did restarting Eclipse using -clean. While messing with the search box, I discovered that simply clicking to a previous search entry allowed me to edit it and search again! Clicking back to the case-sensitive search grayed the option out again.
So before you reset anything in your workspace, try pulling up an older search entry using the Down Arrow.
I think this answer is what you all need to solve the issue on all versions.
I am using RAD 8 and I have also faced this problem than I removed org.eclipse.search directory in (workspace currently using) workspace/metadata/plugins folder then restart the eclipse.
That's all.
I don't have an exact answer. I will recommend that you try to correlate the disablement with which perspective is active. Likewise, which view is active. I have been using 3.4 and not experienced this issue.
Darn! I have that problem too -- in Eclipse 3.4.2.
Seems to be related to Navigator and Project Explorer views:
- Switch to Debug perspective: Search menu items are there.
- Switch to Java or Java EE perspective: Search menu items still there.
- Click on a project in Navigator or Project Explorer: Search menu items all DISABLED.
(Curse! I use search in Selected Resources a lot! )-:
Hmmm... It may slso depend on the file type currently open in the editor. (Like Java vs xml.)
Still present in Eclipse 3.5.2 -- and for the first time really sticky.
I checked out the "close all opened files and open any other file afterwards" answer and that brought back the Search menu items. Additionally, if you were lucky and have the Search result view open, than indeed there is this little link "Open search dialog".
By the way, additionally lots of other project-related menu items seem to be greyed out also together with this, and they did not reanimate :-( But I did not really check out if these are only items for which it is useful and planned to be greyed out in this situation.
I'm using RAD 7.5.1 which runs on Eclipse 3.4 and I get this problem frustratingly often. It doesn't matter which perspective or view I'm in, or which editor I have open.
Restarting RAD usually clears it up, but because that's such a colossal pain, I found that you can get around it in the Search View, there is a link; "Start a search from the search dialog" which will bring up the search dialog.
This isn't a great workaround because the link only shows if you have no search history. To do another search, you'll have to clear your search history in the view.
A late comment for anyone getting bitten by this, but I found "eclipse -clean" fixed it => this does a cleanup of the workspace before starting
Thanks http://letsgetdugg.com/2009/04/19/recovering-a-corrupt-eclipse-workspace/ for the tip, after I guessed my workspace might be corrupt.
Before search, check you may choose scope in empty Working set. Most Search menu disables Search button when you choose it. And mine, too :)
window > close all perspectives worked for me too.
But if you are just looking for a text search in the project you could press Ctrl+Alt+G on a marked text
I couldn't get it to work even when restarting Eclipse.
Here's what worked for me: Closing all open files and opening a different file. The different file happened to be .java, but not sure if that had anything to do with it.
I get this problem from time to time.
In the past I've fixed by starting eclipse with the -clean option.
Once when that didn't work I created a new workspace.
I followed these instructions for those two solutions.
The clean option didn't work for me today and I found this thread because I didn't want to create a new workspace. The closing all files and reopening one file did work however.
I had this issue also in eclipse 3.6.2: Helios Service Release 1.
Closed all the editor windows, and the search has been enabled.
Switching to another perspective, then back, works quickly for me.
I've faced similar issue in Ctrl+H "File Search" tab. The "Search" and "Replace" button was grayed out (disabled). The solution is fill the "File name patterns" text box (for eg, *.py). May be this is by design!
I have this problem with MyEclipse 7 (eclipse 3.4) under Debian Lenny. Perspective doesn't seem to matter. I get around it with the shortcut Ctrl+H but I was hoping for a better way.
Just had this problem in Eclipse Neon 3. It is a very common problem in RAD. I could find using in the console, then switch back to the source and search. RAD would disable the find/search options per source file open. This is very frustrating.
I had this problem too. It appeared when I installed the m2eclipse plugin.
I had not found a solution, but you can use Ctrl+H shortcut instead.
And you can navigate between tabs with Ctrl+PgDown or Ctrl+PgUp keys.
I've uninstalled the following pluings and it worked.
Maven integration
PMD
eclipse checkstyle plugin
EclEmma (coverage)
I don't know which of those cause the problem. To uninstall a plugin: Help -> Software Updates...-> "Installed Software" tab.