I am trying to export the dialog settings of a eclipse dialog between work spaces.
Generally,the dialog settings are persisted in the dialog_settings.xml on the exit/restart of the workspace.
Up to my knowledge the files has to be manually copied from workspace (1)to the desired workspace(2) and to be restarted for the settings to be loaded
file path to be copied:
workspace1.metadata.plugins\org.eclipse.search\dialog_settings.xml -->copied to workspace2.metadata.plugins\org.eclipse.search
Is there an api provided by eclipse to transfer these settings ?
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.
I used to have Eclipse in a folder but then I decided to move the folder for Eclipse into a different folder. I deleted the old folder because I no longer needed it. Now Eclipse creates the old folder it used to be located in every time I start Eclipse.
Just to be clear: Eclipse is in folder "eclipse stuff" which got moved from folder A to folder B (both are on the Desktop) and folder A got deleted and now when Eclipse is opened it creates "Desktop\A\eclipse stuff\" with a sequence of folders within it.
My best guess is it is storing default settings in there (based on the names of the things in the folders) and that the directory it stores these "default settings" in is somewhere in Eclipse's settings. I don't know what settings it would be in. How can I change this setting?
You need to switch the workspace. File -> Switch Workspace -> other and choose the new folder. Restarting should preserve the new default workspace. If not, you can also delete old workspace locations in Eclipse setting: Window -> Preferences => General -> Startup and Shutdown -> Workspaces contains a list of all known workspaces. You can delete it there.
Help!
My editing area of eclipse become very small, limited on the top right corner. While other areas are blank. Even if I try to maximize the editor (MainActivity.java), it is still limited at the top right corner, leaving other areas as blank.
I never encountered this problem before. Does anyone know how to restore to the default settings?
Thank you!!!
From the Window menu, Reset Perspective
The Eclipse IDE has both workspace specific settings and generic IDE
settings.
The workspace settings are saved inside the workspace folder which is
specified when Eclipse starts up the first time. These settings are
saved in a folder called '.metadata' inside the workspace location.
You can change the location of the workspace in Eclipse by using the
'File' menu and then clicking on the 'Switch Workspace' option.
Note: If you delete your workspace folder you will also delete
projects located inside this folder. If you wish to preserve your
projects only delete the '.metadata' directory.
Eclipse will save all the non workspace specific settings in a
different location. This will depend on whether you are using a Linux
or Windows environment.
Windows*: C:\Documents and Settings\\Application Data\ARM\ARM
Workbench IDE Linux: /home//.awide
You can safely delete the configuration folder to force Eclipse to
start up using the default settings. Eclipse will re-create the
configuration folder with all the configuration files.
*For Windows 7 users: the C:\Documents and Settings\\Application Data... directory has moved to C:\Users\\AppData...
from here
There is no option in the file menu to rename a workspace. Is the recommended practice to close eclipse, rename the folder, and re-open? I worry about some potential dangling references in configuration files corrupting my workspace/projects...
Thanks!
Source : Renaming a workspace?
Yes, you can just rename the workspace
directory and/or move it. However, you
then have to tell Eclipse where the
new workspace is. In 3.1, you can use
'switch workspace' to launch in a
different location (under the File
menu).
If you want to change it by hand, you
can edit the appropriate entries in
the files in the 'configuration'
directory where Eclipse is stored.
You can change the
org.eclipse.ui.ide.prefs file to set
SHOW_WORKSPACE_SELECTION_DIALOG=true
if you want to be asked each time
Eclipse is run where the workspace is.
For simple renaming, it is not necessary to switch workspaces, unless the workspace you want to rename is not the one currently active.
Anyway, you can rename the current open workspace by choosing Eclipse->Preferences->General->Workspace and changing the option "Workspace name (shown in window title)" from the default's workspace folder name to whatever you want to call it. Then, restart Eclipse.
Suppose your workspace's folder is "/foo/bar/workspace" and you never changed its name before; its name was then the default "workspace". After you renamed it to, say, "my_workspace" and restarted Eclipse, the Eclipse's window title should show: "my_workspace - (some stuff that varies) - /foo/bar/workspace".
Note that this is NOT going to modify the workspace folder's name. You may have to create a new folder with the desired name, switch to that folder (whose workspace will have the same name, by default) and import existing projects into it, as some have suggested here.
Renaming Workspace folder worked for me. Close the eclipse, rename the workspace folder name, launch eclipse again. If you are using any project dependencies like user libraries,launchers etc, you have to relocate those to new location manually, from project build path.
Copying workspace to a new folder works. Any reference Eclipse itself needs is resolved using the relative workspace location. If you have added launchers, substitution variables, etc. that rely on the absolute workspace location, they will need to be reset.
John,
I think in the original workspace you imported projects and that the projects depend on links not on being physically in the same location of the worspace (even thay are there already but the dependency is on links). If so you have to remove the projects from the new (copied) worspace and then re-import them again.
I just did a:
File --> Import --> Maven --> Existing Maven Projects --> mention the new workspace location in "Root Directory" in the "Import Maven Projects" window
and it worked! All projects were imported properly.
BTW, I have Eclipse-Maven plugin "m2e" installed (http://wiki.eclipse.org/M2E_updatesite_and_gittags)
2021 Update
In Eclipse 2020-12 (Windows 10), the "Workspace name (shown in window title)" preference mentioned in one answer is no longer there. Now, renaming a workspace (WS) requires a copy and delete operation.
Start by switch to another WS: File --> Switch Workspace --> select existing WS. Then rename the WS folder to desired new name. Switch to the new workspace folder and delete the old name:
File --> Switch Workspace --> Other...
Right-click old WS name --> Remove from launcher selection
Click Browse --> select new workspace folder --> click Launch and Voila!
As mentioned in prior posts, depending on your setup some resource links may be broken. Delete the project without(!) removing it from disk, then import to new WS.