merge
authordadubrow
Mon, 19 Jul 2010 14:41:27 -0500
changeset 1638 02511d2a1482
parent 1637 06fc2fdd1ac4 (diff)
parent 1636 f69b88cecb3c (current diff)
child 1639 5fdc216afa33
merge
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/com.nokia.carbide.XULRunnerInitializer/.classpath	Mon Jul 19 14:41:27 2010 -0500
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/com.nokia.carbide.XULRunnerInitializer/.project	Mon Jul 19 14:41:27 2010 -0500
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>com.nokia.carbide.XULRunnerInitializer</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/com.nokia.carbide.XULRunnerInitializer/.settings/org.eclipse.jdt.core.prefs	Mon Jul 19 14:41:27 2010 -0500
@@ -0,0 +1,8 @@
+#Mon Jul 19 10:13:13 CDT 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/com.nokia.carbide.XULRunnerInitializer/META-INF/MANIFEST.MF	Mon Jul 19 14:41:27 2010 -0500
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: XULRunnerInitializer
+Bundle-SymbolicName: com.nokia.carbide.XULRunnerInitializer
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: NOKIA
+Fragment-Host: org.eclipse.swt;bundle-version="3.6.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.6.0",
+ org.eclipse.osgi.services;bundle-version="3.2.100"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/com.nokia.carbide.XULRunnerInitializer/build.properties	Mon Jul 19 14:41:27 2010 -0500
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/com.nokia.carbide.XULRunnerInitializer/src/org/eclipse/swt/browser/XULRunnerInitializer.java	Mon Jul 19 14:41:27 2010 -0500
@@ -0,0 +1,32 @@
+package org.eclipse.swt.browser;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Platform;
+import org.osgi.framework.Bundle;
+
+public class XULRunnerInitializer {
+    static {
+        Bundle bundle = Platform.getBundle("org.mozilla.xulrunner.win32.win32.x86"); //$NON-NLS-1$
+        if (bundle != null) {
+            URL resourceUrl = bundle.getResource("xulrunner"); //$NON-NLS-1$
+            if (resourceUrl != null) {
+                try {
+                    URL fileUrl = FileLocator.toFileURL(resourceUrl);
+                    File file = new File(fileUrl.toURI());
+                    System.setProperty("org.eclipse.swt.browser.XULRunnerPath", file.getAbsolutePath()); //$NON-NLS-1$
+
+                } catch (IOException e) {
+                    // log the exception
+                } catch (URISyntaxException e) {
+                    // log the exception
+                }
+            }
+        }
+    }
+
+}
--- a/core/com.nokia.carbide.discovery.ui/META-INF/MANIFEST.MF	Mon Jul 19 14:00:24 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/META-INF/MANIFEST.MF	Mon Jul 19 14:41:27 2010 -0500
@@ -7,6 +7,7 @@
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.ui,
  org.eclipse.core.runtime,
+ org.eclipse.core.net;bundle-version="1.2.100",
  org.eclipse.equinox.p2.discovery;bundle-version="1.0.0",
  org.eclipse.equinox.p2.discovery.compatibility;bundle-version="1.0.0",
  org.eclipse.equinox.p2.ui.discovery;bundle-version="1.0.0",
@@ -16,11 +17,11 @@
  org.eclipse.equinox.p2.metadata;bundle-version="2.0.0",
  org.eclipse.equinox.p2.repository;bundle-version="2.0.0",
  org.eclipse.equinox.p2.engine;bundle-version="2.0.0",
- com.nokia.cpp.utils.ui;bundle-version="1.0.0",
- com.nokia.cpp.utils.core;bundle-version="1.0.0",
  org.eclipse.jface.text,
  org.eclipse.ui.editors,
- org.eclipse.ui.forms;bundle-version="3.5.0"
+ org.eclipse.ui.forms;bundle-version="3.5.0",
+ com.nokia.cpp.utils.ui;bundle-version="1.0.0",
+ com.nokia.cpp.utils.core;bundle-version="1.0.0"
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-Vendor: Nokia
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/Activator.java	Mon Jul 19 14:00:24 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/Activator.java	Mon Jul 19 14:41:27 2010 -0500
@@ -20,10 +20,12 @@
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.net.URI;
 import java.net.URL;
 import java.text.MessageFormat;
 import java.util.Properties;
 
+import org.eclipse.core.net.proxy.IProxyData;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Path;
@@ -34,6 +36,8 @@
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.osgi.framework.BundleContext;
 
+import com.nokia.cpp.internal.api.utils.core.ProxyUtils;
+
 /**
  * The activator class controls the plug-in life cycle
  */
@@ -44,6 +48,9 @@
 	// The shared instance
 	private static Activator plugin;
 
+	private static final String PROPERTY_PROXYPORT = "network.proxy_port"; //$NON-NLS-1$
+	private static final String PROPERTY_PROXYHOST = "network.proxy_host"; //$NON-NLS-1$
+	
 	/**
 	 * The constructor
 	 */
@@ -56,6 +63,9 @@
 	 */
 	public void start(BundleContext context) throws Exception {
 		super.start(context);
+		IProxyData proxyData = ProxyUtils.getProxyData(new URI("http://www.yahoo.com"));
+		System.setProperty(PROPERTY_PROXYHOST, proxyData.getHost());
+		System.setProperty(PROPERTY_PROXYPORT, String.valueOf(proxyData.getPort()));
 	}
 
 	/*
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/AbstractBrowserPortalPage.java	Mon Jul 19 14:00:24 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/AbstractBrowserPortalPage.java	Mon Jul 19 14:41:27 2010 -0500
@@ -162,7 +162,7 @@
 		composite.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
 		composite.setLayout(new FillLayout());
 		try {
-			browser = new Browser(composite, SWT.NONE);
+			browser = new Browser(composite, SWT.MOZILLA);
 		} catch (SWTError e) {
 			e.printStackTrace();
 		}
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/HomePage.java	Mon Jul 19 14:00:24 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/HomePage.java	Mon Jul 19 14:41:27 2010 -0500
@@ -1,19 +1,12 @@
 package com.nokia.carbide.internal.discovery.ui.view;
 
 import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.IEditorPart;
 
 import com.nokia.carbide.discovery.ui.Activator;
 import com.nokia.carbide.discovery.ui.Messages;
-import com.nokia.carbide.internal.discovery.ui.extension.IPortalPage;
+import com.nokia.carbide.internal.discovery.ui.extension.AbstractBrowserPortalPage;
 
-public class HomePage implements IPortalPage {
-
-	public HomePage() {
-	}
+public class HomePage extends AbstractBrowserPortalPage {
 
 	@Override
 	public String getText() {
@@ -25,24 +18,4 @@
 		return Activator.getImageDescriptor("icons/Carbide_c_icon_16x16.png"); //$NON-NLS-1$
 	}
 
-	@Override
-	public Control createControl(Composite parent, IEditorPart part) {
-		Composite composite = new Composite(parent, SWT.NONE);
-		composite.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
-		return composite;
-	}
-
-	@Override
-	public void init() {
-	}
-	
-	@Override
-	public IActionBar[] createCommandBars(IEditorPart part, IActionUIUpdater updater) {
-		return new IActionBar[0];
-	}
-
-	@Override
-	public void dispose() {
-	}
-
 }