Author: mareshkau
Date: 2008-10-30 07:12:00 -0400 (Thu, 30 Oct 2008)
New Revision: 11329
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
Log:
JBIDE-3061, fixed in trunk
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2008-10-30
09:45:49 UTC (rev 11328)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2008-10-30
11:12:00 UTC (rev 11329)
@@ -90,7 +90,6 @@
static String SELECT_BAR = "SELECT_LBAR"; //$NON-NLS-1$
private XulRunnerEditor xulRunnerEditor;
- private nsIDOMDocument domDocument;
private nsIDOMEventTarget documentEventTarget;
private nsIDOMElement contentArea;
private nsIDOMNode headNode;
@@ -454,19 +453,9 @@
}
public nsIDOMDocument getDomDocument() {
- if (domDocument == null) {
- domDocument = xulRunnerEditor.getDOMDocument();
- }
- return domDocument;
+ return xulRunnerEditor.getDOMDocument();
}
- /**
- * @param domDocument the domDocument to set
- */
- protected void setDomDocument(nsIDOMDocument domDocument) {
-
- this.domDocument = domDocument;
- }
public nsIDOMElement getContentArea() {
return contentArea;
@@ -582,7 +571,7 @@
getContentAreaEventTarget().addEventListener(MozillaDomEventListener.DRAGGESTUREEVENT,
getContentAreaEventListener(), false);
getContentAreaEventTarget().addEventListener(MozillaDomEventListener.DRAGOVEREVENT,
getContentAreaEventListener(), false);
getContentAreaEventTarget().addEventListener(MozillaDomEventListener.DBLCLICK,
getContentAreaEventListener(), false);
- documentEventTarget = (nsIDOMEventTarget)
getDomDocument().queryInterface(nsIDOMEventTarget.NS_IDOMEVENTTARGET_IID);
+ documentEventTarget = (nsIDOMEventTarget)
xulRunnerEditor.getDOMDocument().queryInterface(nsIDOMEventTarget.NS_IDOMEVENTTARGET_IID);
documentEventTarget.addEventListener(MozillaDomEventListener.KEYPRESS,
getContentAreaEventListener(), false);
} else {
//baseEventListener = new MozillaBaseEventListener();
@@ -604,7 +593,7 @@
getContentAreaEventTarget().removeEventListener(MozillaDomEventListener.DRAGOVEREVENT,
getContentAreaEventListener(), false);
getContentAreaEventTarget().removeEventListener(MozillaDomEventListener.DBLCLICK,
getContentAreaEventListener(), false);
- if (domDocument != null && documentEventTarget != null) {
+ if (xulRunnerEditor.getDOMDocument() != null && documentEventTarget != null)
{
documentEventTarget.removeEventListener(MozillaDomEventListener.KEYPRESS,
getContentAreaEventListener(), false);
}
getContentAreaEventListener().setVisualEditor(null);
@@ -729,7 +718,6 @@
addSelectionListener();
xulRunnerEditor.addResizerListener();
controller.reinit();
- setDomDocument(xulRunnerEditor.getDOMDocument());
}
Show replies by date