Package org.eclipse.jdt.core

Examples of org.eclipse.jdt.core.IClasspathContainer


    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


public class DerbyClasspathContainerInitializer
    extends ClasspathContainerInitializer {
    @Override
    public void initialize(IPath containerPath, IJavaProject project)
        throws CoreException {
        IClasspathContainer container = new DerbyClasspathContainer();
        JavaCore.setClasspathContainer(containerPath, new IJavaProject[] {project}, new IClasspathContainer[] {container}, null);
    }
View Full Code Here

     * @return the IvyClasspathContainer is such, null, if not
     */
    public static IvyClasspathContainer jdt2IvyCPC(ClassPathContainer cpc) {
        IClasspathEntry entry = cpc.getClasspathEntry();
        try {
            IClasspathContainer icp = JavaCore.getClasspathContainer(entry.getPath(), cpc
                    .getJavaProject());
            if (icp instanceof IvyClasspathContainer) {
                return (IvyClasspathContainer) 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 IvyClasspathContainer) {
                            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 IvyClasspathContainer) {
                            IvyClasspathContainer ivycp = (IvyClasspathContainer) 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 IvyClasspathContainer) {
                            IvyClasspathContainer ivycp = (IvyClasspathContainer) cp;
                            if (ivycp.getConf().getInheritedIvySettingsPath().equals(
                                ivySettings.getProjectRelativePath().toString())) {
                                containers.add(ivycp);
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;

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

View Full Code Here

                        .getLibraryJavadocLocation(entry));
            }
            // force refresh of ivy classpath entry in ui thread
            Display.getDefault().asyncExec(new Runnable() {
                public void run() {
                    IClasspathContainer cp;
                    try {
                        cp = JavaCore.getClasspathContainer(containerPath, project);
                    } catch (JavaModelException e) {
                        IvyPlugin.log(e);
                        return;
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

            addToResult(rawEntry, resolvedEntry, result, resolvedEntries, externalFoldersManager, referencedEntriesMap, false, knownDrives);
          }
          break;

        case IClasspathEntry.CPE_CONTAINER :
          IClasspathContainer container = usePreviousSession ? manager.getPreviousSessionContainer(rawEntry.getPath(), this) : JavaCore.getClasspathContainer(rawEntry.getPath(), this);
          if (container == null){
            result.unresolvedEntryStatus = new JavaModelStatus(IJavaModelStatusConstants.CP_CONTAINER_PATH_UNBOUND, this, rawEntry.getPath());
            break;
          }

          IClasspathEntry[] containerEntries = container.getClasspathEntries();
          if (containerEntries == null) {
            if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) {
              JavaModelManager.getJavaModelManager().verbose_missbehaving_container_null_entries(this, rawEntry.getPath());
            }
            break;
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.