[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-dev] Patches for bugs
|
Hi,
Please find patch for bug 178305 attached.
Thanks,
Ravi
Extn: 2751
Mobile:9886432301### Eclipse Workspace Patch 1.0
#P org.eclipse.cdt.ui
Index: src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassWizardMessages.properties
===================================================================
RCS file: /cvsroot/tools/org.eclipse.cdt-core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassWizardMessages.properties,v
retrieving revision 1.16
diff -u -r1.16 NewClassWizardMessages.properties
--- src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassWizardMessages.properties 25 Aug 2006 19:46:28 -0000 1.16
+++ src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassWizardMessages.properties 27 Mar 2007 04:05:14 -0000
@@ -56,6 +56,7 @@
NewClassCreationWizardPage.error.noTypeCache=Unable to access type cache.
NewClassCreationWizardPage.className.label=Class &Name:
+
NewClassCreationWizardPage.error.EnterClassName=Class name is empty.
NewClassCreationWizardPage.error.ClassNameExists=Class already exists.
NewClassCreationWizardPage.error.ClassNameExistsDifferentCase=Class with same name but different case exists.
Index: src/org/eclipse/cdt/ui/wizards/NewClassCreationWizardPage.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.cdt-core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewClassCreationWizardPage.java,v
retrieving revision 1.14
diff -u -r1.14 NewClassCreationWizardPage.java
--- src/org/eclipse/cdt/ui/wizards/NewClassCreationWizardPage.java 27 Sep 2006 15:05:05 -0000 1.14
+++ src/org/eclipse/cdt/ui/wizards/NewClassCreationWizardPage.java 27 Mar 2007 04:05:15 -0000
@@ -138,7 +138,13 @@
protected IFile fCreatedSourceFile = null;
protected IFile fCreatedHeaderFile = null;
protected ICElement fCreatedClass = null;
-
+
+ /**
+ * This flag isFirstTime is used to keep a note
+ * that the class creation wizard has just been
+ * created.
+ */
+ private boolean isFirstTime = false;
/**
* the default method stubs
*/
@@ -203,7 +209,9 @@
fHeaderFileStatus = STATUS_OK;
fSourceFileStatus = STATUS_OK;
fLastFocusedField = 0;
-
+
+ isFirstTime = true;
+
updateNamespaceEnableState();
updateFileGroupEnableState();
}
@@ -1335,6 +1343,10 @@
fNamespaceStatus = namespaceChanged();
}
if (fieldChanged(fields, CLASS_NAME_ID)) {
+ if( isFirstTime ) {
+ isFirstTime = false;
+ return;
+ }
fClassNameStatus = classNameChanged();
}
if (fieldChanged(fields, BASE_CLASSES_ID)) {
@@ -1530,7 +1542,6 @@
*/
protected IStatus classNameChanged() {
StatusInfo status = new StatusInfo();
-
String className = getClassName();
// must not be empty
if (className == null || className.length() == 0) {
Index: src/org/eclipse/cdt/internal/ui/wizards/filewizard/AbstractFileCreationWizardPage.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.cdt-core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/filewizard/AbstractFileCreationWizardPage.java,v
retrieving revision 1.8
diff -u -r1.8 AbstractFileCreationWizardPage.java
--- src/org/eclipse/cdt/internal/ui/wizards/filewizard/AbstractFileCreationWizardPage.java 10 Jul 2006 08:03:28 -0000 1.8
+++ src/org/eclipse/cdt/internal/ui/wizards/filewizard/AbstractFileCreationWizardPage.java 27 Mar 2007 04:05:14 -0000
@@ -78,6 +78,13 @@
private IStatus fNewFileStatus;
private final IStatus STATUS_OK = new StatusInfo();
+ /**
+ * This flag isFirstTime is used to keep a note
+ * that the class creation wizard has just been
+ * created.
+ */
+ private boolean isFirstTime = false;
+
public AbstractFileCreationWizardPage(String name) {
super(name);
@@ -94,6 +101,9 @@
fSourceFolderStatus = STATUS_OK;
fNewFileStatus = STATUS_OK;
fLastFocusedField = 0;
+
+ isFirstTime = true;
+
}
// -------- UI Creation ---------
@@ -415,7 +425,11 @@
fSourceFolderStatus = sourceFolderChanged();
}
if (fieldChanged(fields, NEW_FILE_ID)) {
- fNewFileStatus = fileNameChanged();
+ if( isFirstTime ){
+ isFirstTime = false;
+ return;
+ }
+ fNewFileStatus = fileNameChanged();
}
doStatusUpdate();
}