1.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/ModelBridge.java Thu Aug 09 11:14:19 2007 +0000
1.2 +++ b/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/ModelBridge.java Thu Aug 09 11:22:44 2007 +0000
1.3 @@ -115,11 +115,11 @@
1.4 }
1.5 //
1.6 AXIComponent typeIn = getMapper().getContext().getSourceType();
1.7 - if (typeIn == null || typeIn.getModel().getState() != XslModel.State.VALID) {
1.8 + if (typeIn == null || typeIn.getModel() == null || typeIn.getModel().getState() != XslModel.State.VALID) {
1.9 errorMessages += NbBundle.getMessage(XsltModelBridge.class, "MSG_Error_BadInputSchema"); // NOI18N
1.10 }
1.11 AXIComponent typeOut = getMapper().getContext().getTargetType();
1.12 - if (typeOut == null || typeOut.getModel().getState() != XslModel.State.VALID) {
1.13 + if (typeOut == null || typeIn.getModel() == null || typeOut.getModel().getState() != XslModel.State.VALID) {
1.14 errorMessages += NbBundle.getMessage(XsltModelBridge.class, "MSG_Error_BadOutputSchema"); // NOI18N
1.15 }
1.16 } else {
2.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/view/XsltMapper.java Thu Aug 09 11:14:19 2007 +0000
2.2 +++ b/xslt.mapper/src/org/netbeans/modules/xslt/mapper/view/XsltMapper.java Thu Aug 09 11:22:44 2007 +0000
2.3 @@ -97,25 +97,25 @@
2.4 if (context != null) {
2.5 context.addMapperContextChangeListener(new MapperContextChangeListener() {
2.6 public void sourceTypeChanged(AXIComponent oldComponent, AXIComponent newComponent) {
2.7 - // TODO a
2.8 + schemaModelBridge.updateDiagram();
2.9 // System.out.println("mappperView sourceType changed ");
2.10 }
2.11 public void targetTypeChanged(AXIComponent oldComponent, AXIComponent newComponent) {
2.12 - // TODO a
2.13 + schemaModelBridge.updateDiagram();
2.14 // System.out.println("mappperView targetType changed ");
2.15 }
2.16 public void xslModelChanged(XslModel oldModel, XslModel newModel) {
2.17 - // TODO a
2.18 + schemaModelBridge.updateDiagram();
2.19 // System.out.println("mappperView xslModel changed ");
2.20 }
2.21
2.22 public void xslModelStateChanged(State oldValue, State newValue) {
2.23 - // TODO a
2.24 + schemaModelBridge.updateDiagram();
2.25 // System.out.println("mappperView xslModelStateChanged changed ");
2.26 }
2.27
2.28 public void tMapModelStateChanged(State oldValue, State newValue) {
2.29 - // TODO a
2.30 + schemaModelBridge.updateDiagram();
2.31 // System.out.println("mappperView tMapModelStateChanged changed ");
2.32 }
2.33 });