Summary: | Provide a way to make external files writable | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Marko Tomljenovic <marko.tomljenovic> |
Component: | Text | Assignee: | Platform-Text-Inbox <platform-text-inbox> |
Status: | ASSIGNED --- | QA Contact: | |
Severity: | enhancement | ||
Priority: | P3 | CC: | daniel_megert, markus.kell.r, prakash, pwebster |
Version: | 3.7 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: |
Description
Marko Tomljenovic
2011-06-17 07:23:20 EDT
I guess this goes to Platform Text. Please move back if not. The following classes are used when an external file is opened in Eclipse: 1. OpenLocalFileAction.run() (when a file is opened using the File->Open menu) 2. EditorAreaDropAdapter.asyncDrop() (when a file is dnded on the editor area) Both are calling IDE.openEditorOnFileStore() Maybe before opening the file a dialog could be shown where the user can decide to make the files writable before opening them. > Maybe before opening the file a dialog could be shown where the user can decide
> to make the files writable before opening them.
Better workflow is to only ask when the user actually tries to modify the document (like with read-only internal files).
(In reply to comment #3) > > Maybe before opening the file a dialog could be shown where the user can decide > > to make the files writable before opening them. > > Better workflow is to only ask when the user actually tries to modify the > document (like with read-only internal files). You are right. But this has to be implemented by each editor (base class). The first solution is independent of any editor type. And normally does a user know whether he wants to edit a file before opening it. After digging inside the code your proposed solution will become quite complex to realise since the read-only check is done by the DefaultUIFileModificationValidator class. And this class (its super class FileModificationValidator) is used in a lot of places and uses only IFile. We will not invent a new workflow. (In reply to comment #6) > We will not invent a new workflow. Ok. I can understand that. For my proposed solution I could provide a patch. Unfortunately my understanding of the eclipse platform is not good enough to provide a patch for the final solution. :) |