@Override public ISchedulingRule computeCommitRule() { IResourceRuleFactory factory= ResourcesPlugin.getWorkspace().getRuleFactory(); return factory.modifyRule(fFile); }
/** * Return the workspace rule factory associated with this operation. * * @return the IResourceRuleFactory associated with this operation. */ protected IResourceRuleFactory getWorkspaceRuleFactory() { return getWorkspace().getRuleFactory(); }
private ISchedulingRule computeValidateStateRule(IFileBuffer[] fileBuffers) { ArrayList<IResource> list= new ArrayList<>(); for (IFileBuffer fileBuffer : fileBuffers) { IResource resource= getWorkspaceFile(fileBuffer); if (resource != null) list.add(resource); } IResource[] resources= new IResource[list.size()]; list.toArray(resources); IResourceRuleFactory factory= ResourcesPlugin.getWorkspace().getRuleFactory(); return factory.validateEditRule(resources); }
private ISchedulingRule computeValidateStateRule(IFileBuffer[] fileBuffers) { ArrayList list= new ArrayList(); for (int i= 0; i < fileBuffers.length; i++) { IResource resource= getWorkspaceFile(fileBuffers[i]); if (resource != null) list.add(resource); } IResource[] resources= new IResource[list.size()]; list.toArray(resources); IResourceRuleFactory factory= ResourcesPlugin.getWorkspace().getRuleFactory(); return factory.validateEditRule(resources); }
RefreshJob(){ super(Messages.refreshing_external_folders); // bug 476059: don't interrupt autobuild by using rule and system flag. setSystem(true); IWorkspace workspace = ResourcesPlugin.getWorkspace(); setRule(workspace.getRuleFactory().refreshRule(workspace.getRoot())); this.externalFolders = new LinkedHashSet<>(); }
RefreshJob(Vector externalFolders){ super(Messages.refreshing_external_folders); this.externalFolders = externalFolders; // bug 476059: don't interrupt autobuild by using rule and system flag. setSystem(true); IWorkspace workspace = ResourcesPlugin.getWorkspace(); setRule(workspace.getRuleFactory().refreshRule(workspace.getRoot())); }
@Override protected ISchedulingRule getSchedulingRule() { if (this.elementsToProcess != null && this.elementsToProcess.length == 1) { IResource resource = this.elementsToProcess[0].getResource(); if (resource != null) return ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(resource); } return super.getSchedulingRule(); } /**
protected ISchedulingRule getSchedulingRule() { if (this.elementsToProcess != null && this.elementsToProcess.length == 1) { IResource resource = this.elementsToProcess[0].getResource(); if (resource != null) return ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(resource); } return super.getSchedulingRule(); } /**
public ISchedulingRule getSchedulingRule() { Set projs = gatherDependentProjects(getComponent(), new HashSet()); ISchedulingRule combinedRule = null; IResourceRuleFactory ruleFactory = ResourcesPlugin.getWorkspace().getRuleFactory(); for (Iterator iter = projs.iterator(); iter.hasNext();) { IProject proj = (IProject) iter.next(); ISchedulingRule rule = ruleFactory.createRule(proj); combinedRule = MultiRule.combine(rule, combinedRule); } combinedRule = MultiRule.combine(ruleFactory.buildRule(), combinedRule); return combinedRule; }
protected ISchedulingRule getSchedulingRule() { IResource resource = getElementToProcess().getResource(); if (resource == null) return null; IWorkspace workspace = resource.getWorkspace(); if (resource.exists()) { return workspace.getRuleFactory().modifyRule(resource); } else { return workspace.getRuleFactory().createRule(resource); } } /**
protected ISchedulingRule getSchedulingRule() { IResource resource = getElementToProcess().getResource(); if (resource == null) return null; IWorkspace workspace = resource.getWorkspace(); if (resource.exists()) { return workspace.getRuleFactory().modifyRule(resource); } else { return workspace.getRuleFactory().createRule(resource); } } /**
private void run(ReplaceOperation operation, IResource resource) throws InvocationTargetException, InterruptedException { IResourceRuleFactory ruleFactory = ResourcesPlugin.getWorkspace().getRuleFactory(); ISchedulingRule rule= ruleFactory.modifyRule(resource); PlatformUI.getWorkbench().getProgressService().runInUI(this, operation, rule); }
@Override protected ISchedulingRule getSchedulingRule() { if (this.pkgName.length == 0) return null; // no resource is going to be created IResource parentResource = ((JavaElement) getParentElement()).resource(); IResource resource = ((IContainer) parentResource).getFolder(new Path(this.pkgName[0])); return resource.getWorkspace().getRuleFactory().createRule(resource); } /**
protected ISchedulingRule getSchedulingRule() { if (this.pkgName.length == 0) return null; // no resource is going to be created IResource parentResource = ((JavaElement) getParentElement()).resource(); IResource resource = ((IContainer) parentResource).getFolder(new Path(this.pkgName[0])); return resource.getWorkspace().getRuleFactory().createRule(resource); } /**
protected ISchedulingRule getSchedulingRule() { if (this.pkgName.length == 0) return null; // no resource is going to be created IResource parentResource = ((JavaElement) getParentElement()).resource(); IResource resource = ((IContainer) parentResource).getFolder(new Path(this.pkgName[0])); return resource.getWorkspace().getRuleFactory().createRule(resource); } /**
protected ISchedulingRule getSchedulingRule() { IResource resource = getCompilationUnit().getResource(); IWorkspace workspace = resource.getWorkspace(); return workspace.getRuleFactory().modifyRule(resource); } /**
protected ISchedulingRule getSchedulingRule() { IResource resource = getCompilationUnit().getResource(); IWorkspace workspace = resource.getWorkspace(); return workspace.getRuleFactory().modifyRule(resource); } /**
protected ISchedulingRule getSchedulingRule() { if (this.canChangeResources) { IResourceRuleFactory ruleFactory = ResourcesPlugin.getWorkspace().getRuleFactory(); return new MultiRule(new ISchedulingRule[] { // use project modification rule as this is needed to create the .classpath file if it doesn't exist yet, or to update project references ruleFactory.modifyRule(this.project.getProject()), // and external project modification rule in case the external folders are modified ruleFactory.modifyRule(JavaModelManager.getExternalManager().getExternalFoldersProject()) }); } return super.getSchedulingRule(); }
protected ISchedulingRule getSchedulingRule() { if (this.canChangeResources) { IResourceRuleFactory ruleFactory = ResourcesPlugin.getWorkspace().getRuleFactory(); return new MultiRule(new ISchedulingRule[] { // use project modification rule as this is needed to create the .classpath file if it doesn't exist yet, or to update project references ruleFactory.modifyRule(this.project.getProject()), // and external project modification rule in case the external folders are modified ruleFactory.modifyRule(JavaModelManager.getExternalManager().getExternalFoldersProject()) }); } return super.getSchedulingRule(); }
protected ISchedulingRule getSchedulingRule() { if (this.canChangeResources) { IResourceRuleFactory ruleFactory = ResourcesPlugin.getWorkspace().getRuleFactory(); return new MultiRule(new ISchedulingRule[] { // use project modification rule as this is needed to create the .classpath file if it doesn't exist yet, or to update project references ruleFactory.modifyRule(this.project.getProject()), // and external project modification rule in case the external folders are modified ruleFactory.modifyRule(JavaModelManager.getExternalManager().getExternalFoldersProject()) }); } return super.getSchedulingRule(); }