Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forumshow do i set a property for array eg: String[]
https://www.eclipse.org/forums/index.php/mv/msg/42913/139486/#msg_139486
Originally posted by: caye5200.yahoo.com.cn
hello, i am VE new developer. now i want devloper a property editor int
the property sheet.
i am developed a property dialog with "java.lang.Integer"
property ,eg
First i create a override file , the property is "ailgnment",
Following
..........................
<objectsToAttach xmi:id="_eStructuralFeatures" name="alignment"
unsettable="true" xsi:type="ecore:EReference">
<eAnnotations
cellEditorClassname=" com.hitachi.yokohama.dtv/com.hitachi.yokohama.dtv.editor.HLe ditor "
/* (non-Javadoc)
* @see
org.eclipse.ve.internal.propertysheet.INeedData#setData(java .lang.Object)
*/
public void setData(Object data) {
fEditDomain = (EditDomain) data;
}
// A int instance varialble is created to store the value of that
property
protected void doSetValue(Object value) {
if (value != null){
INumberBeanProxy intBeanProxy = (INumberBeanProxy)
BeanProxyUtilities.getBeanProxy((IJavaInstance) value);
intValue=intBeanProxy.intValue();
}
super.doSetValue(value);
}
//update Data
protected void updateContents(Object value) {
super.updateContents(Integer.valueOf(intValue));
}
.......................................................
}
Now hava two propertis "text" and "alignment" the set Methods are
setText(String[] args) and setAlignment(int alignment ,int x)
the types how set? i try set "java.lang.Object" but
the view have error.
eg following