Skip to main content



      Home
Home » Eclipse Projects » GEF » Property descriptor: color on displayName and textCellEditor use
Property descriptor: color on displayName and textCellEditor use [message #81934] Wed, 04 June 2003 07:09 Go to next message
Eclipse UserFriend
Hi,

I'm pretty much into property descriptors now and I have two questions on
the subject.
1. Say that a property must be set, for instance a name on an editpart.
If the name
property isn't set I would like the property name string to turn
red. Is that possible?
2. I use the TextPropertyDescriptor quiet a lot, and mostly I popup a
text editor
instead of using the default TextCellEditor. Is it possible to have
it both ways?
What I'm trying to say is that, if the user only wants to write a
short name for
an editpart he or she shouldn't have to popup a text editor using
the "..." button,
instead it should be possible to edit directly in the property value
field.

I have seen and used applications with the features mentioned above and I'm
really
interested in knowing if it's possible here too.

Thanks,

/Stefan
Re: Property descriptor: color on displayName and textCellEditor use [message #82034 is a reply to message #81934] Wed, 04 June 2003 10:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

This is a multi-part message in MIME format.

------=_NextPart_000_005B_01C32A87.6F158A20
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

This is a bug in the Logic editor. Here is the way to properly fix the =
"width" property in the class DimensionPropertySource.


static{
PropertyDescriptor widthProp =3D
new TextPropertyDescriptor(
ID_WIDTH,
LogicMessages.DimensionPropertySource_Property_Width_Label);
widthProp.setValidator(new ICellEditorValidator() {
public String isValid(Object value) {
try {
new Integer((String)value);
return null;
} catch (NumberFormatException exc) {
return "Not a number";
}
}
});
descriptors =3D
new IPropertyDescriptor[] {
widthProp,
new TextPropertyDescriptor(
ID_HEIGHT,
LogicMessages.DimensionPropertySource_Property_Height_Label) };
}


Once the property source is implemented correctly, you cannot get the =
dialogs you mention.

"Stefan Junsved" <stefan.junsved@comactivity.net> wrote in message =
news:bbkk26$m87$1@rogue.oti.com...
> Hi,
>=20
> I'm pretty much into property descriptors now and I have two questions =
on
> the subject.
> 1. Say that a property must be set, for instance a name on an =
editpart.
> If the name
> property isn't set I would like the property name string to =
turn
> red. Is that possible?
> 2. I use the TextPropertyDescriptor quiet a lot, and mostly I popup =
a
> text editor
> instead of using the default TextCellEditor. Is it possible to =
have
> it both ways?
> What I'm trying to say is that, if the user only wants to =
write a
> short name for
> an editpart he or she shouldn't have to popup a text editor =
using
> the "..." button,
> instead it should be possible to edit directly in the property =
value
> field.
>=20
> I have seen and used applications with the features mentioned above =
and I'm
> really
> interested in knowing if it's possible here too.
>=20
> Thanks,
>=20
> /Stefan
>=20
>=20

------=_NextPart_000_005B_01C32A87.6F158A20
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2723.2500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2></FONT><FONT face=3DArial size=3D2>This =
is a bug in the=20
Logic editor.&nbsp; Here is the way to properly fix the "width" property =
in the=20
class DimensionPropertySource.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" =
size=3D2>static{<BR>&nbsp;PropertyDescriptor=20
widthProp =3D<BR>&nbsp;&nbsp;new=20
TextPropertyDescriptor(<BR>&nbsp;&nbsp;&nbsp;ID_WIDTH, <BR>&nbsp;&nbsp;&nb=
sp;LogicMessages.DimensionPropertySource_Property_Width_Labe l); <BR>&nbsp;=
widthProp.setValidator(new=20
ICellEditorValidator() {<BR><STRONG>&nbsp;&nbsp;public String =
isValid(Object=20
value) {<BR>&nbsp;&nbsp;&nbsp;try {<BR>&nbsp;&nbsp;&nbsp;&nbsp;new=20
Integer((String)value);<BR>&nbsp;&nbsp;&nbsp;&nbsp;return=20
null;<BR>&nbsp;&nbsp;&nbsp;} catch (NumberFormatException exc)=20
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;return "Not a=20
number";<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;} <BR></STRONG>&nbsp;});<BR=
>&nbsp;descriptors=20
=3D<BR>&nbsp;&nbsp;new IPropertyDescriptor[]=20
{<BR>&nbsp;&nbsp;&nbsp;widthProp,<BR>&nbsp;&nbsp;&nbsp;new=20
TextPropertyDescriptor(<BR>&nbsp;&nbsp;&nbsp;&nbsp;ID_HEIGHT, <BR>&nbsp;&n=
bsp;&nbsp;&nbsp;LogicMessages.DimensionPropertySourc e_Property_Height_Lab=
el)};<BR>}<BR></FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2></FONT><FONT face=3D"Courier =
New"=20
size=3D2><FONT face=3DArial></FONT>&nbsp;</DIV></FONT>
<DIV><FONT face=3DArial size=3D2>Once the property source is implemented =
correctly,=20
you cannot get the dialogs you mention.</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>"Stefan Junsved" &lt;</FONT><A=20
href=3D"mailto:stefan.junsved@comactivity.net"><FONT face=3DArial=20
size=3D2>stefan.junsved@comactivity.net</FONT></A><FONT face=3DArial =
size=3D2>&gt;=20
wrote in message </FONT><A =
href=3D"news:bbkk26$m87$1@rogue.oti.com"><FONT=20
face=3DArial size=3D2>news:bbkk26$m87$1@rogue.oti.com</FONT></A><FONT =
face=3DArial=20
size=3D2>...</FONT></DIV><FONT face=3DArial size=3D2>&gt; Hi,<BR>&gt; =
<BR>&gt; I'm=20
pretty much into property descriptors now and I have two questions =
on<BR>&gt;=20
the subject.<BR>&gt; 1.&nbsp;&nbsp;&nbsp; Say that a property must be =
set, for=20
instance a name on an editpart.<BR>&gt; If the name<BR>&gt;=20
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; property isn't set I would =
like the=20
property name string to turn<BR>&gt; red. Is that possible?<BR>&gt;=20
2.&nbsp;&nbsp;&nbsp; I use the TextPropertyDescriptor quiet a lot, and =
mostly I=20
popup a<BR>&gt; text editor<BR>&gt; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
instead of using the default TextCellEditor. Is it possible to =
have<BR>&gt; it=20
both ways?<BR>&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; What I'm =
trying to=20
say is that, if the user only wants to write a<BR>&gt; short name =
for<BR>&gt;=20
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; an editpart he or she =
shouldn't have=20
to popup a text editor using<BR>&gt; the "..." button,<BR>&gt;=20
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; instead it should be possible =
to edit=20
directly in the property value<BR>&gt; field.<BR>&gt; <BR>&gt; I have =
seen and=20
used applications with the features mentioned above and I'm<BR>&gt;=20
really<BR>&gt; interested in knowing if it's possible here too.<BR>&gt; =
<BR>&gt;=20
Thanks,<BR>&gt; <BR>&gt; /Stefan<BR>&gt; <BR>&gt; </FONT></BODY></HTML>

------=_NextPart_000_005B_01C32A87.6F158A20--
Re: Property descriptor: color on displayName and textCellEditor use [message #82199 is a reply to message #82034] Thu, 05 June 2003 06:03 Go to previous messageGo to next message
Eclipse UserFriend
This is a multi-part message in MIME format.

------=_NextPart_000_0009_01C32B5A.8935A0B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I don't think your answer corresponds to my original question...or?

/Stefan
"Randy Hudson" <none@us.ibm.com> wrote in message =
news:bbl13u$3m5$1@rogue.oti.com...
This is a bug in the Logic editor. Here is the way to properly fix =
the "width" property in the class DimensionPropertySource.


static{
PropertyDescriptor widthProp =3D
new TextPropertyDescriptor(
ID_WIDTH,
LogicMessages.DimensionPropertySource_Property_Width_Label);
widthProp.setValidator(new ICellEditorValidator() {
public String isValid(Object value) {
try {
new Integer((String)value);
return null;
} catch (NumberFormatException exc) {
return "Not a number";
}
}
});
descriptors =3D
new IPropertyDescriptor[] {
widthProp,
new TextPropertyDescriptor(
ID_HEIGHT,
LogicMessages.DimensionPropertySource_Property_Height_Label) };
}


Once the property source is implemented correctly, you cannot get the =
dialogs you mention.

"Stefan Junsved" <stefan.junsved@comactivity.net> wrote in message =
news:bbkk26$m87$1@rogue.oti.com...
> Hi,
>=20
> I'm pretty much into property descriptors now and I have two =
questions on
> the subject.
> 1. Say that a property must be set, for instance a name on an =
editpart.
> If the name
> property isn't set I would like the property name string to =
turn
> red. Is that possible?
> 2. I use the TextPropertyDescriptor quiet a lot, and mostly I =
popup a
> text editor
> instead of using the default TextCellEditor. Is it possible =
to have
> it both ways?
> What I'm trying to say is that, if the user only wants to =
write a
> short name for
> an editpart he or she shouldn't have to popup a text editor =
using
> the "..." button,
> instead it should be possible to edit directly in the =
property value
> field.
>=20
> I have seen and used applications with the features mentioned above =
and I'm
> really
> interested in knowing if it's possible here too.
>=20
> Thanks,
>=20
> /Stefan
>=20
>
------=_NextPart_000_0009_01C32B5A.8935A0B0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1141" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I don't think your answer corresponds =
to my=20
original question...or?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>/Stefan</FONT></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Randy Hudson" &lt;<A=20
href=3D"mailto:none@us.ibm.com">none@us.ibm.com</A>&gt; wrote in =
message <A=20
=
href=3D"news:bbl13u$3m5$1@rogue.oti.com">news:bbl13u$3m5$1@rogue.oti.com<=
/A>...</DIV>
<DIV><FONT face=3DArial size=3D2></FONT><FONT face=3DArial =
size=3D2>This is a bug in=20
the Logic editor.&nbsp; Here is the way to properly fix the "width" =
property=20
in the class DimensionPropertySource.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" =
size=3D2>static{<BR>&nbsp;PropertyDescriptor=20
widthProp =3D<BR>&nbsp;&nbsp;new=20
=
TextPropertyDescriptor(<BR>&nbsp;&nbsp;&nbsp;ID_WIDTH, <BR>&nbsp;&nbsp;&nb=
sp;LogicMessages.DimensionPropertySource_Property_Width_Labe l); <BR>&nbsp;=
widthProp.setValidator(new=20
ICellEditorValidator() {<BR><STRONG>&nbsp;&nbsp;public String =
isValid(Object=20
value) {<BR>&nbsp;&nbsp;&nbsp;try {<BR>&nbsp;&nbsp;&nbsp;&nbsp;new=20
Integer((String)value);<BR>&nbsp;&nbsp;&nbsp;&nbsp;return=20
null;<BR>&nbsp;&nbsp;&nbsp;} catch (NumberFormatException exc)=20
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;return "Not a=20
=
number";<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;} <BR></STRONG>&nbsp;});<BR=
>&nbsp;descriptors=20
=3D<BR>&nbsp;&nbsp;new IPropertyDescriptor[]=20
{<BR>&nbsp;&nbsp;&nbsp;widthProp,<BR>&nbsp;&nbsp;&nbsp;new=20
=
TextPropertyDescriptor(<BR>&nbsp;&nbsp;&nbsp;&nbsp;ID_HEIGHT, <BR>&nbsp;&n=
bsp;&nbsp;&nbsp;LogicMessages.DimensionPropertySourc e_Property_Height_Lab=
el)};<BR>}<BR></FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2></FONT><FONT face=3D"Courier =
New"=20
size=3D2><FONT face=3DArial></FONT>&nbsp;</DIV></FONT>
<DIV><FONT face=3DArial size=3D2>Once the property source is =
implemented=20
correctly, you cannot get the dialogs you mention.</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>"Stefan Junsved" &lt;</FONT><A=20
href=3D"mailto:stefan.junsved@comactivity.net"><FONT face=3DArial=20
size=3D2>stefan.junsved@comactivity.net</FONT></A><FONT face=3DArial =
size=3D2>&gt;=20
wrote in message </FONT><A =
href=3D"news:bbkk26$m87$1@rogue.oti.com"><FONT=20
face=3DArial size=3D2>news:bbkk26$m87$1@rogue.oti.com</FONT></A><FONT =
face=3DArial=20
size=3D2>...</FONT></DIV><FONT face=3DArial size=3D2>&gt; Hi,<BR>&gt; =
<BR>&gt; I'm=20
pretty much into property descriptors now and I have two questions =
on<BR>&gt;=20
the subject.<BR>&gt; 1.&nbsp;&nbsp;&nbsp; Say that a property must be =
set, for=20
instance a name on an editpart.<BR>&gt; If the name<BR>&gt;=20
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; property isn't set I would =
like the=20
property name string to turn<BR>&gt; red. Is that possible?<BR>&gt;=20
2.&nbsp;&nbsp;&nbsp; I use the TextPropertyDescriptor quiet a lot, and =
mostly=20
I popup a<BR>&gt; text editor<BR>&gt;=20
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; instead of using the =
default=20
TextCellEditor. Is it possible to have<BR>&gt; it both ways?<BR>&gt;=20
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; What I'm trying to say is =
that, if=20
the user only wants to write a<BR>&gt; short name for<BR>&gt;=20
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; an editpart he or she =
shouldn't=20
have to popup a text editor using<BR>&gt; the "..." button,<BR>&gt;=20
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; instead it should be =
possible to=20
edit directly in the property value<BR>&gt; field.<BR>&gt; <BR>&gt; I =
have=20
seen and used applications with the features mentioned above and =
I'm<BR>&gt;=20
really<BR>&gt; interested in knowing if it's possible here =
too.<BR>&gt;=20
<BR>&gt; Thanks,<BR>&gt; <BR>&gt; /Stefan<BR>&gt; <BR>&gt;=20
</FONT></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0009_01C32B5A.8935A0B0--
Re: Property descriptor: color on displayName and textCellEditor use [message #82350 is a reply to message #82199] Thu, 05 June 2003 10:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

This is a multi-part message in MIME format.

------=_NextPart_000_00B5_01C32B4B.6789EDE0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

You're right, this reply was for the previous post, not yours.

------=_NextPart_000_00B5_01C32B4B.6789EDE0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2723.2500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>You're right, this reply was for the =
previous post,=20
not yours.</FONT></DIV></BODY></HTML>

------=_NextPart_000_00B5_01C32B4B.6789EDE0--
Re: Property descriptor: color on displayName and textCellEditor use [message #82364 is a reply to message #82199] Thu, 05 June 2003 10:23 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

This is a multi-part message in MIME format.

------=_NextPart_000_00CB_01C32B4C.770A79F0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

1. No, this cannot be done currently.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=3D4584
2. The closes thing is DialogCellEditor
"Stefan Junsved" <stefan.junsved@comactivity.net> wrote in message =
news:bbn4im$kne$1@rogue.oti.com...
I don't think your answer corresponds to my original question...or?

/Stefan
"Randy Hudson" <none@us.ibm.com> wrote in message =
news:bbl13u$3m5$1@rogue.oti.com...
This is a bug in the Logic editor. Here is the way to properly fix =
the "width" property in the class DimensionPropertySource.


static{
PropertyDescriptor widthProp =3D
new TextPropertyDescriptor(
ID_WIDTH,
LogicMessages.DimensionPropertySource_Property_Width_Label);
widthProp.setValidator(new ICellEditorValidator() {
public String isValid(Object value) {
try {
new Integer((String)value);
return null;
} catch (NumberFormatException exc) {
return "Not a number";
}
}
});
descriptors =3D
new IPropertyDescriptor[] {
widthProp,
new TextPropertyDescriptor(
ID_HEIGHT,
LogicMessages.DimensionPropertySource_Property_Height_Label) };
}


Once the property source is implemented correctly, you cannot get =
the dialogs you mention.

"Stefan Junsved" <stefan.junsved@comactivity.net> wrote in message =
news:bbkk26$m87$1@rogue.oti.com...
> Hi,
>=20
> I'm pretty much into property descriptors now and I have two =
questions on
> the subject.
> 1. Say that a property must be set, for instance a name on an =
editpart.
> If the name
> property isn't set I would like the property name string =
to turn
> red. Is that possible?
> 2. I use the TextPropertyDescriptor quiet a lot, and mostly I =
popup a
> text editor
> instead of using the default TextCellEditor. Is it =
possible to have
> it both ways?
> What I'm trying to say is that, if the user only wants to =
write a
> short name for
> an editpart he or she shouldn't have to popup a text =
editor using
> the "..." button,
> instead it should be possible to edit directly in the =
property value
> field.
>=20
> I have seen and used applications with the features mentioned =
above and I'm
> really
> interested in knowing if it's possible here too.
>=20
> Thanks,
>=20
> /Stefan
>=20
>=20

------=_NextPart_000_00CB_01C32B4C.770A79F0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2723.2500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>1. No, this cannot be done =
currently.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D"https://bugs.eclipse.org/bugs/show_bug.cgi?id=3D4584">https://bug=
s.eclipse.org/bugs/show_bug.cgi?id=3D4584</A></FONT></DIV >
<DIV><FONT face=3DArial size=3D2>2. The closes thing is=20
DialogCellEditor</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Stefan Junsved" &lt;<A=20
=
href=3D"mailto:stefan.junsved@comactivity.net">stefan.junsved@comactivity=
..net</A>&gt;=20
wrote in message <A=20
=
href=3D"news:bbn4im$kne$1@rogue.oti.com">news:bbn4im$kne$1@rogue.oti.com<=
/A>...</DIV>
<DIV><FONT face=3DArial size=3D2>I don't think your answer corresponds =
to my=20
original question...or?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>/Stefan</FONT></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Randy Hudson" &lt;<A=20
href=3D"mailto:none@us.ibm.com">none@us.ibm.com</A>&gt; wrote in =
message <A=20
=
href=3D"news:bbl13u$3m5$1@rogue.oti.com">news:bbl13u$3m5$1@rogue.oti.com<=
/A>...</DIV>
<DIV><FONT face=3DArial size=3D2></FONT><FONT face=3DArial =
size=3D2>This is a bug in=20
the Logic editor.&nbsp; Here is the way to properly fix the "width" =
property=20
in the class DimensionPropertySource.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" =
size=3D2>static{<BR>&nbsp;PropertyDescriptor=20
widthProp =3D<BR>&nbsp;&nbsp;new=20
=
TextPropertyDescriptor(<BR>&nbsp;&nbsp;&nbsp;ID_WIDTH, <BR>&nbsp;&nbsp;&nb=
sp;LogicMessages.DimensionPropertySource_Property_Width_Labe l); <BR>&nbsp;=
widthProp.setValidator(new=20
ICellEditorValidator() {<BR><STRONG>&nbsp;&nbsp;public String =
isValid(Object=20
value) {<BR>&nbsp;&nbsp;&nbsp;try {<BR>&nbsp;&nbsp;&nbsp;&nbsp;new=20
Integer((String)value);<BR>&nbsp;&nbsp;&nbsp;&nbsp;return=20
null;<BR>&nbsp;&nbsp;&nbsp;} catch (NumberFormatException exc)=20
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;return "Not a=20
=
number";<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;} <BR></STRONG>&nbsp;});<BR=
>&nbsp;descriptors=20
=3D<BR>&nbsp;&nbsp;new IPropertyDescriptor[]=20
{<BR>&nbsp;&nbsp;&nbsp;widthProp,<BR>&nbsp;&nbsp;&nbsp;new=20
=
TextPropertyDescriptor(<BR>&nbsp;&nbsp;&nbsp;&nbsp;ID_HEIGHT, <BR>&nbsp;&n=
bsp;&nbsp;&nbsp;LogicMessages.DimensionPropertySourc e_Property_Height_Lab=
el)};<BR>}<BR></FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2></FONT><FONT =
face=3D"Courier New"=20
size=3D2><FONT face=3DArial></FONT>&nbsp;</DIV></FONT>
<DIV><FONT face=3DArial size=3D2>Once the property source is =
implemented=20
correctly, you cannot get the dialogs you mention.</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>"Stefan Junsved" &lt;</FONT><A=20
href=3D"mailto:stefan.junsved@comactivity.net"><FONT face=3DArial=20
size=3D2>stefan.junsved@comactivity.net</FONT></A><FONT face=3DArial =
size=3D2>&gt;=20
wrote in message </FONT><A =
href=3D"news:bbkk26$m87$1@rogue.oti.com"><FONT=20
face=3DArial =
size=3D2>news:bbkk26$m87$1@rogue.oti.com</FONT></A><FONT face=3DArial=20
size=3D2>...</FONT></DIV><FONT face=3DArial size=3D2>&gt; =
Hi,<BR>&gt; <BR>&gt; I'm=20
pretty much into property descriptors now and I have two questions=20
on<BR>&gt; the subject.<BR>&gt; 1.&nbsp;&nbsp;&nbsp; Say that a =
property=20
must be set, for instance a name on an editpart.<BR>&gt; If the =
name<BR>&gt;=20
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; property isn't set I =
would like=20
the property name string to turn<BR>&gt; red. Is that =
possible?<BR>&gt;=20
2.&nbsp;&nbsp;&nbsp; I use the TextPropertyDescriptor quiet a lot, =
and=20
mostly I popup a<BR>&gt; text editor<BR>&gt;=20
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; instead of using the =
default=20
TextCellEditor. Is it possible to have<BR>&gt; it both ways?<BR>&gt; =

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; What I'm trying to say is =
that,=20
if the user only wants to write a<BR>&gt; short name for<BR>&gt;=20
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; an editpart he or she =
shouldn't=20
have to popup a text editor using<BR>&gt; the "..." button,<BR>&gt;=20
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; instead it should be =
possible to=20
edit directly in the property value<BR>&gt; field.<BR>&gt; <BR>&gt; =
I have=20
seen and used applications with the features mentioned above and =
I'm<BR>&gt;=20
really<BR>&gt; interested in knowing if it's possible here =
too.<BR>&gt;=20
<BR>&gt; Thanks,<BR>&gt; <BR>&gt; /Stefan<BR>&gt; <BR>&gt;=20
</FONT></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_00CB_01C32B4C.770A79F0--
Previous Topic:strange property set behaviour addendum
Next Topic:[ANN] GEF presence at JavaOne Eclipse BoF
Goto Forum:
  


Current Time: Sun Nov 09 21:19:32 EST 2025

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

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

Back to the top