[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[ve-dev] How to debug override xml?
|
Debugging XML: flying over dark water, at midnight, under completely
overcast sky with no moon, last instrument reading was 30 degrees down
elevation before all power lost, cannot tell if eyes are open.
Implementing a custom layout manager. Have the
LayoutManager.override working given that the layout manager is
now listed in the VE layout customizer. Selection results in code
generation of a no arg constructor of my layout manager using a default
coding pattern:
private
JPanel getJPanel() {
- if
(jPanel == null) {
- jPanel
= new JPanel();
- jPanel
.setLayout(new FormLayout());
- jPanel
.add(getJButton(), null);
- }
- return
jPanel;
}
Added a
FormLayout.override, but cannot tell figure out why it is not working, which is presumed none of the breakpoints in my FormLayoutPolicyFactory.java, including one on the first line of the constructor, are ever reached.
No console or log error messages in the EclipseWorkspace or runtime-EclipseApplication .metadata/.log files.
How to debug? How do I tell which xml statement is failing because it is invalid or what in the chain from extension-point -> FormLayout.override -> FormLayoutPolicyFactory.java is not being found.
Presuming that this problem is surmountable:
1) Am I required to provide a beaninfo for the layout manager?
2) What controls/specifies the pattern of code generation? Is it all done with
BeanUtilities.createJavaObject, etc or is there a template somewhere that defines the pattern. I will need to generate using a pattern similar to GridLayout:
private JPanel getJPanel() {
- if
(jPanel == null) {
- String colSpec = "...";
- String rowSpec = "...";
- FormLayout formLayout = new FormLayout(colSpec, rowSpec);
- CellConstraints cc = new CellConstraints();
- jPanel
= new JPanel();
- jPanel
.setLayout(formLayout);
- jPanel
.add(getJButton1(), cc.xy(1,1)); // add at col 1, row 1
- jPanel
.add(getJButton2(), cc.xy(2,1)); // add at col 2, row 1
}
return jPanel;
}
----------------
Plugin ID from the manifest editor overview page: net.certiv.ve
(aka Bundle-SymbolicName: net.certiv.ve;singleton:=true)
-------------------------------
plugin.xml:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
<extension
point="org.eclipse.jem.beaninfo.registrations">
<registration
container="org.eclipse.jdt.launching.JRE_CONTAINER">
<override
package="java.awt"
path="overrides/java/awt">
</override>
<override
package="com.jgoodies.forms.layout"
path="overrides/com/jgoodies/forms/layout">
</override>
</registration>
</extension>
</plugin>
------------------------
overrides/com/jgoodies/forms/layout/FormLayout.override:
<?xml version="1.0" encoding="UTF-8"?>
<change:ChangeDescription
xmlns:codeGenHelpers="platform:/plugin/org.eclipse.ve.java.core/overrides/codegenHelpers.ecore"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:org.eclipse.jem.java="java.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"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:change="http://www.eclipse.org/emf/2003/Change" xmi:version="2.0">
<objectChanges key="X:ROOT#//@root">
<value featureName="eAnnotations">
<listChanges referenceValues="_eAnnotations"/>
</value>
</objectChanges>
<objectsToAttach xmi:id="_eAnnotations" xsi:type="org.eclipse.ve.internal.jcm:BeanDecorator">
<keyedValues
key="org.eclipse.ve.internal.java.visual.layoutpolicyfactoryclassnamekey"
value="net.certiv.ve/net.certiv.ve.jfc.FormLayoutPolicyFactory"
xsi:type="ecore:EStringToStringMapEntry"/>
</objectsToAttach>
</change:ChangeDescription>
----
Gerald B. Rosenberg
Certiv Analytics
www.certiv.net