Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kernel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
af3
kernel
Commits
6cc12200
Commit
6cc12200
authored
13 years ago
by
Klaus Becker
Browse files
Options
Downloads
Patches
Plain Diff
refs 216
parent
eee31af8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/UniqueIDUtils.java
+18
-1
18 additions, 1 deletion
...k/src/org/fortiss/tooling/kernel/utils/UniqueIDUtils.java
with
18 additions
and
1 deletion
org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/UniqueIDUtils.java
+
18
−
1
View file @
6cc12200
...
...
@@ -33,7 +33,7 @@ import org.fortiss.tooling.kernel.model.IIdLabeled;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash:
8A4299022B07F32CEED5A061DC03FBD2
* @ConQAT.Rating YELLOW Hash:
20798F4B379821E393B1CC36691662EA
*/
public
class
UniqueIDUtils
{
...
...
@@ -58,6 +58,23 @@ public class UniqueIDUtils {
return
currentMaxId
;
}
/**
* Generates all IDs of the given model. Already existing IDs are
* overwritten.
*
* @param existingModel
* the model to be updated
*/
public
static
void
generateAllIDs
(
EObject
existingModel
)
{
int
currentId
=
0
;
for
(
Iterator
<
EObject
>
i
=
existingModel
.
eAllContents
();
i
.
hasNext
();)
{
EObject
eo
=
i
.
next
();
if
(
eo
instanceof
IIdLabeled
)
{
((
IIdLabeled
)
eo
).
setId
((++
currentId
));
}
}
}
/**
* Assigns unique IDs to the given object and its content.
*
...
...
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