Examples of IJarRecord


Examples of org.eclipse.jst.jsp.core.taglib.IJarRecord

        ITLDRecord record = (ITLDRecord) reference;
        identifier = record.getPath();
      }
        break;
      case (ITaglibRecord.JAR) : {
        IJarRecord record = (IJarRecord) reference;
        identifier = record.getLocation();
      }
        break;
      case (ITaglibRecord.TAGDIR) : {
        ITagDirRecord record = (ITagDirRecord) reference;
        identifier = record.getPath();
      }
        break;
      case (ITaglibRecord.URL) : {
        IURLRecord record = (IURLRecord) reference;
        identifier = record.getURL();
      }
        break;
      default :
        identifier = reference;
        break;
View Full Code Here

Examples of org.eclipse.jst.jsp.core.taglib.IJarRecord

                IResource tldfile = ResourcesPlugin.getWorkspace().getRoot().getFile(record.getPath());
                addDependsOn(tldfile);
              }
                break;
              case (ITaglibRecord.JAR) : {
                IJarRecord record = (IJarRecord) reference;
                IFile[] foundFilesForLocation = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(record.getLocation());
                for (int i = 0; i < foundFilesForLocation.length; i++) {
                  addDependsOn(foundFilesForLocation[i]);
                }
              }
                break;
              case (ITaglibRecord.TAGDIR) : {
                ITagDirRecord record = (ITagDirRecord) reference;
                IPath path = record.getPath();
                IResource found = ResourcesPlugin.getWorkspace().getRoot().findMember(path, false);

                try {
                  found.accept(new IResourceVisitor() {
                    public boolean visit(IResource resource) throws CoreException {
                      if (resource.getType() == IResource.FILE) {
                        addDependsOn(resource);
                      }
                      return true;
                    }
                  });
                }
                catch (CoreException e) {
                  Logger.logException(e);
                }
              }
                break;
              case (ITaglibRecord.URL) : {
                IURLRecord record = (IURLRecord) reference;
                String baseLocation = record.getBaseLocation();
                if (baseLocation != null && baseLocation.indexOf("://") < 0) {
                  IResource found = ResourcesPlugin.getWorkspace().getRoot().findMember(baseLocation, false);
                  if (found != null) {
                    try {
                      found.accept(new IResourceVisitor() {
View Full Code Here

Examples of org.eclipse.jst.jsp.core.taglib.IJarRecord

          }
        }
      }
        break;
      case (ITaglibRecord.JAR) : {
        IJarRecord record = (IJarRecord) reference;
        document = (CMDocumentImpl) buildCMDocumentFromJar(record.getLocation().toString());
        document.setLocationString("jar:file:" + record.getLocation().toString() + "!/META-INF/taglib.tld");
        if (document.getSmallIcon() != null) {
          String iconPath = URIHelper.normalize(((TLDDocument) document).getSmallIcon(), record.getLocation().toString() + "!/META-INF/", "/"); //$NON-NLS-1$ //$NON-NLS-2$
          document.setProperty(JSP12TLDNames.SMALL_ICON, "jar:file:" + iconPath); //$NON-NLS-1$
        }
        if (document.getLargeIcon() != null) {
          String iconPath = URIHelper.normalize(((TLDDocument) document).getLargeIcon(), record.getLocation().toString() + "!/META-INF/", "/"); //$NON-NLS-1$ //$NON-NLS-2$
          document.setProperty(JSP12TLDNames.LARGE_ICON, "jar:file:" + iconPath); //$NON-NLS-1$
        }
        if (_debug && document != null && document.getElements().getLength() == 0) {
          System.out.println("failure parsing " + record.getLocation()); //$NON-NLS-1$
        }
      }
        break;
      case (ITaglibRecord.TAGDIR) : {
        ITagDirRecord record = (ITagDirRecord) reference;
        document = buildCMDocumentFromFolder(record.getPath());
      }
        break;
      case (ITaglibRecord.URL) : {
        IURLRecord record = (IURLRecord) reference;
        URL url = record.getURL();
        InputStream urlContents = JarUtilities.getInputStream(url);
        if (urlContents != null) {
          document = (CMDocumentImpl) buildCMDocument(record.getBaseLocation(), urlContents);
          String urlString = url.toString();
          document.setLocationString(urlString);
          if (document.getSmallIcon() != null) {
            String iconPath = URIHelper.normalize(((TLDDocument) document).getSmallIcon(), urlString, "/"); //$NON-NLS-1$
            document.setProperty(JSP12TLDNames.SMALL_ICON, iconPath);
View Full Code Here

Examples of org.eclipse.jst.jsp.core.taglib.IJarRecord

              record.getDescriptor().getSmallIcon());
        }
      }
        break;
      case (ITaglibRecord.JAR) : {
        IJarRecord record = (IJarRecord) taglibRecord;
        if (record.getDescriptor().getSmallIcon().length() > 0) {
          // url = "file:" +
          // URIHelper.normalize(record.getDescriptor().getSmallIcon(),
          // record.getLocation().toString(), "/"); //$NON-NLS-1$
        }
      }
        break;
      case (ITaglibRecord.TAGDIR) : {
      }
        break;
      case (ITaglibRecord.URL) : {
        IURLRecord record = (IURLRecord) taglibRecord;
        if (record.getDescriptor().getSmallIcon().length() > 0) {
          url = URIHelper.normalize(record.getDescriptor().getSmallIcon(), record.getURL().toString(), "/"); //$NON-NLS-1$
        }
      }
        break;
    }
    return url;
View Full Code Here

Examples of org.eclipse.jst.jsp.core.taglib.IJarRecord

              record.getDescriptor().getSmallIcon());
        }
      }
        break;
      case (ITaglibRecord.JAR) : {
        IJarRecord record = (IJarRecord) taglibRecord;
        if (record.getDescriptor().getSmallIcon().length() > 0) {
          // url = "file:" +
          // URIHelper.normalize(record.getDescriptor().getSmallIcon(),
          // record.getLocation().toString(), "/"); //$NON-NLS-1$
        }
      }
        break;
      case (ITaglibRecord.TAGDIR) : {
      }
        break;
      case (ITaglibRecord.URL) : {
        IURLRecord record = (IURLRecord) taglibRecord;
        if (record.getDescriptor().getSmallIcon().length() > 0) {
          url = URIHelper.normalize(record.getDescriptor().getSmallIcon(), record.getURL().toString(), "/"); //$NON-NLS-1$
        }
      }
        break;
    }
    return url;
View Full Code Here

Examples of org.eclipse.jst.jsp.core.taglib.IJarRecord

  private IHyperlink getHyperlink() {
    if (fHyperlink == null && fTaglibRecord != null) {
      switch (fTaglibRecord.getRecordType()) {
        case (ITaglibRecord.JAR) : {
          IJarRecord record = (IJarRecord) fTaglibRecord;
          fHyperlink = new TaglibJarHyperlink(fRegion, record.getLocation());
        }
          break;
        case (ITaglibRecord.URL) : {
          IURLRecord record = (IURLRecord) fTaglibRecord;
          fHyperlink = new URLFileHyperlink(fRegion, record.getURL());
        }
      }
    }
    return fHyperlink;
  }
View Full Code Here

Examples of org.eclipse.jst.jsp.core.taglib.IJarRecord

          }
        }
      }
        break;
      case (ITaglibRecord.JAR) : {
        IJarRecord record = (IJarRecord) reference;
        document = (CMDocumentImpl) buildCMDocumentFromJar(record.getLocation().toString());
        document.setLocationString("jar:file:" + record.getLocation().toString() + "!/META-INF/taglib.tld");
        if (document.getSmallIcon() != null) {
          String iconPath = URIHelper.normalize(((TLDDocument) document).getSmallIcon(), record.getLocation().toString() + "!/META-INF/", "/"); //$NON-NLS-1$ //$NON-NLS-2$
          document.setProperty(JSP12TLDNames.SMALL_ICON, "jar:file:" + iconPath); //$NON-NLS-1$
        }
        if (document.getLargeIcon() != null) {
          String iconPath = URIHelper.normalize(((TLDDocument) document).getLargeIcon(), record.getLocation().toString() + "!/META-INF/", "/"); //$NON-NLS-1$ //$NON-NLS-2$
          document.setProperty(JSP12TLDNames.LARGE_ICON, "jar:file:" + iconPath); //$NON-NLS-1$
        }
        if (_debug && document != null && document.getElements().getLength() == 0) {
          System.out.println("failure parsing " + record.getLocation()); //$NON-NLS-1$
        }
      }
        break;
      case (ITaglibRecord.TAGDIR) : {
        ITagDirRecord record = (ITagDirRecord) reference;
        document = buildCMDocumentFromFolder(record.getPath());
      }
        break;
      case (ITaglibRecord.URL) : {
        IURLRecord record = (IURLRecord) reference;
        URL url = record.getURL();
        InputStream urlContents = JarUtilities.getInputStream(url);
        if (urlContents != null) {
          document = (CMDocumentImpl) buildCMDocument(record.getBaseLocation(), urlContents);
          String urlString = url.toString();
          document.setLocationString(urlString);
          if (document.getSmallIcon() != null) {
            String iconPath = URIHelper.normalize(((TLDDocument) document).getSmallIcon(), urlString, "/"); //$NON-NLS-1$
            document.setProperty(JSP12TLDNames.SMALL_ICON, iconPath);
View Full Code Here

Examples of org.eclipse.jst.jsp.core.taglib.IJarRecord

        ITLDRecord record = (ITLDRecord) reference;
        identifier = record.getPath();
      }
        break;
      case (ITaglibRecord.JAR) : {
        IJarRecord record = (IJarRecord) reference;
        identifier = record.getLocation();
      }
        break;
      case (ITaglibRecord.TAGDIR) : {
        ITagDirRecord record = (ITagDirRecord) reference;
        identifier = record.getPath();
      }
        break;
      case (ITaglibRecord.URL) : {
        IURLRecord record = (IURLRecord) reference;
        identifier = record.getURL();
      }
        break;
      default :
        identifier = reference;
        break;
View Full Code Here

Examples of org.eclipse.jst.jsp.core.taglib.IJarRecord

                IResource tldfile = ResourcesPlugin.getWorkspace().getRoot().getFile(record.getPath());
                addDependsOn(tldfile);
              }
                break;
              case (ITaglibRecord.JAR) : {
                IJarRecord record = (IJarRecord) reference;
                IFile[] foundFilesForLocation = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(record.getLocation());
                for (int i = 0; i < foundFilesForLocation.length; i++) {
                  addDependsOn(foundFilesForLocation[i]);
                }
              }
                break;
              case (ITaglibRecord.TAGDIR) : {
                ITagDirRecord record = (ITagDirRecord) reference;
                IPath path = record.getPath();
                IResource found = ResourcesPlugin.getWorkspace().getRoot().findMember(path, false);

                try {
                  found.accept(new IResourceVisitor() {
                    public boolean visit(IResource resource) throws CoreException {
                      if (resource.getType() == IResource.FILE) {
                        addDependsOn(resource);
                      }
                      return true;
                    }
                  });
                }
                catch (CoreException e) {
                  Logger.logException(e);
                }
              }
                break;
              case (ITaglibRecord.URL) : {
                IURLRecord record = (IURLRecord) reference;
                String baseLocation = record.getBaseLocation();
                if (baseLocation != null && baseLocation.indexOf("://") < 0) {
                  IResource found = ResourcesPlugin.getWorkspace().getRoot().findMember(baseLocation, false);
                  if (found != null) {
                    try {
                      found.accept(new IResourceVisitor() {
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.