Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

eclipse workspace: how to rename workspace

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!

like image 951
Alexx Avatar asked Mar 01 '11 14:03

Alexx


People also ask

How do I rename a workspace folder?

Simply edit the . code-workspace file contained in the actual folder (via file explorer) and rename it. That's it! You should probably go to File --> Close Workspace first, and then use your file explorer to rename the workspace file, and then re-open the workspace.

How do I rename a folder in Eclipse?

Right-mouse click in the repository view on the folder you want to rename and choose Rename path process. Rename the folder. Invoke "Add to Workspace". Perform synchronizing the Eclipse project folder and change will be reflected.

Can I rename Eclipse project?

To rename the project, simply right-click the project and select "Refactor/Rename...". Fill in the new name and click OK.

How do I change my workspace?

Press Super + Page Up or Ctrl + Alt + Up to move to the workspace shown above the current workspace in the workspace selector. Press Super + Page Down or Ctrl + Alt + Down to move to the workspace shown below the current workspace in the workspace selector.


2 Answers

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.

like image 67
Saurabh Gokhale Avatar answered Sep 18 '22 10:09

Saurabh Gokhale


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.

like image 42
Lord Henry Wotton Avatar answered Sep 19 '22 10:09

Lord Henry Wotton