Home » Modeling » GMF (Graphical Modeling Framework) » Defining audits in GMF
Defining audits in GMF [message #75934] |
Wed, 08 November 2006 12:41  |
Eclipse User |
|
|
|
Originally posted by: christian.daenekas.informatik.uni-oldenburg.de
Hello,
I just again got stuck while enriching my editors functionality. I want
to define some audits using Java. So I defined an Audit Container, an
Audit rule, a Domain Element Target (i set this to an EClass named
operator that is represented by a Node in the editor). After that I
generated the gmfgen model and set the properties as described in the
mindmap tutorial
( http://wiki.eclipse.org/index.php/GMF_Tutorial_Part_2#Valida tion). This
means the 'Validation Enabled' property of the Gen Diagram element is
set to 'true', as is the 'Validation Decorators' property and the
'Validation Provider Priority' I have set to medium. All properties i
didn´t mention above have their initial values. In the generated code I
simple added "return false" so that every Node of the operator type
should produce an error. But when i use the editor i made nothing
happens validationwise. Any ideas?
Greetings,
Christian
P.S.: This is the implementation in the ValidationProvider class. Just
for your interest.
/**
* @generated NOT
*/
static class JavaAudits {
/**
* @generated NOT
*/
private static Boolean classSetConstraint(operator self) {
return false;
}
}
|
|
| | | |
Re: Defining audits in GMF [message #76195 is a reply to message #76179] |
Thu, 09 November 2006 06:57   |
Eclipse User |
|
|
|
Originally posted by: christian.daenekas.informatik.uni-oldenburg.de
Hi Radek,
I don´t know if I fully understand you there, but the problem I tried to
describe ;) is that constraints are not checked while i change things in
a Diagram, although I defined them to be used in live mode. So I guessed
there must be something wrong with the audits I defined. But since they
are correctly processed when I use Diagram>Validate I guess the audits
and constraints are correctly defined. But maybe I have to specify other
things in order to get the "live mode" to work. Any idea what could be
missing?
Greetings,
Christian
Radek Dvorak wrote:
> Hi Christian,
>
> Including LIVE constraints in BATCH mode (on demand) validation is done by
> desing here.
> This could eventually detect violations introduced by external
> modifications, as inside the editor,
> it's guarded LIVE live validation.
> However, they should allways be involved in model modifications in the GMF
> editor.
>
> Regards,
> /Radek
|
|
| |
Re: Defining audits in GMF [message #78728 is a reply to message #76211] |
Sat, 18 November 2006 22:42   |
Eclipse User |
|
|
|
Originally posted by: atoulme.intalio.com
Hi Radek,
you mean that when the live validation is not decorating the faulty shapes ?
Is this a bug or a missing feature and will it be adressed ?
Is there a bugzilla bug for this ? Is it scheduled for 2.0 ?
Radek Dvorak wrote:
> Christian,
>
> It's sufficient to set the 'Live' mode for your constraint and it should be
> checked on model changes in the editor.
> Perhaps, what might be confusing for you is that the current GMF validation
> implementation does not support
> updating problem markers that resulted from on demand validation.
>
> Could you please check whether your java constraint method gets called at
> all?
> I have just successfully passed such a usecase.
>
> /Radek
>
>
> "Christian Dänekas" <christian.daenekas@informatik.uni-oldenburg.de> wrote
> in message news:eiv54a$i6$1@utils.eclipse.org...
>> Hi Radek,
>>
>> I don´t know if I fully understand you there, but the problem I tried to
>> describe ;) is that constraints are not checked while i change things in a
>> Diagram, although I defined them to be used in live mode. So I guessed
>> there must be something wrong with the audits I defined. But since they
>> are correctly processed when I use Diagram>Validate I guess the audits and
>> constraints are correctly defined. But maybe I have to specify other
>> things in order to get the "live mode" to work. Any idea what could be
>> missing?
>>
>> Greetings,
>> Christian
>>
>> Radek Dvorak wrote:
>>> Hi Christian,
>>>
>>> Including LIVE constraints in BATCH mode (on demand) validation is done
>>> by desing here.
>>> This could eventually detect violations introduced by external
>>> modifications, as inside the editor,
>>> it's guarded LIVE live validation.
>>> However, they should allways be involved in model modifications in the
>>> GMF editor.
>>>
>>> Regards,
>>> /Radek
>
>
|
|
|
Re: Defining audits in GMF [message #78889 is a reply to message #78728] |
Mon, 20 November 2006 10:20   |
Eclipse User |
|
|
|
Hi Christian,
Yes, 'the live validation is not decorating the faulty shapes'.
In principal, there should not be a need to decorate shapes found invalid
during 'Live' validation.
The purpose of the live validation is to prevent model elements from
getting into an invalid state, so there
should be no elements to mark as faulty.
Of course, this is true only for 'Live' constraints with severity ERROR or
higher, as the modifying transaction
is rolled-back only if (validationStatus.getSeverity() >= IStatus.ERROR).
This logic is imposed by the transaction framework.
So for instance, 'Live' warnings produced by validation would not appear
as decorations,
though you might expect this.
On the other hand, having a 'Live' warning for a transaction outcome is
something
I find a bit strange from the constraint perspective, as the causing
modification gets
commited anyway and this can be captured by the 'Batch' validation easily.
So in my opinion, it is a good batch mode candidate.
The design does not address these rather rare cases as it can be handled
by on demand execution
of batch validation, which as I have said, includes also live constraints.
Or do you see another problem that I have not perceived?
Regards,
/Radek
On Sun, 19 Nov 2006 04:42:21 +0100, Antoine Toulmé <atoulme@intalio.com>
wrote:
> Hi Radek,
> you mean that when the live validation is not decorating the faulty
> shapes ?
> Is this a bug or a missing feature and will it be adressed ?
>
> Is there a bugzilla bug for this ? Is it scheduled for 2.0 ?
>
> Radek Dvorak wrote:
>> Christian,
>> It's sufficient to set the 'Live' mode for your constraint and it
>> should be checked on model changes in the editor.
>> Perhaps, what might be confusing for you is that the current GMF
>> validation implementation does not support
>> updating problem markers that resulted from on demand validation.
>> Could you please check whether your java constraint method gets called
>> at all?
>> I have just successfully passed such a usecase.
>> /Radek
>> "Christian Dänekas" <christian.daenekas@informatik.uni-oldenburg.de>
>> wrote in message news:eiv54a$i6$1@utils.eclipse.org...
>>> Hi Radek,
>>>
>>> I don´t know if I fully understand you there, but the problem I tried
>>> to describe ;) is that constraints are not checked while i change
>>> things in a Diagram, although I defined them to be used in live mode.
>>> So I guessed there must be something wrong with the audits I defined.
>>> But since they are correctly processed when I use Diagram>Validate I
>>> guess the audits and constraints are correctly defined. But maybe I
>>> have to specify other things in order to get the "live mode" to work.
>>> Any idea what could be missing?
>>>
>>> Greetings,
>>> Christian
>>>
>>> Radek Dvorak wrote:
>>>> Hi ,
>>>>
>>>> Including LIVE constraints in BATCH mode (on demand) validation is
>>>> done by desing here.
>>>> This could eventually detect violations introduced by external
>>>> modifications, as inside the editor,
>>>> it's guarded LIVE live validation.
>>>> However, they should allways be involved in model modifications in
>>>> the GMF editor.
>>>>
>>>> Regards,
>>>> /Radek
>>
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
|
|
|
Re: Defining audits in GMF [message #78910 is a reply to message #78889] |
Mon, 20 November 2006 12:11   |
Eclipse User |
|
|
|
Originally posted by: atoulme.intalio.com
Radek,
yes, you replied perfectly,
I am not so troubled by the fact that live validation isn't decorating
the shapes.
My problem is that we would expect an error message when a live
validation constraint is not respected, as it would be less frustrating
for the user. At least he would understand what he has done wrong.
Antoine aka Christian :)
Radek Dvorak wrote:
> Hi Christian,
>
> Yes, 'the live validation is not decorating the faulty shapes'.
>
> In principal, there should not be a need to decorate shapes found
> invalid during 'Live' validation.
> The purpose of the live validation is to prevent model elements from
> getting into an invalid state, so there
> should be no elements to mark as faulty.
>
> Of course, this is true only for 'Live' constraints with severity ERROR
> or higher, as the modifying transaction
> is rolled-back only if (validationStatus.getSeverity() >= IStatus.ERROR).
> This logic is imposed by the transaction framework.
> So for instance, 'Live' warnings produced by validation would not appear
> as decorations,
> though you might expect this.
>
> On the other hand, having a 'Live' warning for a transaction outcome is
> something
> I find a bit strange from the constraint perspective, as the causing
> modification gets
> commited anyway and this can be captured by the 'Batch' validation easily.
> So in my opinion, it is a good batch mode candidate.
>
> The design does not address these rather rare cases as it can be handled
> by on demand execution
> of batch validation, which as I have said, includes also live constraints.
>
> Or do you see another problem that I have not perceived?
>
>
> Regards,
> /Radek
>
>
> On Sun, 19 Nov 2006 04:42:21 +0100, Antoine Toulmé <atoulme@intalio.com>
> wrote:
>
>> Hi Radek,
>> you mean that when the live validation is not decorating the faulty
>> shapes ?
>> Is this a bug or a missing feature and will it be adressed ?
>>
>> Is there a bugzilla bug for this ? Is it scheduled for 2.0 ?
>>
>> Radek Dvorak wrote:
>>> Christian,
>>> It's sufficient to set the 'Live' mode for your constraint and it
>>> should be checked on model changes in the editor.
>>> Perhaps, what might be confusing for you is that the current GMF
>>> validation implementation does not support
>>> updating problem markers that resulted from on demand validation.
>>> Could you please check whether your java constraint method gets
>>> called at all?
>>> I have just successfully passed such a usecase.
>>> /Radek
>>> "Christian Dänekas"
>>> <christian.daenekas@informatik.uni-oldenburg.de> wrote in message
>>> news:eiv54a$i6$1@utils.eclipse.org...
>>>> Hi Radek,
>>>>
>>>> I don´t know if I fully understand you there, but the problem I
>>>> tried to describe ;) is that constraints are not checked while i
>>>> change things in a Diagram, although I defined them to be used in
>>>> live mode. So I guessed there must be something wrong with the
>>>> audits I defined. But since they are correctly processed when I use
>>>> Diagram>Validate I guess the audits and constraints are correctly
>>>> defined. But maybe I have to specify other things in order to get
>>>> the "live mode" to work. Any idea what could be missing?
>>>>
>>>> Greetings,
>>>> Christian
>>>>
>>>> Radek Dvorak wrote:
>>>>> Hi ,
>>>>>
>>>>> Including LIVE constraints in BATCH mode (on demand) validation is
>>>>> done by desing here.
>>>>> This could eventually detect violations introduced by external
>>>>> modifications, as inside the editor,
>>>>> it's guarded LIVE live validation.
>>>>> However, they should allways be involved in model modifications in
>>>>> the GMF editor.
>>>>>
>>>>> Regards,
>>>>> /Radek
>>>
>
>
>
> --Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
|
|
| |
Re: Defining audits in GMF [message #78967 is a reply to message #78947] |
Mon, 20 November 2006 17:10   |
Eclipse User |
|
|
|
Originally posted by: atoulme.intalio.com
Thanks, I'll give it a try just now :).
Radek Dvorak wrote:
> Hi Antoine,
>
> Sorry for the name mismatch :)
>
> Please, try the following:
> 1) put the following fragment into the plugin.xml of your GMF editor and
> provide your own context ID
>
> <extension id="org.eclipse.gmf.ecore.editor.UIDefaultCtx"
> point="org.eclipse.emf.validation.ui.UIRegisteredClientContext ">
> <!-- use the client context ID from your GMF diagram editor -->
> <clientContext id="org.eclipse.gmf.ecore.editor.DefaultCtx"/>
> </extension>
>
> 2) add 'org.eclipse.emf.validation.ui' plugin dependency
> 3) choose 'Preferences/Model Validation/Show live validation errors in'
>
> I will add support for this into the GMF editor generation procedure.
>
> /Radek
>
>
>
> "Antoine Toulmé" <atoulme@intalio.com> wrote in message
> news:ejsnil$8j8$1@utils.eclipse.org...
>> Radek,
>> yes, you replied perfectly,
>> I am not so troubled by the fact that live validation isn't decorating the
>> shapes.
>> My problem is that we would expect an error message when a live validation
>> constraint is not respected, as it would be less frustrating for the user.
>> At least he would understand what he has done wrong.
>>
>> Antoine aka Christian :)
>> Radek Dvorak wrote:
>>> Hi Christian,
>>>
>>> Yes, 'the live validation is not decorating the faulty shapes'.
>>>
>>> In principal, there should not be a need to decorate shapes found invalid
>>> during 'Live' validation.
>>> The purpose of the live validation is to prevent model elements from
>>> getting into an invalid state, so there
>>> should be no elements to mark as faulty.
>>>
>>> Of course, this is true only for 'Live' constraints with severity ERROR
>>> or higher, as the modifying transaction
>>> is rolled-back only if (validationStatus.getSeverity() >= IStatus.ERROR).
>>> This logic is imposed by the transaction framework.
>>> So for instance, 'Live' warnings produced by validation would not appear
>>> as decorations,
>>> though you might expect this.
>>>
>>> On the other hand, having a 'Live' warning for a transaction outcome is
>>> something
>>> I find a bit strange from the constraint perspective, as the causing
>>> modification gets
>>> commited anyway and this can be captured by the 'Batch' validation
>>> easily.
>>> So in my opinion, it is a good batch mode candidate.
>>>
>>> The design does not address these rather rare cases as it can be handled
>>> by on demand execution
>>> of batch validation, which as I have said, includes also live
>>> constraints.
>>>
>>> Or do you see another problem that I have not perceived?
>>>
>>>
>>> Regards,
>>> /Radek
>>>
>>>
>>> On Sun, 19 Nov 2006 04:42:21 +0100, Antoine Toulmé <atoulme@intalio.com>
>>> wrote:
>>>
>>>> Hi Radek,
>>>> you mean that when the live validation is not decorating the faulty
>>>> shapes ?
>>>> Is this a bug or a missing feature and will it be adressed ?
>>>>
>>>> Is there a bugzilla bug for this ? Is it scheduled for 2.0 ?
>>>>
>>>> Radek Dvorak wrote:
>>>>> Christian,
>>>>> It's sufficient to set the 'Live' mode for your constraint and it
>>>>> should be checked on model changes in the editor.
>>>>> Perhaps, what might be confusing for you is that the current GMF
>>>>> validation implementation does not support
>>>>> updating problem markers that resulted from on demand validation.
>>>>> Could you please check whether your java constraint method gets called
>>>>> at all?
>>>>> I have just successfully passed such a usecase.
>>>>> /Radek
>>>>> "Christian Dänekas" <christian.daenekas@informatik.uni-oldenburg.de>
>>>>> wrote in message news:eiv54a$i6$1@utils.eclipse.org...
>>>>>> Hi Radek,
>>>>>>
>>>>>> I don´t know if I fully understand you there, but the problem I tried
>>>>>> to describe ;) is that constraints are not checked while i change
>>>>>> things in a Diagram, although I defined them to be used in live mode.
>>>>>> So I guessed there must be something wrong with the audits I defined.
>>>>>> But since they are correctly processed when I use Diagram>Validate I
>>>>>> guess the audits and constraints are correctly defined. But maybe I
>>>>>> have to specify other things in order to get the "live mode" to work.
>>>>>> Any idea what could be missing?
>>>>>>
>>>>>> Greetings,
>>>>>> Christian
>>>>>>
>>>>>> Radek Dvorak wrote:
>>>>>>> Hi ,
>>>>>>>
>>>>>>> Including LIVE constraints in BATCH mode (on demand) validation is
>>>>>>> done by desing here.
>>>>>>> This could eventually detect violations introduced by external
>>>>>>> modifications, as inside the editor,
>>>>>>> it's guarded LIVE live validation.
>>>>>>> However, they should allways be involved in model modifications in
>>>>>>> the GMF editor.
>>>>>>>
>>>>>>> Regards,
>>>>>>> /Radek
>>>
>>>
>>> --Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
>
>
|
|
|
Re: Defining audits in GMF [message #78971 is a reply to message #78967] |
Mon, 20 November 2006 18:49  |
Eclipse User |
|
|
|
Originally posted by: atoulme.intalio.com
ok now I have some feedback on live validations.
Thanks!
Antoine
Antoine Toulmé wrote:
> Thanks, I'll give it a try just now :).
> Radek Dvorak wrote:
>> Hi Antoine,
>>
>> Sorry for the name mismatch :)
>>
>> Please, try the following:
>> 1) put the following fragment into the plugin.xml of your GMF editor
>> and provide your own context ID
>>
>> <extension id="org.eclipse.gmf.ecore.editor.UIDefaultCtx"
>> point="org.eclipse.emf.validation.ui.UIRegisteredClientContext ">
>> <!-- use the client context ID from your GMF diagram editor -->
>> <clientContext id="org.eclipse.gmf.ecore.editor.DefaultCtx"/>
>> </extension>
>>
>> 2) add 'org.eclipse.emf.validation.ui' plugin dependency
>> 3) choose 'Preferences/Model Validation/Show live validation errors in'
>>
>> I will add support for this into the GMF editor generation procedure.
>>
>> /Radek
>>
>>
>>
>> "Antoine Toulmé" <atoulme@intalio.com> wrote in message
>> news:ejsnil$8j8$1@utils.eclipse.org...
>>> Radek,
>>> yes, you replied perfectly,
>>> I am not so troubled by the fact that live validation isn't
>>> decorating the shapes.
>>> My problem is that we would expect an error message when a live
>>> validation constraint is not respected, as it would be less
>>> frustrating for the user. At least he would understand what he has
>>> done wrong.
>>>
>>> Antoine aka Christian :)
>>> Radek Dvorak wrote:
>>>> Hi Christian,
>>>>
>>>> Yes, 'the live validation is not decorating the faulty shapes'.
>>>>
>>>> In principal, there should not be a need to decorate shapes found
>>>> invalid during 'Live' validation.
>>>> The purpose of the live validation is to prevent model elements from
>>>> getting into an invalid state, so there
>>>> should be no elements to mark as faulty.
>>>>
>>>> Of course, this is true only for 'Live' constraints with severity
>>>> ERROR or higher, as the modifying transaction
>>>> is rolled-back only if (validationStatus.getSeverity() >=
>>>> IStatus.ERROR).
>>>> This logic is imposed by the transaction framework.
>>>> So for instance, 'Live' warnings produced by validation would not
>>>> appear as decorations,
>>>> though you might expect this.
>>>>
>>>> On the other hand, having a 'Live' warning for a transaction outcome
>>>> is something
>>>> I find a bit strange from the constraint perspective, as the causing
>>>> modification gets
>>>> commited anyway and this can be captured by the 'Batch' validation
>>>> easily.
>>>> So in my opinion, it is a good batch mode candidate.
>>>>
>>>> The design does not address these rather rare cases as it can be
>>>> handled by on demand execution
>>>> of batch validation, which as I have said, includes also live
>>>> constraints.
>>>>
>>>> Or do you see another problem that I have not perceived?
>>>>
>>>>
>>>> Regards,
>>>> /Radek
>>>>
>>>>
>>>> On Sun, 19 Nov 2006 04:42:21 +0100, Antoine Toulmé
>>>> <atoulme@intalio.com> wrote:
>>>>
>>>>> Hi Radek,
>>>>> you mean that when the live validation is not decorating the faulty
>>>>> shapes ?
>>>>> Is this a bug or a missing feature and will it be adressed ?
>>>>>
>>>>> Is there a bugzilla bug for this ? Is it scheduled for 2.0 ?
>>>>>
>>>>> Radek Dvorak wrote:
>>>>>> Christian,
>>>>>> It's sufficient to set the 'Live' mode for your constraint and it
>>>>>> should be checked on model changes in the editor.
>>>>>> Perhaps, what might be confusing for you is that the current GMF
>>>>>> validation implementation does not support
>>>>>> updating problem markers that resulted from on demand validation.
>>>>>> Could you please check whether your java constraint method gets
>>>>>> called at all?
>>>>>> I have just successfully passed such a usecase.
>>>>>> /Radek
>>>>>> "Christian Dänekas"
>>>>>> <christian.daenekas@informatik.uni-oldenburg.de> wrote in message
>>>>>> news:eiv54a$i6$1@utils.eclipse.org...
>>>>>>> Hi Radek,
>>>>>>>
>>>>>>> I don´t know if I fully understand you there, but the problem I
>>>>>>> tried to describe ;) is that constraints are not checked while i
>>>>>>> change things in a Diagram, although I defined them to be used in
>>>>>>> live mode. So I guessed there must be something wrong with the
>>>>>>> audits I defined. But since they are correctly processed when I
>>>>>>> use Diagram>Validate I guess the audits and constraints are
>>>>>>> correctly defined. But maybe I have to specify other things in
>>>>>>> order to get the "live mode" to work. Any idea what could be
>>>>>>> missing?
>>>>>>>
>>>>>>> Greetings,
>>>>>>> Christian
>>>>>>>
>>>>>>> Radek Dvorak wrote:
>>>>>>>> Hi ,
>>>>>>>>
>>>>>>>> Including LIVE constraints in BATCH mode (on demand) validation
>>>>>>>> is done by desing here.
>>>>>>>> This could eventually detect violations introduced by external
>>>>>>>> modifications, as inside the editor,
>>>>>>>> it's guarded LIVE live validation.
>>>>>>>> However, they should allways be involved in model modifications
>>>>>>>> in the GMF editor.
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>> /Radek
>>>>
>>>>
>>>> --Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
>>
>>
|
|
|
Goto Forum:
Current Time: Fri Jul 18 17:24:53 EDT 2025
Powered by FUDForum. Page generated in 0.06672 seconds
|