Community
Participate
Working Groups
When working w/e.g. Tapestry, it would be convenient to have a "add abstract method" QuickFix as the actual implementation is provided by the framework's subclass.... Øyvind
A bit more background: This PR ties into the Web Tools Project at some level. There is a plugin that I use "Spindle" that knows *why* a method is missing in my .java class. If the Spindle plugin was allowed to offer a QuickFix which applies to certain .java files(those that are tied into a web application via various .xml files), Spindle could also make the necessary modifications to the Tapestry XML files as well as adding the approperiate abstract method. http://jakarta.apache.org/tapestry/ http://spindle.sourceforge.net/
Øyvind, the quick fix/assist infrastrucuture is open. Other plug-ins can provide their own quick fixes and quick assist (for example JUnit contributed the "Add JUnit Library" quick fix). The extension point is org.eclipse.jdt.ui.quickFixProcessors and org.eclipse.jdt.ui.quickAssistProcessors. So Spindle is able to provide this quick fix. I will close this as works for me since the infrastructure is there and I don't see what else JDT can do.
(In reply to comment #2) > Øyvind, > > the quick fix/assist infrastrucuture is open. Other plug-ins can provide their > own quick fixes and quick assist (for example JUnit contributed the "Add JUnit > Library" quick fix). The extension point is > org.eclipse.jdt.ui.quickFixProcessors and > org.eclipse.jdt.ui.quickAssistProcessors. So Spindle is able to provide this > quick fix. > > I will close this as works for me since the infrastructure is there and I don't > see what else JDT can do. Add "Add abstract method" QuickFix? This quickfix is generally useful for Java programs.
But what should it fix ? Can you please provide a use case.
(In reply to comment #4) > But what should it fix ? Can you please provide a use case. void foo(String t) { bar(t); // this method does not exist. } QuickFix will add: abstract void bar(String);
Stupid me ;-).
If this is added to Eclipse(eventually), is there a reasonable way for the Spindle plugin to copy & paste the "add abstract method" quickfix into the plugin? Perhaps this PR could be put to bed by creating and publishing an example of how to add a quickfix to a plugin? There are other less general QuickFixes that the Spindle plugin could grow, and a copy&paste example would be a great catalalyst, I'd think. :-)
Spindle is about to release a new version that contains this quickfix. Not an ideal solution as it uses stuff that's internal to JDT. Would prefer that Eclipse provide this and then I can remove what I have (which will invetiably break as Eclispe 3.2 evolves).
*** This bug has been marked as a duplicate of bug 38201 ***