Eclipse: Pydev keeps on changing my settings - pydev

I am trying to turn autopep8 off in Window->Preferences->PyDev->Editor->Code Style->Code Formatter. But on the next Eclipse restart the tickbox is set again. I tried adding FORMAT_WITH_AUTOPEP8=false in the .prefs file, but that gets overwritten.
I want to remove/add interpreters in Window->Preferences->PyDev->Interpreters->Python Interpreters. But on the next Eclipse restart the removed ones are back and the newly set ones are not there.

Humm... usually those preferences are written under the workspace you selected, so, my guess is that your user probably doesn't have the needed rights to write to that folder (i.e.: check the attributes for the folders beneath the '.metadata' of your selected workspace).
You can try to point to a new workspace in a new folder in your home to see if it's persisted there.
If that's not the case, please report on whether you have something in your error log and what OS are you on (see http://www.pydev.org/faq.html#PyDevFAQ-HowdoIReportaBUG%3F for details on getting the error log).

Related

How to dynamically modify workbench.xmi during startup runtime-eclipse

Since user did some complex operation happened in my Eclipse Rcp Application, which causes some wrong setting happened in user's workspace, (with some projects existing in the workspace).
And when user start to run on the application in that "bad" workspace, the Eclipse RCP gui looks weird, and the existed projects can't opened properly.
After research, I found it's because of some wrong settings happened in workbench.xmi file located in .metadata/.plugins/org.eclipse.e4.workbench, in the user's workspace.
A workaround is to manually change remove the wrong settings in workbench.xmi, or change to a new workspace and copy user's projects into the new workspace.
My question is how to dynamically identify the wrong setting workbench.xmi file located in user's workspace, so that I can change the content of workbench.xmi, during startup my Eclispe RCP application ? So that user don't need to do the manual workaround.

Wrong configuration of Goclipse in Eclipse

Everytime, when I try to run my Hello-world-program, I get an error message from Eclipse saying "Resource doesnt have a corresponding Go package." There is already a post about the same error message, but the provided solutions didn't help me.
The installation set the GOROOT automatically to "C:\Go\src"
For my workspace I created a directory "D:\eclipseGo\workspace", and assigned it to my GOPATH variable.
Following picture shows my setup from the project explorer
As you can see, the GOPATH there points to the src-folder.
In the preferences (under "Go"), the GOROOT was set automatically.
Unter Go-Tools I picked the path of the gocode.exe with the "Browse..."-button, and selected the gocode.exe, which was at "D:\eclipseGo\workspace\bin\gocode.exe". Below, the gofmt was set automatically.
That's all what I configured. Does anyone know, where the problem is?
Your project setup seems to indicate MyProject is not contained inside D:\eclipseGo\workspace, so you either need to move your project to a folder inside D:\eclipseGo\workspace\src, or alternatively enable the option "Also add project location to GOPATH, if it's not contained there already." in the project's GOPATH settings (note that this can be configurate globally or per-project).
The Project Explorer display above is misleading because the folder icons seem to indicate MyProject/src is a "source folder" and the files it contains are part of the GOPATH, when they are in fact not. I'm making a note to have this fixed in the next release, as well as the refresh bug.

Eclipse build failure when project folder has ampersand in pathname

I have a C/C++ project which has some normal and some linked/virtual folders and it has been building just fine. Now that I've put it into perforce over VPN (the path of which I cannot modify), there is an ampersand in the path of the project that causes eclipse to fail when it gets to building the files in the linked folders (it appears eclipse builds an entire pathname for linked folder's files from the environment variables and passes that to the gnu compiler). I don't know if Perforce allows aliasing of workspaces (to get rid of the ampersand) but I can't find one. I've tried alt root but that doesn't seem to do anything useful. I've found that using the DOS command prompt subst F:
C:\perforce\pathwithampersand will allow the project to build in eclipse but now I loose the ability to utilize the Perforce plugin features. Although I can still manually check files in/out using the P4 client, it would be very useful if the ampersand problem was taken care of by eclipse. I've searched and searched but can't find anything about eclipse having a problem (or solution) with ampersand in the folder path. I'm using eclipse platform 4.2.1 and CDT 8.1.1 but cannot update to any later version(s) than those because they are part of a tool suite a vendor controls. Perforce plugin is 2013.1/server is 2009.1.
Go to the P4 Client Connection->Edit Current Workspace
Expand the depot tree until you see your project. Right mouse click on it and choose Include Special.
Click Files radio button and click the Save button.
That will cause a path name to be displayed next to your project under Client Expression. Click to the right of this path which will cause it to become editable. Cursor over to the part that includes the ampersand and delete it. Click the OK button.
P4 will then (eventually) ask if you want to update files to the new location (or something like that). Choose update and it will take some time to create the new folder and move the files there. It is unclear whether you need to log out of P4 for it to be completely enforced so the best solution is to do so (Connection->Log Off). It might leave the old directory so you can delete it at will and it will not appear the next time you start P4.
Some users found this sequence did not work this way so they had to click the "View workspace mapping as text" button on the workspace edit dialog and delete the ampersand. Click apply.

Where does Eclipse store the info about which workspace to start up with?

When I launch Eclipse it starts with one of the workspaces I created and selected "don't ask again" (standardly, Eclipse asks about which workspace to start with during the startup).
So it must store somewhere which workspace to use. Where does it store this piece of information?
In
$HOME/.eclipse/org.eclipse.platform_3.7.0_155965261/configuration/.settings
there is a file
org.eclipse.ui.ide.prefs
where it is stored.
With Eclipse Juno, I can see this information in:
eclipse\configuration\.settings file.
I guess you are looking for RECENT_WORKSPACES and SHOW_WORKSPACE_SELECTION_DIALOG vars.
The settings have changed since this question was posted, as newer versions of Eclipse have been released.
With Eclipse Luna, navigate to $ECLIPSE_HOME/eclipse/configuration/.settings and the file org.eclipse.ui.ide.prefs contains settings like this (Windows file configuration shown):
MAX_RECENT_WORKSPACES=5
RECENT_WORKSPACES=C\:\\src\\eclipse-workspaces\\luna\\MyApp\nC\:\\src\\eclipse-workspaces\\luna\\MyOtherApp
RECENT_WORKSPACES_PROTOCOL=3
SHOW_WORKSPACE_SELECTION_DIALOG=true
eclipse.preferences.version=1
Each entry in RECENT_WORKSPACES appears to be delimited by \n with no spaces. Whenever I manually shuffle my workspaces around (which is rare, but it happens), I've had great success hand-editing this file, saving it, and having the new paths show up just fine in the Workspace Lancher/Select a Workspace dialog.
You have eclipse configuration files in "eclipse_home"/configuration and the one you may looking for is in settings directory : org.eclipse.ui.ide.prefs
I was facing an issue with Spring Tool Suite 4. The workspace used to give an error and I wasn't able to select other workspace also. With the help of some answers already given, I could locate the configuration in $ECLIPSE_HOME\sts-4.7.1.RELEASE\configuration.settings\org.eclipse.epp.mpc.ui.prefs
I removed RECENT_WORKSPACES property (after you try to restart, it adds default entry again) and changed
SHOW_WORKSPACE_SELECTION_DIALOG=true
STS started showing workspace selection dialog again.
If Eclipse has been installed with ubuntu-make, the file location is ~/.local/share/umake/ide/eclipse-jee/configuration/.settings/org.eclipse.ui.ide.prefs.

uninstall eclipse 3.5

i'm having problems with eclipse and i think i need to re-install it. is there a safe/recommended way to uninstall it?
I have Eclipse 3.6.2 (Helios) and when I have to uninstall it, the extent of this operation is moving the folder into the recycle bin. Just be sure that your workspaces aren't saved inside (or if they are, move them out), and you should be set.
There's no installer for Eclipse (the one from eclipse.org) , so just delete your Eclipse folder.
However, there's 2 other parts to Eclipse that can cause trouble if they are damaged.
your workspace, usually just a folder called "Workspace" in your user home folder.
a folder named ".eclipse" in your user home folder.
Rename those and see if it helps (better not delete them, as they contain your projects and setttings)
Just delete it. It don't "install" itself in the normal way, it's just a (very big) unzipped file.
You may also want to delete the .metadata directories, wherever you created workspaces, but that shouldn't be necessary.
Open eclipse
Click Help > About and then click command link Installation
Details... to open a dialog showing pages that provide more detail
about your installation.
Click the Installed Software tab to see a list of the software
items that you have installed into your system.
Select the items that you wish to uninstall.
Click Uninstall....
The Uninstall Details page will show you a list of the items that
will be uninstalled. Expanding each item will show what additional
items (if any) will be uninstalled as a result of your choice.
If you change your mind about which items should be uninstalled,
you may click Back to see a checkmark list of the items you selected
before. You may check and uncheck different items in the list, and
click Next when you are ready to continue.
Click Finish to start the uninstall.
Once all of the software is uninstalled successfully, you will be
prompted to restart for the Workbench. Click Yes when asked to exit
and restart the Workbench for the changes to take effect.
You just need to delete the eclipse installation folder. Nothing is "installed" by Eclipse into your system apart from this folder.
But I don't think you really need to delete it completely from your file system. Maybe you can give us a more detailed description of your issue for us to be able to point you to an efficient solution. Maybe you only have to restart from a clean workspace or revert the Eclipse installation to a previous state.
Anyway if you really want to delete it, pay attention to backup your workspace in case you chose to store it in the Eclipse installation folder.