Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Oomph headless
Oomph headless [message #1387033] Mon, 23 June 2014 11:23 Go to next message
Axel RICHARD is currently offline Axel RICHARD
Messages: 15
Registered: September 2010
Location: France
Junior Member
Hi,

Is it possible to launch Oomph as a headless application ? If it is, which APIs allow to do that ?

Best regards,

Axel


Axel Richard
Obeo
Re: Oomph headless [message #1387037 is a reply to message #1387033] Mon, 23 June 2014 12:13 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5499
Registered: July 2009
Senior Member
Hi Axel,

In theory it should be possible because we've just fully separated Core and UI, but we haven't developed a headless
installer application. Hence we've never tested that it really already works. If you're interested to help that would
make a nice contribution ;-)

Cheers
/Eike

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


Am 23.06.2014 17:23, schrieb Axel RICHARD:
> Hi,
>
> Is it possible to launch Oomph as a headless application ? If it is, which APIs allow to do that ?
>
> Best regards,
> Axel
Re: Oomph headless [message #1387039 is a reply to message #1387033] Mon, 23 June 2014 12:18 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
Axel,

It's certainly possible in principle, but we've not looked at providing
such an application. What are you hoping to achieve? (Certainly all the
things you'd normally have to specify in the installer wizard would need
to be specified as arguments to the application.)


On 23/06/2014 5:23 PM, Axel RICHARD wrote:
> Hi,
>
> Is it possible to launch Oomph as a headless application ? If it is,
> which APIs allow to do that ?
>
> Best regards,
> Axel
Re: Oomph headless [message #1387105 is a reply to message #1387039] Tue, 24 June 2014 03:25 Go to previous messageGo to next message
Axel RICHARD is currently offline Axel RICHARD
Messages: 15
Registered: September 2010
Location: France
Junior Member
Ed,

As part of EMF Compare, we want to provide a headless application in order to do merge opertions on models with (j)git. For that reason, we need a mechanism to provision a worksapce and an eclipse environment, and Oomph seems to fit this need.

Axel


Axel Richard
Obeo
Re: Oomph headless [message #1387109 is a reply to message #1387105] Tue, 24 June 2014 04:22 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
Axel,

I see, so it would be a headless application that includes
org.eclipse.core.resources, i.e., that includes workspace support. I see
no reason, in principle, why this wouldn't work well. Do you want to
help design such an application? Without your help, it will likely be a
few weeks before we'd have time to look at it...


On 24/06/2014 9:25 AM, Axel RICHARD wrote:
> Ed,
>
> As part of EMF Compare, we want to provide a headless application in
> order to do merge opertions on models with (j)git. For that reason, we
> need a mechanism to provision a worksapce and an eclipse environment,
> and Oomph seems to fit this need.
>
> Axel
Re: Oomph headless [message #1392344 is a reply to message #1387109] Wed, 02 July 2014 03:30 Go to previous messageGo to next message
Axel RICHARD is currently offline Axel RICHARD
Messages: 15
Registered: September 2010
Location: France
Junior Member
Hi,

With Oomph, there is bootstrap tasks and startup tasks. Once bootstrap tasks have been executed, you can launch the provisionned environment. When this environment is launched, Oomph is automatically launched to execute startup tasks (e.g. clone a repo, imports projects...).
I succeed in programmatically provision an eclipse environment with oomph.
But I don't find the code that allows to execute the startup tasks in this provisionned environment.

Can you help me about that ?

Thanks,


Axel Richard
Obeo
Re: Oomph headless [message #1392463 is a reply to message #1392344] Wed, 02 July 2014 07:25 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5499
Registered: July 2009
Senior Member
Hi Axel,

Comments below...

Cheers
/Eike

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


Am 02.07.2014 09:30, schrieb Axel RICHARD:
> Hi,
>
> With Oomph, there is bootstrap tasks and startup tasks.
Knitpicking a bit, the list of tasks that you see for the bootstrap trigger and the list of tasks you see for the
startup trigger is not necessarily disjunct; or in other words, a task can be both a bootstrap and a startup task.

> Once bootstrap tasks have been executed, you can launch the provisionned environment. When this environment is
> launched, Oomph is automatically launched to execute startup tasks (e.g. clone a repo, imports projects...).
> I succeed in programmatically provision an eclipse environment with oomph. But I don't find the code that allows to
> execute the startup tasks in this provisionned environment.
That code is in org.eclipse.oomph.setup.ui.SetupUIPlugin.performStartup().

This method should be automatically called when the org.eclipse.oomph.setup.ui plugin is started, which happens early.
So I wonder why that doesn't happen in your case.
Re: Oomph headless [message #1392567 is a reply to message #1392463] Wed, 02 July 2014 10:19 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
Guys,

It's important to set properties in the eclipse.ini, in particular
-Doomph.setup=true


On 02/07/2014 1:25 PM, Eike Stepper wrote:
> Hi Axel,
>
> Comments below...
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
> Am 02.07.2014 09:30, schrieb Axel RICHARD:
>> Hi,
>>
>> With Oomph, there is bootstrap tasks and startup tasks.
> Knitpicking a bit, the list of tasks that you see for the bootstrap
> trigger and the list of tasks you see for the startup trigger is not
> necessarily disjunct; or in other words, a task can be both a
> bootstrap and a startup task.
>
>> Once bootstrap tasks have been executed, you can launch the
>> provisionned environment. When this environment is launched, Oomph is
>> automatically launched to execute startup tasks (e.g. clone a repo,
>> imports projects...).
>> I succeed in programmatically provision an eclipse environment with
>> oomph. But I don't find the code that allows to execute the startup
>> tasks in this provisionned environment.
> That code is in
> org.eclipse.oomph.setup.ui.SetupUIPlugin.performStartup().
>
> This method should be automatically called when the
> org.eclipse.oomph.setup.ui plugin is started, which happens early. So
> I wonder why that doesn't happen in your case.
>
>
Re: Oomph headless [message #1393897 is a reply to message #1392567] Fri, 04 July 2014 08:46 Go to previous messageGo to next message
Axel RICHARD is currently offline Axel RICHARD
Messages: 15
Registered: September 2010
Location: France
Junior Member
Hi guys,

Thanks for your prompt answers, still progress on executing oomph headless.
I succeed in programmatically provision an eclipse environment with oomph.
I succeed in execute my startup tasks in this provisionned environment.

Now, I don't understand why the plugin org.eclipse.oomph.setup.ui is included in the feature org.eclipse.oomph.setup-feature ?

In the perform(SetupTaskContext) method of GitCloneTaskImpl, I found this:

// Force start egit to make the clone appears in the repositories view and so projects are connected by the egit team provider.
CommonPlugin.loadClass("org.eclipse.egit.ui", "org.eclipse.egit.ui.Activator");

But, in my case, that is to say a headless context, I don't want org.eclipse.egit.ui.

Do you plan to remove org.eclipse.oomph.setup.ui from the org.eclipse.oomph.setup-feature ? Or do you know a workaround ?

Best regards,


Axel Richard
Obeo

[Updated on: Fri, 04 July 2014 08:47]

Report message to a moderator

Re: Oomph headless [message #1394375 is a reply to message #1393897] Sat, 05 July 2014 02:51 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
Axel,

Comments below.

On 04/07/2014 2:46 PM, Axel RICHARD wrote:
> Hi guys,
>
> Thanks for your prompt answers, still progress on executing oomph
> headless.
> I succeed in programmatically provision an eclipse environment with
> oomph. I succeed in execute my startup tasks in this provisionned
> environment.
>
> Now, I don't understand why the plugin org.eclipse.oomph.setup.ui is
> included in the feature org.eclipse.oomph.setup-feature ?
That's maybe bogus. Please open a bugzilla and we'll review.
>
> In the perform(SetupTaskContext) method of GitCloneTaskImpl, I found
> this:
>
> // Force start egit to make the clone appears in the repositories view
> and so projects are connected by the egit team provider.
> CommonPlugin.loadClass("org.eclipse.egit.ui",
> "org.eclipse.egit.ui.Activator");
>
> But, in my case, that is to say a headless context, I don't want
> org.eclipse.egit.ui.
> Do you plan to remove org.eclipse.oomph.setup.ui from the
> org.eclipse.oomph-feature ?
I'm not sure the two things are related. Certainly we should change the
GitCloneTaskImpl so it guards the loadClass call. We only call that
because the EGit UI plugin needs to be enabled for projects to actually
be imported into the workspace and for clones to be added to the clones
view. That plugins where the auto import support comes from. Perhaps
that is a bogus aspect of EGit because, i.e., why shouldn't you be able
to auto import projects headlessly?

Or maybe we shouldn't be relying on auto import in the targlet task...
> Or do you know a workaround ?
Will you rely on projects actually ending up in the workspace?
>
> Best regards,
>
Re: Oomph headless [message #1395664 is a reply to message #1394375] Mon, 07 July 2014 04:07 Go to previous message
Axel RICHARD is currently offline Axel RICHARD
Messages: 15
Registered: September 2010
Location: France
Junior Member
Ed,

I try to import a simple eclipse project stored in a git repository into an eclipse luna. I import the project with Import > General > Existing Projects into Workspace (not from the Git Repositories view nor Import > Git > Projects from Git), so I didn't use EGit. As a result, the imported project is shown as connected the the repository in the Package Explorer, and the Git Repositories view of the Git Perspective displays the repository.
So I believe GitCloneTaskImpl doesn't need to load egit.ui. Just import projects, and the repositories associated to these projects will be display in the Git repostories view.

I raised two bugs.

The first one is https://bugs.eclipse.org/bugs/show_bug.cgi?id=438991 to remove the org.eclipse.oomph.setup.ui plugin from the org.eclipse.oomph-feature.
The second one is https://bugs.eclipse.org/bugs/show_bug.cgi?id=438993 to remove the load of org.eclipse.egit.ui.Activator from GitCloneTaskImpl.

Best regards,


Axel Richard
Obeo
Previous Topic:Create mylyn query in user .setup, episode 2
Next Topic:Variable for .setup file location
Goto Forum:
  


Current Time: Wed Aug 20 16:34:02 EDT 2014

Powered by FUDForum. Page generated in 0.01902 seconds