Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2018-02-16 14:38:38 +0000
committerHenrik Rentz-Reichert2018-02-16 15:35:57 +0000
commit2e3a3cc96a07e27faa05b6a7224b1b10bc6ec86b (patch)
tree5b8655cf0040b1a2d687c162c52f124c6e8be466 /plugins/org.eclipse.etrice.core.fsm
parent6ad339c4c13a2b032235ad9a1c4341ea33394013 (diff)
downloadorg.eclipse.etrice-2e3a3cc96a07e27faa05b6a7224b1b10bc6ec86b.tar.gz
org.eclipse.etrice-2e3a3cc96a07e27faa05b6a7224b1b10bc6ec86b.tar.xz
org.eclipse.etrice-2e3a3cc96a07e27faa05b6a7224b1b10bc6ec86b.zip
optimized length of history array for C generation
Also reduced the number of warnings. Change-Id: I2316274b4d7ebed7dc38549aa03e7245a84920a4
Diffstat (limited to 'plugins/org.eclipse.etrice.core.fsm')
-rw-r--r--plugins/org.eclipse.etrice.core.fsm/src/org/eclipse/etrice/core/fsm/scoping/FSMScopeProvider.xtend20
-rw-r--r--plugins/org.eclipse.etrice.core.fsm/src/org/eclipse/etrice/core/fsm/validation/FSMValidationUtilXtend.xtend4
2 files changed, 12 insertions, 12 deletions
diff --git a/plugins/org.eclipse.etrice.core.fsm/src/org/eclipse/etrice/core/fsm/scoping/FSMScopeProvider.xtend b/plugins/org.eclipse.etrice.core.fsm/src/org/eclipse/etrice/core/fsm/scoping/FSMScopeProvider.xtend
index 3db3dd11b..ae5fce6a9 100644
--- a/plugins/org.eclipse.etrice.core.fsm/src/org/eclipse/etrice/core/fsm/scoping/FSMScopeProvider.xtend
+++ b/plugins/org.eclipse.etrice.core.fsm/src/org/eclipse/etrice/core/fsm/scoping/FSMScopeProvider.xtend
@@ -87,13 +87,13 @@ class FSMScopeProvider extends AbstractDeclarativeScopeProvider {
val List<IEObjectDescription> scopes = newArrayList
val parent = getStateGraph(ep)
- if (ep.state!=null) {
+ if (ep.state!==null) {
var epState = ep.state
// check if there is a refined state for this state
epState = parent.getRefinedStateFor(epState)
- if (epState.getSubgraph()!=null) {
+ if (epState.getSubgraph()!==null) {
val tps = epState.subgraph.getAllTrPoints
for (tp : tps) {
scopes.add(EObjectDescription.create(tp.name, tp))
@@ -149,11 +149,11 @@ class FSMScopeProvider extends AbstractDeclarativeScopeProvider {
var sg = getStateGraph(rs)
if (sg.eContainer instanceof ModelComponent) {
var comp = sg.eContainer as ModelComponent
- if (comp.base != null && !comp.isCircularClassHierarchy) {
+ if (comp.base !== null && !comp.isCircularClassHierarchy) {
comp = comp.base
val HashSet<State> covered = newHashSet
val ArrayList<State> states = newArrayList
- while (comp!=null) {
+ while (comp!==null) {
recursivelyAddStates(comp.stateMachine, covered, states)
comp = comp.base
}
@@ -164,7 +164,7 @@ class FSMScopeProvider extends AbstractDeclarativeScopeProvider {
}
else if (sg.eContainer instanceof RefinedState) {
sg = (sg.eContainer as RefinedState).target.subgraph
- if (sg!=null)
+ if (sg!==null)
for (s : sg.states) {
scopes.add(EObjectDescription.create(s.name, s))
}
@@ -185,8 +185,8 @@ class FSMScopeProvider extends AbstractDeclarativeScopeProvider {
var comp = trans.eContainer.eContainer as ModelComponent
if(!comp.isCircularClassHierarchy){
comp = comp.base
- while (comp!=null) {
- if (comp.stateMachine!=null) {
+ while (comp!==null) {
+ if (comp.stateMachine!==null) {
val acNameSegments = comp.fullyQualifiedName.segmentCount
val iter = comp.stateMachine.eAllContents
while (iter.hasNext) {
@@ -221,7 +221,7 @@ class FSMScopeProvider extends AbstractDeclarativeScopeProvider {
// recursion
for (s : sg.states) {
- if (s.getSubgraph()!=null)
+ if (s.getSubgraph()!==null)
recursivelyAddStates(s.getSubgraph(), covered, states)
}
}
@@ -233,7 +233,7 @@ class FSMScopeProvider extends AbstractDeclarativeScopeProvider {
*/
def private StateGraph getStateGraph(EObject obj) {
var EObject ctx = obj.eContainer
- while (!(ctx instanceof StateGraph) && ctx.eContainer!=null) {
+ while (!(ctx instanceof StateGraph) && ctx.eContainer!==null) {
ctx = ctx.eContainer
}
if (ctx instanceof StateGraph)
@@ -253,7 +253,7 @@ class FSMScopeProvider extends AbstractDeclarativeScopeProvider {
return getStatePath(parent as SimpleState).append(bs.name)
else if (parent instanceof RefinedState) {
val State target = (parent as RefinedState).target
- if (target!=null)
+ if (target!==null)
return getStatePath(target).append(bs.name)
}
return QualifiedName.create(bs.name)
diff --git a/plugins/org.eclipse.etrice.core.fsm/src/org/eclipse/etrice/core/fsm/validation/FSMValidationUtilXtend.xtend b/plugins/org.eclipse.etrice.core.fsm/src/org/eclipse/etrice/core/fsm/validation/FSMValidationUtilXtend.xtend
index 11016c077..d9743d7e2 100644
--- a/plugins/org.eclipse.etrice.core.fsm/src/org/eclipse/etrice/core/fsm/validation/FSMValidationUtilXtend.xtend
+++ b/plugins/org.eclipse.etrice.core.fsm/src/org/eclipse/etrice/core/fsm/validation/FSMValidationUtilXtend.xtend
@@ -84,7 +84,7 @@ class FSMValidationUtilXtend {
val ArrayList<FSMValidationUtilXtend.Result> result = newArrayList
for (Transition t:parent.transitions.filter(t|t instanceof TriggeredTransition && ((t as TriggeredTransition).from instanceof StateTerminal) && myState==((t as TriggeredTransition).from as StateTerminal).state)) {
- for (Trigger k:(t as TriggeredTransition).triggers.filter(k|k.guard==null)) {
+ for (Trigger k:(t as TriggeredTransition).triggers.filter(k|k.guard===null)) {
for (specMethod:k.getMsgFromIfPairs) {
val triggerName = specMethod.triggerName
if (trig2trans.containsKey(triggerName)) {
@@ -105,7 +105,7 @@ class FSMValidationUtilXtend {
def getStateGraph(EObject obj) {
var parent = obj.eContainer
- while (parent!=null) {
+ while (parent!==null) {
if (parent instanceof StateGraph) {
return parent as StateGraph
}

Back to the top