Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 2708 Details for
Bug 19627
[JUnit] (post 2.0) Option to make test method stubs final
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
fix
19627.txt (text/plain), 5.46 KB, created by
Sebastian Davids
on 2002-12-08 11:20:57 EST
(
hide
)
Description:
fix
Filename:
MIME Type:
Creator:
Sebastian Davids
Created:
2002-12-08 11:20:57 EST
Size:
5.46 KB
patch
obsolete
>Index: NewTestCaseCreationWizardPage.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/wizards/NewTestCaseCreationWizardPage.java,v >retrieving revision 1.10 >diff -u -r1.10 NewTestCaseCreationWizardPage.java >--- NewTestCaseCreationWizardPage.java 16 Nov 2002 20:02:02 -0000 1.10 >+++ NewTestCaseCreationWizardPage.java 8 Dec 2002 16:20:23 -0000 >@@ -593,6 +593,8 @@ > methodName.append(Integer.toString(suffix)); > } > newMethodsNames.add(new String(methodName)); >+ if (fPage2.getCreateFinalMethodStubsButtonSelection()) >+ newMethod.append("final "); //$NON-NLS-1$ > newMethod.append("public void "+methodName.toString()+"() {}\n\n"); //$NON-NLS-1$ //$NON-NLS-2$ > type.createMethod(newMethod.toString(), null, false, null); > } >Index: NewTestCaseCreationWizardPage2.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/wizards/NewTestCaseCreationWizardPage2.java,v >retrieving revision 1.7 >diff -u -r1.7 NewTestCaseCreationWizardPage2.java >--- NewTestCaseCreationWizardPage2.java 11 Jun 2002 23:03:28 -0000 1.7 >+++ NewTestCaseCreationWizardPage2.java 8 Dec 2002 16:20:22 -0000 >@@ -42,12 +42,13 @@ > > private final static String PAGE_NAME= "NewTestCaseCreationWizardPage2"; //$NON-NLS-1$ > private final static String STORE_USE_TASKMARKER= PAGE_NAME + ".USE_TASKMARKER"; //$NON-NLS-1$ >- >+ private final static String STORE_CREATE_FINAL_METHOD_STUBS= PAGE_NAME + ".CREATE_FINAL_METHOD_STUBS"; //$NON-NLS-1$ > public final static String PREFIX= "test"; //$NON-NLS-1$ > > private NewTestCaseCreationWizardPage fFirstPage; > private IType fClassToTest; > >+ private Button fCreateFinalMethodStubsButton; > private Button fCreateTasksButton; > private ContainerCheckedTreeViewer fMethodsTree; > private Button fSelectAllButton; >@@ -75,12 +76,38 @@ > > createMethodsTreeControls(container); > createSpacer(container); >+ createFinalMethodStubsControls(container); > createTasksControls(container); > setControl(container); > restoreWidgetValues(); > WorkbenchHelp.setHelp(container, IJUnitHelpContextIds.NEW_TESTCASE_WIZARD_PAGE2); > } > >+ protected void createFinalMethodStubsControls(Composite container) { >+ GridLayout layout; >+ GridData gd; >+ Composite prefixContainer= new Composite(container, SWT.NONE); >+ gd= new GridData(); >+ gd.horizontalAlignment = GridData.FILL; >+ gd.horizontalSpan = 2; >+ prefixContainer.setLayoutData(gd); >+ >+ layout = new GridLayout(); >+ layout.numColumns = 2; >+ layout.marginWidth = 0; >+ layout.marginHeight = 0; >+ prefixContainer.setLayout(layout); >+ >+ fCreateFinalMethodStubsButton= new Button(prefixContainer, SWT.CHECK | SWT.LEFT); >+ fCreateFinalMethodStubsButton.setText(WizardMessages.getString("NewTestClassWizPage2.create_final_method_stubs.text")); //$NON-NLS-1$ >+ fCreateFinalMethodStubsButton.setEnabled(true); >+ fCreateFinalMethodStubsButton.setSelection(true); >+ gd= new GridData(); >+ gd.horizontalAlignment= GridData.FILL; >+ gd.horizontalSpan= 2; >+ fCreateFinalMethodStubsButton.setLayoutData(gd); >+ } >+ > protected void createTasksControls(Composite container) { > GridLayout layout; > GridData gd; >@@ -342,12 +369,19 @@ > } > > /** >- * Returns true iff the checkbox for creating tasks is checked. >+ * Returns true if the checkbox for creating tasks is checked. > */ > public boolean getCreateTasksButtonSelection() { > return fCreateTasksButton.getSelection(); > } >- >+ >+ /** >+ * Returns true if the checkbox for final method stubs is checked. >+ */ >+ public boolean getCreateFinalMethodStubsButtonSelection() { >+ return fCreateFinalMethodStubsButton.getSelection(); >+ } >+ > private void updateSelectedMethodsLabel() { > Object[] checked= fMethodsTree.getCheckedElements(); > int checkedMethodCount= 0; >@@ -382,10 +416,10 @@ > * last time this wizard was used to completion > */ > private void restoreWidgetValues() { >- > IDialogSettings settings= getDialogSettings(); > if (settings != null) { > fCreateTasksButton.setSelection(settings.getBoolean(STORE_USE_TASKMARKER)); >+ fCreateFinalMethodStubsButton.setSelection(settings.getBoolean(STORE_CREATE_FINAL_METHOD_STUBS)); > } > } > >@@ -397,7 +431,7 @@ > IDialogSettings settings= getDialogSettings(); > if (settings != null) { > settings.put(STORE_USE_TASKMARKER, fCreateTasksButton.getSelection()); >+ settings.put(STORE_CREATE_FINAL_METHOD_STUBS, fCreateFinalMethodStubsButton.getSelection()); > } > } >- > } >Index: WizardMessages.properties >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/wizards/WizardMessages.properties,v >retrieving revision 1.4 >diff -u -r1.4 WizardMessages.properties >--- WizardMessages.properties 20 Jun 2002 09:32:25 -0000 1.4 >+++ WizardMessages.properties 8 Dec 2002 16:20:23 -0000 >@@ -58,6 +58,7 @@ > NewTestClassWizPage2.title=Test Methods > NewTestClassWizPage2.description=Select methods for which test method stubs should be created > NewTestClassWizPage2.create_tasks.text=Create &tasks for generated Test methods >+NewTestClassWizPage2.create_final_method_stubs.text=Create &final method stubs. > NewTestClassWizPage2.methods_tree.label=Available &Methods > NewTestClassWizPage2.selectAll=&Select All > NewTestClassWizPage2.deselectAll=&Deselect All
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 19627
: 2708