Property set if not in the "override" file? [message #140329] |
Wed, 12 September 2007 03:21 |
Eclipse User |
|
|
|
Originally posted by: caye5200.yahoo.com.cn
hi ,
i kown set Bean's propertys in the "BeanInfo "file
now ,i want kown that set property if not in the "override" file.
i try this method ,it is following
eg :the property name is "value" setXXX() is "setValue(int a, int
b) " ,this propety not descripted in the BeanInfo
now , my override file is following ,the eType is int[ ] ,because
wirte the getMethod() no way,
<objectsToAttach name="value" eType="org.eclipse.jem.java:ArrayType
java:/java.lang#int[]" unsettable="true" xmi:id="_eStructuralFeatures"
xsi:type="ecore:EReference">
<eAnnotations
cellEditorClassname=" org.eclipse.ve.java.core/org.eclipse.ve.internal.java.core.B eanFeatureEditor:jp.co.hitachi.yokohama.dtv.osdui.ValueEdito r "
entryExpandable="false"
xsi:type=" org.eclipse.ve.internal.cde.decorators:BasePropertyDecorator "/>
</objectsToAttach>
ValueEditor is extenads PropertyEditorSupport.
getJavaInitializationString() :
public String getJavaInitializationString() {
return "new int[]{" + value[0] + "," + value[1] + "}";
}
In accordance with the above method , log in the worksapce have exception :
MESSAGE IWAV0022E Unable to instantiate class "class
org.eclipse.ve.internal.java.core.BeanFeatureEditor".
!STACK 0
java.lang.NoSuchMethodException:
org.eclipse.ve.internal.java.core.BeanFeatureEditor.<init>(org.eclipse.swt.widgets.Composite)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.getConstructor(Unknown Source)
at
org.eclipse.ve.internal.cde.properties.AbstractPropertyDescr iptorAdapter.createCellEditorInstance(AbstractPropertyDescri ptorAdapter.java:86)
at
org.eclipse.ve.internal.cde.properties.DecoratedPropertyDesc riptorAdapter.createPropertyEditor(DecoratedPropertyDescript orAdapter.java:273)
at
org.eclipse.ve.internal.java.rules.RuledWrapperedPropertyDes criptor.createPropertyEditor(RuledWrapperedPropertyDescripto r.java:125)
if you kown please help me caye5200@yahoo.com.cn
zxc
|
|
|
Re: Property set if not in the "override" file? [message #140335 is a reply to message #140329] |
Thu, 13 September 2007 06:04 |
Philippe Ombredanne Messages: 386 Registered: July 2009 |
Senior Member |
|
|
"zxc" <caye5200@yahoo.com.cn> wrote in message
news:fc7lv7$s1f$1@build.eclipse.org...> hi ,
> i kown set Bean's propertys in the "BeanInfo "file
> now ,i want kown that set property if not in the "override" file.
> i try this method ,it is following
> eg :the property name is "value" setXXX() is "setValue(int a,
int
> b) " ,this propety not descripted in the BeanInfo
> now , my override file is following ,the eType is int[ ] ,because
> wirte the getMethod() no way,
The constructor for that class reauiqres two arguments not one:
org.eclipse.ve.internal.java.core.BeanFeatureEditor.BeanFeat ureEditor(JavaHe
lpers, Composite)
Could you attach a working sample? I think your problems may come from
elsewhere
When does this exception happens? When trying to edit a property in the
properties view?
Did you try to follow the examples there :
http://www.eclipse.org/articles/Article-VE-Custom-Widget/cus tomwidget.html
--
Cheers, Philippe
|
|
|
Re: Property set if not in the "override" file? [message #616502 is a reply to message #140329] |
Thu, 13 September 2007 06:04 |
Philippe Ombredanne Messages: 386 Registered: July 2009 |
Senior Member |
|
|
"zxc" <caye5200@yahoo.com.cn> wrote in message
news:fc7lv7$s1f$1@build.eclipse.org...> hi ,
> i kown set Bean's propertys in the "BeanInfo "file
> now ,i want kown that set property if not in the "override" file.
> i try this method ,it is following
> eg :the property name is "value" setXXX() is "setValue(int a,
int
> b) " ,this propety not descripted in the BeanInfo
> now , my override file is following ,the eType is int[ ] ,because
> wirte the getMethod() no way,
The constructor for that class reauiqres two arguments not one:
org.eclipse.ve.internal.java.core.BeanFeatureEditor.BeanFeat ureEditor(JavaHe
lpers, Composite)
Could you attach a working sample? I think your problems may come from
elsewhere
When does this exception happens? When trying to edit a property in the
properties view?
Did you try to follow the examples there :
http://www.eclipse.org/articles/Article-VE-Custom-Widget/cus tomwidget.html
--
Cheers, Philippe
|
|
|
Powered by
FUDForum. Page generated in 0.04886 seconds