private static int ARI_INCLUDE = (-6);
private static int ARI_RECORD_FIELD_DEF = (-7);
public static ErlSearchScope getSelectionScope(final ISelection selection, final boolean addExternals, final boolean addOtp) throws CoreException {
final ErlSearchScope result = new ErlSearchScope();
final Set<String> externalModulePaths = new HashSet<String>();
if ((selection instanceof IStructuredSelection)) {
List _list = ((IStructuredSelection)selection).toList();
for (final Object obj : _list) {
boolean _matched = false;
if (!_matched) {
if (obj instanceof IResource) {
_matched=true;
SearchCoreUtil.addResourceToScope(result, ((IResource)obj));
}
}
if (!_matched) {
if (obj instanceof IErlModule) {
_matched=true;
result.addModule(((IErlModule)obj));
}
}
if (!_matched) {
if (obj instanceof IErlElement) {
_matched=true;