Examples of IClasspathAttribute


Examples of org.aspectj.org.eclipse.jdt.core.IClasspathAttribute

  }

  void encodeExtraAttributes(XMLWriter writer, boolean indent, boolean newLine) {
    writer.startTag(TAG_ATTRIBUTES, indent);
    for (int i = 0; i < this.extraAttributes.length; i++) {
      IClasspathAttribute attribute = this.extraAttributes[i];
      HashMap parameters = new HashMap();
        parameters.put(TAG_ATTRIBUTE_NAME, attribute.getName());
      parameters.put(TAG_ATTRIBUTE_VALUE, attribute.getValue());
      writer.printTag(TAG_ATTRIBUTE, parameters, indent, newLine, true);
    }
    writer.endTag(TAG_ATTRIBUTES, indent, true/*insert new line*/);
  }
 
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.core.IClasspathAttribute

    return this.isExported;
  }

  public boolean isOptional() {
    for (int i = 0, length = this.extraAttributes.length; i < length; i++) {
      IClasspathAttribute attribute = this.extraAttributes[i];
      if (IClasspathAttribute.OPTIONAL.equals(attribute.getName()) && "true".equals(attribute.getValue())) //$NON-NLS-1$
        return true;
    }
    return false;
  }
View Full Code Here

Examples of org.eclipse.jdt.core.IClasspathAttribute

        List/* <IClasspathAttribute> */attrs = new ArrayList();
        NodeList children = cpAttrsNode.getChildNodes();
        for (int i = 0; i < children.getLength(); i++) {
            Node item = children.item(i);
            if (item.getNodeName().equals(ATTR)) {
                IClasspathAttribute attr = readAttr(item);
                if (attr != null) {
                    attrs.add(attr);
                }
            }
        }
View Full Code Here

Examples of org.eclipse.jdt.core.IClasspathAttribute

    }

    public String getJavadocLocation(IClasspathEntry entry) {
        IClasspathAttribute[] attributes = entry.getExtraAttributes();
        for (int j = 0; j < attributes.length; j++) {
            IClasspathAttribute attribute = attributes[j];
            if (IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME.equals(attribute.getName())) {
                return attribute.getValue();
            }
        }
        return null;
    }
View Full Code Here

Examples of org.eclipse.jdt.core.IClasspathAttribute

                    "Entry must be of kind CPE_LIBRARY or " + "CPE_VARIABLE"); //$NON-NLS-1$
        }

        IClasspathAttribute[] extraAttributes = entry.getExtraAttributes();
        for (int i = 0; i < extraAttributes.length; i++) {
            IClasspathAttribute attrib = extraAttributes[i];
            if (IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME.equals(attrib.getName())) {
                try {
                    return new URL(attrib.getValue());
                } catch (MalformedURLException e) {
                    return null;
                }
            }
        }
View Full Code Here

Examples of org.eclipse.jdt.core.IClasspathAttribute

            throw new IllegalArgumentException("Entry must be of kind CPE_LIBRARY or CPE_VARIABLE"); //$NON-NLS-1$
        }

        IClasspathAttribute[] extraAttributes = entry.getExtraAttributes();
        for (int i = 0; i < extraAttributes.length; i++) {
            IClasspathAttribute attrib = extraAttributes[i];
            if (IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME.equals(attrib.getName())) {
                try {
                    return new URL(attrib.getValue());
                } catch (MalformedURLException e) {
                    return null;
                }
            }
        }
View Full Code Here

Examples of org.eclipse.jdt.core.IClasspathAttribute

  }

  void encodeExtraAttributes(XMLWriter writer, boolean indent, boolean newLine) {
    writer.startTag(TAG_ATTRIBUTES, indent);
    for (int i = 0; i < this.extraAttributes.length; i++) {
      IClasspathAttribute attribute = this.extraAttributes[i];
      HashMap parameters = new HashMap();
        parameters.put(TAG_ATTRIBUTE_NAME, attribute.getName());
      parameters.put(TAG_ATTRIBUTE_VALUE, attribute.getValue());
      writer.printTag(TAG_ATTRIBUTE, parameters, indent, newLine, true);
    }
    writer.endTag(TAG_ATTRIBUTES, indent, true/*insert new line*/);
  }
 
View Full Code Here

Examples of org.eclipse.jdt.core.IClasspathAttribute

    return this.isExported;
  }

  public boolean isOptional() {
    for (int i = 0, length = this.extraAttributes.length; i < length; i++) {
      IClasspathAttribute attribute = this.extraAttributes[i];
      if (IClasspathAttribute.OPTIONAL.equals(attribute.getName()) && "true".equals(attribute.getValue())) //$NON-NLS-1$
        return true;
    }
    return false;
  }
View Full Code Here

Examples of org.eclipse.jdt.core.IClasspathAttribute

                    "Entry must be of kind CPE_LIBRARY or " + "CPE_VARIABLE"); //$NON-NLS-1$
        }

        IClasspathAttribute[] extraAttributes = entry.getExtraAttributes();
        for (int i = 0; i < extraAttributes.length; i++) {
            IClasspathAttribute attrib = extraAttributes[i];
            if (IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME.equals(attrib.getName())) {
                try {
                    return new URL(attrib.getValue());
                } catch (MalformedURLException e) {
                    return null;
                }
            }
        }
View Full Code Here

Examples of org.eclipse.jdt.core.IClasspathAttribute

      IJavaProject javaProject = JavaCore.create(project);
      IClasspathEntry[] oldClasspath = javaProject.getRawClasspath();
      IClasspathEntry[] newClasspath = new IClasspathEntry[oldClasspath.length+1];
      System.arraycopy(oldClasspath, 0, newClasspath, 0, oldClasspath.length);
      IClasspathEntry gwtUserJarEntry = JavaCore.newVariableEntry(Util.getGwtUserLibPath(), null, null);
      IClasspathAttribute attr = JavaCore.newClasspathAttribute("org.eclipse.jst.component.dependency", "/WEB-INF/lib");
      gwtUserJarEntry = JavaCore.newVariableEntry(gwtUserJarEntry.getPath(), null, null, new IAccessRule[0], new IClasspathAttribute[] {attr}, false);
      newClasspath[oldClasspath.length] = gwtUserJarEntry;
      javaProject.setRawClasspath(newClasspath, monitor);

    } catch (JavaModelException e) {
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.