[oXygen-user] Buffer-related questions (when opened from plugin)
lists at fgeorges.org
Fri Jun 15 06:47:46 CDT 2012
Oxygen XML Editor Support wrote:
Thank you for your detailed answer!
> You could implement a HashMap in your WorkspaceAccessPluginExtension
> which would keep that flag for a certain URL for which you wanted
> the open operation to work.
Interesting idea... Actually, that's just to keep track of the
buffers opened by the plugin. So probably the best is to use a set
based on object identities, with the WSEditor objects. Do we have the
guarantee that the WSEditor object does not change between the moment
a file is open and when it is closed? Object identity looks like more
robust to me than URI comparison, isn't it?
BTW, shouldn't a WSEditor object be returned by Workspace.open()?
> Is that boolean flag somewhat related to whether the URL was opened
> for editing or read-only by the user?
No, but that's also a requirement ;-) Is there any way to open a
file in read-only using the API? Other than creating a dedicated
WSEditorChangeListener of course.
>> 2/ to specify a method to be called before closing the buffer (kind
>> of a buffer listener, so I can do some treatment before closing
> So you want some kind of a listener to notify you before an opened
> editor is closed, right?
Thank you, regards,
More information about the oXygen-user