Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » error msg in validation framework
error msg in validation framework [message #428699] Thu, 26 March 2009 19:43 Go to next message
wws_ques wws_ques is currently offline wws_ques wws_quesFriend
Messages: 64
Registered: July 2009
Member
I tried to work on my own constraints based on the example.general plugin.
It seems that the error msg is provided in plugin.xml file. I see message
used for that purpose. If I have two or more messages defined in
plugin.xml file, how can createFailureStatus() know which message should
be applied? THanks.
Wuwei
Re: error msg in validation framework [message #428705 is a reply to message #428699] Fri, 27 March 2009 01:33 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Wuwei,

You're question confuses me. Perhaps you'd like to provide a bit more
detail.

Wuwei wrote:
> I tried to work on my own constraints based on the example.general
> plugin. It seems that the error msg is provided in plugin.xml file. I
> see message used for that purpose. If I have two or more messages
> defined in plugin.xml file, how can createFailureStatus() know which
> message should be applied? THanks.
> Wuwei
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: error msg in validation framework [message #428707 is a reply to message #428699] Fri, 27 March 2009 02:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: give.a.damus.gmail.com

Hi, Wuwei,

You can only specify at most one message in the XML. If you need to be
able to report different messages in different situations, you can use
the factory methods of the ConstraintStatus class to create your status
with greater control over its contents.

HTH,

Christian


Wuwei wrote:
> I tried to work on my own constraints based on the example.general
> plugin. It seems that the error msg is provided in plugin.xml file. I
> see message used for that purpose. If I have two or more messages
> defined in plugin.xml file, how can createFailureStatus() know which
> message should be applied? THanks.
> Wuwei
>
Re: error msg in validation framework [message #428728 is a reply to message #428707] Fri, 27 March 2009 22:05 Go to previous messageGo to next message
wws_ques wws_ques is currently offline wws_ques wws_quesFriend
Messages: 64
Registered: July 2009
Member
Thanks, Christian.

> You can only specify at most one message in the XML. If you need to be

But when I take a look at EMF Model Validation Constraint Providers,
it shows two messages under two different constraints as follows.

<constraints categories="com.example.validation/foo">
<constraint

class="com.example.validation.constraints.ThingReferences"
statusCode="11"
severity="WARNING"
lang="Java"
name="Things References"
id="thingReferences">
<description>
Things must not reference things that do not exist.
</description>
<message>"{0}" references non-existing things
"{1}."</message>
<target class="Thing" />
</constraint>

<constraint
statusCode="12"
severity="ERROR"
lang="OCL"
mode="Live"
name="Things Must be Named"
id="thingName">
<description>Things must have names.</description>
<message>Thing has no name.</message>

<target class="Thing">
<event name="Set">
<feature name="name" />
</event>
</target>

<!-- The OCL constraint expression. -->
<![CDATA[

name->notEmpty()

]]>
</constraint>
</constraints>



> able to report different messages in different situations, you can use
> the factory methods of the ConstraintStatus class to create your status
> with greater control over its contents.

Can you give me more details about this? Or any tutorial I can follow.
Nice weekend,
Wuwei
Re: error msg in validation framework [message #428729 is a reply to message #428705] Fri, 27 March 2009 22:14 Go to previous messageGo to next message
wws_ques wws_ques is currently offline wws_ques wws_quesFriend
Messages: 64
Registered: July 2009
Member
Ed,
What I did here is to run the validation plugin which check whether a
name of Library is not empty. I add more Java statements to check whether
a library has more than two writers. When I call createFailureStatus(), it
always shows the message used for the name checking such as
ERROR: A Library has been found to have no unique identifier (name or
title).

even when I check whether a library has more than two writers.
Nice weekend,
Wuwei


"Library . T
Ed Merks wrote:

> Wuwei,

> You're question confuses me. Perhaps you'd like to provide a bit more
> detail.

> Wuwei wrote:
>> I tried to work on my own constraints based on the example.general
>> plugin. It seems that the error msg is provided in plugin.xml file. I
>> see message used for that purpose. If I have two or more messages
>> defined in plugin.xml file, how can createFailureStatus() know which
>> message should be applied? THanks.
>> Wuwei
>>
Re: error msg in validation framework [message #428743 is a reply to message #428728] Sun, 29 March 2009 00:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: give.a.damus.gmail.com

Hi, Wuwei,

I thought you were speaking of two messages in a single constraint.

As there is only one message, it is the one that the framework finds
when your constraint fails (calls the createFailureStatus() method).
The framework knows which constraint it is invoking.

So, I don't understand now what you mean by choosing the message to
return to the user ...

Cheers,

Christian


Wuwei wrote:
> Thanks, Christian.
>
>> You can only specify at most one message in the XML. If you need to be
>
> But when I take a look at EMF Model Validation Constraint Providers,
> it shows two messages under two different constraints as follows.

-----8<-----
Re: error msg in validation framework [message #428763 is a reply to message #428743] Sun, 29 March 2009 19:46 Go to previous messageGo to next message
wws_ques wws_ques is currently offline wws_ques wws_quesFriend
Messages: 64
Registered: July 2009
Member
Christian,
My first question is in the general plugin example, how can I
report "A Library has been found to have no name" and "A Library has
no Writers when I check a Library object? How can I use
createFailureStatus()
and how it works with plugin file? Thanks.
Wuwei

W. Damus wrote:

> Hi, Wuwei,

> I thought you were speaking of two messages in a single constraint.

> As there is only one message, it is the one that the framework finds
> when your constraint fails (calls the createFailureStatus() method).
> The framework knows which constraint it is invoking.

> So, I don't understand now what you mean by choosing the message to
> return to the user ...

> Cheers,

> Christian


> Wuwei wrote:
>> Thanks, Christian.
>>
>>> You can only specify at most one message in the XML. If you need to be
>>
>> But when I take a look at EMF Model Validation Constraint Providers,
>> it shows two messages under two different constraints as follows.

> -----8<-----
Re: error msg in validation framework [message #428781 is a reply to message #428763] Mon, 30 March 2009 12:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: give.a.damus.gmail.com

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

Hi, Wuwei,

The usual way to check two distinct conditions of well-formedness of a
model element is to define two distinct constraints. Having a name and
having writers are likely to be orthogonal concerns for a library.

The snippet of plugin,xml content that you quoted in this thread already
demonstrates how to define multiple constraints using separate
<constraint> elements. If you use OCL to define the constraints (which
is usually my recommendation), then you need only to declare distinct
<constraint>s each with their own <message> and OCL expression in the
body of the <constraint> element.

If you use Java, then the <constraint> element's "class" attribute
should indicate a different subclass of AbstractModelConstraint for
each. Or, to save the VM some overhead, I like to group a family of
constraints (for example, pertaining to the same model class) in a
single AbstractModelConstraint subclass and have the validate(...)
method switch on the constraint ID to delegate to other methods that
implement the checks. Get the ID of the constraint currently being
invoked from the IValidationContext::getConstraintID() method ...

Cheers,

Christian


On Sun, 2009-03-29 at 19:46 +0000, Wuwei wrote:

> Christian,
> My first question is in the general plugin example, how can I
> report "A Library has been found to have no name" and "A Library has
> no Writers when I check a Library object? How can I use
> createFailureStatus()
> and how it works with plugin file? Thanks.
> Wuwei
>
> W. Damus wrote:
>
> > Hi, Wuwei,
>
> > I thought you were speaking of two messages in a single constraint.
>
> > As there is only one message, it is the one that the framework finds
> > when your constraint fails (calls the createFailureStatus() method).
> > The framework knows which constraint it is invoking.
>
> > So, I don't understand now what you mean by choosing the message to
> > return to the user ...
>
> > Cheers,
>
> > Christian
>
>
> > Wuwei wrote:
> >> Thanks, Christian.
> >>
> >>> You can only specify at most one message in the XML. If you need to be
> >>
> >> But when I take a look at EMF Model Validation Constraint Providers,
> >> it shows two messages under two different constraints as follows.
>
> > -----8<-----
>
>

--=-DjqXFWoYVD6wyao1PFyl
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.24.1.1">
</HEAD>
<BODY>
Hi, Wuwei,<BR>
<BR>
The usual way to check two distinct conditions of well-formedness of a model element is to define two distinct constraints.&nbsp; Having a name and having writers are likely to be orthogonal concerns for a library.<BR>
<BR>
The snippet of plugin,xml content that you quoted in this thread already demonstrates how to define multiple constraints using separate &lt;constraint&gt; elements.&nbsp; If you use OCL to define the constraints (which is usually my recommendation), then you need only to declare distinct &lt;constraint&gt;s each with their own &lt;message&gt; and OCL expression in the body of the &lt;constraint&gt; element.<BR>
<BR>
If you use Java, then the &lt;constraint&gt; element's &quot;class&quot; attribute should indicate a different subclass of AbstractModelConstraint for each.&nbsp; Or, to save the VM some overhead, I like to group a family of constraints (for example, pertaining to the same model class) in a single AbstractModelConstraint subclass and have the validate(...) method switch on the constraint ID to delegate to other methods that implement the checks.&nbsp; Get the ID of the constraint currently being invoked from the IValidationContext::getConstraintID() method ...<BR>
<BR>
Cheers,<BR>
<BR>
Christian<BR>
<BR>
<BR>
On Sun, 2009-03-29 at 19:46 +0000, Wuwei wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Christian,
My first question is in the general plugin example, how can I
report &quot;A Library has been found to have no name&quot; and &quot;A Library has
no Writers when I check a Library object? How can I use
createFailureStatus()
and how it works with plugin file? Thanks.
Wuwei

W. Damus wrote:

&gt; Hi, Wuwei,

&gt; I thought you were speaking of two messages in a single constraint.

&gt; As there is only one message, it is the one that the framework finds
&gt; when your constraint fails (calls the createFailureStatus() method).
&gt; The framework knows which constraint it is invoking.

&gt; So, I don't understand now what you mean by choosing the message to
&gt; return to the user ...

&gt; Cheers,

&gt; Christian


&gt; Wuwei wrote:
&gt;&gt; Thanks, Christian.
&gt;&gt;
&gt;&gt;&gt; You can only specify at most one message in the XML. If you need to be
&gt;&gt;
&gt;&gt; But when I take a look at EMF Model Validation Constraint Providers,
&gt;&gt; it shows two messages under two different constraints as follows.

&gt; -----8&lt;-----


</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>

--=-DjqXFWoYVD6wyao1PFyl--
Re: error msg in validation framework [message #428786 is a reply to message #428781] Mon, 30 March 2009 15:49 Go to previous messageGo to next message
wws_ques wws_ques is currently offline wws_ques wws_quesFriend
Messages: 64
Registered: July 2009
Member
Hi, Christian,
Thanks for your reply. I am trying two Java constraints.

> If you use Java, then the <constraint> element's "class" attribute
> should indicate a different subclass of AbstractModelConstraint for
> each. Or, to save the VM some overhead, I like to group a family of

Yes. it works when I have two subclasses. But I am still interested in
your second method. I used IValidationContext::getCurrentConstraintID() to
get the constraint id but I still need to define two classes in constraint
in the plugin xml file, right? What do you mean using a single
AbstractModelConstraint subclass? Let us assume two classes defined in the
plugin xml file as follows:

<constraint
lang="Java"

class=" org.eclipse.emf.validation.examples.general.constraints.NonE mptyNamesConstraint "
severity="ERROR"
mode="Batch"
name="%NonEmptyNameConstraint"

id=" org.eclipse.emf.validation.pde.example.general.ui.NameNotEmp ty "
statusCode="1">
....
</constraint>

<constraint
lang="Java"

class=" org.eclipse.emf.validation.examples.general.constraints.NonE mptyWriterConstraint "
severity="ERROR"
mode="Batch"
name="%NonEmptyWriterConstraint"
id="2"
statusCode="2">
....
</constraint>

If I use one single class, how can I get the above two different ids?
Also, when I set id to 2 as above, I get a long string like:
org.eclipse.emf.validation.examples.general.2
where does the prefix come from? How can I get rid of it? Thanks.
Wuwei

> constraints (for example, pertaining to the same model class) in a
> single AbstractModelConstraint subclass and have the validate(...)
> method switch on the constraint ID to delegate to other methods that
> implement the checks. Get the ID of the constraint currently being
> invoked from the IValidationContext::getConstraintID() method ...

> Cheers,

> Christian


> On Sun, 2009-03-29 at 19:46 +0000, Wuwei wrote:

>> Christian,
>> My first question is in the general plugin example, how can I
>> report "A Library has been found to have no name" and "A Library has
>> no Writers when I check a Library object? How can I use
>> createFailureStatus()
>> and how it works with plugin file? Thanks.
>> Wuwei
>>
>> W. Damus wrote:
>>
>> > Hi, Wuwei,
>>
>> > I thought you were speaking of two messages in a single constraint.
>>
>> > As there is only one message, it is the one that the framework finds
>> > when your constraint fails (calls the createFailureStatus() method).
>> > The framework knows which constraint it is invoking.
>>
>> > So, I don't understand now what you mean by choosing the message to
>> > return to the user ...
>>
>> > Cheers,
>>
>> > Christian
>>
>>
>> > Wuwei wrote:
>> >> Thanks, Christian.
>> >>
>> >>> You can only specify at most one message in the XML. If you need to be
>> >>
>> >> But when I take a look at EMF Model Validation Constraint Providers,
>> >> it shows two messages under two different constraints as follows.
>>
>> > -----8<-----
>>
>>
Re: error msg in validation framework [message #428820 is a reply to message #428786] Tue, 31 March 2009 12:42 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

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

Hi, Wuwei,

The framework does not require that different constraints be implemented
by different classes, but it does require all constraints to have
distinct IDs. Ergo, multiple constraint IDs can map to the same Java
class. The framework sets the current constraint ID in the
IValidationContext and then asks an instance of whatever class was
registered to validate; it doesn't care anything about that class except
that it be a subclass of AbstractModelConstraint.

So, you can, in the extreme case, reference the same class for all of
your constraints in the plugin.xml and, in the validate(...) method,
inspect the constraint ID and do different checks according to which ID
is passed in the context. This basically emulates the generated
EValidator in providing all of a model's constraints in one class.

Just try it. You will see that it works.

You cannot get rid of the prefix on the IDs. The framework is
aggressive in trying to ensure uniqueness of the IDs. If the plugin.xml
does not prefix the constraint IDs by the declaring plug-in ID
explicitly, the framework will prepend the plug-in ID for you. Note
that this applies only (I think) to constraints defined in plugin.xml.
If you create a custom constraint-provider that gets constraint
definitions in some other way, then you will have complete control over
the constraint descriptors (which have the IDs).

Christian

On Mon, 2009-03-30 at 15:49 +0000, Wuwei wrote:

> Hi, Christian,
> Thanks for your reply. I am trying two Java constraints.
>
> > If you use Java, then the <constraint> element's "class" attribute
> > should indicate a different subclass of AbstractModelConstraint for
> > each. Or, to save the VM some overhead, I like to group a family of
>
> Yes. it works when I have two subclasses. But I am still interested in
> your second method. I used IValidationContext::getCurrentConstraintID() to
> get the constraint id but I still need to define two classes in constraint
> in the plugin xml file, right? What do you mean using a single
> AbstractModelConstraint subclass? Let us assume two classes defined in the
> plugin xml file as follows:
>
> <constraint
> lang="Java"
>
> class=" org.eclipse.emf.validation.examples.general.constraints.NonE mptyNamesConstraint "
> severity="ERROR"
> mode="Batch"
> name="%NonEmptyNameConstraint"
>
> id=" org.eclipse.emf.validation.pde.example.general.ui.NameNotEmp ty "
> statusCode="1">
> ...
> </constraint>
>
> <constraint
> lang="Java"
>
> class=" org.eclipse.emf.validation.examples.general.constraints.NonE mptyWriterConstraint "
> severity="ERROR"
> mode="Batch"
> name="%NonEmptyWriterConstraint"
> id="2"
> statusCode="2">
> ...
> </constraint>
>
> If I use one single class, how can I get the above two different ids?
> Also, when I set id to 2 as above, I get a long string like:
> org.eclipse.emf.validation.examples.general.2
> where does the prefix come from? How can I get rid of it? Thanks.
> Wuwei
>
> > constraints (for example, pertaining to the same model class) in a
> > single AbstractModelConstraint subclass and have the validate(...)
> > method switch on the constraint ID to delegate to other methods that
> > implement the checks. Get the ID of the constraint currently being
> > invoked from the IValidationContext::getConstraintID() method ...
>
> > Cheers,
>
> > Christian
>
>
> > On Sun, 2009-03-29 at 19:46 +0000, Wuwei wrote:
>
> >> Christian,
> >> My first question is in the general plugin example, how can I
> >> report "A Library has been found to have no name" and "A Library has
> >> no Writers when I check a Library object? How can I use
> >> createFailureStatus()
> >> and how it works with plugin file? Thanks.
> >> Wuwei
> >>
> >> W. Damus wrote:
> >>
> >> > Hi, Wuwei,
> >>
> >> > I thought you were speaking of two messages in a single constraint.
> >>
> >> > As there is only one message, it is the one that the framework finds
> >> > when your constraint fails (calls the createFailureStatus() method).
> >> > The framework knows which constraint it is invoking.
> >>
> >> > So, I don't understand now what you mean by choosing the message to
> >> > return to the user ...
> >>
> >> > Cheers,
> >>
> >> > Christian
> >>
> >>
> >> > Wuwei wrote:
> >> >> Thanks, Christian.
> >> >>
> >> >>> You can only specify at most one message in the XML. If you need to be
> >> >>
> >> >> But when I take a look at EMF Model Validation Constraint Providers,
> >> >> it shows two messages under two different constraints as follows.
> >>
> >> > -----8<-----
> >>
> >>
>
>

--=-XqhASgXfPUaBEfiThC1N
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.24.1.1">
</HEAD>
<BODY>
Hi, Wuwei,<BR>
<BR>
The framework does not require that different constraints be implemented by different classes, but it does require all constraints to have distinct IDs.&nbsp; Ergo, multiple constraint IDs can map to the same Java class.&nbsp; The framework sets the current constraint ID in the IValidationContext and then asks an instance of whatever class was registered to validate; it doesn't care anything about that class except that it be a subclass of AbstractModelConstraint.<BR>
<BR>
So, you can, in the extreme case, reference the same class for all of your constraints in the plugin.xml and, in the validate(...) method, inspect the constraint ID and do different checks according to which ID is passed in the context.&nbsp; This basically emulates the generated EValidator in providing all of a model's constraints in one class.<BR>
<BR>
Just try it.&nbsp; You will see that it works.<BR>
<BR>
You cannot get rid of the prefix on the IDs.&nbsp; The framework is aggressive in trying to ensure uniqueness of the IDs.&nbsp; If the plugin.xml does not prefix the constraint IDs by the declaring plug-in ID explicitly, the framework will prepend the plug-in ID for you.&nbsp; Note that this applies only (I think) to constraints defined in plugin.xml.&nbsp; If you create a custom constraint-provider that gets constraint definitions in some other way, then you will have complete control over the constraint descriptors (which have the IDs).<BR>
<BR>
Christian<BR>
<BR>
On Mon, 2009-03-30 at 15:49 +0000, Wuwei wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Hi, Christian,
Thanks for your reply. I am trying two Java constraints.

&gt; If you use Java, then the &lt;constraint&gt; element's &quot;class&quot; attribute
&gt; should indicate a different subclass of AbstractModelConstraint for
&gt; each. Or, to save the VM some overhead, I like to group a family of

Yes. it works when I have two subclasses. But I am still interested in
your second method. I used IValidationContext::getCurrentConstraintID() to
get the constraint id but I still need to define two classes in constraint
in the plugin xml file, right? What do you mean using a single
AbstractModelConstraint subclass? Let us assume two classes defined in the
plugin xml file as follows:

&lt;constraint
lang=&quot;Java&quot;

class=&quot;org.eclipse.emf.validation.examples.general. constraints.NonEmptyNamesConstraint&quot;
severity=&quot;ERROR&quot;
mode=&quot;Batch&quot;
name=&quot;%NonEmptyNameConstraint&quot;

id=&quot;org.eclipse.emf.validation.pde.example.general. ui.NameNotEmpty&quot;
statusCode=&quot;1&quot;&gt;
....
&lt;/constraint&gt;

&lt;constraint
lang=&quot;Java&quot;

class=&quot;org.eclipse.emf.validation.examples.general. constraints.NonEmptyWriterConstraint&quot;
severity=&quot;ERROR&quot;
mode=&quot;Batch&quot;
name=&quot;%NonEmptyWriterConstraint&quot;
id=&quot;2&quot;
statusCode=&quot;2&quot;&gt;
....
&lt;/constraint&gt;

If I use one single class, how can I get the above two different ids?
Also, when I set id to 2 as above, I get a long string like:
org.eclipse.emf.validation.examples.general.2
where does the prefix come from? How can I get rid of it? Thanks.
Wuwei

&gt; constraints (for example, pertaining to the same model class) in a
&gt; single AbstractModelConstraint subclass and have the validate(...)
&gt; method switch on the constraint ID to delegate to other methods that
&gt; implement the checks. Get the ID of the constraint currently being
&gt; invoked from the IValidationContext::getConstraintID() method ...

&gt; Cheers,

&gt; Christian


&gt; On Sun, 2009-03-29 at 19:46 +0000, Wuwei wrote:

&gt;&gt; Christian,
&gt;&gt; My first question is in the general plugin example, how can I
&gt;&gt; report &quot;A Library has been found to have no name&quot; and &quot;A Library has
&gt;&gt; no Writers when I check a Library object? How can I use
&gt;&gt; createFailureStatus()
&gt;&gt; and how it works with plugin file? Thanks.
&gt;&gt; Wuwei
&gt;&gt;
&gt;&gt; W. Damus wrote:
&gt;&gt;
&gt;&gt; &gt; Hi, Wuwei,
&gt;&gt;
&gt;&gt; &gt; I thought you were speaking of two messages in a single constraint.
&gt;&gt;
&gt;&gt; &gt; As there is only one message, it is the one that the framework finds
&gt;&gt; &gt; when your constraint fails (calls the createFailureStatus() method).
&gt;&gt; &gt; The framework knows which constraint it is invoking.
&gt;&gt;
&gt;&gt; &gt; So, I don't understand now what you mean by choosing the message to
&gt;&gt; &gt; return to the user ...
&gt;&gt;
&gt;&gt; &gt; Cheers,
&gt;&gt;
&gt;&gt; &gt; Christian
&gt;&gt;
&gt;&gt;
&gt;&gt; &gt; Wuwei wrote:
&gt;&gt; &gt;&gt; Thanks, Christian.
&gt;&gt; &gt;&gt;
&gt;&gt; &gt;&gt;&gt; You can only specify at most one message in the XML. If you need to be
&gt;&gt; &gt;&gt;
&gt;&gt; &gt;&gt; But when I take a look at EMF Model Validation Constraint Providers,
&gt;&gt; &gt;&gt; it shows two messages under two different constraints as follows.
&gt;&gt;
&gt;&gt; &gt; -----8&lt;-----
&gt;&gt;
&gt;&gt;


</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>

--=-XqhASgXfPUaBEfiThC1N--
Re: error msg in validation framework [message #428938 is a reply to message #428820] Fri, 03 April 2009 00:47 Go to previous messageGo to next message
wws_ques wws_ques is currently offline wws_ques wws_quesFriend
Messages: 64
Registered: July 2009
Member
Christian,
Thanks for your msg and it all works right now. But I still have a
question. IN plugin.xml there are several places using %. For instance,
<message>
%NonEmptyNameConstraint.message
</message>

what does that represent? Thanks.
Wuwei

Christian W. Damus wrote:

> Hi, Wuwei,

> The framework does not require that different constraints be implemented
> by different classes, but it does require all constraints to have
> distinct IDs. Ergo, multiple constraint IDs can map to the same Java
> class. The framework sets the current constraint ID in the
> IValidationContext and then asks an instance of whatever class was
> registered to validate; it doesn't care anything about that class except
> that it be a subclass of AbstractModelConstraint.

> So, you can, in the extreme case, reference the same class for all of
> your constraints in the plugin.xml and, in the validate(...) method,
> inspect the constraint ID and do different checks according to which ID
> is passed in the context. This basically emulates the generated
> EValidator in providing all of a model's constraints in one class.

> Just try it. You will see that it works.

> You cannot get rid of the prefix on the IDs. The framework is
> aggressive in trying to ensure uniqueness of the IDs. If the plugin.xml
> does not prefix the constraint IDs by the declaring plug-in ID
> explicitly, the framework will prepend the plug-in ID for you. Note
> that this applies only (I think) to constraints defined in plugin.xml.
> If you create a custom constraint-provider that gets constraint
> definitions in some other way, then you will have complete control over
> the constraint descriptors (which have the IDs).

> Christian

> On Mon, 2009-03-30 at 15:49 +0000, Wuwei wrote:

>> Hi, Christian,
>> Thanks for your reply. I am trying two Java constraints.
>>
>> > If you use Java, then the <constraint> element's "class" attribute
>> > should indicate a different subclass of AbstractModelConstraint for
>> > each. Or, to save the VM some overhead, I like to group a family of
>>
>> Yes. it works when I have two subclasses. But I am still interested in
>> your second method. I used IValidationContext::getCurrentConstraintID() to
>> get the constraint id but I still need to define two classes in constraint
>> in the plugin xml file, right? What do you mean using a single
>> AbstractModelConstraint subclass? Let us assume two classes defined in the
>> plugin xml file as follows:
>>
>> <constraint
>> lang="Java"
>>
>>
class=" org.eclipse.emf.validation.examples.general.constraints.NonE mptyNamesConstraint "
>> severity="ERROR"
>> mode="Batch"
>> name="%NonEmptyNameConstraint"
>>
>> id=" org.eclipse.emf.validation.pde.example.general.ui.NameNotEmp ty "
>> statusCode="1">
>> ...
>> </constraint>
>>
>> <constraint
>> lang="Java"
>>
>>
class=" org.eclipse.emf.validation.examples.general.constraints.NonE mptyWriterConstraint "
>> severity="ERROR"
>> mode="Batch"
>> name="%NonEmptyWriterConstraint"
>> id="2"
>> statusCode="2">
>> ...
>> </constraint>
>>
>> If I use one single class, how can I get the above two different ids?
>> Also, when I set id to 2 as above, I get a long string like:
>> org.eclipse.emf.validation.examples.general.2
>> where does the prefix come from? How can I get rid of it? Thanks.
>> Wuwei
>>
>> > constraints (for example, pertaining to the same model class) in a
>> > single AbstractModelConstraint subclass and have the validate(...)
>> > method switch on the constraint ID to delegate to other methods that
>> > implement the checks. Get the ID of the constraint currently being
>> > invoked from the IValidationContext::getConstraintID() method ...
>>
>> > Cheers,
>>
>> > Christian
>>
>>
>> > On Sun, 2009-03-29 at 19:46 +0000, Wuwei wrote:
>>
>> >> Christian,
>> >> My first question is in the general plugin example, how can I
>> >> report "A Library has been found to have no name" and "A Library has
>> >> no Writers when I check a Library object? How can I use
>> >> createFailureStatus()
>> >> and how it works with plugin file? Thanks.
>> >> Wuwei
>> >>
>> >> W. Damus wrote:
>> >>
>> >> > Hi, Wuwei,
>> >>
>> >> > I thought you were speaking of two messages in a single constraint.
>> >>
>> >> > As there is only one message, it is the one that the framework finds
>> >> > when your constraint fails (calls the createFailureStatus() method).
>> >> > The framework knows which constraint it is invoking.
>> >>
>> >> > So, I don't understand now what you mean by choosing the message to
>> >> > return to the user ...
>> >>
>> >> > Cheers,
>> >>
>> >> > Christian
>> >>
>> >>
>> >> > Wuwei wrote:
>> >> >> Thanks, Christian.
>> >> >>
>> >> >>> You can only specify at most one message in the XML. If you need to
be
>> >> >>
>> >> >> But when I take a look at EMF Model Validation Constraint
Providers,
>> >> >> it shows two messages under two different constraints as follows.
>> >>
>> >> > -----8<-----
>> >>
>> >>
>>
>>
Re: error msg in validation framework [message #428948 is a reply to message #428938] Fri, 03 April 2009 12:47 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

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

Hi, Wuwei,

I suggest that you read the Plug-in Developer Guide documentation
concerning the externalization (for translation) of strings in the
bundle and plug-in manifests. This is a core Eclipse Run-time
capability.

Cheers,

Christian


On Fri, 2009-04-03 at 00:47 +0000, Wuwei wrote:

> Christian,
> Thanks for your msg and it all works right now. But I still have a
> question. IN plugin.xml there are several places using %. For instance,
> <message>
> %NonEmptyNameConstraint.message
> </message>
>
> what does that represent? Thanks.
> Wuwei
>
> Christian W. Damus wrote:
>
> > Hi, Wuwei,
>
> > The framework does not require that different constraints be implemented
> > by different classes, but it does require all constraints to have
> > distinct IDs. Ergo, multiple constraint IDs can map to the same Java
> > class. The framework sets the current constraint ID in the
> > IValidationContext and then asks an instance of whatever class was
> > registered to validate; it doesn't care anything about that class except
> > that it be a subclass of AbstractModelConstraint.
>
> > So, you can, in the extreme case, reference the same class for all of
> > your constraints in the plugin.xml and, in the validate(...) method,
> > inspect the constraint ID and do different checks according to which ID
> > is passed in the context. This basically emulates the generated
> > EValidator in providing all of a model's constraints in one class.
>
> > Just try it. You will see that it works.
>
> > You cannot get rid of the prefix on the IDs. The framework is
> > aggressive in trying to ensure uniqueness of the IDs. If the plugin.xml
> > does not prefix the constraint IDs by the declaring plug-in ID
> > explicitly, the framework will prepend the plug-in ID for you. Note
> > that this applies only (I think) to constraints defined in plugin.xml.
> > If you create a custom constraint-provider that gets constraint
> > definitions in some other way, then you will have complete control over
> > the constraint descriptors (which have the IDs).
>
> > Christian
>
> > On Mon, 2009-03-30 at 15:49 +0000, Wuwei wrote:
>
> >> Hi, Christian,
> >> Thanks for your reply. I am trying two Java constraints.
> >>
> >> > If you use Java, then the <constraint> element's "class" attribute
> >> > should indicate a different subclass of AbstractModelConstraint for
> >> > each. Or, to save the VM some overhead, I like to group a family of
> >>
> >> Yes. it works when I have two subclasses. But I am still interested in
> >> your second method. I used IValidationContext::getCurrentConstraintID() to
> >> get the constraint id but I still need to define two classes in constraint
> >> in the plugin xml file, right? What do you mean using a single
> >> AbstractModelConstraint subclass? Let us assume two classes defined in the
> >> plugin xml file as follows:
> >>
> >> <constraint
> >> lang="Java"
> >>
> >>
> class=" org.eclipse.emf.validation.examples.general.constraints.NonE mptyNamesConstraint "
> >> severity="ERROR"
> >> mode="Batch"
> >> name="%NonEmptyNameConstraint"
> >>
> >> id=" org.eclipse.emf.validation.pde.example.general.ui.NameNotEmp ty "
> >> statusCode="1">
> >> ...
> >> </constraint>
> >>
> >> <constraint
> >> lang="Java"
> >>
> >>
> class=" org.eclipse.emf.validation.examples.general.constraints.NonE mptyWriterConstraint "
> >> severity="ERROR"
> >> mode="Batch"
> >> name="%NonEmptyWriterConstraint"
> >> id="2"
> >> statusCode="2">
> >> ...
> >> </constraint>
> >>
> >> If I use one single class, how can I get the above two different ids?
> >> Also, when I set id to 2 as above, I get a long string like:
> >> org.eclipse.emf.validation.examples.general.2
> >> where does the prefix come from? How can I get rid of it? Thanks.
> >> Wuwei
> >>
> >> > constraints (for example, pertaining to the same model class) in a
> >> > single AbstractModelConstraint subclass and have the validate(...)
> >> > method switch on the constraint ID to delegate to other methods that
> >> > implement the checks. Get the ID of the constraint currently being
> >> > invoked from the IValidationContext::getConstraintID() method ...
> >>
> >> > Cheers,
> >>
> >> > Christian
> >>
> >>
> >> > On Sun, 2009-03-29 at 19:46 +0000, Wuwei wrote:
> >>
> >> >> Christian,
> >> >> My first question is in the general plugin example, how can I
> >> >> report "A Library has been found to have no name" and "A Library has
> >> >> no Writers when I check a Library object? How can I use
> >> >> createFailureStatus()
> >> >> and how it works with plugin file? Thanks.
> >> >> Wuwei
> >> >>
> >> >> W. Damus wrote:
> >> >>
> >> >> > Hi, Wuwei,
> >> >>
> >> >> > I thought you were speaking of two messages in a single constraint.
> >> >>
> >> >> > As there is only one message, it is the one that the framework finds
> >> >> > when your constraint fails (calls the createFailureStatus() method).
> >> >> > The framework knows which constraint it is invoking.
> >> >>
> >> >> > So, I don't understand now what you mean by choosing the message to
> >> >> > return to the user ...
> >> >>
> >> >> > Cheers,
> >> >>
> >> >> > Christian
> >> >>
> >> >>
> >> >> > Wuwei wrote:
> >> >> >> Thanks, Christian.
> >> >> >>
> >> >> >>> You can only specify at most one message in the XML. If you need to
> be
> >> >> >>
> >> >> >> But when I take a look at EMF Model Validation Constraint
> Providers,
> >> >> >> it shows two messages under two different constraints as follows.
> >> >>
> >> >> > -----8<-----
> >> >>
> >> >>
> >>
> >>
>
>

--=-rSaA/nfZgaunGelb4AB6
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.24.1.1">
</HEAD>
<BODY>
Hi, Wuwei,<BR>
<BR>
I suggest that you read the Plug-in Developer Guide documentation concerning the externalization (for translation) of strings in the bundle and plug-in manifests.&nbsp; This is a core Eclipse Run-time capability.<BR>
<BR>
Cheers,<BR>
<BR>
Christian<BR>
<BR>
<BR>
On Fri, 2009-04-03 at 00:47 +0000, Wuwei wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Christian,
Thanks for your msg and it all works right now. But I still have a
question. IN plugin.xml there are several places using %. For instance,
&lt;message&gt;
%NonEmptyNameConstraint.message
&lt;/message&gt;

what does that represent? Thanks.
Wuwei

Christian W. Damus wrote:

&gt; Hi, Wuwei,

&gt; The framework does not require that different constraints be implemented
&gt; by different classes, but it does require all constraints to have
&gt; distinct IDs. Ergo, multiple constraint IDs can map to the same Java
&gt; class. The framework sets the current constraint ID in the
&gt; IValidationContext and then asks an instance of whatever class was
&gt; registered to validate; it doesn't care anything about that class except
&gt; that it be a subclass of AbstractModelConstraint.

&gt; So, you can, in the extreme case, reference the same class for all of
&gt; your constraints in the plugin.xml and, in the validate(...) method,
&gt; inspect the constraint ID and do different checks according to which ID
&gt; is passed in the context. This basically emulates the generated
&gt; EValidator in providing all of a model's constraints in one class.

&gt; Just try it. You will see that it works.

&gt; You cannot get rid of the prefix on the IDs. The framework is
&gt; aggressive in trying to ensure uniqueness of the IDs. If the plugin.xml
&gt; does not prefix the constraint IDs by the declaring plug-in ID
&gt; explicitly, the framework will prepend the plug-in ID for you. Note
&gt; that this applies only (I think) to constraints defined in plugin.xml.
&gt; If you create a custom constraint-provider that gets constraint
&gt; definitions in some other way, then you will have complete control over
&gt; the constraint descriptors (which have the IDs).

&gt; Christian

&gt; On Mon, 2009-03-30 at 15:49 +0000, Wuwei wrote:

&gt;&gt; Hi, Christian,
&gt;&gt; Thanks for your reply. I am trying two Java constraints.
&gt;&gt;
&gt;&gt; &gt; If you use Java, then the &lt;constraint&gt; element's &quot;class&quot; attribute
&gt;&gt; &gt; should indicate a different subclass of AbstractModelConstraint for
&gt;&gt; &gt; each. Or, to save the VM some overhead, I like to group a family of
&gt;&gt;
&gt;&gt; Yes. it works when I have two subclasses. But I am still interested in
&gt;&gt; your second method. I used IValidationContext::getCurrentConstraintID() to
&gt;&gt; get the constraint id but I still need to define two classes in constraint
&gt;&gt; in the plugin xml file, right? What do you mean using a single
&gt;&gt; AbstractModelConstraint subclass? Let us assume two classes defined in the
&gt;&gt; plugin xml file as follows:
&gt;&gt;
&gt;&gt; &lt;constraint
&gt;&gt; lang=&quot;Java&quot;
&gt;&gt;
&gt;&gt;
class=&quot;org.eclipse.emf.validation.examples.general. constraints.NonEmptyNamesConstraint&quot;
&gt;&gt; severity=&quot;ERROR&quot;
&gt;&gt; mode=&quot;Batch&quot;
&gt;&gt; name=&quot;%NonEmptyNameConstraint&quot;
&gt;&gt;
&gt;&gt; id=&quot;org.eclipse.emf.validation.pde.example.general. ui.NameNotEmpty&quot;
&gt;&gt; statusCode=&quot;1&quot;&gt;
&gt;&gt; ...
&gt;&gt; &lt;/constraint&gt;
&gt;&gt;
&gt;&gt; &lt;constraint
&gt;&gt; lang=&quot;Java&quot;
&gt;&gt;
&gt;&gt;
class=&quot;org.eclipse.emf.validation.examples.general. constraints.NonEmptyWriterConstraint&quot;
&gt;&gt; severity=&quot;ERROR&quot;
&gt;&gt; mode=&quot;Batch&quot;
&gt;&gt; name=&quot;%NonEmptyWriterConstraint&quot;
&gt;&gt; id=&quot;2&quot;
&gt;&gt; statusCode=&quot;2&quot;&gt;
&gt;&gt; ...
&gt;&gt; &lt;/constraint&gt;
&gt;&gt;
&gt;&gt; If I use one single class, how can I get the above two different ids?
&gt;&gt; Also, when I set id to 2 as above, I get a long string like:
&gt;&gt; org.eclipse.emf.validation.examples.general.2
&gt;&gt; where does the prefix come from? How can I get rid of it? Thanks.
&gt;&gt; Wuwei
&gt;&gt;
&gt;&gt; &gt; constraints (for example, pertaining to the same model class) in a
&gt;&gt; &gt; single AbstractModelConstraint subclass and have the validate(...)
&gt;&gt; &gt; method switch on the constraint ID to delegate to other methods that
&gt;&gt; &gt; implement the checks. Get the ID of the constraint currently being
&gt;&gt; &gt; invoked from the IValidationContext::getConstraintID() method ...
&gt;&gt;
&gt;&gt; &gt; Cheers,
&gt;&gt;
&gt;&gt; &gt; Christian
&gt;&gt;
&gt;&gt;
&gt;&gt; &gt; On Sun, 2009-03-29 at 19:46 +0000, Wuwei wrote:
&gt;&gt;
&gt;&gt; &gt;&gt; Christian,
&gt;&gt; &gt;&gt; My first question is in the general plugin example, how can I
&gt;&gt; &gt;&gt; report &quot;A Library has been found to have no name&quot; and &quot;A Library has
&gt;&gt; &gt;&gt; no Writers when I check a Library object? How can I use
&gt;&gt; &gt;&gt; createFailureStatus()
&gt;&gt; &gt;&gt; and how it works with plugin file? Thanks.
&gt;&gt; &gt;&gt; Wuwei
&gt;&gt; &gt;&gt;
&gt;&gt; &gt;&gt; W. Damus wrote:
&gt;&gt; &gt;&gt;
&gt;&gt; &gt;&gt; &gt; Hi, Wuwei,
&gt;&gt; &gt;&gt;
&gt;&gt; &gt;&gt; &gt; I thought you were speaking of two messages in a single constraint.
&gt;&gt; &gt;&gt;
&gt;&gt; &gt;&gt; &gt; As there is only one message, it is the one that the framework finds
&gt;&gt; &gt;&gt; &gt; when your constraint fails (calls the createFailureStatus() method).
&gt;&gt; &gt;&gt; &gt; The framework knows which constraint it is invoking.
&gt;&gt; &gt;&gt;
&gt;&gt; &gt;&gt; &gt; So, I don't understand now what you mean by choosing the message to
&gt;&gt; &gt;&gt; &gt; return to the user ...
&gt;&gt; &gt;&gt;
&gt;&gt; &gt;&gt; &gt; Cheers,
&gt;&gt; &gt;&gt;
&gt;&gt; &gt;&gt; &gt; Christian
&gt;&gt; &gt;&gt;
&gt;&gt; &gt;&gt;
&gt;&gt; &gt;&gt; &gt; Wuwei wrote:
&gt;&gt; &gt;&gt; &gt;&gt; Thanks, Christian.
&gt;&gt; &gt;&gt; &gt;&gt;
&gt;&gt; &gt;&gt; &gt;&gt;&gt; You can only specify at most one message in the XML. If you need to
be
&gt;&gt; &gt;&gt; &gt;&gt;
&gt;&gt; &gt;&gt; &gt;&gt; But when I take a look at EMF Model Validation Constraint
Providers,
&gt;&gt; &gt;&gt; &gt;&gt; it shows two messages under two different constraints as follows.
&gt;&gt; &gt;&gt;
&gt;&gt; &gt;&gt; &gt; -----8&lt;-----
&gt;&gt; &gt;&gt;
&gt;&gt; &gt;&gt;
&gt;&gt;
&gt;&gt;


</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>

--=-rSaA/nfZgaunGelb4AB6--
Re: error msg in validation framework [message #428952 is a reply to message #428948] Fri, 03 April 2009 19:32 Go to previous messageGo to next message
wws_ques wws_ques is currently offline wws_ques wws_quesFriend
Messages: 64
Registered: July 2009
Member
Christian,
Could you please give me the specific extry point to read? Right now,
I cannot locate the section you refer. Thanks.
Wuwei
Re: error msg in validation framework [message #428961 is a reply to message #428952] Sun, 05 April 2009 01:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: give.a.damus.gmail.com

Hi, Wuwei,

Have you tried searching for keywords such as "localization" in the Help
viewer? How about searching the PDE newsgroup? Or the Eclipse Wiki?

Or, how about Google for the terms "Eclipse plug-in" and "localization"?

These tools will help you to help yourself.

cW

Wuwei wrote:
> Christian,
> Could you please give me the specific extry point to read? Right now,
> I cannot locate the section you refer. Thanks.
> Wuwei
>
Re: error msg in validation framework [message #428963 is a reply to message #428961] Mon, 06 April 2009 01:31 Go to previous messageGo to next message
wws_ques wws_ques is currently offline wws_ques wws_quesFriend
Messages: 64
Registered: July 2009
Member
Christian,
I still cannot find the answer. If you can provide me a link, I really
appreciate.
Wuwei
Re: error msg in validation framework [message #428981 is a reply to message #428729] Mon, 06 April 2009 13:00 Go to previous message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

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

Hi, Wuwei,

I did a Google search for "Eclipse plugin.xml localization" and got
these results:

http://www.google.ca/search?hl=en&q=Eclipse+plugin.xml
+localization&btnG=Search&meta=

The first few results look useful.

Then, I went to help.eclipse.org and did a search for "plugin.xml
localization." The second result was the documentation of the PDE's
plug-in manifest externalization tool.

Cheers,

Christian


On Fri, 2009-03-27 at 22:14 +0000, Wuwei wrote:

> Ed,
> What I did here is to run the validation plugin which check whether a
> name of Library is not empty. I add more Java statements to check whether
> a library has more than two writers. When I call createFailureStatus(), it
> always shows the message used for the name checking such as
> ERROR: A Library has been found to have no unique identifier (name or
> title).
>
> even when I check whether a library has more than two writers.
> Nice weekend,
> Wuwei
>
>
> "Library . T
> Ed Merks wrote:
>
> > Wuwei,
>
> > You're question confuses me. Perhaps you'd like to provide a bit more
> > detail.
>
> > Wuwei wrote:
> >> I tried to work on my own constraints based on the example.general
> >> plugin. It seems that the error msg is provided in plugin.xml file. I
> >> see message used for that purpose. If I have two or more messages
> >> defined in plugin.xml file, how can createFailureStatus() know which
> >> message should be applied? THanks.
> >> Wuwei
> >>
>
>

--=-hMOZtkPlqTtbbo3P69VJ
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.24.1.1">
</HEAD>
<BODY>
Hi, Wuwei,<BR>
<BR>
I did a Google search for &quot;Eclipse plugin.xml localization&quot; and got these results:<BR>
<BR>
<A HREF="http://www.google.ca/search?hl=en&amp ;client=firefox-a&amp;rls=com.ubuntu%3Aen-US%3Aunofficia l&amp;hs=FzT&amp;q=Eclipse+plugin.xml+localization&a mp;amp;btnG=Search&amp;meta= ">http://www.google.ca/search?hl=en&amp ;q=Eclipse+plugin.xml+localization&amp;btnG=Search&a mp;meta= </A><BR>
<BR>
The first few results look useful.<BR>
<BR>
Then, I went to help.eclipse.org and did a search for &quot;plugin.xml localization.&quot;&nbsp; The second result was the documentation of the PDE's plug-in manifest externalization tool.<BR>
<BR>
Cheers,<BR>
<BR>
Christian<BR>
<BR>
<BR>
On Fri, 2009-03-27 at 22:14 +0000, Wuwei wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Ed,
What I did here is to run the validation plugin which check whether a
name of Library is not empty. I add more Java statements to check whether
a library has more than two writers. When I call createFailureStatus(), it
always shows the message used for the name checking such as
ERROR: A Library has been found to have no unique identifier (name or
title).

even when I check whether a library has more than two writers.
Nice weekend,
Wuwei


&quot;Library . T
Ed Merks wrote:

&gt; Wuwei,

&gt; You're question confuses me. Perhaps you'd like to provide a bit more
&gt; detail.

&gt; Wuwei wrote:
&gt;&gt; I tried to work on my own constraints based on the example.general
&gt;&gt; plugin. It seems that the error msg is provided in plugin.xml file. I
&gt;&gt; see message used for that purpose. If I have two or more messages
&gt;&gt; defined in plugin.xml file, how can createFailureStatus() know which
&gt;&gt; message should be applied? THanks.
&gt;&gt; Wuwei
&gt;&gt;


</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>

--=-hMOZtkPlqTtbbo3P69VJ--
Previous Topic:Force UTF-8 for JET templates
Next Topic:Bug in Generation with Feature Delegation Dynamic and unsettable opposites
Goto Forum:
  


Current Time: Thu Mar 28 13:53:51 GMT 2024

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

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

Back to the top