/** * Constructs a new source location that will retrieve source * elements from the given directory. * * @param directory a directory */ public DirectorySourceLocation(File directory) { setDirectory(directory); }
/** * @see JavaSourceLocator#setSourceLocations(IJavaSourceLocation[]) */ public void setSourceLocations(IJavaSourceLocation[] locations) { fSourceLocator.setSourceLocations(locations); }
/** * @see JavaSourceLocator#getSourceLocations() */ public IJavaSourceLocation[] getSourceLocations() { return fSourceLocator.getSourceLocations(); }
/** * Constructs a new JavaSourceLocator that searches the * default set of source locations for the given Java project. * * @param project Java project * @exception CoreException if an exception occurs reading * the classpath of the given or any required project */ public JavaSourceLocator(IJavaProject project) throws CoreException { setSourceLocations(getDefaultSourceLocations(project)); }
/** * Returns the archive associated with this source * location. * * @return zip file * @throws IOException if unable to create the zip * file associated with this location */ protected ZipFile getArchive() throws IOException { return getZipFile(getName()); }
/** * Constructs an empty source locator. */ public JavaUISourceLocator() { fSourceLocator = new JavaSourceLocator(); fAllowedToAsk = true; }
@Override public Object findSourceElement(String name) throws CoreException { if (fRootLocations != null) { for (int i = 0; i < fRootLocations.length; i++) { Object element = fRootLocations[i].findSourceElement(name); if (element != null) { return element; } } } return null; }
/** * Creates a source location on the given package fragment root. * * @param root package fragment root */ public PackageFragmentRootSourceLocation(IPackageFragmentRoot root) { setPackageFragmentRoot(root); }
/** * Constructs a new source location that will retrieve source * elements from the given Java project. * * @param project Java project */ public JavaProjectSourceLocation(IJavaProject project) { setJavaProject(project); }
@Override public void launchesRemoved(ILaunch[] launches) { ArchiveSourceLocation.closeArchives(); }
/** * Constructs a new JavaSourceLocator that searches the * default set of source locations for the given Java project. * * @param project Java project * @exception CoreException if an exception occurs reading * the classpath of the given or any required project */ public JavaSourceLocator(IJavaProject project) throws CoreException { setSourceLocations(getDefaultSourceLocations(project)); }
/** * Returns the archive associated with this source * location. * * @return zip file * @throws IOException if unable to create the zip * file associated with this location */ protected ZipFile getArchive() throws IOException { return getZipFile(getName()); }
/** * Constructs a new JavaSourceLocator that searches the * specified set of source locations for source elements. * * @param locations the source locations to search for * source, in the order they should be searched */ public JavaSourceLocator(IJavaSourceLocation[] locations) { setSourceLocations(locations); }
/** * Constructs a new source location that will retrieve source * elements from the given directory. * * @param directory a directory */ public DirectorySourceLocation(File directory) { setDirectory(directory); }
@Override public Object findSourceElement(String name) throws CoreException { if (fRootLocations != null) { for (int i = 0; i < fRootLocations.length; i++) { Object element = fRootLocations[i].findSourceElement(name); if (element != null) { return element; } } } return null; }
/** * Creates a source location on the given package fragment root. * * @param root package fragment root */ public PackageFragmentRootSourceLocation(IPackageFragmentRoot root) { setPackageFragmentRoot(root); }
/** * Constructs a new source location that will retrieve source * elements from the given Java project. * * @param project Java project */ public JavaProjectSourceLocation(IJavaProject project) { setJavaProject(project); }
/** * Constructs a new JavaSourceLocator that searches the * specified set of source locations for source elements. * * @param locations the source locations to search for * source, in the order they should be searched */ public JavaSourceLocator(IJavaSourceLocation[] locations) { setSourceLocations(locations); }
/** * Constructs a new empty JavaSourceLocator. */ public JavaSourceLocator() { setSourceLocations(new IJavaSourceLocation[0]); }
/** * Constructs a new empty JavaSourceLocator. */ public JavaSourceLocator() { setSourceLocations(new IJavaSourceLocation[0]); }