Package org.eclipse.jdt.core

Examples of org.eclipse.jdt.core.IClasspathContainer


                  status = new JavaModelStatus(IJavaModelStatusConstants.NAME_COLLISION, Messages.bind(Messages.classpath_duplicateEntryExtraAttribute, new String[] {attName, entryPathMsg, projectName}));
                  break;
                }
              }
            }
            IClasspathContainer container = JavaModelManager.getJavaModelManager().getClasspathContainer(path, project);
            // container retrieval is performing validation check on container entry kinds.
            if (container == null) {
              if (status != null)
                return status;
              return new JavaModelStatus(IJavaModelStatusConstants.CP_CONTAINER_PATH_UNBOUND, project, path);
            } else if (container == JavaModelManager.CONTAINER_INITIALIZATION_IN_PROGRESS) {
              // don't create a marker if initialization is in progress (case of cp initialization batching)
              return JavaModelStatus.VERIFIED_OK;
            }
            IClasspathEntry[] containerEntries = container.getClasspathEntries();
            if (containerEntries != null){
              for (int i = 0, length = containerEntries.length; i < length; i++){
                IClasspathEntry containerEntry = containerEntries[i];
                int kind = containerEntry == null ? 0 : containerEntry.getEntryKind();
                if (containerEntry == null
View Full Code Here


                addEnclosingProjectOrJar(entry.getPath());
              }
            }
            break;
          case IClasspathEntry.CPE_CONTAINER:
            IClasspathContainer container = JavaCore.getClasspathContainer(rawEntry.getPath(), javaProject);
            if (container == null) break;
            switch (container.getKind()) {
              case IClasspathContainer.K_APPLICATION:
                if ((includeMask & APPLICATION_LIBRARIES) == 0) break rawKind;
                break;
              case IClasspathContainer.K_SYSTEM:
              case IClasspathContainer.K_DEFAULT_SYSTEM:
View Full Code Here

        getLibraryEntry("cayenne/ashwood-2.0.jar"),
        getLibraryEntry("cayenne/commons-collections-3.1.jar"),
        getLibraryEntry("cayenne/commons-logging-1.1.jar"),
    };

    IClasspathContainer container = new IClasspathContainer() {

      public IPath getPath() {
        return containerPath;
      }
View Full Code Here

      if(activitiExtensionLibraryPresent == false) {
        ClasspathContainerInitializer initializer = JavaCore.getClasspathContainerInitializer(JavaCore.USER_LIBRARY_CONTAINER_ID);
        IPath containerPath = new Path(JavaCore.USER_LIBRARY_CONTAINER_ID);
        initializer.requestClasspathContainerUpdate(containerPath.append(ActivitiPlugin.USER_LIBRARY_NAME_EXTENSIONS),
                null, new IClasspathContainer() {

          @Override
          public IPath getPath() {
            return new Path(JavaCore.USER_LIBRARY_CONTAINER_ID).append(ActivitiPlugin.USER_LIBRARY_NAME_EXTENSIONS) ;
          }
View Full Code Here

    return createClasspathContainer(name, getClasspathEntries(jarFileOrDir,list));
  }
 
  private IClasspathContainer createClasspathContainer(final String name, final IClasspathEntry[] entries)
  {
    return new IClasspathContainer() {
      public IPath getPath()
      {
        return new Path(JavaCore.USER_LIBRARY_CONTAINER_ID).append(name);
      }
View Full Code Here

      }

      if (activitiExtensionLibraryPresent == false) {
        ClasspathContainerInitializer initializer = JavaCore.getClasspathContainerInitializer(JavaCore.USER_LIBRARY_CONTAINER_ID);
        IPath containerPath = new Path(JavaCore.USER_LIBRARY_CONTAINER_ID);
        initializer.requestClasspathContainerUpdate(containerPath.append(ActivitiPlugin.USER_LIBRARY_NAME_EXTENSIONS), null, new IClasspathContainer() {

          @Override
          public IPath getPath() {
            return new Path(JavaCore.USER_LIBRARY_CONTAINER_ID).append(ActivitiPlugin.USER_LIBRARY_NAME_EXTENSIONS);
          }
View Full Code Here

      try {

        // Get the container for the designer extensions. This is the
        // predefined user library linking to the extension libraries
        final IClasspathContainer userLibraryContainer = JavaCore.getClasspathContainer(new Path(DESIGNER_EXTENSIONS_USER_LIB_PATH), javaProject);

        // Get a list of the classpath entries in the container. Each of
        // these represents one jar containing zero or more designer
        // extensions
        final IClasspathEntry[] extensionJars = userLibraryContainer.getClasspathEntries();

        // If there are jars, inspect them; otherwise return because
        // there are no extensions
        if (extensionJars.length > 0) {
View Full Code Here

      try {

        // Get the container for the designer extensions. This is the
        // predefined user library linking to the extension libraries
        final IClasspathContainer userLibraryContainer = JavaCore.getClasspathContainer(new Path(DESIGNER_EXTENSIONS_USER_LIB_PATH), javaProject);

        // Get a list of the classpath entries in the container. Each of
        // these represents one jar containing zero or more designer
        // extensions
        final IClasspathEntry[] extensionJars = userLibraryContainer.getClasspathEntries();

        // If there are jars, inspect them; otherwise return because
        // there are no extensions
        if (extensionJars.length > 0) {
View Full Code Here

        IJavaProject project = entry.getJavaProject();
        if (project == null) {
            ivycp = new IvyClasspathContainer(null, entry.getPath(), null, null);
        } else {
            IClasspathContainer container = JavaCore
                    .getClasspathContainer(entry.getPath(), project);
            if (container == null) {
                String message = "Could not resolve classpath container: "
                        + entry.getPath().toString();
                throw new CoreException(new Status(IStatus.ERROR, IvyPlugin.ID,
View Full Code Here

     */
    public void initialize(IPath containerPath, IJavaProject project) throws CoreException {
        if (IvyClasspathUtil.isIvyClasspathContainer(containerPath)) {

            // try to get an existing one
            IClasspathContainer container = null;
            try {
                container = JavaCore.getClasspathContainer(containerPath, project);
            } catch (JavaModelException ex) {
                // unless there are issues with the JDT, this should never happen
                IvyPlugin.log(IStatus.ERROR,
                    "Unable to get container for " + containerPath.toString(), ex);
                return;
            }

            try {
                IvyClasspathContainer ivycp;
                IClasspathEntry entry = IvyClasspathUtil.getIvyClasspathEntry(containerPath,
                    project);
                IClasspathAttribute[] attributes;
                boolean exported;
                if (entry != null) {
                    attributes = entry.getExtraAttributes();
                    exported = entry.isExported();
                } else {
                    exported = false;
                    attributes = new IClasspathAttribute[0];
                }

                if (container instanceof IvyClasspathContainer) {
                    ivycp = (IvyClasspathContainer) container;
                } else {
                    if (container == null) {
                        ivycp = new IvyClasspathContainer(project, containerPath,
                                new IClasspathEntry[0], attributes);
                    } else {
                        // this might be the persisted one : reuse the persisted entries
                        ivycp = new IvyClasspathContainer(project, containerPath,
                                container.getClasspathEntries(), attributes);
                    }
                }

                // recompute the path as it may have been "upgraded"
                IPath updatedPath = IvyClasspathContainerConfAdapter.getPath(ivycp.getConf());
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.