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.


Topics - RIL

Pages: 1 [2] 3
16
Bugs and Issues / Changes in Tools | Options | * not saved
« on: November 22, 2015, 04:13:33 am »
Hi,
Using EA 12.1.1222 on Win10 I'm not able to disable (hide) Stereotypes for the Project Browser.

Failed attempt:
0. Trying to hide stereotypes in project browser.
1. When unchecking the check box "Hide Stereotypes" in Tools | Options | Project Browser,
2. then EA shows a Dialog saying that changes doesn't take effect until after restarting EA, and
3. after restart any changes previously done in the Tools | Options form remains unchanged.
-> More precise: no changes  whatsoever in that dialog are preserved after a restart of EA.

Expected result:
Any changes done in the previous session should be preserved and be in effect after restarting EA. None of this happens.

Hopefully this can be fixed soon, since my project browser is more or less "unreadable" due to the <<ugly>> sterotypes cluttering the whole thing (yes, I'm doing my own profiles/MDGs, which makes things even worse).

Q: Is the any workaround for this?

// Rolf

17
Bugs and Issues / Custom profile links navigable wrong way
« on: November 21, 2015, 12:47:33 pm »
Hi,

I made my own MDG profile, but when I drop an association from my ToolBox always end up being Navigable only in the backwards direction.

However, the Source->Target Direction is correct, but as said, the Navigability always ends up Source<--Target (that is, "backwards") and not Source to --> Target which one would expect.

This gets very irritating... especially since the direction is correct, and thus I would not want to draw the link the other way (from Target to Source). That means that either I will get the Navigability wrong or the Direction wrong. Hmpf.

Using EA 12.1.1222

[highlight]EDIT:
I found the special attributes Direction and _Source/Target Navigability here: http://sparxsystems.com/enterprise_architect_user_guide/12.1/building_models/supportedattributes_2.html ... which solved my direction problem.[/highlight]


// Rolf

18
Bugs and Issues / ConnectorEnd-Tags doesn't export Default values
« on: January 30, 2015, 07:22:07 am »
For some reason the ConnectorEnd Tags (in table: t_taggedvalues) does not emit Default values when reading them via API (VBScript) although the predefined Default values are perfectly displayed in the GUI.

Instead the values emitted is only "$ea_notes="  (as silly as it looks)

Only if I change any Default TV value to a non default, then the value is emitted as expected (False or True or whatever other values which are not defined as Default for the TV).

Q: Is there any way I can extract the true (Default) values from the TVs using VBScript, other that redefining those default values again in code when reading them? (They are already defined in the Settings\UML Types\Tagged Value Types).

I'm using EA 11.1.1113.
----

Is there any hope that this will be fixed anytime soon? I really really do need non-hacky TVs also for ConnectorEnds as it's crucial for several ORM projects I'm working on.

// Rolf Lampa

19
Bugs and Issues / xmi 1.0 import fails with OCL expression
« on: December 09, 2013, 02:48:27 am »
Hi,
[Edit: EA 10.0.1006]

I try to import a xmi file containing the following node containing an OCL expression, but I get an error:
Code: [Select]
<Foundation.Extension_Mechanisms.TaggedValue.value>firstName + ' ' + lastName</Foundation.Extension_Mechanisms.TaggedValue.value>
Error message says (translated from Swedish):

Code: [Select]
DAO.Database [3075]

Syntax error (operator missing) i the query expression "firstName + ' ' lastName".

It doesn't make sense to me, but if there's a workaround I'd appreciate to know how I could 'armor' the expression as to not upset EA.

(BTW, is EA trying to evaluate the ocl-expression or what? Why would EA care? It should just treat the TaggedValue as a string).

// Rolf

20
Bugs and Issues / Roles can't have TVs via Stereotypes(?)
« on: February 06, 2013, 04:06:44 am »
Essentials from another (unanswered) post.


I have a problem with TaggedValues associated with Roles. The TVs which I defined for my own extended stereotyped association role (<<bold.role>>) doesn't "attach" to the roles, only to the "host" association. See screenshot far below.

I defined the stereotype (<<bold.role>>) and added the TVs (in the same manner as I did successfully with Classes, Attributes and Associations, (that is, Stereotype(bold.role)--extends-->MetaClass(Association) )) but for some reason the TVs doesn't show up as one set of TVs per Role.

* Using EA 9.3 (EA10.0 couldn't export/import my code gen templates)
* I manually ensured that the roles has the correct stereotype.
* I also updated the model with "Sync Tagged Values and Constraints..." as usual, but the result is still as shown in the screenshot below.  
* I conclude that TVs can't be attached to individual Roles via the stereotype.

I assume that I'm not doing anything wrong here since I sucessfully did the same thing for Classes, Attributes and Associations. Either I'm doing something wrong or EA has a bug, or is lacking in fundamental functionality.

If not possible to assign TVs to an individual role then that means that I's have to duplicating (otherwise) global TVs and give them different names depending on Role, truly a nightmare if the user decides to swap the direction of a link...

// Rolf Lampa

Fig. The down-arrow indicates that the TaggedValues for roles should show up under respective role, not under the association:


21
Bugs and Issues / CodeGen a LIST of classes into one (1) code file?
« on: January 17, 2013, 05:24:42 am »
Hi all,

I'm trying to make a Code Generator Template that collects all Classes of a certain Package (including sub packages) and then generate ONE (1) file containing data about all the classes.

I'm starting from a Delphi template, trying to list classes as I would with class members like attributes and operations, but the generator keeps asking me for a file name for each class (I want only one file, although I could of course later post process the output and merge into one file, but I'd like to see EA finnish the job in one shot).

I'm I asking for too much? So far I get the following output (but as said, I get only one class in my output):

Code: [Select]
VERSION 19
(Model
      "Business Classes"
      "AbstractRoot"
      ""
      ""
            (Class
                  "LingualDomain"
                  "RootObject"
                  "" // Attribs...
                  "" // Operations...
                  "" // More class specs...
            )
      )
      (Associations
      // ...
      )
)

// ROlf Lampa

22
Bugs and Issues / EA10 - Note pane covered by grey area
« on: January 17, 2013, 03:02:23 am »
Hi,

Testing EA10: The Note pane is covered by a grey area to the upper left (square, 5x5 inches or so). Looks like a bug. Covers the upper left note area including the upper frame.

// Rolf Lampa

23
Hi,
I'm surprised that a MDG profile (still) can't apply role stereotypes for associations (and any TaggedValue that would be associated with that Stereotype).

I mean, the following special attributes below do exist :

* _SourceMultiplicity
* _TargetMultiplicity
* _SourceNavigability
* _TargetNavigability


... so why not add also the following two attributes

* _SourceStereotypes
* _TargetStereotypes?

I asked about "auto-insertion" of these role Stereotypes (perhaps) two years ago, but it seems like it still have not slipped in.

And yes I know, one CAN drop Role items from the ToolBox with the desired Stereotypes (which will then apply its stereotype to the association ends)  but since links often have typical configurations (different settings in each end) one would save a lot of time when modelling if one could have complete (pre-) configured Connections by simply drawing the link and then go directly to fill in the TVs that comes with the stereotypes.

// Rolf

24
I'm designing code templates (in EA12.1). The File template usually generates one file per class, but I would like to also generate one file per Connection/Association.  Is there any way to trick the code generator to do that :question

// Rolf

25
Has anyone made a Code Generator for VBScript (or JScript) which they would consider sharing with other EA users?

// Rolf Lampa

26
Ok, now I'm mastering picking up from Go-source code most of what I want to pick up (skipping body code).  The next step would be to convince EA to start liking the AST I managed to create. :)

I made an MDG technology with the nBNF an all that stuff, which indicate no errors so its OK, but on import EA only recognizes a "class"/struct "WebServer" from my test source code below, and it also makes a model class in a class diagram of it (see also the AST in the next post which is parsed from the source code below).  

On code import no (Model) PACKAGE is created (expected "Server"), and
no IMPORT clauses are imported (four lines in "import (...)", and
no METHODs are imported (and thus not added as members either), and
no PARENT classes are created (called embedding in Go, superclass(es) in OOP),
no members whatsoever were recognized.

So the AST structure below is obviously wrong, but how should the main nodes be organized and named in order for EA to be able to pick the correct identifiers up as to create a model from it?

Code: [Select]
package Server

import  (
      "fmt"
      "../LingualDomain"
      mux "github.com/gorilla/mux"
      "net/http"
)

var UnitVariable string, v int,
      row2 bool

type WebServer struct {
      AmObject
      sys.AmObject
      EA__STEREOTYPE string
}
Code: [Select]
func  Init() {
}      
Code: [Select]
func (self *WebServer) GetHandler(w http.ResponseWriter, r *http.Request) {
}      

func (self *WebServer) PutHandler(w http.ResponseWriter, r *http.Request) {
}      

func (self *WebServer) PostHandler(w http.ResponseWriter, r *http.Request) (bool, *TType) {
}      

func (self *WebServer) TestParamA() TypeA1 { }
func (self *WebServer) TestParamB() (TypeB1) { }
func (self *WebServer) TestParamC() (TypeC1, *TypeC2, TypeC3) {
}      
func (self *WebServer) TestParamD() (nameD1 TypeD2, nameD2 *TypeD2, nameD3 TypeD3) {
}      
Code: [Select]
func  Main() {
}      
(Although Init() and Main() are not true members of struct WebServer I'd still like to draw them as member methods, but stereotype them as <<proc>> in order to generate them as package level funcs instead (as the source code looks above) .

Anyway, the AST parsed from the above source code is posted in a separate post.

So with some pointers about how a correct(ed) AST structure should look (and correct node names), I'll be able to fix the rest, I think.

// Rolf Lampa

27
Now a bunch of questions, but they're not probably too very "advanced" for experienced nBNF developers.

Q1: Print tree - Is it possible to print out the AST-tree to file or to clipboard?

Q2: Expand tree - Is it possible to auto-expand the AST-tree after new parsing (it kills me to open the AST-treeview Xxx times a day while designing the rules...)

Q3: Script - Can the AST-tree be accessed via script?

Q4: MDG remnant is stuck - How can I remove an old MDG which seems to have got stuck. When I uppdate new versions I can uninstall the MDGs and install them again, except for one (the first with this name/id) which seems to have got stuck. It won't let go when I untick the MDG and drop the path to its location. Some caching problem I guess.

Q5: Two legs in the Parse tree? - I notice that one can parse a source file along two "legs", flat FILE level and/or drill down the PACKAGE path. Can both be parsed, or do I have to chose one, and if so, which one to go? I know in advance that I will need to lump several classes together into one file, which gives me the gut feeling that it's the PACKAGE path I want to trod. Is this assumption correct, or does it matter which path to parse? or are both needed for different scenarios? I will generate both belonging to functions classes ("methods") and flat "freestanding" functions ("functions") with only the package as the "owning parent".

Q6: Method ownership - How do I "bind" a method to a class regarding the fact that several classes can (will) be located in the same source file. Example:

[size=12]
// Type def:
// ----------------------------------------------------------------------
type ClassOne struct {
    AttributeOne int
    /* SomeMethodOne() string */
}

type ClassTWO struct {
    AttributeTWO int
    /* SomeMethodTWO() string */
}

// Implement:
// ----------------------------------------------------------------------
func (self *ClassOne) SomeMethodOne() string {
    // ...
}

func (self *ClassTWO) SomeMethodTWO() string {
    // ...
}[/size]


The Q again more clearly - In regular imperative code one would keep track of the class names and then match the method with the class somehow, but I guess that's not how it's done in nBNF. But METHOD's doesn't seem to have a "parent" or "owner" property, so how do I match a method to the right class?

// Rolf

28
Hi all,

Code generation (EA10) can generate one file per class, or one file per package (all containing classes into one file)

Now my question is: Can I from within the CodeGen template determine which approach is selected by the user?

The problem I'm trying to solve is related to imports section. The compiler won't accept not-used or repetetive identical import sections, so I define imports in a tagged value per class and per package. Thus I need to know whether to read the packageTag or classTag depending on the user's approach.

Or is there any other better way of achieving the same thing?

// Rolf

29
I'm trying to pick up COMMENT as a node in the AST tree, but it seems like it doesn't even try as long as <COMMENT> is defined as a token (in the beginning of the nBNF file).

I noticed that the Simple Example started with the following declaration for tokens, and, it seems to me, thus suppressing node generation from any of those tokens:

Code: [Select]
<TOKENS>      ::=      <WHITESPACE> |
                  <COMMENT> |            <--- Huh?
                  token(<NUMBER>) |
                  token(<QUOTE>) token(<STRING_BODY>) token(<QUOTE>) |
                  token( keywords() ) |
                  token(<IDENTIFIER>);

What I'm at is that since EA recognizes the term COMMENT as a distinct model element, then why is a comment considered being only a "token" (and thus can't be picked up and stored in the model)?

I might be entirely off track here though. Am I missing the meaning of token vsv terms/named nodes? Something else? Or all of it? :)

I couldn't find a clear description in the help about how EA parser treats tokens compared to named nodes.

// Rolf

30
This really puzzles me.  For some reason it seems impossible to get more detail out of a string literal than only whole strings between the quote chars (using skip()) as shown below.

Only the first expression below works, all others fail, no matter how I try. Since "<IDENTIFIER>" is registered as a "token" I've tried to define my own <MYIDENTIFIER> (assuming that token would somehow cause a problem) but not even the simplest string (like "fmt") will be possible to detect and strip out with anything but the skip() command between the quotes. Why is this? (see far below what end I want to achieve)

Strings to Match:

Code: [Select]
import (
    "fmt"
    f "fmt"
    sys1 "path.to.system"
    sys2 "path/to/system"
    // or a mix of the above
)

AST Expressions:

Code: [Select]
<importPackage>      ::= [<IDENTIFIER>)] <stringliteral>;            // * OK

<importPackage> ::= [<IDENTIFIER>)] "\"" <qualifiedName> "\"";      // FAIL
<importPackage> ::= [<IDENTIFIER>)] "\"" <qualifiedPath> "\"";      // FAIL
<importPackage> ::= [<IDENTIFIER>)] "\"" <IDENTIFIER> "\"";      // FAIL

<qualifiedName>      ::= <IDENTIFIER> ("." <IDENTIFIER>)*;            // Nah
<qualifiedPath>      ::= <IDENTIFIER> ("/" <IDENTIFIER>)*;            // Nah
<stringLiteral>      ::= "\"" skip("\"") "\"";                  // * Works!

What I want to achieve is picking the path (qualifier) and name parts out of the import packages (strings).  For example I'd like to separate the alias, the path and the final name parts from this sampole code:
Code: [Select]
import (
    sys "github.com/riluser/mysyspkg"
)
like so:
    [*]ALIAS: sys
    [*]PATH: github.com/riluser/
    [*]NAME: mysyspkg
    [/list]

    But for now I can only separate the alias and the string literal as a whole. Delimiters simply don't work, nor does it work with any kind of expression but the skip() function between quotes.

    How can that be? Puzzled. I must be doing something wrong.

    // Rolf

    Pages: 1 [2] 3