Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 339985

Summary: [quick assist] buffer.append() quick assist does not appear
Product: [Eclipse Project] JDT Reporter: Ayushman Jain <amj87.iitr>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: deepakazad, markus.kell.r
Version: 3.7   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Ayushman Jain CLA 2011-03-15 05:24:05 EDT
The buffer.append() quick fix should be available on any part of the code, such as the following method

int foo() {
   int i = 1;
   return i;
}

But pressing Ctrl+1 after selecting this method in the editor does not give that quick assist.

Strangely, Deepak and saw it working yesterday, and cannot see it today!
Comment 1 Ayushman Jain CLA 2011-03-15 05:24:51 EDT
Tried this on both on M6 and the I build before that.
Comment 2 Markus Keller CLA 2011-03-15 12:12:30 EDT
I guess you talking about "Wrap in buf.append() (to clipboard)"?

That one is contributed by org.eclipse.jdt.ui.tests, so it's only available in a runtime workbench where the test plug-in is available.
Comment 3 Deepak Azad CLA 2011-03-15 12:48:27 EDT
(In reply to comment #2)
> I guess you talking about "Wrap in buf.append() (to clipboard)"?
Yep.

> That one is contributed by org.eclipse.jdt.ui.tests, so it's only available in
> a runtime workbench where the test plug-in is available.
Ha! 

Ayush, if you want to use this directly from o.e.jdt.ui.tests then you will have to import a couple more projects in your workspace. I think it is better if you extract the quick assist code in a smaller plug-in and then use this small plug-in - let me know if you need help with this.
Comment 4 Ayushman Jain CLA 2011-03-15 15:34:11 EDT
> I think it is better
> if you extract the quick assist code in a smaller plug-in and then use this
> small plug-in - let me know if you need help with this.

That'll be great. We can then write jdt.core tests easily!
Comment 5 Markus Keller CLA 2011-03-16 06:47:54 EDT
> extract the quick assist code in a smaller plug-in

Don't you have a "JDT/Core tools" plug-in? You could add it there.
The code is in MyQuickAssistProcessor.