Commit 12d31b4d authored by Johannes Roith's avatar Johannes Roith

Move some thing around...

parent 1d65e12b
package de.in.tum.www2.cup.analysis;
import de.in.tum.www2.cup.Position;
import de.in.tum.www2.cup.Range;
import de.in.tum.www2.cup.ast.*;
public class FindNextCodeBlockLine extends Visitor<Object>
......
package de.tum.in.www2.cupplugin.controller;
package de.tum.in.www2.cupplugin;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
......
......@@ -11,12 +11,9 @@ import de.in.tum.www2.cup.Range;
import de.in.tum.www2.cup.analysis.FindAtPositionVisitor;
import de.in.tum.www2.cup.ast.AbstractNode;
import de.in.tum.www2.cup.ast.IHasDeclarationReference;
import de.in.tum.www2.cup.ast.IHasDefinitionReference;
import de.in.tum.www2.cup.ast.IWithName;
import de.in.tum.www2.cup.ast.ParserResult;
import de.in.tum.www2.cup.ast.Production;
import de.in.tum.www2.cup.ast.ProductionSymbolRef;
import de.tum.in.www2.cupplugin.controller.PluginUtility;
import de.tum.in.www2.cupplugin.PluginUtility;
import de.tum.in.www2.cupplugin.editors.CupTextEditor;
import de.tum.in.www2.cupplugin.editors.MultiPageEditor;
import de.tum.in.www2.cupplugin.model.Model;
......
......@@ -20,7 +20,7 @@ import de.in.tum.www2.cup.ast.NonTerminalDeclaration;
import de.in.tum.www2.cup.ast.ParserResult;
import de.in.tum.www2.cup.ast.Production;
import de.in.tum.www2.cup.ast.ProductionSymbolRef;
import de.tum.in.www2.cupplugin.controller.PluginUtility;
import de.tum.in.www2.cupplugin.PluginUtility;
import de.tum.in.www2.cupplugin.editors.CupTextEditor;
import de.tum.in.www2.cupplugin.editors.MultiPageEditor;
import de.tum.in.www2.cupplugin.model.Model;
......
......@@ -4,7 +4,7 @@ import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import de.tum.in.www2.cupplugin.controller.PluginUtility;
import de.tum.in.www2.cupplugin.PluginUtility;
public class RenameSymbolHandler extends AbstractHandler {
......
......@@ -8,7 +8,7 @@ import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IDocumentListener;
import de.tum.in.www2.cupplugin.controller.Controller;
import de.tum.in.www2.cupplugin.controller.PluginUtility;
import de.tum.in.www2.cupplugin.PluginUtility;
class CTEDocumentListener implements IDocumentListener {
......
......@@ -28,7 +28,7 @@ public class CupHyperlinkDetector implements IHyperlinkDetector {
// TODO: we should assume that references have been resolved,
// which means, we can easily look up the declaration
// and definition locations.
}
static public class CupHyperlink implements IHyperlink {
......
......@@ -9,16 +9,24 @@ import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableItem;
import de.in.tum.www2.cup.LALRResult;
import de.in.tum.www2.cup.ast.ParserResult;
import de.in.tum.www2.cup.internal.lalr_state;
import de.tum.in.www2.cupplugin.model.Model;
public class CupOverviewView {
private Composite tableComposite;
private IDocument doc;
private Table table;
public CupOverviewView(Composite parent, IDocument doc) {
this.doc = doc;
this.tableComposite = parent;
FillLayout layout = new FillLayout();
this.tableComposite.setLayout(layout);
Table table = new Table (tableComposite, SWT.VIRTUAL | SWT.BORDER);
table = new Table (tableComposite, SWT.VIRTUAL | SWT.BORDER);
table.setItemCount (10);
table.addListener (SWT.SetData, new Listener () {
public void handleEvent (Event event) {
......@@ -32,6 +40,12 @@ public class CupOverviewView {
public void willBecomeVisible() {
System.out.println("CupOverviewView will become visible.");
Model model = Model.getInstanceForDocument(doc);
LALRResult result = model.getLaLrResult();
int numberOfStates = lalr_state.number(result.getContext());
}
public void becameHidden() {
......
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