Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TTool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mbe-tools
TTool
Commits
bc4f7fcd
Commit
bc4f7fcd
authored
10 years ago
by
Ludovic Apvrille
Browse files
Options
Downloads
Patches
Plain Diff
First test on split AD
parent
24542534
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/tmltranslator/TMLCP.java
+1
-0
1 addition, 0 deletions
src/tmltranslator/TMLCP.java
src/tmltranslator/tmlcp/TMLCPActivityDiagram.java
+15
-7
15 additions, 7 deletions
src/tmltranslator/tmlcp/TMLCPActivityDiagram.java
with
16 additions
and
7 deletions
src/tmltranslator/TMLCP.java
+
1
−
0
View file @
bc4f7fcd
...
@@ -332,6 +332,7 @@ public class TMLCP extends TMLElement {
...
@@ -332,6 +332,7 @@ public class TMLCP extends TMLElement {
for
(
TMLCPActivityDiagram
diag:
otherCPs
)
{
for
(
TMLCPActivityDiagram
diag:
otherCPs
)
{
all
.
addAll
(
diag
.
splitADs
());
all
.
addAll
(
diag
.
splitADs
());
}
}
otherCPs
.
addAll
(
all
);
}
}
public
void
printDataStructure
()
{
public
void
printDataStructure
()
{
...
...
This diff is collapsed.
Click to expand it.
src/tmltranslator/tmlcp/TMLCPActivityDiagram.java
+
15
−
7
View file @
bc4f7fcd
...
@@ -212,6 +212,10 @@ public class TMLCPActivityDiagram extends TMLElement {
...
@@ -212,6 +212,10 @@ public class TMLCPActivityDiagram extends TMLElement {
start
=
_elt
;
start
=
_elt
;
}
}
public
TMLCPElement
getStartElement
()
{
return
start
;
}
public
void
addTMLCPElement
(
TMLCPElement
_elt
)
{
public
void
addTMLCPElement
(
TMLCPElement
_elt
)
{
elements
.
add
(
_elt
);
elements
.
add
(
_elt
);
}
}
...
@@ -307,6 +311,8 @@ public class TMLCPActivityDiagram extends TMLElement {
...
@@ -307,6 +311,8 @@ public class TMLCPActivityDiagram extends TMLElement {
int
id
=
0
;
int
id
=
0
;
TMLCPActivityDiagram
diag
;
TMLCPActivityDiagram
diag
;
TraceManager
.
addDev
(
"Splitting AD: "
+
getName
());
// For each junction, we create a new AD
// For each junction, we create a new AD
ArrayList
<
TMLCPJunction
>
junctions
=
new
ArrayList
<
TMLCPJunction
>();
ArrayList
<
TMLCPJunction
>
junctions
=
new
ArrayList
<
TMLCPJunction
>();
ArrayList
<
TMLCPRefAD
>
refsAD
=
new
ArrayList
<
TMLCPRefAD
>();
ArrayList
<
TMLCPRefAD
>
refsAD
=
new
ArrayList
<
TMLCPRefAD
>();
...
@@ -320,6 +326,7 @@ public class TMLCPActivityDiagram extends TMLElement {
...
@@ -320,6 +326,7 @@ public class TMLCPActivityDiagram extends TMLElement {
diag
.
setStartElement
(
start
);
diag
.
setStartElement
(
start
);
diag
.
addTMLCPElement
(
start
);
diag
.
addTMLCPElement
(
start
);
refs
.
put
((
TMLCPJunction
)
elt
,
diag
);
refs
.
put
((
TMLCPJunction
)
elt
,
diag
);
TraceManager
.
addDev
(
"Adding a new diag named: "
+
diag
.
getName
());
}
}
}
}
...
@@ -345,7 +352,7 @@ public class TMLCPActivityDiagram extends TMLElement {
...
@@ -345,7 +352,7 @@ public class TMLCPActivityDiagram extends TMLElement {
// To be modified-> add elements from RefADs
// To be modified-> add elements from RefADs
// Also, avoid to add already met elements
// Also, avoid to add already met elements
addElementsFromJunction
(
refAD
,
start
,
diag
,
refs
,
toBeRemoved
);
addElementsFromJunction
(
junction
,
diag
.
getStartElement
()
,
diag
,
refs
,
toBeRemoved
);
}
}
// Removing elements from main diagram
// Removing elements from main diagram
...
@@ -368,14 +375,15 @@ public class TMLCPActivityDiagram extends TMLElement {
...
@@ -368,14 +375,15 @@ public class TMLCPActivityDiagram extends TMLElement {
}
}
for
(
TMLCPElement
elt:
originInOld
.
getNextElements
())
{
for
(
TMLCPElement
elt:
originInOld
.
getNextElements
())
{
if
(
elt
instanceof
TMLCPRefAD
)
{
TraceManager
.
addDev
(
"Exploring elt (0):"
+
elt
.
getName
());
if
(
elt
instanceof
TMLCPJunction
)
{
// Must replace the junction by a ref to an AD
// Must replace the junction by a ref to an AD
//
TMLCPActivityDiagram toAD = refs.get((TMLCPJunction)elt);
TMLCPActivityDiagram
toAD
=
refs
.
get
((
TMLCPJunction
)
elt
);
//
TMLCPRefAD ref = new TMLCPRefAD(toAD, toAD.getName(), elt.getReferenceObject());
TMLCPRefAD
ref
=
new
TMLCPRefAD
(
toAD
,
toAD
.
getName
(),
elt
.
getReferenceObject
());
newDiag
.
addTMLCPElement
(
elt
);
newDiag
.
addTMLCPElement
(
ref
);
originInNew
.
setNextElement
(
elt
);
originInNew
.
setNextElement
(
ref
);
}
else
{
}
else
{
TraceManager
.
addDev
(
"Exploring elt (1):"
+
elt
.
getName
());
if
(
originInOld
!=
originInNew
)
{
if
(
originInOld
!=
originInNew
)
{
originInNew
.
addNextElement
(
elt
);
originInNew
.
addNextElement
(
elt
);
}
}
...
...
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