From 4b33c0a9ef51a0c85f5149f456e2ffdb0523e35a Mon Sep 17 00:00:00 2001 From: Hoda Amer Date: Wed, 7 Jul 2004 19:07:08 +0000 Subject: [PATCH] Propagating bug fixes to branch. --- core/org.eclipse.cdt.ui/ChangeLog | 3 +++ .../ui/wizards/NewWizardMessages.properties | 9 ++++++++- .../eclipse/cdt/ui/wizards/NewClassWizardPage.java | 13 ++++++------- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/core/org.eclipse.cdt.ui/ChangeLog b/core/org.eclipse.cdt.ui/ChangeLog index 945a6764db4..8996122e8dc 100644 --- a/core/org.eclipse.cdt.ui/ChangeLog +++ b/core/org.eclipse.cdt.ui/ChangeLog @@ -1,3 +1,6 @@ +2004-07-07 Hoda Amer + Fix for PR 69411: Bad label: WizardNewFileCreationPage.progress + 2004-07-06 Chris Weibe Fix for PR 69199 diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/NewWizardMessages.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/NewWizardMessages.properties index b0798d31579..721b4572fcc 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/NewWizardMessages.properties +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/NewWizardMessages.properties @@ -430,4 +430,11 @@ OutputLocationDialog.ChooseOutputFolder.description=&Choose the folder for the b ClasspathContainerWizard.pagecreationerror.title= Library Wizard ClasspathContainerWizard.pagecreationerror.message=Wizard page creation failed. Check log for details. - +# --- New File --- +WizardNewFileCreationPage.progress = Creating +WizardNewFileCreationPage.errorTitle = Creation Problems +WizardNewFileCreationPage.fileLabel = File &name: +WizardNewFileCreationPage.file = file +WizardNewFileCreationPage.internalErrorTitle = Creation problems +WizardNewFileCreationPage.internalErrorMessage = Internal error: {0} +WizardNewFileCreationPage.fileExistsMessage = A file ''{0}'' already exists in the file system. diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewClassWizardPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewClassWizardPage.java index 22170855cd7..5b6704314d1 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewClassWizardPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewClassWizardPage.java @@ -84,7 +84,6 @@ import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Listener; import org.eclipse.ui.actions.WorkspaceModifyOperation; import org.eclipse.ui.dialogs.ContainerGenerator; -import org.eclipse.ui.internal.WorkbenchMessages; import org.eclipse.ui.internal.WorkbenchPlugin; /** @@ -684,7 +683,7 @@ public class NewClassWizardPage extends WizardPage implements Listener { //createdClass= (IStructure)headerWC.getElement(getNewClassName()); createdClass= headerWC.getElement(getNewClassName()); } catch (CModelException cme) { - MessageDialog.openError(getContainer().getShell(), WorkbenchMessages.getString("WizardNewFileCreationPage.internalErrorTitle"), cme.getMessage()); //$NON-NLS-2$ //$NON-NLS-1$ + MessageDialog.openError(getContainer().getShell(), NewWizardMessages.getString("WizardNewFileCreationPage.internalErrorTitle"), cme.getMessage()); //$NON-NLS-2$ //$NON-NLS-1$ } finally { if (headerWC != null) { headerWC.destroy(); @@ -700,7 +699,7 @@ public class NewClassWizardPage extends WizardPage implements Listener { bodyWC.reconcile(); bodyWC.commit(true, monitor); } catch (CModelException cme) { - MessageDialog.openError(getContainer().getShell(), WorkbenchMessages.getString("WizardNewFileCreationPage.internalErrorTitle"), cme.getMessage()); //$NON-NLS-2$ //$NON-NLS-1$ + MessageDialog.openError(getContainer().getShell(), NewWizardMessages.getString("WizardNewFileCreationPage.internalErrorTitle"), cme.getMessage()); //$NON-NLS-2$ //$NON-NLS-1$ } finally { if (bodyWC != null) { bodyWC.destroy(); @@ -743,7 +742,7 @@ public class NewClassWizardPage extends WizardPage implements Listener { InterruptedException { try { - monitor.beginTask(WorkbenchMessages.getString("WizardNewFileCreationPage.progress"), 2000); //$NON-NLS-1$ + monitor.beginTask(NewWizardMessages.getString("WizardNewFileCreationPage.progress"), 2000); //$NON-NLS-1$ if(!(containerExists(containerPath))){ ContainerGenerator generator = new ContainerGenerator(containerPath); generator.generateContainer(new SubProgressMonitor(monitor, 1000)); @@ -763,14 +762,14 @@ public class NewClassWizardPage extends WizardPage implements Listener { if (e.getTargetException() instanceof CoreException) { ErrorDialog.openError( getContainer().getShell(), // Was Utilities.getFocusShell() - WorkbenchMessages.getString("WizardNewFileCreationPage.errorTitle"), //$NON-NLS-1$ + NewWizardMessages.getString("WizardNewFileCreationPage.errorTitle"), //$NON-NLS-1$ null, // no special message ((CoreException) e.getTargetException()).getStatus()); } else { // CoreExceptions are handled above, but unexpected runtime exceptions and errors may still occur. - WorkbenchPlugin.log(MessageFormat.format("Exception in {0}.getNewFile(): {1}", new Object[] {getClass().getName(), e.getTargetException()}));//$NON-NLS-1$ - MessageDialog.openError(getContainer().getShell(), WorkbenchMessages.getString("WizardNewFileCreationPage.internalErrorTitle"), WorkbenchMessages.format("WizardNewFileCreationPage.internalErrorMessage", new Object[] {e.getTargetException().getMessage()})); //$NON-NLS-2$ //$NON-NLS-1$ + CUIPlugin.getDefault().logErrorMessage(MessageFormat.format("Exception in {0}.getNewFile(): {1}", new Object[] {getClass().getName(), e.getTargetException()}));//$NON-NLS-1$ + MessageDialog.openError(getContainer().getShell(), NewWizardMessages.getString("WizardNewFileCreationPage.internalErrorTitle"), MessageFormat.format("WizardNewFileCreationPage.internalErrorMessage", new Object[] {e.getTargetException().getMessage()})); //$NON-NLS-2$ //$NON-NLS-1$ } return null; }