1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 09:46:02 +02:00

2004-11-05 Chris Wiebe

Remove option to use an existing class as enclosing type (defer to future release)
	* src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassCodeGenerator.java
	* src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassCreationWizardPage.java
	* src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassWizardMessages.properties
This commit is contained in:
Chris Wiebe 2004-11-05 20:26:13 +00:00
parent 837365f975
commit 447ec67b44
4 changed files with 112 additions and 121 deletions

View file

@ -1,3 +1,10 @@
2004-11-05 Chris Wiebe
Remove option to use an existing class as enclosing type (defer to future release)
* src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassCodeGenerator.java
* src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassCreationWizardPage.java
* src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassWizardMessages.properties
2004-11-04 Alain Magloire 2004-11-04 Alain Magloire
Fix for 77825 from (Mikhail Voronin) Fix for 77825 from (Mikhail Voronin)
* src/org/eclipse/cdt/internal/ui/text/CHelpProviderDescriptor.java * src/org/eclipse/cdt/internal/ui/text/CHelpProviderDescriptor.java

View file

@ -221,11 +221,9 @@ public class NewClassCodeGenerator {
List protectedMethods = getStubs(ASTAccessVisibility.PROTECTED, false); List protectedMethods = getStubs(ASTAccessVisibility.PROTECTED, false);
List privateMethods = getStubs(ASTAccessVisibility.PRIVATE, false); List privateMethods = getStubs(ASTAccessVisibility.PRIVATE, false);
if (publicMethods.isEmpty() if (!publicMethods.isEmpty()
&& protectedMethods.isEmpty() || !protectedMethods.isEmpty()
&& privateMethods.isEmpty()) { || !privateMethods.isEmpty()) {
text.append(' ');
} else {
addMethodDeclarations(publicMethods, protectedMethods, privateMethods, text); addMethodDeclarations(publicMethods, protectedMethods, privateMethods, text);
} }

View file

@ -117,9 +117,9 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
private StringButtonDialogField fSourceFolderDialogField; private StringButtonDialogField fSourceFolderDialogField;
SelectionButtonDialogField fEnclosingTypeSelection; SelectionButtonDialogField fEnclosingTypeSelection;
SelectionButtonDialogFieldGroup fEnclosingTypeButtons;
StringButtonDialogField fEnclosingTypeDialogField; StringButtonDialogField fEnclosingTypeDialogField;
SelectionButtonDialogFieldGroup fEnclosingClassAccessButtons; // SelectionButtonDialogFieldGroup fEnclosingTypeButtons;
// SelectionButtonDialogFieldGroup fEnclosingClassAccessButtons;
StringDialogField fClassNameDialogField; StringDialogField fClassNameDialogField;
BaseClassesListDialogField fBaseClassesDialogField; BaseClassesListDialogField fBaseClassesDialogField;
MethodStubsListDialogField fMethodStubsDialogField; MethodStubsListDialogField fMethodStubsDialogField;
@ -160,23 +160,23 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
fEnclosingTypeSelection.setDialogFieldListener(enclosingTypeAdapter); fEnclosingTypeSelection.setDialogFieldListener(enclosingTypeAdapter);
fEnclosingTypeSelection.setLabelText(NewClassWizardMessages.getString("NewClassCreationWizardPage.enclosingType.label")); //$NON-NLS-1$ fEnclosingTypeSelection.setLabelText(NewClassWizardMessages.getString("NewClassCreationWizardPage.enclosingType.label")); //$NON-NLS-1$
String[] buttonNames = new String[] { // String[] buttonNames = new String[] {
/* NAMESPACE_INDEX */ NewClassWizardMessages.getString("NewClassCreationWizardPage.enclosingType.namespace"), //$NON-NLS-1$ // /* NAMESPACE_INDEX */ NewClassWizardMessages.getString("NewClassCreationWizardPage.enclosingType.namespace"), //$NON-NLS-1$
/* CLASS_INDEX */ NewClassWizardMessages.getString("NewClassCreationWizardPage.enclosingType.class"), //$NON-NLS-1$ // /* CLASS_INDEX */ NewClassWizardMessages.getString("NewClassCreationWizardPage.enclosingType.class"), //$NON-NLS-1$
}; // };
fEnclosingTypeButtons = new SelectionButtonDialogFieldGroup(SWT.RADIO, buttonNames, buttonNames.length); // fEnclosingTypeButtons = new SelectionButtonDialogFieldGroup(SWT.RADIO, buttonNames, buttonNames.length);
fEnclosingTypeButtons.setDialogFieldListener(enclosingTypeAdapter); // fEnclosingTypeButtons.setDialogFieldListener(enclosingTypeAdapter);
fEnclosingTypeButtons.setSelection(NAMESPACE_INDEX, true); // fEnclosingTypeButtons.setSelection(NAMESPACE_INDEX, true);
String[] buttonNames2 = new String[] { // String[] buttonNames2 = new String[] {
NewClassWizardMessages.getString("NewClassCreationWizardPage.enclosingClassAccess.public"), //$NON-NLS-1$ // NewClassWizardMessages.getString("NewClassCreationWizardPage.enclosingClassAccess.public"), //$NON-NLS-1$
NewClassWizardMessages.getString("NewClassCreationWizardPage.enclosingClassAccess.protected"), //$NON-NLS-1$ // NewClassWizardMessages.getString("NewClassCreationWizardPage.enclosingClassAccess.protected"), //$NON-NLS-1$
NewClassWizardMessages.getString("NewClassCreationWizardPage.enclosingClassAccess.private") //$NON-NLS-1$ // NewClassWizardMessages.getString("NewClassCreationWizardPage.enclosingClassAccess.private") //$NON-NLS-1$
}; // };
fEnclosingClassAccessButtons = new SelectionButtonDialogFieldGroup(SWT.RADIO, buttonNames2, buttonNames2.length); // fEnclosingClassAccessButtons = new SelectionButtonDialogFieldGroup(SWT.RADIO, buttonNames2, buttonNames2.length);
fEnclosingClassAccessButtons.setDialogFieldListener(enclosingTypeAdapter); // fEnclosingClassAccessButtons.setDialogFieldListener(enclosingTypeAdapter);
fEnclosingClassAccessButtons.setLabelText(NewClassWizardMessages.getString("NewClassWizardPage.baseclass.access.label")); //$NON-NLS-1$ // fEnclosingClassAccessButtons.setLabelText(NewClassWizardMessages.getString("NewClassWizardPage.baseclass.access.label")); //$NON-NLS-1$
fEnclosingClassAccessButtons.setSelection(0, true); // fEnclosingClassAccessButtons.setSelection(0, true);
fEnclosingTypeDialogField = new StringButtonDialogField(enclosingTypeAdapter); fEnclosingTypeDialogField = new StringButtonDialogField(enclosingTypeAdapter);
fEnclosingTypeDialogField.setDialogFieldListener(enclosingTypeAdapter); fEnclosingTypeDialogField.setDialogFieldListener(enclosingTypeAdapter);
@ -288,76 +288,56 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
* @param nColumns number of columns to span * @param nColumns number of columns to span
*/ */
protected void createEnclosingTypeControls(Composite composite, int nColumns) { protected void createEnclosingTypeControls(Composite composite, int nColumns) {
fEnclosingTypeSelection.doFillIntoGrid(composite, 1); Composite tabGroup= new Composite(composite, SWT.NONE);
GridLayout layout= new GridLayout();
layout.marginWidth= 0;
layout.marginHeight= 0;
tabGroup.setLayout(layout);
// DialogField.createEmptySpace(composite, 1); fEnclosingTypeSelection.doFillIntoGrid(tabGroup, 1);
GridData gd; Text text= fEnclosingTypeDialogField.getTextControl(composite);
// LayoutUtil.setHorizontalSpan(fEnclosingTypeButtons.getLabelControl(composite), 1); GridData gd= new GridData(GridData.FILL_HORIZONTAL);
Control buttonGroup = fEnclosingTypeButtons.getSelectionButtonsGroup(composite); gd.widthHint= getMaxFieldWidth();
// gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan= 2;
gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); text.setLayoutData(gd);
gd.widthHint = convertWidthInCharsToPixels(32);
gd.horizontalSpan = nColumns - 2; Button button= fEnclosingTypeDialogField.getChangeControl(composite);
// textControl.setLayoutData(gd); gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL);
// textControl.addFocusListener(new StatusFocusListener(NAMESPACE)); gd.heightHint = SWTUtil.getButtonHeigthHint(button);
// buttonGroup.setSize(); gd.widthHint = SWTUtil.getButtonWidthHint(button);
// GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL); button.setLayoutData(gd);
// GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
// fEnclosingTypeSelection.doFillIntoGrid(composite, 1);
// GridData gd;
// Control buttonGroup = fEnclosingTypeButtons.getSelectionButtonsGroup(composite);
// gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
// gd.widthHint = convertWidthInCharsToPixels(32);
// gd.horizontalSpan = nColumns - 2; // gd.horizontalSpan = nColumns - 2;
buttonGroup.setLayoutData(gd); // buttonGroup.setLayoutData(gd);
// DialogField.createEmptySpace(composite, 2); // DialogField.createEmptySpace(composite, 1);
DialogField.createEmptySpace(composite, 1);
DialogField.createEmptySpace(composite, 1);
// LayoutUtil.setHorizontalSpan(fNamespaceDialogField.getLabelControl(composite), 1);
// Text textControl = fNamespaceDialogField.getTextControl(composite);
// gd = new GridData(GridData.FILL_HORIZONTAL);
// gd.widthHint = getMaxFieldWidth();
// gd.horizontalSpan = 1;
// textControl.setLayoutData(gd);
// textControl.addFocusListener(new StatusFocusListener(NAMESPACE));
// //
// Button button = fNamespaceDialogField.getChangeControl(composite); // DialogField.createEmptySpace(composite, 1);
//
// Text textControl = fEnclosingTypeDialogField.getTextControl(composite);
// gd = new GridData(GridData.FILL_HORIZONTAL);
// gd.horizontalSpan = 2;
// textControl.setLayoutData(gd);
// textControl.addFocusListener(new StatusFocusListener(ENCLOSING_TYPE_ID));
//
// Button button = fEnclosingTypeDialogField.getChangeControl(composite);
// gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL); // gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
// gd.heightHint = SWTUtil.getButtonHeigthHint(button); // gd.heightHint = SWTUtil.getButtonHeigthHint(button);
// gd.widthHint = SWTUtil.getButtonWidthHint(button);
// button.setLayoutData(gd); // button.setLayoutData(gd);
// //
// DialogField.createEmptySpace(composite, 1); // DialogField.createEmptySpace(composite, 1);
//
// LayoutUtil.setHorizontalSpan(fEnclosingClassDialogField.getLabelControl(composite), 1); // buttonGroup = fEnclosingClassAccessButtons.getSelectionButtonsGroup(composite);
Text textControl = fEnclosingTypeDialogField.getTextControl(composite); // gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
gd = new GridData(GridData.FILL_HORIZONTAL);
// gd.widthHint = getMaxFieldWidth() - convertWidthInCharsToPixels(32) - 50;
gd.horizontalSpan = 2;
textControl.setLayoutData(gd);
textControl.addFocusListener(new StatusFocusListener(ENCLOSING_TYPE_ID));
Button button = fEnclosingTypeDialogField.getChangeControl(composite);
gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gd.heightHint = SWTUtil.getButtonHeigthHint(button);
// gd.widthHint = SWTUtil.getButtonWidthHint(button);
button.setLayoutData(gd);
DialogField.createEmptySpace(composite, 1);
// Label label = fEnclosingClassAccessButtons.getLabelControl(composite);
// gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
// gd.widthHint = convertWidthInCharsToPixels(42); // gd.widthHint = convertWidthInCharsToPixels(42);
// gd.horizontalSpan = 1; // gd.horizontalSpan = nColumns - 2;
// gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL); // buttonGroup.setLayoutData(gd);
// gd.horizontalSpan = nColumns - 1; // DialogField.createEmptySpace(composite, 1);
// label.setLayoutData(gd);
// LayoutUtil.setHorizontalSpan(label, 1);
buttonGroup = fEnclosingClassAccessButtons.getSelectionButtonsGroup(composite);
gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
// gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gd.widthHint = convertWidthInCharsToPixels(42);
gd.horizontalSpan = nColumns - 2;
buttonGroup.setLayoutData(gd);
DialogField.createEmptySpace(composite, 1);
} }
/** /**
@ -714,12 +694,13 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
public void changeControlPressed(DialogField field) { public void changeControlPressed(DialogField field) {
if (field == fEnclosingTypeDialogField) { if (field == fEnclosingTypeDialogField) {
ITypeInfo enclosingType = null; ITypeInfo enclosingType = null;
boolean isNamespace = isNamespaceButtonSelected(); // boolean isNamespace = isNamespaceButtonSelected();
if (isNamespace) { boolean isNamespace = true;
// if (isNamespace) {
enclosingType = chooseNamespace(); enclosingType = chooseNamespace();
} else { // } else {
enclosingType = chooseEnclosingClass(); // enclosingType = chooseEnclosingClass();
} // }
if (enclosingType != null) { if (enclosingType != null) {
int changedFields = ENCLOSING_TYPE_ID; int changedFields = ENCLOSING_TYPE_ID;
IPath oldFolderPath = getSourceFolderFullPath(); IPath oldFolderPath = getSourceFolderFullPath();
@ -752,7 +733,8 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
} }
public void dialogFieldChanged(DialogField field) { public void dialogFieldChanged(DialogField field) {
if (field == fEnclosingTypeSelection || field == fEnclosingTypeButtons) { // if (field == fEnclosingTypeSelection || field == fEnclosingTypeButtons) {
if (field == fEnclosingTypeSelection) {
updateEnclosingTypeEnableState(); updateEnclosingTypeEnableState();
} }
handleFieldChanged(ENCLOSING_TYPE_ID); handleFieldChanged(ENCLOSING_TYPE_ID);
@ -975,11 +957,11 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
if (!isEnclosingTypeSelected()) { if (!isEnclosingTypeSelected()) {
return status; return status;
} }
if (isNamespaceButtonSelected()) { // if (isNamespaceButtonSelected()) {
return namespaceChanged(); return namespaceChanged();
} else { // } else {
return enclosingClassChanged(); // return enclosingClassChanged();
} // }
} }
private IStatus namespaceChanged() { private IStatus namespaceChanged() {
@ -1607,8 +1589,8 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
} else { } else {
fEnclosingTypeDialogField.setTextWithoutUpdate(""); //$NON-NLS-1$ fEnclosingTypeDialogField.setTextWithoutUpdate(""); //$NON-NLS-1$
} }
fEnclosingTypeButtons.setSelection(isNamespace ? CLASS_INDEX : NAMESPACE_INDEX, false); // fEnclosingTypeButtons.setSelection(isNamespace ? CLASS_INDEX : NAMESPACE_INDEX, false);
fEnclosingTypeButtons.setSelection(isNamespace ? NAMESPACE_INDEX : CLASS_INDEX, true); // fEnclosingTypeButtons.setSelection(isNamespace ? NAMESPACE_INDEX : CLASS_INDEX, true);
if (update) { if (update) {
fEnclosingTypeDialogField.dialogFieldChanged(); fEnclosingTypeDialogField.dialogFieldChanged();
} }
@ -1628,9 +1610,9 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
* *
* @return the selection state of the enclosing class checkbox * @return the selection state of the enclosing class checkbox
*/ */
public boolean isNamespaceButtonSelected() { // public boolean isNamespaceButtonSelected() {
return fEnclosingTypeButtons.isSelected(NAMESPACE_INDEX); // return fEnclosingTypeButtons.isSelected(NAMESPACE_INDEX);
} // }
/** /**
* Returns the class name entered into the class input field. * Returns the class name entered into the class input field.
@ -1824,8 +1806,8 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
try { try {
getContainer().run(true, true, runnable); getContainer().run(true, true, runnable);
} catch (InvocationTargetException e) { } catch (InvocationTargetException e) {
String title = NewClassWizardMessages.getString("NewClassCreationWizardPage.getClasses.exception.title"); //$NON-NLS-1$ String title = NewClassWizardMessages.getString("NewClassCreationWizardPage.getTypes.exception.title"); //$NON-NLS-1$
String message = NewClassWizardMessages.getString("NewClassCreationWizardPage.getClasses.exception.message"); //$NON-NLS-1$ String message = NewClassWizardMessages.getString("NewClassCreationWizardPage.getTypes.exception.message"); //$NON-NLS-1$
ExceptionHandler.handle(e, title, message); ExceptionHandler.handle(e, title, message);
return; return;
} catch (InterruptedException e) { } catch (InterruptedException e) {
@ -1856,8 +1838,8 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
try { try {
getContainer().run(true, true, runnable); getContainer().run(true, true, runnable);
} catch (InvocationTargetException e) { } catch (InvocationTargetException e) {
String title = NewClassWizardMessages.getString("NewClassCreationWizardPage.getClasses.exception.title"); //$NON-NLS-1$ String title = NewClassWizardMessages.getString("NewClassCreationWizardPage.getTypes.exception.title"); //$NON-NLS-1$
String message = NewClassWizardMessages.getString("NewClassCreationWizardPage.getClasses.exception.message"); //$NON-NLS-1$ String message = NewClassWizardMessages.getString("NewClassCreationWizardPage.getTypes.exception.message"); //$NON-NLS-1$
ExceptionHandler.handle(e, title, message); ExceptionHandler.handle(e, title, message);
} catch (InterruptedException e) { } catch (InterruptedException e) {
// cancelled by user // cancelled by user
@ -1896,9 +1878,9 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
*/ */
void updateEnclosingTypeEnableState() { void updateEnclosingTypeEnableState() {
boolean enclosing = isEnclosingTypeSelected(); boolean enclosing = isEnclosingTypeSelected();
fEnclosingTypeButtons.setEnabled(enclosing);
fEnclosingTypeDialogField.setEnabled(enclosing); fEnclosingTypeDialogField.setEnabled(enclosing);
fEnclosingClassAccessButtons.setEnabled(enclosing && !isNamespaceButtonSelected()); // fEnclosingTypeButtons.setEnabled(enclosing);
// fEnclosingClassAccessButtons.setEnabled(enclosing && !isNamespaceButtonSelected());
} }
/* /*
@ -1952,8 +1934,8 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
ITypeInfo[] elements = AllTypesCache.getNamespaces(scope, false); ITypeInfo[] elements = AllTypesCache.getNamespaces(scope, false);
if (elements == null || elements.length == 0) { if (elements == null || elements.length == 0) {
String title = NewClassWizardMessages.getString("NewClassCreationWizardPage.getClasses.noclasses.title"); //$NON-NLS-1$ String title = NewClassWizardMessages.getString("NewClassCreationWizardPage.getTypes.noNamespaces.title"); //$NON-NLS-1$
String message = NewClassWizardMessages.getString("NewClassCreationWizardPage.getClasses.noclasses.message"); //$NON-NLS-1$ String message = NewClassWizardMessages.getString("NewClassCreationWizardPage.getTypes.noNamespaces.message"); //$NON-NLS-1$
MessageDialog.openInformation(getShell(), title, message); MessageDialog.openInformation(getShell(), title, message);
return null; return null;
} }
@ -1979,8 +1961,8 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
try { try {
getContainer().run(true, true, runnable); getContainer().run(true, true, runnable);
} catch (InvocationTargetException e) { } catch (InvocationTargetException e) {
String title = NewClassWizardMessages.getString("NewClassCreationWizardPage.getClasses.exception.title"); //$NON-NLS-1$ String title = NewClassWizardMessages.getString("NewClassCreationWizardPage.getTypes.exception.title"); //$NON-NLS-1$
String message = NewClassWizardMessages.getString("NewClassCreationWizardPage.getClasses.exception.message"); //$NON-NLS-1$ String message = NewClassWizardMessages.getString("NewClassCreationWizardPage.getTypes.exception.message"); //$NON-NLS-1$
ExceptionHandler.handle(e, title, message); ExceptionHandler.handle(e, title, message);
return null; return null;
} catch (InterruptedException e) { } catch (InterruptedException e) {
@ -2010,8 +1992,8 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
ITypeInfo[] elements = AllTypesCache.getTypes(scope, ENCLOSING_CLASS_TYPES); ITypeInfo[] elements = AllTypesCache.getTypes(scope, ENCLOSING_CLASS_TYPES);
if (elements == null || elements.length == 0) { if (elements == null || elements.length == 0) {
String title = NewClassWizardMessages.getString("NewClassCreationWizardPage.getClasses.noclasses.title"); //$NON-NLS-1$ String title = NewClassWizardMessages.getString("NewClassCreationWizardPage.getTypes.noClasses.title"); //$NON-NLS-1$
String message = NewClassWizardMessages.getString("NewClassCreationWizardPage.getClasses.noclasses.message"); //$NON-NLS-1$ String message = NewClassWizardMessages.getString("NewClassCreationWizardPage.getTypes.noClasses.message"); //$NON-NLS-1$
MessageDialog.openInformation(getShell(), title, message); MessageDialog.openInformation(getShell(), title, message);
return null; return null;
} }
@ -2039,8 +2021,8 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
try { try {
getContainer().run(true, true, runnable); getContainer().run(true, true, runnable);
} catch (InvocationTargetException e) { } catch (InvocationTargetException e) {
String title = NewClassWizardMessages.getString("NewClassCreationWizardPage.getClasses.exception.title"); //$NON-NLS-1$ String title = NewClassWizardMessages.getString("NewClassCreationWizardPage.getTypes.exception.title"); //$NON-NLS-1$
String message = NewClassWizardMessages.getString("NewClassCreationWizardPage.getClasses.exception.message"); //$NON-NLS-1$ String message = NewClassWizardMessages.getString("NewClassCreationWizardPage.getTypes.exception.message"); //$NON-NLS-1$
ExceptionHandler.handle(e, title, message); ExceptionHandler.handle(e, title, message);
return null; return null;
} catch (InterruptedException e) { } catch (InterruptedException e) {
@ -2060,8 +2042,8 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
ITypeInfo[] elements = getAllReachableTypes(); ITypeInfo[] elements = getAllReachableTypes();
if (elements == null || elements.length == 0) { if (elements == null || elements.length == 0) {
String title = NewClassWizardMessages.getString("NewClassCreationWizardPage.getClasses.noclasses.title"); //$NON-NLS-1$ String title = NewClassWizardMessages.getString("NewClassCreationWizardPage.getTypes.noClasses.title"); //$NON-NLS-1$
String message = NewClassWizardMessages.getString("NewClassCreationWizardPage.getClasses.noclasses.message"); //$NON-NLS-1$ String message = NewClassWizardMessages.getString("NewClassCreationWizardPage.getTypes.noClasses.message"); //$NON-NLS-1$
MessageDialog.openInformation(getShell(), title, message); MessageDialog.openInformation(getShell(), title, message);
return; return;
} }
@ -2181,7 +2163,8 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
getHeaderFileFullPath(), getHeaderFileFullPath(),
getSourceFileFullPath(), getSourceFileFullPath(),
getClassTypeName(), getClassTypeName(),
isNamespaceButtonSelected() ? getEnclosingTypeName() : null, // isNamespaceButtonSelected() ? getEnclosingTypeName() : null,
getEnclosingTypeName(),
getBaseClasses(), getBaseClasses(),
getCheckedMethodStubs()); getCheckedMethodStubs());
fCodeGenerator.createClass(monitor); fCodeGenerator.createClass(monitor);

View file

@ -19,10 +19,12 @@ NewClassCreationWizardPage.error.SelectedProjectError=Error in determining the s
NewClassCreationWizardPage.error.DefaultSourceFolderError=Error in determining the default source folder. NewClassCreationWizardPage.error.DefaultSourceFolderError=Error in determining the default source folder.
NewClassCreationWizardPage.error.NotAvailableForNonCppProjects= The wizard is not available for non C++ projects. NewClassCreationWizardPage.error.NotAvailableForNonCppProjects= The wizard is not available for non C++ projects.
NewClassCreationWizardPage.getClasses.exception.title=Exception NewClassCreationWizardPage.getTypes.exception.title=Exception
NewClassCreationWizardPage.getClasses.exception.message=Unexpected exception. See log for details. NewClassCreationWizardPage.getTypes.exception.message=Unexpected exception. See log for details.
NewClassCreationWizardPage.getClasses.noclasses.title=Class Selection NewClassCreationWizardPage.getTypes.noClasses.title=Class Selection
NewClassCreationWizardPage.getClasses.noclasses.message=No classes available. NewClassCreationWizardPage.getTypes.noClasses.message=No classes available.
NewClassCreationWizardPage.getTypes.noNamespaces.title=Namespace Selection
NewClassCreationWizardPage.getTypes.noNamespaces.message=No namespaces available.
NewClassCreationWizardPage.sourceFolder.label=Source &Folder: NewClassCreationWizardPage.sourceFolder.label=Source &Folder:
NewClassCreationWizardPage.sourceFolder.button=Br&owse... NewClassCreationWizardPage.sourceFolder.button=Br&owse...
@ -33,7 +35,8 @@ NewClassCreationWizardPage.error.ProjectClosed=Project ''{0}'' must be accessibl
NewClassCreationWizardPage.warning.NotACProject=Folder is not a C/C++ project. NewClassCreationWizardPage.warning.NotACProject=Folder is not a C/C++ project.
NewClassCreationWizardPage.warning.NotInACProject=Folder is not in a C/C++ project. NewClassCreationWizardPage.warning.NotInACProject=Folder is not in a C/C++ project.
NewClassCreationWizardPage.enclosingType.label=&Enclosing Type: # NewClassCreationWizardPage.enclosingType.label=&Enclosing Type:
NewClassCreationWizardPage.enclosingType.label=&Enclosing Namespace:
NewClassCreationWizardPage.enclosingType.namespace=Namespace NewClassCreationWizardPage.enclosingType.namespace=Namespace
NewClassCreationWizardPage.enclosingType.class=Class NewClassCreationWizardPage.enclosingType.class=Class
NewClassCreationWizardPage.enclosingType.button=Bro&wse... NewClassCreationWizardPage.enclosingType.button=Bro&wse...