Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 271935
Collapse All | Expand All

(-)ui/org/eclipse/jdt/ui/wizards/NewClassWizardPage.java (-4 / +14 lines)
Lines 89-95 Link Here
89
		IJavaElement jelem= getInitialJavaElement(selection);
89
		IJavaElement jelem= getInitialJavaElement(selection);
90
		initContainerPage(jelem);
90
		initContainerPage(jelem);
91
		initTypePage(jelem);
91
		initTypePage(jelem);
92
		doStatusUpdate();
92
		doStatusUpdate(false);
93
93
94
		boolean createMain= false;
94
		boolean createMain= false;
95
		boolean createConstructors= false;
95
		boolean createConstructors= false;
Lines 108-116 Link Here
108
	}
108
	}
109
109
110
	// ------ validation --------
110
	// ------ validation --------
111
	private void doStatusUpdate() {
111
	private void doStatusUpdate(boolean ignoreFirstField) {
112
		// status of all used components
112
		// status of all used components
113
		IStatus[] status= new IStatus[] {
113
		IStatus[] status= ignoreFirstField ?
114
				new IStatus[] {
115
				fContainerStatus,
116
				isEnclosingTypeSelected() ? fEnclosingTypeStatus : fPackageStatus,
117
				// ignore this one: fTypeNameStatus,
118
				fModifierStatus,
119
				fSuperClassStatus,
120
				fSuperInterfacesStatus
121
			}	
122
		: new IStatus[] {
114
			fContainerStatus,
123
			fContainerStatus,
115
			isEnclosingTypeSelected() ? fEnclosingTypeStatus : fPackageStatus,
124
			isEnclosingTypeSelected() ? fEnclosingTypeStatus : fPackageStatus,
116
			fTypeNameStatus,
125
			fTypeNameStatus,
Lines 130-136 Link Here
130
	protected void handleFieldChanged(String fieldName) {
139
	protected void handleFieldChanged(String fieldName) {
131
		super.handleFieldChanged(fieldName);
140
		super.handleFieldChanged(fieldName);
132
141
133
		doStatusUpdate();
142
		doStatusUpdate(false);
134
	}
143
	}
135
144
136
145
Lines 183-188 Link Here
183
		super.setVisible(visible);
192
		super.setVisible(visible);
184
		if (visible) {
193
		if (visible) {
185
			setFocus();
194
			setFocus();
195
			doStatusUpdate(true);
186
		} else {
196
		} else {
187
			IDialogSettings dialogSettings= getDialogSettings();
197
			IDialogSettings dialogSettings= getDialogSettings();
188
			if (dialogSettings != null) {
198
			if (dialogSettings != null) {

Return to bug 271935