woproject/projects/wolips/plugins/org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards/actions OpenWOSubprojectCreationWizard.java,1.3,1.4 OpenWOComponentWizard.java,1.3,1.4 OpenWOFrameworkWizard.java,1.3,1.4 OpenEOModelWizard.java,1.3,1.4 OpenJarProjectWizard.java,1.3,1.4 OpenD2WApplicationWizard.java,1.3,1.4 AbstractOpenWizardAction.java,1.1,1.2 UpgradeBuildXML.java,1.3,1.4 UpgradeAllBuildXML.java,1.1,1.2 OpenWOApplicationWizard.java,1.3,1.4
[email protected] Sat, 11 Feb 2006 05:10:04 -0800 (PST)
| Newsgroups | gmane.comp.web.webobjects.woproject.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards/actions
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20603/java/org/objectstyle/wolips/wizards/actions
Modified Files:
OpenWOSubprojectCreationWizard.java OpenWOComponentWizard.java
OpenWOFrameworkWizard.java OpenEOModelWizard.java
OpenJarProjectWizard.java OpenD2WApplicationWizard.java
AbstractOpenWizardAction.java UpgradeBuildXML.java
UpgradeAllBuildXML.java OpenWOApplicationWizard.java
Log Message:
Make it compatible with 3.2M5 tested with M4 and M5.
Index: OpenWOSubprojectCreationWizard.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards/actions/OpenWOSubprojectCreationWizard.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- OpenWOSubprojectCreationWizard.java 26 Dec 2005 13:21:34 -0000 1.3
+++ OpenWOSubprojectCreationWizard.java 11 Feb 2006 13:09:06 -0000 1.4
@@ -2,7 +2,7 @@
*
* The ObjectStyle Group Software License, Version 1.0
*
- * Copyright (c) 2002 - 2005 The ObjectStyle Group
+ * Copyright (c) 2002 - 2006 The ObjectStyle Group
* and individual authors of the software. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,7 @@
package org.objectstyle.wolips.wizards.actions;
-import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.INewWizard;
import org.objectstyle.wolips.wizards.WOSubprojectCreationWizard;
/**
@@ -64,17 +64,7 @@
*/
public class OpenWOSubprojectCreationWizard extends AbstractOpenWizardAction {
- /**
- * @see org.eclipse.jdt.internal.ui.wizards.AbstractOpenWizardAction#checkWorkspaceNotEmpty()
- */
- protected boolean checkWorkspaceNotEmpty() {
- return true;
- }
-
- /**
- * @see org.eclipse.jdt.internal.ui.wizards.AbstractOpenWizardAction#createWizard()
- */
- protected Wizard createWizard() {
+ protected INewWizard createWizard() {
return new WOSubprojectCreationWizard();
}
}
\ No newline at end of file
Index: OpenWOComponentWizard.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards/actions/OpenWOComponentWizard.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- OpenWOComponentWizard.java 26 Dec 2005 13:21:34 -0000 1.3
+++ OpenWOComponentWizard.java 11 Feb 2006 13:09:06 -0000 1.4
@@ -2,7 +2,7 @@
*
* The ObjectStyle Group Software License, Version 1.0
*
- * Copyright (c) 2002 - 2005 The ObjectStyle Group
+ * Copyright (c) 2002 - 2006 The ObjectStyle Group
* and individual authors of the software. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,7 @@
package org.objectstyle.wolips.wizards.actions;
-import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.INewWizard;
import org.objectstyle.wolips.wizards.WOComponentCreationWizard;
/**
@@ -64,10 +64,7 @@
*/
public class OpenWOComponentWizard extends AbstractOpenWizardAction {
- /**
- * @see org.eclipse.jdt.internal.ui.wizards.AbstractOpenWizardAction#createWizard()
- */
- protected Wizard createWizard() {
+ protected INewWizard createWizard() {
return new WOComponentCreationWizard();
}
}
\ No newline at end of file
Index: OpenWOFrameworkWizard.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards/actions/OpenWOFrameworkWizard.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- OpenWOFrameworkWizard.java 26 Dec 2005 13:21:34 -0000 1.3
+++ OpenWOFrameworkWizard.java 11 Feb 2006 13:09:06 -0000 1.4
@@ -2,7 +2,7 @@
*
* The ObjectStyle Group Software License, Version 1.0
*
- * Copyright (c) 2002 - 2005 The ObjectStyle Group
+ * Copyright (c) 2002 - 2006 The ObjectStyle Group
* and individual authors of the software. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,7 @@
package org.objectstyle.wolips.wizards.actions;
-import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.INewWizard;
import org.objectstyle.wolips.wizards.WOFrameworkWizard;
/**
@@ -64,17 +64,7 @@
*/
public class OpenWOFrameworkWizard extends AbstractOpenWizardAction {
- /**
- * @see org.eclipse.jdt.internal.ui.wizards.AbstractOpenWizardAction#checkWorkspaceNotEmpty()
- */
- protected boolean checkWorkspaceNotEmpty() {
- return false;
- }
-
- /**
- * @see org.eclipse.jdt.internal.ui.wizards.AbstractOpenWizardAction#createWizard()
- */
- protected Wizard createWizard() {
+ protected INewWizard createWizard() {
return new WOFrameworkWizard();
}
}
\ No newline at end of file
Index: OpenEOModelWizard.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards/actions/OpenEOModelWizard.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- OpenEOModelWizard.java 26 Dec 2005 13:21:34 -0000 1.3
+++ OpenEOModelWizard.java 11 Feb 2006 13:09:06 -0000 1.4
@@ -2,7 +2,7 @@
*
* The ObjectStyle Group Software License, Version 1.0
*
- * Copyright (c) 2002 - 2005 The ObjectStyle Group
+ * Copyright (c) 2002 - 2006 The ObjectStyle Group
* and individual authors of the software. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,7 @@
package org.objectstyle.wolips.wizards.actions;
-import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.INewWizard;
import org.objectstyle.wolips.wizards.EOModelCreationWizard;
/**
@@ -64,10 +64,7 @@
*/
public class OpenEOModelWizard extends AbstractOpenWizardAction {
- /**
- * @see org.eclipse.jdt.internal.ui.wizards.AbstractOpenWizardAction#createWizard()
- */
- protected Wizard createWizard() {
+ protected INewWizard createWizard() {
return new EOModelCreationWizard();
}
}
\ No newline at end of file
Index: OpenJarProjectWizard.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards/actions/OpenJarProjectWizard.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- OpenJarProjectWizard.java 26 Dec 2005 13:21:34 -0000 1.3
+++ OpenJarProjectWizard.java 11 Feb 2006 13:09:06 -0000 1.4
@@ -2,7 +2,7 @@
*
* The ObjectStyle Group Software License, Version 1.0
*
- * Copyright (c) 2002 - 2005 The ObjectStyle Group
+ * Copyright (c) 2002 - 2006 The ObjectStyle Group
* and individual authors of the software. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,7 @@
package org.objectstyle.wolips.wizards.actions;
-import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.INewWizard;
import org.objectstyle.wolips.wizards.JarProjectWizard;
/**
@@ -64,16 +64,7 @@
*/
public class OpenJarProjectWizard extends AbstractOpenWizardAction {
- /**
- * @see org.eclipse.jdt.internal.ui.wizards.AbstractOpenWizardAction#checkWorkspaceNotEmpty()
- */
- protected boolean checkWorkspaceNotEmpty() {
- return false;
- }
- /**
- * @see org.eclipse.jdt.internal.ui.wizards.AbstractOpenWizardAction#createWizard()
- */
- protected Wizard createWizard() {
+ protected INewWizard createWizard() {
return new JarProjectWizard();
}
}
\ No newline at end of file
Index: OpenD2WApplicationWizard.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards/actions/OpenD2WApplicationWizard.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- OpenD2WApplicationWizard.java 26 Dec 2005 13:21:34 -0000 1.3
+++ OpenD2WApplicationWizard.java 11 Feb 2006 13:09:06 -0000 1.4
@@ -2,7 +2,7 @@
*
* The ObjectStyle Group Software License, Version 1.0
*
- * Copyright (c) 2002 - 2005 The ObjectStyle Group
+ * Copyright (c) 2002 - 2006 The ObjectStyle Group
* and individual authors of the software. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,7 @@
package org.objectstyle.wolips.wizards.actions;
-import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.INewWizard;
import org.objectstyle.wolips.wizards.D2WApplicationWizard;
/**
@@ -64,16 +64,7 @@
*/
public class OpenD2WApplicationWizard extends AbstractOpenWizardAction {
- /**
- * @see org.eclipse.jdt.internal.ui.wizards.AbstractOpenWizardAction#checkWorkspaceNotEmpty()
- */
- protected boolean checkWorkspaceNotEmpty() {
- return false;
- }
- /**
- * @see org.eclipse.jdt.internal.ui.wizards.AbstractOpenWizardAction#createWizard()
- */
- protected Wizard createWizard() {
+ protected INewWizard createWizard() {
return new D2WApplicationWizard();
}
}
\ No newline at end of file
Index: AbstractOpenWizardAction.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards/actions/AbstractOpenWizardAction.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- AbstractOpenWizardAction.java 26 Dec 2005 13:21:34 -0000 1.1
+++ AbstractOpenWizardAction.java 11 Feb 2006 13:09:06 -0000 1.2
@@ -2,7 +2,7 @@
*
* The ObjectStyle Group Software License, Version 1.0
*
- * Copyright (c) 2005 The ObjectStyle Group
+ * Copyright (c) 2005 - 2006 The ObjectStyle Group
* and individual authors of the software. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -54,31 +54,75 @@
*
*/package org.objectstyle.wolips.wizards.actions;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.ui.PlatformUI;
+import org.objectstyle.wolips.wizards.WizardsPlugin;
+import org.objectstyle.wolips.workbenchutilities.WorkbenchUtilitiesPlugin;
/**
* @author uli
*/
-public abstract class AbstractOpenWizardAction extends
- org.eclipse.jdt.ui.actions.AbstractOpenWizardAction implements
+public abstract class AbstractOpenWizardAction extends Action implements
IWorkbenchWindowActionDelegate {
+ private IStructuredSelection currentSelection;
+
+ /**
+ * Creates the action.
+ */
+ protected AbstractOpenWizardAction() {
+ super();
+ }
+
+ public void run() {
+ Shell shell = WorkbenchUtilitiesPlugin.getActiveWorkbenchShell();
+ try {
+ INewWizard wizard = createWizard();
+ wizard.init(PlatformUI.getWorkbench(), currentSelection);
+ WizardDialog dialog = new WizardDialog(shell, wizard);
+ dialog.create();
+ dialog.open();
+ } catch (CoreException e) {
+ WizardsPlugin.getDefault().log(e);
+ }
+ }
+
+ /**
+ * Creates and configures the wizard. This method should only be called
+ * once.
+ *
+ * @return returns the created wizard.
+ * @throws CoreException
+ * exception is thrown when the creation was not successful.
+ */
+ abstract protected INewWizard createWizard() throws CoreException;
+
public void dispose() {
- // nothing to do
+ // nothing to do here
}
public void init(IWorkbenchWindow window) {
- // nothing to do
+ // nothing to do here
}
public void run(IAction action) {
- super.run();
+ run();
}
public void selectionChanged(IAction action, ISelection selection) {
- // nothing to do
+ if (selection != null && selection instanceof IStructuredSelection) {
+ this.currentSelection = (IStructuredSelection) selection;
+ } else {
+ this.currentSelection = null;
+ }
}
-}
\ No newline at end of file
+}
Index: UpgradeBuildXML.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards/actions/UpgradeBuildXML.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- UpgradeBuildXML.java 5 Jan 2005 10:27:54 -0000 1.3
+++ UpgradeBuildXML.java 11 Feb 2006 13:09:06 -0000 1.4
@@ -2,7 +2,7 @@
*
* The ObjectStyle Group Software License, Version 1.0
*
- * Copyright (c) 2004 The ObjectStyle Group
+ * Copyright (c) 2004 - 2006 The ObjectStyle Group
* and individual authors of the software. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -80,7 +80,7 @@
return;
}
} catch (CoreException e) {
- WizardsPlugin.getDefault().getPluginLogger().log(e);
+ WizardsPlugin.getDefault().log(e);
}
UpgradeBuildXML.upgradeBuildXml(project);
}
@@ -111,7 +111,7 @@
project.getIProject().refreshLocal(IResource.DEPTH_INFINITE,
new NullProgressMonitor());
} catch (Exception e) {
- WizardsPlugin.getDefault().getPluginLogger().log(e);
+ WizardsPlugin.getDefault().log(e);
}
}
Index: UpgradeAllBuildXML.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards/actions/UpgradeAllBuildXML.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- UpgradeAllBuildXML.java 5 Jan 2005 10:27:54 -0000 1.1
+++ UpgradeAllBuildXML.java 11 Feb 2006 13:09:06 -0000 1.2
@@ -2,7 +2,7 @@
*
* The ObjectStyle Group Software License, Version 1.0
*
- * Copyright (c) 2004 The ObjectStyle Group
+ * Copyright (c) 2004 - 2006 The ObjectStyle Group
* and individual authors of the software. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -79,7 +79,7 @@
return;
}
} catch (CoreException e) {
- WizardsPlugin.getDefault().getPluginLogger().log(e);
+ WizardsPlugin.getDefault().log(e);
}
UpgradeBuildXML.upgradeBuildXml(project);
}
Index: OpenWOApplicationWizard.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.wizards/java/org/objectstyle/wolips/wizards/actions/OpenWOApplicationWizard.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- OpenWOApplicationWizard.java 26 Dec 2005 13:21:34 -0000 1.3
+++ OpenWOApplicationWizard.java 11 Feb 2006 13:09:06 -0000 1.4
@@ -2,7 +2,7 @@
*
* The ObjectStyle Group Software License, Version 1.0
*
- * Copyright (c) 2002 - 2005 The ObjectStyle Group
+ * Copyright (c) 2002 - 2006 The ObjectStyle Group
* and individual authors of the software. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -56,7 +56,7 @@
package org.objectstyle.wolips.wizards.actions;
-import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.INewWizard;
import org.objectstyle.wolips.wizards.WOApplicationWizard;
/**
@@ -64,16 +64,7 @@
*/
public class OpenWOApplicationWizard extends AbstractOpenWizardAction {
- /**
- * @see org.eclipse.jdt.internal.ui.wizards.AbstractOpenWizardAction#checkWorkspaceNotEmpty()
- */
- protected boolean checkWorkspaceNotEmpty() {
- return false;
- }
- /**
- * @see org.eclipse.jdt.internal.ui.wizards.AbstractOpenWizardAction#createWizard()
- */
- protected Wizard createWizard() {
+ protected INewWizard createWizard() {
return new WOApplicationWizard();
}
}
\ No newline at end of file
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642