Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Dynamic message while defining Audit Rules
Dynamic message while defining Audit Rules [message #235669] Wed, 08 July 2009 15:16 Go to next message
Maxence VANBÉSIEN is currently offline Maxence VANBÉSIENFriend
Messages: 40
Registered: July 2009
Location: Lille, France
Member
Hello,

When defining label mapping, it is possible to define a pattern (e.g. {0}
-> {1}), and this pattern is formatted at runtime.

It is possible to define the same kind of process for messages resulting
from Audit Rules, by using patterns or things like that?

(As an example, in the gmfmap file, I would like to put as message a thing
like "The type is not set for attribute named {0}", and then, format this
pattern at runtime only, to have dynamic error messages.)

Thanks in advance for your answer,

Maxence
Re: Dynamic message while defining Audit Rules [message #235735 is a reply to message #235669] Thu, 09 July 2009 10:49 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Maxence,

It's not possible now. You can file a request asking for it.

-----------------
Alex Shatalin
Re: Dynamic message while defining Audit Rules [message #236002 is a reply to message #235735] Fri, 10 July 2009 13:23 Go to previous message
Maxence VANBÉSIEN is currently offline Maxence VANBÉSIENFriend
Messages: 40
Registered: July 2009
Location: Lille, France
Member
Hello !

Just for information, I continued to have a look at this issue and I found
something very interesting. In fact, while manipulating audit constraints,
which extend the AbstractModelConstraint class, the message stored in the
plugin.xml file is formatted using the NLS Framework.

So, when I create my error message using
validationContext.createFailureStatus("myString"), the message stored in
the plugin.xml is formatted with the provided parameter. Si, if I follow
the NLS rules, e.g. I set my plugin.xml message to "Value is not correct
for {0}", the result will be "Value is not correct for myString" in the
Eclipse problems view.

Hope this helps ;)

Maxence
Previous Topic:WrappingLabel question
Next Topic:Generate diagram code programmatically
Goto Forum:
  


Current Time: Thu Apr 09 05:34:32 GMT 2020

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

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

Back to the top