public override void EA_OnPostInitialized(EA.Repository Repository) { // initialize the model this.model = new UTF_EA.Model(Repository); fullyLoaded = true; base.EA_OnPostInitialized(Repository); }
/// <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); // indicate that we are now fully loaded this.fullyLoaded = true; }
protected MagicDrawCorrector(MagicDrawReader magicDrawReader, TSF_EA.Model model, TSF_EA.Package mdPackage) { this.magicDrawReader = magicDrawReader; this.model = model; this.mdPackage = mdPackage; this.outputName = System.IO.Path.GetFileName(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName); }
public DiagramLinkWrapper(Model model, ConnectorWrapper relation, Diagram diagram){ this.model = model; this.relation = relation; this.diagram = diagram; this.wrappedDiagramLink = diagram.getDiagramLinkForRelation(relation); }
public EAValidatorController(TSF_EA.Model model, EAValidatorSettings settings) { this.model = model; this.validations = new List <Validation>(); this.settings = settings; this.outputName = this.settings.outputName; }
public override void EA_FileOpen(EA.Repository repository) { this.model = new TSF_EA.Model(repository); this.settings = new GlossaryManagerSettings(this.model); this.factory = new GlossaryItemFactory(this.settings); this.fullyLoaded = true; }
/// <summary> /// creates a new user based on the given details /// </summary> /// <param name="model">the model containing the user</param> /// <param name="login">the string used to log in into the tool</param> /// <param name="firstName">the first name of the user</param> /// <param name="lastName">the last name of the user</param> public User(EAWrappers.Model model, string login, string firstName, string lastName) { this.model = model; this.login = login; this.firstName = firstName; this.lastName = lastName; }
public override void EA_FileOpen(EA.Repository Repository) { // initialize the model this.model = new TSF_EA.Model(Repository); // indicate that we are now fully loaded this.fullyLoaded = true; }
public WorkingSet(EAWrappers.Model model, string ID, User user, string name) { this.model = model; this.ID = ID; this.user = user; this.name = name; }
public static List <EDDTable> createColumns(TSF_EA.Model model, List <DataItem> dataItems, GlossaryManagerSettings settings) { //get the columns based on the given data items var guidString = string.Join(",", dataItems.Select(x => "'" + x.GUID + "'")); string sqlGetColumns = @"select a.[ea_guid] from(t_attribute a inner join[t_attributetag] tv on(tv.[ElementID] = a.[ID] and tv.[Property] = 'EDD::dataitem')) where tv.VALUE in (" + guidString + ")"; List <TSF_EA.Attribute> attributes = model.getAttributesByQuery(sqlGetColumns); var tables = new Dictionary <string, EDDTable>(); foreach (var attribute in attributes) { var classElement = attribute.owner as TSF_EA.Class; if (classElement != null) { //for each attribute create the column var dbColumn = DB_EA.DatabaseFactory.createColumn(attribute); if (dbColumn != null) { EDDTable ownerTable = tables.ContainsKey(classElement.uniqueID) ? tables[classElement.uniqueID] : new EDDTable((DB_EA.Table)dbColumn.ownerTable, settings); var newColumn = new EDDColumn(dbColumn, ownerTable, settings); ownerTable.addColumn(newColumn); tables[ownerTable.uniqueID] = ownerTable; } } } //return colums return(tables.Values.ToList()); }
public string getTFSUrl(TSF_EA.Model model) { string TFSUrl; //get the TFS location projectConnections.TryGetValue(model.projectGUID, out TFSUrl); return(TFSUrl); }
public string getURL(TSF_EA.Model model) { string url; //get the DoorsNG Url projectConnections.TryGetValue(model.projectGUID, out url); return(url); }
public override void EA_FileOpen(EA.Repository repository) { this.model = new TSF_EA.Model(repository); this.settings = new GlossaryManagerSettings(this.model); this.factory = new GlossaryItemFactory(this.settings); Domain.getAllDomains(this.settings.businessItemsPackage, this.settings.dataItemsPackage); this.fullyLoaded = true; }
//let the user select a table from the model public static EDDTable selectTable(TSF_EA.Model model, GlossaryManagerSettings settings) { var tableElement = model.getUserSelectedElement(new List<string> { "Class" }, new List<string> { "table" }) as TSF_EA.Class; if (tableElement == null) return null; var table = DB_EA.DatabaseFactory.createTable(tableElement); if (table == null) return null; return new EDDTable(table, settings); }
public EAValidatorController(TSF_EA.Model model) { _model = model; validations = new List <Validation>(); checks = new List <Check>(); this.settings = new EAValidatorSettings(); this.outputName = this.settings.outputName; }
private UTF_UC.Diagram getDiagram() { UTF_EA.Model sourceModel = new UTF_EA.Model(this.repository); UML.Diagrams.Diagram sourceDiagram = sourceModel.selectedDiagram; UTF_UC.Model targetModel = UTF_UC.Model.getModel(); return(targetModel.cloneDiagram(sourceDiagram)); }
/// <summary> /// private constructor /// </summary> /// <param name="model">the model this output applies to</param> /// <param name="outputName"></param> private EAOutputLogger(Model model, string outputName) { this.model = model; this.name = outputName; //make sure the log exists and is visible and cleared this.model.wrappedModel.CreateOutputTab(this.name); this.model.wrappedModel.EnsureOutputVisible(this.name); this.model.wrappedModel.ClearOutput(this.name); }
public override void EA_FileOpen(EA.Repository Repository) { // initialize the model this.model = new UTF_EA.Model(Repository, true); // preload the database factory DB2DatabaseTransformer.getFactory(this.model, DB2StrategyFactory.getInstance()); // indicate that we are now fully loaded this.fullyLoaded = true; }
public ContextWrapper(EA.Repository repository) { this.model = new Wrapper.Model(repository); this.changeService = new ChangeService(); this.ruleService = new RuleService(); this.itemTypes = new ItemTypes(repository); changesDispatcherThread = new Thread(new ThreadStart(this.changeService.startActivityDispatcher)); changesDispatcherThread.Start(); }
public EAImvertorException(UTF_EA.Model model, string exceptionType, string guid, string step, string construct, string message) { this._model = model; this.exceptionType = exceptionType; this.guid = guid; this.step = step; this.construct = construct; this.message = message; }
public override void EA_FileOpen(EA.Repository Repository) { // initialize the model this.model = new TSF_EA.Model(Repository, true); //close any existing tabs this.model.closeTab(mappingControlName); // indicate that we are now fully loaded this.fullyLoaded = true; }
/// <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); //set the settings this.settings = new EAImvertorSettings(this.model); // indicate that we are now fully loaded this.fullyLoaded = true; }
static EAOutputLogger getOutputLogger(Model model, string outputName) { var logKey = model.projectGUID+outputName; if (!outputLogs.ContainsKey(logKey)) { outputLogs.Add(logKey,new EAOutputLogger(model, outputName)); } return outputLogs[logKey]; }
public static GlossaryItemFactory getFactory(TSF_EA.Model model, GlossaryManagerSettings settings) { GlossaryItemFactory factory; if (!factories.TryGetValue(model.projectGUID, out factory)) { factory = new GlossaryItemFactory(model, settings); factories.Add(model.projectGUID, factory); } return(factory); }
public TFSConnectorSettingsForm(EATFSConnectorSettings settings, TSF_EA.Model model ) { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); this.settings = settings; this.model = model; this.loadData(); this.enableDisable(); }
public override void EA_FileOpen(EA.Repository Repository) { // initialize the model this.model = new UTF_EA.Model(Repository); // clear the control if (this.navigatorControl != null) { this.navigatorControl.clear(); } this.fullyLoaded = true; }
public static bool isItemUsedInASchema(UML.Classes.Kernel.Element element, TSF_EA.Model model) { var sqlGetCountSchemas = @"select count(*) as countresult from t_document d inner join t_object o on o.ea_guid = d.ElementID where d.DocType = 'SC_MessageProfile' " + $"and d.StrContent like '%{element.uniqueID}%'"; var resultXml = model.SQLQuery(sqlGetCountSchemas); var countNode = resultXml.SelectSingleNode(model.formatXPath("//countresult")); return(countNode.InnerText != "0"); }
public EADoorsNGSettingsForm(EADoorsNGSettings settings, TSF_EA.Model model) { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); this.settings = settings; this.model = model; this.loadData(); this.enableDisable(); }
public EnumerationLiteral(Model model, global::EA.Attribute wrappedAttribute) : base(model, wrappedAttribute) { if (!this.wrappedAttribute.StyleEx.Contains("IsLiteral=")) { this.wrappedAttribute.StyleEx = "IsLiteral=1;" + this.wrappedAttribute.StyleEx; }else { this.wrappedAttribute.StyleEx = this.wrappedAttribute.StyleEx.Replace("IsLiteral=0;","IsLiteral=1;"); } }
private void refresh() { if (this.allWorkingSets.Count > 1) { UTF_EA.Model model = this.allWorkingSets[0].model; this.allWorkingSets = model.workingSets; this.allUsers = model.users; this.currentUser = model.currentUser; this.initializeWorkingSets(); this.initializeUserList(); } }
public EASearchOutput(string name,List<string> fields,List<UML.Extended.UMLModelOutPutItem> output, UTF_EA.Model model) { this.name = name; //add the default fields for EA Searches this.fields = new List<string> { "CLASSGUID", "CLASSTYPE" }; this.fields.AddRange(fields); this.output = output; if (this.output == null) { this.output = new List<UML.Extended.UMLModelOutPutItem>(); } this._model = model; }
/// <summary> /// gets all the logical datatype in the model /// </summary> /// <param name="model">the model</param> /// <returns>a list of logical datatypes found in the model</returns> public static IEnumerable <LogicalDatatype> getAllLogicalDatatypes(TSF_EA.Model model) { var logicalDatatypes = new List <LogicalDatatype>(); var sqlGetLogicalDatatypes = @"select o.[Object_ID] from t_object o where o.Stereotype = 'EDD_LogicalDatatype' order by o.name"; foreach (var datatype in model.getElementWrappersByQuery(sqlGetLogicalDatatypes).OfType <UML.Classes.Kernel.DataType>()) { logicalDatatypes.Add(new LogicalDatatype(datatype)); } return(logicalDatatypes); }
public override void EA_OnElementTagEdit(Repository Repository, long ObjectID, ref string TagName, ref string TagValue, ref string TagNotes) { this.model = new UTF_EA.Model(Repository); base.EA_OnElementTagEdit(Repository, ObjectID, ref TagName, ref TagValue, ref TagNotes); UML.UMLItem umlItem = model.getElementWrapperByID((int)ObjectID); if (umlItem != null) { if (IsTrackedUmlItem(umlItem)) { SynchronizeUmlItemTags(umlItem, ref TagName, ref TagValue, ref TagNotes); } } Repository.RefreshOpenDiagrams(true); }
public override void EA_OnNotifyContextItemModified(Repository Repository, string GUID, ObjectType ot) { this.model = new UTF_EA.Model(Repository); base.EA_OnNotifyContextItemModified(Repository, GUID, ot); UML.UMLItem umlItem = model.getElementByGUID(GUID); if (umlItem != null) { if (IsTrackedUmlItem(umlItem)) { SynchronizeUmlItem(umlItem); } } Repository.RefreshOpenDiagrams(true); }
public EASearchOutput(string name, List <string> fields, List <UML.Extended.UMLModelOutPutItem> output, UTF_EA.Model model) { this.name = name; //add the default fields for EA Searches this.fields = new List <string> { "CLASSGUID", "CLASSTYPE" }; this.fields.AddRange(fields); this.output = output; if (this.output == null) { this.output = new List <UML.Extended.UMLModelOutPutItem>(); } this._model = model; }
/// <summary> /// EA_MenuClick events are received by an Add-In in response to user selection of a menu option. /// The event is raised when the user clicks on a particular menu option. When a user clicks on one of your non-parent menu options, your Add-In receives a MenuClick event, defined as follows: /// Sub EA_MenuClick(Repository As EA.Repository, ByVal MenuName As String, ByVal ItemName As String) /// Notice that your code can directly access Enterprise Architect data and UI elements using Repository methods. /// Also look at EA_GetMenuItems. /// </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> /// <param name="MenuLocation">String representing the part of the user interface that brought up the menu. /// Can be TreeView, MainMenu or Diagram.</param> /// <param name="MenuName">The name of the parent menu for which sub-items must be defined. In the case of the top-level menu it is an empty string.</param> /// <param name="ItemName">The name of the option actually clicked, for example, Create a New Invoice.</param> public override void EA_MenuClick(EA.Repository Repository, string MenuLocation, string MenuName, string ItemName) { //initialize model this.model = new UTF_EA.Model(Repository); //get all users List<User> allUsers = this.model.users; //get current user User currentUser = this.model.currentUser; //debug //currentUser = new User(this.model,"login1","firstname1","lastname1"); //get all workingsets List<WorkingSet> allWorkingSets = this.model.workingSets; //open window WorkingSetSharingWindow window = new WorkingSetSharingWindow(allWorkingSets,allUsers,currentUser); window.Show(); }
/// <summary> /// EA_MenuClick events are received by an Add-In in response to user selection of a menu option. /// The event is raised when the user clicks on a particular menu option. When a user clicks on one of your non-parent menu options, your Add-In receives a MenuClick event, defined as follows: /// Sub EA_MenuClick(Repository As EA.Repository, ByVal MenuName As String, ByVal ItemName As String) /// Notice that your code can directly access Enterprise Architect data and UI elements using Repository methods. /// Also look at EA_GetMenuItems. /// </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> /// <param name="MenuLocation">String representing the part of the user interface that brought up the menu. /// Can be TreeView, MainMenu or Diagram.</param> /// <param name="MenuName">The name of the parent menu for which sub-items must be defined. In the case of the top-level menu it is an empty string.</param> /// <param name="ItemName">The name of the option actually clicked, for example, Create a New Invoice.</param> public override void EA_MenuClick(EA.Repository Repository, string MenuLocation, string MenuName, string ItemName) { //initialize model this.model = new UTF_EA.Model(Repository); //get all users List <User> allUsers = this.model.users; //get current user User currentUser = this.model.currentUser; //debug //currentUser = new User(this.model,"login1","firstname1","lastname1"); //get all workingsets List <WorkingSet> allWorkingSets = this.model.workingSets; //open window WorkingSetSharingWindow window = new WorkingSetSharingWindow(allWorkingSets, allUsers, currentUser); window.Show(); }
/// <summary> /// log a message to the EA output window. If requested the message will also be logged to the logfile /// </summary> /// <param name="model">the model on which to show the output</param> /// <param name="outputName">the name of the output window</param> /// <param name="message">the message to show</param> /// <param name="elementID">the element ID to associate with the message. Can be used by add-ins when they implement EA_OnOutput...</param> /// <param name="logType">the type of logging to the logfile</param> public static void log(Model model,string outputName, string message, int elementID = 0,LogTypeEnum logType = LogTypeEnum.none) { var logger = getOutputLogger(model, outputName); logger.logToOutput(message,elementID); //log to logfile if needed switch (logType) { case LogTypeEnum.log: Logger.log(message); break; case LogTypeEnum.warning: Logger.logWarning(message); break; case LogTypeEnum.error: Logger.logError(message); break; } }
public override void EA_FileOpen(EA.Repository repository) { this.model = new TSF_EA.Model(repository); //close the tab if still open this.model.closeTab(appTitle); this._mainControl = null; //get settings this.settings = new GlossaryManagerSettings(this.model); //get the logical datatypes this.logicalDatatypes = LogicalDatatype.getAllLogicalDatatypes(this.model); //(re)-initialize if (this.settings.showWindowAtStartup) { this.initialiseMainControl(); } this.factory = GlossaryItemFactory.getFactory(this.model, this.settings); this.fullyLoaded = true; }
public SynchronizationMovements(EA.Repository repository) { this.model = new Wrapper.Model(repository); this.itemTypes = new ItemTypes(repository); }
/// <summary> /// default constructor, calls parent constructor /// </summary> /// <param name="model">the model containing the element</param> /// <param name="wrappedElement">the EA.Element to be wrapped</param> public Activity(Model model, global::EA.Element wrappedElement) : base(model,wrappedElement) { }
public DescriptionComment(Model model, Element owner) : base(model) { this.owner = owner; }
public ParameterReturnType( Model model, Operation operation) : base(model) { this._owner = operation; }
public Attribute(Model model, global::EA.Attribute wrappedAttribute) : base(model) { this.wrappedAttribute = wrappedAttribute; }
internal TaggedValue(Model model) { this.model = model; }
public Transition(Model model, global::EA.Connector transition) : base(model,transition) { }
public ObjectDiagram(Model model, global::EA.Diagram wrappedDiagram ):base(model,wrappedDiagram) { }
public RootPackage(Model model,global::EA.Package package) : base(model,package) { this.wrappedPackage = package; }
public EADatabaseTransformer(DatabaseFactory factory, UTF_EA.Model model,NameTranslator nameTranslator) : base(nameTranslator) { this._factory = factory; this._model = model; }
/// <summary> /// Constructor of the EASchema. Only to be used by the EASchemaBuilderFactory /// </summary> /// <param name="model">The model containing this Scheam</param> /// <param name="composer">The EA.SchemaComposer object to be wrapped</param> internal EASchema(UTF_EA.Model model, EA.SchemaComposer composer) { this.model = model; this.wrappedComposer = composer; }
public Stereotype(Model model, Element owner, String stereotype) : base(model) { this.name = stereotype; this.owner = owner; }
public DiagramObjectWrapper(Model model, global::EA.DiagramObject diagramObject) { this.wrappedDiagramObject = diagramObject; this.model = model; }
internal RelationTag(Model model, global::EA.ConnectorTag eaTag):base(model) { this.wrappedTaggedValue = eaTag; }
internal OperationTag(Model model, global::EA.MethodTag eaTag):base(model) { this.wrappedTaggedValue = eaTag; }
public Enumeration(Model model, global::EA.Element elementToWrap) : base(model, elementToWrap) { }
public ConnectorWrapper(Model model, global::EA.Connector connector) : base(model) { this.wrappedConnector = connector; }
public DiagramObjectWrapper(Model model, ElementWrapper element, Diagram diagram) : this(model, diagram.getdiagramObjectForElement(element)) {}