Archive for the ‘Uncategorized’ Category

New property to eclipse scout service extension point

Wednesday, March 3rd, 2010

There is an interesting change request for the org.eclipse.scout.service Plug-In

The extension point “services” that is used to declaratively add osgi services and factories shall provide an additional checkbox “Create service immediately” which is checked by default.
This atttribute is used to control the moment when the service instance is effectively created.
true creates the service instance immediately when the extension point loads.
false does not create the service instance on extension point load. It creates the service instance lazy on the first usage of the service.

This can be useful if a service is for example listening for client notifications (to come up from the server) to perform some actions.
Consider a CTI service handling telephony events that come up from the server-side.

Example for the com.myapp.server.core Plug-In:
old plugin.xml entries:
<?xml version="1.0" encoding="UTF-8"?>
<plugin>
<extension point="org.eclipse.scout.service.services">
<service class="org.eclipse.scout.rt.server.services.common.ping.PingService"/>
<service class="com.myapp.server.core.services.process.FoodStoreService" factory="org.eclipse.scout.rt.server.services.ServerServiceFactory"/>
</extension>
</plugin>

new plugin.xml entries:
<?xml version="1.0" encoding="UTF-8"?>
<plugin>
<extension point="org.eclipse.scout.service.services">
<service class="org.eclipse.scout.rt.server.services.common.ping.PingService" createImmediately="false"/>
<service class="com.myapp.server.core.services.process.FoodStoreService" factory="org.eclipse.scout.rt.server.services.ServerServiceFactory" createImmediately="true"/>
</extension>
</plugin>

New properties “expandable” and “expanded” on IGroupBox to support Sections

Monday, March 1st, 2010

Had a discussion about supporting sections (swt: Section, swing: expandable JPanel) in the scout model.

The decision is to add two new properties to IGroupBox and two new configured properties to AbstractGroupBox. SWT and Swing UI Layers are interpreting these properties in SwtScoutGroupBox and SwingScoutGroupBox respectively and create a nice blue Section.

IGroupBox.isExpandable, setExpandable //whether the box is expandable at all

IGroupBox.isExpanded, setExpanded//if expandable, whats the state

AbstractGroupBox.getConfiguredExpandable

AbstractGroupBox.getConfiguredExpanded