### Eclipse Workspace Patch 1.0 #P org.jboss.tools.vpe Index: src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java =================================================================== --- src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java (revision 32808) +++ src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java (working copy) @@ -525,7 +525,7 @@ } //Create a composite to the Editor - Composite cmpEd = new Composite (cmpEdTl, SWT.NATIVE); + final Composite cmpEd = new Composite (cmpEdTl, SWT.NATIVE); GridLayout layoutEd = new GridLayout(1, false); layoutEd.marginBottom = 0; layoutEd.marginHeight = 1; @@ -587,11 +587,15 @@ } public void completed(ProgressEvent event) { - if(MozillaEditor.this.getXulRunnerEditor().getWebBrowser()!=null){ - //process this code only in case when editor hasn't been disposed, - //see https://jira.jboss.org/browse/JBIDE-6373 - MozillaEditor.this.onLoadWindow(); - xulRunnerEditor.getBrowser().removeProgressListener(this); + try { + if (MozillaEditor.this.getXulRunnerEditor().getWebBrowser() != null) { + //process this code only in case when editor hasn't been disposed, + //see https://jira.jboss.org/browse/JBIDE-6373 + MozillaEditor.this.onLoadWindow(); + xulRunnerEditor.getBrowser().removeProgressListener(this); + } + } catch (Exception ex) { + showXulRunnerError(cmpEd, ex); } } Index: src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java =================================================================== --- src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java (revision 32808) +++ src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java (working copy) @@ -263,7 +263,15 @@ */ private boolean addNode(Node sourceNode, nsIDOMNode visualNextNode, nsIDOMNode visualContainer) { try { - nsIDOMNode visualNewNode = createNode(sourceNode, visualContainer); + + nsIDOMNode visualNewNode = null; + + try { + visualNewNode = createNode(sourceNode, visualContainer); + } catch (Exception ex) { + VpePlugin.getPluginLog().logError(ex); + } + // Commented as fix for JBIDE-3012. // // Fix for JBIDE-1097 // try { @@ -381,6 +389,11 @@ VpeTemplate defTemplate = getTemplateManager().getDefTemplate(); creationData = defTemplate.create(getPageContext(), sourceNode, getVisualDocument()); + } catch (Exception ex) { + VpePlugin.getPluginLog().logError(ex); + VpeTemplate defTemplate = getTemplateManager().getDefTemplate(); + creationData = defTemplate.create(getPageContext(), sourceNode, + getVisualDocument()); } if (creationData == null) { VpePlugin.getDefault().logError( @@ -476,8 +489,11 @@ visualNewNode= span; } getPageContext().setCurrentVisualNode(visualOldContainer); - template.validate(getPageContext(), sourceNode, getVisualDocument(), - creationData); + try { + template.validate(getPageContext(), sourceNode, getVisualDocument(), creationData); + } catch (Exception ex) { + VpePlugin.getPluginLog().logError(ex); + } getPageContext().setCurrentVisualNode(null); if (border != null) { return border; @@ -679,8 +695,12 @@ private void setPseudoContent(VpeTemplate containerTemplate, Node sourceContainer, nsIDOMNode visualContainer) { if (containerTemplate != null) { - containerTemplate.setPseudoContent(pageContext, sourceContainer, + try { + containerTemplate.setPseudoContent(pageContext, sourceContainer, visualContainer, getVisualDocument()); + } catch (Exception ex) { + VpePlugin.getPluginLog().logError(ex); + } } else { try { VpeDefaultPseudoContentCreator.getInstance().setPseudoContent(