I have now a piece of code that does most of what I think it is supposed to
do, but still, the xmi file does just contain the root entry:

<?xml version="1.0" encoding="UTF-8"?>
<Hierarchy:TRCMonitor xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:Hierarchy="http://www.eclipse.org/hyades/models/hierarchy.xmi";
name="DefaultMonitor"/>

I am creating a Monitor:

HierarchyPackageImpl.init();
HierarchyResourceSetImpl set = HierarchyResourceSetImpl.getInstance();
HierarchyFactory factory = new HierarchyFactoryImpl();
TRCMonitor fmonitor = factory.createTRCMonitor();
fmonitor.setName("DefaultMonitor");

I create my XML Loader

ZipEntry zipEntry = (ZipEntry) entries.nextElement();
XMLLoader processor = getNewProcessor(fmonitor);
processor.setCollectionMode(collectionMode);

I load the events (to a model)

while (true) {
         String line = reader.readLine();
         if (line == null)
                  break;
         processor.loadEvent(line.getBytes(), line.length(),true);              
                
}

My Debugging Information tells me that something has been loaded:
System.out.println("Number of processsed Fragments:
"+processor.getProcessedFragments());
Returns:
"Number of processsed Fragments: 174"

I'm serializing the model with the following code:

ResourceSet resSet = new ResourceSetImpl();
HierarchyPackage myPackage = factory.getHierarchyPackage();
resSet.getPackageRegistry().put("myPackage", myPackage);
Resource res = resSet.createResource(URI.createFileURI(targetfile));
res.getContents().add(fmonitor);
res.save(null);

As mentioned before, I get no errors, the script runs fine, but in the
targetfile, theres just the document root, but no method calls, and that's
what I'm interested in.

Anyone got any ideas why this is like that?
Thanks
Jan
-- 
View this message in context: 
http://www.nabble.com/Tracefile--%3E-trcaxmi-File-tf4732204.html#a13629142
Sent from the Eclipse - Tracing and Profiling Tools - Dev mailing list archive 
at Nabble.com.

_______________________________________________
tptp-tracing-profiling-tools-dev mailing list
tptp-tracing-profiling-tools-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/tptp-tracing-profiling-tools-dev

Reply via email to