/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
* dialog.open();
* </pre>
* During the call to <code>open</code>, the wizard dialog is presented to the
- * user. When the user hits Finish, the user-selected workspace resources
+ * user. When the user hits Finish, the user-selected workspace resources
* are exported to the user-specified location in the local file system,
* the dialog closes, and the call to <code>open</code> returns.
* </p>
* Returns the image descriptor with the given relative path.
*/
private ImageDescriptor getImageDescriptor(String relativePath) {
- String iconPath = "icons/full/";//$NON-NLS-1$
+ String iconPath = "icons/full/";//$NON-NLS-1$
try {
AbstractUIPlugin plugin = (AbstractUIPlugin) Platform.getPlugin(PlatformUI.PLUGIN_ID);
- URL installURL = plugin.getDescriptor().getInstallURL();
+ URL installURL = plugin.getBundle().getEntry("/");
URL url = new URL(installURL, iconPath + relativePath);
return ImageDescriptor.createFromURL(url);
}
*/
public void init(IWorkbench workbench, IStructuredSelection currentSelection) {
this.workbench = workbench;
-
-
+
+
//Make it the current selection by default but look it up otherwise
-
+
selection = currentSelection;
-
+
if(currentSelection.isEmpty() && workbench.getActiveWorkbenchWindow() != null){
IWorkbenchPage page = workbench.getActiveWorkbenchWindow().getActivePage();
if(page != null){
public boolean performFinish() {
return mainPage.finish();
}
-
+
}