I accidentally clicked on "Validate" for all of my projects (instead of going to Team > synchronize...) and I have several validation errors and tons of warnings.
I can't figure out how to clear these so it goes back to just having the standard errors.
(One way is to go to "Configure Contents" of the "Problems" view and deselect the validation errors, but I know they're still there, just hidden... it bugs me that they're not actually removed)
I've tried restarting eclipse, tried cleaning all projects but that doesn't clear these validation errors.
You should be able to select all the offending markers in the Problems View, right-click and choose Delete from the context menu. Clean-building causes all builders to remove only the markers that they produced, but these markers weren't produced by a builder (you created them through an explicit invocation of the "validate" command.)
I'm not aware of a built-in way to clear them all. You might try deleting the markers file in
[workspace dir]/.metadata/.plugins/org.eclipse.core.resources/.projects/[project name]
Go to Window -> Show View -> Problems and delete error marker(s) on right mouse-click
You probably want to exclude some third party libraries (such as jquery-1.x.min.js) from being validated by your project.
In this answer I've documented how to disable it for specific sources -> How do I remove javascript validation from my eclipse project?
I'll just repeat the steps here:
Right click your project
Select Properties -> JavaScript -> Include
Path Select Source tab. ( It looks identical to Java Build Path Source tab )
Expand JavaScript source folder
Highlight Excluded pattern
Click Edit button
Click Add button next to Exclusion patterns box.
You may either type Ant-style wildcard pattern, or click Browse button to mention the JavaScript source by name.
BTW, I think you should never disable validation for sources that you are in control of (i.e. coded by yourself or your team).
In case you select and delete more than 100 problems and eclipse only deletes up to 100 problems, check the "Configuration Contents..." menu. This menu is the top-right of the problems tab. There is a small triangle drop down menu containing the configuration. In that menu, there is a "Use limits" checkbox which you should uncheck to be able to dleete all problems at once.
I was facing same problem but i am able to remove these errors.
Go to project properties -> validations and click on override validation preferences.
Click on disable all and Apply changes and click on okay. Let the project built.
Again go to project properties and change the validation settings as of original.
In Indogo
GO to
Property -> Builder - > Uncheck Validator
To disable validators in your project or workspace, complete the following steps:
Click Window--> Preferences and select Validation in the left pane. The Validation page of the Preferences window lists the validators available in your project and their settings.
To disable individual validators, clear the check boxes next to each validator that you want to disable. Each validator has a check box to specify whether it is enabled for manual validation or on a build.
Optional: You can also change the following check box options on this page:
Allow projects to override these preference settings--->Select to
set individual validation settings for one or more of your
projects.
Suspend all validators-->Select to prevent validation
at the global level. If you select this check box, you can still
enable validation at the project level.
Then Click OK.
If you want to set individual validation settings for one or more of your projects, see Overriding global validation preferences
Related
Currently I'm using Eclipse's Project Explorer view into my RCP Application by writing the following line of command into my "Perspective.java" file...
layout.addView(IPageLayout.ID_PROJECT_EXPLORER, IPageLayout.LEFT, 0.30f, editorArea);
It is currently giving me all the default right click options that eclipse's project explorer view gives..
i.e. cut, copy, paste, delete, refresh, etc.
I want to add my own custom right click options into these default options. Does anyone know how to do it? Or will have to build my own project explorer view??
Is there anyway from where i can get the code that eclipse used for building the project explorer view?
would like to know what can be done in this situation or any other solution for this??
Thankyou !!
While my comment covers your question, the follow up questions need some more space:
a) how to look at eclipse sources:
*File -> Import ... ->Plug-in Development -> Plug-ins and Fragments -> Next*
Chose *Import as -> Binary Projects* (you can read the source code but not change it. This saces time, because the code doesn't get compiled) ->Next
Chose plugins to import -> Finish
You can find the sources in the projects in "referenced libraries"
b) you need the path to the menu entry and the plugin you want to add to. This can be done with the Plugin spy (Alt+Shift+F1 -> click on the view of which you want to get the id) or or Menu-Spy (Alt+Shift+F2 -> click on the menu entry that you want to add to)in Eclipse.
c) To add a menu entry to the popup, see the How to add items in popup menu? (the one I mentioned in my comment).
How to associate an Eclipse perspective to a file type independent from the Eclipse project?
For example, if I open a *.frm file I want the following view.:
If I open a *.js file I want to have this:
Is that possible?
How is the Debug perspective initiated? Is the Debug perspective project independent, because in a lot of project types there is a Debug perspective?
Since you asked for an implementation, you could check the extension of the file you've just opened, then change perspectives programmatically:
try
{
PlatformUI.getWorkbench().showPerspective("perspective.id", PlatformUI.getWorkbench().getActiveWorkbenchWindow());
}
catch (WorkbenchException e)
{
e.printStackTrace();
}
Edit:
Oh, and for the Eclipse project settings, go to Preferences -> General -> Perspectives.
1.Click on “Window” in the top-menu.
2.Expand the section “General” under preferences.
3.Then, expand the section “Editors”.
4. Now, click on “File Associations”.
5. You should see “File Type” and “Associated Editors” in right panel.
6. In “File Type” – you can add (click on a button with name Add should be seen next to this panel) any file-type or file extension
7. you want make sure you add it with wild-card entry (ex: *.tpl).
8. Select the above newly added file-type and you should see no editors for this under “Associated Editors” panel – because this is
newly added.
9. Now click on Add button next to “Associated Editors” panel to add the editors, it should show the list of available editors,
choose the one you like.
10. Click OK and choose this as your default editor by clicking a button “Default” appears next to this panel.
Due to some reason I found, when displaying the source ,my navigator changed from the right side (preferred) to the left side , which need more clicks to access the source file. I remembered that I did accept some chance unconsciously which result in this unpleasant change but can not find a way go back...
Thanks for your help!
Your best friend in eclipse is CTRL+3 (quick access), press that and then search for what you want, try perspectives and views, see below.
Perspectives
Check what perspective you are in (now). In the top right of eclipse there is a list of perspectives. Sometimes when you carry out an action it asks you if you want to change perspectives. This can change your views/layouts. You might want the Java or Java EE perspective.
views
There are multiple views of your files. What is the name of the tab where ComputeBench is showing up? Try opening the "Project Explorer" or the "Package Explorer" views.
What are the shortcuts for the context menu actions "Team -> Synchronize with Repository" and "Team -> Update" on the whole project?
I have already found shortcuts, but these are executed only on the file i have currently opened. But I want to execute it on the whole project without having to scroll the project explorer to the top and right-clicking on the project.
If there are no such shortcuts, how can I create them?
As john.k.doe indicates, that's the right solution, but you also need to do something else in order to make the shortcut actually work, which is go to Window > Customize Perspective > Command Groups Availability and there just check the SVN box ;)
you can almost always get the key shortcuts you want by
go to preferences type "keys" or go to General -> Keys
in the field presented when you click on "Keys"
in the left pane, type the command you are interested in setting up a shortcut for:
the image below is from my mac, but it works the same way on windows/linux, you just might choose something besides Cmd-Y as your shortcut modifier. the U under User indicates that i was the one to add that modification.
I have written a small Eclipse plug-in which selects the active project in the Package Explorer so you can execute other actions (like 'Sync with repo' and 'Update') on it. I think this approach is more flexible compared to writing a plug-in that selects the project and executes a predefined action.
You can get the plug-in at http://code.google.com/a/eclipselabs.org/p/eclipse-tweaks/downloads/list, it is named "com.xakcop.select". Download it and put it in the dropins/ folder of your Eclipse installation. Then when you restart Eclipse, you will find a new command Select project in Windows->Preferences->Keys. The default key binding is Ctrl+Shift+Backspace but you can change it to whatever you want.
When you are in the Java editor just press Ctrl+Shift+Backspace, this will select the project that the current file belongs to in Package Explorer. Then press the shortcut for "Synchronize with repository" and you are done.
The source code of the plug-in is also available as part of my eclipse-tweaks project: http://code.google.com/a/eclipselabs.org/p/eclipse-tweaks/source/browse/com.xakcop.select
I think the answer to this question adresses the issue.
The quickest way I've found to update/synchronize, after having set the shortcut keys, is to click on the minimize button in the Project/Package Explorer and then press the keys. After the update, simply clicking on the last used file in the editor returns to the previous workspace state (provided the "Link with Editor" button in Project Explorer is selected).
I should clarify: I use a working set for each project. The working sets are displayed as default Top Level Elements in the Package Explorer so, by clicking on the minimize button the desired Project' working set, they collapse and are easy to select. Then, I apply the shortcut on the selected working set.
From my point of view, the problem is the focus of the commands you execute.
The Team commands Snychronize and Update are executed on the current object (In my case). As you noticed, when you execute the command on the project, the project is synchonized - when you do it on a file, only the file is synchronized.
What I did as workaround is the following:
I created Key-Bindings for the commands Show in (Navigator) (Alt-N), Go to (Alt-G), and Show View (Naviator) (CTRL+SHIFT+Q, N).
With Alt-N I show the current File in the Navigator. I can then use the keys to navigate to the root that I want to synchronize (it's not always the whole project for me). If the root is to far away I use Alt-G and type the Project or Folder where I want to go to and execute afterwards the Synchronize commands.
(Go to works only in the current view)
If you have selected the Project once you just have to switch to the navigator (Show View command) and execute your synchronize commands.
You could also use rgerganov's plugin then you would not have to execute as many commands.
The procedure works also with other views (package explorer, project explorer)
What about this approach? It should also work for other SCM's or commands you want to execute on any object in the explorer views.
A fellow developer dislikes the Eclipse hovering Javadoc and would like to disable it (one option), or, better yet, only selectively enable it (other option). He's using Eclipse 3.3. Is this possible?
Not sure what you mean by "selectively" enabling it. Based on what?
Directions below are for 3.5, I don't have 3.3 lying around to check but I'm pretty sure same settings were available.
Go to Window - Preferences; select Java -> Editor -> Hovers on left hand side. You'll have to uncheck the Combined Hover option on the right; you can then either uncheck Javadoc option or check it but specify a modifier key for it (in the edit box below). In the latter case javadoc hover would only appear if you hold that key.
I've got to say, though, that the inconvenience of not having Combined Handler makes this really not worth it in my opinion.
You could go to
Preferences / Java / Editor / Hover
and untick the "Combined Hover" option: no more popup.
Then you would have:
Shift+F2: open the external javadoc if javadoc archive or directory has been associated with your project (and if some javadoc has been generated)
Alt+Shift+Q, followed by J: open the javadoc view, with the same content than the popup previously seen on mouse hovering.
In Eclipse 3.6 you can now specify a modifier key to be pressed down for the Combined Hover to be activated. This way, you can have the old behavior without the automatic popups. The automatic popups were driving me crazy, often obscuring something I was trying to read.