Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Oomph headless
Oomph headless [message #1387033] Mon, 23 June 2014 15:23 Go to next message
Axel RICHARD is currently offline Axel RICHARD
Messages: 17
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 16:13 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5524
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 16:18 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26050
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 07:25 Go to previous messageGo to next message
Axel RICHARD is currently offline Axel RICHARD
Messages: 17
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 08:22 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26050
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 07:30 Go to previous messageGo to next message
Axel RICHARD is currently offline Axel RICHARD
Messages: 17
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 11:25 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5524
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 14:19 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26050
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 12:46 Go to previous messageGo to next message
Axel RICHARD is currently offline Axel RICHARD
Messages: 17
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 12:47]

Report message to a moderator

Re: Oomph headless [message #1394375 is a reply to message #1393897] Sat, 05 July 2014 06:51 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26050
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 08:07 Go to previous messageGo to next message
Axel RICHARD is currently offline Axel RICHARD
Messages: 17
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
Re: Oomph headless [message #1413835 is a reply to message #1395664] Fri, 29 August 2014 14:44 Go to previous messageGo to next message
Axel RICHARD is currently offline Axel RICHARD
Messages: 17
Registered: September 2010
Location: France
Junior Member
Ed, Eike,

Some news of our need with EMF Compare. We succeed in using Oomph as a headless application, and I would thank you for this great tool you've made.
As a reminder we want to provide a headless application in order to do specific git operations (diff, merge) on models with (j)git. For that reason, we use Oomph to provision an eclipse environment.
When a user wants to compare or merge EMF models from a command line, he needs to do that in an Eclipse environment similar to the one he used to create these models. As such, the environment requires some plugins to be installed but it may also requires some preferences to be set, some perspective to be activated etc... Among these plugins, there are the mandatory ones that will be use to do the git operation.
First, Oomph provision an Eclipse with all appropriate plugins to launch the git operation. These plugins are EGit, EMF Compare and their dependencies. If the user setup model provided as parameter of the git command contains other plugins, they will be provisioned too.
For a given Oomph setup model file, the provisioning operation is executed only once. Indeed, if you launch again a git logical operation with the same Oomph setup model file, then the already provisioned Eclipse IDE corresponding to the setup model will be reused. It avoids to execute this potentially costly task each time.
Then, in this provisioned Eclipse, the list of tasks contained in the user setup model are executed.
Once all Oomph tasks executed, EMF Compare calls the logical git operation with the others parameters provided in the command line interface. Once the git logical operation has been executed, the user can see the results in his command line tool.
Here is a review of our code that use Oomph as a headless application: https://git.eclipse.org/r/#/c/30733/
If you're interested, feel free to give us your opinion about the use of Oomph in this review.

Best regards,


Axel Richard
Obeo
Re: Oomph headless [message #1417424 is a reply to message #1413835] Fri, 05 September 2014 11:53 Go to previous message
Eike Stepper is currently offline Eike Stepper
Messages: 5524
Registered: July 2009
Senior Member
Hi Axel,

I've looked at that review briefly and noticed that it includes many many files. I'm sorry but it seems beyond what I
can achieve in a short time frame. If you have specific questions please don't hesitate to ask ;-)

Cheers
/Eike

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



Am 29.08.2014 um 16:44 schrieb Axel RICHARD:
> Ed, Eike,
>
> Some news of our need with EMF Compare. We succeed in using Oomph as a headless application, and I would thank you for
> this great tool you've made.
> As a reminder we want to provide a headless application in order to do specific git operations (diff, merge) on models
> with (j)git. For that reason, we use Oomph to provision an eclipse environment.
> When a user wants to compare or merge EMF models from a command line, he needs to do that in an Eclipse environment
> similar to the one he used to create these models. As such, the environment requires some plugins to be installed but
> it may also requires some preferences to be set, some perspective to be activated etc... Among these plugins, there
> are the mandatory ones that will be use to do the git operation.
> First, Oomph provision an Eclipse with all appropriate plugins to launch the git operation. These plugins are EGit,
> EMF Compare and their dependencies. If the user setup model provided as parameter of the git command contains other
> plugins, they will be provisioned too.
> For a given Oomph setup model file, the provisioning operation is executed only once. Indeed, if you launch again a
> git logical operation with the same Oomph setup model file, then the already provisioned Eclipse IDE corresponding to
> the setup model will be reused. It avoids to execute this potentially costly task each time.
> Then, in this provisioned Eclipse, the list of tasks contained in the user setup model are executed.
> Once all Oomph tasks executed, EMF Compare calls the logical git operation with the others parameters provided in the
> command line interface. Once the git logical operation has been executed, the user can see the results in his command
> line tool.
> Here is a review of our code that use Oomph as a headless application: https://git.eclipse.org/r/#/c/30733/
> If you're interested, feel free to give us your opinion about the use of Oomph in this review.
>
> Best regards,
Previous Topic:Visitor of BackendSystem cause OperationCanceledException
Next Topic:Is there a way to create multiple targlet containers?
Goto Forum:
  


Current Time: Thu Sep 18 23:46:28 GMT 2014

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

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