Re: How to implement a MultiFileLoader?
Peter Nabbefeld <[email protected]> Thu, 13 Jul 2017 12:44:56 +0200
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <[email protected]> |
Hm, FormDataLoader and FormDataObject seem to handle things very special (both extensions registered to one DataLoader), which isn't appropriate for my case (some files aren't "brothers"). I think my current implementation should work, but obviously I've done sth. wrong with regeistration, as "org.openide.loaders.DataLoaderPool$DefaultLoader" is used instead of my own loader. I've put the code of my loader and my object into the readme file of the following public repository: https://github.com/OldGrumble/nuclos-extensions/tree/master It looks rather strange, obviously some code obviously has been interpreted as formatting, so please download it or use "raw" view before reading. I'd guess, my problems are caused by annotations, so please, could You tell me what I'm doing wrong? Kind regards Peter Am 07.07.2017 um 15:57 schrieb geertjan wielenga: > > I'd take a look in the NetBeans sources if I were you, to see how it's > done for '.form' files. > > Gj > > > On 7-7-2017 15:55, Peter Nabbefeld wrote: >> Hello Geertjan, >> >> thank You for Your reply! I've not noticed before, my DataObject is >> already a MultiDataObject, so it should have sufficient support. >> >> However, how can I make the "brothers" invisible? And also, how can I >> make the subfolder invisible? >> >> When creating my file type, I got a MultiDataObject (without the >> necessary methods for working with multiple files), but no >> MultiFileLoader (so I guess some default implementation is used). >> >> Kind regards >> Peter >> >> >> >> >> >> Am 07.07.2017 um 15:02 schrieb geertjan wielenga: >>> >>> org.openide.filesystems.FileUtil.findBrother >>> >>> http://bits.netbeans.org/dev/javadoc/org-openide-filesystems/org/openide/filesystems/FileUtil.html#findBrother-org.openide.filesystems.FileObject-java.lang.String- >>> >>> >>> https://blogs.oracle.com/geertjan/orgopenidefilesystemsfileutilfindbrother >>> >>> >>> Gj >>> >>> On 7-7-2017 14:57, Peter Nabbefeld wrote: >>>> >>>> Hello, >>>> >>>> I'm missing support for MultiDataObject - current file type >>>> tutorials don't seem to cover this. >>>> >>>> I've got 2 XML files (extensions "layoutml" and "eoml") and an >>>> additional XML file (with extension "eoml") in a folder (which has a >>>> fixed name). >>>> >>>> I'd like to get all of these as one MultiDataObject (making either >>>> the layoutml or the outer "eoml" file the primary file - the eoml >>>> has some metadata, but there exist different eoml's for different >>>> datatypes). >>>> >>>> I'd also like to only see the primary file, while the other files >>>> and the extra folder should be invisible to the user. >>>> >>>> Kind regards >>>> Peter >>>> >>> >>> >> >> > >