Commit 69f5e1f7 authored by Michael Schwarz's avatar Michael Schwarz
Browse files

remove unneccessary import projectwide

parent d76727b3
......@@ -2,11 +2,11 @@ package de.tum.in.www2.cupplugin;
import org.eclipse.core.resources.IResourceChangeEvent;
import org.eclipse.core.resources.IResourceChangeListener;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
import org.eclipse.core.resources.IWorkspace;
import de.tum.in.www2.cupplugin.debug.Debugger;
......
......@@ -3,14 +3,14 @@ package de.tum.in.www2.cupplugin;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.resources.IFile;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.handlers.HandlerUtil;
import org.eclipse.ui.texteditor.IDocumentProvider;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.handlers.HandlerUtil;
import org.eclipse.ui.texteditor.IDocumentProvider;
import de.in.tum.www2.cup.Position;
import de.in.tum.www2.cup.Range;
......
......@@ -3,6 +3,7 @@ package de.tum.in.www2.cupplugin.commands;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import de.in.tum.www2.cup.Position;
import de.in.tum.www2.cup.Range;
import de.in.tum.www2.cup.ast.AbstractNode;
......
......@@ -4,6 +4,7 @@ import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.text.IDocument;
import de.in.tum.www2.cup.Position;
import de.in.tum.www2.cup.Range;
import de.in.tum.www2.cup.ast.AbstractNode;
......
......@@ -17,6 +17,7 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.PlatformUI;
import de.in.tum.www2.cup.Range;
import de.in.tum.www2.cup.analysis.Visitor;
import de.in.tum.www2.cup.ast.AbstractNode;
......
......@@ -3,14 +3,9 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map.Entry;
import java.util.Set;
import java.util.Stack;
import java.util.Map.Entry;
import de.in.tum.www2.cup.Conflict;
import de.in.tum.www2.cup.internal.terminal;
import de.tum.in.www2.cupplugin.views.CupConflictsView.ShiftReduceDetails;
public abstract class GraphHelper<X> {
// Edges are stored in reverse order (i.e. there is a edge from a to b iff b has a explicit
......
package de.tum.in.www2.cupplugin.conflictresolution;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import java.util.Stack;
import java.util.Map.Entry;
import java.util.Stack;
import de.in.tum.www2.cup.Conflict;
import de.in.tum.www2.cup.ReduceReduceConflict;
import de.in.tum.www2.cup.ShiftReduceConflict;
import de.in.tum.www2.cup.ast.Precedence;
import de.in.tum.www2.cup.internal.terminal;
import de.tum.in.www2.cupplugin.Pair;
import de.tum.in.www2.cupplugin.views.CupConflictsView;
import de.tum.in.www2.cupplugin.views.CupConflictsView.ShiftReduceDetails;
class PrecedenceToInsert extends GraphHelper<terminal> implements ResolutionStrategy{
public class PrecedenceToInsert extends GraphHelper<terminal> implements ResolutionStrategy{
private HashMap<terminal,Precedence.Type> precs = new HashMap<>();
// These need to be inserted whenever an edge that contains the key is to be inserted
......@@ -26,7 +22,7 @@ class PrecedenceToInsert extends GraphHelper<terminal> implements ResolutionStra
private LinkedList<Pair<terminal,Precedence.Type>> result;
// Exception can not be moved to GraphHelper as that is generic and because Java
class PrecedenceCyclicException extends Exception{
public class PrecedenceCyclicException extends Exception{
/**
* Every Exception is expected to have one of those
*/
......
......@@ -7,7 +7,6 @@ import java.util.List;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import de.in.tum.www2.cup.ast.ParserResult;
import de.in.tum.www2.cup.ast.Production;
import de.in.tum.www2.cup.ast.ProductionRight;
......
......@@ -4,19 +4,14 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Stack;
import java.util.Map.Entry;
import java.util.Stack;
import de.in.tum.www2.cup.Conflict;
import de.in.tum.www2.cup.ReduceReduceConflict;
import de.in.tum.www2.cup.ShiftReduceConflict;
import de.in.tum.www2.cup.ast.Precedence;
import de.in.tum.www2.cup.internal.internal_error;
import de.in.tum.www2.cup.internal.lalr_item;
import de.in.tum.www2.cup.internal.lr_item_core;
import de.in.tum.www2.cup.internal.terminal;
import de.tum.in.www2.cupplugin.Pair;
import de.tum.in.www2.cupplugin.views.CupConflictsView;
import de.tum.in.www2.cupplugin.views.CupConflictsView.ShiftReduceDetails;
public class ReordersToDo extends GraphHelper<lr_item_core> implements ResolutionStrategy{
......@@ -26,7 +21,7 @@ public class ReordersToDo extends GraphHelper<lr_item_core> implements Resolutio
edges = new HashMap<>();
}
class OrderCyclicException extends Exception{
public class OrderCyclicException extends Exception{
/**
* Every Exception is expected to have one of those
*/
......
package de.tum.in.www2.cupplugin.conflictresolution;
import de.in.tum.www2.cup.Conflict;
import de.tum.in.www2.cupplugin.views.CupConflictsView;
import de.tum.in.www2.cupplugin.views.CupConflictsView.ShiftReduceDetails;
public interface ResolutionStrategy {
......
......@@ -2,10 +2,10 @@ package de.tum.in.www2.cupplugin.debug;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.List;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
......
......@@ -11,9 +11,6 @@ import org.eclipse.debug.core.IBreakpointManager;
import org.eclipse.jface.text.IDocument;
import org.eclipse.swt.widgets.Display;
import de.tum.in.www2.cupplugin.editors.CupTextEditor;
import de.tum.in.www2.cupplugin.editors.RevisionManager;
import de.tum.in.www2.cupplugin.model.Model;
import de.in.tum.www2.cup.CupParser;
import de.in.tum.www2.cup.NoopErrorReporter;
import de.in.tum.www2.cup.analysis.FindNextCodeBlockLineVisitor;
......@@ -21,6 +18,9 @@ import de.in.tum.www2.cup.analysis.GetDebuggerMappingVisitor;
import de.in.tum.www2.cup.analysis.GetDebuggerMappingVisitor.Mapping;
import de.in.tum.www2.cup.ast.ClassName;
import de.in.tum.www2.cup.ast.ParserResult;
import de.tum.in.www2.cupplugin.editors.CupTextEditor;
import de.tum.in.www2.cupplugin.editors.RevisionManager;
import de.tum.in.www2.cupplugin.model.Model;
public class Debugger {
private static final String DEFAULT_CLASS = "Parser";
......
......@@ -18,7 +18,8 @@ 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.model.*;
import de.tum.in.www2.cupplugin.model.ICupParserASTChangeObserver;
import de.tum.in.www2.cupplugin.model.Model;
@SuppressWarnings("restriction")
public class CupContentAssistProcessor implements IContentAssistProcessor,
......
......@@ -30,14 +30,32 @@ import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
import de.in.tum.www2.cup.Position;
import de.in.tum.www2.cup.Range;
import de.in.tum.www2.cup.Utility;
import de.in.tum.www2.cup.analysis.*;
import de.in.tum.www2.cup.ast.*;
import de.in.tum.www2.cup.analysis.Visitor;
import de.in.tum.www2.cup.ast.AbstractNode;
import de.in.tum.www2.cup.ast.ActionCodeBlock;
import de.in.tum.www2.cup.ast.ClassName;
import de.in.tum.www2.cup.ast.CodeBlock;
import de.in.tum.www2.cup.ast.Import;
import de.in.tum.www2.cup.ast.Name;
import de.in.tum.www2.cup.ast.NonTerminal;
import de.in.tum.www2.cup.ast.NonTerminalDeclaration;
import de.in.tum.www2.cup.ast.Package;
import de.tum.in.www2.cupplugin.controller.Controller.JobsToDo;
import de.in.tum.www2.cup.ast.ParserResult;
import de.in.tum.www2.cup.ast.Precedence;
import de.in.tum.www2.cup.ast.Production;
import de.in.tum.www2.cup.ast.ProductionRight;
import de.in.tum.www2.cup.ast.SpecialCodeBlock;
import de.in.tum.www2.cup.ast.StartWith;
import de.in.tum.www2.cup.ast.Terminal;
import de.in.tum.www2.cup.ast.TerminalDeclaration;
import de.in.tum.www2.cup.ast.TypedNonTerminalDeclaration;
import de.in.tum.www2.cup.ast.TypedTerminalDeclaration;
import de.tum.in.www2.cupplugin.controller.Controller;
import de.tum.in.www2.cupplugin.controller.Controller.JobsToDo;
import de.tum.in.www2.cupplugin.controller.IRegisterForControllerChanges;
import de.tum.in.www2.cupplugin.controller.JobStatus;
import de.tum.in.www2.cupplugin.model.*;
import de.tum.in.www2.cupplugin.model.ICupParserASTChangeObserver;
import de.tum.in.www2.cupplugin.model.Model;
// TODO: try changing to IContentOutlinePage and using a virtual view!
public class CupContentOutlinePage extends ContentOutlinePage implements
......
......@@ -5,7 +5,6 @@ import org.eclipse.jface.text.DocumentEvent;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IDocumentListener;
import de.in.tum.www2.cup.Position;
import de.in.tum.www2.cup.analysis.LocationPatchVisitor;
import de.in.tum.www2.cup.ast.ParserResult;
import de.tum.in.www2.cupplugin.controller.Controller;
......
......@@ -3,27 +3,19 @@ package de.tum.in.www2.cupplugin.editors;
import java.util.ArrayList;
import java.util.List;
import javax.swing.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.Region;
import org.eclipse.jface.text.hyperlink.IHyperlink;
import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
import org.eclipse.swt.custom.StyleRange;
import de.in.tum.www2.cup.Range;
import de.in.tum.www2.cup.analysis.Visitor;
import de.in.tum.www2.cup.analysis.WildcardVisitor;
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.Name;
import de.in.tum.www2.cup.ast.NonTerminal;
import de.in.tum.www2.cup.ast.ParserResult;
import de.in.tum.www2.cup.ast.Production;
public class CupHyperlinkDetector implements IHyperlinkDetector {
......
......@@ -11,9 +11,9 @@ import org.eclipse.jface.text.rules.IRule;
import org.eclipse.jface.text.rules.IToken;
import org.eclipse.jface.text.rules.IWordDetector;
import org.eclipse.jface.text.rules.MultiLineRule;
import org.eclipse.jface.text.rules.WordRule;
import org.eclipse.jface.text.rules.RuleBasedPartitionScanner;
import org.eclipse.jface.text.rules.Token;
import org.eclipse.jface.text.rules.WordRule;
public class CupPartionScanner extends RuleBasedPartitionScanner {
......
package de.tum.in.www2.cupplugin.editors;
import java.io.IOException;
import java.io.StringReader;
import java.util.Collections;
import java.util.EnumSet;
import java.util.HashSet;
import java.util.Set;
import java.util.WeakHashMap;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IInformationControlCreator;
import org.eclipse.jface.text.IInformationControl;
import org.eclipse.jface.text.ITextHover;
import org.eclipse.jface.text.TextAttribute;
import org.eclipse.jface.text.contentassist.ContentAssistant;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.text.contentassist.IContentAssistant;
import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
import org.eclipse.jface.text.hyperlink.IHyperlinkPresenter;
import org.eclipse.jface.text.hyperlink.MultipleHyperlinkPresenter;
import org.eclipse.jface.text.presentation.PresentationReconciler;
import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
import org.eclipse.jface.text.rules.IToken;
import org.eclipse.jface.text.rules.ITokenScanner;
import org.eclipse.jface.text.rules.RuleBasedScanner;
import org.eclipse.jface.text.rules.Token;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.text.source.SourceViewerConfiguration;
import org.eclipse.swt.SWT;
import de.in.tum.www2.cup.CupScanner;
import de.in.tum.www2.cup.CupSymbol;
import de.in.tum.www2.cup.Declarations;
import de.in.tum.www2.cup.NoopErrorReporter;
import de.in.tum.www2.cup.Position;
import de.in.tum.www2.cup.Range;
import de.in.tum.www2.cup.ast.AbstractNode;
import de.in.tum.www2.cup.ast.ActionCodeBlock;
import de.in.tum.www2.cup.ast.IProductionRightPart;
import de.in.tum.www2.cup.ast.LabeledProductionSymbolRef;
import de.in.tum.www2.cup.ast.ParserResult;
import de.in.tum.www2.cup.ast.ProductionRight;
import de.in.tum.www2.java.JavaScanner;
import de.in.tum.www2.java.JavaSymbol;
import de.tum.in.www2.cupplugin.IDisposable;
import de.tum.in.www2.cupplugin.PluginUtility;
import de.tum.in.www2.cupplugin.controller.Controller.JobsToDo;
import de.tum.in.www2.cupplugin.controller.Controller;
import de.tum.in.www2.cupplugin.controller.Controller.JobsToDo;
import de.tum.in.www2.cupplugin.controller.IRegisterForControllerChanges;
import de.tum.in.www2.cupplugin.controller.JobStatus;
import de.tum.in.www2.cupplugin.model.ICupParserASTChangeObserver;
......
......@@ -16,7 +16,6 @@ import org.eclipse.jface.text.source.SourceViewer;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.editors.text.TextEditor;
import org.eclipse.ui.texteditor.AbstractTextEditor;
......
......@@ -13,13 +13,12 @@ import de.in.tum.www2.cup.ast.AbstractNode;
import de.in.tum.www2.cup.ast.IHasDeclarationReference;
import de.in.tum.www2.cup.ast.NonTerminal;
import de.in.tum.www2.cup.ast.ParserResult;
import de.in.tum.www2.cup.ast.ProductionSymbolRef;
import de.in.tum.www2.cup.ast.Terminal;
import de.in.tum.www2.cup.ast.TypedNonTerminalDeclaration;
import de.in.tum.www2.cup.ast.TypedTerminalDeclaration;
import de.tum.in.www2.cupplugin.IDisposable;
import de.tum.in.www2.cupplugin.controller.Controller.JobsToDo;
import de.tum.in.www2.cupplugin.controller.Controller;
import de.tum.in.www2.cupplugin.controller.Controller.JobsToDo;
import de.tum.in.www2.cupplugin.controller.IRegisterForControllerChanges;
import de.tum.in.www2.cupplugin.controller.JobStatus;
import de.tum.in.www2.cupplugin.model.ICupParserASTChangeObserver;
......
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