diff options
author | 2019-08-01 14:49:53 +0200 | |
---|---|---|
committer | 2019-08-01 14:49:53 +0200 | |
commit | 972baab642bd889d2c3476c0c9e17a6929e0c318 (patch) | |
tree | 8f724cb348c60e4fc45d446d8532988ed8e40748 /Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/ComponentNameGenerator.java | |
parent | Counting scope propagator (simpler than BasicTypeHierarchy) (diff) | |
download | VIATRA-Generator-972baab642bd889d2c3476c0c9e17a6929e0c318.tar.gz VIATRA-Generator-972baab642bd889d2c3476c0c9e17a6929e0c318.tar.zst VIATRA-Generator-972baab642bd889d2c3476c0c9e17a6929e0c318.zip |
[Stochastic] Remove fault tree support for now
Diffstat (limited to 'Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/ComponentNameGenerator.java')
-rw-r--r-- | Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/ComponentNameGenerator.java | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/ComponentNameGenerator.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/ComponentNameGenerator.java deleted file mode 100644 index e7dca003..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/ComponentNameGenerator.java +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft; | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentDefinition; | ||
4 | import java.util.Map; | ||
5 | import org.eclipse.xtext.xbase.lib.CollectionLiterals; | ||
6 | |||
7 | @SuppressWarnings("all") | ||
8 | public class ComponentNameGenerator { | ||
9 | private static final String DEFAULT_NAME = "__unnamed"; | ||
10 | |||
11 | private final Map<ComponentDefinition, Integer> instanceCounts = CollectionLiterals.<ComponentDefinition, Integer>newHashMap(); | ||
12 | |||
13 | public String nextName(final ComponentDefinition componentDefinition) { | ||
14 | String _xblockexpression = null; | ||
15 | { | ||
16 | final Integer instanceCount = this.instanceCounts.getOrDefault(componentDefinition, Integer.valueOf(0)); | ||
17 | this.instanceCounts.put(componentDefinition, Integer.valueOf(((instanceCount).intValue() + 1))); | ||
18 | String _elvis = null; | ||
19 | String _name = componentDefinition.getName(); | ||
20 | if (_name != null) { | ||
21 | _elvis = _name; | ||
22 | } else { | ||
23 | _elvis = ComponentNameGenerator.DEFAULT_NAME; | ||
24 | } | ||
25 | _xblockexpression = (_elvis + instanceCount); | ||
26 | } | ||
27 | return _xblockexpression; | ||
28 | } | ||
29 | } | ||