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
a2b1d924
Commit
a2b1d924
authored
13 years ago
by
Jens Bendisposto
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
2b84caad
9929e0e0
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
de.prob.ui/src/de/prob/ui/ltl/CounterExamplePropositionFigure.java
+130
-102
130 additions, 102 deletions
...i/src/de/prob/ui/ltl/CounterExamplePropositionFigure.java
de.prob.ui/src/de/prob/ui/ltl/CounterExampleViewPart.java
+0
-1
0 additions, 1 deletion
de.prob.ui/src/de/prob/ui/ltl/CounterExampleViewPart.java
with
130 additions
and
103 deletions
de.prob.ui/src/de/prob/ui/ltl/CounterExamplePropositionFigure.java
+
130
−
102
View file @
a2b1d924
...
...
@@ -176,9 +176,9 @@ public abstract class CounterExamplePropositionFigure extends Figure implements
final
Rectangle
targetBounds
=
target
.
getBounds
();
points
.
addPoint
(
new
Point
(
sourceBounds
.
x
+
size
+
insets
.
left
,
sourceBounds
.
y
+
size
/
2
+
insets
.
top
));
points
.
addPoint
(
new
Point
(
sourceBounds
.
x
+
size
+
3
.0
/
10
*
size
points
.
addPoint
(
new
Point
(
sourceBounds
.
x
+
size
+
(
3
*
size
)
/
10
+
insets
.
left
,
sourceBounds
.
y
+
size
/
2
+
insets
.
top
));
points
.
addPoint
(
new
Point
(
sourceBounds
.
x
+
size
+
3
.0
/
10
*
size
points
.
addPoint
(
new
Point
(
sourceBounds
.
x
+
size
+
(
3
*
size
)
/
10
+
insets
.
left
,
sourceBounds
.
y
-
size
/
5
+
insets
.
top
));
points
.
addPoint
(
new
Point
(
targetBounds
.
x
+
size
/
2
+
insets
.
left
,
targetBounds
.
y
-
size
/
5
+
insets
.
top
));
...
...
@@ -215,13 +215,12 @@ public abstract class CounterExamplePropositionFigure extends Figure implements
final
Rectangle
sourceBounds
=
source
.
getBounds
();
points
.
addPoint
(
new
Point
(
sourceBounds
.
x
+
size
+
insets
.
left
,
sourceBounds
.
y
+
size
/
2
+
insets
.
top
));
points
.
addPoint
(
new
Point
(
sourceBounds
.
x
+
size
+
3
.0
/
10
*
size
points
.
addPoint
(
new
Point
(
sourceBounds
.
x
+
size
+
(
3
*
size
)
/
10
+
insets
.
left
,
sourceBounds
.
y
+
size
/
2
+
insets
.
top
));
points
.
addPoint
(
new
Point
(
sourceBounds
.
x
+
size
+
3
.0
/
10
*
size
points
.
addPoint
(
new
Point
(
sourceBounds
.
x
+
size
+
(
3
*
size
)
/
10
+
insets
.
left
,
sourceBounds
.
y
+
insets
.
top
+
size
/
4
));
points
.
addPoint
(
new
Point
(
sourceBounds
.
x
+
size
+
3.0
/
10
*
size
+
insets
.
left
,
sourceBounds
.
y
+
insets
.
top
+
(
int
)
(
3.0
/
4
*
size
)));
points
.
addPoint
(
new
Point
(
sourceBounds
.
x
+
size
+
(
3
*
size
)
/
10
+
insets
.
left
,
sourceBounds
.
y
+
insets
.
top
+
(
3
*
size
)
/
4
));
polyline
.
setPoints
(
points
);
return
polyline
;
...
...
@@ -293,6 +292,25 @@ public abstract class CounterExamplePropositionFigure extends Figure implements
add
(
panel
);
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
Ellipse
ellipse
=
new
Ellipse
();
...
...
@@ -328,7 +346,7 @@ public abstract class CounterExamplePropositionFigure extends Figure implements
final
Ellipse
targetEllipse
=
ellipses2
.
get
(
i
-
1
);
if
(
targetEllipse
==
null
)
continue
;
return
;
final
ChopboxAnchor
target
=
new
ChopboxAnchor
(
targetEllipse
);
...
...
@@ -363,8 +381,7 @@ public abstract class CounterExamplePropositionFigure extends Figure implements
if
(
positions
.
contains
(
i
-
1
))
{
connection
.
setAlpha
(
Alpha
.
HIGHLIGHED
);
decoration
.
setAlpha
(
Alpha
.
HIGHLIGHED
);
Color
transitionColor
=
getEllipseColor
(
values
.
get
(
i
-
1
));
Color
transitionColor
=
getEllipseColor
(
values
.
get
(
i
-
1
));
connection
.
setForegroundColor
(
transitionColor
);
decoration
.
setForegroundColor
(
transitionColor
);
}
...
...
@@ -375,8 +392,23 @@ public abstract class CounterExamplePropositionFigure extends Figure implements
panel
.
add
(
connection
);
}
if
(
i
==
values
.
size
()
-
1
)
{
if
(
pathType
.
equals
(
PathType
.
INFINITE
))
{
boolean
isLastElement
=
i
==
values
.
size
()
-
1
;
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
.
get
(
ellipse
));
final
Ellipse
target
=
ellipses2
.
get
(
model
.
getLoopEntry
());
...
...
@@ -384,7 +416,9 @@ public abstract class CounterExamplePropositionFigure extends Figure implements
int
alpha
=
Alpha
.
MASKED
;
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
;
}
...
...
@@ -394,28 +428,22 @@ public abstract class CounterExamplePropositionFigure extends Figure implements
loopTransitionColor
=
getEllipseColor
(
values
.
get
(
i
));
}
}
figure
=
createLoop
(
getInsets
(),
ellipse
,
target
,
alpha
,
operationName
,
loopTransitionColor
);
break
;
final
PolylineConnection
loop
=
createLoop
(
getInsets
(),
ellipse
,
target
,
alpha
,
operationName
,
loopTransitionColor
);
panel
.
add
(
loop
);
}
else
if
(
pathType
.
equals
(
PathType
.
REDUCED
))
{
final
Polyline
reduced
=
createReduced
(
getInsets
(),
ellipse
,
positions
.
contains
(
i
)
?
Alpha
.
HIGHLIGHED
:
Alpha
.
MASKED
);
case
REDUCED:
figure
=
createReduced
(
getInsets
(),
ellipse
,
positions
.
contains
(
i
)
?
Alpha
.
HIGHLIGHED
:
Alpha
.
MASKED
);
break
;
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
...
...
This diff is collapsed.
Click to expand it.
de.prob.ui/src/de/prob/ui/ltl/CounterExampleViewPart.java
+
0
−
1
View file @
a2b1d924
...
...
@@ -42,7 +42,6 @@ public final class CounterExampleViewPart extends StateBasedViewPart {
private
CTabFolder
tabFolder
;
private
ViewType
viewType
=
ViewType
.
INTERACTIVE
;
private
int
currentIndex
=
-
1
;
public
static
CounterExampleViewPart
showDefault
()
{
final
IWorkbenchPage
workbenchPage
=
PlatformUI
.
getWorkbench
()
...
...
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