title: Get IStorage from externaly created file in Eclipse
body: <p>I`m currently developing an editor plug-in in Eclipse Neon. Everything works perfectly except from opening files with the editor, which were not created inside of the current Eclipse project but manually in a folder outside of the workspace (e.g. Documents). </p>
  
  <p>In my implementation, I need the <code>IStorage</code> of every file I want to open. My current code looks like this:</p>
  
  <pre><code>public static IStorage getStorage(IEditorInput editorInput) {
      if (editorInput instanceof IStorageEditorInput) {
        try {
          return ((IStorageEditorInput) editorInput).getStorage();
        }
        catch (CoreException e) {
          throw new RuntimeException(e);
        }
      }
      else if (editorInput instanceof FileStoreEditorInput) {
        try {
          IURIEditorInput uriInput = (IURIEditorInput)editorInput;
          URI uri = uriInput.getURI();
          File file = new File(uri);
          return ((IStorageEditorInput) editorInput).getStorage(); // How to get the IStorage
        }
        catch (CoreException e) {
          throw new RuntimeException(e);
        }
      }
      else {
        throw new IllegalArgumentException("Unknown IEditorInput implementation");
      }
    }
  </code></pre>
  
  <p>The important case is if the <code>editorInput</code> is an instance of <code>FileStoreEditorInput</code>, which is handled in the second if. Currently, I get a file out of it, but I don't know how to get the <code>IStorage</code> from the file or from the <code>FileStoreEditorInput</code> itself.</p>