Java 类org.eclipse.core.runtime.jobs.MultiRule 实例源码

项目:subclipse    文件:RepositoryProviderOperation.java   
/**
 * Retgurn the scheduling rule to be obtained before work
 * begins on the given provider. By default, it is the provider's project.
 * This can be changed by subclasses.
 * @param provider
 * @return
 */
protected ISchedulingRule getSchedulingRule(SVNTeamProvider provider) {
    IResourceRuleFactory ruleFactory = provider.getRuleFactory();
    HashSet rules = new HashSet();
    IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
    for (int i = 0; i < resources.length; i++) {            
        IResource[] pathResources = SVNWorkspaceRoot.getResourcesFor(new Path(resources[i].getLocation().toOSString()), false);
        for (IResource pathResource : pathResources) {
            IProject resourceProject = pathResource.getProject();               
            rules.add(ruleFactory.modifyRule(resourceProject));
            if (resourceProject.getLocation() != null) {
                // Add nested projects
                for (IProject project : projects) {
                    if (project.getLocation() != null) {
                        if (!project.getLocation().equals(resourceProject.getLocation()) && resourceProject.getLocation().isPrefixOf(project.getLocation())) {
                            rules.add(ruleFactory.modifyRule(project));
                        }
                    }
                }   
            }
        }
    }
    return MultiRule.combine((ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules.size()]));
}
项目:tlaplus    文件:ResourceHelper.java   
/**
 * Retrieves a combined rule for modifying the resources
 * @param resources set of resources
 * @return a combined rule
 */
public static ISchedulingRule getModifyRule(IResource[] resources)
{
    if (resources == null)
    {
        return null;
    }
    ISchedulingRule combinedRule = null;
    IResourceRuleFactory ruleFactory = ResourcesPlugin.getWorkspace().getRuleFactory();
    for (int i = 0; i < resources.length; i++)
    {
        // if one of the resources does not exist
        // something is screwed up
        if (resources[i] == null || !resources[i].exists())
        {
            return null;
        }
        ISchedulingRule rule = ruleFactory.modifyRule(resources[i]);
        combinedRule = MultiRule.combine(rule, combinedRule);
    }
    return combinedRule;
}
项目:tlaplus    文件:ResourceHelper.java   
/**
 * Retrieves a combined rule for deleting resource
 * @param resource
 * @return
 */
public static ISchedulingRule getDeleteRule(IResource[] resources)
{
    if (resources == null)
    {
        return null;
    }
    ISchedulingRule combinedRule = null;
    IResourceRuleFactory ruleFactory = ResourcesPlugin.getWorkspace().getRuleFactory();
    for (int i = 0; i < resources.length; i++)
    {
        ISchedulingRule rule = ruleFactory.deleteRule(resources[i]);
        combinedRule = MultiRule.combine(rule, combinedRule);
    }
    return combinedRule;
}
项目:tlaplus    文件:ResourceHelper.java   
/**
 * Retrieves a combined rule for creating resource
 * @param resource
 * @return
 */
public static ISchedulingRule getCreateRule(IResource[] resources)
{
    if (resources == null)
    {
        return null;
    }
    ISchedulingRule combinedRule = null;
    IResourceRuleFactory ruleFactory = ResourcesPlugin.getWorkspace().getRuleFactory();
    for (int i = 0; i < resources.length; i++)
    {
        ISchedulingRule rule = ruleFactory.createRule(resources[i]);
        combinedRule = MultiRule.combine(rule, combinedRule);
    }
    return combinedRule;
}
项目:xtext-gef    文件:StatemachineDocumentProvider.java   
/**
 * @generated
 */
protected ISchedulingRule getResetRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
        for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it
                .hasNext();) {
            Resource nextResource = it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(ResourcesPlugin.getWorkspace().getRuleFactory()
                        .modifyRule(file));
            }
        }
        return new MultiRule(
                (ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules
                        .size()]));
    }
    return null;
}
项目:xtext-gef    文件:StatemachineDocumentProvider.java   
/**
 * @generated
 */
protected ISchedulingRule getSaveRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
        for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it
                .hasNext();) {
            Resource nextResource = it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(computeSchedulingRule(file));
            }
        }
        return new MultiRule(
                (ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules
                        .size()]));
    }
    return null;
}
项目:xtext-gef    文件:StatemachineDocumentProvider.java   
/**
 * @generated
 */
protected ISchedulingRule getSynchronizeRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
        for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it
                .hasNext();) {
            Resource nextResource = it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(ResourcesPlugin.getWorkspace().getRuleFactory()
                        .refreshRule(file));
            }
        }
        return new MultiRule(
                (ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules
                        .size()]));
    }
    return null;
}
项目:che    文件:Rules.java   
/** Combines rules for each parameter to validateEdit from the corresponding rule factories. */
public ISchedulingRule validateEditRule(IResource[] resources) {
  if (resources.length == 0) return null;
  // optimize rule for single file
  if (resources.length == 1) {
    if (resources[0].getType() == IResource.ROOT) return root;
    return factoryFor(resources[0]).validateEditRule(resources);
  }
  // gather rules for each resource from appropriate factory
  HashSet<ISchedulingRule> rules = new HashSet<ISchedulingRule>();
  IResource[] oneResource = new IResource[1];
  for (int i = 0; i < resources.length; i++) {
    if (resources[i].getType() == IResource.ROOT) return root;
    oneResource[0] = resources[i];
    ISchedulingRule rule = factoryFor(resources[i]).validateEditRule(oneResource);
    if (rule != null) rules.add(rule);
  }
  if (rules.isEmpty()) return null;
  if (rules.size() == 1) return rules.iterator().next();
  ISchedulingRule[] ruleArray = rules.toArray(new ISchedulingRule[rules.size()]);
  return new MultiRule(ruleArray);
}
项目:che    文件:Resource.java   
@Override
public boolean contains(ISchedulingRule rule) {
  if (this == rule) return true;
  // must allow notifications to nest in all resource rules
  if (rule.getClass().equals(WorkManager.NotifyRule.class)) return true;
  if (rule instanceof MultiRule) {
    MultiRule multi = (MultiRule) rule;
    ISchedulingRule[] children = multi.getChildren();
    for (int i = 0; i < children.length; i++) if (!contains(children[i])) return false;
    return true;
  }
  if (!(rule instanceof IResource)) return false;
  IResource resource = (IResource) rule;
  if (!workspace.equals(resource.getWorkspace())) return false;
  return path.isPrefixOf(resource.getFullPath());
}
项目:che    文件:Resource.java   
@Override
public boolean isConflicting(ISchedulingRule rule) {
  if (this == rule) return true;
  // must not schedule at same time as notification
  if (rule.getClass().equals(WorkManager.NotifyRule.class)) return true;
  if (rule instanceof MultiRule) {
    MultiRule multi = (MultiRule) rule;
    ISchedulingRule[] children = multi.getChildren();
    for (int i = 0; i < children.length; i++) if (isConflicting(children[i])) return true;
    return false;
  }
  if (!(rule instanceof IResource)) return false;
  IResource resource = (IResource) rule;
  if (!workspace.equals(resource.getWorkspace())) return false;
  IPath otherPath = resource.getFullPath();
  return path.isPrefixOf(otherPath) || otherPath.isPrefixOf(path);
}
项目:che    文件:Rules.java   
/** Combines rules for each parameter to validateEdit from the corresponding rule factories. */
public ISchedulingRule validateEditRule(IResource[] resources) {
  if (resources.length == 0) return null;
  // optimize rule for single file
  if (resources.length == 1) {
    if (resources[0].getType() == IResource.ROOT) return root;
    return factoryFor(resources[0]).validateEditRule(resources);
  }
  // gather rules for each resource from appropriate factory
  HashSet<ISchedulingRule> rules = new HashSet<ISchedulingRule>();
  IResource[] oneResource = new IResource[1];
  for (int i = 0; i < resources.length; i++) {
    if (resources[i].getType() == IResource.ROOT) return root;
    oneResource[0] = resources[i];
    ISchedulingRule rule = factoryFor(resources[i]).validateEditRule(oneResource);
    if (rule != null) rules.add(rule);
  }
  if (rules.isEmpty()) return null;
  if (rules.size() == 1) return rules.iterator().next();
  ISchedulingRule[] ruleArray = rules.toArray(new ISchedulingRule[rules.size()]);
  return new MultiRule(ruleArray);
}
项目:APICloud-Studio    文件:RepositoryProviderOperation.java   
/**
 * Retgurn the scheduling rule to be obtained before work
 * begins on the given provider. By default, it is the provider's project.
 * This can be changed by subclasses.
 * @param provider
 * @return
 */
protected ISchedulingRule getSchedulingRule(SVNTeamProvider provider) {
    IResourceRuleFactory ruleFactory = provider.getRuleFactory();
    HashSet rules = new HashSet();
    IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
    for (int i = 0; i < resources.length; i++) {            
        IResource[] pathResources = SVNWorkspaceRoot.getResourcesFor(new Path(resources[i].getLocation().toOSString()), false);
        for (IResource pathResource : pathResources) {
            IProject resourceProject = pathResource.getProject();               
            rules.add(ruleFactory.modifyRule(resourceProject));
            if (resourceProject.getLocation() != null) {
                // Add nested projects
                for (IProject project : projects) {
                    if (project.getLocation() != null) {
                        if (!project.getLocation().equals(resourceProject.getLocation()) && resourceProject.getLocation().isPrefixOf(project.getLocation())) {
                            rules.add(ruleFactory.modifyRule(project));
                        }
                    }
                }   
            }
        }
    }
    return MultiRule.combine((ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules.size()]));
}
项目:Eclipse-Postfix-Code-Completion    文件:CopyResourceElementsOperation.java   
protected ISchedulingRule getSchedulingRule() {
    if (this.elementsToProcess == null)
        return null;
    int length = this.elementsToProcess.length;
    if (length == 1)
        return getSchedulingRule(this.elementsToProcess[0]);
    ISchedulingRule[] rules = new ISchedulingRule[length];
    int index = 0;
    for (int i = 0; i < length; i++) {
        ISchedulingRule rule = getSchedulingRule(this.elementsToProcess[i]);
        if (rule != null) {
            rules[index++] = rule;
        }
    }
    if (index != length)
        System.arraycopy(rules, 0, rules = new ISchedulingRule[index], 0, index);
    return new MultiRule(rules);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:CopyResourceElementsOperation.java   
protected ISchedulingRule getSchedulingRule() {
    if (this.elementsToProcess == null)
        return null;
    int length = this.elementsToProcess.length;
    if (length == 1)
        return getSchedulingRule(this.elementsToProcess[0]);
    ISchedulingRule[] rules = new ISchedulingRule[length];
    int index = 0;
    for (int i = 0; i < length; i++) {
        ISchedulingRule rule = getSchedulingRule(this.elementsToProcess[i]);
        if (rule != null) {
            rules[index++] = rule;
        }
    }
    if (index != length)
        System.arraycopy(rules, 0, rules = new ISchedulingRule[index], 0, index);
    return new MultiRule(rules);
}
项目:ROADDesigner    文件:SmcDocumentProvider.java   
/**
 * @generated
 */
protected ISchedulingRule getResetRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        Collection/*<org.eclipse.core.runtime.jobs.ISchedulingRule>*/rules = new ArrayList/*<org.eclipse.core.runtime.jobs.ISchedulingRule>*/();
        for (Iterator/*<org.eclipse.emf.ecore.resource.Resource>*/it = info
                .getLoadedResourcesIterator(); it.hasNext();) {
            Resource nextResource = (Resource) it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(ResourcesPlugin.getWorkspace().getRuleFactory()
                        .modifyRule(file));
            }
        }
        return new MultiRule((ISchedulingRule[]) rules
                .toArray(new ISchedulingRule[rules.size()]));
    }
    return null;
}
项目:ROADDesigner    文件:SmcDocumentProvider.java   
/**
 * @generated
 */
protected ISchedulingRule getSaveRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        Collection/*<org.eclipse.core.runtime.jobs.ISchedulingRule>*/rules = new ArrayList/*<org.eclipse.core.runtime.jobs.ISchedulingRule>*/();
        for (Iterator/*<org.eclipse.emf.ecore.resource.Resource>*/it = info
                .getLoadedResourcesIterator(); it.hasNext();) {
            Resource nextResource = (Resource) it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(computeSchedulingRule(file));
            }
        }
        return new MultiRule((ISchedulingRule[]) rules
                .toArray(new ISchedulingRule[rules.size()]));
    }
    return null;
}
项目:ROADDesigner    文件:SmcDocumentProvider.java   
/**
 * @generated
 */
protected ISchedulingRule getSynchronizeRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        Collection/*<org.eclipse.core.runtime.jobs.ISchedulingRule>*/rules = new ArrayList/*<org.eclipse.core.runtime.jobs.ISchedulingRule>*/();
        for (Iterator/*<org.eclipse.emf.ecore.resource.Resource>*/it = info
                .getLoadedResourcesIterator(); it.hasNext();) {
            Resource nextResource = (Resource) it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(ResourcesPlugin.getWorkspace().getRuleFactory()
                        .refreshRule(file));
            }
        }
        return new MultiRule((ISchedulingRule[]) rules
                .toArray(new ISchedulingRule[rules.size()]));
    }
    return null;
}
项目:HelloBrazil    文件:Wc2014DocumentProvider.java   
/**
 * @generated
 */
protected ISchedulingRule getResetRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
        for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it
                .hasNext();) {
            Resource nextResource = it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(ResourcesPlugin.getWorkspace().getRuleFactory()
                        .modifyRule(file));
            }
        }
        return new MultiRule(
                (ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules
                        .size()]));
    }
    return null;
}
项目:HelloBrazil    文件:Wc2014DocumentProvider.java   
/**
 * @generated
 */
protected ISchedulingRule getSaveRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
        for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it
                .hasNext();) {
            Resource nextResource = it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(computeSchedulingRule(file));
            }
        }
        return new MultiRule(
                (ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules
                        .size()]));
    }
    return null;
}
项目:HelloBrazil    文件:Wc2014DocumentProvider.java   
/**
 * @generated
 */
protected ISchedulingRule getSynchronizeRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
        for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it
                .hasNext();) {
            Resource nextResource = it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(ResourcesPlugin.getWorkspace().getRuleFactory()
                        .refreshRule(file));
            }
        }
        return new MultiRule(
                (ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules
                        .size()]));
    }
    return null;
}
项目:simplified-bpmn-example    文件:SimpleBPMNDocumentProvider.java   
/**
 * @generated
 */
protected ISchedulingRule getResetRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
        for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it
                .hasNext();) {
            Resource nextResource = it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(ResourcesPlugin.getWorkspace().getRuleFactory()
                        .modifyRule(file));
            }
        }
        return new MultiRule(
                (ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules
                        .size()]));
    }
    return null;
}
项目:simplified-bpmn-example    文件:SimpleBPMNDocumentProvider.java   
/**
 * @generated
 */
protected ISchedulingRule getSaveRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
        for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it
                .hasNext();) {
            Resource nextResource = it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(computeSchedulingRule(file));
            }
        }
        return new MultiRule(
                (ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules
                        .size()]));
    }
    return null;
}
项目:simplified-bpmn-example    文件:SimpleBPMNDocumentProvider.java   
/**
 * @generated
 */
protected ISchedulingRule getSynchronizeRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
        for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it
                .hasNext();) {
            Resource nextResource = it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(ResourcesPlugin.getWorkspace().getRuleFactory()
                        .refreshRule(file));
            }
        }
        return new MultiRule(
                (ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules
                        .size()]));
    }
    return null;
}
项目:MMINT    文件:ICSE15_SequenceDiagram_MAVODocumentProvider.java   
/**
* @generated
*/
protected ISchedulingRule getResetRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
        for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
            Resource nextResource = it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(file));
            }
        }
        return new MultiRule((ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules.size()]));
    }
    return null;
}
项目:MMINT    文件:ICSE15_SequenceDiagram_MAVODocumentProvider.java   
/**
* @generated
*/
protected ISchedulingRule getSaveRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
        for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
            Resource nextResource = it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(computeSchedulingRule(file));
            }
        }
        return new MultiRule((ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules.size()]));
    }
    return null;
}
项目:MMINT    文件:ICSE15_SequenceDiagram_MAVODocumentProvider.java   
/**
* @generated
*/
protected ISchedulingRule getSynchronizeRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
        for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
            Resource nextResource = it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(ResourcesPlugin.getWorkspace().getRuleFactory().refreshRule(file));
            }
        }
        return new MultiRule((ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules.size()]));
    }
    return null;
}
项目:MMINT    文件:NECSIS14_ClassDiagramDocumentProvider.java   
/**
 * @generated
 */
protected ISchedulingRule getResetRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
        for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it
                .hasNext();) {
            Resource nextResource = it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(ResourcesPlugin.getWorkspace().getRuleFactory()
                        .modifyRule(file));
            }
        }
        return new MultiRule(
                (ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules
                        .size()]));
    }
    return null;
}
项目:MMINT    文件:NECSIS14_ClassDiagramDocumentProvider.java   
/**
 * @generated
 */
protected ISchedulingRule getSaveRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
        for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it
                .hasNext();) {
            Resource nextResource = it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(computeSchedulingRule(file));
            }
        }
        return new MultiRule(
                (ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules
                        .size()]));
    }
    return null;
}
项目:MMINT    文件:NECSIS14_ClassDiagramDocumentProvider.java   
/**
 * @generated
 */
protected ISchedulingRule getSynchronizeRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
        for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it
                .hasNext();) {
            Resource nextResource = it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(ResourcesPlugin.getWorkspace().getRuleFactory()
                        .refreshRule(file));
            }
        }
        return new MultiRule(
                (ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules
                        .size()]));
    }
    return null;
}
项目:MMINT    文件:NECSIS14_DatabaseSchemaDocumentProvider.java   
/**
 * @generated
 */
protected ISchedulingRule getResetRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
        for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it
                .hasNext();) {
            Resource nextResource = it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(ResourcesPlugin.getWorkspace().getRuleFactory()
                        .modifyRule(file));
            }
        }
        return new MultiRule(
                (ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules
                        .size()]));
    }
    return null;
}
项目:MMINT    文件:NECSIS14_DatabaseSchemaDocumentProvider.java   
/**
 * @generated
 */
protected ISchedulingRule getSaveRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
        for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it
                .hasNext();) {
            Resource nextResource = it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(computeSchedulingRule(file));
            }
        }
        return new MultiRule(
                (ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules
                        .size()]));
    }
    return null;
}
项目:MMINT    文件:NECSIS14_DatabaseSchemaDocumentProvider.java   
/**
 * @generated
 */
protected ISchedulingRule getSynchronizeRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
        for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it
                .hasNext();) {
            Resource nextResource = it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(ResourcesPlugin.getWorkspace().getRuleFactory()
                        .refreshRule(file));
            }
        }
        return new MultiRule(
                (ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules
                        .size()]));
    }
    return null;
}
项目:MMINT    文件:MIDDocumentProvider.java   
/**
 * @generated
 */
protected ISchedulingRule getResetRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
        for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
            Resource nextResource = it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(file));
            }
        }
        return new MultiRule((ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules.size()]));
    }
    return null;
}
项目:MMINT    文件:MIDDocumentProvider.java   
/**
 * @generated
 */
protected ISchedulingRule getSaveRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
        for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
            Resource nextResource = it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(computeSchedulingRule(file));
            }
        }
        return new MultiRule((ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules.size()]));
    }
    return null;
}
项目:MMINT    文件:MIDDocumentProvider.java   
/**
 * @generated
 */
protected ISchedulingRule getSynchronizeRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
        for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
            Resource nextResource = it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(ResourcesPlugin.getWorkspace().getRuleFactory().refreshRule(file));
            }
        }
        return new MultiRule((ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules.size()]));
    }
    return null;
}
项目:MMINT    文件:MIDDocumentProvider.java   
/**
* @generated
*/
protected ISchedulingRule getResetRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
        for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
            Resource nextResource = it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(file));
            }
        }
        return new MultiRule((ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules.size()]));
    }
    return null;
}
项目:MMINT    文件:MIDDocumentProvider.java   
/**
* @generated
*/
protected ISchedulingRule getSaveRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
        for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
            Resource nextResource = it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(computeSchedulingRule(file));
            }
        }
        return new MultiRule((ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules.size()]));
    }
    return null;
}
项目:MMINT    文件:MIDDocumentProvider.java   
/**
* @generated
*/
protected ISchedulingRule getSynchronizeRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
        for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
            Resource nextResource = it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(ResourcesPlugin.getWorkspace().getRuleFactory().refreshRule(file));
            }
        }
        return new MultiRule((ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules.size()]));
    }
    return null;
}
项目:MMINT    文件:RelationalDatabase_MAVODocumentProvider.java   
/**
* @generated
*/
protected ISchedulingRule getResetRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
        for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
            Resource nextResource = it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(file));
            }
        }
        return new MultiRule((ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules.size()]));
    }
    return null;
}
项目:MMINT    文件:RelationalDatabase_MAVODocumentProvider.java   
/**
* @generated
*/
protected ISchedulingRule getSaveRule(Object element) {
    ResourceSetInfo info = getResourceSetInfo(element);
    if (info != null) {
        LinkedList<ISchedulingRule> rules = new LinkedList<ISchedulingRule>();
        for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
            Resource nextResource = it.next();
            IFile file = WorkspaceSynchronizer.getFile(nextResource);
            if (file != null) {
                rules.add(computeSchedulingRule(file));
            }
        }
        return new MultiRule((ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules.size()]));
    }
    return null;
}