Author: mareshkau
Date: 2009-10-05 13:05:41 -0400 (Mon, 05 Oct 2009)
New Revision: 17903
Modified:
workspace/mareshkau/xulrunner1.9.diff
Log:
support for windows has been added
Modified: workspace/mareshkau/xulrunner1.9.diff
===================================================================
--- workspace/mareshkau/xulrunner1.9.diff 2009-10-05 15:36:11 UTC (rev 17902)
+++ workspace/mareshkau/xulrunner1.9.diff 2009-10-05 17:05:41 UTC (rev 17903)
@@ -118,3 +118,132 @@
if (accessible != null) {
int[] xArray = new int[1]; // Left hand corner of the node
int[] yArray = new int[1]; // Top corner of the node
+Index:
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java
+===================================================================
+---
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java (revision
17893)
++++
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java (working
copy)
+@@ -50,8 +50,8 @@
+
+ public class XulRunnerBrowser implements nsIWebBrowserChrome,
+ nsIWebProgressListener, nsITooltipListener {
+- private static final String XULRUNNER_LOWER_VERSION = "1.8.1.2";
//$NON-NLS-1$
+- private static final String XULRUNNER_HIGHER_VERSION = "1.8.1.9";
//$NON-NLS-1$
++ private static final String XULRUNNER_LOWER_VERSION = "1.9.1.0";
//$NON-NLS-1$
++ private static final String XULRUNNER_HIGHER_VERSION = "1.9.1.9";
//$NON-NLS-1$
+ // TODO Sergey Vasilyev Think. May be XULRUNNER_BUNDLE shouldn't be final?
+ private static final String XULRUNNER_BUNDLE;
+ private static final String XULRUNNER_ENTRY = "/xulrunner"; //$NON-NLS-1$
+@@ -82,7 +82,7 @@
+ }
+
+ public XulRunnerBrowser(Composite parent) throws XulRunnerException {
+- initXulRunner();
++// initXulRunner();
+
+ browser = new Browser(parent, SWT.MOZILLA);
+
+Index:
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 (revision
17893)
++++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java (working
copy)
+@@ -923,7 +923,7 @@
+ nsIEditingSession iEditingSession = (nsIEditingSession) getXulRunnerEditor().
+
getComponentManager().createInstanceByContractID(XPCOM.NS_EDITINGSESSION_CONTRACTID,
null, nsIEditingSession.NS_IEDITINGSESSION_IID);
+ //make window editable
+- iEditingSession.makeWindowEditable(getXulRunnerEditor().getWebBrowser().getContentDOMWindow(),
"html", true); //$NON-NLS-1$
++ iEditingSession.makeWindowEditable(getXulRunnerEditor().getWebBrowser().getContentDOMWindow(),
"html", true,true,true); //$NON-NLS-1$
+ //here we setup editor for window
+
iEditingSession.setupEditorOnWindow(getXulRunnerEditor().getWebBrowser().getContentDOMWindow());
+ //getting some editor to disable some actions
+Index:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VisualDomUtil.java
+===================================================================
+---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VisualDomUtil.java (revision
17893)
++++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VisualDomUtil.java (working
copy)
+@@ -10,18 +10,14 @@
+ ******************************************************************************/
+ package org.jboss.tools.vpe.editor.util;
+
+-import java.lang.ref.Reference;
+-import java.lang.ref.SoftReference;
+ import java.util.ArrayList;
+ import java.util.HashSet;
+ import java.util.List;
+ import java.util.Set;
+-
+ import org.eclipse.swt.graphics.Point;
+ import org.eclipse.swt.graphics.Rectangle;
+ import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
+ import org.jboss.tools.vpe.editor.template.VpeCreationData;
+-import org.mozilla.interfaces.nsIAccessibilityService;
+ import org.mozilla.interfaces.nsIAccessible;
+ import org.mozilla.interfaces.nsIDOMDocument;
+ import org.mozilla.interfaces.nsIDOMElement;
+@@ -33,7 +29,6 @@
+ import org.mozilla.interfaces.nsIDOMNodeList;
+ import org.mozilla.interfaces.nsIDOMRange;
+ import org.mozilla.interfaces.nsISelection;
+-import org.mozilla.xpcom.Mozilla;
+ import org.mozilla.xpcom.XPCOMException;
+ import org.w3c.dom.Element;
+ import org.w3c.dom.NamedNodeMap;
+@@ -50,7 +45,7 @@
+ public static String FACELETS_URI = "http://java.sun.com/jsf/facelets";
//$NON-NLS-1$
+
+ private static final String ACCESSIBILITY_SERVICE_CONTRACT_ID =
"(a)mozilla.org/accessibilityService;1"; //$NON-NLS-1$
+- private static Reference<nsIAccessibilityService> accessibilityServiceCache =
null;
++// private static Reference<nsIAccessibilityService> accessibilityServiceCache =
null;
+
+ private static Set<String> escapedTags;
+
+@@ -236,23 +231,23 @@
+ *
+ * @author yradtsevich
+ */
+- public static nsIAccessibilityService getAccessibilityService() {
+- nsIAccessibilityService accessibilityService = null;
+- if (accessibilityServiceCache != null) {
+- // get accessibilityService from cache
+- accessibilityService = accessibilityServiceCache.get();
+- }
+- if (accessibilityService == null) {
+- accessibilityService = (nsIAccessibilityService) Mozilla.getInstance()
+- .getServiceManager()
+- .getServiceByContractID(ACCESSIBILITY_SERVICE_CONTRACT_ID,
+- nsIAccessibilityService.NS_IACCESSIBILITYSERVICE_IID);
+-
+- // cache accessibilityService
+- accessibilityServiceCache = new
SoftReference<nsIAccessibilityService>(accessibilityService);
+- }
+- return accessibilityService;
+- }
++// public static nsIAccessibilityService getAccessibilityService() {
++// nsIAccessibilityService accessibilityService = null;
++// if (accessibilityServiceCache != null) {
++// // get accessibilityService from cache
++// accessibilityService = accessibilityServiceCache.get();
++// }
++// if (accessibilityService == null) {
++// accessibilityService = (nsIAccessibilityService) Mozilla.getInstance()
++// .getServiceManager()
++// .getServiceByContractID(ACCESSIBILITY_SERVICE_CONTRACT_ID,
++// nsIAccessibilityService.NS_IACCESSIBILITYSERVICE_IID);
++//
++// // cache accessibilityService
++// accessibilityServiceCache = new
SoftReference<nsIAccessibilityService>(accessibilityService);
++// }
++// return accessibilityService;
++// }
+
+ /**
+ * Returns on screen bounds of the {@code node}
+@@ -264,8 +259,8 @@
+ */
+ public static Rectangle getBounds(nsIDOMNode node) {
+ Rectangle bounds = null;
+-
+- nsIAccessible accessible = getAccessibilityService().getAccessibleFor(node);
++
++ nsIAccessible accessible = (nsIAccessible)
node.queryInterface(nsIAccessible.NS_IACCESSIBLE_IID);
+ if (accessible != null) {
+ int[] xArray = new int[1]; // Left hand corner of the node
+ int[] yArray = new int[1]; // Top corner of the node
Show replies by date