RE : [xml-dev] impossible dataloader switching when xml has been parsed

"Nicolas Laumonier" <[email protected]> Tue, 4 Nov 2003 16:58:11 +0100
Newsgroups gmane.comp.java.netbeans.modules.xml.devel
Message-ID <[email protected]>
Hi Petr, and thanks for answering so fast :)


Here are the details of the dataLoader switching:
Ex: from my loader to xml module loader

FileObject fileObj =3D dataObject.getPrimaryFile();
FileLock fileLock =3D fileObj.lock();
fileObj.rename(fileLock, fileObj.getName(), "xml");
fileLock.releaseLock();
DataLoaderPool.setPreferredLoader(fileObj, XMLDataLoader);=20

Same technique used the other way round.


Weird stuff , but it worked when I tried to reproduce bug to show you
the Exception I was getting.=20

Sorry , but when speaking about references holding
original visualization, do you mean references to the fileObject,
DataObject, ... ?

Yours truly,

Nicolas.

-----Message d'origine-----
De=A0: Petr Kuzel [mailto:[email protected]]=20
Envoy=E9=A0: mardi 4 novembre 2003 15:54
=C0=A0: [email protected]
Objet=A0: Re: [xml-dev] impossible dataloader switching when xml has =
been
parsed

Nicolas Laumonier wrote:
> Hi J
>=20
> Having a module editing special xml files, I have created a dataLoader

> for them. And created two actions to switch between this dataLoader
and=20
> the xml module dataLoader.

For curiosity, you use the prefered loader technique.

> When I open xml file as text, I can switch it to my dataLoader, but
when=20
> I open it as a tree, I can=92t anymore. Same thing goes if I expand =
xml=20
> file in the explorer. Once it has been parsed, I just can=92t change=20
> dataLoader and rename file anymore. Would you know how this happens?

Regarding tree, there can be problem with references holding
original visualization. There is the same problem while
uninstalling the XML tree module. Try to discover these
and unregister them at proper places.

   Cc.

--=20
<address>
<a href=3D"mailto:[email protected]">Petr Kuzel</a> at Sun Microsystems :
<a href=3D"http://www.netbeans.org/">NetBeans Java IDE</a></address>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]