Package org.eclipse.jdt.core

Examples of org.eclipse.jdt.core.IClasspathContainer


        IvyClasspathContainerImpl ivycp;

        if (project == null) {
            ivycp = new IvyClasspathContainerImpl(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


     * @return the IvyClasspathContainer is such, null, if not
     */
    public static IvyClasspathContainerImpl jdt2IvyCPC(ClassPathContainer cpc) {
        IClasspathEntry entry = cpc.getClasspathEntry();
        try {
            IClasspathContainer icp = JavaCore.getClasspathContainer(entry.getPath(),
                cpc.getJavaProject());
            if (icp instanceof IvyClasspathContainerImpl) {
                return (IvyClasspathContainerImpl) icp;
            }
        } catch (JavaModelException e) {
View Full Code Here

            for (int i = 0; i < entries.length; i++) {
                IClasspathEntry entry = entries[i];
                if (entry != null && entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) {
                    IPath path = entry.getPath();
                    if (isIvyClasspathContainer(path)) {
                        IClasspathContainer cp = JavaCore.getClasspathContainer(path, javaProject);
                        if (cp instanceof IvyClasspathContainerImpl) {
                            containers.add(cp);
                        }
                    }
                }
View Full Code Here

            for (int i = 0; i < entries.length; i++) {
                IClasspathEntry entry = entries[i];
                if (entry != null && entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) {
                    IPath path = entry.getPath();
                    if (isIvyClasspathContainer(path)) {
                        IClasspathContainer cp = JavaCore.getClasspathContainer(path, javaProject);
                        if (cp instanceof IvyClasspathContainerImpl) {
                            IvyClasspathContainerImpl ivycp = (IvyClasspathContainerImpl) cp;
                            if (ivycp.getConf().getIvyXmlPath()
                                    .equals(ivyfile.getProjectRelativePath().toString())) {
                                containers.add(ivycp);
View Full Code Here

            for (int i = 0; i < entries.length; i++) {
                IClasspathEntry entry = entries[i];
                if (entry != null && entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) {
                    IPath path = entry.getPath();
                    if (isIvyClasspathContainer(path)) {
                        IClasspathContainer cp = JavaCore.getClasspathContainer(path, javaProject);
                        if (cp instanceof IvyClasspathContainerImpl) {
                            IvyClasspathContainerImpl ivycp = (IvyClasspathContainerImpl) cp;
                            ResolvedPath settingsPath;
                            try {
                                settingsPath = ivycp.getConf().getInheritedSettingsSetup()
View Full Code Here

        }
        return containers;
    }

    public static IvyClasspathContainer getContainer(IPath containerPath, IJavaProject javaProject) {
        IClasspathContainer cp;
        try {
            cp = JavaCore.getClasspathContainer(containerPath, javaProject);
        } catch (JavaModelException e) {
            IvyPlugin.log(e);
            return null;
        }
        if (!(cp instanceof IvyClasspathContainerImpl)) {
            IvyPlugin.logError("Expected an Ivy container but was " + cp.getClass().getName()
                    + " for path " + containerPath);
            return null;
        }
        return (IvyClasspathContainerImpl) cp;
    }
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

        }
        switch (entry.getEntryKind())
        {
            case IClasspathEntry.CPE_CONTAINER:
            {
                IClasspathContainer container = JavaCore.getClasspathContainer(entry.getPath(), project);
      /*
       * ignore system containers
       */
                if (IClasspathContainer.K_APPLICATION == container.getKind())
                {
                    for (IClasspathEntry containerEntry : container.getClasspathEntries())
                    {
                        resolve(containerEntry, project, resolved);
                    }
                }
                break;
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 {
                if (container == null) {
                    container = new IvyClasspathContainer(project, containerPath,
                            new IClasspathEntry[0]);
                } else if (!(container instanceof IvyClasspathContainer)) {
                    // this might be the persisted one : reuse the persisted entries
                    container = new IvyClasspathContainer(project, containerPath, container
                            .getClasspathEntries());
                }
                JavaCore.setClasspathContainer(containerPath, new IJavaProject[] {project},
                    new IClasspathContainer[] {container}, null);

View Full Code Here

            for (int i = 0; i < entries.length; i++) {
                IClasspathEntry entry = entries[i];
                if (entry != null && entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) {
                    IPath path = entry.getPath();
                    if (isIvyClasspathContainer(path)) {
                        IClasspathContainer cp = JavaCore.getClasspathContainer(path, javaProject);
                        if (cp instanceof IvyClasspathContainer) {
                            return (IvyClasspathContainer) cp;
                        }
                    }
                }
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.