Package org.eclipse.jdt.core

Examples of org.eclipse.jdt.core.IClasspathContainer


    }
    if (project == null || entry == null) {
      // cannot resolve without entry or project context
      return new IRuntimeClasspathEntry[0];
    }
    IClasspathContainer container = JavaCore.getClasspathContainer(entry.getPath(), project);
    if (container == null) {
      return null;
    }
    IClasspathEntry[] cpes = container.getClasspathEntries();
    int property = -1;
    switch (container.getKind()) {
      case IClasspathContainer.K_APPLICATION:
        property = IRuntimeClasspathEntry.USER_CLASSES;
        break;
      case IClasspathContainer.K_DEFAULT_SYSTEM:
        property = IRuntimeClasspathEntry.STANDARD_CLASSES;
View Full Code Here


      IClasspathEntry entry = entries[i];
      if (entry.isExported()) {
        IRuntimeClasspathEntry rte = null;
        switch (entry.getEntryKind()) {
          case IClasspathEntry.CPE_CONTAINER:
            IClasspathContainer container = JavaCore.getClasspathContainer(entry.getPath(), proj);
            int kind = 0;
            switch (container.getKind()) {
              case IClasspathContainer.K_APPLICATION:
                kind = IRuntimeClasspathEntry.USER_CLASSES;
                break;
              case IClasspathContainer.K_SYSTEM:
                kind = IRuntimeClasspathEntry.BOOTSTRAP_CLASSES;
View Full Code Here

    }
    if (project == null || entry == null) {
      // cannot resolve without entry or project context
      return new IRuntimeClasspathEntry[0];
    }
    IClasspathContainer container = JavaCore.getClasspathContainer(entry.getPath(), project);
    if (container == null) {
      return null;
    }
    IClasspathEntry[] cpes = container.getClasspathEntries();
    int property = -1;
    switch (container.getKind()) {
      case IClasspathContainer.K_APPLICATION:
        property = IRuntimeClasspathEntry.USER_CLASSES;
        break;
      case IClasspathContainer.K_DEFAULT_SYSTEM:
        property = IRuntimeClasspathEntry.STANDARD_CLASSES;
View Full Code Here

        // There shouldn't be proejct entrys in general case, so it
        // should be working fine.
        if (RunJettyRunClasspathResolver.isM2EMavenContainer(delegate)
            || RunJettyRunClasspathResolver
                .isWebAppContainer(delegate)) {
          IClasspathContainer container = JavaCore
              .getClasspathContainer(delegate.getPath(),
                  delegate.getJavaProject());
          if (container == null) {
            return null;
          }
          IClasspathEntry[] cpes = container.getClasspathEntries();
          if (cpes == null) {
            return null;
          }
          IRuntimeClasspathEntry[] entries = new IRuntimeClasspathEntry[cpes.length];
          for (int i = 0; i < cpes.length; ++i) {
View Full Code Here

        // There shouldn't be proejct entrys in general case, so it
        // should be working fine.
        if (RunJettyRunClasspathResolver.isM2EMavenContainer(delegate)
            || RunJettyRunClasspathResolver
                .isWebAppContainer(delegate)) {
          IClasspathContainer container = JavaCore
              .getClasspathContainer(delegate.getPath(),
                  delegate.getJavaProject());
          if (container == null) {
            return null;
          }
          IClasspathEntry[] cpes = container.getClasspathEntries();
          if (cpes == null || cpes.length == 0) {
            return null;
          }
          IRuntimeClasspathEntry[] entries = new IRuntimeClasspathEntry[cpes.length];
          for (int i = 0; i < cpes.length; ++i) {
View Full Code Here

      Set<IPath> sourceTargets = new HashSet<IPath>();
      for (int i = 0; i < entries.length; i++) {
        IClasspathEntry entry = entries[i];
        switch (entry.getEntryKind()) {
          case IClasspathEntry.CPE_CONTAINER:
            IClasspathContainer container = JavaCore.getClasspathContainer(entry.getPath(), project);
            if (container != null) {
              switch (container.getKind()) {
                case IClasspathContainer.K_DEFAULT_SYSTEM:
//                  classpathEntries.add(JavaRuntime.newRuntimeContainerClasspathEntry(container.getPath(), IRuntimeClasspathEntry.STANDARD_CLASSES, project));
                  break;
                default:
                  classpathEntries.add(JavaRuntime.newRuntimeContainerClasspathEntry(container.getPath(), IRuntimeClasspathEntry.USER_CLASSES, project));
                  break;
              }
            }
            break;
          case IClasspathEntry.CPE_LIBRARY:
View Full Code Here

    }
    if (project == null || entry == null) {
      // cannot resolve without entry or project context
      return new ArrayList<IProject>();
    }
    IClasspathContainer container = JavaCore.getClasspathContainer(
        entry.getPath(), project);
    if (container == null) {
      return new ArrayList<IProject>();
    }
    IClasspathEntry[] cpes = container.getClasspathEntries();

    List<IProject> result = new ArrayList<IProject>();

    for (int i = 0; i < cpes.length; i++) {
      IClasspathEntry cpe = cpes[i];
View Full Code Here

    public boolean canUpdateClasspathContainer(IPath containerPath, IJavaProject project) {
        return true;
    }
   
    public IClasspathContainer getRuntimeClasspathContainer() {
        return new IClasspathContainer() {
            public IClasspathEntry[] getClasspathEntries() {
                return container.getRuntimeClasspathEntries();
            }
           
            public String getDescription() {
View Full Code Here

       
        List<IClasspathEntry> classpathEntries = new ArrayList<IClasspathEntry>();
        for (IExtension extension: Platform.getExtensionRegistry().getExtensionPoint(EXTENSION_POINT_ID).getExtensions()) {
            for (IConfigurationElement configuration: extension.getConfigurationElements()) {
                RuntimeClasspathContainerInitializer initializer = (RuntimeClasspathContainerInitializer)configuration.createExecutableExtension("class");
                IClasspathContainer container = initializer.getRuntimeClasspathContainer();
                classpathEntries.addAll(Arrays.asList(container.getClasspathEntries()));
            }
        }
       
        String separator = System.getProperty("path.separator");
        StringBuffer classpath = new StringBuffer();
View Full Code Here

    public static String installedRuntimeClasspath() throws CoreException {
       
        List<IClasspathEntry> classpathEntries = new ArrayList<IClasspathEntry>();
        for (IExtension extension: Platform.getExtensionRegistry().getExtensionPoint(TUSCANY_RUNTIME_LIBRARIES).getExtensions()) {
            for (IConfigurationElement configuration: extension.getConfigurationElements()) {
                IClasspathContainer container = (IClasspathContainer)configuration.createExecutableExtension("class");
                classpathEntries.addAll(Arrays.asList(container.getClasspathEntries()));
            }
        }
       
        String separator = System.getProperty("path.separator");
        StringBuffer classpath = new StringBuffer();
View Full Code Here

TOP

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

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.