Eclipse: Save files without asking when I click run - eclipse

Is there a way to save files without asking in Eclipse? Every time I click Run, it asks me if I want to save the file, and I always do.

Preferences > Run/Debug > Launching.
There's a setting called "Save required dirty editors before launching". Set it to "Always".

There should be a check box on that Save File dialog:

Or you can choose the option in Window->Preferences->General->Workspace and check the option called "Save automatically before build". This would make your life definitely easier

You can select the Automatically save resources checkbox the next time it prompts but I believe that's a per project setting.

Related

How to disable the "Save As..." option in QGIS

I would like to ask, how can I disable or hide the "Save As..." setting from QGIS3? I want user to only use the Save To.. setting, where they can save the project into postgreSQL or GeoPackage, I don't want them to save the project in their local folder. Is there anyway to do it?

Netbeans is not showing source tab

Netbeans is not showing source tab, please help.
I had the same problem and I had to delete the Netbeans Cache and User Directory. Once I did it worked fine.
you will find the cach in the path: C:\Users"user_name"\AppData\Roaming\Netbeans
delete all files in this folder
It may be that for some reason the layout changed. I am not very familiar with NetBeans but I presume that there is an option to reset the layout under
Window -> Reset Windows
Hope this helps!
As of now you are viewing Project view. You have to click on Files then you will be able to see what you want to see. :)
or still not visible follow following steps :
User selects main menu Window.
User clicks menu item Reset Windows and all views are reset to their defaults.
Choose from IDE menu bar, Next to FILE---EDIT--VIEW---and then go to View option-- select show editor option
show "Editor Tool bar"(put tick mark to select)

Automatically save files in eclipse when closing tab

In Eclipse (CDT) when I close a modified file's tab in the code editor, I'm prompted with whether or not I want to save the file. Unlike when I run the project, I'm not given an option to autosave the file when closing a tab in the prompt that comes up. I haven't been able to find one yet, but is there any setting in the Eclipse Preferences that disable these prompts and automatically save modified files when I close their tabs (not every x time)?
You can use auto save feature in eclipse neon. See this answer also look at other answers to this question Eclipse save automatically

How do you clear the validation errors in Eclipse?

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

Eclipse: How do I refresh an entire workspace? F5 doesn't do it

I have a workspace with a bunch of java projects. If I go to File->Refresh, it doesn't really refresh anything (perhaps the currently selected project). How do I get eclipse to refresh all of the projects?
It will indeed only refresh the current project (or, more specifically, the current selection in the project explorer). I just click somewhere in the project explorer, do Ctrl+A to select all projects and then press F5 to achieve a complete refresh.
If you want to refresh all Projects, ignoring closed projects, then the easiest way is to:
ctrl-click and item in the Project Explorer (to ensure the P. Explorer has focus)
ctrl-click the item again so that it's no longer highlighted (but the P. Explorer still has focus)
F5 will now Refresh the entire workspace
Effectively F5 refreshes the Workspace when a navigation view has focus and nothing is selected.
Ctrl-A, then F5.
You can set up the workspace to automatically refresh when it detects changes in the preferences. (Window > Preferences > General > Workspace > Refresh Automatically)
Easy.
Create an external tool: Run > External Tools > External Tools
Configuration...
Create a new Program configuration Point the location to an exe that is very fast (I use Cygwin's 'ls')
On the Refresh tab, choose Refresh Resources upon completion, The Entire Workspace
On the Build tab, deselect Build before launch
Run the tool to refresh all projects.
Control click all your projects together, then right click and hit refresh.
Usually I refresh all like that, then i make sure to clean all projects and rebuild in eclipse.
For anyone curious how to select all of those projects on OS X where Ctrl+A doesn't work:
Click the first project
Hold down Shift
Hold the ↓ key until they are all selected
Now press F5
This answer led me to an even simpler solution, no configuration necessary.
Cmd-3 build all (control-3 on windows)
Edit: Correction -- I need to both refresh and build. Build does not automatically refresh. I'm currently using two actions, "echo" from my comment in the linked answer I just referred to (an External Tool configuration with a hook to refresh all), followed by cmd-3 "build all"