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


    }
    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

      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

              project = JavaRuntime.getJavaProject(fLaunchConfiguration);
            } catch (CoreException e) {
            }
            if (project == null) {
            } else {
              IClasspathContainer container = JavaCore.getClasspathContainer(entry.getPath(), project);
              if (container != null) {
                if(container.getDescription().startsWith("Persisted container")){
                  return container.getPath().toString();
                }else{
                  return container.getDescription();
                }
              }
            }
          } catch (CoreException e) {
          }
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

              project = JavaRuntime.getJavaProject(fLaunchConfiguration);
            } catch (CoreException e) {
            }
            if (project == null) {
            } else {
              IClasspathContainer container = JavaCore.getClasspathContainer(entry.getPath(), project);
              if (container != null) {
                if(container.getDescription().startsWith("Persisted container")){
                  return container.getPath().toString();
                }else{
                  return container.getDescription();
                }
              }
            }
          } catch (CoreException e) {
          }
View Full Code Here

      case IClasspathEntry.CPE_LIBRARY:
      case IClasspathEntry.CPE_VARIABLE:
        filtered.add(root);
        break;
      case IClasspathEntry.CPE_CONTAINER:
        IClasspathContainer container = JavaCore.getClasspathContainer(
            entry.getPath(), root.getJavaProject());
        if (container != null
            && container.getKind() == IClasspathContainer.K_APPLICATION) {
          filtered.add(root);
        }
        break;
      }
    }
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

      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

      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

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.