use of org.yakindu.sct.model.stext.stext.StateSpecification in project statecharts by Yakindu.
the class StextImportAwareScopeProvider method internalGetImportedNamespaceResolvers.
@Override
protected List<ImportNormalizer> internalGetImportedNamespaceResolvers(final EObject context, boolean ignoreCase) {
List<ImportNormalizer> importedNamespaceResolvers = Lists.newArrayList();
List<ImportScope> importScopes = null;
if (context instanceof StateSpecification || context instanceof TransitionSpecification) {
importScopes = EcoreUtil2.getAllContentsOfType(getStatechart(context), ImportScope.class);
} else {
importScopes = EcoreUtil2.getAllContentsOfType(context, ImportScope.class);
}
for (ImportScope scope : importScopes) {
importedNamespaceResolvers.addAll(createNamespaceResolver(scope, ignoreCase));
}
return importedNamespaceResolvers;
}
use of org.yakindu.sct.model.stext.stext.StateSpecification in project statecharts by Yakindu.
the class StateRootImpl method basicSetDef.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetDef(StateSpecification newDef, NotificationChain msgs) {
StateSpecification oldDef = def;
def = newDef;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, StextPackage.STATE_ROOT__DEF, oldDef, newDef);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
use of org.yakindu.sct.model.stext.stext.StateSpecification in project statecharts by Yakindu.
the class StextResource method parseState.
protected void parseState(State state) {
IParseResult parseResult = parse(state, StateSpecification.class.getSimpleName());
StateSpecification rootASTElement = (StateSpecification) parseResult.getRootASTElement();
state.getScopes().clear();
if (rootASTElement.getScope() != null) {
state.getScopes().add(rootASTElement.getScope());
}
}
Aggregations