Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » More Settings for Projects Import Task
More Settings for Projects Import Task [message #1403874] Mon, 28 July 2014 11:25 Go to next message
Johannes Dorn is currently offline Johannes DornFriend
Messages: 61
Registered: June 2013
Member
When doing a Projects import task, there aren't a lot of options to pick. I would like to have the same settings available as in Eclipse's "Import Existing Projects into Workspace" dialog.

In my case, i want to import a project into the workspace without copying it there. When using the Oomph task, the located projects are copied into the workspace, rather than just referencing it, which is the default for Eclipse's dialog.

Is it already possible to do what i want? Otherwise, chalk this up as a feature request Smile
Re: More Settings for Projects Import Task [message #1403907 is a reply to message #1403874] Mon, 28 July 2014 14:11 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6693
Registered: July 2009
Senior Member
Am 28.07.2014 13:25, schrieb Johannes Dorn:
> When doing a Projects import task, there aren't a lot of options to pick. I would like to have the same settings
> available as in Eclipse's "Import Existing Projects into Workspace" dialog.
>
> In my case, i want to import a project into the workspace without copying it there. When using the Oomph task, the
> located projects are copied into the workspace, rather than just referencing it, which is the default for Eclipse's
> dialog.
That's not intended and by looking at the code that's hard to believe. Can you please double-check your results?

The idea is that the ProjectsImportTask always just references existing folders. If you want to copy them you must use a
ResourceCopyTask before.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


>
> Is it already possible to do what i want? Otherwise, chalk this up as a feature request :)


Re: More Settings for Projects Import Task [message #1403936 is a reply to message #1403907] Mon, 28 July 2014 16:13 Go to previous messageGo to next message
Johannes Dorn is currently offline Johannes DornFriend
Messages: 61
Registered: June 2013
Member
Thanks for your reply. Having looked at the code myself, i agree it looks like it shouldn't copy anything.
With a closer look at the imported project, i see that it didn't really copy it but instead created a new .project file with the correct project name. This new file has a few more empty properties like <nature>.

I've attached a minimal setup that demonstrates the problem i have.
Setup file

This setup clone a public git repository (from our Code Recommenders Snipmatch) and puts the clone into the ${installation.location/ws/.recommenders/snipmatch/repositories/REPONAME}
Then the Projects Import task looks at ${installation.location/ws/.recommenders/snipmatch/repositories/} nested locations.

What i end up with is a new folder "Code Recommenders Snippets" in {installation.location/ws} folder which has the aforementioned .project file, but not the additional contents of the cloned project. Namely, a ".git" folder, a ".gitignore" file and a "snippets" folder which contains .json files.

For my purposes, it wouldn't do to have those files and folders in the new project folder, though. The imported project has to be a reference.
Re: More Settings for Projects Import Task [message #1403997 is a reply to message #1403936] Tue, 29 July 2014 04:58 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
Johannes,

Comments below.

On 28/07/2014 6:13 PM, Johannes Dorn wrote:
> Thanks for your reply. Having looked at the code myself, i agree it
> looks like it shouldn't copy anything.
> With a closer look at the imported project, i see that it didn't
> really copy it but instead created a new .project file with the
> correct project name.
There wasn't one before right? You guys normally rely on Maven import
to create the .project files (though it would seem better to me to
include them in your repo.)
> This new file has a few more empty properties like <nature>.
Yes, we can know nothing about what's expected of the project (though I
supposed the Maven import normally use information from the pom.xml or
some such thing).
>
> I've attached a minimal setup that demonstrates the problem i have.
> http://www.codetrails.com/sites/default/files/import.setup
>
> This setup clone a public git repository (from our Code Recommenders
> Snipmatch) and puts the clone into the
> ${installation.location/ws/.recommenders/snipmatch/repositories/REPONAME}
> Then the Projects Import task looks at
> ${installation.location/ws/.recommenders/snipmatch/repositories/}
> nested locations.
>
> What i end up with is a new folder "Code Recommenders Snippets" in
> {installation.location/ws} folder which has the aforementioned
> .project file, but not the additional contents of the cloned project.
> Namely, a ".git" folder, a ".gitignore" file and a "snippets" folder
> which contains .json files.
Hmm, this code looks suspicious:

if (Platform.getLocation().isPrefixOf(locationPath))
{
locationPath = null;
}

I'll have to ask Eike why this is here and what the intent is, but I
think it's supposed to check if the project is already directly in the
root folder of the workspace itself, i.e., the default location for a
new project. From what you've described, your project is physically
nested in the workspace, but not at the root. In any case, it's clear
that this guard isn't quite right and will lead to exactly the type of
problem you're describing. Please open a bugzilla.
>
> For my purposes, it wouldn't do to have those files and folders in the
> new project folder, though. The imported project has to be a reference.
Yes of course, so that it's under git control.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: More Settings for Projects Import Task [message #1704905 is a reply to message #1403997] Mon, 10 August 2015 14:25 Go to previous message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

A new generic/composite import mechanism is being developed and should be part of Eclipse 4.6 https://wiki.eclipse.org/E4/UI/Smart_Import . You can see from this page a link to a Oomph extension that allows to uqse this as an import task in oomph. I believe it may be a solution for your user story.
Previous Topic:How do I make preferences global?
Next Topic:Can't find org.eclipse.oomph.setup.installer
Goto Forum:
  


Current Time: Fri Dec 27 02:31:43 GMT 2024

Powered by FUDForum. Page generated in 0.03358 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top