Skip to content

Commit

Permalink
Temporary workaround to force EEF plugin properties and eef.adapters …
Browse files Browse the repository at this point in the history
…activation at startup

The UML Designer EEF properties plugin is activated at startup. Then from the
start  method we call a method of the EEF adapetrs plugin to force the plugin
activation.
  • Loading branch information
mbats committed Sep 22, 2015
1 parent c61bd5d commit a0e372f
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.emf.transaction,
org.eclipse.sirius.ui,
org.eclipse.sirius.common.ui,
org.eclipse.ui.navigator
org.eclipse.ui.navigator,
org.eclipse.sirius.eef.adapters
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Export-Package: org.obeonetwork.dsl.uml2.properties,
Expand Down
6 changes: 6 additions & 0 deletions plugins/org.obeonetwork.dsl.uml2.properties/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -492,5 +492,11 @@ Contributors:
tab="TaggedValues">
</propertySection>
</propertySections>
</extension>
<extension
point="org.eclipse.ui.startup">
<startup
class="org.obeonetwork.dsl.uml2.properties.UmlEarlyStartup">
</startup>
</extension>
</plugin>
Original file line number Diff line number Diff line change
Expand Up @@ -20,45 +20,47 @@
*/
public class Activator extends AbstractUIPlugin {

/** The plug-in ID. */
public static final String PLUGIN_ID = "org.obeonetwork.dsl.uml2.properties"; //$NON-NLS-1$
/** The plug-in ID. */
public static final String PLUGIN_ID = "org.obeonetwork.dsl.uml2.properties"; //$NON-NLS-1$

/** The shared instance. */
private static Activator plugin;
/** The shared instance. */
private static Activator plugin;

/**
* The constructor.
*/
public Activator() {
}
/**
* The constructor.
*/
public Activator() {
}

/**
* {@inheritDoc}
*
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
/**
* {@inheritDoc}
*
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}

/**
* {@inheritDoc}
*
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}
/**
* {@inheritDoc}
*
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
@Override
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}

/**
* Returns the shared instance.
*
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}
/**
* Returns the shared instance.
*
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package org.obeonetwork.dsl.uml2.properties;

import org.eclipse.ui.IStartup;

public class UmlEarlyStartup implements IStartup {

public void earlyStartup() {
// Call a method of the eef adapters just to activate the plugin
org.eclipse.sirius.eef.adapters.Activator.getDefault();
}

}

0 comments on commit a0e372f

Please sign in to comment.