Examples of ISelectionPolicy


Examples of org.eclipse.core.runtime.content.IContentTypeManager.ISelectionPolicy

  IContentType[] findContentTypesFor(ContentTypeMatcher matcher, InputStream contents, String fileName) throws IOException {
    final ILazySource buffer = ContentTypeManager.readBuffer(contents);
    IContentType[] selected = internalFindContentTypesFor(matcher, buffer, fileName, true);
    // give the policy a chance to change the results
    ISelectionPolicy policy = matcher.getPolicy();
    if (policy != null)
      selected = applyPolicy(policy, selected, fileName != null, true);
    return selected;
  }
View Full Code Here

Examples of org.eclipse.core.runtime.content.IContentTypeManager.ISelectionPolicy

  }

  IContentType[] findContentTypesFor(ContentTypeMatcher matcher, final String fileName) {
    IContentType[] selected = concat(internalFindContentTypesFor(matcher, fileName, policyConstantGeneralIsBetter));
    // give the policy a chance to change the results
    ISelectionPolicy policy = matcher.getPolicy();
    if (policy != null)
      selected = applyPolicy(policy, selected, true, false);
    return selected;
  }
View Full Code Here

Examples of org.eclipse.core.runtime.content.IContentTypeManager.ISelectionPolicy

  private IContentDescription getDescriptionFor(ContentTypeMatcher matcher, ILazySource contents, String fileName, QualifiedName[] options) throws IOException {
    IContentType[] selected = internalFindContentTypesFor(matcher, contents, fileName, false);
    if (selected.length == 0)
      return null;
    // give the policy a chance to change the results
    ISelectionPolicy policy = matcher.getPolicy();
    if (policy != null) {
      selected = applyPolicy(policy, selected, fileName != null, true);
      if (selected.length == 0)
        return null;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.