Package org.eclipse.jdt.core

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


    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

    return false;
  }

  public String getSourceAttachmentEncoding() {
    for (int i = 0, length = this.extraAttributes.length; i < length; i++) {
      IClasspathAttribute attribute = this.extraAttributes[i];
      if (IClasspathAttribute.SOURCE_ATTACHMENT_ENCODING.equals(attribute.getName()))
        return attribute.getValue();
    }
    return null;
  }
View Full Code Here

      default :
        return null;
    }
    if (this.extraAttributes == null) return null;
    for (int i= 0; i < this.extraAttributes.length; i++) {
      IClasspathAttribute attrib= this.extraAttributes[i];
      if (IClasspathAttribute.INDEX_LOCATION_ATTRIBUTE_NAME.equals(attrib.getName())) {
        String value = attrib.getValue();
        try {
          return new URL(value);
        } catch (MalformedURLException e) {
          return null;
        }
View Full Code Here

  }

  public boolean ignoreOptionalProblems() {
    if (this.entryKind == IClasspathEntry.CPE_SOURCE) {
      for (int i = 0; i < this.extraAttributes.length; i++) {
        IClasspathAttribute attrib = this.extraAttributes[i];
        if (IClasspathAttribute.IGNORE_OPTIONAL_PROBLEMS.equals(attrib.getName())) {
          return "true".equals(attrib.getValue()); //$NON-NLS-1$
        }
      }
    }
    return false;
  }
View Full Code Here

                    "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

TOP

Related Classes of org.eclipse.jdt.core.IClasspathAttribute

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.