Ejemplo n.º 1
0
        /// returns the singleton instance of the factory
        public static SchemaBuilderFactory getInstance(UML.UMLModel model)
        {
            SchemaBuilderFactory instance = null;

            instances.TryGetValue(model, out instance);
            return(instance);
        }
Ejemplo n.º 2
0
 private static void addFactory(UML.UMLModel model, SchemaBuilderFactory factory)
 {
     if (!instances.ContainsKey(model))
     {
         instances.Add(model, factory);
     }
 }
Ejemplo n.º 3
0
        /// returns the singleton instance for the given model.
        public static new EASchemaBuilderFactory getInstance(UML.UMLModel model)
        {
            EASchemaBuilderFactory factory = SBF.SchemaBuilderFactory.getInstance(model) as EASchemaBuilderFactory;

            if (factory == null)
            {
                factory = new EASchemaBuilderFactory((UTF_EA.Model)model);
            }
            return(factory);
        }
		/// <summary>
		/// initialize the add-in class
		/// </summary>
		/// <param name="Repository"></param>
		private void initialize(EA.Repository Repository)
		{
			//initialize the model
			this.model = new UTF_EA.Model(Repository);
			this.schemaFactory = EASchemaBuilderFactory.getInstance(this.model);
		}
		/// <summary>
        /// Initializes the model and schemaFactory with the new Repository object.
        /// </summary>
        /// <param name="Repository">An EA.Repository object representing the currently open Enterprise Architect model.
        /// Poll its members to retrieve model data and user interface status information.</param>
		public override void EA_FileOpen(EA.Repository Repository)
		{
			//initialize the model
			this.model = new UTF_EA.Model(Repository);
			this.schemaFactory = EASchemaBuilderFactory.getInstance(this.model);
		}
 /// <summary>
 /// initialize the add-in class
 /// </summary>
 /// <param name="Repository"></param>
 private void initialize(EA.Repository Repository)
 {
     //initialize the model
     this.model         = new UTF_EA.Model(Repository);
     this.schemaFactory = EASchemaBuilderFactory.getInstance(this.model);
 }
Ejemplo n.º 7
0
 protected SchemaBuilderFactory(UML.UMLModel model)
 {
     this.model = model;
     addFactory(model, this);
 }