[ANN] Osmorc 0.10.0

0.10.0 comes with the following changes and new features:

  • OSGi bundles run configuration: bundles which are part of the framework can now be started.
  • OSGi bundles run configuration: libraries which are themselves OSGi bundles can now be started.
  • Multiple rules can now be applied when building a library bundle.
  • Bundle version from facet dialog is now correctly built into the manifest.
  • Library cache can now be deleted with a button in library building dialog.
  • Fragment bundles are now handled correctly when manifest files are edited manually.
  • The classpath used by the run configurations to start the OSGi container now only contains what is needed to start the container.
  • Added spell checking for manifest header names.
6 comments
Comment actions Permalink

What libraries are required to get Osmorc working with Equinox/RCP?

I've taken a look at the video which tells to add other plug-in's jars to
the module's classpath. But this also adds hidden packages. Is it planned to
create dummy jars to be added to the classpath for code completion and
compiling?

Tom

0
Comment actions Permalink

When I click the Add button in the launch configuration, I'm receiving this NPE:

Error during dispatching of
java.awt.event.MouseEvent[MOUSE_RELEASED,(602,114),absolute(1384,409),button=1,modifiers=Button1,clickCount=1]
on dialog2
java.lang.NullPointerException
at org.osmorc.run.ui.SelectedBundle.toString(SelectedBundle.java:64)
at
javax.swing.DefaultListCellRenderer.getListCellRendererComponent(DefaultListCellRenderer.java:134)
at
org.osmorc.run.ui.SelectedBundleListCellRenderer.getListCellRendererComponent(SelectedBundleListCellRenderer.java:49)
at javax.swing.plaf.basic.BasicListUI.updateLayoutState(BasicListUI.java:1349)
at
javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(BasicListUI.java:1299)
at javax.swing.plaf.basic.BasicListUI.getPreferredSize(BasicListUI.java:566)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1632)
at javax.swing.JList.getPreferredScrollableViewportSize(JList.java:2382)
at javax.swing.ViewportLayout.preferredLayoutSize(ViewportLayout.java:75)
at java.awt.Container.preferredSize(Container.java:1581)
at java.awt.Container.getPreferredSize(Container.java:1566)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1634)
at javax.swing.ScrollPaneLayout.preferredLayoutSize(ScrollPaneLayout.java:475)
at java.awt.Container.preferredSize(Container.java:1581)
at java.awt.Container.getPreferredSize(Container.java:1566)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1634)
at com.intellij.uiDesigner.core.Util.getPreferredSize(Util.java:45)
at
com.intellij.uiDesigner.core.DimensionInfo.getPreferredSize(DimensionInfo.java:230)
at
com.intellij.uiDesigner.core.HorizontalInfo.getPreferredWidth(HorizontalInfo.java:52)
at
com.intellij.uiDesigner.core.GridLayoutManager.getMinOrPrefSizes(GridLayoutManager.java:645)
at
com.intellij.uiDesigner.core.GridLayoutManager.getPrefSizes(GridLayoutManager.java:630)
at
com.intellij.uiDesigner.core.GridLayoutManager.preferredLayoutSize(GridLayoutManager.java:274)
at java.awt.Container.preferredSize(Container.java:1581)
at java.awt.Container.getPreferredSize(Container.java:1566)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1634)
at com.intellij.uiDesigner.core.Util.getPreferredSize(Util.java:45)
at
com.intellij.uiDesigner.core.DimensionInfo.getPreferredSize(DimensionInfo.java:230)
at
com.intellij.uiDesigner.core.HorizontalInfo.getPreferredWidth(HorizontalInfo.java:52)
at
com.intellij.uiDesigner.core.GridLayoutManager.getMinOrPrefSizes(GridLayoutManager.java:660)
at
com.intellij.uiDesigner.core.GridLayoutManager.getPrefSizes(GridLayoutManager.java:630)
at
com.intellij.uiDesigner.core.GridLayoutManager.preferredLayoutSize(GridLayoutManager.java:274)
at
com.intellij.uiDesigner.core.GridLayoutManager.layoutContainer(GridLayoutManager.java:409)
at java.awt.Container.layout(Container.java:1398)
at java.awt.Container.doLayout(Container.java:1387)
at java.awt.Container.validateTree(Container.java:1485)
at java.awt.Container.validateTree(Container.java:1491)
at java.awt.Container.validateTree(Container.java:1491)
at java.awt.Container.validateTree(Container.java:1491)
at java.awt.Container.validate(Container.java:1457)
at java.awt.Dialog.conditionalShow(Dialog.java:894)
at java.awt.Dialog.show(Dialog.java:1036)
at java.awt.Component.show(Component.java:1447)
at java.awt.Component.setVisible(Component.java:1400)
at java.awt.Window.setVisible(Window.java:824)
at java.awt.Dialog.setVisible(Dialog.java:987)
at org.osmorc.run.ui.BundleSelector.show(BundleSelector.java:152)
at
org.osmorc.run.ui.OsgiRunConfigurationEditor.onAddClick(OsgiRunConfigurationEditor.java:163)
at
org.osmorc.run.ui.OsgiRunConfigurationEditor.access$200(OsgiRunConfigurationEditor.java:64)
at
org.osmorc.run.ui.OsgiRunConfigurationEditor$2.actionPerformed(OsgiRunConfigurationEditor.java:93)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6134)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
at java.awt.Component.processEvent(Component.java:5899)
at java.awt.Container.processEvent(Container.java:2023)
at java.awt.Component.dispatchEventImpl(Component.java:4501)
at java.awt.Container.dispatchEventImpl(Container.java:2081)
at java.awt.Component.dispatchEvent(Component.java:4331)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4301)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3965)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3895)
at java.awt.Container.dispatchEventImpl(Container.java:2067)
at java.awt.Window.dispatchEventImpl(Window.java:2458)
at java.awt.Component.dispatchEvent(Component.java:4331)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at com.intellij.ide.IdeEventQueue.c(IdeEventQueue.java:35)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:223)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:217)
at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
at java.awt.Dialog$1.run(Dialog.java:1047)
at java.awt.Dialog$3.run(Dialog.java:1099)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Dialog.java:1097)
at
com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:3)
at
com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:148)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:849)
at
com.intellij.execution.actions.EditRunConfigurationsAction.actionPerformed(EditRunConfigurationsAction.java:3)
at
com.intellij.ui.popup.PopupFactoryImpl$ActionPopupStep$1.run(PopupFactoryImpl.java)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at com.intellij.ide.IdeEventQueue.c(IdeEventQueue.java:35)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:99)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:217)
at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)



java.lang.NullPointerException
at org.osmorc.run.ui.SelectedBundle.toString(SelectedBundle.java:64)
at
javax.swing.DefaultListCellRenderer.getListCellRendererComponent(DefaultListCellRenderer.java:134)
at
org.osmorc.run.ui.SelectedBundleListCellRenderer.getListCellRendererComponent(SelectedBundleListCellRenderer.java:49)
at javax.swing.plaf.basic.BasicListUI.updateLayoutState(BasicListUI.java:1349)
at
javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(BasicListUI.java:1299)
at javax.swing.plaf.basic.BasicListUI.getPreferredSize(BasicListUI.java:566)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1632)
at javax.swing.JList.getPreferredScrollableViewportSize(JList.java:2382)
at javax.swing.ViewportLayout.preferredLayoutSize(ViewportLayout.java:75)
at java.awt.Container.preferredSize(Container.java:1581)
at java.awt.Container.getPreferredSize(Container.java:1566)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1634)
at javax.swing.ScrollPaneLayout.preferredLayoutSize(ScrollPaneLayout.java:475)
at java.awt.Container.preferredSize(Container.java:1581)
at java.awt.Container.getPreferredSize(Container.java:1566)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1634)
at com.intellij.uiDesigner.core.Util.getPreferredSize(Util.java:45)
at
com.intellij.uiDesigner.core.DimensionInfo.getPreferredSize(DimensionInfo.java:230)
at
com.intellij.uiDesigner.core.HorizontalInfo.getPreferredWidth(HorizontalInfo.java:52)
at
com.intellij.uiDesigner.core.GridLayoutManager.getMinOrPrefSizes(GridLayoutManager.java:645)
at
com.intellij.uiDesigner.core.GridLayoutManager.getPrefSizes(GridLayoutManager.java:630)
at
com.intellij.uiDesigner.core.GridLayoutManager.preferredLayoutSize(GridLayoutManager.java:274)
at java.awt.Container.preferredSize(Container.java:1581)
at java.awt.Container.getPreferredSize(Container.java:1566)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1634)
at com.intellij.uiDesigner.core.Util.getPreferredSize(Util.java:45)
at
com.intellij.uiDesigner.core.DimensionInfo.getPreferredSize(DimensionInfo.java:230)
at
com.intellij.uiDesigner.core.HorizontalInfo.getPreferredWidth(HorizontalInfo.java:52)
at
com.intellij.uiDesigner.core.GridLayoutManager.getMinOrPrefSizes(GridLayoutManager.java:660)
at
com.intellij.uiDesigner.core.GridLayoutManager.getPrefSizes(GridLayoutManager.java:630)
at
com.intellij.uiDesigner.core.GridLayoutManager.preferredLayoutSize(GridLayoutManager.java:274)
at
com.intellij.uiDesigner.core.GridLayoutManager.layoutContainer(GridLayoutManager.java:409)
at java.awt.Container.layout(Container.java:1398)
at java.awt.Container.doLayout(Container.java:1387)
at java.awt.Container.validateTree(Container.java:1485)
at java.awt.Container.validateTree(Container.java:1491)
at java.awt.Container.validateTree(Container.java:1491)
at java.awt.Container.validateTree(Container.java:1491)
at java.awt.Container.validate(Container.java:1457)
at java.awt.Window.dispatchEventImpl(Window.java:2456)
at java.awt.Component.dispatchEvent(Component.java:4331)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at com.intellij.ide.IdeEventQueue.c(IdeEventQueue.java:35)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:99)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:217)
at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
at java.awt.Dialog$1.run(Dialog.java:1047)
at java.awt.Dialog$3.run(Dialog.java:1099)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Dialog.java:1097)
at
com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:3)
at
com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:148)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:849)
at
com.intellij.execution.actions.EditRunConfigurationsAction.actionPerformed(EditRunConfigurationsAction.java:3)
at
com.intellij.ui.popup.PopupFactoryImpl$ActionPopupStep$1.run(PopupFactoryImpl.java)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at com.intellij.ide.IdeEventQueue.c(IdeEventQueue.java:35)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:99)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:217)
at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)


0
Comment actions Permalink

Hi Tom,

There are two approaches to using Osmorc. The approach shown in the video is the one in which you create your project from normal IDEA modules and afterwards let Osmorc generate the manifest files and change modules and libraries into bundles. The second one is to manually edit your manifest files. Osmorc then automatically transfers your bundle dependencies specified in the manifest files into module dependencies.

Please also read the documentation provided with Osmorc which is available in IDEA in Help -> Help Topics -> Osmorc.

You probably want to migrate from Eclipse as your IDE to IDEA for the development of your RCP application. If that is true the second approach is the one for you.

For this you need to first create a framework instance for your Eclipse RCP SDK. A framework inistance is generally the same thinig like a target platform in Eclipse. Go to File -> Settings -> Osmorc -> IDE Settings -> Framework Definitions and click on  the "Add"-button, select Equinox as the integrator, choose a name for the framework instance ("Eclipse RCP") and choose the eclipse folder of your RCP SDK inistallation.

In File -> Settings -> Osmorc -> Project Settings then choose the newly created framework instance. Check the "Create and maintain the module FrameworkInstance" if you want to see all the libraries of the framework instance in one convenient module.

In File ->Project Structure add an Osmorc facet to each of your modules.If a module contains a plugin.xml or some other resources outside of the source folder that are needed to run your application, add them in the table additional JAR contents on the configuration page of the facet. For the plugin.xml you would add "plugin.xml" in both cells of a row of that table. You can also add whole folders here.

To run an Eclipse product or application create an instance of the run config type Eclipse Equinox and specifiy the product or application to use. Note: If your product has the name "product" in a plugin "com.mycompany.myapp" then the name of the product is "com.mycompany.myapp.product". The same goes for applications.

Note: Version 0.10.0 only supports running applications and products based on Eclipse Equiinox 3.3 and higher. Support for Eclipse Equinox 3.1 and 3.2 is already implemented and will be available in the next version.

If you imported your Eclipse workspace with IDEA, IDEA has created a big global library named ECLIPSE and added a module dependency in each module on it. Please remove this module dependency. Osmorc will create dependencies on parts of the framework instance according to the bundle dependencies defined in the manifest files.

Best regards,
  Robert

0
Comment actions Permalink

Hi Robert,

Thank you for the detailed answer (and the plug-in).
Robert F. Beeger wrote:

Please also read the documentation provided with Osmorc which is available in IDEA in Help -> Help Topics -> Osmorc.


I'll read that.

You probably want to migrate from Eclipse as your IDE to IDEA for the development of your RCP application.


It's the opposite: we try to develop an Eclipse RCP test application and
want to avoid using Eclipse (bind yourself a heavy stone to your foot and
try to run - then you have a feeling about how I feel with Eclipse). I'm
still at learning the basics. Unfortunately, the RCP tutorials always expect
Eclipse as IDE and to use their wizards to magically do something - this
does not help much in understanding relations.

Thanks,
Tom

0
Comment actions Permalink

It's the opposite: we try to develop an Eclipse RCP test application and
want to avoid using Eclipse (bind yourself a heavy stone to your foot and
try to run - then you have a feeling about how I feel with Eclipse). I'm
still at learning the basics. Unfortunately, the RCP tutorials always expect
Eclipse as IDE and to use their wizards to magically do something - this
does not help much in understanding relations.

Yes that's true and a great pain. We plan to have some better support for Eclipse RCP and Equinox specific things like extensions and the creation of a basic RCP setup that will be more code centric and won't have those shiny wizards that shield you from the code itself.

But as long as that is not implemented, my strategy is to use Eclipse and its wizards to create a "Hello RCP" application and then use IDEA and Osmorc to do the real work.

Best regards,
  Robert

0
Comment actions Permalink

My trivial test project is similar to the one shown in thekork's video.
Although I've added the Ocmorc-module to the "Deploy following bundles"
section in my run/debug configuration (IDEA 7.0.4), the bundle activator
will not started. I just get an

osgi>

prompt. When I type

osgi> ss

I'm getting following output:

Framework is launched.

id State Bundle
0 ACTIVE org.eclipse.osgi_3.4.2.R34x_v20080826-1230

What could be wrong?

Tom

0

Please sign in to leave a comment.