[REQ] Close All Read Only Plugin
It would be great to have a plugin that could close all the read only files. I will typically look around at a lot of files and check out the ones I need to change. Then when I'm ready to start I have to manually find all the file that I looked at but did not check out and close them.
Please sign in to leave a comment.
I'd like to take that one step farther. Close all read only files and
open all writable files in the project or module.
charles decroes wrote:
I'll see your "close all readonly" + "save" and raise you a
"but don't close any read-only files that have been had their tab(s)
pinned "
(that tab pinning feature must be useful for something)
basically clean up my tabs and save my state
"Brad" <brad@somewhere.com> wrote in message
news:c9puhu$gkt$1@is.intellij.net...
>
>
files. I will typically look around at a lot of files and check out the
ones I need to change. Then when I'm ready to start I have to manually find
all the file that I looked at but did not check out and close them.
Ok so now we just need someone that knows the open api to code this thing up. Anyone....anyone??
>> I'd like to take that one step farther. Close all read only files and
>> open all writable files in the project or module.
>>
>> charles decroes wrote:
>>
>>> It would be great to have a plugin that could close all the read
>>> only
>>>
Hi,
Just hint:
FileEditorManager
/**
@return all opened files. Order of files in the array corresponds to the order of editor tabs.
*/
public abstract VirtualFile[] getOpenFiles();
VirtualFile
/**
Checks whether this file has write permission. Note that this value may be cached and may differ from
the write permission of the physical file.
*
@return <code>true</code> if this file is writable, <code>false</code> otherwise
*/
public abstract boolean isWritable();
Then again
FileEditorManager
/**
@param file cannot be null
@return all editors for the specified <code>file</code>
*/
public abstract FileEditor[] getEditors(VirtualFile file);
TIA,
Dmitry