Plugin/Bundle remains in STARTING status [message #1775001] |
Mon, 23 October 2017 11:55 |
Philipp Schäfer Messages: 2 Registered: October 2017 |
Junior Member |
|
|
I have an RCP plugin with a command, a binding for that command, and a handler that uses a property tester via an enableWith. Other than the corresponding classes for the handler and the property tester there is nothing else.
When I start an application with that plugin, the plugin never reaches the ACTIVE state and thus, the property tester is never instantiated, which causes the handler to be disabled forever.
I tried to get it to work with and without lazy activation policy, with and without forcePluginActivation on the enableWhen clause, and with a lower than default start level. Nothing worked.
What do I have change, so that the plugin is properly started?
plugin.xml:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="org.eclipse.core.expressions.propertyTesters">
<propertyTester
class="com.example.plugin.PropertyTester"
id="com.example.plugin.PropertyTester"
namespace="com.example.plugin"
properties="configured"
type="java.lang.Object">
</propertyTester>
</extension>
<extension
point="org.eclipse.ui.handlers">
<handler
class="com.example.plugin.Handler"
commandId="com.example.plugin.command">
<enabledWhen>
<test
forcePluginActivation="true"
property="com.example.plugin.configured"
value="true">
</test>
</enabledWhen>
</handler>
</extension>
<extension
point="org.eclipse.ui.commands">
<command
id="com.example.plugin.command"
name="Command">
</command>
</extension>
<extension
point="org.eclipse.ui.bindings">
<key
commandId="com.example.plugin.command"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
sequence="M3+F1">
</key>
</extension>
</plugin>
MANIFEST.MF
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: com.example.plugin
Bundle-SymbolicName: com.example.plugin;singleton:=true
Bundle-Version: 4.4.1745.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: org.eclipse.core.runtime;version="3.5.0",
org.osgi.framework;version="1.8.0",
Require-Bundle: org.eclipse.core.expressions,
org.eclipse.ui
Bundle-ActivationPolicy: lazy
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05724 seconds