jdt weaving used in sdt for eclipse 3.6 breaks java refactoring
I installed sdt for eclipse 3.6 using link provided by mgm in this thicket:
http://www.assembla.com/spaces/scala-ide/tickets/3251
I have found that after installing of this build refactoring in java code doesn't work anymore.
For example, I try to rename a variable by means of standard Alt+Cmd+R
and get an exception (see below).
After disabling jdt weaving (that came with sdt) java refactoring works as before. Please fix this issue with broken weaving. Thanks.
After installing mentioned sdt i have plugin org.eclipse.equinox.weaving.hook 1.0.0v20100503 - seems that it is a custom build.
The latest AJDT 2.1.0 for eclipse 3.6 has org.eclipse.equinox.weaving.hook 1.0.0v20100108
An exception I get is the following:
http://www.assembla.com/spaces/scala-ide/tickets/3251
I have found that after installing of this build refactoring in java code doesn't work anymore.
For example, I try to rename a variable by means of standard Alt+Cmd+R
and get an exception (see below).
After disabling jdt weaving (that came with sdt) java refactoring works as before. Please fix this issue with broken weaving. Thanks.
After installing mentioned sdt i have plugin org.eclipse.equinox.weaving.hook 1.0.0v20100503 - seems that it is a custom build.
The latest AJDT 2.1.0 for eclipse 3.6 has org.eclipse.equinox.weaving.hook 1.0.0v20100108
An exception I get is the following:
"Rename - Refactoring " did not complete normally. Please see the log for more information.
java.lang.NullPointerException
at org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaElementAction.run_aroundBody1$advice(RenameJavaElementAction.java:35)
at org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaElementAction.run(RenameJavaElementAction.java:1)
at org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaElementAction.doRun(RenameJavaElementAction.java:148)
at org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaElementAction.run(RenameJavaElementAction.java:129)
at org.eclipse.jdt.ui.actions.RenameAction.run(RenameAction.java:115)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:278)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:185)
at org.eclipse.ui.internal.handlers.LegacyHandlerWrapper.execute(LegacyHandlerWrapper.java:109)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:468)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:786)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:885)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:567)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:508)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:123)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1031)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3775)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1367)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1390)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1404)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1400)
at org.eclipse.swt.widgets.Canvas.sendKeyEvent(Canvas.java:416)
at org.eclipse.swt.widgets.Composite.keyDown(Composite.java:594)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4978)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:220)
at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:1943)
at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2008)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5040)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:4582)
at org.eclipse.swt.widgets.Display.applicationProc(Display.java:4659)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:115)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3274)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
Leave a comment
on 2010-08-01 07:09 *
By MattRussell
Duplicated association with ticket #1000086 was added
on 2010-08-01 09:35 *
By MattRussell
@ rjenster: It's certainly a critical issue for Scala IDE on Helios that I hope we can fix asap. (I don't know that the Scala IDE project makes use of the priority field, but feel free to set it if you like.)
on 2010-08-01 09:47 *
By MattRussell
When I build helios branch locally after first blatting ~/.m2, I get some jars downloaded from the AJDT update site, and some from a Helios update site mirror. Perhaps they should all be obtained from the AJDT site?
[INFO] Downloading org.aspectj.weaver [INFO] Fetching org.aspectj.weaver_1.6.9.20100629172100.jar (1.08MB of 1.39MB at 525.98kB/s) from http://download.eclipse.org/tools/ajdt/36/update/plugins/org.aspectj.weaver_1.6.9.20100629172100.jar [INFO] Downloading org.aspectj.runtime [INFO] Fetching org.aspectj.runtime_1.6.9.20100629172100.jar (4kB of 96.44kB at 0B/s) from http://download.eclipse.org/tools/ajdt/36/update/plugins/org.aspectj.runtime_1.6.9.20100629172100.jar [INFO] Downloading org.eclipse.contribution.weaving.jdt [INFO] Fetching org.eclipse.contribution.weaving.jdt_2.1.0.e36x-release-20100630-1500.jar (4kB of 79.34kB at 0B/s) from http://download.eclipse.org/tools/ajdt/36/update/plugins/org.eclipse.contribution.weaving.jdt_2.1.0.e36x-release-20100630-1500.jar [INFO] Downloading org.eclipse.equinox.weaving.hook [INFO] Fetching org.eclipse.equinox.weaving.hook_1.0.0.v20100503.jar.pack.gz (3.4kB of 18.28kB at 0B/s) from http://d2u376ub0heus3.cloudfront.net/eclipse/updates/3.6/R-3.6-201006080911/plugins/org.eclipse.equinox.weaving.hook_1.0.0.v20100503.jar.pack.gz [INFO] Downloading org.eclipse.equinox.weaving.aspectj [INFO] Fetching org.eclipse.equinox.weaving.aspectj_1.0.0.v20100503.jar.pack.gz (1.41kB of 12.64kB at 0B/s) from http://eclipse.ulak.net.tr/eclipseMirror/eclipse/updates/3.6/R-3.6-201006080911/plugins/org.eclipse.equinox.weaving.aspectj_1.0.0.v20100503.jar.pack.gz
on 2010-08-01 11:27 *
By
@Matt Russell Equinox Aspects is part of Helios, so maybe this isn't as surprising as it seems. I'd be very surprised if that was the cause of this issue however.
on 2010-08-02 04:15 *
By Peter Misak
Maybe it is worth to mention that refactoring does not work in Eclipse 3.5 (Galileo) either after performing update of Scala IDE from http://download.scala-ide.org/update-current.
on 2010-08-04 10:14 *
By David Bernard
Assigned to changed from milessabin to david.bernard.31
Status changed from New to Accepted
on 2010-08-05 00:59 *
By David Bernard
Related association with ticket #1000095 was added
on 2010-08-05 00:59 *
By David Bernard
The main cause is a bug in jdt-weaving :
https://bugs.eclipse.org/bugs/show_bug.cgi?id=321829
https://bugs.eclipse.org/bugs/show_bug.cgi?id=321829
on 2010-08-05 01:02 *
By David Bernard
A possible (not tested) workaround is to install AJDT (core + ui)
http://www.eclipse.org/ajdt/downloads/
Else, we could provide an optional plugin to register fake adapter. This plugin should not be installed near AJDT
http://www.eclipse.org/ajdt/downloads/
Else, we could provide an optional plugin to register fake adapter. This plugin should not be installed near AJDT
on 2010-08-05 13:57 *
By Peter Misak
Possible workaround suggested by David Bernard tested on Eclipse 3.5 and it works
(tested with AspectJ Development Tools 2.1.0.e35x-release-20100630-1500 org.eclipse.ajdt.feature.group).
(tested with AspectJ Development Tools 2.1.0.e35x-release-20100630-1500 org.eclipse.ajdt.feature.group).
on 2010-08-05 14:16 *
By David Bernard
FYI fix is part of the next version of eclipse JDT-weaving (feature from AJDT)
on 2010-08-07 02:20 *
By Peter Misak
Duplicated association with ticket #1000100 was added
Shouldn't this be marked as fixed?
AJDT dev builds already contain the patch:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=321829
And looking at the revision log they're already integrated:
https://www.assembla.com/code/scala-ide/git/changesets/d50d5b161497ca02d53d2b2448179cf0550fd18e
"Use AJDT 2.1.1 development build to avoid various NPEs in the JDT."
AJDT dev builds already contain the patch:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=321829
And looking at the revision log they're already integrated:
https://www.assembla.com/code/scala-ide/git/changesets/d50d5b161497ca02d53d2b2448179cf0550fd18e
"Use AJDT 2.1.1 development build to avoid various NPEs in the JDT."
Indeed it should ...
I was "anonymous" above.
Just uninstalled AJDT, and the problem came back (i.e. F2 of .java file causes NPE). Then upgraded Scale IDE and "JDT Weaving for Scala" to 1.0.0.201008120350. Did not seem to bring in any new dependencies (though not sure it should have).
And... still NPE on F2 of .java files. :-( And interestingly I can't seem to re-install AJDT? Some kind of missing dependency.
FYI, I'm using Eclipse 3.5, build 20100218-1602.
Just uninstalled AJDT, and the problem came back (i.e. F2 of .java file causes NPE). Then upgraded Scale IDE and "JDT Weaving for Scala" to 1.0.0.201008120350. Did not seem to bring in any new dependencies (though not sure it should have).
And... still NPE on F2 of .java files. :-( And interestingly I can't seem to re-install AJDT? Some kind of missing dependency.
FYI, I'm using Eclipse 3.5, build 20100218-1602.
on 2010-08-12 10:37 *
By MattRussell
@rgitzel: Do you still get these problems if you install Scala IDE into a clean Eclipse install?
Yesterday, I did not switch the status to 'ready to test' because I wait the nightly generation witth "fix" to be available.
Currently the fix is only deployed for 3.6 (by AJDT dev team), and should be linked by the last night update-site generation.
I'll test it later this week.
Currently the fix is only deployed for 3.6 (by AJDT dev team), and should be linked by the last night update-site generation.
I'll test it later this week.
@MattRussell - unfortunately don't have time right now to try. :(
Did finally sort out the dependency issue: I couldn't install "AspectJ Development Tools" while that one "JDT Weaving for Scala" was installed. I removed Scala IDE completely, installed AJDT, then pulled Scala IDE back in without the weaving plugin, and so far so good.
Did finally sort out the dependency issue: I couldn't install "AspectJ Development Tools" while that one "JDT Weaving for Scala" was installed. I removed Scala IDE completely, installed AJDT, then pulled Scala IDE back in without the weaving plugin, and so far so good.
Anon's workaround does stop the break of Scala refactoring. However the full Aspect/J installation ( AspectJ Development Tools 2.1.1.e36x-20100908-0800 org.eclipse.ajdt.feature.group) on Helios seems to break on: Preferences -> Java -> Build Path -> Classpath Variables which raises an NPE. See https://bugs.eclipse.org/bugs/show_bug.cgi?format=multiple&id=244347 . Just something to bear in mind...
Updating tickets (#1000069, #1000195, #1000213, #1000223, #1000006, #1000021, #1000038, #1000048, #1000051, #1000052, #1000075, #1000103, #1000109, #1000115, #1000119, #1000156, #1000186, #1000207, #1000238, #1000262, #1000263, #380, #389, #683, #1238, #1331, #1635, #1645, #1715, #1729, #1744, #1783, #1839, #1869, #1885, #1890, #1902, #1918, #1919, #1924, #1925, #1946, #1964, #1991, #2131, #2233, #2342, #2348, #2408, #2459, #2499, #2523, #2572, #2582, #2602, #2614, #2615, #2675, #2710, #2745, #2763, #2816, #2830, #2834, #2878, #2879, #2887, #2888, #2901, #2911, #2912, #2922, #2937, #2938, #2942, #2951, #2955, #2957, #2961, #2964, #2965, #2974, #2975, #2989, #2990, #3002, #3055, #3070, #3087, #3135, #3139, #3173, #3182, #3184, #3200, #3213, #3214, #3221, #3243, #3251)
on 2011-03-24 10:18 *
By Iulian Dragos
Updating tickets (#1000199, #1000200, #1000201, #1000204, #1000205, #1000209, #1000210, #1000211, #1000212, #1000215, #1000217, #1000218, #1000220, #1000222, #1000226, #1000227, #1000228, #1000230, #1000231, #1000232, #1000233, #1000235, #1000236, #1000237, #1000239, #1000240, #1000241, #1000242, #1000243, #1000244, #1000248, #1000249, #1000252, #1000253, #1000254, #1000255, #1000256, #1000258, #1000259, #1000032, #1000059, #1000062, #1000163, #1000197, #1000216, #1000221, #1000224, #1000121, #1000175, #1000219, #1000251, #1000069, #1000195, #1000213, #1000223, #1000006, #1000021, #1000038, #1000048, #1000051, #1000052, #1000075, #1000103, #1000109, #1000115, #1000119, #1000156, #1000186, #1000207, #1000238, #1000262, #1000263, #380, #389, #683, #1238, #1331, #1635, #1645, #1715, #1729, #1744, #1783, #1839, #1869, #1885, #1890, #1902, #1918, #1919, #1924, #1925, #1946, #1964, #1991, #2131, #2233, #2342, #2348, #2408)