Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-patch] fix for 49849

This patch changes the "class already exists" warning to an error and disables the finish button on the class wizard page.

-Chris
Index: src/org/eclipse/cdt/ui/wizards/NewClassWizardPage.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewClassWizardPage.java,v
retrieving revision 1.24
diff -u -r1.24 NewClassWizardPage.java
--- src/org/eclipse/cdt/ui/wizards/NewClassWizardPage.java	24 Jun 2004 16:44:45 -0000	1.24
+++ src/org/eclipse/cdt/ui/wizards/NewClassWizardPage.java	25 Jun 2004 15:43:13 -0000
@@ -1099,11 +1099,8 @@
 		ITypeInfo[] elementsFound = findClassElementsInProject();
 		QualifiedTypeName typeName = new QualifiedTypeName(getNewClassName());
 		if (foundInList(elementsFound, typeName)) {
-			status.setWarning(NewWizardMessages.getString("NewClassWizardPage.error.ClassNameExists")); //$NON-NLS-1$
+			status.setError(NewWizardMessages.getString("NewClassWizardPage.error.ClassNameExists")); //$NON-NLS-1$
 		}
-//		if(foundInList(getNewClassName(), getContainerPath(linkedResourceGroupForHeader), elementsFound)){
-//			status.setWarning(NewWizardMessages.getString("NewClassWizardPage.error.ClassNameExists")); //$NON-NLS-1$
-//		}
 		return status;
 	}
 	/**

Back to the top