I have a Maven Java project, imported using m2eclipse.
The target/ directory is not marked as 'Derived' by m2eclipse.
Problems:
It is validated, so any validation error appear twice. My example shows a JSP Problem, when I insert intentionally an error in a jsp.
When I want to open a resource with Ctrl-Shift-R, all files appear twice, and I run the risk of editing the copy instead of the original file.
Possibly see post eclipse-ignore-folder
Note: When I set manually the directory to derived, the validation problem doesn't disappear, so that would only be part of the solution...
Question:
Is there something I need to do, so that m2eclipse sets the target/ directory to 'Derived' ?
Yeah, that has been around for a while. I wrote a plug-in that allows you to mark directories as "derived" without having to find them all (http://eclipsefrills.sourceforge.net/). It's not great, and you still have to manually run the action to make it work, but it may help.
Odd, though, I have not noticed the problem lately, myself. I wonder if there is some setting in the preferences that takes care of this now.
Good luck.
I got rid of this problem by writing a custom plug-in KeepTargetDerivedPlugin. As its name suggests, it automatically keeps all target folders derived (unlike the other solutions, which require user action).
Still, e. g. the YA2O's plug-in can be used to mark derived folders of projects which already reside in the given Eclipse workspace.
Yes: open a bug report :)
I have been so annoyed by this problem that I wrote a plugin to solve it. You can get the source and jar from here.
Related
I've recently migrated to IntelliJ and need to solve a particular problem: I have a project that has numerous modules; one of these modules is purely for testing and contains a number of errors:
.
I'd like to suppress all warnings/errors/inspections on NNGINETest in this screenshot. Is there a way to configure the project to do that? I found this answer: How do I disable some inspections for modules in IntelliJ IDEA? but I'm not quite sure it's for the same thing. On top of that, the answer was a bit unclear to me and I wasn't able to understand all of the steps because of how new and unfamiliar with IntelliJ that I am.
If someone could please thoroughly explain to me how to solve this problem, I would be grateful.
Since you have errors in NNGINETest, I suppose you don't need to run it. So I would suggest marking the src folder under NNGINETest as excluded. like:
I tried to expand Eric's answer but it was rejected for arbitrary reasons, so I'm writing my own to try and clarify some more for anyone else that runs into this problem since I hate bureaucracy. Adding it as an answer will allow me to provide some visual aids:
NNGINETest has errors that are reported in building. Eric's answer is correct in that we can exclude it, but the problem is that the console is still spammed with error reports upon building when I right clicked the project and marked it for exluding that way. I fixed it by excluding it via the menu in File -> Settings -> Build, Execution, Deployment -> Compiler -> Excludes
You'll want to probably also make sure that the "Recusively" checkboxes are checked for modules you want to exclude.
I don't really know what the difference is here between this and using the right click menu option (I couldn't find anything in the IntelliJ manual about it either but maybe someone can provide a link in the comments), but this successfully prevented NNGINETest from littering the console during building:
Additionally, using the Excludes menu rather than the directory marking for the module allows it to still appear in the Project module list rather than disappearing. An "x" will appear by excluded folders. This is pretty useful in my opinion:
Hope this helps!
I have a project in Accurev for which I created a workspace. I did File > Import > Existing Projects into Workspace. After the import, the first thing that I have done is Configure Build path (Project>properties>Java Build Path). Still, I can find a lot of errors. I'm new to Java and I'm searching the Java errors in google and fixing them. Please suggest, How can I solve the similar errors for multiple files.
For Example,
The Empty block should be documented (I have it in 3 files)
The parameter customerExpression should not be assigned ( Multiple files )
The import java.util.List is never used ( Multiple files ). There are some other imports which were used inside the company are never used.
Apart from Java Problems, I do have
Classpath Dependency Validator Message
EJB Validator Message
HTML, JSP Problems etc which I feel can be solved once I solve Java Problems. I was told that Java problems are important. COrrect me if I'm wrong.
Please suggest.
Thanks
Like #Carlos Heuberger said these are seems like warnings not errors they won't cause any problem for your project to run. People usually don't care that much of warnings.
If you want to get rid of those warnings eclipse have quick fix actions for some of them. To do that head one of the warnings and right click then select quick fix. This should pop out a screen which summarize the action that eclipse will take.
Or you can simply hide them.
If you want to hide all the validation warnings go Window>Preferences>Validation then click Disable All button. This will disable all validation messages in your workspace.
For java warnings go through Windows>Preferences>Java>Compiler>Errors/Warnings and change the warning options according to your preferences. In my workspace under the Code Style section Undocumented empty block is setted to ignore so i don't get that warning in my workspace unlike yours.
Hope that helps.
Related Questions:
Intellij IDEA doesn't detect changes
How to clean project cache in Intellij idea like Eclipse's clean?
The answers does not seem to work.
File -> Synchronize, VCS -> Refresh File Status, File -> Invalidate Cache seem to be good solutions, but they do not work at all.
Also one of the file is greyed out just yesterday. But I am seeing this problem for two weeks now.
I have rebuild the project. Still it does not work.
Please help. I am using intelliJ version.
Should I delete .IntelliJIdea13>system>log?
Please look at this link too:
https://github.com/pantsbuild/pants/issues/564
I did change the folder in which my project file exists, and created a new folder with the same name and update from the SVN
"What seems to be happening is that when you don't use the --idea-project-dir override, a new directory with the name of the project is created.
./pants goal idea ... --idea-project-name=zun123463
Generated IntelliJ project in /Users/zundel/Development/java/.pants.d/idea/idea/IdeaGen/zun123463
When you use the --idea-project-dir flag, you don't get a separate directory to hold the .iml files:
./pants goal idea ... --idea-project-name=zun123463 --idea-project-dir=squarepants/idea
Generated IntelliJ project in /Users/zundel/squarepants/idea/
I'm not sure what is the best course of action. On the one hand, the current behavior gives the user exactly what they ask for so maybe we should leave --idea-project-dir alone. On the other hand, it doesn't act the same as if you don't specify the flag and sets you up for failure. I'm going to propose a patch that tacks on --idea-project-name onto the end of --idea-project-dir.
"
is this the problem?
How do I fix it?
Please help
I had this problem last night and it was a pain. My solution was to delete the .idea folder, invalidate caches, and reimport the project. I thought the problem was related to the scala plugin, but I guess its not.
This problem can be solved by deleting logs, caches, indexes and temp files at the IntelliJIdea13/system folder
I just installed the new eclipse kepler (eclipse 4.3). It shows me hundreds of errors and warnings from third party javascript libraries.
I tried to disable the javasscript validation completely by unchecking "Enable JavaScript semantic validation" in "Preferences/JavaScript/Validator", but with no effect - Errors and warnings are still shown.
Is there another option to disable them or is this just a bug?
Can other people confirm this issue or is it just me? :)
Edit 1: Lavie Tobey pointed out, i should set all validations to "ignore" -> did not help
Edit 2:
Jim Garrison pointed out, i should disable the builder for the projects -> Actually I don't have a javascript builder in there. Disabled for testing purposes all of them, but did not help:
You can go Project properties/Javascript/Include Path/source and exclude the third party components.
There are two places you have to look. You have found the first. The second is in each project's Properties dialog, accessed by right-clicking on the project in Package Explorer and selecting "Properties". There, under Builders you may find a "Javascript Validation" entry, which you must disable.
You have to do this for every project that contains a Javascript Validation builder.
Try this: Open the .project in notepad and remove the javascript validator
I've found that in previous versions of Eclipse, the only way to really get these to go away is to enable it and change every case to "Ignore".
You can switch off (and configure) validation in Preferences/Validation or (for each project) Properties/Validation. However, this doesn't seem to force a cleanup of the messages.
Like it was said : be sure to go to PROJECT properties (right click on project, properties), and not Workspace (Eclipse/preference).
I searched like 20 min before hitting myself ;)
I solved this by choosing a PHP profile for my javascript instead.
Maybe you don't get the same functionality but for me this profile is just fine. Crashes, hangings & frustration went away.
I had the same issue for XML Validation. I deactivated the validators globally and in the projects itself, nothing worked for me. There wasn't even the slightest hint that anything changed. I even uninstalled XML Editor and Validation Plugins without any effect.
In the end the problem was solved in copy-pasting the XML files with a validation error, deleting the old files and renaming the copies files to the original ones. Somehow Eclipse did not re-validate the old files, but the new ones were okay.
I keep getting this when trying to start a new project
ERROR: Unable to open class file C:\Users\Levi\Desktop\Android\workspace\Droid1\gen\com\androidbook\droid1\R.java: No such file or directory
I tried changing preferences to alter build path to project, but it still wouldnt work,,,
Is subfolder on desktop a bad place to install Eclipse?
Clean works sometimes and should be tried. I also find that blowing away the gen directory and refreshing will cause it be to rebuilt. Try that as well.
However, sometimes even that doesn't work and I've been forced to remove the project from Eclipse and then re-import it. This, unfortunately, works for me every time if the above has not.
Good luck.
Im also getting that error, running a Project->Clean in Eclipse helps for me.
Project->Clean should certainly fix this (unless your resources won't compile for some seperate reason).
I remember that the first time I ran Eclipse (in mid 2009, can't remember if it was Galileo or Ganymede or whatever) on Windows Vista, it presented several problems that were eventually traced to Eclipse itself being in a directory whose path contained a space...
Usually, the above tips (refresh, clean) work for me. But lately I had a very persistant instance of this error, which was caused by something else:
One of the layout .xml files in res/layout contained a reference to a custom view (org.company.project1.MyView). However, I had changed the package path (org.company.project2.MyView), so the reference had become invalid.
Thus, if everything fails try browsing your layout .xml files for invalid custom element definitions.
Cheers
after spending hours trying to ultimatly discover the issue behind the Class Issue not being found, resolved,or directory not there issue....
sometimes yes the issue is due to a bad binary or xml... as sometime a clean will do the trick or a xml edit will solve the day.. when all else fails.... this may do it..
"create a new workspace"
go into the workspace.... and then
Switch to your old workspace... in the newly formed workspace...
this was my silver bullet. so frustrating to not have a solid answer.
using Version: Helios Service Release 2
Build id: 20110218-0911