Examples of IVariableDefinition


Examples of org.apache.flex.compiler.definitions.IVariableDefinition

        {
            int percentIndex = s.indexOf('%');
            if (percentIndex == -1)
                return null;

            IVariableDefinition percentProxyDefinition =
                    propertyNode instanceof IMXMLPropertySpecifierNode ?
                            ((IMXMLPropertySpecifierNode)propertyNode).getPercentProxyDefinition(project) :
                            null;

            if (percentProxyDefinition != null)
View Full Code Here

Examples of org.apache.flex.compiler.definitions.IVariableDefinition

            throw new CodegenInterruptedException(e);
        }

        // the parent of an embed node is always a variable
        final VariableNode variableNode = (VariableNode)iNode.getParent();
        final IVariableDefinition variableDef = (IVariableDefinition)variableNode.getDefinition();
        final ITypeDefinition variableType = variableDef.resolveType(currentScope.getProject());
        final String typeName = variableType.getQualifiedName();
       
        InstructionList result;
        if ("Class".equals(typeName))
        {
View Full Code Here

Examples of org.apache.flex.compiler.definitions.IVariableDefinition

        while (p != null && c == null)
        {
            if (p instanceof VariableNode)
            {
                VariableNode vn = (VariableNode)p;
                IVariableDefinition varDef = (IVariableDefinition)vn.getDefinition();
                switch (varDef.getVariableClassification())
                {
                    case CLASS_MEMBER:
                    {
                        if (varDef.hasModifier(ASModifier.STATIC))
                            c = Context.STATIC_CONTEXT;
                        else
                            c = Context.INSTANCE_CONTEXT;
                        break;
                    }
View Full Code Here

Examples of org.apache.flex.compiler.definitions.IVariableDefinition

    {
        IMetaTag[] skinParts = hostComponentDef.findSkinParts(project, problems);

        for (IMetaTag skinPart : skinParts)
        {
            IVariableDefinition hostSkinPartDef = (IVariableDefinition)skinPart.getDecoratedDefinition();

            String hostStringPartName = hostSkinPartDef.getBaseName();
            IDefinition skinPartDef = getContainedScope().getPropertyFromDef(project, this, hostStringPartName, false);
            if (skinPartDef instanceof ISetterDefinition)
                skinPartDef = ((ISetterDefinition)skinPartDef).resolveGetter(project);

            // the skinPart definition needs to be either a variable or getter
            if (!((skinPartDef instanceof IVariableDefinition) || (skinPartDef instanceof IGetterDefinition)))
                skinPartDef = null;

            ITypeDefinition skinPartTypeDef = null;
            if (skinPartDef != null)
                skinPartTypeDef = skinPartDef.resolveType(project);

            if (skinPartTypeDef == null && hostSkinPartDef.isRequiredSkinPart())
            {
                ICompilerProblem problem = new MissingSkinPartProblem(skinPart, hostComponentDef.getBaseName());
                problems.add(problem);
            }
            else if (skinPartTypeDef != null && !skinPartTypeDef.isInstanceOf(hostSkinPartDef.resolveType(project), project))
            {
                ICompilerProblem problem = new WrongSkinPartProblem(skinPart, skinPartTypeDef, hostSkinPartDef.resolveType(project));
                problems.add(problem);

            }
        }
    }
View Full Code Here

Examples of org.apache.flex.compiler.definitions.IVariableDefinition

            IDefinition definition = builder.getFileScope().resolveTagToDefinition(childTag);
            if (definition instanceof ClassDefinition)
            {
                // Handle child tags that are instance tags.

                IVariableDefinition defaultPropertyDefinition = getDefaultPropertyDefinition(builder);
                if (defaultPropertyDefinition != null && !processedDefaultProperty)
                {
                    // Since there is a default property and we haven't already processed it,
                    // assume this child instance tag is part of its value.
                    processDefaultPropertyContentUnit(builder, childTag, info);
View Full Code Here

Examples of org.apache.flex.compiler.definitions.IVariableDefinition

            List<IMXMLUnitData> defaultPropertyContentUnitsWithoutTrailingScriptTags =
                    defaultPropertyContentUnits.subList(0, lastNonScriptTagIndex + 1);

            // process the default property content units with the trailing
            // script tags removed.
            IVariableDefinition defaultPropertyDefinition =
                    getDefaultPropertyDefinition(builder);
            defaultPropertyNode.initializeDefaultProperty(
                    builder, defaultPropertyDefinition, defaultPropertyContentUnitsWithoutTrailingScriptTags);

            // Now create MXMLScriptNode's for all the trailing script tags.
View Full Code Here

Examples of org.apache.flex.compiler.definitions.IVariableDefinition

    protected void processChildNonWhitespaceUnit(MXMLTreeBuilder builder, IMXMLTagData tag,
                                                 IMXMLTextData text,
                                                 MXMLNodeInfo info)
    {
        // Non-whitespace may be the value of a default property.
        IVariableDefinition defaultPropertyDefinition = getDefaultPropertyDefinition(builder);
        if (defaultPropertyDefinition != null)
        {
            MXMLSpecifierNodeBase childNode =
                    createSpecifierNode(builder, defaultPropertyDefinition.getBaseName());
            if (childNode != null)
            {
                childNode.initializeFromText(builder, text, info);
                info.addChildNode(childNode);
            }
View Full Code Here

Examples of org.apache.flex.compiler.definitions.IVariableDefinition

    @Override
    public IVariableDefinition getPercentProxyDefinition(FlexProject project)
    {
        // Get the name of the proxy property
        // from the [PercentProxy(...)] metadata.
        IVariableDefinition propertyDefinition = (IVariableDefinition)getDefinition();
        String percentProxy = propertyDefinition.getPercentProxy(project);
        if (percentProxy == null)
            return null;

        // Find the definition for the proxy property.
        ASScope classScope = (ASScope)propertyDefinition.getContainingScope();
        IClassDefinition classDefinition = (IClassDefinition)classScope.getDefinition();
        IDefinition proxyDefinition = classScope.getPropertyFromDef(
                project, classDefinition, percentProxy, false);
        if (!(proxyDefinition instanceof IVariableDefinition))
            return null;
View Full Code Here

Examples of org.apache.flex.compiler.definitions.IVariableDefinition

        // with incompatible elements.
        IMXMLNode parent = (IMXMLNode)getParent();
        if (parent instanceof IMXMLPropertySpecifierNode)
        {
            propertyName = ((IMXMLPropertySpecifierNode)parent).getName();
            IVariableDefinition propertyDefinition =
                    (IVariableDefinition)((IMXMLPropertySpecifierNode)parent).getDefinition();
            // propertyDefinition will be null in the case of a property of an <Object> tag
            FlexProject project = builder.getProject();
            arrayElementType = propertyDefinition != null ?
                           propertyDefinition.getArrayElementType(project) :
                           IASLanguageConstants.Object;
        }

        super.initializeFromTag(builder, tag);
    }
View Full Code Here

Examples of org.apache.flex.compiler.definitions.IVariableDefinition

            IReference ref = ReferenceFactory.lexicalReference(project.getWorkspace(), name);
            IDefinition def = ref.resolve(project, scope, DependencyType.EXPRESSION, false);
            if (def instanceof IVariableDefinition)
            {
                // here we have decided that the binding expression is a variable
                IVariableDefinition var = (IVariableDefinition)def;
                if (!var.isStatic())
                {
                    INamespaceReference ns = var.getNamespaceReference();
                    if (ns == NamespaceDefinition.getPublicNamespaceDefinition())
                    {
                        // ok, our variable is public and non-static - let's take it
                        sourceString = def.getBaseName();
                        isSimplePublicProperty = true;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.