Examples of ICatalogEntry


Examples of org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry

    }

    public boolean select(Viewer viewer, Object parent, Object element) {
      boolean result = false;
      if (element instanceof ICatalogEntry) {
        ICatalogEntry catalogEntry = (ICatalogEntry) element;
        for (int i = 0; i < extensions.length; i++) {
          if (catalogEntry.getURI().endsWith(extensions[i])) {
            result = true;
            break;
          }
        }
      }
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry

        for (Iterator i = catalogElements.iterator(); i.hasNext();)
        {
          ICatalogElement catalogElement = (ICatalogElement) i.next();
          if (catalogElement.getType() == ICatalogElement.TYPE_ENTRY)
          {
            ICatalogEntry entry = (ICatalogEntry) catalogElement;
            Map map = getEntryMap(entry.getEntryType());
            map.put(entry.getKey(), entry);
          }
          else if (catalogElement.getType() == ICatalogElement.TYPE_REWRITE)
          {
            IRewriteEntry entry = (IRewriteEntry) catalogElement;
            if (entry.getEntryType() == IRewriteEntry.REWRITE_TYPE_SYSTEM)
            {
              rewriteSystemList.add(entry);
            }
            else
            {
              rewriteUriList.add(entry);
            }
          }
          else if (catalogElement.getType() == ICatalogElement.TYPE_SUFFIX)
          {
            ISuffixEntry entry = (ISuffixEntry) catalogElement;
            if (entry.getEntryType() == ISuffixEntry.SUFFIX_TYPE_SYSTEM)
            {
              suffixSystemList.add(entry);
            }
            else
            {
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry

      if (entries.length > 0) {
        Comparator comparator = new Comparator() {
          public int compare(Object o1, Object o2) {
            int result = 0;
            if ((o1 instanceof ICatalogEntry) && (o2 instanceof ICatalogEntry)) {
              ICatalogEntry entry1 = (ICatalogEntry) o1;
              ICatalogEntry entry2 = (ICatalogEntry) o2;
              result = Collator.getInstance().compare(entry1.getKey(), entry2.getKey());
            }
            return result;
          }
        };
        Arrays.sort(entries, comparator);
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry

    }

    public boolean select(Viewer viewer, Object parent, Object element) {
      boolean result = false;
      if (element instanceof ICatalogEntry) {
        ICatalogEntry catalogEntry = (ICatalogEntry) element;
        for (int i = 0; i < extensions.length; i++) {
          if (catalogEntry.getURI().endsWith(extensions[i])) {
            result = true;
            break;
          }
        }
      }
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry

    protected HashMap imageTable = new HashMap();

    public String getText(Object object) {
      String result = null;
      if (object instanceof ICatalogEntry) {
        ICatalogEntry catalogEntry = (ICatalogEntry) object;
        result = catalogEntry.getKey();
      }
      else if (object instanceof ISuffixEntry) {
        ISuffixEntry entry = (ISuffixEntry) object;
        result = "[...]" + entry.getSuffix() + " " + XMLCatalogMessages.UI_LABEL_ARROW + " " + entry.getURI();
      }
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry

      Image result = null;
      if (object instanceof String) {
        result = xmlCatalogImage;
      }
      else if (object instanceof ICatalogEntry) {
        ICatalogEntry catalogEntry = (ICatalogEntry) object;
        String uri = catalogEntry.getURI();
        result = getResourceImage(uri);
      }
      else if (object instanceof INextCatalog) {
        // TODO: add image to the imageTable and add error overlay if
        // next catalog URI is not readable
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry

      for (Iterator i = catalogElements.iterator(); i.hasNext();)
      {
        ICatalogElement catalogElement = (ICatalogElement) i.next();
        if (catalogElement.getType() == ICatalogElement.TYPE_ENTRY)
        {
          ICatalogEntry entry = (ICatalogEntry) catalogElement;
          Map map = getEntryMap(entry.getEntryType());
          map.put(entry.getKey(), entry);
        }
        else if (catalogElement.getType() == ICatalogElement.TYPE_REWRITE)
        {
          IRewriteEntry entry = (IRewriteEntry) catalogElement;
          if (entry.getEntryType() == IRewriteEntry.REWRITE_TYPE_SYSTEM)
          {
            rewriteSystemList.add(entry);
          }
          else
          {
            rewriteUriList.add(entry);
          }
        }
        else if (catalogElement.getType() == ICatalogElement.TYPE_SUFFIX)
        {
          ISuffixEntry entry = (ISuffixEntry) catalogElement;
          if (entry.getEntryType() == ISuffixEntry.SUFFIX_TYPE_SYSTEM)
          {
            suffixSystemList.add(entry);
          }
          else
          {
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry

   * @return IHyperlink
   */
  private IHyperlink createHyperlink(String uriString, IRegion hyperlinkRegion, IDocument document, Node node) {
    IHyperlink link = null;

    ICatalogEntry entry = getCatalogEntry(uriString);
    if (entry != null) {
      link = new CatalogEntryHyperlink(hyperlinkRegion, entry);
    }
    else {
      // try to locate the file in the workspace
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry

      Object[] array = getXMLCatalogEntries().toArray();
      Comparator comparator = new Comparator() {
        public int compare(Object o1, Object o2) {
          int result = 0;
          if ((o1 instanceof ICatalogEntry) && (o2 instanceof ICatalogEntry)) {
            ICatalogEntry mappingInfo1 = (ICatalogEntry) o1;
            ICatalogEntry mappingInfo2 = (ICatalogEntry) o2;
            result = Collator.getInstance().compare(mappingInfo1.getKey(), mappingInfo2.getKey());
          }
          return result;
        }
      };
      Arrays.sort(array, comparator);
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry

    public Image getColumnImage(Object object, int columnIndex) {
      Image result = null;
      if (columnIndex == 0) {
        Image base = null;
        if (object instanceof ICatalogEntry) {
          ICatalogEntry catalogEntry = (ICatalogEntry) object;
          String uri = catalogEntry.getURI();
          if (uri.endsWith("dtd")) { //$NON-NLS-1$
            base = dtdFileImage;
          }
          else if (uri.endsWith("xsd")) { //$NON-NLS-1$
            base = xsdFileImage;
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.