issue_id
int64 2.03k
426k
| title
stringlengths 9
251
| body
stringlengths 1
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 2
187
| file_content
stringlengths 0
368k
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test31/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test32/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test33/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test34/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test35/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test36/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test37/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test38/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test39/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test4/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test40/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test41/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test42/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test43/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test44/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test45/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test46/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test47/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test48/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test49/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test5/out/I.java
|
package p;
import java.io.IOException;
/** typecomment template*/
interface I {
void m() throws IOException;
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test50/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test51/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test52/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test53/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test54/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test55/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test56/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test57/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test58/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test59/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test60/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test61/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test62/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test63/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test64/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test65/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test66/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test67/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test68/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test69/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test70/out/I.java
|
package p;
/** typecomment template*/
public interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test71/out/I.java
|
package p;
/** typecomment template*/
public interface I {
void m();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test72/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m(I foo);
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test73/out/I.java
|
package p;
/** typecomment template*/
public interface I {
int amount();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test74/out/I.java
|
package p;
/** typecomment template*/
public interface I {
int amount();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test75/out/I.java
|
package p;
/** typecomment template*/
public interface I {
int amount();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test76/out/I.java
|
package p;
/** typecomment template*/
public interface I {
int amount();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test77/out/I.java
|
package p;
/** typecomment template*/
interface I {
int amount();
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test78/out/I.java
|
package p;
/** typecomment template*/
interface I {
I m(I foo);
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test79/out/I.java
|
package p;
/** typecomment template*/
interface I {
I getFoo();
void foo(I foo);
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/test9/out/I.java
|
package p;
/** typecomment template*/
interface I {
void m(int i, boolean b, short s, char c, long l, double d);
}
|
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/testInterface6/in/A.java
| |
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/testInterface6/out/A.java
| |
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractInterface/testInterface6/out/I.java
| |
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
org.eclipse.jdt.ui/core
| |
32,626 |
Bug 32626 [refactor] extract interface causing exception
|
Got the following exception extracting an interface using RC1: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:247) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:43) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:357) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:113) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceInputPage.performFinish (ExtractInterfaceInputPage.java:207) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:420) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:364) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:250) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:60) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.startRefactoring (ExtractInterfaceAction.java:158) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run (ExtractInterfaceAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: org.eclipse.jdt.internal.corext.Assert$AssertionFailedException: null argument;Variable typecommentnot defined at org.eclipse.jdt.internal.corext.Assert.isNotNull(Assert.java:99) at org.eclipse.jdt.internal.corext.template.java.CodeTemplateContext.evaluate (CodeTemplateContext.java:46) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.getCompilationUnitC ontent(StubUtility.java:300) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterfaceCUSource(ExtractInterfaceRefactoring.java:443) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createExtractedInterface(ExtractInterfaceRefactoring.java:366) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceRefactorin g.createChange(ExtractInterfaceRefactoring.java:259) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:98) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 42 more
|
resolved fixed
|
ac677f6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T12:28:06Z | 2003-02-24T12:33:20Z |
refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ExtractInterfaceRefactoring.java
| |
33,013 |
Bug 33013 Code Generation prefs not used by Convert nested type to top level...
|
Build 2.1 RC1 0. Set preference to use 'f' prefix for fields 1. Add non-static type T to a top-level type 2. Save 3. Select T 4. Refactor -> Convert nested type to Top Level... ==> a dialog comes up and asked for the field name Observe: the proposed name is not prefixed with an 'f'. We can argue that this is not the name of the field but then the generated code should at least contain the 'f' prefix.
|
resolved fixed
|
76eca09
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T14:49:08Z | 2003-02-25T16:20:00Z |
org.eclipse.jdt.ui/core
| |
33,013 |
Bug 33013 Code Generation prefs not used by Convert nested type to top level...
|
Build 2.1 RC1 0. Set preference to use 'f' prefix for fields 1. Add non-static type T to a top-level type 2. Save 3. Select T 4. Refactor -> Convert nested type to Top Level... ==> a dialog comes up and asked for the field name Observe: the proposed name is not prefixed with an 'f'. We can argue that this is not the name of the field but then the generated code should at least contain the 'f' prefix.
|
resolved fixed
|
76eca09
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T14:49:08Z | 2003-02-25T16:20:00Z |
refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MoveInnerToTopRefactoring.java
| |
33,016 |
Bug 33016 Show In...: "Package Explorer" is enabled when opening a file from cvs repository
| null |
resolved wontfix
|
4d940ef
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T15:03:57Z | 2003-02-25T16:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
|
/*******************************************************************************
* Copyright (c) 2000, 2002 International Business Machines Corp. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v0.5
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v05.html
*
* Contributors:
* IBM Corporation - initial implementation
******************************************************************************/
package org.eclipse.jdt.internal.ui.packageview;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.eclipse.swt.SWT;
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.DragSource;
import org.eclipse.swt.dnd.DragSourceEvent;
import org.eclipse.swt.dnd.FileTransfer;
import org.eclipse.swt.dnd.Transfer;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.ScrollBar;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.ILabelDecorator;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.IOpenListener;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.ITreeViewerListener;
import org.eclipse.jface.viewers.OpenEvent;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeExpansionEvent;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPartListener;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.actions.ActionContext;
import org.eclipse.ui.part.IShowInSource;
import org.eclipse.ui.part.IShowInTarget;
import org.eclipse.ui.part.IShowInTargetList;
import org.eclipse.ui.part.ShowInContext;
import org.eclipse.ui.part.ISetSelectionTarget;
import org.eclipse.ui.part.ResourceTransfer;
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.IJavaModel;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.dnd.DelegatingDragAdapter;
import org.eclipse.jdt.internal.ui.dnd.DelegatingDropAdapter;
import org.eclipse.jdt.internal.ui.dnd.LocalSelectionTransfer;
import org.eclipse.jdt.internal.ui.dnd.ResourceTransferDragAdapter;
import org.eclipse.jdt.internal.ui.dnd.TransferDragSourceListener;
import org.eclipse.jdt.internal.ui.dnd.TransferDropTargetListener;
import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
import org.eclipse.jdt.internal.ui.javaeditor.IClassFileEditorInput;
import org.eclipse.jdt.internal.ui.javaeditor.JarEntryEditorInput;
import org.eclipse.jdt.internal.ui.util.JavaUIHelp;
import org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider;
import org.eclipse.jdt.internal.ui.viewsupport.DecoratingJavaLabelProvider;
import org.eclipse.jdt.internal.ui.viewsupport.IViewPartInputProvider;
import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider;
import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabels;
import org.eclipse.jdt.internal.ui.viewsupport.ProblemTreeViewer;
import org.eclipse.jdt.internal.ui.viewsupport.StatusBarUpdater;
import org.eclipse.jdt.ui.IPackagesViewPart;
import org.eclipse.jdt.ui.JavaElementSorter;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jdt.ui.PreferenceConstants;
import org.eclipse.jdt.ui.StandardJavaElementContentProvider;
/**
* The ViewPart for the ProjectExplorer. It listens to part activation events.
* When selection linking with the editor is enabled the view selection tracks
* the active editor page. Similarly when a resource is selected in the packages
* view the corresponding editor is activated.
*/
public class PackageExplorerPart extends ViewPart
implements ISetSelectionTarget, IMenuListener,
IShowInTarget,
IPackagesViewPart, IPropertyChangeListener,
IViewPartInputProvider {
private boolean fIsCurrentLayoutFlat; // true means flat, false means hierachical
private static final int HIERARCHICAL_LAYOUT= 0x1;
private static final int FLAT_LAYOUT= 0x2;
public final static String VIEW_ID= JavaUI.ID_PACKAGES;
// Persistance tags.
static final String TAG_SELECTION= "selection"; //$NON-NLS-1$
static final String TAG_EXPANDED= "expanded"; //$NON-NLS-1$
static final String TAG_ELEMENT= "element"; //$NON-NLS-1$
static final String TAG_PATH= "path"; //$NON-NLS-1$
static final String TAG_VERTICAL_POSITION= "verticalPosition"; //$NON-NLS-1$
static final String TAG_HORIZONTAL_POSITION= "horizontalPosition"; //$NON-NLS-1$
static final String TAG_FILTERS = "filters"; //$NON-NLS-1$
static final String TAG_FILTER = "filter"; //$NON-NLS-1$
static final String TAG_LAYOUT= "layout"; //$NON-NLS-1$
private PackageExplorerContentProvider fContentProvider;
private PackageExplorerActionGroup fActionSet;
private ProblemTreeViewer fViewer;
private Menu fContextMenu;
private IMemento fMemento;
private ISelectionChangedListener fSelectionListener;
private String fWorkingSetName;
private IPartListener 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) {
}
};
private ITreeViewerListener fExpansionListener= new ITreeViewerListener() {
public void treeCollapsed(TreeExpansionEvent event) {
}
public void treeExpanded(TreeExpansionEvent event) {
Object element= event.getElement();
if (element instanceof ICompilationUnit ||
element instanceof IClassFile)
expandMainType(element);
}
};
private PackageExplorerLabelProvider fLabelProvider;
/* (non-Javadoc)
* Method declared on IViewPart.
*/
private boolean fLinkingEnabled;
public void init(IViewSite site, IMemento memento) throws PartInitException {
super.init(site, memento);
fMemento= memento;
restoreLayoutState(memento);
}
private void restoreLayoutState(IMemento memento) {
Integer state= null;
if (memento != null)
state= memento.getInteger(TAG_LAYOUT);
// If no memento try an restore from preference store
if(state == null) {
IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore();
state= new Integer(store.getInt(TAG_LAYOUT));
}
if (state.intValue() == FLAT_LAYOUT)
fIsCurrentLayoutFlat= true;
else if (state.intValue() == HIERARCHICAL_LAYOUT)
fIsCurrentLayoutFlat= false;
else
fIsCurrentLayoutFlat= true;
}
/**
* Returns the package explorer part of the active perspective. If
* there isn't any package explorer part <code>null</code> is returned.
*/
public static PackageExplorerPart getFromActivePerspective() {
IWorkbenchPage activePage= JavaPlugin.getActivePage();
if (activePage == null)
return null;
IViewPart view= activePage.findView(VIEW_ID);
if (view instanceof PackageExplorerPart)
return (PackageExplorerPart)view;
return null;
}
/**
* Makes the package explorer part visible in the active perspective. If there
* isn't a package explorer part registered <code>null</code> is returned.
* Otherwise the opened view part is returned.
*/
public static PackageExplorerPart openInActivePerspective() {
try {
return (PackageExplorerPart)JavaPlugin.getActivePage().showView(VIEW_ID);
} catch(PartInitException pe) {
return null;
}
}
public void dispose() {
if (fContextMenu != null && !fContextMenu.isDisposed())
fContextMenu.dispose();
getSite().getPage().removePartListener(fPartListener);
JavaPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(this);
if (fViewer != null)
fViewer.removeTreeListener(fExpansionListener);
if (fActionSet != null)
fActionSet.dispose();
super.dispose();
}
/**
* Implementation of IWorkbenchPart.createPartControl(Composite)
*/
public void createPartControl(Composite parent) {
fViewer= createViewer(parent);
fViewer.setUseHashlookup(true);
fViewer.setComparer(new PackageExplorerElementComparer());
setProviders();
JavaPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this);
MenuManager menuMgr= new MenuManager("#PopupMenu"); //$NON-NLS-1$
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(this);
fContextMenu= menuMgr.createContextMenu(fViewer.getTree());
fViewer.getTree().setMenu(fContextMenu);
// Register viewer with site. This must be done before making the actions.
IWorkbenchPartSite site= getSite();
site.registerContextMenu(menuMgr, fViewer);
site.setSelectionProvider(fViewer);
site.getPage().addPartListener(fPartListener);
if (fMemento != null) {
restoreLinkingEnabled(fMemento);
}
makeActions(); // call before registering for selection changes
// Set input after filter and sorter has been set. This avoids resorting and refiltering.
restoreFilterAndSorter();
fViewer.setInput(findInputElement());
initDragAndDrop();
initKeyListener();
fSelectionListener= new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
handleSelectionChanged(event);
}
};
fViewer.addSelectionChangedListener(fSelectionListener);
fViewer.addDoubleClickListener(new IDoubleClickListener() {
public void doubleClick(DoubleClickEvent event) {
fActionSet.handleDoubleClick(event);
}
});
fViewer.addOpenListener(new IOpenListener() {
public void open(OpenEvent event) {
fActionSet.handleOpen(event);
}
});
IStatusLineManager slManager= getViewSite().getActionBars().getStatusLineManager();
fViewer.addSelectionChangedListener(new StatusBarUpdater(slManager));
fViewer.addTreeListener(fExpansionListener);
if (fMemento != null)
restoreUIState(fMemento);
fMemento= null;
// Set help for the view
JavaUIHelp.setHelp(fViewer, IJavaHelpContextIds.PACKAGES_VIEW);
fillActionBars();
updateTitle();
}
/**
* This viewer ensures that non-leaves in the hierarchical
* layout are not removed by any filters.
*
* @since 2.1
*/
private ProblemTreeViewer createViewer(Composite parent) {
return new ProblemTreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL) {
/*
* @see org.eclipse.jface.viewers.StructuredViewer#filter(java.lang.Object)
*/
protected Object[] getFilteredChildren(Object parent) {
List list = new ArrayList();
ViewerFilter[] filters = fViewer.getFilters();
Object[] children = ((ITreeContentProvider) fViewer.getContentProvider()).getChildren(parent);
for (int i = 0; i < children.length; i++) {
Object object = children[i];
if (!isEssential(object)) {
object = filter(object, parent, filters);
if (object != null) {
list.add(object);
}
} else
list.add(object);
}
return list.toArray();
}
// Sends the object through the given filters
private Object filter(Object object, Object parent, ViewerFilter[] filters) {
for (int i = 0; i < filters.length; i++) {
ViewerFilter filter = filters[i];
if (!filter.select(fViewer, parent, object))
return null;
}
return object;
}
/* Checks if a filtered object in essential (ie. is a parent that
* should not be removed).
*/
private boolean isEssential(Object object) {
try {
if (!isFlatLayout() && object instanceof IPackageFragment) {
IPackageFragment fragment = (IPackageFragment) object;
return !fragment.isDefaultPackage() && fragment.hasSubpackages();
}
} catch (JavaModelException e) {
JavaPlugin.log(e);
}
return false;
}
protected void handleInvalidSelection(ISelection invalidSelection, ISelection newSelection) {
IStructuredSelection is= (IStructuredSelection)invalidSelection;
List ns= null;
if (newSelection instanceof IStructuredSelection) {
ns= new ArrayList(((IStructuredSelection)newSelection).toList());
} else {
ns= new ArrayList();
}
boolean changed= false;
for (Iterator iter= is.iterator(); iter.hasNext();) {
Object element= iter.next();
if (element instanceof IJavaProject) {
IProject project= ((IJavaProject)element).getProject();
if (!project.isOpen()) {
ns.add(project);
changed= true;
}
} else if (element instanceof IProject) {
IProject project= (IProject)element;
if (project.isOpen()) {
IJavaProject jProject= JavaCore.create(project);
if (jProject != null && jProject.exists())
ns.add(jProject);
changed= true;
}
}
}
if (changed) {
newSelection= new StructuredSelection(ns);
setSelection(newSelection);
}
super.handleInvalidSelection(invalidSelection, newSelection);
}
};
}
/**
* Answers whether this part shows the packages flat or hierarchical.
*
* @since 2.1
*/
boolean isFlatLayout() {
return fIsCurrentLayoutFlat;
}
private void setProviders() {
//content provider must be set before the label provider
fContentProvider= createContentProvider();
fContentProvider.setIsFlatLayout(fIsCurrentLayoutFlat);
fViewer.setContentProvider(fContentProvider);
fLabelProvider= createLabelProvider();
fLabelProvider.setIsFlatLayout(fIsCurrentLayoutFlat);
fViewer.setLabelProvider(new DecoratingJavaLabelProvider(fLabelProvider, false, false));
// problem decoration provided by PackageLabelProvider
}
void toggleLayout() {
// Update current state and inform content and label providers
fIsCurrentLayoutFlat= !fIsCurrentLayoutFlat;
saveLayoutState(null);
fContentProvider.setIsFlatLayout(isFlatLayout());
fLabelProvider.setIsFlatLayout(isFlatLayout());
fViewer.getControl().setRedraw(false);
fViewer.refresh();
fViewer.getControl().setRedraw(true);
}
/**
* This method should only be called inside this class
* and from test cases.
*/
public PackageExplorerContentProvider createContentProvider() {
IPreferenceStore store= PreferenceConstants.getPreferenceStore();
boolean showCUChildren= store.getBoolean(PreferenceConstants.SHOW_CU_CHILDREN);
boolean reconcile= PreferenceConstants.UPDATE_WHILE_EDITING.equals(store.getString(PreferenceConstants.UPDATE_JAVA_VIEWS));
return new PackageExplorerContentProvider(this, showCUChildren, reconcile);
}
private PackageExplorerLabelProvider createLabelProvider() {
return new PackageExplorerLabelProvider(AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS | JavaElementLabels.P_COMPRESSED,
AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS | JavaElementImageProvider.SMALL_ICONS,
fContentProvider);
}
private void fillActionBars() {
IActionBars actionBars= getViewSite().getActionBars();
fActionSet.fillActionBars(actionBars);
}
private Object findInputElement() {
Object input= getSite().getPage().getInput();
if (input instanceof IWorkspace) {
return JavaCore.create(((IWorkspace)input).getRoot());
} else if (input instanceof IContainer) {
IJavaElement element= JavaCore.create((IContainer)input);
if (element != null && element.exists())
return element;
return input;
}
//1GERPRT: ITPJUI:ALL - Packages View is empty when shown in Type Hierarchy Perspective
// we can't handle the input
// fall back to show the workspace
return JavaCore.create(JavaPlugin.getWorkspace().getRoot());
}
/**
* Answer the property defined by key.
*/
public Object getAdapter(Class key) {
if (key.equals(ISelectionProvider.class))
return fViewer;
if (key == IShowInSource.class) {
return getShowInSource();
}
if (key == IShowInTargetList.class) {
return new IShowInTargetList() {
public String[] getShowInTargetIds() {
return new String[] { IPageLayout.ID_RES_NAV };
}
};
}
return super.getAdapter(key);
}
/**
* Returns the tool tip text for the given element.
*/
String getToolTipText(Object element) {
String result;
if (!(element instanceof IResource)) {
if (element instanceof IJavaModel)
result= PackagesMessages.getString("PackageExplorerPart.workspace"); //$NON-NLS-1$
else
result= JavaElementLabels.getTextLabel(element, AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS);
} else {
IPath path= ((IResource) element).getFullPath();
if (path.isRoot()) {
result= PackagesMessages.getString("PackageExplorer.title"); //$NON-NLS-1$
} else {
result= path.makeRelative().toString();
}
}
if (fWorkingSetName == null)
return result;
String wsstr= PackagesMessages.getFormattedString("PackageExplorer.toolTip", new String[] { fWorkingSetName }); //$NON-NLS-1$
if (result.length() == 0)
return wsstr;
return PackagesMessages.getFormattedString("PackageExplorer.toolTip2", new String[] { result, fWorkingSetName }); //$NON-NLS-1$
}
public String getTitleToolTip() {
if (fViewer == null)
return super.getTitleToolTip();
return getToolTipText(fViewer.getInput());
}
/**
* @see IWorkbenchPart#setFocus()
*/
public void setFocus() {
fViewer.getTree().setFocus();
}
/**
* Returns the current selection.
*/
private ISelection getSelection() {
return fViewer.getSelection();
}
//---- Action handling ----------------------------------------------------------
/**
* Called when the context menu is about to open. Override
* to add your own context dependent menu contributions.
*/
public void menuAboutToShow(IMenuManager menu) {
JavaPlugin.createStandardGroups(menu);
fActionSet.setContext(new ActionContext(getSelection()));
fActionSet.fillContextMenu(menu);
fActionSet.setContext(null);
}
private void makeActions() {
fActionSet= new PackageExplorerActionGroup(this);
}
//---- Event handling ----------------------------------------------------------
private void initDragAndDrop() {
int ops= DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
Transfer[] transfers= new Transfer[] {
LocalSelectionTransfer.getInstance(),
ResourceTransfer.getInstance(),
FileTransfer.getInstance()};
// Drop Adapter
TransferDropTargetListener[] dropListeners= new TransferDropTargetListener[] {
new SelectionTransferDropAdapter(fViewer),
new FileTransferDropAdapter(fViewer)
};
fViewer.addDropSupport(ops | DND.DROP_DEFAULT, transfers, new DelegatingDropAdapter(dropListeners));
// Drag Adapter
Control control= fViewer.getControl();
TransferDragSourceListener[] dragListeners= new TransferDragSourceListener[] {
new SelectionTransferDragAdapter(fViewer),
new ResourceTransferDragAdapter(fViewer),
new FileTransferDragAdapter(fViewer)
};
DragSource source= new DragSource(control, ops);
// Note, that the transfer agents are set by the delegating drag adapter itself.
source.addDragListener(new DelegatingDragAdapter(dragListeners) {
public void dragStart(DragSourceEvent event) {
IStructuredSelection selection= (IStructuredSelection)getSelection();
if (selection.isEmpty()) {
event.doit= false;
return;
}
for (Iterator iter= selection.iterator(); iter.hasNext(); ) {
if (iter.next() instanceof IMember) {
setPossibleListeners(new TransferDragSourceListener[] {new SelectionTransferDragAdapter(fViewer)});
break;
}
}
super.dragStart(event);
}
});
}
/**
* Handles selection changed in viewer.
* Updates global actions.
* Links to editor (if option enabled)
*/
private void handleSelectionChanged(SelectionChangedEvent event) {
IStructuredSelection selection= (IStructuredSelection) event.getSelection();
fActionSet.handleSelectionChanged(event);
// if (OpenStrategy.getOpenMethod() != OpenStrategy.SINGLE_CLICK)
linkToEditor(selection);
}
public void selectReveal(ISelection selection) {
selectReveal(selection, 0);
}
private void selectReveal(final ISelection selection, final int count) {
Control ctrl= getViewer().getControl();
if (ctrl == null || ctrl.isDisposed())
return;
ISelection javaSelection= convertSelection(selection);
fViewer.setSelection(javaSelection, true);
PackageExplorerContentProvider provider= (PackageExplorerContentProvider)getViewer().getContentProvider();
ISelection cs= fViewer.getSelection();
// If we have Pending changes and the element could not be selected then
// we try it again on more time by posting the select and reveal asynchronuoulsy
// to the event queue. See PR http://bugs.eclipse.org/bugs/show_bug.cgi?id=30700
// for a discussion of the underlying problem.
if (count == 0 && provider.hasPendingChanges() && !javaSelection.equals(cs)) {
ctrl.getDisplay().asyncExec(new Runnable() {
public void run() {
selectReveal(selection, count + 1);
}
});
}
}
private ISelection convertSelection(ISelection s) {
if (!(s instanceof IStructuredSelection))
return s;
Object[] elements= ((StructuredSelection)s).toArray();
if (!containsResources(elements))
return s;
for (int i= 0; i < elements.length; i++) {
Object o= elements[i];
if (o instanceof IResource) {
IJavaElement jElement= JavaCore.create((IResource)o);
if (jElement != null && jElement.exists())
elements[i]= jElement;
}
}
return new StructuredSelection(elements);
}
private boolean containsResources(Object[] elements) {
for (int i = 0; i < elements.length; i++) {
if (elements[i] instanceof IResource)
return true;
}
return false;
}
public void selectAndReveal(Object element) {
selectReveal(new StructuredSelection(element));
}
boolean isLinkingEnabled() {
return fLinkingEnabled;
}
/**
* Initializes the linking enabled setting from the preference store.
*/
private void initLinkingEnabled() {
fLinkingEnabled= PreferenceConstants.getPreferenceStore().getBoolean(PreferenceConstants.LINK_PACKAGES_TO_EDITOR);
}
/**
* Links to editor (if option enabled)
*/
private void linkToEditor(IStructuredSelection selection) {
// ignore selection changes if the package explorer is not the active part.
// In this case the selection change isn't triggered by a user.
if (!isActivePart())
return;
Object obj= selection.getFirstElement();
if (selection.size() == 1) {
IEditorPart part= EditorUtility.isOpenInEditor(obj);
if (part != null) {
IWorkbenchPage page= getSite().getPage();
page.bringToTop(part);
if (obj instanceof IJavaElement)
EditorUtility.revealInEditor(part, (IJavaElement) obj);
}
}
}
private boolean isActivePart() {
return this == getSite().getPage().getActivePart();
}
public void saveState(IMemento memento) {
if (fViewer == null) {
// part has not been created
if (fMemento != null) //Keep the old state;
memento.putMemento(fMemento);
return;
}
saveExpansionState(memento);
saveSelectionState(memento);
saveLayoutState(memento);
saveLinkingEnabled(memento);
// commented out because of http://bugs.eclipse.org/bugs/show_bug.cgi?id=4676
//saveScrollState(memento, fViewer.getTree());
fActionSet.saveFilterAndSorterState(memento);
}
private void saveLinkingEnabled(IMemento memento) {
memento.putInteger(PreferenceConstants.LINK_PACKAGES_TO_EDITOR, fLinkingEnabled ? 1 : 0);
}
/**
* Saves the current layout state.
*
* @param memento the memento to save the state into or
* <code>null</code> to store the state in the preferences
* @since 2.1
*/
private void saveLayoutState(IMemento memento) {
if (memento != null) {
memento.putInteger(TAG_LAYOUT, getLayoutAsInt());
} else {
//if memento is null save in preference store
IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore();
store.setValue(TAG_LAYOUT, getLayoutAsInt());
}
}
private int getLayoutAsInt() {
if (fIsCurrentLayoutFlat)
return FLAT_LAYOUT;
else
return HIERARCHICAL_LAYOUT;
}
protected void saveScrollState(IMemento memento, Tree tree) {
ScrollBar bar= tree.getVerticalBar();
int position= bar != null ? bar.getSelection() : 0;
memento.putString(TAG_VERTICAL_POSITION, String.valueOf(position));
//save horizontal position
bar= tree.getHorizontalBar();
position= bar != null ? bar.getSelection() : 0;
memento.putString(TAG_HORIZONTAL_POSITION, String.valueOf(position));
}
protected void saveSelectionState(IMemento memento) {
Object elements[]= ((IStructuredSelection) fViewer.getSelection()).toArray();
if (elements.length > 0) {
IMemento selectionMem= memento.createChild(TAG_SELECTION);
for (int i= 0; i < elements.length; i++) {
IMemento elementMem= selectionMem.createChild(TAG_ELEMENT);
// we can only persist JavaElements for now
Object o= elements[i];
if (o instanceof IJavaElement)
elementMem.putString(TAG_PATH, ((IJavaElement) elements[i]).getHandleIdentifier());
}
}
}
protected void saveExpansionState(IMemento memento) {
Object expandedElements[]= fViewer.getVisibleExpandedElements();
if (expandedElements.length > 0) {
IMemento expandedMem= memento.createChild(TAG_EXPANDED);
for (int i= 0; i < expandedElements.length; i++) {
IMemento elementMem= expandedMem.createChild(TAG_ELEMENT);
// we can only persist JavaElements for now
Object o= expandedElements[i];
if (o instanceof IJavaElement)
elementMem.putString(TAG_PATH, ((IJavaElement) expandedElements[i]).getHandleIdentifier());
}
}
}
private void restoreFilterAndSorter() {
fViewer.setSorter(new JavaElementSorter());
if (fMemento != null)
fActionSet.restoreFilterAndSorterState(fMemento);
}
private void restoreUIState(IMemento memento) {
restoreExpansionState(memento);
restoreSelectionState(memento);
// commented out because of http://bugs.eclipse.org/bugs/show_bug.cgi?id=4676
//restoreScrollState(memento, fViewer.getTree());
}
private void restoreLinkingEnabled(IMemento memento) {
Integer val= memento.getInteger(PreferenceConstants.LINK_PACKAGES_TO_EDITOR);
if (val != null) {
fLinkingEnabled= val.intValue() != 0;
}
}
protected void restoreScrollState(IMemento memento, Tree tree) {
ScrollBar bar= tree.getVerticalBar();
if (bar != null) {
try {
String posStr= memento.getString(TAG_VERTICAL_POSITION);
int position;
position= new Integer(posStr).intValue();
bar.setSelection(position);
} catch (NumberFormatException e) {
// ignore, don't set scrollposition
}
}
bar= tree.getHorizontalBar();
if (bar != null) {
try {
String posStr= memento.getString(TAG_HORIZONTAL_POSITION);
int position;
position= new Integer(posStr).intValue();
bar.setSelection(position);
} catch (NumberFormatException e) {
// ignore don't set scroll position
}
}
}
protected void restoreSelectionState(IMemento memento) {
IMemento childMem;
childMem= memento.getChild(TAG_SELECTION);
if (childMem != null) {
ArrayList list= new ArrayList();
IMemento[] elementMem= childMem.getChildren(TAG_ELEMENT);
for (int i= 0; i < elementMem.length; i++) {
Object element= JavaCore.create(elementMem[i].getString(TAG_PATH));
if (element != null)
list.add(element);
}
fViewer.setSelection(new StructuredSelection(list));
}
}
protected void restoreExpansionState(IMemento memento) {
IMemento childMem= memento.getChild(TAG_EXPANDED);
if (childMem != null) {
ArrayList elements= new ArrayList();
IMemento[] elementMem= childMem.getChildren(TAG_ELEMENT);
for (int i= 0; i < elementMem.length; i++) {
Object element= JavaCore.create(elementMem[i].getString(TAG_PATH));
if (element != null)
elements.add(element);
}
fViewer.setExpandedElements(elements.toArray());
}
}
/**
* Create the KeyListener for doing the refresh on the viewer.
*/
private void initKeyListener() {
fViewer.getControl().addKeyListener(new KeyAdapter() {
public void keyReleased(KeyEvent event) {
fActionSet.handleKeyEvent(event);
}
});
}
/**
* An editor has been activated. Set the selection in this Packages Viewer
* to be the editor's input, if linking is enabled.
*/
void editorActivated(IEditorPart editor) {
if (!isLinkingEnabled())
return;
showInput(getElementOfInput(editor.getEditorInput()));
}
boolean showInput(Object input) {
Object element= null;
if (input instanceof IFile && isOnClassPath((IFile)input)) {
element= JavaCore.create((IFile)input);
}
if (element == null) // try a non Java resource
element= input;
if (element != null) {
ISelection newSelection= new StructuredSelection(element);
if (!fViewer.getSelection().equals(newSelection)) {
try {
fViewer.removeSelectionChangedListener(fSelectionListener);
fViewer.setSelection(newSelection);
while (element != null && fViewer.getSelection().isEmpty()) {
// Try to select parent in case element is filtered
element= getParent(element);
if (element != null) {
newSelection= new StructuredSelection(element);
fViewer.setSelection(newSelection);
}
}
} finally {
fViewer.addSelectionChangedListener(fSelectionListener);
}
}
return true;
}
return false;
}
private boolean isOnClassPath(IFile file) {
IJavaProject jproject= JavaCore.create(file.getProject());
try {
return jproject.isOnClasspath(file);
} catch (JavaModelException e) {
// fall through
}
return false;
}
/**
* Returns the element's parent.
*
* @return the parent or <code>null</code> if there's no parent
*/
private Object getParent(Object element) {
if (element instanceof IJavaElement)
return ((IJavaElement)element).getParent();
else if (element instanceof IResource)
return ((IResource)element).getParent();
// else if (element instanceof IStorage) {
// can't get parent - see bug 22376
// }
return null;
}
/**
* A compilation unit or class was expanded, expand
* the main type.
*/
void expandMainType(Object element) {
try {
IType type= null;
if (element instanceof ICompilationUnit) {
ICompilationUnit cu= (ICompilationUnit)element;
IType[] types= cu.getTypes();
if (types.length > 0)
type= types[0];
}
else if (element instanceof IClassFile) {
IClassFile cf= (IClassFile)element;
type= cf.getType();
}
if (type != null) {
final IType type2= type;
Control ctrl= fViewer.getControl();
if (ctrl != null && !ctrl.isDisposed()) {
ctrl.getDisplay().asyncExec(new Runnable() {
public void run() {
Control ctrl= fViewer.getControl();
if (ctrl != null && !ctrl.isDisposed())
fViewer.expandToLevel(type2, 1);
}
});
}
}
} catch(JavaModelException e) {
// no reveal
}
}
/**
* Returns the element contained in the EditorInput
*/
Object getElementOfInput(IEditorInput input) {
if (input instanceof IClassFileEditorInput)
return ((IClassFileEditorInput)input).getClassFile();
else if (input instanceof IFileEditorInput)
return ((IFileEditorInput)input).getFile();
else if (input instanceof JarEntryEditorInput)
return ((JarEntryEditorInput)input).getStorage();
return null;
}
/**
* Returns the Viewer.
*/
TreeViewer getViewer() {
return fViewer;
}
/**
* Returns the TreeViewer.
*/
public TreeViewer getTreeViewer() {
return fViewer;
}
boolean isExpandable(Object element) {
if (fViewer == null)
return false;
return fViewer.isExpandable(element);
}
void setWorkingSetName(String workingSetName) {
fWorkingSetName= workingSetName;
}
/**
* Updates the title text and title tool tip.
* Called whenever the input of the viewer changes.
*/
void updateTitle() {
Object input= fViewer.getInput();
String viewName= getConfigurationElement().getAttribute("name"); //$NON-NLS-1$
if (input == null
|| (input instanceof IJavaModel)) {
setTitle(viewName);
setTitleToolTip(""); //$NON-NLS-1$
} else {
String inputText= JavaElementLabels.getTextLabel(input, AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS);
String title= PackagesMessages.getFormattedString("PackageExplorer.argTitle", new String[] { viewName, inputText }); //$NON-NLS-1$
setTitle(title);
setTitleToolTip(getToolTipText(input));
}
}
/**
* Sets the decorator for the package explorer.
*
* @param decorator a label decorator or <code>null</code> for no decorations.
* @deprecated To be removed
*/
public void setLabelDecorator(ILabelDecorator decorator) {
}
/*
* @see IPropertyChangeListener#propertyChange(PropertyChangeEvent)
*/
public void propertyChange(PropertyChangeEvent event) {
if (fViewer == null)
return;
boolean refreshViewer= false;
if (PreferenceConstants.SHOW_CU_CHILDREN.equals(event.getProperty())) {
fActionSet.updateActionBars(getViewSite().getActionBars());
boolean showCUChildren= PreferenceConstants.getPreferenceStore().getBoolean(PreferenceConstants.SHOW_CU_CHILDREN);
((StandardJavaElementContentProvider)fViewer.getContentProvider()).setProvideMembers(showCUChildren);
refreshViewer= true;
} else if (PreferenceConstants.APPEARANCE_MEMBER_SORT_ORDER.equals(event.getProperty())) {
refreshViewer= true;
}
if (refreshViewer)
fViewer.refresh();
}
/* (non-Javadoc)
* @see IViewPartInputProvider#getViewPartInput()
*/
public Object getViewPartInput() {
if (fViewer != null) {
return fViewer.getInput();
}
return null;
}
public void collapseAll() {
fViewer.getControl().setRedraw(false);
fViewer.collapseToLevel(getViewPartInput(), TreeViewer.ALL_LEVELS);
fViewer.getControl().setRedraw(true);
}
public PackageExplorerPart() {
initLinkingEnabled();
}
public boolean show(ShowInContext context) {
Object input= context.getInput();
if (input instanceof IEditorInput)
return showInput(getElementOfInput((IEditorInput)context.getInput()));
ISelection selection= context.getSelection();
if (selection != null) {
selectReveal(selection);
return true;
}
return false;
}
/**
* Returns the <code>IShowInSource</code> for this view.
*/
protected IShowInSource getShowInSource() {
return new IShowInSource() {
public ShowInContext getShowInContext() {
return new ShowInContext(
getViewer().getInput(),
getViewer().getSelection());
}
};
}
/**
* @see IResourceNavigator#setLinkingEnabled(boolean)
* @since 2.1
*/
public void setLinkingEnabled(boolean enabled) {
fLinkingEnabled= enabled;
PreferenceConstants.getPreferenceStore().setValue(PreferenceConstants.LINK_PACKAGES_TO_EDITOR, enabled);
if (enabled) {
IEditorPart editor = getSite().getPage().getActiveEditor();
if (editor != null) {
editorActivated(editor);
}
}
}
/**
* Returns the name for the given element.
* Used as the name for the current frame.
*/
String getFrameName(Object element) {
if (element instanceof IJavaElement) {
return ((IJavaElement) element).getElementName();
} else {
return ((ILabelProvider) getTreeViewer().getLabelProvider()).getText(element);
}
}
void projectStateChanged(Object root) {
Control ctrl= fViewer.getControl();
if (ctrl != null && !ctrl.isDisposed()){
fViewer.refresh(root, true);
// trigger a syntetic selection change so that action refresh their
// enable state.
fViewer.setSelection(fViewer.getSelection());
}
}
}
|
32,664 |
Bug 32664 Package Explorer: hierarchical layout and back-linking don't work allways together.
|
The following triggers it: - initially 'flat layout' is used, 'link with editor' is on or off - open a java file - use 'collapse all' in the package explorer - select 'hierarchical layout' - switch 'link with editor' on or off&on -> no back-linking
|
resolved fixed
|
9ae517a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T16:24:10Z | 2003-02-24T15:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerContentProvider.java
|
/*
* (c) Copyright IBM Corp. 2000, 2002.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.packageview;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceDelta;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.swt.widgets.Control;
import org.eclipse.jface.viewers.IBasicPropertyConstants;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jdt.core.ElementChangedEvent;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IElementChangedListener;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaElementDelta;
import org.eclipse.jdt.core.IJavaModel;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.IWorkingCopy;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.StandardJavaElementContentProvider;
import org.eclipse.jdt.internal.ui.JavaPlugin;
/**
* Content provider for the PackageExplorer.
*
* <p>
* Since 2.1 this content provider can provide the children for flat or hierarchical
* layout. The hierarchical layout is done by delegating to the <code>PackageFragmentProvider</code>.
* </p>
*
* @see org.eclipse.jdt.ui.StandardJavaElementContentProvider
* @see org.eclipse.jdt.internal.ui.packageview.PackageFragmentProvider
*/
class PackageExplorerContentProvider extends StandardJavaElementContentProvider implements ITreeContentProvider, IElementChangedListener {
private TreeViewer fViewer;
private Object fInput;
private boolean fIsFlatLayout;
private PackageFragmentProvider fPackageFragmentProvider= new PackageFragmentProvider();
private int fPendingChanges;
private PackageExplorerPart fPart;
/**
* Creates a new content provider for Java elements.
*/
public PackageExplorerContentProvider(PackageExplorerPart part, boolean provideMembers, boolean provideWorkingCopy) {
super(provideMembers, provideWorkingCopy);
fPart= part;
}
/* (non-Javadoc)
* Method declared on IElementChangedListener.
*/
public void elementChanged(final ElementChangedEvent event) {
try {
processDelta(event.getDelta());
} catch(JavaModelException e) {
JavaPlugin.log(e);
}
}
/* (non-Javadoc)
* Method declared on IContentProvider.
*/
public void dispose() {
super.dispose();
JavaCore.removeElementChangedListener(this);
fPackageFragmentProvider.dispose();
}
// ------ Code which delegates to PackageFragmentProvider ------
private boolean needsToDelegate(Object element) {
int type= -1;
if (element instanceof IJavaElement)
type= ((IJavaElement)element).getElementType();
return (!fIsFlatLayout && (type == IJavaElement.PACKAGE_FRAGMENT || type == IJavaElement.PACKAGE_FRAGMENT_ROOT || type == IJavaElement.JAVA_PROJECT));
}
public Object[] getChildren(Object parentElement) {
Object[] children= NO_CHILDREN;
try {
if (parentElement instanceof IJavaModel)
return concatenate(getJavaProjects((IJavaModel)parentElement), getNonJavaProjects((IJavaModel)parentElement));
if (parentElement instanceof ClassPathContainer)
return getContainerPackageFragmentRoots((ClassPathContainer)parentElement);
if (parentElement instanceof IProject)
return ((IProject)parentElement).members();
if (needsToDelegate(parentElement)) {
Object[] packageFragments= fPackageFragmentProvider.getChildren(parentElement);
children= getWithParentsResources(packageFragments, parentElement);
} else {
children= super.getChildren(parentElement);
}
if (parentElement instanceof IJavaProject) {
IJavaProject project= (IJavaProject)parentElement;
return rootsAndContainers(project, children);
}
else
return children;
} catch (CoreException e) {
return NO_CHILDREN;
}
}
private Object[] rootsAndContainers(IJavaProject project, Object[] roots) {
List result= new ArrayList(roots.length);
Set containers= new HashSet(roots.length);
for (int i= 0; i < roots.length; i++) {
if (roots[i] instanceof IPackageFragmentRoot) {
IPackageFragmentRoot root= (IPackageFragmentRoot)roots[i];
IClasspathEntry entry= null;
try {
entry= root.getRawClasspathEntry();
} catch (JavaModelException e) {
continue;
}
if (entry != null && entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER)
containers.add(entry);
else
result.add(root);
} else {
result.add(roots[i]);
}
}
for (Iterator each= containers.iterator(); each.hasNext();) {
IClasspathEntry element= (IClasspathEntry) each.next();
result.add(new ClassPathContainer(project, element));
}
return result.toArray();
}
private Object[] getContainerPackageFragmentRoots(ClassPathContainer container) throws JavaModelException {
return container.getPackageFragmentRoots();
}
private Object[] getNonJavaProjects(IJavaModel model) throws JavaModelException {
return model.getNonJavaResources();
}
public Object getParent(Object child) {
if (needsToDelegate(child)) {
return fPackageFragmentProvider.getParent(child);
} else
return super.getParent(child);
}
/**
* Returns the given objects with the resources of the parent.
*/
private Object[] getWithParentsResources(Object[] existingObject, Object parent) {
Object[] objects= super.getChildren(parent);
List list= new ArrayList();
// Add everything that is not a PackageFragment
for (int i= 0; i < objects.length; i++) {
Object object= objects[i];
if (!(object instanceof IPackageFragment)) {
list.add(object);
}
}
if (existingObject != null)
list.addAll(Arrays.asList(existingObject));
return list.toArray();
}
/* (non-Javadoc)
* Method declared on IContentProvider.
*/
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
super.inputChanged(viewer, oldInput, newInput);
fPackageFragmentProvider.inputChanged(viewer, oldInput, newInput);
fViewer= (TreeViewer)viewer;
if (oldInput == null && newInput != null) {
JavaCore.addElementChangedListener(this);
} else if (oldInput != null && newInput == null) {
JavaCore.removeElementChangedListener(this);
}
fInput= newInput;
}
// ------ delta processing ------
/**
* Processes a delta recursively. When more than two children are affected the
* tree is fully refreshed starting at this node. The delta is processed in the
* current thread but the viewer updates are posted to the UI thread.
*/
public void processDelta(IJavaElementDelta delta) throws JavaModelException {
int kind= delta.getKind();
int flags= delta.getFlags();
IJavaElement element= delta.getElement();
if(element.getElementType()!= IJavaElement.JAVA_MODEL && element.getElementType()!= IJavaElement.JAVA_PROJECT){
IJavaProject proj= element.getJavaProject();
if (proj == null || !proj.getProject().isOpen())
return;
}
if (!fIsFlatLayout && element.getElementType() == IJavaElement.PACKAGE_FRAGMENT) {
fPackageFragmentProvider.processDelta(delta);
if (processResourceDeltas(delta.getResourceDeltas(), element))
return;
IJavaElementDelta[] affectedChildren= delta.getAffectedChildren();
processAffectedChildren(affectedChildren);
return;
}
if (!getProvideWorkingCopy() && isWorkingCopy(element))
return;
if (element != null && element.getElementType() == IJavaElement.COMPILATION_UNIT && !isOnClassPath((ICompilationUnit)element))
return;
// handle open and closing of a project
if (((flags & IJavaElementDelta.F_CLOSED) != 0) || ((flags & IJavaElementDelta.F_OPENED) != 0)) {
postRefresh(element);
return;
}
if (kind == IJavaElementDelta.REMOVED) {
// when a working copy is removed all we have to do
// is to refresh the compilation unit
if (isWorkingCopy(element)) {
refreshWorkingCopy((IWorkingCopy)element);
return;
}
Object parent= internalGetParent(element);
postRemove(element);
if (parent instanceof IPackageFragment)
postUpdateIcon((IPackageFragment)parent);
// we are filtering out empty subpackages, so we
// a package becomes empty we remove it from the viewer.
if (isPackageFragmentEmpty(element.getParent())) {
if (fViewer.testFindItem(parent) != null)
postRefresh(internalGetParent(parent));
}
return;
}
if (kind == IJavaElementDelta.ADDED) {
// when a working copy is added all we have to do
// is to refresh the compilation unit
if (isWorkingCopy(element)) {
refreshWorkingCopy((IWorkingCopy)element);
return;
}
Object parent= internalGetParent(element);
// we are filtering out empty subpackages, so we
// have to handle additions to them specially.
if (parent instanceof IPackageFragment) {
Object grandparent= internalGetParent(parent);
// 1GE8SI6: ITPJUI:WIN98 - Rename is not shown in Packages View
// avoid posting a refresh to an unvisible parent
if (parent.equals(fInput)) {
postRefresh(parent);
} else {
// refresh from grandparent if parent isn't visible yet
if (fViewer.testFindItem(parent) == null)
postRefresh(grandparent);
else {
postRefresh(parent);
}
}
return;
} else {
postAdd(parent, element);
}
}
if (element instanceof ICompilationUnit) {
if (getProvideWorkingCopy()) {
IJavaElement original= ((IWorkingCopy)element).getOriginalElement();
if (original != null)
element= original;
}
if (kind == IJavaElementDelta.CHANGED) {
postRefresh(element);
updateSelection(delta);
return;
}
}
// we don't show the contents of a compilation or IClassFile, so don't go any deeper
if ((element instanceof ICompilationUnit) || (element instanceof IClassFile))
return;
// the contents of an external JAR has changed
if (element instanceof IPackageFragmentRoot && ((flags & IJavaElementDelta.F_ARCHIVE_CONTENT_CHANGED) != 0)) {
postRefresh(element);
return;
}
// the source attachment of a JAR has changed
if (element instanceof IPackageFragmentRoot && (((flags & IJavaElementDelta.F_SOURCEATTACHED) != 0 || ((flags & IJavaElementDelta.F_SOURCEDETACHED)) != 0)))
postUpdateIcon(element);
if (isClassPathChange(delta)) {
// throw the towel and do a full refresh of the affected java project.
postRefresh(element.getJavaProject());
return;
}
if (processResourceDeltas(delta.getResourceDeltas(), element))
return;
handleAffectedChildren(delta, element);
}
private void handleAffectedChildren(IJavaElementDelta delta, IJavaElement element) throws JavaModelException {
IJavaElementDelta[] affectedChildren= delta.getAffectedChildren();
if (affectedChildren.length > 1) {
// a package fragment might become non empty refresh from the parent
if (element instanceof IPackageFragment) {
IJavaElement parent= (IJavaElement)internalGetParent(element);
// 1GE8SI6: ITPJUI:WIN98 - Rename is not shown in Packages View
// avoid posting a refresh to an unvisible parent
if (element.equals(fInput)) {
postRefresh(element);
} else {
postRefresh(parent);
}
return;
}
// more than one child changed, refresh from here downwards
if (element instanceof IPackageFragmentRoot)
postRefresh(skipProjectPackageFragmentRoot((IPackageFragmentRoot)element));
else
postRefresh(element);
return;
}
processAffectedChildren(affectedChildren);
}
protected void processAffectedChildren(IJavaElementDelta[] affectedChildren) throws JavaModelException {
for (int i= 0; i < affectedChildren.length; i++) {
processDelta(affectedChildren[i]);
}
}
private boolean isOnClassPath(ICompilationUnit element) throws JavaModelException {
IJavaProject project= element.getJavaProject();
if (project == null || !project.exists())
return false;
return project.isOnClasspath(element);
}
/**
* Updates the selection. It finds newly added elements
* and selects them.
*/
private void updateSelection(IJavaElementDelta delta) {
final IJavaElement addedElement= findAddedElement(delta);
if (addedElement != null) {
final StructuredSelection selection= new StructuredSelection(addedElement);
postRunnable(new Runnable() {
public void run() {
Control ctrl= fViewer.getControl();
if (ctrl != null && !ctrl.isDisposed()) {
// 19431
// if the item is already visible then select it
if (fViewer.testFindItem(addedElement) != null)
fViewer.setSelection(selection);
}
}
});
}
}
private IJavaElement findAddedElement(IJavaElementDelta delta) {
if (delta.getKind() == IJavaElementDelta.ADDED)
return delta.getElement();
IJavaElementDelta[] affectedChildren= delta.getAffectedChildren();
for (int i= 0; i < affectedChildren.length; i++)
return findAddedElement(affectedChildren[i]);
return null;
}
/**
* Refreshes the Compilation unit corresponding to the workging copy
* @param iWorkingCopy
*/
private void refreshWorkingCopy(IWorkingCopy workingCopy) {
IJavaElement original= workingCopy.getOriginalElement();
if (original != null)
postRefresh(original, false);
}
private boolean isWorkingCopy(IJavaElement element) {
return (element instanceof IWorkingCopy) && ((IWorkingCopy)element).isWorkingCopy();
}
/**
* Updates the package icon
*/
private void postUpdateIcon(final IJavaElement element) {
postRunnable(new Runnable() {
public void run() {
// 1GF87WR: ITPUI:ALL - SWTEx + NPE closing a workbench window.
Control ctrl= fViewer.getControl();
if (ctrl != null && !ctrl.isDisposed())
fViewer.update(element, new String[]{IBasicPropertyConstants.P_IMAGE});
}
});
}
/**
1 * Process a resource delta.
*
* @return true if the parent got refreshed
*/
private boolean processResourceDelta(IResourceDelta delta, Object parent) {
int status= delta.getKind();
int flags= delta.getFlags();
IResource resource= delta.getResource();
// filter out changes affecting the output folder
if (resource == null)
return false;
// this could be optimized by handling all the added children in the parent
if ((status & IResourceDelta.REMOVED) != 0) {
if (parent instanceof IPackageFragment) {
// refresh one level above to deal with empty package filtering properly
postRefresh(internalGetParent(parent));
return true;
} else
postRemove(resource);
}
if ((status & IResourceDelta.ADDED) != 0) {
if (parent instanceof IPackageFragment) {
// refresh one level above to deal with empty package filtering properly
postRefresh(internalGetParent(parent));
return true;
} else
postAdd(parent, resource);
}
// open/close state change of a project
if ((flags & IResourceDelta.OPEN) != 0) {
postProjectStateChanged(internalGetParent(parent));
return true;
}
processResourceDeltas(delta.getAffectedChildren(), resource);
return false;
}
void setIsFlatLayout(boolean state) {
fIsFlatLayout= state;
}
/**
* Process resource deltas.
*
* @return true if the parent got refreshed
*/
private boolean processResourceDeltas(IResourceDelta[] deltas, Object parent) {
if (deltas == null)
return false;
if (deltas.length > 1) {
// more than one child changed, refresh from here downwards
postRefresh(parent);
return true;
}
for (int i= 0; i < deltas.length; i++) {
if (processResourceDelta(deltas[i], parent))
return true;
}
return false;
}
private void postRefresh(final Object root) {
postRefresh(root, true);
}
private void postRefresh(final Object root, final boolean updateLabels) {
postRunnable(new Runnable() {
public void run() {
Control ctrl= fViewer.getControl();
if (ctrl != null && !ctrl.isDisposed()){
fViewer.refresh(root, updateLabels);
}
}
});
}
private void postAdd(final Object parent, final Object element) {
postRunnable(new Runnable() {
public void run() {
Control ctrl= fViewer.getControl();
if (ctrl != null && !ctrl.isDisposed()){
fViewer.add(parent, element);
}
}
});
}
private void postRemove(final Object element) {
postRunnable(new Runnable() {
public void run() {
Control ctrl= fViewer.getControl();
if (ctrl != null && !ctrl.isDisposed()) {
fViewer.remove(element);
}
}
});
}
private void postProjectStateChanged(final Object root) {
postRunnable(new Runnable() {
public void run() {
fPart.projectStateChanged(root);
}
});
}
private void postRunnable(final Runnable r) {
Control ctrl= fViewer.getControl();
final Runnable trackedRunnable= new Runnable() {
public void run() {
try {
r.run();
} finally {
removePendingChange();
}
}
};
if (ctrl != null && !ctrl.isDisposed()) {
addPendingChange();
try {
ctrl.getDisplay().asyncExec(trackedRunnable);
} catch (RuntimeException e) {
removePendingChange();
throw e;
} catch (Error e) {
removePendingChange();
throw e;
}
}
}
// ------ Pending change management due to the use of asyncExec in postRunnable.
public synchronized boolean hasPendingChanges() {
return fPendingChanges > 0;
}
private synchronized void addPendingChange() {
fPendingChanges++;
// System.out.print(fPendingChanges);
}
private synchronized void removePendingChange() {
fPendingChanges--;
if (fPendingChanges < 0)
fPendingChanges= 0;
// System.out.print(fPendingChanges);
}
}
|
33,290 |
Bug 33290 Smart quoting should not occur when following an escape char
|
When typing " at the end of a string, Eclipse helpfully interprets this as a move to the right; so "In here|" typing a " at the cursor point (|) will result in "In here"| However, this is not desirable if trying to type an encoded quote in Java, which is preceeded with the \ escape character: "In here|" -> Type \ "In here\|" -> Type " "In here\"| The desired behaviour for a " following a \ would be to just insert the " and not move on a space "In here|" -> Type \ "In here\|" -> Type " "In here\"|"
|
verified fixed
|
6e805bd
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T16:48:05Z | 2003-02-26T17:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
/**********************************************************************
Copyright (c) 2000, 2002 IBM Corp. and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Common Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/cpl-v10.html
Contributors:
IBM Corporation - Initial implementation
**********************************************************************/
package org.eclipse.jdt.internal.ui.javaeditor;
import java.lang.reflect.InvocationTargetException;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Stack;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.custom.VerifyKeyListener;
import org.eclipse.swt.events.VerifyEvent;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.DocumentCommand;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.ILineTracker;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextOperationTarget;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.text.ITextViewerExtension;
import org.eclipse.jface.text.ITextViewerExtension3;
import org.eclipse.jface.text.ITypedRegion;
import org.eclipse.jface.text.IWidgetTokenKeeper;
import org.eclipse.jface.text.Position;
import org.eclipse.jface.text.contentassist.ContentAssistant;
import org.eclipse.jface.text.contentassist.IContentAssistant;
import org.eclipse.jface.text.source.IOverviewRuler;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.text.source.IVerticalRuler;
import org.eclipse.jface.text.source.SourceViewerConfiguration;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Preferences;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.actions.ActionContext;
import org.eclipse.ui.actions.ActionGroup;
import org.eclipse.ui.actions.WorkspaceModifyOperation;
import org.eclipse.ui.dialogs.SaveAsDialog;
import org.eclipse.ui.editors.text.IStorageDocumentProvider;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.texteditor.ContentAssistAction;
import org.eclipse.ui.texteditor.IDocumentProvider;
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
import org.eclipse.ui.texteditor.TextOperationAction;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IImportContainer;
import org.eclipse.jdt.core.IImportDeclaration;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.ISourceRange;
import org.eclipse.jdt.core.ISourceReference;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.actions.CompositeActionGroup;
import org.eclipse.jdt.internal.ui.compare.LocalHistoryActionGroup;
import org.eclipse.jdt.internal.ui.text.ContentAssistPreference;
import org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionAssistant;
import org.eclipse.jdt.internal.ui.text.java.IReconcilingParticipant;
import org.eclipse.jdt.internal.ui.text.java.SmartBracesAutoEditStrategy;
import org.eclipse.jdt.internal.ui.text.link.LinkedPositionManager;
import org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI;
import org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI.ExitFlags;
import org.eclipse.jdt.ui.IWorkingCopyManager;
import org.eclipse.jdt.ui.PreferenceConstants;
import org.eclipse.jdt.ui.actions.GenerateActionGroup;
import org.eclipse.jdt.ui.actions.IJavaEditorActionDefinitionIds;
import org.eclipse.jdt.ui.actions.RefactorActionGroup;
/**
* Java specific text editor.
*/
public class CompilationUnitEditor extends JavaEditor implements IReconcilingParticipant {
/**
* Text operation code for requesting correction assist to show correction
* proposals for the current position.
*/
public static final int CORRECTIONASSIST_PROPOSALS= 50;
interface ITextConverter {
void customizeDocumentCommand(IDocument document, DocumentCommand command);
};
class AdaptedSourceViewer extends JavaSourceViewer {
private List fTextConverters;
private boolean fIgnoreTextConverters= false;
private JavaCorrectionAssistant fCorrectionAssistant;
public AdaptedSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler, boolean showAnnotationsOverview, int styles) {
super(parent, verticalRuler, overviewRuler, showAnnotationsOverview, styles);
}
public IContentAssistant getContentAssistant() {
return fContentAssistant;
}
/*
* @see ITextOperationTarget#doOperation(int)
*/
public void doOperation(int operation) {
if (getTextWidget() == null)
return;
switch (operation) {
case CONTENTASSIST_PROPOSALS:
String msg= fContentAssistant.showPossibleCompletions();
setStatusLineErrorMessage(msg);
return;
case CORRECTIONASSIST_PROPOSALS:
fCorrectionAssistant.showPossibleCompletions();
return;
case UNDO:
fIgnoreTextConverters= true;
break;
case REDO:
fIgnoreTextConverters= true;
break;
}
super.doOperation(operation);
}
/*
* @see ITextOperationTarget#canDoOperation(int)
*/
public boolean canDoOperation(int operation) {
if (operation == CORRECTIONASSIST_PROPOSALS)
return true;
return super.canDoOperation(operation);
}
/*
* @see TextViewer#handleDispose()
*/
protected void handleDispose() {
if (fCorrectionAssistant != null) {
fCorrectionAssistant.uninstall();
fCorrectionAssistant= null;
}
super.handleDispose();
}
public void insertTextConverter(ITextConverter textConverter, int index) {
throw new UnsupportedOperationException();
}
public void addTextConverter(ITextConverter textConverter) {
if (fTextConverters == null) {
fTextConverters= new ArrayList(1);
fTextConverters.add(textConverter);
} else if (!fTextConverters.contains(textConverter))
fTextConverters.add(textConverter);
}
public void removeTextConverter(ITextConverter textConverter) {
if (fTextConverters != null) {
fTextConverters.remove(textConverter);
if (fTextConverters.size() == 0)
fTextConverters= null;
}
}
/*
* @see TextViewer#customizeDocumentCommand(DocumentCommand)
*/
protected void customizeDocumentCommand(DocumentCommand command) {
super.customizeDocumentCommand(command);
if (!fIgnoreTextConverters && fTextConverters != null) {
for (Iterator e = fTextConverters.iterator(); e.hasNext();)
((ITextConverter) e.next()).customizeDocumentCommand(getDocument(), command);
}
fIgnoreTextConverters= false;
}
// http://dev.eclipse.org/bugs/show_bug.cgi?id=19270
public void updateIndentationPrefixes() {
SourceViewerConfiguration configuration= getSourceViewerConfiguration();
String[] types= configuration.getConfiguredContentTypes(this);
for (int i= 0; i < types.length; i++) {
String[] prefixes= configuration.getIndentPrefixes(this, types[i]);
if (prefixes != null && prefixes.length > 0)
setIndentPrefixes(prefixes, types[i]);
}
}
/*
* @see IWidgetTokenOwner#requestWidgetToken(IWidgetTokenKeeper)
*/
public boolean requestWidgetToken(IWidgetTokenKeeper requester) {
if (WorkbenchHelp.isContextHelpDisplayed())
return false;
return super.requestWidgetToken(requester);
}
/*
* @see org.eclipse.jface.text.source.ISourceViewer#configure(org.eclipse.jface.text.source.SourceViewerConfiguration)
*/
public void configure(SourceViewerConfiguration configuration) {
super.configure(configuration);
fCorrectionAssistant= new JavaCorrectionAssistant(CompilationUnitEditor.this);
fCorrectionAssistant.install(this);
prependAutoEditStrategy(new SmartBracesAutoEditStrategy(this), IDocument.DEFAULT_CONTENT_TYPE);
}
};
static class TabConverter implements ITextConverter {
private int fTabRatio;
private ILineTracker fLineTracker;
public TabConverter() {
}
public void setNumberOfSpacesPerTab(int ratio) {
fTabRatio= ratio;
}
public void setLineTracker(ILineTracker lineTracker) {
fLineTracker= lineTracker;
}
private int insertTabString(StringBuffer buffer, int offsetInLine) {
if (fTabRatio == 0)
return 0;
int remainder= offsetInLine % fTabRatio;
remainder= fTabRatio - remainder;
for (int i= 0; i < remainder; i++)
buffer.append(' ');
return remainder;
}
public void customizeDocumentCommand(IDocument document, DocumentCommand command) {
String text= command.text;
if (text == null)
return;
int index= text.indexOf('\t');
if (index > -1) {
StringBuffer buffer= new StringBuffer();
fLineTracker.set(command.text);
int lines= fLineTracker.getNumberOfLines();
try {
for (int i= 0; i < lines; i++) {
int offset= fLineTracker.getLineOffset(i);
int endOffset= offset + fLineTracker.getLineLength(i);
String line= text.substring(offset, endOffset);
int position= 0;
if (i == 0) {
IRegion firstLine= document.getLineInformationOfOffset(command.offset);
position= command.offset - firstLine.getOffset();
}
int length= line.length();
for (int j= 0; j < length; j++) {
char c= line.charAt(j);
if (c == '\t') {
position += insertTabString(buffer, position);
} else {
buffer.append(c);
++ position;
}
}
}
command.text= buffer.toString();
} catch (BadLocationException x) {
}
}
}
};
private static class ExitPolicy implements LinkedPositionUI.ExitPolicy {
final char fExitCharacter;
final Stack fStack;
final int fSize;
public ExitPolicy(char exitCharacter, Stack stack) {
fExitCharacter= exitCharacter;
fStack= stack;
fSize= fStack.size();
}
/*
* @see org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI.ExitPolicy#doExit(org.eclipse.jdt.internal.ui.text.link.LinkedPositionManager, org.eclipse.swt.events.VerifyEvent, int, int)
*/
public ExitFlags doExit(LinkedPositionManager manager, VerifyEvent event, int offset, int length) {
if (event.character == fExitCharacter) {
if (fSize == fStack.size()) {
if (manager.anyPositionIncludes(offset, length))
return new ExitFlags(LinkedPositionUI.COMMIT| LinkedPositionUI.UPDATE_CARET, false);
else
return new ExitFlags(LinkedPositionUI.COMMIT, true);
}
}
switch (event.character) {
case '\b': {
Position p= manager.getFirstPosition();
if (p.offset == offset && p.length == length)
return new ExitFlags(0, false);
else
return null;
}
case '\n':
case '\r':
return new ExitFlags(LinkedPositionUI.COMMIT, true);
default:
return null;
}
}
};
private static class BracketLevel {
int fOffset;
int fLength;
LinkedPositionManager fManager;
LinkedPositionUI fEditor;
};
private class BracketInserter implements VerifyKeyListener, LinkedPositionUI.ExitListener {
private boolean fCloseBrackets= true;
private boolean fCloseStrings= true;
private Stack fBracketLevelStack= new Stack();
public void setCloseBracketsEnabled(boolean enabled) {
fCloseBrackets= enabled;
}
public void setCloseStringsEnabled(boolean enabled) {
fCloseStrings= enabled;
}
private boolean hasIdentifierToTheRight(IDocument document, int offset) {
try {
int end= offset;
IRegion endLine= document.getLineInformationOfOffset(end);
int maxEnd= endLine.getOffset() + endLine.getLength();
while (end != maxEnd && Character.isWhitespace(document.getChar(end)))
++end;
return end != maxEnd && Character.isJavaIdentifierPart(document.getChar(end));
} catch (BadLocationException e) {
// be conservative
return true;
}
}
private boolean hasIdentifierToTheLeft(IDocument document, int offset) {
try {
int start= offset;
IRegion startLine= document.getLineInformationOfOffset(start);
int minStart= startLine.getOffset();
while (start != minStart && Character.isWhitespace(document.getChar(start - 1)))
--start;
return start != minStart && Character.isJavaIdentifierPart(document.getChar(start - 1));
} catch (BadLocationException e) {
return true;
}
}
private boolean hasCharacterToTheRight(IDocument document, int offset, char character) {
try {
int end= offset;
IRegion endLine= document.getLineInformationOfOffset(end);
int maxEnd= endLine.getOffset() + endLine.getLength();
while (end != maxEnd && Character.isWhitespace(document.getChar(end)))
++end;
return end != maxEnd && document.getChar(end) == character;
} catch (BadLocationException e) {
// be conservative
return true;
}
}
/*
* @see org.eclipse.swt.custom.VerifyKeyListener#verifyKey(org.eclipse.swt.events.VerifyEvent)
*/
public void verifyKey(VerifyEvent event) {
if (!event.doit)
return;
final ISourceViewer sourceViewer= getSourceViewer();
IDocument document= sourceViewer.getDocument();
final Point selection= sourceViewer.getSelectedRange();
final int offset= selection.x;
final int length= selection.y;
switch (event.character) {
case '(':
if (hasCharacterToTheRight(document, offset + length, '('))
return;
// fall through
case '[':
if (!fCloseBrackets)
return;
if (hasIdentifierToTheRight(document, offset + length))
return;
// fall through
case '"':
if (event.character == '"') {
if (!fCloseStrings)
return;
if (hasIdentifierToTheLeft(document, offset) || hasIdentifierToTheRight(document, offset + length))
return;
}
try {
ITypedRegion partition= document.getPartition(offset);
if (! IDocument.DEFAULT_CONTENT_TYPE.equals(partition.getType()) && partition.getOffset() != offset)
return;
if (!validateEditorInputState())
return;
final char character= event.character;
final char closingCharacter= getPeerCharacter(character);
final StringBuffer buffer= new StringBuffer();
buffer.append(character);
buffer.append(closingCharacter);
document.replace(offset, length, buffer.toString());
BracketLevel level= new BracketLevel();
fBracketLevelStack.push(level);
level.fManager= new LinkedPositionManager(document, fBracketLevelStack.size() > 1);
level.fManager.addPosition(offset + 1, 0);
level.fOffset= offset;
level.fLength= 2;
level.fEditor= new LinkedPositionUI(sourceViewer, level.fManager);
level.fEditor.setCancelListener(this);
level.fEditor.setExitPolicy(new ExitPolicy(closingCharacter, fBracketLevelStack));
level.fEditor.setFinalCaretOffset(offset + 2);
level.fEditor.enter();
IRegion newSelection= level.fEditor.getSelectedRegion();
sourceViewer.setSelectedRange(newSelection.getOffset(), newSelection.getLength());
event.doit= false;
} catch (BadLocationException e) {
}
break;
}
}
/*
* @see org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI.ExitListener#exit(boolean)
*/
public void exit(boolean accept) {
BracketLevel level= (BracketLevel) fBracketLevelStack.pop();
if (accept)
return;
// remove brackets
try {
final ISourceViewer sourceViewer= getSourceViewer();
IDocument document= sourceViewer.getDocument();
document.replace(level.fOffset, level.fLength, null);
} catch (BadLocationException e) {
}
}
};
/** Preference key for code formatter tab size */
private final static String CODE_FORMATTER_TAB_SIZE= JavaCore.FORMATTER_TAB_SIZE;
/** Preference key for inserting spaces rather than tabs */
private final static String SPACES_FOR_TABS= PreferenceConstants.EDITOR_SPACES_FOR_TABS;
/** Preference key for automatically closing strings */
private final static String CLOSE_STRINGS= PreferenceConstants.EDITOR_CLOSE_STRINGS;
/** Preference key for automatically closing brackets and parenthesis */
private final static String CLOSE_BRACKETS= PreferenceConstants.EDITOR_CLOSE_BRACKETS;
/** The editor's save policy */
protected ISavePolicy fSavePolicy;
/** Listener to annotation model changes that updates the error tick in the tab image */
private JavaEditorErrorTickUpdater fJavaEditorErrorTickUpdater;
/** The editor's tab converter */
private TabConverter fTabConverter;
/** The remembered java element */
private IJavaElement fRememberedElement;
/** The remembered selection */
private ITextSelection fRememberedSelection;
/** The remembered java element offset */
private int fRememberedElementOffset;
/** The bracket inserter. */
private BracketInserter fBracketInserter= new BracketInserter();
/** The standard action groups added to the menu */
private GenerateActionGroup fGenerateActionGroup;
private CompositeActionGroup fContextMenuGroup;
/**
* Creates a new compilation unit editor.
*/
public CompilationUnitEditor() {
super();
setDocumentProvider(JavaPlugin.getDefault().getCompilationUnitDocumentProvider());
setEditorContextMenuId("#CompilationUnitEditorContext"); //$NON-NLS-1$
setRulerContextMenuId("#CompilationUnitRulerContext"); //$NON-NLS-1$
setOutlinerContextMenuId("#CompilationUnitOutlinerContext"); //$NON-NLS-1$
// don't set help contextId, we install our own help context
fSavePolicy= null;
fJavaEditorErrorTickUpdater= new JavaEditorErrorTickUpdater(this);
}
/*
* @see AbstractTextEditor#createActions()
*/
protected void createActions() {
super.createActions();
Action action= new TextOperationAction(JavaEditorMessages.getResourceBundle(), "CorrectionAssistProposal.", this, CORRECTIONASSIST_PROPOSALS); //$NON-NLS-1$
action.setActionDefinitionId(IJavaEditorActionDefinitionIds.CORRECTION_ASSIST_PROPOSALS);
setAction("CorrectionAssistProposal", action); //$NON-NLS-1$
markAsStateDependentAction("CorrectionAssistProposal", true); //$NON-NLS-1$
action= new ContentAssistAction(JavaEditorMessages.getResourceBundle(), "ContentAssistProposal.", this); //$NON-NLS-1$
action.setActionDefinitionId(IJavaEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
setAction("ContentAssistProposal", action); //$NON-NLS-1$
markAsStateDependentAction("ContentAssistProposal", true); //$NON-NLS-1$
action= new TextOperationAction(JavaEditorMessages.getResourceBundle(), "ContentAssistContextInformation.", this, ISourceViewer.CONTENTASSIST_CONTEXT_INFORMATION); //$NON-NLS-1$
action.setActionDefinitionId(IJavaEditorActionDefinitionIds.CONTENT_ASSIST_CONTEXT_INFORMATION);
setAction("ContentAssistContextInformation", action); //$NON-NLS-1$
markAsStateDependentAction("ContentAssistContextInformation", true); //$NON-NLS-1$
action= new TextOperationAction(JavaEditorMessages.getResourceBundle(), "Comment.", this, ITextOperationTarget.PREFIX); //$NON-NLS-1$
action.setActionDefinitionId(IJavaEditorActionDefinitionIds.COMMENT);
setAction("Comment", action); //$NON-NLS-1$
markAsStateDependentAction("Comment", true); //$NON-NLS-1$
action= new TextOperationAction(JavaEditorMessages.getResourceBundle(), "Uncomment.", this, ITextOperationTarget.STRIP_PREFIX); //$NON-NLS-1$
action.setActionDefinitionId(IJavaEditorActionDefinitionIds.UNCOMMENT);
setAction("Uncomment", action); //$NON-NLS-1$
markAsStateDependentAction("Uncomment", true); //$NON-NLS-1$
action= new TextOperationAction(JavaEditorMessages.getResourceBundle(), "Format.", this, ISourceViewer.FORMAT); //$NON-NLS-1$
action.setActionDefinitionId(IJavaEditorActionDefinitionIds.FORMAT);
setAction("Format", action); //$NON-NLS-1$
markAsStateDependentAction("Format", true); //$NON-NLS-1$
markAsSelectionDependentAction("Format", true); //$NON-NLS-1$
fGenerateActionGroup= new GenerateActionGroup(this, ITextEditorActionConstants.GROUP_EDIT);
ActionGroup rg= new RefactorActionGroup(this, ITextEditorActionConstants.GROUP_EDIT);
fActionGroups.addGroup(rg);
fActionGroups.addGroup(fGenerateActionGroup);
// We have to keep the context menu group separate to have better control over positioning
fContextMenuGroup= new CompositeActionGroup(new ActionGroup[] {
fGenerateActionGroup,
rg,
new LocalHistoryActionGroup(this, ITextEditorActionConstants.GROUP_EDIT)});
}
/*
* @see JavaEditor#getElementAt(int)
*/
protected IJavaElement getElementAt(int offset) {
return getElementAt(offset, true);
}
/**
* Returns the most narrow element including the given offset. If <code>reconcile</code>
* is <code>true</code> the editor's input element is reconciled in advance. If it is
* <code>false</code> this method only returns a result if the editor's input element
* does not need to be reconciled.
*
* @param offset the offset included by the retrieved element
* @param reconcile <code>true</code> if working copy should be reconciled
*/
protected IJavaElement getElementAt(int offset, boolean reconcile) {
IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
ICompilationUnit unit= manager.getWorkingCopy(getEditorInput());
if (unit != null) {
try {
if (reconcile) {
synchronized (unit) {
unit.reconcile();
}
return unit.getElementAt(offset);
} else if (unit.isConsistent())
return unit.getElementAt(offset);
} catch (JavaModelException x) {
JavaPlugin.log(x.getStatus());
// nothing found, be tolerant and go on
}
}
return null;
}
/*
* @see JavaEditor#getCorrespondingElement(IJavaElement)
*/
protected IJavaElement getCorrespondingElement(IJavaElement element) {
try {
return EditorUtility.getWorkingCopy(element, true);
} catch (JavaModelException x) {
JavaPlugin.log(x.getStatus());
// nothing found, be tolerant and go on
}
return null;
}
/*
* @see AbstractTextEditor#editorContextMenuAboutToShow(IMenuManager)
*/
public void editorContextMenuAboutToShow(IMenuManager menu) {
super.editorContextMenuAboutToShow(menu);
ActionContext context= new ActionContext(getSelectionProvider().getSelection());
fContextMenuGroup.setContext(context);
fContextMenuGroup.fillContextMenu(menu);
fContextMenuGroup.setContext(null);
}
/*
* @see JavaEditor#setOutlinePageInput(JavaOutlinePage, IEditorInput)
*/
protected void setOutlinePageInput(JavaOutlinePage page, IEditorInput input) {
if (page != null) {
IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
page.setInput(manager.getWorkingCopy(input));
}
}
/*
* @see AbstractTextEditor#performSaveOperation(WorkspaceModifyOperation, IProgressMonitor)
*/
protected void performSaveOperation(WorkspaceModifyOperation operation, IProgressMonitor progressMonitor) {
IDocumentProvider p= getDocumentProvider();
if (p instanceof CompilationUnitDocumentProvider) {
CompilationUnitDocumentProvider cp= (CompilationUnitDocumentProvider) p;
cp.setSavePolicy(fSavePolicy);
}
try {
super.performSaveOperation(operation, progressMonitor);
} finally {
if (p instanceof CompilationUnitDocumentProvider) {
CompilationUnitDocumentProvider cp= (CompilationUnitDocumentProvider) p;
cp.setSavePolicy(null);
}
}
}
/*
* @see AbstractTextEditor#doSaveAs
*/
public void doSaveAs() {
if (askIfNonWorkbenchEncodingIsOk()) {
super.doSaveAs();
}
}
/*
* @see AbstractTextEditor#doSave(IProgressMonitor)
*/
public void doSave(IProgressMonitor progressMonitor) {
IDocumentProvider p= getDocumentProvider();
if (p == null) {
// editor has been closed
return;
}
if (!askIfNonWorkbenchEncodingIsOk()) {
progressMonitor.setCanceled(true);
return;
}
if (p.isDeleted(getEditorInput())) {
if (isSaveAsAllowed()) {
/*
* 1GEUSSR: ITPUI:ALL - User should never loose changes made in the editors.
* Changed Behavior to make sure that if called inside a regular save (because
* of deletion of input element) there is a way to report back to the caller.
*/
performSaveAs(progressMonitor);
} else {
/*
* 1GF5YOX: ITPJUI:ALL - Save of delete file claims it's still there
* Missing resources.
*/
Shell shell= getSite().getShell();
MessageDialog.openError(shell, JavaEditorMessages.getString("CompilationUnitEditor.error.saving.title1"), JavaEditorMessages.getString("CompilationUnitEditor.error.saving.message1")); //$NON-NLS-1$ //$NON-NLS-2$
}
} else {
setStatusLineErrorMessage(null);
IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
ICompilationUnit unit= manager.getWorkingCopy(getEditorInput());
if (unit != null) {
synchronized (unit) {
performSaveOperation(createSaveOperation(false), progressMonitor);
}
} else
performSaveOperation(createSaveOperation(false), progressMonitor);
}
}
/**
* Asks the user if it is ok to store in non-workbench encoding.
* @return <true> if the user wants to continue
*/
private boolean askIfNonWorkbenchEncodingIsOk() {
IDocumentProvider provider= getDocumentProvider();
if (provider instanceof IStorageDocumentProvider) {
IEditorInput input= getEditorInput();
IStorageDocumentProvider storageProvider= (IStorageDocumentProvider)provider;
String encoding= storageProvider.getEncoding(input);
String defaultEncoding= storageProvider.getDefaultEncoding();
if (encoding != null && !encoding.equals(defaultEncoding)) {
Shell shell= getSite().getShell();
String title= JavaEditorMessages.getString("CompilationUnitEditor.warning.save.nonWorkbenchEncoding.title"); //$NON-NLS-1$
String msg;
if (input != null)
msg= MessageFormat.format(JavaEditorMessages.getString("CompilationUnitEditor.warning.save.nonWorkbenchEncoding.message1"), new String[] {input.getName(), encoding});//$NON-NLS-1$
else
msg= MessageFormat.format(JavaEditorMessages.getString("CompilationUnitEditor.warning.save.nonWorkbenchEncoding.message2"), new String[] {encoding});//$NON-NLS-1$
return MessageDialog.openQuestion(shell, title, msg);
}
}
return true;
}
public boolean isSaveAsAllowed() {
return true;
}
/**
* The compilation unit editor implementation of this <code>AbstractTextEditor</code>
* method asks the user for the workspace path of a file resource and saves the document
* there. See http://dev.eclipse.org/bugs/show_bug.cgi?id=6295
*/
protected void performSaveAs(IProgressMonitor progressMonitor) {
Shell shell= getSite().getShell();
IEditorInput input = getEditorInput();
SaveAsDialog dialog= new SaveAsDialog(shell);
IFile original= (input instanceof IFileEditorInput) ? ((IFileEditorInput) input).getFile() : null;
if (original != null)
dialog.setOriginalFile(original);
dialog.create();
IDocumentProvider provider= getDocumentProvider();
if (provider == null) {
// editor has been programmatically closed while the dialog was open
return;
}
if (provider.isDeleted(input) && original != null) {
String message= JavaEditorMessages.getFormattedString("CompilationUnitEditor.warning.save.delete", new Object[] { original.getName() }); //$NON-NLS-1$
dialog.setErrorMessage(null);
dialog.setMessage(message, IMessageProvider.WARNING);
}
if (dialog.open() == Dialog.CANCEL) {
if (progressMonitor != null)
progressMonitor.setCanceled(true);
return;
}
IPath filePath= dialog.getResult();
if (filePath == null) {
if (progressMonitor != null)
progressMonitor.setCanceled(true);
return;
}
IWorkspace workspace= ResourcesPlugin.getWorkspace();
IFile file= workspace.getRoot().getFile(filePath);
final IEditorInput newInput= new FileEditorInput(file);
WorkspaceModifyOperation op= new WorkspaceModifyOperation() {
public void execute(final IProgressMonitor monitor) throws CoreException {
getDocumentProvider().saveDocument(monitor, newInput, getDocumentProvider().getDocument(getEditorInput()), true);
}
};
boolean success= false;
try {
provider.aboutToChange(newInput);
new ProgressMonitorDialog(shell).run(false, true, op);
success= true;
} catch (InterruptedException x) {
} catch (InvocationTargetException x) {
Throwable t= x.getTargetException();
if (t instanceof CoreException) {
CoreException cx= (CoreException) t;
ErrorDialog.openError(shell, JavaEditorMessages.getString("CompilationUnitEditor.error.saving.title2"), JavaEditorMessages.getString("CompilationUnitEditor.error.saving.message2"), cx.getStatus()); //$NON-NLS-1$ //$NON-NLS-2$
} else {
MessageDialog.openError(shell, JavaEditorMessages.getString("CompilationUnitEditor.error.saving.title3"), JavaEditorMessages.getString("CompilationUnitEditor.error.saving.message3") + t.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
}
} finally {
provider.changed(newInput);
if (success)
setInput(newInput);
}
if (progressMonitor != null)
progressMonitor.setCanceled(!success);
}
/*
* @see AbstractTextEditor#doSetInput(IEditorInput)
*/
protected void doSetInput(IEditorInput input) throws CoreException {
super.doSetInput(input);
configureTabConverter();
}
private void configureTabConverter() {
if (fTabConverter != null) {
IDocumentProvider provider= getDocumentProvider();
if (provider instanceof CompilationUnitDocumentProvider) {
CompilationUnitDocumentProvider cup= (CompilationUnitDocumentProvider) provider;
fTabConverter.setLineTracker(cup.createLineTracker(getEditorInput()));
}
}
}
private int getTabSize() {
Preferences preferences= JavaCore.getPlugin().getPluginPreferences();
return preferences.getInt(CODE_FORMATTER_TAB_SIZE);
}
private void startTabConversion() {
if (fTabConverter == null) {
fTabConverter= new TabConverter();
configureTabConverter();
fTabConverter.setNumberOfSpacesPerTab(getTabSize());
AdaptedSourceViewer asv= (AdaptedSourceViewer) getSourceViewer();
asv.addTextConverter(fTabConverter);
// http://dev.eclipse.org/bugs/show_bug.cgi?id=19270
asv.updateIndentationPrefixes();
}
}
private void stopTabConversion() {
if (fTabConverter != null) {
AdaptedSourceViewer asv= (AdaptedSourceViewer) getSourceViewer();
asv.removeTextConverter(fTabConverter);
// http://dev.eclipse.org/bugs/show_bug.cgi?id=19270
asv.updateIndentationPrefixes();
fTabConverter= null;
}
}
private boolean isTabConversionEnabled() {
IPreferenceStore store= getPreferenceStore();
return store.getBoolean(SPACES_FOR_TABS);
}
public void dispose() {
ISourceViewer sourceViewer= getSourceViewer();
if (sourceViewer instanceof ITextViewerExtension)
((ITextViewerExtension) sourceViewer).removeVerifyKeyListener(fBracketInserter);
if (fJavaEditorErrorTickUpdater != null) {
fJavaEditorErrorTickUpdater.dispose();
fJavaEditorErrorTickUpdater= null;
}
if (fActionGroups != null) {
fActionGroups.dispose();
fActionGroups= null;
}
super.dispose();
}
/*
* @see AbstractTextEditor#createPartControl(Composite)
*/
public void createPartControl(Composite parent) {
super.createPartControl(parent);
if (isTabConversionEnabled())
startTabConversion();
IPreferenceStore preferenceStore= getPreferenceStore();
boolean closeBrackets= preferenceStore.getBoolean(CLOSE_BRACKETS);
boolean closeStrings= preferenceStore.getBoolean(CLOSE_STRINGS);
fBracketInserter.setCloseBracketsEnabled(closeBrackets);
fBracketInserter.setCloseStringsEnabled(closeStrings);
ISourceViewer sourceViewer= getSourceViewer();
if (sourceViewer instanceof ITextViewerExtension)
((ITextViewerExtension) sourceViewer).prependVerifyKeyListener(fBracketInserter);
}
private static char getPeerCharacter(char character) {
switch (character) {
case '(':
return ')';
case ')':
return '(';
case '[':
return ']';
case ']':
return '[';
case '"':
return character;
default:
throw new IllegalArgumentException();
}
}
/*
* @see AbstractTextEditor#handlePreferenceStoreChanged(PropertyChangeEvent)
*/
protected void handlePreferenceStoreChanged(PropertyChangeEvent event) {
try {
AdaptedSourceViewer asv= (AdaptedSourceViewer) getSourceViewer();
if (asv != null) {
String p= event.getProperty();
if (CLOSE_BRACKETS.equals(p)) {
fBracketInserter.setCloseBracketsEnabled(getPreferenceStore().getBoolean(p));
return;
}
if (CLOSE_STRINGS.equals(p)) {
fBracketInserter.setCloseStringsEnabled(getPreferenceStore().getBoolean(p));
return;
}
if (SPACES_FOR_TABS.equals(p)) {
if (isTabConversionEnabled())
startTabConversion();
else
stopTabConversion();
return;
}
IContentAssistant c= asv.getContentAssistant();
if (c instanceof ContentAssistant)
ContentAssistPreference.changeConfiguration((ContentAssistant) c, getPreferenceStore(), event);
}
} finally {
super.handlePreferenceStoreChanged(event);
}
}
/*
* @see org.eclipse.jdt.internal.ui.javaeditor.JavaEditor#handlePreferencePropertyChanged(org.eclipse.core.runtime.Preferences.PropertyChangeEvent)
*/
protected void handlePreferencePropertyChanged(org.eclipse.core.runtime.Preferences.PropertyChangeEvent event) {
AdaptedSourceViewer asv= (AdaptedSourceViewer) getSourceViewer();
if (asv != null) {
String p= event.getProperty();
if (CODE_FORMATTER_TAB_SIZE.equals(p)) {
asv.updateIndentationPrefixes();
if (fTabConverter != null)
fTabConverter.setNumberOfSpacesPerTab(getTabSize());
}
}
super.handlePreferencePropertyChanged(event);
}
/*
* @see org.eclipse.jdt.internal.ui.javaeditor.JavaEditor#createJavaSourceViewer(org.eclipse.swt.widgets.Composite, org.eclipse.jface.text.source.IVerticalRuler, org.eclipse.jface.text.source.IOverviewRuler, boolean, int)
*/
protected ISourceViewer createJavaSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler, boolean isOverviewRulerVisible, int styles) {
return new AdaptedSourceViewer(parent, verticalRuler, overviewRuler, isOverviewRulerVisible, styles);
}
public void synchronizeOutlinePageSelection() {
if (isEditingScriptRunning())
return;
ISourceViewer sourceViewer= getSourceViewer();
if (sourceViewer == null || fOutlinePage == null)
return;
StyledText styledText= sourceViewer.getTextWidget();
if (styledText == null)
return;
int modelCaret= 0;
if (sourceViewer instanceof ITextViewerExtension3) {
ITextViewerExtension3 extension= (ITextViewerExtension3) sourceViewer;
modelCaret= extension.widgetOffset2ModelOffset(styledText.getCaretOffset());
} else {
int offset= sourceViewer.getVisibleRegion().getOffset();
modelCaret= offset + styledText.getCaretOffset();
}
IJavaElement element= getElementAt(modelCaret, false);
ISourceReference reference= getSourceReference(element, modelCaret);
if (reference != null) {
fOutlinePage.removeSelectionChangedListener(fSelectionChangedListener);
fOutlinePage.select(reference);
fOutlinePage.addSelectionChangedListener(fSelectionChangedListener);
}
}
private ISourceReference getSourceReference(IJavaElement element, int offset) {
if ( !(element instanceof ISourceReference))
return null;
if (element.getElementType() == IJavaElement.IMPORT_DECLARATION) {
IImportDeclaration declaration= (IImportDeclaration) element;
IImportContainer container= (IImportContainer) declaration.getParent();
ISourceRange srcRange= null;
try {
srcRange= container.getSourceRange();
} catch (JavaModelException e) {
}
if (srcRange != null && srcRange.getOffset() == offset)
return container;
}
return (ISourceReference) element;
}
/*
* @see IReconcilingParticipant#reconciled()
*/
public void reconciled() {
if (synchronizeOutlineOnCursorMove()) {
Shell shell= getSite().getShell();
if (shell != null && !shell.isDisposed()) {
shell.getDisplay().asyncExec(new Runnable() {
public void run() {
synchronizeOutlinePageSelection();
}
});
}
}
}
private boolean synchronizeOutlineOnCursorMove() {
return PreferenceConstants.getPreferenceStore().getBoolean(PreferenceConstants.EDITOR_SYNC_OUTLINE_ON_CURSOR_MOVE);
}
protected void updateStateDependentActions() {
super.updateStateDependentActions();
fGenerateActionGroup.editorStateChanged();
}
/**
* Returns the updated java element for the old java element.
*/
private IJavaElement findElement(IJavaElement element) {
if (element == null)
return null;
IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
ICompilationUnit unit= manager.getWorkingCopy(getEditorInput());
if (unit != null) {
try {
synchronized (unit) {
unit.reconcile();
}
IJavaElement[] findings= unit.findElements(element);
if (findings != null && findings.length > 0)
return findings[0];
} catch (JavaModelException x) {
JavaPlugin.log(x.getStatus());
// nothing found, be tolerant and go on
}
}
return null;
}
/**
* Returns the offset of the given Java element.
*/
private int getOffset(IJavaElement element) {
if (element instanceof ISourceReference) {
ISourceReference sr= (ISourceReference) element;
try {
ISourceRange srcRange= sr.getSourceRange();
if (srcRange != null)
return srcRange.getOffset();
} catch (JavaModelException e) {
}
}
return -1;
}
/*
* @see AbstractTextEditor#rememberSelection()
*/
protected void rememberSelection() {
ISelectionProvider sp= getSelectionProvider();
fRememberedSelection= (sp == null ? null : (ITextSelection) sp.getSelection());
if (fRememberedSelection != null) {
fRememberedElement= getElementAt(fRememberedSelection.getOffset(), true);
fRememberedElementOffset= getOffset(fRememberedElement);
}
}
/*
* @see AbstractTextEditor#restoreSelection()
*/
protected void restoreSelection() {
try {
if (getSourceViewer() == null || fRememberedSelection == null)
return;
IJavaElement newElement= findElement(fRememberedElement);
int newOffset= getOffset(newElement);
int delta= (newOffset > -1 && fRememberedElementOffset > -1) ? newOffset - fRememberedElementOffset : 0;
if (isValidSelection(delta + fRememberedSelection.getOffset(), fRememberedSelection.getLength()))
selectAndReveal(delta + fRememberedSelection.getOffset(), fRememberedSelection.getLength());
} finally {
fRememberedSelection= null;
fRememberedElement= null;
fRememberedElementOffset= -1;
}
}
private boolean isValidSelection(int offset, int length) {
IDocumentProvider provider= getDocumentProvider();
if (provider != null) {
IDocument document= provider.getDocument(getEditorInput());
if (document != null) {
int end= offset + length;
int documentLength= document.getLength();
return 0 <= offset && offset <= documentLength && 0 <= end && end <= documentLength;
}
}
return false;
}
/*
* @see AbstractTextEditor#canHandleMove(IEditorInput, IEditorInput)
*/
protected boolean canHandleMove(IEditorInput originalElement, IEditorInput movedElement) {
String oldExtension= ""; //$NON-NLS-1$
if (originalElement instanceof IFileEditorInput) {
IFile file= ((IFileEditorInput) originalElement).getFile();
if (file != null) {
String ext= file.getFileExtension();
if (ext != null)
oldExtension= ext;
}
}
String newExtension= ""; //$NON-NLS-1$
if (movedElement instanceof IFileEditorInput) {
IFile file= ((IFileEditorInput) movedElement).getFile();
if (file != null)
newExtension= file.getFileExtension();
}
return oldExtension.equals(newExtension);
}
}
|
33,755 |
Bug 33755 add to build path/remove from build path actions enabled on empty workspace
|
20030228 they should be disabled because they make no sense there
|
resolved fixed
|
33c4120
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T17:31:38Z | 2003-03-04T15:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateActionGroup.java
|
/*******************************************************************************
* Copyright (c) 2002 International Business Machines Corp. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v0.5
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v05.html
*
* Contributors:
* IBM Corporation - initial API and implementation
******************************************************************************/
package org.eclipse.jdt.ui.actions;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.util.Assert;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchSite;
import org.eclipse.ui.actions.ActionGroup;
import org.eclipse.ui.actions.AddBookmarkAction;
import org.eclipse.ui.part.Page;
import org.eclipse.ui.texteditor.ConvertLineDelimitersAction;
import org.eclipse.ui.texteditor.IUpdate;
import org.eclipse.jdt.internal.ui.actions.ActionMessages;
import org.eclipse.jdt.internal.ui.actions.AddTaskAction;
import org.eclipse.jdt.internal.ui.javaeditor.AddImportOnSelectionAction;
import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor;
import org.eclipse.jdt.ui.IContextMenuConstants;
/**
* Action group that adds the source and generate actions to a part's context
* menu and installs handlers for the corresponding global menu actions.
*
* <p>
* This class may be instantiated; it is not intended to be subclassed.
* </p>
*
* @since 2.0
*/
public class GenerateActionGroup extends ActionGroup {
private CompilationUnitEditor fEditor;
private IWorkbenchSite fSite;
private String fGroupName= IContextMenuConstants.GROUP_SOURCE;
private List fRegisteredSelectionListeners;
private AddImportOnSelectionAction fAddImport;
private OverrideMethodsAction fOverrideMethods;
private AddGetterSetterAction fAddGetterSetter;
private AddDelegateMethodsAction fAddDelegateMethods;
private AddUnimplementedConstructorsAction fAddUnimplementedConstructors;
private AddJavaDocStubAction fAddJavaDocStub;
private AddBookmarkAction fAddBookmark;
private AddTaskAction fAddTaskAction;
private ExternalizeStringsAction fExternalizeStrings;
private FindStringsToExternalizeAction fFindStringsToExternalize;
private SurroundWithTryCatchAction fSurroundWithTryCatch;
private AddToClasspathAction fAddToClasspathAction;
private RemoveFromClasspathAction fRemoveFromClasspathAction;
private OrganizeImportsAction fOrganizeImports;
private SortMembersAction fSortMembers;
private ConvertLineDelimitersAction fConvertToWindows;
private ConvertLineDelimitersAction fConvertToUNIX;
private ConvertLineDelimitersAction fConvertToMac;
/**
* Note: This constructor is for internal use only. Clients should not call this constructor.
*/
public GenerateActionGroup(CompilationUnitEditor editor, String groupName) {
fSite= editor.getSite();
fEditor= editor;
fGroupName= groupName;
ISelectionProvider provider= fSite.getSelectionProvider();
ISelection selection= provider.getSelection();
fAddImport= new AddImportOnSelectionAction(editor);
fAddImport.setActionDefinitionId(IJavaEditorActionDefinitionIds.ADD_IMPORT);
fAddImport.update();
editor.setAction("AddImport", fAddImport); //$NON-NLS-1$
fOrganizeImports= new OrganizeImportsAction(editor);
fOrganizeImports.setActionDefinitionId(IJavaEditorActionDefinitionIds.ORGANIZE_IMPORTS);
editor.setAction("OrganizeImports", fOrganizeImports); //$NON-NLS-1$
fSortMembers= new SortMembersAction(editor);
fSortMembers.setActionDefinitionId(IJavaEditorActionDefinitionIds.SORT_MEMBERS);
editor.setAction("SortMembers", fSortMembers); //$NON-NLS-1$
fOverrideMethods= new OverrideMethodsAction(editor);
fOverrideMethods.setActionDefinitionId(IJavaEditorActionDefinitionIds.OVERRIDE_METHODS);
editor.setAction("OverrideMethods", fOverrideMethods); //$NON-NLS-1$
fAddGetterSetter= new AddGetterSetterAction(editor);
fAddGetterSetter.setActionDefinitionId(IJavaEditorActionDefinitionIds.CREATE_GETTER_SETTER);
editor.setAction("AddGetterSetter", fAddGetterSetter); //$NON-NLS-1$
fAddDelegateMethods= new AddDelegateMethodsAction(editor);
fAddDelegateMethods.setActionDefinitionId(IJavaEditorActionDefinitionIds.CREATE_DELEGATE_METHODS);
editor.setAction("AddDelegateMethods", fAddDelegateMethods); //$NON-NLS-1$
fAddUnimplementedConstructors= new AddUnimplementedConstructorsAction(editor);
fAddUnimplementedConstructors.setActionDefinitionId(IJavaEditorActionDefinitionIds.ADD_UNIMPLEMENTED_CONTRUCTORS);
editor.setAction("AddUnimplementedConstructors", fAddUnimplementedConstructors); //$NON-NLS-1$
fAddJavaDocStub= new AddJavaDocStubAction(editor);
fAddJavaDocStub.setActionDefinitionId(IJavaEditorActionDefinitionIds.ADD_JAVADOC_COMMENT);
editor.setAction("AddJavadocComment", fAddJavaDocStub); //$NON-NLS-1$
fSurroundWithTryCatch= new SurroundWithTryCatchAction(editor);
fSurroundWithTryCatch.setActionDefinitionId(IJavaEditorActionDefinitionIds.SURROUND_WITH_TRY_CATCH);
fSurroundWithTryCatch.update(selection);
provider.addSelectionChangedListener(fSurroundWithTryCatch);
editor.setAction("SurroundWithTryCatch", fSurroundWithTryCatch); //$NON-NLS-1$
fExternalizeStrings= new ExternalizeStringsAction(editor);
fExternalizeStrings.setActionDefinitionId(IJavaEditorActionDefinitionIds.EXTERNALIZE_STRINGS);
editor.setAction("ExternalizeStrings", fExternalizeStrings); //$NON-NLS-1$
fConvertToWindows= new ConvertLineDelimitersAction(editor, "\r\n"); //$NON-NLS-1$
fConvertToWindows.setActionDefinitionId(IJavaEditorActionDefinitionIds.CONVERT_LINE_DELIMITERS_TO_WINDOWS);
editor.setAction("ConvertLineDelimitersToWindows", fConvertToWindows); //$NON-NLS-1$
fConvertToUNIX= new ConvertLineDelimitersAction(editor, "\n"); //$NON-NLS-1$
fConvertToUNIX.setActionDefinitionId(IJavaEditorActionDefinitionIds.CONVERT_LINE_DELIMITERS_TO_UNIX);
editor.setAction("ConvertLineDelimitersToUNIX", fConvertToUNIX); //$NON-NLS-1$
fConvertToMac= new ConvertLineDelimitersAction(editor, "\r"); //$NON-NLS-1$
fConvertToMac.setActionDefinitionId(IJavaEditorActionDefinitionIds.CONVERT_LINE_DELIMITERS_TO_MAC);
editor.setAction("ConvertLineDelimitersToMac", fConvertToMac); //$NON-NLS-1$
}
/**
* Creates a new <code>GenerateActionGroup</code>. The group
* requires that the selection provided by the page's selection provider
* is of type <code>org.eclipse.jface.viewers.IStructuredSelection</code>.
*
* @param page the page that owns this action group
*/
public GenerateActionGroup(Page page) {
this(page.getSite());
}
/**
* Creates a new <code>GenerateActionGroup</code>. The group
* requires that the selection provided by the part's selection provider
* is of type <code>org.eclipse.jface.viewers.IStructuredSelection</code>.
*
* @param part the view part that owns this action group
*/
public GenerateActionGroup(IViewPart part) {
this(part.getSite());
}
private GenerateActionGroup(IWorkbenchSite site) {
fSite= site;
ISelectionProvider provider= fSite.getSelectionProvider();
ISelection selection= provider.getSelection();
fOverrideMethods= new OverrideMethodsAction(site);
fAddGetterSetter= new AddGetterSetterAction(site);
fAddDelegateMethods= new AddDelegateMethodsAction(site);
fAddUnimplementedConstructors= new AddUnimplementedConstructorsAction(site);
fAddJavaDocStub= new AddJavaDocStubAction(site);
fAddBookmark= new AddBookmarkAction(site.getShell());
fAddToClasspathAction= new AddToClasspathAction(site);
fRemoveFromClasspathAction= new RemoveFromClasspathAction(site);
fAddTaskAction= new AddTaskAction(site);
fExternalizeStrings= new ExternalizeStringsAction(site);
fFindStringsToExternalize= new FindStringsToExternalizeAction(site);
fOrganizeImports= new OrganizeImportsAction(site);
fSortMembers= new SortMembersAction(site);
fOverrideMethods.update(selection);
fAddGetterSetter.update(selection);
fAddDelegateMethods.update(selection);
fAddUnimplementedConstructors.update(selection);
fAddJavaDocStub.update(selection);
fExternalizeStrings.update(selection);
fFindStringsToExternalize.update(selection);
fAddTaskAction.update(selection);
fOrganizeImports.update(selection);
fSortMembers.update(selection);
if (selection instanceof IStructuredSelection) {
IStructuredSelection ss= (IStructuredSelection)selection;
fAddBookmark.selectionChanged(ss);
} else {
fAddBookmark.setEnabled(false);
}
registerSelectionListener(provider, fOverrideMethods);
registerSelectionListener(provider, fAddGetterSetter);
registerSelectionListener(provider, fAddDelegateMethods);
registerSelectionListener(provider, fAddUnimplementedConstructors);
registerSelectionListener(provider, fAddJavaDocStub);
registerSelectionListener(provider, fAddBookmark);
registerSelectionListener(provider, fAddToClasspathAction);
registerSelectionListener(provider, fRemoveFromClasspathAction);
registerSelectionListener(provider, fExternalizeStrings);
registerSelectionListener(provider, fFindStringsToExternalize);
registerSelectionListener(provider, fOrganizeImports);
registerSelectionListener(provider, fSortMembers);
registerSelectionListener(provider, fAddTaskAction);
}
private void registerSelectionListener(ISelectionProvider provider, ISelectionChangedListener listener) {
if (fRegisteredSelectionListeners == null)
fRegisteredSelectionListeners= new ArrayList(20);
provider.addSelectionChangedListener(listener);
fRegisteredSelectionListeners.add(listener);
}
/*
* The state of the editor owning this action group has changed.
* This method does nothing if the group's owner isn't an
* editor.
*/
/**
* Note: This method is for internal use only. Clients should not call this method.
*/
public void editorStateChanged() {
Assert.isTrue(isEditorOwner());
// http://dev.eclipse.org/bugs/show_bug.cgi?id=17709
fConvertToMac.update();
fConvertToUNIX.update();
fConvertToWindows.update();
}
/* (non-Javadoc)
* Method declared in ActionGroup
*/
public void fillActionBars(IActionBars actionBar) {
super.fillActionBars(actionBar);
setGlobalActionHandlers(actionBar);
}
/* (non-Javadoc)
* Method declared in ActionGroup
*/
public void fillContextMenu(IMenuManager menu) {
super.fillContextMenu(menu);
if (isEditorOwner()) {
IMenuManager subMenu= createEditorSubMenu(menu);
if (subMenu != null)
menu.appendToGroup(fGroupName, subMenu);
} else {
appendToGroup(menu, fOrganizeImports);
appendToGroup(menu, fOverrideMethods);
appendToGroup(menu, fAddGetterSetter);
appendToGroup(menu, fAddDelegateMethods);
appendToGroup(menu, fAddUnimplementedConstructors);
appendToGroup(menu, fAddJavaDocStub);
appendToGroup(menu, fAddToClasspathAction);
appendToGroup(menu, fRemoveFromClasspathAction);
}
}
private IMenuManager createEditorSubMenu(IMenuManager mainMenu) {
IMenuManager result= new MenuManager(ActionMessages.getString("SourceMenu.label")); //$NON-NLS-1$
int added= 0;
added+= addEditorAction(result, "Comment"); //$NON-NLS-1$
added+= addEditorAction(result, "Uncomment"); //$NON-NLS-1$
result.add(new Separator());
added+= addAction(result, fOrganizeImports);
added+= addAction(result, fAddImport);
result.add(new Separator());
added+= addAction(result, fOverrideMethods);
added+= addAction(result, fAddGetterSetter);
added+= addAction(result, fAddDelegateMethods);
added+= addAction(result, fAddUnimplementedConstructors);
added+= addAction(result, fAddJavaDocStub);
added+= addEditorAction(result, "Format"); //$NON-NLS-1$
added+= addAction(result, fSortMembers);
added+= addAction(result, fAddBookmark);
result.add(new Separator());
added+= addAction(result, fSurroundWithTryCatch);
added+= addAction(result, fExternalizeStrings);
if (added == 0)
result= null;
return result;
}
/* (non-Javadoc)
* Method declared in ActionGroup
*/
public void dispose() {
if (fRegisteredSelectionListeners != null) {
ISelectionProvider provider= fSite.getSelectionProvider();
for (Iterator iter= fRegisteredSelectionListeners.iterator(); iter.hasNext();) {
ISelectionChangedListener listener= (ISelectionChangedListener) iter.next();
provider.removeSelectionChangedListener(listener);
}
}
fEditor= null;
super.dispose();
}
private void setGlobalActionHandlers(IActionBars actionBar) {
actionBar.setGlobalActionHandler(JdtActionConstants.ADD_IMPORT, fAddImport);
actionBar.setGlobalActionHandler(JdtActionConstants.SURROUND_WITH_TRY_CATCH, fSurroundWithTryCatch);
actionBar.setGlobalActionHandler(JdtActionConstants.OVERRIDE_METHODS, fOverrideMethods);
actionBar.setGlobalActionHandler(JdtActionConstants.GENERATE_GETTER_SETTER, fAddGetterSetter);
actionBar.setGlobalActionHandler(JdtActionConstants.GENERATE_DELEGATE_METHODS, fAddDelegateMethods);
actionBar.setGlobalActionHandler(JdtActionConstants.ADD_CONSTRUCTOR_FROM_SUPERCLASS, fAddUnimplementedConstructors);
actionBar.setGlobalActionHandler(JdtActionConstants.ADD_JAVA_DOC_COMMENT, fAddJavaDocStub);
actionBar.setGlobalActionHandler(JdtActionConstants.EXTERNALIZE_STRINGS, fExternalizeStrings);
actionBar.setGlobalActionHandler(JdtActionConstants.FIND_STRINGS_TO_EXTERNALIZE, fFindStringsToExternalize);
actionBar.setGlobalActionHandler(JdtActionConstants.ORGANIZE_IMPORTS, fOrganizeImports);
actionBar.setGlobalActionHandler(JdtActionConstants.SORT_MEMBERS, fSortMembers);
actionBar.setGlobalActionHandler(JdtActionConstants.CONVERT_LINE_DELIMITERS_TO_WINDOWS, fConvertToWindows);
actionBar.setGlobalActionHandler(JdtActionConstants.CONVERT_LINE_DELIMITERS_TO_UNIX, fConvertToUNIX);
actionBar.setGlobalActionHandler(JdtActionConstants.CONVERT_LINE_DELIMITERS_TO_MAC, fConvertToMac);
if (!isEditorOwner()) {
// editor provides its own implementation of these actions.
actionBar.setGlobalActionHandler(IWorkbenchActionConstants.BOOKMARK, fAddBookmark);
actionBar.setGlobalActionHandler(IWorkbenchActionConstants.ADD_TASK, fAddTaskAction);
}
}
private int appendToGroup(IMenuManager menu, IAction action) {
if (action != null && action.isEnabled()) {
menu.appendToGroup(fGroupName, action);
return 1;
}
return 0;
}
private int addAction(IMenuManager menu, IAction action) {
if (action != null && action.isEnabled()) {
menu.add(action);
return 1;
}
return 0;
}
private int addEditorAction(IMenuManager menu, String actionID) {
if (fEditor == null)
return 0;
IAction action= fEditor.getAction(actionID);
if (action == null)
return 0;
if (action instanceof IUpdate)
((IUpdate)action).update();
if (action.isEnabled()) {
menu.add(action);
return 1;
}
return 0;
}
private boolean isEditorOwner() {
return fEditor != null;
}
}
|
33,042 |
Bug 33042 Convert local var to field does not use names from code generation preferences
|
Build 2.1 RC1 1. Select a local variable 2. Refactor -> Convert Local Variable to Field ==> the suggested field is the same as the local variable. It should use the name prefix and name suffix from the Code Generation preference page.
|
resolved fixed
|
990a229
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T18:12:17Z | 2003-02-25T16:20:00Z |
org.eclipse.jdt.ui/core
| |
33,042 |
Bug 33042 Convert local var to field does not use names from code generation preferences
|
Build 2.1 RC1 1. Select a local variable 2. Refactor -> Convert Local Variable to Field ==> the suggested field is the same as the local variable. It should use the name prefix and name suffix from the Code Generation preference page.
|
resolved fixed
|
990a229
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T18:12:17Z | 2003-02-25T16:20:00Z |
refactoring/org/eclipse/jdt/internal/corext/refactoring/code/PromoteTempToFieldRefactoring.java
| |
33,473 |
Bug 33473 [Refactoring] "Change method signature" changes more than one method
|
Eclipse 2.1 RC1, win2k Test case: New java project, create interface I such that: interface I { void method(Integer i, Object o); } then create class C such that: class C implements I { public void method(Integer i, Object o) { } public void method(Double d, Object o) { } } Now, select the second method of class C, choose "Change Method Signature" from refactoring menu, Eclipse gives a warning that this method is required to implement ineterface I (it's got the wrong method). Go ahead with the refactoring, remove the second parameter, and Eclipse removed the second parameter from both methods in class C AND from the method declaration in interface I. Oddly enough, if you now re-select any of the methods in class C, that particular refactoring option has vanished from the menu. Not sure if that's a related problem or not.
|
resolved fixed
|
ccfb24b
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T19:30:30Z | 2003-02-27T18:20:00Z |
org.eclipse.jdt.ui/core
| |
33,473 |
Bug 33473 [Refactoring] "Change method signature" changes more than one method
|
Eclipse 2.1 RC1, win2k Test case: New java project, create interface I such that: interface I { void method(Integer i, Object o); } then create class C such that: class C implements I { public void method(Integer i, Object o) { } public void method(Double d, Object o) { } } Now, select the second method of class C, choose "Change Method Signature" from refactoring menu, Eclipse gives a warning that this method is required to implement ineterface I (it's got the wrong method). Go ahead with the refactoring, remove the second parameter, and Eclipse removed the second parameter from both methods in class C AND from the method declaration in interface I. Oddly enough, if you now re-select any of the methods in class C, that particular refactoring option has vanished from the menu. Not sure if that's a related problem or not.
|
resolved fixed
|
ccfb24b
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-04T19:30:30Z | 2003-02-27T18:20:00Z |
refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ChangeSignatureRefactoring.java
| |
32,958 |
Bug 32958 Improve review of refactorings which can't be performed
|
Build 2.1 RC1 I tried to rename a CU which was out of synch. The preview dialog correctly said: "Cannot proceed due to the following problems:" The problem is that the dialog also shows the warnings (which don't prevent me from continuing) and that the actual error was at the bottom of the list i.e. I first had to scroll down all the warnings to see what was preventing me from doing the refactoring. I would suggest to use the severity as first sort property.
|
resolved fixed
|
25518bb
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T09:54:00Z | 2003-02-25T13:33:20Z |
org.eclipse.jdt.ui/ui
| |
32,958 |
Bug 32958 Improve review of refactorings which can't be performed
|
Build 2.1 RC1 I tried to rename a CU which was out of synch. The preview dialog correctly said: "Cannot proceed due to the following problems:" The problem is that the dialog also shows the warnings (which don't prevent me from continuing) and that the actual error was at the bottom of the list i.e. I first had to scroll down all the warnings to see what was preventing me from doing the refactoring. I would suggest to use the severity as first sort property.
|
resolved fixed
|
25518bb
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T09:54:00Z | 2003-02-25T13:33:20Z |
refactoring/org/eclipse/jdt/internal/ui/refactoring/RefactoringStatusViewer.java
| |
33,648 |
Bug 33648 NPE in search occurrs in file
|
20030227 create a new workspace select 'find occurrences in file' from the context menu in package explorer (there's no projects so this actions should be disabled, maybe) !SESSION Mar 03, 2003 11:22:57.967 --------------------------------------------- java.version=1.4.1_01 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Command-line arguments: -dev bin -feature org.eclipse.platform -data c:\temp\workspace\runtime-workspace -os win32 -ws win32 -arch x86 -nl en_US - configuration file:c:/temp/workspace/plugins/.metadata/.plugins/org.eclipse.pde.core/c__temp_w orkspace_runtime-workspace/platform.cfg -install file:C:/temp/eclipse20030227/eclipse/ !ENTRY org.eclipse.ui 4 4 Mar 03, 2003 11:22:57.977 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Mar 03, 2003 11:22:57.977 !MESSAGE java.lang.NullPointerException !STACK 0 java.lang.NullPointerException at org.eclipse.jdt.internal.ui.search.FindOccurrencesEngine.create (FindOccurrencesEngine.java:146) at org.eclipse.jdt.ui.actions.FindOccurrencesInFileAction.run (FindOccurrencesInFileAction.java:139) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:191) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:842) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539)
|
resolved fixed
|
dc21358
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T10:02:46Z | 2003-03-03T11:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindOccurrencesInFileAction.java
|
/*******************************************************************************
* Copyright (c) 2003 International Business Machines Corp. and others. All
* rights reserved. This program and the accompanying materials are made
* available under the terms of the Common Public License v0.5 which accompanies
* this distribution, and is available at http://www.eclipse.org/legal/cpl-v05.
* html
*
* Contributors:
* IBM Corporation - initial API and implementation
******************************************************************************/
package org.eclipse.jdt.ui.actions;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchSite;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.ui.part.Page;
import org.eclipse.ui.texteditor.IEditorStatusLine;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.ISourceRange;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.actions.ActionUtil;
import org.eclipse.jdt.internal.ui.javaeditor.IClassFileEditorInput;
import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
import org.eclipse.jdt.internal.ui.search.FindOccurrencesEngine;
import org.eclipse.jdt.internal.ui.search.SearchMessages;
/**
* Action to find all occurrences of a compilation unit member (e.g.
* fields, methods, types, and local variables) in a file.
* <p>
* Action is applicable to selections containing elements of type
* <tt>IMember</tt>.
*
* <p>
* This class may be instantiated; it is not intended to be subclassed.
* </p>
*
* @since 2.1
*/
public class FindOccurrencesInFileAction extends SelectionDispatchAction {
private JavaEditor fEditor;
private IActionBars fActionBars;
/**
* Creates a new <code>FindOccurrencesInFileAction</code>. The action requires
* that the selection provided by the view part's selection provider is of type <code>
* org.eclipse.jface.viewers.IStructuredSelection</code>.
*
* @param part the part providing context information for this action
*/
public FindOccurrencesInFileAction(IViewPart part) {
this(part.getSite());
fActionBars= part.getViewSite().getActionBars();
}
/**
* Creates a new <code>FindOccurrencesInFileAction</code>. The action requires
* that the selection provided by the page's selection provider is of type <code>
* org.eclipse.jface.viewers.IStructuredSelection</code>.
*
* @param page the page providing context information for this action
*/
public FindOccurrencesInFileAction(Page page) {
this(page.getSite());
fActionBars= page.getSite().getActionBars();
}
/**
* Note: This constructor is for internal use only. Clients should not call this constructor.
*/
public FindOccurrencesInFileAction(JavaEditor editor) {
this(editor.getEditorSite());
fEditor= editor;
setEnabled(getEditorInput(editor) != null);
}
private FindOccurrencesInFileAction(IWorkbenchSite site) {
super(site);
setText(SearchMessages.getString("Search.FindOccurrencesInFile.label")); //$NON-NLS-1$
setToolTipText(SearchMessages.getString("Search.FindOccurrencesInFile.tooltip")); //$NON-NLS-1$
WorkbenchHelp.setHelp(this, IJavaHelpContextIds.FIND_OCCURRENCES_IN_FILE_ACTION);
}
//---- Structured Selection -------------------------------------------------------------
/* (non-JavaDoc)
* Method declared in SelectionDispatchAction.
*/
protected void selectionChanged(IStructuredSelection selection) {
setEnabled(getMember(selection) != null);
}
/* (non-JavaDoc)
* Method declared in SelectionDispatchAction.
*/
private IMember getMember(IStructuredSelection selection) {
if (selection.size() != 1)
return null;
Object o= selection.getFirstElement();
if (o instanceof IMember) {
IMember member= (IMember)o;
IClassFile file= member.getClassFile();
if (file != null) {
try {
if (file.getSourceRange() != null)
return member;
} catch (JavaModelException e) {
return null;
}
}
return member;
}
return null;
}
/* (non-JavaDoc)
* Method declared in SelectionDispatchAction.
*/
protected void run(IStructuredSelection selection) {
IMember member= getMember(selection);
if (!ActionUtil.isProcessable(getShell(), member))
return;
FindOccurrencesEngine engine= FindOccurrencesEngine.create(member);
try {
ISourceRange range= member.getNameRange();
String result= engine.run(range.getOffset(), range.getLength());
if (result != null)
showMessage(getShell(), fActionBars, result);
} catch (JavaModelException e) {
JavaPlugin.log(e);
}
}
private static void showMessage(Shell shell, IActionBars actionBars, String msg) {
IStatusLineManager statusLine= actionBars.getStatusLineManager();
if (statusLine != null)
statusLine.setMessage(msg);
shell.getDisplay().beep();
}
//---- Text Selection ----------------------------------------------------------------------
/* (non-JavaDoc)
* Method declared in SelectionDispatchAction.
*/
protected void selectionChanged(ITextSelection selection) {
}
/* (non-JavaDoc)
* Method declared in SelectionDispatchAction.
*/
protected final void run(ITextSelection ts) {
IJavaElement input= getEditorInput(fEditor);
if (!ActionUtil.isProcessable(getShell(), input))
return;
FindOccurrencesEngine engine= FindOccurrencesEngine.create(input);
try {
String result= engine.run(ts.getOffset(), ts.getLength());
if (result != null)
showMessage(getShell(), fEditor, result);
} catch (JavaModelException e) {
JavaPlugin.log(e);
}
}
private static IJavaElement getEditorInput(JavaEditor editor) {
IEditorInput input= editor.getEditorInput();
if (input instanceof IClassFileEditorInput)
return ((IClassFileEditorInput)input).getClassFile();
return JavaPlugin.getDefault().getWorkingCopyManager().getWorkingCopy(editor.getEditorInput());
}
private static void showMessage(Shell shell, JavaEditor editor, String msg) {
IEditorStatusLine statusLine= (IEditorStatusLine) editor.getAdapter(IEditorStatusLine.class);
if (statusLine != null)
statusLine.setMessage(true, msg, null);
shell.getDisplay().beep();
}
}
|
29,529 |
Bug 29529 Moving java files between package fragments introduces unnecessary import statements
|
Same project, different source folders, same package names: - org.eclipse.pde.core (package) \- src | \- org.eclipse.pde.internal.core.plugin | \- PluginXMLDocumentModelFactory.java (the file to move) \- srcnew \- org.eclipse.pde.internal.core.plugin (the destination package) Moving the file with 'update references' adds: import org.eclipse.pde.internal.core.plugin.PluginXMLDocumentNode; to the file (it uses PluginXMLDocumentNode).
|
resolved fixed
|
14df5c7
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T10:14:02Z | 2003-01-15T14:13:20Z |
org.eclipse.jdt.ui/core
| |
29,529 |
Bug 29529 Moving java files between package fragments introduces unnecessary import statements
|
Same project, different source folders, same package names: - org.eclipse.pde.core (package) \- src | \- org.eclipse.pde.internal.core.plugin | \- PluginXMLDocumentModelFactory.java (the file to move) \- srcnew \- org.eclipse.pde.internal.core.plugin (the destination package) Moving the file with 'update references' adds: import org.eclipse.pde.internal.core.plugin.PluginXMLDocumentNode; to the file (it uses PluginXMLDocumentNode).
|
resolved fixed
|
14df5c7
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T10:14:02Z | 2003-01-15T14:13:20Z |
refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/MoveCuUpdateCreator.java
| |
33,223 |
Bug 33223 Extract interface does not use method code templates
|
Build 2.1 RC1 The genreated interface uses file and type code templates but does not use method code templates.
|
resolved fixed
|
62c5ec4
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T11:50:52Z | 2003-02-26T11:46:40Z |
org.eclipse.jdt.ui/core
| |
33,223 |
Bug 33223 Extract interface does not use method code templates
|
Build 2.1 RC1 The genreated interface uses file and type code templates but does not use method code templates.
|
resolved fixed
|
62c5ec4
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T11:50:52Z | 2003-02-26T11:46:40Z |
refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ExtractInterfaceRefactoring.java
| |
33,223 |
Bug 33223 Extract interface does not use method code templates
|
Build 2.1 RC1 The genreated interface uses file and type code templates but does not use method code templates.
|
resolved fixed
|
62c5ec4
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T11:50:52Z | 2003-02-26T11:46:40Z |
org.eclipse.jdt.ui/core
| |
33,223 |
Bug 33223 Extract interface does not use method code templates
|
Build 2.1 RC1 The genreated interface uses file and type code templates but does not use method code templates.
|
resolved fixed
|
62c5ec4
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T11:50:52Z | 2003-02-26T11:46:40Z |
refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/JavaElementCommentFinder.java
| |
24,255 |
Bug 24255 Internal error when invoking "Restore from Local History" in Outline view
|
smoke for 20021001 1. Open TestCase.java 2. Select the method at the end of the Outline view 3. From context menu select "Delete" 4. Now you must be fast: in the dialog press "Yes", go to the previously selected method, open the context menu and select "Restore from Local History..."
|
resolved fixed
|
deb3882
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T14:48:40Z | 2002-10-01T11:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaAddElementFromHistory.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.compare;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.ResourceBundle;
import java.lang.reflect.InvocationTargetException;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.*;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.ui.IEditorInput;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.*;
import org.eclipse.jdt.core.*;
import org.eclipse.jdt.internal.corext.codemanipulation.MemberEdit;
import org.eclipse.jdt.internal.corext.textmanipulation.*;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
import org.eclipse.jdt.ui.IWorkingCopyManager;
import org.eclipse.compare.*;
public class JavaAddElementFromHistory extends JavaHistoryAction {
private static final String BUNDLE_NAME= "org.eclipse.jdt.internal.ui.compare.AddFromHistoryAction"; //$NON-NLS-1$
private JavaEditor fEditor;
public JavaAddElementFromHistory() {
super(true);
}
public void run(IAction action) {
String errorTitle= CompareMessages.getString("AddFromHistory.title"); //$NON-NLS-1$
String errorMessage= CompareMessages.getString("AddFromHistory.internalErrorMessage"); //$NON-NLS-1$
Shell shell= JavaPlugin.getActiveWorkbenchShell();
// shell can be null; as a result error dialogs won't be parented
ICompilationUnit cu= null;
IParent parent= null;
IMember input= null;
// analyse selection
ISelection selection= getSelection();
if (selection.isEmpty()) {
// no selection: we try to use the editor's input
if (fEditor != null) {
IEditorInput editorInput= fEditor.getEditorInput();
IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
if (manager != null) {
cu= manager.getWorkingCopy(editorInput);
parent= cu;
}
}
} else {
input= getEditionElement(selection);
if (input != null) {
cu= input.getCompilationUnit();
if (input instanceof IParent) {
parent= (IParent)input;
input= null;
} else {
IJavaElement parentElement= input.getParent();
if (parentElement instanceof IParent)
parent= (IParent)parentElement;
}
} else {
if (selection instanceof IStructuredSelection) {
Object o= ((IStructuredSelection)selection).getFirstElement();
if (o instanceof ICompilationUnit) {
cu= (ICompilationUnit) o;
parent= cu;
}
}
}
}
if (parent == null || cu == null) {
MessageDialog.openError(shell, errorTitle, errorMessage);
return;
}
IFile file= getFile(parent);
if (file == null) {
MessageDialog.openError(shell, errorTitle, errorMessage);
return;
}
boolean inEditor= beingEdited(file);
if (inEditor) {
parent= (IParent) getWorkingCopy((IJavaElement)parent);
if (input != null)
input= (IMember) getWorkingCopy(input);
}
// get a TextBuffer where to insert the text
TextBuffer buffer= null;
try {
buffer= TextBuffer.acquire(file);
// configure EditionSelectionDialog and let user select an edition
ITypedElement target= new JavaTextBufferNode(buffer, inEditor);
ITypedElement[] editions= buildEditions(target, file);
ResourceBundle bundle= ResourceBundle.getBundle(BUNDLE_NAME);
EditionSelectionDialog d= new EditionSelectionDialog(shell, bundle);
d.setAddMode(true);
d.setHelpContextId(IJavaHelpContextIds.ADD_ELEMENT_FROM_HISTORY_DIALOG);
ITypedElement selected= d.selectEdition(target, editions, parent);
if (selected == null)
return; // user cancel
ITypedElement[] results= d.getSelection();
//ITypedElement[] results= new ITypedElement[] { selected };
ArrayList edits= new ArrayList();
for (int i= 0; i < results.length; i++) {
ITypedElement ti= results[i];
if (!(ti instanceof IStreamContentAccessor))
continue;
IStreamContentAccessor sca= (IStreamContentAccessor)ti;
// from the edition get the lines (text) to insert
String[] lines= null;
try {
lines= JavaCompareUtilities.readLines(sca.getContents());
} catch (CoreException ex) {
JavaPlugin.log(ex);
}
if (lines == null) {
MessageDialog.openError(shell, errorTitle, errorMessage);
return;
}
// build the TextEdit that inserts the text into the buffer
MemberEdit edit= null;
if (input != null)
edit= new MemberEdit(input, MemberEdit.INSERT_AFTER, lines, JavaCompareUtilities.getTabSize());
else
edit= createEdit(lines, parent);
if (edit == null) {
MessageDialog.openError(shell, errorTitle, errorMessage);
return;
}
edit.setAddLineSeparators(false);
edits.add(edit);
}
IProgressMonitor nullProgressMonitor= new NullProgressMonitor();
TextBufferEditor editor= new TextBufferEditor(buffer);
Iterator iter= edits.iterator();
while (iter.hasNext())
editor.add((TextEdit)iter.next());
editor.performEdits(nullProgressMonitor);
final TextBuffer bb= buffer;
IRunnableWithProgress r= new IRunnableWithProgress() {
public void run(IProgressMonitor pm) throws InvocationTargetException {
try {
TextBuffer.commitChanges(bb, false, pm);
} catch (CoreException ex) {
throw new InvocationTargetException(ex);
}
}
};
if (inEditor) {
// we don't show progress
r.run(nullProgressMonitor);
} else {
ProgressMonitorDialog pd= new ProgressMonitorDialog(shell);
pd.run(true, false, r);
}
} catch(InvocationTargetException ex) {
ExceptionHandler.handle(ex, shell, errorTitle, errorMessage);
} catch(InterruptedException ex) {
// shouldn't be called because is not cancable
} catch(CoreException ex) {
ExceptionHandler.handle(ex, shell, errorTitle, errorMessage);
} finally {
if (buffer != null)
TextBuffer.release(buffer);
}
}
/**
* Creates a TextEdit for inserting the given lines into the container.
*/
private MemberEdit createEdit(String[] lines, IParent container) {
// find a child where to insert before
IJavaElement[] children= null;
try {
children= container.getChildren();
} catch(JavaModelException ex) {
}
if (children != null) {
IJavaElement candidate= null;
for (int i= 0; i < children.length; i++) {
IJavaElement chld= children[i];
switch (chld.getElementType()) {
case IJavaElement.PACKAGE_DECLARATION:
case IJavaElement.IMPORT_CONTAINER:
// skip these but remember the last of them
candidate= chld;
continue;
default:
return new MemberEdit(chld, MemberEdit.INSERT_BEFORE, lines, JavaCompareUtilities.getTabSize());
}
}
if (candidate != null)
return new MemberEdit(candidate, MemberEdit.INSERT_AFTER, lines, JavaCompareUtilities.getTabSize());
}
// no children: insert at end (but before closing bracket)
if (container instanceof IJavaElement)
return new MemberEdit((IJavaElement)container, MemberEdit.ADD_AT_END, lines, JavaCompareUtilities.getTabSize());
return null;
}
protected boolean isEnabled(ISelection selection) {
if (selection.isEmpty()) {
if (fEditor != null) {
// we check whether editor shows CompilationUnit
IEditorInput editorInput= fEditor.getEditorInput();
IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
return manager.getWorkingCopy(editorInput) != null;
}
return false;
}
if (selection instanceof IStructuredSelection) {
Object o= ((IStructuredSelection)selection).getFirstElement();
if (o instanceof ICompilationUnit)
return true;
}
return super.isEnabled(selection);
}
}
|
24,255 |
Bug 24255 Internal error when invoking "Restore from Local History" in Outline view
|
smoke for 20021001 1. Open TestCase.java 2. Select the method at the end of the Outline view 3. From context menu select "Delete" 4. Now you must be fast: in the dialog press "Yes", go to the previously selected method, open the context menu and select "Restore from Local History..."
|
resolved fixed
|
deb3882
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T14:48:40Z | 2002-10-01T11:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaCompareWithEditionAction.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.compare;
import java.util.ResourceBundle;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.internal.corext.textmanipulation.TextBuffer;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
import org.eclipse.compare.*;
/**
* Provides "Replace from local history" for Java elements.
*/
public class JavaCompareWithEditionAction extends JavaHistoryAction {
private static final String BUNDLE_NAME= "org.eclipse.jdt.internal.ui.compare.CompareWithEditionAction"; //$NON-NLS-1$
public JavaCompareWithEditionAction() {
super(false);
}
public void run(IAction action) {
String errorTitle= CompareMessages.getString("ReplaceFromHistory.title"); //$NON-NLS-1$
String errorMessage= CompareMessages.getString("ReplaceFromHistory.internalErrorMessage"); //$NON-NLS-1$
Shell shell= JavaPlugin.getActiveWorkbenchShell();
// shell can be null; as a result error dialogs won't be parented
ISelection selection= getSelection();
IMember input= getEditionElement(selection);
if (input == null) {
// shouldn't happen because Action should not be enabled in the first place
MessageDialog.openInformation(shell, errorTitle, errorMessage);
return;
}
IFile file= getFile(input);
if (file == null) {
MessageDialog.openError(shell, errorTitle, errorMessage);
return;
}
boolean inEditor= beingEdited(file);
if (inEditor)
input= (IMember) getWorkingCopy(input);
// get a TextBuffer where to insert the text
TextBuffer buffer= null;
try {
buffer= TextBuffer.acquire(file);
ITypedElement target= new JavaTextBufferNode(buffer, inEditor);
ITypedElement[] editions= buildEditions(target, file);
ResourceBundle bundle= ResourceBundle.getBundle(BUNDLE_NAME);
EditionSelectionDialog d= new EditionSelectionDialog(shell, bundle);
d.setHelpContextId(IJavaHelpContextIds.COMPARE_ELEMENT_WITH_HISTORY_DIALOG);
d.setCompareMode(true);
d.setEditionTitleImage(JavaCompareUtilities.getImage(input));
d.selectEdition(target, editions, input);
} catch(CoreException ex) {
ExceptionHandler.handle(ex, shell, errorTitle, errorMessage);
} finally {
if (buffer != null)
TextBuffer.release(buffer);
}
}
}
|
24,255 |
Bug 24255 Internal error when invoking "Restore from Local History" in Outline view
|
smoke for 20021001 1. Open TestCase.java 2. Select the method at the end of the Outline view 3. From context menu select "Delete" 4. Now you must be fast: in the dialog press "Yes", go to the previously selected method, open the context menu and select "Restore from Local History..."
|
resolved fixed
|
deb3882
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T14:48:40Z | 2002-10-01T11:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaReplaceWithEditionAction.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.compare;
import java.lang.reflect.InvocationTargetException;
import java.util.ResourceBundle;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.*;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.core.resources.*;
import org.eclipse.core.runtime.*;
import org.eclipse.ui.*;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.internal.corext.codemanipulation.MemberEdit;
import org.eclipse.jdt.internal.corext.textmanipulation.*;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
import org.eclipse.compare.*;
/**
* Provides "Replace from local history" for Java elements.
*/
public class JavaReplaceWithEditionAction extends JavaHistoryAction {
private static final String BUNDLE_NAME= "org.eclipse.jdt.internal.ui.compare.ReplaceWithEditionAction"; //$NON-NLS-1$
private boolean fPrevious= false;
public JavaReplaceWithEditionAction() {
super(true);
}
public JavaReplaceWithEditionAction(boolean previous) {
this();
fPrevious= previous;
}
protected ITypedElement[] buildEditions(ITypedElement target, IFile file, IFileState[] states) {
ITypedElement[] editions= new ITypedElement[states.length+1];
editions[0]= new ResourceNode(file);
for (int i= 0; i < states.length; i++)
editions[i+1]= new HistoryItem(target, states[i]);
return editions;
}
/*
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
*/
public void run(IAction action) {
String errorTitle= CompareMessages.getString("ReplaceFromHistory.title"); //$NON-NLS-1$
String errorMessage= CompareMessages.getString("ReplaceFromHistory.internalErrorMessage"); //$NON-NLS-1$
Shell shell= JavaPlugin.getActiveWorkbenchShell();
// shell can be null; as a result error dialogs won't be parented
ISelection selection= getSelection();
IMember input= getEditionElement(selection);
if (input == null) {
// shouldn't happen because Action should not be enabled in the first place
MessageDialog.openError(shell, errorTitle, errorMessage);
return;
}
IFile file= getFile(input);
if (file == null) {
MessageDialog.openError(shell, errorTitle, errorMessage);
return;
}
boolean inEditor= beingEdited(file);
if (inEditor)
input= (IMember) getWorkingCopy(input);
// get a TextBuffer where to insert the text
TextBuffer buffer= null;
try {
buffer= TextBuffer.acquire(file);
ResourceBundle bundle= ResourceBundle.getBundle(BUNDLE_NAME);
EditionSelectionDialog d= new EditionSelectionDialog(shell, bundle);
d.setHelpContextId(IJavaHelpContextIds.REPLACE_ELEMENT_WITH_HISTORY_DIALOG);
ITypedElement target= new JavaTextBufferNode(buffer, inEditor);
ITypedElement[] editions= buildEditions(target, file);
ITypedElement ti= null;
if (fPrevious) {
ti= d.selectPreviousEdition(target, editions, input);
if (ti == null) {
MessageDialog.openInformation(shell, errorTitle, CompareMessages.getString("ReplaceFromHistory.parsingErrorMessage")); //$NON-NLS-1$
return;
}
} else
ti= d.selectEdition(target, editions, input);
if (ti instanceof IStreamContentAccessor) {
// from the edition get the lines (text) to insert
String[] lines= null;
try {
lines= JavaCompareUtilities.readLines(((IStreamContentAccessor) ti).getContents());
} catch (CoreException ex) {
JavaPlugin.log(ex);
}
if (lines == null) {
MessageDialog.openError(shell, errorTitle, errorMessage);
return;
}
MemberEdit edit= new MemberEdit(input, MemberEdit.REPLACE, lines, JavaCompareUtilities.getTabSize());
edit.setAddLineSeparators(false);
IProgressMonitor nullProgressMonitor= new NullProgressMonitor();
TextBufferEditor editor= new TextBufferEditor(buffer);
editor.add(edit);
editor.performEdits(nullProgressMonitor);
final TextBuffer bb= buffer;
IRunnableWithProgress r= new IRunnableWithProgress() {
public void run(IProgressMonitor pm) throws InvocationTargetException {
try {
TextBuffer.commitChanges(bb, false, pm);
} catch (CoreException ex) {
throw new InvocationTargetException(ex);
}
}
};
if (inEditor) {
JavaEditor je= getEditor(file);
if (je != null)
je.setFocus();
// we don't show progress
r.run(nullProgressMonitor);
} else {
ProgressMonitorDialog pd= new ProgressMonitorDialog(shell);
pd.run(true, false, r);
}
}
} catch(InvocationTargetException ex) {
ExceptionHandler.handle(ex, shell, errorTitle, errorMessage);
} catch(InterruptedException ex) {
// shouldn't be called because is not cancable
} catch(CoreException ex) {
ExceptionHandler.handle(ex, shell, errorTitle, errorMessage);
} finally {
if (buffer != null)
TextBuffer.release(buffer);
}
}
private JavaEditor getEditor(IFile file) {
IWorkbench workbench= JavaPlugin.getDefault().getWorkbench();
IWorkbenchWindow[] windows= workbench.getWorkbenchWindows();
for (int i= 0; i < windows.length; i++) {
IWorkbenchPage[] pages= windows[i].getPages();
for (int x= 0; x < pages.length; x++) {
IEditorPart[] editors= pages[x].getDirtyEditors();
for (int z= 0; z < editors.length; z++) {
IEditorPart ep= editors[z];
if (ep instanceof JavaEditor)
return (JavaEditor) ep;
}
}
}
return null;
}
}
|
33,833 |
Bug 33833 typing in editor does not flush refactoring undo stack which leads to garbage on undo
|
20030227 public class Test { void f(){ int tempName= 0; int fred= tempName; } } inline the tempName temp change 'fred' to 'me' in the editor (by typing), without saving undo the refactoring you're left with garbage public class Test { void f(){ int tempName= 0; int me= 0;tempNam } }
|
resolved fixed
|
9d29a2d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T14:52:46Z | 2003-03-05T13:13:20Z |
org.eclipse.jdt.ui/core
| |
33,833 |
Bug 33833 typing in editor does not flush refactoring undo stack which leads to garbage on undo
|
20030227 public class Test { void f(){ int tempName= 0; int fred= tempName; } } inline the tempName temp change 'fred' to 'me' in the editor (by typing), without saving undo the refactoring you're left with garbage public class Test { void f(){ int tempName= 0; int me= 0;tempNam } }
|
resolved fixed
|
9d29a2d
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T14:52:46Z | 2003-03-05T13:13:20Z |
refactoring/org/eclipse/jdt/internal/corext/refactoring/changes/TextFileChange.java
| |
33,216 |
Bug 33216 Source actions in context menu on types inconsistency
|
1) select a type in the package explorer 2) bring up the context menu ->the source actions are shown in-line and the menu is huge. Given that we show a source submenu in other parts (e.g. the editor) and do the same for the refactoring actions we should also move the source actions into a submenu.
|
resolved fixed
|
0ece750
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T15:38:10Z | 2003-02-26T11:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
|
/*
* (c) Copyright IBM Corp. 2000, 2002.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.browsing;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IPath;
import org.eclipse.swt.SWT;
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.DragSource;
import org.eclipse.swt.dnd.DragSourceEvent;
import org.eclipse.swt.dnd.Transfer;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.action.IAction;
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.text.ITextSelection;
import org.eclipse.jface.util.Assert;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.DecoratingLabelProvider;
import org.eclipse.jface.viewers.IContentProvider;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.IOpenListener;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.OpenEvent;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.IPartListener2;
import org.eclipse.ui.ISelectionListener;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartReference;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.IWorkingSet;
import org.eclipse.ui.IWorkingSetManager;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.ActionContext;
import org.eclipse.ui.actions.ActionGroup;
import org.eclipse.ui.part.IShowInSource;
import org.eclipse.ui.part.ResourceTransfer;
import org.eclipse.ui.part.ShowInContext;
import org.eclipse.ui.part.ViewPart;
import org.eclipse.search.ui.ISearchResultView;
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.IPackageFragment;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.IWorkingCopy;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.IContextMenuConstants;
import org.eclipse.jdt.ui.IWorkingCopyManager;
import org.eclipse.jdt.ui.JavaElementLabelProvider;
import org.eclipse.jdt.ui.JavaElementSorter;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jdt.ui.PreferenceConstants;
import org.eclipse.jdt.ui.StandardJavaElementContentProvider;
import org.eclipse.jdt.ui.actions.BuildActionGroup;
import org.eclipse.jdt.ui.actions.CCPActionGroup;
import org.eclipse.jdt.ui.actions.CustomFiltersActionGroup;
import org.eclipse.jdt.ui.actions.GenerateActionGroup;
import org.eclipse.jdt.ui.actions.ImportActionGroup;
import org.eclipse.jdt.ui.actions.JavaSearchActionGroup;
import org.eclipse.jdt.ui.actions.OpenEditorActionGroup;
import org.eclipse.jdt.ui.actions.OpenViewActionGroup;
import org.eclipse.jdt.ui.actions.RefactorActionGroup;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.actions.CompositeActionGroup;
import org.eclipse.jdt.internal.ui.actions.NewWizardsActionGroup;
import org.eclipse.jdt.internal.ui.dnd.DelegatingDragAdapter;
import org.eclipse.jdt.internal.ui.dnd.DelegatingDropAdapter;
import org.eclipse.jdt.internal.ui.dnd.LocalSelectionTransfer;
import org.eclipse.jdt.internal.ui.dnd.ResourceTransferDragAdapter;
import org.eclipse.jdt.internal.ui.dnd.TransferDragSourceListener;
import org.eclipse.jdt.internal.ui.dnd.TransferDropTargetListener;
import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
import org.eclipse.jdt.internal.ui.javaeditor.IClassFileEditorInput;
import org.eclipse.jdt.internal.ui.javaeditor.JarEntryEditorInput;
import org.eclipse.jdt.internal.ui.packageview.SelectionTransferDragAdapter;
import org.eclipse.jdt.internal.ui.packageview.SelectionTransferDropAdapter;
import org.eclipse.jdt.internal.ui.search.SearchUtil;
import org.eclipse.jdt.internal.ui.util.JavaUIHelp;
import org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider;
import org.eclipse.jdt.internal.ui.viewsupport.DecoratingJavaLabelProvider;
import org.eclipse.jdt.internal.ui.viewsupport.IViewPartInputProvider;
import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider;
import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabels;
import org.eclipse.jdt.internal.ui.viewsupport.JavaUILabelProvider;
import org.eclipse.jdt.internal.ui.viewsupport.ProblemTableViewer;
import org.eclipse.jdt.internal.ui.viewsupport.StatusBarUpdater;
import org.eclipse.jdt.internal.ui.workingsets.WorkingSetFilterActionGroup;
abstract class JavaBrowsingPart extends ViewPart implements IMenuListener, ISelectionListener, IViewPartInputProvider {
private static final String TAG_SELECTED_ELEMENTS= "selectedElements"; //$NON-NLS-1$
private static final String TAG_SELECTED_ELEMENT= "selectedElement"; //$NON-NLS-1$
private static final String TAG_LOGICAL_PACKAGE= "logicalPackage"; //$NON-NLS-1$
private static final String TAG_SELECTED_ELEMENT_PATH= "selectedElementPath"; //$NON-NLS-1$
private JavaUILabelProvider fLabelProvider;
private ILabelProvider fTitleProvider;
private StructuredViewer fViewer;
private IMemento fMemento;
private JavaElementTypeComparator fTypeComparator;
// Actions
private WorkingSetFilterActionGroup fWorkingSetFilterActionGroup;
private boolean fHasWorkingSetFilter= true;
private boolean fHasCustomFilter= true;
private OpenEditorActionGroup fOpenEditorGroup;
private CCPActionGroup fCCPActionGroup;
private BuildActionGroup fBuildActionGroup;
private ToggleLinkingAction fToggleLinkingAction;
protected CompositeActionGroup fActionGroups;
// Filters
private CustomFiltersActionGroup fCustomFiltersActionGroup;
protected IWorkbenchPart fPreviousSelectionProvider;
protected Object fPreviousSelectedElement;
// Linking
private boolean fLinkingEnabled;
/*
* Ensure selection changed events being processed only if
* initiated by user interaction with this part.
*/
private boolean fProcessSelectionEvents= true;
private IPartListener2 fPartListener= new IPartListener2() {
public void partActivated(IWorkbenchPartReference ref) {
setSelectionFromEditor(ref);
}
public void partBroughtToTop(IWorkbenchPartReference ref) {
setSelectionFromEditor(ref);
}
public void partInputChanged(IWorkbenchPartReference ref) {
setSelectionFromEditor(ref);
}
public void partClosed(IWorkbenchPartReference ref) {
}
public void partDeactivated(IWorkbenchPartReference ref) {
}
public void partOpened(IWorkbenchPartReference ref) {
}
public void partVisible(IWorkbenchPartReference ref) {
if (ref != null && ref.getId() == getSite().getId()){
fProcessSelectionEvents= true;
IWorkbenchPage page= getSite().getWorkbenchWindow().getActivePage();
if (page != null)
selectionChanged(page.getActivePart(), page.getSelection());
}
}
public void partHidden(IWorkbenchPartReference ref) {
if (ref != null && ref.getId() == getSite().getId())
fProcessSelectionEvents= false;
}
};
public JavaBrowsingPart() {
super();
initLinkingEnabled();
}
/*
* Implements method from IViewPart.
*/
public void init(IViewSite site, IMemento memento) throws PartInitException {
super.init(site, memento);
fMemento= memento;
}
/*
* Implements method from IViewPart.
*/
public void saveState(IMemento memento) {
if (fViewer == null) {
// part has not been created
if (fMemento != null) //Keep the old state;
memento.putMemento(fMemento);
return;
}
if (fHasWorkingSetFilter)
fWorkingSetFilterActionGroup.saveState(memento);
if (fHasCustomFilter)
fCustomFiltersActionGroup.saveState(memento);
saveSelectionState(memento);
saveLinkingEnabled(memento);
}
private void saveLinkingEnabled(IMemento memento) {
memento.putInteger(getLinkToEditorKey(), fLinkingEnabled ? 1 : 0);
}
private void saveSelectionState(IMemento memento) {
Object elements[]= ((IStructuredSelection) fViewer.getSelection()).toArray();
if (elements.length > 0) {
IMemento selectionMem= memento.createChild(TAG_SELECTED_ELEMENTS);
for (int i= 0; i < elements.length; i++) {
IMemento elementMem= selectionMem.createChild(TAG_SELECTED_ELEMENT);
Object o= elements[i];
if (o instanceof IJavaElement)
elementMem.putString(TAG_SELECTED_ELEMENT_PATH, ((IJavaElement) elements[i]).getHandleIdentifier());
else if (o instanceof LogicalPackage) {
IPackageFragment[] packages=((LogicalPackage)o).getFragments();
for (int j= 0; j < packages.length; j++) {
IMemento packageMem= elementMem.createChild(TAG_LOGICAL_PACKAGE);
packageMem.putString(TAG_SELECTED_ELEMENT_PATH, packages[j].getHandleIdentifier());
}
}
}
}
}
protected void restoreState(IMemento memento) {
if (fHasWorkingSetFilter)
fWorkingSetFilterActionGroup.restoreState(memento);
if (fHasCustomFilter)
fCustomFiltersActionGroup.restoreState(memento);
if (fHasCustomFilter || fHasWorkingSetFilter) {
fViewer.getControl().setRedraw(false);
fViewer.refresh();
fViewer.getControl().setRedraw(true);
}
}
private ISelection restoreSelectionState(IMemento memento) {
if (memento == null)
return null;
IMemento childMem;
childMem= memento.getChild(TAG_SELECTED_ELEMENTS);
if (childMem != null) {
ArrayList list= new ArrayList();
IMemento[] elementMem= childMem.getChildren(TAG_SELECTED_ELEMENT);
for (int i= 0; i < elementMem.length; i++) {
String javaElementHandle= elementMem[i].getString(TAG_SELECTED_ELEMENT_PATH);
if (javaElementHandle == null) {
// logical package
IMemento[] packagesMem= elementMem[i].getChildren(TAG_LOGICAL_PACKAGE);
LogicalPackage lp= null;
for (int j= 0; j < packagesMem.length; j++) {
javaElementHandle= packagesMem[j].getString(TAG_SELECTED_ELEMENT_PATH);
Object pack= (IPackageFragment)JavaCore.create(javaElementHandle);
if (pack instanceof IPackageFragment && ((IPackageFragment)pack).exists()) {
if (lp == null)
lp= new LogicalPackage((IPackageFragment)pack);
else
lp.add((IPackageFragment)pack);
}
}
if (lp != null)
list.add(lp);
} else {
IJavaElement element= JavaCore.create(javaElementHandle);
if (element != null && element.exists())
list.add(element);
}
}
return new StructuredSelection(list);
}
return null;
}
private void restoreLinkingEnabled(IMemento memento) {
Integer val= memento.getInteger(getLinkToEditorKey());
if (val != null) {
fLinkingEnabled= val.intValue() != 0;
}
}
/**
* Creates the search list inner viewer.
*/
public void createPartControl(Composite parent) {
Assert.isTrue(fViewer == null);
fTypeComparator= new JavaElementTypeComparator();
// Setup viewer
fViewer= createViewer(parent);
fLabelProvider= createLabelProvider();
fViewer.setLabelProvider(createDecoratingLabelProvider(fLabelProvider));
fViewer.setSorter(createJavaElementSorter());
fViewer.setUseHashlookup(true);
fTitleProvider= createTitleProvider();
createContextMenu();
getSite().setSelectionProvider(fViewer);
if (fMemento != null) { // initialize linking state before creating the actions
restoreLinkingEnabled(fMemento);
}
createActions(); // call before registering for selection changes
addKeyListener();
if (fMemento != null)
restoreState(fMemento);
getSite().setSelectionProvider(fViewer);
// Status line
IStatusLineManager slManager= getViewSite().getActionBars().getStatusLineManager();
fViewer.addSelectionChangedListener(createStatusBarUpdater(slManager));
hookViewerListeners();
// Filters
addFilters();
// Initialize viewer input
fViewer.setContentProvider(createContentProvider());
setInitialInput();
initDragAndDrop();
// Initialize selecton
setInitialSelection();
fMemento= null;
// Listen to page changes
getViewSite().getPage().addPostSelectionListener(this);
getViewSite().getPage().addPartListener(fPartListener);
fillActionBars(getViewSite().getActionBars());
setHelp();
}
/**
* Answer the property defined by key.
*/
public Object getAdapter(Class key) {
if (key == IShowInSource.class) {
return getShowInSource();
}
return super.getAdapter(key);
}
/**
* Returns the <code>IShowInSource</code> for this view.
*/
protected IShowInSource getShowInSource() {
return new IShowInSource() {
public ShowInContext getShowInContext() {
return new ShowInContext(
null,
getSite().getSelectionProvider().getSelection());
}
};
}
protected DecoratingLabelProvider createDecoratingLabelProvider(JavaUILabelProvider provider) {
// XXX: Work in progress for problem decorator being a workbench decorator//
// return new ExcludingDecoratingLabelProvider(provider, decorationMgr, "org.eclipse.jdt.ui.problem.decorator"); //$NON-NLS-1$
return new DecoratingJavaLabelProvider(provider);
}
protected JavaElementSorter createJavaElementSorter() {
return new JavaElementSorter();
}
protected StatusBarUpdater createStatusBarUpdater(IStatusLineManager slManager) {
return new StatusBarUpdater(slManager);
}
protected void createContextMenu() {
MenuManager menuManager= new MenuManager("#PopupMenu"); //$NON-NLS-1$
menuManager.setRemoveAllWhenShown(true);
menuManager.addMenuListener(this);
Menu contextMenu= menuManager.createContextMenu(fViewer.getControl());
fViewer.getControl().setMenu(contextMenu);
getSite().registerContextMenu(menuManager, fViewer);
}
protected void initDragAndDrop() {
int ops= DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
Transfer[] transfers= new Transfer[] {
LocalSelectionTransfer.getInstance(),
ResourceTransfer.getInstance()};
// Drop Adapter
TransferDropTargetListener[] dropListeners= new TransferDropTargetListener[] {
new SelectionTransferDropAdapter(fViewer)
};
fViewer.addDropSupport(ops | DND.DROP_DEFAULT, transfers, new DelegatingDropAdapter(dropListeners));
// Drag Adapter
Control control= fViewer.getControl();
TransferDragSourceListener[] dragListeners= new TransferDragSourceListener[] {
new SelectionTransferDragAdapter(fViewer),
new ResourceTransferDragAdapter(fViewer)
};
DragSource source= new DragSource(control, ops);
// Note, that the transfer agents are set by the delegating drag adapter itself.
source.addDragListener(new DelegatingDragAdapter(dragListeners) {
public void dragStart(DragSourceEvent event) {
IStructuredSelection selection= (IStructuredSelection)getSelectionProvider().getSelection();
for (Iterator iter= selection.iterator(); iter.hasNext(); ) {
if (iter.next() instanceof IMember) {
setPossibleListeners(new TransferDragSourceListener[] {new SelectionTransferDragAdapter(fViewer)});
break;
}
}
super.dragStart(event);
}
});
}
protected void fillActionBars(IActionBars actionBars) {
IToolBarManager toolBar= actionBars.getToolBarManager();
fillToolBar(toolBar);
if (fHasWorkingSetFilter)
fWorkingSetFilterActionGroup.fillActionBars(getViewSite().getActionBars());
actionBars.updateActionBars();
fActionGroups.fillActionBars(actionBars);
if (fHasCustomFilter)
fCustomFiltersActionGroup.fillActionBars(actionBars);
IMenuManager menu= actionBars.getMenuManager();
menu.add(fToggleLinkingAction);
}
//---- IWorkbenchPart ------------------------------------------------------
public void setFocus() {
fViewer.getControl().setFocus();
}
public void dispose() {
if (fViewer != null) {
getViewSite().getPage().removePostSelectionListener(this);
getViewSite().getPage().removePartListener(fPartListener);
fViewer= null;
}
if (fActionGroups != null)
fActionGroups.dispose();
super.dispose();
}
/**
* Adds the KeyListener
*/
protected void addKeyListener() {
fViewer.getControl().addKeyListener(new KeyAdapter() {
public void keyReleased(KeyEvent event) {
handleKeyReleased(event);
}
});
}
protected void handleKeyReleased(KeyEvent event) {
if (event.stateMask != 0)
return;
int key= event.keyCode;
IAction action;
if (key == SWT.F5) {
action= fBuildActionGroup.getRefreshAction();
if (action.isEnabled())
action.run();
} if (event.character == SWT.DEL) {
action= fCCPActionGroup.getDeleteAction();
if (action.isEnabled())
action.run();
}
}
//---- Adding Action to Toolbar -------------------------------------------
protected void fillToolBar(IToolBarManager tbm) {
}
/**
* Called when the context menu is about to open.
* Override to add your own context dependent menu contributions.
*/
public void menuAboutToShow(IMenuManager menu) {
JavaPlugin.createStandardGroups(menu);
IStructuredSelection selection= (IStructuredSelection) fViewer.getSelection();
int size= selection.size();
Object element= selection.getFirstElement();
if (size == 1)
addOpenNewWindowAction(menu, element);
fActionGroups.setContext(new ActionContext(selection));
fActionGroups.fillContextMenu(menu);
fActionGroups.setContext(null);
}
private void addOpenNewWindowAction(IMenuManager menu, Object element) {
if (element instanceof IJavaElement) {
element= ((IJavaElement)element).getResource();
}
if (!(element instanceof IContainer))
return;
menu.appendToGroup(
IContextMenuConstants.GROUP_OPEN,
new PatchedOpenInNewWindowAction(getSite().getWorkbenchWindow(), (IContainer)element));
}
protected void createActions() {
fActionGroups= new CompositeActionGroup(new ActionGroup[] {
new NewWizardsActionGroup(this.getSite()),
fOpenEditorGroup= new OpenEditorActionGroup(this),
new OpenViewActionGroup(this),
fCCPActionGroup= new CCPActionGroup(this),
new RefactorActionGroup(this),
new ImportActionGroup(this),
new GenerateActionGroup(this),
fBuildActionGroup= new BuildActionGroup(this),
new JavaSearchActionGroup(this)});
if (fHasWorkingSetFilter) {
String viewId= getConfigurationElement().getAttribute("id"); //$NON-NLS-1$
Assert.isNotNull(viewId);
IPropertyChangeListener titleUpdater= new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
String property= event.getProperty();
if (IWorkingSetManager.CHANGE_WORKING_SET_NAME_CHANGE.equals(property))
updateTitle();
}
};
fWorkingSetFilterActionGroup= new WorkingSetFilterActionGroup(fViewer, viewId, getShell(), titleUpdater);
}
// Custom filter group
if (fHasCustomFilter)
fCustomFiltersActionGroup= new CustomFiltersActionGroup(this, fViewer);
fToggleLinkingAction= new ToggleLinkingAction(this);
}
/**
* Returns the shell to use for opening dialogs.
* Used in this class, and in the actions.
*/
Shell getShell() {
return fViewer.getControl().getShell();
}
protected final Display getDisplay() {
return fViewer.getControl().getDisplay();
}
/**
* Returns the selection provider.
*/
ISelectionProvider getSelectionProvider() {
return fViewer;
}
/**
* Answers if the given <code>element</code> is a valid
* input for this part.
*
* @param element the object to test
* @return <true> if the given element is a valid input
*/
abstract protected boolean isValidInput(Object element);
/**
* Answers if the given <code>element</code> is a valid
* element for this part.
*
* @param element the object to test
* @return <true> if the given element is a valid element
*/
protected boolean isValidElement(Object element) {
if (element == null)
return false;
element= getSuitableJavaElement(element);
if (element == null)
return false;
Object input= getViewer().getInput();
if (input == null)
return false;
if (input instanceof Collection)
return ((Collection)input).contains(element);
else
return input.equals(element);
}
private boolean isInputResetBy(Object newInput, Object input, IWorkbenchPart part) {
if (newInput == null)
return part == fPreviousSelectionProvider;
if (input instanceof IJavaElement && newInput instanceof IJavaElement)
return getTypeComparator().compare(newInput, input) > 0;
if((newInput instanceof List) && (part instanceof PackagesView))
return true;
else
return false;
}
private boolean isInputResetBy(IWorkbenchPart part) {
if (!(part instanceof JavaBrowsingPart))
return true;
Object thisInput= getViewer().getInput();
Object partInput= ((JavaBrowsingPart)part).getViewer().getInput();
if(thisInput instanceof Collection)
thisInput= ((Collection)thisInput).iterator().next();
if(partInput instanceof Collection)
partInput= ((Collection)partInput).iterator().next();
if (thisInput instanceof IJavaElement && partInput instanceof IJavaElement)
return getTypeComparator().compare(partInput, thisInput) > 0;
else
return true;
}
protected boolean isAncestorOf(Object ancestor, Object element) {
if (element instanceof IJavaElement && ancestor instanceof IJavaElement)
return !element.equals(ancestor) && internalIsAncestorOf((IJavaElement)ancestor, (IJavaElement)element);
return false;
}
private boolean internalIsAncestorOf(IJavaElement ancestor, IJavaElement element) {
if (element != null)
return element.equals(ancestor) || internalIsAncestorOf(ancestor, element.getParent());
else
return false;
}
private boolean isSearchResultView(IWorkbenchPart part) {
return SearchUtil.isSearchPlugInActivated() && (part instanceof ISearchResultView);
}
protected boolean needsToProcessSelectionChanged(IWorkbenchPart part, ISelection selection) {
if (!fProcessSelectionEvents || part == this || isSearchResultView(part) || !(selection instanceof IStructuredSelection)){
if (part == this)
fPreviousSelectionProvider= part;
return false;
}
return true;
}
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
if (!needsToProcessSelectionChanged(part, selection))
return;
// Set selection
Object selectedElement= getSingleElementFromSelection(selection);
if (selectedElement != null && (part == null || part.equals(fPreviousSelectionProvider)) && selectedElement.equals(fPreviousSelectedElement))
return;
fPreviousSelectedElement= selectedElement;
Object currentInput= getViewer().getInput();
if (selectedElement != null && selectedElement.equals(currentInput)) {
IJavaElement elementToSelect= findElementToSelect(selectedElement);
if (elementToSelect != null && getTypeComparator().compare(selectedElement, elementToSelect) < 0)
setSelection(new StructuredSelection(elementToSelect), true);
else if (elementToSelect == null && (this instanceof MembersView)) {
setSelection(StructuredSelection.EMPTY, true);
fPreviousSelectedElement= StructuredSelection.EMPTY;
}
fPreviousSelectionProvider= part;
return;
}
// Clear input if needed
if (part != fPreviousSelectionProvider && selectedElement != null && !selectedElement.equals(currentInput) && isInputResetBy(selectedElement, currentInput, part)) {
if (!isAncestorOf(selectedElement, currentInput))
setInput(null);
fPreviousSelectionProvider= part;
return;
} else if (selection.isEmpty() && !isInputResetBy(part)) {
fPreviousSelectionProvider= part;
return;
} else if (selectedElement == null && part == fPreviousSelectionProvider) {
setInput(null);
fPreviousSelectionProvider= part;
return;
}
fPreviousSelectionProvider= part;
// Adjust input and set selection and
adjustInputAndSetSelection(selectedElement);
}
void setHasWorkingSetFilter(boolean state) {
fHasWorkingSetFilter= state;
}
void setHasCustomSetFilter(boolean state) {
fHasCustomFilter= state;
}
protected Object getInput() {
return fViewer.getInput();
}
protected void setInput(Object input) {
setViewerInput(input);
updateTitle();
}
boolean isLinkingEnabled() {
return fLinkingEnabled;
}
private void initLinkingEnabled() {
fLinkingEnabled= PreferenceConstants.getPreferenceStore().getBoolean(getLinkToEditorKey());
}
private void setViewerInput(Object input) {
fProcessSelectionEvents= false;
fViewer.setInput(input);
fProcessSelectionEvents= true;
}
void updateTitle() {
setTitleToolTip(getToolTipText(fViewer.getInput()));
}
/**
* Returns the tool tip text for the given element.
*/
String getToolTipText(Object element) {
String result;
if (!(element instanceof IResource)) {
result= JavaElementLabels.getTextLabel(element, AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS);
} else {
IPath path= ((IResource) element).getFullPath();
if (path.isRoot()) {
result= getConfigurationElement().getAttribute("name"); //$NON-NLS-1$
} else {
result= path.makeRelative().toString();
}
}
if (fWorkingSetFilterActionGroup == null || fWorkingSetFilterActionGroup.getWorkingSet() == null)
return result;
IWorkingSet ws= fWorkingSetFilterActionGroup.getWorkingSet();
String wsstr= JavaBrowsingMessages.getFormattedString("JavaBrowsingPart.toolTip", new String[] { ws.getName() }); //$NON-NLS-1$
if (result.length() == 0)
return wsstr;
return JavaBrowsingMessages.getFormattedString("JavaBrowsingPart.toolTip2", new String[] { result, ws.getName() }); //$NON-NLS-1$
}
public String getTitleToolTip() {
if (fViewer == null)
return super.getTitleToolTip();
return getToolTipText(fViewer.getInput());
}
protected final StructuredViewer getViewer() {
return fViewer;
}
protected final void setViewer(StructuredViewer viewer){
fViewer= viewer;
}
protected JavaUILabelProvider createLabelProvider() {
return new AppearanceAwareLabelProvider(
AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS,
AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS | JavaElementImageProvider.SMALL_ICONS
);
}
protected ILabelProvider createTitleProvider() {
return new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_BASICS | JavaElementLabelProvider.SHOW_SMALL_ICONS);
}
protected final ILabelProvider getLabelProvider() {
return fLabelProvider;
}
protected final ILabelProvider getTitleProvider() {
return fTitleProvider;
}
/**
* Creates the the viewer of this part.
*
* @param parent the parent for the viewer
*/
protected StructuredViewer createViewer(Composite parent) {
return new ProblemTableViewer(parent, SWT.MULTI);
}
protected int getLabelProviderFlags() {
return JavaElementLabelProvider.SHOW_BASICS | JavaElementLabelProvider.SHOW_OVERLAY_ICONS |
JavaElementLabelProvider.SHOW_SMALL_ICONS | JavaElementLabelProvider.SHOW_VARIABLE | JavaElementLabelProvider.SHOW_PARAMETERS;
}
/**
* Adds filters the viewer of this part.
*/
protected void addFilters() {
// default is to have no filters
}
/**
* Creates the the content provider of this part.
*/
protected IContentProvider createContentProvider() {
return new JavaBrowsingContentProvider(true, this);
}
protected void setInitialInput() {
// Use the selection, if any
ISelection selection= getSite().getPage().getSelection();
Object input= getSingleElementFromSelection(selection);
if (!(input instanceof IJavaElement)) {
// Use the input of the page
input= getSite().getPage().getInput();
if (!(input instanceof IJavaElement) && input instanceof IAdaptable)
input= ((IAdaptable)input).getAdapter(IJavaElement.class);
}
setInput(findInputForJavaElement((IJavaElement)input));
}
protected void setInitialSelection() {
// Use the selection, if any
Object input;
IWorkbenchPage page= getSite().getPage();
ISelection selection= null;
if (page != null)
selection= page.getSelection();
if (selection instanceof ITextSelection) {
Object part= PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart();
if (part instanceof IEditorPart) {
setSelectionFromEditor((IEditorPart)part);
if (fViewer.getSelection() != null)
return;
}
}
// Use saved selection from memento
if (selection == null || selection.isEmpty())
selection= restoreSelectionState(fMemento);
if (selection == null || selection.isEmpty()) {
// Use the input of the page
input= getSite().getPage().getInput();
if (!(input instanceof IJavaElement)) {
if (input instanceof IAdaptable)
input= ((IAdaptable)input).getAdapter(IJavaElement.class);
else
return;
}
selection= new StructuredSelection(input);
}
selectionChanged(null, selection);
}
protected final void setHelp() {
JavaUIHelp.setHelp(fViewer, getHelpContextId());
}
/**
* Returns the context ID for the Help system
*
* @return the string used as ID for the Help context
*/
abstract protected String getHelpContextId();
/**
* Returns the preference key for the link to editor setting.
*
* @return the string used as key into the preference store
*/
abstract protected String getLinkToEditorKey();
/**
* Adds additional listeners to this view.
* This method can be overridden but should
* call super.
*/
protected void hookViewerListeners() {
fViewer.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
if (!fProcessSelectionEvents)
return;
fPreviousSelectedElement= getSingleElementFromSelection(event.getSelection());
IWorkbenchPage page= getSite().getPage();
if (page == null)
return;
if (page.equals(JavaPlugin.getActivePage()) && JavaBrowsingPart.this.equals(page.getActivePart())) {
linkToEditor((IStructuredSelection)event.getSelection());
}
}
});
fViewer.addOpenListener(new IOpenListener() {
public void open(OpenEvent event) {
IAction open= fOpenEditorGroup.getOpenAction();
if (open.isEnabled()) {
open.run();
restoreSelection();
}
}
});
}
void restoreSelection() {
// Default is to do nothing
}
void adjustInputAndSetSelection(Object o) {
if (!(o instanceof IJavaElement)) {
setSelection(StructuredSelection.EMPTY, true);
return;
};
IJavaElement je= (IJavaElement)o;
IJavaElement elementToSelect= getSuitableJavaElement(findElementToSelect(je));
IJavaElement newInput= findInputForJavaElement(je);
if (elementToSelect == null && !isValidInput(newInput))
// Clear input
setInput(null);
else if (elementToSelect == null || getViewer().testFindItem(elementToSelect) == null) {
// Adjust input to selection
setInput(newInput);
// Recompute suitable element since it depends on the viewer's input
elementToSelect= getSuitableJavaElement(elementToSelect);
}
if (elementToSelect != null && elementToSelect.exists())
setSelection(new StructuredSelection(elementToSelect), true);
else
setSelection(StructuredSelection.EMPTY, true);
}
/**
* Finds the closest Java element which can be used as input for
* this part and has the given Java element as child
*
* @param je the Java element for which to search the closest input
* @return the closest Java element used as input for this part
*/
protected IJavaElement findInputForJavaElement(IJavaElement je) {
if (je == null || !je.exists())
return null;
if (isValidInput(je))
return je;
return findInputForJavaElement(je.getParent());
}
protected final IJavaElement findElementToSelect(Object obj) {
if (obj instanceof IJavaElement)
return findElementToSelect((IJavaElement)obj);
return null;
}
/**
* Finds the element which has to be selected in this part.
*
* @param je the Java element which has the focus
*/
abstract protected IJavaElement findElementToSelect(IJavaElement je);
protected final Object getSingleElementFromSelection(ISelection selection) {
if (!(selection instanceof StructuredSelection) || selection.isEmpty())
return null;
Iterator iter= ((StructuredSelection)selection).iterator();
Object firstElement= iter.next();
if (!(firstElement instanceof IJavaElement)) {
if (SearchUtil.isISearchResultViewEntry(firstElement)) {
IJavaElement je= SearchUtil.getJavaElement(firstElement);
if (je != null)
return je;
firstElement= SearchUtil.getResource(firstElement);
}
if (firstElement instanceof IAdaptable) {
IJavaElement je= (IJavaElement)((IAdaptable)firstElement).getAdapter(IJavaElement.class);
if (je == null && firstElement instanceof IFile) {
IContainer parent= ((IFile)firstElement).getParent();
if (parent != null)
return (IJavaElement)parent.getAdapter(IJavaElement.class);
else return null;
} else
return je;
} else
return firstElement;
}
Object currentInput= getViewer().getInput();
if (currentInput == null || !currentInput.equals(findInputForJavaElement((IJavaElement)firstElement)))
if (iter.hasNext())
// multi selection and view is empty
return null;
else
// ok: single selection and view is empty
return firstElement;
// be nice to multi selection
while (iter.hasNext()) {
Object element= iter.next();
if (!(element instanceof IJavaElement))
return null;
if (!currentInput.equals(findInputForJavaElement((IJavaElement)element)))
return null;
}
return firstElement;
}
/**
* Gets the typeComparator.
* @return Returns a JavaElementTypeComparator
*/
protected Comparator getTypeComparator() {
return fTypeComparator;
}
/**
* Links to editor (if option enabled)
*/
private void linkToEditor(IStructuredSelection selection) {
Object obj= selection.getFirstElement();
if (selection.size() == 1) {
IEditorPart part= EditorUtility.isOpenInEditor(obj);
if (part != null) {
IWorkbenchPage page= getSite().getPage();
page.bringToTop(part);
if (obj instanceof IJavaElement)
EditorUtility.revealInEditor(part, (IJavaElement) obj);
}
}
}
private void setSelectionFromEditor(IWorkbenchPartReference ref) {
IWorkbenchPart part= ref.getPart(false);
setSelectionFromEditor(part);
}
void setSelectionFromEditor(IWorkbenchPart part) {
if (!linkBrowsingViewSelectionToEditor())
return;
if (part == null)
return;
IWorkbenchPartSite site= part.getSite();
if (site == null)
return;
ISelectionProvider provider= site.getSelectionProvider();
if (provider != null)
setSelectionFromEditor(part, provider.getSelection());
}
private void setSelectionFromEditor(IWorkbenchPart part, ISelection selection) {
if (part instanceof IEditorPart) {
IJavaElement element= null;
if (selection instanceof IStructuredSelection) {
Object obj= getSingleElementFromSelection(selection);
if (obj instanceof IJavaElement)
element= (IJavaElement)obj;
}
IEditorInput ei= ((IEditorPart)part).getEditorInput();
if (selection instanceof ITextSelection) {
int offset= ((ITextSelection)selection).getOffset();
element= getElementForInputAt(ei, offset);
}
if (element != null) {
adjustInputAndSetSelection(element);
return;
}
if (ei instanceof IFileEditorInput) {
IFile file= ((IFileEditorInput)ei).getFile();
IJavaElement je= (IJavaElement)file.getAdapter(IJavaElement.class);
if (je == null) {
IContainer container= ((IFileEditorInput)ei).getFile().getParent();
if (container != null)
je= (IJavaElement)container.getAdapter(IJavaElement.class);
}
if (je == null) {
setSelection(null, false);
return;
}
adjustInputAndSetSelection(je);
} else if (ei instanceof IClassFileEditorInput) {
IClassFile cf= ((IClassFileEditorInput)ei).getClassFile();
adjustInputAndSetSelection(cf);
}
}
}
/**
* Returns the element contained in the EditorInput
*/
Object getElementOfInput(IEditorInput input) {
if (input instanceof IClassFileEditorInput)
return ((IClassFileEditorInput)input).getClassFile();
else if (input instanceof IFileEditorInput)
return ((IFileEditorInput)input).getFile();
else if (input instanceof JarEntryEditorInput)
return ((JarEntryEditorInput)input).getStorage();
return null;
}
void setSelection(ISelection selection, boolean reveal) {
if (selection != null && selection.equals(fViewer.getSelection()))
return;
fProcessSelectionEvents= false;
fViewer.setSelection(selection, reveal);
fProcessSelectionEvents= true;
}
/**
* Tries to find the given element in a workingcopy.
*/
protected static IJavaElement getWorkingCopy(IJavaElement input) {
try {
if (input instanceof ICompilationUnit)
return ((ICompilationUnit)input).findSharedWorkingCopy(JavaUI.getBufferFactory());
else
return EditorUtility.getWorkingCopy(input, false);
} catch (JavaModelException ex) {
}
return null;
}
/**
* Returns the original element from which the specified working copy
* element was created from. This is a handle only method, the
* returned element may or may not exist.
*
* @param workingCopy the element for which to get the original
* @return the original Java element or <code>null</code> if this is not a working copy element
*/
protected static IJavaElement getOriginal(IJavaElement workingCopy) {
ICompilationUnit cu= getCompilationUnit(workingCopy);
if (cu != null)
return ((IWorkingCopy)cu).getOriginal(workingCopy);
return null;
}
/**
* Returns the compilation unit for the given java element.
*
* @param element the java element whose compilation unit is searched for
* @return the compilation unit of the given java element
*/
protected static ICompilationUnit getCompilationUnit(IJavaElement element) {
if (element == null)
return null;
if (element instanceof IMember)
return ((IMember) element).getCompilationUnit();
int type= element.getElementType();
if (IJavaElement.COMPILATION_UNIT == type)
return (ICompilationUnit) element;
if (IJavaElement.CLASS_FILE == type)
return null;
return getCompilationUnit(element.getParent());
}
/**
* Converts the given Java element to one which is suitable for this
* view. It takes into account wether the view shows working copies or not.
*
* @param element the Java element to be converted
* @return an element suitable for this view
*/
IJavaElement getSuitableJavaElement(Object obj) {
if (!(obj instanceof IJavaElement))
return null;
IJavaElement element= (IJavaElement)obj;
if (fTypeComparator.compare(element, IJavaElement.COMPILATION_UNIT) > 0)
return element;
if (element.getElementType() == IJavaElement.CLASS_FILE)
return element;
if (isInputAWorkingCopy()) {
IJavaElement wc= getWorkingCopy(element);
if (wc != null)
element= wc;
return element;
}
else {
ICompilationUnit cu= getCompilationUnit(element);
if (cu != null && ((IWorkingCopy)cu).isWorkingCopy())
return ((IWorkingCopy)cu).getOriginal(element);
else
return element;
}
}
boolean isInputAWorkingCopy() {
return ((StandardJavaElementContentProvider)getViewer().getContentProvider()).getProvideWorkingCopy();
}
/**
* @see JavaEditor#getElementAt(int)
*/
protected IJavaElement getElementForInputAt(IEditorInput input, int offset) {
if (input instanceof IClassFileEditorInput) {
try {
return ((IClassFileEditorInput)input).getClassFile().getElementAt(offset);
} catch (JavaModelException ex) {
return null;
}
}
IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
ICompilationUnit unit= manager.getWorkingCopy(input);
if (unit != null)
try {
unit.reconcile();
return unit.getElementAt(offset);
} catch (JavaModelException ex) {
}
return null;
}
protected IType getTypeForCU(ICompilationUnit cu) {
cu= (ICompilationUnit)getSuitableJavaElement(cu);
// Use primary type if possible
IType primaryType= cu.findPrimaryType();
if (primaryType != null)
return primaryType;
// Use first top-level type
try {
IType[] types= cu.getTypes();
if (types.length > 0)
return types[0];
else
return null;
} catch (JavaModelException ex) {
return null;
}
}
void setProcessSelectionEvents(boolean state) {
fProcessSelectionEvents= state;
}
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.ui.viewsupport.IViewPartInputProvider#getViewPartInput()
*/
public Object getViewPartInput() {
if (fViewer != null) {
return fViewer.getInput();
}
return null;
}
protected void setActionGroups(CompositeActionGroup actionGroups) {
fActionGroups= actionGroups;
}
protected void setBuildActionGroup(BuildActionGroup actionGroup) {
fBuildActionGroup= actionGroup;
}
protected void setCCPActionGroup(CCPActionGroup actionGroup) {
fCCPActionGroup= actionGroup;
}
protected void setCustomFiltersActionGroup(CustomFiltersActionGroup customFiltersActionGroup) {
fCustomFiltersActionGroup= customFiltersActionGroup;
}
protected void setWorkingSetFilterActionGroup(WorkingSetFilterActionGroup workingSetFilterActionGroup) {
fWorkingSetFilterActionGroup= workingSetFilterActionGroup;
}
protected boolean hasCustomFilter() {
return fHasCustomFilter;
}
protected boolean hasWorkingSetFilter() {
return fHasWorkingSetFilter;
}
protected void setOpenEditorGroup(OpenEditorActionGroup fOpenEditorGroup) {
this.fOpenEditorGroup= fOpenEditorGroup;
}
protected OpenEditorActionGroup getOpenEditorGroup() {
return fOpenEditorGroup;
}
protected BuildActionGroup getBuildActionGroup() {
return fBuildActionGroup;
}
protected CCPActionGroup getCCPActionGroup() {
return fCCPActionGroup;
}
private boolean linkBrowsingViewSelectionToEditor() {
return isLinkingEnabled();
}
public void setLinkingEnabled(boolean enabled) {
fLinkingEnabled= enabled;
PreferenceConstants.getPreferenceStore().setValue(getLinkToEditorKey(), enabled);
if (enabled) {
IEditorPart editor = getSite().getPage().getActiveEditor();
if (editor != null) {
setSelectionFromEditor(editor);
}
}
}
}
|
33,216 |
Bug 33216 Source actions in context menu on types inconsistency
|
1) select a type in the package explorer 2) bring up the context menu ->the source actions are shown in-line and the menu is huge. Given that we show a source submenu in other parts (e.g. the editor) and do the same for the refactoring actions we should also move the source actions into a submenu.
|
resolved fixed
|
0ece750
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T15:38:10Z | 2003-02-26T11:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java
|
package org.eclipse.jdt.internal.ui.javaeditor;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.List;
import java.util.Vector;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.jface.text.Assert;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.BusyIndicator;
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.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Item;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.Widget;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
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.preference.IPreferenceStore;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.ListenerList;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.IBaseLabelProvider;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.LabelProviderChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.actions.ActionContext;
import org.eclipse.ui.actions.ActionGroup;
import org.eclipse.ui.part.IShowInSource;
import org.eclipse.ui.part.IShowInTarget;
import org.eclipse.ui.part.IShowInTargetList;
import org.eclipse.ui.part.ShowInContext;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.ui.internal.model.WorkbenchAdapter;
import org.eclipse.ui.model.IWorkbenchAdapter;
import org.eclipse.ui.part.IPageSite;
import org.eclipse.ui.part.Page;
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
import org.eclipse.ui.texteditor.IUpdate;
import org.eclipse.ui.texteditor.TextEditorAction;
import org.eclipse.ui.texteditor.TextOperationAction;
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
import org.eclipse.jdt.core.ElementChangedEvent;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IElementChangedListener;
import org.eclipse.jdt.core.IInitializer;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaElementDelta;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IParent;
import org.eclipse.jdt.core.ISourceRange;
import org.eclipse.jdt.core.ISourceReference;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.JavaElementSorter;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jdt.ui.PreferenceConstants;
import org.eclipse.jdt.ui.ProblemsLabelDecorator.ProblemsLabelChangedEvent;
import org.eclipse.jdt.ui.actions.CCPActionGroup;
import org.eclipse.jdt.ui.actions.GenerateActionGroup;
import org.eclipse.jdt.ui.actions.JavaSearchActionGroup;
import org.eclipse.jdt.ui.actions.JdtActionConstants;
import org.eclipse.jdt.ui.actions.MemberFilterActionGroup;
import org.eclipse.jdt.ui.actions.OpenViewActionGroup;
import org.eclipse.jdt.ui.actions.RefactorActionGroup;
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.actions.CompositeActionGroup;
import org.eclipse.jdt.internal.ui.dnd.DelegatingDragAdapter;
import org.eclipse.jdt.internal.ui.dnd.DelegatingDropAdapter;
import org.eclipse.jdt.internal.ui.dnd.LocalSelectionTransfer;
import org.eclipse.jdt.internal.ui.dnd.TransferDragSourceListener;
import org.eclipse.jdt.internal.ui.dnd.TransferDropTargetListener;
import org.eclipse.jdt.internal.ui.packageview.SelectionTransferDragAdapter;
import org.eclipse.jdt.internal.ui.packageview.SelectionTransferDropAdapter;
import org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider;
import org.eclipse.jdt.internal.ui.viewsupport.DecoratingJavaLabelProvider;
import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabels;
import org.eclipse.jdt.internal.ui.viewsupport.StatusBarUpdater;
/**
* The content outline page of the Java editor. The viewer implements a proprietary
* update mechanism based on Java model deltas. It does not react on domain changes.
* It is specified to show the content of ICompilationUnits and IClassFiles.
* Pulishes its context menu under <code>JavaPlugin.getDefault().getPluginId() + ".outline"</code>.
*/
public class JavaOutlinePage extends Page implements IContentOutlinePage, IAdaptable {
static Object[] NO_CHILDREN= new Object[0];
/**
* The element change listener of the java outline viewer.
* @see IElementChangedListener
*/
class ElementChangedListener implements IElementChangedListener {
public void elementChanged(final ElementChangedEvent e) {
if (getControl() == null)
return;
Display d= getControl().getDisplay();
if (d != null) {
d.asyncExec(new Runnable() {
public void run() {
ICompilationUnit cu= (ICompilationUnit) fInput;
IJavaElement base= cu;
if (fTopLevelTypeOnly) {
base= getMainType(cu);
if (base == null) {
if (fOutlineViewer != null)
fOutlineViewer.refresh();
return;
}
}
IJavaElementDelta delta= findElement(base, e.getDelta());
if (delta != null && fOutlineViewer != null) {
fOutlineViewer.reconcile(delta);
}
}
});
}
}
protected IJavaElementDelta findElement(IJavaElement unit, IJavaElementDelta delta) {
if (delta == null || unit == null)
return null;
IJavaElement element= delta.getElement();
if (unit.equals(element))
return delta;
if (element.getElementType() > IJavaElement.CLASS_FILE)
return null;
IJavaElementDelta[] children= delta.getAffectedChildren();
if (children == null || children.length == 0)
return null;
for (int i= 0; i < children.length; i++) {
IJavaElementDelta d= findElement(unit, children[i]);
if (d != null)
return d;
}
return null;
}
};
static class NoClassElement extends WorkbenchAdapter implements IAdaptable {
/*
* @see java.lang.Object#toString()
*/
public String toString() {
return JavaEditorMessages.getString("JavaOutlinePage.error.NoTopLevelType"); //$NON-NLS-1$
}
/*
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(Class)
*/
public Object getAdapter(Class clas) {
if (clas == IWorkbenchAdapter.class)
return this;
return null;
}
}
/**
* Content provider for the children of an ICompilationUnit or
* an IClassFile
* @see ITreeContentProvider
*/
class ChildrenProvider implements ITreeContentProvider {
private Object[] NO_CLASS= new Object[] {new NoClassElement()};
private ElementChangedListener fListener;
protected boolean matches(IJavaElement element) {
if (element.getElementType() == IJavaElement.METHOD) {
String name= element.getElementName();
return (name != null && name.indexOf('<') >= 0);
}
return false;
}
protected IJavaElement[] filter(IJavaElement[] children) {
boolean initializers= false;
for (int i= 0; i < children.length; i++) {
if (matches(children[i])) {
initializers= true;
break;
}
}
if (!initializers)
return children;
Vector v= new Vector();
for (int i= 0; i < children.length; i++) {
if (matches(children[i]))
continue;
v.addElement(children[i]);
}
IJavaElement[] result= new IJavaElement[v.size()];
v.copyInto(result);
return result;
}
public Object[] getChildren(Object parent) {
if (parent instanceof IParent) {
IParent c= (IParent) parent;
try {
return filter(c.getChildren());
} catch (JavaModelException x) {
JavaPlugin.log(x);
}
}
return NO_CHILDREN;
}
public Object[] getElements(Object parent) {
if (fTopLevelTypeOnly) {
if (parent instanceof ICompilationUnit) {
try {
IType type= getMainType((ICompilationUnit) parent);
return type != null ? type.getChildren() : NO_CLASS;
} catch (JavaModelException e) {
JavaPlugin.log(e);
}
} else if (parent instanceof IClassFile) {
try {
IType type= getMainType((IClassFile) parent);
return type != null ? type.getChildren() : NO_CLASS;
} catch (JavaModelException e) {
JavaPlugin.log(e);
}
}
}
return getChildren(parent);
}
public Object getParent(Object child) {
if (child instanceof IJavaElement) {
IJavaElement e= (IJavaElement) child;
return e.getParent();
}
return null;
}
public boolean hasChildren(Object parent) {
if (parent instanceof IParent) {
IParent c= (IParent) parent;
try {
IJavaElement[] children= filter(c.getChildren());
return (children != null && children.length > 0);
} catch (JavaModelException x) {
JavaPlugin.log(x);
}
}
return false;
}
public boolean isDeleted(Object o) {
return false;
}
public void dispose() {
if (fListener != null) {
JavaCore.removeElementChangedListener(fListener);
fListener= null;
}
}
/*
* @see IContentProvider#inputChanged(Viewer, Object, Object)
*/
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
boolean isCU= (newInput instanceof ICompilationUnit);
if (isCU && fListener == null) {
fListener= new ElementChangedListener();
JavaCore.addElementChangedListener(fListener);
} else if (!isCU && fListener != null) {
JavaCore.removeElementChangedListener(fListener);
fListener= null;
}
}
};
class JavaOutlineViewer extends TreeViewer {
/**
* Indicates an item which has been reused. At the point of
* its reuse it has been expanded. This field is used to
* communicate between <code>internalExpandToLevel</code> and
* <code>reuseTreeItem</code>.
*/
private Item fReusedExpandedItem;
private boolean fReorderedMembers;
public JavaOutlineViewer(Tree tree) {
super(tree);
setAutoExpandLevel(ALL_LEVELS);
}
/**
* Investigates the given element change event and if affected incrementally
* updates the outline.
*/
public void reconcile(IJavaElementDelta delta) {
fReorderedMembers= false;
if (getSorter() == null) {
if (fTopLevelTypeOnly
&& delta.getElement() instanceof IType
&& (delta.getKind() & IJavaElementDelta.ADDED) != 0)
{
refresh();
} else {
Widget w= findItem(fInput);
if (w != null && !w.isDisposed())
update(w, delta);
if (fReorderedMembers) {
refresh();
fReorderedMembers= false;
}
}
} else {
// just for now
refresh();
}
}
/*
* @see TreeViewer#internalExpandToLevel
*/
protected void internalExpandToLevel(Widget node, int level) {
if (node instanceof Item) {
Item i= (Item) node;
if (i.getData() instanceof IJavaElement) {
IJavaElement je= (IJavaElement) i.getData();
if (je.getElementType() == IJavaElement.IMPORT_CONTAINER || isInnerType(je)) {
if (i != fReusedExpandedItem) {
setExpanded(i, false);
return;
}
}
}
}
super.internalExpandToLevel(node, level);
}
protected void reuseTreeItem(Item item, Object element) {
// remove children
Item[] c= getChildren(item);
if (c != null && c.length > 0) {
if (getExpanded(item))
fReusedExpandedItem= item;
for (int k= 0; k < c.length; k++) {
if (c[k].getData() != null)
disassociate(c[k]);
c[k].dispose();
}
}
updateItem(item, element);
updatePlus(item, element);
internalExpandToLevel(item, ALL_LEVELS);
fReusedExpandedItem= null;
}
protected boolean mustUpdateParent(IJavaElementDelta delta, IJavaElement element) {
if (element instanceof IMethod) {
if ((delta.getKind() & IJavaElementDelta.ADDED) != 0) {
try {
return ((IMethod)element).isMainMethod();
} catch (JavaModelException e) {
JavaPlugin.log(e.getStatus());
}
}
return "main".equals(element.getElementName()); //$NON-NLS-1$
}
return false;
}
protected ISourceRange getSourceRange(IJavaElement element) throws JavaModelException {
if (element instanceof IMember && !(element instanceof IInitializer))
return ((IMember) element).getNameRange();
if (element instanceof ISourceReference)
return ((ISourceReference) element).getSourceRange();
return null;
}
protected boolean overlaps(ISourceRange range, int start, int end) {
return start <= (range.getOffset() + range.getLength() - 1) && range.getOffset() <= end;
}
protected boolean filtered(IJavaElement parent, IJavaElement child) {
Object[] result= new Object[] { child };
ViewerFilter[] filters= getFilters();
for (int i= 0; i < filters.length; i++) {
result= filters[i].filter(this, parent, result);
if (result.length == 0)
return true;
}
return false;
}
protected void update(Widget w, IJavaElementDelta delta) {
Item item;
IJavaElement parent= delta.getElement();
IJavaElementDelta[] affected= delta.getAffectedChildren();
Item[] children= getChildren(w);
boolean doUpdateParent= false;
Vector deletions= new Vector();
Vector additions= new Vector();
for (int i= 0; i < affected.length; i++) {
IJavaElementDelta affectedDelta= affected[i];
IJavaElement affectedElement= affectedDelta.getElement();
int status= affected[i].getKind();
// find tree item with affected element
int j;
for (j= 0; j < children.length; j++)
if (affectedElement.equals(children[j].getData()))
break;
if (j == children.length) {
// addition
if ((status & IJavaElementDelta.CHANGED) != 0 &&
(affectedDelta.getFlags() & IJavaElementDelta.F_MODIFIERS) != 0 &&
!filtered(parent, affectedElement))
{
additions.addElement(affectedDelta);
}
continue;
}
item= children[j];
// removed
if ((status & IJavaElementDelta.REMOVED) != 0) {
deletions.addElement(item);
doUpdateParent= doUpdateParent || mustUpdateParent(affectedDelta, affectedElement);
// changed
} else if ((status & IJavaElementDelta.CHANGED) != 0) {
int change= affectedDelta.getFlags();
doUpdateParent= doUpdateParent || mustUpdateParent(affectedDelta, affectedElement);
if ((change & IJavaElementDelta.F_MODIFIERS) != 0) {
if (filtered(parent, affectedElement))
deletions.addElement(item);
else
updateItem(item, affectedElement);
}
if ((change & IJavaElementDelta.F_CONTENT) != 0)
updateItem(item, affectedElement);
if ((change & IJavaElementDelta.F_CHILDREN) != 0)
update(item, affectedDelta);
if ((change & IJavaElementDelta.F_REORDER) != 0)
fReorderedMembers= true;
}
}
// find all elements to add
IJavaElementDelta[] add= delta.getAddedChildren();
if (additions.size() > 0) {
IJavaElementDelta[] tmp= new IJavaElementDelta[add.length + additions.size()];
System.arraycopy(add, 0, tmp, 0, add.length);
for (int i= 0; i < additions.size(); i++)
tmp[i + add.length]= (IJavaElementDelta) additions.elementAt(i);
add= tmp;
}
// add at the right position
go2: for (int i= 0; i < add.length; i++) {
try {
IJavaElement e= add[i].getElement();
if (filtered(parent, e))
continue go2;
doUpdateParent= doUpdateParent || mustUpdateParent(add[i], e);
ISourceRange rng= getSourceRange(e);
int start= rng.getOffset();
int end= start + rng.getLength() - 1;
Item last= null;
item= null;
children= getChildren(w);
for (int j= 0; j < children.length; j++) {
item= children[j];
IJavaElement r= (IJavaElement) item.getData();
if (r == null) {
// parent node collapsed and not be opened before -> do nothing
continue go2;
}
try {
rng= getSourceRange(r);
if (overlaps(rng, start, end)) {
// be tolerant if the delta is not correct, or if
// the tree has been updated other than by a delta
reuseTreeItem(item, e);
continue go2;
} else if (rng.getOffset() > start) {
if (last != null && deletions.contains(last)) {
// reuse item
deletions.removeElement(last);
reuseTreeItem(last, (Object) e);
} else {
// nothing to reuse
createTreeItem(w, (Object) e, j);
}
continue go2;
}
} catch (JavaModelException x) {
// stumbled over deleted element
}
last= item;
}
// add at the end of the list
if (last != null && deletions.contains(last)) {
// reuse item
deletions.removeElement(last);
reuseTreeItem(last, e);
} else {
// nothing to reuse
createTreeItem(w, e, -1);
}
} catch (JavaModelException x) {
// the element to be added is not present -> don't add it
}
}
// remove items which haven't been reused
Enumeration e= deletions.elements();
while (e.hasMoreElements()) {
item= (Item) e.nextElement();
disassociate(item);
item.dispose();
}
if (doUpdateParent)
updateItem(w, delta.getElement());
}
/*
* @see ContentViewer#handleLabelProviderChanged(LabelProviderChangedEvent)
*/
protected void handleLabelProviderChanged(LabelProviderChangedEvent event) {
Object input= getInput();
if (event instanceof ProblemsLabelChangedEvent) {
ProblemsLabelChangedEvent e= (ProblemsLabelChangedEvent) event;
if (e.isMarkerChange() && input instanceof ICompilationUnit) {
return; // marker changes can be ignored
}
}
// look if the underlying resource changed
Object[] changed= event.getElements();
if (changed != null) {
IResource resource= getUnderlyingResource();
if (resource != null) {
for (int i= 0; i < changed.length; i++) {
if (changed[i] != null && changed[i].equals(resource)) {
// change event to a full refresh
event= new LabelProviderChangedEvent((IBaseLabelProvider) event.getSource());
break;
}
}
}
}
super.handleLabelProviderChanged(event);
}
private IResource getUnderlyingResource() {
Object input= getInput();
if (input instanceof ICompilationUnit) {
ICompilationUnit cu= (ICompilationUnit) input;
if (cu.isWorkingCopy()) {
return cu.getOriginalElement().getResource();
} else {
return cu.getResource();
}
} else if (input instanceof IClassFile) {
return ((IClassFile) input).getResource();
}
return null;
}
};
class LexicalSortingAction extends Action {
private JavaElementSorter fSorter= new JavaElementSorter();
public LexicalSortingAction() {
super();
WorkbenchHelp.setHelp(this, IJavaHelpContextIds.LEXICAL_SORTING_OUTLINE_ACTION);
setText(JavaEditorMessages.getString("JavaOutlinePage.Sort.label")); //$NON-NLS-1$
JavaPluginImages.setLocalImageDescriptors(this, "alphab_sort_co.gif"); //$NON-NLS-1$
setToolTipText(JavaEditorMessages.getString("JavaOutlinePage.Sort.tooltip")); //$NON-NLS-1$
setDescription(JavaEditorMessages.getString("JavaOutlinePage.Sort.description")); //$NON-NLS-1$
boolean checked= JavaPlugin.getDefault().getPreferenceStore().getBoolean("LexicalSortingAction.isChecked"); //$NON-NLS-1$
valueChanged(checked, false);
}
public void run() {
valueChanged(isChecked(), true);
}
private void valueChanged(final boolean on, boolean store) {
setChecked(on);
BusyIndicator.showWhile(fOutlineViewer.getControl().getDisplay(), new Runnable() {
public void run() {
fOutlineViewer.setSorter(on ? fSorter : null); }
});
if (store)
JavaPlugin.getDefault().getPreferenceStore().setValue("LexicalSortingAction.isChecked", on); //$NON-NLS-1$
}
};
class ClassOnlyAction extends Action {
public ClassOnlyAction() {
super();
setText(JavaEditorMessages.getString("JavaOutlinePage.GoIntoTopLevelType.label")); //$NON-NLS-1$
setToolTipText(JavaEditorMessages.getString("JavaOutlinePage.GoIntoTopLevelType.tooltip")); //$NON-NLS-1$
setDescription(JavaEditorMessages.getString("JavaOutlinePage.GoIntoTopLevelType.description")); //$NON-NLS-1$
JavaPluginImages.setLocalImageDescriptors(this, "gointo_toplevel_type.gif"); //$NON-NLS-1$
IPreferenceStore preferenceStore= JavaPlugin.getDefault().getPreferenceStore();
boolean showclass= preferenceStore.getBoolean("GoIntoTopLevelTypeAction.isChecked"); //$NON-NLS-1$
setTopLevelTypeOnly(showclass);
}
/*
* @see org.eclipse.jface.action.Action#run()
*/
public void run() {
setTopLevelTypeOnly(!fTopLevelTypeOnly);
}
private void setTopLevelTypeOnly(boolean show) {
fTopLevelTypeOnly= show;
setChecked(show);
fOutlineViewer.refresh();
IPreferenceStore preferenceStore= JavaPlugin.getDefault().getPreferenceStore();
preferenceStore.setValue("GoIntoTopLevelTypeAction.isChecked", show); //$NON-NLS-1$
}
};
/** A flag to show contents of top level type only */
private boolean fTopLevelTypeOnly;
private IJavaElement fInput;
private String fContextMenuID;
private Menu fMenu;
private JavaOutlineViewer fOutlineViewer;
private JavaEditor fEditor;
private MemberFilterActionGroup fMemberFilterActionGroup;
private ListenerList fSelectionChangedListeners= new ListenerList();
private Hashtable fActions= new Hashtable();
private TogglePresentationAction fTogglePresentation;
private GotoErrorAction fPreviousError;
private GotoErrorAction fNextError;
private TextEditorAction fShowJavadoc;
private TextOperationAction fUndo;
private TextOperationAction fRedo;
private CompositeActionGroup fActionGroups;
private CCPActionGroup fCCPActionGroup;
private IPropertyChangeListener fPropertyChangeListener;
public JavaOutlinePage(String contextMenuID, JavaEditor editor) {
super();
Assert.isNotNull(editor);
fContextMenuID= contextMenuID;
fEditor= editor;
fTogglePresentation= new TogglePresentationAction();
fPreviousError= new GotoErrorAction("PreviousError.", false); //$NON-NLS-1$
fPreviousError.setImageDescriptor(JavaPluginImages.DESC_TOOL_GOTO_PREV_ERROR);
fNextError= new GotoErrorAction("NextError.", true); //$NON-NLS-1$
fNextError.setImageDescriptor(JavaPluginImages.DESC_TOOL_GOTO_NEXT_ERROR);
fShowJavadoc= (TextEditorAction) fEditor.getAction("ShowJavaDoc"); //$NON-NLS-1$
fUndo= (TextOperationAction) fEditor.getAction(ITextEditorActionConstants.UNDO);
fRedo= (TextOperationAction) fEditor.getAction(ITextEditorActionConstants.REDO);
fTogglePresentation.setEditor(editor);
fPreviousError.setEditor(editor);
fNextError.setEditor(editor);
fPropertyChangeListener= new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
doPropertyChange(event);
}
};
JavaPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(fPropertyChangeListener);
}
/**
* Returns the primary type of a compilation unit (has the same
* name as the compilation unit).
*
* @param compilationUnit the compilation unit
* @return returns the primary type of the compilation unit, or
* <code>null</code> if is does not have one
*/
protected IType getMainType(ICompilationUnit compilationUnit) {
String name= compilationUnit.getElementName();
int index= name.indexOf('.');
if (index != -1)
name= name.substring(0, index);
IType type= compilationUnit.getType(name);
return type.exists() ? type : null;
}
/**
* Returns the primary type of a class file.
*
* @param classFile the class file
* @return returns the primary type of the class file, or <code>null</code>
* if is does not have one
*/
protected IType getMainType(IClassFile classFile) {
try {
IType type= classFile.getType();
return type.exists() ? type : null;
} catch (JavaModelException e) {
return null;
}
}
/* (non-Javadoc)
* Method declared on Page
*/
public void init(IPageSite pageSite) {
super.init(pageSite);
}
private void doPropertyChange(PropertyChangeEvent event) {
if (fOutlineViewer != null) {
if (PreferenceConstants.APPEARANCE_MEMBER_SORT_ORDER.equals(event.getProperty())) {
fOutlineViewer.refresh();
}
}
}
/*
* @see ISelectionProvider#addSelectionChangedListener(ISelectionChangedListener)
*/
public void addSelectionChangedListener(ISelectionChangedListener listener) {
if (fOutlineViewer != null)
fOutlineViewer.addPostSelectionChangedListener(listener);
else
fSelectionChangedListeners.add(listener);
}
/*
* @see ISelectionProvider#removeSelectionChangedListener(ISelectionChangedListener)
*/
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
if (fOutlineViewer != null)
fOutlineViewer.removePostSelectionChangedListener(listener);
else
fSelectionChangedListeners.remove(listener);
}
/*
* @see ISelectionProvider#setSelection(ISelection)
*/
public void setSelection(ISelection selection) {
if (fOutlineViewer != null)
fOutlineViewer.setSelection(selection);
}
/*
* @see ISelectionProvider#getSelection()
*/
public ISelection getSelection() {
if (fOutlineViewer == null)
return StructuredSelection.EMPTY;
return fOutlineViewer.getSelection();
}
private void registerToolbarActions() {
IToolBarManager toolBarManager= getSite().getActionBars().getToolBarManager();
if (toolBarManager != null) {
toolBarManager.add(new ClassOnlyAction());
toolBarManager.add(new LexicalSortingAction());
fMemberFilterActionGroup= new MemberFilterActionGroup(fOutlineViewer, "JavaOutlineViewer"); //$NON-NLS-1$
fMemberFilterActionGroup.contributeToToolBar(toolBarManager);
}
}
/*
* @see IPage#createControl
*/
public void createControl(Composite parent) {
Tree tree= new Tree(parent, SWT.MULTI);
AppearanceAwareLabelProvider lprovider= new AppearanceAwareLabelProvider(
AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS | JavaElementLabels.F_APP_TYPE_SIGNATURE,
AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS
);
fOutlineViewer= new JavaOutlineViewer(tree);
fOutlineViewer.setContentProvider(new ChildrenProvider());
fOutlineViewer.setLabelProvider(new DecoratingJavaLabelProvider(lprovider));
Object[] listeners= fSelectionChangedListeners.getListeners();
for (int i= 0; i < listeners.length; i++) {
fSelectionChangedListeners.remove(listeners[i]);
fOutlineViewer.addPostSelectionChangedListener((ISelectionChangedListener) listeners[i]);
}
MenuManager manager= new MenuManager(fContextMenuID, fContextMenuID);
manager.setRemoveAllWhenShown(true);
manager.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager manager) {
contextMenuAboutToShow(manager);
}
});
fMenu= manager.createContextMenu(tree);
tree.setMenu(fMenu);
IPageSite site= getSite();
site.registerContextMenu(JavaPlugin.getPluginId() + ".outline", manager, fOutlineViewer); //$NON-NLS-1$
site.setSelectionProvider(fOutlineViewer);
// we must create the groups after we have set the selection provider to the site
fActionGroups= new CompositeActionGroup(new ActionGroup[] {
new OpenViewActionGroup(this),
fCCPActionGroup= new CCPActionGroup(this),
new RefactorActionGroup(this),
new GenerateActionGroup(this),
new JavaSearchActionGroup(this)});
// register global actions
IActionBars bars= site.getActionBars();
bars.setGlobalActionHandler(ITextEditorActionConstants.UNDO, fUndo);
bars.setGlobalActionHandler(ITextEditorActionConstants.REDO, fRedo);
bars.setGlobalActionHandler(ITextEditorActionConstants.PREVIOUS, fPreviousError);
bars.setGlobalActionHandler(ITextEditorActionConstants.NEXT, fNextError);
bars.setGlobalActionHandler(JdtActionConstants.SHOW_JAVA_DOC, fShowJavadoc);
bars.setGlobalActionHandler(IJavaEditorActionConstants.TOGGLE_PRESENTATION, fTogglePresentation);
// http://dev.eclipse.org/bugs/show_bug.cgi?id=18968
bars.setGlobalActionHandler(IJavaEditorActionConstants.PREVIOUS_ERROR, fPreviousError);
bars.setGlobalActionHandler(IJavaEditorActionConstants.NEXT_ERROR, fNextError);
fActionGroups.fillActionBars(bars);
IStatusLineManager statusLineManager= site.getActionBars().getStatusLineManager();
if (statusLineManager != null) {
StatusBarUpdater updater= new StatusBarUpdater(statusLineManager);
fOutlineViewer.addPostSelectionChangedListener(updater);
}
registerToolbarActions();
fOutlineViewer.setInput(fInput);
fOutlineViewer.getControl().addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent e) {
handleKeyReleased(e);
}
});
initDragAndDrop();
}
public void dispose() {
if (fEditor == null)
return;
if (fMemberFilterActionGroup != null) {
fMemberFilterActionGroup.dispose();
fMemberFilterActionGroup= null;
}
fEditor.outlinePageClosed();
fEditor= null;
fSelectionChangedListeners.clear();
fSelectionChangedListeners= null;
if (fPropertyChangeListener != null) {
JavaPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(fPropertyChangeListener);
fPropertyChangeListener= null;
}
if (fMenu != null && !fMenu.isDisposed()) {
fMenu.dispose();
fMenu= null;
}
if (fActionGroups != null)
fActionGroups.dispose();
fTogglePresentation.setEditor(null);
fPreviousError.setEditor(null);
fNextError.setEditor(null);
fOutlineViewer= null;
super.dispose();
}
public Control getControl() {
if (fOutlineViewer != null)
return fOutlineViewer.getControl();
return null;
}
public void setInput(IJavaElement inputElement) {
fInput= inputElement;
if (fOutlineViewer != null)
fOutlineViewer.setInput(fInput);
}
public void select(ISourceReference reference) {
if (fOutlineViewer != null) {
ISelection s= fOutlineViewer.getSelection();
if (s instanceof IStructuredSelection) {
IStructuredSelection ss= (IStructuredSelection) s;
List elements= ss.toList();
if (!elements.contains(reference)) {
s= (reference == null ? StructuredSelection.EMPTY : new StructuredSelection(reference));
fOutlineViewer.setSelection(s, true);
}
}
}
}
public void setAction(String actionID, IAction action) {
Assert.isNotNull(actionID);
if (action == null)
fActions.remove(actionID);
else
fActions.put(actionID, action);
}
public IAction getAction(String actionID) {
Assert.isNotNull(actionID);
return (IAction) fActions.get(actionID);
}
/**
* Answer the property defined by key.
*/
public Object getAdapter(Class key) {
if (key == IShowInSource.class) {
return getShowInSource();
}
if (key == IShowInTargetList.class) {
return new IShowInTargetList() {
public String[] getShowInTargetIds() {
return new String[] { JavaUI.ID_PACKAGES };
}
};
}
if (key == IShowInTarget.class) {
return getShowInTarget();
}
return null;
}
/**
* Convenience method to add the action installed under the given actionID to the
* specified group of the menu.
*/
protected void addAction(IMenuManager menu, String group, String actionID) {
IAction action= getAction(actionID);
if (action != null) {
if (action instanceof IUpdate)
((IUpdate) action).update();
if (action.isEnabled()) {
IMenuManager subMenu= menu.findMenuUsingPath(group);
if (subMenu != null)
subMenu.add(action);
else
menu.appendToGroup(group, action);
}
}
}
protected void contextMenuAboutToShow(IMenuManager menu) {
JavaPlugin.createStandardGroups(menu);
IStructuredSelection selection= (IStructuredSelection)getSelection();
fActionGroups.setContext(new ActionContext(selection));
fActionGroups.fillContextMenu(menu);
}
/*
* @see Page#setFocus()
*/
public void setFocus() {
if (fOutlineViewer != null)
fOutlineViewer.getControl().setFocus();
}
/**
* Checkes whether a given Java element is an inner type.
*/
private boolean isInnerType(IJavaElement element) {
if (element.getElementType() == IJavaElement.TYPE) {
IJavaElement parent= element.getParent();
int type= parent.getElementType();
return (type != IJavaElement.COMPILATION_UNIT && type != IJavaElement.CLASS_FILE);
}
return false;
}
/**
* Handles key events in viewer.
*/
private void handleKeyReleased(KeyEvent event) {
if (event.stateMask != 0)
return;
IAction action= null;
if (event.character == SWT.DEL) {
action= fCCPActionGroup.getDeleteAction();
}
if (action != null && action.isEnabled())
action.run();
}
/**
* Returns the <code>IShowInSource</code> for this view.
*/
protected IShowInSource getShowInSource() {
return new IShowInSource() {
public ShowInContext getShowInContext() {
return new ShowInContext(
null,
getSite().getSelectionProvider().getSelection());
}
};
}
/**
* Returns the <code>IShowInTarget</code> for this view.
*/
protected IShowInTarget getShowInTarget() {
return new IShowInTarget() {
public boolean show(ShowInContext context) {
ISelection sel= context.getSelection();
if (sel instanceof ITextSelection) {
ITextSelection tsel= (ITextSelection) sel;
int offset= tsel.getOffset();
IJavaElement element= fEditor.getElementAt(offset);
if (element != null) {
setSelection(new StructuredSelection(element));
return true;
}
}
return false;
}
};
}
private void initDragAndDrop() {
int ops= DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
Transfer[] transfers= new Transfer[] {
LocalSelectionTransfer.getInstance()
};
// Drop Adapter
TransferDropTargetListener[] dropListeners= new TransferDropTargetListener[] {
new SelectionTransferDropAdapter(fOutlineViewer)
};
fOutlineViewer.addDropSupport(ops | DND.DROP_DEFAULT, transfers, new DelegatingDropAdapter(dropListeners));
// Drag Adapter
Control control= fOutlineViewer.getControl();
TransferDragSourceListener[] dragListeners= new TransferDragSourceListener[] {
new SelectionTransferDragAdapter(fOutlineViewer)
};
DragSource source= new DragSource(control, ops);
// Note, that the transfer agents are set by the delegating drag adapter itself.
source.addDragListener(new DelegatingDragAdapter(dragListeners));
}
}
|
33,216 |
Bug 33216 Source actions in context menu on types inconsistency
|
1) select a type in the package explorer 2) bring up the context menu ->the source actions are shown in-line and the menu is huge. Given that we show a source submenu in other parts (e.g. the editor) and do the same for the refactoring actions we should also move the source actions into a submenu.
|
resolved fixed
|
0ece750
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T15:38:10Z | 2003-02-26T11:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerActionGroup.java
|
/*******************************************************************************
* Copyright (c) 2002 International Business Machines Corp. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v0.5
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v05.html
*
* Contributors:
* IBM Corporation - initial API and implementation
******************************************************************************/
package org.eclipse.jdt.internal.ui.packageview;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IResource;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IOpenable;
import org.eclipse.jdt.internal.ui.actions.CompositeActionGroup;
import org.eclipse.jdt.internal.ui.actions.NewWizardsActionGroup;
import org.eclipse.jdt.internal.ui.workingsets.WorkingSetFilterActionGroup;
import org.eclipse.jdt.ui.IContextMenuConstants;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jdt.ui.PreferenceConstants;
import org.eclipse.jdt.ui.actions.BuildActionGroup;
import org.eclipse.jdt.ui.actions.CCPActionGroup;
import org.eclipse.jdt.ui.actions.CustomFiltersActionGroup;
import org.eclipse.jdt.ui.actions.GenerateActionGroup;
import org.eclipse.jdt.ui.actions.ImportActionGroup;
import org.eclipse.jdt.ui.actions.JavaSearchActionGroup;
import org.eclipse.jdt.ui.actions.JdtActionConstants;
import org.eclipse.jdt.ui.actions.MemberFilterActionGroup;
import org.eclipse.jdt.ui.actions.NavigateActionGroup;
import org.eclipse.jdt.ui.actions.ProjectActionGroup;
import org.eclipse.jdt.ui.actions.RefactorActionGroup;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.OpenStrategy;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.OpenEvent;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.IWorkingSet;
import org.eclipse.ui.IWorkingSetManager;
import org.eclipse.ui.actions.ActionGroup;
import org.eclipse.ui.actions.MoveResourceAction;
import org.eclipse.ui.actions.OpenInNewWindowAction;
import org.eclipse.ui.actions.RenameResourceAction;
import org.eclipse.ui.views.framelist.BackAction;
import org.eclipse.ui.views.framelist.ForwardAction;
import org.eclipse.ui.views.framelist.FrameList;
import org.eclipse.ui.views.framelist.GoIntoAction;
import org.eclipse.ui.views.framelist.UpAction;
class PackageExplorerActionGroup extends CompositeActionGroup implements ISelectionChangedListener {
private PackageExplorerPart fPart;
private GoIntoAction fZoomInAction;
private BackAction fBackAction;
private ForwardAction fForwardAction;
private UpAction fUpAction;
private GotoTypeAction fGotoTypeAction;
private GotoPackageAction fGotoPackageAction;
private GotoResourceAction fGotoResourceAction;
private CollapseAllAction fCollapseAllAction;
private RenameResourceAction fRenameResourceAction;
private MoveResourceAction fMoveResourceAction;
private ToggleLinkingAction fToggleLinkingAction;
private NavigateActionGroup fNavigateActionGroup;
private BuildActionGroup fBuildActionGroup;
private CCPActionGroup fCCPActionGroup;
private WorkingSetFilterActionGroup fWorkingSetFilterActionGroup;
private MemberFilterActionGroup fMemberFilterActionGroup;
private CustomFiltersActionGroup fCustomFiltersActionGroup;
private int fLastElement;
private static final int INIT= 0;
private static final int RESOURCE= 1;
private static final int REST= 2;
public PackageExplorerActionGroup(PackageExplorerPart part) {
super();
fPart= part;
IWorkbenchPartSite site = fPart.getSite();
Shell shell= site.getShell();
ISelectionProvider provider= site.getSelectionProvider();
IStructuredSelection selection= (IStructuredSelection) provider.getSelection();
setGroups(new ActionGroup[] {
new NewWizardsActionGroup(site),
fNavigateActionGroup= new NavigateActionGroup(fPart),
fCCPActionGroup= new CCPActionGroup(fPart),
new RefactorActionGroup(fPart),
new ImportActionGroup(fPart),
new GenerateActionGroup(fPart),
fBuildActionGroup= new BuildActionGroup(fPart),
new JavaSearchActionGroup(fPart),
new ProjectActionGroup(fPart),
fWorkingSetFilterActionGroup= new WorkingSetFilterActionGroup(part.getViewer(), JavaUI.ID_PACKAGES, shell, createTitleUpdater()),
fCustomFiltersActionGroup= new CustomFiltersActionGroup(fPart, fPart.getViewer()),
new LayoutActionGroup(part)});
PackagesFrameSource frameSource= new PackagesFrameSource(fPart);
FrameList frameList= new FrameList(frameSource);
frameSource.connectTo(frameList);
fZoomInAction= new GoIntoAction(frameList);
fBackAction= new BackAction(frameList);
fForwardAction= new ForwardAction(frameList);
fUpAction= new UpAction(frameList);
fRenameResourceAction= new RenameResourceAction(shell);
fMoveResourceAction= new MoveResourceAction(shell);
fGotoTypeAction= new GotoTypeAction(fPart);
fGotoPackageAction= new GotoPackageAction(fPart);
fGotoResourceAction= new GotoResourceAction(fPart);
fCollapseAllAction= new CollapseAllAction(fPart);
fToggleLinkingAction = new ToggleLinkingAction(fPart);
fMemberFilterActionGroup= new MemberFilterActionGroup(fPart.getViewer(), "PackageView", true); //$NON-NLS-1$
provider.addSelectionChangedListener(this);
update(selection);
fLastElement= INIT;
}
public void dispose() {
if (fMemberFilterActionGroup != null) {
fMemberFilterActionGroup.dispose();
fMemberFilterActionGroup= null;
}
ISelectionProvider provider= fPart.getSite().getSelectionProvider();
provider.removeSelectionChangedListener(this);
super.dispose();
}
//---- Selection changed listener ---------------------------------------------------------
public void selectionChanged(SelectionChangedEvent event) {
fRenameResourceAction.selectionChanged(event);
fMoveResourceAction.selectionChanged(event);
IStructuredSelection selection= (IStructuredSelection)event.getSelection();
update(selection);
}
private void update(IStructuredSelection selection) {
int size= selection.size();
Object element= selection.getFirstElement();
IActionBars actionBars= fPart.getViewSite().getActionBars();
if (size == 1 && element instanceof IResource) {
if (fLastElement != RESOURCE) { // fLastAction in a work around for http://bugs.eclipse.org/bugs/show_bug.cgi?id=30508
actionBars.setGlobalActionHandler(IWorkbenchActionConstants.RENAME, fRenameResourceAction);
actionBars.setGlobalActionHandler(IWorkbenchActionConstants.MOVE, fMoveResourceAction);
actionBars.updateActionBars();
fLastElement= RESOURCE;
}
} else {
if (fLastElement != REST) {
actionBars.setGlobalActionHandler(IWorkbenchActionConstants.RENAME, null);
actionBars.setGlobalActionHandler(IWorkbenchActionConstants.MOVE, null);
actionBars.updateActionBars();
fLastElement= REST;
}
}
}
//---- Persistent state -----------------------------------------------------------------------
/* package */ void restoreFilterAndSorterState(IMemento memento) {
fMemberFilterActionGroup.restoreState(memento);
fWorkingSetFilterActionGroup.restoreState(memento);
fCustomFiltersActionGroup.restoreState(memento);
}
/* package */ void saveFilterAndSorterState(IMemento memento) {
fMemberFilterActionGroup.saveState(memento);
fWorkingSetFilterActionGroup.saveState(memento);
fCustomFiltersActionGroup.saveState(memento);
}
//---- Action Bars ----------------------------------------------------------------------------
public void fillActionBars(IActionBars actionBars) {
super.fillActionBars(actionBars);
setGlobalActionHandlers(actionBars);
fillToolBar(actionBars.getToolBarManager());
fillViewMenu(actionBars.getMenuManager());
}
/* package */ void updateActionBars(IActionBars actionBars) {
actionBars.getToolBarManager().removeAll();
actionBars.getMenuManager().removeAll();
fillActionBars(actionBars);
actionBars.updateActionBars();
}
private void setGlobalActionHandlers(IActionBars actionBars) {
// Navigate Go Into and Go To actions.
actionBars.setGlobalActionHandler(IWorkbenchActionConstants.GO_INTO, fZoomInAction);
actionBars.setGlobalActionHandler(IWorkbenchActionConstants.BACK, fBackAction);
actionBars.setGlobalActionHandler(IWorkbenchActionConstants.FORWARD, fForwardAction);
actionBars.setGlobalActionHandler(IWorkbenchActionConstants.UP, fUpAction);
actionBars.setGlobalActionHandler(IWorkbenchActionConstants.GO_TO_RESOURCE, fGotoResourceAction);
actionBars.setGlobalActionHandler(JdtActionConstants.GOTO_TYPE, fGotoTypeAction);
actionBars.setGlobalActionHandler(JdtActionConstants.GOTO_PACKAGE, fGotoPackageAction);
}
/* package */ void fillToolBar(IToolBarManager toolBar) {
toolBar.add(fBackAction);
toolBar.add(fForwardAction);
toolBar.add(fUpAction);
toolBar.add(new Separator());
toolBar.add(fCollapseAllAction);
toolBar.add(fToggleLinkingAction);
}
/* package */ void fillViewMenu(IMenuManager menu) {
if (showCompilationUnitChildren()) {
fMemberFilterActionGroup.contributeToViewMenu(menu);
}
menu.add(fToggleLinkingAction);
menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS+"-end"));//$NON-NLS-1$
}
/* package */ void handleSelectionChanged(SelectionChangedEvent event) {
fZoomInAction.update();
}
//---- Context menu -------------------------------------------------------------------------
public void fillContextMenu(IMenuManager menu) {
IStructuredSelection selection= (IStructuredSelection)getContext().getSelection();
int size= selection.size();
Object element= selection.getFirstElement();
addGotoMenu(menu, element, size);
addOpenNewWindowAction(menu, element);
super.fillContextMenu(menu);
}
private void addGotoMenu(IMenuManager menu, Object element, int size) {
if (size == 1 && fPart.getViewer().isExpandable(element) && (isGoIntoTarget(element) || element instanceof IContainer))
menu.appendToGroup(IContextMenuConstants.GROUP_GOTO, fZoomInAction);
}
private boolean isGoIntoTarget(Object element) {
if (element == null)
return false;
if (element instanceof IJavaElement) {
int type= ((IJavaElement)element).getElementType();
return type == IJavaElement.JAVA_PROJECT ||
type == IJavaElement.PACKAGE_FRAGMENT_ROOT ||
type == IJavaElement.PACKAGE_FRAGMENT;
}
return false;
}
private void addOpenNewWindowAction(IMenuManager menu, Object element) {
if (element instanceof IJavaElement) {
element= ((IJavaElement)element).getResource();
}
if (!(element instanceof IContainer))
return;
menu.appendToGroup(
IContextMenuConstants.GROUP_OPEN,
new OpenInNewWindowAction(fPart.getSite().getWorkbenchWindow(), (IContainer)element));
}
//---- Key board and mouse handling ------------------------------------------------------------
/* package*/ void handleDoubleClick(DoubleClickEvent event) {
TreeViewer viewer= fPart.getViewer();
Object element= ((IStructuredSelection)event.getSelection()).getFirstElement();
if (viewer.isExpandable(element)) {
if (doubleClickGoesInto()) {
// don't zoom into compilation units and class files
if (element instanceof IOpenable &&
!(element instanceof ICompilationUnit) &&
!(element instanceof IClassFile)) {
fZoomInAction.run();
}
} else {
IAction openAction= fNavigateActionGroup.getOpenAction();
if (openAction != null && openAction.isEnabled() && OpenStrategy.getOpenMethod() == OpenStrategy.DOUBLE_CLICK)
return;
viewer.setExpandedState(element, !viewer.getExpandedState(element));
}
}
}
/* package */ void handleOpen(OpenEvent event) {
IAction openAction= fNavigateActionGroup.getOpenAction();
if (openAction != null && openAction.isEnabled()) {
openAction.run();
return;
}
}
/* package */ void handleKeyEvent(KeyEvent event) {
if (event.stateMask != 0)
return;
if (event.keyCode == SWT.F5) {
IAction refreshAction= fBuildActionGroup.getRefreshAction();
if (refreshAction != null && refreshAction.isEnabled())
refreshAction.run();
} else if (event.character == SWT.DEL) {
IAction delete= fCCPActionGroup.getDeleteAction();
if (delete != null && delete.isEnabled())
delete.run();
}
else if (event.keyCode == SWT.BS) {
if (fUpAction != null && fUpAction.isEnabled())
fUpAction.run();
}
}
private IPropertyChangeListener createTitleUpdater() {
return new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
String property= event.getProperty();
if (IWorkingSetManager.CHANGE_WORKING_SET_NAME_CHANGE.equals(property)) {
IWorkingSet workingSet= (IWorkingSet)event.getNewValue();
String workingSetName= null;
if (workingSet != null)
workingSetName= workingSet.getName();
fPart.setWorkingSetName(workingSetName);
fPart.updateTitle();
}
}
};
}
private boolean showCompilationUnitChildren() {
return PreferenceConstants.getPreferenceStore().getBoolean(PreferenceConstants.SHOW_CU_CHILDREN);
}
private boolean doubleClickGoesInto() {
return PreferenceConstants.DOUBLE_CLICK_GOES_INTO.equals(PreferenceConstants.getPreferenceStore().getString(PreferenceConstants.DOUBLE_CLICK));
}
}
|
33,216 |
Bug 33216 Source actions in context menu on types inconsistency
|
1) select a type in the package explorer 2) bring up the context menu ->the source actions are shown in-line and the menu is huge. Given that we show a source submenu in other parts (e.g. the editor) and do the same for the refactoring actions we should also move the source actions into a submenu.
|
resolved fixed
|
0ece750
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T15:38:10Z | 2003-02-26T11:46:40Z |
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.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
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.DropTarget;
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;
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.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.AbstractTreeViewer;
import org.eclipse.jface.viewers.IBasicPropertyConstants;
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.StructuredViewer;
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.IPageLayout;
import org.eclipse.ui.IPartListener2;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartReference;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.actions.ActionContext;
import org.eclipse.ui.actions.ActionGroup;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.ui.part.IShowInSource;
import org.eclipse.ui.part.IShowInTargetList;
import org.eclipse.ui.part.PageBook;
import org.eclipse.ui.part.ShowInContext;
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.ITypeHierarchy;
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.ui.JavaUI;
import org.eclipse.jdt.ui.PreferenceConstants;
import org.eclipse.jdt.ui.actions.CCPActionGroup;
import org.eclipse.jdt.ui.actions.GenerateActionGroup;
import org.eclipse.jdt.ui.actions.JavaSearchActionGroup;
import org.eclipse.jdt.ui.actions.OpenEditorActionGroup;
import org.eclipse.jdt.ui.actions.OpenViewActionGroup;
import org.eclipse.jdt.ui.actions.RefactorActionGroup;
import org.eclipse.jdt.internal.corext.util.AllTypesCache;
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
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.CompositeActionGroup;
import org.eclipse.jdt.internal.ui.actions.NewWizardsActionGroup;
import org.eclipse.jdt.internal.ui.actions.SelectAllAction;
import org.eclipse.jdt.internal.ui.dnd.DelegatingDragAdapter;
import org.eclipse.jdt.internal.ui.dnd.DelegatingDropAdapter;
import org.eclipse.jdt.internal.ui.dnd.LocalSelectionTransfer;
import org.eclipse.jdt.internal.ui.dnd.TransferDragSourceListener;
import org.eclipse.jdt.internal.ui.dnd.TransferDropTargetListener;
import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
import org.eclipse.jdt.internal.ui.packageview.SelectionTransferDragAdapter;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
import org.eclipse.jdt.internal.ui.viewsupport.IViewPartInputProvider;
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, IViewPartInputProvider {
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"; //$NON-NLS-1$
private static final String DIALOGSTORE_VIEWORIENTATION= "TypeHierarchyViewPart.orientation"; //$NON-NLS-1$
private static final String TAG_INPUT= "input"; //$NON-NLS-1$
private static final String TAG_VIEW= "view"; //$NON-NLS-1$
private static final String TAG_ORIENTATION= "orientation"; //$NON-NLS-1$
private static final String TAG_RATIO= "ratio"; //$NON-NLS-1$
private static final String TAG_SELECTION= "selection"; //$NON-NLS-1$
private static final String TAG_VERTICAL_SCROLL= "vertical_scroll"; //$NON-NLS-1$
private static final String GROUP_FOCUS= "group.focus"; //$NON-NLS-1$
// the selected type in the hierarchy view
private IType fSelectedType;
// input element or null
private IJavaElement fInputElement;
// history of input elements. No duplicates
private ArrayList fInputHistory;
private IMemento fMemento;
private IDialogSettings fDialogSettings;
private TypeHierarchyLifeCycle fHierarchyLifeCycle;
private ITypeHierarchyLifeCycleListener fTypeHierarchyLifeCycleListener;
private IPropertyChangeListener fPropertyChangeListener;
private SelectionProviderMediator fSelectionProviderMediator;
private ISelectionChangedListener fSelectionChangedListener;
private IPartListener2 fPartListener;
private int fCurrentOrientation;
private boolean fLinkingEnabled;
private boolean fIsVisible;
private boolean fNeedRefresh;
private boolean fIsEnableMemberFilter;
private int fCurrentViewerIndex;
private TypeHierarchyViewer[] fAllViewers;
private MethodsViewer fMethodsViewer;
private SashForm fTypeMethodsSplitter;
private PageBook fViewerbook;
private PageBook fPagebook;
private Label fNoHierarchyShownLabel;
private Label fEmptyTypesViewer;
private ViewForm fTypeViewerViewForm;
private ViewForm fMethodViewerViewForm;
private CLabel fMethodViewerPaneLabel;
private JavaUILabelProvider fPaneLabelProvider;
private ToggleViewAction[] fViewActions;
private ToggleLinkingAction fToggleLinkingAction;
private HistoryDropDownAction fHistoryDropDownAction;
private ToggleOrientationAction[] fToggleOrientationActions;
private EnableMemberFilterAction fEnableMemberFilterAction;
private ShowQualifiedTypeNamesAction fShowQualifiedTypeNamesAction;
private AddMethodStubAction fAddStubAction;
private FocusOnTypeAction fFocusOnTypeAction;
private FocusOnSelectionAction fFocusOnSelectionAction;
private CompositeActionGroup fActionGroups;
private CCPActionGroup fCCPActionGroup;
private SelectAllAction fSelectAllAction;
public TypeHierarchyViewPart() {
fSelectedType= null;
fInputElement= null;
boolean isReconciled= PreferenceConstants.UPDATE_WHILE_EDITING.equals(PreferenceConstants.getPreferenceStore().getString(PreferenceConstants.UPDATE_JAVA_VIEWS));
fHierarchyLifeCycle= new TypeHierarchyLifeCycle();
fHierarchyLifeCycle.setReconciled(isReconciled);
fTypeHierarchyLifeCycleListener= new ITypeHierarchyLifeCycleListener() {
public void typeHierarchyChanged(TypeHierarchyLifeCycle typeHierarchy, IType[] changedTypes) {
doTypeHierarchyChanged(typeHierarchy, changedTypes);
}
};
fHierarchyLifeCycle.addChangedListener(fTypeHierarchyLifeCycleListener);
fPropertyChangeListener= new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
doPropertyChange(event);
}
};
PreferenceConstants.getPreferenceStore().addPropertyChangeListener(fPropertyChangeListener);
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);
fShowQualifiedTypeNamesAction= new ShowQualifiedTypeNamesAction(this, false);
fFocusOnTypeAction= new FocusOnTypeAction(this);
fPaneLabelProvider= new JavaUILabelProvider();
fAddStubAction= new AddMethodStubAction();
fFocusOnSelectionAction= new FocusOnSelectionAction(this);
fPartListener= new IPartListener2() {
public void partVisible(IWorkbenchPartReference ref) {
IWorkbenchPart part= ref.getPart(false);
if (part == TypeHierarchyViewPart.this) {
visibilityChanged(true);
}
}
public void partHidden(IWorkbenchPartReference ref) {
IWorkbenchPart part= ref.getPart(false);
if (part == TypeHierarchyViewPart.this) {
visibilityChanged(false);
}
}
public void partActivated(IWorkbenchPartReference ref) {
IWorkbenchPart part= ref.getPart(false);
if (part instanceof IEditorPart)
editorActivated((IEditorPart) part);
}
public void partInputChanged(IWorkbenchPartReference ref) {
IWorkbenchPart part= ref.getPart(false);
if (part instanceof IEditorPart)
editorActivated((IEditorPart) part);
};
public void partBroughtToTop(IWorkbenchPartReference ref) {}
public void partClosed(IWorkbenchPartReference ref) {}
public void partDeactivated(IWorkbenchPartReference ref) {}
public void partOpened(IWorkbenchPartReference ref) {}
};
fSelectionChangedListener= new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
doSelectionChanged(event);
}
};
fLinkingEnabled= PreferenceConstants.getPreferenceStore().getBoolean(PreferenceConstants.LINK_TYPEHIERARCHY_TO_EDITOR);
}
/**
* Method doPropertyChange.
* @param event
*/
protected void doPropertyChange(PropertyChangeEvent event) {
if (fMethodsViewer != null) {
if (PreferenceConstants.APPEARANCE_MEMBER_SORT_ORDER.equals(event.getProperty())) {
fMethodsViewer.refresh();
}
}
}
/**
* 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);
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()]);
}
/**
* 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) {
if (member.getElementType() != IJavaElement.TYPE) {
// methods are working copies
if (fHierarchyLifeCycle.isReconciled()) {
member= JavaModelUtil.toWorkingCopy(member);
}
Control methodControl= fMethodsViewer.getControl();
if (methodControl != null && !methodControl.isDisposed()) {
methodControl.setFocus();
}
fMethodsViewer.setSelection(new StructuredSelection(member), true);
} else {
Control viewerControl= getCurrentViewer().getControl();
if (viewerControl != null && !viewerControl.isDisposed()) {
viewerControl.setFocus();
}
// types are originals
member= JavaModelUtil.toOriginal(member);
if (!member.equals(fSelectedType)) {
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>
*/
public IJavaElement getInputElement() {
return fInputElement;
}
/**
* Sets the input to a new element.
*/
public void setInputElement(IJavaElement element) {
if (element != null) {
if (element instanceof IMember) {
if (element.getElementType() != IJavaElement.TYPE) {
element= ((IMember) element).getDeclaringType();
}
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")); //$NON-NLS-1$ //$NON-NLS-2$
return;
}
}
} else {
int kind= element.getElementType();
if (kind != IJavaElement.JAVA_PROJECT && kind != IJavaElement.PACKAGE_FRAGMENT_ROOT && kind != IJavaElement.PACKAGE_FRAGMENT) {
element= null;
JavaPlugin.logErrorMessage("Invalid type hierarchy input type.");//$NON-NLS-1$
}
}
}
if (element != null && !element.equals(fInputElement)) {
addHistoryEntry(element);
}
updateInput(element);
}
/**
* Changes the input to a new type
*/
private void updateInput(IJavaElement inputElement) {
IJavaElement prevInput= fInputElement;
// Make sure the UI got repainted before we execute a long running
// operation. This can be removed if we refresh the hierarchy in a
// separate thread.
// Work-araound for http://dev.eclipse.org/bugs/show_bug.cgi?id=30881
processOutstandingEvents();
if (inputElement == null) {
clearInput();
} else {
fInputElement= inputElement;
try {
fHierarchyLifeCycle.ensureRefreshedTypeHierarchy(inputElement, JavaPlugin.getActiveWorkbenchWindow());
// fHierarchyLifeCycle.ensureRefreshedTypeHierarchy(inputElement, getSite().getWorkbenchWindow());
} catch (InvocationTargetException e) {
ExceptionHandler.handle(e, getSite().getShell(), TypeHierarchyMessages.getString("TypeHierarchyViewPart.exception.title"), TypeHierarchyMessages.getString("TypeHierarchyViewPart.exception.message")); //$NON-NLS-1$ //$NON-NLS-2$
clearInput();
return;
} catch (InterruptedException e) {
return;
}
if (inputElement.getElementType() != IJavaElement.TYPE) {
setView(VIEW_ID_TYPE);
}
// turn off member filtering
setMemberFilter(null);
fIsEnableMemberFilter= false;
if (!inputElement.equals(prevInput)) {
updateHierarchyViewer(true);
}
IType root= getSelectableType(inputElement);
internalSelectType(root, true);
updateMethodViewer(root);
updateToolbarButtons();
updateTitle();
enableMemberFilter(false);
fPagebook.showPage(fTypeMethodsSplitter);
}
}
private void processOutstandingEvents() {
Display display= getDisplay();
if (display != null && !display.isDisposed())
display.update();
}
private void clearInput() {
fInputElement= null;
fHierarchyLifeCycle.freeHierarchy();
updateHierarchyViewer(false);
updateToolbarButtons();
}
/*
* @see IWorbenchPart#setFocus
*/
public void setFocus() {
fPagebook.setFocus();
}
/*
* @see IWorkbenchPart#dispose
*/
public void dispose() {
fHierarchyLifeCycle.freeHierarchy();
fHierarchyLifeCycle.removeChangedListener(fTypeHierarchyLifeCycleListener);
fPaneLabelProvider.dispose();
fMethodsViewer.dispose();
if (fPropertyChangeListener != null) {
JavaPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(fPropertyChangeListener);
fPropertyChangeListener= null;
}
getSite().getPage().removePartListener(fPartListener);
if (fActionGroups != null)
fActionGroups.dispose();
super.dispose();
}
/**
* Answer the property defined by key.
*/
public Object getAdapter(Class key) {
if (key == IShowInSource.class) {
return getShowInSource();
}
if (key == IShowInTargetList.class) {
return new IShowInTargetList() {
public String[] getShowInTargetIds() {
return new String[] { JavaUI.ID_PACKAGES, IPageLayout.ID_RES_NAV };
}
};
}
return super.getAdapter(key);
}
private Control createTypeViewerControl(Composite parent) {
fViewerbook= new PageBook(parent, SWT.NULL);
KeyListener keyListener= createKeyListener();
// Create the viewers
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) {
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]);
}
// force the update
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.F5) {
updateHierarchyViewer(false);
return;
} else if (event.character == SWT.DEL){
if (fCCPActionGroup.getDeleteAction().isEnabled())
fCCPActionGroup.getDeleteAction().run();
return;
}
}
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);
typesViewer.setQualifiedTypeName(isShowQualifiedTypeNames());
}
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());
return control;
}
private void initDragAndDrop() {
Transfer[] transfers= new Transfer[] { LocalSelectionTransfer.getInstance() };
int ops= DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK;
for (int i= 0; i < fAllViewers.length; i++) {
addDragAdapters(fAllViewers[i], ops, transfers);
addDropAdapters(fAllViewers[i], ops | DND.DROP_DEFAULT, transfers);
}
addDragAdapters(fMethodsViewer, ops, transfers);
//dnd on empty hierarchy
DropTarget dropTarget = new DropTarget(fNoHierarchyShownLabel, ops | DND.DROP_DEFAULT);
dropTarget.setTransfer(transfers);
dropTarget.addDropListener(new TypeHierarchyTransferDropAdapter(this, fAllViewers[0]));
}
private void addDropAdapters(AbstractTreeViewer viewer, int ops, Transfer[] transfers){
TransferDropTargetListener[] dropListeners= new TransferDropTargetListener[] {
new TypeHierarchyTransferDropAdapter(this, viewer)
};
viewer.addDropSupport(ops, transfers, new DelegatingDropAdapter(dropListeners));
}
private void addDragAdapters(StructuredViewer viewer, int ops, Transfer[] transfers){
Control control= viewer.getControl();
TransferDragSourceListener[] dragListeners= new TransferDragSourceListener[] {
new SelectionTransferDragAdapter(viewer)
};
DragSource source= new DragSource(control, ops);
// Note, that the transfer agents are set by the delegating drag adapter itself.
source.addDragListener(new DelegatingDragAdapter(dragListeners));
}
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);
}
}
}
/**
* Returns the inner component in a workbench part.
* @see IWorkbenchPart#createPartControl
*/
public void createPartControl(Composite container) {
fPagebook= new PageBook(container, SWT.NONE);
// page 1 of pagebook (viewers)
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);
ToolBar methodViewerToolBar= new ToolBar(fMethodViewerViewForm, SWT.FLAT | SWT.WRAP);
fMethodViewerViewForm.setTopCenter(methodViewerToolBar);
// page 2 of pagebook (no hierarchy label)
fNoHierarchyShownLabel= new Label(fPagebook, SWT.TOP + SWT.LEFT + SWT.WRAP);
fNoHierarchyShownLabel.setText(TypeHierarchyMessages.getString("TypeHierarchyViewPart.empty")); //$NON-NLS-1$
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;
}
// force the update
fCurrentOrientation= -1;
// will fill the main tool bar
setOrientation(orientation);
if (fMemento != null) { // restore state before creating action
restoreLinkingEnabled(fMemento);
}
fToggleLinkingAction= new ToggleLinkingAction(this);
// set the filter menu items
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));
viewMenu.add(fShowQualifiedTypeNamesAction);
viewMenu.add(fToggleLinkingAction);
// fill the method viewer toolbar
ToolBarManager lowertbmanager= new ToolBarManager(methodViewerToolBar);
lowertbmanager.add(fEnableMemberFilterAction);
lowertbmanager.add(new Separator());
fMethodsViewer.contributeToToolBar(lowertbmanager);
lowertbmanager.update(true);
// selection provider
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);
// see http://bugs.eclipse.org/bugs/show_bug.cgi?id=33657
IJavaElement input= null; //determineInputElement();
if (fMemento != null) {
restoreState(fMemento, input);
} else if (input != null) {
setInputElement(input);
} else {
setViewerVisibility(false);
}
WorkbenchHelp.setHelp(fPagebook, IJavaHelpContextIds.TYPE_HIERARCHY_VIEW);
fActionGroups= new CompositeActionGroup(new ActionGroup[] {
new NewWizardsActionGroup(this.getSite()),
new OpenEditorActionGroup(this),
new OpenViewActionGroup(this),
fCCPActionGroup= new CCPActionGroup(this),
new RefactorActionGroup(this),
new GenerateActionGroup(this),
new JavaSearchActionGroup(this)});
fActionGroups.fillActionBars(actionBars);
fSelectAllAction= new SelectAllAction(fMethodsViewer);
actionBars.setGlobalActionHandler(IWorkbenchActionConstants.SELECT_ALL, fSelectAllAction);
initDragAndDrop();
}
/**
* 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++) {
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++) {
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);
menu.appendToGroup(IContextMenuConstants.GROUP_SHOW, new Separator(GROUP_FOCUS));
// viewer entries
viewer.contributeToContextMenu(menu);
if (fFocusOnSelectionAction.canActionBeAdded())
menu.appendToGroup(GROUP_FOCUS, fFocusOnSelectionAction);
menu.appendToGroup(GROUP_FOCUS, fFocusOnTypeAction);
fActionGroups.setContext(new ActionContext(getSite().getSelectionProvider().getSelection()));
fActionGroups.fillContextMenu(menu);
fActionGroups.setContext(null);
}
/**
* Creates the context menu for the method viewer
*/
private void fillMethodsViewerContextMenu(IMenuManager menu) {
JavaPlugin.createStandardGroups(menu);
// viewer entries
fMethodsViewer.contributeToContextMenu(menu);
if (fSelectedType != null && fAddStubAction.init(fSelectedType, fMethodsViewer.getSelection())) {
menu.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, fAddStubAction);
}
fActionGroups.setContext(new ActionContext(getSite().getSelectionProvider().getSelection()));
fActionGroups.fillContextMenu(menu);
fActionGroups.setContext(null);
}
/**
* Toggles between the empty viewer page and the hierarchy
*/
private void setViewerVisibility(boolean showHierarchy) {
if (showHierarchy) {
fViewerbook.showPage(getCurrentViewer().getControl());
} else {
fViewerbook.showPage(fEmptyTypesViewer);
}
}
/**
* 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) {
if (elem.getElementType() != IJavaElement.TYPE) {
return null; //(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);
}
/**
* 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(final boolean doExpand) {
if (fInputElement == null) {
fPagebook.showPage(fNoHierarchyShownLabel);
} else {
if (getCurrentViewer().containsElements() != null) {
Runnable runnable= new Runnable() {
public void run() {
getCurrentViewer().updateContent(doExpand); // refresh
}
};
BusyIndicator.showWhile(getDisplay(), runnable);
if (!isChildVisible(fViewerbook, getCurrentViewer().getControl())) {
setViewerVisibility(true);
}
} else {
fEmptyTypesViewer.setText(TypeHierarchyMessages.getFormattedString("TypeHierarchyViewPart.nodecl", fInputElement.getElementName())); //$NON-NLS-1$
setViewerVisibility(false);
}
}
}
private void updateMethodViewer(final IType input) {
if (!fIsEnableMemberFilter && fCurrentOrientation != VIEW_ORIENTATION_SINGLE) {
if (input == fMethodsViewer.getInput()) {
if (input != null) {
Runnable runnable= new Runnable() {
public void run() {
fMethodsViewer.refresh(); // refresh
}
};
BusyIndicator.showWhile(getDisplay(), runnable);
}
} else {
if (input != null) {
fMethodViewerPaneLabel.setText(fPaneLabelProvider.getText(input));
fMethodViewerPaneLabel.setImage(fPaneLabelProvider.getImage(input));
} else {
fMethodViewerPaneLabel.setText(""); //$NON-NLS-1$
fMethodViewerPaneLabel.setImage(null);
}
Runnable runnable= new Runnable() {
public void run() {
fMethodsViewer.setInput(input); // refresh
}
};
BusyIndicator.showWhile(getDisplay(), runnable);
}
}
}
protected void doSelectionChanged(SelectionChangedEvent e) {
if (e.getSelectionProvider() == fMethodsViewer) {
methodSelectionChanged(e.getSelection());
fSelectAllAction.setEnabled(true);
} else {
typeSelectionChanged(e.getSelection());
fSelectAllAction.setEnabled(false);
}
}
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);
}
setMemberFilter(memberFilter);
updateHierarchyViewer(true);
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) {
// method selected, no change
}
if (nSelected == 1) {
revealElementInEditor(selected.get(0), getCurrentViewer());
}
} else {
fSelectedType= null;
updateMethodViewer(null);
}
}
}
private void revealElementInEditor(Object elem, Viewer originViewer) {
// only allow revealing when the type hierarchy is the active pagae
// no revealing after selection events due to model changes
if (getSite().getPage().getActivePart() != this) {
return;
}
if (fSelectionProviderMediator.getViewerInFocus() != originViewer) {
return;
}
IEditorPart editorPart= EditorUtility.isOpenInEditor(elem);
if (editorPart != null && (elem instanceof IJavaElement)) {
getSite().getPage().removePartListener(fPartListener);
getSite().getPage().bringToTop(editorPart);
EditorUtility.revealInEditor(editorPart, (IJavaElement) elem);
getSite().getPage().addPartListener(fPartListener);
}
}
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); //$NON-NLS-1$
tooltip= TypeHierarchyMessages.getFormattedString("TypeHierarchyViewPart.tooltip", args); //$NON-NLS-1$
} else {
title= viewerTitle;
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(false);
if (fInputElement != null) {
ISelection currSelection= getCurrentViewer().getSelection();
if (currSelection == null || currSelection.isEmpty()) {
internalSelectType(getSelectableType(fInputElement), false);
currSelection= getCurrentViewer().getSelection();
}
if (!fIsEnableMemberFilter) {
typeSelectionChanged(currSelection);
}
}
updateTitle();
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;
}
private TypeHierarchyViewer getCurrentViewer() {
return fAllViewers[fCurrentViewerIndex];
}
/**
* called from EnableMemberFilterAction.
* Must be called after creation of the viewpart.
*/
public void enableMemberFilter(boolean on) {
if (on != fIsEnableMemberFilter) {
fIsEnableMemberFilter= on;
if (!on) {
IType methodViewerInput= (IType) fMethodsViewer.getInput();
setMemberFilter(null);
updateHierarchyViewer(true);
updateTitle();
if (methodViewerInput != null && getCurrentViewer().isElementShown(methodViewerInput)) {
// avoid that the method view changes content by selecting the previous input
internalSelectType(methodViewerInput, true);
} else if (fSelectedType != null) {
// choose a input that exists
internalSelectType(fSelectedType, true);
updateMethodViewer(fSelectedType);
}
} else {
methodSelectionChanged(fMethodsViewer.getSelection());
}
}
fEnableMemberFilterAction.setChecked(on);
}
/**
* called from ShowQualifiedTypeNamesAction. Must be called after creation
* of the viewpart.
*/
public void showQualifiedTypeNames(boolean on) {
if (fAllViewers == null) {
return;
}
for (int i= 0; i < fAllViewers.length; i++) {
fAllViewers[i].setQualifiedTypeName(on);
}
}
private boolean isShowQualifiedTypeNames() {
return fShowQualifiedTypeNamesAction.isChecked();
}
/**
* Called from ITypeHierarchyLifeCycleListener.
* Can be called from any thread
*/
protected void doTypeHierarchyChanged(final TypeHierarchyLifeCycle typeHierarchy, final IType[] changedTypes) {
if (!fIsVisible) {
fNeedRefresh= true;
}
Display display= getDisplay();
if (display != null) {
display.asyncExec(new Runnable() {
public void run() {
if (fPagebook != null && !fPagebook.isDisposed()) {
doTypeHierarchyChangedOnViewers(changedTypes);
}
}
});
}
}
protected void doTypeHierarchyChangedOnViewers(IType[] changedTypes) {
if (fHierarchyLifeCycle.getHierarchy() == null || !fHierarchyLifeCycle.getHierarchy().exists()) {
clearInput();
} else {
if (changedTypes == null) {
// hierarchy change
try {
fHierarchyLifeCycle.ensureRefreshedTypeHierarchy(fInputElement, getSite().getWorkbenchWindow());
} catch (InvocationTargetException e) {
ExceptionHandler.handle(e, getSite().getShell(), TypeHierarchyMessages.getString("TypeHierarchyViewPart.exception.title"), TypeHierarchyMessages.getString("TypeHierarchyViewPart.exception.message")); //$NON-NLS-1$ //$NON-NLS-2$
clearInput();
return;
} catch (InterruptedException e) {
return;
}
fMethodsViewer.refresh();
updateHierarchyViewer(false);
} else {
// elements in hierarchy modified
fMethodsViewer.refresh();
if (getCurrentViewer().isMethodFiltering()) {
if (changedTypes.length == 1) {
getCurrentViewer().refresh(changedTypes[0]);
} else {
updateHierarchyViewer(false);
}
} else {
getCurrentViewer().update(changedTypes, new String[] { IBasicPropertyConstants.P_TEXT, IBasicPropertyConstants.P_IMAGE } );
}
}
}
}
/**
* Determines the input element to be used initially .
*/
private IJavaElement determineInputElement() {
Object input= getSite().getPage().getInput();
if (input instanceof IJavaElement) {
IJavaElement elem= (IJavaElement) input;
if (elem instanceof IMember) {
return elem;
} else {
int kind= elem.getElementType();
if (kind == IJavaElement.JAVA_PROJECT || kind == IJavaElement.PACKAGE_FRAGMENT_ROOT || kind == IJavaElement.PACKAGE_FRAGMENT) {
return elem;
}
}
}
return null;
}
/*
* @see IViewPart#init
*/
public void init(IViewSite site, IMemento memento) throws PartInitException {
super.init(site, memento);
fMemento= memento;
}
/*
* @see ViewPart#saveState(IMemento)
*/
public void saveState(IMemento memento) {
if (fPagebook == null) {
// part has not been created
if (fMemento != null) { //Keep the old state;
memento.putMemento(fMemento);
}
return;
}
if (fInputElement != null) {
String handleIndentifier= fInputElement.getHandleIdentifier();
if (fInputElement instanceof IType) {
ITypeHierarchy hierarchy= fHierarchyLifeCycle.getHierarchy();
if (hierarchy != null && hierarchy.getSubtypes((IType) fInputElement).length > 1000) {
// for startup performance reasons do not try to recover huge hierarchies
handleIndentifier= null;
}
}
memento.putString(TAG_INPUT, handleIndentifier);
}
memento.putInteger(TAG_VIEW, getViewIndex());
memento.putInteger(TAG_ORIENTATION, fCurrentOrientation);
int weigths[]= fTypeMethodsSplitter.getWeights();
int ratio= (weigths[0] * 1000) / (weigths[0] + weigths[1]);
memento.putInteger(TAG_RATIO, ratio);
ScrollBar bar= getCurrentViewer().getTree().getVerticalBar();
int position= bar != null ? bar.getSelection() : 0;
memento.putInteger(TAG_VERTICAL_SCROLL, position);
IJavaElement selection= (IJavaElement)((IStructuredSelection) getCurrentViewer().getSelection()).getFirstElement();
if (selection != null) {
memento.putString(TAG_SELECTION, selection.getHandleIdentifier());
}
fMethodsViewer.saveState(memento);
saveLinkingEnabled(memento);
}
private void saveLinkingEnabled(IMemento memento) {
memento.putInteger(PreferenceConstants.LINK_TYPEHIERARCHY_TO_EDITOR, fLinkingEnabled ? 1 : 0);
}
/**
* Restores the type hierarchy settings from a memento.
*/
private void restoreState(IMemento memento, IJavaElement defaultInput) {
IJavaElement input= defaultInput;
String elementId= memento.getString(TAG_INPUT);
if (elementId != null) {
input= JavaCore.create(elementId);
if (input != null && !input.exists()) {
input= null;
}
if (!AllTypesCache.isIndexUpToDate()) {
input= null;
}
}
setInputElement(input);
Integer viewerIndex= memento.getInteger(TAG_VIEW);
if (viewerIndex != null) {
setView(viewerIndex.intValue());
}
Integer orientation= memento.getInteger(TAG_ORIENTATION);
if (orientation != null) {
setOrientation(orientation.intValue());
}
Integer ratio= memento.getInteger(TAG_RATIO);
if (ratio != null) {
fTypeMethodsSplitter.setWeights(new int[] { ratio.intValue(), 1000 - ratio.intValue() });
}
ScrollBar bar= getCurrentViewer().getTree().getVerticalBar();
if (bar != null) {
Integer vScroll= memento.getInteger(TAG_VERTICAL_SCROLL);
if (vScroll != null) {
bar.setSelection(vScroll.intValue());
}
}
//String selectionId= memento.getString(TAG_SELECTION);
// do not restore type hierarchy contents
// if (selectionId != null) {
// IJavaElement elem= JavaCore.create(selectionId);
// if (getCurrentViewer().isElementShown(elem) && elem instanceof IMember) {
// internalSelectType((IMember)elem, false);
// }
// }
fMethodsViewer.restoreState(memento);
}
private void restoreLinkingEnabled(IMemento memento) {
Integer val= memento.getInteger(PreferenceConstants.LINK_TYPEHIERARCHY_TO_EDITOR);
if (val != null) {
fLinkingEnabled= val.intValue() != 0;
}
}
/**
* view part becomes visible
*/
protected void visibilityChanged(boolean isVisible) {
fIsVisible= isVisible;
if (isVisible && fNeedRefresh) {
doTypeHierarchyChanged(fHierarchyLifeCycle, null);
}
fNeedRefresh= false;
}
/**
* Link selection to active editor.
*/
protected void editorActivated(IEditorPart editor) {
if (!isLinkingEnabled()) {
return;
}
if (fInputElement == null) {
// no type hierarchy shown
return;
}
IJavaElement elem= (IJavaElement)editor.getEditorInput().getAdapter(IJavaElement.class);
try {
TypeHierarchyViewer currentViewer= getCurrentViewer();
if (elem instanceof IClassFile) {
IType type= ((IClassFile)elem).getType();
if (currentViewer.isElementShown(type)) {
internalSelectType(type, true);
updateMethodViewer(type);
}
} else if (elem instanceof ICompilationUnit) {
IType[] allTypes= ((ICompilationUnit)elem).getAllTypes();
for (int i= 0; i < allTypes.length; i++) {
if (currentViewer.isElementShown(allTypes[i])) {
internalSelectType(allTypes[i], true);
updateMethodViewer(allTypes[i]);
return;
}
}
}
} catch (JavaModelException e) {
JavaPlugin.log(e);
}
}
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.ui.viewsupport.IViewPartInputProvider#getViewPartInput()
*/
public Object getViewPartInput() {
return fInputElement;
}
/**
* Returns the <code>IShowInSource</code> for this view.
*/
protected IShowInSource getShowInSource() {
return new IShowInSource() {
public ShowInContext getShowInContext() {
return new ShowInContext(
null,
getSite().getSelectionProvider().getSelection());
}
};
}
boolean isLinkingEnabled() {
return fLinkingEnabled;
}
public void setLinkingEnabled(boolean enabled) {
fLinkingEnabled= enabled;
PreferenceConstants.getPreferenceStore().setValue(PreferenceConstants.LINK_TYPEHIERARCHY_TO_EDITOR, enabled);
if (enabled) {
IEditorPart editor = getSite().getPage().getActiveEditor();
if (editor != null) {
editorActivated(editor);
}
}
}
}
|
33,216 |
Bug 33216 Source actions in context menu on types inconsistency
|
1) select a type in the package explorer 2) bring up the context menu ->the source actions are shown in-line and the menu is huge. Given that we show a source submenu in other parts (e.g. the editor) and do the same for the refactoring actions we should also move the source actions into a submenu.
|
resolved fixed
|
0ece750
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T15:38:10Z | 2003-02-26T11:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateActionGroup.java
|
/*******************************************************************************
* Copyright (c) 2002 International Business Machines Corp. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v0.5
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v05.html
*
* Contributors:
* IBM Corporation - initial API and implementation
******************************************************************************/
package org.eclipse.jdt.ui.actions;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.util.Assert;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchSite;
import org.eclipse.ui.actions.ActionGroup;
import org.eclipse.ui.actions.AddBookmarkAction;
import org.eclipse.ui.part.Page;
import org.eclipse.ui.texteditor.ConvertLineDelimitersAction;
import org.eclipse.ui.texteditor.IUpdate;
import org.eclipse.jdt.internal.ui.actions.ActionMessages;
import org.eclipse.jdt.internal.ui.actions.AddTaskAction;
import org.eclipse.jdt.internal.ui.javaeditor.AddImportOnSelectionAction;
import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor;
import org.eclipse.jdt.ui.IContextMenuConstants;
/**
* Action group that adds the source and generate actions to a part's context
* menu and installs handlers for the corresponding global menu actions.
*
* <p>
* This class may be instantiated; it is not intended to be subclassed.
* </p>
*
* @since 2.0
*/
public class GenerateActionGroup extends ActionGroup {
private CompilationUnitEditor fEditor;
private IWorkbenchSite fSite;
private String fGroupName= IContextMenuConstants.GROUP_SOURCE;
private List fRegisteredSelectionListeners;
private AddImportOnSelectionAction fAddImport;
private OverrideMethodsAction fOverrideMethods;
private AddGetterSetterAction fAddGetterSetter;
private AddDelegateMethodsAction fAddDelegateMethods;
private AddUnimplementedConstructorsAction fAddUnimplementedConstructors;
private AddJavaDocStubAction fAddJavaDocStub;
private AddBookmarkAction fAddBookmark;
private AddTaskAction fAddTaskAction;
private ExternalizeStringsAction fExternalizeStrings;
private FindStringsToExternalizeAction fFindStringsToExternalize;
private SurroundWithTryCatchAction fSurroundWithTryCatch;
private AddToClasspathAction fAddToClasspathAction;
private RemoveFromClasspathAction fRemoveFromClasspathAction;
private OrganizeImportsAction fOrganizeImports;
private SortMembersAction fSortMembers;
private ConvertLineDelimitersAction fConvertToWindows;
private ConvertLineDelimitersAction fConvertToUNIX;
private ConvertLineDelimitersAction fConvertToMac;
/**
* Note: This constructor is for internal use only. Clients should not call this constructor.
*/
public GenerateActionGroup(CompilationUnitEditor editor, String groupName) {
fSite= editor.getSite();
fEditor= editor;
fGroupName= groupName;
ISelectionProvider provider= fSite.getSelectionProvider();
ISelection selection= provider.getSelection();
fAddImport= new AddImportOnSelectionAction(editor);
fAddImport.setActionDefinitionId(IJavaEditorActionDefinitionIds.ADD_IMPORT);
fAddImport.update();
editor.setAction("AddImport", fAddImport); //$NON-NLS-1$
fOrganizeImports= new OrganizeImportsAction(editor);
fOrganizeImports.setActionDefinitionId(IJavaEditorActionDefinitionIds.ORGANIZE_IMPORTS);
editor.setAction("OrganizeImports", fOrganizeImports); //$NON-NLS-1$
fSortMembers= new SortMembersAction(editor);
fSortMembers.setActionDefinitionId(IJavaEditorActionDefinitionIds.SORT_MEMBERS);
editor.setAction("SortMembers", fSortMembers); //$NON-NLS-1$
fOverrideMethods= new OverrideMethodsAction(editor);
fOverrideMethods.setActionDefinitionId(IJavaEditorActionDefinitionIds.OVERRIDE_METHODS);
editor.setAction("OverrideMethods", fOverrideMethods); //$NON-NLS-1$
fAddGetterSetter= new AddGetterSetterAction(editor);
fAddGetterSetter.setActionDefinitionId(IJavaEditorActionDefinitionIds.CREATE_GETTER_SETTER);
editor.setAction("AddGetterSetter", fAddGetterSetter); //$NON-NLS-1$
fAddDelegateMethods= new AddDelegateMethodsAction(editor);
fAddDelegateMethods.setActionDefinitionId(IJavaEditorActionDefinitionIds.CREATE_DELEGATE_METHODS);
editor.setAction("AddDelegateMethods", fAddDelegateMethods); //$NON-NLS-1$
fAddUnimplementedConstructors= new AddUnimplementedConstructorsAction(editor);
fAddUnimplementedConstructors.setActionDefinitionId(IJavaEditorActionDefinitionIds.ADD_UNIMPLEMENTED_CONTRUCTORS);
editor.setAction("AddUnimplementedConstructors", fAddUnimplementedConstructors); //$NON-NLS-1$
fAddJavaDocStub= new AddJavaDocStubAction(editor);
fAddJavaDocStub.setActionDefinitionId(IJavaEditorActionDefinitionIds.ADD_JAVADOC_COMMENT);
editor.setAction("AddJavadocComment", fAddJavaDocStub); //$NON-NLS-1$
fSurroundWithTryCatch= new SurroundWithTryCatchAction(editor);
fSurroundWithTryCatch.setActionDefinitionId(IJavaEditorActionDefinitionIds.SURROUND_WITH_TRY_CATCH);
fSurroundWithTryCatch.update(selection);
provider.addSelectionChangedListener(fSurroundWithTryCatch);
editor.setAction("SurroundWithTryCatch", fSurroundWithTryCatch); //$NON-NLS-1$
fExternalizeStrings= new ExternalizeStringsAction(editor);
fExternalizeStrings.setActionDefinitionId(IJavaEditorActionDefinitionIds.EXTERNALIZE_STRINGS);
editor.setAction("ExternalizeStrings", fExternalizeStrings); //$NON-NLS-1$
fConvertToWindows= new ConvertLineDelimitersAction(editor, "\r\n"); //$NON-NLS-1$
fConvertToWindows.setActionDefinitionId(IJavaEditorActionDefinitionIds.CONVERT_LINE_DELIMITERS_TO_WINDOWS);
editor.setAction("ConvertLineDelimitersToWindows", fConvertToWindows); //$NON-NLS-1$
fConvertToUNIX= new ConvertLineDelimitersAction(editor, "\n"); //$NON-NLS-1$
fConvertToUNIX.setActionDefinitionId(IJavaEditorActionDefinitionIds.CONVERT_LINE_DELIMITERS_TO_UNIX);
editor.setAction("ConvertLineDelimitersToUNIX", fConvertToUNIX); //$NON-NLS-1$
fConvertToMac= new ConvertLineDelimitersAction(editor, "\r"); //$NON-NLS-1$
fConvertToMac.setActionDefinitionId(IJavaEditorActionDefinitionIds.CONVERT_LINE_DELIMITERS_TO_MAC);
editor.setAction("ConvertLineDelimitersToMac", fConvertToMac); //$NON-NLS-1$
}
/**
* Creates a new <code>GenerateActionGroup</code>. The group
* requires that the selection provided by the page's selection provider
* is of type <code>org.eclipse.jface.viewers.IStructuredSelection</code>.
*
* @param page the page that owns this action group
*/
public GenerateActionGroup(Page page) {
this(page.getSite());
}
/**
* Creates a new <code>GenerateActionGroup</code>. The group
* requires that the selection provided by the part's selection provider
* is of type <code>org.eclipse.jface.viewers.IStructuredSelection</code>.
*
* @param part the view part that owns this action group
*/
public GenerateActionGroup(IViewPart part) {
this(part.getSite());
}
private GenerateActionGroup(IWorkbenchSite site) {
fSite= site;
ISelectionProvider provider= fSite.getSelectionProvider();
ISelection selection= provider.getSelection();
fOverrideMethods= new OverrideMethodsAction(site);
fAddGetterSetter= new AddGetterSetterAction(site);
fAddDelegateMethods= new AddDelegateMethodsAction(site);
fAddUnimplementedConstructors= new AddUnimplementedConstructorsAction(site);
fAddJavaDocStub= new AddJavaDocStubAction(site);
fAddBookmark= new AddBookmarkAction(site.getShell());
fAddToClasspathAction= new AddToClasspathAction(site);
fRemoveFromClasspathAction= new RemoveFromClasspathAction(site);
fAddTaskAction= new AddTaskAction(site);
fExternalizeStrings= new ExternalizeStringsAction(site);
fFindStringsToExternalize= new FindStringsToExternalizeAction(site);
fOrganizeImports= new OrganizeImportsAction(site);
fSortMembers= new SortMembersAction(site);
fOverrideMethods.update(selection);
fAddGetterSetter.update(selection);
fAddDelegateMethods.update(selection);
fAddUnimplementedConstructors.update(selection);
fAddJavaDocStub.update(selection);
fAddToClasspathAction.update(selection);
fRemoveFromClasspathAction.update(selection);
fExternalizeStrings.update(selection);
fFindStringsToExternalize.update(selection);
fAddTaskAction.update(selection);
fOrganizeImports.update(selection);
fSortMembers.update(selection);
if (selection instanceof IStructuredSelection) {
IStructuredSelection ss= (IStructuredSelection)selection;
fAddBookmark.selectionChanged(ss);
} else {
fAddBookmark.setEnabled(false);
}
registerSelectionListener(provider, fOverrideMethods);
registerSelectionListener(provider, fAddGetterSetter);
registerSelectionListener(provider, fAddDelegateMethods);
registerSelectionListener(provider, fAddUnimplementedConstructors);
registerSelectionListener(provider, fAddJavaDocStub);
registerSelectionListener(provider, fAddBookmark);
registerSelectionListener(provider, fAddToClasspathAction);
registerSelectionListener(provider, fRemoveFromClasspathAction);
registerSelectionListener(provider, fExternalizeStrings);
registerSelectionListener(provider, fFindStringsToExternalize);
registerSelectionListener(provider, fOrganizeImports);
registerSelectionListener(provider, fSortMembers);
registerSelectionListener(provider, fAddTaskAction);
}
private void registerSelectionListener(ISelectionProvider provider, ISelectionChangedListener listener) {
if (fRegisteredSelectionListeners == null)
fRegisteredSelectionListeners= new ArrayList(20);
provider.addSelectionChangedListener(listener);
fRegisteredSelectionListeners.add(listener);
}
/*
* The state of the editor owning this action group has changed.
* This method does nothing if the group's owner isn't an
* editor.
*/
/**
* Note: This method is for internal use only. Clients should not call this method.
*/
public void editorStateChanged() {
Assert.isTrue(isEditorOwner());
// http://dev.eclipse.org/bugs/show_bug.cgi?id=17709
fConvertToMac.update();
fConvertToUNIX.update();
fConvertToWindows.update();
}
/* (non-Javadoc)
* Method declared in ActionGroup
*/
public void fillActionBars(IActionBars actionBar) {
super.fillActionBars(actionBar);
setGlobalActionHandlers(actionBar);
}
/* (non-Javadoc)
* Method declared in ActionGroup
*/
public void fillContextMenu(IMenuManager menu) {
super.fillContextMenu(menu);
if (isEditorOwner()) {
IMenuManager subMenu= createEditorSubMenu(menu);
if (subMenu != null)
menu.appendToGroup(fGroupName, subMenu);
} else {
appendToGroup(menu, fOrganizeImports);
appendToGroup(menu, fOverrideMethods);
appendToGroup(menu, fAddGetterSetter);
appendToGroup(menu, fAddDelegateMethods);
appendToGroup(menu, fAddUnimplementedConstructors);
appendToGroup(menu, fAddJavaDocStub);
appendToGroup(menu, fAddToClasspathAction);
appendToGroup(menu, fRemoveFromClasspathAction);
}
}
private IMenuManager createEditorSubMenu(IMenuManager mainMenu) {
IMenuManager result= new MenuManager(ActionMessages.getString("SourceMenu.label")); //$NON-NLS-1$
int added= 0;
added+= addEditorAction(result, "Comment"); //$NON-NLS-1$
added+= addEditorAction(result, "Uncomment"); //$NON-NLS-1$
result.add(new Separator());
added+= addAction(result, fOrganizeImports);
added+= addAction(result, fAddImport);
result.add(new Separator());
added+= addAction(result, fOverrideMethods);
added+= addAction(result, fAddGetterSetter);
added+= addAction(result, fAddDelegateMethods);
added+= addAction(result, fAddUnimplementedConstructors);
added+= addAction(result, fAddJavaDocStub);
added+= addEditorAction(result, "Format"); //$NON-NLS-1$
added+= addAction(result, fSortMembers);
added+= addAction(result, fAddBookmark);
result.add(new Separator());
added+= addAction(result, fSurroundWithTryCatch);
added+= addAction(result, fExternalizeStrings);
if (added == 0)
result= null;
return result;
}
/* (non-Javadoc)
* Method declared in ActionGroup
*/
public void dispose() {
if (fRegisteredSelectionListeners != null) {
ISelectionProvider provider= fSite.getSelectionProvider();
for (Iterator iter= fRegisteredSelectionListeners.iterator(); iter.hasNext();) {
ISelectionChangedListener listener= (ISelectionChangedListener) iter.next();
provider.removeSelectionChangedListener(listener);
}
}
fEditor= null;
super.dispose();
}
private void setGlobalActionHandlers(IActionBars actionBar) {
actionBar.setGlobalActionHandler(JdtActionConstants.ADD_IMPORT, fAddImport);
actionBar.setGlobalActionHandler(JdtActionConstants.SURROUND_WITH_TRY_CATCH, fSurroundWithTryCatch);
actionBar.setGlobalActionHandler(JdtActionConstants.OVERRIDE_METHODS, fOverrideMethods);
actionBar.setGlobalActionHandler(JdtActionConstants.GENERATE_GETTER_SETTER, fAddGetterSetter);
actionBar.setGlobalActionHandler(JdtActionConstants.GENERATE_DELEGATE_METHODS, fAddDelegateMethods);
actionBar.setGlobalActionHandler(JdtActionConstants.ADD_CONSTRUCTOR_FROM_SUPERCLASS, fAddUnimplementedConstructors);
actionBar.setGlobalActionHandler(JdtActionConstants.ADD_JAVA_DOC_COMMENT, fAddJavaDocStub);
actionBar.setGlobalActionHandler(JdtActionConstants.EXTERNALIZE_STRINGS, fExternalizeStrings);
actionBar.setGlobalActionHandler(JdtActionConstants.FIND_STRINGS_TO_EXTERNALIZE, fFindStringsToExternalize);
actionBar.setGlobalActionHandler(JdtActionConstants.ORGANIZE_IMPORTS, fOrganizeImports);
actionBar.setGlobalActionHandler(JdtActionConstants.SORT_MEMBERS, fSortMembers);
actionBar.setGlobalActionHandler(JdtActionConstants.CONVERT_LINE_DELIMITERS_TO_WINDOWS, fConvertToWindows);
actionBar.setGlobalActionHandler(JdtActionConstants.CONVERT_LINE_DELIMITERS_TO_UNIX, fConvertToUNIX);
actionBar.setGlobalActionHandler(JdtActionConstants.CONVERT_LINE_DELIMITERS_TO_MAC, fConvertToMac);
if (!isEditorOwner()) {
// editor provides its own implementation of these actions.
actionBar.setGlobalActionHandler(IWorkbenchActionConstants.BOOKMARK, fAddBookmark);
actionBar.setGlobalActionHandler(IWorkbenchActionConstants.ADD_TASK, fAddTaskAction);
}
}
private int appendToGroup(IMenuManager menu, IAction action) {
if (action != null && action.isEnabled()) {
menu.appendToGroup(fGroupName, action);
return 1;
}
return 0;
}
private int addAction(IMenuManager menu, IAction action) {
if (action != null && action.isEnabled()) {
menu.add(action);
return 1;
}
return 0;
}
private int addEditorAction(IMenuManager menu, String actionID) {
if (fEditor == null)
return 0;
IAction action= fEditor.getAction(actionID);
if (action == null)
return 0;
if (action instanceof IUpdate)
((IUpdate)action).update();
if (action.isEnabled()) {
menu.add(action);
return 1;
}
return 0;
}
private boolean isEditorOwner() {
return fEditor != null;
}
}
|
33,415 |
Bug 33415 Some actions don't have icons
|
We have some custom versions of workbench actions. The workbench actions have icons assigned to them, but we don't. This makes the context menu in the package explorer inconsistent with the one in the navigator. The actions are: cut copy paste refresh import export delete
|
resolved fixed
|
f32b8b6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T15:39:16Z | 2003-02-27T07:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/ReorgActionFactory.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.reorg;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IResource;
import org.eclipse.swt.dnd.Clipboard;
import org.eclipse.ui.IWorkbenchSite;
import org.eclipse.jdt.core.ISourceReference;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.actions.SelectionDispatchAction;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgRefactoring;
public class ReorgActionFactory {
private ReorgActionFactory(){
}
public static SelectionDispatchAction createCutAction(IWorkbenchSite site, Clipboard clipboard, SelectionDispatchAction pasteAction){
String helpContextID= IJavaHelpContextIds.CUT_ACTION;
SelectionDispatchAction a1= new CutSourceReferencesToClipboardAction(site, clipboard, pasteAction, helpContextID);
return a1;
}
public static SelectionDispatchAction createCopyAction(IWorkbenchSite site, Clipboard clipboard, SelectionDispatchAction pasteAction){
SelectionDispatchAction a1= new CopyResourcesToClipboardAction(site, clipboard, pasteAction);
SelectionDispatchAction a2= new CopySourceReferencesToClipboardAction(site, clipboard, pasteAction);
String helpContextID= IJavaHelpContextIds.COPY_ACTION;
SelectionDispatchAction dual= new DualReorgAction(site, ReorgMessages.getString("ReorgGroup.copy"), ReorgMessages.getString("copyAction.description"), a1, a2, helpContextID);//$NON-NLS-1$ //$NON-NLS-2$
return dual;
}
public static SelectionDispatchAction createPasteAction(IWorkbenchSite site, Clipboard clipboard){
SelectionDispatchAction a1= new PasteResourcesFromClipboardAction(site, clipboard);
SelectionDispatchAction a2= new PasteSourceReferencesFromClipboardAction(site, clipboard);
String helpContextID= IJavaHelpContextIds.PASTE_ACTION;
SelectionDispatchAction dual= new DualReorgAction(site, ReorgMessages.getString("ReorgGroup.paste"), ReorgMessages.getString("ReorgGroup.pasteAction.description"), a1, a2, helpContextID);//$NON-NLS-1$ //$NON-NLS-2$
return dual;
}
public static SelectionDispatchAction createDeleteAction(IWorkbenchSite site){
DeleteResourcesAction a1= new DeleteResourcesAction(site);
DeleteSourceReferencesAction a2= new DeleteSourceReferencesAction(site);
String helpContextID= IJavaHelpContextIds.DELETE_ACTION;
DualReorgAction dual= new DualReorgAction(site, ReorgMessages.getString("ReorgGroup.delete"), ReorgMessages.getString("deleteAction.description"), a1, a2, helpContextID); //$NON-NLS-1$ //$NON-NLS-2$
return dual;
}
public static SelectionDispatchAction createPasteAction(final ISourceReference[] elements, Object target){
return new PasteSourceReferencesFromClipboardAction(new MockWorkbenchSite(new Object[]{target}), null){
protected TypedSource[] getContentsToPaste(){
List result= new ArrayList(elements.length);
for(int i= 0; i < elements.length; i++){
try {
result.add(new TypedSource(elements[i]));
} catch(JavaModelException e) {
//ignore
}
}
return (TypedSource[])result.toArray(new TypedSource[result.size()]);
}
};
}
public static DeleteSourceReferencesAction createDeleteSourceReferencesAction(ISourceReference[] elements){
return new DeleteSourceReferencesAction(new MockWorkbenchSite(elements));
}
public static JdtCopyAction createDnDCopyAction(List elems, final IResource destination){
JdtCopyAction action= new JdtCopyAction(new MockWorkbenchSite(elems)){
protected Object selectDestination(ReorgRefactoring ref) {
return ClipboardActionUtil.tryConvertingToJava(destination);
}
};
return action;
}
public static JdtCopyAction createDnDCopyAction(IResource[] resourceData, final IResource destination){
return createDnDCopyAction(ClipboardActionUtil.getConvertedResources(resourceData), destination);
}
}
|
33,415 |
Bug 33415 Some actions don't have icons
|
We have some custom versions of workbench actions. The workbench actions have icons assigned to them, but we don't. This makes the context menu in the package explorer inconsistent with the one in the navigator. The actions are: cut copy paste refresh import export delete
|
resolved fixed
|
f32b8b6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T15:39:16Z | 2003-02-27T07:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ImportActionGroup.java
|
/*******************************************************************************
* Copyright (c) 2002 International Business Machines Corp. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v0.5
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v05.html
*
* Contributors:
* IBM Corporation - initial API and implementation
******************************************************************************/
package org.eclipse.jdt.ui.actions;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.actions.ActionGroup;
import org.eclipse.ui.actions.ExportResourcesAction;
import org.eclipse.ui.actions.ImportResourcesAction;
import org.eclipse.jdt.ui.IContextMenuConstants;
/**
* Action group to add the Import and Export action to a view part's
* context menu.
*
* <p>
* This class may be instantiated; it is not intended to be subclassed.
* </p>
*
* @since 2.0
*/
public class ImportActionGroup extends ActionGroup {
private static final String GROUP_IMPORT= "group.import"; //$NON-NLS-1$
private ImportResourcesAction fImportAction;
private ExportResourcesAction fExportAction;
/**
* Creates a new <code>ImportActionGroup</code>. The group
* requires that the selection provided by the part's selection provider
* is of type <code>org.eclipse.jface.viewers.IStructuredSelection</code>.
*
* @param part the view part that owns this action group
*/
public ImportActionGroup(IViewPart part) {
IWorkbench workbench = part.getSite().getWorkbenchWindow().getWorkbench();
fImportAction= new ImportResourcesAction(workbench);
fExportAction= new ExportResourcesAction(workbench);
}
/* (non-Javadoc)
* Method declared in ActionGroup
*/
public void fillContextMenu(IMenuManager menu) {
menu.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, new Separator(GROUP_IMPORT));
menu.appendToGroup(GROUP_IMPORT, fImportAction);
menu.appendToGroup(GROUP_IMPORT, fExportAction);
super.fillContextMenu(menu);
}
}
|
33,415 |
Bug 33415 Some actions don't have icons
|
We have some custom versions of workbench actions. The workbench actions have icons assigned to them, but we don't. This makes the context menu in the package explorer inconsistent with the one in the navigator. The actions are: cut copy paste refresh import export delete
|
resolved fixed
|
f32b8b6
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T15:39:16Z | 2003-02-27T07:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/RefreshAction.java
|
/*******************************************************************************
* Copyright (c) 2002 International Business Machines Corp. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v0.5
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v05.html
*
* Contributors:
* IBM Corporation - initial API and implementation
******************************************************************************/
package org.eclipse.jdt.ui.actions;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.IWorkspaceRunnable;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IWorkbenchSite;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaModel;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.actions.ActionMessages;
import org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
/**
* Action for refreshing the workspace from the local file system for
* the selected resources and all of their descendents. This action
* also considers external Jars managed by the Java Model.
* <p>
* Action is applicable to selections containing resources and Java
* elements down to compilation units.
*
* <p>
* This class may be instantiated; it is not intended to be subclassed.
* </p>
*
* @since 2.0
*/
public class RefreshAction extends SelectionDispatchAction {
/**
* Creates a new <code>RefreshAction</code>. The action requires
* that the selection provided by the site's selection provider is of type <code>
* org.eclipse.jface.viewers.IStructuredSelection</code>.
*
* @param site the site providing context information for this action
*/
public RefreshAction(IWorkbenchSite site) {
super(site);
setText(ActionMessages.getString("RefreshAction.label")); //$NON-NLS-1$
setToolTipText(ActionMessages.getString("RefreshAction.toolTip")); //$NON-NLS-1$
WorkbenchHelp.setHelp(this, IJavaHelpContextIds.REFRESH_ACTION);
}
/* (non-Javadoc)
* Method declared in SelectionDispatchAction
*/
protected void selectionChanged(IStructuredSelection selection) {
setEnabled(checkEnabled(selection));
}
private boolean checkEnabled(IStructuredSelection selection) {
if (selection.isEmpty())
return true;
for (Iterator iter= selection.iterator(); iter.hasNext();) {
Object element= (Object) iter.next();
if (element instanceof IAdaptable) {
IResource resource= (IResource)((IAdaptable)element).getAdapter(IResource.class);
if (resource == null)
return false;
if (resource.getType() == IResource.PROJECT && !((IProject)resource).isOpen())
return false;
} else {
return false;
}
}
return true;
}
/* (non-Javadoc)
* Method declared in SelectionDispatchAction
*/
protected void run(IStructuredSelection selection) {
final IResource[] resources= getResources(selection);
IWorkspaceRunnable operation= new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException {
monitor.beginTask(ActionMessages.getString("RefreshAction.progressMessage"), resources.length * 2); //$NON-NLS-1$
monitor.subTask(""); //$NON-NLS-1$
List javaElements= new ArrayList(5);
for (int r= 0; r < resources.length; r++) {
IResource resource= resources[r];
if (resource.getType() == IResource.PROJECT) {
checkLocationDeleted((IProject) resource);
} else if (resource.getType() == IResource.ROOT) {
IProject[] projects = ((IWorkspaceRoot)resource).getProjects();
for (int p = 0; p < projects.length; p++) {
checkLocationDeleted(projects[p]);
}
}
resource.refreshLocal(IResource.DEPTH_INFINITE, new SubProgressMonitor(monitor, 1));
IJavaElement jElement= JavaCore.create(resource);
if (jElement != null && jElement.exists())
javaElements.add(jElement);
}
IJavaModel model= JavaCore.create(ResourcesPlugin.getWorkspace().getRoot());
model.refreshExternalArchives(
(IJavaElement[]) javaElements.toArray(new IJavaElement[javaElements.size()]),
new SubProgressMonitor(monitor, resources.length));
}
};
try {
new ProgressMonitorDialog(getShell()).run(true, true, new WorkbenchRunnableAdapter(operation));
} catch (InvocationTargetException e) {
ExceptionHandler.handle(e, getShell(),
ActionMessages.getString("RefreshAction.error.title"), //$NON-NLS-1$
ActionMessages.getString("RefreshAction.error.message")); //$NON-NLS-1$
} catch (InterruptedException e) {
// canceled
}
}
private IResource[] getResources(IStructuredSelection selection) {
if (selection.isEmpty()) {
return new IResource[] {ResourcesPlugin.getWorkspace().getRoot()};
}
List result= new ArrayList(selection.size());
for (Iterator iter= selection.iterator(); iter.hasNext();) {
Object element= (Object) iter.next();
if (element instanceof IAdaptable) {
IResource resource= (IResource)((IAdaptable)element).getAdapter(IResource.class);
if (resource != null)
result.add(resource);
}
}
for (Iterator iter= result.iterator(); iter.hasNext();) {
IResource resource= (IResource) iter.next();
if (isDescendent(result, resource))
iter.remove();
}
return (IResource[]) result.toArray(new IResource[result.size()]);
}
private boolean isDescendent(List candidates, IResource element) {
IResource parent= element.getParent();
while (parent != null) {
if (candidates.contains(parent))
return true;
parent= parent.getParent();
}
return false;
}
private void checkLocationDeleted(IProject project) throws CoreException {
if (!project.exists())
return;
File location = project.getLocation().toFile();
if (!location.exists()) {
final String message = ActionMessages.getFormattedString(
"RefreshAction.locationDeleted.message", //$NON-NLS-1$
new Object[] {project.getName(), location.getAbsolutePath()});
final boolean[] result= new boolean[1];
// Must prompt user in UI thread (we're in the operation thread here).
getShell().getDisplay().syncExec(new Runnable() {
public void run() {
result[0]= MessageDialog.openQuestion(getShell(),
ActionMessages.getString("RefreshAction.locationDeleted.title"), //$NON-NLS-1$
message);
}
});
if (result[0]) {
project.delete(true, true, null);
}
}
}
}
|
33,454 |
Bug 33454 SelectionState init() method creates an ArrayList which is never used
|
HEAD contents of org.eclipse.jdt.ui: org.eclipse.jdt.internal.ui.refactoring.RefactoringSupport.AbstractRenameSupport.SelectionState.init() defined the following local variable which is never read. List parts = new ArrayList(); STEPS TO REPRODUCE: Compile your code with error on unused locals. You will find another error in: org.eclipse.jdt.internal.ui.refactoring.changes.ChangeExceptionHandler.RefactorErrorDialog.createMessageArea(...) and: org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.showErrorDialog(...). The status is never used.
|
resolved fixed
|
dac1b93
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T15:49:01Z | 2003-02-27T18:20:00Z |
org.eclipse.jdt.ui/ui
| |
33,454 |
Bug 33454 SelectionState init() method creates an ArrayList which is never used
|
HEAD contents of org.eclipse.jdt.ui: org.eclipse.jdt.internal.ui.refactoring.RefactoringSupport.AbstractRenameSupport.SelectionState.init() defined the following local variable which is never read. List parts = new ArrayList(); STEPS TO REPRODUCE: Compile your code with error on unused locals. You will find another error in: org.eclipse.jdt.internal.ui.refactoring.changes.ChangeExceptionHandler.RefactorErrorDialog.createMessageArea(...) and: org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.showErrorDialog(...). The status is never used.
|
resolved fixed
|
dac1b93
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T15:49:01Z | 2003-02-27T18:20:00Z |
refactoring/org/eclipse/jdt/internal/ui/refactoring/RefactoringSupport.java
| |
33,454 |
Bug 33454 SelectionState init() method creates an ArrayList which is never used
|
HEAD contents of org.eclipse.jdt.ui: org.eclipse.jdt.internal.ui.refactoring.RefactoringSupport.AbstractRenameSupport.SelectionState.init() defined the following local variable which is never read. List parts = new ArrayList(); STEPS TO REPRODUCE: Compile your code with error on unused locals. You will find another error in: org.eclipse.jdt.internal.ui.refactoring.changes.ChangeExceptionHandler.RefactorErrorDialog.createMessageArea(...) and: org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.showErrorDialog(...). The status is never used.
|
resolved fixed
|
dac1b93
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T15:49:01Z | 2003-02-27T18:20:00Z |
org.eclipse.jdt.ui/ui
| |
33,454 |
Bug 33454 SelectionState init() method creates an ArrayList which is never used
|
HEAD contents of org.eclipse.jdt.ui: org.eclipse.jdt.internal.ui.refactoring.RefactoringSupport.AbstractRenameSupport.SelectionState.init() defined the following local variable which is never read. List parts = new ArrayList(); STEPS TO REPRODUCE: Compile your code with error on unused locals. You will find another error in: org.eclipse.jdt.internal.ui.refactoring.changes.ChangeExceptionHandler.RefactorErrorDialog.createMessageArea(...) and: org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.showErrorDialog(...). The status is never used.
|
resolved fixed
|
dac1b93
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T15:49:01Z | 2003-02-27T18:20:00Z |
refactoring/org/eclipse/jdt/internal/ui/refactoring/RefactoringWizardDialog2.java
| |
33,454 |
Bug 33454 SelectionState init() method creates an ArrayList which is never used
|
HEAD contents of org.eclipse.jdt.ui: org.eclipse.jdt.internal.ui.refactoring.RefactoringSupport.AbstractRenameSupport.SelectionState.init() defined the following local variable which is never read. List parts = new ArrayList(); STEPS TO REPRODUCE: Compile your code with error on unused locals. You will find another error in: org.eclipse.jdt.internal.ui.refactoring.changes.ChangeExceptionHandler.RefactorErrorDialog.createMessageArea(...) and: org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.showErrorDialog(...). The status is never used.
|
resolved fixed
|
dac1b93
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T15:49:01Z | 2003-02-27T18:20:00Z |
org.eclipse.jdt.ui/ui
| |
33,454 |
Bug 33454 SelectionState init() method creates an ArrayList which is never used
|
HEAD contents of org.eclipse.jdt.ui: org.eclipse.jdt.internal.ui.refactoring.RefactoringSupport.AbstractRenameSupport.SelectionState.init() defined the following local variable which is never read. List parts = new ArrayList(); STEPS TO REPRODUCE: Compile your code with error on unused locals. You will find another error in: org.eclipse.jdt.internal.ui.refactoring.changes.ChangeExceptionHandler.RefactorErrorDialog.createMessageArea(...) and: org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.showErrorDialog(...). The status is never used.
|
resolved fixed
|
dac1b93
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T15:49:01Z | 2003-02-27T18:20:00Z |
refactoring/org/eclipse/jdt/internal/ui/refactoring/changes/ChangeExceptionHandler.java
| |
33,631 |
Bug 33631 [refactoring] Self encapsulate field - label clipped
|
In the self encapsulate field dialog the label: "keep field reference" is clipped.
|
resolved fixed
|
e42a863
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T16:24:55Z | 2003-03-02T21:20:00Z |
org.eclipse.jdt.ui/ui
| |
33,631 |
Bug 33631 [refactoring] Self encapsulate field - label clipped
|
In the self encapsulate field dialog the label: "keep field reference" is clipped.
|
resolved fixed
|
e42a863
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T16:24:55Z | 2003-03-02T21:20:00Z |
refactoring/org/eclipse/jdt/internal/ui/refactoring/sef/SelfEncapsulateFieldInputPage.java
| |
32,687 |
Bug 32687 NPE after apply preference changes
|
build rc1, linux-motif, red hat 8, ibm jre 1.3.1 sr2 I had made some changes in my preferences (editor background colour, etc) and hit Apply. Then afterwards I hit OK to close the Preferences dialog and got the following NPE: !ENTRY org.eclipse.ui 4 4 Feb 24, 2003 11:23:07.830 !MESSAGE Unhandled exception caught in event loop. Unhandled exception caught in event loop. Reason: !ENTRY org.eclipse.ui 4 0 Feb 24, 2003 11:23:08.123 !MESSAGE java.lang.NullPointerException !STACK 0 java.lang.NullPointerException at org.eclipse.swt.widgets.Display.showToolTip(Display.java:2074) at org.eclipse.swt.widgets.Control.hoverProc(Control.java:993) at org.eclipse.swt.widgets.Control.hoverProc(Control.java:989) at org.eclipse.swt.widgets.Display.mouseHoverProc(Display.java:1555) at org.eclipse.swt.internal.motif.OS.XtAppNextEvent(Native Method) 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:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) java.lang.NullPointerException
|
resolved fixed
|
e912768
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T16:46:34Z | 2003-02-24T15:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/CPVariableElementLabelProvider.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.wizards.buildpaths;
import org.eclipse.core.runtime.IPath;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.jface.viewers.IColorProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages;
public class CPVariableElementLabelProvider extends LabelProvider implements IColorProvider {
private Image fJARImage;
private Image fFolderImage;
private boolean fShowResolvedVariables;
private Color fResolvedBackground;
public CPVariableElementLabelProvider(boolean showResolvedVariables) {
ImageRegistry reg= JavaPlugin.getDefault().getImageRegistry();
fJARImage= reg.get(JavaPluginImages.IMG_OBJS_EXTJAR);
fFolderImage= PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER);
fShowResolvedVariables= showResolvedVariables;
fResolvedBackground= null;
}
/*
* @see LabelProvider#getImage(java.lang.Object)
*/
public Image getImage(Object element) {
if (element instanceof CPVariableElement) {
CPVariableElement curr= (CPVariableElement) element;
IPath path= curr.getPath();
if (path.toFile().isFile()) {
return fJARImage;
}
return fFolderImage;
}
return super.getImage(element);
}
/*
* @see LabelProvider#getText(java.lang.Object)
*/
public String getText(Object element) {
if (element instanceof CPVariableElement) {
CPVariableElement curr= (CPVariableElement)element;
String name= curr.getName();
IPath path= curr.getPath();
StringBuffer buf= new StringBuffer(name);
if (curr.isReserved()) {
buf.append(' ');
buf.append(NewWizardMessages.getString("CPVariableElementLabelProvider.reserved")); //$NON-NLS-1$
}
if (path != null) {
buf.append(" - "); //$NON-NLS-1$
if (!path.isEmpty()) {
buf.append(path.toOSString());
} else {
buf.append(NewWizardMessages.getString("CPVariableElementLabelProvider.empty")); //$NON-NLS-1$
}
}
return buf.toString();
}
return super.getText(element);
}
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IColorProvider#getForeground(java.lang.Object)
*/
public Color getForeground(Object element) {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IColorProvider#getBackground(java.lang.Object)
*/
public Color getBackground(Object element) {
if (element instanceof CPVariableElement) {
CPVariableElement curr= (CPVariableElement) element;
if (!fShowResolvedVariables && curr.isReserved()) {
if (fResolvedBackground == null) {
Display display= Display.getCurrent();
fResolvedBackground= display.getSystemColor(SWT.COLOR_INFO_BACKGROUND);
}
return fResolvedBackground;
}
}
return null;
}
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
*/
public void dispose() {
if (fResolvedBackground != null) {
fResolvedBackground.dispose();
fResolvedBackground= null;
}
super.dispose();
}
}
|
33,722 |
Bug 33722 Failure creating new project
|
I get this error with the RC1 release. When I try to create a new project which uses a currently existing source directory, I get this exception, after which, if I cancel the new project wizard, I get a useless project (can't add anything to it at all): java.lang.reflect.InvocationTargetException: java.lang.NullPointerException at org.eclipse.jdt.internal.ui.wizards.ClassPathDetector.detectOutputFolder(ClassPathDetector.java:122) at org.eclipse.jdt.internal.ui.wizards.ClassPathDetector.detectClasspath(ClassPathDetector.java:78) at org.eclipse.jdt.internal.ui.wizards.ClassPathDetector.<init>(ClassPathDetector.java:57) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage.updateProject(NewProjectCreationWizardPage.java:118) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage$1.run(NewProjectCreationWizardPage.java:80) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:296) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:752) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage.changeToNewProject(NewProjectCreationWizardPage.java:88) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage.setVisible(NewProjectCreationWizardPage.java:58) at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:953) at org.eclipse.jface.wizard.WizardDialog.access$1(WizardDialog.java:934) at org.eclipse.jface.wizard.WizardDialog$3.run(WizardDialog.java:923) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:65) at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:921) at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:678) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:310) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:417) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.jface.window.Window.runEventLoop(Window.java:577) at org.eclipse.jface.window.Window.open(Window.java:557) at org.eclipse.ui.actions.NewProjectAction.run(NewProjectAction.java:107) at org.eclipse.jface.action.Action.runWithEvent(Action.java:841) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:456) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionContributionItem.java:403) at org.eclipse.jface.action.ActionContributionItem.access$0(ActionContributionItem.java:397) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1775) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1483) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1271) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1254) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539)
|
resolved fixed
|
dd86fc1
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T16:50:32Z | 2003-03-04T03:53:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/ClassPathDetector.java
|
package org.eclipse.jdt.internal.ui.wizards;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceProxy;
import org.eclipse.core.resources.IResourceProxyVisitor;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IPackageDeclaration;
import org.eclipse.jdt.core.JavaConventions;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.Signature;
import org.eclipse.jdt.core.ToolFactory;
import org.eclipse.jdt.core.compiler.CharOperation;
import org.eclipse.jdt.core.util.IClassFileReader;
import org.eclipse.jdt.core.util.ISourceAttribute;
import org.eclipse.jdt.ui.PreferenceConstants;
/**
*/
public class ClassPathDetector implements IResourceProxyVisitor {
private HashMap fSourceFolders;
private List fClassFiles;
private HashSet fJARFiles;
private IProject fProject;
private IPath fResultOutputFolder;
private IClasspathEntry[] fResultClasspath;
public ClassPathDetector(IProject project) throws CoreException {
fSourceFolders= new HashMap();
fJARFiles= new HashSet(10);
fClassFiles= new ArrayList(100);
fProject= project;
project.accept(this, IResource.NONE);
fResultClasspath= null;
fResultOutputFolder= null;
detectClasspath();
}
private boolean isNested(IPath path, Iterator iter) {
while (iter.hasNext()) {
IPath other= (IPath) iter.next();
if (other.isPrefixOf(path)) {
return true;
}
}
return false;
}
/**
* Method detectClasspath.
*/
private void detectClasspath() {
ArrayList cpEntries= new ArrayList();
detectSourceFolders(cpEntries);
IPath outputLocation= detectOutputFolder(cpEntries);
detectLibraries(cpEntries, outputLocation);
if (cpEntries.isEmpty() && fClassFiles.isEmpty()) {
return;
}
IClasspathEntry[] jreEntries= PreferenceConstants.getDefaultJRELibrary();
for (int i= 0; i < jreEntries.length; i++) {
cpEntries.add(jreEntries[i]);
}
IClasspathEntry[] entries= (IClasspathEntry[]) cpEntries.toArray(new IClasspathEntry[cpEntries.size()]);
if (!JavaConventions.validateClasspath(JavaCore.create(fProject), entries, outputLocation).isOK()) {
return;
}
fResultClasspath= entries;
fResultOutputFolder= outputLocation;
}
private IPath findInSourceFolders(IPath path) {
Iterator iter= fSourceFolders.keySet().iterator();
while (iter.hasNext()) {
Object key= iter.next();
List cus= (List) fSourceFolders.get(key);
if (cus.contains(path)) {
return (IPath) key;
}
}
return null;
}
private IPath detectOutputFolder(List entries) {
HashSet classFolders= new HashSet();
for (Iterator iter= fClassFiles.iterator(); iter.hasNext();) {
IFile file= (IFile) iter.next();
IPath location= file.getLocation();
if (location == null) {
continue;
}
IClassFileReader reader= ToolFactory.createDefaultClassFileReader(location.toOSString(), IClassFileReader.CLASSFILE_ATTRIBUTES);
char[] className= reader.getClassName();
ISourceAttribute sourceAttribute= reader.getSourceFileAttribute();
if (className != null && sourceAttribute != null && sourceAttribute.getSourceFileName() != null) {
IPath packPath= file.getParent().getFullPath();
int idx= CharOperation.lastIndexOf('/', className) + 1;
IPath relPath= new Path(new String(className, 0, idx));
IPath cuPath= relPath.append(new String(sourceAttribute.getSourceFileName()));
IPath resPath= null;
if (idx == 0) {
resPath= packPath;
} else {
IPath folderPath= getFolderPath(packPath, relPath);
if (folderPath != null) {
resPath= folderPath;
}
}
if (resPath != null) {
IPath path= findInSourceFolders(cuPath);
if (path != null) {
return resPath;
} else {
classFolders.add(resPath);
}
}
}
}
IPath projPath= fProject.getFullPath();
if (fSourceFolders.size() == 1 && classFolders.isEmpty() && fSourceFolders.get(projPath) != null) {
return projPath;
} else {
IPath path= projPath.append(PreferenceConstants.getPreferenceStore().getString(PreferenceConstants.SRCBIN_BINNAME));
while (classFolders.contains(path)) {
path= new Path(path.toString() + '1');
}
return path;
}
}
private void detectLibraries(ArrayList cpEntries, IPath outputLocation) {
Set sourceFolderSet= fSourceFolders.keySet();
for (Iterator iter= fJARFiles.iterator(); iter.hasNext();) {
IPath path= (IPath) iter.next();
if (isNested(path, sourceFolderSet.iterator())) {
continue;
}
if (outputLocation != null && outputLocation.isPrefixOf(path)) {
continue;
}
IClasspathEntry entry= JavaCore.newLibraryEntry(path, null, null);
cpEntries.add(entry);
}
}
private void detectSourceFolders(ArrayList resEntries) {
Set sourceFolderSet= fSourceFolders.keySet();
for (Iterator iter= sourceFolderSet.iterator(); iter.hasNext();) {
IPath path= (IPath) iter.next();
ArrayList excluded= new ArrayList();
for (Iterator inner= sourceFolderSet.iterator(); inner.hasNext();) {
IPath other= (IPath) inner.next();
if (!path.equals(other) && path.isPrefixOf(other)) {
IPath pathToExclude= other.removeFirstSegments(path.segmentCount()).addTrailingSeparator();
excluded.add(pathToExclude);
}
}
IPath[] excludedPaths= (IPath[]) excluded.toArray(new IPath[excluded.size()]);
IClasspathEntry entry= JavaCore.newSourceEntry(path, excludedPaths);
resEntries.add(entry);
}
}
private void visitCompilationUnit(IFile file) throws JavaModelException {
ICompilationUnit cu= JavaCore.createCompilationUnitFrom(file);
if (cu != null) {
ICompilationUnit workingCopy= null;
try {
workingCopy= (ICompilationUnit) cu.getWorkingCopy();
synchronized(workingCopy) {
workingCopy.reconcile();
}
IPath packPath= file.getParent().getFullPath();
IPackageDeclaration[] decls= workingCopy.getPackageDeclarations();
String cuName= file.getName();
if (decls.length == 0) {
addToMap(fSourceFolders, packPath, new Path(cuName));
} else {
IPath relpath= new Path(decls[0].getElementName().replace('.', '/'));
IPath folderPath= getFolderPath(packPath, relpath);
if (folderPath != null) {
addToMap(fSourceFolders, folderPath, relpath.append(cuName));
}
}
} finally {
if (workingCopy != null) {
workingCopy.destroy();
}
}
}
}
private void addToMap(HashMap map, IPath folderPath, IPath relPath) {
List list= (List) map.get(folderPath);
if (list == null) {
list= new ArrayList(50);
map.put(folderPath, list);
}
list.add(relPath);
}
private IPath getFolderPath(IPath packPath, IPath relpath) {
int remainingSegments= packPath.segmentCount() - relpath.segmentCount();
if (remainingSegments >= 0) {
IPath common= packPath.removeFirstSegments(remainingSegments);
if (common.equals(relpath)) {
return packPath.uptoSegment(remainingSegments);
}
}
return null;
}
/* (non-Javadoc)
* @see org.eclipse.core.resources.IResourceProxyVisitor#visit(org.eclipse.core.resources.IResourceProxy)
*/
public boolean visit(IResourceProxy proxy) throws CoreException {
if (proxy.getType() == IResource.FILE) {
String name= proxy.getName();
String extension= Signature.getSimpleName(name);
if ("java".equalsIgnoreCase(extension)) { //$NON-NLS-1$
visitCompilationUnit((IFile) proxy.requestResource());
} else if ("class".equalsIgnoreCase(extension)) { //$NON-NLS-1$
fClassFiles.add((IFile) proxy.requestResource());
} else if ("jar".equalsIgnoreCase(extension)) { //$NON-NLS-1$
fJARFiles.add(proxy.requestFullPath());
}
return false;
}
return true;
}
public IPath getOutputLocation() {
return fResultOutputFolder;
}
public IClasspathEntry[] getClasspath() {
return fResultClasspath;
}
}
|
32,993 |
Bug 32993 Preferences->Java->New Project uses different border for group box
|
RC 1
|
resolved fixed
|
2866a13
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2003-03-05T16:51:58Z | 2003-02-25T16:20:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/NewJavaProjectPreferencePage.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
// AW
package org.eclipse.jdt.internal.ui.preferences;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.NoSuchElementException;
import java.util.StringTokenizer;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Widget;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.JavaConventions;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jdt.ui.PreferenceConstants;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.dialogs.StatusInfo;
import org.eclipse.jdt.internal.ui.dialogs.StatusUtil;
/*
* The page for defaults for classpath entries in new java projects.
* See PreferenceConstants to access or change these values through public API.
*/
public class NewJavaProjectPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
private static final String SRCBIN_FOLDERS_IN_NEWPROJ= PreferenceConstants.SRCBIN_FOLDERS_IN_NEWPROJ;
private static final String SRCBIN_SRCNAME= PreferenceConstants.SRCBIN_SRCNAME;
private static final String SRCBIN_BINNAME= PreferenceConstants.SRCBIN_BINNAME;
private static final String CLASSPATH_JRELIBRARY_INDEX= PreferenceConstants.NEWPROJECT_JRELIBRARY_INDEX;
private static final String CLASSPATH_JRELIBRARY_LIST= PreferenceConstants.NEWPROJECT_JRELIBRARY_LIST;
public static IClasspathEntry[] getDefaultJRELibrary() {
IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore();
String str= store.getString(CLASSPATH_JRELIBRARY_LIST);
int index= store.getInt(CLASSPATH_JRELIBRARY_INDEX);
StringTokenizer tok= new StringTokenizer(str, ";"); //$NON-NLS-1$
while (tok.hasMoreTokens() && index > 0) {
tok.nextToken();
index--;
}
if (tok.hasMoreTokens()) {
IClasspathEntry[] res= decodeJRELibraryClasspathEntries(tok.nextToken());
if (res.length > 0) {
return res;
}
}
return new IClasspathEntry[] { getJREContainerEntry() };
}
// JRE Entry
public static String decodeJRELibraryDescription(String encoded) {
int end= encoded.indexOf(' ');
if (end != -1) {
return URLDecoder.decode(encoded.substring(0, end));
}
return ""; //$NON-NLS-1$
}
public static IClasspathEntry[] decodeJRELibraryClasspathEntries(String encoded) {
StringTokenizer tok= new StringTokenizer(encoded, " "); //$NON-NLS-1$
ArrayList res= new ArrayList();
while (tok.hasMoreTokens()) {
try {
tok.nextToken(); // desc: ignore
int kind= Integer.parseInt(tok.nextToken());
IPath path= decodePath(tok.nextToken());
IPath attachPath= decodePath(tok.nextToken());
IPath attachRoot= decodePath(tok.nextToken());
boolean isExported= Boolean.valueOf(tok.nextToken()).booleanValue();
switch (kind) {
case IClasspathEntry.CPE_SOURCE:
res.add(JavaCore.newSourceEntry(path));
break;
case IClasspathEntry.CPE_LIBRARY:
res.add(JavaCore.newLibraryEntry(path, attachPath, attachRoot, isExported));
break;
case IClasspathEntry.CPE_VARIABLE:
res.add(JavaCore.newVariableEntry(path, attachPath, attachRoot, isExported));
break;
case IClasspathEntry.CPE_PROJECT:
res.add(JavaCore.newProjectEntry(path, isExported));
break;
case IClasspathEntry.CPE_CONTAINER:
res.add(JavaCore.newContainerEntry(path, isExported));
break;
}
} catch (NumberFormatException e) {
String message= PreferencesMessages.getString("NewJavaProjectPreferencePage.error.decode"); //$NON-NLS-1$
JavaPlugin.log(new Status(Status.ERROR, JavaUI.ID_PLUGIN, Status.ERROR, message, e));
} catch (NoSuchElementException e) {
String message= PreferencesMessages.getString("NewJavaProjectPreferencePage.error.decode"); //$NON-NLS-1$
JavaPlugin.log(new Status(Status.ERROR, JavaUI.ID_PLUGIN, Status.ERROR, message, e));
}
}
return (IClasspathEntry[]) res.toArray(new IClasspathEntry[res.size()]);
}
public static String encodeJRELibrary(String desc, IClasspathEntry[] cpentries) {
StringBuffer buf= new StringBuffer();
for (int i= 0; i < cpentries.length; i++) {
IClasspathEntry entry= cpentries[i];
buf.append(URLEncoder.encode(desc));
buf.append(' ');
buf.append(entry.getEntryKind());
buf.append(' ');
buf.append(encodePath(entry.getPath()));
buf.append(' ');
buf.append(encodePath(entry.getSourceAttachmentPath()));
buf.append(' ');
buf.append(encodePath(entry.getSourceAttachmentRootPath()));
buf.append(' ');
buf.append(entry.isExported());
buf.append(' ');
}
return buf.toString();
}
private static String encodePath(IPath path) {
if (path == null) {
return "#"; //$NON-NLS-1$
} else if (path.isEmpty()) {
return "&"; //$NON-NLS-1$
} else {
return URLEncoder.encode(path.toString());
}
}
private static IPath decodePath(String str) {
if ("#".equals(str)) { //$NON-NLS-1$
return null;
} else if ("&".equals(str)) { //$NON-NLS-1$
return Path.EMPTY;
} else {
return new Path(URLDecoder.decode(str));
}
}
private ArrayList fCheckBoxes;
private ArrayList fRadioButtons;
private ArrayList fTextControls;
private SelectionListener fSelectionListener;
private ModifyListener fModifyListener;
private Text fBinFolderNameText;
private Text fSrcFolderNameText;
private Combo fJRECombo;
private Button fProjectAsSourceFolder;
private Button fFoldersAsSourceFolder;
private Label fSrcFolderNameLabel;
private Label fBinFolderNameLabel;
public NewJavaProjectPreferencePage() {
super();
setPreferenceStore(JavaPlugin.getDefault().getPreferenceStore());
setDescription(PreferencesMessages.getString("NewJavaProjectPreferencePage.description")); //$NON-NLS-1$
fRadioButtons= new ArrayList();
fCheckBoxes= new ArrayList();
fTextControls= new ArrayList();
fSelectionListener= new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {}
public void widgetSelected(SelectionEvent e) {
controlChanged(e.widget);
}
};
fModifyListener= new ModifyListener() {
public void modifyText(ModifyEvent e) {
controlModified(e.widget);
}
};
}
public static void initDefaults(IPreferenceStore store) {
store.setDefault(SRCBIN_FOLDERS_IN_NEWPROJ, false);
store.setDefault(SRCBIN_SRCNAME, "src"); //$NON-NLS-1$
store.setDefault(SRCBIN_BINNAME, "bin"); //$NON-NLS-1$
store.setDefault(CLASSPATH_JRELIBRARY_LIST, getDefaultJRELibraries());
store.setDefault(CLASSPATH_JRELIBRARY_INDEX, 0); //$NON-NLS-1$
}
private static String getDefaultJRELibraries() {
StringBuffer buf= new StringBuffer();
IClasspathEntry cntentry= getJREContainerEntry();
buf.append(encodeJRELibrary(PreferencesMessages.getString("NewJavaProjectPreferencePage.jre_container.description"), new IClasspathEntry[] { cntentry} )); //$NON-NLS-1$
buf.append(';');
IClasspathEntry varentry= getJREVariableEntry();
buf.append(encodeJRELibrary(PreferencesMessages.getString("NewJavaProjectPreferencePage.jre_variable.description"), new IClasspathEntry[] { varentry })); //$NON-NLS-1$
buf.append(';');
return buf.toString();
}
private static IClasspathEntry getJREContainerEntry() {
return JavaCore.newContainerEntry(new Path("org.eclipse.jdt.launching.JRE_CONTAINER")); //$NON-NLS-1$
}
private static IClasspathEntry getJREVariableEntry() {
return JavaCore.newVariableEntry(new Path("JRE_LIB"), new Path("JRE_SRC"), new Path("JRE_SRCROOT")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
/*
* @see IWorkbenchPreferencePage#init(IWorkbench)
*/
public void init(IWorkbench workbench) {
}
/**
* @see PreferencePage#createControl(Composite)
*/
public void createControl(Composite parent) {
super.createControl(parent);
WorkbenchHelp.setHelp(getControl(), IJavaHelpContextIds.NEW_JAVA_PROJECT_PREFERENCE_PAGE);
}
private Button addRadioButton(Composite parent, String label, String key, String value, int indent) {
GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gd.horizontalSpan= 2;
gd.horizontalIndent= indent;
Button button= new Button(parent, SWT.RADIO);
button.setText(label);
button.setData(new String[] { key, value });
button.setLayoutData(gd);
button.setSelection(value.equals(getPreferenceStore().getString(key)));
fRadioButtons.add(button);
return button;
}
private Text addTextControl(Composite parent, Label labelControl, String key, int indent) {
GridData gd= new GridData();
gd.horizontalIndent= indent;
labelControl.setLayoutData(gd);
gd= new GridData(GridData.FILL_HORIZONTAL);
gd.widthHint= convertWidthInCharsToPixels(40);
Text text= new Text(parent, SWT.SINGLE | SWT.BORDER);
text.setText(getPreferenceStore().getString(key));
text.setData(key);
text.setLayoutData(gd);
fTextControls.add(text);
return text;
}
protected Control createContents(Composite parent) {
initializeDialogUnits(parent);
Composite result= new Composite(parent, SWT.NONE);
GridLayout layout= new GridLayout();
layout.marginHeight= convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
layout.marginWidth= 0;
layout.verticalSpacing= convertVerticalDLUsToPixels(10);
layout.horizontalSpacing= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
layout.numColumns= 2;
result.setLayout(layout);
GridData gd= new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan= 2;
Group sourceFolderGroup= new Group(result, SWT.WRAP);
layout= new GridLayout();
layout.numColumns= 2;
sourceFolderGroup.setLayout(layout);
sourceFolderGroup.setLayoutData(gd);
sourceFolderGroup.setText(PreferencesMessages.getString("NewJavaProjectPreferencePage.sourcefolder.label")); //$NON-NLS-1$
int indent= 0;
fProjectAsSourceFolder= addRadioButton(sourceFolderGroup, PreferencesMessages.getString("NewJavaProjectPreferencePage.sourcefolder.project"), SRCBIN_FOLDERS_IN_NEWPROJ, IPreferenceStore.FALSE, indent); //$NON-NLS-1$
fProjectAsSourceFolder.addSelectionListener(fSelectionListener);
fFoldersAsSourceFolder= addRadioButton(sourceFolderGroup, PreferencesMessages.getString("NewJavaProjectPreferencePage.sourcefolder.folder"), SRCBIN_FOLDERS_IN_NEWPROJ, IPreferenceStore.TRUE, indent); //$NON-NLS-1$
fFoldersAsSourceFolder.addSelectionListener(fSelectionListener);
indent= convertWidthInCharsToPixels(4);
fSrcFolderNameLabel= new Label(sourceFolderGroup, SWT.NONE);
fSrcFolderNameLabel.setText(PreferencesMessages.getString("NewJavaProjectPreferencePage.folders.src")); //$NON-NLS-1$
fSrcFolderNameText= addTextControl(sourceFolderGroup, fSrcFolderNameLabel, SRCBIN_SRCNAME, indent); //$NON-NLS-1$
fSrcFolderNameText.addModifyListener(fModifyListener);
fBinFolderNameLabel= new Label(sourceFolderGroup, SWT.NONE);
fBinFolderNameLabel.setText(PreferencesMessages.getString("NewJavaProjectPreferencePage.folders.bin")); //$NON-NLS-1$
fBinFolderNameText= addTextControl(sourceFolderGroup, fBinFolderNameLabel, SRCBIN_BINNAME, indent); //$NON-NLS-1$
fBinFolderNameText.addModifyListener(fModifyListener);
String[] jreNames= getJRENames();
if (jreNames.length > 0) {
Label jreSelectionLabel= new Label(result, SWT.NONE);
jreSelectionLabel.setText(PreferencesMessages.getString("NewJavaProjectPreferencePage.jrelibrary.label")); //$NON-NLS-1$
jreSelectionLabel.setLayoutData(new GridData());
int index= getPreferenceStore().getInt(CLASSPATH_JRELIBRARY_INDEX);
fJRECombo= new Combo(result, SWT.READ_ONLY);
fJRECombo.setItems(jreNames);
fJRECombo.select(index);
fJRECombo.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
}
validateFolders();
return result;
}
private void validateFolders() {
boolean useFolders= fFoldersAsSourceFolder.getSelection();
fSrcFolderNameText.setEnabled(useFolders);
fBinFolderNameText.setEnabled(useFolders);
fSrcFolderNameLabel.setEnabled(useFolders);
fBinFolderNameLabel.setEnabled(useFolders);
if (useFolders) {
String srcName= fSrcFolderNameText.getText();
String binName= fBinFolderNameText.getText();
if (srcName.length() + binName.length() == 0) {
updateStatus(new StatusInfo(IStatus.ERROR, PreferencesMessages.getString("NewJavaProjectPreferencePage.folders.error.namesempty"))); //$NON-NLS-1$
return;
}
IWorkspace workspace= JavaPlugin.getWorkspace();
IProject dmy= workspace.getRoot().getProject("project"); //$NON-NLS-1$
IStatus status;
IPath srcPath= dmy.getFullPath().append(srcName);
if (srcName.length() != 0) {
status= workspace.validatePath(srcPath.toString(), IResource.FOLDER);
if (!status.isOK()) {
String message= PreferencesMessages.getFormattedString("NewJavaProjectPreferencePage.folders.error.invalidsrcname", status.getMessage()); //$NON-NLS-1$
updateStatus(new StatusInfo(IStatus.ERROR, message));
return;
}
}
IPath binPath= dmy.getFullPath().append(binName);
if (binName.length() != 0) {
status= workspace.validatePath(binPath.toString(), IResource.FOLDER);
if (!status.isOK()) {
String message= PreferencesMessages.getFormattedString("NewJavaProjectPreferencePage.folders.error.invalidbinname", status.getMessage()); //$NON-NLS-1$
updateStatus(new StatusInfo(IStatus.ERROR, message));
return;
}
}
IClasspathEntry entry= JavaCore.newSourceEntry(srcPath);
status= JavaConventions.validateClasspath(JavaCore.create(dmy), new IClasspathEntry[] { entry }, binPath);
if (!status.isOK()) {
String message= PreferencesMessages.getString("NewJavaProjectPreferencePage.folders.error.invalidcp"); //$NON-NLS-1$
updateStatus(new StatusInfo(IStatus.ERROR, message));
return;
}
}
updateStatus(new StatusInfo()); // set to OK
}
private void updateStatus(IStatus status) {
setValid(!status.matches(IStatus.ERROR));
StatusUtil.applyToStatusLine(this, status);
}
private void controlChanged(Widget widget) {
if (widget == fFoldersAsSourceFolder || widget == fProjectAsSourceFolder) {
validateFolders();
}
}
private void controlModified(Widget widget) {
if (widget == fSrcFolderNameText || widget == fBinFolderNameText) {
validateFolders();
}
}
/*
* @see PreferencePage#performDefaults()
*/
protected void performDefaults() {
IPreferenceStore store= getPreferenceStore();
for (int i= 0; i < fCheckBoxes.size(); i++) {
Button button= (Button) fCheckBoxes.get(i);
String key= (String) button.getData();
button.setSelection(store.getDefaultBoolean(key));
}
for (int i= 0; i < fRadioButtons.size(); i++) {
Button button= (Button) fRadioButtons.get(i);
String[] info= (String[]) button.getData();
button.setSelection(info[1].equals(store.getDefaultString(info[0])));
}
for (int i= 0; i < fTextControls.size(); i++) {
Text text= (Text) fTextControls.get(i);
String key= (String) text.getData();
text.setText(store.getDefaultString(key));
}
if (fJRECombo != null) {
fJRECombo.select(store.getDefaultInt(CLASSPATH_JRELIBRARY_INDEX));
}
validateFolders();
super.performDefaults();
}
/*
* @see IPreferencePage#performOk()
*/
public boolean performOk() {
IPreferenceStore store= getPreferenceStore();
for (int i= 0; i < fCheckBoxes.size(); i++) {
Button button= (Button) fCheckBoxes.get(i);
String key= (String) button.getData();
store.setValue(key, button.getSelection());
}
for (int i= 0; i < fRadioButtons.size(); i++) {
Button button= (Button) fRadioButtons.get(i);
if (button.getSelection()) {
String[] info= (String[]) button.getData();
store.setValue(info[0], info[1]);
}
}
for (int i= 0; i < fTextControls.size(); i++) {
Text text= (Text) fTextControls.get(i);
String key= (String) text.getData();
store.setValue(key, text.getText());
}
if (fJRECombo != null) {
store.setValue(CLASSPATH_JRELIBRARY_INDEX, fJRECombo.getSelectionIndex());
}
JavaPlugin.getDefault().savePluginPreferences();
return super.performOk();
}
private String[] getJRENames() {
String prefString= getPreferenceStore().getString(CLASSPATH_JRELIBRARY_LIST);
ArrayList list= new ArrayList();
StringTokenizer tok= new StringTokenizer(prefString, ";"); //$NON-NLS-1$
while (tok.hasMoreTokens()) {
list.add(decodeJRELibraryDescription(tok.nextToken()));
}
return (String[]) list.toArray(new String[list.size()]);
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.