Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 67050 - [RCP] JFace has dependency on OSGI
Summary: [RCP] JFace has dependency on OSGI
Status: RESOLVED DUPLICATE of bug 49497
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Nick Edgar CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-14 13:49 EDT by Douglas Pollock CLA
Modified: 2005-04-04 16:18 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Douglas Pollock CLA 2004-06-14 13:49:56 EDT
I saw this comment on the newsgroup.  To use JFace, one requires OSGI in the 
classpath, because we reference it from the Policy class (which is used by such 
classes as ActionContributionItem).  I'm not sure if this is a regression. 
 
Here's the newsgroup posting.... 
 
 
I'm working upon a SWT/JFace Eclipse 3.0RC1 standalone GUI and I've just 
added a menu bar with a File/Quit menu item. 
 
When I select the Quit option I receive this message: 
 
java.lang.NoClassDefFoundError: org/osgi/framework/InvalidSyntaxException 
        at org.eclipse.core.runtime.Platform.isRunning(Platform.java:1232) 
        at org.eclipse.jface.util.Policy.getDebugOption(Policy.java:100) 
        at org.eclipse.jface.util.Policy.<clinit>(Policy.java:51) 
        at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:909) 
        at org.eclipse.jface.action.ActionContributionItem.access$2
(ActionContributionItem.java:866) 
        at org.eclipse.jface.action.ActionContributionItem$7.handleEvent(ActionContributionItem.java:785) 
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) 
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:944) 
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2512) 
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2223) 
        at org.eclipse.jface.window.Window.runEventLoop(Window.java:668) 
        at org.eclipse.jface.window.Window.open(Window.java:648) 
        at gui.GuiApplication.main(GuiApplication.java:50) 
 
Am I supposed to locate and download an OSGi implementation from IBM 
(assuming it is appropriately licensed) or is this class dependency 
spurious?
Comment 1 Tod Creasey CLA 2004-06-15 08:20:26 EDT
I think this is because it requires runtime which requires OSGI. Nick?
Comment 2 Douglas Pollock CLA 2004-06-15 09:33:57 EDT
In this particular case, the Policy class imports an OSGI class. 
Comment 3 Tod Creasey CLA 2004-06-15 09:41:40 EDT
I implemented Policy so I will take this one.
Comment 4 Tod Creasey CLA 2004-06-15 09:52:59 EDT
We need this in order to have access to the Log (we need to implement a dummy 
log). As this is a runtime requirement anyways we should keep it.
Comment 5 Nick Edgar CLA 2004-06-15 10:53:05 EDT
Should make it easier to do standalone JFace apps post 3.0.
Comment 6 Nick Edgar CLA 2004-06-15 10:55:23 EDT
Should add a "standalone" flag to Policy, to avoid having to call Platform,
since that brings in a fair number of other types, including some in OSGi.

Comment 7 Nick Edgar CLA 2005-04-04 16:18:37 EDT

*** This bug has been marked as a duplicate of 49497 ***