Java Code Examples for org.eclipse.jdt.core.JavaCore#newAccessRule()

The following examples show how to use org.eclipse.jdt.core.JavaCore#newAccessRule() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LibraryClasspathContainerResolverService.java    From google-cloud-eclipse with Apache License 2.0 5 votes vote down vote up
private static IAccessRule[] getAccessRules(List<Filter> filters) {
  IAccessRule[] accessRules = new IAccessRule[filters.size()];
  int idx = 0;
  for (Filter filter : filters) {
    int accessRuleKind =
        filter.isExclude() ? IAccessRule.K_NON_ACCESSIBLE : IAccessRule.K_ACCESSIBLE;
    accessRules[idx++] = JavaCore.newAccessRule(new Path(filter.getPattern()), accessRuleKind);
  }
  return accessRules;
}
 
Example 2
Source File: SerializableAccessRules.java    From google-cloud-eclipse with Apache License 2.0 4 votes vote down vote up
IAccessRule toAccessRule() {
  return JavaCore.newAccessRule(new Path(pattern), ruleKind.kind);
}
 
Example 3
Source File: AccessRuleEntryDialog.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
public IAccessRule getRule() {
	IPath filePattern= new Path(fPattern);
	int kind= fRuleKinds[fRuleKindCombo.getSelectionIndex()];
	return JavaCore.newAccessRule(filePattern, kind);
}