FileDocCategorySizeDatePackage
Rose_98_Export.javaAPI DocExample1938Tue Dec 08 01:21:00 GMT 1998oisoft.togetherx.scripts

Rose_98_Export

public class Rose_98_Export extends Object implements Script, ScriptResources
Exports current project to Rose 98 model file
author
Eugene Belyaev
version
2.1.0

Fields Summary
Optioner
optioner
ModelExporter
modelExporter
Constructors Summary
Methods Summary
public voiddoIt(APIManager manager)
Main extry point for Script API to call the script

param
manager The Script API manager


	                  	 
	      
		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");
		}
	
public java.lang.StringgetMenuItem()
This method returns the default string for the Tools menu

    return "Rose 98 Export...";