Commit d76727b3 authored by Michael Schwarz's avatar Michael Schwarz

moved conflict stuff to different package

parent f314f1e1
package de.tum.in.www2.cupplugin.views;
package de.tum.in.www2.cupplugin.conflictresolution;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
......
package de.tum.in.www2.cupplugin.views;
package de.tum.in.www2.cupplugin.conflictresolution;
import java.util.Collections;
import java.util.HashMap;
......@@ -15,8 +15,8 @@ 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;
import de.tum.in.www2.cupplugin.views.GraphHelper.TarjanNodeInfo;
class PrecedenceToInsert extends GraphHelper<terminal> implements ResolutionStrategy{
private HashMap<terminal,Precedence.Type> precs = new HashMap<>();
......
package de.tum.in.www2.cupplugin.views;
package de.tum.in.www2.cupplugin.conflictresolution;
import java.util.ArrayList;
import java.util.Collections;
......@@ -13,6 +13,7 @@ import de.in.tum.www2.cup.ast.Production;
import de.in.tum.www2.cup.ast.ProductionRight;
import de.in.tum.www2.cup.internal.lr_item_core;
import de.tum.in.www2.cupplugin.model.Model;
import de.tum.in.www2.cupplugin.views.CupConflictsView;
public class ReduceReduceReorder {
IDocument document;
......
package de.tum.in.www2.cupplugin.views;
package de.tum.in.www2.cupplugin.conflictresolution;
import java.util.HashMap;
import java.util.HashSet;
......@@ -16,9 +16,8 @@ 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.GraphHelper.TarjanNodeInfo;
import de.tum.in.www2.cupplugin.views.CupConflictsView;
import de.tum.in.www2.cupplugin.views.CupConflictsView.ShiftReduceDetails;
import de.tum.in.www2.cupplugin.views.PrecedenceToInsert.PrecedenceCyclicException;
public class ReordersToDo extends GraphHelper<lr_item_core> implements ResolutionStrategy{
private LinkedList<lr_item_core> result;
......
package de.tum.in.www2.cupplugin.views;
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 {
......
......@@ -40,9 +40,13 @@ import de.in.tum.www2.cup.internal.lr_item_core;
import de.in.tum.www2.cup.internal.terminal;
import de.tum.in.www2.cupplugin.Colors;
import de.tum.in.www2.cupplugin.Pair;
import de.tum.in.www2.cupplugin.conflictresolution.PrecedenceToInsert;
import de.tum.in.www2.cupplugin.conflictresolution.ReduceReduceReorder;
import de.tum.in.www2.cupplugin.conflictresolution.ReordersToDo;
import de.tum.in.www2.cupplugin.conflictresolution.ResolutionStrategy;
import de.tum.in.www2.cupplugin.conflictresolution.PrecedenceToInsert.PrecedenceCyclicException;
import de.tum.in.www2.cupplugin.conflictresolution.ReordersToDo.OrderCyclicException;
import de.tum.in.www2.cupplugin.views.CupConflictsView.ShiftReduceDetails;
import de.tum.in.www2.cupplugin.views.PrecedenceToInsert.PrecedenceCyclicException;
import de.tum.in.www2.cupplugin.views.ReordersToDo.OrderCyclicException;
class ConflictPanel extends Composite {
private final CupConflictsView cupConflictsView;
......
......@@ -60,6 +60,12 @@ 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.Colors;
import de.tum.in.www2.cupplugin.conflictresolution.PrecedenceToInsert;
import de.tum.in.www2.cupplugin.conflictresolution.ReduceReduceReorder;
import de.tum.in.www2.cupplugin.conflictresolution.ReordersToDo;
import de.tum.in.www2.cupplugin.conflictresolution.ResolutionStrategy;
import de.tum.in.www2.cupplugin.conflictresolution.PrecedenceToInsert.PrecedenceCyclicException;
import de.tum.in.www2.cupplugin.conflictresolution.ReordersToDo.OrderCyclicException;
import de.tum.in.www2.cupplugin.controller.Controller.JobsToDo;
import de.tum.in.www2.cupplugin.controller.Controller;
import de.tum.in.www2.cupplugin.controller.IRegisterForControllerChanges;
......@@ -70,8 +76,6 @@ import de.tum.in.www2.cupplugin.editors.Jumper;
import de.tum.in.www2.cupplugin.editors.RevisionManager;
import de.tum.in.www2.cupplugin.model.ICupParserLaLrChangeObserver;
import de.tum.in.www2.cupplugin.model.Model;
import de.tum.in.www2.cupplugin.views.PrecedenceToInsert.PrecedenceCyclicException;
import de.tum.in.www2.cupplugin.views.ReordersToDo.OrderCyclicException;
public class CupConflictsView extends FailableView
implements ICupEditorPageVisibility, ICupParserLaLrChangeObserver, IRegisterForControllerChanges {
......@@ -582,6 +586,8 @@ public class CupConflictsView extends FailableView
} catch (BadLocationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} finally {
abortConnectedResolution(true);
}
}
......@@ -608,7 +614,7 @@ public class CupConflictsView extends FailableView
} catch (BadLocationException e) {
e.printStackTrace();
} catch (de.tum.in.www2.cupplugin.views.PrecedenceToInsert.PrecedenceCyclicException e) {
} catch (de.tum.in.www2.cupplugin.conflictresolution.PrecedenceToInsert.PrecedenceCyclicException e) {
e.printStackTrace();
} finally {
abortConnectedResolution(true);
......
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