Author: dgeraskov
Date: 2008-12-24 04:30:10 -0500 (Wed, 24 Dec 2008)
New Revision: 12818
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewReverseEngineeringFileWizard.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3462
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewReverseEngineeringFileWizard.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewReverseEngineeringFileWizard.java 2008-12-24
08:40:58 UTC (rev 12817)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/NewReverseEngineeringFileWizard.java 2008-12-24
09:30:10 UTC (rev 12818)
@@ -36,6 +36,7 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
@@ -74,9 +75,8 @@
/** extended to update status messages on first show **/
static class ExtendedWizardNewFileCreationPage extends WizardNewFileCreationPage {
- public ExtendedWizardNewFileCreationPage(String pageName, IStructuredSelection
selection) {
+ public ExtendedWizardNewFileCreationPage(String pageName, IStructuredSelection
selection) {
super(pageName, selection);
- setContainerFullPath(new Path("/")); // TODO: make it based on the
selection which should be available when doing the launch! //$NON-NLS-1$
}
boolean firstTime = true;
@@ -93,6 +93,7 @@
*/
public void addPages() {
+ if (selection == null) selection = new StructuredSelection();
cPage = new ExtendedWizardNewFileCreationPage( "Ccfgxml", selection );
//$NON-NLS-1$
cPage.setTitle(
HibernateConsoleMessages.NewReverseEngineeringFileWizard_create_hibernate_reverse_engineering_file
);
cPage.setDescription(
HibernateConsoleMessages.NewReverseEngineeringFileWizard_create_new_hibernate_reveng_xml
);
@@ -226,7 +227,7 @@
*/
public void init(IWorkbench workbench, IStructuredSelection selection) {
this.selection = selection;
-
+ if (selection == null) selection = new StructuredSelection();
}
public IPath getCreatedFilePath() {