Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Customizing the traversal of Java Audit Rules
Customizing the traversal of Java Audit Rules [message #193449] Thu, 19 June 2008 08:17 Go to next message
Eclipse UserFriend
Originally posted by: edebauer.freenet.de

Hey out there again,

now i want to customize the traversal strategy of Java Audits. After
generation i have a ValidationProvider that contains a private inner
class CtxSwitchStrategy, which implements ITraversalStrategy. This
sounds for me like i could tweak the traversal strategy just like i need
it. But the constructor of this inner class is never instantiated. Thus
i do not have any chances to customize this strategy.

Can somebody tell me, why the traversal strategy is ignored? Have i
missed to set an option within the gmfgen, oder the map file?

Thans for the help again.
Perhaps you Christian can help me again, as you have written some parts
of the validation in emf ;)

With kind regards,
Ede
Re: Customizing the traversal of Java Audit Rules [message #193963 is a reply to message #193449] Fri, 20 June 2008 13:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cdamus.zeligsoft.com

--=-yOOmbbHRHD7r9uBXvGFF
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi, Ede,

Sorry for the long delay.

If the traversal strategy is registered on the extension point, then the
DefaultTraversalStrategy implementation provided by the framework will
use it for any selection that meets its client-context matching
criteria.

I'm not familiar with the details of what GMF generates for Audits. I'd
suggest debugging a validation operation from the point where the
TraversalStrategyManager::getTraversalStrategy(EObject) method is
consulted by the validator, and see why your implementation is not being
selected.

HTH,

Christian


On Thu, 2008-06-19 at 10:17 +0200, Ede Bauer wrote:

> Hey out there again,
>
> now i want to customize the traversal strategy of Java Audits. After
> generation i have a ValidationProvider that contains a private inner
> class CtxSwitchStrategy, which implements ITraversalStrategy. This
> sounds for me like i could tweak the traversal strategy just like i need
> it. But the constructor of this inner class is never instantiated. Thus
> i do not have any chances to customize this strategy.
>
> Can somebody tell me, why the traversal strategy is ignored? Have i
> missed to set an option within the gmfgen, oder the map file?
>
> Thans for the help again.
> Perhaps you Christian can help me again, as you have written some parts
> of the validation in emf ;)
>
> With kind regards,
> Ede

--=-yOOmbbHRHD7r9uBXvGFF
Content-Type: text/html; charset=utf-8

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.16.0">
</HEAD>
<BODY>
Hi, Ede,<BR>
<BR>
Sorry for the long delay.<BR>
<BR>
If the traversal strategy is registered on the extension point, then the DefaultTraversalStrategy implementation provided by the framework will use it for any selection that meets its client-context matching criteria.<BR>
<BR>
I'm not familiar with the details of what GMF generates for Audits.&nbsp; I'd suggest debugging a validation operation from the point where the TraversalStrategyManager::getTraversalStrategy(EObject) method is consulted by the validator, and see why your implementation is not being selected.<BR>
<BR>
HTH,<BR>
<BR>
Christian<BR>
<BR>
<BR>
On Thu, 2008-06-19 at 10:17 +0200, Ede Bauer wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">Hey out there again,</FONT>

<FONT COLOR="#000000">now i want to customize the traversal strategy of Java Audits. After </FONT>
<FONT COLOR="#000000">generation i have a ValidationProvider that contains a private inner </FONT>
<FONT COLOR="#000000">class CtxSwitchStrategy, which implements ITraversalStrategy. This </FONT>
<FONT COLOR="#000000">sounds for me like i could tweak the traversal strategy just like i need </FONT>
<FONT COLOR="#000000">it. But the constructor of this inner class is never instantiated. Thus </FONT>
<FONT COLOR="#000000">i do not have any chances to customize this strategy.</FONT>

<FONT COLOR="#000000">Can somebody tell me, why the traversal strategy is ignored? Have i </FONT>
<FONT COLOR="#000000">missed to set an option within the gmfgen, oder the map file?</FONT>

<FONT COLOR="#000000">Thans for the help again.</FONT>
<FONT COLOR="#000000">Perhaps you Christian can help me again, as you have written some parts </FONT>
<FONT COLOR="#000000">of the validation in emf ;)</FONT>

<FONT COLOR="#000000">With kind regards,</FONT>
<FONT COLOR="#000000">Ede</FONT>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>

--=-yOOmbbHRHD7r9uBXvGFF--
Re: Customizing the traversal of Java Audit Rules [message #194177 is a reply to message #193963] Mon, 23 June 2008 17:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: edebauer.freenet.de

Hey Christian,

thanks for your help again. Beside the fact that i have to traverse the
Model in particular way, i need to tweak the order in which the
constraints are traversed. This results from the fact that some
constraints cannot be checked if other constraints already have
evaluated to false in my model. Thus i need a customized traversal of
the constraints, if one model object is beeing validated. Is there a
change to do this? ... I would then look at the result of an particular
constraint while validating another constraint and then skip or directly
evaluate to true if the other constraint was evaluated to false.

By the way another question. Have you written the whole framework by
yourself, as i can't see any other authors there :)?

Kind Regards,
Ede


Christian W. Damus schrieb:
> Hi, Ede,
>
> Sorry for the long delay.
>
> If the traversal strategy is registered on the extension point, then the
> DefaultTraversalStrategy implementation provided by the framework will
> use it for any selection that meets its client-context matching criteria.
>
> I'm not familiar with the details of what GMF generates for Audits. I'd
> suggest debugging a validation operation from the point where the
> TraversalStrategyManager::getTraversalStrategy(EObject) method is
> consulted by the validator, and see why your implementation is not being
> selected.
>
> HTH,
>
> Christian
>
>
> On Thu, 2008-06-19 at 10:17 +0200, Ede Bauer wrote:
>> Hey out there again,
>>
>> now i want to customize the traversal strategy of Java Audits. After
>> generation i have a ValidationProvider that contains a private inner
>> class CtxSwitchStrategy, which implements ITraversalStrategy. This
>> sounds for me like i could tweak the traversal strategy just like i need
>> it. But the constructor of this inner class is never instantiated. Thus
>> i do not have any chances to customize this strategy.
>>
>> Can somebody tell me, why the traversal strategy is ignored? Have i
>> missed to set an option within the gmfgen, oder the map file?
>>
>> Thans for the help again.
>> Perhaps you Christian can help me again, as you have written some parts
>> of the validation in emf ;)
>>
>> With kind regards,
>> Ede
Re: Customizing the traversal of Java Audit Rules [message #194184 is a reply to message #194177] Mon, 23 June 2008 17:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cdamus.zeligsoft.com

--=-vsZqpofL7haN+KC7zhOD
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi, Ede,

The framework doesn't provide a mechanism for communicating such
dependencies between constraints. That sounds like a neat enhancement
for the 1.3 release, if you care to raise it in bugzilla. I can imagine
a declarative model of dependencies, including "implies" (declared on
constraint A, A implies B means that B needs not be evaluated when A is
false) and "requires" (declared on constraint B, B requires A means that
B needs not be evaluated when A is false). I am intending a new feature
in 1.3 that defines a constraint model (using EMF) for a new
constraint-provider that doesn't use the plugin.xml, but instead models
the meta-data in a more EMF-ish way.

Until then, your constraint will have to check its pre-conditions and
simply return "true" on its own.

This code was my first-ever EMF-related assignment, 5 years ago, at IBM.
It was largely an individual task, but more recently there were some
substantial contributions from colleagues at IBM (in particular, some
cool new features from David Cummings in the 1.2 release). There are
also, of course, contributions from the Eclipse community-at-large.

Cheers,

Christian

On Mon, 2008-06-23 at 19:24 +0200, Ede Bauer wrote:

> Hey Christian,
>
> thanks for your help again. Beside the fact that i have to traverse the
> Model in particular way, i need to tweak the order in which the
> constraints are traversed. This results from the fact that some
> constraints cannot be checked if other constraints already have
> evaluated to false in my model. Thus i need a customized traversal of
> the constraints, if one model object is beeing validated. Is there a
> change to do this? ... I would then look at the result of an particular
> constraint while validating another constraint and then skip or directly
> evaluate to true if the other constraint was evaluated to false.
>
> By the way another question. Have you written the whole framework by
> yourself, as i can't see any other authors there :)?
>
> Kind Regards,
> Ede
>
>
> Christian W. Damus schrieb:
> > Hi, Ede,
> >
> > Sorry for the long delay.
> >
> > If the traversal strategy is registered on the extension point, then the
> > DefaultTraversalStrategy implementation provided by the framework will
> > use it for any selection that meets its client-context matching criteria.
> >
> > I'm not familiar with the details of what GMF generates for Audits. I'd
> > suggest debugging a validation operation from the point where the
> > TraversalStrategyManager::getTraversalStrategy(EObject) method is
> > consulted by the validator, and see why your implementation is not being
> > selected.
> >
> > HTH,
> >
> > Christian
> >
> >
> > On Thu, 2008-06-19 at 10:17 +0200, Ede Bauer wrote:
> >> Hey out there again,
> >>
> >> now i want to customize the traversal strategy of Java Audits. After
> >> generation i have a ValidationProvider that contains a private inner
> >> class CtxSwitchStrategy, which implements ITraversalStrategy. This
> >> sounds for me like i could tweak the traversal strategy just like i need
> >> it. But the constructor of this inner class is never instantiated. Thus
> >> i do not have any chances to customize this strategy.
> >>
> >> Can somebody tell me, why the traversal strategy is ignored? Have i
> >> missed to set an option within the gmfgen, oder the map file?
> >>
> >> Thans for the help again.
> >> Perhaps you Christian can help me again, as you have written some parts
> >> of the validation in emf ;)
> >>
> >> With kind regards,
> >> Ede

--=-vsZqpofL7haN+KC7zhOD
Content-Type: text/html; charset=utf-8

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.16.0">
</HEAD>
<BODY>
Hi, Ede,<BR>
<BR>
The framework doesn't provide a mechanism for communicating such dependencies between constraints.&nbsp; That sounds like a neat enhancement for the 1.3 release, if you care to raise it in bugzilla.&nbsp; I can imagine a declarative model of dependencies, including &quot;implies&quot; (declared on constraint A, A implies B means that B needs not be evaluated when A is false) and &quot;requires&quot; (declared on constraint B, B requires A means that B needs not be evaluated when A is false).&nbsp; I am intending a new feature in 1.3 that defines a constraint model (using EMF) for a new constraint-provider that doesn't use the plugin.xml, but instead models the meta-data in a more EMF-ish way.<BR>
<BR>
Until then, your constraint will have to check its pre-conditions and simply return &quot;true&quot; on its own.<BR>
<BR>
This code was my first-ever EMF-related assignment, 5 years ago, at IBM.&nbsp; It was largely an individual task, but more recently there were some substantial contributions from colleagues at IBM (in particular, some cool new features from David Cummings in the 1.2 release).&nbsp; There are also, of course, contributions from the Eclipse community-at-large.<BR>
<BR>
Cheers,<BR>
<BR>
Christian<BR>
<BR>
On Mon, 2008-06-23 at 19:24 +0200, Ede Bauer wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">Hey Christian,</FONT>

<FONT COLOR="#000000">thanks for your help again. Beside the fact that i have to traverse the </FONT>
<FONT COLOR="#000000">Model in particular way, i need to tweak the order in which the </FONT>
<FONT COLOR="#000000">constraints are traversed. This results from the fact that some </FONT>
<FONT COLOR="#000000">constraints cannot be checked if other constraints already have </FONT>
<FONT COLOR="#000000">evaluated to false in my model. Thus i need a customized traversal of </FONT>
<FONT COLOR="#000000">the constraints, if one model object is beeing validated. Is there a </FONT>
<FONT COLOR="#000000">change to do this? ... I would then look at the result of an particular </FONT>
<FONT COLOR="#000000">constraint while validating another constraint and then skip or directly </FONT>
<FONT COLOR="#000000">evaluate to true if the other constraint was evaluated to false.</FONT>

<FONT COLOR="#000000">By the way another question. Have you written the whole framework by </FONT>
<FONT COLOR="#000000">yourself, as i can't see any other authors there :)?</FONT>

<FONT COLOR="#000000">Kind Regards,</FONT>
<FONT COLOR="#000000">Ede</FONT>


<FONT COLOR="#000000">Christian W. Damus schrieb:</FONT>
<FONT COLOR="#000000">&gt; Hi, Ede,</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; Sorry for the long delay.</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; If the traversal strategy is registered on the extension point, then the </FONT>
<FONT COLOR="#000000">&gt; DefaultTraversalStrategy implementation provided by the framework will </FONT>
<FONT COLOR="#000000">&gt; use it for any selection that meets its client-context matching criteria.</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; I'm not familiar with the details of what GMF generates for Audits. I'd </FONT>
<FONT COLOR="#000000">&gt; suggest debugging a validation operation from the point where the </FONT>
<FONT COLOR="#000000">&gt; TraversalStrategyManager::getTraversalStrategy(EObject) method is </FONT>
<FONT COLOR="#000000">&gt; consulted by the validator, and see why your implementation is not being </FONT>
<FONT COLOR="#000000">&gt; selected.</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; HTH,</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; Christian</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; On Thu, 2008-06-19 at 10:17 +0200, Ede Bauer wrote:</FONT>
<FONT COLOR="#000000">&gt;&gt; Hey out there again,</FONT>
<FONT COLOR="#000000">&gt;&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt; now i want to customize the traversal strategy of Java Audits. After </FONT>
<FONT COLOR="#000000">&gt;&gt; generation i have a ValidationProvider that contains a private inner </FONT>
<FONT COLOR="#000000">&gt;&gt; class CtxSwitchStrategy, which implements ITraversalStrategy. This </FONT>
<FONT COLOR="#000000">&gt;&gt; sounds for me like i could tweak the traversal strategy just like i need </FONT>
<FONT COLOR="#000000">&gt;&gt; it. But the constructor of this inner class is never instantiated. Thus </FONT>
<FONT COLOR="#000000">&gt;&gt; i do not have any chances to customize this strategy.</FONT>
<FONT COLOR="#000000">&gt;&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt; Can somebody tell me, why the traversal strategy is ignored? Have i </FONT>
<FONT COLOR="#000000">&gt;&gt; missed to set an option within the gmfgen, oder the map file?</FONT>
<FONT COLOR="#000000">&gt;&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt; Thans for the help again.</FONT>
<FONT COLOR="#000000">&gt;&gt; Perhaps you Christian can help me again, as you have written some parts </FONT>
<FONT COLOR="#000000">&gt;&gt; of the validation in emf ;)</FONT>
<FONT COLOR="#000000">&gt;&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt; With kind regards,</FONT>
<FONT COLOR="#000000">&gt;&gt; Ede</FONT>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>

--=-vsZqpofL7haN+KC7zhOD--
Re: Customizing the traversal of Java Audit Rules [message #194192 is a reply to message #194184] Mon, 23 June 2008 18:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: edebauer.freenet.de

Hey Christian,

thanks for the fast help. It helped a lot. I think, i have to
"workaround" it a little bit, so that all constraints are evaluated at
the beginning of the valuation, and all the results are then taken by
the different constraints.

Thanks again.

Kind regards,
Ede


Christian W. Damus schrieb:
> Hi, Ede,
>
> The framework doesn't provide a mechanism for communicating such
> dependencies between constraints. That sounds like a neat enhancement
> for the 1.3 release, if you care to raise it in bugzilla. I can imagine
> a declarative model of dependencies, including "implies" (declared on
> constraint A, A implies B means that B needs not be evaluated when A is
> false) and "requires" (declared on constraint B, B requires A means that
> B needs not be evaluated when A is false). I am intending a new feature
> in 1.3 that defines a constraint model (using EMF) for a new
> constraint-provider that doesn't use the plugin.xml, but instead models
> the meta-data in a more EMF-ish way.
>
> Until then, your constraint will have to check its pre-conditions and
> simply return "true" on its own.
>
> This code was my first-ever EMF-related assignment, 5 years ago, at
> IBM. It was largely an individual task, but more recently there were
> some substantial contributions from colleagues at IBM (in particular,
> some cool new features from David Cummings in the 1.2 release). There
> are also, of course, contributions from the Eclipse community-at-large.
>
> Cheers,
>
> Christian
>
> On Mon, 2008-06-23 at 19:24 +0200, Ede Bauer wrote:
>> Hey Christian,
>>
>> thanks for your help again. Beside the fact that i have to traverse the
>> Model in particular way, i need to tweak the order in which the
>> constraints are traversed. This results from the fact that some
>> constraints cannot be checked if other constraints already have
>> evaluated to false in my model. Thus i need a customized traversal of
>> the constraints, if one model object is beeing validated. Is there a
>> change to do this? ... I would then look at the result of an particular
>> constraint while validating another constraint and then skip or directly
>> evaluate to true if the other constraint was evaluated to false.
>>
>> By the way another question. Have you written the whole framework by
>> yourself, as i can't see any other authors there :)?
>>
>> Kind Regards,
>> Ede
>>
>>
>> Christian W. Damus schrieb:
>> > Hi, Ede,
>> >
>> > Sorry for the long delay.
>> >
>> > If the traversal strategy is registered on the extension point, then the
>> > DefaultTraversalStrategy implementation provided by the framework will
>> > use it for any selection that meets its client-context matching criteria.
>> >
>> > I'm not familiar with the details of what GMF generates for Audits. I'd
>> > suggest debugging a validation operation from the point where the
>> > TraversalStrategyManager::getTraversalStrategy(EObject) method is
>> > consulted by the validator, and see why your implementation is not being
>> > selected.
>> >
>> > HTH,
>> >
>> > Christian
>> >
>> >
>> > On Thu, 2008-06-19 at 10:17 +0200, Ede Bauer wrote:
>> >> Hey out there again,
>> >>
>> >> now i want to customize the traversal strategy of Java Audits. After
>> >> generation i have a ValidationProvider that contains a private inner
>> >> class CtxSwitchStrategy, which implements ITraversalStrategy. This
>> >> sounds for me like i could tweak the traversal strategy just like i need
>> >> it. But the constructor of this inner class is never instantiated. Thus
>> >> i do not have any chances to customize this strategy.
>> >>
>> >> Can somebody tell me, why the traversal strategy is ignored? Have i
>> >> missed to set an option within the gmfgen, oder the map file?
>> >>
>> >> Thans for the help again.
>> >> Perhaps you Christian can help me again, as you have written some parts
>> >> of the validation in emf ;)
>> >>
>> >> With kind regards,
>> >> Ede
Re: Customizing the traversal of Java Audit Rules [message #194201 is a reply to message #194192] Mon, 23 June 2008 19:28 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.zeligsoft.com

--=-SurbvdfQuUr4WdeUFThM
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi, Ede,

No problem -- it's my pleasure. It's an ingenious solution that you
have devised, Just bear in mind that it will probably result in a
duplicate iteration over your model (maybe it's not large?)

cW


On Mon, 2008-06-23 at 20:48 +0200, Ede Bauer wrote:

> Hey Christian,
>
> thanks for the fast help. It helped a lot. I think, i have to
> "workaround" it a little bit, so that all constraints are evaluated at
> the beginning of the valuation, and all the results are then taken by
> the different constraints.
>
> Thanks again.
>
> Kind regards,
> Ede
>
>
> Christian W. Damus schrieb:
> > Hi, Ede,
> >
> > The framework doesn't provide a mechanism for communicating such
> > dependencies between constraints. That sounds like a neat enhancement
> > for the 1.3 release, if you care to raise it in bugzilla. I can imagine
> > a declarative model of dependencies, including "implies" (declared on
> > constraint A, A implies B means that B needs not be evaluated when A is
> > false) and "requires" (declared on constraint B, B requires A means that
> > B needs not be evaluated when A is false). I am intending a new feature
> > in 1.3 that defines a constraint model (using EMF) for a new
> > constraint-provider that doesn't use the plugin.xml, but instead models
> > the meta-data in a more EMF-ish way.
> >
> > Until then, your constraint will have to check its pre-conditions and
> > simply return "true" on its own.
> >
> > This code was my first-ever EMF-related assignment, 5 years ago, at
> > IBM. It was largely an individual task, but more recently there were
> > some substantial contributions from colleagues at IBM (in particular,
> > some cool new features from David Cummings in the 1.2 release). There
> > are also, of course, contributions from the Eclipse community-at-large.
> >
> > Cheers,
> >
> > Christian
> >
> > On Mon, 2008-06-23 at 19:24 +0200, Ede Bauer wrote:
> >> Hey Christian,
> >>
> >> thanks for your help again. Beside the fact that i have to traverse the
> >> Model in particular way, i need to tweak the order in which the
> >> constraints are traversed. This results from the fact that some
> >> constraints cannot be checked if other constraints already have
> >> evaluated to false in my model. Thus i need a customized traversal of
> >> the constraints, if one model object is beeing validated. Is there a
> >> change to do this? ... I would then look at the result of an particular
> >> constraint while validating another constraint and then skip or directly
> >> evaluate to true if the other constraint was evaluated to false.
> >>
> >> By the way another question. Have you written the whole framework by
> >> yourself, as i can't see any other authors there :)?
> >>
> >> Kind Regards,
> >> Ede
> >>
> >>
> >> Christian W. Damus schrieb:
> >> > Hi, Ede,
> >> >
> >> > Sorry for the long delay.
> >> >
> >> > If the traversal strategy is registered on the extension point, then the
> >> > DefaultTraversalStrategy implementation provided by the framework will
> >> > use it for any selection that meets its client-context matching criteria.
> >> >
> >> > I'm not familiar with the details of what GMF generates for Audits. I'd
> >> > suggest debugging a validation operation from the point where the
> >> > TraversalStrategyManager::getTraversalStrategy(EObject) method is
> >> > consulted by the validator, and see why your implementation is not being
> >> > selected.
> >> >
> >> > HTH,
> >> >
> >> > Christian
> >> >
> >> >
> >> > On Thu, 2008-06-19 at 10:17 +0200, Ede Bauer wrote:
> >> >> Hey out there again,
> >> >>
> >> >> now i want to customize the traversal strategy of Java Audits. After
> >> >> generation i have a ValidationProvider that contains a private inner
> >> >> class CtxSwitchStrategy, which implements ITraversalStrategy. This
> >> >> sounds for me like i could tweak the traversal strategy just like i need
> >> >> it. But the constructor of this inner class is never instantiated. Thus
> >> >> i do not have any chances to customize this strategy.
> >> >>
> >> >> Can somebody tell me, why the traversal strategy is ignored? Have i
> >> >> missed to set an option within the gmfgen, oder the map file?
> >> >>
> >> >> Thans for the help again.
> >> >> Perhaps you Christian can help me again, as you have written some parts
> >> >> of the validation in emf ;)
> >> >>
> >> >> With kind regards,
> >> >> Ede

--=-SurbvdfQuUr4WdeUFThM
Content-Type: text/html; charset=utf-8

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.16.0">
</HEAD>
<BODY>
Hi, Ede,<BR>
<BR>
No problem -- it's my pleasure.&nbsp; It's an ingenious solution that you have devised,&nbsp; Just bear in mind that it will probably result in a duplicate iteration over your model (maybe it's not large?)<BR>
<BR>
cW<BR>
<BR>
<BR>
On Mon, 2008-06-23 at 20:48 +0200, Ede Bauer wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">Hey Christian,</FONT>

<FONT COLOR="#000000">thanks for the fast help. It helped a lot. I think, i have to </FONT>
<FONT COLOR="#000000">&quot;workaround&quot; it a little bit, so that all constraints are evaluated at </FONT>
<FONT COLOR="#000000">the beginning of the valuation, and all the results are then taken by </FONT>
<FONT COLOR="#000000">the different constraints.</FONT>

<FONT COLOR="#000000">Thanks again.</FONT>

<FONT COLOR="#000000">Kind regards,</FONT>
<FONT COLOR="#000000">Ede</FONT>


<FONT COLOR="#000000">Christian W. Damus schrieb:</FONT>
<FONT COLOR="#000000">&gt; Hi, Ede,</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; The framework doesn't provide a mechanism for communicating such </FONT>
<FONT COLOR="#000000">&gt; dependencies between constraints. That sounds like a neat enhancement </FONT>
<FONT COLOR="#000000">&gt; for the 1.3 release, if you care to raise it in bugzilla. I can imagine </FONT>
<FONT COLOR="#000000">&gt; a declarative model of dependencies, including &quot;implies&quot; (declared on </FONT>
<FONT COLOR="#000000">&gt; constraint A, A implies B means that B needs not be evaluated when A is </FONT>
<FONT COLOR="#000000">&gt; false) and &quot;requires&quot; (declared on constraint B, B requires A means that </FONT>
<FONT COLOR="#000000">&gt; B needs not be evaluated when A is false). I am intending a new feature </FONT>
<FONT COLOR="#000000">&gt; in 1.3 that defines a constraint model (using EMF) for a new </FONT>
<FONT COLOR="#000000">&gt; constraint-provider that doesn't use the plugin.xml, but instead models </FONT>
<FONT COLOR="#000000">&gt; the meta-data in a more EMF-ish way.</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; Until then, your constraint will have to check its pre-conditions and </FONT>
<FONT COLOR="#000000">&gt; simply return &quot;true&quot; on its own.</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; This code was my first-ever EMF-related assignment, 5 years ago, at </FONT>
<FONT COLOR="#000000">&gt; IBM. It was largely an individual task, but more recently there were </FONT>
<FONT COLOR="#000000">&gt; some substantial contributions from colleagues at IBM (in particular, </FONT>
<FONT COLOR="#000000">&gt; some cool new features from David Cummings in the 1.2 release). There </FONT>
<FONT COLOR="#000000">&gt; are also, of course, contributions from the Eclipse community-at-large.</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; Cheers,</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; Christian</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; On Mon, 2008-06-23 at 19:24 +0200, Ede Bauer wrote:</FONT>
<FONT COLOR="#000000">&gt;&gt; Hey Christian,</FONT>
<FONT COLOR="#000000">&gt;&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt; thanks for your help again. Beside the fact that i have to traverse the </FONT>
<FONT COLOR="#000000">&gt;&gt; Model in particular way, i need to tweak the order in which the </FONT>
<FONT COLOR="#000000">&gt;&gt; constraints are traversed. This results from the fact that some </FONT>
<FONT COLOR="#000000">&gt;&gt; constraints cannot be checked if other constraints already have </FONT>
<FONT COLOR="#000000">&gt;&gt; evaluated to false in my model. Thus i need a customized traversal of </FONT>
<FONT COLOR="#000000">&gt;&gt; the constraints, if one model object is beeing validated. Is there a </FONT>
<FONT COLOR="#000000">&gt;&gt; change to do this? ... I would then look at the result of an particular </FONT>
<FONT COLOR="#000000">&gt;&gt; constraint while validating another constraint and then skip or directly </FONT>
<FONT COLOR="#000000">&gt;&gt; evaluate to true if the other constraint was evaluated to false.</FONT>
<FONT COLOR="#000000">&gt;&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt; By the way another question. Have you written the whole framework by </FONT>
<FONT COLOR="#000000">&gt;&gt; yourself, as i can't see any other authors there :)?</FONT>
<FONT COLOR="#000000">&gt;&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt; Kind Regards,</FONT>
<FONT COLOR="#000000">&gt;&gt; Ede</FONT>
<FONT COLOR="#000000">&gt;&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt; Christian W. Damus schrieb:</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; Hi, Ede,</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; Sorry for the long delay.</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; If the traversal strategy is registered on the extension point, then the </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; DefaultTraversalStrategy implementation provided by the framework will </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; use it for any selection that meets its client-context matching criteria.</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; I'm not familiar with the details of what GMF generates for Audits. I'd </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; suggest debugging a validation operation from the point where the </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; TraversalStrategyManager::getTraversalStrategy(EObject) method is </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; consulted by the validator, and see why your implementation is not being </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; selected.</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; HTH,</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; Christian</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; On Thu, 2008-06-19 at 10:17 +0200, Ede Bauer wrote:</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;&gt; Hey out there again,</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;&gt; now i want to customize the traversal strategy of Java Audits. After </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;&gt; generation i have a ValidationProvider that contains a private inner </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;&gt; class CtxSwitchStrategy, which implements ITraversalStrategy. This </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;&gt; sounds for me like i could tweak the traversal strategy just like i need </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;&gt; it. But the constructor of this inner class is never instantiated. Thus </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;&gt; i do not have any chances to customize this strategy.</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;&gt; Can somebody tell me, why the traversal strategy is ignored? Have i </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;&gt; missed to set an option within the gmfgen, oder the map file?</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;&gt; Thans for the help again.</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;&gt; Perhaps you Christian can help me again, as you have written some parts </FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;&gt; of the validation in emf ;)</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;&gt; With kind regards,</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt;&gt; Ede</FONT>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>

--=-SurbvdfQuUr4WdeUFThM--
Previous Topic:Line Width
Next Topic:RCP with platform resources
Goto Forum:
  


Current Time: Mon Sep 23 02:11:15 GMT 2024

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

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

Back to the top