Bug 37478 - [Import/Export] Add "Import As Project" option to the Import Wizard
Summary: [Import/Export] Add "Import As Project" option to the Import Wizard
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: All All
: P4 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 421930
  Show dependency tree
 
Reported: 2003-05-11 08:27 EDT by Geoff Longman CLA
Modified: 2016-10-26 18:24 EDT (History)
10 users (show)

See Also:


Attachments
Suggested UI (59.55 KB, image/jpeg)
2013-10-25 13:01 EDT, Mickael Istria CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Geoff Longman CLA 2003-05-11 08:27:35 EDT
Right now there is the option "Existing Project into Workspace"

What if you have what you believe should be a project, but it does not have
a .project file?

Just like the "Checkout at Project" option when working with CVS.

Let the user pick what kind of project they would like, the platform sets it up 
and then works just like "Existing Project into Workspace".

Currently, if I need to do this I copy any old .project file into the root 
folder, do import "Existing into Workspace" and then clean up the mess 
afterwards.

To quote another user:

>Of course, I wonder why I have this massive 
> and complex tooling at my hands, when I need to perform all kinds of 
> workarounds for rather simple task like this one.
Comment 1 Debbie Wilson CLA 2003-05-12 16:31:00 EDT
Lots of choice as to who should look at this one:  Import, RCP (Rich Client 
Platform) or PDE.  Let me know, Tod.
Comment 2 Tod Creasey CLA 2003-05-12 16:41:45 EDT
You can already do this - create a project with the location equal to the 
directory where your content is by using a location other than the default. 
You can either leave it there or move it to the workbench somewhere.

Marking as possible enhancement.
Comment 3 Tom Tromey CLA 2005-08-18 14:00:21 EDT
In general it seems to me that the source of the content of the project
and the type of the project are orthogonal.  So, I might want to make a
new C++ project and take its initial contents from a .tar.gz that was
made upstream with 'make dist' (and whose contents are not yet an eclipse
project -- also in this case it is common to strip directories, see
bug #83240).  The same sort of thing holds true, I think, for any combination
of input sources (zip, tar, cvs; also true whether or not the content
already has a .project file, etc) and project type (C, C++, Java, etc).

(I wasn't sure if this was the best PR to attach this to, but it seemed
relevant enough...)
Comment 4 Tod Creasey CLA 2006-06-22 08:35:51 EDT
There are currently no plans to work on this feature
Comment 5 Mickael Istria CLA 2013-10-22 05:29:22 EDT
I'd like to re-open this request, as the current process of importing part of filesystem as a project (via "New > Project" and setting existing location) is not intuitive.
One would either expect a "Import File System as a project" entry, or a way to import File System as a project in the File System import wizard.
Comment 6 Mickael Istria CLA 2013-10-25 13:01:14 EDT
Created attachment 236914 [details]
Suggested UI

Here is a suggested UI for this wizard to allow "import as project". Feedback is welcome.
(Stub) Code for this wizard is available at https://github.com/mickaelistria/eclipse.platform.ui/tree/37478
Comment 7 Mickael Istria CLA 2013-11-28 05:13:50 EST
I've written some code to allow easier import of a directory as project from the filesystem wizard: https://git.eclipse.org/r/19046
Comment 8 Paul Webster CLA 2013-11-29 15:59:38 EST
Daniel, can you have a look at the contribution?

PW
Comment 9 Mickael Istria CLA 2014-02-06 11:21:43 EST
Hre is an import story that would be IMO more efficent but that would probably require to rework the whole import mechanism in Eclipse.

User would:
| Select a folder (without selecting any import kind)
| Select whether to import this folder as resources inside existing project in workspace, or whether to import it as a project
| \
| * If user choose to import as resources (IMO rare case), show a dedicated page to import resources. Finish
* | If user chooses to import as a project, have a page selecting whether it's a copy or a reference.
* | \
* * | If directory has .project. Show dedicate import page for this project. Finish
* | * If directory doesn't have .project, show other wizard able to import this project (for example, Maven if the is a pom, Gradle if there is a build.gradle, C++ if there is I don't know what file...)

With this process, user would get suggested which wizard to run according to the folder he wants to import. So he doesn't need much knowledge to do his first import.
Additionally, some wizards could contribute to the new project creation, such as a Team wizard automatically connecting to repo if some .git or .svn files are found, a JavaScript wizard allowing to add JS nature if some .js files are found...

The Gerrit patch I'm working would allow user to blindly use the FileSystem wizard and let the wizard suggest whether it's a new project, an existing project, or some files to import.
I'd like it to be a first step in the direction of a universal import wizard which would guide the user instead of assuming knows already much about the project he's importing.
Comment 10 Dani Megert CLA 2014-05-13 08:17:45 EDT
I'm sorry Mickael. Looks like we lost track of this one.
Moving to 4.5 for review.
Comment 11 Mickael Istria CLA 2014-10-22 08:08:38 EDT
Actually, as I've given more thoughts and made more drafts about the general "import a mysterious project" scenario, I come to the conclusion that the existing Filesystem import wizard is not suitable for the task of importing an existing project.
I would find it easier for both users and developers to create a new "Import local directory as Eclipse project" wizard and rename the Filesystem import wizard as "Import Filesystem elements in a project".

So IMO, more priority should be given to bug 421930 instead of this one.
Comment 12 Dani Megert CLA 2015-04-24 09:19:55 EDT
(In reply to Mickael Istria from comment #11)
> Actually, as I've given more thoughts and made more drafts about the general
> "import a mysterious project" scenario, I come to the conclusion that the
> existing Filesystem import wizard is not suitable for the task of importing
> an existing project.
> I would find it easier for both users and developers to create a new "Import
> local directory as Eclipse project" wizard and rename the Filesystem import
> wizard as "Import Filesystem elements in a project".
> 
> So IMO, more priority should be given to bug 421930 instead of this one.

Can we close this request then?
Comment 13 Lars Vogel CLA 2016-10-26 18:24:42 EDT
(In reply to Dani Megert from comment #12)
> Can we close this request then?

Yes