Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Slávek Rydval

Pages: [1] 2
1
Ok, cheers. I have to admin that there is wrong design of EA as many times before. :-(

For those who is interested in source code: https://github.com/SlavekRydval/GoatAssociations

2
Well, in case of using OwnedByClassifier the bahaviour is less predicable. I have this dialog and accept the side effects would be a pain in the ass:



So again, is there any description how to properly use ConnectorEnds?

3
I have a simple directed association between two classes. Then I change the c.ClientEnd.Navigable to "Non-Navigable" value within an addin method. As a side effect, EA changes connector's direction to the opposite one. Why?

The code in C#:


EA.Connector c = Repository.GetCurrentDiagram().SelectedConnector;
//now, the c.ClientEnd.Navigable == "Unspecified", c.SupplierEnd.Navigable == "Navigable" and c.Direction == "Source -> Destination"

c.ClientEnd.Navigable = "Non-Navigable";
//now, the c.ClientEnd.Navigable == "Non-Navigable", c.SupplierEnd.Navigable == "Navigable" and c.Direction == "Source -> Destination"

c.ClientEnd.Update();
//!!!now the value of c.Direction is "Destination->Source"!!!

c.Update();
Repository.SaveDiagram(Repository.GetCurrentDiagram().DiagramID);
Repository.ReloadDiagram(Repository.GetCurrentDiagram().DiagramID);


You get more side effects when you change OwnedByClassifier:

c.ClientEnd.OwnedByClassifier = true;
//direction and navigability is chagned


Is there any description how to proper change ConnectorEnds properties without these side effects?

4
Automation Interface, Add-Ins and Tools / Re: MDG_GetProperty and icon
« on: November 06, 2016, 03:51:26 am »
Ok, I got it. It seems that the DLL with the icon musn't be a .NET DLL. If I build Win32 DLL, it is working.

[modification]
As for the hidden menu items, it must be obviously return EA.MDGMenus.mgBuildProject | EA.MDGMenus.mgMerge | EA.MDGMenus.mgRun

5
Automation Interface, Add-Ins and Tools / Re: MDG_GetProperty and icon
« on: November 06, 2016, 01:37:55 am »
No reply so far, so I prepared minimal solution, maybe someone will try it: https://github.com/SlavekRydval/SparxEAMDGMinimal

6
Uml Process / Re: Information Flow vs. Dependency Relationship
« on: November 01, 2016, 10:24:25 pm »
You have to distinguish between UML standard and UML in EA. In UML standard has Dependency really nothing in common with Multiplicity. In comparison with UML standard, EA allows you to break many UML rules (constraint).

Dependency is not a relationship between Classifiers but NamedElements (thus you can have dependency e.g. between attributes). As UML states:

Quote
A Dependency implies that the semantics of the clients are not complete without the suppliers. The presence of Dependency relationships in a model does not have any runtime semantic implications. The semantics are all given in terms of the NamedElements that participate in the relationship, not in terms of their instances.

Dependency is a specialization of DirectedRelationship.

Association is a specialization of Relationship and Classifier. Association has any number of ownedEnds (of metatype Property) and specifies a relationship between instances of these properties.

In my own UML life I try to omit using pure dependency. There are specialization such as Using or Realization whose semantics is more concrete. If a class calls an operation in other class, I use Usage. On the other hand, if a class is in an association with other one (such as Person has BankAccount), I use Association.

7
Automation Interface, Add-Ins and Tools / MDG_GetProperty and icon
« on: November 01, 2016, 08:18:25 am »
Hi,

are there any rules related to the icon in dll with the plugin? I've got MDG plugin written in C# (.NET 4.5.2 or higher) and an icon as a resource. When a question to the icon comes I return:


public object MDG_GetProperty(EA.Repository Repository, string PackageGuid, string PropertyName)
{
    switch (PropertyName)
    {
        case "IconID": return System.Reflection.Assembly.GetExecutingAssembly().Location + "#treeview";
        case "Language": return null;
        case "HiddenMenus": return EA.MDGMenus.mgBuildProject & EA.MDGMenus.mgMerge & EA.MDGMenus.mgRun;
        default: return null;
    }
}


Although the package is connected, no icon is shown. Beside the icon I tried also a bitmap without any positive effect. Can you give me any hint? Cheers.

8
Uml Process / Re: Message Attributes on sequence diagrams
« on: November 01, 2016, 07:55:40 am »
Polymorph, use reopening only for open diagrams, if needed. The change is made in model so every other diagram, if opened later on, will be correct.

9
Uml Process / Re: Information Flow vs. Dependency Relationship
« on: November 01, 2016, 07:49:40 am »
I think you mixed more things together. Dependency can be seen almost everywhere (for instance, if an attribute has a type you can say that this attribute depends on its type). Dependency is the most general metaclass used usually to say: I won't to specify it more precious (which doesn't mean it is wrong).

On the other hand, flow means that a piece of data flows from source to target. It doesn't say anything else such as who starts the transfer. Secondly, information flow is not (from UML point of view) a specialization of dependency.

Last but not least, multiplicity has nothing to do with dependency neither with information flow.

To sum it up: if you use information flow, there is no need to use dependency. Using multiplicity with dependency or information flow is against UML 2 standard. I would definitely delete the dependency if there is an information flow.

10
Have you checked Extent ribbon? You can also redefine the ribbon by using EA_GetRibbonCategory (see http://sparxsystems.com.au/resources/user-guides/automation/enterprise-architect-add-in-model.pdf).

11
General Board / Re: Relationship Matrix and applying of Model Sear
« on: May 12, 2015, 05:53:56 pm »
Thanks, Geert. It works. It is pretty surprising to me that even a keyword has to be capitalized.

12
General Board / Relationship Matrix and applying of Model Search
« on: May 11, 2015, 12:45:15 am »
Dear folks,

I have a custom search which returns two rows as a result. When I want to use it in relationship matrix, it doesn't work even one of the columns is CLASSGUID as is stated in documentation:

select ea_guid as CLASSGUID, Object_Type AS CLASSTYPE, *
      from t_object
            where object_id in (2130, 2205)

What else must be fulfilled to obtain the result set in RM?

Thanks in advance.

EA 12 (build 1213), EAP repository, no addins.

13
Geert, that is the other think that is missing in documentation. On the other hand, EA doesn't allow to set for instance tagged values for a model. Well, I can't see a reason why it is disabled.

14
Simon, why is not a root item considered as a context? It sounds strange to me. By the way, the documentation says: "Models are of type package and belong to a collection of packages." (Repository Class) There should be a proper way how to get the type of selected item in Project Browser.

15
Not very positive answer.

Anyway, for the time being I wrote a small routine to fix mentioned mistake:

protected EA.ObjectType temporaryGetContextItemType(EA.Repository Repository) {
    EA.ObjectType vOT = Repository.GetContextItemType();
    if (vOT == EA.ObjectType.otNone) {
        //try it to retype to Package and check if it is a model...
        //if anything gets wrong, forget it
        try {
            if (((EA.Package)(Repository.GetContextObject())).ParentID == 0)
                return EA.ObjectType.otModel;
        } catch { }
    }
    return vOT;
}

Pages: [1] 2