[Ann] xStructure 1.1

Hi,


1.1 release is available. Changes :

  • New: compiled with Java 5 for MacOSX users
  • New: icons may be configured for each node
  • New: 'maxlength' attribute to show only a substring of a long text
  • New: supported schema URI may be defined with regexp
  • New: supported schema URI supports public ID for DTD
  • New: new XSD : xStructure 1.1
  • New: Mapping Definition File for Spring Beans 2.5
  • New: Mapping Definition File for Docbook / Website 2.5/2.6 (thanks to Joachim Ansorg)
  • Chg: French translation removed (until I18N is not adopted in Idea)
  • Fix: NPE occuring sometimes when opening some JSP
  • Fix: reload current structure view after reloading mappings
  • Fix: bug when declaring several supported schemas
  • Fix: bug in hot deploy of mapping definition files

xStructure plugin provides a flexible way for displaying structure of XML files to make navigation easier.
It allows to configure node rendering to display attributes or tag values and also to hide some nodes to make XML structure tree more compact.


Plugin page: http://plugins.intellij.net/plugin/?id=1867
Web site: http://code.google.com/p/xstructure/


Sylvain

7 comments
Comment actions Permalink

Hi Sylvain,
I'm trying to get your plugin to work with a custom schema and not
having much luck :(
It's really simple : I have a test schema called Person.xsd, a file with
a person in it called Person.xml, and an xml file that I'm placing in
the xstructure config dir. They are all attached - maybe you can tell
me where I'm going wrong?

The only thing I should mention is that my config directory is in a
custom location, but I've put my xstructure xml in the correct dir
according to that.

Hope you can help!
N.
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Person">
<xs:complexType>
<xs:sequence>
<xs:element name="Name"/>
<xs:element name="DOB"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

0
Comment actions Permalink

Hi Nathan,


Thanks for reporting:-)

Sylvain

0
Comment actions Permalink

Sylvain FRANCOIS wrote:

Hi Nathan,

  • 1.1 release did not support noNamespaceSchemaLocation for XSD schemas. I've just published 1.1.1 release which adds support for this

  • in your mapping file, you have written MySchema.xsd instead of Person.xsd in <supported-schemas> section, so your mapping could not have been loaded anyway


Hi Sylvain,

Thanks for your update and advice, everything seems to be working now :)
Looking like this is going to be a very useful plugin!

I was wondering if you had any plans for conditional formatting - i.e.
making parts of the node's label/tip conditional upon whether a child
element/attribute exists. I've done a xStructure MDF for JAXB Schemas
which I'd like to contribute, but it's a bit messy without conditional
formatting.

Also, I ran into a bug when switching to IDEA window, stack trace below.

Many thanks for your efforts!
N.

Assertion failed: Invalid root element
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:89)
at
com.intellij.psi.impl.source.tree.SharedImplUtil.findCharTableByTree(SharedImplUtil.java:74)
at
com.intellij.psi.impl.source.xml.XmlTagImpl.getAttribute(XmlTagImpl.java:229)
at
org.sylfra.idea.plugins.xstructure.resolution.impl.defaultt.XMappingResolverDefaultImpl.internalResolveSingleExpPart(XMappingResolverDefaultImpl.java:205)
at
org.sylfra.idea.plugins.xstructure.resolution.impl.defaultt.XMappingResolverDefaultImpl.internalResolveSingleExp(XMappingResolverDefaultImpl.java:183)
at
org.sylfra.idea.plugins.xstructure.resolution.impl.defaultt.XMappingResolverDefaultImpl.resolveTargetText(XMappingResolverDefaultImpl.java:148)
at
org.sylfra.idea.plugins.xstructure.view.XSModelTreeElement.getTargetText(XSModelTreeElement.java:320)
at
org.sylfra.idea.plugins.xstructure.view.XSModelTreeElement.getTargetLabel(XSModelTreeElement.java:284)
at
org.sylfra.idea.plugins.xstructure.view.XSViewComponent$XStructureNodeRenderer.customizeCellRenderer(XSViewComponent.java:91)
at
com.intellij.ui.ColoredTreeCellRenderer.getTreeCellRendererComponent(ColoredTreeCellRenderer.java:97)
at javax.swing.plaf.basic.BasicTreeUI.paintRow(BasicTreeUI.java:1498)
at javax.swing.plaf.basic.BasicTreeUI.paint(BasicTreeUI.java:1210)
at javax.swing.plaf.metal.MetalTreeUI.paint(MetalTreeUI.java:152)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)
at javax.swing.JComponent.paintComponent(JComponent.java:763)
at javax.swing.JComponent.paint(JComponent.java:1027)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JViewport.paint(JViewport.java:747)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:564)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:564)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paintToOffscreen(JComponent.java:5129)
at
javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1472)
at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1403)
at javax.swing.RepaintManager.paint(RepaintManager.java:1217)
at javax.swing.JComponent.paint(JComponent.java:1013)
at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
at java.awt.Container.paint(Container.java:1780)
at com.intellij.openapi.wm.impl.IdeFrameImpl.paint(IdeFrameImpl.java:71)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:714)
at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:694)
at
javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at com.intellij.ide.IdeEventQueue.c(IdeEventQueue.java:35)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:99)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:217)
at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

0
Comment actions Permalink

Guest wrote:


I was wondering if you had any plans for conditional formatting - i.e.
making parts of the node's label/tip conditional upon whether a child
element/attribute exists.  I've done a xStructure MDF for JAXB Schemas
which I'd like to contribute, but it's a bit messy without conditional
formatting.

Yes I have this in mind and probably for next release :-)

I thought using nested elements in mappings to support conditions, such as Ant. Don't know yet which conditions I'll provide for next release and if I'll support AND/OR.
I'm interested in what you would need. I've created an issue for that, please add your comments here: http://code.google.com/p/xstructure/issues/detail?id=4

Guest wrote:


Also, I ran into a bug when switching to IDEA window, stack trace below.

OK, I'll see what it is. If you could post XML file and MDF file, it would be great (or send me at 'syllant' on GMail). And even better if you could post an issue here: http://code.google.com/p/xstructure/issues/list

Thanks

Sylvain

0
Comment actions Permalink

It's a shame that when I had this plugin installed, the default structure rendering for Spring files (as a list of beans) was completely lost.
Any chance to make it co-exist with the plugin?

0
Comment actions Permalink

sergei_ivanov wrote:

It's a shame that ...

Hope you intended to add a smiley that you forgot, I found "It's a shame" expression misplaced here.

You can see default structure view just be choosing "None" in the drop-down list showing available schemas (in structure view toolbar). Isn't this you are requesting ?

Sylvain

0
Comment actions Permalink

No, I am serious, no kidding.
By default (IDEA 8.1), the Structure pane has green bean icons for all beans in the Spring config file (with context actions for the beans too).
With the plugin enabled, even when I choose "None" for the schema, I get a standard XML structure view.

0

Please sign in to leave a comment.