Main extry point for Script API to call the script
UMLModel myModel = manager.getUMLModel();
if(myModel!=null) {
optioner.manager = manager;
if (myModel.getRootPackage()!=null)
{
String outName = manager.getOutputStream( ".mdl" );
optioner.output_stream = ( outName == null ? null : new java.io.File( outName ));
if ( optioner.output_stream != null && !optioner.output_stream.isDirectory() )
{
modelExporter = new ModelExporter(myModel, optioner);
// Simple debug statistics
Reporter.Info("Package count = " + optioner.packageCount);
}
else // Some error catching...
{
Reporter.Error("Filename not specified");
manager.createMessage("Rose98Export error: model filename not specified" );
}
} else
{
manager.createMessage("Rose98Export error: No model loaded" );
}
} else
{
Reporter.Error("No model");
}