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

Pages: [1] 2 3
1
General Board / which JavaScript spec/engine EASparx is using?
« on: May 15, 2013, 02:47:30 am »
Does anyone know which JavaScript engine/spec EA Sparx is using / compliant with? I've just discovered that it does support '__noSuchMethod__' to handle calls to unimplemented functions, which is a mozilla extension and not part of standard JS spec.

Can someone from EA Sparx team confirm? How safe it is to assume that engine implementation won't change in the coming versions of the tool?

Vlad

2
General Board / Re: How to convert class attribute into compositio
« on: November 09, 2012, 10:29:23 am »
Thank you for clarification, Simon. As to my knowledge it really has little to do with uml but rather with the specific tool implementing the uml. Can you also Pls clarify, in case I assign a target / source role for the association as classifier attribute, how this relationship will be traversed in the uml model (eg, if I'm to 'walk' the dependency tree). Would The 'attribute' be on the 'path' or it's rather 'offside' (ie, the relationship is always between classifiers, and if you want you can query the 'details' of the relationship to get the details to wich particular attributes it is attached to).

3
General Board / Re: How to convert class attribute into compositio
« on: November 07, 2012, 02:49:08 am »
Thanks for the answers. To reiterate, here is a quote from the comments to the article Greet posted the link to:

Quote
I’d like that tools like EA would be able to automatically show the associated classes as attributes of the class. This would be very helpful when dragging a class to another diagram.

To address some of the questions above:

i do talk about the composition in this particular case, so my example would be more accurately described as (even though it involves the instantiation of a classifier - can't find another easy way to describe it...):
Code: [Select]
//pseudocode:
ClassA {
 ClassB b = new ClassB()
}

Ie, ClassA as the composite object has responsibility for the existence and storage of the composed objects (parts - in this case, ClassB). But generally it doesn't matter much in the context of my question. I'd expect the same principle working working for the aggregations as well (as in your example).

As for the reason or intent of why i need it. It's not to reverse engineer the code, but to 'traverse' the UML model in order to do a sort of 'impact analysis'. I was hoping that if classifier is a composite object defined through typed attribute, i still would be able to traverse the model from ClassA to ClassB through 'composite' or 'aggregate' association. Or yet in other words, when traversing the UML model from an arbitrary element, I need to trace all classifiers of type 'X' which are 'reachable' from that selected element. Similar to what 'Tracability' window within Sparx does, but in a more readable format, with an ability to set various filters. From what I understand, if I just traverse JUST the associations / links, I won't be able to find the references to 'attributes' of type 'X' (same as 'Traceability' tool won't be able to find these relationships to the attributes).

Another thing I can't understand is the 'owns' association. If I drop one classifier within another (eg, Class2 into Class1), Class2 will be 'contained' within Class1 in the project browser, the Traceabiltiy tool will show the relationship between Class1 and Class1.Class2 as 'owns' (ie, <Class1> [owns] <Class1.Class2>), but the Relationship tool will NOT show this relationship. On the other hand, if I define explicit 'nesting' relationship between Class1 and Class2 as 'Class2' nested in 'Class1', the tracability tool will show this relationship in exactly the same fashion (<Class1> [owns] <Class2>), but this time around the relationship WILL be shown in the relationship tool as 'Nesting'. I thought that 'Traceability' and 'Relationship' tools use the same approach when they derive the relationships between the elements... Seems like they are not.

Vlad

4
General Board / How to convert class attribute into composition?
« on: November 06, 2012, 03:49:16 pm »
Hi. Another question I can't find an answer to... Say, I have a Classifier (eg, of type 'Class') named ClassA. Within the class I have an attribute defined typed as ClassB:
Code: [Select]
//pseudocode:
ClassA {
  ClassB b
}

Now, in any OO language, the construct above is a composition and in some other tools I've seen a possibility to switch between different visual representations - as a ClassA with a ClassB attribute OR as a ClassB with a 'composite' association towards ClassB. I can't find this within EA Sparx. From all practical prospective what I'm looking for is a way to get Sparx to automatically generate 'composite' or 'nested' (not sure if this is the right one though) relationship for the typed attributes (so that I can use them in relationship matrix, traceability window, etc).

The closest I could get is to define a relationship between ClassB and ClassA.b at the attribute level (as a source/target role for the association), though the problem is it has to be done manually... I always though typed attributes and composition association are kind of interchangeable...

Thanks!

Vlad

5
General Board / Transparency in alternate image imported from PNG
« on: May 23, 2013, 11:31:04 am »
Hi. I wonder if anyone was successful using PNG image with transparency as an alternate image for the element in EA Sparx? Transparent pixels in all PNG files I tried to import into EA Sparx end up 'black', both in the image preview and on the diagram. Tried to re-save and re-convert PNGs with different set of metadata contained within the file, all to no avail.

Anyone managed to preserve transparency on image import from _any_ format (eg, from emf or wmf)?

Vlad

6
General Board / Re: Model Search scripts - how to pass 'search ter
« on: May 14, 2013, 04:59:09 am »
Well, yes. I do need it to work as an 'add-in' (ie, from within Sparx, rather than standalone app)...

Re: the trick with 'input' dialog box, I just realized there might be no way to do that in JavaScript, only in VBScript. Is that true? Or am I missing the way to display a popup with a textfield input through JavaScript?

Thx. Vlad

7
General Board / Re: Model Search scripts - how to pass 'search ter
« on: May 07, 2013, 05:41:52 am »
My C# is not very good to say the least :) . Also, from my past experience, JavaScript is generally a bit faster to develop with than any 'enterprise' level languages, but your mileage can vary. If I could write add-ins in Java, I would. But from what I understand, Java API is 'read-only' and can't be used to modify the model.

Vlad

8
General Board / Re: Model Search scripts - how to pass 'search ter
« on: May 01, 2013, 12:23:18 am »
Thanks for the responses. Using the Input dialog is the only option I found as well. I thought there might be some hidden object made available in the global context...

RE: the need to use the scripts, the answer is yes - I need to traverse the model to the arbitrary depth - most searches are recursive. It's probable that you can write the same thing in SQL, but I think the statement will be over a page long :) and completely unmaintainable. Plus I'm using JS to compliment EA sparx functionality where it's missing (for autogeneration of the connectors, etc).

On the same note, does anyone use JavaScript extensively within EA Sparx? Any 'gotchas' with memory management etc when traversing a complex model? Does anyone have a set of utility / helper classes they use to simplify major tasks? (I've 'imported' an XML and SQL builder so far to make creating queries and generating XML easier).

Vlad

9
General Board / Model Search scripts - how to pass 'search term'?
« on: April 20, 2013, 12:47:20 am »
Hi. I've created two Model Search scripts: one under group 'Search', another one under the group 'Find in Project'.

Q1: in the 'Find in Project' dialog (Edit->Find in Project) I only see the script under the 'Search' group. The one under the 'Find in Project' group can't be found in that list of predefined searches. Based on the group name, I assumed I should be able to find it there. Where this search is available? From the Context menu? (similar to 'Element', 'Connector' and other search types?) If so, what element should I right click on to see that search?

Q2: for the 'Search' group script that I see in the dialog, is it possible to pass 'Search Term' to the script? I tried to add parameter to the OnSearchScript function (ie, 'function OnSearchScript(searchTerm)'), but when i try to printout this value from within the screen, I see that it is 'undefined'.

Thanks,

Vlad

10
General Board / Re: Package browser not showing all information
« on: November 22, 2012, 08:24:57 am »
... just open the EAP file from within MS Access and knock yourself out - I found having EA Sparx open side-by-side with MS Access helps a lot in figuring out relationships between UML elements and their representation in the sparx DB. Very painful process though.... :(

11
General Board / Re: _subtypeProperty - does anyone have an example
« on: December 25, 2012, 04:39:30 pm »
Thanks. Just made it work. My bad - _subtypeProperty must be set on the <metaclass>, not <stereotype> element. Works like a charm.

12
General Board / _subtypeProperty - does anyone have an example?
« on: December 21, 2012, 09:39:57 am »
Hi. I"m trying to use a _subtypeProperty feature to display a submenu in my custom profile. Trying to follow the doc on sparx website (http://www.sparxsystems.com/enterprise_architect_user_guide/9.3/standard_uml_models/supportedattributes_2.html), but it doesn't work for some reason.

Does anyone have a working example? What 'type' the _subtypeProperty should be defined as? The fully qualified tag name should be set as 'initial value', correct? Tried different combinations, still to no avail...

Vlad

13
General Board / searching Structured Tag Names
« on: December 21, 2012, 02:30:16 am »
Hi. I wonder how do you create a query to search for a specific Structured Tag name? Ie, in the example Sparx doc provides here: http://www.sparxsystems.com/enterprise_architect_user_guide/9.3/standard_uml_models/add_structured_tagged_value_cl.html ,
what's the syntax to search for "BusAddress/Street" tag? Or Sparx treats structured tag values just as a concatenated string? (ie, you can only search for 'BusAddress' tag to contain <street name>)?

14
General Board / Is 'Elements' a reserved word?
« on: December 15, 2012, 08:59:31 am »
This has been driving me nuts lately. I have created a custom profile named 'My Elements'. When I'm trying to use it (either through Resource import or as an MDG technology) the only thing I see as toolbox name is  'My', with 'Elements' word cut off. If I name the profile as 'My Elements Test', I see 'My Test' as toolbox name....

Seems like 'Elements' word is completely 'ignored' by Sparx. Can someone confirm whether it's a bug, reserved word or an issue with my particular installation of Sparx?

Thanks,

Vlad

15
General Board / Re: association class - reference many association
« on: December 15, 2012, 02:48:54 am »
It's not really quite for the purpose of visualization... The idea is to have an effective way to cross reference 'aggregate' relationships with 'more granular' relationships for the purpose of searching the model and 'walking' the model graph through scripts.

To elaborate, if you have a complex system, you'll describe the relationship (L0) between major systems ('CompositeA and CompositeB' in the example). Then when you go to more granular level, you'll elaborate how that relationship between major systems is realized through other relationships (L1-3) defined between the 'subsystems' (ClassA1-3 and ClassB1-3 in the example).

Eg, L0 may represent 3 various ways CompositeA and CompositeB systems can exchange the information - through SOAP interface, REST and raw TCP/IP socket. L1-3 would actually show the 'Point to Point' connections to the subsystems which realize this particular ways of communication. The example above does resemble composite elements, with ports & parts defined as part of the composite, but that approach doesn't exactly match my needs... So, looking for the alternative.

Vlad

Pages: [1] 2 3