@Override public boolean visit(IResourceProxy proxy, IProgressMonitor monitor) throws CoreException { if (proxy.getType() == IResource.FILE) { if (DartCore.isHTMLLikeFileName(proxy.getName())) { processHtml((IFile) proxy.requestResource()); } } return true; }
public boolean visit(final IResourceProxy proxy) throws CoreException { if (proxy.getType() == IResource.FILE) { IResource resource = proxy.requestResource(); // TODO need more general approach here String name = resource.getName(); if (!name.equals(".project") && !name.equals(".hsproject")) { // $NON-NLS-1$ //$NON-NLS-2$ resource.delete(IResource.FORCE, null); } } return true; }
public boolean visit(IResourceProxy proxy) throws CoreException { // check validation if (fReporter.isCancelled()) { return false; } if (proxy.getType() == IResource.FILE) { if (Util.isJsType(proxy.getName())) { IFile file = (IFile) proxy.requestResource(); if (file.exists() && shouldValidate(file)) { if (DEBUG) { System.out.println("(+) JSPValidator adding file: " + file.getName()); // $NON-NLS-1$ } fFiles.add(file); // don't search deeper for files return false; } } } return true; }
@Override public boolean visit(IResourceProxy proxy) throws CoreException { try { if (proxy.getType() != IResource.FOLDER && proxy.getType() != IResource.PROJECT) { return false; } IContainer container = (IContainer) proxy.requestResource(); monitor.subTask(container.getProjectRelativePath().toString()); QualifiedName qName = new QualifiedName("org.eclipse.cdt.make", "goals"); // $NON-NLS-1$ //$NON-NLS-2$ String goal = container.getPersistentProperty(qName); if (goal != null) { goal = goal.trim(); IMakeTargetManager manager = MakeCorePlugin.getDefault().getTargetManager(); String[] builder = manager.getTargetBuilders(container.getProject()); IMakeTarget target = manager.createTarget(container.getProject(), goal, builder[0]); target.setBuildAttribute(IMakeTarget.BUILD_TARGET, goal); manager.addTarget(container, target); container.setPersistentProperty(qName, null); } return true; } finally { if (--nextProgress <= 0) { // we have exhausted the current increment, so report progress monitor.worked(1); worked++; if (worked >= halfWay) { // we have passed the current halfway point, so double the // increment and reset the halfway point. currentIncrement *= 2; halfWay += (TOTAL_WORK - halfWay) / 2; } // reset the progress counter to another full increment nextProgress = currentIncrement; } } }