issue_id
int64
2.04k
425k
title
stringlengths
9
251
body
stringlengths
4
32.8k
status
stringclasses
6 values
after_fix_sha
stringlengths
7
7
project_name
stringclasses
6 values
repo_url
stringclasses
6 values
repo_name
stringclasses
6 values
language
stringclasses
1 value
issue_url
null
before_fix_sha
null
pull_url
null
commit_datetime
timestamp[us, tz=UTC]
report_datetime
timestamp[us, tz=UTC]
updated_file
stringlengths
23
187
chunk_content
stringlengths
1
22k
11,866
Bug 11866 Wrong labels in Update Test Suite dialog
"Test Classes to be included" is written with TestClasses (missing space) The status line talks about methods being selected instead of types. The action name is written together (TestSuite) instead of Test Suite
resolved fixed
790bdf0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:02:02Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteCreationWizardPage.java
public NewTestSuiteCreationWizardPage() { super(true, PAGE_NAME); fSuiteNameStatus= new JUnitStatus(); fSuiteNameTextInitialValue= ""; setTitle(Messages.getString("NewTestSuiteWizPage.title")); setDescription(Messages.getString("NewTestSuiteWizPage.description")); fClassesInSuiteStatus= new JUnitStatus(); } /* * @see IDialogPage#createControl(Composite) */ public void createControl(Composite parent) { initializeDialogUnits(parent); Composite composite= new Composite(parent, SWT.NONE); int nColumns= 4; GridLayout layout= new GridLayout(); layout.numColumns= nColumns; composite.setLayout(layout); createContainerControls(composite, nColumns); createPackageControls(composite, nColumns); createSeparator(composite, nColumns); createSuiteNameControl(composite, nColumns); setTypeName("AllTests",true); createSeparator(composite, nColumns); createClassesInSuiteControl(composite, nColumns); setFocus(); setControl(composite);
11,866
Bug 11866 Wrong labels in Update Test Suite dialog
"Test Classes to be included" is written with TestClasses (missing space) The status line talks about methods being selected instead of types. The action name is written together (TestSuite) instead of Test Suite
resolved fixed
790bdf0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:02:02Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteCreationWizardPage.java
} /** * Should be called from the wizard with the input element. */ public void init(IStructuredSelection selection) { IJavaElement jelem= getInitialJavaElement(selection); initContainerPage(jelem); initTypePage(jelem); updateStatus(findMostSevereStatus()); } /** * Finds the most severe error (if there is one) */ private IStatus findMostSevereStatus() { return NewTestCaseCreationWizardPage.getMostSevere(new IStatus[] { fContainerStatus, fPackageStatus, fSuiteNameStatus, fClassesInSuiteStatus }); } /* * @see ContainerPage#handleFieldChanged */ protected void handleFieldChanged(String fieldName) { super.handleFieldChanged(fieldName); if (fieldName.equals(PACKAGE) || fieldName.equals(CONTAINER)) { if (fieldName.equals(PACKAGE)) fPackageStatus= packageChanged();
11,866
Bug 11866 Wrong labels in Update Test Suite dialog
"Test Classes to be included" is written with TestClasses (missing space) The status line talks about methods being selected instead of types. The action name is written together (TestSuite) instead of Test Suite
resolved fixed
790bdf0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:02:02Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteCreationWizardPage.java
updateClassesInSuiteTable(); } else if (fieldName.equals(CLASSES_IN_SUITE)) { fClassesInSuiteStatus= classesInSuiteChanged(); updateSelectedClassesLabel(); } else if (fieldName.equals(SUITE_NAME)) { fSuiteNameStatus= testSuiteChanged(); } updateStatus(findMostSevereStatus()); } public void setVisible(boolean visible) { super.setVisible(visible); updateClassesInSuiteTable(); } protected void updateClassesInSuiteTable() { if (fClassesInSuiteTable != null) { IPackageFragment pack= getPackageFragment(); if (pack == null) { IPackageFragmentRoot root= getPackageFragmentRoot(); if (root != null) pack= root.getPackageFragment(""); else return; } fCurrentPackage= pack; fClassesInSuiteTable.setInput(pack); fClassesInSuiteTable.setAllChecked(true); updateSelectedClassesLabel(); } }
11,866
Bug 11866 Wrong labels in Update Test Suite dialog
"Test Classes to be included" is written with TestClasses (missing space) The status line talks about methods being selected instead of types. The action name is written together (TestSuite) instead of Test Suite
resolved fixed
790bdf0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:02:02Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteCreationWizardPage.java
protected void createClassesInSuiteControl(Composite parent, int nColumns) { if (fClassesInSuiteTable == null) { Label label = new Label(parent, SWT.LEFT); label.setText(Messages.getString("NewTestSuiteWizPage.classes_in_suite.label")); GridData gd= new GridData(); gd.horizontalAlignment = GridData.FILL; gd.horizontalSpan = nColumns; label.setLayoutData(gd); fClassesInSuiteTable= CheckboxTableViewer.newCheckList(parent, SWT.BORDER); gd= new GridData(GridData.FILL_BOTH); gd.heightHint= 200; gd.horizontalSpan= nColumns-1; fClassesInSuiteTable.getTable().setLayoutData(gd); fClassesInSuiteTable.setContentProvider(new ClassesInSuitContentProvider()); fClassesInSuiteTable.setLabelProvider(new JavaElementLabelProvider()); fClassesInSuiteTable.addCheckStateListener(new ICheckStateListener() { public void checkStateChanged(CheckStateChangedEvent event) { handleFieldChanged(CLASSES_IN_SUITE); } }); Composite buttonContainer= new Composite(parent, SWT.NONE); gd= new GridData(GridData.FILL_VERTICAL); buttonContainer.setLayoutData(gd); GridLayout buttonLayout= new GridLayout(); buttonLayout.marginWidth= 0; buttonLayout.marginHeight= 0; buttonContainer.setLayout(buttonLayout); fSelectAllButton= new Button(buttonContainer, SWT.PUSH); fSelectAllButton.setText(Messages.getString("NewTestSuiteWizPage.selectAll"));
11,866
Bug 11866 Wrong labels in Update Test Suite dialog
"Test Classes to be included" is written with TestClasses (missing space) The status line talks about methods being selected instead of types. The action name is written together (TestSuite) instead of Test Suite
resolved fixed
790bdf0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:02:02Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteCreationWizardPage.java
GridData bgd= new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING); fSelectAllButton.setLayoutData(bgd); fSelectAllButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { fClassesInSuiteTable.setAllChecked(true); handleFieldChanged(CLASSES_IN_SUITE); } }); fDeselectAllButton= new Button(buttonContainer, SWT.PUSH); fDeselectAllButton.setText(Messages.getString("NewTestSuiteWizPage.deselectAll")); bgd= new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING); fDeselectAllButton.setLayoutData(bgd); fDeselectAllButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { fClassesInSuiteTable.setAllChecked(false); handleFieldChanged(CLASSES_IN_SUITE); } }); fSelectedClassesLabel= new Label(parent, SWT.LEFT | SWT.WRAP); fSelectedClassesLabel.setFont(parent.getFont()); updateSelectedClassesLabel(); gd = new GridData(); gd.horizontalSpan = 2; fSelectedClassesLabel.setLayoutData(gd); } } public static class ClassesInSuitContentProvider implements IStructuredContentProvider {
11,866
Bug 11866 Wrong labels in Update Test Suite dialog
"Test Classes to be included" is written with TestClasses (missing space) The status line talks about methods being selected instead of types. The action name is written together (TestSuite) instead of Test Suite
resolved fixed
790bdf0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:02:02Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteCreationWizardPage.java
private Object[] fTypes; public ClassesInSuitContentProvider() { super(); } public Object[] getElements(Object parent) { try { if (parent instanceof IPackageFragment) { IPackageFragment pack= (IPackageFragment) parent; ICompilationUnit[] cuArray= pack.getCompilationUnits(); ArrayList typesArrayList= new ArrayList(); for (int i= 0; i < cuArray.length; i++) { ICompilationUnit cu= cuArray[i]; IType[] types= cu.getTypes(); for (int j= 0; j < types.length; j++) { if (TestSearchEngine.isTestImplementor(types[j])) typesArrayList.add(types[j]); } } return typesArrayList.toArray(); } } catch (JavaModelException e) { e.printStackTrace(); } return new Object[0]; } public void dispose() { }
11,866
Bug 11866 Wrong labels in Update Test Suite dialog
"Test Classes to be included" is written with TestClasses (missing space) The status line talks about methods being selected instead of types. The action name is written together (TestSuite) instead of Test Suite
resolved fixed
790bdf0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:02:02Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteCreationWizardPage.java
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { } } /* * @see TypePage#evalMethods */ protected void createTypeMembers(IType type, IImportsStructure imports, IProgressMonitor monitor) throws CoreException { writeImports(imports); type.createMethod(getSuiteMethodString(), null, false, null); } public String getSuiteMethodString() throws JavaModelException { IPackageFragment pack= getPackageFragment(); String packName= pack.getElementName(); StringBuffer suite= new StringBuffer("public static Test suite () {TestSuite suite= new TestSuite(\"Test for "+((packName.equals(""))?"default package":packName)+"\");\n"); suite.append(getUpdatableString()); suite.append("\nreturn suite;}"); return suite.toString(); } public String getUpdatableString() throws JavaModelException { StringBuffer suite= new StringBuffer(); suite.append(startMarker+"\n"); Object[] checkedObjects= fClassesInSuiteTable.getCheckedElements(); for (int i= 0; i < checkedObjects.length; i++) { if (checkedObjects[i] instanceof IType) { IType testType= (IType) checkedObjects[i]; IMethod suiteMethod= testType.getMethod("suite", new String[] {}); if (!suiteMethod.exists()) { suite.append("suite.addTest(new TestSuite("+testType.getElementName()+".class));"); } else {
11,866
Bug 11866 Wrong labels in Update Test Suite dialog
"Test Classes to be included" is written with TestClasses (missing space) The status line talks about methods being selected instead of types. The action name is written together (TestSuite) instead of Test Suite
resolved fixed
790bdf0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:02:02Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteCreationWizardPage.java
suite.append("suite.addTest("+testType.getElementName()+".suite());"); } } } suite.append("\n"+endMarker); return suite.toString(); } public IRunnableWithProgress getRunnable() { return new IRunnableWithProgress() { public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { try { if (monitor == null) { monitor= new NullProgressMonitor(); } updateExistingClass(monitor); } catch (CoreException e) { throw new InvocationTargetException(e); } } }; } protected void updateExistingClass(IProgressMonitor monitor) throws CoreException, InterruptedException { try { IPackageFragment pack= getPackageFragment(); ICompilationUnit cu= pack.getCompilationUnit(getTypeName() + ".java"); if (!cu.exists()) { createType(monitor); fUpdatedExistingClassButton= false;
11,866
Bug 11866 Wrong labels in Update Test Suite dialog
"Test Classes to be included" is written with TestClasses (missing space) The status line talks about methods being selected instead of types. The action name is written together (TestSuite) instead of Test Suite
resolved fixed
790bdf0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:02:02Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteCreationWizardPage.java
return; } IType suiteType= cu.getType(getTypeName()); monitor.beginTask(Messages.getString("NewTestSuiteWizPage.createType.beginTask"), 10); IMethod suiteMethod= suiteType.getMethod("suite", new String[] {}); monitor.worked(1); String lineDelimiter= JUnitStubUtility.getLineDelimiterUsed(cu); if (suiteMethod.exists()) { ISourceRange range= suiteMethod.getSourceRange(); if (range != null) { IBuffer buf= cu.getBuffer(); String originalContent= buf.getText(range.getOffset(), range.getLength()); StringBuffer source= new StringBuffer(originalContent); int start= source.toString().indexOf(startMarker); if (start > -1) { int end= source.toString().indexOf(endMarker, start); if (end > -1) { monitor.subTask(Messages.getString("NewTestSuiteWizPage.createType.updating.suite_method")); monitor.worked(1); end += endMarker.length(); source.replace(start, end, getUpdatableString()); buf.replace(range.getOffset(), range.getLength(), source.toString()); cu.reconcile(); originalContent= buf.getText(0, buf.getLength());
11,866
Bug 11866 Wrong labels in Update Test Suite dialog
"Test Classes to be included" is written with TestClasses (missing space) The status line talks about methods being selected instead of types. The action name is written together (TestSuite) instead of Test Suite
resolved fixed
790bdf0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:02:02Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteCreationWizardPage.java
monitor.worked(1); String formattedContent= JUnitStubUtility.codeFormat(originalContent, 0, lineDelimiter); buf.replace(0, buf.getLength(), formattedContent); monitor.worked(1); cu.save(new SubProgressMonitor(monitor, 1), false); } else { cannotUpdateSuiteError(); } } else { cannotUpdateSuiteError(); } } else { MessageDialog.openError(getShell(), Messages.getString("NewTestSuiteWizPage.createType.updateErrorDialog.title"), Messages.getString("NewTestSuiteWizPage.createType.updateErrorDialog.message")); } } else { suiteType.createMethod(getSuiteMethodString(), null, true, monitor); ISourceRange range= cu.getSourceRange(); IBuffer buf= cu.getBuffer(); String originalContent= buf.getText(range.getOffset(), range.getLength()); monitor.worked(2); String formattedContent= JUnitStubUtility.codeFormat(originalContent, 0, lineDelimiter); buf.replace(range.getOffset(), range.getLength(), formattedContent); monitor.worked(1); cu.save(new SubProgressMonitor(monitor, 1), false); } monitor.done(); fUpdatedExistingClassButton= true; } catch (JavaModelException e) {
11,866
Bug 11866 Wrong labels in Update Test Suite dialog
"Test Classes to be included" is written with TestClasses (missing space) The status line talks about methods being selected instead of types. The action name is written together (TestSuite) instead of Test Suite
resolved fixed
790bdf0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:02:02Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteCreationWizardPage.java
e.printStackTrace(); } } public boolean hasUpdatedExistingClass() { return fUpdatedExistingClassButton; } private IStatus classesInSuiteChanged() { JUnitStatus status= new JUnitStatus(); if (fClassesInSuiteTable.getCheckedElements().length <= 0) status.setWarning(Messages.getString("NewTestSuiteWizPage.classes_in_suite.error.no_testclasses_selected")); return status; } private void updateSelectedClassesLabel() { int noOfClassesChecked= fClassesInSuiteTable.getCheckedElements().length; fSelectedClassesLabel.setText(noOfClassesChecked+((noOfClassesChecked==1)?SELECTED_CLASSES_LABEL_TEXT_ONE:SELECTED_CLASSES_LABEL_TEXT_MANY)); } protected void createSuiteNameControl(Composite composite, int nColumns) { fSuiteNameLabel= new Label(composite, SWT.LEFT | SWT.WRAP); fSuiteNameLabel.setFont(composite.getFont()); fSuiteNameLabel.setText(Messages.getString("NewTestSuiteWizPage.suiteName.text")); GridData gd= new GridData(); gd.horizontalSpan= 1; fSuiteNameLabel.setLayoutData(gd); fSuiteNameText= new Text(composite, SWT.SINGLE | SWT.BORDER); fSuiteNameText.setEnabled(true); fSuiteNameText.setFont(composite.getFont()); fSuiteNameText.addModifyListener(new ModifyListener() {
11,866
Bug 11866 Wrong labels in Update Test Suite dialog
"Test Classes to be included" is written with TestClasses (missing space) The status line talks about methods being selected instead of types. The action name is written together (TestSuite) instead of Test Suite
resolved fixed
790bdf0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:02:02Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteCreationWizardPage.java
public void modifyText(ModifyEvent e) { handleFieldChanged(SUITE_NAME); } }); gd= new GridData(); gd.horizontalAlignment= gd.FILL; gd.grabExcessHorizontalSpace= true; gd.horizontalSpan= nColumns - 2; fSuiteNameText.setLayoutData(gd); Label space= new Label(composite, SWT.LEFT); space.setText(" "); gd= new GridData(); gd.horizontalSpan= 1; space.setLayoutData(gd); } /** * Gets the type name. */ public String getTypeName() { return (fSuiteNameText==null)?fSuiteNameTextInitialValue:fSuiteNameText.getText(); } /** * Sets the type name. * @param canBeModified Selects if the type name can be changed by the user */ public void setTypeName(String name, boolean canBeModified) { if (fSuiteNameText == null) {
11,866
Bug 11866 Wrong labels in Update Test Suite dialog
"Test Classes to be included" is written with TestClasses (missing space) The status line talks about methods being selected instead of types. The action name is written together (TestSuite) instead of Test Suite
resolved fixed
790bdf0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:02:02Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteCreationWizardPage.java
fSuiteNameTextInitialValue= name; } else { fSuiteNameText.setText(name); fSuiteNameText.setEnabled(canBeModified); } } /** * Called when the type name has changed. * The method validates the type name and returns the status of the validation. * Can be extended to add more validation */ protected IStatus testSuiteChanged() { JUnitStatus status= new JUnitStatus(); String typeName= getTypeName(); if (typeName.length() == 0) { status.setError(Messages.getString("NewTestSuiteWizPage.typeName.error.name_empty")); return status; } if (typeName.indexOf('.') != -1) { status.setError(Messages.getString("NewTestSuiteWizPage.typeName.error.name_qualified")); return status; } IStatus val= JavaConventions.validateJavaTypeName(typeName); if (val.getSeverity() == IStatus.ERROR) { status.setError(Messages.getString("NewTestSuiteWizPage.typeName.error.name_not_valid")+val.getMessage()); return status; } else if (val.getSeverity() == IStatus.WARNING) { status.setWarning(Messages.getString("NewTestSuiteWizPage.typeName.error.name.name_discouraged")+val.getMessage());
11,866
Bug 11866 Wrong labels in Update Test Suite dialog
"Test Classes to be included" is written with TestClasses (missing space) The status line talks about methods being selected instead of types. The action name is written together (TestSuite) instead of Test Suite
resolved fixed
790bdf0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:02:02Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteCreationWizardPage.java
} IPackageFragment pack= getPackageFragment(); if (pack != null) { ICompilationUnit cu= pack.getCompilationUnit(typeName + ".java"); if (cu.exists()) { status.setWarning(Messages.getString("NewTestSuiteWizPage.typeName.warning.already_exists")); return status; } } return status; } /** * Sets the focus. */ protected void setFocus() { fSuiteNameText.setFocus(); } public void setCheckedElements(Object[] elements) { fClassesInSuiteTable.setCheckedElements(elements); } protected void cannotUpdateSuiteError() { MessageDialog.openError(getShell(), Messages.getString("NewTestSuiteWizPage.cannotUpdateDialog.title"), Messages.getFormattedString("NewTestSuiteWizPage.cannotUpdateDialog.message", new String[] {startMarker, endMarker})); } private void writeImports(IImportsStructure imports) { imports.addImport("junit.framework.Test"); imports.addImport("junit.framework.TestSuite"); }
11,866
Bug 11866 Wrong labels in Update Test Suite dialog
"Test Classes to be included" is written with TestClasses (missing space) The status line talks about methods being selected instead of types. The action name is written together (TestSuite) instead of Test Suite
resolved fixed
790bdf0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:02:02Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteCreationWizardPage.java
} /* } } }
11,866
Bug 11866 Wrong labels in Update Test Suite dialog
"Test Classes to be included" is written with TestClasses (missing space) The status line talks about methods being selected instead of types. The action name is written together (TestSuite) instead of Test Suite
resolved fixed
790bdf0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:02:02Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/UpdateTestSuite.java
/* * (c) Copyright 2001 MyCorporation. * All Rights Reserved. */ package org.eclipse.jdt.junit.wizards; import java.lang.reflect.InvocationTargetException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus;
11,866
Bug 11866 Wrong labels in Update Test Suite dialog
"Test Classes to be included" is written with TestClasses (missing space) The status line talks about methods being selected instead of types. The action name is written together (TestSuite) instead of Test Suite
resolved fixed
790bdf0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:02:02Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/UpdateTestSuite.java
import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.SubProgressMonitor; import org.eclipse.jdt.core.IBuffer; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IMethod; import org.eclipse.jdt.core.IPackageFragment; import org.eclipse.jdt.core.ISourceRange; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; import org.eclipse.jdt.internal.junit.ui.JUnitPlugin; import org.eclipse.jdt.internal.junit.util.*; import org.eclipse.jdt.internal.ui.dialogs.ISelectionValidator; import org.eclipse.jdt.ui.JavaElementLabelProvider; import org.eclipse.jface.action.IAction; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredContentProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IObjectActionDelegate; import org.eclipse.ui.IWorkbenchPart; /** * An object contribution action that updates existing AllTests classes. */ public class UpdateTestSuite implements IObjectActionDelegate {
11,866
Bug 11866 Wrong labels in Update Test Suite dialog
"Test Classes to be included" is written with TestClasses (missing space) The status line talks about methods being selected instead of types. The action name is written together (TestSuite) instead of Test Suite
resolved fixed
790bdf0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:02:02Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/UpdateTestSuite.java
private Shell fShell; private IPackageFragment fPack; private ICompilationUnit fTestSuite; private IMethod fSuiteMethod; private static boolean fEmptySelectionAllowed= false; private Object[] fSelectedTestCases; private class UpdateAllTestsValidator implements ISelectionValidator { /* * @see ISelectionValidator#validate(Object[]) */ public IStatus validate(Object[] selection) { int count= 0; for (int i= 0; i < selection.length; i++) { if (selection[i] instanceof IType) { count++; } } if (count == 0 && !fEmptySelectionAllowed) { return new JUnitStatus(IStatus.ERROR, ""); } String message; if (count == 1) { message= Messages.getFormattedString("UpdateAllTests.selected_methods.label_one", new Integer(count)); } else { message= Messages.getFormattedString("UpdateAllTests.selected_methods.label_many", new Integer(count)); } return new JUnitStatus(IStatus.INFO, message);
11,866
Bug 11866 Wrong labels in Update Test Suite dialog
"Test Classes to be included" is written with TestClasses (missing space) The status line talks about methods being selected instead of types. The action name is written together (TestSuite) instead of Test Suite
resolved fixed
790bdf0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:02:02Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/UpdateTestSuite.java
} } public UpdateTestSuite() { super(); } /* * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart) */ public void setActivePart(IAction action, IWorkbenchPart targetPart) { } /* * @see IActionDelegate#run(IAction) */ public void run(IAction action) { ILabelProvider lprovider= new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT); IStructuredContentProvider cprovider= new NewTestSuiteCreationWizardPage.ClassesInSuitContentProvider(); IType testSuiteType= JavaModelUtil.findPrimaryType(fTestSuite); fSuiteMethod= testSuiteType.getMethod("suite", new String[] {}); if (fSuiteMethod.exists()) { try { ISourceRange range= fSuiteMethod.getSourceRange(); IBuffer buf= fTestSuite.getBuffer(); String originalContent= buf.getText(range.getOffset(), range.getLength()); buf.close(); int start= originalContent.indexOf(NewTestSuiteCreationWizardPage.startMarker); if (start > -1) { if (originalContent.indexOf(NewTestSuiteCreationWizardPage.endMarker, start) > -1) { CheckedTableSelectionDialog dialog= new CheckedTableSelectionDialog(fShell, lprovider, cprovider); dialog.setValidator(new UpdateAllTestsValidator());
11,866
Bug 11866 Wrong labels in Update Test Suite dialog
"Test Classes to be included" is written with TestClasses (missing space) The status line talks about methods being selected instead of types. The action name is written together (TestSuite) instead of Test Suite
resolved fixed
790bdf0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:02:02Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/UpdateTestSuite.java
dialog.setTitle(Messages.getString("UpdateAllTests.title")); dialog.setMessage(Messages.getString("UpdateAllTests.message")); dialog.setInitialSelections(cprovider.getElements(fPack)); dialog.setSize(60, 25); dialog.setInput(fPack); if (dialog.open() == dialog.OK) { fSelectedTestCases= dialog.getResult(); ProgressMonitorDialog progressDialog= new ProgressMonitorDialog(fShell); try { progressDialog.run(false, false, getRunnable()); } catch (Exception e) { e.printStackTrace(); } } } else { cannotUpdateSuiteError(); } } else { cannotUpdateSuiteError(); } } catch (JavaModelException e) { e.printStackTrace(); } } else { noSuiteError(); } } /* * @see IActionDelegate#selectionChanged(IAction, ISelection) */
11,866
Bug 11866 Wrong labels in Update Test Suite dialog
"Test Classes to be included" is written with TestClasses (missing space) The status line talks about methods being selected instead of types. The action name is written together (TestSuite) instead of Test Suite
resolved fixed
790bdf0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:02:02Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/UpdateTestSuite.java
public void selectionChanged(IAction action, ISelection selection) { fShell= JUnitPlugin.getActiveWorkbenchShell(); if (selection instanceof IStructuredSelection) { Object testSuiteObj= ((IStructuredSelection) selection).getFirstElement(); if (testSuiteObj != null && testSuiteObj instanceof ICompilationUnit) { fTestSuite= (ICompilationUnit) testSuiteObj; IJavaElement packIJE= fTestSuite.getParent(); if (packIJE instanceof IPackageFragment) { fPack= (IPackageFragment) packIJE; } } } } private void updateTestCasesInSuite(IProgressMonitor monitor) { try { monitor.beginTask(Messages.getString("UpdateAllTests.beginTask"), 5); ISourceRange range= fSuiteMethod.getSourceRange(); IBuffer buf= fTestSuite.getBuffer(); String originalContent= buf.getText(range.getOffset(), range.getLength()); StringBuffer source= new StringBuffer(originalContent); int start= source.toString().indexOf(NewTestSuiteCreationWizardPage.startMarker); if (start > -1) { int end= source.toString().indexOf(NewTestSuiteCreationWizardPage.endMarker, start); if (end > -1) { monitor.worked(1);
11,866
Bug 11866 Wrong labels in Update Test Suite dialog
"Test Classes to be included" is written with TestClasses (missing space) The status line talks about methods being selected instead of types. The action name is written together (TestSuite) instead of Test Suite
resolved fixed
790bdf0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:02:02Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/UpdateTestSuite.java
end += NewTestSuiteCreationWizardPage.endMarker.length(); source.replace(start, end, getUpdatableString()); buf.replace(range.getOffset(), range.getLength(), source.toString()); monitor.worked(1); fTestSuite.reconcile(); originalContent= buf.getText(0, buf.getLength()); monitor.worked(1); String formattedContent= JUnitStubUtility.codeFormat( originalContent, 0, JUnitStubUtility.getLineDelimiterUsed(fTestSuite)); buf.replace(0, buf.getLength(), formattedContent); monitor.worked(1); fTestSuite.save(new SubProgressMonitor(monitor, 1), true); } } } catch (JavaModelException e) { e.printStackTrace(); } } public IRunnableWithProgress getRunnable() { return new IRunnableWithProgress() { public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { if (monitor == null) { monitor= new NullProgressMonitor(); } updateTestCasesInSuite(monitor);
11,866
Bug 11866 Wrong labels in Update Test Suite dialog
"Test Classes to be included" is written with TestClasses (missing space) The status line talks about methods being selected instead of types. The action name is written together (TestSuite) instead of Test Suite
resolved fixed
790bdf0
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:02:02Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/UpdateTestSuite.java
} }; } public String getUpdatableString() throws JavaModelException { StringBuffer suite= new StringBuffer(); suite.append(NewTestSuiteCreationWizardPage.startMarker+"\n"); for (int i= 0; i < fSelectedTestCases.length; i++) { if (fSelectedTestCases[i] instanceof IType) { IType testType= (IType) fSelectedTestCases[i]; IMethod suiteMethod= testType.getMethod("suite", new String[] {}); if (!suiteMethod.exists()) { suite.append("suite.addTest(new TestSuite("+testType.getElementName()+".class));"); } else { suite.append("suite.addTest("+testType.getElementName()+".suite());"); } } } suite.append("\n"+NewTestSuiteCreationWizardPage.endMarker); return suite.toString(); } private void cannotUpdateSuiteError() { MessageDialog.openError(fShell, Messages.getString("UpdateAllTests.cannotUpdate.errorDialog.title"), Messages.getFormattedString("UpdateAllTests.cannotUpdate.errorDialog.message", new String[] {NewTestSuiteCreationWizardPage.startMarker, NewTestSuiteCreationWizardPage.endMarker})); } private void noSuiteError() { MessageDialog.openError(fShell, Messages.getString("UpdateAllTests.cannotFind.errorDialog.title"), Messages.getString("UpdateAllTests.cannotFind.errorDialog.message")); } }
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizard.java
/* * (c) Copyright 2001 MyCorporation. * All Rights Reserved. */ package org.eclipse.jdt.junit.wizards; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.internal.junit.ui.JUnitPlugin; /** * A wizard for creating test cases. */ public class NewTestCaseCreationWizard extends JUnitWizard {
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizard.java
private NewTestCaseCreationWizardPage fPage; private NewTestCaseCreationWizardPage2 fPage2; public NewTestCaseCreationWizard() { super(); setWindowTitle("JUnit TestCase"); } /* * @see Wizard#createPages */ public void addPages() { super.addPages(); IWorkspace workspace= ResourcesPlugin.getWorkspace();
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizard.java
fPage= new NewTestCaseCreationWizardPage(); fPage2= new NewTestCaseCreationWizardPage2(fPage); addPage(fPage); fPage.init(getSelection(),fPage2); addPage(fPage2); } /* * @see Wizard#performFinish */ public boolean performFinish() { if (finishPage(fPage.getRunnable())) { IType newClass= fPage.getCreatedType(); ICompilationUnit cu= newClass.getCompilationUnit(); if (cu.isWorkingCopy()) { cu= (ICompilationUnit)cu.getOriginalElement(); } try { IResource resource= cu.getUnderlyingResource(); selectAndReveal(resource); openResource(resource); } catch (JavaModelException e) { JUnitPlugin.log(e); } return true; } return false; } }
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
package org.eclipse.jdt.junit.wizards; import java.util.ArrayList; import java.util.HashMap; import java.util.ListIterator; import org.eclipse.core.resources.IMarker; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.jdt.core.Flags; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IMethod; import org.eclipse.jdt.core.IPackageFragment; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.core.ISourceRange; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.ITypeHierarchy; import org.eclipse.jdt.core.JavaConventions; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.Signature; import org.eclipse.jdt.core.search.IJavaSearchScope; import org.eclipse.jdt.core.search.SearchEngine; import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings; import org.eclipse.jdt.internal.corext.codemanipulation.IImportsStructure;
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
import org.eclipse.jdt.internal.corext.util.JavaModelUtil; import org.eclipse.jdt.internal.junit.ui.JUnitPlugin; import org.eclipse.jdt.internal.junit.util.JUnitStatus; import org.eclipse.jdt.internal.junit.util.JUnitStubUtility; import org.eclipse.jdt.internal.junit.util.LayoutUtil; import org.eclipse.jdt.internal.junit.util.TestSearchEngine; import org.eclipse.jdt.internal.junit.util.JUnitStubUtility.GenStubSettings; import org.eclipse.jdt.internal.ui.preferences.JavaPreferencesSettings; import org.eclipse.jdt.internal.ui.util.SWTUtil; import org.eclipse.jdt.ui.IJavaElementSearchConstants; import org.eclipse.jdt.ui.JavaUI; import org.eclipse.jdt.ui.wizards.NewTypeWizardPage; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.swt.SWT; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Text; import org.eclipse.ui.dialogs.SelectionDialog; /** * The first page of the TestCase creation wizard. */ public class NewTestCaseCreationWizardPage extends NewTypeWizardPage {
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
protected final static String PAGE_NAME= "NewTestCaseCreationWizardPage"; protected final static String CLASS_TO_TEST= PAGE_NAME + ".classtotest"; protected final static String TEST_CLASS= PAGE_NAME + ".testclass"; protected final static String TEST_SUFFIX= "Test"; protected final static String SETUP= "setUp"; protected final static String TEARDOWN= "tearDown"; private String fDefaultClassToTest; private NewTestCaseCreationWizardPage2 fPage2; private SelectionButtonGroup fMethodStubsButtons; private IType fClassToTest; protected IStatus fClassToTestStatus; protected IStatus fTestClassStatus; private int fIndexOfFirstTestMethod; private Label fClassToTestLabel;
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
private Text fClassToTestText; private Button fClassToTestButton; private Label fTestClassLabel; private Text fTestClassText; private String fTestClassTextInitialValue; private IMethod[] fTestMethods; private IType fCreatedType; private boolean fFirstTime; public NewTestCaseCreationWizardPage() { super(true, PAGE_NAME); fFirstTime= true; fTestClassTextInitialValue= ""; setTitle(Messages.getString("NewTestClassWizPage.title")); setDescription(Messages.getString("NewTestClassWizPage.description")); String[] buttonNames= new String[] { "public static void main(Strin&g[] args)", Messages.getString("NewTestClassWizPage.methodStub.testRunner"), Messages.getString("NewTestClassWizPage.methodStub.setUp"), Messages.getString("NewTestClassWizPage.methodStub.tearDown") }; fMethodStubsButtons= new SelectionButtonGroup(SWT.CHECK, buttonNames, 1); fMethodStubsButtons.setLabelText(Messages.getString("NewTestClassWizPage.method.Stub.label")); fMethodStubsButtons.setSelectionGroupListener(new SelectionButtonGroup.SelectionButtonGroupListener() { public void groupChanged(SelectionButtonGroup field) { field.setEnabled(1, field.isSelected(0));
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
} }); fClassToTestStatus= new JUnitStatus(); fTestClassStatus= new JUnitStatus(); fDefaultClassToTest= ""; } /** * Should be called from the wizard with the input element. */ public void init(IStructuredSelection selection, NewTestCaseCreationWizardPage2 page2) { fPage2= page2; IJavaElement element= getInitialJavaElement(selection); initContainerPage(element); initTypePage(element); updateStatus(findMostSevereStatus()); if (element != null) { IType enclosingType= null; IPackageFragment pack= (IPackageFragment) JavaModelUtil.findElementOfKind(element, IJavaElement.PACKAGE_FRAGMENT); IType typeInCompUnit= (IType) JavaModelUtil.findElementOfKind(element, IJavaElement.TYPE); if (typeInCompUnit != null) { if (typeInCompUnit.getCompilationUnit() != null) { enclosingType= typeInCompUnit; } } else { ICompilationUnit cu= (ICompilationUnit) JavaModelUtil.findElementOfKind(element, IJavaElement.COMPILATION_UNIT);
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
if (cu != null) enclosingType= JavaModelUtil.findPrimaryType(cu); } if (enclosingType != null) { try { if (!TestSearchEngine.isTestImplementor(enclosingType)) { fDefaultClassToTest= enclosingType.getFullyQualifiedName(); } } catch (JavaModelException e) { JUnitPlugin.log(e); } } } fMethodStubsButtons.setSelection(0, false); fMethodStubsButtons.setSelection(1, false); fMethodStubsButtons.setEnabled(1, false); fMethodStubsButtons.setSelection(2, false); fMethodStubsButtons.setSelection(3, false); } /** * Finds the most severe error (if there is one) */ private IStatus findMostSevereStatus() { return NewTestCaseCreationWizardPage.getMostSevere(new IStatus[] { fContainerStatus, fPackageStatus, fTestClassStatus, fClassToTestStatus, fModifierStatus,
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
fSuperClassStatus }); } /* * @see ContainerPage#handleFieldChanged */ protected void handleFieldChanged(String fieldName) { super.handleFieldChanged(fieldName); if (fieldName.equals(CLASS_TO_TEST)) { fClassToTestStatus= classToTestClassChanged(); updateDefaultName(); } else if (fieldName.equals(SUPER)) { validateSuperClass(); } else if (fieldName.equals(TEST_CLASS)) { fTestClassStatus= testClassChanged(); } else if (fieldName.equals(PACKAGE) || fieldName.equals(CONTAINER)) { if (fieldName.equals(PACKAGE)) fPackageStatus= packageChanged(); if (!fFirstTime) { validateSuperClass(); fClassToTestStatus= classToTestClassChanged(); fTestClassStatus= testClassChanged(); } } updateStatus(findMostSevereStatus()); } protected void updateDefaultName() { String s= fClassToTestText.getText(); if (s.lastIndexOf('.') > -1) s= s.substring(s.lastIndexOf('.') + 1);
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
if (s.length() > 0) setTypeName(s + TEST_SUFFIX, true); } /* * @see IDialogPage#createControl(Composite) */ public void createControl(Composite parent) { initializeDialogUnits(parent); Composite composite= new Composite(parent, SWT.NONE); int nColumns= 4; GridLayout layout= new GridLayout(); layout.numColumns= nColumns; composite.setLayout(layout); createContainerControls(composite, nColumns); createPackageControls(composite, nColumns); createSeparator(composite, nColumns); createTestClassControls(composite, nColumns); createClassToTestControls(composite, nColumns); createSuperClassControls(composite, nColumns); createMethodStubSelectionControls(composite, nColumns); setSuperClass(JUnitPlugin.TEST_SUPERCLASS_NAME, true); setControl(composite); fClassToTestText.setText(fDefaultClassToTest);
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
setFocus(); } protected void createMethodStubSelectionControls(Composite composite, int nColumns) { LayoutUtil.setHorizontalSpan(fMethodStubsButtons.getLabelControl(composite), nColumns); LayoutUtil.createEmptySpace(composite,1); LayoutUtil.setHorizontalSpan(fMethodStubsButtons.getSelectionButtonsGroup(composite), nColumns - 1); } protected void createClassToTestControls(Composite composite, int nColumns) { fClassToTestLabel= new Label(composite, SWT.LEFT | SWT.WRAP); fClassToTestLabel.setFont(composite.getFont()); fClassToTestLabel.setText(Messages.getString("NewTestClassWizPage.class_to_test.label")); GridData gd= new GridData(); gd.horizontalSpan= 1; fClassToTestLabel.setLayoutData(gd); fClassToTestText= new Text(composite, SWT.SINGLE | SWT.BORDER); fClassToTestText.setEnabled(true); fClassToTestText.setFont(composite.getFont()); fClassToTestText.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { handleFieldChanged(CLASS_TO_TEST); } }); gd= new GridData(); gd.horizontalAlignment= gd.FILL; gd.grabExcessHorizontalSpace= true; gd.horizontalSpan= nColumns - 2; fClassToTestText.setLayoutData(gd); fClassToTestButton= new Button(composite, SWT.PUSH); fClassToTestButton.setText(Messages.getString("NewTestClassWizPage.class_to_test.browse"));
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
fClassToTestButton.setEnabled(true); fClassToTestButton.addSelectionListener(new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { classToTestButtonPressed(); } public void widgetSelected(SelectionEvent e) { classToTestButtonPressed(); } }); gd= new GridData(); gd.horizontalAlignment= gd.FILL; gd.grabExcessHorizontalSpace= false; gd.horizontalSpan= 1; gd.heightHint = SWTUtil.getButtonHeigthHint(fClassToTestButton); gd.widthHint = SWTUtil.getButtonWidthHint(fClassToTestButton); fClassToTestButton.setLayoutData(gd); } private void classToTestButtonPressed() { IType type= chooseClassToTestType(); if (type != null) { fClassToTestText.setText(JavaModelUtil.getFullyQualifiedName(type)); handleFieldChanged(CLASS_TO_TEST); } } private IType chooseClassToTestType() { IPackageFragmentRoot root= getPackageFragmentRoot(); if (root == null) return null; IJavaElement[] elements= new IJavaElement[] { root.getJavaProject() }; IJavaSearchScope scope= SearchEngine.createJavaSearchScope(elements);
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
IType type= null; try { SelectionDialog dialog= JavaUI.createTypeDialog(getShell(), getWizard().getContainer(), scope, IJavaElementSearchConstants.CONSIDER_CLASSES, false, null); dialog.setTitle(Messages.getString("NewTestClassWizPage.class_to_test.dialog.title")); dialog.setMessage(Messages.getString("NewTestClassWizPage.class_to_test.dialog.message")); dialog.open(); if (dialog.getReturnCode() != SelectionDialog.OK) return type; else { Object[] resultArray= dialog.getResult(); type= (IType) resultArray[0]; } } catch (JavaModelException e) { JUnitPlugin.log(e); } return type; } protected IStatus classToTestClassChanged() { fClassToTestButton.setEnabled(getPackageFragmentRoot() != null); IStatus status= validateClassToTest(); return status; } /** * Gets the content of the class to test text field. */ public String getClassToTestText() { return fClassToTestText.getText(); }
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
public IType getClassToTest() { return fClassToTest; } /** * Sets the class to test name. * @param canBeModified Selects if the super class can be changed by the user */ public void setClassToTest(String name) { fClassToTestText.setText(name); } /* * @see TypePage#evalMethods */ protected void createTypeMembers(IType type, IImportsStructure imports, IProgressMonitor monitor) throws CoreException { fIndexOfFirstTestMethod= 0; createConstructor(type); if (fMethodStubsButtons.isSelected(0)) createMain(type); if (fMethodStubsButtons.isSelected(2)) { createSetUp(type, imports); } if (fMethodStubsButtons.isSelected(3)) { createTearDown(type, imports); } if (isNextPageValid()) { createTestMethodStubs(type); }
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
} protected void createConstructor(IType type) throws JavaModelException { String constr= "public "+getTypeName()+"(String name) {super(name);}\n\n"; type.createMethod(constr, null, false, null); fIndexOfFirstTestMethod++; } protected void createMain(IType type) throws JavaModelException { StringBuffer main= new StringBuffer("public static void main(String[] args) {"); if (fMethodStubsButtons.isSelected(1)) { main.append("junit."); switch (fMethodStubsButtons.getComboSelection()) { case 0: main.append("textui"); break; case 1: main.append("swingui"); break; case 2 : main.append("awtui"); break; default : main.append("textui"); break; } main.append(".TestRunner.run(" + getTypeName() + ".class);"); } main.append("}\n"); type.createMethod(main.toString(), null, false, null); fIndexOfFirstTestMethod++; }
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
protected void createSetUp(IType type, IImportsStructure imports) throws JavaModelException { ITypeHierarchy typeHierarchy= null; IType[] superTypes= null; String setUp; IMethod methodTemplate= null; if (type.exists()) { typeHierarchy= type.newSupertypeHierarchy(null); superTypes= typeHierarchy.getAllSuperclasses(type); for (int i= 0; i < superTypes.length; i++) { if (superTypes[i].exists()) { IMethod testMethod= superTypes[i].getMethod(SETUP, new String[] {}); if (testMethod.exists()) { methodTemplate= testMethod; break; } } } } if (methodTemplate != null) { CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings(); GenStubSettings genStubSettings= new GenStubSettings(settings); genStubSettings.fCallSuper= true; genStubSettings.fMethodOverwrites= true; setUp= JUnitStubUtility.genStub(getTypeName(), methodTemplate, genStubSettings, imports); } else { setUp="/**\n * Sets up the fixture, for example, open a network connection.\n * This method is called before a test is executed.\n * @throws Exception\n */\n" + "protected void "+SETUP+"() throws Exception {}\n\n"; } type.createMethod(setUp, null, false, null); fIndexOfFirstTestMethod++;
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
} protected void createTearDown(IType type, IImportsStructure imports) throws JavaModelException { ITypeHierarchy typeHierarchy= null; IType[] superTypes= null; String tearDown; IMethod methodTemplate= null; if (type.exists()) { if (typeHierarchy == null) { typeHierarchy= type.newSupertypeHierarchy(null); superTypes= typeHierarchy.getAllSuperclasses(type); } for (int i= 0; i < superTypes.length; i++) { if (superTypes[i].exists()) { IMethod testM= superTypes[i].getMethod(TEARDOWN, new String[] {}); if (testM.exists()) { methodTemplate= testM; break; } } } } if (methodTemplate != null) { CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings(); GenStubSettings genStubSettings= new GenStubSettings(settings); genStubSettings.fCallSuper= true; genStubSettings.fMethodOverwrites= true; tearDown= JUnitStubUtility.genStub(getTypeName(), methodTemplate, genStubSettings, imports); } else { tearDown="/**\n * Tears down the fixture, for example, close a network connection.\n * This method is called after a test is executed.\n * @throws Exception\n */\n" +
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
"protected void "+TEARDOWN+"() throws Exception {}\n\n"; } type.createMethod(tearDown, null, false, null); fIndexOfFirstTestMethod++; } protected void createTestMethodStubs(IType type) throws JavaModelException { IMethod[] methods= fPage2.getCheckedMethods(); if (methods.length > 0) { ArrayList allMethods= new ArrayList(); IMethod[] allMethodsArray= fPage2.getAllMethods(); for (int i= 0; i < allMethodsArray.length; i++) { allMethods.add(allMethodsArray[i]); } ArrayList overloadedMethods= new ArrayList(); for (int i= 0; i < allMethods.size(); i++) { IMethod current= (IMethod) allMethods.get(i); String currentName= current.getElementName(); boolean currentAdded= false; for (ListIterator iter= allMethods.listIterator(i+1); iter.hasNext(); ) { IMethod iterMethod= (IMethod) iter.next(); if (iterMethod.getElementName().equals(currentName)) { if (!currentAdded) { overloadedMethods.add(current); currentAdded= true; } overloadedMethods.add(iterMethod); iter.remove(); }
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
} } /* used when for example both sum and Sum methods are present. Then * sum -> testSum * Sum -> testSum1 */ ArrayList newMethodsNames= new ArrayList(); for (int i = 0; i < methods.length; i++) { String elementName= methods[i].getElementName(); StringBuffer methodName= new StringBuffer(NewTestCaseCreationWizardPage2.PREFIX+Character.toUpperCase(elementName.charAt(0))+elementName.substring(1)); StringBuffer newMethod= new StringBuffer(); if (overloadedMethods.contains(methods[i])) { IMethod method= methods[i]; newMethod.append("/*\n * Test for "+Signature.toString(method.getReturnType())+" "+method.getElementName()+"("); String[] paramTypes= method.getParameterTypes(); if (paramTypes.length > 0) { if (paramTypes.length > 1) { for (int j= 0; j < paramTypes.length-1; j++) { newMethod.append(Signature.toString(paramTypes[j])+", "); } } newMethod.append(Signature.toString(paramTypes[paramTypes.length-1])); } newMethod.append(")\n */\n"); String[] params= methods[i].getParameterTypes(); for (int j= 0; j < params.length; j++) { String param= params[j]; int start= 0, end= param.length();
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
if (param.startsWith( (new Character(Signature.C_ARRAY)).toString() )) start= 1; if (param.endsWith((new Character(Signature.C_NAME_END)).toString() )) end--; if (param.startsWith((new Character(Signature.C_UNRESOLVED)).toString() ,start)) start++; else if (param.startsWith((new Character(Signature.C_RESOLVED)).toString() ,start)) { start++; String paramName= param.substring(start, end); if (paramName.indexOf('.') != -1) { start += paramName.lastIndexOf('.')+1; } } methodName.append(param.substring(start, end)); if (param.startsWith( (new Character(Signature.C_ARRAY)).toString() )) methodName.append("Array"); } } if (newMethodsNames.contains(methodName.toString())) methodName.append("1"); newMethodsNames.add(new String(methodName)); newMethod.append("public void "+methodName.toString()+"() {}\n\n"); type.createMethod(newMethod.toString(), null, false, null); }
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
} } protected static GridData gridDataForDefaultForTypeName(int span) { GridData gd= new GridData(); gd.horizontalSpan= span; return gd; } public static Control createEmptySpace(Composite parent, int span) { Label label= new Label(parent, SWT.LEFT); GridData gd= new GridData(); gd.horizontalAlignment= gd.BEGINNING; gd.grabExcessHorizontalSpace= false; gd.horizontalSpan= span; gd.horizontalIndent= 0; gd.widthHint= 0; gd.heightHint= 0; label.setLayoutData(gd); return label; } public void setVisible(boolean visible) { super.setVisible(visible); if (visible && fFirstTime) { handleFieldChanged(CLASS_TO_TEST); fFirstTime= false; } } public int getIndexOfFirstMethod() { return fIndexOfFirstTestMethod; }
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
/** * Creates a type using the current field values. */ public void createType(IProgressMonitor monitor) throws CoreException, InterruptedException { super.createType(monitor); if (fPage2.getCreateTasksButtonSelection()) { createTaskMarkers(); } } private void createTaskMarkers() throws CoreException { IType createdType= getCreatedType(); fTestMethods= createdType.getMethods(); ICompilationUnit cu= createdType.getCompilationUnit(); cu.save(null, false); IResource res= createdType.getCompilationUnit().getUnderlyingResource(); for (int i= getIndexOfFirstMethod(); i < fTestMethods.length; i++) { IMethod method= fTestMethods[i]; IMarker marker= res.createMarker("org.eclipse.jdt.junit.junit_task"); HashMap attributes= new HashMap(10); attributes.put(IMarker.PRIORITY, new Integer(IMarker.PRIORITY_NORMAL)); attributes.put(IMarker.MESSAGE, Messages.getFormattedString("NewTestClassWizPage.marker.message",method.getElementName())); ISourceRange markerRange= method.getSourceRange(); attributes.put(IMarker.CHAR_START, new Integer(markerRange.getOffset())); attributes.put(IMarker.CHAR_END, new Integer(markerRange.getOffset()+markerRange.getLength())); marker.setAttributes(attributes); } } private void validateSuperClass() { fMethodStubsButtons.setEnabled(2, true);
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
fMethodStubsButtons.setEnabled(3, true); String superClassName= getSuperClass(); if (superClassName != null && !superClassName.equals("") && getPackageFragmentRoot() != null) { try { IType type= NewTestCaseCreationWizardPage.resolveClassNameToType(getPackageFragmentRoot().getJavaProject(), getPackageFragment(), superClassName); JUnitStatus status = new JUnitStatus(); if (type == null) { status.setError(Messages.getString("NewTestClassWizPage.error.superclass.not_exist")); fSuperClassStatus= status; } else { if (type.isInterface()) { status.setError(Messages.getString("NewTestClassWizPage.error.superclass.is_interface")); fSuperClassStatus= status; } if (!TestSearchEngine.isTestImplementor(type)) { status.setError(Messages.getFormattedString("NewTestClassWizPage.error.superclass.not_implementing_test_interface", JUnitPlugin.TEST_INTERFACE_NAME)); fSuperClassStatus= status; } else { IMethod setupMethod= type.getMethod(SETUP, new String[] {}); IMethod teardownMethod= type.getMethod(TEARDOWN, new String[] {}); if (setupMethod.exists()) fMethodStubsButtons.setEnabled(2, !Flags.isFinal(setupMethod.getFlags())); if (teardownMethod.exists()) fMethodStubsButtons.setEnabled(3, !Flags.isFinal(teardownMethod.getFlags())); } } } catch (JavaModelException e) { JUnitPlugin.log(e); } }
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
} protected void createTestClassControls(Composite composite, int nColumns) { fTestClassLabel= new Label(composite, SWT.LEFT | SWT.WRAP); fTestClassLabel.setFont(composite.getFont()); fTestClassLabel.setText(Messages.getString("NewTestClassWizPage.testcase.label")); GridData gd= new GridData(); gd.horizontalSpan= 1; fTestClassLabel.setLayoutData(gd); fTestClassText= new Text(composite, SWT.SINGLE | SWT.BORDER); fTestClassText.setEnabled(true); fTestClassText.setFont(composite.getFont()); fTestClassText.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { handleFieldChanged(TEST_CLASS); } }); gd= new GridData(); gd.horizontalAlignment= gd.FILL; gd.grabExcessHorizontalSpace= true; gd.horizontalSpan= nColumns - 2; fTestClassText.setLayoutData(gd); Label space= new Label(composite, SWT.LEFT); space.setText(" "); gd= new GridData(); gd.horizontalSpan= 1; space.setLayoutData(gd); } /**
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
* Gets the type name. */ public String getTypeName() { return (fTestClassText==null)?fTestClassTextInitialValue:fTestClassText.getText(); } /** * Sets the type name. */ public void setTypeName(String name, boolean canBeModified) { if (fTestClassText == null) { fTestClassTextInitialValue= name; } else { fTestClassText.setText(name); fTestClassText.setEnabled(canBeModified); } } /** * Called when the type name has changed. * The method validates the type name and returns the status of the validation. * Can be extended to add more validation */ protected IStatus testClassChanged() { JUnitStatus status= new JUnitStatus(); String typeName= getTypeName(); if (typeName.length() == 0) { status.setError(Messages.getString("NewTestClassWizPage.error.testcase.name_empty")); return status;
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
} if (typeName.indexOf('.') != -1) { status.setError(Messages.getString("NewTestClassWizPage.error.testcase.name_qualified")); return status; } IStatus val= JavaConventions.validateJavaTypeName(typeName); if (val.getSeverity() == IStatus.ERROR) { status.setError(Messages.getString("NewTestClassWizPage.error.testcase.name_not_valid")+val.getMessage()); return status; } else if (val.getSeverity() == IStatus.WARNING) { status.setWarning(Messages.getString("NewTestClassWizPage.error.testcase.name_discouraged")+val.getMessage()); } IPackageFragment pack= getPackageFragment(); if (pack != null) { ICompilationUnit cu= pack.getCompilationUnit(typeName + ".java"); if (cu.exists()) { status.setError(Messages.getString("NewTestClassWizPage.error.testcase.already_exists")); return status; } } return status; } /** * @see WizardPage#getNextPage */ public boolean canFlipToNextPage() { return isPageComplete() && getNextPage() != null && isNextPageValid(); }
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
protected boolean isNextPageValid() { return !getClassToTestText().equals(""); } protected JUnitStatus validateClassToTest() { IPackageFragmentRoot root= getPackageFragmentRoot(); IPackageFragment pack= getPackageFragment(); String classToTestName= fClassToTestText.getText(); JUnitStatus status= new JUnitStatus(); fClassToTest= null; if (classToTestName.length() == 0) { return status; } IStatus val= JavaConventions.validateJavaTypeName(classToTestName); if (!val.isOK()) { status.setError(Messages.getString("NewTestClassWizPage.error.class_to_test.not_valid")); return status; } if (root != null) { try { IType type= NewTestCaseCreationWizardPage.resolveClassNameToType(root.getJavaProject(), pack, classToTestName); if (type == null) { status.setError(Messages.getString("NewTestClassWizPage.error.class_to_test.not_exist")); return status; } else { if (type.isInterface()) { status.setWarning(Messages.getFormattedString("NewTestClassWizPage.warning.class_to_test.is_interface",classToTestName));
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
return status; } if (pack != null && !JavaModelUtil.isVisible(type, pack)) { status.setWarning(Messages.getFormattedString("NewTestClassWizPage.warning.class_to_test.interface_not_visible",classToTestName)); return status; } } fClassToTest= type; } catch (JavaModelException e) { status.setError(Messages.getString("NewTestClassWizPage.error.class_to_test.not_valid")); } } else { status.setError(""); } return status; } static public IType resolveClassNameToType(IJavaProject jproject, IPackageFragment pack, String classToTestName) throws JavaModelException { IType type= null; if (type == null && pack != null) { String packName= pack.getElementName(); if (!pack.isDefaultPackage()) { type= JavaModelUtil.findType(jproject, packName, classToTestName); } if (type == null && !"java.lang".equals(packName)) { type= JavaModelUtil.findType(jproject, "java.lang", classToTestName); } }
11,863
Bug 11863 Update Test Suite action does not allow to remove
What the action actually does is RECREATE the test suite based on the selection in the dialog. I do an update on a test suite which contains X. It is no clear that if I only select Y in the dialog that I'll end up with X being removed. Normally "Update" shows the content of the existing stuff (dir, zip) and allows to modify this. I think renaming the action (and the dialog) to Recreate Test Suite would solve the problem.
resolved fixed
7b3c35c
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T12:54:45Z
2002-03-20T16:00:00Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
if (type == null) { type= JavaModelUtil.findType(jproject, classToTestName); } return type; } /** * Finds the most severe status from a array of stati. * An error is more severe than a warning, and a warning is more severe * than ok. */ public static IStatus getMostSevere(IStatus[] status) { IStatus max= null; for (int i= 0; i < status.length; i++) { IStatus curr= status[i]; if (curr.matches(IStatus.ERROR)) { return curr; } if (max == null || curr.getSeverity() > max.getSeverity()) { max= curr; } } return max; } /** * Sets the focus on the type name. */ protected void setFocus() { fTestClassText.setFocus(); } }
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizard.java
/* * (c) Copyright 2001 MyCorporation. * All Rights Reserved. */ package org.eclipse.jdt.junit.wizards; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.internal.junit.ui.JUnitPlugin; /** * A wizard for creating test cases. */ public class NewTestCaseCreationWizard extends JUnitWizard { private NewTestCaseCreationWizardPage fPage; private NewTestCaseCreationWizardPage2 fPage2; public NewTestCaseCreationWizard() { super(); setWindowTitle("JUnit TestCase"); } /* * @see Wizard#createPages */ public void addPages() { super.addPages();
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizard.java
IWorkspace workspace= ResourcesPlugin.getWorkspace(); fPage= new NewTestCaseCreationWizardPage(); fPage2= new NewTestCaseCreationWizardPage2(fPage); addPage(fPage); fPage.init(getSelection(),fPage2); addPage(fPage2); } /* * @see Wizard#performFinish */ public boolean performFinish() { if (finishPage(fPage.getRunnable())) { IType newClass= fPage.getCreatedType(); ICompilationUnit cu= newClass.getCompilationUnit(); if (cu.isWorkingCopy()) { cu= (ICompilationUnit)cu.getOriginalElement(); } try { IResource resource= cu.getUnderlyingResource(); selectAndReveal(resource); openResource(resource); } catch (JavaModelException e) { JUnitPlugin.log(e); } return true; } return false; } }
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
package org.eclipse.jdt.junit.wizards; import java.util.ArrayList; import java.util.HashMap; import java.util.ListIterator; import org.eclipse.core.resources.IMarker; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.jdt.core.Flags; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.IMethod; import org.eclipse.jdt.core.IPackageFragment; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.core.ISourceRange; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.ITypeHierarchy; import org.eclipse.jdt.core.JavaConventions; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.Signature; import org.eclipse.jdt.core.search.IJavaSearchScope; import org.eclipse.jdt.core.search.SearchEngine; import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings; import org.eclipse.jdt.internal.corext.codemanipulation.IImportsStructure;
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
import org.eclipse.jdt.internal.corext.util.JavaModelUtil; import org.eclipse.jdt.internal.junit.ui.JUnitPlugin; import org.eclipse.jdt.internal.junit.util.JUnitStatus; import org.eclipse.jdt.internal.junit.util.JUnitStubUtility; import org.eclipse.jdt.internal.junit.util.LayoutUtil; import org.eclipse.jdt.internal.junit.util.TestSearchEngine; import org.eclipse.jdt.internal.junit.util.JUnitStubUtility.GenStubSettings; import org.eclipse.jdt.internal.ui.preferences.JavaPreferencesSettings; import org.eclipse.jdt.internal.ui.util.SWTUtil; import org.eclipse.jdt.ui.IJavaElementSearchConstants; import org.eclipse.jdt.ui.JavaUI; import org.eclipse.jdt.ui.wizards.NewTypeWizardPage; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.swt.SWT; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Text; import org.eclipse.ui.dialogs.SelectionDialog; /** * The first page of the TestCase creation wizard. */ public class NewTestCaseCreationWizardPage extends NewTypeWizardPage {
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
protected final static String PAGE_NAME= "NewTestCaseCreationWizardPage"; protected final static String CLASS_TO_TEST= PAGE_NAME + ".classtotest"; protected final static String TEST_CLASS= PAGE_NAME + ".testclass"; protected final static String TEST_SUFFIX= "Test"; protected final static String SETUP= "setUp"; protected final static String TEARDOWN= "tearDown"; private String fDefaultClassToTest; private NewTestCaseCreationWizardPage2 fPage2; private SelectionButtonGroup fMethodStubsButtons; private IType fClassToTest; protected IStatus fClassToTestStatus; protected IStatus fTestClassStatus;
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
private int fIndexOfFirstTestMethod; private Label fClassToTestLabel; private Text fClassToTestText; private Button fClassToTestButton; private Label fTestClassLabel; private Text fTestClassText; private String fTestClassTextInitialValue; private IMethod[] fTestMethods; private IType fCreatedType; private boolean fFirstTime; public NewTestCaseCreationWizardPage() { super(true, PAGE_NAME); fFirstTime= true; fTestClassTextInitialValue= ""; setTitle(Messages.getString("NewTestClassWizPage.title")); setDescription(Messages.getString("NewTestClassWizPage.description")); String[] buttonNames= new String[] { "public static void main(Strin&g[] args)", Messages.getString("NewTestClassWizPage.methodStub.testRunner"), Messages.getString("NewTestClassWizPage.methodStub.setUp"), Messages.getString("NewTestClassWizPage.methodStub.tearDown") }; fMethodStubsButtons= new SelectionButtonGroup(SWT.CHECK, buttonNames, 1); fMethodStubsButtons.setLabelText(Messages.getString("NewTestClassWizPage.method.Stub.label")); fMethodStubsButtons.setSelectionGroupListener(new SelectionButtonGroup.SelectionButtonGroupListener() {
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
public void groupChanged(SelectionButtonGroup field) { field.setEnabled(1, field.isSelected(0)); } }); fClassToTestStatus= new JUnitStatus(); fTestClassStatus= new JUnitStatus(); fDefaultClassToTest= ""; } /** * Should be called from the wizard with the input element. */ public void init(IStructuredSelection selection, NewTestCaseCreationWizardPage2 page2) { fPage2= page2; IJavaElement element= getInitialJavaElement(selection); initContainerPage(element); initTypePage(element); updateStatus(findMostSevereStatus()); if (element != null) { IType enclosingType= null; IPackageFragment pack= (IPackageFragment) JavaModelUtil.findElementOfKind(element, IJavaElement.PACKAGE_FRAGMENT); IType typeInCompUnit= (IType) JavaModelUtil.findElementOfKind(element, IJavaElement.TYPE); if (typeInCompUnit != null) { if (typeInCompUnit.getCompilationUnit() != null) { enclosingType= typeInCompUnit; }
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
} else { ICompilationUnit cu= (ICompilationUnit) JavaModelUtil.findElementOfKind(element, IJavaElement.COMPILATION_UNIT); if (cu != null) enclosingType= JavaModelUtil.findPrimaryType(cu); } if (enclosingType != null) { try { if (!TestSearchEngine.isTestImplementor(enclosingType)) { fDefaultClassToTest= enclosingType.getFullyQualifiedName(); } } catch (JavaModelException e) { JUnitPlugin.log(e); } } } fMethodStubsButtons.setSelection(0, false); fMethodStubsButtons.setSelection(1, false); fMethodStubsButtons.setEnabled(1, false); fMethodStubsButtons.setSelection(2, false); fMethodStubsButtons.setSelection(3, false); } /** * Finds the most severe error (if there is one) */ private IStatus findMostSevereStatus() { return NewTestCaseCreationWizardPage.getMostSevere(new IStatus[] { fContainerStatus, fPackageStatus, fTestClassStatus,
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
fClassToTestStatus, fModifierStatus, fSuperClassStatus }); } /* * @see ContainerPage#handleFieldChanged */ protected void handleFieldChanged(String fieldName) { super.handleFieldChanged(fieldName); if (fieldName.equals(CLASS_TO_TEST)) { fClassToTestStatus= classToTestClassChanged(); updateDefaultName(); } else if (fieldName.equals(SUPER)) { validateSuperClass(); } else if (fieldName.equals(TEST_CLASS)) { fTestClassStatus= testClassChanged(); } else if (fieldName.equals(PACKAGE) || fieldName.equals(CONTAINER)) { if (fieldName.equals(PACKAGE)) fPackageStatus= packageChanged(); if (!fFirstTime) { validateSuperClass(); fClassToTestStatus= classToTestClassChanged(); fTestClassStatus= testClassChanged(); } } updateStatus(findMostSevereStatus()); } protected void updateDefaultName() { String s= fClassToTestText.getText();
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
if (s.lastIndexOf('.') > -1) s= s.substring(s.lastIndexOf('.') + 1); if (s.length() > 0) setTypeName(s + TEST_SUFFIX, true); } /* * @see IDialogPage#createControl(Composite) */ public void createControl(Composite parent) { initializeDialogUnits(parent); Composite composite= new Composite(parent, SWT.NONE); int nColumns= 4; GridLayout layout= new GridLayout(); layout.numColumns= nColumns; composite.setLayout(layout); createContainerControls(composite, nColumns); createPackageControls(composite, nColumns); createSeparator(composite, nColumns); createTestClassControls(composite, nColumns); createClassToTestControls(composite, nColumns); createSuperClassControls(composite, nColumns); createMethodStubSelectionControls(composite, nColumns); setSuperClass(JUnitPlugin.TEST_SUPERCLASS_NAME, true); setControl(composite);
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
fClassToTestText.setText(fDefaultClassToTest); setFocus(); } protected void createMethodStubSelectionControls(Composite composite, int nColumns) { LayoutUtil.setHorizontalSpan(fMethodStubsButtons.getLabelControl(composite), nColumns); LayoutUtil.createEmptySpace(composite,1); LayoutUtil.setHorizontalSpan(fMethodStubsButtons.getSelectionButtonsGroup(composite), nColumns - 1); } protected void createClassToTestControls(Composite composite, int nColumns) { fClassToTestLabel= new Label(composite, SWT.LEFT | SWT.WRAP); fClassToTestLabel.setFont(composite.getFont()); fClassToTestLabel.setText(Messages.getString("NewTestClassWizPage.class_to_test.label")); GridData gd= new GridData(); gd.horizontalSpan= 1; fClassToTestLabel.setLayoutData(gd); fClassToTestText= new Text(composite, SWT.SINGLE | SWT.BORDER); fClassToTestText.setEnabled(true); fClassToTestText.setFont(composite.getFont()); fClassToTestText.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { handleFieldChanged(CLASS_TO_TEST); } }); gd= new GridData(); gd.horizontalAlignment= gd.FILL; gd.grabExcessHorizontalSpace= true; gd.horizontalSpan= nColumns - 2; fClassToTestText.setLayoutData(gd);
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
fClassToTestButton= new Button(composite, SWT.PUSH); fClassToTestButton.setText(Messages.getString("NewTestClassWizPage.class_to_test.browse")); fClassToTestButton.setEnabled(true); fClassToTestButton.addSelectionListener(new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { classToTestButtonPressed(); } public void widgetSelected(SelectionEvent e) { classToTestButtonPressed(); } }); gd= new GridData(); gd.horizontalAlignment= gd.FILL; gd.grabExcessHorizontalSpace= false; gd.horizontalSpan= 1; gd.heightHint = SWTUtil.getButtonHeigthHint(fClassToTestButton); gd.widthHint = SWTUtil.getButtonWidthHint(fClassToTestButton); fClassToTestButton.setLayoutData(gd); } private void classToTestButtonPressed() { IType type= chooseClassToTestType(); if (type != null) { fClassToTestText.setText(JavaModelUtil.getFullyQualifiedName(type)); handleFieldChanged(CLASS_TO_TEST); } } private IType chooseClassToTestType() { IPackageFragmentRoot root= getPackageFragmentRoot(); if (root == null) return null;
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
IJavaElement[] elements= new IJavaElement[] { root.getJavaProject() }; IJavaSearchScope scope= SearchEngine.createJavaSearchScope(elements); IType type= null; try { SelectionDialog dialog= JavaUI.createTypeDialog(getShell(), getWizard().getContainer(), scope, IJavaElementSearchConstants.CONSIDER_CLASSES, false, null); dialog.setTitle(Messages.getString("NewTestClassWizPage.class_to_test.dialog.title")); dialog.setMessage(Messages.getString("NewTestClassWizPage.class_to_test.dialog.message")); dialog.open(); if (dialog.getReturnCode() != SelectionDialog.OK) return type; else { Object[] resultArray= dialog.getResult(); type= (IType) resultArray[0]; } } catch (JavaModelException e) { JUnitPlugin.log(e); } return type; } protected IStatus classToTestClassChanged() { fClassToTestButton.setEnabled(getPackageFragmentRoot() != null); IStatus status= validateClassToTest(); return status; } /** * Gets the content of the class to test text field. */ public String getClassToTestText() { return fClassToTestText.getText();
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
} public IType getClassToTest() { return fClassToTest; } /** * Sets the class to test name. * @param canBeModified Selects if the super class can be changed by the user */ public void setClassToTest(String name) { fClassToTestText.setText(name); } /* * @see TypePage#evalMethods */ protected void createTypeMembers(IType type, IImportsStructure imports, IProgressMonitor monitor) throws CoreException { fIndexOfFirstTestMethod= 0; createConstructor(type); if (fMethodStubsButtons.isSelected(0)) createMain(type); if (fMethodStubsButtons.isSelected(2)) { createSetUp(type, imports); } if (fMethodStubsButtons.isSelected(3)) { createTearDown(type, imports); } if (isNextPageValid()) {
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
createTestMethodStubs(type); } } protected void createConstructor(IType type) throws JavaModelException { String constr= "public "+getTypeName()+"(String name) {super(name);}\n\n"; type.createMethod(constr, null, false, null); fIndexOfFirstTestMethod++; } protected void createMain(IType type) throws JavaModelException { StringBuffer main= new StringBuffer("public static void main(String[] args) {"); if (fMethodStubsButtons.isSelected(1)) { main.append("junit."); switch (fMethodStubsButtons.getComboSelection()) { case 0: main.append("textui"); break; case 1: main.append("swingui"); break; case 2 : main.append("awtui"); break; default : main.append("textui"); break; } main.append(".TestRunner.run(" + getTypeName() + ".class);"); } main.append("}\n"); type.createMethod(main.toString(), null, false, null);
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
fIndexOfFirstTestMethod++; } protected void createSetUp(IType type, IImportsStructure imports) throws JavaModelException { ITypeHierarchy typeHierarchy= null; IType[] superTypes= null; String setUp; IMethod methodTemplate= null; if (type.exists()) { typeHierarchy= type.newSupertypeHierarchy(null); superTypes= typeHierarchy.getAllSuperclasses(type); for (int i= 0; i < superTypes.length; i++) { if (superTypes[i].exists()) { IMethod testMethod= superTypes[i].getMethod(SETUP, new String[] {}); if (testMethod.exists()) { methodTemplate= testMethod; break; } } } } if (methodTemplate != null) { CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings(); GenStubSettings genStubSettings= new GenStubSettings(settings); genStubSettings.fCallSuper= true; genStubSettings.fMethodOverwrites= true; setUp= JUnitStubUtility.genStub(getTypeName(), methodTemplate, genStubSettings, imports); } else { setUp="/**\n * Sets up the fixture, for example, open a network connection.\n * This method is called before a test is executed.\n * @throws Exception\n */\n" + "protected void "+SETUP+"() throws Exception {}\n\n"; }
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
type.createMethod(setUp, null, false, null); fIndexOfFirstTestMethod++; } protected void createTearDown(IType type, IImportsStructure imports) throws JavaModelException { ITypeHierarchy typeHierarchy= null; IType[] superTypes= null; String tearDown; IMethod methodTemplate= null; if (type.exists()) { if (typeHierarchy == null) { typeHierarchy= type.newSupertypeHierarchy(null); superTypes= typeHierarchy.getAllSuperclasses(type); } for (int i= 0; i < superTypes.length; i++) { if (superTypes[i].exists()) { IMethod testM= superTypes[i].getMethod(TEARDOWN, new String[] {}); if (testM.exists()) { methodTemplate= testM; break; } } } } if (methodTemplate != null) { CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings(); GenStubSettings genStubSettings= new GenStubSettings(settings); genStubSettings.fCallSuper= true; genStubSettings.fMethodOverwrites= true; tearDown= JUnitStubUtility.genStub(getTypeName(), methodTemplate, genStubSettings, imports);
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
} else { tearDown="/**\n * Tears down the fixture, for example, close a network connection.\n * This method is called after a test is executed.\n * @throws Exception\n */\n" + "protected void "+TEARDOWN+"() throws Exception {}\n\n"; } type.createMethod(tearDown, null, false, null); fIndexOfFirstTestMethod++; } protected void createTestMethodStubs(IType type) throws JavaModelException { IMethod[] methods= fPage2.getCheckedMethods(); if (methods.length > 0) { ArrayList allMethods= new ArrayList(); IMethod[] allMethodsArray= fPage2.getAllMethods(); for (int i= 0; i < allMethodsArray.length; i++) { allMethods.add(allMethodsArray[i]); } ArrayList overloadedMethods= new ArrayList(); for (int i= 0; i < allMethods.size(); i++) { IMethod current= (IMethod) allMethods.get(i); String currentName= current.getElementName(); boolean currentAdded= false; for (ListIterator iter= allMethods.listIterator(i+1); iter.hasNext(); ) { IMethod iterMethod= (IMethod) iter.next(); if (iterMethod.getElementName().equals(currentName)) { if (!currentAdded) { overloadedMethods.add(current); currentAdded= true; } overloadedMethods.add(iterMethod);
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
iter.remove(); } } } /* used when for example both sum and Sum methods are present. Then * sum -> testSum * Sum -> testSum1 */ ArrayList newMethodsNames= new ArrayList(); for (int i = 0; i < methods.length; i++) { String elementName= methods[i].getElementName(); StringBuffer methodName= new StringBuffer(NewTestCaseCreationWizardPage2.PREFIX+Character.toUpperCase(elementName.charAt(0))+elementName.substring(1)); StringBuffer newMethod= new StringBuffer(); if (overloadedMethods.contains(methods[i])) { IMethod method= methods[i]; newMethod.append("/*\n * Test for "+Signature.toString(method.getReturnType())+" "+method.getElementName()+"("); String[] paramTypes= method.getParameterTypes(); if (paramTypes.length > 0) { if (paramTypes.length > 1) { for (int j= 0; j < paramTypes.length-1; j++) { newMethod.append(Signature.toString(paramTypes[j])+", "); } } newMethod.append(Signature.toString(paramTypes[paramTypes.length-1])); } newMethod.append(")\n */\n"); String[] params= methods[i].getParameterTypes(); for (int j= 0; j < params.length; j++) {
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
String param= params[j]; int start= 0, end= param.length(); if (param.startsWith( (new Character(Signature.C_ARRAY)).toString() )) start= 1; if (param.endsWith((new Character(Signature.C_NAME_END)).toString() )) end--; if (param.startsWith((new Character(Signature.C_UNRESOLVED)).toString() ,start) || param.startsWith((new Character(Signature.C_RESOLVED)).toString() ,start)) start++; String paramName= param.substring(start, end); if (paramName.indexOf('.') != -1) { start += paramName.lastIndexOf('.')+1; } methodName.append(param.substring(start, end)); if (param.startsWith( (new Character(Signature.C_ARRAY)).toString() )) methodName.append("Array"); } } if (newMethodsNames.contains(methodName.toString())) methodName.append("1"); newMethodsNames.add(new String(methodName)); newMethod.append("public void "+methodName.toString()+"() {}\n\n"); type.createMethod(newMethod.toString(), null, false, null); }
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
} } protected static GridData gridDataForDefaultForTypeName(int span) { GridData gd= new GridData(); gd.horizontalSpan= span; return gd; } public static Control createEmptySpace(Composite parent, int span) { Label label= new Label(parent, SWT.LEFT); GridData gd= new GridData(); gd.horizontalAlignment= gd.BEGINNING; gd.grabExcessHorizontalSpace= false; gd.horizontalSpan= span; gd.horizontalIndent= 0; gd.widthHint= 0; gd.heightHint= 0; label.setLayoutData(gd); return label; } public void setVisible(boolean visible) { super.setVisible(visible); if (visible && fFirstTime) { handleFieldChanged(CLASS_TO_TEST); fFirstTime= false; } } public int getIndexOfFirstMethod() { return fIndexOfFirstTestMethod; }
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
/** * Creates a type using the current field values. */ public void createType(IProgressMonitor monitor) throws CoreException, InterruptedException { super.createType(monitor); if (fPage2.getCreateTasksButtonSelection()) { createTaskMarkers(); } } private void createTaskMarkers() throws CoreException { IType createdType= getCreatedType(); fTestMethods= createdType.getMethods(); ICompilationUnit cu= createdType.getCompilationUnit(); cu.save(null, false); IResource res= createdType.getCompilationUnit().getUnderlyingResource(); for (int i= getIndexOfFirstMethod(); i < fTestMethods.length; i++) { IMethod method= fTestMethods[i]; IMarker marker= res.createMarker("org.eclipse.jdt.junit.junit_task"); HashMap attributes= new HashMap(10); attributes.put(IMarker.PRIORITY, new Integer(IMarker.PRIORITY_NORMAL)); attributes.put(IMarker.MESSAGE, Messages.getFormattedString("NewTestClassWizPage.marker.message",method.getElementName())); ISourceRange markerRange= method.getSourceRange(); attributes.put(IMarker.CHAR_START, new Integer(markerRange.getOffset())); attributes.put(IMarker.CHAR_END, new Integer(markerRange.getOffset()+markerRange.getLength())); marker.setAttributes(attributes); } } private void validateSuperClass() { fMethodStubsButtons.setEnabled(2, true);
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
fMethodStubsButtons.setEnabled(3, true); String superClassName= getSuperClass(); if (superClassName != null && !superClassName.equals("") && getPackageFragmentRoot() != null) { try { IType type= NewTestCaseCreationWizardPage.resolveClassNameToType(getPackageFragmentRoot().getJavaProject(), getPackageFragment(), superClassName); JUnitStatus status = new JUnitStatus(); if (type == null) { status.setError(Messages.getString("NewTestClassWizPage.error.superclass.not_exist")); fSuperClassStatus= status; } else { if (type.isInterface()) { status.setError(Messages.getString("NewTestClassWizPage.error.superclass.is_interface")); fSuperClassStatus= status; } if (!TestSearchEngine.isTestImplementor(type)) { status.setError(Messages.getFormattedString("NewTestClassWizPage.error.superclass.not_implementing_test_interface", JUnitPlugin.TEST_INTERFACE_NAME)); fSuperClassStatus= status; } else { IMethod setupMethod= type.getMethod(SETUP, new String[] {}); IMethod teardownMethod= type.getMethod(TEARDOWN, new String[] {}); if (setupMethod.exists()) fMethodStubsButtons.setEnabled(2, !Flags.isFinal(setupMethod.getFlags())); if (teardownMethod.exists()) fMethodStubsButtons.setEnabled(3, !Flags.isFinal(teardownMethod.getFlags())); } } } catch (JavaModelException e) { JUnitPlugin.log(e); } }
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
} protected void createTestClassControls(Composite composite, int nColumns) { fTestClassLabel= new Label(composite, SWT.LEFT | SWT.WRAP); fTestClassLabel.setFont(composite.getFont()); fTestClassLabel.setText(Messages.getString("NewTestClassWizPage.testcase.label")); GridData gd= new GridData(); gd.horizontalSpan= 1; fTestClassLabel.setLayoutData(gd); fTestClassText= new Text(composite, SWT.SINGLE | SWT.BORDER); fTestClassText.setEnabled(true); fTestClassText.setFont(composite.getFont()); fTestClassText.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { handleFieldChanged(TEST_CLASS); } }); gd= new GridData(); gd.horizontalAlignment= gd.FILL; gd.grabExcessHorizontalSpace= true; gd.horizontalSpan= nColumns - 2; fTestClassText.setLayoutData(gd); Label space= new Label(composite, SWT.LEFT); space.setText(" "); gd= new GridData(); gd.horizontalSpan= 1; space.setLayoutData(gd); } /**
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
* Gets the type name. */ public String getTypeName() { return (fTestClassText==null)?fTestClassTextInitialValue:fTestClassText.getText(); } /** * Sets the type name. */ public void setTypeName(String name, boolean canBeModified) { if (fTestClassText == null) { fTestClassTextInitialValue= name; } else { fTestClassText.setText(name); fTestClassText.setEnabled(canBeModified); } } /** * Called when the type name has changed. * The method validates the type name and returns the status of the validation. * Can be extended to add more validation */ protected IStatus testClassChanged() { JUnitStatus status= new JUnitStatus(); String typeName= getTypeName(); if (typeName.length() == 0) { status.setError(Messages.getString("NewTestClassWizPage.error.testcase.name_empty")); return status;
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
} if (typeName.indexOf('.') != -1) { status.setError(Messages.getString("NewTestClassWizPage.error.testcase.name_qualified")); return status; } IStatus val= JavaConventions.validateJavaTypeName(typeName); if (val.getSeverity() == IStatus.ERROR) { status.setError(Messages.getString("NewTestClassWizPage.error.testcase.name_not_valid")+val.getMessage()); return status; } else if (val.getSeverity() == IStatus.WARNING) { status.setWarning(Messages.getString("NewTestClassWizPage.error.testcase.name_discouraged")+val.getMessage()); } IPackageFragment pack= getPackageFragment(); if (pack != null) { ICompilationUnit cu= pack.getCompilationUnit(typeName + ".java"); if (cu.exists()) { status.setError(Messages.getString("NewTestClassWizPage.error.testcase.already_exists")); return status; } } return status; } /** * @see WizardPage#getNextPage */ public boolean canFlipToNextPage() { return isPageComplete() && getNextPage() != null && isNextPageValid(); }
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
protected boolean isNextPageValid() { return !getClassToTestText().equals(""); } protected JUnitStatus validateClassToTest() { IPackageFragmentRoot root= getPackageFragmentRoot(); IPackageFragment pack= getPackageFragment(); String classToTestName= fClassToTestText.getText(); JUnitStatus status= new JUnitStatus(); fClassToTest= null; if (classToTestName.length() == 0) { return status; } IStatus val= JavaConventions.validateJavaTypeName(classToTestName); if (!val.isOK()) { status.setError(Messages.getString("NewTestClassWizPage.error.class_to_test.not_valid")); return status; } if (root != null) { try { IType type= NewTestCaseCreationWizardPage.resolveClassNameToType(root.getJavaProject(), pack, classToTestName); if (type == null) { status.setError(Messages.getString("NewTestClassWizPage.error.class_to_test.not_exist")); return status; } else { if (type.isInterface()) { status.setWarning(Messages.getFormattedString("NewTestClassWizPage.warning.class_to_test.is_interface",classToTestName));
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
return status; } if (pack != null && !JavaModelUtil.isVisible(type, pack)) { status.setWarning(Messages.getFormattedString("NewTestClassWizPage.warning.class_to_test.interface_not_visible",classToTestName)); return status; } } fClassToTest= type; } catch (JavaModelException e) { status.setError(Messages.getString("NewTestClassWizPage.error.class_to_test.not_valid")); } } else { status.setError(""); } return status; } static public IType resolveClassNameToType(IJavaProject jproject, IPackageFragment pack, String classToTestName) throws JavaModelException { IType type= null; if (type == null && pack != null) { String packName= pack.getElementName(); if (!pack.isDefaultPackage()) { type= JavaModelUtil.findType(jproject, packName, classToTestName); } if (type == null && !"java.lang".equals(packName)) { type= JavaModelUtil.findType(jproject, "java.lang", classToTestName); } }
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
if (type == null) { type= JavaModelUtil.findType(jproject, classToTestName); } return type; } /** * Finds the most severe status from a array of stati. * An error is more severe than a warning, and a warning is more severe * than ok. */ public static IStatus getMostSevere(IStatus[] status) { IStatus max= null; for (int i= 0; i < status.length; i++) { IStatus curr= status[i]; if (curr.matches(IStatus.ERROR)) { return curr; } if (max == null || curr.getSeverity() > max.getSeverity()) { max= curr; } } return max; } /** * Sets the focus on the type name. */ protected void setFocus() { fTestClassText.setFocus(); } }
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/SelectionButtonGroup.java
/* * (c) Copyright 2001 MyCorporation. * All Rights Reserved. */ package org.eclipse.jdt.junit.wizards; import org.eclipse.jdt.internal.junit.util.*; import org.eclipse.jface.util.Assert; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Combo; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Label; /** * A group of controls used in the JUnit TestCase wizard. */ public class SelectionButtonGroup {
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/SelectionButtonGroup.java
private Label fLabel; protected String fLabelText; private SelectionButtonGroupListener fGroupListener; private boolean fEnabled; private Composite fButtonComposite; private Button[] fButtons; private String[] fButtonNames; private boolean[] fButtonsSelected; private boolean[] fButtonsEnabled; private Combo fMainCombo; private boolean fMainComboEnabled; private int fGroupBorderStyle; private int fGroupNumberOfColumns; private int fButtonsStyle; public interface SelectionButtonGroupListener {
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/SelectionButtonGroup.java
/** * The dialog field has changed. */ void groupChanged(SelectionButtonGroup field); } /** * Creates a group without border. */ public SelectionButtonGroup(int buttonsStyle, String[] buttonNames, int nColumns) { this(buttonsStyle, buttonNames, nColumns, SWT.NONE); } /** * Creates a group with border (label in border). * Accepted button styles are: SWT.RADIO, SWT.CHECK, SWT.TOGGLE * For border styles see <code>Group</code> */ public SelectionButtonGroup(int buttonsStyle, String[] buttonNames, int nColumns, int borderStyle) {
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/SelectionButtonGroup.java
fEnabled= true; fLabel= null; fLabelText= ""; Assert.isTrue(buttonsStyle == SWT.RADIO || buttonsStyle == SWT.CHECK || buttonsStyle == SWT.TOGGLE); fButtonNames= buttonNames; int nButtons= buttonNames.length; fButtonsSelected= new boolean[nButtons]; fButtonsEnabled= new boolean[nButtons]; for (int i= 0; i < nButtons; i++) { fButtonsSelected[i]= false; fButtonsEnabled[i]= true; } fMainComboEnabled= true; if (fButtonsStyle == SWT.RADIO) { fButtonsSelected[0]= true; } fGroupBorderStyle= borderStyle; fGroupNumberOfColumns= (nColumns <= 0) ? nButtons : nColumns; fButtonsStyle= buttonsStyle; } /* * @see DialogField#doFillIntoGrid */ public Control[] doFillIntoGrid(Composite parent, int nColumns) { assertEnoughColumns(nColumns);
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/SelectionButtonGroup.java
if (fGroupBorderStyle == SWT.NONE) { Label label= getLabelControl(parent); label.setLayoutData(gridDataForLabel(1)); Composite buttonsgroup= getSelectionButtonsGroup(parent); GridData gd= new GridData(); gd.horizontalSpan= nColumns - 1; buttonsgroup.setLayoutData(gd); return new Control[] { label, buttonsgroup }; } else { Composite buttonsgroup= getSelectionButtonsGroup(parent); GridData gd= new GridData(); gd.horizontalSpan= nColumns; buttonsgroup.setLayoutData(gd); return new Control[] { buttonsgroup }; } } /* * @see DialogField#doFillIntoGrid */ public int getNumberOfControls() { return (fGroupBorderStyle == SWT.NONE) ? 2 : 1; } private Button createSelectionButton(int index, Composite group, SelectionListener listener) { Button button= new Button(group, fButtonsStyle | SWT.LEFT); button.setFont(group.getFont()); button.setText(fButtonNames[index]); button.setEnabled(isEnabled() && fButtonsEnabled[index]);
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/SelectionButtonGroup.java
button.setSelection(fButtonsSelected[index]); button.addSelectionListener(listener); button.setLayoutData(new GridData()); return button; } private Button createMainCombo(int index, Composite group, SelectionListener listener) { Composite buttonComboGroup= new Composite(group, 0); GridLayout layout= new GridLayout(); layout.marginHeight= 0; layout.marginWidth= 20; layout.numColumns= 2; buttonComboGroup.setLayout(layout); Button button= new Button(buttonComboGroup, fButtonsStyle | SWT.LEFT); button.setFont(group.getFont()); button.setText(fButtonNames[index]); button.setEnabled(isEnabled() && fButtonsEnabled[index]); button.setSelection(fButtonsSelected[index]); button.addSelectionListener(listener); button.setLayoutData(new GridData()); fMainCombo= new Combo(buttonComboGroup, SWT.READ_ONLY); fMainCombo.setItems(new String[] {"text ui","swing ui","awt ui"}); fMainCombo.select(0); fMainCombo.setEnabled(isEnabled() && fMainComboEnabled); fMainCombo.setFont(group.getFont()); fMainCombo.setLayoutData(new GridData()); return button; } /**
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/SelectionButtonGroup.java
* Returns the group widget. When called the first time, the widget will be created. * @param The parent composite when called the first time, or <code>null</code> * after. */ public Composite getSelectionButtonsGroup(Composite parent) { if (fButtonComposite == null) { assertCompositeNotNull(parent); GridLayout layout= new GridLayout(); layout.makeColumnsEqualWidth= true; layout.numColumns= fGroupNumberOfColumns; if (fGroupBorderStyle != SWT.NONE) { Group group= new Group(parent, fGroupBorderStyle); if (fLabelText != null && fLabelText.length() > 0) { group.setText(fLabelText); } fButtonComposite= group; } else { fButtonComposite= new Composite(parent, SWT.NULL); layout.marginHeight= 0; layout.marginWidth= 0; } fButtonComposite.setLayout(layout); SelectionListener listener= new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { doWidgetSelected(e); } public void widgetSelected(SelectionEvent e) {
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/SelectionButtonGroup.java
doWidgetSelected(e); } }; int nButtons= fButtonNames.length; fButtons= new Button[nButtons]; fButtons[0]= createSelectionButton(0, fButtonComposite, listener); fButtons[1]= createMainCombo(1, fButtonComposite, listener); for (int i= 2; i < nButtons; i++) { fButtons[i]= createSelectionButton(i, fButtonComposite, listener); } int nRows= nButtons / fGroupNumberOfColumns; int nFillElements= nRows * fGroupNumberOfColumns - nButtons; for (int i= 0; i < nFillElements; i++) { createEmptySpace(fButtonComposite); } } return fButtonComposite; } /** * Returns a button from the group or <code>null</code> if not yet created. */ public Button getSelectionButton(int index) { if (index >= 0 && index < fButtons.length) { return fButtons[index]; } return null; } private void doWidgetSelected(SelectionEvent e) { Button button= (Button)e.widget;
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/SelectionButtonGroup.java
for (int i= 0; i < fButtons.length; i++) { if (fButtons[i] == button) { fButtonsSelected[i]= button.getSelection(); dialogFieldChanged(); return; } } } /** * Returns the selection state of a button contained in the group. * @param The index of the button */ public boolean isSelected(int index) { if (index >= 0 && index < fButtonsSelected.length) { return fButtonsSelected[index]; } return false; } /** * Sets the selection state of a button contained in the group. */ public void setSelection(int index, boolean selected) { if (index >= 0 && index < fButtonsSelected.length) { if (fButtonsSelected[index] != selected) { fButtonsSelected[index]= selected; if (fButtons != null) { Button button= fButtons[index]; if (isOkToUse(button)) {
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/SelectionButtonGroup.java
button.setSelection(selected); } } } } } /** * Returns the enabled state of a button contained in the group. * @param The index of the button */ public boolean isEnabled(int index) { if (index >= 0 && index < fButtonsEnabled.length) { return fButtonsEnabled[index]; } return false; } /** * Sets the selection state of a button contained in the group. */ public void setEnabled(int index, boolean enabled) { if (index >= 0 && index < fButtonsEnabled.length) { if (fButtonsEnabled[index] != enabled) { fButtonsEnabled[index]= enabled; if (index == 1) fMainComboEnabled= enabled; if (fButtons != null) { Button button= fButtons[index]; if (isOkToUse(button)) { button.setEnabled(enabled);
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/SelectionButtonGroup.java
if (index == 1) fMainCombo.setEnabled(enabled); } } } } } protected void updateEnableState() { if (fLabel != null) { fLabel.setEnabled(fEnabled); } if (fButtons != null) { boolean enabled= isEnabled(); for (int i= 0; i < fButtons.length; i++) { Button button= fButtons[i]; if (isOkToUse(button)) { button.setEnabled(enabled && fButtonsEnabled[i]); } } fMainCombo.setEnabled(enabled && fMainComboEnabled); } } public int getComboSelection() { return fMainCombo.getSelectionIndex(); } /** * Sets the label of the dialog field. */ public void setLabelText(String labeltext) {
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/SelectionButtonGroup.java
fLabelText= labeltext; } /** * Defines the listener for this dialog field. */ public final void setSelectionGroupListener(SelectionButtonGroupListener listener) { fGroupListener= listener; } /** * Programatical invocation of a dialog field change. */ public void dialogFieldChanged() { if (fGroupListener != null) { fGroupListener.groupChanged(this); } } /** * Tries to set the focus to the dialog field. * Returns <code>true</code> if the dialog field can take focus. * To be reimplemented by dialog field implementors. */ public boolean setFocus() { return false; } /** * Posts <code>setFocus</code> to the display event queue. */ public void postSetFocusOnDialogField(Display display) {
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/SelectionButtonGroup.java
if (display != null) { display.asyncExec( new Runnable() { public void run() { setFocus(); } } ); } } protected static GridData gridDataForLabel(int span) { GridData gd= new GridData(); gd.horizontalSpan= span; return gd; } /** * Creates or returns the created label widget. * @param parent The parent composite or <code>null</code> if the widget has * already been created. */ public Label getLabelControl(Composite parent) { if (fLabel == null) { assertCompositeNotNull(parent); fLabel= new Label(parent, SWT.LEFT | SWT.WRAP); fLabel.setFont(parent.getFont()); fLabel.setEnabled(fEnabled); if (fLabelText != null && !"".equals(fLabelText)) {
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/SelectionButtonGroup.java
fLabel.setText(fLabelText); } else { fLabel.setText("."); fLabel.setVisible(false); } } return fLabel; } /** * Creates a spacer control. * @param parent The parent composite */ public static Control createEmptySpace(Composite parent) { return createEmptySpace(parent, 1); } /** * Creates a spacer control with the given span. * The composite is assumed to have <code>MGridLayout</code> as * layout. * @param parent The parent composite */ public static Control createEmptySpace(Composite parent, int span) { return LayoutUtil.createEmptySpace(parent, span); } /** * Tests is the control is not <code>null</code> and not disposed. */ protected final boolean isOkToUse(Control control) {
11,844
Bug 11844 new TestCase does not store settings
All checkboxes are not persisted
resolved fixed
3a0f07f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:01:27Z
2002-03-20T13:13:20Z
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/SelectionButtonGroup.java
return (control != null) && !(control.isDisposed()); } /** * Sets the enable state of the dialog field. */ public final void setEnabled(boolean enabled) { if (enabled != fEnabled) { fEnabled= enabled; updateEnableState(); } } /** * Gets the enable state of the dialog field. */ public final boolean isEnabled() { return fEnabled; } protected final void assertCompositeNotNull(Composite comp) { Assert.isNotNull(comp, "uncreated control requested with composite null"); } protected final void assertEnoughColumns(int nColumns) { Assert.isTrue(nColumns >= getNumberOfControls(), "given number of columns is too small"); } }
11,770
Bug 11770 java browsing: multi-selection disabled in 2 of 4 views
multi selection is disabled in the package and type views but it's enabled in project and member views
verified fixed
3839f03
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:41:17Z
2002-03-20T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.browsing; import java.util.Collection; import java.util.Comparator; import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IResource;
11,770
Bug 11770 java browsing: multi-selection disabled in 2 of 4 views
multi selection is disabled in the package and type views but it's enabled in project and member views
verified fixed
3839f03
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:41:17Z
2002-03-20T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
import org.eclipse.core.runtime.IAdaptable; import org.eclipse.swt.SWT; import org.eclipse.swt.events.KeyAdapter; import org.eclipse.swt.events.KeyEvent; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.Shell; import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IMenuListener; import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.IStatusLineManager; import org.eclipse.jface.action.IToolBarManager; import org.eclipse.jface.action.MenuManager; import org.eclipse.jface.action.Separator; import org.eclipse.jface.text.ITextSelection; import org.eclipse.jface.util.Assert; import org.eclipse.jface.viewers.DecoratingLabelProvider; import org.eclipse.jface.viewers.DoubleClickEvent; import org.eclipse.jface.viewers.IDoubleClickListener; import org.eclipse.jface.viewers.ILabelDecorator; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.StructuredViewer;
11,770
Bug 11770 java browsing: multi-selection disabled in 2 of 4 views
multi selection is disabled in the package and type views but it's enabled in project and member views
verified fixed
3839f03
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-03-25T15:41:17Z
2002-03-20T10:26:40Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
import org.eclipse.ui.IActionBars; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IFileEditorInput; import org.eclipse.ui.IMemento; import org.eclipse.ui.IPartListener; import org.eclipse.ui.ISelectionListener; import org.eclipse.ui.IViewSite; import org.eclipse.ui.IWorkbenchActionConstants; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.IWorkbenchPartSite; import org.eclipse.ui.PartInitException; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.actions.NewWizardMenu; import org.eclipse.ui.actions.OpenPerspectiveMenu; import org.eclipse.ui.actions.OpenWithMenu; import org.eclipse.ui.actions.RefreshAction; import org.eclipse.ui.dialogs.PropertyDialogAction; import org.eclipse.ui.part.ViewPart; import org.eclipse.ui.views.internal.framelist.BackAction; import org.eclipse.ui.views.internal.framelist.ForwardAction; import org.eclipse.ui.views.internal.framelist.GoIntoAction; import org.eclipse.ui.views.internal.framelist.UpAction; import org.eclipse.jdt.core.IClassFile; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IMember; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.IWorkingCopy;