Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ProB Rodin Plugin
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
general
stups
ProB Rodin Plugin
Commits
5496c599
Commit
5496c599
authored
12 years ago
by
Daniel Plagge
Browse files
Options
Downloads
Patches
Plain Diff
some minor refactoring
parent
36a942e2
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
de.prob.ui/src/de/prob/ui/ltl/CounterExamplePropositionFigure.java
+124
-95
124 additions, 95 deletions
...i/src/de/prob/ui/ltl/CounterExamplePropositionFigure.java
with
124 additions
and
95 deletions
de.prob.ui/src/de/prob/ui/ltl/CounterExamplePropositionFigure.java
+
124
−
95
View file @
5496c599
...
@@ -292,6 +292,25 @@ public abstract class CounterExamplePropositionFigure extends Figure implements
...
@@ -292,6 +292,25 @@ public abstract class CounterExamplePropositionFigure extends Figure implements
add
(
panel
);
add
(
panel
);
for
(
int
i
=
0
;
i
<
values
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
values
.
size
();
i
++)
{
createColumn
(
bounds
,
argument
,
positions
,
ellipses1
,
ellipses2
,
argumentHeight
,
pathType
,
values
,
panel
,
i
);
}
if
(
parent
!=
null
)
{
final
Ellipse
ellipse
=
ellipses2
.
get
(
stateId
);
drawChildParentConnection
(
ellipse
,
stateId
,
parent
);
}
return
panel
;
}
private
void
createColumn
(
final
Rectangle
bounds
,
final
CounterExampleProposition
argument
,
final
List
<
Integer
>
positions
,
final
Hashtable
<
Ellipse
,
Integer
>
ellipses1
,
final
Hashtable
<
Integer
,
Ellipse
>
ellipses2
,
final
int
argumentHeight
,
final
PathType
pathType
,
final
List
<
CounterExampleValueType
>
values
,
Panel
panel
,
int
i
)
{
final
CounterExampleValueType
value
=
values
.
get
(
i
);
final
CounterExampleValueType
value
=
values
.
get
(
i
);
final
Ellipse
ellipse
=
new
Ellipse
();
final
Ellipse
ellipse
=
new
Ellipse
();
...
@@ -327,7 +346,7 @@ public abstract class CounterExamplePropositionFigure extends Figure implements
...
@@ -327,7 +346,7 @@ public abstract class CounterExamplePropositionFigure extends Figure implements
final
Ellipse
targetEllipse
=
ellipses2
.
get
(
i
-
1
);
final
Ellipse
targetEllipse
=
ellipses2
.
get
(
i
-
1
);
if
(
targetEllipse
==
null
)
if
(
targetEllipse
==
null
)
continue
;
return
;
final
ChopboxAnchor
target
=
new
ChopboxAnchor
(
targetEllipse
);
final
ChopboxAnchor
target
=
new
ChopboxAnchor
(
targetEllipse
);
...
@@ -362,8 +381,7 @@ public abstract class CounterExamplePropositionFigure extends Figure implements
...
@@ -362,8 +381,7 @@ public abstract class CounterExamplePropositionFigure extends Figure implements
if
(
positions
.
contains
(
i
-
1
))
{
if
(
positions
.
contains
(
i
-
1
))
{
connection
.
setAlpha
(
Alpha
.
HIGHLIGHED
);
connection
.
setAlpha
(
Alpha
.
HIGHLIGHED
);
decoration
.
setAlpha
(
Alpha
.
HIGHLIGHED
);
decoration
.
setAlpha
(
Alpha
.
HIGHLIGHED
);
Color
transitionColor
=
getEllipseColor
(
values
Color
transitionColor
=
getEllipseColor
(
values
.
get
(
i
-
1
));
.
get
(
i
-
1
));
connection
.
setForegroundColor
(
transitionColor
);
connection
.
setForegroundColor
(
transitionColor
);
decoration
.
setForegroundColor
(
transitionColor
);
decoration
.
setForegroundColor
(
transitionColor
);
}
}
...
@@ -374,8 +392,23 @@ public abstract class CounterExamplePropositionFigure extends Figure implements
...
@@ -374,8 +392,23 @@ public abstract class CounterExamplePropositionFigure extends Figure implements
panel
.
add
(
connection
);
panel
.
add
(
connection
);
}
}
if
(
i
==
values
.
size
()
-
1
)
{
boolean
isLastElement
=
i
==
values
.
size
()
-
1
;
if
(
pathType
.
equals
(
PathType
.
INFINITE
))
{
if
(
isLastElement
)
{
createEnd
(
argument
,
positions
,
ellipses1
,
ellipses2
,
pathType
,
values
,
panel
,
i
,
ellipse
);
}
}
private
void
createEnd
(
final
CounterExampleProposition
argument
,
final
List
<
Integer
>
positions
,
final
Hashtable
<
Ellipse
,
Integer
>
ellipses1
,
final
Hashtable
<
Integer
,
Ellipse
>
ellipses2
,
final
PathType
pathType
,
final
List
<
CounterExampleValueType
>
values
,
Panel
panel
,
int
i
,
final
Ellipse
ellipse
)
{
final
IFigure
figure
;
switch
(
pathType
)
{
case
INFINITE:
final
String
operationName
=
getOperationName
(
ellipses1
final
String
operationName
=
getOperationName
(
ellipses1
.
get
(
ellipse
));
.
get
(
ellipse
));
final
Ellipse
target
=
ellipses2
.
get
(
model
.
getLoopEntry
());
final
Ellipse
target
=
ellipses2
.
get
(
model
.
getLoopEntry
());
...
@@ -383,7 +416,9 @@ public abstract class CounterExamplePropositionFigure extends Figure implements
...
@@ -383,7 +416,9 @@ public abstract class CounterExamplePropositionFigure extends Figure implements
int
alpha
=
Alpha
.
MASKED
;
int
alpha
=
Alpha
.
MASKED
;
Color
loopTransitionColor
=
ColorConstants
.
black
;
Color
loopTransitionColor
=
ColorConstants
.
black
;
if
(
positions
.
contains
(
i
)
&&
positions
.
contains
(
i
-
1
))
{
final
boolean
highlightLoop
=
positions
.
contains
(
i
)
&&
positions
.
contains
(
i
-
1
);
if
(
highlightLoop
)
{
alpha
=
Alpha
.
HIGHLIGHED
;
alpha
=
Alpha
.
HIGHLIGHED
;
}
}
...
@@ -393,28 +428,22 @@ public abstract class CounterExamplePropositionFigure extends Figure implements
...
@@ -393,28 +428,22 @@ public abstract class CounterExamplePropositionFigure extends Figure implements
loopTransitionColor
=
getEllipseColor
(
values
.
get
(
i
));
loopTransitionColor
=
getEllipseColor
(
values
.
get
(
i
));
}
}
}
}
figure
=
createLoop
(
getInsets
(),
ellipse
,
target
,
alpha
,
operationName
,
loopTransitionColor
);
break
;
final
PolylineConnection
loop
=
createLoop
(
getInsets
(),
case
REDUCED:
ellipse
,
target
,
alpha
,
operationName
,
figure
=
createReduced
(
getInsets
(),
ellipse
,
loopTransitionColor
);
positions
.
contains
(
i
)
?
Alpha
.
HIGHLIGHED
:
Alpha
.
MASKED
);
break
;
panel
.
add
(
loop
);
}
else
if
(
pathType
.
equals
(
PathType
.
REDUCED
))
{
final
Polyline
reduced
=
createReduced
(
getInsets
(),
ellipse
,
positions
.
contains
(
i
)
?
Alpha
.
HIGHLIGHED
:
Alpha
.
MASKED
);
panel
.
add
(
reduced
);
default
:
}
figure
=
null
;
break
;
}
}
if
(
figure
!=
null
)
{
panel
.
add
(
figure
);
}
}
if
(
parent
!=
null
)
{
final
Ellipse
ellipse
=
ellipses2
.
get
(
stateId
);
drawChildParentConnection
(
ellipse
,
stateId
,
parent
);
}
return
panel
;
}
}
@Override
@Override
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment