Skip to content
Snippets Groups Projects
compositediagram.spray 1.79 KiB
/*************************************************************************************
 *
 * Spray diagram definition
 * 
 * This file contains the definition of a graphical editor using the Spray Language.
 * Refer to http://code.google.com/a/eclipselabs.org/p/spray/ for documentation.
 *
 * See also compositediagram.properties to configure generator properties.
 *************************************************************************************/
// Add import statements here
import repository.*

diagram compositediagram for Repository style CompositediagramDefaultStyle

// Add class mappings here. Refer to EClasses here. Don't forget to configure a
// dependency to the plugin defining the EMF metamodel in META-INF/MANIFEST.MF.
// It is required to have a genmodel for the metamodel. If the Ecore model lies in
// a workspace project, this project must have the Xtext nature.
//
// Example class mapping:
//   class BusinessClass icon "ecore/EClass.gif" {
//     container  ( fill=yellow ) 
//     {
//       text ( )  { "<<"+eClass.name+">> " + name};
//       line ( color=black width=2)
//     }
//     behavior {
//       // Enable create feature for this class and add it to the palette "Shapes"
//       create into types palette "Shapes";
//     }
//   }
//
// Example association mapping:
//   class Association icon "connection16.gif" {
//     connection ( ) {
//       from source;
//       to target;
//       fromText "source " + source.name
//     }
//   }

class CompositeComponent {
    shape CompositeShape {
		name into classText  
		reference assemblyContexts into context
    }
    behavior {
        create into components palette "Components"
    }    
} 

class AssemblyContext {
    shape RectShape {
		name into rectText        
    }
    behavior {
        create palette "Context"
    }
}