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/ui/org/eclipse/jdt/internal/ui/text/correction/PropertiesFileCorrectionProcessor.java
IProblemLocation[] problemLocations= (IProblemLocation[]) problems.toArray(new IProblemLocation[problems.size()]);
		collectCorrections(context, problemLocations, proposals);
	}
	private void processAnnotation(Annotation curr, Position pos, List problems, List proposals) {
		if (curr instanceof IJavaAnnotation) {
			IJavaAnnotation javaAnnotation= (IJavaAnnotation) curr;
			int problemId= javaAnnotation.getId();
			if (problemId != -1) {
				problems.add(new ProblemLocation(pos.getOffset(), pos.getLength(), javaAnnotation));
				return; 
			}
		}
		if (curr instanceof SimpleMarkerAnnotation) {
			IMarker marker= ((SimpleMarkerAnnotation) curr).getMarker();
			IMarkerResolution[] res= IDE.getMarkerHelpRegistry().getResolutions(marker);
			if (res.length > 0) {
				for (int i= 0; i < res.length; i++) {
					proposals.add(new MarkerResolutionProposal(res[i], marker));
				}
			}
		}
	}
	public static void collectCorrections(IInvocationContext context, IProblemLocation[] locations, ArrayList proposals) {
		try {
			IJavaCompletionProposal[] res= fgWordQuickFixProcessor.getCorrections(context, locations);
			if (res != null) {
				for (int k= 0; k < res.length; k++) {
					proposals.add(res[k]);
				}
			}