Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Fragments contributions behaving inconsistently
Fragments contributions behaving inconsistently [message #335082] Fri, 20 March 2009 21:01 Go to next message
KarlFriend
Messages: 10
Registered: July 2009
Location: USA
Junior Member
I have a reporting plugin that has uses fragments to extend it's
behavior for customization for different users needs. When one of the
fragments is included in the application, it works without a hitch.
However, the second fragment doesn't show up (i.e. nothing shows up in
the UI although the fragment is resolved). I have been going over
everything for the past 2 days trying to find a reason for this and have
run out of options (my eyes are getting a little blurry as well). I
don't see any real difference between the two fragments' manifests or
fragment.xml that could explain this. Any help would be appreciated.

plugin.xml for the base plugin:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>

<extension point="org.eclipse.ui.actionSets">

<actionSet
description="%action.set.workbench.report.description=Workbench Report
Action Set"
id="org.kdr.risk.workbench.report.action.set"
label="%action.set.workbench.report.label" visible="true">

<menu id="report" label="%menu.report.label" path="additions">
<groupMarker name="content"></groupMarker>
<separator name="additions"></separator>
</menu>

</actionSet>

</extension>

</plugin>

Manifest for base plugin:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin.name
Bundle-SymbolicName: org.kdr.risk.report; singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: org.kdr.risk.report.Activator
Bundle-Vendor: %plugin.provider
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.kdr.risk.common;bundle-version="1.0.0",
org.kdr.common;bundle-version="1.0.0",
org.kdr.enablement.datepicker;bundle-version="1.0.0",
org.kdr.enablement.internal;bundle-version="1.0.0",
org.kdr.enablement.jakarta.common;bundle-version="1.0.0",
org.kdr.enablement.jboss;bundle-version="1.0.0",
org.kdr.risk.env;bundle-version="1.0.0",
org.kdr.risk.product;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin-report
Eclipse-BuddyPolicy: registered
Eclipse-ExtensibleAPI: true

fragment.xml for the fragment that is showing in the UI:

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<fragment>

<extension point="org.eclipse.ui.commands">

<category description="%category.command.description"
id="org.kdr.risk.workbench.commands" name="%category.command.name" />

<command categoryId="org.kdr.risk.workbench.commands"
description="%command.job.report.option.settle.stormbridge.1.description "
id="org.kdr.risk.command.job.report.option.settle.stormbridge.1 "
name="%command.job.report.option.settle.stormbridge.1.name" />

</extension>

<extension point="org.eclipse.ui.actionSets">

<actionSet
description=" %action.set.workbench.report.stormbridge.description=Workebe nch
Stormbridge Report Action Set"
id="org.kdr.risk.workbench.report.stormbridge.action.set"
label="%action.set.workbenchreport.stormbridge.label" visible="true">

<action
class=" org.kdr.ui.action.option.StartStormbridgeOptionSettlementRep ort1JobActionDelegate "
definitionId="org.kdr.risk.command.job.report.option.settle.stormbridge.1 "
id="org.kdr.job.option.settle.report.stormbridge.1"
label="%action.job.report.option.settle.stormbridge.1.label "
menubarPath="report/content" style="push">
</action>

</actionSet>

</extension>

</fragment>

Manifest for the fragment that is showing in the UI:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin.name
Bundle-SymbolicName: org.kdr.risk.report.stormbridge;singleton:=true
Bundle-Version: 1.0.0
Bundle-Vendor: %plugin.provider
Fragment-Host: org.kdr.risk.report;bundle-version="[1.0.0,2.0.0)"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin-report-stormbridge
Eclipse-BuddyPolicy: registered
Require-Bundle: org.kdr.enablement.jakarta.common;bundle-version="1.0.0",
org.kdr.enablement.jboss;bundle-version="1.0.0",
org.kdr.enablement.csv;bundle-version="1.0.0",
org.kdr.enablement.datepicker;bundle-version="1.0.0",
org.kdr.enablement.internal;bundle-version="1.0.0",
org.kdr.common;bundle-version="1.0.0",
org.kdr.risk.product;bundle-version="1.0.0",
org.kdr.risk.env;bundle-version="1.0.0"
Export-Package: org.kdr.ui.action.option,
org.kdr.ui.dialog.option,
org.kdr.ui.job.option

fragment.xml for the fragment that is not loading in the UI:

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<fragment>

<extension point="org.eclipse.ui.commands">

<category description="%category.command.description"
id="org.kdr.risk.workbench.commands" name="%category.command.name" />

<command categoryId="org.kdr.risk.workbench.commands"
description="%command.job.report.env.vol.peakridge.1.description "
id="org.kdr.risk.command.job.report.env.vol.peakridge.1"
name="%command.job.report.env.vol.peakridge.1.name">
</command>

<command categoryId="org.kdr.risk.workbench.commands"
description="%command.job.report.option.settle.peakridge.1.description "
id="org.kdr.risk.command.job.report.option.settle.peakridge.1 "
name="%command.job.report.option.settle.peakridge.1.name">
</command>

</extension>

<extension point="org.eclipse.ui.actionSets">

<actionSet
description=" %action.set.workbench.report.peakridge.description=Workebenc h
Peak Ridge Report Action Set"
id="org.kdr.risk.workbench.report.peakridge.action.set"
label="%action.set.workbench.report.peakridge.label" visible="true">

<action
class=" org.kdr.ui.action.env.vol.StartPeakridgeVolatilityReport1Job ActionDelegate "
definitionId="org.kdr.risk.command.job.report.env.vol.peakridge.1 "
id="org.kdr.job.env.vol.report.peakridge.1"
label="%action.job.report.env.vol.peakridge.1.label"
menubarPath="report/content" style="push">
</action>

<action
class=" org.kdr.ui.action.option.StartPeakridgeOptionSettlementRepor t1JobActionDelegate "
definitionId="org.kdr.risk.command.job.report.option.settle.peakridge.1 "
id="org.kdr.job.option.settle.report.peakridge.1"
label="%action.job.report.option.settle.peakridge.1.label"
menubarPath="report/content" style="push">
</action>

</actionSet>

</extension>

</fragment>

Manifest for the fragment that is not showing up in the UI:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin.name
Bundle-SymbolicName: org.kdr.risk.report.peakridge;singleton:=true
Bundle-Version: 1.0.0
Bundle-Vendor: %plugin.provider
Fragment-Host: org.kdr.risk.report;bundle-version="[1.0.0,2.0.0)"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin-report-peakridge
Eclipse-BuddyPolicy: registered
Require-Bundle: org.kdr.enablement.jakarta.common;bundle-version="1.0.0",
org.kdr.enablement.jboss;bundle-version="1.0.0",
org.kdr.enablement.csv;bundle-version="1.0.0",
org.kdr.enablement.datepicker;bundle-version="1.0.0",
org.kdr.enablement.internal;bundle-version="1.0.0",
org.kdr.common;bundle-version="1.0.0",
org.kdr.risk.product;bundle-version="1.0.0",
org.kdr.risk.env;bundle-version="1.0.0"
Export-Package: org.kdr.ui.action.env.vol,
org.kdr.ui.action.option,
org.kdr.ui.dialog.env.vol,
org.kdr.ui.dialog.option,
org.kdr.ui.job.env.vol,
org.kdr.ui.job.option

Output from ss at the osgi console prompt:


Framework is launched.

id State Bundle
0 ACTIVE org.eclipse.osgi_3.4.2.R34x_v20080826-1230
1 ACTIVE com.ibm.icu_3.8.1.v20080530
2 RESOLVED org.eclipse.core.commands_3.4.0.I20080509-2000
3 <<LAZY>> org.eclipse.core.contenttype_3.3.0.v20080604-1400
4 ACTIVE org.eclipse.core.databinding_1.1.1.M20080827-0800b
5 ACTIVE org.eclipse.core.expressions_3.4.0.v20080603-2000
6 ACTIVE org.eclipse.core.jobs_3.4.0.v20080512
7 ACTIVE org.eclipse.core.runtime_3.4.0.v20080512
8 RESOLVED
org.eclipse.core.runtime.compatibility.registry_3.2.200.v200 80610
Master=12
9 ACTIVE org.eclipse.equinox.app_1.1.0.v20080421-2006
10 ACTIVE org.eclipse.equinox.common_3.4.0.v20080421-2006
11 ACTIVE org.eclipse.equinox.preferences_3.2.201.R34x_v20080709
12 ACTIVE org.eclipse.equinox.registry_3.4.0.v20080516-0950
Fragments=8
13 <<LAZY>> org.eclipse.help_3.3.101.v20080702_34x
14 ACTIVE org.eclipse.jface_3.4.1.M20080827-2000
15 RESOLVED org.eclipse.jface.databinding_1.2.1.M20080827-0800a
16 RESOLVED org.eclipse.swt_3.4.1.v3449c
Fragments=17, 21
17 RESOLVED org.eclipse.swt.win32.win32.x86_3.4.1.v3449c
Master=16
18 ACTIVE org.eclipse.ui_3.4.1.M20080910-0800
19 <<LAZY>> org.eclipse.ui.forms_3.3.101.v20080708_34x
20 ACTIVE org.eclipse.ui.workbench_3.4.1.M20080827-0800a
21 RESOLVED org.jboss.tools.xulrunner.initializer_1.0.0
Master=16
22 ACTIVE org.kdr.common_1.0.0
23 <<LAZY>> org.kdr.enablement.apache.httpcomponents_1.0.0
24 ACTIVE org.kdr.enablement.apache.logging_1.0.0
25 ACTIVE org.kdr.enablement.apache.xml_1.0.0
26 <<LAZY>> org.kdr.enablement.csv_1.0.0
27 <<LAZY>> org.kdr.enablement.datepicker_1.0.0
28 <<LAZY>> org.kdr.enablement.eclipse.nebula_1.0.0
29 ACTIVE org.kdr.enablement.internal_1.0.0
30 <<LAZY>> org.kdr.enablement.j2ssh_1.0.0
31 ACTIVE org.kdr.enablement.jakarta.common_1.0.0
32 <<LAZY>> org.kdr.enablement.jakarta.regex_1.0.0
33 ACTIVE org.kdr.enablement.jboss_1.0.0
34 <<LAZY>> org.kdr.enablement.jsci_1.0.0
35 <<LAZY>> org.kdr.enablement.reuters_1.0.0
36 <<LAZY>> org.kdr.risk.common_1.0.0
37 <<LAZY>> org.kdr.risk.date_1.0.0
38 <<LAZY>> org.kdr.risk.entity_1.0.0
39 ACTIVE org.kdr.risk.env_1.0.0
40 <<LAZY>> org.kdr.risk.instrument_1.0.0
41 <<LAZY>> org.kdr.risk.location_1.0.0
42 <<LAZY>> org.kdr.risk.portfolio_1.0.0
43 <<LAZY>> org.kdr.risk.product_1.0.0
44 <<LAZY>> org.kdr.risk.report_1.0.0
Fragments=45, 46
45 RESOLVED org.kdr.risk.report.peakridge_1.0.0
Master=44
46 RESOLVED org.kdr.risk.report.stormbridge_1.0.0
Master=44
47 ACTIVE org.kdr.risk.security_1.0.0
48 <<LAZY>> org.kdr.risk.template_1.0.0
49 ACTIVE org.kdr.risk.trade_1.0.0
50 ACTIVE org.kdr.risk.trade.common_1.0.0
51 ACTIVE org.kdr.risk.trade.span_1.0.0
52 <<LAZY>> org.kdr.risk.unit_1.0.0
53 ACTIVE org.kdr.risk.valuation_1.0.0
54 ACTIVE org.kdr.risk.workbench_1.0.0
55 <<LAZY>> org.kdr.risk.xlate_1.0.0
Fragments=56, 57, 58, 59, 60, 61, 62, 63
56 RESOLVED org.kdr.risk.xlate.admiral_1.0.0
Master=55
57 RESOLVED org.kdr.risk.xlate.bofa_1.0.0
Master=55
58 RESOLVED org.kdr.risk.xlate.gs_1.0.0
Master=55
59 RESOLVED org.kdr.risk.xlate.mf_1.0.0
Master=55
60 RESOLVED org.kdr.risk.xlate.ne_1.0.0
Master=55
61 RESOLVED org.kdr.risk.xlate.nymex_1.0.0
Master=55
62 RESOLVED org.kdr.risk.xlate.reuters_1.0.0
Master=55
63 RESOLVED org.kdr.risk.xlate.span_1.0.0
Master=55

Thanks,
Karl
Re: Fragments contributions behaving inconsistently [message #335298 is a reply to message #335082] Tue, 31 March 2009 14:55 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

menubarPath="report/content" ...

actionSets cannot see anything defined in another actionSet ... it just
doesn't work.

You can either replicate your menu structure in each actionSet (this is
allowed) or you can use commands/handlers (instead of IActionDelegates)
and use org.eclipse.ui.menus (which can see other org.eclipse.ui.menus
menu contributions)

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Previous Topic:Register a "New Wizard" programmatically?
Next Topic:Local Update Site Mirror
Goto Forum:
  


Current Time: Sat Apr 27 00:37:55 GMT 2024

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

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

Back to the top