Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 217652

Summary: [logview] detect optional bundles availability in new way
Product: [Eclipse Project] PDE Reporter: Jacek Pospychala <jacek.pospychala>
Component: UIAssignee: PDE-UI-Inbox <pde-ui-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: minor    
Priority: P3    
Version: 3.4   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 205561    
Bug Blocks:    

Description Jacek Pospychala CLA 2008-02-04 05:13:13 EST
in bug 205561 patch I have added:

/**
 * Returns whether bundle with given name is available or not.
 */
public boolean isRequiredBundleAvailable(String symbolicName) {
 return ((PackageAdmin) packageAdminTracker.getService()).getRequiredBundles(symbolicName) != null;
}

to fix things as:
// TODO this isn't the best way to check... we should be smarter and use package admin
// check to see if org.eclipse.ui.ide is available
Class.forName("org.eclipse.ui.ide.IDE"); //$NON-NLS-1$
// check to see if org.eclipse.core.filesystem is available
Class.forName("org.eclipse.core.filesystem.IFileStore"); //$NON-NLS-1$
action = new OpenIDELogFileAction(this);


It'd be good to go new way after patch for bug 205561 is applied.
Comment 1 Chris Aniszczyk CLA 2008-04-15 00:23:50 EDT
no longer valid