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

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.

Related

How to link Eclipse editor window to Eclipse project

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.

How do I prevent superDevMode from appearing in my arguments?

I'm using Eclipse (Kepler) for a GWT application and for some reason, superDevMode keeps appearing in my arguments. We are stuck with GWT 2.4 which does not know what superDevMode is. I remove the argument, hit Apply and Debug to start the app, but when I look at the arguments again, -superDevMode is in there again. I am assuming there is some property that belongs to 2.6 (the version that was installed with the Eclipse plugin), but I can't seem to find it.
Update: Below, Adam recommended that I go to the GWT tab and take it out of superdevmode. Here is a screenshot of that tab:
There isn't a way to do that. The large area at the top of the tab (above the Super Dev Mode group) suggested that something was supposed to be there, so I set the project's GWT to 2.6. Sure enough, there was a Super/Classic dev mode selection. I set it to classic, saved the settings, and then put the project back to 2.4. The GWT tab looked exactly as it does above and the arguments now has "-nosuperDevMode" in it, which is also not recognized by 2.4.
Any help would be appreciated.
Thanks,
CC
I found a temporary workaround that comes with a caveat: I made the Eclipse Run Configuration file read-only.
Example path:
<YOUR_WORKSPACE>\.metadata\.plugins\org.eclipse.debug.core\.launches\<YOUR_RUN_CONFIG_NAME>.launch
Then whenever you bring up the Dev Mode Run Configuration in Eclipse it still shows the -superDevMode flag, but when you click the Close button it now asks you if you want to save and you can press No.
The big caveat: if you actually do want to change the Run Configuration Eclipse will ask if you want to save, you press Yes, the dialog closes, but it didn't actually save.
Easiest fix is to shutdown Eclipse, manually edit the .launch file to remove -superDevMode, make the file read-only, then start Eclipse again.
Here's the bug report.
Go to GWT tab (3rd from left) and switch from Super Development Mode to Classic Development Mode

Xcode Project Code Changes Not Updating 100% After Save-Build-Run

When I make code changes to my iPhone game project in Xcode, and then do CMD-B + Enter, I expect the project to be saved, build and run on the simulator with the latest. What is happening though, sometimes, is that it doesn't pick up a small change I make unless I clean the project and then build.
I'm a long time Java person and newish to C-based languages and it's compiler. Can someone explain to me what is cached after each build that does this and how to change my project settings to avoid having to clean every time? Or tell me the bad news that this is part of C development? Not trying to bash it - I get compiled JSPs stuck in the working cache often in Java, too. :P
UPDATE: Does this have to do with the location of my builds at all? That's the only thing I can think of that's changed from a build config perspective.
Had a similar problem, I reset content and settings in the iPhone simulator
Seems odd to me, because I never get this problem in XCode. It's not a common issue with C or anything. The tools for C-based languages usually do this just as well as the Java ones.
Go to Product Menu and choose Clean and then choose Build. Thats it.
In the Xcode Build Preferences make sure that "Unsaved Files" is set to "Always Save". If not, Xcode will not autosave files before building and will use the last version saved to disk.
In case anyone still comes across this (as I was having this issue today on Xcode 5.1), all I had to do was open a new tab and close out the tab I was working in. Some sort of tab bug in Xcode.
I am not sure about this, But in case if you are using git, go to xcode preferences -> Source control -> General
Uncheck Refresh local status automatically
Uncheck Fetch and refresh server status automatically
Uncheck Add and remove files automatically
Uncheck Select files to commit automatically

Eclipse: Refreshing known types in Java project

If you press Shift+Ctrl+T or choose "Navigate > Open Type..." you get the "Open Type" dialog for quickly navigating to a known class. When you start typing a name only the classes for which the name matches stay visible. That way you can find a class of which you know the name very quick without having to browse through the package explorer tree.
This has been working great for me up until this morning. All of a sudden for a couple of my projects I am only seeing some of the types that exist. Of course I tried the obvious steps of refreshing the projects, cleaning the projects, re-building the projects, rebuilding the projects externally, but all to no avail. It is a bit odd since the types are known in other places. If I add an import statement Eclipse does not complain that it doesn't know the type and I can Ctrl-Click through the types to get to their file. However, the type navigation knows nothing about them.
In the past when InteliJ used to do this to me I would go find its cache files and delete them forcing it to rebuild. Does Eclipse have something similar I might do (I'm an Eclipse newbie)? I am using Eclipse 3.4.2 and I have it configured to not delete files on a clean (because our actual build process puts files into the output directories that I don't want Eclipse mucking with).
Have you tried closing and reopening the project? Only types from open projects are held in memory, and the refresh occurs when you Shift+Ctrl+T for the first time on a newly opened project.
Edit to add: Ctrl+Shift+R also displays the types (along with everything else) but it also supports the Camel-case thing to find the Java types quickly.
Close eclipse and delete any .index files and the savedIndexNames.txt file in workspace/.metadata/.plugins/org.eclipse.jdt.core once eclipse is restarted it will rebuildl the entire index for Ctrl+T
try starting eclipse with the -clean flag, you can add this to your eclipse.ini which can be found in the same directory as you eclispe.exe, or if you start eclipse using a bat or shell script, add it as a startup argument, e.g. eclipse -clean.
The clean will tidy your workspace, and should force eclipse JDT to recalulate types. Ive had issue with .snap files (with seem to be created on dirty shutdowns) that seem to corrupt my workspace until I clean them up, not long ago eclipse lost the Object class!! made for some interesting errors!
I get problems like this often. I tried your solution, noticed it seemed to rebuild its search index, but I still couldn't find any of my classes. Then I took a look at the little green arrow on top right corner of that dialog, and noticed I had a working set selected which belonged to another project. I find it a little dumb that Eclipse doesn't warn you about this or anything, since this can be a very annoying little detail that one tends to forget (me at least ;-)).
Anyways, clicked on "Deselect Working Set" and bam I can find my classes again. Thought I'd add this here since others may make the same mistake.
This worked for me -
Select your project in Package Explorer
Press F5 or Right click and select Refresh
I used the "-clean" as first line in the eclipse.ini (version Juno) and worked like a charm.
I'v tried all the answers and I still had the issue. I then tried this:
I deleted the project (it's a maven project) and re-imported it. This time I made sure i check the "Add Project(s) to working set" checkbox. After that Eclipse was able to find the classes in that project.
The problem must have started because I didn't check this checkbox when i first imported this project.
By the way, I'm using Neon
(Warning: Shameless marketing ahead)
If you like this feature, you would love nWire. nWire allows, among other things, to quickly search not only for types, but for any possible Java element like method or field. It also uses a navigator view which is non-modal. After searching you can see the class associations in a very quick and easy way. Check out the video on our site.

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.