[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[jdt-ui-dev] Overrides for Interface implementors, debug overrides?
|
Hi
I have two general questions about .override files and I hope someone
here can answer it for me.
Q1: How can I check if overrides are applied for a certain component in
VE (or in which order)? I.e. test if I configured everything correctly?
The background of this question is that I have a (visual) class
structure like this:
+java.lang.Object
+foo.Container
+bar.MyContainer implements acme.ISpecialContainer
+baz.MyContainer implements acme.ISpecialContainer
Q2: If I have an override file for foo.Container: Can I then define an
override for acme.ISpecialContainer which will override/extend the
foo.Container override and then be applied to all implementations of
ISpecialContainer?
I would like the following behavior:
- own icon for ISpecialContainer
- forbid to add children to ISpecialContainer in VE
I have defined an own GraphicalEditPart and an own ContainerPolicy
(which just returns UnexecutableCommand.INSTANCE in primAddCommand() and
primCreateCommand())
--- code start ---
public class SpecialContainerGraphicalEditPart extends
ContainerGraphicalEditPart
{
...
@Override
protected ContainerPolicy createContainerPolicy()
{
EditDomain domain = EditDomain.getEditDomain(this);
return new RefuseAllChildrenContainerPolicy(domain);
}
...
}
--- code end ---
Which is referenced in an override of
overrides/acme/ISpecialContainer.override:
--- override start ---
<?xml version="1.0" encoding="UTF-8"?>
<change:ChangeDescription
xmlns:codeGenHelpers="platform:/plugin/org.eclipse.ve.java.core/override
s/codegenHelpers.ecore" xmlns:com.ibm.etools.java="java.xmi"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:gridpref="platform:/plugin/org.eclipse.ve.jfc/overrides/java/awt/g
ridbagpreference.ecore"
xmlns:org.eclipse.ve.internal.cde.decorators="http:///org/eclipse/ve/int
ernal/cde/decorators.ecore"
xmlns:org.eclipse.ve.internal.cde.utility="http:///org/eclipse/ve/intern
al/cde/utility.ecore"
xmlns:org.eclipse.ve.internal.cdm="http:///org/eclipse/ve/internal/cdm.e
core"
xmlns:org.eclipse.ve.internal.jcm="http:///org/eclipse/ve/internal/jcm.e
core" xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmi:version="2.0"
xmlns:change="http://www.eclipse.org/emf/2003/Change">
<objectChanges key="X:ROOT#//@root">
<value featureName="eAnnotations">
<listChanges referenceValues="_eAnnotations"/>
</value>
</objectChanges>
<objectsToAttach
graphViewClassname="com.acme.plugin/acme.SpecialContainerGraphicalEditPa
rt:true" xmi:id="_eAnnotations"
xsi:type="org.eclipse.ve.internal.cde.decorators:ClassDescriptorDecorato
r">
<graphic
resourceName="platform:/plugin/com.acme.plugin/icons/special.gif"
xsi:type="org.eclipse.ve.internal.cde.utility:GIFFileGraphic"/>
</objectsToAttach>
</change:ChangeDescription>
--- override end ---
However, this does not seem to work. How can I debug this?
Any help is appreciated!
Thanks,
Kaspar