Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to create an eclipse workspace with command line without actually launching eclipse?

Is there any command to create an eclipse workspace without actually launching eclipse? I want the command be part of script. After the workspace is created, it will be configured (e.g., text encoding) then will be used to import project to RTC. I know below command is able to crate a new workspace. But the command also tries to import or build or clear-Build a project, which is not I want.

eclipse -nosplash 
    -data workspace_name
    -application org.eclipse.cdt.managedbuilder.core.headlessbuild 
    -import {[uri:/]/path/to/project} 
    -build {project_name | all} 
    -cleanBuild {projec_name | all}

What I want is just a simple command to create a new workspace, nothing else (no importing, no building, no launching eclipse)? How can I do it?

like image 524
He Jun Avatar asked Nov 20 '12 09:11

He Jun


People also ask

How do I make my Eclipse prompt for workspace?

1 Answer. Go under preferences then type " workspace " in the search box provided to filter the list. Alternatively you can go to General>Startup and Shutdown>Workspaces. There you can set a flag to make Eclipse prompt you to select a workspace at startup by checking the "Prompt for workspace at startup" checkbox.


1 Answers

Just create an empty folder. There is really nothing else you need for an empty workspace.

Edit: If you need preferences as well create sub folders .metadata\.plugins\org.eclipse.core.runtime\.settings and let your script write .prefs files with the settings that you need. Look at the .prefs files of an existing workspace to see how they should look.

like image 85
ellak Avatar answered Nov 16 '22 01:11

ellak