Skip to main content



      Home
Home » Archived » Visual Editor (VE) » Override property problem
Override property problem [message #612226] Wed, 01 March 2006 09:38
Eclipse UserFriend
I have class which has String attributes

For example

public class Person{
String name;

public String getName(){
return name;
}

public String setName(String name){
this.name=name;
}

}

Let's say that this class is visualised in the VE editor and the
attribute "name" is displayed and can be edited in the Properties view.

I do not know how to associate my own cell editor (for the Properties
view) with the attribute name.

I have tried to use the approach from the "Extending The Visual Editor:
Enabling support for a custom widget tutorial" I made something like this:

I created the Person.override file and made all things to make it work.

<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"


xmlns:org.eclipse.ve.internal.cde.decorators="http:///org/eclipse/ve/internal/cde/decorators.ecore"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:event="event.xmi">

<event:Add featureName="eStructuralFeatures">
<addedEObjects xsi:type="ecore:EReference" name="name"
unsettable="true">
<eAnnotations
xsi:type=" org.eclipse.ve.internal.cde.decorators:BasePropertyDecorator "

cellEditorClassname="me.testpackage/me.myTestPackage.MyPersonCellEditor "/>
</addedEObjects>
</event:Add>

</xmi:XMI>

The problem is that the "name" attribute of the Person class is still
edited by the default editor for the Strings:-(. (The override is
applied to the person class).
Previous Topic:Does the VE have any relations to the NAB (eWideStudio) ?
Next Topic:Clearing of unwanted components in the visual editor
Goto Forum:
  


Current Time: Wed Jun 18 18:07:39 EDT 2025

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

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

Back to the top