Author: dsakovich
Date: 2007-10-15 06:58:39 -0400 (Mon, 15 Oct 2007)
New Revision: 4174
Added:
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/tests/VpeXulRunnerAllTests.java
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/tests/XulRunnerBrowserTest.java
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/view/XulRunnerView.java
Removed:
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/mozilla/
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/tests/MozillaBrowserTest.java
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/tests/VpeMozillaAllTests.java
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/view/MozillaView.java
Modified:
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/META-INF/MANIFEST.MF
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/plugin.xml
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/tests/DOMCreatingTest.java
Log:
Add XulRunner JUnit test
Modified:
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/META-INF/MANIFEST.MF
===================================================================
---
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/META-INF/MANIFEST.MF 2007-10-15
10:49:51 UTC (rev 4173)
+++
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/META-INF/MANIFEST.MF 2007-10-15
10:58:39 UTC (rev 4174)
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Mozilla Tests Plug-in
+Bundle-Name: XulRunner Tests Plug-in
Bundle-SymbolicName: org.jboss.tools.vpe.xulrunner.test;singleton:=true
Bundle-Version: 2.0.0
Bundle-Vendor: Red Hat, Inc.
@@ -8,7 +8,8 @@
org.eclipse.core.runtime,
org.junit,
org.jboss.tools.common,
- org.jboss.tools.vpe.xulrunner
+ org.jboss.tools.vpe.xulrunner,
+ org.mozilla.xpcom
Eclipse-LazyStart: true
Export-Package: org.jboss.tools.vpe.xulrunner.tests,
org.jboss.tools.vpe.xulrunner.view
Modified:
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/plugin.xml
===================================================================
---
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/plugin.xml 2007-10-15
10:49:51 UTC (rev 4173)
+++
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/plugin.xml 2007-10-15
10:58:39 UTC (rev 4174)
@@ -4,19 +4,19 @@
<extension
point="org.eclipse.ui.views">
<category
- id="org.jboss.tools.vpe.mozilla.view"
+ id="org.jboss.tools.vpe.xulrunner.view"
name="VPE Tests"/>
<view
- category="org.jboss.tools.vpe.mozilla.view"
- class="org.jboss.tools.vpe.xulrunner.view.MozillaView"
- id="org.jboss.tools.vpe.mozilla.view.MozillaView"
- name="Mozilla View"/>
+ category="org.jboss.tools.vpe.xulrunner.view"
+ class="org.jboss.tools.vpe.xulrunner.view.XulRunnerView"
+ id="org.jboss.tools.vpe.xulrunner.view.XulRunnerView"
+ name="XulRunner View"/>
</extension>
<extension
point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension
targetID="org.eclipse.ui.resourcePerspective">
<view
- id="org.jboss.tools.vpe.mozilla.view.MozillaView"
+ id="org.jboss.tools.vpe.xulrunner.view.XulRunnerView"
ratio="0.5"
relationship="right"
relative="org.eclipse.ui.views.TaskList" />
Modified:
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/tests/DOMCreatingTest.java
===================================================================
---
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/tests/DOMCreatingTest.java 2007-10-15
10:49:51 UTC (rev 4173)
+++
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/tests/DOMCreatingTest.java 2007-10-15
10:58:39 UTC (rev 4174)
@@ -11,14 +11,14 @@
package org.jboss.tools.vpe.xulrunner.tests;
import org.eclipse.ui.PlatformUI;
-import org.jboss.tools.vpe.mozilla.internal.swt.xpl.nsIDOMDocument;
-import org.jboss.tools.vpe.mozilla.browser.MozillaBrowser;
-import org.jboss.tools.vpe.xulrunner.view.MozillaView;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
+import org.jboss.tools.vpe.xulrunner.editor.XulRunnerEditor;
+import org.jboss.tools.vpe.xulrunner.view.XulRunnerView;
+import org.mozilla.interfaces.nsIDOMAttr;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
+import org.mozilla.interfaces.nsIDOMNodeList;
+import org.mozilla.interfaces.nsIDOMText;
/**
* This class used for testing mozilla interfaces.
@@ -31,20 +31,20 @@
/**
* Contains brouser instamce
*/
- private MozillaBrowser mozillaBrowser;
+ private XulRunnerEditor xulrunnerBrowser;
/**
* Tests possability add and remove dom elements.
*
*/
public void testAddRemovingDOMElements() {
- Element root = mozillaBrowser.getDOMDocumentElement();
- nsIDOMDocument domDocument = mozillaBrowser.getDOMDocument();
- Element child = domDocument.createElement("test-element");
+ nsIDOMDocument domDocument = xulrunnerBrowser.getDOMDocument();
+ nsIDOMElement root = domDocument.getDocumentElement();
+ nsIDOMElement child = domDocument.createElement("test-element");
root.appendChild(child);
assertTrue("We doen't have elements to remove", root.getChildNodes()
.getLength() > 0);
- for (int i = root.getChildNodes().getLength() - 1; i >= 0; i--) {
+ for (long i = root.getChildNodes().getLength() - 1; i >= 0; i--) {
root.removeChild(root.getChildNodes().item(i));
}
root.appendChild(child);
@@ -57,37 +57,37 @@
*
* @throws Exception
*/
- public void testMozillaCreatingDOM() throws Exception {
+ public void testXulRunnerCreatingDOM() throws Exception {
String chieldName = "H";
String attrName = "color";
String attrValue = "TEST_VALUE";
- assertNotNull(mozillaBrowser);
- nsIDOMDocument domDocument = mozillaBrowser.getDOMDocument();
- Element root = mozillaBrowser.getDOMDocumentElement();
+ assertNotNull(xulrunnerBrowser);
+ nsIDOMDocument domDocument = xulrunnerBrowser.getDOMDocument();
+ nsIDOMElement root = domDocument.getDocumentElement();
- for (int i = root.getChildNodes().getLength() - 1; i >= 0; i--) {
+ for (long i = root.getChildNodes().getLength() - 1; i >= 0; i--) {
root.removeChild(root.getChildNodes().item(i));
}
// checks of creating elements with attributes and chield nodes
- Element child = domDocument.createElement("test-element");
+ nsIDOMElement child = domDocument.createElement("test-element");
for (int i = 0; i < 4; i++) {
child.appendChild(domDocument.createElement(chieldName + i));
}
for (int i = 0; i < 3; i++) {
child.setAttribute(attrName + i, attrValue + i);
}
- Attr attr = domDocument.createAttribute(attrName + 3);
+ nsIDOMAttr attr = domDocument.createAttribute(attrName + 3);
attr.setValue(attrValue + 3);
child.setAttributeNode(attr);
// append child element to root element
root.appendChild(child);
- Node toCheck = root.getChildNodes().item(0);
+ nsIDOMNode toCheck = root.getChildNodes().item(0);
assertEquals("We haven't add child element", toCheck.getNodeName(),
child.getNodeName());
assertEquals("Number of child nodes do not coincide", 4,child
.getChildNodes().getLength());
- NodeList nodeList = child.getChildNodes();
+ nsIDOMNodeList nodeList = child.getChildNodes();
for (int i = 0; i < nodeList.getLength(); i++) {
assertEquals("Child node doesn't concide", nodeList.item(i)
.getNodeName(), chieldName + i);
@@ -99,7 +99,7 @@
assertEquals("Attribute values doesn't coinside",
toCheck.getAttributes()
.item(i).getNodeValue(), attrValue + i);
}
- Text text = domDocument.createTextNode("TEST");
+ nsIDOMText text = domDocument.createTextNode("TEST");
root.appendChild(text);
assertEquals("Dom element hasn't been created", "TEST", text
.getNodeValue());
@@ -109,13 +109,13 @@
protected void setUp() throws Exception {
super.setUp();
waitForJobs();
- MozillaView mozilla
- = ((MozillaView) PlatformUI.getWorkbench()
+ XulRunnerView xulrunner
+ = ((XulRunnerView) PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getActivePage().showView(VIEW_ID));
waitForJobs();
delay(3000);
- mozillaBrowser = mozilla.getBrowser();
+ xulrunnerBrowser = xulrunner.getBrowser();
}
@Override
Deleted:
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/tests/MozillaBrowserTest.java
===================================================================
---
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/tests/MozillaBrowserTest.java 2007-10-15
10:49:51 UTC (rev 4173)
+++
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/tests/MozillaBrowserTest.java 2007-10-15
10:58:39 UTC (rev 4174)
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.vpe.xulrunner.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.jboss.tools.vpe.xulrunner.view.MozillaView;
-
-public class MozillaBrowserTest extends TestCase {
- public static final String VIEW_ID
- = "org.jboss.tools.vpe.mozilla.view.MozillaView";
- /**
- * Process UI input but do not return for the
- * specified time interval.
- *
- * @param waitTimeMillis the number of milliseconds
- */
- protected void delay(long waitTimeMillis) {
- Display display = Display.getCurrent();
-
- // If this is the UI thread,
- // then process input.
- if (display != null) {
- long endTimeMillis = System.currentTimeMillis() + waitTimeMillis;
- while (System.currentTimeMillis() < endTimeMillis) {
- if (!display.readAndDispatch()) display.sleep();
- }
- display.update();
- }
- // Otherwise, perform a simple sleep.
- else {
- try {
- Thread.sleep(waitTimeMillis);
- }
- catch (InterruptedException e) {
- // Ignored.
- }
- }
- }
-
-
- /**
- * Wait until all background tasks are complete.
- */
- public void waitForJobs() {
- while (Job.getJobManager().currentJob() != null)
- delay(1000);
- }
-
- public void testMozillaBrowser() throws PartInitException {
- waitForJobs();
- MozillaView mozillaView =
- (MozillaView) PlatformUI
- .getWorkbench()
- .getActiveWorkbenchWindow()
- .getActivePage()
- .showView(VIEW_ID);
-
- // Delay for 3 seconds so that
- // the Favorites view can be seen.
- waitForJobs();
- delay(3000);
-
- PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow()
- .getActivePage()
- .hideView(mozillaView);
- }
-}
Deleted:
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/tests/VpeMozillaAllTests.java
===================================================================
---
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/tests/VpeMozillaAllTests.java 2007-10-15
10:49:51 UTC (rev 4173)
+++
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/tests/VpeMozillaAllTests.java 2007-10-15
10:58:39 UTC (rev 4174)
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.vpe.xulrunner.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class VpeMozillaAllTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for " +
VpeMozillaAllTests.class.getName());
- //add test cases for dom elements
- suite.addTestSuite(DOMCreatingTest.class);
- return suite;
- }
-
-}
Copied:
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/tests/VpeXulRunnerAllTests.java
(from rev 4133,
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/tests/VpeMozillaAllTests.java)
===================================================================
---
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/tests/VpeXulRunnerAllTests.java
(rev 0)
+++
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/tests/VpeXulRunnerAllTests.java 2007-10-15
10:58:39 UTC (rev 4174)
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.xulrunner.tests;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class VpeXulRunnerAllTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("Test for " +
VpeXulRunnerAllTests.class.getName());
+ //add test cases for dom elements
+ suite.addTestSuite(DOMCreatingTest.class);
+ return suite;
+ }
+
+}
Copied:
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/tests/XulRunnerBrowserTest.java
(from rev 4133,
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/tests/MozillaBrowserTest.java)
===================================================================
---
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/tests/XulRunnerBrowserTest.java
(rev 0)
+++
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/tests/XulRunnerBrowserTest.java 2007-10-15
10:58:39 UTC (rev 4174)
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.xulrunner.tests;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.vpe.xulrunner.view.XulRunnerView;
+
+public class XulRunnerBrowserTest extends TestCase {
+ public static final String VIEW_ID =
"org.jboss.tools.vpe.xulrunner.view.XulRunnerView";
+
+ /**
+ * Process UI input but do not return for the specified time interval.
+ *
+ * @param waitTimeMillis
+ * the number of milliseconds
+ */
+ protected void delay(long waitTimeMillis) {
+ Display display = Display.getCurrent();
+
+ // If this is the UI thread,
+ // then process input.
+ if (display != null) {
+ long endTimeMillis = System.currentTimeMillis() + waitTimeMillis;
+ while (System.currentTimeMillis() < endTimeMillis) {
+ if (!display.readAndDispatch())
+ display.sleep();
+ }
+ display.update();
+ }
+ // Otherwise, perform a simple sleep.
+ else {
+ try {
+ Thread.sleep(waitTimeMillis);
+ } catch (InterruptedException e) {
+ // Ignored.
+ }
+ }
+ }
+
+ /**
+ * Wait until all background tasks are complete.
+ */
+ public void waitForJobs() {
+ while (Job.getJobManager().currentJob() != null)
+ delay(1000);
+ }
+
+ public void testMozillaBrowser() throws PartInitException {
+ waitForJobs();
+ XulRunnerView mozillaView = (XulRunnerView) PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().showView(VIEW_ID);
+
+ // Delay for 3 seconds so that
+ // the Favorites view can be seen.
+ waitForJobs();
+ delay(3000);
+
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+ .hideView(mozillaView);
+ }
+}
Deleted:
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/view/MozillaView.java
===================================================================
---
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/view/MozillaView.java 2007-10-15
10:49:51 UTC (rev 4173)
+++
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/view/MozillaView.java 2007-10-15
10:58:39 UTC (rev 4174)
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.vpe.xulrunner.view;
-
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.part.ViewPart;
-import org.jboss.tools.vpe.xulrunner.browser.XulRunnerBrowser;
-
-
-
-
-/**
- * This class wes developed for test corectly starting of Mozilla.
- * Mozilla is used as part of Visual Pade Editor.
- */
-
-public class MozillaView extends ViewPart {
- private static final String INIT_URL = "about:buildconfig";
- private XulRunnerBrowser browser;
-
- /**
- * The constructor.
- */
- public MozillaView() {
- }
-
- /**
- * This is a callback that will allow us
- * to create the viewer and initialize it.
- */
- public void createPartControl(Composite parent) {
- browser = new MozillaBrowser(parent, SWT.NONE);
- browser.setUrl(INIT_URL);
- browser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- }
-
- /**
- * Passing the focus request to the viewer's control.
- */
- public void setFocus() {
- browser.setFocus();
- }
-
- /**
- * This method is used by other test plugins for testing mozilla's functionality
- * @return MozillaBrowser
- */
- public MozillaBrowser getBrowser() {
- return browser;
- }
-}
\ No newline at end of file
Added:
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/view/XulRunnerView.java
===================================================================
---
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/view/XulRunnerView.java
(rev 0)
+++
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.mozilla.test/src/org/jboss/tools/vpe/xulrunner/view/XulRunnerView.java 2007-10-15
10:58:39 UTC (rev 4174)
@@ -0,0 +1,36 @@
+package org.jboss.tools.vpe.xulrunner.view;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.part.ViewPart;
+import org.jboss.tools.vpe.xulrunner.XulRunnerException;
+import org.jboss.tools.vpe.xulrunner.editor.XulRunnerEditor;
+
+public class XulRunnerView extends ViewPart {
+
+ private static final String INIT_URL = "about:buildconfig";
+ private XulRunnerEditor xulrunnerEditor;
+
+ @Override
+ public void createPartControl(Composite parent) {
+ try {
+ xulrunnerEditor = new XulRunnerEditor(parent);
+ xulrunnerEditor.setURL(INIT_URL);
+ xulrunnerEditor.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
+ true, true));
+ } catch (XulRunnerException e) {
+ // Ignore exception
+ }
+ }
+
+ @Override
+ public void setFocus() {
+ xulrunnerEditor.setFocus();
+ }
+
+ public XulRunnerEditor getBrowser() {
+ return xulrunnerEditor;
+ }
+
+}