Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ve-dev] How to debug override xml?


Hi,

If there are no errors, then it is possible it is not finding your override file. Any xml syntax errors would of been logged.

Try debugging the following spots:

1) BeanInfoClassAdapter.ExtensionDocApplies.run(String overridePath). Put a breakpoint in here and change the breakpoint properties to stop when overrideFile.equals("FormLayout.override"). From there you can see if it ever loads your file.

If it loads your file then try debuggin at:

2) VisualUtilities.getLayoutPolicyFactory(EClassifier, EditDomain) and see if and when your FormLayout class comes in as an EClassifier and trace through and see why it doesn't find your override.

Rich



Gerald Rosenberg <gerald@xxxxxxxxxx>
Sent by: ve-dev-bounces@xxxxxxxxxxx

05/29/2006 04:42 PM

Please respond to
Discussions people developing code for the Visual Editor project <ve-dev@xxxxxxxxxxx>

To
ve-dev@xxxxxxxxxxx
cc
Subject
[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_______________________________________________
ve-dev mailing list
ve-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ve-dev


Back to the top