@Override public IResource getUnderlyingResource(Object element) throws JavaModelException { if (element instanceof IJavaElement) return ((IJavaElement) element).getUnderlyingResource(); else return null; }
public IResource getUnderlyingResource(Object element) throws JavaModelException { if (element instanceof IJavaElement) return ((IJavaElement) element).getUnderlyingResource(); else return null; }
@Override public IResource getUnderlyingResource(Object element) throws JavaModelException { if (element instanceof IJavaElement) return ((IJavaElement) element).getUnderlyingResource(); else return null; }
/** * @see IJavaElement */ public IResource getUnderlyingResource() throws JavaModelException { if (!exists()) throw newNotPresentException(); return getParent().getUnderlyingResource(); } /**
/** * @see IJavaElement */ @Override public IResource getUnderlyingResource() throws JavaModelException { if (!exists()) throw newNotPresentException(); return getParent().getUnderlyingResource(); } /**
/** * @see IJavaElement */ public IResource getUnderlyingResource() throws JavaModelException { if (!exists()) throw newNotPresentException(); return getParent().getUnderlyingResource(); } /**
/** * @see IJavaElement */ public IResource getUnderlyingResource() throws JavaModelException { if (!exists()) throw newNotPresentException(); return getParent().getUnderlyingResource(); } /**
/** * @see IJavaElement */ public IResource getUnderlyingResource() throws JavaModelException { if (!exists()) throw newNotPresentException(); return getParent().getUnderlyingResource(); } /**
/** * @see IJavaElement */ public IResource getUnderlyingResource() throws JavaModelException { if (!exists()) throw newNotPresentException(); return getParent().getUnderlyingResource(); } /**
@Override public boolean encloses(IJavaElement element) { try { IResource underlyingResource = element.getUnderlyingResource(); if (underlyingResource != null && isJarFile(underlyingResource.getName())) { return false; } } catch (JavaModelException e) { JavaCore.getPlugin().getLog().log(e.getStatus()); } return this.searchScope.encloses(element); }
@Override public boolean encloses(IJavaElement element) { try { IResource underlyingResource = element.getUnderlyingResource(); if (underlyingResource != null && isJarFile(underlyingResource.getName())) { return false; } } catch (JavaModelException e) { JavaCore.getPlugin().getLog().log(e.getStatus()); } return this.searchScope.encloses(element); }
/** * Find the first instance of a type, compilation unit, class file or project in the * specified element's parental hierarchy, and use this as the default name. */ private void initializeName(IJavaElement javaElement, ILaunchConfigurationWorkingCopy config) { String name = EMPTY_STRING; try { IResource resource = javaElement.getUnderlyingResource(); if (resource != null) { name = resource.getName(); int index = name.lastIndexOf('.'); if (index > 0) { name = name.substring(0, index); } } else { name= javaElement.getElementName(); } name = getLaunchConfigurationDialog().generateName(name); } catch (JavaModelException jme) {JDIDebugUIPlugin.log(jme);} config.rename(name); }
private void computeRMICJavaTypes(IPackageFragmentRoot root) throws JavaModelException { IJavaElement[] pkgFragments = root.getChildren(); IFile aFile = null; for (int i = 0; i < pkgFragments.length; i++) { IJavaElement[] elements = ((IPackageFragment)pkgFragments[i]).getChildren(); for (int j = 0; j < elements.length; j++) { IJavaElement unit = elements[j]; aFile = (IFile)unit.getUnderlyingResource(); if (isRMICStub(aFile) && isFileForClientJar(aFile)) cacheFile(root, aFile); } } }
IJavaElement je= (IJavaElement)element; try { resource= je.getUnderlyingResource(); } catch (JavaModelException ex) { continue;
IJavaElement je= (IJavaElement)element; try { resource= je.getUnderlyingResource(); } catch (JavaModelException ex) { continue;
try { IResource resource = current.getUnderlyingResource(); if (resource != null) { IProject otherProject = resource.getProject();
try { IResource resource = current.getUnderlyingResource(); if (resource != null) { IProject otherProject = resource.getProject();
this.add(root.getPath().append(new Path(element.getElementName().replace('.', '/'))), false); } else { IResource resource = element.getUnderlyingResource(); if (resource != null && resource.isAccessible()) { this.add(resource.getFullPath(), false);
.getElementAt(offset), id); if (pc != null) { IResource res = pc.getUnderlyingResource(); AJCompilationUnit cu = AJCompilationUnitManager.INSTANCE .getAJCompilationUnit((IFile) res);
resource= je.getUnderlyingResource(); } catch (JavaModelException ex) { addWarning(Messages.format(JarPackagerMessages.JarFileExportOperation_underlyingResourceNotFound, je.getElementName()), ex);