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 - ngong

Pages: 1 [2] 3 4 ... 6
16
General Board / Re: Plugin of Script?
« on: October 19, 2017, 09:42:25 pm »
Ok, thank you for your help qwerty, Geert, and Simon.

What I understood is:
I need an add-in or a script applying EA-Matic that puts all interfaces found in a Component diagram and not already process to circle notation, e.g. in case the diagram changes. Alternatively I may also learn about templates. Then I could create a template for Component diagram that shows interfaces by default as circles.
I got to forget the idea of using a shortcut key.

I am pretty sure not to have understood everything - please correct.

Kind Regards

Rolf
p.s. if I would not be able to reduce the number of clicks, any automation would be worthless.

17
General Board / Plugin of Script?
« on: October 18, 2017, 05:12:21 am »
In order to speed up my everyday work I need to automate (put on a shortcut key)
- right-click on an element / Advanced /  Use Circle Notation (preferably for the set of selected elements)

As I do not have any experience in writing a plugin or a script I tried to find out, what would be the best.
However, I found several tutorials that would bind me a day or so, but I could not find out whether it is possible what I am trying to achieve.
Is it possible?
If so what the closest example to choose?

Rolf

18
General Board / too many stereotypes
« on: October 01, 2017, 03:44:03 am »
Is there a way to identify and delete all stereotypes from a model which are not backed-up by an imported profile?

19
General Board / cannot find my classifier profile tag at an interface
« on: September 27, 2017, 05:35:30 am »
Problem:
Tags of a stereotype extending Classifier meta class do not appear at Interfaces.

EA seems to identify only the Component and Class meta classes as inherited from Classifier. According to UML 2.5 DataType and Interface meta classes - at least - should be Classifiers as well.

Motivation:
In order to cope with variants I introduced a stereotype named variant-specific with two tags: variant and replaces. The idea is to have all elements as part of the reference model that do not use the variant-specific stereotype. If a list of variants is entered in the regarding tag, that element contributes to those variants, optionally replacing elements of the same type as found in the reference model. (If you want to exclude an element from a variant, introduce an empty one that overloades it. This could be a whole package.)

As all my variing elements are Components, Classes, DataTypes, and Interfaces I thought it would be a good idea to use Classifier as a meta class for "variant-specific".

My workaround so far:
Define the one stereotype variant-specific as an extension to all meta classes where one likes to see those tags. (This results in the wanted behavior of EA, but what about the UML 2.5 compliance, regarding the set and interrelationsships of meta classes?)

20
General Board / Re: Primitive Types in Tags
« on: September 27, 2017, 05:09:32 am »
The profile helper solved my problem. I would appreciate that you would be able to add tags to stereotypes not by adding attributes (the types selection issue seems to be unclear here), but only by the profile helper. In that case I would have searched for it.

21
General Board / Re: Primitive Types in Tags
« on: September 18, 2017, 09:19:08 pm »
Thank you qwerty for immediate answer - as my need is urgent.

I could not apply your answer to my problem: the "const" attribute of the Attribute of a stereotype (did you mean that one with your answer "a tag can be const"?) has the value "false".
In your link to some explanation of "Tagged Value Type"  I can find the type "String" (with a capital "S"). But I do not find (may be I am blind?) any explanation how to get that list to attributes of a stereotype in order choose "String" from the types pull-down list. When I pull-down the list of types at the stereotypes attribute, I only see some Java types (I guess), missing the String type. I do not see the Tagged Value Types your link points me to. I do not know how to change that list of types. I would be happy if I would be able to choose from the Tagged Value Types your link points to.

However, I did some progress: I found an older stereotype-element with a String attribute. I copied, renamed and linked it to an appropriate meta-class. The String attribute remained and I can enter something in the tags value when applying the profile and that stereotype in a model. (This proofs that I totally do not understand, how Tagged Value Types work, even not in the simplest String case.)

Is there some more context for a newcomer like me?

Kind Regards


Rolf

22
General Board / Primitive Types in Tags
« on: September 18, 2017, 06:05:09 pm »
Sometimes I cannot add any value to a tag of an element of a certain stereotype. I got no clue, why.

The chosen primitive type for the regarding attribute in the profile that defines that stereotype may be the cause for my problem.

How do I define the set of primitive types to choose from in creating the profile? Selecting a certain Product Name in the Code Engineering Datatypes? If so is that binding for the whole model or just one element? What would be the best to choose for creating attributes for stereotypes that should become a string value?

Any advice or link to read would be welcome.

Kind Regards

Rolf

p.s. even if I change the datatype back to int, I am not able to enter any value. Maybe there is different reason why I cannot enter a tag-value than the profile datatype.

23
General Board / Best way to share a package
« on: September 10, 2017, 11:17:29 pm »
Assume 2 or more models sharing a set of basic data types in a certain package.
It has been xmi exported by the front-most project and imported by others at starttime.
All projects refer to the same GUID when they refer to a certain datatype.

Now assume the front-most model extends that basic types package, corrects some flaws and improves some of the types.
What would be the best strategy to get those changes to the other model as well?

24
Bugs and Issues / Re: Problem to check-in to PTC
« on: May 25, 2017, 09:06:06 pm »
thank you, qwerty - a colleague of mine is fluent in scripting EA, will ask him.

@Oliver, PTC Source Integrity has an unresolved issue:

https://www.ptcusercommunity.com/thread/40277
and PTC refuses to change that in a timely manner.

I know of two tools that have problems with that one: EA and VectorCAST.
In general all tools using the XML specification to the extend having lines longer than 16k characters without a new-line.
With source files PTC reads lines, not characters, and cannot accept lines longer than 16k.

EA exports xml files as configurable items for version control. Sometimes they come with lines longer than 16k. I have seen ~150k, but that model is far from ready. I expect even longer lines.
One work-around would be to check-in the xml files as binaries into PTC. This has a bad influence on size and performance of the PTC database for very big files. Exporting an EA package could grow too big.

The other solution that I am taking is, to break long lines by inserting newline characters at places where not only XML but also EA accepts them. A good place is at sub-strings "},{" after the comma. I am inserting as few as possible.

In one post above I am detailing the steps to be taken manually when checking such packages into PTC.
Now I am going to automate this in order to hide this inconvenience from users in other teams.

Best Regards

Rolf

25
Bugs and Issues / Re: Problem to check-in to PTC
« on: May 23, 2017, 11:15:47 pm »
super qwerty,

that is similar to what I did in Java You did it in python, not a regex, and if the "," is not in the next 384 chars, the line gets too long. To achieve searching backwards, you got to introduce some  buffer handling. Add also a good response for any failure that may happen and also looking for non-printable characters, you will get to ~100 lines, what is ~200 in Java. Think to deliver your tool to some other team members abroad.

However, the question remains: If I open in EA the Package Control dialog and choose check-in, how to pipeline the xml through your tool prior to hand it over to PTC? Avoiding the failure message that comes with check-in or put.

Kind Regards


Rolf

26
Bugs and Issues / Re: Problem to check-in to PTC
« on: May 23, 2017, 04:44:43 pm »
Hi qwerty,
looking forward to your regex, finding long lines and inserting a newline at the nearest comma just less than 16536, say POS, and nearest but less than 16536+POS, say POS1 and nearest 16536+POS+POS1...

But the Java code is not the real question. The real question would be: How to automate the procedure to break the attribute string and check the package in.

As it looks for me, EA+PTC seems not to be a very good combination.

Kind Regards

Rolf

27
Bugs and Issues / Re: Problem to check-in to PTC
« on: May 23, 2017, 03:05:14 am »
Has not been that easy, qwerty:

  • The long line can grow very long: currently I am at 150k and the model is less than 20% through.
  • [The long lines in the XMI file are values of just two Tagged values $ea_attclassified and $ea_oprsclassified, that is: breaking the lines has to be done on String level, not XML.

They look like
UML:TaggedValue tag="$ea_attsclassified" value="{B4A1C8DF-1D75-4226-A88B-258C986E2C37},{6E172079-E70F-408F-9630-915719CD029D},{B9C03329-21FF-4120-A27D-F27A7A6A0399}, ... (>150k characters, maybe grows to 1M)

I could have used tokenize function of xslt and substitue every },{ by },\n{.
However, it seems to me likely that I would see heap overflow, if the xslt processing copies attribute values for some reason.
And also it sounds sane to me to put the changes to the EA-XMI file to a minimum, leaving the lines just below 16k.

My solution was a transformation utility (~200 lines POJO Java) that does just that, while paying heed to buffer sizes. I was lucky that the inserted newlines did not harm the EA-import of the XMI file or violate some checksum or the like.
My procedure is as follows:
  • try to check-in the package
  • accept the failure
  • insert as few as possible newlines
  • check in using PTC
  • synchronize version control state in EA

Do you think, I could find a better solution? This one would be hard to sell to my users.

Kind Regards


Rolf

p.s. BTW, I was told by the PTC maintenance that there is an unwritten rule, that a printable String in Java should not contain more than 16k consecutive characters without a newline. I did not know that one. However, if there is some truth in it, it might be an argument for Sparx not to have such long attribute values in their XMI. Even though the better solution would be, that I can define to PTC how to distinguish a character from a binary file.

28
Bugs and Issues / Re: Problem to check-in to PTC
« on: May 21, 2017, 04:43:27 am »
Thank you KP,

i understand: if the current class is int or uint8_t or the like, which is heavily used throughout the model, it es very likely, that $ea_attsclassified gets very long.
If it exceeds 16k, I got trouble using the version control with PTC/Integrity-Source.

Is there any chance to get line breaks in the value of $ea_attsclassified?

29
Bugs and Issues / Alias does not show
« on: May 19, 2017, 03:03:01 am »
What I did:
Placing several InteractionOccurence elements on an InteractionOverview diagram and give some InteractionOccurence an Alias text. Now switch on in the diagrams properties "Use Alias if Available".

What I expected:
to see the Alias text on the diagram instead of the names of InteractionOccurence elements.

What I got:
I still see the names of InteractionOccurence elements.

Doing the same on the same diagram e.g. with Requirement elements works as expected.

30
Bugs and Issues / Re: Problem to check-in to PTC
« on: May 11, 2017, 11:28:42 pm »
I intensified my analysis and found out, that the characterset idea was not the solution. It was a lengthy line that did not go away when formatting the XMI file using Eclipse formatter. For some reason, EA writes the UML:TaggedValue tag="$ea_attsclassified" and the UML:TaggedValue tag="$ea_oprsclassified". For one UML:Class in the XMI holds line 21222 and line 21223 each with 16695 characters.

I substituted that class by a new one and got rid of the problem.
What are these tags for?

Pages: 1 [2] 3 4 ... 6