Bug 127655 [api] Must have a way to query quick assist context from source viewer
I20060214-0010 [api] Must have a way to query quick assist context from text viewer. In addition, quick assistant install must specify that besides ITextViewer also ITextViewerExtension7 must be present in order to get the invocation context. ==> assertion failure if this is not met.
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/MarkerResolutionTest.java
try {
			IDocument doc= JavaUI.getDocumentProvider().getDocument(part.getEditorInput());
			doc.replace(0, 0, "\n"); 
			
			JavaCorrectionAssistant assistant= new JavaCorrectionAssistant((ITextEditor) part);
			JavaCorrectionProcessor processor= new JavaCorrectionProcessor(assistant);
			ICompletionProposal[] proposals= processor.computeQuickAssistProposals(new TextViewerContext(null, markerPos + 1));
			
			assertNumberOf("proposals", proposals.length, 1);
			assertCorrectLabels(Arrays.asList(proposals));	
			
			proposals[0].apply(doc);
			
			buf= new StringBuffer();
			buf.append("\n");		
			buf.append("package TEST1;\n");
			buf.append("import java.util.Vector;\n");
			buf.append("public class E {\n");
			buf.append("    void foo(Vector vec) {\n");
			buf.append("        goo(true);\n");
			buf.append("    }\n");
			buf.append("}\n");
			assertEqualString(doc.get(), buf.toString());
		} finally {
			JavaPlugin.getActivePage().closeAllEditors(false);
		}
	}	
	
}