Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Dependency on org.eclipse.core.runtime in generated model plug-in
Dependency on org.eclipse.core.runtime in generated model plug-in [message #425776] Mon, 08 December 2008 15:40 Go to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 676
Registered: July 2009
Senior Member
Heya,

I just asked myself why a generated EMF model plug-in contains a
dependency to org.eclipse.core.runtime?

Felix
Re: Dependency on org.eclipse.core.runtime in generated model plug-in [message #425793 is a reply to message #425776] Mon, 08 December 2008 18:44 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Felix,

Usually it's easy to find out when you try to remove the dependency and
see what happens.
AFAIK at least the extension markup in the plugin.xml requires a
dependency on org.eclipse.core.runtime (at least on something within).

Can you describe your concerns with this dependency?

Cheers
/Eike

----
http://thegordian.blogspot.com



Felix Dorner schrieb:
> Heya,
>
> I just asked myself why a generated EMF model plug-in contains a
> dependency to org.eclipse.core.runtime?
>
> Felix


Re: Dependency on org.eclipse.core.runtime in generated model plug-in [message #425799 is a reply to message #425793] Mon, 08 December 2008 21:18 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 676
Registered: July 2009
Senior Member
Hey Eike,

> Usually it's easy to find out when you try to remove the dependency and
> see what happens.

At what time? Compile? Run?

> AFAIK at least the extension markup in the plugin.xml requires a
> dependency on org.eclipse.core.runtime (at least on something within).

Not sure I understand what you mean.

> Can you describe your concerns with this dependency?

Its not a concern. I just wanted to know why it's needed.

Thanks,
Felix
Re: Dependency on org.eclipse.core.runtime in generated model plug-in [message #425800 is a reply to message #425799] Mon, 08 December 2008 21:42 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
Felix,

EMF's runtime uses things, like Eclipse's plugin class, from that. You
could try to remove it and see what the compiler complains about...


Felix Dorner wrote:
> Hey Eike,
>
>> Usually it's easy to find out when you try to remove the dependency
>> and see what happens.
>
> At what time? Compile? Run?
>
>> AFAIK at least the extension markup in the plugin.xml requires a
>> dependency on org.eclipse.core.runtime (at least on something within).
>
> Not sure I understand what you mean.
>
>> Can you describe your concerns with this dependency?
>
> Its not a concern. I just wanted to know why it's needed.
>
> Thanks,
> Felix


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Dependency on org.eclipse.core.runtime in generated model plug-in [message #425802 is a reply to message #425800] Mon, 08 December 2008 22:04 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 676
Registered: July 2009
Senior Member
Hey Ed,

If I remove it from the model plug-in, there's nothing that the compiler
complains.

In contrast is the edit plug-in which requires the Plugin class, at
compile time. At runtime its absence is detected and the standalone
implementation takes over, nicely explained in the new book.

public abstract class EMFPlugin implements ResourceLocator, Logger
{
public static final boolean IS_ECLIPSE_RUNNING;
static
{
boolean result = false;
try
{
result = Platform.isRunning();
}
catch (Throwable exception)
{
// Assume that we aren't running.
}
IS_ECLIPSE_RUNNING = result;
}



Ed Merks wrote:

> EMF's runtime uses things, like Eclipse's plugin class, from that. You
> could try to remove it and see what the compiler complains about...
Re: Dependency on org.eclipse.core.runtime in generated model plug-in [message #425804 is a reply to message #425802] Mon, 08 December 2008 22:11 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
Felix,

Oh yes, I forgot that the model plugin doesn't always have a plugin. In
any case, the model depend on EMF which depends on the core Eclipse
runtime, so indirectly you always depend on it...


Felix Dorner wrote:
> Hey Ed,
>
> If I remove it from the model plug-in, there's nothing that the
> compiler complains.
>
> In contrast is the edit plug-in which requires the Plugin class, at
> compile time. At runtime its absence is detected and the standalone
> implementation takes over, nicely explained in the new book.
>
> public abstract class EMFPlugin implements ResourceLocator, Logger
> {
> public static final boolean IS_ECLIPSE_RUNNING;
> static
> {
> boolean result = false;
> try
> {
> result = Platform.isRunning();
> }
> catch (Throwable exception)
> {
> // Assume that we aren't running.
> }
> IS_ECLIPSE_RUNNING = result;
> }
>
>
>
> Ed Merks wrote:
>
>> EMF's runtime uses things, like Eclipse's plugin class, from that.
>> You could try to remove it and see what the compiler complains about...


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[CDO] Restore Resource from Audit
Next Topic:Springsource objectweb tree and attribute bundle versions
Goto Forum:
  


Current Time: Thu Apr 18 15:39:37 GMT 2024

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

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

Back to the top