Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forumsconstant name defined in an interface "... is too complicated"
https://www.eclipse.org/forums/index.php/mv/msg/35006/113434/#msg_113434
Originally posted by: i.hate.spam
This is a multi-part message in MIME format.
--------------090308030307060003020509
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Hi,
I know there are a lot of threads about "Expression ... is too
complicated", but I couldn't find an answer to my specific question.
(btw. the source code for this sample scenario is attached as zip)
First I have a very simple custom bean "MyTextField" which is just a
subclass of JTextField with an additional property named "myProperty".
Second there is an interface "IDemo" with a String constant named
DEMO_PROPERTY.
Now I create a new JPanel "Demo" in VE that implements IDemo. I add an
instance of MyTextField to the panel. In the getMyTextField() method I
add a the following line of code:
myTextField.setMyProperty(DEMO_PROPERTY);
After doing that, VE 1.0.1 shows DEMO_PROPERTY in the property sheet for
myProperty, which is perfect for us. I know, when I enter DEMO_PROPERTY
in the propert sheet, this will be inserted into the source code as
setMyProperty("DEMO_PROPERTY") with quotes around the constant name.
That's not what we want, but we can handle this in a custom property
editor, so that's not a problem.
But VE 1.1.0.1 doesn't show any value for myProperty in the property
sheet, but the "too complicated" warning for the MyTextField bean.
Will this be fixed in a future release of VE, so that it will work again
like in VE 1.0? I don't think I can handle that myself with a custom
property editor. It seems that the java code parser no longer returns
the property value if it cannot successfully parse it.
In 1.2 we show that actual value of DEMO_PROPERTY, not the word
DEMO_PROPERTY. You could still get too complicated but we've cleaned up
many of these. String constants should work.
Werner Huber wrote:
> Hi,
>
> I know there are a lot of threads about "Expression ... is too
> complicated", but I couldn't find an answer to my specific question.
>
> (btw. the source code for this sample scenario is attached as zip)
>
> First I have a very simple custom bean "MyTextField" which is just a
> subclass of JTextField with an additional property named "myProperty".
>
> Second there is an interface "IDemo" with a String constant named
> DEMO_PROPERTY.
>
> Now I create a new JPanel "Demo" in VE that implements IDemo. I add an
> instance of MyTextField to the panel. In the getMyTextField() method I
> add a the following line of code:
> myTextField.setMyProperty(DEMO_PROPERTY);
>
> After doing that, VE 1.0.1 shows DEMO_PROPERTY in the property sheet for
> myProperty, which is perfect for us. I know, when I enter DEMO_PROPERTY
> in the propert sheet, this will be inserted into the source code as
> setMyProperty("DEMO_PROPERTY") with quotes around the constant name.
> That's not what we want, but we can handle this in a custom property
> editor, so that's not a problem.
>
> But VE 1.1.0.1 doesn't show any value for myProperty in the property
> sheet, but the "too complicated" warning for the MyTextField bean.
>
> Will this be fixed in a future release of VE, so that it will work again
> like in VE 1.0? I don't think I can handle that myself with a custom
> property editor. It seems that the java code parser no longer returns
> the property value if it cannot successfully parse it.
>
> Thanks
> Werner
>
--
Thanks,
Rich Kulp]]>2005-12-16T16:06:55-00:00Re: constant name defined in an interface "... is too complicated"
https://www.eclipse.org/forums/index.php/mv/msg/35006/611637/#msg_611637
Originally posted by: richkulp.us.NO_SPAM.ibm.com
In 1.2 we show that actual value of DEMO_PROPERTY, not the word
DEMO_PROPERTY. You could still get too complicated but we've cleaned up
many of these. String constants should work.
Werner Huber wrote:
> Hi,
>
> I know there are a lot of threads about "Expression ... is too
> complicated", but I couldn't find an answer to my specific question.
>
> (btw. the source code for this sample scenario is attached as zip)
>
> First I have a very simple custom bean "MyTextField" which is just a
> subclass of JTextField with an additional property named "myProperty".
>
> Second there is an interface "IDemo" with a String constant named
> DEMO_PROPERTY.
>
> Now I create a new JPanel "Demo" in VE that implements IDemo. I add an
> instance of MyTextField to the panel. In the getMyTextField() method I
> add a the following line of code:
> myTextField.setMyProperty(DEMO_PROPERTY);
>
> After doing that, VE 1.0.1 shows DEMO_PROPERTY in the property sheet for
> myProperty, which is perfect for us. I know, when I enter DEMO_PROPERTY
> in the propert sheet, this will be inserted into the source code as
> setMyProperty("DEMO_PROPERTY") with quotes around the constant name.
> That's not what we want, but we can handle this in a custom property
> editor, so that's not a problem.
>
> But VE 1.1.0.1 doesn't show any value for myProperty in the property
> sheet, but the "too complicated" warning for the MyTextField bean.
>
> Will this be fixed in a future release of VE, so that it will work again
> like in VE 1.0? I don't think I can handle that myself with a custom
> property editor. It seems that the java code parser no longer returns
> the property value if it cannot successfully parse it.
>
> Thanks
> Werner
>