Example #1
0
 @Override
 public IResource getResource() {
   boolean _equals = Objects.equal(this.file, null);
   if (_equals) {
     IWorkspace _workspace = ResourcesPlugin.getWorkspace();
     IWorkspaceRoot _root = _workspace.getRoot();
     IPath _path = this.getPath();
     final List<IFile> possibleFiles =
         (List<IFile>) Conversions.doWrapArray(_root.findFilesForLocation(_path));
     int _size = possibleFiles.size();
     boolean _equals_1 = (_size == 1);
     if (_equals_1) {
       IFile _head = IterableExtensions.<IFile>head(possibleFiles);
       this.file = _head;
     }
     ErlLogger _instance = ErlLogger.getInstance();
     IPath _path_1 = this.getPath();
     _instance.warn("not able to find file %s", _path_1);
   }
   return this.file;
 }