Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mbe-tools
OSATE-DIM
Commits
2c237e54
Commit
2c237e54
authored
May 12, 2022
by
Rakshit Mittal
Browse files
added method to compute extensionIndex from reusedIndex and libraryIndex
parent
5f154b6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
fr.mem4csd.osatedim.viatra/src/fr/mem4csd/osatedim/viatra/utils/LibraryUtils.java
View file @
2c237e54
...
...
@@ -35,6 +35,20 @@ public class LibraryUtils {
return
returnList
;
}
public
static
Integer
getExtensionIndex
(
Integer
libraryIndex
,
Integer
reusedIndex
,
Boolean
modifyReused
)
{
if
(
modifyReused
)
{
return
libraryIndex
;
}
else
{
if
(
libraryIndex
==
-
1
)
{
return
reusedIndex
;
}
else
if
(
reusedIndex
==
-
1
)
{
return
libraryIndex
;
}
else
{
return
Math
.
min
(
reusedIndex
,
libraryIndex
);
}
}
}
public
static
EList
<
ComponentType
>
getAllInheritingParentTypes
(
Feature
feat
,
ComponentInstance
compinst
)
{
final
EList
<
ComponentType
>
returnList
=
new
BasicEList
<
ComponentType
>();
ComponentType
comptype
;
...
...
@@ -189,7 +203,7 @@ public class LibraryUtils {
if
(
extensionType
==
sourceType
)
{
return
true
;
}
while
(
extensionType
.
getExtended
()
!=
null
)
{
while
(
extensionType
!=
null
)
{
if
(
extensionType
==
sourceType
)
{
return
true
;
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment