issue_id
int64 2.04k
425k
| title
stringlengths 9
251
| body
stringlengths 4
32.8k
⌀ | status
stringclasses 6
values | after_fix_sha
stringlengths 7
7
| project_name
stringclasses 6
values | repo_url
stringclasses 6
values | repo_name
stringclasses 6
values | language
stringclasses 1
value | issue_url
null | before_fix_sha
null | pull_url
null | commit_datetime
unknown | report_datetime
unknown | updated_file
stringlengths 23
187
| chunk_content
stringlengths 1
22k
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5,062 | Bug 5062 Walkback in Synchronize clicking on 'Two way compare (ignore ancestor)' | - Load a java project from a repository - Edit several java files in the project, deleting several methods (I am not sure if it is important, but there were methods added as well) - Synchronize - Double-click on the first modified java file so you can see the Structured Compare view - Now click on the 'Two way compare (ignore ancestor)' button - Internal error, Walkbacks in the log (pasted below) I have never clicked on that button before, so I don't even know what it does. Log: Tue Oct 16 19:57:10 EDT 2001 4 org.eclipse.jdt.core 969 main does not exist. Log: Tue Oct 16 19:57:10 EDT 2001 4 org.eclipse.jdt.ui 1 Internal Error Java Model Exception: Java Model Status [main does not exist.] at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException (JavaElement.java:442) at org.eclipse.jdt.internal.core.JavaElement.openHierarchy (JavaElement.java:471) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo (JavaElement.java(Compiled Code)) at org.eclipse.jdt.internal.core.Member.getFlags(Member.java:83) at org.eclipse.jdt.internal.ui.viewsupport.JavaImageLabelProvider.computeBaseImageD escriptor(JavaImageLabelProvider.java:117) at org.eclipse.jdt.internal.ui.viewsupport.JavaImageLabelProvider.getLabelImage (JavaImageLabelProvider.java:91) at org.eclipse.jdt.ui.JavaElementLabelProvider.getImage (JavaElementLabelProvider.java:159) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java:91) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java:97) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.doUpdateError Ticks(JavaOutlineErrorTickUpdater.java:83) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.access$0 (JavaOutlineErrorTickUpdater.java:73) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater$1.run (JavaOutlineErrorTickUpdater.java:67) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block (ModalContext.java:133) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:258) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run (ProgressMonitorDialog.java:335) at org.eclipse.vcm.internal.ui.ResourceLoader.loadResources (ResourceLoader.java:320) at org.eclipse.vcm.internal.ui.actions.ReplaceWithAction.run (ReplaceWithAction.java:75) at org.eclipse.ui.internal.PluginAction.run(PluginAction.java:125) at org.eclipse.jface.action.Action.runWithEvent(Action.java:451) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:658) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306) 4 org.eclipse.jdt.core 969 main does not exist. Log: Tue Oct 16 19:57:10 EDT 2001 4 org.eclipse.jdt.core 969 suite does not exist. Log: Tue Oct 16 19:57:10 EDT 2001 4 org.eclipse.jdt.ui 1 Internal Error Java Model Exception: Java Model Status [suite does not exist.] at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException (JavaElement.java:442) at org.eclipse.jdt.internal.core.JavaElement.openHierarchy (JavaElement.java:471) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo (JavaElement.java(Compiled Code)) at org.eclipse.jdt.internal.core.Member.getFlags(Member.java:83) at org.eclipse.jdt.internal.ui.viewsupport.JavaImageLabelProvider.computeBaseImageD escriptor(JavaImageLabelProvider.java:117) at org.eclipse.jdt.internal.ui.viewsupport.JavaImageLabelProvider.getLabelImage (JavaImageLabelProvider.java:91) at org.eclipse.jdt.ui.JavaElementLabelProvider.getImage (JavaElementLabelProvider.java:159) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java:91) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java:97) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.doUpdateError Ticks(JavaOutlineErrorTickUpdater.java:83) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.access$0 (JavaOutlineErrorTickUpdater.java:73) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater$1.run (JavaOutlineErrorTickUpdater.java:67) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block (ModalContext.java:133) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:258) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run (ProgressMonitorDialog.java:335) at org.eclipse.vcm.internal.ui.ResourceLoader.loadResources (ResourceLoader.java:320) at org.eclipse.vcm.internal.ui.actions.ReplaceWithAction.run (ReplaceWithAction.java:75) at org.eclipse.ui.internal.PluginAction.run(PluginAction.java:125) at org.eclipse.jface.action.Action.runWithEvent(Action.java:451) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:658) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306) 4 org.eclipse.jdt.core 969 suite does not exist. Log: Tue Oct 16 19:57:10 EDT 2001 4 org.eclipse.jdt.core 969 runTest does not exist. Log: Tue Oct 16 19:57:10 EDT 2001 4 org.eclipse.jdt.ui 1 Internal Error Java Model Exception: Java Model Status [runTest does not exist.] at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException (JavaElement.java:442) at org.eclipse.jdt.internal.core.JavaElement.openHierarchy (JavaElement.java:471) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo (JavaElement.java(Compiled Code)) at org.eclipse.jdt.internal.core.Member.getFlags(Member.java:83) at org.eclipse.jdt.internal.ui.viewsupport.JavaImageLabelProvider.computeBaseImageD escriptor(JavaImageLabelProvider.java:117) at org.eclipse.jdt.internal.ui.viewsupport.JavaImageLabelProvider.getLabelImage (JavaImageLabelProvider.java:91) at org.eclipse.jdt.ui.JavaElementLabelProvider.getImage (JavaElementLabelProvider.java:159) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java:91) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java:97) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.doUpdateError Ticks(JavaOutlineErrorTickUpdater.java:83) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.access$0 (JavaOutlineErrorTickUpdater.java:73) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater$1.run (JavaOutlineErrorTickUpdater.java:67) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block (ModalContext.java:133) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:258) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run (ProgressMonitorDialog.java:335) at org.eclipse.vcm.internal.ui.ResourceLoader.loadResources (ResourceLoader.java:320) at org.eclipse.vcm.internal.ui.actions.ReplaceWithAction.run (ReplaceWithAction.java:75) at org.eclipse.ui.internal.PluginAction.run(PluginAction.java:125) at org.eclipse.jface.action.Action.runWithEvent(Action.java:451) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:658) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306) 4 org.eclipse.jdt.core 969 runTest does not exist. Log: Tue Oct 16 19:57:10 EDT 2001 4 org.eclipse.jdt.core 969 test_checkSubclass does not exist. Log: Tue Oct 16 19:57:10 EDT 2001 4 org.eclipse.jdt.ui 1 Internal Error Java Model Exception: Java Model Status [test_checkSubclass does not exist.] at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException (JavaElement.java:442) at org.eclipse.jdt.internal.core.JavaElement.openHierarchy (JavaElement.java:471) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo (JavaElement.java(Compiled Code)) at org.eclipse.jdt.internal.core.Member.getFlags(Member.java:83) at org.eclipse.jdt.internal.ui.viewsupport.JavaImageLabelProvider.computeBaseImageD escriptor(JavaImageLabelProvider.java:117) at org.eclipse.jdt.internal.ui.viewsupport.JavaImageLabelProvider.getLabelImage (JavaImageLabelProvider.java:91) at org.eclipse.jdt.ui.JavaElementLabelProvider.getImage (JavaElementLabelProvider.java:159) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java:91) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java:97) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.doUpdateError Ticks(JavaOutlineErrorTickUpdater.java:83) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.access$0 (JavaOutlineErrorTickUpdater.java:73) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater$1.run (JavaOutlineErrorTickUpdater.java:67) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block (ModalContext.java:133) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:258) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run (ProgressMonitorDialog.java:335) at org.eclipse.vcm.internal.ui.ResourceLoader.loadResources (ResourceLoader.java:320) at org.eclipse.vcm.internal.ui.actions.ReplaceWithAction.run (ReplaceWithAction.java:75) at org.eclipse.ui.internal.PluginAction.run(PluginAction.java:125) at org.eclipse.jface.action.Action.runWithEvent(Action.java:451) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:658) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306) 4 org.eclipse.jdt.core 969 test_checkSubclass does not exist. Log: Tue Oct 16 19:57:10 EDT 2001 4 org.eclipse.jdt.core 969 test_ConstructorLorg_eclipse_swt_widgets_WidgetI does not exist. Log: Tue Oct 16 19:57:10 EDT 2001 4 org.eclipse.jdt.ui 1 Internal Error Java Model Exception: Java Model Status [test_ConstructorLorg_eclipse_swt_widgets_WidgetI does not exist.] at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException (JavaElement.java:442) at org.eclipse.jdt.internal.core.JavaElement.openHierarchy (JavaElement.java:471) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo (JavaElement.java(Compiled Code)) at org.eclipse.jdt.internal.core.Member.getFlags(Member.java:83) at org.eclipse.jdt.internal.ui.viewsupport.JavaImageLabelProvider.computeBaseImageD escriptor(JavaImageLabelProvider.java:117) at org.eclipse.jdt.internal.ui.viewsupport.JavaImageLabelProvider.getLabelImage (JavaImageLabelProvider.java:91) at org.eclipse.jdt.ui.JavaElementLabelProvider.getImage (JavaElementLabelProvider.java:159) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java:91) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java:97) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.doUpdateError Ticks(JavaOutlineErrorTickUpdater.java:83) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.access$0 (JavaOutlineErrorTickUpdater.java:73) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater$1.run (JavaOutlineErrorTickUpdater.java:67) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block (ModalContext.java:133) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:258) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run (ProgressMonitorDialog.java:335) at org.eclipse.vcm.internal.ui.ResourceLoader.loadResources (ResourceLoader.java:320) at org.eclipse.vcm.internal.ui.actions.ReplaceWithAction.run (ReplaceWithAction.java:75) at org.eclipse.ui.internal.PluginAction.run(PluginAction.java:125) at org.eclipse.jface.action.Action.runWithEvent(Action.java:451) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:658) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306) 4 org.eclipse.jdt.core 969 test_ConstructorLorg_eclipse_swt_widgets_WidgetI does not exist. Log: Tue Oct 16 19:57:11 EDT 2001 4 org.eclipse.jdt.core 969 test_ConstructorLorg_eclipse_swt_widgets_WidgetII does not exist. Log: Tue Oct 16 19:57:11 EDT 2001 4 org.eclipse.jdt.ui 1 Internal Error Java Model Exception: Java Model Status [test_ConstructorLorg_eclipse_swt_widgets_WidgetII does not exist.] at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException (JavaElement.java:442) at org.eclipse.jdt.internal.core.JavaElement.openHierarchy (JavaElement.java:471) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo (JavaElement.java(Compiled Code)) at org.eclipse.jdt.internal.core.Member.getFlags(Member.java:83) at org.eclipse.jdt.internal.ui.viewsupport.JavaImageLabelProvider.computeBaseImageD escriptor(JavaImageLabelProvider.java:117) at org.eclipse.jdt.internal.ui.viewsupport.JavaImageLabelProvider.getLabelImage (JavaImageLabelProvider.java:91) at org.eclipse.jdt.ui.JavaElementLabelProvider.getImage (JavaElementLabelProvider.java:159) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java:91) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java:97) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.doUpdateError Ticks(JavaOutlineErrorTickUpdater.java:83) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.access$0 (JavaOutlineErrorTickUpdater.java:73) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater$1.run (JavaOutlineErrorTickUpdater.java:67) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block (ModalContext.java:133) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:258) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run (ProgressMonitorDialog.java:335) at org.eclipse.vcm.internal.ui.ResourceLoader.loadResources (ResourceLoader.java:320) at org.eclipse.vcm.internal.ui.actions.ReplaceWithAction.run (ReplaceWithAction.java:75) at org.eclipse.ui.internal.PluginAction.run(PluginAction.java:125) at org.eclipse.jface.action.Action.runWithEvent(Action.java:451) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:658) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306) 4 org.eclipse.jdt.core 969 test_ConstructorLorg_eclipse_swt_widgets_WidgetII does not exist. Log: Tue Oct 16 23:14:15 EDT 2001 4 org.eclipse.jdt.core 969 suite does not exist. Log: Tue Oct 16 23:14:15 EDT 2001 4 org.eclipse.jdt.ui 1 Internal Error Java Model Exception: Java Model Status [suite does not exist.] at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException (JavaElement.java:442) at org.eclipse.jdt.internal.core.JavaElement.openHierarchy (JavaElement.java:471) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo (JavaElement.java(Compiled Code)) at org.eclipse.jdt.internal.core.Member.getFlags(Member.java(Compiled Code)) at org.eclipse.jdt.internal.ui.viewsupport.JavaImageLabelProvider.computeBaseImageD escriptor(JavaImageLabelProvider.java(Compiled Code)) at org.eclipse.jdt.internal.ui.viewsupport.JavaImageLabelProvider.getLabelImage (JavaImageLabelProvider.java(Compiled Code)) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java(Compiled Code)) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java(Compiled Code)) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java(Compiled Code)) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.doUpdateError Ticks(JavaOutlineErrorTickUpdater.java:83) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.access$0 (JavaOutlineErrorTickUpdater.java:73) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater$1.run (JavaOutlineErrorTickUpdater.java:67) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java(Compiled Code)) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block (ModalContext.java(Compiled Code)) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:258) at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:713) at org.eclipse.ui.wizards.datatransfer.WizardFileSystemResourceImportPage1.executeI mportOperation(WizardFileSystemResourceImportPage1.java:303) at org.eclipse.ui.wizards.datatransfer.WizardFileSystemResourceImportPage1.importRe sources(WizardFileSystemResourceImportPage1.java:522) at org.eclipse.ui.wizards.datatransfer.WizardFileSystemResourceImportPage1.finish (WizardFileSystemResourceImportPage1.java:343) at org.eclipse.ui.wizards.datatransfer.FileSystemImportWizard.performFinish (FileSystemImportWizard.java:102) at org.eclipse.jface.wizard.WizardDialog.finishPressed (WizardDialog.java:570) at org.eclipse.jface.wizard.WizardDialog.buttonPressed (WizardDialog.java:311) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:211) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.ImportResourcesAction.run (ImportResourcesAction.java:62) at org.eclipse.jface.action.Action.runWithEvent(Action.java:451) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:658) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306) 4 org.eclipse.jdt.core 969 suite does not exist. Log: Wed Oct 17 22:26:00 EDT 2001 1 org.eclipse.core.resources 4 Unhandled exception caught in event loop. Log: Wed Oct 17 22:26:00 EDT 2001 4 org.eclipse.ui 0 Argument not valid java.lang.IllegalArgumentException: Argument not valid at org.eclipse.swt.SWT.error(SWT.java:1791) at org.eclipse.swt.custom.StyledText.setLineBackground(StyledText.java (Compiled Code)) at org.eclipse.swt.custom.StyledText.setLineBackground(StyledText.java (Compiled Code)) at org.eclipse.compare.contentmergeviewer.TextMergeViewer.doDiff (TextMergeViewer.java(Compiled Code)) at org.eclipse.compare.contentmergeviewer.TextMergeViewer.doDiff (TextMergeViewer.java(Compiled Code)) at org.eclipse.compare.contentmergeviewer.TextMergeViewer.doDiff (TextMergeViewer.java(Compiled Code)) at org.eclipse.compare.contentmergeviewer.TextMergeViewer.setIgnoreAncestor (TextMergeViewer.java:1586) at org.eclipse.compare.contentmergeviewer.TextMergeViewer.access$19 (TextMergeViewer.java:1576) at org.eclipse.compare.contentmergeviewer.TextMergeViewer$15.run (TextMergeViewer.java:1481) at org.eclipse.jface.action.Action.runWithEvent(Action.java:451) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:658) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306) | resolved fixed | 180e359 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T09:58:43Z" | "2001-10-18T01:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemItemMapper.java | }
/**
* Clears the map.
*/
public void clearMap() {
fPathToItem.clear();
}
/**
* Method that decides which elements can have error markers
* Returns null if an element can not have error markers.
*/
private static IPath getCorrespondingPath(Object element) {
if (element instanceof IJavaElement) {
return getJavaElementPath((IJavaElement)element);
}
return null;
}
/**
* Gets the path of the underlying resource without throwing
* a JavaModelException if the resource does not exist.
*/
private static IPath getJavaElementPath(IJavaElement elem) {
switch (elem.getElementType()) {
case IJavaElement.JAVA_MODEL:
return null;
case IJavaElement.JAVA_PROJECT:
return ((IJavaProject)elem).getProject().getFullPath(); |
5,062 | Bug 5062 Walkback in Synchronize clicking on 'Two way compare (ignore ancestor)' | - Load a java project from a repository - Edit several java files in the project, deleting several methods (I am not sure if it is important, but there were methods added as well) - Synchronize - Double-click on the first modified java file so you can see the Structured Compare view - Now click on the 'Two way compare (ignore ancestor)' button - Internal error, Walkbacks in the log (pasted below) I have never clicked on that button before, so I don't even know what it does. Log: Tue Oct 16 19:57:10 EDT 2001 4 org.eclipse.jdt.core 969 main does not exist. Log: Tue Oct 16 19:57:10 EDT 2001 4 org.eclipse.jdt.ui 1 Internal Error Java Model Exception: Java Model Status [main does not exist.] at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException (JavaElement.java:442) at org.eclipse.jdt.internal.core.JavaElement.openHierarchy (JavaElement.java:471) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo (JavaElement.java(Compiled Code)) at org.eclipse.jdt.internal.core.Member.getFlags(Member.java:83) at org.eclipse.jdt.internal.ui.viewsupport.JavaImageLabelProvider.computeBaseImageD escriptor(JavaImageLabelProvider.java:117) at org.eclipse.jdt.internal.ui.viewsupport.JavaImageLabelProvider.getLabelImage (JavaImageLabelProvider.java:91) at org.eclipse.jdt.ui.JavaElementLabelProvider.getImage (JavaElementLabelProvider.java:159) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java:91) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java:97) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.doUpdateError Ticks(JavaOutlineErrorTickUpdater.java:83) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.access$0 (JavaOutlineErrorTickUpdater.java:73) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater$1.run (JavaOutlineErrorTickUpdater.java:67) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block (ModalContext.java:133) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:258) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run (ProgressMonitorDialog.java:335) at org.eclipse.vcm.internal.ui.ResourceLoader.loadResources (ResourceLoader.java:320) at org.eclipse.vcm.internal.ui.actions.ReplaceWithAction.run (ReplaceWithAction.java:75) at org.eclipse.ui.internal.PluginAction.run(PluginAction.java:125) at org.eclipse.jface.action.Action.runWithEvent(Action.java:451) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:658) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306) 4 org.eclipse.jdt.core 969 main does not exist. Log: Tue Oct 16 19:57:10 EDT 2001 4 org.eclipse.jdt.core 969 suite does not exist. Log: Tue Oct 16 19:57:10 EDT 2001 4 org.eclipse.jdt.ui 1 Internal Error Java Model Exception: Java Model Status [suite does not exist.] at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException (JavaElement.java:442) at org.eclipse.jdt.internal.core.JavaElement.openHierarchy (JavaElement.java:471) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo (JavaElement.java(Compiled Code)) at org.eclipse.jdt.internal.core.Member.getFlags(Member.java:83) at org.eclipse.jdt.internal.ui.viewsupport.JavaImageLabelProvider.computeBaseImageD escriptor(JavaImageLabelProvider.java:117) at org.eclipse.jdt.internal.ui.viewsupport.JavaImageLabelProvider.getLabelImage (JavaImageLabelProvider.java:91) at org.eclipse.jdt.ui.JavaElementLabelProvider.getImage (JavaElementLabelProvider.java:159) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java:91) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java:97) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.doUpdateError Ticks(JavaOutlineErrorTickUpdater.java:83) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.access$0 (JavaOutlineErrorTickUpdater.java:73) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater$1.run (JavaOutlineErrorTickUpdater.java:67) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block (ModalContext.java:133) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:258) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run (ProgressMonitorDialog.java:335) at org.eclipse.vcm.internal.ui.ResourceLoader.loadResources (ResourceLoader.java:320) at org.eclipse.vcm.internal.ui.actions.ReplaceWithAction.run (ReplaceWithAction.java:75) at org.eclipse.ui.internal.PluginAction.run(PluginAction.java:125) at org.eclipse.jface.action.Action.runWithEvent(Action.java:451) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:658) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306) 4 org.eclipse.jdt.core 969 suite does not exist. Log: Tue Oct 16 19:57:10 EDT 2001 4 org.eclipse.jdt.core 969 runTest does not exist. Log: Tue Oct 16 19:57:10 EDT 2001 4 org.eclipse.jdt.ui 1 Internal Error Java Model Exception: Java Model Status [runTest does not exist.] at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException (JavaElement.java:442) at org.eclipse.jdt.internal.core.JavaElement.openHierarchy (JavaElement.java:471) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo (JavaElement.java(Compiled Code)) at org.eclipse.jdt.internal.core.Member.getFlags(Member.java:83) at org.eclipse.jdt.internal.ui.viewsupport.JavaImageLabelProvider.computeBaseImageD escriptor(JavaImageLabelProvider.java:117) at org.eclipse.jdt.internal.ui.viewsupport.JavaImageLabelProvider.getLabelImage (JavaImageLabelProvider.java:91) at org.eclipse.jdt.ui.JavaElementLabelProvider.getImage (JavaElementLabelProvider.java:159) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java:91) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java:97) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.doUpdateError Ticks(JavaOutlineErrorTickUpdater.java:83) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.access$0 (JavaOutlineErrorTickUpdater.java:73) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater$1.run (JavaOutlineErrorTickUpdater.java:67) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block (ModalContext.java:133) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:258) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run (ProgressMonitorDialog.java:335) at org.eclipse.vcm.internal.ui.ResourceLoader.loadResources (ResourceLoader.java:320) at org.eclipse.vcm.internal.ui.actions.ReplaceWithAction.run (ReplaceWithAction.java:75) at org.eclipse.ui.internal.PluginAction.run(PluginAction.java:125) at org.eclipse.jface.action.Action.runWithEvent(Action.java:451) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:658) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306) 4 org.eclipse.jdt.core 969 runTest does not exist. Log: Tue Oct 16 19:57:10 EDT 2001 4 org.eclipse.jdt.core 969 test_checkSubclass does not exist. Log: Tue Oct 16 19:57:10 EDT 2001 4 org.eclipse.jdt.ui 1 Internal Error Java Model Exception: Java Model Status [test_checkSubclass does not exist.] at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException (JavaElement.java:442) at org.eclipse.jdt.internal.core.JavaElement.openHierarchy (JavaElement.java:471) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo (JavaElement.java(Compiled Code)) at org.eclipse.jdt.internal.core.Member.getFlags(Member.java:83) at org.eclipse.jdt.internal.ui.viewsupport.JavaImageLabelProvider.computeBaseImageD escriptor(JavaImageLabelProvider.java:117) at org.eclipse.jdt.internal.ui.viewsupport.JavaImageLabelProvider.getLabelImage (JavaImageLabelProvider.java:91) at org.eclipse.jdt.ui.JavaElementLabelProvider.getImage (JavaElementLabelProvider.java:159) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java:91) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java:97) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.doUpdateError Ticks(JavaOutlineErrorTickUpdater.java:83) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.access$0 (JavaOutlineErrorTickUpdater.java:73) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater$1.run (JavaOutlineErrorTickUpdater.java:67) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block (ModalContext.java:133) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:258) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run (ProgressMonitorDialog.java:335) at org.eclipse.vcm.internal.ui.ResourceLoader.loadResources (ResourceLoader.java:320) at org.eclipse.vcm.internal.ui.actions.ReplaceWithAction.run (ReplaceWithAction.java:75) at org.eclipse.ui.internal.PluginAction.run(PluginAction.java:125) at org.eclipse.jface.action.Action.runWithEvent(Action.java:451) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:658) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306) 4 org.eclipse.jdt.core 969 test_checkSubclass does not exist. Log: Tue Oct 16 19:57:10 EDT 2001 4 org.eclipse.jdt.core 969 test_ConstructorLorg_eclipse_swt_widgets_WidgetI does not exist. Log: Tue Oct 16 19:57:10 EDT 2001 4 org.eclipse.jdt.ui 1 Internal Error Java Model Exception: Java Model Status [test_ConstructorLorg_eclipse_swt_widgets_WidgetI does not exist.] at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException (JavaElement.java:442) at org.eclipse.jdt.internal.core.JavaElement.openHierarchy (JavaElement.java:471) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo (JavaElement.java(Compiled Code)) at org.eclipse.jdt.internal.core.Member.getFlags(Member.java:83) at org.eclipse.jdt.internal.ui.viewsupport.JavaImageLabelProvider.computeBaseImageD escriptor(JavaImageLabelProvider.java:117) at org.eclipse.jdt.internal.ui.viewsupport.JavaImageLabelProvider.getLabelImage (JavaImageLabelProvider.java:91) at org.eclipse.jdt.ui.JavaElementLabelProvider.getImage (JavaElementLabelProvider.java:159) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java:91) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java:97) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.doUpdateError Ticks(JavaOutlineErrorTickUpdater.java:83) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.access$0 (JavaOutlineErrorTickUpdater.java:73) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater$1.run (JavaOutlineErrorTickUpdater.java:67) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block (ModalContext.java:133) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:258) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run (ProgressMonitorDialog.java:335) at org.eclipse.vcm.internal.ui.ResourceLoader.loadResources (ResourceLoader.java:320) at org.eclipse.vcm.internal.ui.actions.ReplaceWithAction.run (ReplaceWithAction.java:75) at org.eclipse.ui.internal.PluginAction.run(PluginAction.java:125) at org.eclipse.jface.action.Action.runWithEvent(Action.java:451) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:658) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306) 4 org.eclipse.jdt.core 969 test_ConstructorLorg_eclipse_swt_widgets_WidgetI does not exist. Log: Tue Oct 16 19:57:11 EDT 2001 4 org.eclipse.jdt.core 969 test_ConstructorLorg_eclipse_swt_widgets_WidgetII does not exist. Log: Tue Oct 16 19:57:11 EDT 2001 4 org.eclipse.jdt.ui 1 Internal Error Java Model Exception: Java Model Status [test_ConstructorLorg_eclipse_swt_widgets_WidgetII does not exist.] at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException (JavaElement.java:442) at org.eclipse.jdt.internal.core.JavaElement.openHierarchy (JavaElement.java:471) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo (JavaElement.java(Compiled Code)) at org.eclipse.jdt.internal.core.Member.getFlags(Member.java:83) at org.eclipse.jdt.internal.ui.viewsupport.JavaImageLabelProvider.computeBaseImageD escriptor(JavaImageLabelProvider.java:117) at org.eclipse.jdt.internal.ui.viewsupport.JavaImageLabelProvider.getLabelImage (JavaImageLabelProvider.java:91) at org.eclipse.jdt.ui.JavaElementLabelProvider.getImage (JavaElementLabelProvider.java:159) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java:91) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java:97) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.doUpdateError Ticks(JavaOutlineErrorTickUpdater.java:83) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.access$0 (JavaOutlineErrorTickUpdater.java:73) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater$1.run (JavaOutlineErrorTickUpdater.java:67) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1336) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block (ModalContext.java:133) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:258) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run (ProgressMonitorDialog.java:335) at org.eclipse.vcm.internal.ui.ResourceLoader.loadResources (ResourceLoader.java:320) at org.eclipse.vcm.internal.ui.actions.ReplaceWithAction.run (ReplaceWithAction.java:75) at org.eclipse.ui.internal.PluginAction.run(PluginAction.java:125) at org.eclipse.jface.action.Action.runWithEvent(Action.java:451) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:658) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306) 4 org.eclipse.jdt.core 969 test_ConstructorLorg_eclipse_swt_widgets_WidgetII does not exist. Log: Tue Oct 16 23:14:15 EDT 2001 4 org.eclipse.jdt.core 969 suite does not exist. Log: Tue Oct 16 23:14:15 EDT 2001 4 org.eclipse.jdt.ui 1 Internal Error Java Model Exception: Java Model Status [suite does not exist.] at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException (JavaElement.java:442) at org.eclipse.jdt.internal.core.JavaElement.openHierarchy (JavaElement.java:471) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo (JavaElement.java(Compiled Code)) at org.eclipse.jdt.internal.core.Member.getFlags(Member.java(Compiled Code)) at org.eclipse.jdt.internal.ui.viewsupport.JavaImageLabelProvider.computeBaseImageD escriptor(JavaImageLabelProvider.java(Compiled Code)) at org.eclipse.jdt.internal.ui.viewsupport.JavaImageLabelProvider.getLabelImage (JavaImageLabelProvider.java(Compiled Code)) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java(Compiled Code)) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java(Compiled Code)) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.updateItem (JavaOutlineErrorTickUpdater.java(Compiled Code)) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.doUpdateError Ticks(JavaOutlineErrorTickUpdater.java:83) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater.access$0 (JavaOutlineErrorTickUpdater.java:73) at org.eclipse.jdt.internal.ui.javaeditor.JavaOutlineErrorTickUpdater$1.run (JavaOutlineErrorTickUpdater.java:67) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java(Compiled Code)) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block (ModalContext.java(Compiled Code)) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:258) at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:713) at org.eclipse.ui.wizards.datatransfer.WizardFileSystemResourceImportPage1.executeI mportOperation(WizardFileSystemResourceImportPage1.java:303) at org.eclipse.ui.wizards.datatransfer.WizardFileSystemResourceImportPage1.importRe sources(WizardFileSystemResourceImportPage1.java:522) at org.eclipse.ui.wizards.datatransfer.WizardFileSystemResourceImportPage1.finish (WizardFileSystemResourceImportPage1.java:343) at org.eclipse.ui.wizards.datatransfer.FileSystemImportWizard.performFinish (FileSystemImportWizard.java:102) at org.eclipse.jface.wizard.WizardDialog.finishPressed (WizardDialog.java:570) at org.eclipse.jface.wizard.WizardDialog.buttonPressed (WizardDialog.java:311) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:211) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:523) at org.eclipse.ui.internal.ImportResourcesAction.run (ImportResourcesAction.java:62) at org.eclipse.jface.action.Action.runWithEvent(Action.java:451) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:658) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306) 4 org.eclipse.jdt.core 969 suite does not exist. Log: Wed Oct 17 22:26:00 EDT 2001 1 org.eclipse.core.resources 4 Unhandled exception caught in event loop. Log: Wed Oct 17 22:26:00 EDT 2001 4 org.eclipse.ui 0 Argument not valid java.lang.IllegalArgumentException: Argument not valid at org.eclipse.swt.SWT.error(SWT.java:1791) at org.eclipse.swt.custom.StyledText.setLineBackground(StyledText.java (Compiled Code)) at org.eclipse.swt.custom.StyledText.setLineBackground(StyledText.java (Compiled Code)) at org.eclipse.compare.contentmergeviewer.TextMergeViewer.doDiff (TextMergeViewer.java(Compiled Code)) at org.eclipse.compare.contentmergeviewer.TextMergeViewer.doDiff (TextMergeViewer.java(Compiled Code)) at org.eclipse.compare.contentmergeviewer.TextMergeViewer.doDiff (TextMergeViewer.java(Compiled Code)) at org.eclipse.compare.contentmergeviewer.TextMergeViewer.setIgnoreAncestor (TextMergeViewer.java:1586) at org.eclipse.compare.contentmergeviewer.TextMergeViewer.access$19 (TextMergeViewer.java:1576) at org.eclipse.compare.contentmergeviewer.TextMergeViewer$15.run (TextMergeViewer.java:1481) at org.eclipse.jface.action.Action.runWithEvent(Action.java:451) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:658) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306) | resolved fixed | 180e359 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T09:58:43Z" | "2001-10-18T01:53:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemItemMapper.java | case IJavaElement.PACKAGE_FRAGMENT_ROOT:
IPackageFragmentRoot root= (IPackageFragmentRoot)elem;
if (!root.isArchive()) {
return root.getPath();
}
return null;
case IJavaElement.PACKAGE_FRAGMENT:
String packName= elem.getElementName();
IPath rootPath= getCorrespondingPath(elem.getParent());
if (rootPath != null && packName.length() > 0) {
rootPath= rootPath.append(packName.replace('.', '/'));
}
return rootPath;
case IJavaElement.CLASS_FILE:
case IJavaElement.COMPILATION_UNIT:
IPath packPath= getCorrespondingPath(elem.getParent());
if (packPath != null) {
packPath= packPath.append(elem.getElementName());
}
return packPath;
default:
IOpenable openable= JavaModelUtil.getOpenable(elem);
if (openable instanceof IJavaElement) {
return getCorrespondingPath((IJavaElement)openable);
}
return null;
}
}
} |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaCompletionProcessor.java | package org.eclipse.jdt.internal.ui.text.java;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.text.template.TemplateEngine;
import org.eclipse.jdt.ui.IWorkingCopyManager;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.text.contentassist.IContextInformation;
import org.eclipse.jface.text.contentassist.IContextInformationValidator;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorPart;
/**
* Java completion processor.
*/
public class JavaCompletionProcessor implements IContentAssistProcessor { |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaCompletionProcessor.java | private IEditorPart fEditor;
private ResultCollector fCollector;
private IWorkingCopyManager fManager;
private IContextInformationValidator fValidator;
private TemplateEngine fTemplateEngine;
public JavaCompletionProcessor(IEditorPart editor) {
fEditor= editor;
fCollector= new ResultCollector();
fManager= JavaPlugin.getDefault().getWorkingCopyManager();
fTemplateEngine= new TemplateEngine(TemplateEngine.JAVA);
}
/**
* @see IContentAssistProcessor#getErrorMessage()
*/
public String getErrorMessage() {
return fCollector.getErrorMessage();
}
/**
* @see IContentAssistProcessor#getContextInformationValidator()
*/
public IContextInformationValidator getContextInformationValidator() {
if (fValidator == null)
fValidator= new JavaParameterListValidator();
return fValidator;
}
/** |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaCompletionProcessor.java | * @see IContentAssistProcessor#getContextInformationAutoActivationCharacters()
*/
public char[] getContextInformationAutoActivationCharacters() {
return null;
}
/**
* @see IContentAssistProcessor#getCompletionProposalAutoActivationCharacters()
*/
public char[] getCompletionProposalAutoActivationCharacters() {
return new char[] { '.', '(' };
}
/**
* @see IContentAssistProcessor#computeContextInformation(ITextViewer, int)
*/
public IContextInformation[] computeContextInformation(ITextViewer viewer, int offset) {
return null;
}
/**
* @see IContentAssistProcessor#computeCompletionProposals(ITextViewer, int)
*/
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
ICompilationUnit unit= fManager.getWorkingCopy(fEditor.getEditorInput());
IDocument document= viewer.getDocument();
try {
if (unit != null) {
fCollector.reset(unit.getJavaProject(), unit);
Point selection= viewer.getSelectedRange();
if (selection.y > 0) |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaCompletionProcessor.java | fCollector.setRegionToReplace(selection.x, selection.y);
unit.codeComplete(offset, fCollector);
}
} catch (JavaModelException x) {
Shell shell= viewer.getTextWidget().getShell();
ErrorDialog.openError(shell, JavaTextMessages.getString("CompletionProcessor.error.accessing.title"), JavaTextMessages.getString("CompletionProcessor.error.accessing.message"), x.getStatus());
}
ICompletionProposal[] results= fCollector.getResults();
try {
if (unit != null) {
fTemplateEngine.reset();
fTemplateEngine.complete(unit, offset);
}
} catch (JavaModelException x) {
Shell shell= viewer.getTextWidget().getShell();
ErrorDialog.openError(shell, JavaTextMessages.getString("CompletionProcessor.error.accessing.title"), JavaTextMessages.getString("CompletionProcessor.error.accessing.message"), x.getStatus());
}
ICompletionProposal[] exactTemplateResults= fTemplateEngine.getExactResults();
ICompletionProposal[] notExactTemplateResults= fTemplateEngine.getNotExactResults();
ICompletionProposal[] total= new ICompletionProposal[results.length + exactTemplateResults.length + notExactTemplateResults.length];
System.arraycopy(exactTemplateResults, 0, total, 0, exactTemplateResults.length);
System.arraycopy(results, 0, total, exactTemplateResults.length, results.length);
System.arraycopy(notExactTemplateResults, 0, total, exactTemplateResults.length + results.length, notExactTemplateResults.length);
return total;
}
} |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocCompletionProcessor.java | package org.eclipse.jdt.internal.ui.text.javadoc;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.text.template.TemplateEngine;
import org.eclipse.jdt.ui.IWorkingCopyManager;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.text.contentassist.IContextInformation;
import org.eclipse.jface.text.contentassist.IContextInformationValidator;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorPart;
/**
* Simple Java doc completion processor.
*/
public class JavaDocCompletionProcessor implements IContentAssistProcessor { |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocCompletionProcessor.java | private IEditorPart fEditor;
private IWorkingCopyManager fManager;
private TemplateEngine fTemplateEngine;
public JavaDocCompletionProcessor(IEditorPart editor) {
fEditor= editor;
fManager= JavaPlugin.getDefault().getWorkingCopyManager();
fTemplateEngine= new TemplateEngine(TemplateEngine.JAVADOC);
}
/**
* @see IContentAssistProcessor#getErrorMessage()
*/
public String getErrorMessage() {
return null;
}
/**
* @see IContentAssistProcessor#getContextInformationValidator()
*/
public IContextInformationValidator getContextInformationValidator() {
return null;
} |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocCompletionProcessor.java | /**
* @see IContentAssistProcessor#getContextInformationAutoActivationCharacters()
*/
public char[] getContextInformationAutoActivationCharacters() {
return null;
}
/**
* @see IContentAssistProcessor#getCompletionProposalAutoActivationCharacters()
*/
public char[] getCompletionProposalAutoActivationCharacters() {
return null;
}
/**
* @see IContentAssistProcessor#computeContextInformation(ITextViewer, int)
*/
public IContextInformation[] computeContextInformation(ITextViewer viewer, int offset) {
return null;
}
/**
* @see IContentAssistProcessor#computeCompletionProposals(ITextViewer, int)
*/
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {
ICompilationUnit unit= fManager.getWorkingCopy(fEditor.getEditorInput());
IDocument document= viewer.getDocument();
ICompletionProposal[] results= new ICompletionProposal[0];
try {
if (unit != null) {
int offset= documentOffset;
int length= 0; |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocCompletionProcessor.java | Point selection= viewer.getSelectedRange();
if (selection.y > 0) {
offset= selection.x;
length= selection.y;
}
CompletionEvaluator evaluator= new CompletionEvaluator(unit, document, offset, length);
results= evaluator.computeProposals();
}
} catch (JavaModelException x) {
}
try {
if (unit != null) {
fTemplateEngine.reset();
fTemplateEngine.complete(unit, documentOffset);
}
} catch (JavaModelException x) {
}
ICompletionProposal[] exactTemplateResults= fTemplateEngine.getExactResults();
ICompletionProposal[] notExactTemplateResults= fTemplateEngine.getNotExactResults();
ICompletionProposal[] total= new ICompletionProposal[results.length + exactTemplateResults.length + notExactTemplateResults.length];
System.arraycopy(exactTemplateResults, 0, total, 0, exactTemplateResults.length);
System.arraycopy(results, 0, total, exactTemplateResults.length, results.length);
System.arraycopy(notExactTemplateResults, 0, total, exactTemplateResults.length + results.length, notExactTemplateResults.length);
return total;
}
} |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/ArgumentEvaluator.java | /*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.text.template;
import java.text.NumberFormat;
public class ArgumentEvaluator implements VariableEvaluator {
private final String[] fArguments;
/**
* Creates an argument evaluator with template arguments.
*/ |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/ArgumentEvaluator.java | public ArgumentEvaluator(String[] arguments) {
fArguments= arguments;
}
/*
* @see VariableEvaluator#evaluate(String, int)
*/
public String evaluate(String variable, int offset) {
if (fArguments == null)
return null;
try {
int i= Integer.parseInt(variable);
if ((i < 0) || (i >= fArguments.length))
return null;
return new String(fArguments[i]);
} catch (NumberFormatException e) {
return null;
}
}
/*
* @see VariableEvaluator#getRecognizedVariables()
*/
public String[] getRecognizedVariables() {
return new String[] {"0", "1"};
}
} |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/CodeIndentator.java | /*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.text.template;
import org.eclipse.jdt.internal.core.refactoring.TextUtilities;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.DefaultLineTracker;
import org.eclipse.jface.text.GapTextStore;
import org.eclipse.jface.text.ILineTracker;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextStore;
/**
* The code indentator indentates a text block by a given indentation level.
* The interface is similar to <code>CodeFormatter</code>.
*/
public class CodeIndentator { |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/CodeIndentator.java | private int fIndentationLevel= 0;
private int[] fPositions;
/**
* Sets the indentation level.
*/
public void setIndentationLevel(int indentationLevel) {
fIndentationLevel= indentationLevel;
}
/**
* Sets the positions to map.
*/
public void setPositionsToMap(int[] positions) {
fPositions= positions;
}
/**
* Returns the mapped positions. Should be called after an indentation operation.
*/
public int[] getMappedPositions() { |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/CodeIndentator.java | return fPositions;
}
/**
* Indentates a string.
*/
public String indentate(String string) {
StringBuffer buffer = new StringBuffer(string.length());
String indentation= TextUtilities.createIndentString(fIndentationLevel);
String[] lines= splitIntoLines(string);
int position= 0;
for (int i= 0; i != lines.length; i++) {
buffer.append(indentation);
buffer.append(lines[i]);
if (fPositions != null) {
for (int j= 0; j != fPositions.length; j++)
if (fPositions[j] >= position)
fPositions[j] += indentation.length();
}
position += lines[i].length();
}
return buffer.toString();
}
private static String[] splitIntoLines(String text) {
try {
ITextStore store= new GapTextStore(0, 1); |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/CodeIndentator.java | store.set(text);
ILineTracker tracker= new DefaultLineTracker();
tracker.set(text);
int size= tracker.getNumberOfLines();
String result[]= new String[size];
for (int i= 0; i < size; i++) {
String lineDelimiter= null;
try {
lineDelimiter= tracker.getLineDelimiter(i);
} catch (BadLocationException e) {}
IRegion region= tracker.getLineInformation(i);
if (lineDelimiter == null) {
result[i]= store.get(region.getOffset(), region.getLength());
} else {
result[i]= store.get(region.getOffset(), region.getLength()) +
lineDelimiter;
}
}
return result;
} catch (BadLocationException e) {
return null;
}
}
} |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/CursorSelectionEvaluator.java | /*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.text.template;
public class CursorSelectionEvaluator implements VariableEvaluator { |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/CursorSelectionEvaluator.java | private static final String CURSOR= "cursor";
private static final String CURSOR_END= "cursor-end";
private int fStart;
private int fEnd;
/**
* Creates an instance of <code>CursorSelectionEvaluator</code>.
*/
public CursorSelectionEvaluator() {
reset();
}
/**
* Resets the <code>CursorSelectionEvaluator</code>.
*/
public void reset() {
fStart= -1;
fEnd= 0;
}
/**
* Returns the position where the selection starts, <code>-1</code> if no
* cursor selection/positioning occured.
*/
public int getStart() { |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/CursorSelectionEvaluator.java | return fStart;
}
/**
* Returns the position where the selection ends.
*/
public int getEnd() {
return fEnd;
}
/*
* @see VariableEvaluator#evaluate(String)
*/
public String evaluate(String variable, int offset) {
if (variable.equals(CURSOR)) {
fStart= offset;
fEnd= fStart;
} else if (variable.equals(CURSOR_END)) {
fEnd= offset;
}
return "";
}
/*
* @see VariableEvaluator#getRecognizedVariables()
*/
public String[] getRecognizedVariables() {
return new String[] {CURSOR, CURSOR_END};
}
} |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/LocalVariableEvaluator.java | /*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.text.template;
public class LocalVariableEvaluator implements VariableEvaluator {
private static final String INDEX= "index";
private static final String ARRAY= "array";
private static final String ITERATOR= "iterator";
private static final String COLLECTION= "collection";
private static final String VECTOR= "vector";
private static final String ENUMERATION= "enumeration";
private static final String TYPE= "type";
private static final String ELEMENT_TYPE= "element_type";
private static final String ELEMENT= "element";
/*
* @see VariableEvaluator#evaluate(String, int)
*/
public String evaluate(String variable, int offset) { |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/LocalVariableEvaluator.java | if (variable.equals(INDEX)) {
return "i";
} else if (variable.equals(ARRAY)) {
return "array";
} else if (variable.equals(ITERATOR)) {
return "iterator";
} else if (variable.equals(COLLECTION)) {
return "collection";
} else if (variable.equals(VECTOR)) {
return "vector";
} else if (variable.equals(ENUMERATION)) {
return "enumeration";
} else if (variable.equals(TYPE)) {
return "Type";
} else if (variable.equals(ELEMENT_TYPE)) {
return "Type";
} else if (variable.equals(ELEMENT)) {
return "element";
} else {
return null;
}
}
/*
* @see VariableEvaluator#getRecognizedVariables()
*/
public String[] getRecognizedVariables() {
return new String[] {INDEX, ARRAY};
}
} |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateEngine.java | /*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.text.template;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.core.Assert;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
public class TemplateEngine {
private static final char ARGUMENTS_BEGIN= '(';
private static final char ARGUMENTS_END= ')';
private static final char HTML_TAG_BEGIN= '<';
private static final char HTML_TAG_END= '>';
private static final char JAVADOC_TAG_BEGIN= '@'; |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateEngine.java | /**
* Partition types.
*/
public static String JAVA= "java";
public static String JAVADOC= "javadoc";
private String fPartitionType;
private ArrayList fExactProposals= new ArrayList();
private ArrayList fNotExactProposals= new ArrayList();
public TemplateEngine(String partitionType) {
Assert.isNotNull(partitionType);
fPartitionType= new String(partitionType);
}
/**
* Empties the collector.
*/
public void reset() {
fExactProposals.clear();
fNotExactProposals.clear();
}
/**
* Returns an array of templates matching exactly.
*/
public ICompletionProposal[] getExactResults() {
return (ICompletionProposal[]) fExactProposals.toArray(new ICompletionProposal[fExactProposals.size()]);
}
/**
* Returns an array of templates matching not exactly.
*/
public ICompletionProposal[] getNotExactResults() { |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateEngine.java | return (ICompletionProposal[]) fNotExactProposals.toArray(new ICompletionProposal[fNotExactProposals.size()]);
}
/**
* Inspects the context of the compilation unit around <code>completionPosition</code>
* and feeds the collector with proposals.
* @param collector the collector for template proposals.
* @param sourceUnit the compilation unit.
* @param completionPosition the context position in the compilation unit.
*/
public void complete(ICompilationUnit sourceUnit, int completionPosition)
throws JavaModelException
{
String source= sourceUnit.getSource();
int end = completionPosition;
int start= guessStart(source, end, fPartitionType);
String request= source.substring(start, end);
int index= request.indexOf(ARGUMENTS_BEGIN);
String key;
String[] arguments;
if (index == -1) {
key= request;
arguments= null;
} else {
key= request.substring(0, index);
String allArguments= request.substring(index + 1, request.length() - 1);
List list= new ArrayList();
StringTokenizer tokenizer= new StringTokenizer(allArguments, ","); |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateEngine.java | while (tokenizer.hasMoreTokens()) {
String token= tokenizer.nextToken().trim();
list.add(token);
}
arguments= (String[]) list.toArray(new String[list.size()]);
}
Template[] templates= TemplateSet.getInstance().getMatchingTemplates(key, fPartitionType);
for (int i= 0; i != templates.length; i++) {
TemplateProposal proposal= new TemplateProposal(templates[i], arguments, start, end);
if (templates[i].getName().equals(key)) {
fExactProposals.add(proposal);
} else {
fNotExactProposals.add(proposal);
}
}
}
private static final int guessStart(String source, int end, String partitionType) {
int start= end;
if (partitionType.equals(JAVA)) {
if ((start != 0) && (source.charAt(start - 1) == ARGUMENTS_END)) {
start--;
while ((start != 0) && (source.charAt(start - 1) != ARGUMENTS_BEGIN))
start--;
start--;
if ((start != 0) && Character.isWhitespace(source.charAt(start - 1))) |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateEngine.java | start--;
}
while ((start != 0) && Character.isUnicodeIdentifierPart(source.charAt(start - 1)))
start--;
if ((start != 0) && Character.isUnicodeIdentifierStart(source.charAt(start - 1)))
start--;
} else if (partitionType.equals(JAVADOC)) {
if ((start != 0) && (source.charAt(start - 1) == HTML_TAG_END))
start--;
while ((start != 0) && Character.isUnicodeIdentifierPart(source.charAt(start - 1)))
start--;
if ((start != 0) && Character.isUnicodeIdentifierStart(source.charAt(start - 1)))
start--;
if ((start != 0) &&
(source.charAt(start - 1) == HTML_TAG_BEGIN) ||
(source.charAt(start - 1) == JAVADOC_TAG_BEGIN))
{
start--;
}
}
return start;
}
} |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateInterpolator.java | /*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.text.template;
import org.eclipse.jdt.internal.core.Assert;
public class TemplateInterpolator {
/* |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateInterpolator.java | * EBNF grammar.
*
* template := (text | escape)*.
* text := character - dollar.
* escape := dollar ('{' identifier '}' | dollar).
* dollar := '$'.
*/
private static final int TEXT= 0;
private static final int ESCAPE= 1;
private static final int IDENTIFIER= 2;
private static final char ESCAPE_CHARACTER= '$';
private static final char IDENTIFIER_BEGIN= '{';
private static final char IDENTIFIER_END= '}';
/**
* Interpolates a string.
*/
public String interpolate(String string, VariableEvaluator evaluator) {
StringBuffer buffer= new StringBuffer(string.length());
StringBuffer identifier= new StringBuffer();
int state= TEXT;
for (int i= 0; i != string.length(); i++) {
char ch= string.charAt(i);
switch (state) {
case TEXT:
switch (ch) {
case ESCAPE_CHARACTER: |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateInterpolator.java | state= ESCAPE;
break;
default:
buffer.append(ch);
break;
}
break;
case ESCAPE:
switch (ch) {
case ESCAPE_CHARACTER:
buffer.append(ch);
state= TEXT;
break;
case IDENTIFIER_BEGIN:
identifier.setLength(0);
state= IDENTIFIER;
break;
default:
buffer.append(ESCAPE_CHARACTER);
buffer.append(ch);
state= TEXT;
break;
}
break;
case IDENTIFIER: |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateInterpolator.java | switch (ch) {
case IDENTIFIER_END:
{
String value= evaluator.evaluate(identifier.toString(), buffer.length());
if (value == null) {
buffer.append(ESCAPE_CHARACTER);
buffer.append(IDENTIFIER_BEGIN);
buffer.append(identifier);
buffer.append(IDENTIFIER_END);
} else {
buffer.append(value);
}
}
state= TEXT;
break;
default:
identifier.append(ch);
break;
}
break;
}
}
return buffer.toString();
}
} |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateProposal.java | /*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.text.template;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.internal.core.Assert;
import org.eclipse.jdt.internal.core.refactoring.TextUtilities;
import org.eclipse.jdt.internal.formatter.CodeFormatter;
import org.eclipse.jdt.internal.ui.preferences.CodeFormatterPreferencePage;
import org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage;
import org.eclipse.jdt.internal.ui.refactoring.changes.TextBuffer;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.text.contentassist.IContextInformation;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
/**
* A template proposal.
*/
public class TemplateProposal implements ICompletionProposal { |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateProposal.java | private final Template fTemplate;
private final int fStart;
private final int fEnd;
private int fSelectionStart;
private int fSelectionEnd;
private CursorSelectionEvaluator fCursorSelectionEvaluator= new CursorSelectionEvaluator();
private VariableEvaluator fLocalVariableEvaluator= new LocalVariableEvaluator();
private TemplateInterpolator fInterpolator= new TemplateInterpolator(); |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateProposal.java | private ArgumentEvaluator fArgumentEvaluator;
/**
* Creates a template proposal with a template and the range of its key.
* @param template the template
* @param arguments arguments to the template, or <code>null</code> for no arguments
* @param start the starting position of the key.
* @param end the ending position of the key (exclusive).
*/
TemplateProposal(Template template, String[] arguments, int start, int end) {
Assert.isNotNull(template);
Assert.isTrue(start >= 0);
Assert.isTrue(end >= start);
fTemplate= template;
fArgumentEvaluator= new ArgumentEvaluator(arguments);
fStart= start;
fEnd= end;
}
/**
* @see ICompletionProposal#apply(IDocument)
*/
public void apply(IDocument document) {
int indentationLevel= guessIndentationLevel(document, fStart);
String pattern= fTemplate.getPattern();
pattern= fInterpolator.interpolate(pattern, fArgumentEvaluator);
pattern= fInterpolator.interpolate(pattern, fLocalVariableEvaluator);
fCursorSelectionEvaluator.reset();
pattern= fInterpolator.interpolate(pattern, fCursorSelectionEvaluator); |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateProposal.java | int start= fCursorSelectionEvaluator.getStart();
if (start == -1) {
fSelectionStart= pattern.length();
fSelectionEnd= fSelectionStart;
} else {
fSelectionStart= start;
fSelectionEnd= fCursorSelectionEvaluator.getEnd();
}
boolean format= TemplatePreferencePage.useCodeFormatter();
if (format) {
CodeFormatter formatter= new CodeFormatter(JavaCore.getOptions());
formatter.setPositionsToMap(new int[] {fSelectionStart, fSelectionEnd});
formatter.setInitialIndentationLevel(indentationLevel);
pattern= formatter.formatSourceString(pattern);
int[] positions= formatter.getMappedPositions();
fSelectionStart= positions[0];
fSelectionEnd= positions[1];
} else {
CodeIndentator indentator= new CodeIndentator();
indentator.setPositionsToMap(new int[] {fSelectionStart, fSelectionEnd});
indentator.setIndentationLevel(indentationLevel);
pattern= indentator.indentate(pattern);
int[] positions= indentator.getMappedPositions();
fSelectionStart= positions[0];
fSelectionEnd= positions[1];
}
String finalString= trimBegin(pattern); |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateProposal.java | int charactersRemoved= pattern.length() - finalString.length();
fSelectionStart -= charactersRemoved;
fSelectionEnd -= charactersRemoved;
try {
document.replace(fStart, fEnd - fStart, finalString);
} catch (BadLocationException x) {}
}
private static String trimBegin(String string) {
int i= 0;
while ((i != string.length()) && Character.isWhitespace(string.charAt(i)))
i++;
return string.substring(i);
}
/**
* @see ICompletionProposal#getSelection(IDocument)
*/
public Point getSelection(IDocument document) {
return new Point(fStart + fSelectionStart, fSelectionEnd - fSelectionStart);
}
/**
* @see ICompletionProposal#getAdditionalProposalInfo()
*/
public String getAdditionalProposalInfo() {
String pattern= fTemplate.getPattern();
pattern= fInterpolator.interpolate(pattern, fArgumentEvaluator);
pattern= fInterpolator.interpolate(pattern, fLocalVariableEvaluator);
pattern= fInterpolator.interpolate(pattern, fCursorSelectionEvaluator); |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateProposal.java | return textToHTML(pattern);
}
/**
* @see ICompletionProposal#getDisplayString()
*/
public String getDisplayString() {
return fTemplate.getName() + " - " + fTemplate.getDescription();
}
/**
* @see ICompletionProposal#getImage()
*/
public Image getImage() {
return fTemplate.getImage();
}
/**
* @see ICompletionProposal#getContextInformation()
*/
public IContextInformation getContextInformation() {
return null;
}
private static int guessIndentationLevel(IDocument document, int offset) {
TextBuffer buffer= new TextBuffer(document);
String line= buffer.getLineContentOfOffset(offset);
return TextUtilities.getIndent(line, CodeFormatterPreferencePage.getTabSize());
}
private static String textToHTML(String string) {
StringBuffer buffer= new StringBuffer(string.length());
buffer.append("<pre>"); |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateProposal.java | for (int i= 0; i != string.length(); i++) {
char ch= string.charAt(i);
switch (ch) {
case '&':
buffer.append("&");
break;
case '<':
buffer.append("<");
break;
case '>':
buffer.append(">");
break;
case '\t':
buffer.append(" ");
break;
case '\n':
buffer.append("<br>");
break;
default:
buffer.append(ch);
break;
}
}
buffer.append("</pre>");
return buffer.toString();
}
} |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateSet.java | /*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.text.template;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.xml.serialize.OutputFormat;
import org.apache.xml.serialize.Serializer;
import org.apache.xml.serialize.SerializerFactory;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jdt.internal.core.Assert;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.w3c.dom.Attr;
import org.w3c.dom.Document; |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateSet.java | import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.Text;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
/**
* A user defined template set.
*/
public class TemplateSet {
private static class TemplateComparator implements Comparator {
public int compare(Object arg0, Object arg1) {
if (arg0 == arg1)
return 0;
if (arg0 == null)
return -1;
Template template0= (Template) arg0;
Template template1= (Template) arg1;
return template0.getName().compareTo(template1.getName());
}
}
private static final String DEFAULT_FILE= "default-templates.xml";
private static final String TEMPLATE_FILE= "templates.xml";
private static final String TEMPLATE_TAG= "template";
private static final String NAME_ATTRIBUTE= "name"; |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateSet.java | private static final String DESCRIPTION_ATTRIBUTE= "description";
private static final String CONTEXT_ATTRIBUTE= "context";
private static final String ENABLED_ATTRIBUTE= "enabled";
private List fTemplates= new ArrayList();
private Comparator fTemplateComparator= new TemplateComparator();
private Template[] fSortedTemplates= new Template[0];
private static TemplateSet fgTemplateSet;
public static TemplateSet getInstance() {
if (fgTemplateSet == null)
fgTemplateSet= create();
return fgTemplateSet;
}
private static InputStream getDefaultsAsStream() {
return TemplateSet.class.getResourceAsStream(DEFAULT_FILE);
}
private static File getTemplateFile() {
IPath path= JavaPlugin.getDefault().getStateLocation();
path= path.append(TEMPLATE_FILE);
return path.toFile();
}
private TemplateSet() {
}
private static TemplateSet create() {
try {
File templateFile= getTemplateFile();
if (!templateFile.exists()) { |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateSet.java | InputStream inputStream= getDefaultsAsStream();
if (inputStream == null)
return new TemplateSet();
if (!templateFile.createNewFile())
return new TemplateSet();
OutputStream outputStream= new FileOutputStream(templateFile);
byte buffer[]= new byte[65536];
while (true) {
int bytes= inputStream.read(buffer);
if (bytes == -1)
break;
outputStream.write(buffer, 0, bytes);
}
inputStream.close();
outputStream.close();
}
Assert.isTrue(templateFile.exists());
TemplateSet templateSet= new TemplateSet();
templateSet.addFromStream(new FileInputStream(templateFile));
return templateSet;
} catch (IOException e) {
JavaPlugin.log(e);
return null;
}
} |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateSet.java | /**
* Resets the template set with the default templates.
*/
public void restoreDefaults() {
clear();
addFromStream(getDefaultsAsStream());
}
/**
* Resets (reloads) the template set.
*/
public void reset() {
clear();
try {
addFromStream(new FileInputStream(getTemplateFile()));
} catch (FileNotFoundException e) {
JavaPlugin.log(e);
}
}
private boolean addFromStream(InputStream stream) {
try {
TemplateSet templateSet= new TemplateSet();
DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();
DocumentBuilder parser= factory.newDocumentBuilder();
Document document= parser.parse(new InputSource(stream));
NodeList elements= document.getElementsByTagName(TEMPLATE_TAG);
int count= elements.getLength();
for (int i= 0; i != count; i++) { |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateSet.java | Node node= elements.item(i);
NamedNodeMap attributes= node.getAttributes();
if (attributes == null)
continue;
String name= attributes.getNamedItem(NAME_ATTRIBUTE).getNodeValue();
String description= attributes.getNamedItem(DESCRIPTION_ATTRIBUTE).getNodeValue();
String context= attributes.getNamedItem(CONTEXT_ATTRIBUTE).getNodeValue();
Node enabledNode= attributes.getNamedItem(ENABLED_ATTRIBUTE);
boolean enabled= (enabledNode == null) || (enabledNode.getNodeValue().equals("true"));
StringBuffer buffer= new StringBuffer();
NodeList children= node.getChildNodes();
for (int j= 0; j != children.getLength(); j++) {
String value= children.item(j).getNodeValue();
if (value != null)
buffer.append(value);
}
String pattern= buffer.toString().trim();
Template template= new Template(name, description, context, pattern);
template.setEnabled(enabled);
add(template);
}
return true;
} catch (ParserConfigurationException e) {
JavaPlugin.log(e);
} catch (IOException e) {
JavaPlugin.log(e);
} catch (SAXException e) {
JavaPlugin.log(e);
} |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateSet.java | sort();
return false;
}
/**
* Saves the template set.
*/
public boolean save() {
try {
fgTemplateSet.save(new FileOutputStream(getTemplateFile()));
return true;
} catch (IOException e) {
JavaPlugin.log(e);
return false;
}
}
/**
* Saves the template set as XML.
*/
private boolean save(OutputStream stream) {
try {
DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();
DocumentBuilder builder= factory.newDocumentBuilder();
Document document= builder.newDocument();
Node root= document.createElement("templates");
document.appendChild(root);
for (int i= 0; i != fTemplates.size(); i++) {
Template template= (Template) fTemplates.get(i); |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateSet.java | Node node= document.createElement("template");
root.appendChild(node);
NamedNodeMap attributes= node.getAttributes();
Attr name= document.createAttribute(NAME_ATTRIBUTE);
name.setValue(template.getName());
attributes.setNamedItem(name);
Attr description= document.createAttribute(DESCRIPTION_ATTRIBUTE);
description.setValue(template.getDescription());
attributes.setNamedItem(description);
Attr context= document.createAttribute(CONTEXT_ATTRIBUTE);
context.setValue(template.getContext());
attributes.setNamedItem(context);
Attr enabled= document.createAttribute(ENABLED_ATTRIBUTE);
enabled.setValue(template.isEnabled() ? "true" : "false");
attributes.setNamedItem(enabled);
Text pattern= document.createTextNode(template.getPattern());
node.appendChild(pattern);
}
OutputFormat format = new OutputFormat();
format.setPreserveSpace(true);
Serializer serializer = SerializerFactory.getSerializerFactory("xml").makeSerializer(stream, format);
serializer.asDOMSerializer().serialize(document); |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateSet.java | return true;
} catch (ParserConfigurationException e) {
JavaPlugin.log(e);
} catch (IOException e) {
JavaPlugin.log(e);
}
return false;
}
/**
* Adds a template to the set.
*/
public void add(Template template) {
fTemplates.add(template);
sort();
}
/**
* Removes a template to the set.
*/
public void remove(Template template) {
fTemplates.remove(template);
sort();
}
/**
* Empties the set.
*/
public void clear() {
fTemplates.clear();
sort(); |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateSet.java | }
/**
* Returns all templates.
*/
public Template[] getTemplates() {
return (Template[]) fTemplates.toArray(new Template[fTemplates.size()]);
}
/**
* Returns templates matching a prefix.
*/
public Template[] getMatchingTemplates(String prefix, String partitionType) {
Assert.isNotNull(prefix);
Assert.isNotNull(partitionType);
List results= new ArrayList(fSortedTemplates.length);
for (int i= 0; i != fSortedTemplates.length; i++) {
Template template= fSortedTemplates[i];
if (template.matches(prefix, partitionType))
results.add(template);
}
return (Template[]) results.toArray(new Template[results.size()]);
}
private void sort() {
fSortedTemplates= (Template[]) fTemplates.toArray(new Template[fTemplates.size()]);
Arrays.sort(fSortedTemplates, fTemplateComparator);
}
} |
4,139 | Bug 4139 EC DCR: Code templates feature (1GIVMDV) | null | verified fixed | 8fd6bb8 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T10:39:57Z" | "2001-10-11T03:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/VariableEvaluator.java | /*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.text.template;
/**
* An interface to allow custom evaluation of variables.
*/
public interface VariableEvaluator {
/**
* Returns the value of a variable.
*
* @param variable the variable to evaluate.
* @param offset the offset at which the variable is evaluated.
* @return returns the value of the variable, <code>null</code> if the variable is not recognized.
*/
String evaluate(String variable, int offset);
/**
* Returns the names of the variables the evaluator recognizes.
*/
String[] getRecognizedVariables();
} |
4,977 | Bug 4977 Extra spaces in completion for <code></code> | Enter <c and type ctrl-space Select <code></code> Note the extra spaces Same for other <*></*> | resolved fixed | de7172b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T12:49:17Z" | "2001-10-15T12:46:40Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateContext.java | /*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.text.template;
import java.text.DateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.Map;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.internal.codeassist.complete.CompletionParser;
import org.eclipse.jdt.internal.compiler.CompilationResult;
import org.eclipse.jdt.internal.compiler.DefaultErrorHandlingPolicies;
import org.eclipse.jdt.internal.compiler.IProblem;
import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
import org.eclipse.jdt.internal.compiler.lookup.Scope;
import org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory; |
4,977 | Bug 4977 Extra spaces in completion for <code></code> | Enter <c and type ctrl-space Select <code></code> Note the extra spaces Same for other <*></*> | resolved fixed | de7172b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T12:49:17Z" | "2001-10-15T12:46:40Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateContext.java | import org.eclipse.jdt.internal.compiler.problem.ProblemIrritants;
import org.eclipse.jdt.internal.compiler.problem.ProblemReporter;
import org.eclipse.jdt.internal.core.Assert;
import org.eclipse.jdt.internal.core.JavaProject;
import org.eclipse.jdt.internal.core.SearchableEnvironment;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider;
import org.eclipse.jdt.internal.ui.util.DocumentManager;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.ITextViewer;
public class TemplateContext implements VariableEvaluator {
private static final String FILE= "file";
private static final String LINE= "line";
private static final String DATE= "date";
private static final String INDEX= "index";
private static final String ARRAY= "array";
private static final String ITERATOR= "iterator";
private static final String COLLECTION= "collection";
private static final String VECTOR= "vector";
private static final String ENUMERATION= "enumeration";
private static final String TYPE= "type";
private static final String ELEMENT_TYPE= "element_type";
private static final String ELEMENT= "element";
private ICompilationUnit fUnit;
private IDocument fDocument;
private int fStart;
private int fEnd;
private ITextViewer fViewer;
public TemplateContext(ICompilationUnit unit, int start, int end, ITextViewer viewer) { |
4,977 | Bug 4977 Extra spaces in completion for <code></code> | Enter <c and type ctrl-space Select <code></code> Note the extra spaces Same for other <*></*> | resolved fixed | de7172b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T12:49:17Z" | "2001-10-15T12:46:40Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateContext.java | Assert.isTrue(start <= end);
fUnit= unit;
fStart= start;
fEnd= end;
fViewer= viewer;
}
public int getStart() {
return fStart;
}
public int getEnd() {
return fEnd;
}
public ITextViewer getViewer() {
return fViewer;
}
public void setDocument(IDocument document) {
fDocument= document;
}
public IDocument getDocument() {
return fDocument;
}
/*
* @see VariableEvaluator#reset()
*/
public void reset() {
} |
4,977 | Bug 4977 Extra spaces in completion for <code></code> | Enter <c and type ctrl-space Select <code></code> Note the extra spaces Same for other <*></*> | resolved fixed | de7172b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T12:49:17Z" | "2001-10-15T12:46:40Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateContext.java | /*
* @see VariableEvaluator#acceptText(String, int)
*/
public void acceptText(String variable, int offset) {
}
/*
* @see VariableEvaluator#evaluateVariable(String, int)
*/
public String evaluateVariable(String variable, int offset) {
if (variable.equals(FILE)) {
return fUnit.getElementName();
} else if (variable.equals(LINE)) {
int line= getLineNumber(fUnit, fEnd);
if (line == -1)
return null;
else
return Integer.toString(line);
} else if (variable.equals(DATE)) {
return DateFormat.getDateInstance().format(new Date());
} else {
return null;
}
}
/*
* @see VariableEvaluator#getRecognizedVariables() |
4,977 | Bug 4977 Extra spaces in completion for <code></code> | Enter <c and type ctrl-space Select <code></code> Note the extra spaces Same for other <*></*> | resolved fixed | de7172b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T12:49:17Z" | "2001-10-15T12:46:40Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateContext.java | */
public String[] getRecognizedVariables() {
return null;
}
private static int getLineNumber(ICompilationUnit unit, int offset) {
CompilationUnitDocumentProvider documentProvider=
JavaPlugin.getDefault().getCompilationUnitDocumentProvider();
try {
DocumentManager documentManager= new DocumentManager(unit);
documentManager.connect();
IDocument document= documentManager.getDocument();
if (document == null) {
documentManager.disconnect();
return -1;
}
try {
return document.getLineOfOffset(offset) + 1;
} catch (BadLocationException e) {
documentManager.disconnect();
}
} catch (CoreException e) {
}
return -1;
}
} |
4,977 | Bug 4977 Extra spaces in completion for <code></code> | Enter <c and type ctrl-space Select <code></code> Note the extra spaces Same for other <*></*> | resolved fixed | de7172b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T12:49:17Z" | "2001-10-15T12:46:40Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateProposal.java | /*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.text.template;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.internal.core.Assert;
import org.eclipse.jdt.internal.core.refactoring.TextUtilities;
import org.eclipse.jdt.internal.formatter.CodeFormatter;
import org.eclipse.jdt.internal.ui.preferences.CodeFormatterPreferencePage;
import org.eclipse.jdt.internal.ui.preferences.TemplatePreferencePage;
import org.eclipse.jdt.internal.ui.refactoring.changes.TextBuffer;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.text.contentassist.IContextInformation;
import org.eclipse.jface.text.DefaultInformationControl;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.custom.StyledText;
/**
* A template proposal.
*/
public class TemplateProposal implements ICompletionProposal { |
4,977 | Bug 4977 Extra spaces in completion for <code></code> | Enter <c and type ctrl-space Select <code></code> Note the extra spaces Same for other <*></*> | resolved fixed | de7172b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T12:49:17Z" | "2001-10-15T12:46:40Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateProposal.java | private final Template fTemplate;
private final TemplateContext fContext;
private int fSelectionStart;
private int fSelectionEnd; |
4,977 | Bug 4977 Extra spaces in completion for <code></code> | Enter <c and type ctrl-space Select <code></code> Note the extra spaces Same for other <*></*> | resolved fixed | de7172b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T12:49:17Z" | "2001-10-15T12:46:40Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateProposal.java | private CursorSelectionEvaluator fCursorSelectionEvaluator= new CursorSelectionEvaluator();
private VariableEvaluator fLocalVariableEvaluator= new LocalVariableEvaluator();
private TemplateInterpolator fInterpolator= new TemplateInterpolator();
private ArgumentEvaluator fArgumentEvaluator;
private ModelEvaluator fModelEvaluator= new ModelEvaluator();
private boolean fDisposed;
/**
* Creates a template proposal with a template and the range of its key.
* @param template the template
* @param arguments arguments to the template, or <code>null</code> for no arguments
* @param start the starting position of the key.
* @param end the ending position of the key (exclusive).
*/
TemplateProposal(Template template, String[] arguments, TemplateContext context) {
Assert.isNotNull(template);
Assert.isNotNull(context);
fTemplate= template;
fArgumentEvaluator= new ArgumentEvaluator(arguments);
fContext= context;
}
/**
* @see ICompletionProposal#apply(IDocument)
*/
public void apply(IDocument document) {
int indentationLevel= guessIndentationLevel(document, fContext.getStart());
String pattern= fTemplate.getPattern(); |
4,977 | Bug 4977 Extra spaces in completion for <code></code> | Enter <c and type ctrl-space Select <code></code> Note the extra spaces Same for other <*></*> | resolved fixed | de7172b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T12:49:17Z" | "2001-10-15T12:46:40Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateProposal.java | pattern= fInterpolator.interpolate(pattern, fArgumentEvaluator);
pattern= fInterpolator.interpolate(pattern, fContext);
fInterpolator.interpolate(pattern, fModelEvaluator);
TemplateModel model= fModelEvaluator.getModel();
if (model.getEditableCount() == 0) {
pattern= fInterpolator.interpolate(pattern, fCursorSelectionEvaluator);
int cursorStart= fCursorSelectionEvaluator.getStart();
if (cursorStart == -1) {
fSelectionStart= pattern.length();
fSelectionEnd= fSelectionStart;
} else {
fSelectionStart= cursorStart;
fSelectionEnd= fCursorSelectionEvaluator.getEnd();
}
} else {
fContext.setDocument(document);
TemplateEditorPopup popup= new TemplateEditorPopup(fContext, model);
if (!popup.open()) {
fSelectionStart= fContext.getEnd() - fContext.getStart();
fSelectionEnd= fSelectionStart;
return;
}
pattern= popup.getText();
int[] selection= popup.getSelection();
if (selection[0] == -1) { |
4,977 | Bug 4977 Extra spaces in completion for <code></code> | Enter <c and type ctrl-space Select <code></code> Note the extra spaces Same for other <*></*> | resolved fixed | de7172b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T12:49:17Z" | "2001-10-15T12:46:40Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateProposal.java | fSelectionStart= pattern.length();
fSelectionEnd= fSelectionStart;
} else {
fSelectionStart= selection[0];
fSelectionEnd= selection[1];
}
}
if (TemplatePreferencePage.useCodeFormatter()) {
CodeFormatter formatter= new CodeFormatter(JavaCore.getOptions());
formatter.setPositionsToMap(new int[] {fSelectionStart, fSelectionEnd});
formatter.setInitialIndentationLevel(indentationLevel);
pattern= formatter.formatSourceString(pattern);
int[] positions= formatter.getMappedPositions();
fSelectionStart= positions[0];
fSelectionEnd= positions[1];
} else {
CodeIndentator indentator= new CodeIndentator();
indentator.setPositionsToMap(new int[] {fSelectionStart, fSelectionEnd});
indentator.setIndentationLevel(indentationLevel);
pattern= indentator.indentate(pattern);
int[] positions= indentator.getMappedPositions();
fSelectionStart= positions[0];
fSelectionEnd= positions[1];
}
String finalString= trimBegin(pattern);
int charactersRemoved= pattern.length() - finalString.length();
fSelectionStart -= charactersRemoved; |
4,977 | Bug 4977 Extra spaces in completion for <code></code> | Enter <c and type ctrl-space Select <code></code> Note the extra spaces Same for other <*></*> | resolved fixed | de7172b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T12:49:17Z" | "2001-10-15T12:46:40Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateProposal.java | fSelectionEnd -= charactersRemoved;
int start= fContext.getStart();
int length= fContext.getEnd() - start;
try {
document.replace(start, length, finalString);
} catch (BadLocationException x) {}
}
private static String trimBegin(String string) {
int i= 0;
while ((i != string.length()) && Character.isWhitespace(string.charAt(i)))
i++;
return string.substring(i);
}
/**
* @see ICompletionProposal#getSelection(IDocument)
*/
public Point getSelection(IDocument document) {
return new Point(fContext.getStart() + fSelectionStart, fSelectionEnd - fSelectionStart);
}
/**
* @see ICompletionProposal#getAdditionalProposalInfo()
*/
public String getAdditionalProposalInfo() {
String pattern= fTemplate.getPattern();
pattern= fInterpolator.interpolate(pattern, fArgumentEvaluator);
pattern= fInterpolator.interpolate(pattern, fContext);
pattern= fInterpolator.interpolate(pattern, fLocalVariableEvaluator);
pattern= fInterpolator.interpolate(pattern, fCursorSelectionEvaluator); |
4,977 | Bug 4977 Extra spaces in completion for <code></code> | Enter <c and type ctrl-space Select <code></code> Note the extra spaces Same for other <*></*> | resolved fixed | de7172b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T12:49:17Z" | "2001-10-15T12:46:40Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateProposal.java | return textToHTML(pattern);
}
/**
* @see ICompletionProposal#getDisplayString()
*/
public String getDisplayString() {
return fTemplate.getName() + TemplateMessages.getString("TemplateProposal.delimiter") + fTemplate.getDescription();
}
/**
* @see ICompletionProposal#getImage()
*/
public Image getImage() {
return fTemplate.getImage();
}
/**
* @see ICompletionProposal#getContextInformation()
*/
public IContextInformation getContextInformation() {
return null;
}
private static int guessIndentationLevel(IDocument document, int offset) {
TextBuffer buffer= new TextBuffer(document);
String line= buffer.getLineContentOfOffset(offset);
return TextUtilities.getIndent(line, CodeFormatterPreferencePage.getTabSize());
}
private static String textToHTML(String string) {
StringBuffer buffer= new StringBuffer(string.length());
buffer.append("<pre>"); |
4,977 | Bug 4977 Extra spaces in completion for <code></code> | Enter <c and type ctrl-space Select <code></code> Note the extra spaces Same for other <*></*> | resolved fixed | de7172b | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T12:49:17Z" | "2001-10-15T12:46:40Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateProposal.java | for (int i= 0; i != string.length(); i++) {
char ch= string.charAt(i);
switch (ch) {
case '&':
buffer.append("&");
break;
case '<':
buffer.append("<");
break;
case '>':
buffer.append(">");
break;
case '\t':
buffer.append(" ");
break;
case '\n':
buffer.append("<br>");
break;
default:
buffer.append(ch);
break;
}
}
buffer.append("</pre>");
return buffer.toString();
}
} |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | 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.Vector;
import org.eclipse.swt.SWT;
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; |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | 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.util.Assert;
import org.eclipse.jface.util.ListenerList;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
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.IWorkbenchWindow;
import org.eclipse.ui.part.Page;
import org.eclipse.ui.texteditor.IUpdate;
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
import org.eclipse.jdt.core.ElementChangedEvent;
import org.eclipse.jdt.core.Flags;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IElementChangedListener;
import org.eclipse.jdt.core.IField; |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | 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.IContextMenuConstants;
import org.eclipse.jdt.ui.JavaElementLabelProvider;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
import org.eclipse.jdt.internal.ui.actions.ContextMenuGroup;
import org.eclipse.jdt.internal.ui.actions.GenerateGroup;
import org.eclipse.jdt.internal.ui.actions.OpenHierarchyPerspectiveItem;
import org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringGroup;
import org.eclipse.jdt.internal.ui.reorg.ReorgGroup;
import org.eclipse.jdt.internal.ui.search.JavaSearchGroup;
import org.eclipse.jdt.internal.ui.util.JavaModelUtil;
import org.eclipse.jdt.internal.ui.util.OpenTypeHierarchyUtil;
import org.eclipse.jdt.internal.ui.viewsupport.JavaElementSorter;
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.
*/
class JavaOutlinePage extends Page implements IContentOutlinePage { |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | /**
* The element change listener of the java outline viewer.
* @see IElementChangedListener
*/
class ElementChangedListener implements IElementChangedListener {
public void elementChanged(final ElementChangedEvent e) {
Display d= getControl().getDisplay();
if (d != null) {
d.asyncExec(new Runnable() {
public void run() {
IJavaElementDelta delta= findElement( (ICompilationUnit) fInput, e.getDelta());
if (delta != null && fOutlineViewer != null) {
fOutlineViewer.reconcile(delta);
}
}
});
}
}
protected IJavaElementDelta findElement(ICompilationUnit unit, IJavaElementDelta delta) {
if (delta == null || unit == null) |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | 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;
}
};
/**
* Content provider for the children of an ICompilationUnit or
* an IClassFile
* @see ITreeContentProvider
*/
class ChildrenProvider implements ITreeContentProvider { |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | private ElementChangedListener fListener;
private JavaOutlineErrorTickUpdater fErrorTickUpdater;
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(); |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | 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.getDefault().logErrorStatus(JavaEditorMessages.getString("JavaOutlinePage.error.ChildrenProvider.getChildren.message1"), x.getStatus());
}
}
return new Object[0];
}
public Object[] getElements(Object parent) {
return getChildren(parent);
}
public Object getParent(Object child) {
if (child instanceof IJavaElement) {
IJavaElement e= (IJavaElement) child; |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | 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.getDefault().logErrorStatus(JavaEditorMessages.getString("JavaOutlinePage.error.ChildrenProvider.hasChildren.message1"), x.getStatus());
}
}
return false;
}
public boolean isDeleted(Object o) {
return false;
}
public void dispose() {
if (fListener != null) {
JavaCore.removeElementChangedListener(fListener);
fListener= null;
}
if (fErrorTickUpdater != null) {
fErrorTickUpdater.setAnnotationModel(null);
fErrorTickUpdater= null; |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | }
}
/**
* @see IContentProvider#inputChanged(Viewer, Object, Object)
*/
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
if (oldInput == null && newInput != null) {
if (fListener == null)
fListener= new ElementChangedListener();
JavaCore.addElementChangedListener(fListener);
if (fErrorTickUpdater == null) {
fErrorTickUpdater= new JavaOutlineErrorTickUpdater(fOutlineViewer);
}
fErrorTickUpdater.setAnnotationModel(fEditor.getDocumentProvider().getAnnotationModel(fEditor.getEditorInput()));
} else if (oldInput != null && newInput != null) {
fErrorTickUpdater.setAnnotationModel(fEditor.getDocumentProvider().getAnnotationModel(fEditor.getEditorInput()));
} else if (oldInput != null && newInput == null) {
JavaCore.removeElementChangedListener(fListener);
fListener= null;
fErrorTickUpdater.setAnnotationModel(null);
fErrorTickUpdater= null;
}
}
};
class JavaOutlineViewer extends TreeViewer { |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | /**
* 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;
public JavaOutlineViewer(Tree tree) {
super(tree);
setAutoExpandLevel(ALL_LEVELS);
} |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | /**
* Investigates the given element change event and if affected incrementally
* updates the outline.
*/
public void reconcile(IJavaElementDelta delta) {
if (getSorter() == null) {
Widget w= findItem(fInput);
if (w != null)
update(w, delta);
} else {
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;
}
} |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | }
}
super.internalExpandToLevel(node, level);
}
protected void reuseTreeItem(Item item, Object element) {
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;
}
/**
* @see TreeViewer#createTreeItem |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | */
protected void createTreeItem(Widget parent, Object element, int ix) {
Item[] children= getChildren(parent);
boolean expand= (parent instanceof Item && (children == null || children.length == 0));
Item item= newItem(parent, SWT.NULL, ix);
updateItem(item, element);
updatePlus(item, element);
if (expand)
setExpanded((Item) parent, true);
internalExpandToLevel(item, ALL_LEVELS);
}
protected boolean mustUpdateParent(IJavaElementDelta delta, IJavaElement element) {
if (element instanceof IMethod) {
if ((delta.getKind() & IJavaElementDelta.ADDED) != 0) {
try {
return JavaModelUtil.isMainMethod((IMethod)element);
} catch (JavaModelException e) {
JavaPlugin.log(e.getStatus());
}
}
return "main".equals(element.getElementName());
}
return false;
}
protected void update(Widget w, IJavaElementDelta delta) { |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | Item item;
Object element;
IJavaElement parent= delta.getElement();
IJavaElementDelta[] affected= delta.getAffectedChildren();
Item[] children= getChildren(w);
boolean doUpdateParent= false;
Vector deletions= new Vector();
Vector additions= new Vector();
go1: for (int i= 0; i < children.length; i++) {
item= children[i];
element= item.getData();
for (int j= 0; j < affected.length; j++) {
IJavaElement affectedElement= affected[j].getElement();
int status= affected[j].getKind();
if (affectedElement.equals(element)) {
if ((status & IJavaElementDelta.REMOVED) != 0) {
deletions.addElement(item);
doUpdateParent= doUpdateParent || mustUpdateParent(affected[j], affectedElement);
continue go1;
} |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | if ((status & IJavaElementDelta.CHANGED) != 0) {
int change= affected[j].getFlags();
doUpdateParent= doUpdateParent || mustUpdateParent(affected[j], 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, affected[j]);
continue go1;
}
} else {
if ((status & IJavaElementDelta.CHANGED) != 0 &&
(affected[j].getFlags() & IJavaElementDelta.F_MODIFIERS) != 0 &&
!filtered(parent, affectedElement))
additions.addElement(affected[j]);
}
}
} |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | 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;
}
go2: for (int i= 0; i < add.length; i++) {
try {
IJavaElement e= add[i].getElement();
if (filtered(parent, e))
continue go2;
ISourceReference r= (ISourceReference) e ;
doUpdateParent= doUpdateParent || mustUpdateParent(add[i], e);
ISourceRange rng= r.getSourceRange();
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++) { |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | item= children[j];
r= (ISourceReference) item.getData();
if (r == null) {
continue go2;
}
try {
if (overlaps(r, start, end)) {
reuseTreeItem(item, (Object) add[i].getElement());
continue go2;
} else if (r.getSourceRange().getOffset() > start) {
if (last != null && deletions.contains(last)) {
deletions.removeElement(last);
reuseTreeItem(last, (Object) add[i].getElement());
} else {
createTreeItem(w, (Object) add[i].getElement(), j);
}
continue go2;
}
} catch (JavaModelException x) { |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | }
last= item;
}
if (last != null && deletions.contains(last)) {
deletions.removeElement(last);
reuseTreeItem(last, (Object) add[i].getElement());
} else {
createTreeItem(w, (Object) add[i].getElement(), -1);
}
} catch (JavaModelException x) {
}
}
Enumeration e= deletions.elements();
while (e.hasMoreElements()) {
item= (Item) e.nextElement();
disassociate(item);
item.dispose();
} |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | if (doUpdateParent)
updateItem(w, delta.getElement());
}
protected boolean overlaps(ISourceReference reference, int start, int end) {
try {
ISourceRange rng= reference.getSourceRange();
return start <= (rng.getOffset() + rng.getLength() - 1) && rng.getOffset() <= end;
} catch (JavaModelException x) {
return false;
}
}
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;
}
};
class LexicalSortingAction extends Action { |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | private JavaElementSorter fSorter= new JavaElementSorter();
public LexicalSortingAction() {
super();
setText(JavaEditorMessages.getString("JavaOutlinePage.Sort.label"));
JavaPluginImages.setLocalImageDescriptors(this, "alphab_sort_co.gif");
boolean checked= JavaPlugin.getDefault().getPreferenceStore().getBoolean("LexicalSortingAction.isChecked");
valueChanged(checked, false);
}
public void run() {
valueChanged(isChecked(), true);
}
private void valueChanged(boolean on, boolean store) {
setChecked(on);
fOutlineViewer.setSorter(on ? fSorter : null);
setToolTipText(on ? JavaEditorMessages.getString("JavaOutlinePage.Sort.tooltip.checked") : JavaEditorMessages.getString("JavaOutlinePage.Sort.tooltip.unchecked"));
setDescription(on ? JavaEditorMessages.getString("JavaOutlinePage.Sort.description.checked") : JavaEditorMessages.getString("JavaOutlinePage.Sort.description.unchecked"));
if (store)
JavaPlugin.getDefault().getPreferenceStore().setValue("LexicalSortingAction.isChecked", on);
}
};
class FieldFilter extends ViewerFilter { |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | public boolean select(Viewer viewer, Object parentElement, Object element) {
return !(element instanceof IField);
}
};
class VisibilityFilter extends ViewerFilter {
public final static int PUBLIC= 0;
public final static int PROTECTED= 1;
public final static int PRIVATE= 2;
public final static int DEFAULT= 3;
public final static int NOT_STATIC= 4;
private int fVisibility;
public VisibilityFilter(int visibility) {
fVisibility= visibility;
}
/*
* 1GEWBY4: ITPJUI:ALL - filtering incorrect on interfaces.
*/
private boolean belongsToInterface(IMember member) {
IType type= member.getDeclaringType(); |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | if (type != null) {
try {
return type.isInterface();
} catch (JavaModelException x) {
}
}
return false;
}
public boolean select(Viewer viewer, Object parentElement, Object element) {
if ( !(element instanceof IMember))
return true;
if (element instanceof IType) {
IType type= (IType) element;
IJavaElement parent= type.getParent();
if (parent == null)
return true;
int elementType= parent.getElementType();
if (elementType == IJavaElement.COMPILATION_UNIT || elementType == IJavaElement.CLASS_FILE)
return true;
}
IMember member= (IMember) element;
try {
int flags= member.getFlags(); |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | switch (fVisibility) {
case PUBLIC:
return Flags.isPublic(flags) || belongsToInterface(member);
case PROTECTED:
return Flags.isProtected(flags);
case PRIVATE:
return Flags.isPrivate(flags);
case DEFAULT: {
boolean dflt= !(Flags.isPublic(flags) || Flags.isProtected(flags) || Flags.isPrivate(flags));
return dflt ? !belongsToInterface(member) : dflt;
}
case NOT_STATIC:
return !Flags.isStatic(flags);
}
} catch (JavaModelException x) {
}
return false;
}
};
class FilterAction extends Action {
private ViewerFilter fFilter;
private String fCheckedDesc;
private String fUncheckedDesc;
private String fCheckedTooltip; |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | private String fUncheckedTooltip;
private String fPreferenceKey;
public FilterAction(ViewerFilter filter, String label, String checkedDesc, String uncheckedDesc, String checkedTooltip, String uncheckedTooltip, String prefKey) {
super();
fFilter= filter;
setText(label);
fCheckedDesc= checkedDesc;
fUncheckedDesc= uncheckedDesc;
fCheckedTooltip= checkedTooltip;
fUncheckedTooltip= uncheckedTooltip;
fPreferenceKey= prefKey;
boolean checked= JavaPlugin.getDefault().getPreferenceStore().getBoolean(fPreferenceKey);
valueChanged(checked, false);
}
public void run() {
valueChanged(isChecked(), true);
}
private void valueChanged(boolean on, boolean store) {
setChecked(on);
if (on) {
fOutlineViewer.addFilter(fFilter);
setToolTipText(fCheckedTooltip); |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | setDescription(fCheckedDesc);
} else {
fOutlineViewer.removeFilter(fFilter);
setToolTipText(fUncheckedTooltip);
setDescription(fUncheckedDesc);
}
if (store)
JavaPlugin.getDefault().getPreferenceStore().setValue(fPreferenceKey, on);
}
};
private IJavaElement fInput;
private String fContextMenuID;
private Menu fMenu;
private JavaOutlineViewer fOutlineViewer;
private JavaEditor fEditor;
private ListenerList fSelectionChangedListeners= new ListenerList();
private Hashtable fActions= new Hashtable();
private ContextMenuGroup[] fActionGroups;
public JavaOutlinePage(String contextMenuID, JavaEditor editor) {
super();
Assert.isNotNull(editor);
fContextMenuID= contextMenuID; |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | fEditor= editor;
}
private void fireSelectionChanged(ISelection selection) {
SelectionChangedEvent event= new SelectionChangedEvent(this, selection);
Object[] listeners= fSelectionChangedListeners.getListeners();
for (int i= 0; i < listeners.length; ++i)
((ISelectionChangedListener) listeners[i]).selectionChanged(event);
}
/**
* @see IPage#createControl
*/
public void createControl(Composite parent) {
Tree tree= new Tree(parent, SWT.MULTI);
JavaElementLabelProvider lprovider= new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_PARAMETERS | JavaElementLabelProvider.SHOW_OVERLAY_ICONS | JavaElementLabelProvider.SHOW_TYPE);
fOutlineViewer= new JavaOutlineViewer(tree);
fOutlineViewer.setContentProvider(new ChildrenProvider());
fOutlineViewer.setLabelProvider(lprovider);
MenuManager manager= new MenuManager(fContextMenuID, fContextMenuID);
manager.setRemoveAllWhenShown(true);
manager.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager manager) {
contextMenuAboutToShow(manager);
}
});
fMenu= manager.createContextMenu(tree); |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | tree.setMenu(fMenu);
fActionGroups= new ContextMenuGroup[] { new GenerateGroup(), new JavaSearchGroup(), new ReorgGroup() };
fOutlineViewer.setInput(fInput);
fOutlineViewer.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent e) {
fireSelectionChanged(e.getSelection());
}
});
fOutlineViewer.getControl().addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent e) {
handleKeyPressed(e);
}
});
}
public void dispose() {
if (fEditor == null)
return;
fEditor.outlinePageClosed();
fEditor= null;
Object[] listeners= fSelectionChangedListeners.getListeners();
for (int i= 0; i < listeners.length; i++)
fSelectionChangedListeners.remove(listeners[i]); |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | fSelectionChangedListeners= null;
if (fMenu != null && !fMenu.isDisposed()) {
fMenu.dispose();
fMenu= 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= StructuredSelection.EMPTY;
if (reference != null)
s= new StructuredSelection(reference); |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | 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);
}
/**
* 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) |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | subMenu.add(action);
else
menu.appendToGroup(group, action);
}
}
}
private void addRefactoring(IMenuManager menu){
MenuManager refactoring= new MenuManager(JavaEditorMessages.getString("JavaOutlinePage.ContextMenu.refactoring.label"));
ContextMenuGroup.add(refactoring, new ContextMenuGroup[] { new RefactoringGroup() }, fOutlineViewer);
if (!refactoring.isEmpty())
menu.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, refactoring);
}
private void addOpenPerspectiveItem(IMenuManager menu) {
ISelection s= getSelection();
if (s.isEmpty() || ! (s instanceof IStructuredSelection))
return;
IStructuredSelection selection= (IStructuredSelection)s;
if (selection.size() != 1)
return;
Object element= selection.getFirstElement();
if (!(element instanceof IType))
return;
IType[] input= {(IType)element};
IWorkbenchWindow w= JavaPlugin.getActiveWorkbenchWindow();
menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, new OpenHierarchyPerspectiveItem(w, input));
} |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | protected void contextMenuAboutToShow(IMenuManager menu) {
JavaPlugin.createStandardGroups(menu);
if (OrganizeImportsAction.canActionBeAdded(getSelection())) {
addAction(menu, IContextMenuConstants.GROUP_REORGANIZE, "OrganizeImports");
}
addAction(menu, IContextMenuConstants.GROUP_OPEN, "OpenImportDeclaration");
addAction(menu, IContextMenuConstants.GROUP_SHOW, "ShowInPackageView");
addAction(menu, IContextMenuConstants.GROUP_REORGANIZE, "DeleteElement");
addAction(menu, IContextMenuConstants.GROUP_REORGANIZE, "ReplaceWithEdition");
addAction(menu, IContextMenuConstants.GROUP_REORGANIZE, "AddEdition");
addAction(menu, IContextMenuConstants.GROUP_ADDITIONS, "AddMethodEntryBreakpoint");
addAction(menu, IContextMenuConstants.GROUP_ADDITIONS, "AddWatchpoint");
ContextMenuGroup.add(menu, fActionGroups, fOutlineViewer);
addRefactoring(menu);
addOpenPerspectiveItem(menu);
}
/**
* @see Page#setFocus()
*/
public void setFocus() {
if (fOutlineViewer != null)
fOutlineViewer.getControl().setFocus();
}
/** |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | * @see Page#makeContributions(IMenuManager, IToolBarManager, IStatusLineManager)
*/
public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
if (statusLineManager != null) {
StatusBarUpdater updater= new StatusBarUpdater(statusLineManager);
addSelectionChangedListener(updater);
}
Action action= new LexicalSortingAction();
toolBarManager.add(action);
action= new FilterAction(new FieldFilter(), JavaEditorMessages.getString("JavaOutlinePage.HideFields.label"), JavaEditorMessages.getString("JavaOutlinePage.HideFields.description.checked"), JavaEditorMessages.getString("JavaOutlinePage.HideFields.description.unchecked"), JavaEditorMessages.getString("JavaOutlinePage.HideFields.tooltip.checked"), JavaEditorMessages.getString("JavaOutlinePage.HideFields.tooltip.unchecked"), "HideFields.isChecked");
JavaPluginImages.setLocalImageDescriptors(action, "fields_co.gif");
toolBarManager.add(action);
action= new FilterAction(new VisibilityFilter(VisibilityFilter.NOT_STATIC), JavaEditorMessages.getString("JavaOutlinePage.HideStaticMembers.label"), JavaEditorMessages.getString("JavaOutlinePage.HideStaticMembers.description.checked"), JavaEditorMessages.getString("JavaOutlinePage.HideStaticMembers.description.unchecked"), JavaEditorMessages.getString("JavaOutlinePage.HideStaticMembers.tooltip.checked"), JavaEditorMessages.getString("JavaOutlinePage.HideStaticMembers.tooltip.unchecked"), "HideStaticMembers.isChecked");
JavaPluginImages.setLocalImageDescriptors(action, "static_co.gif");
toolBarManager.add(action);
action= new FilterAction(new VisibilityFilter(VisibilityFilter.PUBLIC), JavaEditorMessages.getString("JavaOutlinePage.HideNonePublicMembers.label"), JavaEditorMessages.getString("JavaOutlinePage.HideNonePublicMembers.description.checked"), JavaEditorMessages.getString("JavaOutlinePage.HideNonePublicMembers.description.unchecked"), JavaEditorMessages.getString("JavaOutlinePage.HideNonePublicMembers.tooltip.checked"), JavaEditorMessages.getString("JavaOutlinePage.HideNonePublicMembers.tooltip.unchecked"), "HideNonePublicMembers.isChecked");
JavaPluginImages.setLocalImageDescriptors(action, "public_co.gif");
toolBarManager.add(action);
}
/**
* @see ISelectionProvider#addSelectionChangedListener(ISelectionChangedListener)
*/
public void addSelectionChangedListener(ISelectionChangedListener listener) {
fSelectionChangedListeners.add(listener); |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | }
/**
* @see ISelectionProvider#removeSelectionChangedListener(ISelectionChangedListener)
*/
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
fSelectionChangedListeners.remove(listener);
}
/**
* @see ISelectionProvider#getSelection()
*/
public ISelection getSelection() {
if (fOutlineViewer == null)
return StructuredSelection.EMPTY;
return fOutlineViewer.getSelection();
}
/**
* @see ISelectionProvider#setSelection(ISelection)
*/
public void setSelection(ISelection selection) {
if (fOutlineViewer != null)
fOutlineViewer.setSelection(selection);
}
/**
* Checkes whether a given Java element is an inner type.
*/
private boolean isInnerType(IJavaElement element) { |
5,075 | Bug 5075 Class cast extception in JavaOutliner | * Using latest code (204++) * Using Junit as a test case * Put a breakpoint in VectorTest#testElementAt(), on the second line of the method * Open a class file editor in the Java Perspective, and make it the active editor (I openned Vector.class) * Debug to the breakpoint * Try to inspect or display "i.intValue == 1" * ClassCastException this= Workbench (id=49) e= SWTException (id=190) backtrace= Object[10] (id=192) code= 46 detailMessage= "Failed to execute runnable" throwable= ClassCastException (id=193) backtrace= Object[11] (id=194) [0]= int[10] (id=196) [1]= Class (org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage$1) (id=74) [2]= Class (org.eclipse.swt.widgets.RunnableLock) (id=75) [3]= Class (org.eclipse.swt.widgets.Synchronizer) (id=76) [4]= Class (org.eclipse.swt.widgets.Display) (id=77) [5]= Class (org.eclipse.swt.widgets.Display) (id=77) [6]= Class (org.eclipse.ui.internal.Workbench) (id=40) [7]= Class (org.eclipse.ui.internal.Workbench) (id=40) [8]= Class (org.eclipse.core.internal.boot.InternalBootLoader) (id=46) [9]= Class (org.eclipse.core.boot.BootLoader) (id=47) [10]= Class (SlimLauncher) (id=48) detailMessage= "org.eclipse.jdt.internal.core.ClassFile" msg= "Failed to execute runnable (org.eclipse.jdt.internal.core.ClassFile)" | resolved fixed | adb0fef | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-18T14:35:53Z" | "2001-10-18T13:00:00Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java | 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 handleKeyPressed(KeyEvent event) {
if (event.stateMask != 0)
return;
IAction action= null;
if (event.character == SWT.DEL)
action= getAction("DeleteElement");
else if (event.keyCode == SWT.F4) {
OpenTypeHierarchyUtil.open(getSelection(), fEditor.getSite().getWorkbenchWindow());
}
if (action != null && action.isEnabled())
action.run();
}
} |
5,095 | Bug 5095 template: toarray incorrect | its defintion should be: (${type}[]) ${collection}.toArray(new ${type}[${collection}.size()]); rather than (${type}[]) ${collection}.toArray(new ${type}[${collection}]); | resolved fixed | 9a943d1 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-19T12:16:52Z" | "2001-10-19T11:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/Template.java | /*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.text.template;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
import org.eclipse.swt.graphics.Image;
/**
* A template consiting of a name and a pattern.
*/
public class Template { |
5,095 | Bug 5095 template: toarray incorrect | its defintion should be: (${type}[]) ${collection}.toArray(new ${type}[${collection}.size()]); rather than (${type}[]) ${collection}.toArray(new ${type}[${collection}]); | resolved fixed | 9a943d1 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-19T12:16:52Z" | "2001-10-19T11:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/Template.java | private String fName;
private String fDescription;
private String fContext;
private String fPattern;
private boolean fEnabled= true;
public Template() {
this("", "", "", "");
}
/**
* Creates a template.
* @param name the name of the template.
* @param description the description of the template.
* @param context the context in which the template can be applied.
* @param pattern the template pattern.
*/
public Template(String name, String description, String context, String pattern) {
fName= new String(name);
fDescription= new String(description);
fContext= new String(context);
fPattern= new String(pattern);
} |
5,095 | Bug 5095 template: toarray incorrect | its defintion should be: (${type}[]) ${collection}.toArray(new ${type}[${collection}.size()]); rather than (${type}[]) ${collection}.toArray(new ${type}[${collection}]); | resolved fixed | 9a943d1 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-19T12:16:52Z" | "2001-10-19T11:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/Template.java | /**
* Sets the description of the template.
*/
public void setDescription(String description) {
fDescription= new String(description);
}
/**
* Returns the description of the template.
*/
public String getDescription() {
return new String(fDescription);
}
/**
* Sets the context of the template.
*/
public void setContext(String context) {
fContext= new String(context);
}
/**
* Returns the context in which the cursor was.
*/
public String getContext() {
return new String(fContext);
}
/**
* Sets the name of the template.
*/ |
5,095 | Bug 5095 template: toarray incorrect | its defintion should be: (${type}[]) ${collection}.toArray(new ${type}[${collection}.size()]); rather than (${type}[]) ${collection}.toArray(new ${type}[${collection}]); | resolved fixed | 9a943d1 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-19T12:16:52Z" | "2001-10-19T11:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/Template.java | public void setName(String name) {
fName= new String(name);
}
/**
* Returns the name of the template.
*/
public String getName() {
return new String(fName);
}
/**
* Returns the image of the template.
*/
public Image getImage() {
if (fContext.equals("javadoc") && fName.startsWith("<"))
return JavaPluginImages.get(JavaPluginImages.IMG_OBJS_HTMLTAG);
else
return JavaPluginImages.get(JavaPluginImages.IMG_OBJS_TEMPLATE);
}
/**
* Sets the pattern of the template.
*/
public void setPattern(String pattern) {
fPattern= new String(pattern);
}
/**
* Returns the template pattern.
*/
public String getPattern() { |
5,095 | Bug 5095 template: toarray incorrect | its defintion should be: (${type}[]) ${collection}.toArray(new ${type}[${collection}.size()]); rather than (${type}[]) ${collection}.toArray(new ${type}[${collection}]); | resolved fixed | 9a943d1 | JDT | https://github.com/eclipse-jdt/eclipse.jdt.ui | eclipse-jdt/eclipse.jdt.ui | java | null | null | null | "2001-10-19T12:16:52Z" | "2001-10-19T11:13:20Z" | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/Template.java | return new String(fPattern);
}
/**
* Sets the enable state of the template.
*/
public void setEnabled(boolean enable) {
fEnabled= enable;
}
/**
* Returns <code>true</code> if template is enabled, <code>false</code> otherwise.
*/
public boolean isEnabled() {
return fEnabled;
}
/**
* Returns <code>true</code> if template matches the prefix and context,
* <code>false</code> otherwise.
*/
public boolean matches(String prefix, String context) {
return
fEnabled &&
fContext.equals(context) &&
(prefix.length() != 0) &&
fName.toLowerCase().startsWith(prefix.toLowerCase());
}
} |