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 - Lars J.

Pages: [1] 2
1
Hi all,

the setting "Hide page border (all diagrams)" from the diagram properties dialog affects all diagrams (as it states correctly ;) ).

Shouldn't it then be better placed on the Diagram Appearance Tab of the Tools->Options dialog? As a global setting so to say.

This is just a thought....

regards

Lars

2
General Board / Create DiagramLink and make it visible
« on: March 23, 2012, 10:17:45 pm »
Hi all,

I am developing a plugin for EA. Currently I have code which creates a Connector between two ports. Now I want to see the connector on the currently open diagram (because I have selected the two ports on it.

So I create a DiagramLink object, add it to the DiagramLinks collection, update everything and still do not see the connector. What would I have to do to see this connector instantly on my open diagram?


EDIT:

Just found out how to do it: Repository.ReloadDiagram() does the right Job.

Lars

3
General Board / Re: OCL constraint to traverse from class to port
« on: March 12, 2012, 07:52:06 pm »
Oh, if this is really the case, then the only sense I see in the possibility to write OCL constraints is to feed it to an addin that does the job. But this is really not much.

I was thinking that EA is at least capable of executing OCL during a model validation step. But if this isn't the case then I will refrain from trying to accomplish the above and try to achieve it by other means.

So, is this an official statement from Sparxsystem that OCL is not executed?

thanks.

4
General Board / OCL constraint to traverse from class to port
« on: March 10, 2012, 01:41:01 am »
Hi all,

I am creating a tiny modeling language based on UML. For this I defined a UML Profile and added it to an mdg technology.

The profile contains 2 extensions of the metaclass Class and two extensions of the metaclass Port:

MyClassStereo_1 --> Class
MyClassStereo_2 --> Class
MyPortStereo_1 --> Port
MyPortStereo_2 --> Port

I only want to put instances of MyPortStereo_1 on instances of MyClassStereo_1. But the tool does not prevent me from putting instances of MyPortStereo_2 on instances of MyClassStereo_1. That's why I want to place an OCL constraint on the stereotype MyClassStereo_1 which checks that all contained ports are MyPortStereo_1 ports.

The question is: What would I have to write in OCL to check this?

My suggestion is something like: self.<relation>->forAll(p | p.isKindOf(MyPortStereo_2)) or so.

But what is the relation to get from a class to its contained ports and is the check for being MyPortStereo_2 done using oclIsKindOf?

thanks in Advance.

Lars

5
Bugs and Issues / Re: Save package as UML Profile doesn't show up
« on: April 04, 2012, 04:57:44 pm »
Many thanks for these two hints.

In the View | Workspaces and Commands dialog I checked all options testwise to get a quick answer.

That did the job. Btw. that's a very cool feature, which I will play around with in the near future.

Initial I thought the absence of the "Save package as UML profile" menu item was a bug and now that made me aware of this extra level of customizability.

Lars

6
Bugs and Issues / Save package as UML Profile doesn't show up
« on: April 03, 2012, 10:03:19 pm »
Hi all,

in my EA 9.3 Ultimate I am creating a profile package to add it to an MDG technology. unfortunately the menu entry "Save package as UML profile" doesn't show up (which was the case in 8.0 before.

The screenshot illustrates it:


This is the behavior in build 931.

What could I be doing wrong?

Lars

7
Hello,

I've made an interesting observation and I'd like to ask if this is intention or something else ;-)

When creating a stereotyped element from the toolbox (where the toolbox entry has been formulated in the toolbox profile in an attribute of the form My::ST(UML::Class) = "ST" then
- the "Type" event property has the value "Class" and
- the "Stereotype" event property has the value "ST"

When the same stereotype element is created in the Project tree using the context menu "Add element" then
- the "Type" event property has the value "My::ST(UML::Class)" and
- the "Stereotype" event property is empty.

So, what ist it? Intention or something else?

thanks and best regards

Lars

8
that's not quite what i did.

In my UML profile I created some new Tagged Value Types (call it ConstTV) using Settings -> UML Type -> Tagged Value Types. I used this because it allows to create constant tagged values. This can be done by specifying:

Type=Const;
Default=....

in the Details Inputbox.

Then I created a stereotype (call it SpecialST) in the UML profile (which extends from another stereotype in another uml profile). And then I added an Attribute to this stereotype SpecialST with the name ConstTV (so it references the new tagged value (see above).

Now when I load my UML profile (using an MDG) I can create new elements of type SpecialST and in the Properties Dialog of this element I see a tagged value which has the name UMLProfile::ConstTV. It also shows as value what I specified after Default= (see above).

So far so good.

Using AI I can iterate throught the tagged values. The funny things start when I reach UMLProfile::ConstTV. It only has a useful value in the Name field and a PropertyGUID. No Value which I have expected to be what follows Default=.

So, the question for me is: how can I use the PropertyGUID to access the tagged value type definition (see above)? Unfortunately I cannot find it in Repository.PropertyTypes (which could have been a reasonable place from my perspective....)


Lars

9
Dear,

I am trying to figure out how I can access the details of a tagged value type using the AI.

In my project I have a tagged value with a propertyGUID and as fas as I have figured out so far, this is the link to the Tagged Value Type defined in the profile used by my project.

However, I need to access this tagged value type (and it seems that this is possible since there is a PropertyType class which has a field Details) but I don't know how.

The PropertyTypes collection of the repository object is empty, so where can I use the propertyGUID to access the tagged value type?

thx.

Lars

10
qwerty, thx for trying.

I also double checked. EA_OnPostNewElement is hit, EA_OnPostNewDiagramObject not.

I am using EA 10 ultimate. probably I am something missing.....


L.

11
Found a workaround:

EA_OnPostNewElement does the trick.



thx.

Lars

12
Dear,

I try to intercept the creation of a diagram object using EA_OnPostNewDiagramObject. The signature of the function is:

public bool EA_OnPostNewDiagramObject(EA.Repository r, EA.EventProperties eP)
{
    return true;  // just a test
}

But when I set a breakpoint in this method and create a new element of a stereotyped class (that I provided in a uml profile) then the breakpoint is not hit. It is only hit, when I create a standard class on the diagram.

Can I make EA call this hook anyway? Did I miss something?

thanks and regards.

Lars

13
Automation Interface, Add-Ins and Tools / Load Add-In as part of an MDG
« on: January 30, 2014, 11:33:10 pm »
Hi all,

is there a way to load an add-in as part of an MDG technology where I have created my modeling language. Alternatively the other way round would also suffice (load the MDG when the add-in is loaded.

In case this question has already been answered somewhere else, a pointer to that place would be nice. My own search didn't deliver any result....

thanks

Lars

14
Automation Interface, Add-Ins and Tools / Create a constant tagged value
« on: January 29, 2014, 12:45:05 am »
Hi all,

I am currently trying to achieve the following:

- create a new UML profile P2 with a new stereotype (say, ST2) extending another stereotype ST1 from another profile P1 (which extends the meta class). This works.

- When P2 is loaded and ST2 is used (class ST2 is instantiated) the resulting instance is to have a constant tagged value with a certain predefined value. This also works, but my question is: Is it the right approach I am taking or is there a better....

Here is what I did:
1. The profile P2 with its type ST2 is defined in a certain MDG with the ID mdgID.
2. There I also created a new Tagged Value Type using "Settings | UML Types -> Tagged Value Types".
3. I specified the tag name "ConstTag" and in the details section I specified the format for the predefined structured tagged value type Const (replacing the value).
4. On the stereotype ST2 in profile P2 I added an attribute with nothing more then name of mdgID::ConstTag.

The result is that when I have used ST2 is I see in the properties dialog of ST2 a tagged value with name "mdgID::ConstTag" and the specified value when in the tree on the left the entry P2 is selected.

Is that the right way or is there a better one??

thanks and best regards

Lars

15
Hi all,

I know about the _makeInstance and the _defaultDiagramType attributes for metaclasses, but they only help to create a new composite diagram. That's not what I want to do.

Is there an api / property that lets me set a specific diagram as a composite diagram as I can do it from the context menu in the user interface (New Diagram -> Select Composite diagram)? Unfortunately the CompositeDiagram property of Element is read-only

thanks in advance

Lars

Pages: [1] 2