Author: mareshkau
Date: 2008-03-31 14:53:57 -0400 (Mon, 31 Mar 2008)
New Revision: 7217
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/PreviewDomEventListener.java
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomEventListener.java
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/MozillaPreview.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1964,
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomEventListener.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomEventListener.java 2008-03-31
18:34:24 UTC (rev 7216)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomEventListener.java 2008-03-31
18:53:57 UTC (rev 7217)
@@ -34,29 +34,29 @@
private EditorDomEventListener editorDomEventListener;
//possible events
- public static final String MOUSEMOVEEVENTTYPE="mousemove";
+ public static final String MOUSEMOVEEVENTTYPE="mousemove"; //$NON-NLS-1$
- public static final String MOUSEDOWNEVENTTYPE="mousedown";
+ public static final String MOUSEDOWNEVENTTYPE="mousedown"; //$NON-NLS-1$
- public static final String MOUSEUPEVENTTYPE="mouseup";
+ public static final String MOUSEUPEVENTTYPE="mouseup"; //$NON-NLS-1$
- public static final String CLICKEVENTTYPE="click";
+ public static final String CLICKEVENTTYPE="click"; //$NON-NLS-1$
- public static final String KEYPRESS="keypress";
+ public static final String KEYPRESS="keypress"; //$NON-NLS-1$
- public static final String DBLCLICK="dblclick";
+ public static final String DBLCLICK="dblclick"; //$NON-NLS-1$
- public static final String CONTEXTMENUEVENTTYPE="contextmenu";
+ public static final String CONTEXTMENUEVENTTYPE="contextmenu"; //$NON-NLS-1$
- public static final String DRAGGESTUREEVENT = "draggesture";
+ public static final String DRAGGESTUREEVENT = "draggesture"; //$NON-NLS-1$
- public static final String DRAGOVEREVENT = "dragover";
+ public static final String DRAGOVEREVENT = "dragover"; //$NON-NLS-1$
- public static final String DRAGDROPEVENT = "dragdrop";
+ public static final String DRAGDROPEVENT = "dragdrop"; //$NON-NLS-1$
- public static final String DRAGENTEREVENT = "dragenter";
+ public static final String DRAGENTEREVENT = "dragenter"; //$NON-NLS-1$
- public static final String DRAGEXITEVENT = "dragexit";
+ public static final String DRAGEXITEVENT = "dragexit"; //$NON-NLS-1$
void setEditorDomEventListener(EditorDomEventListener listener) {
editorDomEventListener = listener;
@@ -102,7 +102,7 @@
if (editorDomEventListener != null && !isXulElement(mouseEvent)) {
nsIDragSession dragSession = visualEditor.getCurrentDragSession();
if (dragSession.isDataFlavorSupported(VpeController.MODEL_FLAVOR)) {
- editorDomEventListener.onPasteOrDrop(mouseEvent, VpeController.MODEL_FLAVOR,
"");
+ editorDomEventListener.onPasteOrDrop(mouseEvent, VpeController.MODEL_FLAVOR,
""); //$NON-NLS-1$
}
}
mouseEvent.preventDefault();
@@ -123,7 +123,6 @@
*/
public void handleEvent(nsIDOMEvent domEvent) {
try{
-
if(getEditorDomEventListener()==null){
return;
@@ -187,7 +186,7 @@
}catch(Throwable th) {
- VpePlugin.getPluginLog().logError("Event Handling Error", th);
+ VpePlugin.getPluginLog().logError("Event Handling Error", th);
//$NON-NLS-1$
throw new RuntimeException(th);
}
}
@@ -200,4 +199,5 @@
editorDomEventListener.notifySelectionChanged(domDocument, selection, reason);
}
}
+
}
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-03-31
18:34:24 UTC (rev 7216)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2008-03-31
18:53:57 UTC (rev 7217)
@@ -55,18 +55,15 @@
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.messages.VpeUIMessages;
import org.jboss.tools.vpe.xulrunner.editor.XulRunnerEditor;
-import org.mozilla.interfaces.nsIClipboardDragDropHookList;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMEventTarget;
import org.mozilla.interfaces.nsIDOMNamedNodeMap;
import org.mozilla.interfaces.nsIDOMNode;
import org.mozilla.interfaces.nsIDOMNodeList;
-import org.mozilla.interfaces.nsISelection;
-import org.mozilla.interfaces.nsISelectionPrivate;
public class MozillaEditor extends EditorPart implements IReusableEditor {
- protected static final String INIT_URL = "file://" + (new
File(VpePlugin.getDefault().getResourcePath("ve"),
"init.html")).getAbsolutePath();
+ protected static final String INIT_URL = "file://" + (new
File(VpePlugin.getDefault().getResourcePath("ve"),
"init.html")).getAbsolutePath(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
// private static final String INIT_URL = "chrome://vpe/content/init.html";
//$NON-NLS-1$
private static final String CONTENT_AREA_ID = "__content__area__";
//$NON-NLS-1$
@@ -77,11 +74,9 @@
private nsIDOMElement contentArea;
private nsIDOMNode headNode;
private nsIDOMEventTarget contentAreaEventTarget;
- private MozillaDomEventListener contentAreaEventListener = new
MozillaDomEventListener();
- //TODO Max Areshkau may be we need delete this
- //private MozillaBaseEventListener baseEventListener = null;
+ private MozillaDomEventListener contentAreaEventListener;
+
private EditorLoadWindowListener editorLoadWindowListener;
- //
private EditorDomEventListener editorDomEventListener;
private IVpeToolBarManager vpeToolBarManager;
private FormatControllerManager formatControllerManager = new
FormatControllerManager();
@@ -318,7 +313,7 @@
vpeToolBarManager = null;
}
- //removeDomEventListeners();
+// removeDomEventListeners();
if(getController()!=null) {
controller.dispose();
controller=null;
@@ -341,8 +336,9 @@
public void setEditorDomEventListener(EditorDomEventListener listener) {
editorDomEventListener = listener;
- if (contentAreaEventListener != null) {
- contentAreaEventListener.setEditorDomEventListener(listener);
+ if (getContentAreaEventListener() != null) {
+
+ getContentAreaEventListener().setEditorDomEventListener(listener);
}
}
@@ -393,14 +389,13 @@
nsIDOMNode node = nodeList.item(i);
if (isContentArea(node)) {
if (node.getNodeType() != nsIDOMNode.ELEMENT_NODE) {
- throw new RuntimeException("The content area node should by element
node.");
+ throw new RuntimeException("The content area node should by element
node."); //$NON-NLS-1$
}
area = (nsIDOMElement) node.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
break;
}
}
-// area = findContentArea(root);
if (area == null) {
return null;
}
@@ -413,7 +408,7 @@
}
private nsIDOMNode findHeadNode(nsIDOMNode root){
- nsIDOMNode headNode = findChildNode(root, HTML.TAG_HEAD); //$NON-NLS-1$
+ nsIDOMNode headNode = findChildNode(root, HTML.TAG_HEAD);
return headNode;
}
@@ -429,31 +424,6 @@
return null;
}
- private nsIDOMElement findContentArea(nsIDOMNode node) {
- nsIDOMElement area = null;
- if (node != null && node.getNodeType() == nsIDOMNode.ELEMENT_NODE) {
- nsIDOMNodeList children = node.getChildNodes();
- if (children != null) {
- long length = children.getLength();
- for (long i = 0; i < length; i++) {
- nsIDOMNode child = children.item(i);
- if (isContentArea(child)) {
- if (child.getNodeType() != nsIDOMNode.ELEMENT_NODE) {
- throw new RuntimeException("The content area node should by element
node.");
- }
- area = (nsIDOMElement)child;
- break;
- }
- area = findContentArea(child);
- if (area != null) {
- break;
- }
- }
- }
- }
- return area;
- }
-
private boolean isContentArea(nsIDOMNode node) {
boolean ret = false;
if (HTML.TAG_BODY.equalsIgnoreCase(node.getNodeName())) {
@@ -483,26 +453,26 @@
}
}
- private void addDomEventListeners() {
+ protected void addDomEventListeners() {
if (contentArea != null) {
- if (contentAreaEventListener != null) {
- contentAreaEventListener.setVisualEditor(xulRunnerEditor);
- contentAreaEventTarget = (nsIDOMEventTarget)
contentArea.queryInterface(nsIDOMEventTarget.NS_IDOMEVENTTARGET_IID);
+ if (getContentAreaEventListener() != null) {
+ getContentAreaEventListener().setVisualEditor(xulRunnerEditor);
+ setContentAreaEventTarget((nsIDOMEventTarget)
contentArea.queryInterface(nsIDOMEventTarget.NS_IDOMEVENTTARGET_IID));
//add mozilla event handlers
- contentAreaEventTarget.addEventListener(MozillaDomEventListener.CLICKEVENTTYPE,
contentAreaEventListener, false); //$NON-NLS-1$
- contentAreaEventTarget.addEventListener(MozillaDomEventListener.MOUSEDOWNEVENTTYPE,
contentAreaEventListener, false); //$NON-NLS-1$
- contentAreaEventTarget.addEventListener(MozillaDomEventListener.MOUSEUPEVENTTYPE,
contentAreaEventListener, false); //$NON-NLS-1$
- contentAreaEventTarget.addEventListener(MozillaDomEventListener.MOUSEMOVEEVENTTYPE,
contentAreaEventListener, false); //$NON-NLS-1$
- contentAreaEventTarget.addEventListener(MozillaDomEventListener.CONTEXTMENUEVENTTYPE,
contentAreaEventListener, false);//$NON-NLS-1$
- contentAreaEventTarget.addEventListener(MozillaDomEventListener.DRAGDROPEVENT,
contentAreaEventListener, false);//$NON-NLS-1$
- contentAreaEventTarget.addEventListener(MozillaDomEventListener.DRAGENTEREVENT,
contentAreaEventListener, false);//$NON-NLS-1$
- contentAreaEventTarget.addEventListener(MozillaDomEventListener.DRAGEXITEVENT,
contentAreaEventListener, false);//$NON-NLS-1$
- contentAreaEventTarget.addEventListener(MozillaDomEventListener.DRAGGESTUREEVENT,
contentAreaEventListener, false);//$NON-NLS-1$
- contentAreaEventTarget.addEventListener(MozillaDomEventListener.DRAGOVEREVENT,
contentAreaEventListener, false);//$NON-NLS-1$
- contentAreaEventTarget.addEventListener(MozillaDomEventListener.DBLCLICK,
contentAreaEventListener, false);//$NON-NLS-1$
+ getContentAreaEventTarget().addEventListener(MozillaDomEventListener.CLICKEVENTTYPE,
getContentAreaEventListener(), false);
+ getContentAreaEventTarget().addEventListener(MozillaDomEventListener.MOUSEDOWNEVENTTYPE,
getContentAreaEventListener(), false);
+ getContentAreaEventTarget().addEventListener(MozillaDomEventListener.MOUSEUPEVENTTYPE,
getContentAreaEventListener(), false);
+ getContentAreaEventTarget().addEventListener(MozillaDomEventListener.MOUSEMOVEEVENTTYPE,
getContentAreaEventListener(), false);
+ getContentAreaEventTarget().addEventListener(MozillaDomEventListener.CONTEXTMENUEVENTTYPE,
getContentAreaEventListener(), false);
+ getContentAreaEventTarget().addEventListener(MozillaDomEventListener.DRAGDROPEVENT,
getContentAreaEventListener(), false);
+ getContentAreaEventTarget().addEventListener(MozillaDomEventListener.DRAGENTEREVENT,
getContentAreaEventListener(), false);
+ getContentAreaEventTarget().addEventListener(MozillaDomEventListener.DRAGEXITEVENT,getContentAreaEventListener(),
false);
+ 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.addEventListener(MozillaDomEventListener.KEYPRESS,
contentAreaEventListener, false); //$NON-NLS-1$
+ documentEventTarget.addEventListener(MozillaDomEventListener.KEYPRESS,
getContentAreaEventListener(), false);
} else {
//baseEventListener = new MozillaBaseEventListener();
}
@@ -510,48 +480,39 @@
}
protected void removeDomEventListeners() {
- if (contentAreaEventTarget != null && contentAreaEventListener != null) {
- contentAreaEventTarget.removeEventListener(MozillaDomEventListener.CLICKEVENTTYPE,
contentAreaEventListener, false); //$NON-NLS-1$
- contentAreaEventTarget.removeEventListener(MozillaDomEventListener.MOUSEDOWNEVENTTYPE,
contentAreaEventListener, false); //$NON-NLS-1$
- contentAreaEventTarget.removeEventListener(MozillaDomEventListener.MOUSEUPEVENTTYPE,
contentAreaEventListener, false); //$NON-NLS-1$
- contentAreaEventTarget.removeEventListener(MozillaDomEventListener.MOUSEMOVEEVENTTYPE,
contentAreaEventListener, false); //$NON-NLS-1$
- contentAreaEventTarget.removeEventListener(MozillaDomEventListener.CONTEXTMENUEVENTTYPE,
contentAreaEventListener, false);//$NON-NLS-1$
- contentAreaEventTarget.removeEventListener(MozillaDomEventListener.DRAGDROPEVENT,
contentAreaEventListener, false);//$NON-NLS-1$
- contentAreaEventTarget.removeEventListener(MozillaDomEventListener.DRAGENTEREVENT,
contentAreaEventListener, false);//$NON-NLS-1$
- contentAreaEventTarget.removeEventListener(MozillaDomEventListener.DRAGEXITEVENT,
contentAreaEventListener, false);//$NON-NLS-1$
- contentAreaEventTarget.removeEventListener(MozillaDomEventListener.DRAGGESTUREEVENT,
contentAreaEventListener, false);//$NON-NLS-1$
- contentAreaEventTarget.removeEventListener(MozillaDomEventListener.DRAGOVEREVENT,
contentAreaEventListener, false);//$NON-NLS-1$
- contentAreaEventTarget.removeEventListener(MozillaDomEventListener.DBLCLICK,
contentAreaEventListener, false);//$NON-NLS-1$
+ if (getContentAreaEventTarget() != null && getContentAreaEventListener() !=
null) {
+ getContentAreaEventTarget().removeEventListener(MozillaDomEventListener.CLICKEVENTTYPE,
getContentAreaEventListener(), false);
+ getContentAreaEventTarget().removeEventListener(MozillaDomEventListener.MOUSEDOWNEVENTTYPE,
getContentAreaEventListener(), false);
+ getContentAreaEventTarget().removeEventListener(MozillaDomEventListener.MOUSEUPEVENTTYPE,
getContentAreaEventListener(), false);
+ getContentAreaEventTarget().removeEventListener(MozillaDomEventListener.MOUSEMOVEEVENTTYPE,
getContentAreaEventListener(), false);
+ getContentAreaEventTarget().removeEventListener(MozillaDomEventListener.CONTEXTMENUEVENTTYPE,
getContentAreaEventListener(), false);
+ getContentAreaEventTarget().removeEventListener(MozillaDomEventListener.DRAGDROPEVENT,
getContentAreaEventListener(), false);
+ getContentAreaEventTarget().removeEventListener(MozillaDomEventListener.DRAGENTEREVENT,
getContentAreaEventListener(), false);
+ getContentAreaEventTarget().removeEventListener(MozillaDomEventListener.DRAGEXITEVENT,
getContentAreaEventListener(), false);
+ getContentAreaEventTarget().removeEventListener(MozillaDomEventListener.DRAGGESTUREEVENT,
getContentAreaEventListener(), false);
+ getContentAreaEventTarget().removeEventListener(MozillaDomEventListener.DRAGOVEREVENT,
getContentAreaEventListener(), false);
+ getContentAreaEventTarget().removeEventListener(MozillaDomEventListener.DBLCLICK,
getContentAreaEventListener(), false);
if (domDocument != null && documentEventTarget != null) {
- documentEventTarget.removeEventListener(MozillaDomEventListener.KEYPRESS,
contentAreaEventListener, false); //$NON-NLS-1$
+ documentEventTarget.removeEventListener(MozillaDomEventListener.KEYPRESS,
getContentAreaEventListener(), false);
}
- contentAreaEventListener.setVisualEditor(null);
- contentAreaEventTarget = null;
- contentAreaEventListener = null;
+ getContentAreaEventListener().setVisualEditor(null);
+ setContentAreaEventTarget(null);
+ setContentAreaEventListener(null);
documentEventTarget = null;
}
}
private void addSelectionListener() {
- if (contentAreaEventListener != null&&xulRunnerEditor!=null) {
+ if (getContentAreaEventListener() != null&&xulRunnerEditor!=null) {
- xulRunnerEditor.addSelectionListener(contentAreaEventListener);
+ xulRunnerEditor.addSelectionListener(getContentAreaEventListener());
}
}
- /*private void removeSelectionListener() {
- if (contentAreaEventListener != null&&xulRunnerEditor!=null) {
-
- nsISelection selection = xulRunnerEditor.getSelection();
- nsISelectionPrivate selectionPrivate = (nsISelectionPrivate)
selection.queryInterface(nsISelectionPrivate.NS_ISELECTIONPRIVATE_IID);
- selectionPrivate.removeSelectionListener(contentAreaEventListener);
- }
- }*/
-
public void setSelectionRectangle(nsIDOMElement element, int resizerConstrains, boolean
scroll) {
- if (contentAreaEventListener != null) {
+ if (getContentAreaEventListener() != null) {
xulRunnerEditor.setSelectionRectangle((nsIDOMElement)element, resizerConstrains,
scroll);
}
}
@@ -560,7 +521,7 @@
* Show resizer markers
*/
public void showResizer() {
- if (contentAreaEventListener != null) {
+ if (getContentAreaEventListener() != null) {
xulRunnerEditor.showResizer();
}
}
@@ -569,7 +530,7 @@
* Hide resizer markers
*/
public void hideResizer() {
- if (contentAreaEventListener != null) {
+ if (getContentAreaEventListener() != null) {
xulRunnerEditor.hideResizer();
}
}
@@ -609,5 +570,39 @@
this.link = link;
}
+ /**
+ * @return the contentAreaEventTarget
+ */
+ public nsIDOMEventTarget getContentAreaEventTarget() {
+ return contentAreaEventTarget;
+ }
+
+ /**
+ * @param contentAreaEventTarget the contentAreaEventTarget to set
+ */
+ public void setContentAreaEventTarget(nsIDOMEventTarget contentAreaEventTarget) {
+ this.contentAreaEventTarget = contentAreaEventTarget;
+ }
+
+ /**
+ * @return the contentAreaEventListener
+ */
+ public MozillaDomEventListener getContentAreaEventListener() {
+ if(contentAreaEventListener==null) {
+
+ contentAreaEventListener = new MozillaDomEventListener();
+ }
+ return contentAreaEventListener;
+ }
+
+ /**
+ * @param contentAreaEventListener the contentAreaEventListener to set
+ */
+ public void setContentAreaEventListener(
+ MozillaDomEventListener contentAreaEventListener) {
+
+ this.contentAreaEventListener = contentAreaEventListener;
+ }
+
}
\ No newline at end of file
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaPreview.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaPreview.java 2008-03-31
18:34:24 UTC (rev 7216)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaPreview.java 2008-03-31
18:53:57 UTC (rev 7217)
@@ -52,6 +52,7 @@
private StructuredTextEditor sourceEditor;
private VpeEditorPart editPart;
private IDOMDocument sourceDocument;
+ private PreviewDomEventListener contentAreaEventListener;
public MozillaPreview(VpeEditorPart editPart, StructuredTextEditor sourceEditor) {
setTemplateManager(VpeTemplateManager.getInstance());
@@ -141,8 +142,8 @@
*
*/
private void onLoadWindow() {
-
setContentArea(findContentArea());
+ addDomEventListeners();
if (editorLoadWindowListener != null) {
editorLoadWindowListener.load();
}
@@ -271,6 +272,7 @@
public void dispose() {
setEditorDomEventListener(null);
setEditorLoadWindowListener(null);
+ setContentAreaEventListener(null);
if (pageContext != null) {
pageContext.dispose();
pageContext=null;
@@ -282,7 +284,39 @@
sourceDocument=null;
sourceEditor=null;
editPart=null;
+
//super.dispose();
}
+
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.vpe.editor.mozilla.MozillaEditor#getContentAreaEventListener()
+ */
+ @Override
+ public MozillaDomEventListener getContentAreaEventListener() {
+
+ if(this.contentAreaEventListener==null||!(contentAreaEventListener instanceof
PreviewDomEventListener)){
+
+ contentAreaEventListener = new PreviewDomEventListener();
+ }
+
+ return contentAreaEventListener;
+ }
+
+
+
+ /* (non-Javadoc)
+ * @see
org.jboss.tools.vpe.editor.mozilla.MozillaEditor#setContentAreaEventListener(org.jboss.tools.vpe.editor.mozilla.MozillaDomEventListener)
+ */
+ @Override
+ public void setContentAreaEventListener(
+ MozillaDomEventListener contentAreaEventListener) {
+
+ if(contentAreaEventListener instanceof PreviewDomEventListener) {
+
+ this.contentAreaEventListener = (PreviewDomEventListener) contentAreaEventListener;
+ }
+ }
+
}
\ No newline at end of file
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/PreviewDomEventListener.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/PreviewDomEventListener.java
(rev 0)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/PreviewDomEventListener.java 2008-03-31
18:53:57 UTC (rev 7217)
@@ -0,0 +1,31 @@
+/*******************************************************************************
+* Copyright (c) 2007 Red Hat, Inc.
+* Distributed under license by Red Hat, Inc. All rights reserved.
+* This program is made available under the terms of the
+* Eclipse Public License v1.0 which accompanies this distribution,
+* and is available at
http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* Red Hat, Inc. - initial API and implementation
+******************************************************************************/
+package org.jboss.tools.vpe.editor.mozilla;
+
+import org.mozilla.interfaces.nsIDOMEvent;
+
+/**
+ * @author mareshkau
+ *
+ */
+public class PreviewDomEventListener extends MozillaDomEventListener {
+
+ /* (non-Javadoc)
+ * @see
org.jboss.tools.vpe.editor.mozilla.MozillaDomEventListener#handleEvent(org.mozilla.interfaces.nsIDOMEvent)
+ */
+ @Override
+ public void handleEvent(nsIDOMEvent domEvent) {
+
+ domEvent.preventDefault();
+
+ }
+}
+