Skip to content

Commit

Permalink
prmr#416 fix issues with PR
Browse files Browse the repository at this point in the history
  • Loading branch information
Farihatanjin committed Mar 8, 2021
1 parent 3aefb24 commit 35d40d0
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class ClassDiagramBuilder extends DiagramBuilder
{
private static final int PADDING = 10;
private static final int TOP_HEIGHT = 20;
private static final ConstraintSet constraints = new ConstraintSet(
private static final ConstraintSet CONSTRAINTS = new ConstraintSet(
EdgeConstraints.noteEdge(),
EdgeConstraints.noteNode(),
EdgeConstraints.maxEdges(1),
Expand Down Expand Up @@ -114,7 +114,7 @@ public DiagramOperation createAddNodeOperation(Node pNode, Point pRequestedPosit
@Override
protected ConstraintSet getEdgeConstraints()
{
return constraints;
return CONSTRAINTS;
}

private static boolean validChild(Node pPotentialChild)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public final boolean canAdd(Edge pEdge, Point pStart, Point pEnd)
}


return this.getEdgeConstraints().satisfied(pEdge, startNode.get(), endNode.get(), pStart, pEnd, aDiagram);
return getEdgeConstraints().satisfied(pEdge, startNode.get(), endNode.get(), pStart, pEnd, aDiagram);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
*/
public class ObjectDiagramBuilder extends DiagramBuilder
{
private static final ConstraintSet constraints = new ConstraintSet(
private static final ConstraintSet CONSTRAINTS = new ConstraintSet(

EdgeConstraints.noteEdge(),
EdgeConstraints.noteNode(),
Expand All @@ -64,7 +64,7 @@ public ObjectDiagramBuilder( Diagram pDiagram )
@Override
protected ConstraintSet getEdgeConstraints()
{
return constraints;
return CONSTRAINTS;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class SequenceDiagramBuilder extends DiagramBuilder
{
private static final int CALL_NODE_YGAP = 5;
private static final ImplicitParameterNodeViewer IMPLICIT_PARAMETER_NODE_VIEWER = new ImplicitParameterNodeViewer();
private static final ConstraintSet constraints = new ConstraintSet(
private static final ConstraintSet CONSTRAINTS = new ConstraintSet(
EdgeConstraints.noteEdge(),
EdgeConstraints.noteNode(),
EdgeConstraints.maxEdges(1),
Expand All @@ -78,7 +78,7 @@ public SequenceDiagramBuilder( Diagram pDiagram )
protected ConstraintSet getEdgeConstraints()
{

return constraints;
return CONSTRAINTS;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class StateDiagramBuilder extends DiagramBuilder
* @param pDiagram The diagram to wrap around.
* @pre pDiagram != null;
*/
private static final ConstraintSet constraints = new ConstraintSet(
private static final ConstraintSet CONSTRAINTS = new ConstraintSet(

EdgeConstraints.noteEdge(),
EdgeConstraints.noteNode(),
Expand All @@ -57,6 +57,6 @@ public StateDiagramBuilder( Diagram pDiagram )
@Override
protected ConstraintSet getEdgeConstraints()
{
return constraints;
return CONSTRAINTS;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
*/
public class UseCaseDiagramBuilder extends DiagramBuilder
{
private static final ConstraintSet constraints = new ConstraintSet(
private static final ConstraintSet CONSTRAINTS = new ConstraintSet(

EdgeConstraints.noteEdge(),
EdgeConstraints.noteNode(),
Expand All @@ -55,6 +55,6 @@ public UseCaseDiagramBuilder( Diagram pDiagram )
@Override
protected ConstraintSet getEdgeConstraints()
{
return constraints;
return CONSTRAINTS;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,7 @@
*/
public final class ClassDiagramEdgeConstraints
{
private ClassDiagramEdgeConstraints() {

noSelfGeneralization();
noSelfDependency();
noDirectCycles(GeneralizationEdge.class);
noDirectCycles(AggregationEdge.class);
noDirectCycles(AssociationEdge.class);
noCombinedAssociationAggregation();
}
private ClassDiagramEdgeConstraints() {}

/*
* Self edges are not allowed for Generalization edges.
Expand Down

0 comments on commit 35d40d0

Please sign in to comment.