Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » Override property problem
Override property problem [message #119489] Wed, 01 March 2006 14:38 Go to next message
Adam Horenek is currently offline Adam HorenekFriend
Messages: 21
Registered: July 2009
Junior Member
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).
Re: Override property problem [message #119533 is a reply to message #119489] Wed, 01 March 2006 15:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

That should of worked. Were there any errors logged in the .log file? Do
a clear cache and try again, we may of cached the old override file and
so didn't know it had changed.

To clear the cache:

1) Open a VE then close it and all VE's.
2) Do a Project->Clean...->Clean All Projects
3) Wait for build to finish
4) Open your VE.

Another possibility is that your override file is not being picked up.
First are you sure your container is in your classpath? That is how we
determine which overrides to process.
--
Thanks,
Rich Kulp
Re: Override property problem [message #119897 is a reply to message #119533] Mon, 06 March 2006 09:38 Go to previous message
Adam Horenek is currently offline Adam HorenekFriend
Messages: 21
Registered: July 2009
Junior Member
I have found the problem, indeed the errors were logged, there was an
syntax error in my .override. I must admit that I hate editing those
files:-).

Thanks for help

Rich Kulp wrote:
> That should of worked. Were there any errors logged in the .log file? Do
> a clear cache and try again, we may of cached the old override file and
> so didn't know it had changed.
>
> To clear the cache:
>
> 1) Open a VE then close it and all VE's.
> 2) Do a Project->Clean...->Clean All Projects
> 3) Wait for build to finish
> 4) Open your VE.
>
> Another possibility is that your override file is not being picked up.
> First are you sure your container is in your classpath? That is how we
> determine which overrides to process.
Re: Override property problem [message #612229 is a reply to message #119489] Wed, 01 March 2006 15:44 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

That should of worked. Were there any errors logged in the .log file? Do
a clear cache and try again, we may of cached the old override file and
so didn't know it had changed.

To clear the cache:

1) Open a VE then close it and all VE's.
2) Do a Project->Clean...->Clean All Projects
3) Wait for build to finish
4) Open your VE.

Another possibility is that your override file is not being picked up.
First are you sure your container is in your classpath? That is how we
determine which overrides to process.
--
Thanks,
Rich Kulp
Re: Override property problem [message #612258 is a reply to message #119533] Mon, 06 March 2006 09:38 Go to previous message
Adam Horenek is currently offline Adam HorenekFriend
Messages: 21
Registered: July 2009
Junior Member
I have found the problem, indeed the errors were logged, there was an
syntax error in my .override. I must admit that I hate editing those
files:-).

Thanks for help

Rich Kulp wrote:
> That should of worked. Were there any errors logged in the .log file? Do
> a clear cache and try again, we may of cached the old override file and
> so didn't know it had changed.
>
> To clear the cache:
>
> 1) Open a VE then close it and all VE's.
> 2) Do a Project->Clean...->Clean All Projects
> 3) Wait for build to finish
> 4) Open your VE.
>
> Another possibility is that your override file is not being picked up.
> First are you sure your container is in your classpath? That is how we
> determine which overrides to process.
Previous Topic:Visual Edior 1.2M2 not working @ me
Next Topic:Tabbed properties
Goto Forum:
  


Current Time: Thu Dec 26 22:36:33 GMT 2024

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

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

Back to the top