|
@@ -64,10 +64,14 @@ public class STextGlobalScopeProvider extends DefaultGlobalScopeProvider {
|
|
|
ContextElementAdapter.class);
|
|
|
if (provider != null) {
|
|
|
parentScope = new FilteringScope(parentScope, new Predicate<IEObjectDescription>() {
|
|
|
+
|
|
|
public boolean apply(IEObjectDescription input) {
|
|
|
+ // only accept events, regular states and variables from own statechart
|
|
|
if (input.getEClass() == StextPackage.Literals.EVENT_DEFINITION
|
|
|
|| SGraphPackage.Literals.REGULAR_STATE.isSuperTypeOf(input.getEClass())
|
|
|
- || input.getEClass() == StextPackage.Literals.VARIABLE_DEFINITION) {
|
|
|
+ || (input.getEClass() == StextPackage.Literals.VARIABLE_DEFINITION &&
|
|
|
+ input.getEObjectURI().fileExtension().equals("sct"))) {
|
|
|
+
|
|
|
URI sourceURI = input.getEObjectURI().trimFragment();
|
|
|
return sourceURI.equals(provider.getElement().eResource().getURI());
|
|
|
}
|