STS cannot import existing file system into workspace - import

I followed following steps.
Start STS (Starts with default project named "Servers" already created)
right click package explorer, click on import -> General -> File System
Select directory -> Click Select All
After this step, I should be able to import my directory into "workspace", instead STS "forces" me to import file system to existing project.
Also, if I try to create a folder into top level workspace, STS does not allow me to do that as well.
I need to be able to import the whole directory into the workspace not a project.

You can only import filesystems into existing projects and you can only create folders in existing projects. The top-level is only for projects.
What you need to do first is create a new project with an external location that is rooted at the filesystem you want to import. The project will be created right there and automatically include all sub-folders.
Alternatively, if the root directory is already an eclipse project, do this:
File -> Import -> Existing projects into workspace -> Select root directory
This is a bit confusing that you can't import a bunch of files and folders as a project, but this is how Eclipse has worked since the dawn of time (I think time started in the year 2000).

Related

Talend how to open talend.project file

I am complete new to talend and inherited some projects from someone who has left our company. I can not figure out how to open the job and edit it.
I downloaded and is running Talend DI.
When I try to import the project I get the message.
"Selected folder is not a Talend Open Studio project."
The project files have look like this. (- represents a folder)
-ProjectName
-lib
jobinfo.properties
Can someone point me in the right direction.
Thank you
That might not be a complete project folder , but rather the result of someone selecting one or more jobs (in a project) and exporting them.
Try this
create a new project
open it
right click on jobs
import
navigate to the folder you mention as the source folder
see if it finds any items (jobs, contexts, meta data definitions etc) to import
for the sake of simplicity, import all available items into your newly created project
review the jobs and other imported items
In my case, I managed to import the project into the workspace from Talend studio as below.
Open Talend Studio -> Import an Existing Project ->Select -> Import Several projects -> Select Root Directory (Browse the Folder) -> you would be able to see the available projects (if the project folder is not corrupted)->Select the project checkbox -> Click on Finish

How do I import projects from another workspace?

I started with the default workspace C:\workspace but I mange to corrupt that by removing files so now I've created a new workspace to import the files to but I don't know how to do that. Could you tell me how I import projects from another workspace? I'm using the IBM RAD which is based on eclipse.
Thank you
Here are the steps for the original eclipse :
After switching eclipse to use the new workspace , go to File--> Import , and then choose General ---> Existing Projects into Workspace , and browse to the folder of the project that you want to import.
In Eclipse, the steps will be:
Select "File" tab
Select "Import" option in the drop down list.
Select "General" in the source listed.
Select "Archive File" if You have .zip/.rar file of the Project or "Existing Projects into Workspace" if You have Project in some other workspace.
Browse the Archive File or root directory location.
Select "Finish".
Now your project has been imported.
I am not very familiar with RAD but if its anything like Eclipse, the projects are stored by plugins. For ex: All my java related projects are stored under
workspace/.metadata/.plugins/org.eclipse.core.resources/.projects
while my other projects related to another project (Seamframework related) are stored under
workspace/.metadata/.plugins/org.jboss.tools.seam.core/projects
The best thing would be to search your
workspace/.metadata/.plugins
folder and see if you can identify all your projects. When you do, you can import them all into your new workspace as is.
To import the projects, once you locate them, follow the instructions posted by others here.
Good Luck!

How to import an existing directory into Eclipse?

I am on a mac, but I don't think it will make a difference. I have a directory that I want to fully import/add into Eclipse. What I did is this:
Right click import
General → Existing Projects into Workspace
Then when I click browse for either root directory or archive file and select the folder I can't click finish. The folder is empty and just contains a few folders but for some reason I can't click finish.
The Eclipse UI is a little bit confusing.
The Import -> "Existing projects into workspace" actually means import "Existing Eclipse projects into workspace". That's why you can't click on finish: the import option looks for a .project file (the file used by Eclipse to store the project options) in the directory that you have chosen.
To import existing source code that doesn't have an Eclipse project file you have the following options (I suppose that you want to create a Java project):
New project inside the workspace dir: Create a new empty Java project into the workspace (File->New->Java Project). Then right click on the source folder and choose Import...->General->File system then choose your files, and it will make a copy of your files.
Tip: you can drag&drop your files from the Finder into the src folder.
Create an eclipse project in your existing dir: Create a new Java project, but in the "New Java Project" window:
Un check the Use default location option, and choose the directory where is your non-Eclipse project.
Click Next and configure the sub-directories of your non-Eclipse project where the source files are located. And you are done :)
There is no need to create a Java project and let unnecessary Java dependencies and libraries to cling into the project. The question is regarding importing an existing directory into eclipse
Suppose the directory is present in C:/harley/mydir. What you have to do is the following:
Create a new project (Right click on Project explorer, select New -> Project; from the wizard list, select General -> Project and click next.)
Give to the project the same name of your target directory (in this case mydir)
Uncheck Use default location and give the exact location, for example C:/harley/mydir
Click on Finish
You are done. I do it this way.
These days, there's a better solution for importing an existing PHP project. The PDT plugin now has an option on the New PHP Project dialog just for this. So:
From File->New->PHP Project:
I Using below simple way to create a project
1- First in a directory that desire to make it project, create a .project file
with below contents:
<projectDescription>
<name>Project-Name</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
2- Now instead of "Project-Name", write your project name, maybe current directory name
3- Now save this file to directory that desire to make that directory as project with name ".project" ( for save like this, use Notepad )
4- Now go to Eclips and open project and add your files to it.
For Spring Tool Suite I do:
File -> Open projects from File System
The thing that works best for me when that happens is :
Create a new eclipse project(JAVA)
Take your source file (contents of the src folder!!!) and drag from finder and drop into the src folder in eclipse IDE
Make sure you add your external jars and stuff and tada you're done!!

Eclipse - Import an existing project?

I have a project that I am trying to add to my workspace. But eclipse cannot detect a new project in the directory I am pointing to.
How can I let eclipse know that a specific directory contains a project?
My directory contains:
assets
libs
res
src
bin
gen
AndoridManijest.xml
proguard.cfg
project.properties
You just have to do a Import->Existing Project into Workspace, and then browse to the location where the .classpath and .project files exists for your project.
For the new versions of Eclipse, it is File > Import > General > Existing projects into workspace
Like this
Importing existing projects
You can use the Import Wizard to command link import an existing project into workspace.
From the main menu bar, select command link File > Import.... The Import wizard opens.
Select General > Existing Project into Workspace and click Next.
Choose either Select root directory or Select archive file and click the associated Browse to locate the directory or file containing the projects.
Under Projects select the project or projects which you would like to import.
Click Finish to start the import.
This solution is for eclipse
I had a similar problem when I was cloning repositories from bit bucket from the command line, it would clones into the local repository. So the above solution did not work because it would say that the files were already in the local repository.
The solution:
1. Window > Show View > other > Git repositories
2. Right Click on the git repository tab > import projects
3. navigate to the repository you want to put into eclipse
4. select the third option 'import as general project', if selecting this does not work then view other options and select the option that applies to you
5. finish
if you cannot import project like some above solution, you should create new project has name procject like which procject you want to import. Remember to put your import project into workstation.

Eclipse : Importing Existing Projects into workspace

We have a Existing project downloaded from server which was build on Maven .
(this is in the form of Folder Structure )
While import that project in Eclipse , should i use
Existing Projects into workspace
Or
File System
Please guide me
Thank you .
If you import a project into the workspace the files remain in their original locations. I do not know how to avoid this.
Often (always) I would like to have a copy of the files in the workspace and leave the project I imported it from in its original location untouched.
A frequent use-case is that I have a project and wish to make some changes to it to test out something without affecting the main project.
Thanks John
If you really have an existing project, then you must have a .project file. Check for that, and if you do have, you should use the Existing Projects into workspace option, and select the root folder of your project.
Since you have a Maven project, you could also import it as Existing Maven Projects, given that you have the Maven plugin installed in your eclipse.
File -> Import... -> General -> Existing Project into Workspace -> Select the archive file by clicking Browse button -> Select the checkbox * Copy projects into workspace. (this answers user462990's question). This way the project is copied into the workspace and the main project is not affected.
If you use "File -> Import... -> Maven -> Existing Maven Projects" you don't get the option to copy projects into workspace.