Author: dmaliarevich
Date: 2009-02-16 11:21:21 -0500 (Mon, 16 Feb 2009)
New Revision: 13634
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3619, event processing after inserting new tag in
text formatting was updated.
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2009-02-16
15:58:57 UTC (rev 13633)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2009-02-16
16:21:21 UTC (rev 13634)
@@ -499,6 +499,16 @@
switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE))
try {
sourceSelectionChanged();
+ /*
+ *
https://jira.jboss.org/jira/browse/JBIDE-3619
+ * VpeViewUpdateJob takes place after toolbar selection have been updated.
+ * New nodes haven't been put into dom mapping
+ * thus toolbar becomes desabled.
+ * Updating toolbar state here takes into account updated vpe nodes.
+ */
+ if (toolbarFormatControllerManager != null) {
+ toolbarFormatControllerManager.selectionChanged();
+ }
} finally {
switcher.stopActiveEditor();
}
@@ -1375,9 +1385,15 @@
void visualRefreshImpl() {
visualEditor.hideResizer();
-
+
String currentDoctype = DocTypeUtil.getDoctype(visualEditor.getEditorInput());
- if (!visualEditor.getDoctype().equals(currentDoctype)) {
+ /*
+ *
https://jira.jboss.org/jira/browse/JBIDE-3591
+ * Avoid using missing resource.
+ */
+ String visualEditorDoctype = visualEditor.getDoctype();
+ if ((null != currentDoctype) && (null != visualEditorDoctype)
+ && (!visualEditorDoctype.equals(currentDoctype))) {
visualEditor.reload();
} else {
//Fix bugs JBIDE-2750