Package flex2.compiler.mxml.rep.init

Examples of flex2.compiler.mxml.rep.init.ValueInitializer$DeclaredAndProceduralWithinRepeater


    for (int i = 0, size = directories == null ? 0 : directories.size(); i < size; i++)
    {
      String dir = directories.get(i).getAbsolutePath();
      if (name.startsWith(dir))
      {
        return new LocalFile(FileUtil.openFile(dir));
      }
    }
    // return new LocalFile(FileUtil.openFile(f.getParent()));
    return null;
  }
View Full Code Here


            {
                File file = FileUtil.openFile(directory, relativePath);

                if ((file != null) && file.exists())
                {
                    return new LocalFile(file);
                }
            }
        }

        return null;
View Full Code Here

      {
        Class retType = info.getGetterMethod().getReturnType();

        if (VirtualFile.class.isAssignableFrom(retType))
        {
          VirtualFile file = (VirtualFile) info.getGetterMethod().invoke(targetConfig, (Object[])null);
          if (file != null)
          {
            if (info.doChecksum())
              compile_checksum.append(file.getName());
            link_checksum.append(file.getName());
          }
          continue;
        }
        else if (retType.isArray() && VirtualFile.class.isAssignableFrom(retType.getComponentType()))
        {
          VirtualFile[] files = (VirtualFile[]) info.getGetterMethod().invoke(targetConfig, (Object[])null);
          for (int j = 0; files != null && j < files.length; j++)
          {
            if (files[j] != null)
            {
              if (info.doChecksum())
                compile_checksum.append(files[j].getName());
              link_checksum.append(files[j].getName());
            }
          }
          continue;
        }
      }

      if (args[i] instanceof Object[])
      {
        Object[] a = (Object[]) args[i];
        for (int j = 0; j < a.length; j++)
        {
          if (info.doChecksum())
            compile_checksum.append(a[j]);
          link_checksum.append(a[j]);
        }
      }
      else if (args[i] instanceof List)
      {
        List l = (List) args[i];
        for (int j = 0; j < l.size(); j++)
        {
          if (info.doChecksum())
            compile_checksum.append(l.get(j));
          link_checksum.append(l.get(j));
        }
      }
      else
      {
        if (info.doChecksum())
          compile_checksum.append(args[i]);
        link_checksum.append(args[i]);
      }
    }

    if (info.getGetterMethod() == null)
    {
      // C: need to make sure that all the VirtualFile-based config values should have getters.
      return;
    }

    Class retType = info.getGetterMethod().getReturnType();

    if (VirtualFile.class.isAssignableFrom(retType))
    {
      VirtualFile file = (VirtualFile) info.getGetterMethod().invoke(targetConfig, (Object[])null);
      if (file != null && !file.isDirectory())
      {
        if (info.doChecksum())
          compile_checksum_ts.append(file.getLastModified());
        link_checksum_ts.append(file.getLastModified());
      }
    }
    else if (retType.isArray() && VirtualFile.class.isAssignableFrom(retType.getComponentType()))
    {
      VirtualFile[] files = (VirtualFile[]) info.getGetterMethod().invoke(targetConfig, (Object[])null);
View Full Code Here

    /**
     * Create virtual file for given file and throw configuration exception if not possible
     */
    public static VirtualFile getVirtualFile(String path, boolean reportError) throws ConfigurationException
    {
        VirtualFile result = null;
        File file = new File(path);

        if (file != null && file.exists())
        {
            try
View Full Code Here

    {
            // No need to check to see if the appPath is supported again.
      if ((appPath != null && files[i].getName().equals(appPath.getName())) || isSupported(files[i]))
      {
        String name = files[i].getName();
        VirtualFile pathRoot = calculatePathRoot(files[i]);
        if (pathRoot != null)
        {
                    String relativePath = calculateRelativePath(name);
                    String namespaceURI = relativePath.replace('/', '.');
                    String localPart = calculateLocalPart(name);
View Full Code Here

        standardDefs.set(defs);
    }

    public static StandardDefs getStandardDefs()
    {
        StandardDefs defs = standardDefs.get();
        if (defs == null)
        {
            defs = StandardDefs.getStandardDefs("halo");
            setStandardDefs(defs);
        }
View Full Code Here

                    ReparentInfo node = listIter.next();
                    String target = node.model.getId();
                    PropertyDeclaration decl = document.getDeclaration(target);
                    if (decl != null && decl instanceof ValueInitializer)
                    {
                        ValueInitializer initializedDecl = (ValueInitializer) decl;
                        Model model = (Model) initializedDecl.getValue();
                        if (!processReparentNode(node, model))
                            return false;
                    }
                    else
                    {
View Full Code Here

    private ArrayList<Model> buildRelativeSiblingList(Model model, ArrayList siblings, int startIndex)
    {
        ArrayList<Model> relativeSiblings = new ArrayList<Model>();
        for (int i = startIndex; i > -1; i--)
        {
            ValueInitializer initializer = (ValueInitializer)siblings.get(i);
            Model sibling = (Model)initializer.getValue();
           
            Boolean intersects = false;
            if (sibling.isStateSpecific())
            {
                for (Iterator<String> iter = sibling.getStates().iterator(); iter.hasNext(); )
View Full Code Here

            sourceExpression.setId(-1);
            document.removeBindingExpression(sourceExpression);

            try
            {
                ValueInitializer valueClone = value.clone();
                valueClone.setValue(bindingExpression);
                override.value = valueClone;
            }
            catch ( CloneNotSupportedException e )
            {
                throw new RuntimeException(e); //wont happen
View Full Code Here

                for (Iterator<StatesModel.Override> items = state.overrides.iterator(); items.hasNext(); )
                {
                    StatesModel.Override override = items.next();
                    if (override instanceof SetPropertyOverride)
                    {
                        ValueInitializer initializer = ((SetPropertyOverride)override).value;
                        Object rvalue = initializer.getValue();
                        if (rvalue instanceof Model && !initializedModels.contains(rvalue))
                        {
                            iterList.add(initializer.getDefinitionsIterator());
                            initializedModels.add(rvalue);
                        }
                    }
                }
            }
View Full Code Here

TOP

Related Classes of flex2.compiler.mxml.rep.init.ValueInitializer$DeclaredAndProceduralWithinRepeater

Copyright © 2018 www.massapicom. 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.