Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » replacing or extending overrides
replacing or extending overrides [message #118155] Thu, 16 February 2006 16:39 Go to next message
Eclipse UserFriend
Originally posted by: markus.wawra.shark-soft.com

Hi!

The way JLabel is implemented in org.eclipse.ve.jfc it does not create a
getJLabel method when it is created by VE. To do that I added a
javax\swing\JLabel.override to my VE extension where I changed this line:

<addedEObjects xsi:type="jcm:BeanDecorator" beanLocation="GLOBAL_GLOBAL"/>


When I start VE with the extension it still does not create the getJLabel
method.
I took a look at the javax.swing.JLabel.override.xmi of the workspace I
see the following:

<?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:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:event="event.xmi"
xmlns:org.eclipse.ve.internal.cde.decorators="http:///org/eclipse/ve/internal/cde/decorators.ecore"
xmlns:org.eclipse.ve.internal.cde.utility="http:///org/eclipse/ve/internal/cde/utility.ecore"
xmlns:org.eclipse.ve.internal.jcm="http:///org/eclipse/ve/internal/jcm.ecore">
<event:AddMany featureName="eAnnotations">
<addedEObjects
xsi:type=" org.eclipse.ve.internal.cde.decorators:ClassDescriptorDecora tor "
graphViewClassname=" org.eclipse.ve.jfc/org.eclipse.ve.internal.jfc.core.Componen tGraphicalEditPart:true "
labelProviderClassname=" org.eclipse.ve.java.core/org.eclipse.ve.internal.java.core.D efaultLabelProviderWithNameAndAttribute:text ">
<keyedValues xsi:type="ecore:EStringToStringMapEntry"
key="org.eclipse.ve.internal.cde.core.creationtool.policy"
value=" org.eclipse.ve.java.core/org.eclipse.ve.internal.java.core.L abelCreationPolicy:JLabel,text "/>
<graphic
xsi:type="org.eclipse.ve.internal.cde.utility:GIFFileGraphic "
resourceName=" platform:/plugin/org.eclipse.ve.jfc/icons/full/clcl16/label_ obj.gif "/>
</addedEObjects>
<addedEObjects xsi:type="org.eclipse.ve.internal.jcm:BeanDecorator"
beanLocation="GLOBAL_LOCAL"/>
</event:AddMany>
<event:AddMany featureName="eStructuralFeatures">
<addedEObjects xsi:type="ecore:EReference" name="displayedMnemonic"
unsettable="true">
<eAnnotations
xsi:type=" org.eclipse.ve.internal.cde.decorators:BasePropertyDecorator "
labelProviderClassname=" org.eclipse.ve.java.core/org.eclipse.ve.internal.java.core.B eanCellRenderer:org.eclipse.ve.internal.jfc.beaninfo.Mnemoni cEditor "
cellEditorClassname=" org.eclipse.ve.java.core/org.eclipse.ve.internal.java.core.B eanFeatureEditor:org.eclipse.ve.internal.jfc.beaninfo.Mnemon icEditor "/>
</addedEObjects>
<addedEObjects xsi:type="ecore:EReference" name="labelFor"
unsettable="true">
<eAnnotations
xsi:type=" org.eclipse.ve.internal.cde.decorators:BasePropertyDecorator "
labelProviderClassname=" org.eclipse.ve.java.core/org.eclipse.ve.internal.java.vce.Ja vaBeanLabelProvider "
cellEditorClassname=" org.eclipse.ve.java.core/org.eclipse.ve.internal.java.vce.Me mberJavaBeanCellEditor:java.awt.Component "
entryExpandable="false"/>
</addedEObjects>
</event:AddMany>
<event:AddMany featureName="eAnnotations">
<addedEObjects
xsi:type=" org.eclipse.ve.internal.cde.decorators:ClassDescriptorDecora tor "
graphViewClassname=" org.eclipse.ve.jfc/org.eclipse.ve.internal.jfc.core.Componen tGraphicalEditPart:true "
labelProviderClassname=" org.eclipse.ve.java.core/org.eclipse.ve.internal.java.core.D efaultLabelProviderWithNameAndAttribute:text ">
<keyedValues xsi:type="ecore:EStringToStringMapEntry"
key="org.eclipse.ve.internal.cde.core.creationtool.policy"
value=" org.eclipse.ve.java.core/org.eclipse.ve.internal.java.core.L abelCreationPolicy:JLabel,text "/>
<graphic
xsi:type="org.eclipse.ve.internal.cde.utility:GIFFileGraphic "
resourceName=" platform:/plugin/org.eclipse.ve.jfc/icons/full/clcl16/label_ obj.gif "/>
</addedEObjects>
<addedEObjects xsi:type="org.eclipse.ve.internal.jcm:BeanDecorator"
beanLocation="GLOBAL_GLOBAL"/>
</event:AddMany>
</xmi:XMI>


So, obviously the new override is just added after the old one and the old
beanLocation="GLOBAL_LOCAL" is taken to create JLabels.
How can I change that?
It would be sufficiend if my override would be taken first, right?

Regards,
Markus
Re: replacing or extending overrides [message #118779 is a reply to message #118155] Wed, 22 February 2006 21:20 Go to previous messageGo to next message
Joe Winchester is currently offline Joe WinchesterFriend
Messages: 496
Registered: July 2009
Senior Member
Hi Markus,

The .override files should be applied in the order that the entries are
declared in the build path. Try re-ordering things around on the build path
page and see if that helps.

Best regards,

Joe Winchester
Re: replacing or extending overrides [message #118788 is a reply to message #118779] Wed, 22 February 2006 22:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Actually it is not the buildpath order, which is a JDT concept. It is
the pre-req order of the plugins. In other words if plugin B has plugin
A as a required plugin, then any overrides in plugin A are guarenteed to
be processed before plugin B's overrides. If there was a plugin C that
did not depend on A or B, and neither A nor B depended on C (either
directly or indirectly through other required plugins), then it is not
defined when plugin C's overrides will be processed relative to A and B.
It cannot be stated.

Joe Winchester wrote:
> Hi Markus,
>
> The .override files should be applied in the order that the entries are
> declared in the build path. Try re-ordering things around on the build path
> page and see if that helps.
>
> Best regards,
>
> Joe Winchester
>
>

--
Thanks,
Rich Kulp
Re: replacing or extending overrides [message #118853 is a reply to message #118788] Thu, 23 February 2006 10:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: markus.wawra.shark-soft.com

So, there is no way to change the order the overrides are processed?

In my case the org.eclipse.ve.jfc is in the dependencies of my plug-in.

Regards,
Markus
Re: replacing or extending overrides [message #118904 is a reply to message #118853] Thu, 23 February 2006 15:52 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

NO there is no way to change. That is because jfc expects to be able to
add the annotation. If you got in first and added it, an exception would
be thrown and it would fail when jfc tried to do the add. That is why it
is done in plugin dependency order, so that each plugin can be assured
of the current state of the bean info it is trying to override.


Markus wrote:
> So, there is no way to change the order the overrides are processed?
>
> In my case the org.eclipse.ve.jfc is in the dependencies of my plug-in.
>
> Regards,
> Markus
>

--
Thanks,
Rich Kulp
Re: replacing or extending overrides [message #612169 is a reply to message #118155] Wed, 22 February 2006 21:20 Go to previous message
Joe Winchester is currently offline Joe WinchesterFriend
Messages: 496
Registered: July 2009
Senior Member
Hi Markus,

The .override files should be applied in the order that the entries are
declared in the build path. Try re-ordering things around on the build path
page and see if that helps.

Best regards,

Joe Winchester
Re: replacing or extending overrides [message #612170 is a reply to message #118779] Wed, 22 February 2006 22:36 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Actually it is not the buildpath order, which is a JDT concept. It is
the pre-req order of the plugins. In other words if plugin B has plugin
A as a required plugin, then any overrides in plugin A are guarenteed to
be processed before plugin B's overrides. If there was a plugin C that
did not depend on A or B, and neither A nor B depended on C (either
directly or indirectly through other required plugins), then it is not
defined when plugin C's overrides will be processed relative to A and B.
It cannot be stated.

Joe Winchester wrote:
> Hi Markus,
>
> The .override files should be applied in the order that the entries are
> declared in the build path. Try re-ordering things around on the build path
> page and see if that helps.
>
> Best regards,
>
> Joe Winchester
>
>

--
Thanks,
Rich Kulp
Re: replacing or extending overrides [message #612175 is a reply to message #118788] Thu, 23 February 2006 10:49 Go to previous message
Markus is currently offline MarkusFriend
Messages: 52
Registered: July 2009
Member
So, there is no way to change the order the overrides are processed?

In my case the org.eclipse.ve.jfc is in the dependencies of my plug-in.

Regards,
Markus
Re: replacing or extending overrides [message #612179 is a reply to message #118853] Thu, 23 February 2006 15:52 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

NO there is no way to change. That is because jfc expects to be able to
add the annotation. If you got in first and added it, an exception would
be thrown and it would fail when jfc tried to do the add. That is why it
is done in plugin dependency order, so that each plugin can be assured
of the current state of the bean info it is trying to override.


Markus wrote:
> So, there is no way to change the order the overrides are processed?
>
> In my case the org.eclipse.ve.jfc is in the dependencies of my plug-in.
>
> Regards,
> Markus
>

--
Thanks,
Rich Kulp
Previous Topic:Error configuring nature
Next Topic:changing color of AWT.label (1.2M1)
Goto Forum:
  


Current Time: Fri Apr 19 05:52:25 GMT 2024

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

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

Back to the top