Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Error indicator on transition in State Machine - Using SysML on Mars(I am seeing an error indicator on a transition in a State Machine - not sure why. Is it me or a bug?)
Error indicator on transition in State Machine - Using SysML on Mars [message #1715640] Tue, 24 November 2015 21:31 Go to next message
Rob Collins is currently offline Rob CollinsFriend
Messages: 2
Registered: November 2015
Junior Member
I have created a very simple state machine diagram. I am seeing an error indicator on the transition itself and message "A Transition with invalid text string found. <Transition> fred RootElement::Design::Lamp::StateMachine1::Region1 EMF Problem" in the Model Validation window.

I am not sure if this is a bug - or if I have done something wrong.

Does anybody have a tutorial on using State Machines in Papyrus - just incase I am getting this wrong.

Thank you..
Re: Error indicator on transition in State Machine - Using SysML on Mars [message #1715758 is a reply to message #1715640] Wed, 25 November 2015 18:21 Go to previous messageGo to next message
Rob Collins is currently offline Rob CollinsFriend
Messages: 2
Registered: November 2015
Junior Member
I believe that I have a work-around for this....

A clue in another posting suggested that sometimes entering names on an edge does not result in the name being added correctly. This can result in a blank name - and hence the error. However, this can be corrected by simply adding the name for the transition in the Properties tab. This, in itself, does not clear the error report (hence a name and an error marker on the attachment in my previous post). The trick then is simply to clear the error indicator using the model validation tool. The error is no longer indicated and does not re-appear.
Re: Error indicator on transition in State Machine - Using SysML on Mars [message #1715824 is a reply to message #1715758] Thu, 26 November 2015 13:07 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi, Rob,

It seems likely that the ergonomics of the in-line editor for the
transition labels could be improved if it is so easy to end up with
error markers on all of them. Would you mind raising a bug describing
your modeling steps?

At the least, a problem marker that was added automatically by the
in-line editor should be removed automatically when that problem is
fixed by whatever means (even by editing properties in the Properties
view).

Cheers,

Christian


On 2015-11-25 18:21:15 +0000, Rob Collins said:

> I believe that I have a work-around for this....
>
> A clue in another posting suggested that sometimes entering names on an
> edge does not result in the name being added correctly. This can result
> in a blank name - and hence the error. However, this can be corrected
> by simply adding the name for the transition in the Properties tab.
> This, in itself, does not clear the error report (hence a name and an
> error marker on the attachment in my previous post). The trick then is
> simply to clear the error indicator using the model validation tool.
> The error is no longer indicated and does not re-appear.
Re: Error indicator on transition in State Machine - Using SysML on Mars [message #1715832 is a reply to message #1715824] Thu, 26 November 2015 13:34 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
Hi,

Quote:
At the least, a problem marker that was added automatically by the
in-line editor should be removed automatically when that problem is
fixed by whatever means (even by editing properties in the Properties
view).


This kind of problem marker indicates a parse error in the last text input. The parse error itself cannot be fixed in any way other than entering new, valid input in the same editor. I believe the last known (erroneous) input is stored in a stereotyped comment under the transition. It is the presence of this comment that triggers the validation error (And marker)

The main issue here is that the Transition's direct editor is *not* a name editor. It specifies the trigger, effect, guard... with a very obscure grammar. And typing only a name results in a parse-error because it is not compliant to this obscure grammar

So three things need to be fixed here:

- Improve the grammar to make it less obscure (Especially with proper documentation, completion, examples...)
- Improve the grammar to accept partial input, similar to what has already been done for the Properties, Ports and Parameters (Typing only a name will set only the name, rather than produce a parse error)
- Remove the validation marker when the stereotyped comment owned by the transaction is deleted (This is not done automatically, because the validation marker is not owned by the comment itself)

Regards,
Camille


Camille Letavernier
Re: Error indicator on transition in State Machine - Using SysML on Mars [message #1715867 is a reply to message #1715832] Thu, 26 November 2015 19:14 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi, Camille,

Thanks for the clarification. However, I would propose different fixes:

* change the in-line editor to edit the name of a transition as for all
other named elements
* do not use validation problem markers for non-model-validation problems

I think the second point is more important, because it also bothers me
in the attribute and operation parsing. Poorly typed text does not
actually result in an invalid model in these cases, because the parser
can't interpret the user's intention and so doesn't actually change the
model. And even if it did change the model, any potential validation
problems would be different from what this error message is saying.
The bottom line for me is that this textual input parsing failure is
not a model validation problem, so it should not be presented in the
Problems view as such. Yes, the next invocation of the editor can
restore the previous (badly formed) text and present an error
decoration, but I think that's as far as it should go.

Does that make sense?

cW

On 2015-11-26 13:34:46 +0000, Camille Letavernier said:

> Hi,
>
> Quote:
>> At the least, a problem marker that was added automatically by the
>> in-line editor should be removed automatically when that problem is
>> fixed by whatever means (even by editing properties in the Properties
>> view).
>
>
> This kind of problem marker indicates a parse error in the last text
> input. The parse error itself cannot be fixed in any way other than
> entering new, valid input in the same editor. I believe the last known
> (erroneous) input is stored in a stereotyped comment under the
> transition. It is the presence of this comment that triggers the
> validation error (And marker)
>
> The main issue here is that the Transition's direct editor is *not* a
> name editor. It specifies the trigger, effect, guard... with a very
> obscure grammar. And typing only a name results in a parse-error
> because it is not compliant to this obscure grammar
>
> So three things need to be fixed here:
>
> - Improve the grammar to make it less obscure (Especially with proper
> documentation, completion, examples...)
> - Improve the grammar to accept partial input, similar to what has
> already been done for the Properties, Ports and Parameters (Typing only
> a name will set only the name, rather than produce a parse error)
> - Remove the validation marker when the stereotyped comment owned by
> the transaction is deleted (This is not done automatically, because the
> validation marker is not owned by the comment itself)
>
> Regards,
> Camille
Re: Error indicator on transition in State Machine - Using SysML on Mars [message #1715884 is a reply to message #1715867] Fri, 27 November 2015 08:55 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
Hi,

Quote:
* change the in-line editor to edit the name of a transition as for all other named elements


I disagree on this. If these advanced editors are usable and efficient, they should be enabled by default. So I'd rather fix them than disable them by default. The current X-Text integration is fast enough, once the required plug-ins have been loaded, so I don't see any reason to disable them. Some of the grammars have been enhanced so that if you don't type any specific keyword (e.g. just a plain string), it will be recognized as a Name anyway (And all other items will be ignored/unchanged). This works well for Properties and Parameters IMHO, so we should follow this path

Quote:
* do not use validation problem markers for non-model-validation problems


That makes sense, but I suspect that a user typing text quickly will not have time to notice the validation marker appearing before the input text is closed (In case of an erroneous input). So he will expect the model to be changed, and will not have any information that this actually failed until he reopens the direct editor.

So I'm not sure what the best solution would be. Since these direct editors can be used in Diagrams, Tables and Model Explorer (And even Properties view in some cases), it's difficult to add a "graphical" marker only.

Camille


Camille Letavernier
Re: Error indicator on transition in State Machine - Using SysML on Mars [message #1715902 is a reply to message #1715884] Fri, 27 November 2015 13:15 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi, Camille,

See some replies in-line, below.

Christian


On 2015-11-27 08:55:30 +0000, Camille Letavernier said:

> Hi,
>
> Quote:
>> * change the in-line editor to edit the name of a transition as for all
>> other named elements
>
>
> I disagree on this. If these advanced editors are usable and efficient,
> they should be enabled by default. So I'd rather fix them than disable
> them by default. The current X-Text integration is fast enough, once
> the required plug-ins have been loaded, so I don't see any reason to
> disable them. Some of the grammars have been enhanced so that if you
> don't type any specific keyword (e.g. just a plain string), it will be
> recognized as a Name anyway (And all other items will be
> ignored/unchanged). This works well for Properties and Parameters IMHO,
> so we should follow this path

If these editors can reliably be used to set the name of any element by
just typing a name, then I'm satisfied with that. I was concerned that
it seemed like the name of a transition couldn't be set from the
editor, only guards and other such details.


>
> Quote:
>> * do not use validation problem markers for non-model-validation problems
>
>
> That makes sense, but I suspect that a user typing text quickly will
> not have time to notice the validation marker appearing before the
> input text is closed (In case of an erroneous input). So he will expect
> the model to be changed, and will not have any information that this
> actually failed until he reopens the direct editor.

If there's a parsing error, perhaps the Return key shouldn't dismiss
the direct-edit field and the user should be required to hit Escape to
dismiss it without completing. The user will notice that the editor
doesn't close :-)

The Escape key would have to be smart enough to know to store the
user's partial input, I suppose. Or maybe some other gesture involving
the Return key could be used.

Also, I don't like how these ill-formed text strings are attached to
elements *in the model* using stereotypes. These annotations are
shared with the rest of the team in Git/CDO/whatever. They should
instead be stored in the workspace metadata area, perhaps after the
fashion of the sash model.

On the subject of the problem marker for incomplete/ill-formed text
specifications, I would be satisfied if it just wasn't a model
validation problem marker type. It should be a marker type dedicated
to bad text input. It may even be useful to define marker attributes
unique to these that validation problems don't need.

>
> Camille
Re: Error indicator on transition in State Machine - Using SysML on Mars [message #1756423 is a reply to message #1715884] Thu, 16 March 2017 16:19 Go to previous message
Rupert Schlick is currently offline Rupert SchlickFriend
Messages: 9
Registered: November 2009
Junior Member
Hi Camille,

I know this is an old thread but could you point me (and others stumbling over this thread) where to find documentation of the advanced transition text editor?

Best

Rupert
Previous Topic:Display text and id in a requirement diagram
Next Topic:Custom shapes for Associations
Goto Forum:
  


Current Time: Fri Mar 29 10:39:01 GMT 2024

Powered by FUDForum. Page generated in 0.06291 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top