/** * @see IJavaElement */ @Override public IPath getPath() { return internalPath(); }
/** * @see IJavaElement */ public IPath getPath() { return internalPath(); }
/** * @see IJavaElement */ public IPath getPath() { return internalPath(); }
/** * @see IJavaElement */ public IPath getPath() { return internalPath(); }
/** * @see IJavaElement */ public IPath getPath() { return internalPath(); }
/** * @see IJavaElement */ public IPath getPath() { return internalPath(); }
@Override public IPath internalPath() { if (isExternal()) { return this.jarPath; } else { return super.internalPath(); } } @Override
public IPath internalPath() { if (isExternal()) { return this.jarPath; } else { return super.internalPath(); } } public IResource resource(PackageFragmentRoot root) {
public IPath internalPath() { if (isExternal()) { return this.jarPath; } else { return super.internalPath(); } } public IResource resource(PackageFragmentRoot root) {
public IPath internalPath() { if (isExternal()) { return this.jarPath; } else { return super.internalPath(); } } public IResource resource(PackageFragmentRoot root) {
public IPath internalPath() { if (isExternal()) { return this.jarPath; } else { return super.internalPath(); } } public IResource resource(PackageFragmentRoot root) {
public IPath internalPath() { if (isExternal()) { return this.jarPath; } else { return super.internalPath(); } } public IResource resource(PackageFragmentRoot root) {
/** * Returns the package fragment root that contains the given resource path. */ private PackageFragmentRoot getPkgFragmentRoot(String pathString) { IPath path= new Path(pathString); IProject[] projects= ResourcesPlugin.getWorkspace().getRoot().getProjects(); for (int i= 0, max= projects.length; i < max; i++) { try { IProject project = projects[i]; if (!project.isAccessible() || !project.hasNature(JavaCore.NATURE_ID)) continue; IJavaProject javaProject= this.javaModel.getJavaProject(project); IPackageFragmentRoot[] roots= javaProject.getPackageFragmentRoots(); for (int j= 0, rootCount= roots.length; j < rootCount; j++) { PackageFragmentRoot root= (PackageFragmentRoot)roots[j]; if (root.internalPath().isPrefixOf(path) && !Util.isExcluded(path, root.fullInclusionPatternChars(), root.fullExclusionPatternChars(), false)) { return root; } } } catch (CoreException e) { // CoreException from hasNature - should not happen since we check that the project is accessible // JavaModelException from getPackageFragmentRoots - a problem occured while accessing project: nothing we can do, ignore } } return null; }
if (root == null) return null; this.lastPkgFragmentRoot = root; this.lastPkgFragmentRootPath = root.internalPath().toString(); this.packageHandles = new HashtableOfArrayToObject(5);
/** * Returns the package fragment root that contains the given resource path. */ private PackageFragmentRoot getPkgFragmentRoot(String pathString) { IPath path= new Path(pathString); IProject[] projects= ResourcesPlugin.getWorkspace().getRoot().getProjects(); for (int i= 0, max= projects.length; i < max; i++) { try { IProject project = projects[i]; if (!project.isAccessible() || !project.hasNature(JavaCore.NATURE_ID)) continue; IJavaProject javaProject= this.javaModel.getJavaProject(project); IPackageFragmentRoot[] roots= javaProject.getPackageFragmentRoots(); for (int j= 0, rootCount= roots.length; j < rootCount; j++) { PackageFragmentRoot root= (PackageFragmentRoot)roots[j]; if (root.internalPath().isPrefixOf(path) && !Util.isExcluded(path, root.fullInclusionPatternChars(), root.fullExclusionPatternChars(), false)) { return root; } } } catch (CoreException e) { // CoreException from hasNature - should not happen since we check that the project is accessible // JavaModelException from getPackageFragmentRoots - a problem occured while accessing project: nothing we can do, ignore } } return null; }
/** * Returns the package fragment root that contains the given resource path. */ private PackageFragmentRoot getPkgFragmentRoot(String pathString) { IPath path= new Path(pathString); IProject[] projects= ResourcesPlugin.getWorkspace().getRoot().getProjects(); for (int i= 0, max= projects.length; i < max; i++) { try { IProject project = projects[i]; if (!project.isAccessible() || !project.hasNature(JavaCore.NATURE_ID)) continue; IJavaProject javaProject= this.javaModel.getJavaProject(project); IPackageFragmentRoot[] roots= javaProject.getPackageFragmentRoots(); for (int j= 0, rootCount= roots.length; j < rootCount; j++) { PackageFragmentRoot root= (PackageFragmentRoot)roots[j]; if (root.internalPath().isPrefixOf(path) && !Util.isExcluded(path, root.fullInclusionPatternChars(), root.fullExclusionPatternChars(), false)) { return root; } } } catch (CoreException e) { // CoreException from hasNature - should not happen since we check that the project is accessible // JavaModelException from getPackageFragmentRoots - a problem occured while accessing project: nothing we can do, ignore } } return null; }
/** * Returns the package fragment root that contains the given resource path. */ private PackageFragmentRoot getPkgFragmentRoot(String pathString) { IPath path= new Path(pathString); IProject[] projects= ResourcesPlugin.getWorkspace().getRoot().getProjects(); for (int i= 0, max= projects.length; i < max; i++) { try { IProject project = projects[i]; if (!project.isAccessible() || !project.hasNature(JavaCore.NATURE_ID)) continue; IJavaProject javaProject= this.javaModel.getJavaProject(project); IPackageFragmentRoot[] roots= javaProject.getPackageFragmentRoots(); for (int j= 0, rootCount= roots.length; j < rootCount; j++) { PackageFragmentRoot root= (PackageFragmentRoot)roots[j]; if (root.internalPath().isPrefixOf(path) && !Util.isExcluded(path, root.fullInclusionPatternChars(), root.fullExclusionPatternChars(), false)) { return root; } } } catch (CoreException e) { // CoreException from hasNature - should not happen since we check that the project is accessible // JavaModelException from getPackageFragmentRoots - a problem occured while accessing project: nothing we can do, ignore } } return null; }
/** * Returns the package fragment root that contains the given resource path. */ private PackageFragmentRoot getPkgFragmentRoot(String pathString) { IPath path= new Path(pathString); IProject[] projects= ResourcesPlugin.getWorkspace().getRoot().getProjects(); for (int i= 0, max= projects.length; i < max; i++) { try { IProject project = projects[i]; if (!project.isAccessible() || !project.hasNature(JavaCore.NATURE_ID)) continue; IJavaProject javaProject= this.javaModel.getJavaProject(project); IPackageFragmentRoot[] roots= javaProject.getPackageFragmentRoots(); for (int j= 0, rootCount= roots.length; j < rootCount; j++) { PackageFragmentRoot root= (PackageFragmentRoot)roots[j]; if (root.internalPath().isPrefixOf(path) && !Util.isExcluded(path, root.fullInclusionPatternChars(), root.fullExclusionPatternChars(), false)) { return root; } } } catch (CoreException e) { // CoreException from hasNature - should not happen since we check that the project is accessible // JavaModelException from getPackageFragmentRoots - a problem occured while accessing project: nothing we can do, ignore } } return null; }
/** * Returns the package fragment root that contains the given resource path. */ private PackageFragmentRoot getPkgFragmentRoot(String pathString) { IPath path= new Path(pathString); IProject[] projects= ResourcesPlugin.getWorkspace().getRoot().getProjects(); for (int i= 0, max= projects.length; i < max; i++) { try { IProject project = projects[i]; if (!project.isAccessible() || !project.hasNature(JavaCore.NATURE_ID)) continue; IJavaProject javaProject= this.javaModel.getJavaProject(project); IPackageFragmentRoot[] roots= javaProject.getPackageFragmentRoots(); for (int j= 0, rootCount= roots.length; j < rootCount; j++) { PackageFragmentRoot root= (PackageFragmentRoot)roots[j]; if (root.internalPath().isPrefixOf(path) && !Util.isExcluded(path, root.fullInclusionPatternChars(), root.fullExclusionPatternChars(), false)) { return root; } } } catch (CoreException e) { // CoreException from hasNature - should not happen since we check that the project is accessible // JavaModelException from getPackageFragmentRoots - a problem occured while accessing project: nothing we can do, ignore } } return null; }
/** * Returns the package fragment root that contains the given resource path. */ private PackageFragmentRoot getPkgFragmentRoot(String pathString) { IPath path= new Path(pathString); IProject[] projects= ResourcesPlugin.getWorkspace().getRoot().getProjects(); for (int i= 0, max= projects.length; i < max; i++) { try { IProject project = projects[i]; if (!project.isAccessible() || !project.hasNature(JavaCore.NATURE_ID)) continue; IJavaProject javaProject= this.javaModel.getJavaProject(project); IPackageFragmentRoot[] roots= javaProject.getPackageFragmentRoots(); for (int j= 0, rootCount= roots.length; j < rootCount; j++) { PackageFragmentRoot root= (PackageFragmentRoot)roots[j]; if (root.internalPath().isPrefixOf(path) && !Util.isExcluded(path, root.fullInclusionPatternChars(), root.fullExclusionPatternChars(), false)) { return root; } } } catch (CoreException e) { // CoreException from hasNature - should not happen since we check that the project is accessible // JavaModelException from getPackageFragmentRoots - a problem occured while accessing project: nothing we can do, ignore } } return null; }