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

Pages: [1] 2
1
General Board / link class/element atributes with Requirements?
« on: August 07, 2007, 05:38:12 am »
Hello,
I would like to know if it is possible to link an attribute of a given class (from Deployment View Model) with specific Requirements (from Req. Model), as same as you can do it with the class itself.

going a bit further, would be great to have some symbolic names in the Requirements as attributes (by now expressed in my model as tagged values or sub-requirements at Req. Model). these are the attributes I need to link to the attributes of my class from Deployment View.

thanks for any useful in advance,

Best Regards,

Pablo

2
General Board / [UPDATED]importing XMI with tagged values into EA?
« on: July 11, 2007, 03:50:55 am »
Hi,

just an update for the records: I am trying now the EA-API. it is more clear and consistent, thinking about future changes or developments.

Regards,

Pablo

-----

Hello all,
we have some weird old code we have to get into EA Model (and from then on drop that old code).

since no available reverse-engineering tool fits into that code, we wrote our own parser, capable to generate XMI, that could be exported in EA. so far so good.

the problem is, we have lot of comments and special information in that code we want to get in the XMI so:

- there is no place for plain comments into standard XMI for artifacts and theirs operations and attributes?

- we decided to put the special information into Tagged Values. it means, this is anyway no more plain XMI 2.1, but XMI with EA-Extensions.

Is there any description available of this extended XMI we are mapping to? any XML Schema available?

we have partially reconstructed the EA-Extended XMI structure but we don't know what it is still necessary or what can be freely omitted. f.e. what about the thecustomprofile:* nodes? and the EAStub ones?

So far we get the basic information and structure into EA, without comments and the tagged values.

thanks for any useful information in advance.

Regards,

Pablo



3
General Board / MDG Link or MDG Integration for Eclipse?
« on: July 05, 2007, 04:44:57 am »
Hello all,
I am really interesting to try the interaction between EA and Eclipse and I found these two tools on the Sparx Site: MDG Link and MDG Integration.

but the difference between both is not clear for me, even pricing is almost the same, and just few information about features  are given; no comparison between both is available (I haven't found it so far).

since we would like to explore all possibilities with EA and Eclipse in the mean future, we don't want to build a barrier for ourselves by buying the less appropriate tool.

I would appreciate if someone could give me some clarifying information.

thanks in advance,

Pablo

4
General Board / python code generator /reverse engineering
« on: May 22, 2007, 12:29:33 am »
Hello all,

I was trying to use EA for Python coding generation from UML Class Diagramms and got some problems:
- def __init__ is not generated at all.
- members are not initialized under __init_ using "self.".
- aggregations are not implemented as well

by the other hand, reverse engineering from existing code has some issues:
- "self. " attributes are not recognized at all.
- associations and aggregations are omitted.

and also I wanted to create an implementation model from abstract model using MDA transform, but no Python is available... Do someone has some solution for that?

Are some of you dealing with same problems? did you find a solution for that? would be great to exchange some experiences about that and if necessary join forces to get problems solved :)

I looked in the forums and didn't find anything useful so far. :(

thanks for any answer in advance,

Regards from sunny Frankfurt,

Pablo





5
hi,

thanks for the idea, but it doesn't work. :(

any idea if newer EA versions >7.0.818 can handle this issue?

Best Regards and thanks in advance again,

Pablo


6
Hi Thomas,
thanks for the report. In my project I came across to the issue and now I am looking for a workaround..

does someone have any suggestion?

currently I have:
(Python, EA 7.0.818)

            aNode = theMethod.Parameters.AddNew(strName,strType)
            aNode.Default = strValue_Default
            aNode.Stereotype = strStereotype
            aNode.Notes = strNotes
            aNode.Kind = strKind

            aNode.Update
            theMethod.Parameters.Refresh
            theMethod.Update

at the end all values are filled in model, except strStereotype as the only one missing....

thanks for any help in advance!

Pablo

7
Hi David,

well, I found a bug  in my program as said before :( , so thats the real reason and by moving into Notes the whole stuff will be stable and robust.

regarding tagged values, we put there chunks of not yet fully classified information - apart from plain comments, OCL and etc, etc - that otherwise would get lost. That strings may be much longer than state labels, so some colleagues came across to similar length-issues.

However, the hint about domains is good, I guess we can make use of it. Thanks again. :)

Pablo

8
Hi David,

well as said before we get that weird expressions doing some weird reverse engineering of some weird code.. :(

I also think it is safer to use Notes for that. maybe in the EA help the limit of the fields should be mentioned clearly for someone having same use cases like me (same applies f.e. to Tagged Values, where some colleagues are reporting some issues)

I check the Constraint Fields later on, and now is working :)

thanks for the promptly answers and have a good day,

Pablo



9
Hi David,
thanks for the hints, but in Help File -> the EA Object Model -> Code Samples -> Element Extras is just the opposite: first the Name of the constraint, then the Type?? by Attributes (Work with Attributes) and Methods it seems to be the same.... ???

it seems anyway it was a bug somewhere else in my program, now seems to be working, regardless of length of the expression. Was already thinking on moving all to notes...

regards,

Pablo








10
Hi  David,

ok. I will try to be clearer.

lets say I have two OCL expressions:
(by now the content and syntax is not important, just the length)

myOCL1 = 'aaaaa'

myOCL2 = 'bbbbbbbbbbbbbbbbbbbbbbbcdsfsfbbbbbbbsdfsdbbbbbbbbbbbsfbbb'

# make it even longer...

then I call the following in my program using both variables like here:

....
theOCL = aNode.Constraints.AddNew(myOCL1 ,'OCL')
if not theOCL.Update:
   ... raise error
     
aNode.Constraints.Refresh
....

where aNode is a variable (Attribute in EA-API jargon)

after calling this using myOCL1 and doing all that refreshing stuff, I check under Attribute Properties -> Constraints and I can find there as expected the whole myOCL1.

But by using myOCL2 there is nothing there.

hope this is clearer now, otherwise let me know.

EA version: 7.0.818

thanks for any help!

Pablo






11
Hello,
using automation I am filling very long expressions in OCL constraint/precondition fields for some methods and attributes (not of my choice, we are doing reverse engineering)

It works fine by short expressions (e.g. 30 characters) but not at longer ones (100 or more characters)... is there any know limitation?

thanks for any help in advance,

Pablo

12
Hi David,
thank you very much, it works perfectly!!!

But I guess you would agree with me that this tweak isn't/shouldn't be the typical and only one way to accomplish it, specially when you got used to customize Toolbars in MS world.

What I was doing is just to drag the available tools from Tools|Customize|Commands|Categories|Tools to the Toolbars, as I always do in MS Office.

Regards,

Pablo



13
Hello,

I just want to add some custom tool (same like Wordpad or Windows Explorer) to the Toolbar. With Tools->Customize I can add that commands but when I close EA these settings get lost. ???

Is there anyway to fix it?

Thanks for any help in advance,

Regards,

Pablo


14
hi David,


Quote
OK Pablo,

Try calling Repository.RefreshModelView(0) to force the entire model to refresh. [Note that the parameter is the number zero, not a string or a variable.]

--> no change at all

Whether or not that works, try Repository.RefreshOpenDiagrams(<FullReload>). [FullReload is a boolean parameter. Try both values - false refreshed the diagram display, true will force the diagrams to be repopulated from the repository.

--> using any of them causes an error and EA must close, even running in background (not opened at all) (how can I add here a screenshot?)

finally, calling:
self.Repository.RefreshModelView(0)
print "\n Repository.BatchAppend:",self.Repository.BatchAppend
print "\n Repository.EnableUIUpdates:", self.Repository.EnableUIUpdates
print "\n Repository.EnableCache:", self.Repository.EnableCache
                       #self.Repository.RefreshOpenDiagrams(False)

I get:
Repository.BatchAppend: False

Repository.EnableUIUpdates: True

Repository.EnableCache: False

[img src=file:///D:/work/.../eaerror.gif][/img]

what is the problem at all??

thanks again for any help.

Best Regards,

Pablo

15
yes,
I did try both:
                       self.Repository.AdviseElementChange(theMethod.ParentID)

first only this , then with the following:              
        self.Repository.RefreshModelView(self.theBasePackage_ID)

where Repository and PackageID were defined before.

Regards,

Pablo

Pages: [1] 2