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,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
|
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);
}
}
}
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);
|
11,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
|
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);
}
/**
* 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) {
|
11,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
|
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;
}
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());
|
11,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
|
}
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 IWizardPage#canFlipToNextPage
*/
public boolean canFlipToNextPage() {
return isPageComplete() && getNextPage() != null && isNextPageValid();
}
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) {
|
11,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
|
return status;
}
IStatus val= JavaConventions.validateJavaTypeName(classToTestName);
if (val.getSeverity() == IStatus.ERROR) {
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));
}
if (pack != null && !JavaModelUtil.isVisible(type, pack)) {
status.setWarning(Messages.getFormattedString("NewTestClassWizPage.warning.class_to_test.not_visible", new String[] {(type.isInterface())?Messages.getString("Interface"):Messages.getString("Class") , classToTestName}));
}
}
fClassToTest= type;
} catch (JavaModelException e) {
status.setError(Messages.getString("NewTestClassWizPage.error.class_to_test.not_valid"));
}
} else {
status.setError("");
|
11,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
|
}
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);
}
}
if (type == null) {
type= JavaModelUtil.findType(jproject, classToTestName);
}
return type;
}
/**
* Sets the focus on the type name.
*/
protected void setFocus() {
fTestClassText.setFocus();
fTestClassText.setSelection(fTestClassText.getText().length(), fTestClassText.getText().length());
}
|
11,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseCreationWizardPage.java
|
/**
* Use the dialog store to restore widget values to the values that they held
* last time this wizard was used to completion
*/
private void restoreWidgetValues() {
IDialogSettings settings= getDialogSettings();
if (settings != null) {
boolean generateMain= settings.getBoolean(STORE_GENERATE_MAIN);
fMethodStubsButtons.setSelection(0, generateMain);
fMethodStubsButtons.setEnabled(1, generateMain);
fMethodStubsButtons.setSelection(1,settings.getBoolean(STORE_USE_TESTRUNNER));
try {
fMethodStubsButtons.setComboSelection(settings.getInt(STORE_TESTRUNNER_TYPE));
} catch(NumberFormatException e) {}
}
}
/**
* Since Finish was pressed, write widget values to the dialog store so that they
* will persist into the next invocation of this wizard page
*/
void saveWidgetValues() {
IDialogSettings settings= getDialogSettings();
if (settings != null) {
settings.put(STORE_GENERATE_MAIN, fMethodStubsButtons.isSelected(0));
settings.put(STORE_USE_TESTRUNNER, fMethodStubsButtons.isSelected(1));
settings.put(STORE_TESTRUNNER_TYPE, fMethodStubsButtons.getComboSelection());
}
}
}
|
11,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteCreationWizard.java
|
/*
* (c) Copyright 2001 MyCorporation.
* All Rights Reserved.
*/
package org.eclipse.jdt.junit.wizards;
import java.lang.reflect.InvocationTargetException;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jdt.core.IBuffer;
import org.eclipse.jdt.core.ICompilationUnit;
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.junit.ui.JUnitPlugin;
import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.ui.IEditorPart;
/**
* A wizard for creating TestSuites.
*/
public class NewTestSuiteCreationWizard extends JUnitWizard {
|
11,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteCreationWizard.java
|
private NewTestSuiteCreationWizardPage fPage;
public NewTestSuiteCreationWizard() {
super();
setWindowTitle(Messages.getString("Wizard.title.new"));
}
/*
* @see Wizard#createPages
*/
public void addPages() {
super.addPages();
|
11,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteCreationWizard.java
|
IWorkspace workspace= ResourcesPlugin.getWorkspace();
fPage= new NewTestSuiteCreationWizardPage();
addPage(fPage);
fPage.init(getSelection());
}
/*
* @see Wizard#performFinish
*/
public boolean performFinish() {
IPackageFragment pack= fPage.getPackageFragment();
String filename= fPage.getTypeName() + ".java";
ICompilationUnit cu= pack.getCompilationUnit(filename);
if (cu.exists()) {
IEditorPart cu_ep= EditorUtility.isOpenInEditor(cu);
if (cu_ep != null && cu_ep.isDirty()) {
boolean saveUnsavedChanges= MessageDialog.openQuestion(fPage.getShell(), Messages.getString("NewTestSuiteWiz.unsavedchangesDialog.title"), Messages.getFormattedString("NewTestSuiteWiz.unsavedchangesDialog.message", filename));
if (saveUnsavedChanges) {
ProgressMonitorDialog progressDialog= new ProgressMonitorDialog(fPage.getShell());
try {
progressDialog.run(false, false, getRunnableSave(cu_ep));
} catch (Exception e) {
JUnitPlugin.log(e);
}
}
}
IType suiteType= cu.getType(fPage.getTypeName());
IMethod suiteMethod= suiteType.getMethod("suite", new String[] {});
if (suiteMethod.exists()) {
try {
|
11,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteCreationWizard.java
|
ISourceRange range= suiteMethod.getSourceRange();
IBuffer buf= cu.getBuffer();
String originalContent= buf.getText(range.getOffset(), range.getLength());
int start= originalContent.indexOf(NewTestSuiteCreationWizardPage.startMarker);
if (start > -1) {
int end= originalContent.indexOf(NewTestSuiteCreationWizardPage.endMarker, start);
if (end < 0) {
fPage.cannotUpdateSuiteError();
return false;
}
} else {
fPage.cannotUpdateSuiteError();
return false;
}
} catch (JavaModelException e) {
JUnitPlugin.log(e);
return false;
}
}
}
if (finishPage(fPage.getRunnable())) {
if (!fPage.hasUpdatedExistingClass())
postCreatingType();
return true;
}
return false;
}
protected void postCreatingType() {
IType newClass= fPage.getCreatedType();
|
11,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteCreationWizard.java
|
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);
}
}
public NewTestSuiteCreationWizardPage getPage() {
return fPage;
}
public IRunnableWithProgress getRunnableSave(final IEditorPart cu_ep) {
return new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
if (monitor == null) {
monitor= new NullProgressMonitor();
}
cu_ep.doSave(monitor);
}
};
}
}
|
11,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteCreationWizardPage.java
|
/*
* (c) Copyright 2001 MyCorporation.
* All Rights Reserved.
*/
package org.eclipse.jdt.junit.wizards;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
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.IPackageFragmentRoot;
import org.eclipse.jdt.core.ISourceRange;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaConventions;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.corext.codemanipulation.IImportsStructure;
|
11,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteCreationWizardPage.java
|
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.TestSearchEngine;
import org.eclipse.jdt.ui.JavaElementLabelProvider;
import org.eclipse.jdt.ui.wizards.NewTypeWizardPage;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.CheckStateChangedEvent;
import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.jface.viewers.ICheckStateListener;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
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.Label;
import org.eclipse.swt.widgets.Text;
/**
* Wizard page to select the test classes to include
* in the test suite.
*/
public class NewTestSuiteCreationWizardPage extends NewTypeWizardPage {
|
11,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteCreationWizardPage.java
|
private final static String PAGE_NAME= "NewTestSuiteCreationWizardPage";
private final static String CLASSES_IN_SUITE= PAGE_NAME + ".classesinsuite";
private final static String SUITE_NAME= PAGE_NAME + ".suitename";
private final static String SELECTED_CLASSES_LABEL_TEXT_ONE= " class selected.";
private final static String SELECTED_CLASSES_LABEL_TEXT_MANY= " classes selected.";
private IPackageFragment fCurrentPackage;
private CheckboxTableViewer fClassesInSuiteTable;
private Button fSelectAllButton;
private Button fDeselectAllButton;
private Label fSelectedClassesLabel;
private Label fSuiteNameLabel;
private Text fSuiteNameText;
private String fSuiteNameTextInitialValue;
private boolean fUpdatedExistingClassButton;
public static final String startMarker= "$JUnit-BEGIN$";
public static final String endMarker= "$JUnit-END$";
protected IStatus fClassesInSuiteStatus;
protected IStatus fSuiteNameStatus;
public NewTestSuiteCreationWizardPage() {
super(true, PAGE_NAME);
fSuiteNameStatus= new JUnitStatus();
fSuiteNameTextInitialValue= "";
|
11,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteCreationWizardPage.java
|
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);
setControl(composite);
}
/**
* Should be called from the wizard with the input element.
*/
public void init(IStructuredSelection selection) {
|
11,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteCreationWizardPage.java
|
IJavaElement jelem= getInitialJavaElement(selection);
initContainerPage(jelem);
initTypePage(jelem);
doStatusUpdate();
}
/**
* @see NewContainerWizardPage#handleFieldChanged
*/
protected void handleFieldChanged(String fieldName) {
super.handleFieldChanged(fieldName);
if (fieldName.equals(PACKAGE) || fieldName.equals(CONTAINER)) {
if (fieldName.equals(PACKAGE))
fPackageStatus= packageChanged();
updateClassesInSuiteTable();
} else if (fieldName.equals(CLASSES_IN_SUITE)) {
fClassesInSuiteStatus= classesInSuiteChanged();
updateSelectedClassesLabel();
} else if (fieldName.equals(SUITE_NAME)) {
fSuiteNameStatus= testSuiteChanged();
}
doStatusUpdate();
}
private void doStatusUpdate() {
IStatus[] status= new IStatus[] {
fContainerStatus,
fPackageStatus,
fSuiteNameStatus,
|
11,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteCreationWizardPage.java
|
fClassesInSuiteStatus
};
updateStatus(status);
}
public void setVisible(boolean visible) {
super.setVisible(visible);
if (visible) {
setFocus();
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,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
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,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
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,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
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) {
JUnitPlugin.log(e);
}
return new Object[0];
}
public void dispose() {
}
|
11,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
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,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
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,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
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(null);
originalContent= buf.getText(0, buf.getLength());
|
11,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
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,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteCreationWizardPage.java
|
JUnitPlugin.log(e);
}
}
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,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
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,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
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,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
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,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteCreationWizardPage.java
|
}
/*
}
}
}
|
11,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
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,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
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,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
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,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
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,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
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) {
JUnitPlugin.log(e);
}
}
} else {
cannotUpdateSuiteError();
}
} else {
cannotUpdateSuiteError();
}
} catch (JavaModelException e) {
JUnitPlugin.log(e);
}
} else {
noSuiteError();
}
}
/*
* @see IActionDelegate#selectionChanged(IAction, ISelection)
*/
|
11,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
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,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
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(null);
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) {
JUnitPlugin.log(e);
}
}
public IRunnableWithProgress getRunnable() {
return new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
if (monitor == null) {
monitor= new NullProgressMonitor();
}
updateTestCasesInSuite(monitor);
|
11,689 |
Bug 11689 NPE creating a test case in empty workbench
|
If you create a project and then a JUnit TestCase when there are no other classes in the image you will get a NullPointerException when you select the browse button on the Test Class entry. STEPS 1) Create a ConfigurableProject 2) Create a JUnit Test class. In the creation dialog select the 3rd browse button. Walkback: java.lang.NullPointerException at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.chooseClassToTestTyp e(NewTestCaseCreationWizardPage.java:318) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.classToTestButtonPre ssed(NewTestCaseCreationWizardPage.java:293) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage.access$0 (NewTestCaseCreationWizardPage.java:292) at org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizardPage$3.widgetSelected (NewTestCaseCreationWizardPage.java:279) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:74) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:698) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:196) at org.eclipse.core.launcher.Main.run(Main.java:555) at org.eclipse.core.launcher.Main.main(Main.java:396)
|
resolved fixed
|
4f1a191
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-27T10:34:12Z | 2002-03-19T20:33:20Z |
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"));
}
}
|
12,336 |
Bug 12336 Java Browsing views get cleared in combination with type hierarchy
|
1. Add Type Hierarchy view to Java Browsing perspective 2. Select a type in the type hierarchy ==> Java Browsing views show correct state 3. Click on a Java Browsing view "Types" or "Packages" ==> Java Browsing views get cleared.
|
resolved fixed
|
a91b4fa
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T11:52:07Z | 2002-03-27T09:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/SelectionProviderMediator.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.typehierarchy;
import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.FocusListener;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Widget;
import org.eclipse.jface.util.Assert;
import org.eclipse.jface.util.ListenerList;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.Viewer;
/**
* A selection provider for viewparts with more that one viewer.
* Tracks the focus of the viewers to provide the correct selection.
*/
public class SelectionProviderMediator implements ISelectionProvider {
private class InternalListener implements ISelectionChangedListener, FocusListener {
/*
* @see ISelectionChangedListener#selectionChanged
|
12,336 |
Bug 12336 Java Browsing views get cleared in combination with type hierarchy
|
1. Add Type Hierarchy view to Java Browsing perspective 2. Select a type in the type hierarchy ==> Java Browsing views show correct state 3. Click on a Java Browsing view "Types" or "Packages" ==> Java Browsing views get cleared.
|
resolved fixed
|
a91b4fa
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T11:52:07Z | 2002-03-27T09:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/SelectionProviderMediator.java
|
*/
public void selectionChanged(SelectionChangedEvent event) {
doSelectionChanged(event);
}
/*
* @see FocusListener#focusGained
*/
public void focusGained(FocusEvent e) {
doFocusChanged(e.widget);
}
/*
* @see FocusListener#focusLost
*/
public void focusLost(FocusEvent e) {
propagateFocusChanged(null);
}
}
private Viewer[] fViewers;
private InternalListener fListener;
private Viewer fViewerInFocus;
private ListenerList fSelectionChangedListeners;
/**
* @param All viewers that can provide a selection
*/
public SelectionProviderMediator(Viewer[] viewers) {
|
12,336 |
Bug 12336 Java Browsing views get cleared in combination with type hierarchy
|
1. Add Type Hierarchy view to Java Browsing perspective 2. Select a type in the type hierarchy ==> Java Browsing views show correct state 3. Click on a Java Browsing view "Types" or "Packages" ==> Java Browsing views get cleared.
|
resolved fixed
|
a91b4fa
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T11:52:07Z | 2002-03-27T09:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/SelectionProviderMediator.java
|
Assert.isNotNull(viewers);
fViewers= viewers;
fListener= new InternalListener();
fSelectionChangedListeners= new ListenerList(4);
fViewerInFocus= null;
for (int i= 0; i < fViewers.length; i++) {
Viewer viewer= fViewers[i];
viewer.addSelectionChangedListener(fListener);
Control control= viewer.getControl();
control.addFocusListener(fListener);
}
}
private void doFocusChanged(Widget control) {
for (int i= 0; i < fViewers.length; i++) {
if (fViewers[i].getControl() == control) {
propagateFocusChanged(fViewers[i]);
return;
}
}
}
private void doSelectionChanged(SelectionChangedEvent event) {
ISelectionProvider provider= event.getSelectionProvider();
if (provider == fViewerInFocus) {
fireSelectionChanged();
}
}
|
12,336 |
Bug 12336 Java Browsing views get cleared in combination with type hierarchy
|
1. Add Type Hierarchy view to Java Browsing perspective 2. Select a type in the type hierarchy ==> Java Browsing views show correct state 3. Click on a Java Browsing view "Types" or "Packages" ==> Java Browsing views get cleared.
|
resolved fixed
|
a91b4fa
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T11:52:07Z | 2002-03-27T09:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/SelectionProviderMediator.java
|
private void propagateFocusChanged(Viewer viewer) {
if (viewer != fViewerInFocus) {
fViewerInFocus= viewer;
fireSelectionChanged();
}
}
private void fireSelectionChanged() {
if (fSelectionChangedListeners != null) {
SelectionChangedEvent event= new SelectionChangedEvent(this, getSelection());
Object[] listeners= fSelectionChangedListeners.getListeners();
for (int i= 0; i < listeners.length; i++) {
ISelectionChangedListener listener= (ISelectionChangedListener) listeners[i];
listener.selectionChanged(event);
}
}
}
/*
* @see ISelectionProvider#addSelectionChangedListener
*/
public void addSelectionChangedListener(ISelectionChangedListener listener) {
fSelectionChangedListeners.add(listener);
}
/*
* @see ISelectionProvider#removeSelectionChangedListener
*/
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
|
12,336 |
Bug 12336 Java Browsing views get cleared in combination with type hierarchy
|
1. Add Type Hierarchy view to Java Browsing perspective 2. Select a type in the type hierarchy ==> Java Browsing views show correct state 3. Click on a Java Browsing view "Types" or "Packages" ==> Java Browsing views get cleared.
|
resolved fixed
|
a91b4fa
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T11:52:07Z | 2002-03-27T09:06:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/SelectionProviderMediator.java
|
fSelectionChangedListeners.remove(listener);
}
/*
* @see ISelectionProvider#getSelection
*/
public ISelection getSelection() {
if (fViewerInFocus != null) {
return fViewerInFocus.getSelection();
} else {
return StructuredSelection.EMPTY;
}
}
/*
* @see ISelectionProvider#setSelection
*/
public void setSelection(ISelection selection) {
if (fViewerInFocus != null) {
fViewerInFocus.setSelection(selection);
}
}
/**
* Returns the viewer in focus or null if no viewer has the focus
*/
public Viewer getViewerInFocus() {
return fViewerInFocus;
}
}
|
10,403 |
Bug 10403 Project creation should confirm the bin directory can be scrubbed
|
When a user creates a new project for an existing directory structure, we should confirm that the output directory can be deleted then rebuilt. Some users are creating projects & pointing the output folder at a bin directory which contains more than just .class files which can be rebuilt from the available .java files.
|
resolved fixed
|
7007de3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T12:14:00Z | 2002-02-27T17:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.wizards.buildpaths;
import java.lang.reflect.InvocationTargetException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.resources.IResource;
|
10,403 |
Bug 10403 Project creation should confirm the bin directory can be scrubbed
|
When a user creates a new project for an existing directory structure, we should confirm that the output directory can be deleted then rebuilt. Some users are creating projects & pointing the output folder at a bin directory which contains more than just .class files which can be rebuilt from the available .java files.
|
resolved fixed
|
7007de3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T12:14:00Z | 2002-02-27T17:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
import org.eclipse.swt.widgets.Widget;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.ui.model.WorkbenchContentProvider;
import org.eclipse.ui.model.WorkbenchLabelProvider;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
|
10,403 |
Bug 10403 Project creation should confirm the bin directory can be scrubbed
|
When a user creates a new project for an existing directory structure, we should confirm that the output directory can be deleted then rebuilt. Some users are creating projects & pointing the output folder at a bin directory which contains more than just .class files which can be rebuilt from the available .java files.
|
resolved fixed
|
7007de3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T12:14:00Z | 2002-02-27T17:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
import org.eclipse.jdt.core.JavaConventions;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.jdt.internal.corext.javadoc.JavaDocLocations;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
import org.eclipse.jdt.internal.ui.dialogs.ElementTreeSelectionDialog;
import org.eclipse.jdt.internal.ui.dialogs.ISelectionValidator;
import org.eclipse.jdt.internal.ui.dialogs.StatusInfo;
import org.eclipse.jdt.internal.ui.dialogs.StatusUtil;
import org.eclipse.jdt.internal.ui.preferences.JavaBasePreferencePage;
import org.eclipse.jdt.internal.ui.util.CoreUtility;
import org.eclipse.jdt.internal.ui.util.PixelConverter;
import org.eclipse.jdt.internal.ui.util.TabFolderLayout;
import org.eclipse.jdt.internal.ui.viewsupport.ImageDisposer;
import org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener;
import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages;
import org.eclipse.jdt.internal.ui.wizards.TypedElementSelectionValidator;
import org.eclipse.jdt.internal.ui.wizards.TypedViewerFilter;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.CheckedListDialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.IStringButtonAdapter;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringButtonDialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringDialogField;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
public class BuildPathsBlock {
|
10,403 |
Bug 10403 Project creation should confirm the bin directory can be scrubbed
|
When a user creates a new project for an existing directory structure, we should confirm that the output directory can be deleted then rebuilt. Some users are creating projects & pointing the output folder at a bin directory which contains more than just .class files which can be rebuilt from the available .java files.
|
resolved fixed
|
7007de3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T12:14:00Z | 2002-02-27T17:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
private IWorkspaceRoot fWorkspaceRoot;
private CheckedListDialogField fClassPathList;
private StringButtonDialogField fBuildPathDialogField;
private StatusInfo fClassPathStatus;
private StatusInfo fBuildPathStatus;
private IJavaProject fCurrJProject;
private IPath fOutputLocationPath;
private IStatusChangeListener fContext;
private Control fSWTWidget;
private boolean fShowSourceFolderPage;
private SourceContainerWorkbookPage fSourceContainerPage;
private ProjectsWorkbookPage fProjectsPage;
private LibrariesWorkbookPage fLibrariesPage;
private BuildPathBasePage fCurrPage;
public BuildPathsBlock(IWorkspaceRoot root, IStatusChangeListener context, boolean showSourceFolders) {
fWorkspaceRoot= root;
fContext= context;
fShowSourceFolderPage= showSourceFolders;
fSourceContainerPage= null;
fLibrariesPage= null;
|
10,403 |
Bug 10403 Project creation should confirm the bin directory can be scrubbed
|
When a user creates a new project for an existing directory structure, we should confirm that the output directory can be deleted then rebuilt. Some users are creating projects & pointing the output folder at a bin directory which contains more than just .class files which can be rebuilt from the available .java files.
|
resolved fixed
|
7007de3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T12:14:00Z | 2002-02-27T17:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
fProjectsPage= null;
fCurrPage= null;
BuildPathAdapter adapter= new BuildPathAdapter();
String[] buttonLabels= new String[] {
NewWizardMessages.getString("BuildPathsBlock.classpath.up.button"),
NewWizardMessages.getString("BuildPathsBlock.classpath.down.button"),
null,
NewWizardMessages.getString("BuildPathsBlock.classpath.checkall.button"),
NewWizardMessages.getString("BuildPathsBlock.classpath.uncheckall.button")
};
fClassPathList= new CheckedListDialogField(null, buttonLabels, new CPListLabelProvider());
fClassPathList.setDialogFieldListener(adapter);
fClassPathList.setLabelText(NewWizardMessages.getString("BuildPathsBlock.classpath.label"));
fClassPathList.setUpButtonIndex(0);
fClassPathList.setDownButtonIndex(1);
fClassPathList.setCheckAllButtonIndex(3);
fClassPathList.setUncheckAllButtonIndex(4);
fBuildPathDialogField= new StringButtonDialogField(adapter);
fBuildPathDialogField.setButtonLabel(NewWizardMessages.getString("BuildPathsBlock.buildpath.button"));
fBuildPathDialogField.setDialogFieldListener(adapter);
fBuildPathDialogField.setLabelText(NewWizardMessages.getString("BuildPathsBlock.buildpath.label"));
fBuildPathStatus= new StatusInfo();
fClassPathStatus= new StatusInfo();
fCurrJProject= null;
|
10,403 |
Bug 10403 Project creation should confirm the bin directory can be scrubbed
|
When a user creates a new project for an existing directory structure, we should confirm that the output directory can be deleted then rebuilt. Some users are creating projects & pointing the output folder at a bin directory which contains more than just .class files which can be rebuilt from the available .java files.
|
resolved fixed
|
7007de3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T12:14:00Z | 2002-02-27T17:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
}
public Control createControl(Composite parent) {
fSWTWidget= parent;
PixelConverter converter= new PixelConverter(parent);
Composite composite= new Composite(parent, SWT.NONE);
GridLayout layout= new GridLayout();
layout.marginWidth= 0;
layout.numColumns= 1;
composite.setLayout(layout);
TabFolder folder= new TabFolder(composite, SWT.NONE);
folder.setLayout(new TabFolderLayout());
folder.setLayoutData(new GridData(GridData.FILL_BOTH));
folder.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
tabChanged(e.item);
}
});
ImageRegistry imageRegistry= JavaPlugin.getDefault().getImageRegistry();
TabItem item;
fSourceContainerPage= new SourceContainerWorkbookPage(fWorkspaceRoot, fClassPathList, fBuildPathDialogField);
|
10,403 |
Bug 10403 Project creation should confirm the bin directory can be scrubbed
|
When a user creates a new project for an existing directory structure, we should confirm that the output directory can be deleted then rebuilt. Some users are creating projects & pointing the output folder at a bin directory which contains more than just .class files which can be rebuilt from the available .java files.
|
resolved fixed
|
7007de3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T12:14:00Z | 2002-02-27T17:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
item= new TabItem(folder, SWT.NONE);
item.setText(NewWizardMessages.getString("BuildPathsBlock.tab.source"));
item.setImage(imageRegistry.get(JavaPluginImages.IMG_OBJS_PACKFRAG_ROOT));
item.setData(fSourceContainerPage);
item.setControl(fSourceContainerPage.getControl(folder));
IWorkbench workbench= JavaPlugin.getDefault().getWorkbench();
Image projectImage= workbench.getSharedImages().getImage(ISharedImages.IMG_OBJ_PROJECT);
fProjectsPage= new ProjectsWorkbookPage(fClassPathList);
item= new TabItem(folder, SWT.NONE);
item.setText(NewWizardMessages.getString("BuildPathsBlock.tab.projects"));
item.setImage(projectImage);
item.setData(fProjectsPage);
item.setControl(fProjectsPage.getControl(folder));
fLibrariesPage= new LibrariesWorkbookPage(fWorkspaceRoot, fClassPathList);
item= new TabItem(folder, SWT.NONE);
item.setText(NewWizardMessages.getString("BuildPathsBlock.tab.libraries"));
item.setImage(imageRegistry.get(JavaPluginImages.IMG_OBJS_LIBRARY));
item.setData(fLibrariesPage);
item.setControl(fLibrariesPage.getControl(folder));
Image cpoImage= JavaPluginImages.DESC_TOOL_CLASSPATH_ORDER.createImage();
composite.addDisposeListener(new ImageDisposer(cpoImage));
ClasspathOrderingWorkbookPage ordpage= new ClasspathOrderingWorkbookPage(fClassPathList);
item= new TabItem(folder, SWT.NONE);
item.setText(NewWizardMessages.getString("BuildPathsBlock.tab.order"));
|
10,403 |
Bug 10403 Project creation should confirm the bin directory can be scrubbed
|
When a user creates a new project for an existing directory structure, we should confirm that the output directory can be deleted then rebuilt. Some users are creating projects & pointing the output folder at a bin directory which contains more than just .class files which can be rebuilt from the available .java files.
|
resolved fixed
|
7007de3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T12:14:00Z | 2002-02-27T17:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
item.setImage(cpoImage);
item.setData(ordpage);
item.setControl(ordpage.getControl(folder));
if (fCurrJProject != null) {
fSourceContainerPage.init(fCurrJProject);
fLibrariesPage.init(fCurrJProject);
fProjectsPage.init(fCurrJProject);
}
Composite editorcomp= new Composite(composite, SWT.NONE);
DialogField[] editors= new DialogField[] { fBuildPathDialogField };
LayoutUtil.doDefaultLayout(editorcomp, editors, true, 0, 0);
int maxFieldWidth= converter.convertWidthInCharsToPixels(40);
LayoutUtil.setWidthHint(fBuildPathDialogField.getTextControl(null), maxFieldWidth);
LayoutUtil.setHorizontalGrabbing(fBuildPathDialogField.getTextControl(null));
editorcomp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
if (fShowSourceFolderPage) {
folder.setSelection(0);
fCurrPage= fSourceContainerPage;
} else {
folder.setSelection(3);
fCurrPage= ordpage;
fClassPathList.selectFirstElement();
}
WorkbenchHelp.setHelp(composite, IJavaHelpContextIds.BUILD_PATH_BLOCK);
|
10,403 |
Bug 10403 Project creation should confirm the bin directory can be scrubbed
|
When a user creates a new project for an existing directory structure, we should confirm that the output directory can be deleted then rebuilt. Some users are creating projects & pointing the output folder at a bin directory which contains more than just .class files which can be rebuilt from the available .java files.
|
resolved fixed
|
7007de3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T12:14:00Z | 2002-02-27T17:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
return composite;
}
private Shell getShell() {
if (fSWTWidget != null) {
return fSWTWidget.getShell();
}
return JavaPlugin.getActiveWorkbenchShell();
}
/**
* Initializes the classpath for the given project. Multiple calls to init are allowed,
* but all existing settings will be cleared and replace by the given or default paths.
* @param project The java project to configure. Does not have to exist.
* @param outputLocation The output location to be set in the page. If <code>null</code>
* is passed, jdt default settings are used, or - if the project is an existing Java project- the
* output location of the existing project
* @param classpathEntries The classpath entries to be set in the page. If <code>null</code>
* is passed, jdt default settings are used, or - if the project is an existing Java project - the
* classpath entries of the existing project
*/
public void init(IJavaProject jproject, IPath outputLocation, IClasspathEntry[] classpathEntries) {
fCurrJProject= jproject;
boolean projExists= false;
try {
IProject project= fCurrJProject.getProject();
projExists= (project.exists() && project.getFile(".classpath").exists());
if (projExists) {
if (outputLocation == null) {
|
10,403 |
Bug 10403 Project creation should confirm the bin directory can be scrubbed
|
When a user creates a new project for an existing directory structure, we should confirm that the output directory can be deleted then rebuilt. Some users are creating projects & pointing the output folder at a bin directory which contains more than just .class files which can be rebuilt from the available .java files.
|
resolved fixed
|
7007de3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T12:14:00Z | 2002-02-27T17:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
outputLocation= fCurrJProject.getOutputLocation();
}
if (classpathEntries == null) {
classpathEntries= fCurrJProject.getRawClasspath();
}
}
} catch (CoreException e) {
JavaPlugin.log(e.getStatus());
}
if (outputLocation == null) {
outputLocation= getDefaultBuildPath(jproject);
}
List newClassPath;
if (classpathEntries == null) {
newClassPath= getDefaultClassPath(jproject);
} else {
newClassPath= new ArrayList();
for (int i= 0; i < classpathEntries.length; i++) {
IClasspathEntry curr= classpathEntries[i];
int entryKind= curr.getEntryKind();
IPath path= curr.getPath();
boolean isExported= curr.isExported();
IResource res= null;
boolean isMissing= false;
if (entryKind != IClasspathEntry.CPE_VARIABLE) {
res= fWorkspaceRoot.findMember(path);
if (res == null) {
|
10,403 |
Bug 10403 Project creation should confirm the bin directory can be scrubbed
|
When a user creates a new project for an existing directory structure, we should confirm that the output directory can be deleted then rebuilt. Some users are creating projects & pointing the output folder at a bin directory which contains more than just .class files which can be rebuilt from the available .java files.
|
resolved fixed
|
7007de3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T12:14:00Z | 2002-02-27T17:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
isMissing= (entryKind != IClasspathEntry.CPE_LIBRARY || !path.toFile().isFile());
}
} else {
IPath resolvedPath= JavaCore.getResolvedVariablePath(path);
isMissing= (resolvedPath == null) || !resolvedPath.toFile().isFile();
}
CPListElement elem= new CPListElement(entryKind, path, res, curr.getSourceAttachmentPath(), curr.getSourceAttachmentRootPath(), isExported);
if (projExists) {
elem.setIsMissing(isMissing);
}
newClassPath.add(elem);
}
}
List exportedEntries = new ArrayList();
for (int i= 0; i < newClassPath.size(); i++) {
CPListElement curr= (CPListElement) newClassPath.get(i);
if (curr.isExported() || curr.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
exportedEntries.add(curr);
}
}
fBuildPathDialogField.setText(outputLocation.makeRelative().toString());
fClassPathList.setElements(newClassPath);
fClassPathList.setCheckedElements(exportedEntries);
if (fSourceContainerPage != null) {
fSourceContainerPage.init(fCurrJProject);
fProjectsPage.init(fCurrJProject);
fLibrariesPage.init(fCurrJProject);
}
|
10,403 |
Bug 10403 Project creation should confirm the bin directory can be scrubbed
|
When a user creates a new project for an existing directory structure, we should confirm that the output directory can be deleted then rebuilt. Some users are creating projects & pointing the output folder at a bin directory which contains more than just .class files which can be rebuilt from the available .java files.
|
resolved fixed
|
7007de3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T12:14:00Z | 2002-02-27T17:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
doStatusLineUpdate();
}
/**
* Returns the Java project. Can return <code>null<code> if the page has not
* been initialized.
*/
public IJavaProject getJavaProject() {
return fCurrJProject;
}
/**
* Returns the current output location. Note that the path returned must not be valid.
*/
public IPath getOutputLocation() {
return new Path(fBuildPathDialogField.getText()).makeAbsolute();
}
/**
* Returns the current class path (raw). Note that the entries returned must not be valid.
*/
public IClasspathEntry[] getRawClassPath() {
List elements= fClassPathList.getElements();
int nElements= elements.size();
IClasspathEntry[] entries= new IClasspathEntry[elements.size()];
for (int i= 0; i < nElements; i++) {
CPListElement currElement= (CPListElement) elements.get(i);
|
10,403 |
Bug 10403 Project creation should confirm the bin directory can be scrubbed
|
When a user creates a new project for an existing directory structure, we should confirm that the output directory can be deleted then rebuilt. Some users are creating projects & pointing the output folder at a bin directory which contains more than just .class files which can be rebuilt from the available .java files.
|
resolved fixed
|
7007de3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T12:14:00Z | 2002-02-27T17:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
entries[i]= currElement.getClasspathEntry();
}
return entries;
}
private List getDefaultClassPath(IJavaProject jproj) {
List list= new ArrayList();
IResource srcFolder;
if (JavaBasePreferencePage.useSrcAndBinFolders()) {
String sourceFolderName= JavaBasePreferencePage.getSourceFolderName();
srcFolder= jproj.getProject().getFolder(sourceFolderName);
} else {
srcFolder= jproj.getProject();
}
list.add(new CPListElement(IClasspathEntry.CPE_SOURCE, srcFolder.getFullPath(), srcFolder));
IPath libPath= new Path(JavaRuntime.JRELIB_VARIABLE);
IPath attachPath= new Path(JavaRuntime.JRESRC_VARIABLE);
IPath attachRoot= new Path(JavaRuntime.JRESRCROOT_VARIABLE);
CPListElement elem= new CPListElement(IClasspathEntry.CPE_VARIABLE, libPath, null, attachPath, attachRoot, false);
list.add(elem);
return list;
}
private IPath getDefaultBuildPath(IJavaProject jproj) {
if (JavaBasePreferencePage.useSrcAndBinFolders()) {
String outputLocationName= JavaBasePreferencePage.getOutputLocationName();
return jproj.getProject().getFullPath().append(outputLocationName);
|
10,403 |
Bug 10403 Project creation should confirm the bin directory can be scrubbed
|
When a user creates a new project for an existing directory structure, we should confirm that the output directory can be deleted then rebuilt. Some users are creating projects & pointing the output folder at a bin directory which contains more than just .class files which can be rebuilt from the available .java files.
|
resolved fixed
|
7007de3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T12:14:00Z | 2002-02-27T17:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
} else {
return jproj.getProject().getFullPath();
}
}
private class BuildPathAdapter implements IStringButtonAdapter, IDialogFieldListener {
public void changeControlPressed(DialogField field) {
buildPathChangeControlPressed(field);
}
public void dialogFieldChanged(DialogField field) {
buildPathDialogFieldChanged(field);
}
}
private void buildPathChangeControlPressed(DialogField field) {
if (field == fBuildPathDialogField) {
IContainer container= chooseContainer();
if (container != null) {
fBuildPathDialogField.setText(container.getFullPath().toString());
}
}
}
private void buildPathDialogFieldChanged(DialogField field) {
if (field == fClassPathList) {
updateClassPathStatus();
updateBuildPathStatus();
|
10,403 |
Bug 10403 Project creation should confirm the bin directory can be scrubbed
|
When a user creates a new project for an existing directory structure, we should confirm that the output directory can be deleted then rebuilt. Some users are creating projects & pointing the output folder at a bin directory which contains more than just .class files which can be rebuilt from the available .java files.
|
resolved fixed
|
7007de3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T12:14:00Z | 2002-02-27T17:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
} else if (field == fBuildPathDialogField) {
updateBuildPathStatus();
}
doStatusLineUpdate();
}
private void doStatusLineUpdate() {
IStatus res= findMostSevereStatus();
fContext.statusChanged(res);
}
private IStatus findMostSevereStatus() {
return StatusUtil.getMoreSevere(fClassPathStatus, fBuildPathStatus);
}
/**
* Validates the build path.
*/
private void updateClassPathStatus() {
fClassPathStatus.setOK();
List elements= fClassPathList.getElements();
boolean entryMissing= false;
IClasspathEntry[] entries= new IClasspathEntry[elements.size()];
for (int i= elements.size()-1 ; i >= 0 ; i--) {
|
10,403 |
Bug 10403 Project creation should confirm the bin directory can be scrubbed
|
When a user creates a new project for an existing directory structure, we should confirm that the output directory can be deleted then rebuilt. Some users are creating projects & pointing the output folder at a bin directory which contains more than just .class files which can be rebuilt from the available .java files.
|
resolved fixed
|
7007de3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T12:14:00Z | 2002-02-27T17:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
CPListElement currElement= (CPListElement)elements.get(i);
boolean isChecked= fClassPathList.isChecked(currElement);
if (currElement.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
if (!isChecked) {
fClassPathList.setCheckedWithoutUpdate(currElement, true);
}
} else {
currElement.setExported(isChecked);
}
entries[i]= currElement.getClasspathEntry();
entryMissing= entryMissing || currElement.isMissing();
}
if (entryMissing) {
fClassPathStatus.setWarning(NewWizardMessages.getString("BuildPathsBlock.warning.EntryMissing"));
}
if (fCurrJProject.hasClasspathCycle(entries)) {
fClassPathStatus.setWarning(NewWizardMessages.getString("BuildPathsBlock.warning.CycleInClassPath"));
}
}
/**
* Validates output location & build path.
*/
private void updateBuildPathStatus() {
fOutputLocationPath= null;
String text= fBuildPathDialogField.getText();
if ("".equals(text)) {
fBuildPathStatus.setError(NewWizardMessages.getString("BuildPathsBlock.error.EnterBuildPath"));
|
10,403 |
Bug 10403 Project creation should confirm the bin directory can be scrubbed
|
When a user creates a new project for an existing directory structure, we should confirm that the output directory can be deleted then rebuilt. Some users are creating projects & pointing the output folder at a bin directory which contains more than just .class files which can be rebuilt from the available .java files.
|
resolved fixed
|
7007de3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T12:14:00Z | 2002-02-27T17:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
return;
}
IPath path= getOutputLocation();
IResource res= fWorkspaceRoot.findMember(path);
if (res != null) {
if (res.getType() == IResource.FILE) {
fBuildPathStatus.setError(NewWizardMessages.getString("BuildPathsBlock.error.InvalidBuildPath"));
return;
}
}
fOutputLocationPath= path;
List elements= fClassPathList.getElements();
IClasspathEntry[] entries= new IClasspathEntry[elements.size()];
for (int i= elements.size()-1 ; i >= 0 ; i--) {
CPListElement currElement= (CPListElement)elements.get(i);
entries[i]= currElement.getClasspathEntry();
}
IStatus status= JavaConventions.validateClasspath(fCurrJProject, entries, path);
if (!status.isOK()) {
fBuildPathStatus.setError(status.getMessage());
return;
}
fBuildPathStatus.setOK();
}
|
10,403 |
Bug 10403 Project creation should confirm the bin directory can be scrubbed
|
When a user creates a new project for an existing directory structure, we should confirm that the output directory can be deleted then rebuilt. Some users are creating projects & pointing the output folder at a bin directory which contains more than just .class files which can be rebuilt from the available .java files.
|
resolved fixed
|
7007de3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T12:14:00Z | 2002-02-27T17:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
/**
* Creates a runnable that sets the configured build paths.
*/
public IRunnableWithProgress getRunnable() {
final List classPathEntries= fClassPathList.getElements();
final IPath path= getOutputLocation();
return new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException {
if (monitor == null) {
monitor= new NullProgressMonitor();
}
monitor.beginTask(NewWizardMessages.getString("BuildPathsBlock.operationdesc"), 10);
try {
createJavaProject(classPathEntries, path, monitor);
} catch (CoreException e) {
throw new InvocationTargetException(e);
} finally {
monitor.done();
}
}
};
}
/**
* Creates the Java project and sets the configured build path and output location.
* If the project already exists only build paths are updated.
|
10,403 |
Bug 10403 Project creation should confirm the bin directory can be scrubbed
|
When a user creates a new project for an existing directory structure, we should confirm that the output directory can be deleted then rebuilt. Some users are creating projects & pointing the output folder at a bin directory which contains more than just .class files which can be rebuilt from the available .java files.
|
resolved fixed
|
7007de3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T12:14:00Z | 2002-02-27T17:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
*/
private void createJavaProject(List classPathEntries, IPath buildPath, IProgressMonitor monitor) throws CoreException {
if (!fWorkspaceRoot.exists(buildPath)) {
IFolder folder= fWorkspaceRoot.getFolder(buildPath);
CoreUtility.createFolder(folder, true, true, null);
}
monitor.worked(2);
int nEntries= classPathEntries.size();
IClasspathEntry[] classpath= new IClasspathEntry[nEntries];
for (int i= 0; i < nEntries; i++) {
CPListElement entry= ((CPListElement)classPathEntries.get(i));
IResource res= entry.getResource();
if ((res instanceof IFolder) && !res.exists()) {
CoreUtility.createFolder((IFolder)res, true, true, null);
}
classpath[i]= entry.getClasspathEntry();
URL javadocLocation= entry.getJavadocLocation();
if (javadocLocation != null) {
IPath path= entry.getPath();
if (entry.getEntryKind() == IClasspathEntry.CPE_VARIABLE) {
path= JavaCore.getResolvedVariablePath(path);
}
|
10,403 |
Bug 10403 Project creation should confirm the bin directory can be scrubbed
|
When a user creates a new project for an existing directory structure, we should confirm that the output directory can be deleted then rebuilt. Some users are creating projects & pointing the output folder at a bin directory which contains more than just .class files which can be rebuilt from the available .java files.
|
resolved fixed
|
7007de3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T12:14:00Z | 2002-02-27T17:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
if (path != null) {
JavaDocLocations.setLibraryJavadocLocation(path, javadocLocation);
}
}
}
monitor.worked(1);
fCurrJProject.setRawClasspath(classpath, buildPath, new SubProgressMonitor(monitor, 7));
}
private IContainer chooseContainer() {
Class[] acceptedClasses= new Class[] { IProject.class, IFolder.class };
ISelectionValidator validator= new TypedElementSelectionValidator(acceptedClasses, false);
IProject[] allProjects= fWorkspaceRoot.getProjects();
ArrayList rejectedElements= new ArrayList(allProjects.length);
IProject currProject= fCurrJProject.getProject();
for (int i= 0; i < allProjects.length; i++) {
if (!allProjects[i].equals(currProject)) {
rejectedElements.add(allProjects[i]);
}
}
ViewerFilter filter= new TypedViewerFilter(acceptedClasses, rejectedElements.toArray());
ILabelProvider lp= new WorkbenchLabelProvider();
ITreeContentProvider cp= new WorkbenchContentProvider();
IResource initSelection= null;
if (fOutputLocationPath != null) {
initSelection= fWorkspaceRoot.findMember(fOutputLocationPath);
}
|
10,403 |
Bug 10403 Project creation should confirm the bin directory can be scrubbed
|
When a user creates a new project for an existing directory structure, we should confirm that the output directory can be deleted then rebuilt. Some users are creating projects & pointing the output folder at a bin directory which contains more than just .class files which can be rebuilt from the available .java files.
|
resolved fixed
|
7007de3
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T12:14:00Z | 2002-02-27T17:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
|
ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(getShell(), lp, cp);
dialog.setTitle(NewWizardMessages.getString("BuildPathsBlock.ChooseOutputFolderDialog.title"));
dialog.setValidator(validator);
dialog.setMessage(NewWizardMessages.getString("BuildPathsBlock.ChooseOutputFolderDialog.description"));
dialog.addFilter(filter);
dialog.setInput(fWorkspaceRoot);
dialog.setInitialSelection(initSelection);
if (dialog.open() == dialog.OK) {
return (IContainer)dialog.getFirstResult();
}
return null;
}
private void tabChanged(Widget widget) {
if (widget instanceof TabItem) {
BuildPathBasePage newPage= (BuildPathBasePage) ((TabItem) widget).getData();
if (fCurrPage != null) {
List selection= fCurrPage.getSelection();
if (!selection.isEmpty()) {
newPage.setSelection(selection);
}
}
fCurrPage= newPage;
}
}
}
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyTransferDropAdapter.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.typehierarchy;
import org.eclipse.swt.SWT;
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.DropTargetEvent;
import org.eclipse.swt.dnd.Transfer;
import org.eclipse.jface.viewers.AbstractTreeViewer;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.internal.ui.actions.AddMethodStubAction;
import org.eclipse.jdt.internal.ui.dnd.JdtViewerDropAdapter;
import org.eclipse.jdt.internal.ui.dnd.LocalSelectionTransfer;
import org.eclipse.jdt.internal.ui.dnd.TransferDropTargetListener;
public class TypeHierarchyTransferDropAdapter extends JdtViewerDropAdapter implements TransferDropTargetListener {
private AddMethodStubAction fAddMethodStubAction;
public TypeHierarchyTransferDropAdapter(AbstractTreeViewer viewer) {
super(viewer, DND.FEEDBACK_EXPAND | DND.FEEDBACK_SCROLL);
fAddMethodStubAction= new AddMethodStubAction();
}
public Transfer getTransfer() {
return LocalSelectionTransfer.getInstance();
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyTransferDropAdapter.java
|
}
public void validateDrop(Object target, DropTargetEvent event, int operation) {
event.detail= DND.DROP_NONE;
ISelection selection= LocalSelectionTransfer.getInstance().getSelection();
if (target instanceof IType) {
if (AddMethodStubAction.canActionBeAdded((IType)target, selection)) {
if (operation == DND.DROP_NONE) {
operation= DND.DROP_COPY;
}
event.detail= operation;
}
}
return;
}
public void drop(Object target, DropTargetEvent event) {
ISelection selection= LocalSelectionTransfer.getInstance().getSelection();
if (target instanceof IType) {
if (fAddMethodStubAction.init((IType)target, selection)) {
fAddMethodStubAction.run();
}
}
return;
}
}
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.typehierarchy;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.swt.custom.CLabel;
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.custom.ViewForm;
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.DragSource;
import org.eclipse.swt.dnd.Transfer;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.KeyListener;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.ScrollBar;
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
import org.eclipse.swt.widgets.ToolBar;
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.action.ToolBarManager;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.util.Assert;
import org.eclipse.jface.viewers.IBasicPropertyConstants;
import org.eclipse.jface.viewers.IInputSelectionProvider;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.IPartListener;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.actions.OpenWithMenu;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.ui.part.PageBook;
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
import org.eclipse.ui.part.ViewPart;
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.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.IContextMenuConstants;
import org.eclipse.jdt.ui.ITypeHierarchyViewPart;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.actions.AddMethodStubAction;
import org.eclipse.jdt.internal.ui.actions.ContextMenuGroup;
import org.eclipse.jdt.internal.ui.dnd.BasicSelectionTransferDragAdapter;
import org.eclipse.jdt.internal.ui.dnd.LocalSelectionTransfer;
import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
import org.eclipse.jdt.internal.ui.packageview.BuildGroup;
import org.eclipse.jdt.internal.ui.preferences.JavaBasePreferencePage;
import org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringGroup;
import org.eclipse.jdt.internal.ui.reorg.ReorgGroup;
import org.eclipse.jdt.internal.ui.util.OpenTypeHierarchyUtil;
import org.eclipse.jdt.internal.ui.viewsupport.IProblemChangedListener;
import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabels;
import org.eclipse.jdt.internal.ui.viewsupport.JavaUILabelProvider;
import org.eclipse.jdt.internal.ui.viewsupport.StatusBarUpdater;
/**
* view showing the supertypes/subtypes of its input.
*/
public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyViewPart {
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
public static final int VIEW_ID_TYPE= 2;
public static final int VIEW_ID_SUPER= 0;
public static final int VIEW_ID_SUB= 1;
public static final int VIEW_ORIENTATION_VERTICAL= 0;
public static final int VIEW_ORIENTATION_HORIZONTAL= 1;
public static final int VIEW_ORIENTATION_SINGLE= 2;
private static final String DIALOGSTORE_HIERARCHYVIEW= "TypeHierarchyViewPart.hierarchyview";
private static final String DIALOGSTORE_VIEWORIENTATION= "TypeHierarchyViewPart.orientation";
private static final String TAG_INPUT= "input";
private static final String TAG_VIEW= "view";
private static final String TAG_ORIENTATION= "orientation";
private static final String TAG_RATIO= "ratio";
private static final String TAG_SELECTION= "selection";
private static final String TAG_VERTICAL_SCROLL= "vertical_scroll";
private IType fSelectedType;
private IJavaElement fInputElement;
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
private ArrayList fInputHistory;
private IMemento fMemento;
private IProblemChangedListener fHierarchyProblemListener;
private TypeHierarchyLifeCycle fHierarchyLifeCycle;
private ITypeHierarchyLifeCycleListener fTypeHierarchyLifeCycleListener;
private MethodsViewer fMethodsViewer;
private int fCurrentViewerIndex;
private TypeHierarchyViewer[] fAllViewers;
private SelectionProviderMediator fSelectionProviderMediator;
private ISelectionChangedListener fSelectionChangedListener;
private boolean fIsEnableMemberFilter;
private SashForm fTypeMethodsSplitter;
private PageBook fViewerbook;
private PageBook fPagebook;
private Label fNoHierarchyShownLabel;
private Label fEmptyTypesViewer;
private ViewForm fTypeViewerViewForm;
private ViewForm fMethodViewerViewForm;
private CLabel fMethodViewerPaneLabel;
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
private JavaUILabelProvider fPaneLabelProvider;
private IDialogSettings fDialogSettings;
private ToggleViewAction[] fViewActions;
private HistoryDropDownAction fHistoryDropDownAction;
private ToggleOrientationAction[] fToggleOrientationActions;
private int fCurrentOrientation;
private EnableMemberFilterAction fEnableMemberFilterAction;
private AddMethodStubAction fAddStubAction;
private FocusOnTypeAction fFocusOnTypeAction;
private FocusOnSelectionAction fFocusOnSelectionAction;
private IPartListener fPartListener;
public TypeHierarchyViewPart() {
fSelectedType= null;
fInputElement= null;
fHierarchyLifeCycle= new TypeHierarchyLifeCycle();
fTypeHierarchyLifeCycleListener= new ITypeHierarchyLifeCycleListener() {
public void typeHierarchyChanged(TypeHierarchyLifeCycle typeHierarchy, IType[] changedTypes) {
doTypeHierarchyChanged(typeHierarchy, changedTypes);
}
};
fHierarchyLifeCycle.addChangedListener(fTypeHierarchyLifeCycleListener);
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
fHierarchyProblemListener= null;
fIsEnableMemberFilter= false;
fInputHistory= new ArrayList();
fAllViewers= null;
fViewActions= new ToggleViewAction[] {
new ToggleViewAction(this, VIEW_ID_TYPE),
new ToggleViewAction(this, VIEW_ID_SUPER),
new ToggleViewAction(this, VIEW_ID_SUB)
};
fDialogSettings= JavaPlugin.getDefault().getDialogSettings();
fHistoryDropDownAction= new HistoryDropDownAction(this);
fHistoryDropDownAction.setEnabled(false);
fToggleOrientationActions= new ToggleOrientationAction[] {
new ToggleOrientationAction(this, VIEW_ORIENTATION_VERTICAL),
new ToggleOrientationAction(this, VIEW_ORIENTATION_HORIZONTAL),
new ToggleOrientationAction(this, VIEW_ORIENTATION_SINGLE)
};
fEnableMemberFilterAction= new EnableMemberFilterAction(this, false);
fFocusOnTypeAction= new FocusOnTypeAction(this);
fPaneLabelProvider= new JavaUILabelProvider();
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
fAddStubAction= new AddMethodStubAction();
fFocusOnSelectionAction= new FocusOnSelectionAction(this);
fPartListener= new IPartListener() {
public void partActivated(IWorkbenchPart part) {
if (part instanceof IEditorPart)
editorActivated((IEditorPart) part);
}
public void partBroughtToTop(IWorkbenchPart part) {}
public void partClosed(IWorkbenchPart part) {}
public void partDeactivated(IWorkbenchPart part) {}
public void partOpened(IWorkbenchPart part) {}
};
fSelectionChangedListener= new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
doSelectionChanged(event);
}
};
}
/**
* Adds the entry if new. Inserted at the beginning of the history entries list.
*/
private void addHistoryEntry(IJavaElement entry) {
if (fInputHistory.contains(entry)) {
fInputHistory.remove(entry);
}
fInputHistory.add(0, entry);
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
fHistoryDropDownAction.setEnabled(true);
}
private void updateHistoryEntries() {
for (int i= fInputHistory.size() - 1; i >= 0; i--) {
IJavaElement type= (IJavaElement) fInputHistory.get(i);
if (!type.exists()) {
fInputHistory.remove(i);
}
}
fHistoryDropDownAction.setEnabled(!fInputHistory.isEmpty());
}
/**
* Goes to the selected entry, without updating the order of history entries.
*/
public void gotoHistoryEntry(IJavaElement entry) {
if (fInputHistory.contains(entry)) {
updateInput(entry);
}
}
/**
* Gets all history entries.
*/
public IJavaElement[] getHistoryEntries() {
if (fInputHistory.size() > 0) {
updateHistoryEntries();
}
return (IJavaElement[]) fInputHistory.toArray(new IJavaElement[fInputHistory.size()]);
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
}
/**
* Sets the history entries
*/
public void setHistoryEntries(IJavaElement[] elems) {
fInputHistory.clear();
for (int i= 0; i < elems.length; i++) {
fInputHistory.add(elems[i]);
}
updateHistoryEntries();
}
/**
* Selects an member in the methods list or in the current hierarchy.
*/
public void selectMember(IMember member) {
ICompilationUnit cu= member.getCompilationUnit();
if (cu != null && cu.isWorkingCopy()) {
member= (IMember) cu.getOriginal(member);
if (member == null) {
return;
}
}
if (member.getElementType() != IJavaElement.TYPE) {
Control methodControl= fMethodsViewer.getControl();
if (methodControl != null && !methodControl.isDisposed()) {
methodControl.setFocus();
}
fMethodsViewer.setSelection(new StructuredSelection(member), true);
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
} else {
Control viewerControl= getCurrentViewer().getControl();
if (viewerControl != null && !viewerControl.isDisposed()) {
viewerControl.setFocus();
}
getCurrentViewer().setSelection(new StructuredSelection(member), true);
}
}
/**
* @deprecated
*/
public IType getInput() {
if (fInputElement instanceof IType) {
return (IType) fInputElement;
}
return null;
}
/**
* Sets the input to a new type
* @deprecated
*/
public void setInput(IType type) {
setInputElement(type);
}
/**
* Returns the input element of the type hierarchy.
* Can be of type <code>IType</code> or <code>IPackageFragment</code>
*/
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
public IJavaElement getInputElement() {
return fInputElement;
}
/**
* Sets the input to a new element.
*/
public void setInputElement(IJavaElement element) {
if (element != null) {
if (element instanceof IMember) {
ICompilationUnit cu= ((IMember) element).getCompilationUnit();
if (cu != null && cu.isWorkingCopy()) {
element= cu.getOriginal(element);
if (!element.exists()) {
MessageDialog.openError(getSite().getShell(), TypeHierarchyMessages.getString("TypeHierarchyViewPart.error.title"), TypeHierarchyMessages.getString("TypeHierarchyViewPart.error.message"));
return;
}
}
if (element.getElementType() == IJavaElement.METHOD || element.getElementType() == IJavaElement.FIELD || element.getElementType() == IJavaElement.INITIALIZER) {
element= ((IMember) element).getDeclaringType();
}
}
}
if (element != null && !element.equals(fInputElement)) {
addHistoryEntry(element);
}
updateInput(element);
}
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
/**
* Changes the input to a new type
*/
private void updateInput(IJavaElement inputElement) {
IJavaElement prevInput= fInputElement;
fInputElement= inputElement;
if (fInputElement == null) {
clearInput();
} else {
try {
fHierarchyLifeCycle.ensureRefreshedTypeHierarchy(fInputElement);
} catch (JavaModelException e) {
JavaPlugin.log(e);
clearInput();
return;
}
fPagebook.showPage(fTypeMethodsSplitter);
if (inputElement.getElementType() != IJavaElement.TYPE) {
setView(VIEW_ID_TYPE);
}
setMemberFilter(null);
fIsEnableMemberFilter= false;
if (!fInputElement.equals(prevInput)) {
updateHierarchyViewer();
}
IType root= getSelectableType(fInputElement);
internalSelectType(root, true);
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
updateMethodViewer(root);
updateToolbarButtons();
updateTitle();
enableMemberFilter(false);
}
}
private void clearInput() {
fInputElement= null;
fHierarchyLifeCycle.freeHierarchy();
updateHierarchyViewer();
updateToolbarButtons();
}
/*
* @see IWorbenchPart#setFocus
*/
public void setFocus() {
fPagebook.setFocus();
}
/*
* @see IWorkbenchPart#dispose
*/
public void dispose() {
fHierarchyLifeCycle.freeHierarchy();
fHierarchyLifeCycle.removeChangedListener(fTypeHierarchyLifeCycleListener);
fPaneLabelProvider.dispose();
getSite().getPage().removePartListener(fPartListener);
if (fHierarchyProblemListener != null) {
JavaPlugin.getDefault().getProblemMarkerManager().removeListener(fHierarchyProblemListener);
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
}
if (fMethodsViewer != null) {
JavaPlugin.getDefault().getProblemMarkerManager().removeListener(fMethodsViewer);
}
super.dispose();
}
private Control createTypeViewerControl(Composite parent) {
fViewerbook= new PageBook(parent, SWT.NULL);
KeyListener keyListener= createKeyListener();
TypeHierarchyViewer superTypesViewer= new SuperTypeHierarchyViewer(fViewerbook, fHierarchyLifeCycle, this);
initializeTypesViewer(superTypesViewer, keyListener, IContextMenuConstants.TARGET_ID_SUPERTYPES_VIEW);
TypeHierarchyViewer subTypesViewer= new SubTypeHierarchyViewer(fViewerbook, fHierarchyLifeCycle, this);
initializeTypesViewer(subTypesViewer, keyListener, IContextMenuConstants.TARGET_ID_SUBTYPES_VIEW);
TypeHierarchyViewer vajViewer= new TraditionalHierarchyViewer(fViewerbook, fHierarchyLifeCycle, this);
initializeTypesViewer(vajViewer, keyListener, IContextMenuConstants.TARGET_ID_HIERARCHY_VIEW);
fAllViewers= new TypeHierarchyViewer[3];
fAllViewers[VIEW_ID_SUPER]= superTypesViewer;
fAllViewers[VIEW_ID_SUB]= subTypesViewer;
fAllViewers[VIEW_ID_TYPE]= vajViewer;
int currViewerIndex;
try {
currViewerIndex= fDialogSettings.getInt(DIALOGSTORE_HIERARCHYVIEW);
if (currViewerIndex < 0 || currViewerIndex > 2) {
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
currViewerIndex= VIEW_ID_TYPE;
}
} catch (NumberFormatException e) {
currViewerIndex= VIEW_ID_TYPE;
}
fEmptyTypesViewer= new Label(fViewerbook, SWT.LEFT);
for (int i= 0; i < fAllViewers.length; i++) {
fAllViewers[i].setInput(fAllViewers[i]);
}
fCurrentViewerIndex= -1;
setView(currViewerIndex);
return fViewerbook;
}
private KeyListener createKeyListener() {
return new KeyAdapter() {
public void keyReleased(KeyEvent event) {
if (event.stateMask == 0) {
if (event.keyCode == SWT.F4) {
OpenTypeHierarchyUtil.open(getSite().getSelectionProvider().getSelection(), getSite().getWorkbenchWindow());
return;
} else if (event.keyCode == SWT.F5) {
updateHierarchyViewer();
return;
}
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
}
viewPartKeyShortcuts(event);
}
};
}
private void initializeTypesViewer(final TypeHierarchyViewer typesViewer, KeyListener keyListener, String cotextHelpId) {
typesViewer.getControl().setVisible(false);
typesViewer.getControl().addKeyListener(keyListener);
typesViewer.initContextMenu(new IMenuListener() {
public void menuAboutToShow(IMenuManager menu) {
fillTypesViewerContextMenu(typesViewer, menu);
}
}, cotextHelpId, getSite());
typesViewer.addSelectionChangedListener(fSelectionChangedListener);
}
private Control createMethodViewerControl(Composite parent) {
fMethodsViewer= new MethodsViewer(parent, fHierarchyLifeCycle, this);
fMethodsViewer.initContextMenu(new IMenuListener() {
public void menuAboutToShow(IMenuManager menu) {
fillMethodsViewerContextMenu(menu);
}
}, IContextMenuConstants.TARGET_ID_MEMBERS_VIEW, getSite());
fMethodsViewer.addSelectionChangedListener(fSelectionChangedListener);
Control control= fMethodsViewer.getTable();
control.addKeyListener(createKeyListener());
JavaPlugin.getDefault().getProblemMarkerManager().addListener(fMethodsViewer);
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
return control;
}
private void initDragAndDrop() {
Transfer[] transfers= new Transfer[] { LocalSelectionTransfer.getInstance() };
int ops= DND.DROP_COPY;
DragSource source= new DragSource(fMethodsViewer.getControl(), ops);
source.setTransfer(transfers);
source.addDragListener(new BasicSelectionTransferDragAdapter(fMethodsViewer));
for (int i= 0; i < fAllViewers.length; i++) {
TypeHierarchyViewer curr= fAllViewers[i];
curr.addDropSupport(ops, transfers, new TypeHierarchyTransferDropAdapter(curr));
}
}
private void viewPartKeyShortcuts(KeyEvent event) {
if (event.stateMask == SWT.CTRL) {
if (event.character == '1') {
setView(VIEW_ID_TYPE);
} else if (event.character == '2') {
setView(VIEW_ID_SUPER);
} else if (event.character == '3') {
setView(VIEW_ID_SUB);
}
}
}
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
/**
* Returns the inner component in a workbench part.
* @see IWorkbenchPart#createPartControl
*/
public void createPartControl(Composite container) {
fPagebook= new PageBook(container, SWT.NONE);
fTypeMethodsSplitter= new SashForm(fPagebook, SWT.VERTICAL);
fTypeMethodsSplitter.setVisible(false);
fTypeViewerViewForm= new ViewForm(fTypeMethodsSplitter, SWT.NONE);
Control typeViewerControl= createTypeViewerControl(fTypeViewerViewForm);
fTypeViewerViewForm.setContent(typeViewerControl);
fMethodViewerViewForm= new ViewForm(fTypeMethodsSplitter, SWT.NONE);
fTypeMethodsSplitter.setWeights(new int[] {35, 65});
Control methodViewerPart= createMethodViewerControl(fMethodViewerViewForm);
fMethodViewerViewForm.setContent(methodViewerPart);
fMethodViewerPaneLabel= new CLabel(fMethodViewerViewForm, SWT.NONE);
fMethodViewerViewForm.setTopLeft(fMethodViewerPaneLabel);
initDragAndDrop();
ToolBar methodViewerToolBar= new ToolBar(fMethodViewerViewForm, SWT.FLAT | SWT.WRAP);
fMethodViewerViewForm.setTopCenter(methodViewerToolBar);
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
fNoHierarchyShownLabel= new Label(fPagebook, SWT.TOP + SWT.LEFT + SWT.WRAP);
fNoHierarchyShownLabel.setText(TypeHierarchyMessages.getString("TypeHierarchyViewPart.empty"));
MenuManager menu= new MenuManager();
menu.add(fFocusOnTypeAction);
fNoHierarchyShownLabel.setMenu(menu.createContextMenu(fNoHierarchyShownLabel));
fPagebook.showPage(fNoHierarchyShownLabel);
int orientation;
try {
orientation= fDialogSettings.getInt(DIALOGSTORE_VIEWORIENTATION);
if (orientation < 0 || orientation > 2) {
orientation= VIEW_ORIENTATION_VERTICAL;
}
} catch (NumberFormatException e) {
orientation= VIEW_ORIENTATION_VERTICAL;
}
fCurrentOrientation= -1;
setOrientation(orientation);
IActionBars actionBars= getViewSite().getActionBars();
IMenuManager viewMenu= actionBars.getMenuManager();
for (int i= 0; i < fToggleOrientationActions.length; i++) {
viewMenu.add(fToggleOrientationActions[i]);
}
viewMenu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
ToolBarManager lowertbmanager= new ToolBarManager(methodViewerToolBar);
lowertbmanager.add(fEnableMemberFilterAction);
lowertbmanager.add(new Separator());
fMethodsViewer.contributeToToolBar(lowertbmanager);
lowertbmanager.update(true);
int nHierarchyViewers= fAllViewers.length;
Viewer[] trackedViewers= new Viewer[nHierarchyViewers + 1];
for (int i= 0; i < nHierarchyViewers; i++) {
trackedViewers[i]= fAllViewers[i];
}
trackedViewers[nHierarchyViewers]= fMethodsViewer;
fSelectionProviderMediator= new SelectionProviderMediator(trackedViewers);
IStatusLineManager slManager= getViewSite().getActionBars().getStatusLineManager();
fSelectionProviderMediator.addSelectionChangedListener(new StatusBarUpdater(slManager));
getSite().setSelectionProvider(fSelectionProviderMediator);
getSite().getPage().addPartListener(fPartListener);
IJavaElement input= determineInputElement();
if (fMemento != null) {
restoreState(fMemento, input);
} else if (input != null) {
setInputElement(input);
} else {
setViewerVisibility(false);
}
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
ReorgGroup.addGlobalReorgActions(getViewSite().getActionBars(), getViewSite().getSelectionProvider());
WorkbenchHelp.setHelp(fPagebook, IJavaHelpContextIds.TYPE_HIERARCHY_VIEW);
}
/**
* called from ToggleOrientationAction.
* @param orientation VIEW_ORIENTATION_SINGLE, VIEW_ORIENTATION_HORIZONTAL or VIEW_ORIENTATION_VERTICAL
*/
public void setOrientation(int orientation) {
if (fCurrentOrientation != orientation) {
boolean methodViewerNeedsUpdate= false;
if (fMethodViewerViewForm != null && !fMethodViewerViewForm.isDisposed()
&& fTypeMethodsSplitter != null && !fTypeMethodsSplitter.isDisposed()) {
if (orientation == VIEW_ORIENTATION_SINGLE) {
fMethodViewerViewForm.setVisible(false);
enableMemberFilter(false);
updateMethodViewer(null);
} else {
if (fCurrentOrientation == VIEW_ORIENTATION_SINGLE) {
fMethodViewerViewForm.setVisible(true);
methodViewerNeedsUpdate= true;
}
boolean horizontal= orientation == VIEW_ORIENTATION_HORIZONTAL;
fTypeMethodsSplitter.setOrientation(horizontal ? SWT.HORIZONTAL : SWT.VERTICAL);
}
updateMainToolbar(orientation);
fTypeMethodsSplitter.layout();
}
for (int i= 0; i < fToggleOrientationActions.length; i++) {
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
fToggleOrientationActions[i].setChecked(orientation == fToggleOrientationActions[i].getOrientation());
}
fCurrentOrientation= orientation;
if (methodViewerNeedsUpdate) {
updateMethodViewer(fSelectedType);
}
fDialogSettings.put(DIALOGSTORE_VIEWORIENTATION, orientation);
}
}
private void updateMainToolbar(int orientation) {
IActionBars actionBars= getViewSite().getActionBars();
IToolBarManager tbmanager= actionBars.getToolBarManager();
if (orientation == VIEW_ORIENTATION_HORIZONTAL) {
clearMainToolBar(tbmanager);
ToolBar typeViewerToolBar= new ToolBar(fTypeViewerViewForm, SWT.FLAT | SWT.WRAP);
fillMainToolBar(new ToolBarManager(typeViewerToolBar));
fTypeViewerViewForm.setTopLeft(typeViewerToolBar);
} else {
fTypeViewerViewForm.setTopLeft(null);
fillMainToolBar(tbmanager);
}
}
private void fillMainToolBar(IToolBarManager tbmanager) {
tbmanager.removeAll();
tbmanager.add(fHistoryDropDownAction);
for (int i= 0; i < fViewActions.length; i++) {
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
tbmanager.add(fViewActions[i]);
}
tbmanager.update(false);
}
private void clearMainToolBar(IToolBarManager tbmanager) {
tbmanager.removeAll();
tbmanager.update(false);
}
/**
* Creates the context menu for the hierarchy viewers
*/
private void fillTypesViewerContextMenu(TypeHierarchyViewer viewer, IMenuManager menu) {
JavaPlugin.createStandardGroups(menu);
viewer.contributeToContextMenu(menu);
IStructuredSelection selection= (IStructuredSelection)viewer.getSelection();
if (JavaBasePreferencePage.openTypeHierarchyInPerspective()) {
addOpenPerspectiveItem(menu, selection);
}
addOpenWithMenu(menu, selection);
menu.appendToGroup(IContextMenuConstants.GROUP_SHOW, fFocusOnTypeAction);
if (fFocusOnSelectionAction.canActionBeAdded())
menu.appendToGroup(IContextMenuConstants.GROUP_SHOW, fFocusOnSelectionAction);
addRefactoring(menu, viewer);
ContextMenuGroup.add(menu, new ContextMenuGroup[] { new BuildGroup(), new ReorgGroup() }, viewer);
}
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
/**
* Creates the context menu for the method viewer
*/
private void fillMethodsViewerContextMenu(IMenuManager menu) {
JavaPlugin.createStandardGroups(menu);
fMethodsViewer.contributeToContextMenu(menu);
if (fSelectedType != null && fAddStubAction.init(fSelectedType, fMethodsViewer.getSelection())) {
menu.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, fAddStubAction);
}
addOpenWithMenu(menu, (IStructuredSelection)fMethodsViewer.getSelection());
addRefactoring(menu, fMethodsViewer);
ContextMenuGroup.add(menu, new ContextMenuGroup[] { new BuildGroup(), new ReorgGroup() }, fMethodsViewer);
}
private void addRefactoring(IMenuManager menu, IInputSelectionProvider viewer){
MenuManager refactoring= new MenuManager(TypeHierarchyMessages.getString("TypeHierarchyViewPart.menu.refactor"));
ContextMenuGroup.add(refactoring, new ContextMenuGroup[] { new RefactoringGroup() }, viewer);
if (!refactoring.isEmpty())
menu.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, refactoring);
}
private void addOpenWithMenu(IMenuManager menu, IStructuredSelection selection) {
if (selection.size() != 1)
return;
Object element= selection.getFirstElement();
if (!(element instanceof IJavaElement))
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
return;
IResource resource= null;
try {
resource= ((IJavaElement)element).getUnderlyingResource();
} catch(JavaModelException e) {
}
if (!(resource instanceof IFile))
return;
MenuManager submenu= new MenuManager(TypeHierarchyMessages.getString("TypeHierarchyViewPart.menu.open"));
submenu.add(new OpenWithMenu(getSite().getPage(), (IFile) resource));
menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, submenu);
}
private void addOpenPerspectiveItem(IMenuManager menu, IStructuredSelection selection) {
OpenTypeHierarchyUtil.addToMenu(getSite().getWorkbenchWindow(), menu, selection);
}
/**
* Toggles between the empty viewer page and the hierarchy
*/
private void setViewerVisibility(boolean showHierarchy) {
if (showHierarchy) {
fViewerbook.showPage(getCurrentViewer().getControl());
} else {
fViewerbook.showPage(fEmptyTypesViewer);
}
}
/**
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
* Sets the member filter. <code>null</code> disables member filtering.
*/
private void setMemberFilter(IMember[] memberFilter) {
Assert.isNotNull(fAllViewers);
for (int i= 0; i < fAllViewers.length; i++) {
fAllViewers[i].setMemberFilter(memberFilter);
}
}
private IType getSelectableType(IJavaElement elem) {
ISelection sel= null;
if (elem.getElementType() != IJavaElement.TYPE) {
return (IType) getCurrentViewer().getTreeRootType();
} else {
return (IType) elem;
}
}
private void internalSelectType(IMember elem, boolean reveal) {
TypeHierarchyViewer viewer= getCurrentViewer();
viewer.removeSelectionChangedListener(fSelectionChangedListener);
viewer.setSelection(elem != null ? new StructuredSelection(elem) : StructuredSelection.EMPTY, reveal);
viewer.addSelectionChangedListener(fSelectionChangedListener);
}
private void internalSelectMember(IMember member) {
fMethodsViewer.removeSelectionChangedListener(fSelectionChangedListener);
fMethodsViewer.setSelection(member != null ? new StructuredSelection(member) : StructuredSelection.EMPTY);
fMethodsViewer.addSelectionChangedListener(fSelectionChangedListener);
}
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
/**
* When the input changed or the hierarchy pane becomes visible,
* <code>updateHierarchyViewer<code> brings up the correct view and refreshes
* the current tree
*/
private void updateHierarchyViewer() {
if (fInputElement == null) {
fPagebook.showPage(fNoHierarchyShownLabel);
} else {
if (getCurrentViewer().containsElements() != null) {
Runnable runnable= new Runnable() {
public void run() {
getCurrentViewer().updateContent();
}
};
BusyIndicator.showWhile(getDisplay(), runnable);
if (!isChildVisible(fViewerbook, getCurrentViewer().getControl())) {
setViewerVisibility(true);
}
} else {
fEmptyTypesViewer.setText(TypeHierarchyMessages.getFormattedString("TypeHierarchyViewPart.nodecl", fInputElement.getElementName()));
setViewerVisibility(false);
}
}
}
private void updateMethodViewer(IType input) {
if (input != fMethodsViewer.getInput() && !fIsEnableMemberFilter && fCurrentOrientation != VIEW_ORIENTATION_SINGLE) {
if (input != null) {
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
fMethodViewerPaneLabel.setText(fPaneLabelProvider.getText(input));
fMethodViewerPaneLabel.setImage(fPaneLabelProvider.getImage(input));
} else {
fMethodViewerPaneLabel.setText("");
fMethodViewerPaneLabel.setImage(null);
}
fMethodsViewer.setInput(input);
}
}
private void doSelectionChanged(SelectionChangedEvent e) {
if (e.getSelectionProvider() == fMethodsViewer) {
methodSelectionChanged(e.getSelection());
} else {
typeSelectionChanged(e.getSelection());
}
}
private void methodSelectionChanged(ISelection sel) {
if (sel instanceof IStructuredSelection) {
List selected= ((IStructuredSelection)sel).toList();
int nSelected= selected.size();
if (fIsEnableMemberFilter) {
IMember[] memberFilter= null;
if (nSelected > 0) {
memberFilter= new IMember[nSelected];
selected.toArray(memberFilter);
}
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
setMemberFilter(memberFilter);
updateHierarchyViewer();
updateTitle();
internalSelectType(fSelectedType, true);
}
if (nSelected == 1) {
revealElementInEditor(selected.get(0), fMethodsViewer);
}
}
}
private void typeSelectionChanged(ISelection sel) {
if (sel instanceof IStructuredSelection) {
List selected= ((IStructuredSelection)sel).toList();
int nSelected= selected.size();
if (nSelected != 0) {
List types= new ArrayList(nSelected);
for (int i= nSelected-1; i >= 0; i--) {
Object elem= selected.get(i);
if (elem instanceof IType && !types.contains(elem)) {
types.add(elem);
}
}
if (types.size() == 1) {
fSelectedType= (IType) types.get(0);
updateMethodViewer(fSelectedType);
} else if (types.size() == 0) {
}
if (nSelected == 1) {
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
revealElementInEditor(selected.get(0), getCurrentViewer());
}
} else {
fSelectedType= null;
updateMethodViewer(null);
}
}
}
private void revealElementInEditor(Object elem, Viewer originViewer) {
if (getSite().getPage().getActivePart() != this) {
return;
}
if (fSelectionProviderMediator.getViewerInFocus() != originViewer) {
return;
}
IEditorPart editorPart= EditorUtility.isOpenInEditor(elem);
if (editorPart != null && (elem instanceof IJavaElement)) {
try {
getSite().getPage().removePartListener(fPartListener);
EditorUtility.openInEditor(elem, false);
EditorUtility.revealInEditor(editorPart, (IJavaElement) elem);
getSite().getPage().addPartListener(fPartListener);
} catch (CoreException e) {
JavaPlugin.log(e);
}
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
}
}
private Display getDisplay() {
if (fPagebook != null && !fPagebook.isDisposed()) {
return fPagebook.getDisplay();
}
return null;
}
private boolean isChildVisible(Composite pb, Control child) {
Control[] children= pb.getChildren();
for (int i= 0; i < children.length; i++) {
if (children[i] == child && children[i].isVisible())
return true;
}
return false;
}
private void updateTitle() {
String viewerTitle= getCurrentViewer().getTitle();
String tooltip;
String title;
if (fInputElement != null) {
String[] args= new String[] { viewerTitle, JavaElementLabels.getElementLabel(fInputElement, JavaElementLabels.ALL_DEFAULT) };
title= TypeHierarchyMessages.getFormattedString("TypeHierarchyViewPart.title", args);
tooltip= TypeHierarchyMessages.getFormattedString("TypeHierarchyViewPart.tooltip", args);
} else {
title= viewerTitle;
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
tooltip= viewerTitle;
}
setTitle(title);
setTitleToolTip(tooltip);
}
private void updateToolbarButtons() {
boolean isType= fInputElement instanceof IType;
for (int i= 0; i < fViewActions.length; i++) {
ToggleViewAction action= fViewActions[i];
if (action.getViewerIndex() == VIEW_ID_TYPE) {
action.setEnabled(fInputElement != null);
} else {
action.setEnabled(isType);
}
}
}
/**
* Sets the current view (see view id)
* called from ToggleViewAction. Must be called after creation of the viewpart.
*/
public void setView(int viewerIndex) {
Assert.isNotNull(fAllViewers);
if (viewerIndex < fAllViewers.length && fCurrentViewerIndex != viewerIndex) {
fCurrentViewerIndex= viewerIndex;
updateHierarchyViewer();
if (fInputElement != null) {
ISelection currSelection= getCurrentViewer().getSelection();
|
10,458 |
Bug 10458 Support DND to set focus in Hierarchy View
|
Please enable Hierarchy view to support DND as a way to "focus on" something, whether it be a project, source folder, package, or type.
|
resolved fixed
|
bc9934a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-03-29T14:04:37Z | 2002-02-28T04:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
|
if (currSelection == null || currSelection.isEmpty()) {
internalSelectType(getSelectableType(fInputElement), false);
currSelection= getCurrentViewer().getSelection();
}
if (!fIsEnableMemberFilter) {
typeSelectionChanged(currSelection);
}
}
updateTitle();
if (fHierarchyProblemListener != null) {
JavaPlugin.getDefault().getProblemMarkerManager().removeListener(fHierarchyProblemListener);
}
fHierarchyProblemListener= getCurrentViewer();
JavaPlugin.getDefault().getProblemMarkerManager().addListener(fHierarchyProblemListener);
fDialogSettings.put(DIALOGSTORE_HIERARCHYVIEW, viewerIndex);
getCurrentViewer().getTree().setFocus();
}
for (int i= 0; i < fViewActions.length; i++) {
ToggleViewAction action= fViewActions[i];
action.setChecked(fCurrentViewerIndex == action.getViewerIndex());
}
}
/**
* Gets the curret active view index.
*/
public int getViewIndex() {
return fCurrentViewerIndex;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.