public void updateConfiguration(TextDocumentIdentifier param) { IFile file = JDTUtils.findFile(param.getUri()); if (file == null) { return; } // most likely the handler is invoked intentionally by the user, that's why // we force the update despite no changes of in build descriptor being made projectManager.updateProject(file.getProject(), true); } }
public static boolean isFolder(String uriString) { IFile fakeFile = findFile(uriString); // This may return IFile even when uriString really describes a IContainer IContainer parent = fakeFile == null ? null : fakeFile.getParent(); if (parent == null) { return false; } if (!parent.isSynchronized(DEPTH_ONE)) { try { parent.refreshLocal(DEPTH_ONE, null); } catch (CoreException e) { // Ignore } } return (parent.findMember(fakeFile.getName()) instanceof IFolder); }
return; IResource resource = JDTUtils.isFolder(uriString) ? JDTUtils.findFolder(uriString) : JDTUtils.findFile(uriString); if (resource == null) { return;