Example usage for org.eclipse.jdt.core IJavaProject getElementName

List of usage examples for org.eclipse.jdt.core IJavaProject getElementName

Introduction

In this page you can find the example usage for org.eclipse.jdt.core IJavaProject getElementName.

Prototype

String getElementName();

Source Link

Document

Returns the name of this element.

Usage

From source file:org.eclipse.jdt.internal.core.JavaModelManager.java

License:Open Source License

void verbose_missbehaving_container(IJavaProject project, IPath containerPath,
        IClasspathEntry[] classpathEntries) {
    Util.verbose("CPContainer GET - missbehaving container (returning null classpath entry)\n" + //$NON-NLS-1$
            "   project: " + project.getElementName() + '\n' + //$NON-NLS-1$
            "   container path: " + containerPath + '\n' + //$NON-NLS-1$
            "   classpath entries: {\n" + //$NON-NLS-1$
            org.eclipse.jdt.internal.compiler.util.Util.toString(classpathEntries,
                    new org.eclipse.jdt.internal.compiler.util.Util.Displayable() {
                        public String displayString(Object o) {
                            StringBuffer buffer = new StringBuffer("      "); //$NON-NLS-1$
                            if (o == null) {
                                buffer.append("<null>"); //$NON-NLS-1$
                                return buffer.toString();
                            }//w  ww.j a va2s. co  m
                            buffer.append(o);
                            return buffer.toString();
                        }
                    })
            + "\n   }" //$NON-NLS-1$
    );
}

From source file:org.eclipse.jdt.internal.core.JavaModelManager.java

License:Open Source License

void verbose_missbehaving_container_null_entries(IJavaProject project, IPath containerPath) {
    Util.verbose("CPContainer GET - missbehaving container (returning null as classpath entries)\n" + //$NON-NLS-1$
            "   project: " + project.getElementName() + '\n' + //$NON-NLS-1$
            "   container path: " + containerPath + '\n' + //$NON-NLS-1$
            "   classpath entries: <null>" //$NON-NLS-1$
    );/*from   w w w  .ja  va 2 s . c o  m*/
}

From source file:org.eclipse.jdt.internal.core.JavaModelManager.java

License:Open Source License

public HashSet getExternalWorkingCopyProjects() {
    synchronized (this.perWorkingCopyInfos) {
        HashSet result = null;//from www. ja  v  a  2 s .  co  m
        Iterator values = this.perWorkingCopyInfos.values().iterator();
        while (values.hasNext()) {
            Map ownerCopies = (Map) values.next();
            Iterator workingCopies = ownerCopies.keySet().iterator();
            while (workingCopies.hasNext()) {
                ICompilationUnit workingCopy = (ICompilationUnit) workingCopies.next();
                IJavaProject project = workingCopy.getJavaProject();
                if (project.getElementName().equals(ExternalJavaProject.EXTERNAL_PROJECT_NAME)) {
                    if (result == null)
                        result = new HashSet();
                    result.add(project);
                }
            }
        }
        return result;
    }
}

From source file:org.eclipse.jdt.internal.core.JavaModelManager.java

License:Open Source License

private void verbose_reentering_project_container_access(IPath containerPath, IJavaProject project,
        IClasspathContainer previousContainer) {
    StringBuffer buffer = new StringBuffer();
    buffer.append(//from  w  ww  .  j  a  v  a 2s .co  m
            "CPContainer INIT - reentering access to project container during its initialization, will see previous value\n"); //$NON-NLS-1$
    buffer.append("   project: " + project.getElementName() + '\n'); //$NON-NLS-1$
    buffer.append("   container path: " + containerPath + '\n'); //$NON-NLS-1$
    buffer.append("   previous value: "); //$NON-NLS-1$
    buffer.append(previousContainer.getDescription());
    buffer.append(" {\n"); //$NON-NLS-1$
    IClasspathEntry[] entries = previousContainer.getClasspathEntries();
    if (entries != null) {
        for (int j = 0; j < entries.length; j++) {
            buffer.append("       "); //$NON-NLS-1$
            buffer.append(entries[j]);
            buffer.append('\n');
        }
    }
    buffer.append("    }"); //$NON-NLS-1$
    Util.verbose(buffer.toString());
    new Exception("<Fake exception>").printStackTrace(System.out); //$NON-NLS-1$
}

From source file:org.eclipse.jdt.internal.core.JavaModelManager.java

License:Open Source License

private void verbose_batching_containers_initialization(IJavaProject javaProjectToInit, IPath containerToInit) {
    Util.verbose("CPContainer INIT - batching containers initialization\n" + //$NON-NLS-1$
            "   project to init: " + (javaProjectToInit == null ? "null" : javaProjectToInit.getElementName()) //$NON-NLS-1$//$NON-NLS-2$
            + '\n' + "   container path to init: " + containerToInit);
}

From source file:org.eclipse.jdt.internal.core.JavaModelManager.java

License:Open Source License

private void verbose_no_container_initializer_found(IJavaProject project, IPath containerPath) {
    Util.verbose("CPContainer INIT - no initializer found\n" + //$NON-NLS-1$
            "   project: " + project.getElementName() + '\n' + //$NON-NLS-1$
            "   container path: " + containerPath); //$NON-NLS-1$
}

From source file:org.eclipse.jdt.internal.core.JavaModelManager.java

License:Open Source License

private void verbose_container_value_after_initialization(IJavaProject project, IPath containerPath,
        IClasspathContainer container) {
    StringBuffer buffer = new StringBuffer();
    buffer.append("CPContainer INIT - after resolution\n"); //$NON-NLS-1$
    buffer.append("   project: " + project.getElementName() + '\n'); //$NON-NLS-1$
    buffer.append("   container path: " + containerPath + '\n'); //$NON-NLS-1$
    if (container != null) {
        buffer.append("   container: " + container.getDescription() + " {\n"); //$NON-NLS-2$//$NON-NLS-1$
        IClasspathEntry[] entries = container.getClasspathEntries();
        if (entries != null) {
            for (int i = 0; i < entries.length; i++) {
                buffer.append("      " + entries[i] + '\n'); //$NON-NLS-1$
            }//from  w w  w.  j av a  2 s .  co  m
        }
        buffer.append("   }");//$NON-NLS-1$
    } else {
        buffer.append("   container: {unbound}");//$NON-NLS-1$
    }
    Util.verbose(buffer.toString());
}

From source file:org.eclipse.jdt.internal.core.JavaModelManager.java

License:Open Source License

private void verbose_container_initialization_failed(IJavaProject project, IPath containerPath,
        IClasspathContainer container, ClasspathContainerInitializer initializer) {
    if (container == CONTAINER_INITIALIZATION_IN_PROGRESS) {
        Util.verbose("CPContainer INIT - FAILED (initializer did not initialize container)\n" + //$NON-NLS-1$
                "   project: " + project.getElementName() + '\n' + //$NON-NLS-1$
                "   container path: " + containerPath + '\n' + //$NON-NLS-1$
                "   initializer: " + initializer); //$NON-NLS-1$

    } else {/* w  w  w. j  av a2s . co m*/
        Util.verbose("CPContainer INIT - FAILED (see exception above)\n" + //$NON-NLS-1$
                "   project: " + project.getElementName() + '\n' + //$NON-NLS-1$
                "   container path: " + containerPath + '\n' + //$NON-NLS-1$
                "   initializer: " + initializer); //$NON-NLS-1$
    }
}

From source file:org.eclipse.jdt.internal.core.JavaModelManager.java

License:Open Source License

private void verbose_container_null_failure_container(IJavaProject project, IPath containerPath,
        ClasspathContainerInitializer initializer) {
    Util.verbose("CPContainer INIT - FAILED (and failure container is null)\n" + //$NON-NLS-1$
            "   project: " + project.getElementName() + '\n' + //$NON-NLS-1$
            "   container path: " + containerPath + '\n' + //$NON-NLS-1$
            "   initializer: " + initializer); //$NON-NLS-1$
}

From source file:org.eclipse.jdt.internal.core.JavaModelManager.java

License:Open Source License

private void verbose_container_using_failure_container(IJavaProject project, IPath containerPath,
        ClasspathContainerInitializer initializer) {
    Util.verbose("CPContainer INIT - FAILED (using failure container)\n" + //$NON-NLS-1$
            "   project: " + project.getElementName() + '\n' + //$NON-NLS-1$
            "   container path: " + containerPath + '\n' + //$NON-NLS-1$
            "   initializer: " + initializer); //$NON-NLS-1$
}