Commit 328fe3d0 authored by Benedikt Engeser's avatar Benedikt Engeser

...

parent 99e9b26d
......@@ -3,20 +3,36 @@ package de.tum.in.www2.cupplugin.editors;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer;
import org.eclipse.jdt.internal.ui.text.ContentAssistPreference;
import org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor;
import org.eclipse.jdt.internal.ui.text.java.JavaCompletionProcessor;
import org.eclipse.jdt.internal.ui.text.javadoc.JavadocCompletionProcessor;
import org.eclipse.jdt.ui.text.IJavaPartitions;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.DefaultInformationControl;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IInformationControl;
import org.eclipse.jface.text.IInformationControlCreator;
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.ITypedRegion;
import org.eclipse.jface.text.contentassist.CompletionProposal;
import org.eclipse.jface.text.contentassist.ContentAssistant;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.text.contentassist.IContentAssistant;
import org.eclipse.jface.text.contentassist.IContextInformation;
import org.eclipse.jface.text.contentassist.IContextInformationValidator;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.texteditor.ITextEditor;
import de.in.tum.www2.cup.CupSymbol;
import de.in.tum.www2.cup.Declarations;
import de.in.tum.www2.cup.ast.ParserResult;
import de.tum.in.www2.cupplugin.IDisposable;
import de.tum.in.www2.cupplugin.controller.Controller;
import de.tum.in.www2.cupplugin.model.*;
public class CupContentAssistProcessor implements IContentAssistProcessor,
......@@ -27,16 +43,33 @@ public class CupContentAssistProcessor implements IContentAssistProcessor,
/*
* TODO: Find the way to get the Java Code assistant here
*/
private IContentAssistProcessor javaProcessor = null;
public CupContentAssistProcessor(IDocument doc) {
this.decls = new Declarations();
this.doc = doc;
Model model = Model.getInstanceForDocument(doc);
updateFromParserResult(model.getAstModel());
model.registerModelObserver(this);
this.javaProcessor = getJavaContentAssistProcessor();
}
@SuppressWarnings("restriction")
private IContentAssistProcessor getJavaContentAssistProcessor() {
JavaCompletionProcessor r = null;
return r;
}
public void dispose() {
Model.getInstanceForDocument(doc).unregisterModelObserver(this);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment