Search in sources :

Example 6 with NamedBridgeScope

use of org.eclipse.titan.designer.AST.NamedBridgeScope in project titan.EclipsePlug-ins by eclipse.

the class Def_Type method setMyScope.

@Override
public /**
 * {@inheritDoc}
 */
void setMyScope(final Scope scope) {
    if (bridgeScope != null && bridgeScope.getParentScope() == scope) {
        return;
    }
    bridgeScope = new NamedBridgeScope();
    bridgeScope.setParentScope(scope);
    scope.addSubScope(getLocation(), bridgeScope);
    bridgeScope.setScopeMacroName(identifier.getDisplayName());
    super.setMyScope(bridgeScope);
    if (type != null) {
        type.setMyScope(bridgeScope);
    }
}
Also used : NamedBridgeScope(org.eclipse.titan.designer.AST.NamedBridgeScope)

Example 7 with NamedBridgeScope

use of org.eclipse.titan.designer.AST.NamedBridgeScope in project titan.EclipsePlug-ins by eclipse.

the class Def_Altstep method setMyScope.

@Override
public /**
 * {@inheritDoc}
 */
void setMyScope(final Scope scope) {
    if (bridgeScope != null && bridgeScope.getParentScope() == scope) {
        return;
    }
    bridgeScope = new NamedBridgeScope();
    bridgeScope.setParentScope(scope);
    scope.addSubScope(getLocation(), bridgeScope);
    bridgeScope.setScopeMacroName(identifier.getDisplayName());
    super.setMyScope(bridgeScope);
    if (runsOnRef != null) {
        runsOnRef.setMyScope(bridgeScope);
    }
    formalParList.setMyScope(bridgeScope);
    if (block != null) {
        block.setMyScope(formalParList);
        altGuards.setMyScope(block);
        bridgeScope.addSubScope(block.getLocation(), block);
    }
    bridgeScope.addSubScope(formalParList.getLocation(), formalParList);
    if (altGuards != null) {
        for (int i = 0; i < altGuards.getNofAltguards(); i++) {
            final AltGuard ag = altGuards.getAltguardByIndex(i);
            final StatementBlock sb = ag.getStatementBlock();
            if (sb != null) {
                bridgeScope.addSubScope(sb.getLocation(), sb);
            }
        }
    }
}
Also used : AltGuard(org.eclipse.titan.designer.AST.TTCN3.statements.AltGuard) NamedBridgeScope(org.eclipse.titan.designer.AST.NamedBridgeScope) StatementBlock(org.eclipse.titan.designer.AST.TTCN3.statements.StatementBlock)

Aggregations

NamedBridgeScope (org.eclipse.titan.designer.AST.NamedBridgeScope)7 Assignment (org.eclipse.titan.designer.AST.Assignment)2 Module (org.eclipse.titan.designer.AST.Module)2 Reference (org.eclipse.titan.designer.AST.Reference)2 ArrayList (java.util.ArrayList)1 IFile (org.eclipse.core.resources.IFile)1 RefactoringStatus (org.eclipse.ltk.core.refactoring.RefactoringStatus)1 ASN1Module (org.eclipse.titan.designer.AST.ASN1.definitions.ASN1Module)1 ASN1_Choice_Type (org.eclipse.titan.designer.AST.ASN1.types.ASN1_Choice_Type)1 ASN1_Enumerated_Type (org.eclipse.titan.designer.AST.ASN1.types.ASN1_Enumerated_Type)1 ASN1_Sequence_Type (org.eclipse.titan.designer.AST.ASN1.types.ASN1_Sequence_Type)1 ASN1_Set_Type (org.eclipse.titan.designer.AST.ASN1.types.ASN1_Set_Type)1 FieldSubReference (org.eclipse.titan.designer.AST.FieldSubReference)1 ISubReference (org.eclipse.titan.designer.AST.ISubReference)1 Identifier (org.eclipse.titan.designer.AST.Identifier)1 Identifier_type (org.eclipse.titan.designer.AST.Identifier.Identifier_type)1 Hit (org.eclipse.titan.designer.AST.ReferenceFinder.Hit)1 Scope (org.eclipse.titan.designer.AST.Scope)1 SubScopeVisitor (org.eclipse.titan.designer.AST.SubScopeVisitor)1 FormalParameter (org.eclipse.titan.designer.AST.TTCN3.definitions.FormalParameter)1