How to "create document" in 3.2? [message #243610] |
Thu, 10 May 2007 08:53  |
Eclipse User |
|
|
|
Can anyone in the JDT development land shed some light on this issue?
JDT is a user of the platform text classes so surely you guys know.
In
http://www.eclipse.org/newsportal/article.php?id=64533&g roup=eclipse.platform#64533
I describe that 3.2 by deprecating the document creation extension has
made it impossible to create your own implementation of IDocument for your
editor.
We are creating a full development tooling environment about the size of
JDT and have run into a snag.
Our editor gives the url of the file to another component (actually
another process that communicates using sockets), and it is that component
that must provide the content of the file to the editor. So, (I think) we
want our own IDocument implementation that in its get/set/replace methods
talks to the other component to manipulate the content of the file. But,
as I explain in the cited note above, it seems that 3.2 has made this
impossible. Perhaps this was never possible!
As expert users of the platform text classes, can you guys comment on this
please?
farokh
|
|
|
|
Re: How to "create document" in 3.2? [message #243671 is a reply to message #243662] |
Fri, 11 May 2007 11:49  |
Eclipse User |
|
|
|
Yes, I considered the solution that you are suggesting: Have my document
provider to directly manage my IDocument object. But I am not sure if
that would be the proper integration into Eclipse. This solution would
not use file buffers and more importantly the TextFileBufferManager. Here
are the problems:
1. What if some plugin used the manager to get all the buffers and put
listeners on them? 2. The original document creation extension, as far as
I can tell, worked by letting the ResourceFileBuffer use a registry to
find appropriate IDocument implementations. Surly putting the Idocument
under the file buffer was for a reason. 3. The comment in Help regarding
deprecation of the document creation extension says to wrap the Idocument
object inside a file buffer.
At this point, I am not sure at all what is the prescribed way of
providing/extending IDocument implementation with full Eclipse
interoperability and blessing.
With regard to your performance comment... To save readers from too much
detail I did not go through the gory detail of how we are going to do
this. At this point I just want to know what mechanism is replacing this
document creation extension that is deprecated.
Any Platform text or users of it out there that can tell us?
|
|
|
Powered by
FUDForum. Page generated in 0.42658 seconds