public URL getIndexPath() { try { IClasspathEntry entry = ((JavaProject) getParent()).getClasspathEntryFor(getPath()); if (entry != null) return ((ClasspathEntry)entry).getLibraryIndexLocation(); } catch (JavaModelException e) { // ignore exception } return null; }
public URL getIndexPath() { try { IClasspathEntry entry = ((JavaProject) getParent()).getClasspathEntryFor(getPath()); if (entry != null) return ((ClasspathEntry)entry).getLibraryIndexLocation(); } catch (JavaModelException e) { // ignore exception } return null; }
public URL getIndexPath() { try { IClasspathEntry entry = ((JavaProject) getParent()).getClasspathEntryFor(getPath()); if (entry != null) return ((ClasspathEntry)entry).getLibraryIndexLocation(); } catch (JavaModelException e) { // ignore exception } return null; }
public URL getIndexPath() { try { IClasspathEntry entry = ((JavaProject) getParent()).getClasspathEntryFor(getPath()); if (entry != null) return ((ClasspathEntry)entry).getLibraryIndexLocation(); } catch (JavaModelException e) { // ignore exception } return null; }
/** * Returns the root's kind - K_SOURCE or K_BINARY, defaults * to K_SOURCE if it is not on the classpath. * * @exception JavaModelException if the project and root do * not exist. */ protected int determineKind(IResource underlyingResource) throws JavaModelException { IClasspathEntry entry = ((JavaProject)getJavaProject()).getClasspathEntryFor(underlyingResource.getFullPath()); if (entry != null) { return entry.getContentKind(); } return IPackageFragmentRoot.K_SOURCE; }
public URL getIndexPath() { try { IClasspathEntry entry = ((JavaProject) getParent()).getClasspathEntryFor(getPath()); if (entry != null) return ((ClasspathEntry)entry).getLibraryIndexLocation(); } catch (JavaModelException e) { // ignore exception } return null; }
/** * Returns the root's kind - K_SOURCE or K_BINARY, defaults * to K_SOURCE if it is not on the classpath. * * @exception JavaModelException if the project and root do * not exist. */ protected int determineKind(IResource underlyingResource) throws JavaModelException { IClasspathEntry entry = ((JavaProject)getJavaProject()).getClasspathEntryFor(underlyingResource.getFullPath()); if (entry != null) { return entry.getContentKind(); } return IPackageFragmentRoot.K_SOURCE; }
/** * Returns the root's kind - K_SOURCE or K_BINARY, defaults * to K_SOURCE if it is not on the classpath. * * @exception JavaModelException if the project and root do * not exist. */ protected int determineKind(IResource underlyingResource) throws JavaModelException { IClasspathEntry entry = ((JavaProject)getJavaProject()).getClasspathEntryFor(underlyingResource.getFullPath()); if (entry != null) { return entry.getContentKind(); } return IPackageFragmentRoot.K_SOURCE; }
/** * Returns the root's kind - K_SOURCE or K_BINARY, defaults * to K_SOURCE if it is not on the classpath. * * @exception JavaModelException if the project and root do * not exist. */ protected int determineKind(IResource underlyingResource) throws JavaModelException { IClasspathEntry entry = ((JavaProject)getJavaProject()).getClasspathEntryFor(underlyingResource.getFullPath()); if (entry != null) { return entry.getContentKind(); } return IPackageFragmentRoot.K_SOURCE; }
/** * Returns the root's kind - K_SOURCE or K_BINARY, defaults * to K_SOURCE if it is not on the classpath. * * @exception JavaModelException if the project and root do * not exist. */ protected int determineKind(IResource underlyingResource) throws JavaModelException { IClasspathEntry entry = ((JavaProject)getJavaProject()).getClasspathEntryFor(underlyingResource.getFullPath()); if (entry != null) { return entry.getContentKind(); } return IPackageFragmentRoot.K_SOURCE; }
/** * Returns the root's kind - K_SOURCE or K_BINARY, defaults * to K_SOURCE if it is not on the classpath. * * @exception JavaModelException if the project and root do * not exist. */ protected int determineKind(IResource underlyingResource) throws JavaModelException { IClasspathEntry entry = ((JavaProject)getJavaProject()).getClasspathEntryFor(underlyingResource.getFullPath()); if (entry != null) { return entry.getContentKind(); } return IPackageFragmentRoot.K_SOURCE; }
protected IStatus validateOnClasspath() { IPath path = getPath(); try { // check package fragment root on classpath of its project JavaProject project = (JavaProject) getJavaProject(); IClasspathEntry entry = project.getClasspathEntryFor(path); if (entry != null) { return Status.OK_STATUS; } } catch(JavaModelException e){ // could not read classpath, then assume it is outside return e.getJavaModelStatus(); } return new JavaModelStatus(IJavaModelStatusConstants.ELEMENT_NOT_ON_CLASSPATH, this); }
protected IStatus validateOnClasspath() { IPath path = getPath(); try { // check package fragment root on classpath of its project JavaProject project = (JavaProject) getJavaProject(); IClasspathEntry entry = project.getClasspathEntryFor(path); if (entry != null) { return Status.OK_STATUS; } } catch(JavaModelException e){ // could not read classpath, then assume it is outside return e.getJavaModelStatus(); } return new JavaModelStatus(IJavaModelStatusConstants.ELEMENT_NOT_ON_CLASSPATH, this); } /*
@Override SourceMapper createSourceMapper(IPath sourcePath, IPath rootPath) throws JavaModelException { IClasspathEntry entry = ((JavaProject) getParent()).getClasspathEntryFor(getPath()); String encoding = (entry== null) ? null : ((ClasspathEntry) entry).getSourceAttachmentEncoding(); IModule mod = getModule(); String modName = mod == null ? null : new String(mod.name()); SourceMapper mapper = new SourceMapper( sourcePath, rootPath == null ? modName : rootPath.toOSString(), getJavaProject().getOptions(true),// cannot use workspace options if external jar is 1.5 jar and workspace options are 1.4 options encoding); return mapper; } @Override
SourceMapper createSourceMapper(IPath sourcePath, IPath rootPath) throws JavaModelException { IClasspathEntry entry = ((JavaProject) getParent()).getClasspathEntryFor(getPath()); String encoding = (entry== null) ? null : ((ClasspathEntry) entry).getSourceAttachmentEncoding(); IModule mod = getModule(); String modName = mod == null ? null : new String(mod.name()); SourceMapper mapper = new SourceMapper( sourcePath, rootPath == null ? modName : rootPath.toOSString(), getJavaProject().getOptions(true),// cannot use workspace options if external jar is 1.5 jar and workspace options are 1.4 options encoding); return mapper; } public boolean equals(Object o) {
SourceMapper createSourceMapper(IPath sourcePath, IPath rootPath) throws JavaModelException { IClasspathEntry entry = ((JavaProject) getParent()).getClasspathEntryFor(getPath()); String encoding = (entry== null) ? null : ((ClasspathEntry) entry).getSourceAttachmentEncoding(); SourceMapper mapper = new SourceMapper( sourcePath, rootPath == null ? null : rootPath.toOSString(), getJavaProject().getOptions(true),// cannot use workspace options if external jar is 1.5 jar and workspace options are 1.4 options encoding); return mapper; } /*
SourceMapper createSourceMapper(IPath sourcePath, IPath rootPath) throws JavaModelException { IClasspathEntry entry = ((JavaProject) getParent()).getClasspathEntryFor(getPath()); String encoding = (entry== null) ? null : ((ClasspathEntry) entry).getSourceAttachmentEncoding(); SourceMapper mapper = new SourceMapper( sourcePath, rootPath == null ? null : rootPath.toOSString(), getJavaProject().getOptions(true),// cannot use workspace options if external jar is 1.5 jar and workspace options are 1.4 options encoding); return mapper; } /*
SourceMapper createSourceMapper(IPath sourcePath, IPath rootPath) throws JavaModelException { IClasspathEntry entry = ((JavaProject) getParent()).getClasspathEntryFor(getPath()); String encoding = (entry== null) ? null : ((ClasspathEntry) entry).getSourceAttachmentEncoding(); SourceMapper mapper = new SourceMapper( sourcePath, rootPath == null ? null : rootPath.toOSString(), getJavaProject().getOptions(true),// cannot use workspace options if external jar is 1.5 jar and workspace options are 1.4 options encoding); return mapper; } /*
SourceMapper createSourceMapper(IPath sourcePath, IPath rootPath) throws JavaModelException { IClasspathEntry entry = ((JavaProject) getParent()).getClasspathEntryFor(getPath()); String encoding = (entry== null) ? null : ((ClasspathEntry) entry).getSourceAttachmentEncoding(); SourceMapper mapper = new SourceMapper( sourcePath, rootPath == null ? null : rootPath.toOSString(), getJavaProject().getOptions(true),// cannot use workspace options if external jar is 1.5 jar and workspace options are 1.4 options encoding); return mapper; }
SourceMapper createSourceMapper(IPath sourcePath, IPath rootPath) throws JavaModelException { IClasspathEntry entry = ((JavaProject) getParent()).getClasspathEntryFor(getPath()); String encoding = (entry== null) ? null : ((ClasspathEntry) entry).getSourceAttachmentEncoding(); SourceMapper mapper = new SourceMapper( sourcePath, rootPath == null ? null : rootPath.toOSString(), getJavaProject().getOptions(true),// cannot use workspace options if external jar is 1.5 jar and workspace options are 1.4 options encoding); return mapper; } /*