/** * Returns whether the corresponding resource or associated file exists */ protected boolean resourceExists(IResource underlyingResource) { return underlyingResource.isAccessible(); }
/** * Returns whether the corresponding resource or associated file exists */ protected boolean resourceExists(IResource underlyingResource) { return underlyingResource.isAccessible(); }
/** * Returns whether the corresponding resource or associated file exists */ protected boolean resourceExists(IResource underlyingResource) { return underlyingResource.isAccessible(); }
/** * Returns whether the corresponding resource or associated file exists */ protected boolean resourceExists(IResource underlyingResource) { return underlyingResource.isAccessible(); }
public static boolean isRenameAvailable(final IResource resource) { if (resource == null) { return false; } if (!resource.exists()) { return false; } if (!resource.isAccessible()) { return false; } return true; }
public static boolean isRenameAvailable(final IResource resource) { if (resource == null) return false; if (!resource.exists()) return false; if (!resource.isAccessible()) return false; return true; }
/** * @since 2.3 */ public IMarker[] findDerivedResourceMarkers(IResource file) throws CoreException { if (!file.isAccessible()) return new IMarker[0]; return file.findMarkers(MARKER_ID, true, IResource.DEPTH_INFINITE); }
protected static Set<IResource> cleanCopy(Set<IResource> resources) { if (resources == null) { return Collections.emptySet(); } Set<IResource> cleanSet = new LinkedHashSet<>(resources.size()); for (IResource r : resources) { if (r != null && r.isAccessible() && !existsParentIn(resources, r)) { cleanSet.add(r); } } return cleanSet; }
public static boolean isRenameAvailable(final IResource resource) { if (resource == null) return false; if (!resource.exists()) return false; if (!resource.isAccessible()) return false; return true; }
@Override public boolean isApplicable() { if (fResource == null) return false; if (!fResource.exists()) return false; if (!fResource.isAccessible()) return false; return true; }
@Override public boolean isApplicable() { if (fResource == null) return false; if (!fResource.exists()) return false; if (!fResource.isAccessible()) return false; return true; }
private static ICompilationUnit getCompilationUnit(IMarker marker) { IResource res= marker.getResource(); if (res instanceof IFile && res.isAccessible()) { IJavaElement element= JavaCore.create((IFile) res); if (element instanceof ICompilationUnit) return (ICompilationUnit) element; } return null; }
protected boolean acceptType(IType candidate) { final IResource resource = candidate.getResource(); if (resource == null || !resource.isAccessible()) { return false; // exclude binary types } if (selection().isEmpty()) { return true; // not limited to resources: accept all } return isInResources(resource); }
@Override public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException { for (IMarker marker : markers) { if (marker.exists() && marker.getResource().isAccessible()) { marker.setAttribute(IMarker.SEVERITY, newSeverity); } } return Status.OK_STATUS; }
/** Replies if the given resource could be considered for discovering an agent to be launched. * * @param resource the resource. * @return {@code true} if the resource could be explored. */ @SuppressWarnings("static-method") protected boolean isValidResource(IResource resource) { return resource.isAccessible() && !resource.isHidden() && !resource.isPhantom() && !resource.isDerived(); }
protected IFile getFile(JavaClass clazz) { // Not in the current project, so check the IType's project IType type = getType(clazz); if (type == null) { return null; } IResource resource = type.getResource(); if (resource != null && resource.getType() == IResource.FILE && resource.isAccessible()) return (IFile) resource; return null; }
private boolean shouldValidate(IFile file) { IResource resource = file; do { if (resource.isDerived() || resource.isTeamPrivateMember() || !resource.isAccessible() || resource.getName().charAt(0) == '.') { return false; } resource = resource.getParent(); } while ((resource.getType() & IResource.PROJECT) == 0); return true; }
private boolean hasChildrenInScope(ISynchronizationScope scope, Object object, IResource resource) { if (!resource.isAccessible()) return false; IResource[] roots = scope.getRoots(); for (int i = 0; i < roots.length; i++) { IResource root = roots[i]; if (resource.getFullPath().isPrefixOf(root.getFullPath())) return true; } return false; }
private boolean hasChildrenInScope(ISynchronizationScope scope, Object object, IResource resource) { if (!resource.isAccessible()) return false; IResource[] roots = scope.getRoots(); for (int i = 0; i < roots.length; i++) { IResource root = roots[i]; if (resource.getFullPath().isPrefixOf(root.getFullPath())) return true; } return false; }
protected ITypeHierarchy createRegionHierarchy(SubMonitor monitor) throws JavaModelException { IRegion region = JavaCore.newRegion(); for (IResource r : selection()) { if (r != null && r.isAccessible()) { IJavaElement element = JavaCore.create(r); if (S2eUtils.exists(element)) { region.add(element); } } } return JavaCore.newTypeHierarchy(region, null, monitor); }