From: bananeweizen Date: Sun, 15 Jan 2006 19:15:41 +0000 (+0000) Subject: unified title and description handling in wizards X-Git-Url: http://secure.phpeclipse.com unified title and description handling in wizards --- diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/HTMLFileWizard.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/HTMLFileWizard.java index f67dbfb..0f9c718 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/HTMLFileWizard.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/HTMLFileWizard.java @@ -56,12 +56,10 @@ public class HTMLFileWizard extends Wizard implements INewWizard { private ISelection selection; - // the name of the file to create - private String fFileName; - public HTMLFileWizard() { super(); setNeedsProgressMonitor(true); + setWindowTitle(PHPWizardMessages.getString("WizardNewProjectCreationPage.html.windowTitle")); } /** @@ -176,10 +174,4 @@ public class HTMLFileWizard extends Wizard implements INewWizard { this.selection = selection; } - /** - * Sets the name of the file to create (used to set the class name in the new file) - */ - public void setFileName(String name) { - fFileName = name; - } } \ No newline at end of file diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/HTMLFileWizardPage.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/HTMLFileWizardPage.java index 8eca3c0..dc70027 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/HTMLFileWizardPage.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/HTMLFileWizardPage.java @@ -44,14 +44,14 @@ public class HTMLFileWizardPage extends WizardPage { private static final String INITIAL_FILENAME = "file.html"; private Text containerText; - + private Text fileText; private ISelection selection; /** * Constructor for SampleNewWizardPage. - * + * * @param pageName */ public HTMLFileWizardPage(ISelection selection) { @@ -200,9 +200,6 @@ private Text containerText; .getString("WizardPage.fileAlreadyExists")); return true; } - - ((HTMLFileWizard) this.getWizard()).setFileName(fileText.getText() - .trim()); } return false; } diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/PHPFileWizard.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/PHPFileWizard.java index e04bf7e..7cae6d8 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/PHPFileWizard.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/PHPFileWizard.java @@ -56,12 +56,10 @@ public class PHPFileWizard extends Wizard implements INewWizard { private ISelection selection; - // the name of the file to create - private String fFileName; - public PHPFileWizard() { super(); setNeedsProgressMonitor(true); + setWindowTitle(PHPWizardMessages.getString("WizardNewProjectCreationPage.windowTitle")); } /** @@ -224,10 +222,4 @@ public class PHPFileWizard extends Wizard implements INewWizard { this.selection = selection; } - /** - * Sets the name of the file to create (used to set the class name in the new file) - */ - public void setFileName(String name) { - fFileName = name; - } } \ No newline at end of file diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/PHPFileWizardPage.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/PHPFileWizardPage.java index 8fffaec..bbcc353 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/PHPFileWizardPage.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/PHPFileWizardPage.java @@ -12,13 +12,9 @@ package net.sourceforge.phpeclipse.wizards; www.phpeclipse.de **********************************************************************/ -import net.sourceforge.phpdt.core.ICompilationUnit; -import net.sourceforge.phpdt.internal.corext.codemanipulation.StubUtility; - import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; import org.eclipse.jface.dialogs.IDialogPage; @@ -202,8 +198,6 @@ public class PHPFileWizardPage extends WizardPage { this.setErrorMessage(PHPWizardMessages.getString("WizardPage.fileAlreadyExists")); return true; } - - ((PHPFileWizard) this.getWizard()).setFileName(fileText.getText().trim()); } return false; } diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/PHPWizardMessages.properties b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/PHPWizardMessages.properties index 0f24a03..355c144 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/PHPWizardMessages.properties +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/wizards/PHPWizardMessages.properties @@ -4,9 +4,9 @@ ## ################################### -WizardPage.title=PHP New File +WizardPage.title=PHP file WizardPage.description=This wizard creates a new PHP file. -WizardPage.html.title=HTML New File +WizardPage.html.title=HTML file WizardPage.html.description=This wizard creates a new HTML file. WizardPage.containerLabel=&Container: WizardPage.fileLabel=&File name: @@ -20,13 +20,15 @@ WizardPage.selectNewFileContainer=Select new file container. Wizard.error=An error occured -Wizard.Monitor.creating=Creating +Wizard.Monitor.creating=Creating Wizard.Monitor.openingFile=Opening file for editing... Wizard.Monitor.containerDoesNotExistException=The given container does not exist. -NewProjectCreationWizard.windowTitle=New +NewProjectCreationWizard.windowTitle=New PHP project NewProjectCreationWizard.projectCreationMessage=Creating new PHP Project +WizardNewProjectCreationPage.windowTitle=New PHP file +WizardNewProjectCreationPage.html.windowTitle=New HTML file WizardNewProjectCreationPage.pageName=Create PHP Project WizardNewProjectCreationPage.pageTitle=PHP Project WizardNewProjectCreationPage.pageDescription=Create a new PHP Project \ No newline at end of file