Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » IMP » Deployment of IMP based IDE
Deployment of IMP based IDE [message #502252] Mon, 07 December 2009 13:22 Go to next message
Eclipse UserFriend
Originally posted by: rendel.informatik.uni-marburg.de

Hi,

I have problems with the deployment of IMP-based IDE plugins. I tried
the following to build and deploy a minimal variant of the LEG IDE:

Create plugin:
- create plugin project "leg"
- add programming language descriptor
- id "leg", name "leg", file extension "leg"
- add LPG grammar with parser wrapper for IMP

First test:
- Run as "eclipse application"
- Create Project
- Create File "test.leg"
=> Works fine.

Deployment:
- create feature "leg-feature", id "leg"
- add plugin "leg"
- enter copyright, license and description
- create update site project "leg-updatesite"
- add feature "leg"
- build all

Second Test:
- Install fresh Eclipse
- Install IMP Runtime and LPG Runtime from IMP update site
- Install leg from update site project
- Restart Eclipse

I get no errors, and leg shows up in the list of installed plugins, but
it seems not to be fully installed:

- *.leg is not associated with the IMP editor
- the IMP editor complains about not knowing how to handle *.leg
(when forced to edit a *.leg file)

Do I have to do anything special to register my plugin with the IMP runtime?

Thanks for any help or pointers,
Tillman
Re: Deployment of IMP based IDE [message #502390 is a reply to message #502252] Mon, 07 December 2009 23:39 Go to previous messageGo to next message
Robert M. Fuhrer is currently offline Robert M. FuhrerFriend
Messages: 294
Registered: July 2009
Senior Member
Responses below...

Tillmann Rendel wrote:
> Hi,
>
> I have problems with the deployment of IMP-based IDE plugins. I tried
> the following to build and deploy a minimal variant of the LEG IDE:
>
> Create plugin:
> - create plugin project "leg"
> - add programming language descriptor
> - id "leg", name "leg", file extension "leg"
> - add LPG grammar with parser wrapper for IMP
>
> First test:
> - Run as "eclipse application"
> - Create Project
> - Create File "test.leg"
> => Works fine.
>
> Deployment:
> - create feature "leg-feature", id "leg"
> - add plugin "leg"
> - enter copyright, license and description
> - create update site project "leg-updatesite"
> - add feature "leg"
> - build all
>
> Second Test:
> - Install fresh Eclipse
> - Install IMP Runtime and LPG Runtime from IMP update site
> - Install leg from update site project
> - Restart Eclipse
>
> I get no errors, and leg shows up in the list of installed plugins, but
> it seems not to be fully installed:
>
> - *.leg is not associated with the IMP editor
> - the IMP editor complains about not knowing how to handle *.leg
> (when forced to edit a *.leg file)
>
> Do I have to do anything special to register my plugin with the IMP
> runtime?

No, the presence of the "language descriptor" extension in your plugin.xml
is all that is required for the IMP editor to be registered for the
corresponding file-name extension.

Does anything appear in the Error Log view? This is where errors such as
"plug-in Foo could not be configured", "the bundle could not be activated"
would show up, indicating problems with dependencies, plugin initialization
code in the bundle activator class, and so on.

If you look at the view "Plug-in Registry", does your plugin show up and
is it listed as "active"?

BTW, you can debug your deployment-time behavior by using a launch
configuration in which you select only plug-ins from the target platform
(aka your Eclipse installation), rather than from your workspace.

--
Cheers,
-- Bob

--------------------------------
Robert M. Fuhrer
Research Staff Member
Programming Technologies Dept.
IBM T.J. Watson Research Center

IDE Meta-tooling Platform Project Lead (http://www.eclipse.org/imp)
X10: Productive High-Performance Parallel Programming (http://x10.sf.net)
Re: Deployment of IMP based IDE [message #502541 is a reply to message #502390] Tue, 08 December 2009 18:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rendel.informatik.uni-marburg.de

Robert M. Fuhrer wrote:
> No, the presence of the "language descriptor" extension in your plugin.xml
> is all that is required for the IMP editor to be registered for the
> corresponding file-name extension.
>
> Does anything appear in the Error Log view? This is where errors such as
> "plug-in Foo could not be configured", "the bundle could not be activated"
> would show up, indicating problems with dependencies, plugin initialization
> code in the bundle activator class, and so on.

I indeed get several errors in the Error Log view, the first being:

> An error occurred while automatically activating bundle org.eclipse.imp.runtime (287).
>
> org.osgi.framework.BundleException: Exception in org.eclipse.imp.runtime.RuntimePlugin.start() of bundle org.eclipse.imp.runtime.
> at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:806)
> [...]
> at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread .run(EventManager.java:337)
> Caused by: org.eclipse.core.runtime.AssertionFailedException: null argument:
> at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
> at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
> at org.eclipse.jface.resource.FontRegistry.<init>(FontRegistry.java:283)
> at org.eclipse.jface.resource.FontRegistry.<init>(FontRegistry.java:308)
> at org.eclipse.jface.resource.JFaceResources.getFontRegistry(JF aceResources.java:342)
> at org.eclipse.jface.resource.JFaceResources.getFontDescriptor( JFaceResources.java:325)
> at org.eclipse.imp.preferences.PreferenceInitializer.initialize DefaultPreferences(PreferenceInitializer.java:40)
> at org.eclipse.core.internal.preferences.PreferenceServiceRegis tryHelper.runInitializer(PreferenceServiceRegistryHelper.jav a:276)
> [...]

The assertion is used in the FontRegistry constructor to check that
Display.findDisplay returned a display for the current thread. Maybe the
initialization code is run in the wrong thread or too early?

The other errors are caused by the first, e.g.

> Unable to execute early startup code for an extension
>
> java.lang.NoClassDefFoundError: org/eclipse/imp/language/LanguageRegistry
> at org.eclipse.imp.runtime.RuntimePlugin.earlyStartup(RuntimePl ugin.java:176)
> Caused by: org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter $TerminatingClassNotFoundException: An error occurred while automatically activating bundle org.eclipse.imp.runtime (287).
> Caused by: org.osgi.framework.BundleException: Exception in org.eclipse.imp.runtime.RuntimePlugin.start() of bundle org.eclipse.imp.runtime.
> Caused by: org.eclipse.core.runtime.AssertionFailedException: null argument:

and

> org.osgi.framework.BundleException: The activator leg.LEGPlugin for bundle leg is invalid
> at org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:157)
> Caused by: java.lang.NoClassDefFoundError: org/eclipse/imp/runtime/PluginBase
> Caused by: org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter $TerminatingClassNotFoundException: An error occurred while automatically activating bundle org.eclipse.imp.runtime (287).
> Caused by: org.osgi.framework.BundleException: Exception in org.eclipse.imp.runtime.RuntimePlugin.start() of bundle org.eclipse.imp.runtime.
> Caused by: org.eclipse.core.runtime.AssertionFailedException: null argument:

> If you look at the view "Plug-in Registry", does your plugin show up and
> is it listed as "active"?

My plugin shows up, but is not active. The Plug-in Registry view does
not display any extensions as contributed by my plugin. But maybe that
is related to the errors above.

The IMP runtime is in the list, and active. I can manually activate my
plugin without getting more errors in the error log, and I can manually
open a file in the IMP universal editor, but the editor does not find my
plugin:

> No language support for text/source file of type 'leg'.
>
> java.lang.Error: No language support for text/source file of type 'leg'.
> [...]
> at org.eclipse.imp.language.LanguageRegistry.findLanguage(Langu ageRegistry.java:181)
> [...]

Thanks,

Tillmann
Re: Deployment of IMP based IDE [message #503307 is a reply to message #502541] Fri, 11 December 2009 18:23 Go to previous messageGo to next message
Robert M. Fuhrer is currently offline Robert M. FuhrerFriend
Messages: 294
Registered: July 2009
Senior Member
Hi Tillmann,

Thanks for the details; that helps a lot.

I'll have to look into this and get back to you over the next few days.

Tillmann Rendel wrote:
> Robert M. Fuhrer wrote:
>> No, the presence of the "language descriptor" extension in your
>> plugin.xml
>> is all that is required for the IMP editor to be registered for the
>> corresponding file-name extension.
>>
>> Does anything appear in the Error Log view? This is where errors such as
>> "plug-in Foo could not be configured", "the bundle could not be
>> activated"
>> would show up, indicating problems with dependencies, plugin
>> initialization
>> code in the bundle activator class, and so on.
>
> I indeed get several errors in the Error Log view, the first being:
>
>> An error occurred while automatically activating bundle
>> org.eclipse.imp.runtime (287).
>>
>> org.osgi.framework.BundleException: Exception in
>> org.eclipse.imp.runtime.RuntimePlugin.start() of bundle
>> org.eclipse.imp.runtime.
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:806)
>>
>> [...]
>> at
>> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread .run(EventManager.java:337)
>>
>> Caused by: org.eclipse.core.runtime.AssertionFailedException: null
>> argument:
>> at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
>> at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
>> at org.eclipse.jface.resource.FontRegistry.<init>(FontRegistry.java:283)
>> at org.eclipse.jface.resource.FontRegistry.<init>(FontRegistry.java:308)
>> at
>> org.eclipse.jface.resource.JFaceResources.getFontRegistry(JF aceResources.java:342)
>>
>> at
>> org.eclipse.jface.resource.JFaceResources.getFontDescriptor( JFaceResources.java:325)
>>
>> at
>> org.eclipse.imp.preferences.PreferenceInitializer.initialize DefaultPreferences(PreferenceInitializer.java:40)
>>
>> at
>> org.eclipse.core.internal.preferences.PreferenceServiceRegis tryHelper.runInitializer(PreferenceServiceRegistryHelper.jav a:276)
>>
>> [...]
>
> The assertion is used in the FontRegistry constructor to check that
> Display.findDisplay returned a display for the current thread. Maybe the
> initialization code is run in the wrong thread or too early?
>
> The other errors are caused by the first, e.g.
>
>> Unable to execute early startup code for an extension
>>
>> java.lang.NoClassDefFoundError: org/eclipse/imp/language/LanguageRegistry
>> at
>> org.eclipse.imp.runtime.RuntimePlugin.earlyStartup(RuntimePl ugin.java:176)
>>
>> Caused by:
>> org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter $TerminatingClassNotFoundException:
>> An error occurred while automatically activating bundle
>> org.eclipse.imp.runtime (287).
>> Caused by: org.osgi.framework.BundleException: Exception in
>> org.eclipse.imp.runtime.RuntimePlugin.start() of bundle
>> org.eclipse.imp.runtime.
>> Caused by: org.eclipse.core.runtime.AssertionFailedException: null
>> argument:
>
> and
>
>> org.osgi.framework.BundleException: The activator leg.LEGPlugin for
>> bundle leg is invalid
>> at
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:157)
>>
>> Caused by: java.lang.NoClassDefFoundError:
>> org/eclipse/imp/runtime/PluginBase
>> Caused by:
>> org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter $TerminatingClassNotFoundException:
>> An error occurred while automatically activating bundle
>> org.eclipse.imp.runtime (287).
>> Caused by: org.osgi.framework.BundleException: Exception in
>> org.eclipse.imp.runtime.RuntimePlugin.start() of bundle
>> org.eclipse.imp.runtime.
>> Caused by: org.eclipse.core.runtime.AssertionFailedException: null
>> argument:
>
>> If you look at the view "Plug-in Registry", does your plugin show up and
>> is it listed as "active"?
>
> My plugin shows up, but is not active. The Plug-in Registry view does
> not display any extensions as contributed by my plugin. But maybe that
> is related to the errors above.
>
> The IMP runtime is in the list, and active. I can manually activate my
> plugin without getting more errors in the error log, and I can manually
> open a file in the IMP universal editor, but the editor does not find my
> plugin:
>
>> No language support for text/source file of type 'leg'.
>>
>> java.lang.Error: No language support for text/source file of type 'leg'.
>> [...]
>> at
>> org.eclipse.imp.language.LanguageRegistry.findLanguage(Langu ageRegistry.java:181)
>>
>> [...]
>
> Thanks,
>
> Tillmann


--
Cheers,
-- Bob

--------------------------------
Robert M. Fuhrer
Research Staff Member
Programming Technologies Dept.
IBM T.J. Watson Research Center

IDE Meta-tooling Platform Project Lead (http://www.eclipse.org/imp)
X10: Productive High-Performance Parallel Programming (http://x10.sf.net)
Re: Deployment of IMP based IDE [message #516936 is a reply to message #502252] Thu, 25 February 2010 14:41 Go to previous messageGo to next message
Thomas Jespersen is currently offline Thomas JespersenFriend
Messages: 6
Registered: February 2010
Junior Member
Hi Bob (and Tillmann),

I'm developing an Eclipse plugin with IMP at the moment, and have run into quite similar problems as the ones Tillmann describe. Creating and running the plugin as an eclipse application is no problem, but when deploying the plugin it appears in the plug-ins registry, but inactive. It can be activated, but it has no effect when opening files with the new language's extension.

Looking around I found this thread, and I would like to know if there has been any development since the last post (that perhaps didn't make it to this forum)?

I can provide more detail, if you'd like, but it seems to be quite similar to Tillmann's problems.

Thanks in advance

-- Thomas
Re: Deployment of IMP based IDE [message #516972 is a reply to message #503307] Thu, 25 February 2010 11:16 Go to previous messageGo to next message
Robert M. Fuhrer is currently offline Robert M. FuhrerFriend
Messages: 294
Registered: July 2009
Senior Member
Hi,

I finally got a chance to look into this, and it turns out that
JFaceResources.getFontRegistry() will instantiate a FontRegistry
if one doesn't already exist for the current Display. So, although
JFaceResources.getFontRegistry()'s JavaDoc doesn't say it has to be
run on the UI thread for the current Display, apparently it does,
due to the call to the FontRegistry constructor, which says it does.

[Perhaps it's obvious to everyone else that all calls to JFaceResources
methods have to go on the UI thread, but it wasn't obvious to whoever
wrote this bit of code.]

In short, the PreferenceInitializer class is indeed running on the
wrong thread.

Somehow, in all of our testing, the PreferenceInitializer code gets
run on the UI thread, but obviously not always.

I've just committed a change to SVN that wraps the initialization in
a Display.asyncExec().

If you're set up to test using IMP from SVN, can you give it a try
and see whether this helps?

If not, it will go out in the next IMP release, which should be in
the next few days.

Sorry this fell off my radar...

On 12/11/09 1:23 PM, Robert M. Fuhrer wrote:
> Hi Tillmann,
>
> Thanks for the details; that helps a lot.
>
> I'll have to look into this and get back to you over the next few days.
>
> Tillmann Rendel wrote:
>> Robert M. Fuhrer wrote:
>>> No, the presence of the "language descriptor" extension in your
>>> plugin.xml
>>> is all that is required for the IMP editor to be registered for the
>>> corresponding file-name extension.
>>>
>>> Does anything appear in the Error Log view? This is where errors such as
>>> "plug-in Foo could not be configured", "the bundle could not be
>>> activated"
>>> would show up, indicating problems with dependencies, plugin
>>> initialization
>>> code in the bundle activator class, and so on.
>>
>> I indeed get several errors in the Error Log view, the first being:
>>
>>> An error occurred while automatically activating bundle
>>> org.eclipse.imp.runtime (287).
>>>
>>> org.osgi.framework.BundleException: Exception in
>>> org.eclipse.imp.runtime.RuntimePlugin.start() of bundle
>>> org.eclipse.imp.runtime.
>>> at
>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:806)
>>>
>>> [...]
>>> at
>>> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread .run(EventManager.java:337)
>>>
>>> Caused by: org.eclipse.core.runtime.AssertionFailedException: null
>>> argument:
>>> at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
>>> at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
>>> at org.eclipse.jface.resource.FontRegistry.<init>(FontRegistry.java:283)
>>> at org.eclipse.jface.resource.FontRegistry.<init>(FontRegistry.java:308)
>>> at
>>> org.eclipse.jface.resource.JFaceResources.getFontRegistry(JF aceResources.java:342)
>>>
>>> at
>>> org.eclipse.jface.resource.JFaceResources.getFontDescriptor( JFaceResources.java:325)
>>>
>>> at
>>> org.eclipse.imp.preferences.PreferenceInitializer.initialize DefaultPreferences(PreferenceInitializer.java:40)
>>>
>>> at
>>> org.eclipse.core.internal.preferences.PreferenceServiceRegis tryHelper.runInitializer(PreferenceServiceRegistryHelper.jav a:276)
>>>
>>> [...]
>>
>> The assertion is used in the FontRegistry constructor to check that
>> Display.findDisplay returned a display for the current thread. Maybe
>> the initialization code is run in the wrong thread or too early?
>>
>> The other errors are caused by the first, e.g.
>>
>>> Unable to execute early startup code for an extension
>>>
>>> java.lang.NoClassDefFoundError:
>>> org/eclipse/imp/language/LanguageRegistry
>>> at
>>> org.eclipse.imp.runtime.RuntimePlugin.earlyStartup(RuntimePl ugin.java:176)
>>>
>>> Caused by:
>>> org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter $TerminatingClassNotFoundException:
>>> An error occurred while automatically activating bundle
>>> org.eclipse.imp.runtime (287).
>>> Caused by: org.osgi.framework.BundleException: Exception in
>>> org.eclipse.imp.runtime.RuntimePlugin.start() of bundle
>>> org.eclipse.imp.runtime.
>>> Caused by: org.eclipse.core.runtime.AssertionFailedException: null
>>> argument:
>>
>> and
>>
>>> org.osgi.framework.BundleException: The activator leg.LEGPlugin for
>>> bundle leg is invalid
>>> at
>>> org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:157)
>>>
>>> Caused by: java.lang.NoClassDefFoundError:
>>> org/eclipse/imp/runtime/PluginBase
>>> Caused by:
>>> org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter $TerminatingClassNotFoundException:
>>> An error occurred while automatically activating bundle
>>> org.eclipse.imp.runtime (287).
>>> Caused by: org.osgi.framework.BundleException: Exception in
>>> org.eclipse.imp.runtime.RuntimePlugin.start() of bundle
>>> org.eclipse.imp.runtime.
>>> Caused by: org.eclipse.core.runtime.AssertionFailedException: null
>>> argument:
>>
>>> If you look at the view "Plug-in Registry", does your plugin show up and
>>> is it listed as "active"?
>>
>> My plugin shows up, but is not active. The Plug-in Registry view does
>> not display any extensions as contributed by my plugin. But maybe that
>> is related to the errors above.
>>
>> The IMP runtime is in the list, and active. I can manually activate my
>> plugin without getting more errors in the error log, and I can
>> manually open a file in the IMP universal editor, but the editor does
>> not find my plugin:
>>
>>> No language support for text/source file of type 'leg'.
>>>
>>> java.lang.Error: No language support for text/source file of type 'leg'.
>>> [...]
>>> at
>>> org.eclipse.imp.language.LanguageRegistry.findLanguage(Langu ageRegistry.java:181)
>>>
>>> [...]


--
Cheers,
-- Bob

--------------------------------
Robert M. Fuhrer
Research Staff Member
Programming Technologies Dept.
IBM T.J. Watson Research Center

IDE Meta-tooling Platform Project Lead (http://www.eclipse.org/imp)
X10: Productive High-Performance Parallel Programming (http://x10.sf.net)
Re: Deployment of IMP based IDE [message #518917 is a reply to message #516972] Fri, 05 March 2010 12:39 Go to previous messageGo to next message
Thomas Jespersen is currently offline Thomas JespersenFriend
Messages: 6
Registered: February 2010
Junior Member
Hi Bob,

I'm not currently set up to build IMP from SVN, but I will try. I figure all I need to do is check out the projects found in the IMP repository (trunk?), and... then what? Export all projects as plugins? Is there a guide anywhere to this?

Thanks in advance

-- Thomas
Re: Deployment of IMP based IDE [message #519006 is a reply to message #518917] Fri, 05 March 2010 16:33 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi Thomas

The easiest way is:

check out the projects into your Eclipse workspace
select any plugin project and Run As->Eclipse Application

so that the checked out projects are plugged in to your
nested workspace.

If you have trouble you can Debug As->Eclipse Application
and set breakpoints/watch/tweak...

Regards

Ed Willink

On 05/03/2010 12:39, laumann.thomas@gmail.com wrote:
> Hi Bob,
>
> I'm not currently set up to build IMP from SVN, but I will try. I figure
> all I need to do is check out the projects found in the IMP repository
> (trunk?), and... then what? Export all projects as plugins? Is there a
> guide anywhere to this?
>
> Thanks in advance
>
> -- Thomas
Re: Deployment of IMP based IDE [message #577069 is a reply to message #502252] Mon, 07 December 2009 23:39 Go to previous message
Robert M. Fuhrer is currently offline Robert M. FuhrerFriend
Messages: 294
Registered: July 2009
Senior Member
Responses below...

Tillmann Rendel wrote:
> Hi,
>
> I have problems with the deployment of IMP-based IDE plugins. I tried
> the following to build and deploy a minimal variant of the LEG IDE:
>
> Create plugin:
> - create plugin project "leg"
> - add programming language descriptor
> - id "leg", name "leg", file extension "leg"
> - add LPG grammar with parser wrapper for IMP
>
> First test:
> - Run as "eclipse application"
> - Create Project
> - Create File "test.leg"
> => Works fine.
>
> Deployment:
> - create feature "leg-feature", id "leg"
> - add plugin "leg"
> - enter copyright, license and description
> - create update site project "leg-updatesite"
> - add feature "leg"
> - build all
>
> Second Test:
> - Install fresh Eclipse
> - Install IMP Runtime and LPG Runtime from IMP update site
> - Install leg from update site project
> - Restart Eclipse
>
> I get no errors, and leg shows up in the list of installed plugins, but
> it seems not to be fully installed:
>
> - *.leg is not associated with the IMP editor
> - the IMP editor complains about not knowing how to handle *.leg
> (when forced to edit a *.leg file)
>
> Do I have to do anything special to register my plugin with the IMP
> runtime?

No, the presence of the "language descriptor" extension in your plugin.xml
is all that is required for the IMP editor to be registered for the
corresponding file-name extension.

Does anything appear in the Error Log view? This is where errors such as
"plug-in Foo could not be configured", "the bundle could not be activated"
would show up, indicating problems with dependencies, plugin initialization
code in the bundle activator class, and so on.

If you look at the view "Plug-in Registry", does your plugin show up and
is it listed as "active"?

BTW, you can debug your deployment-time behavior by using a launch
configuration in which you select only plug-ins from the target platform
(aka your Eclipse installation), rather than from your workspace.

--
Cheers,
-- Bob

--------------------------------
Robert M. Fuhrer
Research Staff Member
Programming Technologies Dept.
IBM T.J. Watson Research Center

IDE Meta-tooling Platform Project Lead (http://www.eclipse.org/imp)
X10: Productive High-Performance Parallel Programming (http://x10.sf.net)
Re: Deployment of IMP based IDE [message #577095 is a reply to message #502390] Tue, 08 December 2009 18:26 Go to previous message
Eclipse UserFriend
Originally posted by: rendel.informatik.uni-marburg.de

Robert M. Fuhrer wrote:
> No, the presence of the "language descriptor" extension in your plugin.xml
> is all that is required for the IMP editor to be registered for the
> corresponding file-name extension.
>
> Does anything appear in the Error Log view? This is where errors such as
> "plug-in Foo could not be configured", "the bundle could not be activated"
> would show up, indicating problems with dependencies, plugin initialization
> code in the bundle activator class, and so on.

I indeed get several errors in the Error Log view, the first being:

> An error occurred while automatically activating bundle org.eclipse.imp.runtime (287).
>
> org.osgi.framework.BundleException: Exception in org.eclipse.imp.runtime.RuntimePlugin.start() of bundle org.eclipse.imp.runtime.
> at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:806)
> [...]
> at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread .run(EventManager.java:337)
> Caused by: org.eclipse.core.runtime.AssertionFailedException: null argument:
> at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
> at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
> at org.eclipse.jface.resource.FontRegistry.<init>(FontRegistry.java:283)
> at org.eclipse.jface.resource.FontRegistry.<init>(FontRegistry.java:308)
> at org.eclipse.jface.resource.JFaceResources.getFontRegistry(JF aceResources.java:342)
> at org.eclipse.jface.resource.JFaceResources.getFontDescriptor( JFaceResources.java:325)
> at org.eclipse.imp.preferences.PreferenceInitializer.initialize DefaultPreferences(PreferenceInitializer.java:40)
> at org.eclipse.core.internal.preferences.PreferenceServiceRegis tryHelper.runInitializer(PreferenceServiceRegistryHelper.jav a:276)
> [...]

The assertion is used in the FontRegistry constructor to check that
Display.findDisplay returned a display for the current thread. Maybe the
initialization code is run in the wrong thread or too early?

The other errors are caused by the first, e.g.

> Unable to execute early startup code for an extension
>
> java.lang.NoClassDefFoundError: org/eclipse/imp/language/LanguageRegistry
> at org.eclipse.imp.runtime.RuntimePlugin.earlyStartup(RuntimePl ugin.java:176)
> Caused by: org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter $TerminatingClassNotFoundException: An error occurred while automatically activating bundle org.eclipse.imp.runtime (287).
> Caused by: org.osgi.framework.BundleException: Exception in org.eclipse.imp.runtime.RuntimePlugin.start() of bundle org.eclipse.imp.runtime.
> Caused by: org.eclipse.core.runtime.AssertionFailedException: null argument:

and

> org.osgi.framework.BundleException: The activator leg.LEGPlugin for bundle leg is invalid
> at org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:157)
> Caused by: java.lang.NoClassDefFoundError: org/eclipse/imp/runtime/PluginBase
> Caused by: org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter $TerminatingClassNotFoundException: An error occurred while automatically activating bundle org.eclipse.imp.runtime (287).
> Caused by: org.osgi.framework.BundleException: Exception in org.eclipse.imp.runtime.RuntimePlugin.start() of bundle org.eclipse.imp.runtime.
> Caused by: org.eclipse.core.runtime.AssertionFailedException: null argument:

> If you look at the view "Plug-in Registry", does your plugin show up and
> is it listed as "active"?

My plugin shows up, but is not active. The Plug-in Registry view does
not display any extensions as contributed by my plugin. But maybe that
is related to the errors above.

The IMP runtime is in the list, and active. I can manually activate my
plugin without getting more errors in the error log, and I can manually
open a file in the IMP universal editor, but the editor does not find my
plugin:

> No language support for text/source file of type 'leg'.
>
> java.lang.Error: No language support for text/source file of type 'leg'.
> [...]
> at org.eclipse.imp.language.LanguageRegistry.findLanguage(Langu ageRegistry.java:181)
> [...]

Thanks,

Tillmann
Re: Deployment of IMP based IDE [message #577121 is a reply to message #502541] Fri, 11 December 2009 18:23 Go to previous message
Robert M. Fuhrer is currently offline Robert M. FuhrerFriend
Messages: 294
Registered: July 2009
Senior Member
Hi Tillmann,

Thanks for the details; that helps a lot.

I'll have to look into this and get back to you over the next few days.

Tillmann Rendel wrote:
> Robert M. Fuhrer wrote:
>> No, the presence of the "language descriptor" extension in your
>> plugin.xml
>> is all that is required for the IMP editor to be registered for the
>> corresponding file-name extension.
>>
>> Does anything appear in the Error Log view? This is where errors such as
>> "plug-in Foo could not be configured", "the bundle could not be
>> activated"
>> would show up, indicating problems with dependencies, plugin
>> initialization
>> code in the bundle activator class, and so on.
>
> I indeed get several errors in the Error Log view, the first being:
>
>> An error occurred while automatically activating bundle
>> org.eclipse.imp.runtime (287).
>>
>> org.osgi.framework.BundleException: Exception in
>> org.eclipse.imp.runtime.RuntimePlugin.start() of bundle
>> org.eclipse.imp.runtime.
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:806)
>>
>> [...]
>> at
>> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread .run(EventManager.java:337)
>>
>> Caused by: org.eclipse.core.runtime.AssertionFailedException: null
>> argument:
>> at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
>> at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
>> at org.eclipse.jface.resource.FontRegistry.<init>(FontRegistry.java:283)
>> at org.eclipse.jface.resource.FontRegistry.<init>(FontRegistry.java:308)
>> at
>> org.eclipse.jface.resource.JFaceResources.getFontRegistry(JF aceResources.java:342)
>>
>> at
>> org.eclipse.jface.resource.JFaceResources.getFontDescriptor( JFaceResources.java:325)
>>
>> at
>> org.eclipse.imp.preferences.PreferenceInitializer.initialize DefaultPreferences(PreferenceInitializer.java:40)
>>
>> at
>> org.eclipse.core.internal.preferences.PreferenceServiceRegis tryHelper.runInitializer(PreferenceServiceRegistryHelper.jav a:276)
>>
>> [...]
>
> The assertion is used in the FontRegistry constructor to check that
> Display.findDisplay returned a display for the current thread. Maybe the
> initialization code is run in the wrong thread or too early?
>
> The other errors are caused by the first, e.g.
>
>> Unable to execute early startup code for an extension
>>
>> java.lang.NoClassDefFoundError: org/eclipse/imp/language/LanguageRegistry
>> at
>> org.eclipse.imp.runtime.RuntimePlugin.earlyStartup(RuntimePl ugin.java:176)
>>
>> Caused by:
>> org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter $TerminatingClassNotFoundException:
>> An error occurred while automatically activating bundle
>> org.eclipse.imp.runtime (287).
>> Caused by: org.osgi.framework.BundleException: Exception in
>> org.eclipse.imp.runtime.RuntimePlugin.start() of bundle
>> org.eclipse.imp.runtime.
>> Caused by: org.eclipse.core.runtime.AssertionFailedException: null
>> argument:
>
> and
>
>> org.osgi.framework.BundleException: The activator leg.LEGPlugin for
>> bundle leg is invalid
>> at
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:157)
>>
>> Caused by: java.lang.NoClassDefFoundError:
>> org/eclipse/imp/runtime/PluginBase
>> Caused by:
>> org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter $TerminatingClassNotFoundException:
>> An error occurred while automatically activating bundle
>> org.eclipse.imp.runtime (287).
>> Caused by: org.osgi.framework.BundleException: Exception in
>> org.eclipse.imp.runtime.RuntimePlugin.start() of bundle
>> org.eclipse.imp.runtime.
>> Caused by: org.eclipse.core.runtime.AssertionFailedException: null
>> argument:
>
>> If you look at the view "Plug-in Registry", does your plugin show up and
>> is it listed as "active"?
>
> My plugin shows up, but is not active. The Plug-in Registry view does
> not display any extensions as contributed by my plugin. But maybe that
> is related to the errors above.
>
> The IMP runtime is in the list, and active. I can manually activate my
> plugin without getting more errors in the error log, and I can manually
> open a file in the IMP universal editor, but the editor does not find my
> plugin:
>
>> No language support for text/source file of type 'leg'.
>>
>> java.lang.Error: No language support for text/source file of type 'leg'.
>> [...]
>> at
>> org.eclipse.imp.language.LanguageRegistry.findLanguage(Langu ageRegistry.java:181)
>>
>> [...]
>
> Thanks,
>
> Tillmann


--
Cheers,
-- Bob

--------------------------------
Robert M. Fuhrer
Research Staff Member
Programming Technologies Dept.
IBM T.J. Watson Research Center

IDE Meta-tooling Platform Project Lead (http://www.eclipse.org/imp)
X10: Productive High-Performance Parallel Programming (http://x10.sf.net)
Re: Deployment of IMP based IDE [message #577390 is a reply to message #502252] Thu, 25 February 2010 14:41 Go to previous message
Thomas Jespersen is currently offline Thomas JespersenFriend
Messages: 6
Registered: February 2010
Junior Member
Hi Bob (and Tillmann),

I'm developing an Eclipse plugin with IMP at the moment, and have run into quite similar problems as the ones Tillmann describe. Creating and running the plugin as an eclipse application is no problem, but when deploying the plugin it appears in the plug-ins registry, but inactive. It can be activated, but it has no effect when opening files with the new language's extension.

Looking around I found this thread, and I would like to know if there has been any development since the last post (that perhaps didn't make it to this forum)?

I can provide more detail, if you'd like, but it seems to be quite similar to Tillmann's problems.

Thanks in advance

-- Thomas
Re: Deployment of IMP based IDE [message #577430 is a reply to message #503307] Thu, 25 February 2010 16:04 Go to previous message
Robert M. Fuhrer is currently offline Robert M. FuhrerFriend
Messages: 294
Registered: July 2009
Senior Member
Hi,

I finally got a chance to look into this, and it turns out that
JFaceResources.getFontRegistry() will instantiate a FontRegistry
if one doesn't already exist for the current Display. So, although
JFaceResources.getFontRegistry()'s JavaDoc doesn't say it has to be
run on the UI thread for the current Display, apparently it does,
due to the call to the FontRegistry constructor, which says it does.

[Perhaps it's obvious to everyone else that all calls to JFaceResources
methods have to go on the UI thread, but it wasn't obvious to whoever
wrote this bit of code.]

In short, the PreferenceInitializer class is indeed running on the
wrong thread.

Somehow, in all of our testing, the PreferenceInitializer code gets
run on the UI thread, but obviously not always.

I've just committed a change to SVN that wraps the initialization in
a Display.asyncExec().

If you're set up to test using IMP from SVN, can you give it a try
and see whether this helps?

If not, it will go out in the next IMP release, which should be in
the next few days.

Sorry this fell off my radar...

On 12/11/09 1:23 PM, Robert M. Fuhrer wrote:
> Hi Tillmann,
>
> Thanks for the details; that helps a lot.
>
> I'll have to look into this and get back to you over the next few days.
>
> Tillmann Rendel wrote:
>> Robert M. Fuhrer wrote:
>>> No, the presence of the "language descriptor" extension in your
>>> plugin.xml
>>> is all that is required for the IMP editor to be registered for the
>>> corresponding file-name extension.
>>>
>>> Does anything appear in the Error Log view? This is where errors such as
>>> "plug-in Foo could not be configured", "the bundle could not be
>>> activated"
>>> would show up, indicating problems with dependencies, plugin
>>> initialization
>>> code in the bundle activator class, and so on.
>>
>> I indeed get several errors in the Error Log view, the first being:
>>
>>> An error occurred while automatically activating bundle
>>> org.eclipse.imp.runtime (287).
>>>
>>> org.osgi.framework.BundleException: Exception in
>>> org.eclipse.imp.runtime.RuntimePlugin.start() of bundle
>>> org.eclipse.imp.runtime.
>>> at
>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:806)
>>>
>>> [...]
>>> at
>>> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread .run(EventManager.java:337)
>>>
>>> Caused by: org.eclipse.core.runtime.AssertionFailedException: null
>>> argument:
>>> at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
>>> at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
>>> at org.eclipse.jface.resource.FontRegistry.<init>(FontRegistry.java:283)
>>> at org.eclipse.jface.resource.FontRegistry.<init>(FontRegistry.java:308)
>>> at
>>> org.eclipse.jface.resource.JFaceResources.getFontRegistry(JF aceResources.java:342)
>>>
>>> at
>>> org.eclipse.jface.resource.JFaceResources.getFontDescriptor( JFaceResources.java:325)
>>>
>>> at
>>> org.eclipse.imp.preferences.PreferenceInitializer.initialize DefaultPreferences(PreferenceInitializer.java:40)
>>>
>>> at
>>> org.eclipse.core.internal.preferences.PreferenceServiceRegis tryHelper.runInitializer(PreferenceServiceRegistryHelper.jav a:276)
>>>
>>> [...]
>>
>> The assertion is used in the FontRegistry constructor to check that
>> Display.findDisplay returned a display for the current thread. Maybe
>> the initialization code is run in the wrong thread or too early?
>>
>> The other errors are caused by the first, e.g.
>>
>>> Unable to execute early startup code for an extension
>>>
>>> java.lang.NoClassDefFoundError:
>>> org/eclipse/imp/language/LanguageRegistry
>>> at
>>> org.eclipse.imp.runtime.RuntimePlugin.earlyStartup(RuntimePl ugin.java:176)
>>>
>>> Caused by:
>>> org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter $TerminatingClassNotFoundException:
>>> An error occurred while automatically activating bundle
>>> org.eclipse.imp.runtime (287).
>>> Caused by: org.osgi.framework.BundleException: Exception in
>>> org.eclipse.imp.runtime.RuntimePlugin.start() of bundle
>>> org.eclipse.imp.runtime.
>>> Caused by: org.eclipse.core.runtime.AssertionFailedException: null
>>> argument:
>>
>> and
>>
>>> org.osgi.framework.BundleException: The activator leg.LEGPlugin for
>>> bundle leg is invalid
>>> at
>>> org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:157)
>>>
>>> Caused by: java.lang.NoClassDefFoundError:
>>> org/eclipse/imp/runtime/PluginBase
>>> Caused by:
>>> org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter $TerminatingClassNotFoundException:
>>> An error occurred while automatically activating bundle
>>> org.eclipse.imp.runtime (287).
>>> Caused by: org.osgi.framework.BundleException: Exception in
>>> org.eclipse.imp.runtime.RuntimePlugin.start() of bundle
>>> org.eclipse.imp.runtime.
>>> Caused by: org.eclipse.core.runtime.AssertionFailedException: null
>>> argument:
>>
>>> If you look at the view "Plug-in Registry", does your plugin show up and
>>> is it listed as "active"?
>>
>> My plugin shows up, but is not active. The Plug-in Registry view does
>> not display any extensions as contributed by my plugin. But maybe that
>> is related to the errors above.
>>
>> The IMP runtime is in the list, and active. I can manually activate my
>> plugin without getting more errors in the error log, and I can
>> manually open a file in the IMP universal editor, but the editor does
>> not find my plugin:
>>
>>> No language support for text/source file of type 'leg'.
>>>
>>> java.lang.Error: No language support for text/source file of type 'leg'.
>>> [...]
>>> at
>>> org.eclipse.imp.language.LanguageRegistry.findLanguage(Langu ageRegistry.java:181)
>>>
>>> [...]


--
Cheers,
-- Bob

--------------------------------
Robert M. Fuhrer
Research Staff Member
Programming Technologies Dept.
IBM T.J. Watson Research Center

IDE Meta-tooling Platform Project Lead (http://www.eclipse.org/imp)
X10: Productive High-Performance Parallel Programming (http://x10.sf.net)
Re: Deployment of IMP based IDE [message #577491 is a reply to message #577430] Fri, 05 March 2010 12:39 Go to previous message
Thomas Jespersen is currently offline Thomas JespersenFriend
Messages: 6
Registered: February 2010
Junior Member
Hi Bob,

I'm not currently set up to build IMP from SVN, but I will try. I figure all I need to do is check out the projects found in the IMP repository (trunk?), and... then what? Export all projects as plugins? Is there a guide anywhere to this?

Thanks in advance

-- Thomas
Re: Deployment of IMP based IDE [message #577511 is a reply to message #577491] Fri, 05 March 2010 16:33 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi Thomas

The easiest way is:

check out the projects into your Eclipse workspace
select any plugin project and Run As->Eclipse Application

so that the checked out projects are plugged in to your
nested workspace.

If you have trouble you can Debug As->Eclipse Application
and set breakpoints/watch/tweak...

Regards

Ed Willink

On 05/03/2010 12:39, laumann.thomas@gmail.com wrote:
> Hi Bob,
>
> I'm not currently set up to build IMP from SVN, but I will try. I figure
> all I need to do is check out the projects found in the IMP repository
> (trunk?), and... then what? Export all projects as plugins? Is there a
> guide anywhere to this?
>
> Thanks in advance
>
> -- Thomas
Previous Topic:Cannot uninstall IMP
Next Topic:New installation doesn't create Ast package
Goto Forum:
  


Current Time: Fri Apr 19 06:28:55 GMT 2024

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

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

Back to the top