Integration with previewer code
authorEugene Ostroukhov <eugeneo@symbian.org>
Thu, 21 Jan 2010 11:47:14 -0800
changeset 39 eb7d9e33e288
parent 38 954dbf7baac6
child 40 9bebb93c6833
Integration with previewer code
org.symbian.tools.wrttools.debug.core/launch/WRT Debugger.launch
org.symbian.tools.wrttools.debug.core/plugin.xml
org.symbian.tools.wrttools.debug.core/src/org/symbian/tools/wrttools/debug/internal/IConstants.java
org.symbian.tools.wrttools.debug.core/src/org/symbian/tools/wrttools/debug/internal/PreferenceInitializer.java
org.symbian.tools.wrttools.debug.core/src/org/symbian/tools/wrttools/debug/internal/launch/WidgetLaunchDelegate.java
org.symbian.tools.wrttools.editing/.classpath
org.symbian.tools.wrttools.editing/.project
org.symbian.tools.wrttools.editing/.settings/org.eclipse.jdt.core.prefs
org.symbian.tools.wrttools.editing/META-INF/MANIFEST.MF
org.symbian.tools.wrttools.editing/build.properties
org.symbian.tools.wrttools.editing/icons/obj16/html-editor.gif
org.symbian.tools.wrttools.editing/icons/obj16/refresh.gif
org.symbian.tools.wrttools.editing/icons/obj16/refresh_green.gif
org.symbian.tools.wrttools.editing/icons/obj16/refresh_red.gif
org.symbian.tools.wrttools.editing/plugin.xml
org.symbian.tools.wrttools.editing/preferences.ini
org.symbian.tools.wrttools.editing/src/org/symbian/tools/wrttools/editing/Activator.java
org.symbian.tools.wrttools.editing/src/org/symbian/tools/wrttools/editing/IWrtEditingPreferences.java
org.symbian.tools.wrttools.editing/src/org/symbian/tools/wrttools/editing/Images.java
org.symbian.tools.wrttools.editing/src/org/symbian/tools/wrttools/editing/html/HTMLEditor.java
org.symbian.tools.wrttools.editing/src/org/symbian/tools/wrttools/editing/preferences/WrtEditingPreferencePage.java
org.symbian.tools.wrttools.editing/src/org/symbian/tools/wrttools/editing/preview/PreviewPage.java
org.symbian.tools.wrttools.editing/src/org/symbian/tools/wrttools/editing/preview/PreviewView.java
org.symbian.tools.wrttools.previewer/build.properties
org.symbian.tools.wrttools.previewer/icons/obj16/html-editor.gif
org.symbian.tools.wrttools.previewer/icons/obj16/refresh.gif
org.symbian.tools.wrttools.previewer/icons/obj16/refresh_green.gif
org.symbian.tools.wrttools.previewer/icons/obj16/refresh_red.gif
org.symbian.tools.wrttools.previewer/jtidy/jtidy-8.0-20060801.131059-3.jar
org.symbian.tools.wrttools.previewer/plugin.xml
org.symbian.tools.wrttools.previewer/preferences.ini
org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/Activator.java
org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/IWrtEditingPreferences.java
org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/Images.java
org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preferences/WrtEditingPreferencePage.java
org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preview/PreviewPage.java
org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preview/PreviewSupport.java
org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preview/PreviewView.java
org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preview/WidgetPreviewBrowser.java
org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preview/WidgetPreviewPreferenceInitializer.java
org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preview/WidgetPreviewPreferencePage.java
org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/utils/Check.java
org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/utils/FileUtils.java
org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/utils/IDisposable.java
org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/utils/ITimedTask.java
org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/utils/ListenerList.java
org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/utils/Logging.java
org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/utils/TrackedResource.java
org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/utils/UtilsPlugin.java
org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/utils/noexport/Messages.java
org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/utils/noexport/messages.properties
org.symbian.tools.wrttools.product/.classpath
org.symbian.tools.wrttools.product/.project
org.symbian.tools.wrttools.product/.settings/org.eclipse.jdt.core.prefs
org.symbian.tools.wrttools.product/META-INF/MANIFEST.MF
org.symbian.tools.wrttools.product/build.properties
org.symbian.tools.wrttools.product/icons/main16.gif
org.symbian.tools.wrttools.product/icons/new_xml.gif
org.symbian.tools.wrttools.product/icons/newcss_wiz.gif
org.symbian.tools.wrttools.product/icons/newhtml_wiz.gif
org.symbian.tools.wrttools.product/icons/newjscript_wiz.gif
org.symbian.tools.wrttools.product/launch/WRT IDE (Product).launch
org.symbian.tools.wrttools.product/plugin.xml
org.symbian.tools.wrttools.product/plugin_customization.ini
org.symbian.tools.wrttools.product/src/org/symbian/tools/wrttools/product/Activator.java
org.symbian.tools.wrttools.product/src/org/symbian/tools/wrttools/product/actions/NewCSSFileAction.java
org.symbian.tools.wrttools.product/src/org/symbian/tools/wrttools/product/actions/NewHTMLFileAction.java
org.symbian.tools.wrttools.product/src/org/symbian/tools/wrttools/product/actions/NewJSFileAction.java
org.symbian.tools.wrttools.product/src/org/symbian/tools/wrttools/product/actions/NewWRTProjectAction.java
org.symbian.tools.wrttools.product/src/org/symbian/tools/wrttools/product/perspective/WRTPerspective.java
org.symbian.tools.wrttools.product/wrt-ide.product
--- a/org.symbian.tools.wrttools.debug.core/launch/WRT Debugger.launch	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="askclear" value="true"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bad_container_name" value="\org.symbian.tools.wrttools.debug.core\launch"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<booleanAttribute key="clearws" value="false"/>
-<booleanAttribute key="clearwslog" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/WRT Debugger"/>
-<booleanAttribute key="default" value="true"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../runtime-WRT-Debugger"/>
-<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
-<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms128m -Xmx768m -XX:MaxPermSize=192m"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="org.eclipse.platform.ide"/>
-<booleanAttribute key="restart" value="false"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useProduct" value="true"/>
-<booleanAttribute key="usefeatures" value="false"/>
-</launchConfiguration>
--- a/org.symbian.tools.wrttools.debug.core/plugin.xml	Wed Jan 20 18:00:15 2010 -0800
+++ b/org.symbian.tools.wrttools.debug.core/plugin.xml	Thu Jan 21 11:47:14 2010 -0800
@@ -10,6 +10,7 @@
    <extension
          point="org.eclipse.ui.preferencePages">
       <page
+            category="org.symbian.tools.wrttools.editing.preferences.WrtEditingPreferencePage"
             class="org.symbian.tools.wrttools.debug.ui.DebugPreferencePage"
             id="org.symbian.tools.wrttools.debug"
             name="WRT Debugger">
--- a/org.symbian.tools.wrttools.debug.core/src/org/symbian/tools/wrttools/debug/internal/IConstants.java	Wed Jan 20 18:00:15 2010 -0800
+++ b/org.symbian.tools.wrttools.debug.core/src/org/symbian/tools/wrttools/debug/internal/IConstants.java	Thu Jan 21 11:47:14 2010 -0800
@@ -20,7 +20,6 @@
 
 public interface IConstants {
 	String PREF_NAME_CHROME_LOCATION="chrome.location";
-	String PREF_NAME_CHROME_PORT="chrome.port";
 
 	String PROP_PROJECT_NAME = "projectName";
 	public static final String WRT_PREVIEW_HTML = "wrt_preview_frame.html";
--- a/org.symbian.tools.wrttools.debug.core/src/org/symbian/tools/wrttools/debug/internal/PreferenceInitializer.java	Wed Jan 20 18:00:15 2010 -0800
+++ b/org.symbian.tools.wrttools.debug.core/src/org/symbian/tools/wrttools/debug/internal/PreferenceInitializer.java	Thu Jan 21 11:47:14 2010 -0800
@@ -34,7 +34,6 @@
 			store.setDefault(IConstants.PREF_NAME_CHROME_LOCATION, folder
 					.getAbsolutePath());
 		}
-		store.setDefault(IConstants.PREF_NAME_CHROME_PORT, 19222);
 	}
 
 	private File getDefaultFolder() {
--- a/org.symbian.tools.wrttools.debug.core/src/org/symbian/tools/wrttools/debug/internal/launch/WidgetLaunchDelegate.java	Wed Jan 20 18:00:15 2010 -0800
+++ b/org.symbian.tools.wrttools.debug.core/src/org/symbian/tools/wrttools/debug/internal/launch/WidgetLaunchDelegate.java	Thu Jan 21 11:47:14 2010 -0800
@@ -20,6 +20,7 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.net.ServerSocket;
 import java.net.URI;
 import java.text.MessageFormat;
 
@@ -71,9 +72,8 @@
 			launchManager.removeLaunch(launch);
 			throw createCoreException(MessageFormat.format("Project {0} is already running.", project.getName()), null);
 		}
-		
-		final int port = Activator.getDefault().getPreferenceStore().getInt(
-				IConstants.PREF_NAME_CHROME_PORT);
+
+		int port = findFreePort();
 		boolean debug = mode.equals(ILaunchManager.DEBUG_MODE);
 		final URI uri = prepareDebugger(project, debug, launch, port);
 		final String browserExecutable = ChromeDebugUtils.getChromeExecutible();
@@ -109,6 +109,19 @@
 	}
 
 
+	private int findFreePort() {
+		try {
+			final ServerSocket socket = new ServerSocket(0);
+			int port = socket.getLocalPort();
+			socket.close();
+			return port;
+		} catch (IOException e) {
+			Activator.log(e);
+			return 7222;
+		}
+	}
+
+
 	private void showProjectIsDebugged() {
 	}
 
--- a/org.symbian.tools.wrttools.editing/.classpath	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-<?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>
--- a/org.symbian.tools.wrttools.editing/.project	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>org.symbian.tools.wrttools.editing</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>
--- a/org.symbian.tools.wrttools.editing/.settings/org.eclipse.jdt.core.prefs	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-#Tue Jan 12 14:30:42 PST 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
--- a/org.symbian.tools.wrttools.editing/META-INF/MANIFEST.MF	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Editing Support for WRT Tools
-Bundle-SymbolicName: org.symbian.tools.wrttools.editing;singleton:=true
-Bundle-Version: 0.0.1.qualifier
-Bundle-Activator: org.symbian.tools.wrttools.editing.Activator
-Bundle-Vendor: Symbian Foundation
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.wst.sse.core;bundle-version="1.1.401",
- org.eclipse.wst.sse.ui;bundle-version="1.1.101",
- org.eclipse.wst.xml.core;bundle-version="1.1.401",
- org.eclipse.wst.xml.ui;bundle-version="1.1.1",
- org.eclipse.jface.text;bundle-version="3.5.1",
- org.eclipse.wst.html.core;bundle-version="1.1.300",
- org.eclipse.wst.html.ui;bundle-version="1.0.401",
- org.mozilla.xulrunner;bundle-version="1.9.1";resolution:=optional,
- org.eclipse.core.resources;bundle-version="3.5.1",
- org.eclipse.wst.css.core;bundle-version="1.1.300",
- org.eclipse.wst.jsdt.core;bundle-version="1.0.201"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
--- a/org.symbian.tools.wrttools.editing/build.properties	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
-               .,\
-               plugin.xml
Binary file org.symbian.tools.wrttools.editing/icons/obj16/html-editor.gif has changed
Binary file org.symbian.tools.wrttools.editing/icons/obj16/refresh.gif has changed
Binary file org.symbian.tools.wrttools.editing/icons/obj16/refresh_green.gif has changed
Binary file org.symbian.tools.wrttools.editing/icons/obj16/refresh_red.gif has changed
--- a/org.symbian.tools.wrttools.editing/plugin.xml	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-   <extension
-         point="org.eclipse.ui.editors">
-      <editor
-            class="org.symbian.tools.wrttools.editing.html.HTMLEditor"
-            contributorClass="org.eclipse.wst.html.ui.internal.edit.ui.ActionContributorHTML"
-            default="false"
-            icon="icons/obj16/html-editor.gif"
-            id="org.symbian.tools.wrttools.editing.editor2"
-            name="WRT HTML Editor"
-            symbolicFontName="org.eclipse.wst.sse.ui.textfont">
-         <contentTypeBinding
-               contentTypeId="org.eclipse.wst.html.core.htmlsource">
-         </contentTypeBinding>
-      </editor>
-   </extension>
-   <extension
-         point="org.eclipse.ui.views">
-      <view
-            allowMultiple="false"
-            class="org.symbian.tools.wrttools.editing.preview.PreviewView"
-            icon="icons/obj16/html-editor.gif"
-            id="org.symbian.tools.wrttools.editing.wrtpreview"
-            name="WRT Preview"
-            restorable="true">
-      </view>
-   </extension>
-   <extension
-         point="org.eclipse.ui.preferencePages">
-      <page
-            class="org.symbian.tools.wrttools.editing.preferences.WrtEditingPreferencePage"
-            id="org.symbian.tools.wrttools.editing.preferences.WrtEditingPreferencePage"
-            name="WRT">
-      </page>
-   </extension>
-   <extension
-         point="org.eclipse.ui.perspectiveExtensions">
-      <perspectiveExtension
-            targetID="org.symbian.tools.wrttools.mainPerspective">
-         <viewShortcut
-               id="org.symbian.tools.wrttools.editing.wrtpreview">
-         </viewShortcut>
-         <view
-               id="org.symbian.tools.wrttools.editing.wrtpreview"
-               minimized="false"
-               relationship="stack"
-               relative="org.eclipse.ui.views.ContentOutline">
-         </view>
-      </perspectiveExtension>
-   </extension>
-
-</plugin>
--- a/org.symbian.tools.wrttools.editing/preferences.ini	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-preview.autorefresh=prompt
\ No newline at end of file
--- a/org.symbian.tools.wrttools.editing/src/org/symbian/tools/wrttools/editing/Activator.java	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-package org.symbian.tools.wrttools.editing;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
-	// The plug-in ID
-	public static final String PLUGIN_ID = "org.symbian.tools.wrttools.editing";
-
-	// The shared instance
-	private static Activator plugin;
-	
-	/**
-	 * The constructor
-	 */
-	public Activator() {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
-	 */
-	public void start(BundleContext context) throws Exception {
-		super.start(context);
-		plugin = this;
-	}
-
-	@Override
-	protected void initializeImageRegistry(ImageRegistry reg) {
-		addImage(reg, Images.GREEN_SYNC);
-		addImage(reg, Images.RED_SYNC);
-		addImage(reg, Images.YELLOW_SYNC);
-	}
-	
-	private void addImage(ImageRegistry reg, String path) {
-		ImageDescriptor imageDescriptor = imageDescriptorFromPlugin(PLUGIN_ID, path);
-		reg.put(path, imageDescriptor);
-	}
-
-	public void stop(BundleContext context) throws Exception {
-		plugin = null;
-		super.stop(context);
-	}
-
-	/**
-	 * Returns the shared instance
-	 *
-	 * @return the shared instance
-	 */
-	public static Activator getDefault() {
-		return plugin;
-	}
-
-	public static void log(Exception e) {
-		log(e.getLocalizedMessage(), e);
-	}
-
-	private static void log(String message, Exception e) {
-		final IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, message, e);
-		getDefault().getLog().log(status);
-	}
-
-	public static ImageDescriptor getImageDescriptor(String id) {
-		return getDefault().getImageRegistry().getDescriptor(id);
-	}
-}
--- a/org.symbian.tools.wrttools.editing/src/org/symbian/tools/wrttools/editing/IWrtEditingPreferences.java	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-package org.symbian.tools.wrttools.editing;
-
-public interface IWrtEditingPreferences {
-	String PREF_AUTO_REFRESH = "preview.autorefresh";
-}
--- a/org.symbian.tools.wrttools.editing/src/org/symbian/tools/wrttools/editing/Images.java	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-package org.symbian.tools.wrttools.editing;
-
-public interface Images {
-	String RED_SYNC = "/icons/obj16/refresh_red.gif";
-	String YELLOW_SYNC = "/icons/obj16/refresh.gif";
-	String GREEN_SYNC = "/icons/obj16/refresh_green.gif";
-}
--- a/org.symbian.tools.wrttools.editing/src/org/symbian/tools/wrttools/editing/html/HTMLEditor.java	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/**
- * Copyright (c) 2009 Symbian Foundation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Symbian Foundation - initial contribution.
- * Contributors:
- * Description:
- * Overview:
- * Details:
- * Platforms/Drives/Compatibility:
- * Assumptions/Requirement/Pre-requisites:
- * Failures and causes:
- */
-package org.symbian.tools.wrttools.editing.html;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CTabFolder;
-import org.eclipse.swt.custom.CTabItem;
-import org.eclipse.swt.custom.StackLayout;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.ToolBar;
-import org.eclipse.swt.widgets.ToolItem;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
-
-public class HTMLEditor extends StructuredTextEditor {
-	@Override
-	public void createPartControl(Composite parent) {
-		Composite pane = new Composite(parent, SWT.NONE);
-		pane.setLayout(new FormLayout());
-		CTabFolder tabFolder = new CTabFolder(pane, SWT.NONE);
-		CTabItem tabItem = new CTabItem(tabFolder, SWT.NONE);
-		ToolBar toolBar = new ToolBar(tabFolder, SWT.NONE);
-		tabItem.setControl(toolBar);
-		tabItem.setText("HTML");
-		ToolItem item = new ToolItem(toolBar, SWT.PUSH);
-		item.setText("Table");
-		tabFolder.setSelection(tabItem);
-		
-		FormData data = new FormData();
-		data.top = new FormAttachment(0, 0);
-		data.left = new FormAttachment(0, 0);
-		data.right = new FormAttachment(100, 0);
-		tabFolder.setLayoutData(data);
-		
-		Composite editor = new Composite(pane, SWT.BORDER);
-		editor.setLayout(new FillLayout());
-		data = new FormData();
-		data.top = new FormAttachment(tabFolder, 0);
-		data.left = new FormAttachment(0, 0);
-		data.right = new FormAttachment(100, 0);
-		data.bottom = new FormAttachment(100, 0);
-		editor.setLayoutData(data);
-		
-		super.createPartControl(editor);
-	}
-}
--- a/org.symbian.tools.wrttools.editing/src/org/symbian/tools/wrttools/editing/preferences/WrtEditingPreferencePage.java	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-package org.symbian.tools.wrttools.editing.preferences;
-
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.jface.preference.RadioGroupFieldEditor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.symbian.tools.wrttools.editing.Activator;
-import org.symbian.tools.wrttools.editing.IWrtEditingPreferences;
-
-/**
- * This class represents a preference page that
- * is contributed to the Preferences dialog. By 
- * subclassing <samp>FieldEditorPreferencePage</samp>, we
- * can use the field support built into JFace that allows
- * us to create a page that is small and knows how to 
- * save, restore and apply itself.
- * <p>
- * This page is used to modify preferences only. They
- * are stored in the preference store that belongs to
- * the main plug-in class. That way, preferences can
- * be accessed directly via the preference store.
- */
-
-public class WrtEditingPreferencePage
-	extends FieldEditorPreferencePage
-	implements IWorkbenchPreferencePage {
-
-	private RadioGroupFieldEditor enableAutorefresh;
-
-	public WrtEditingPreferencePage() {
-		super(GRID);
-		setPreferenceStore(Activator.getDefault().getPreferenceStore());
-	}
-	
-	/**
-	 * Creates the field editors. Field editors are abstractions of
-	 * the common GUI blocks needed to manipulate various types
-	 * of preferences. Each field editor knows how to save and
-	 * restore itself.
-	 */
-	public void createFieldEditors() {
-        Composite projectComposite = new Composite(getFieldEditorParent(), SWT.NONE);
-        projectComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-        projectComposite.setFont(getFieldEditorParent().getFont());
-
-		String[][] namesAndValues = {
-				{ "Enable", MessageDialogWithToggle.ALWAYS },
-				{ "Disable", MessageDialogWithToggle.NEVER },
-				{ "Prompt", MessageDialogWithToggle.PROMPT } };
-		enableAutorefresh = new RadioGroupFieldEditor(
-				IWrtEditingPreferences.PREF_AUTO_REFRESH,
-				"Preview autorefresh for new WRT projects",
-				namesAndValues.length, namesAndValues, projectComposite, true);
-		enableAutorefresh.setPreferenceStore(getPreferenceStore());
-		enableAutorefresh.setPage(this);
-		enableAutorefresh.load();
-        addField(enableAutorefresh);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
-	 */
-	public void init(IWorkbench workbench) {
-	}
-
-//	@Override
-//	protected void performDefaults() {
-//		enableAutorefresh.loadDefault();
-//		super.performDefaults();
-//	}
-//	
-//	@Override
-//	public boolean performOk() {
-//		enableAutorefresh.store();
-//		return super.performOk();
-//	}
-}
\ No newline at end of file
--- a/org.symbian.tools.wrttools.editing/src/org/symbian/tools/wrttools/editing/preview/PreviewPage.java	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,206 +0,0 @@
-package org.symbian.tools.wrttools.editing.preview;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.Collection;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.browser.Browser;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.part.IPageBookViewPage;
-import org.eclipse.ui.part.IPageSite;
-import org.eclipse.ui.part.Page;
-import org.osgi.framework.Bundle;
-import org.symbian.tools.wrttools.editing.Activator;
-import org.symbian.tools.wrttools.editing.Images;
-
-public class PreviewPage extends Page implements IPageBookViewPage, ISelectionProvider {
-	private static final String XUL_RUNNER_PATH_PARAMETER = "org.eclipse.swt.browser.XULRunnerPath";
-	
-	private final IAction refreshAction = new Action("Refresh") {
-		public void run() {
-			refresh();
-		};
-	};
-	private final IAction toggleRefresh = new Action("Toggle Refresh", IAction.AS_RADIO_BUTTON) {
-		public void run() {
-			toggleRefresh();
-		};
-	};
-
-	private final IProject project;
-	private Browser browser;
-	private boolean toggleState = true;
-	private final PreviewView previewView;
-	private boolean needsRefresh = false;
-
-	public PreviewPage(IProject project, PreviewView previewView) {
-		this.project = project;
-		this.previewView = previewView;
-	}
-
-	protected void toggleRefresh() {
-		toggleState = !toggleState;
-		toggleRefresh.setChecked(toggleState);
-		previewView.setProjectAutorefresh(project, toggleState);
-		toggleRefresh.setToolTipText(getToggleActionTooltip());
-		if (toggleState && needsRefresh) {
-			refresh();
-		}
-	}
-
-	private synchronized void initMozilla() {
-		if (System.getProperty(XUL_RUNNER_PATH_PARAMETER) == null) {
-			Bundle bundle = Platform.getBundle("org.mozilla.xulrunner"); //$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(XUL_RUNNER_PATH_PARAMETER, file
-								.getAbsolutePath()); //$NON-NLS-1$
-					} catch (IOException e) {
-						// log the exception
-					} catch (URISyntaxException e) {
-						// log the exception
-					}
-				}
-			}
-		}
-	}
-
-	
-	@Override
-	public void createControl(Composite parent) {
-		initMozilla();
-		browser = new Browser(parent, SWT.MOZILLA);
-		browser.setUrl(getURL());
-	}
-
-	private String getURL() {
-		return project.getFile("wrt_preview_frame.html").getLocationURI().toASCIIString();
-	}
-
-
-	@Override
-	public Control getControl() {
-		return browser;
-	}
-
-	@Override
-	public void setFocus() {
-		browser.setFocus();
-	}
-	
-	private boolean refreshScheduled = false;
-
-	public synchronized void process(Collection<IFile> files) {
-		if (!refreshScheduled && needsRefresh(files)) {
-			asyncExec(new Runnable() {
-				@Override
-				public void run() {
-					if (toggleState) {
-						refresh();
-					} else {
-						needsRefresh = true;
-						refreshAction.setImageDescriptor(Activator.getImageDescriptor(Images.RED_SYNC));
-						refreshAction.setToolTipText("Refresh the preview browser (there are updated files)");
-					}
-				}
-			});
-			refreshScheduled = true;
-		}
-	}
-
-	private void asyncExec(Runnable runnable) {
-		getControl().getDisplay().asyncExec(runnable);
-	}
-
-	private boolean needsRefresh(Collection<IFile> files) {
-		for (IFile iFile : files) {
-			if (iFile.getProject().equals(project)) {
-				return true;
-			}
-		}
-		return false;
-	}
-
-	protected synchronized void refresh() {
-		try {
-			final Control focusControl = browser.getDisplay().getFocusControl();
-			browser.refresh();
-			refreshAction.setImageDescriptor(Activator
-					.getImageDescriptor(Images.GREEN_SYNC));
-			asyncExec(new Runnable() {
-				@Override
-				public void run() {
-					focusControl.setFocus();
-				}
-			});
-			refreshAction.setToolTipText("Refresh the preview browser");
-			needsRefresh = false;
-		} finally {
-			refreshScheduled = false;
-		}
-	}
-
-	@Override
-	public void init(IPageSite pageSite) {
-		super.init(pageSite);
-		IToolBarManager toolBar = pageSite.getActionBars().getToolBarManager();
-		refreshAction.setImageDescriptor(Activator.getImageDescriptor(Images.GREEN_SYNC));
-		refreshAction.setToolTipText("Refresh the preview browser");
-		toolBar.add(refreshAction);
-		
-		toggleState = previewView.getProjectAutorefresh(project);
-		
-		toggleRefresh.setImageDescriptor(Activator.getImageDescriptor(Images.YELLOW_SYNC));
-		toggleRefresh.setToolTipText(getToggleActionTooltip());
-		toggleRefresh.setChecked(toggleState);
-		toolBar.add(toggleRefresh);
-		
-		pageSite.getActionBars().setGlobalActionHandler(ActionFactory.REFRESH.getId(), refreshAction);
-		getSite().setSelectionProvider(this);
-	}
-
-	private String getToggleActionTooltip() {
-		return toggleState ? "Disable preview autorefresh" : "Enable preview autorefresh";
-	}
-
-	@Override
-	public void addSelectionChangedListener(ISelectionChangedListener listener) {
-		// Do nothing
-	}
-
-	@Override
-	public ISelection getSelection() {
-		return new StructuredSelection(project);
-	}
-
-	@Override
-	public void removeSelectionChangedListener(
-			ISelectionChangedListener listener) {
-		// Do nothing
-	}
-
-	@Override
-	public void setSelection(ISelection selection) {
-		// Do nothing
-	}
-}
--- a/org.symbian.tools.wrttools.editing/src/org/symbian/tools/wrttools/editing/preview/PreviewView.java	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,261 +0,0 @@
-package org.symbian.tools.wrttools.editing.preview;
-
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Map.Entry;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IResourceDeltaVisitor;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.part.IPage;
-import org.eclipse.ui.part.MessagePage;
-import org.eclipse.ui.part.PageBook;
-import org.eclipse.ui.part.PageBookView;
-import org.symbian.tools.wrttools.editing.Activator;
-import org.symbian.tools.wrttools.editing.IWrtEditingPreferences;
-
-public class PreviewView extends PageBookView {
-	private static final class ChangedResourcesCollector implements
-			IResourceDeltaVisitor {
-		public final Collection<IFile> files = new HashSet<IFile>();
-
-		@Override
-		public boolean visit(IResourceDelta delta) throws CoreException {
-			if (isRelevantResource(delta.getResource())) {
-				files.add((IFile) delta.getResource());
-			}
-			return true;
-		}
-	}
-
-	public static boolean isRelevantResource(IResource resource) {
-		return resource.getType() == IResource.FILE
-				&& !resource.getFullPath().segment(1).equalsIgnoreCase(
-						"preview");
-	}
-
-	private final IResourceChangeListener resourceListener = new IResourceChangeListener() {
-		@Override
-		public void resourceChanged(IResourceChangeEvent event) {
-			ChangedResourcesCollector visitor = new ChangedResourcesCollector();
-			try {
-				event.getDelta().accept(visitor);
-			} catch (CoreException e) {
-				Activator.log(e);
-			}
-			refreshPages(visitor.files);
-		}
-	};
-
-	private Map<IProject, PreviewPage> projectToPage = new HashMap<IProject, PreviewPage>();
-	private boolean preferencesLoaded = false;
-	private final Map<IProject, Boolean> autorefresh = new HashMap<IProject, Boolean>();
-
-	@Override
-	protected IPage createDefaultPage(PageBook book) {
-		MessagePage messagePage = new MessagePage();
-		messagePage.setMessage("Open an editor to preview WRT widget");
-		initPage(messagePage);
-		messagePage.createControl(book);
-		return messagePage;
-	}
-
-	@Override
-	public void createPartControl(Composite parent) {
-		super.createPartControl(parent);
-		ResourcesPlugin.getWorkspace().addResourceChangeListener(
-				resourceListener);
-	}
-
-	@Override
-	public void dispose() {
-		ResourcesPlugin.getWorkspace().removeResourceChangeListener(
-				resourceListener);
-		super.dispose();
-	}
-
-	@Override
-	protected PageRec doCreatePage(IWorkbenchPart part) {
-		// All checks we need were done in isImportant method
-		IResource resource = (IResource) ((IEditorPart) part).getEditorInput()
-				.getAdapter(IResource.class);
-
-		IProject project = resource.getProject();
-		PreviewPage page = projectToPage.get(project);
-
-		if (page == null) {
-			page = new PreviewPage(project, this);
-			initPage(page);
-			page.createControl(getPageBook());
-			projectToPage.put(project, page);
-		}
-
-		return new PageRec(part, page);
-	}
-
-	@Override
-	protected void doDestroyPage(IWorkbenchPart part, PageRec pageRecord) {
-		// We do not need to delete the page
-	}
-
-	@Override
-	protected IWorkbenchPart getBootstrapPart() {
-		IEditorPart activeEditor = getSite().getPage().getActiveEditor();
-		if (activeEditor != null) {
-			if (isImportant(activeEditor)) {
-				return activeEditor;
-			}
-		}
-		return null;
-	}
-
-	private boolean getDefaultAutorefresh(IProject project) {
-		IPreferenceStore preferenceStore = Activator.getDefault()
-				.getPreferenceStore();
-		String value = preferenceStore
-				.getString(IWrtEditingPreferences.PREF_AUTO_REFRESH);
-		if (value == null || value.trim().length() == 0 || MessageDialogWithToggle.PROMPT.equals(value)) {
-			return MessageDialogWithToggle
-					.openYesNoQuestion(
-							getSite().getShell(),
-							"WRT Preview",
-							"WRT IDE can refresh preview whenever any changes are made to project files. Refresh will always return the widget to initial page. Do you want to enable automatic refresh for your project?\nNote: you can toggle this setting for particular project on the preview toolbar.",
-							"Keep this setting for all new projects", false,
-							preferenceStore,
-							IWrtEditingPreferences.PREF_AUTO_REFRESH)
-					.getReturnCode() == IDialogConstants.YES_ID;
-		} else {
-			return MessageDialogWithToggle.ALWAYS.equals(value);
-		}
-	}
-
-	private File getPreferencesFile() {
-		return Activator.getDefault().getStateLocation().append(
-				"autorefreshState.xml").toFile();
-	}
-
-	public boolean getProjectAutorefresh(IProject project) {
-		synchronized (autorefresh) {
-			loadPreferences();
-			if (autorefresh.containsKey(project)) {
-				return autorefresh.get(project);
-			} else {
-				boolean value = getDefaultAutorefresh(project);
-				setProjectAutorefresh(project, value);
-				return value;
-			}
-		}
-	}
-
-	@Override
-	protected boolean isImportant(IWorkbenchPart part) {
-		if (part instanceof IEditorPart) {
-			IResource resource = (IResource) ((IEditorPart) part)
-					.getEditorInput().getAdapter(IResource.class);
-			if (resource != null) {
-				return isWrtProject(resource.getProject());
-			}
-		}
-		return false;
-	}
-
-	private boolean isWrtProject(IProject project) {
-		return project.getFile("wrt_preview_frame.html").exists();
-	}
-
-	private void loadPreferences() {
-		synchronized (autorefresh) {
-			if (preferencesLoaded) {
-				return;
-			}
-			preferencesLoaded = true;
-			File preferencesFile = getPreferencesFile();
-			Properties properties = new Properties();
-			if (preferencesFile.exists()) {
-				InputStream inputStream = null;
-				try {
-					inputStream = new FileInputStream(preferencesFile);
-					properties.loadFromXML(inputStream);
-				} catch (IOException e) {
-					Activator.log(e);
-				} finally {
-					if (inputStream != null) {
-						try {
-							inputStream.close();
-						} catch (IOException e) {
-							Activator.log(e);
-						}
-					}
-				}
-				IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
-				for (Entry<Object, Object> entry : properties.entrySet()) {
-					String projectName = entry.getKey().toString();
-					String value = entry.getValue().toString();
-					IProject project = root.getProject(projectName);
-					if (project.exists()) {
-						autorefresh.put(project, Boolean.valueOf(value));
-					}
-				}
-			}
-		}
-	}
-
-	protected void refreshPages(Collection<IFile> files) {
-		Collection<PreviewPage> values = projectToPage.values();
-		for (PreviewPage page : values) {
-			page.process(files);
-		}
-	}
-
-	public void setProjectAutorefresh(IProject project, boolean refresh) {
-		synchronized (autorefresh) {
-			autorefresh.put(project, refresh);
-			Properties properties = new Properties();
-			for (Entry<IProject, Boolean> entry : autorefresh.entrySet()) {
-				properties.setProperty(entry.getKey().getName(), entry
-						.getValue().toString());
-			}
-			File path = getPreferencesFile();
-			OutputStream outputStream = null;
-			try {
-				outputStream = new BufferedOutputStream(new FileOutputStream(
-						path));
-				properties.storeToXML(outputStream, null);
-			} catch (IOException e) {
-				Activator.log(e);
-			} finally {
-				if (outputStream != null) {
-					try {
-						outputStream.close();
-					} catch (IOException e) {
-						Activator.log(e);
-					}
-				}
-			}
-		}
-	}
-
-}
--- a/org.symbian.tools.wrttools.previewer/build.properties	Wed Jan 20 18:00:15 2010 -0800
+++ b/org.symbian.tools.wrttools.previewer/build.properties	Thu Jan 21 11:47:14 2010 -0800
@@ -1,4 +1,9 @@
 source.. = src/
 output.. = bin/
 bin.includes = META-INF/,\
-               .
+               .,\
+               plugin.xml,\
+               preview/,\
+               preferences.ini,\
+               icons/,\
+               wrt.xml
Binary file org.symbian.tools.wrttools.previewer/icons/obj16/html-editor.gif has changed
Binary file org.symbian.tools.wrttools.previewer/icons/obj16/refresh.gif has changed
Binary file org.symbian.tools.wrttools.previewer/icons/obj16/refresh_green.gif has changed
Binary file org.symbian.tools.wrttools.previewer/icons/obj16/refresh_red.gif has changed
Binary file org.symbian.tools.wrttools.previewer/jtidy/jtidy-8.0-20060801.131059-3.jar has changed
--- a/org.symbian.tools.wrttools.previewer/plugin.xml	Wed Jan 20 18:00:15 2010 -0800
+++ b/org.symbian.tools.wrttools.previewer/plugin.xml	Thu Jan 21 11:47:14 2010 -0800
@@ -1,65 +1,47 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?eclipse version="3.2"?>
 <plugin>
-   <extension
-         point="org.eclipse.ui.editors">
-      <editor
-            class="org.symbian.tools.wrttools.editing.html.HTMLEditor"
-            contributorClass="org.eclipse.wst.html.ui.internal.edit.ui.ActionContributorHTML"
-            default="false"
-            icon="icons/obj16/html-editor.gif"
-            id="org.symbian.tools.wrttools.editing.editor2"
-            name="HTML Editor"
-            symbolicFontName="org.eclipse.wst.sse.ui.textfont">
-         <contentTypeBinding
-               contentTypeId="org.eclipse.wst.html.core.htmlsource">
-         </contentTypeBinding>
-      </editor>
-   </extension>
-   <extension
+ 
+ <extension
+       point="org.eclipse.ui.preferencePages">
+    <page
+          class="org.symbian.tools.wrttools.previewer.preview.WidgetPreviewPreferencePage"
+          id="org.symbian.tools.wrttools.previewer.preview.WidgetPreviewPreferencePage"
+          name="Preview"/>
+
+ </extension>
+    <extension
          point="org.eclipse.ui.views">
       <view
-            allowMultiple="true"
-            class="org.symbian.tools.wrttools.editing.preview.PreviewView"
+            allowMultiple="false"
+            class="org.symbian.tools.wrttools.previewer.preview.PreviewView"
             icon="icons/obj16/html-editor.gif"
             id="org.symbian.tools.wrttools.editing.wrtpreview"
             name="WRT Preview"
             restorable="true">
       </view>
    </extension>
- <extension
-       point="org.eclipse.ui.views">
-    <browser class="org.symbian.tools.wrttools.previewer.preview.WidgetPreviewBrowser">
-       <label
-             os="win32"
-             value="Nokia Web Runtime (WRT)"/>
-       <label
-             os="macosx"
-             value="Nokia Web Runtime (WRT)"/>
-       <label
-             os="linux"
-             value="Nokia Web Runtime (WRT)"/>
-
-    </browser>
- </extension>
- 
-<extension
-       point="org.eclipse.core.runtime.preferences">
-    <initializer class="org.symbian.tools.wrttools.previewer.preview.WidgetPreviewPreferenceInitializer"/>
- </extension>
- <extension
-       point="org.eclipse.ui.preferencePages">
-    <page
-          class="org.symbian.tools.wrttools.previewer.preview.WidgetPreviewPreferencePage"
-          id="org.symbian.tools.wrttools.previewer.preview.WidgetPreviewPreferencePage"
-          category="org.symbian.tools.wrttools.previewer.preview.WrtRootPreferences"
-          name="Preview"/>
-
-    <page
-          class="org.symbian.tools.wrttools.previewer.preview.WrtRootPreferences"
-          id="org.symbian.tools.wrtttools.previewer.preview.WrtRootPreferences"
-          name="Web Runtime">
-    </page>
- </extension>
- 
+   <extension
+         point="org.eclipse.ui.preferencePages">
+      <page
+            class="org.symbian.tools.wrttools.previewer.preferences.WrtEditingPreferencePage"
+            id="org.symbian.tools.wrttools.editing.preferences.WrtEditingPreferencePage"
+            name="WRT">
+      </page>
+   </extension>
+   <extension
+         point="org.eclipse.ui.perspectiveExtensions">
+      <perspectiveExtension
+            targetID="org.symbian.tools.wrttools.mainPerspective">
+         <viewShortcut
+               id="org.symbian.tools.wrttools.editing.wrtpreview">
+         </viewShortcut>
+         <view
+               id="org.symbian.tools.wrttools.editing.wrtpreview"
+               minimized="false"
+               relationship="stack"
+               relative="org.eclipse.ui.views.ContentOutline">
+         </view>
+      </perspectiveExtension>
+   </extension>
   </plugin>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/org.symbian.tools.wrttools.previewer/preferences.ini	Thu Jan 21 11:47:14 2010 -0800
@@ -0,0 +1,1 @@
+preview.autorefresh=prompt
\ No newline at end of file
--- a/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/Activator.java	Wed Jan 20 18:00:15 2010 -0800
+++ b/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/Activator.java	Thu Jan 21 11:47:14 2010 -0800
@@ -18,13 +18,13 @@
  */
 package org.symbian.tools.wrttools.previewer;
 
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
 import org.eclipse.core.net.proxy.IProxyService;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
-import org.symbian.tools.wrttools.previewer.utils.Logging;
-import org.osgi.util.tracker.ServiceTracker;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
 
 /**
  * The activator class controls the plug-in life cycle
@@ -61,6 +61,18 @@
 		super.stop(context);
 	}
 
+	@Override
+	protected void initializeImageRegistry(ImageRegistry reg) {
+		addImage(reg, Images.GREEN_SYNC);
+		addImage(reg, Images.RED_SYNC);
+		addImage(reg, Images.YELLOW_SYNC);
+	}
+	
+	private void addImage(ImageRegistry reg, String path) {
+		ImageDescriptor imageDescriptor = imageDescriptorFromPlugin(PLUGIN_ID, path);
+		reg.put(path, imageDescriptor);
+	}
+	
 	/**
 	 * Returns the shared instance
 	 *
@@ -70,15 +82,22 @@
 		return plugin;
 	}
 	
-	public static void log(int severity, String message, Throwable x) {
-		IStatus status = new Status(severity, PLUGIN_ID, 0, message, x);
-		Logging.log(getDefault(), status);
+	public static void log(Exception e) {
+		log(null, e);
+	}
+
+	public static void log(String message, Exception e) {
+		IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, message, e);
+		getDefault().getLog().log(status);
 	}
-	
+
+	public static ImageDescriptor getImageDescriptor(String key) {
+		return getDefault().getImageRegistry().getDescriptor(key);
+	}
+
 	public static IProxyService getProxyService() {
-        ServiceTracker tracker = null;
-		return (IProxyService) tracker.getService();
-}
-
+        IProxyService service = (IProxyService) getDefault().getBundle().getBundleContext().getServiceReference(IProxyService.class.getName());
+		return service;
+	}
 
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/IWrtEditingPreferences.java	Thu Jan 21 11:47:14 2010 -0800
@@ -0,0 +1,5 @@
+package org.symbian.tools.wrttools.previewer;
+
+public interface IWrtEditingPreferences {
+	String PREF_AUTO_REFRESH = "preview.autorefresh";
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/Images.java	Thu Jan 21 11:47:14 2010 -0800
@@ -0,0 +1,7 @@
+package org.symbian.tools.wrttools.previewer;
+
+public interface Images {
+	String RED_SYNC = "/icons/obj16/refresh_red.gif";
+	String YELLOW_SYNC = "/icons/obj16/refresh.gif";
+	String GREEN_SYNC = "/icons/obj16/refresh_green.gif";
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preferences/WrtEditingPreferencePage.java	Thu Jan 21 11:47:14 2010 -0800
@@ -0,0 +1,81 @@
+package org.symbian.tools.wrttools.previewer.preferences;
+
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.RadioGroupFieldEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.symbian.tools.wrttools.previewer.Activator;
+import org.symbian.tools.wrttools.previewer.IWrtEditingPreferences;
+
+/**
+ * This class represents a preference page that
+ * is contributed to the Preferences dialog. By 
+ * subclassing <samp>FieldEditorPreferencePage</samp>, we
+ * can use the field support built into JFace that allows
+ * us to create a page that is small and knows how to 
+ * save, restore and apply itself.
+ * <p>
+ * This page is used to modify preferences only. They
+ * are stored in the preference store that belongs to
+ * the main plug-in class. That way, preferences can
+ * be accessed directly via the preference store.
+ */
+
+public class WrtEditingPreferencePage
+	extends FieldEditorPreferencePage
+	implements IWorkbenchPreferencePage {
+
+	private RadioGroupFieldEditor enableAutorefresh;
+
+	public WrtEditingPreferencePage() {
+		super(GRID);
+		setPreferenceStore(Activator.getDefault().getPreferenceStore());
+	}
+	
+	/**
+	 * Creates the field editors. Field editors are abstractions of
+	 * the common GUI blocks needed to manipulate various types
+	 * of preferences. Each field editor knows how to save and
+	 * restore itself.
+	 */
+	public void createFieldEditors() {
+        Composite projectComposite = new Composite(getFieldEditorParent(), SWT.NONE);
+        projectComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+        projectComposite.setFont(getFieldEditorParent().getFont());
+
+		String[][] namesAndValues = {
+				{ "Enable", MessageDialogWithToggle.ALWAYS },
+				{ "Disable", MessageDialogWithToggle.NEVER },
+				{ "Prompt", MessageDialogWithToggle.PROMPT } };
+		enableAutorefresh = new RadioGroupFieldEditor(
+				IWrtEditingPreferences.PREF_AUTO_REFRESH,
+				"Preview autorefresh for new WRT projects",
+				namesAndValues.length, namesAndValues, projectComposite, true);
+		enableAutorefresh.setPreferenceStore(getPreferenceStore());
+		enableAutorefresh.setPage(this);
+		enableAutorefresh.load();
+        addField(enableAutorefresh);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+	 */
+	public void init(IWorkbench workbench) {
+	}
+
+//	@Override
+//	protected void performDefaults() {
+//		enableAutorefresh.loadDefault();
+//		super.performDefaults();
+//	}
+//	
+//	@Override
+//	public boolean performOk() {
+//		enableAutorefresh.store();
+//		return super.performOk();
+//	}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preview/PreviewPage.java	Thu Jan 21 11:47:14 2010 -0800
@@ -0,0 +1,297 @@
+package org.symbian.tools.wrttools.previewer.preview;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.Collection;
+
+import org.eclipse.core.net.proxy.IProxyData;
+import org.eclipse.core.net.proxy.IProxyService;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.browser.Browser;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.part.IPageBookViewPage;
+import org.eclipse.ui.part.IPageSite;
+import org.eclipse.ui.part.Page;
+import org.mozilla.interfaces.nsIPrefBranch;
+import org.mozilla.interfaces.nsIServiceManager;
+import org.mozilla.xpcom.Mozilla;
+import org.osgi.framework.Bundle;
+import org.symbian.tools.wrttools.previewer.Activator;
+import org.symbian.tools.wrttools.previewer.Images;
+
+public class PreviewPage extends Page implements IPageBookViewPage, ISelectionProvider {
+	private static final String XUL_RUNNER_PATH_PARAMETER = "org.eclipse.swt.browser.XULRunnerPath";
+	private nsIPrefBranch mozillaPrefs;
+
+	private final IAction refreshAction = new Action("Refresh") {
+		public void run() {
+			refresh();
+		};
+	};
+	private final IAction toggleRefresh = new Action("Toggle Refresh", IAction.AS_RADIO_BUTTON) {
+		public void run() {
+			toggleRefresh();
+		};
+	};
+
+	private final IProject project;
+	private Browser browser;
+	private boolean toggleState = true;
+	private final PreviewView previewView;
+	private boolean needsRefresh = false;
+
+	public PreviewPage(IProject project, PreviewView previewView) {
+		this.project = project;
+		this.previewView = previewView;
+	}
+
+	protected void toggleRefresh() {
+		toggleState = !toggleState;
+		toggleRefresh.setChecked(toggleState);
+		previewView.setProjectAutorefresh(project, toggleState);
+		toggleRefresh.setToolTipText(getToggleActionTooltip());
+		if (toggleState && needsRefresh) {
+			refresh();
+		}
+	}
+
+	private synchronized void initMozilla() {
+		if (System.getProperty(XUL_RUNNER_PATH_PARAMETER) == null) {
+			Bundle bundle = Platform.getBundle("org.mozilla.xulrunner"); //$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(XUL_RUNNER_PATH_PARAMETER, file
+								.getAbsolutePath()); //$NON-NLS-1$
+					} catch (IOException e) {
+						// log the exception
+					} catch (URISyntaxException e) {
+						// log the exception
+					}
+				}
+			}
+		}
+	}
+
+	
+	@Override
+	public void createControl(Composite parent) {
+		initMozilla();
+		browser = new Browser(parent, SWT.MOZILLA);
+		bypassSameOriginPolicy();
+		applyProxySettings();
+		browser.setUrl(getURL());
+	}
+
+	private String getURL() {
+		return project.getFile("wrt_preview_frame.html").getLocationURI().toASCIIString();
+	}
+
+
+	@Override
+	public Control getControl() {
+		return browser;
+	}
+
+	@Override
+	public void setFocus() {
+		browser.setFocus();
+	}
+	
+	private boolean refreshScheduled = false;
+
+	public synchronized void process(Collection<IFile> files) {
+		if (!refreshScheduled && needsRefresh(files)) {
+			asyncExec(new Runnable() {
+				@Override
+				public void run() {
+					if (toggleState) {
+						refresh();
+					} else {
+						needsRefresh = true;
+						refreshAction.setImageDescriptor(Activator.getImageDescriptor(Images.RED_SYNC));
+						refreshAction.setToolTipText("Refresh the preview browser (there are updated files)");
+					}
+				}
+			});
+			refreshScheduled = true;
+		}
+	}
+
+	private void asyncExec(Runnable runnable) {
+		getControl().getDisplay().asyncExec(runnable);
+	}
+
+	private boolean needsRefresh(Collection<IFile> files) {
+		for (IFile iFile : files) {
+			if (iFile.getProject().equals(project)) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	protected synchronized void refresh() {
+		try {
+			final Control focusControl = browser.getDisplay().getFocusControl();
+			browser.refresh();
+			refreshAction.setImageDescriptor(Activator
+					.getImageDescriptor(Images.GREEN_SYNC));
+			asyncExec(new Runnable() {
+				@Override
+				public void run() {
+					focusControl.setFocus();
+				}
+			});
+			refreshAction.setToolTipText("Refresh the preview browser");
+			needsRefresh = false;
+		} finally {
+			refreshScheduled = false;
+		}
+	}
+
+	@Override
+	public void init(IPageSite pageSite) {
+		super.init(pageSite);
+		IToolBarManager toolBar = pageSite.getActionBars().getToolBarManager();
+		refreshAction.setImageDescriptor(Activator.getImageDescriptor(Images.GREEN_SYNC));
+		refreshAction.setToolTipText("Refresh the preview browser");
+		toolBar.add(refreshAction);
+		
+		toggleState = previewView.getProjectAutorefresh(project);
+		
+		toggleRefresh.setImageDescriptor(Activator.getImageDescriptor(Images.YELLOW_SYNC));
+		toggleRefresh.setToolTipText(getToggleActionTooltip());
+		toggleRefresh.setChecked(toggleState);
+		toolBar.add(toggleRefresh);
+		
+		pageSite.getActionBars().setGlobalActionHandler(ActionFactory.REFRESH.getId(), refreshAction);
+		getSite().setSelectionProvider(this);
+	}
+
+	private String getToggleActionTooltip() {
+		return toggleState ? "Disable preview autorefresh" : "Enable preview autorefresh";
+	}
+
+	@Override
+	public void addSelectionChangedListener(ISelectionChangedListener listener) {
+		// Do nothing
+	}
+
+	@Override
+	public ISelection getSelection() {
+		return new StructuredSelection(project);
+	}
+
+	@Override
+	public void removeSelectionChangedListener(
+			ISelectionChangedListener listener) {
+		// Do nothing
+	}
+
+	@Override
+	public void setSelection(ISelection selection) {
+		// Do nothing
+	}
+	
+	private void applyProxySettings() {
+		
+		IProxyService px = Activator.getProxyService();
+		if(px != null){			 
+			boolean proxyEnabled = px.isProxiesEnabled();
+
+			boolean systemProxy = px.isSystemProxiesEnabled();
+			if( proxyEnabled && !systemProxy){
+				IProxyData pd = px.getProxyData(IProxyData.HTTP_PROXY_TYPE);
+				if (pd !=null &&mozillaPrefs != null) {				
+					String host= pd.getHost();
+					int port = pd.getPort();
+					if(host !=null && port != -1){
+						mozillaPrefs.setIntPref("network.proxy.type", 1);
+						mozillaPrefs.setCharPref("network.proxy.http", host);
+						mozillaPrefs.setIntPref("network.proxy.http_port", port);
+					}
+				}
+			 }
+		}
+		else{
+			 Exception e= new Exception();
+			 Activator.log("Proxy service returned null", e);
+		 }
+	}
+	
+	private void bypassSameOriginPolicy() {
+
+		try{
+			nsIServiceManager servMgr = null;
+			try {
+				servMgr = Mozilla.getInstance().getServiceManager();
+				if (servMgr == null) return;
+			} catch (Exception x) {
+				// known to throw NullPointException on Mac OS when you're not using 
+				// Mozilla. We don't want to pollute the error log with this
+				return;
+			}
+			
+			mozillaPrefs = (nsIPrefBranch) servMgr.getServiceByContractID(
+											"@mozilla.org/preferences-service;1", 
+											nsIPrefBranch.NS_IPREFBRANCH_IID );		
+
+			mozillaPrefs.setBoolPref("signed.applets.codebase_principal_support", 1);
+
+			mozillaPrefs.setCharPref("capability.policy.default.XMLDocument.getElementsByTagName", "allAccess");
+			mozillaPrefs.setCharPref("capability.policy.default.CDATASection.nodeValue", "allAccess");
+
+			mozillaPrefs.setCharPref("capability.policy.default.HTMLCollection.length", "allAccess");
+			mozillaPrefs.setCharPref("capability.policy.default.HTMLCollection.item", "allAccess");
+
+			mozillaPrefs.setCharPref("capability.policy.default.*.nodeValue", "allAccess");
+			mozillaPrefs.setCharPref("capability.policy.default.*.nodeType", "allAccess");
+			mozillaPrefs.setCharPref("capability.policy.default.*.nodeName", "allAccess");
+			mozillaPrefs.setCharPref("capability.policy.default.*.nextSibling", "allAccess");
+			mozillaPrefs.setCharPref("capability.policy.default.*.previousSibling", "allAccess");
+			mozillaPrefs.setCharPref("capability.policy.default.*.attributes", "allAccess");
+			mozillaPrefs.setCharPref("capability.policy.default.*.childNodes", "allAccess");
+			mozillaPrefs.setCharPref("capability.policy.default.*.firstChild", "allAccess");
+			mozillaPrefs.setCharPref("capability.policy.default.*.getAttribute", "allAccess");
+			mozillaPrefs.setCharPref("capability.policy.default.*.getElementsByTagName", "allAccess");
+			mozillaPrefs.setCharPref("capability.policy.default.*.lastChild", "allAccess");
+			mozillaPrefs.setCharPref("capability.policy.default.*.parentNode", "allAccess");
+			mozillaPrefs.setCharPref("capability.policy.default.*.tagName", "allAccess");
+
+			mozillaPrefs.setCharPref("capability.policy.default.XMLDocument.documentElement", "allAccess");
+			mozillaPrefs.setCharPref("capability.policy.default.XMLDocument.getElementsByTagName", "allAccess");
+			mozillaPrefs.setCharPref("capability.policy.default.XMLHttpRequest.channel", "allAccess");
+			mozillaPrefs.setCharPref("capability.policy.default.XMLHttpRequest.open", "allAccess");
+			mozillaPrefs.setCharPref("capability.policy.default.XMLHttpRequest.responseText", "allAccess");
+			mozillaPrefs.setCharPref("capability.policy.default.XMLHttpRequest.responseXML", "allAccess");
+			mozillaPrefs.setCharPref("capability.policy.default.XMLHttpRequest.send", "allAccess");
+			mozillaPrefs.setCharPref("capability.policy.default.XMLHttpRequest.setRequestHeader", "allAccess");
+			/* to over-ride the internet security dialog when preview browser tries to access local hard drive */
+			mozillaPrefs.setCharPref("capability.principal.codebase.p0.granted", "UniversalXPConnect  UniversalBrowserRead");
+			mozillaPrefs.setCharPref("capability.principal.codebase.p0.id", "file://");
+			mozillaPrefs.setBoolPref("security.fileuri.strict_origin_policy", 0);
+		} catch (Exception e) {
+			Activator.log("Error getting preferences", e);
+		}
+	}
+
+}
--- a/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preview/PreviewSupport.java	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,129 +0,0 @@
-/**
- * Copyright (c) 2009 Symbian Foundation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Symbian Foundation - initial contribution.
- * Contributors:
- * Description:
- * Overview:
- * Details:
- * Platforms/Drives/Compatibility:
- * Assumptions/Requirement/Pre-requisites:
- * Failures and causes:
- */
-
-package org.symbian.tools.wrttools.previewer.preview;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.QualifiedName;
-
-import org.symbian.tools.wrttools.previewer.utils.Check;
-import org.symbian.tools.wrttools.previewer.utils.TrackedResource;
-
-	/**
-	 * This class encapsulates the creation and naming 
-	 * of the preview folder and support files
-	 * @author dpodwall
-	 *
-	 */
-public class PreviewSupport {
-	
-	public static final String PREVIEW_FOLDER = "preview";
-	public static final String PREVIEW_MAIN_HTML = "wrt_preview_main.html";
-	public static final String PREVIEW_FRAME_HTML = "wrt_preview_frame.html";
-	public static final String PREVIEW_HTML_TEMPLATE = "wrt_preview.html";
-	public static final QualifiedName MAIN_HTML_PROPERTY = new QualifiedName("org.symbian.tools.wrttools", "mainHTML");
-	//public static final String PREVIEW_BROWSER_NAME1 = "WRT Widget (S60)";
-	public static final String PREVIEW_BROWSER_NAME =  "Web Runtime (WRT)";
-	
-	private TrackedResource projectTracker;
-	
-	public PreviewSupport(IProject project) {
-		Check.checkArg(project);
-		this.projectTracker = new TrackedResource(project);
-	}
-	
-	public void dispose() {
-		if (projectTracker != null) {
-			projectTracker.dispose();
-		}
-	}
-	
-	public IProject getProject() {
-		return projectTracker.getProject();
-	}
-	
-	/**
-	 * Returns the folder containing preview support files, creating it
-	 * if needed.
-	 * @throws CoreException
-	 */
-	public IFolder getPreviewFolder() throws CoreException {
-		IFolder result = getProject().getFolder(PREVIEW_FOLDER);
-		if (!result.exists()) {
-			result.create(true, true, new NullProgressMonitor());
-		}
-		return result;
-	}
-	
-	/**
-	 * Returns the main file, which is a copy of the user's main html
-	 * file. The copy is modified to include the widget preview environment
-	 * JavaScript files.
-	 * The returned IFile may not exist yet
-	 * @throws CoreException
-	 */
-	public IFile getPreviewMainHtml() throws CoreException {
-		IFile result = getProject().getFile(PREVIEW_MAIN_HTML);
-		return result;
-	}
-	
-	/**
-	 * Returns the preview file, which is the outermost html
-	 * file of the preview environment. It includes the main
-	 * file in an iframe.
-	 * The returned IFile may not exist yet
-	 * @throws CoreException
-	 */
-	public IFile getPreviewFrameHtml() throws CoreException {
-		IFile result = getProject().getFile(PREVIEW_FRAME_HTML);
-		return result;
-	}
-	public IFile getMainHtml() throws CoreException {
-		IFile result = null;
-		String mainFilePath = getProject().getPersistentProperty(MAIN_HTML_PROPERTY);
-		if (mainFilePath != null) {
-			IResource resource = getProject().findMember(mainFilePath);
-			if (resource instanceof IFile) {
-				result = (IFile) resource;
-			}
-		}
-		return result;
-	}
-	
-	/**
-	 * Returns the base path for preview support files
-	 * in the plugin
-	 * @return
-	 */
-	public IPath getPreviewPluginBase() {
-		return new Path("preview");
-	}
-	
-	public IPath getPreviewFrameTemplate() {
-		return getPreviewPluginBase().append(PREVIEW_HTML_TEMPLATE);
-	}
-
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preview/PreviewView.java	Thu Jan 21 11:47:14 2010 -0800
@@ -0,0 +1,261 @@
+package org.symbian.tools.wrttools.previewer.preview;
+
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Map.Entry;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.part.IPage;
+import org.eclipse.ui.part.MessagePage;
+import org.eclipse.ui.part.PageBook;
+import org.eclipse.ui.part.PageBookView;
+import org.symbian.tools.wrttools.previewer.Activator;
+import org.symbian.tools.wrttools.previewer.IWrtEditingPreferences;
+
+public class PreviewView extends PageBookView {
+	private static final class ChangedResourcesCollector implements
+			IResourceDeltaVisitor {
+		public final Collection<IFile> files = new HashSet<IFile>();
+
+		@Override
+		public boolean visit(IResourceDelta delta) throws CoreException {
+			if (isRelevantResource(delta.getResource())) {
+				files.add((IFile) delta.getResource());
+			}
+			return true;
+		}
+	}
+
+	public static boolean isRelevantResource(IResource resource) {
+		return resource.getType() == IResource.FILE
+				&& !resource.getFullPath().segment(1).equalsIgnoreCase(
+						"preview");
+	}
+
+	private final IResourceChangeListener resourceListener = new IResourceChangeListener() {
+		@Override
+		public void resourceChanged(IResourceChangeEvent event) {
+			ChangedResourcesCollector visitor = new ChangedResourcesCollector();
+			try {
+				event.getDelta().accept(visitor);
+			} catch (CoreException e) {
+				Activator.log(e);
+			}
+			refreshPages(visitor.files);
+		}
+	};
+
+	private Map<IProject, PreviewPage> projectToPage = new HashMap<IProject, PreviewPage>();
+	private boolean preferencesLoaded = false;
+	private final Map<IProject, Boolean> autorefresh = new HashMap<IProject, Boolean>();
+
+	@Override
+	protected IPage createDefaultPage(PageBook book) {
+		MessagePage messagePage = new MessagePage();
+		messagePage.setMessage("Open an editor to preview WRT widget");
+		initPage(messagePage);
+		messagePage.createControl(book);
+		return messagePage;
+	}
+
+	@Override
+	public void createPartControl(Composite parent) {
+		super.createPartControl(parent);
+		ResourcesPlugin.getWorkspace().addResourceChangeListener(
+				resourceListener);
+	}
+
+	@Override
+	public void dispose() {
+		ResourcesPlugin.getWorkspace().removeResourceChangeListener(
+				resourceListener);
+		super.dispose();
+	}
+
+	@Override
+	protected PageRec doCreatePage(IWorkbenchPart part) {
+		// All checks we need were done in isImportant method
+		IResource resource = (IResource) ((IEditorPart) part).getEditorInput()
+				.getAdapter(IResource.class);
+
+		IProject project = resource.getProject();
+		PreviewPage page = projectToPage.get(project);
+
+		if (page == null) {
+			page = new PreviewPage(project, this);
+			initPage(page);
+			page.createControl(getPageBook());
+			projectToPage.put(project, page);
+		}
+
+		return new PageRec(part, page);
+	}
+
+	@Override
+	protected void doDestroyPage(IWorkbenchPart part, PageRec pageRecord) {
+		// We do not need to delete the page
+	}
+
+	@Override
+	protected IWorkbenchPart getBootstrapPart() {
+		IEditorPart activeEditor = getSite().getPage().getActiveEditor();
+		if (activeEditor != null) {
+			if (isImportant(activeEditor)) {
+				return activeEditor;
+			}
+		}
+		return null;
+	}
+
+	private boolean getDefaultAutorefresh(IProject project) {
+		IPreferenceStore preferenceStore = Activator.getDefault()
+				.getPreferenceStore();
+		String value = preferenceStore
+				.getString(IWrtEditingPreferences.PREF_AUTO_REFRESH);
+		if (value == null || value.trim().length() == 0 || MessageDialogWithToggle.PROMPT.equals(value)) {
+			return MessageDialogWithToggle
+					.openYesNoQuestion(
+							getSite().getShell(),
+							"WRT Preview",
+							"WRT IDE can refresh preview whenever any changes are made to project files. Refresh will always return the widget to initial page. Do you want to enable automatic refresh for your project?\nNote: you can toggle this setting for particular project on the preview toolbar.",
+							"Keep this setting for all new projects", false,
+							preferenceStore,
+							IWrtEditingPreferences.PREF_AUTO_REFRESH)
+					.getReturnCode() == IDialogConstants.YES_ID;
+		} else {
+			return MessageDialogWithToggle.ALWAYS.equals(value);
+		}
+	}
+
+	private File getPreferencesFile() {
+		return Activator.getDefault().getStateLocation().append(
+				"autorefreshState.xml").toFile();
+	}
+
+	public boolean getProjectAutorefresh(IProject project) {
+		synchronized (autorefresh) {
+			loadPreferences();
+			if (autorefresh.containsKey(project)) {
+				return autorefresh.get(project);
+			} else {
+				boolean value = getDefaultAutorefresh(project);
+				setProjectAutorefresh(project, value);
+				return value;
+			}
+		}
+	}
+
+	@Override
+	protected boolean isImportant(IWorkbenchPart part) {
+		if (part instanceof IEditorPart) {
+			IResource resource = (IResource) ((IEditorPart) part)
+					.getEditorInput().getAdapter(IResource.class);
+			if (resource != null) {
+				return isWrtProject(resource.getProject());
+			}
+		}
+		return false;
+	}
+
+	private boolean isWrtProject(IProject project) {
+		return project.getFile("wrt_preview_frame.html").exists();
+	}
+
+	private void loadPreferences() {
+		synchronized (autorefresh) {
+			if (preferencesLoaded) {
+				return;
+			}
+			preferencesLoaded = true;
+			File preferencesFile = getPreferencesFile();
+			Properties properties = new Properties();
+			if (preferencesFile.exists()) {
+				InputStream inputStream = null;
+				try {
+					inputStream = new FileInputStream(preferencesFile);
+					properties.loadFromXML(inputStream);
+				} catch (IOException e) {
+					Activator.log(e);
+				} finally {
+					if (inputStream != null) {
+						try {
+							inputStream.close();
+						} catch (IOException e) {
+							Activator.log(e);
+						}
+					}
+				}
+				IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+				for (Entry<Object, Object> entry : properties.entrySet()) {
+					String projectName = entry.getKey().toString();
+					String value = entry.getValue().toString();
+					IProject project = root.getProject(projectName);
+					if (project.exists()) {
+						autorefresh.put(project, Boolean.valueOf(value));
+					}
+				}
+			}
+		}
+	}
+
+	protected void refreshPages(Collection<IFile> files) {
+		Collection<PreviewPage> values = projectToPage.values();
+		for (PreviewPage page : values) {
+			page.process(files);
+		}
+	}
+
+	public void setProjectAutorefresh(IProject project, boolean refresh) {
+		synchronized (autorefresh) {
+			autorefresh.put(project, refresh);
+			Properties properties = new Properties();
+			for (Entry<IProject, Boolean> entry : autorefresh.entrySet()) {
+				properties.setProperty(entry.getKey().getName(), entry
+						.getValue().toString());
+			}
+			File path = getPreferencesFile();
+			OutputStream outputStream = null;
+			try {
+				outputStream = new BufferedOutputStream(new FileOutputStream(
+						path));
+				properties.storeToXML(outputStream, null);
+			} catch (IOException e) {
+				Activator.log(e);
+			} finally {
+				if (outputStream != null) {
+					try {
+						outputStream.close();
+					} catch (IOException e) {
+						Activator.log(e);
+					}
+				}
+			}
+		}
+	}
+
+}
--- a/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preview/WidgetPreviewBrowser.java	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,463 +0,0 @@
-/**
- * Copyright (c) 2009 Symbian Foundation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Symbian Foundation - initial contribution.
- * Contributors:
- * Description:
- * Overview:
- * Details:
- * Platforms/Drives/Compatibility:
- * Assumptions/Requirement/Pre-requisites:
- * Failures and causes:
- */
-
-package org.symbian.tools.wrttools.previewer.preview;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.eclipse.core.net.proxy.IProxyData;
-import org.eclipse.core.net.proxy.IProxyService;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.TreeSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.browser.Browser;
-import org.eclipse.swt.browser.ProgressAdapter;
-import org.eclipse.swt.browser.ProgressEvent;
-import org.eclipse.swt.custom.ScrolledComposite;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-
-import org.mozilla.interfaces.nsIPrefBranch;
-import org.mozilla.interfaces.nsIServiceManager;
-import org.mozilla.xpcom.Mozilla;
-import org.osgi.framework.Bundle;
-import org.eclipse.ui.part.IPageBookViewPage;
-import org.eclipse.ui.part.IPageSite;
-import org.eclipse.ui.part.Page;
-
-//import com.aptana.ide.editor.html.BrowserExtensionLoader;
-//import com.aptana.ide.editors.UnifiedEditorsPlugin;
-//import com.aptana.ide.editors.unified.ContributedBrowser;
-//import com.aptana.ide.editors.unified.ContributedOutline;
-//import com.aptana.ide.editors.unified.DefaultBrowser;
-import org.symbian.tools.wrttools.previewer.utils.FileUtils;
-import org.symbian.tools.wrttools.previewer.Activator;
-
-public class WidgetPreviewBrowser extends Page implements IPageBookViewPage {
-	
-	private static final String XUL_RUNNER_PATH_PARAMETER = "org.eclipse.swt.browser.XULRunnerPath";
-
-	private ScrolledComposite outerComposite;
-
-	private Composite innerComposite;
-
-	private Browser browser;
-	
-	private String url;
-	
-	private PreviewSupport previewSupport;
-	
-	private boolean displayingPreview; // true if we're displaying the widget preview in the browser
-	
-	private nsIPrefBranch mozillaPrefs;
-	
-	private final IProject project;
-	
-	public WidgetPreviewBrowser(IProject project) {
-		this.project = project;
-	}
-	
-	private synchronized void initMozilla() {
-		if (System.getProperty(XUL_RUNNER_PATH_PARAMETER) == null) {
-			Bundle bundle = Platform.getBundle("org.mozilla.xulrunner"); //$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(XUL_RUNNER_PATH_PARAMETER, file
-								.getAbsolutePath()); //$NON-NLS-1$
-					} catch (IOException e) {
-						// log the exception
-					} catch (URISyntaxException e) {
-						// log the exception
-					}
-				}
-			}
-		}
-	}
-
-	private String getURL() {
-		return project.getFile("wrt_preview_frame.html").getLocationURI().toASCIIString();
-	}
-
-
-	@Override
-	public Control getControl() {
-		return browser;
-	}
-
-
-	public void createControl(Composite parent) {	
-		
-		// initialize mozilla browser
-		initMozilla();
-		browser = new Browser(parent, SWT.MOZILLA);
-		browser.setUrl(getURL());
-
-		outerComposite = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL);
-		outerComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
-		innerComposite = new Composite(outerComposite, SWT.NONE);
-		innerComposite.setLayout(new GridLayout(1, true));
-		innerComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
-		String browserLabel = Activator.getDefault().getPreferenceStore().getString(
-						WidgetPreviewPreferencePage.WIDGET_BROWSER_PREVIEW_PREFERENCE);
-		IConfigurationElement element = null;
-		
-//TODO - remove Aptana specific Browser implementation
-/*
-		List<IConfigurationElement> browserList = WidgetPreviewPreferencePage.getBrowsers();
-		for (int i = 0; i < browserList.size(); i++) {
-			IConfigurationElement curr = (IConfigurationElement) browserList.get(i);
-			String label = BrowserExtensionLoader.getBrowserLabel(curr);
-			if (browserLabel.equals(label)) {
-				element = curr;
-				break;
-			}
-		}
-		if (element != null) {
-			try {
-				browser = (ContributedBrowser) element.createExecutableExtension(UnifiedEditorsPlugin.CLASS_ATTR);
-				browser.createControl(innerComposite);
-			} catch (Exception e1) {
-				Activator.log(IStatus.ERROR, "Error creating browser control", e1);
-				browser = new DefaultBrowser();
-				browser.createControl(innerComposite);
-			}
-		} else {
-			browser = new DefaultBrowser();
-			browser.createControl(innerComposite);
-		}
-		
-		Object browserObject = browser.getUnderlyingBrowserObject();
-*/
-		
-		//if (browserObject instanceof MozillaBrowser) {
-			bypassSameOriginPolicy();
-		//}
-
-		outerComposite.setContent(innerComposite);
-
-		outerComposite.setExpandHorizontal(true);
-		outerComposite.setExpandVertical(true);
-	}
-
-	private void initializePreview(String url) {
-		if (previewSupport == null) {
-			IProject project = getCurrentProject(url);
-			if (project != null) {
-				previewSupport = new PreviewSupport(project);
-			}
-		}
-	}
-
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see com.aptana.ide.editors.unified.ContributedBrowser#refresh()
-	 */
-	public void refresh() {
-		if (browser != null) {
-			if (displayingPreview) {
-				// setting the browser URL is potentially asynchronous.
-				// do our other actions after that completes.
-				browser.addProgressListener(new ProgressAdapter() {
-					public void completed(ProgressEvent arg0) {
-						browser.removeProgressListener(this);
-						browser.refresh();
-					}
-				});
-				try {
-					IFile mainHtml = previewSupport.getMainHtml();
-					if(mainHtml != null) {
-						browser.setUrl(getPreviewHtmlURL());	
-			
-					} 
-					else {
-						IFile nopreview = previewSupport.getPreviewFolder().getFile("nopreview.html");
-						if (nopreview != null) {
-							browser.setUrl(nopreview.getLocation().toFile().toURI().toString());
-						}
-					}					
-				} catch (CoreException e) {
-					Activator.log(IStatus.ERROR, "Error setting preview URL", e);
-				}
-			}
-		}
-	}
-
-	public void dispose() {
-		if (previewSupport != null) {
-			previewSupport.dispose();
-		}
-		if (outerComposite != null && !outerComposite.isDisposed()) {
-			outerComposite.dispose();
-		}
-	}
-
-//TODO
-/*
-    public Control getControl() {
- 
-		return outerComposite;
-	}
-*/
-	
-	@Override
-	public void setFocus() {
-		browser.setFocus();
-	}
-	
-	private String getPreviewHtmlURL() {
-		String result = null;
-		try {
-			IFile previewHtml = previewSupport.getPreviewFrameHtml();
-			URL fileURL = previewHtml.getLocation().toFile().toURL();
-			result = fileURL.toString();
-		} catch (CoreException e) {
-			Activator.log(IStatus.ERROR, "Error setting preview URL", e);
-		} catch (IOException e) {
-			Activator.log(IStatus.ERROR, "Error setting preview URL", e);
-		}
-		return result;
-	}
-	
-	public void setURL(String url) {
-		if (browser != null &&  
-				!"about:blank".equalsIgnoreCase(url)) {
-			
-			initializePreview(url);
-			applyAptanaProxySettingsToMozilla();
-
-			try {
-				URL tmp = new URL(url);
-				String urlFile = tmp.getFile();
-				IFile mainHtml = previewSupport.getMainHtml();
-				
-				String mainHtmlLocation = null;
-				
-				if(mainHtml != null) {
-					mainHtmlLocation = mainHtml.getLocation().toString();
-					
-					if (urlFile != null && 
-						(urlFile.contains(".tmp") ||
-						 urlFile.equals(mainHtmlLocation))) {
-						 
-						this.url = getPreviewHtmlURL();
-						browser.setUrl(this.url);
-						displayingPreview = true;
-					} 
-				}else {
-					IFile nopreview = previewSupport.getPreviewFolder().getFile("nopreview.html");
-					if (nopreview != null) {
-			
-						browser.setUrl(nopreview.getLocation().toFile().toURI().toString());
-					}
-				}
-			} catch (CoreException e) {
-				Activator.log(IStatus.ERROR, "Error setting preview URL", e);
-			} catch (IOException e) {
-				Activator.log(IStatus.ERROR, "Error setting preview URL", e);
-			}
-		}
-	}
-
-	private void bypassSameOriginPolicy() {
-
-		try{
-			nsIServiceManager servMgr = null;
-			try {
-				servMgr = Mozilla.getInstance().getServiceManager();
-				if (servMgr == null) return;
-			} catch (Exception x) {
-				// known to throw NullPointException on Mac OS when you're not using 
-				// Mozilla. We don't want to pollute the error log with this
-				return;
-			}
-			
-			mozillaPrefs = (nsIPrefBranch) servMgr.getServiceByContractID(
-											"@mozilla.org/preferences-service;1", 
-											nsIPrefBranch.NS_IPREFBRANCH_IID );		
-
-			mozillaPrefs.setBoolPref("signed.applets.codebase_principal_support", 1);
-
-			mozillaPrefs.setCharPref("capability.policy.default.XMLDocument.getElementsByTagName", "allAccess");
-			mozillaPrefs.setCharPref("capability.policy.default.CDATASection.nodeValue", "allAccess");
-
-			mozillaPrefs.setCharPref("capability.policy.default.HTMLCollection.length", "allAccess");
-			mozillaPrefs.setCharPref("capability.policy.default.HTMLCollection.item", "allAccess");
-
-			mozillaPrefs.setCharPref("capability.policy.default.*.nodeValue", "allAccess");
-			mozillaPrefs.setCharPref("capability.policy.default.*.nodeType", "allAccess");
-			mozillaPrefs.setCharPref("capability.policy.default.*.nodeName", "allAccess");
-			mozillaPrefs.setCharPref("capability.policy.default.*.nextSibling", "allAccess");
-			mozillaPrefs.setCharPref("capability.policy.default.*.previousSibling", "allAccess");
-			mozillaPrefs.setCharPref("capability.policy.default.*.attributes", "allAccess");
-			mozillaPrefs.setCharPref("capability.policy.default.*.childNodes", "allAccess");
-			mozillaPrefs.setCharPref("capability.policy.default.*.firstChild", "allAccess");
-			mozillaPrefs.setCharPref("capability.policy.default.*.getAttribute", "allAccess");
-			mozillaPrefs.setCharPref("capability.policy.default.*.getElementsByTagName", "allAccess");
-			mozillaPrefs.setCharPref("capability.policy.default.*.lastChild", "allAccess");
-			mozillaPrefs.setCharPref("capability.policy.default.*.parentNode", "allAccess");
-			mozillaPrefs.setCharPref("capability.policy.default.*.tagName", "allAccess");
-
-			mozillaPrefs.setCharPref("capability.policy.default.XMLDocument.documentElement", "allAccess");
-			mozillaPrefs.setCharPref("capability.policy.default.XMLDocument.getElementsByTagName", "allAccess");
-			mozillaPrefs.setCharPref("capability.policy.default.XMLHttpRequest.channel", "allAccess");
-			mozillaPrefs.setCharPref("capability.policy.default.XMLHttpRequest.open", "allAccess");
-			mozillaPrefs.setCharPref("capability.policy.default.XMLHttpRequest.responseText", "allAccess");
-			mozillaPrefs.setCharPref("capability.policy.default.XMLHttpRequest.responseXML", "allAccess");
-			mozillaPrefs.setCharPref("capability.policy.default.XMLHttpRequest.send", "allAccess");
-			mozillaPrefs.setCharPref("capability.policy.default.XMLHttpRequest.setRequestHeader", "allAccess");
-			/* to over-ride the internet security dialog when preview browser tries to access local hard drive */
-			mozillaPrefs.setCharPref("capability.principal.codebase.p0.granted", "UniversalXPConnect  UniversalBrowserRead");
-			mozillaPrefs.setCharPref("capability.principal.codebase.p0.id", "file://");
-			mozillaPrefs.setBoolPref("security.fileuri.strict_origin_policy", 0);
-			
-			
-			
-
-		} catch (Exception e) {
-			Activator.log(IStatus.ERROR, "Error getting preferences", e);
-		}
-	}
-	
-	private void applyAptanaProxySettingsToMozilla() {
-		
-		IProxyService px = Activator.getProxyService();
-		if(px != null){			 
-			boolean proxyEnabled = px.isProxiesEnabled();
-
-			boolean systemProxy = px.isSystemProxiesEnabled();
-			if( proxyEnabled && !systemProxy){
-				IProxyData pd = px.getProxyData(IProxyData.HTTP_PROXY_TYPE);
-				if (pd !=null &&mozillaPrefs != null) {				
-					String host= pd.getHost();
-					int port = pd.getPort();
-					if(host !=null && port != -1){
-						mozillaPrefs.setIntPref("network.proxy.type", 1);
-						mozillaPrefs.setCharPref("network.proxy.http", host);
-						mozillaPrefs.setIntPref("network.proxy.http_port", port);
-					}
-				}
-			 }
-		}
-		else{
-			 Exception e= new Exception();
-			 Activator.log(IStatus.ERROR, "Proxy service returned null", e);
-		 }
-	}
-	
-	private IProject getCurrentProject(String url) {
-		if (url != null) {
-			File f =  null;
-			try {
-				f = new File(new URI(url));
-				IPath path = FileUtils.convertToWorkspacePath(new Path(f.getCanonicalPath()), true, false);
-				if (path != null) {
-					IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); 
-					IProject project = root.getProject(path.segment(0));
-					if (project != null) {
-						return project;
-					}
-				}
-			} catch (Exception e) {
-			}
-		}
-		ISelection selection = Activator.getDefault().getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection();
-		IEditorPart activeEditor = null;
-		IProject project = null;
-		IWorkbenchPage activePage = Activator.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
-		if (activePage != null) {
-			activeEditor = activePage.getActiveEditor();
-		}
-		
-		if(activeEditor != null){			
-			IEditorInput editorInput = activeEditor.getEditorInput();
-			IResource adapter = (IResource) editorInput.getAdapter(IResource.class);
-			project = adapter.getProject();
-		} else if (selection instanceof TreeSelection) {
-			TreeSelection seTreeSelection = (TreeSelection)selection;
-			Object obj = seTreeSelection.getFirstElement();
-			if (obj instanceof IResource) {
-				IResource r = (IResource) obj;
-				project = r.getProject();
-			}
-		}
-		return project;
-	}
-
-	public void back() {
-		if(browser != null){
-			browser.back();
-		}
-	}
-
-	public void forward() {
-		if(browser != null){
-			browser.forward();
-		}
-	}
-
-//TODO - remove Aptana specific browser implementation
-/*
-	public Object getUnderlyingBrowserObject()
-	{
-		Object result = null;
-		if (browser != null) {
-			result = browser.getUnderlyingBrowserObject();
-		}
-		return result;
-	}
-	
-
-	@Override
-	public void setOutline(ContributedOutline outline) {
-		if (browser != null) {
-			browser.setOutline(outline);
-		}
-	}
-*/
-}
--- a/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preview/WidgetPreviewPreferenceInitializer.java	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/**
- * Copyright (c) 2009 Symbian Foundation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Symbian Foundation - initial contribution.
- * Contributors:
- * Description:
- * Overview:
- * Details:
- * Platforms/Drives/Compatibility:
- * Assumptions/Requirement/Pre-requisites:
- * Failures and causes:
- */
-
-package org.symbian.tools.wrttools.previewer.preview;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-
-import org.symbian.tools.wrttools.previewer.Activator;
-
-
-public class WidgetPreviewPreferenceInitializer extends
-		AbstractPreferenceInitializer {
-
-	@Override
-	public void initializeDefaultPreferences() {
-		IPreferenceStore store = Activator.getDefault().getPreferenceStore();
-		if (Platform.getOS().equals(Platform.OS_WIN32)) {
-			store.setDefault(WidgetPreviewPreferencePage.WIDGET_BROWSER_PREVIEW_PREFERENCE, "Firefox"); //$NON-NLS-1$
-		} else if (Platform.getOS().equals(Platform.OS_LINUX)) {
-			store.setDefault(WidgetPreviewPreferencePage.WIDGET_BROWSER_PREVIEW_PREFERENCE, "Default"); //$NON-NLS-1$
-		} else if (Platform.getOS().equals(Platform.OS_MACOSX)) {
-			store.setDefault(WidgetPreviewPreferencePage.WIDGET_BROWSER_PREVIEW_PREFERENCE, "Safari"); //$NON-NLS-1$
-		}
-	}
-
-}
--- a/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preview/WidgetPreviewPreferencePage.java	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-/**
- * Copyright (c) 2009 Symbian Foundation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Symbian Foundation - initial contribution.
- * Contributors:
- * Description:
- * Overview:
- * Details:
- * Platforms/Drives/Compatibility:
- * Assumptions/Requirement/Pre-requisites:
- * Failures and causes:
- */
-
-package org.symbian.tools.wrttools.previewer.preview;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.jface.preference.RadioGroupFieldEditor;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-//import com.aptana.ide.editor.html.BrowserExtensionLoader;
-//import com.aptana.ide.editors.UnifiedEditorsPlugin;
-import org.symbian.tools.wrttools.previewer.Activator;
-
-public class WidgetPreviewPreferencePage extends FieldEditorPreferencePage implements 
- IWorkbenchPreferencePage {
-
-	public static final String WIDGET_BROWSER_PREVIEW_PREFERENCE = "org.symbian.tools.wrttools.previewer.preview.WIDGET_BROWSER_PREVIEW_PREFERENCE";
-
-	public WidgetPreviewPreferencePage() {
-		super(GRID);
-		setPreferenceStore(Activator.getDefault().getPreferenceStore());
-		setDescription("Preferences for the Widget preview");
-	}
-
-	/**
-	 * Gets the list of  embeddable browsers
-	 * @return - list of browsers
-	 */
-//TODO - remove Aptana Browser specific code
-/*
-	public static List<IConfigurationElement> getBrowsers() {
-		List<IConfigurationElement> browserList = new ArrayList<IConfigurationElement>();
-		IExtensionRegistry reg = Platform.getExtensionRegistry();
-		IExtensionPoint ep = reg.getExtensionPoint(UnifiedEditorsPlugin.BROWSER_EXTENSION_POINT);
-		IExtension[] extensions = ep.getExtensions();
-		for (int i = 0; i < extensions.length; i++) {
-			IConfigurationElement[] ce = extensions[i].getConfigurationElements();
-			for (int j = 0; j < ce.length; j++) {
-				String browserClass = ce[j].getAttribute(UnifiedEditorsPlugin.CLASS_ATTR);
-				String name = BrowserExtensionLoader.getBrowserLabel(ce[j]);
-				if (browserClass != null && name != null) {
-					browserList.add(ce[j]);
-				}
-			}
-		}
-		Collections.sort(browserList, new Comparator<Object>() {
-			public int compare(Object o1, Object o2) {
-				String name1 = BrowserExtensionLoader.getBrowserLabel((IConfigurationElement) o1);
-				String name2 = BrowserExtensionLoader.getBrowserLabel((IConfigurationElement) o2);
-				if (name1 != null && name2 != null) {
-					return name1.compareTo(name2);
-				}
-				return 0;
-			}
-		});
-		return browserList;
-	}
-	*/
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
-	 */
-
-	protected void createFieldEditors() {
-//TODO - remove Aptana browser specific implementation
-/*
-		List<IConfigurationElement> browserList = getBrowsers();
-		List<String> browserNames = new ArrayList<String>();
-		for (int i = 0; i < browserList.size(); i++) {
-			IConfigurationElement element = (IConfigurationElement) browserList.get(i);
-			if (!element.getContributor().getName().equals(Activator.PLUGIN_ID)) {
-				browserNames.add(BrowserExtensionLoader.getBrowserLabel((IConfigurationElement)
-						browserList.get(i)));
-			}
-		}
-
-		String[][] options = new String[browserNames.size()][2];
-		for (int i = 0; i < options.length; i++) {
-			options[i][0] = (String) browserNames.get(i);
-			options[i][1] = (String) browserNames.get(i);
-		}
-
-		addField(new RadioGroupFieldEditor(WIDGET_BROWSER_PREVIEW_PREFERENCE,
-				"Browser Options", 1, options, getFieldEditorParent(), true));
-*/
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
-	 */
-	public void init(IWorkbench workbench) {
-	}
-}
--- a/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/utils/Check.java	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,129 +0,0 @@
-/**
- * Copyright (c) 2009 Symbian Foundation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Symbian Foundation - initial contribution.
- * Contributors:
- * Description:
- * Overview:
- * Details:
- * Platforms/Drives/Compatibility:
- * Assumptions/Requirement/Pre-requisites:
- * Failures and causes:
- */
-package org.symbian.tools.wrttools.previewer.utils;
-
-import org.symbian.tools.wrttools.previewer.utils.noexport.Messages;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-
-
-/**
- * Utilities for runtime checking of correctness.
- * 
- * @author eswartz
- *
- */
-public class Check {
-    /**
-     * Report a failure.  This logs the failure and reports a dialog in debug mode.
-     * 
-     * @param message human-readable message
-     * @param thr the exception to report 
-     */
-    public static void reportFailure(String message, Throwable thr) {
-        try {
-            IStatus status = Logging.newSimpleStatus(1 /* our caller */, 
-                    IStatus.ERROR, 
-                    message,
-                    thr);
-            Logging.log(UtilsPlugin.getDefault(), status);
-            if (Platform.isRunning() && Platform.inDebugMode())
-                Logging.showErrorDialog(Messages.getString("Check.RuntimeError"), null, status); //$NON-NLS-1$
-        } catch (Throwable e) {
-            // ignore: don't recursively fail
-        }
-    }
-    
-    /**
-     * Verify an argument is not null else throw a runtime exception
-     * 
-     * It's not necessary to use this unless you're storing the object 
-     * away for later use -- otherwise just deference it and let the runtime
-     * throw for you!
-     * 
-     * @param obj
-     * @throws NullPointerException
-     */
-    static public void checkArg(Object obj) {
-        if (obj == null) {
-            RuntimeException thr = new NullPointerException();
-            reportFailure(Messages.getString("Check.ArgumentIsNull"), thr); //$NON-NLS-1$
-            throw thr;
-        }
-    }
-
-
-    /**
-     * Verify an argument satisfies a condition else throw a runtime exception
-     * 
-     * @param condition test which must return true
-     * @throws IllegalArgumentException
-     */
-    static public void checkArg(boolean condition) {
-        if (!condition) {
-            RuntimeException thr = new IllegalArgumentException();
-            reportFailure(Messages.getString("Check.ArgumentIsInvalid"), thr); //$NON-NLS-1$
-            throw thr;
-        }
-    }
-    
-    /**
-     * Verify an invariant of object state holds else throw a runtime exception.
-     * This is typically used to verify an object is internally consistent.
-     * 
-     * @param condition test which must return true
-     * @throws IllegalStateException
-     */
-    static public void checkState(boolean condition) {
-        if (!condition) {
-            RuntimeException thr = new IllegalStateException();
-            reportFailure(Messages.getString("Check.ObjectIsInconsistent"), thr); //$NON-NLS-1$
-            throw thr;
-        }
-    }
-
-    /**
-     * Verify an invariant related to promised behavior holds else throw a runtime exception
-     * This is typically used to ensure a client API works as expected.
-     *  
-     * @param condition test which must return true
-     * @throws AssertionError
-     */
-    static public void checkContract(boolean condition) {
-        if (!condition) {
-            AssertionError thr = new AssertionError();
-            reportFailure(Messages.getString("Check.ApiAssertionFailed"), thr); //$NON-NLS-1$
-            throw thr;
-        }
-    }
-
-    /**
-     * Throw a runtime exception to indicate a test on an argument
-     * failed due to another exception.
-     * 
-     * @param thr the throwable that resulted from an argument test
-     * @throws IllegalArgumentException
-     */
-    public static void failedArg(Throwable thr) {
-        IllegalArgumentException exc = new IllegalArgumentException();
-        exc.initCause(thr);
-        throw exc;
-    }
-}
--- a/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/utils/FileUtils.java	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,851 +0,0 @@
-/**
- * Copyright (c) 2009 Symbian Foundation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Symbian Foundation - initial contribution.
- * Contributors:
- * Description:
- * Overview:
- * Details:
- * Platforms/Drives/Compatibility:
- * Assumptions/Requirement/Pre-requisites:
- * Failures and causes:
- */
-package org.symbian.tools.wrttools.previewer.utils;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.swt.widgets.Shell;
-import org.osgi.framework.Bundle;
-
-import java.io.*;
-import java.net.*;
-import java.util.*;
-
-/**
- * @author eswartz
- *
- */
-public class FileUtils {
-	
-	// special IStatus code for file modified during validateEdit
-	public static final int MODIFIED_FILES_STATUS = 1000;
-	
-    /** Copy files or directories from 'from' to 'to'.  
-     * 
-     * Recursively descends if 'from' is a directory.  
-     * Creates 'from' tail directory in 'to', e.g.:
-     * from = c:/foo/bar
-     * to = c:/temp
-     * 
-     * -->
-     * 
-     * c:/temp/bar
-     * 
-     * @param from
-     * @param to
-     * @param filter the filename filter, or null
-     */
-    public static void copyTree(File from, File to, FileFilter filter) throws IOException {
-        File[] children;
-        
-    	if (!from.exists()) {
-    		throw new IOException ("Source of copy \'" + from.getName() + "\' doesn't exist");
-    	}
-    	
-    	if (to.getCanonicalPath().equals(from.getCanonicalPath())) {
-    		throw new IOException ("\'" + from.getName() + "\' cannot copy to itself");
-    	}
-
-        if (from.isDirectory()) {
-            children = from.listFiles(filter);
-            // just like cp command, if target exist, make a new folder into
-            // the target, copy content into the target folder
-            if (to.exists()) {
-            	if (to.isFile()) {
-            		throw new IOException("Cannot overwrite non-directory \'" + to.getName() + "\' with directory " + from.getName());
-            	}
-            	// copy into new directory name grafted after the existing one
-            	to = new File(to, from.getName());
-            	copyTree(from, to, filter);
-            	return;
-            } else {
-            	// copy into new directory name
-            	to.mkdir();            	
-                for (int i = 0; i < children.length; i++) {
-                    File curto = new File(to, children[i].getName());
-         
-                    copyTree(children[i], curto, filter);
-                }
-                return;
-            }
-        }
-        else {
-        	if (to.isDirectory()) {
-        		to = new File (to, from.getName());
-        	}
-            copyFile(from, to);
-            return;
-        }
-        
-    }
-
-    /** Copy files or directories from 'from' to 'to'.  
-     * 
-     * Recursively descends if 'from' is a directory.  
-     * Does not create 'from' tail directory in 'to', e.g.:
-     * from = c:/foo/bar contains a,b,c
-     * to = c:/temp
-     * 
-     * -->
-     * 
-     * c:/temp/a
-     * c:/temp/b
-     * c:/temp/c
-     * 
-     * @param from
-     * @param to
-     * @param filter the filename filter, or null
-     */
-    public static void copyTreeNoParent(File from, File to, FileFilter filter) throws IOException {
-        File[] files;
-        
-        Check.checkArg(from.isDirectory());
-        
-        files = from.listFiles(filter);
-        to.mkdirs();
-        
-        for (int i = 0; i < files.length; i++) {
-            if (files[i].isDirectory()) {
-                //File curto = new File(to, files[i].getName());
-                //curto.mkdirs();
-                copyTree(files[i], to, filter);
-            }
-            else {
-                File curto = new File(to, files[i].getName());
-                copyFile(files[i], curto);
-            }
-        }
-        
-    }
-    
-    /**
-     * Copy from an input stream to a file
-     * 
-     * @param in
-     * @param to
-     * @throws IOException
-     */
-    public static void copyFile(InputStream in, File to) throws IOException {
-        FileOutputStream out = new FileOutputStream(to);
-        int len;
-        byte[] buffer = new byte[4096];
-        while ((len = in.read(buffer)) != -1) {
-            out.write(buffer, 0, len);
-        }
-        out.close();
-        in.close();
-    }
-
-    /** Copy a single file from 'from' to 'to'
-     * 
-     * @param from
-     * @param to
-     * @throws IOException
-     */
-    public static void copyFile(File from, File to) throws IOException {
-        FileInputStream in = new FileInputStream(from);
-        copyFile(in, to);
-    }
-
-    /** Delete a directory tree recursively.
-     * <p> 
-     * Does not delete file.
-     * @param file start point for deletion -- not itself deleted
-     */
-    public static void delTree(File file) {
-        File[] files = file.listFiles();
-        if (files != null) { 
-            for (int i = 0; i < files.length; i++) {
-                if (files[i].isDirectory()) {
-                    delTree(files[i]);
-                }
-            }
-        }
-        files = file.listFiles();
-        if (files != null) {
-            for (int i = 0; i < files.length; i++) {
-                files[i].delete();
-            }
-        }
-    }
-
-	public static File pluginRelativeFile(Plugin plugin, String file) throws IOException {
-        Check.checkArg(plugin);
-        Bundle bundle = plugin.getBundle();
-        if (bundle == null)
-            return null;
-        URL url = FileLocator.find(bundle, new Path("."), null); //$NON-NLS-1$
-        if (url == null)
-            return null;
-        url = FileLocator.resolve(url);
-        return new File(url.getPath(), file);
-    }
-
-    /** 
-     * Convert the path to a path relative to the base, if possible.
-     * @param rootPath full path to base
-     * @param cpath full path to resource
-     * @return new path (base-relative) or null if not resolvable to base
-     */
-    static public IPath removePrefixFromPath(IPath rootPath, IPath cpath) {
-        if (matchingFirstSegments(rootPath, cpath) == rootPath.segmentCount()) {
-        	IPath suffix = cpath.removeFirstSegments(rootPath.segmentCount());
-        	return suffix.setDevice(null);
-        }
-        return null;
-    }
-
-    /** 
-     * Convert the path to a path in the workspace, if possible.
-     * Either the path comes in as a path pointing inside the
-     * workspace, or we can find a linked resource which aliases
-     * to the same location.
-     * @param cpath full filesystem path to resource
-     * @return new path (workspace-relative) or null if not resolvable to workspace
-     */
-    static public IPath convertToWorkspacePath(IPath cpath) {
-    	return convertToWorkspacePath(cpath, false);
-    }
-    
-    /** 
-     * Convert the path to a path in the workspace, if possible.
-     * Either the path comes in as a path pointing inside the
-     * workspace, or we can find a linked resource which aliases
-     * to the same location.
-     * @param cpath full filesystem path to resource
-     * @param makeCanonical if true, work from the canonical path if possible
-     * (recommended)
-     * @return new path (workspace-relative) or null if not resolvable to workspace
-     */
-    static public IPath convertToWorkspacePath(IPath cpath, boolean makeCanonical) {
-    	return convertToWorkspacePath(cpath, makeCanonical, true);
-    }
-    /** 
-     * Convert the path to a path in the workspace, if possible.
-     * Either the path comes in as a path pointing inside the
-     * workspace, or we can find a linked resource which aliases
-     * to the same location.
-     * @param cpath full filesystem path to resource
-     * @param makeCanonical if true, work from the canonical path if possible
-     * (recommended)
-     * @param resolveLinks if true, look for project paths which reference files outside
-     * the workspace via links (very slow)
-     * @return new path (workspace-relative) or null if not resolvable to workspace
-     */
-    static public IPath convertToWorkspacePath(IPath cpath, boolean makeCanonical, boolean resolveLinks) {
-        if (!Platform.isRunning() || cpath == null)
-            return null;
-        
-        if (makeCanonical) {
-			try {
-				// Since we have a filesystem path, try using the filesystem
-				// and Java's smarter APIs to fix the caps early. 
-				// Watch out for the device being set incorrectly, though.
-				String device = cpath.getDevice();
-				cpath = new Path(cpath.toFile().getCanonicalPath()).setDevice(device);
-			} catch (IOException e) {
-				// Something's wrong with the path; just use it as-is
-			}
-        }
-        
-        IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); 
-        IFile file = root.getFileForLocation(cpath);
-        if (file != null) {
-        	return file.getFullPath().setDevice(null);
-        }
-        
-        if (resolveLinks) {
-	        // try to see if a linked resource points to this
-	        IFile[] files = root.findFilesForLocation(cpath);
-	        IPath newPath = null;
-	        if (files.length > 0)
-	            newPath = files[0].getFullPath().setDevice(null);
-	        else {
-	            IContainer[] folders = root.findContainersForLocation(cpath);
-	            if (folders.length > 0)
-	                newPath = folders[0].getFullPath().setDevice(null);
-	        }
-	        return newPath;
-        }
-        
-        return null;
-    }
-
-    /** 
-     * Convert the full path to a full path inside the workspace, if possible.
-     * (E.g. change a linked resource to the real full path.)
-     * <p>
-     * Either the path comes in as a path pointing inside the
-     * workspace, or we can find a linked resource which aliases
-     * to the same location.
-     * @param cpath full filesystem path
-     * @return same cpath, new path, or null if not resolvable to workspace
-     */
-    static public IPath convertToWorkspaceLocation(IPath cpath) {
-        if (!Platform.isRunning())
-            return null;
-        
-        IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); 
-        IPath rootPath = root.getLocation();
-        IPath newPath = convertToWorkspacePath(cpath);
-        if (newPath == null)
-            return null;
-        
-        // convert to full path
-        return rootPath.append(newPath);
-    }
-
-    /** 
-     * Variant of routine that works with case-insensitive matching.
-     * @see IPath#matchingFirstSegments(IPath) 
-     */
-    public static int matchingFirstSegments(IPath my, IPath anotherPath) {
-    	if (my == null || anotherPath == null)
-    		return 0;
-        int anotherPathLen = anotherPath.segmentCount();
-        int max = Math.min(my.segmentCount(), anotherPathLen);
-        int count = 0;
-        for (int i = 0; i < max; i++) {
-            if (!my.segment(i).equalsIgnoreCase(anotherPath.segment(i))) {
-                return count;
-            }
-            count++;
-        }
-        return count;
-    }
-
-    /**
-     * Map the given file to a path in the current workspace.
-     * @param file
-     * @return the IFile for the file
-     * @deprecated this function is broken since it doesn't resolve linked resources.
-     */
-    public static IFile convertFileToIFile(IContainer container, File file) {
-        IPath path = new Path(file.getAbsolutePath());
-        IPath rootPath = container.getLocation();
-        
-        // this is BUGGY!  Case sensitive for some dumb reason
-        //int match = path.matchingFirstSegments(rootPath);
-        int match = matchingFirstSegments(path, rootPath);
-        Check.checkState(match >= rootPath.segmentCount()); 
-            
-        path = path.removeFirstSegments(match);
-        IFile wsFile = container.getFile(path);
-        return wsFile;
-    }
-    
-    /**
-     * Map the given file to a path in the current workspace.
-     * @param file
-     * @return the IFile for the file, or null if the file is not in the workspace
-     */
-    public static IFile convertFileToIFile(File file) {
-       IPath path = new Path(file.getAbsolutePath());
-        
-        IPath wsPath = convertToWorkspacePath(path, true);
-        if (wsPath != null)
-        	return ResourcesPlugin.getWorkspace().getRoot().getFile(wsPath);
-        
-        return null;
-        
-        /*
-        IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
-		IPath rootPath = root.getRawLocation();
-        
-        // this is BUGGY!  Case sensitive for some dumb reason
-        //int match = path.matchingFirstSegments(rootPath);
-        int match = matchingFirstSegments(path, rootPath);
-        if (match < rootPath.segmentCount())
-        	return null;
-            
-        path = path.removeFirstSegments(match);
-        IFile wsFile = root.getFile(path);
-        
-        return wsFile;
-        */
-    }
-    
-    /**
-     * Map the given file to a resource in the current workspace.  This only handles
-     * files that map to known workspace resources.
-     * @param file
-     * @return the IResource for the file, or null if the file is not in the workspace or doesn't
-     * exist.
-     */
-    public static IResource convertFileToExistingResource(File file) {
-       IPath path = new Path(file.getAbsolutePath());
-        
-       IPath wsPath = convertToWorkspacePath(path, true);
-       if (wsPath != null)
-    	   return ResourcesPlugin.getWorkspace().getRoot().findMember(wsPath);
-        
-       return null;
-    }
-    
-    /**
-     * Return the project for the given workspace-relative path.
-     */
-    public static IProject projectForPath(IPath path) {
-    	IProject result = null;
-    	if (path != null) {
-    		IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
-    		result = root.getProject(path.segment(0));
-    	}
-    	return result;
-    }
-
-	/**
-	 * Read contents of a file into an array
-	 * @param file
-	 * @param encoding (null = system default)
-	 * @return array of text
-	 * @throws CoreException wrapping java.io.FileException
-	 */
-	public static char[] readFileContents(File file, String encoding) throws CoreException {
-		Check.checkArg(file);
-		FileInputStream fis;
-        try {
-        	fis = new FileInputStream(file);
-        	return readInputStreamContents(fis, encoding);
-        } catch (IOException e) {
-            throw new CoreException(Logging.newStatus(UtilsPlugin.getDefault(), e));
-        }
-	}
-
-	/**
-	 * Read contents of a file into an array
-	 * @param is input stream
-	 * @param encoding (null is system default)
-	 * @return array of text
-	 * @throws CoreException wrapping java.io.FileException
-	 */
-	public static char[] readInputStreamContents(InputStream is, String encoding) throws CoreException {
-		Check.checkArg(is);
-
-		Reader reader;
-		try {
-	    	if (encoding != null)
-	    		reader = new InputStreamReader(is, encoding);
-	    	else
-	    		reader = new InputStreamReader(is);
-	
-	        return readReaderContents(reader);
-		} catch (UnsupportedEncodingException e) {
-            throw new CoreException(Logging.newStatus(UtilsPlugin.getDefault(), e));
-        }
-	}
-	
-	/**
-	 * Read contents of a file into an array
-	 * @param file
-	 * @param encoding (null = system default)
-	 * @return array of text
-	 * @throws CoreException wrapping java.io.FileException
-	 */
-	public static char[] readReaderContents(Reader reader) throws CoreException {
-		Check.checkArg(reader);
-        try {
-            char[] buf = new char[1024];
-            StringBuffer sb = new StringBuffer();
-            int len;
-            while ((len = reader.read(buf)) > 0) {
-                sb.append(buf, 0, len);
-            }
-            reader.close();
-            return sb.toString().toCharArray();
-        } catch (UnsupportedEncodingException e) {
-            throw new CoreException(Logging.newStatus(UtilsPlugin.getDefault(), e));
-        } catch (IOException e) {
-            throw new CoreException(Logging.newStatus(UtilsPlugin.getDefault(), e));
-        }
-	}
-
-	/**
-	 * Write contents of a file from an array
-	 * @param file
-	 * @param encoding (null = system default)
-	 * @throws CoreException wrapping java.io.FileException
-	 */
-	public static void writeFileContents(File file, char[] text, String encoding) throws CoreException {
-		Check.checkArg(file);
-		FileOutputStream fos;
-        try {
-        	fos = new FileOutputStream(file);
-        	writeOutputStreamContents(fos, text, encoding);
-        } catch (IOException e) {
-            throw new CoreException(Logging.newStatus(UtilsPlugin.getDefault(), e));
-        }
-	}
-
-	/**
-	 * Write contents on array to an output stream
-	 * @param os output stream
-	 * @param encoding (null is system default)
-	 * @return array of text
-	 * @throws CoreException wrapping java.io.FileException
-	 */
-	public static void writeOutputStreamContents(OutputStream os, char[] text, String encoding) throws CoreException {
-		Check.checkArg(os);
-
-		Writer writer;
-		try {
-	    	if (encoding != null)
-	    		writer = new OutputStreamWriter(os, encoding);
-	    	else
-	    		writer = new OutputStreamWriter(os);
-	
-	        writeWriterContents(writer, text);
-		} catch (UnsupportedEncodingException e) {
-            throw new CoreException(Logging.newStatus(UtilsPlugin.getDefault(), e));
-        }
-	}
-
-	/**
-	 * Write contents of an array to a file
-	 * @param file
-	 * @param encoding (null = system default)
-	 * @throws CoreException wrapping java.io.FileException
-	 */
-	public static void writeWriterContents(Writer writer, char[] text) throws CoreException {
-		Check.checkArg(writer);
-        try {
-        	try {
-        		writer.write(text, 0, text.length);
-        	} finally {
-        		writer.close();
-        	}
-        } catch (UnsupportedEncodingException e) {
-            throw new CoreException(Logging.newStatus(UtilsPlugin.getDefault(), e));
-        } catch (IOException e) {
-            throw new CoreException(Logging.newStatus(UtilsPlugin.getDefault(), e));
-        }
-	}
-
-
-	/**
-	 * Returns whether pathSegment is a valid part of a path in a Carbide project.
-	 * This checks for file name validity and 
-	 * name only contains alpha-numeric -or- hyphen -or- underscrore -or- dot characters
-	 * 
-	 * @param pathSegment the segment (file or folder name)
-	 * @return true if valid
-	 */
-	public static boolean isValidCarbideProjectPathSegment(String pathSegment) {
-		IWorkspace workspace = ResourcesPlugin.getWorkspace();
-		int typeMask = IResource.FILE | IResource.FOLDER;
-		boolean valid = pathSegment.length() == 0 || 
-			workspace.validateName(pathSegment, typeMask).isOK();
-		if (valid) {
-			for (int i = 0; i < pathSegment.length(); i++) {
-				char c = pathSegment.charAt(i);
-				valid = Character.isLetterOrDigit(c) || (c == '-') || (c == '_');
-				if (!valid)
-					break;
-			}
-		}
-		
-		return valid;
-	}
-	
-	/**
-	 * Resolve a workspace-relative path to correct any problems in
-	 * capitalization.
-	 * @param projectName
-	 * @param wsPath workspace-relative path
-	 * @return resolved path, as far as actual resources exist (the suffix
-	 * may be unchanged if an intervening folder is missing) 
-	 */
-	public static IPath getCanonicalWorkspacePath(IPath wsPath) {
-		IPath resolvedPath = new Path(""); //$NON-NLS-1$
-		IContainer container = ResourcesPlugin.getWorkspace().getRoot();
-		// flag to consume the rest of the path without lookup
-		boolean failed = false;
-		for (String segment : wsPath.segments()) {
-			if (failed || container == null) {
-				resolvedPath = resolvedPath.append(segment);
-				continue;
-			}
-			
-			IResource child = container.findMember(segment);
-			if (child != null) {
-				// found, so correct caps
-				resolvedPath = resolvedPath.append(segment);
-				if (child instanceof IContainer) {
-					container = (IContainer) child;
-				} else {
-					container = null;
-				}
-			} else {
-				// not found: manually search
-				boolean found = false;
-				try {
-					for (IResource member : container.members()) {
-						if (member.getName().equalsIgnoreCase(segment)) {
-							resolvedPath = resolvedPath.append(member.getName());
-							found = true;
-							if (member instanceof IContainer) {
-								container = (IContainer) member;
-							} else {
-								container = null;
-							}
-							break;
-						}
-					}
-				} catch (CoreException e) {
-					// just fail
-				}
-				if (!found) {
-					failed = true;
-					resolvedPath = resolvedPath.append(segment);
-				}
-			}
-		}
-		return resolvedPath;
-	}
-	
-	/**
-	 * This is an analogue to new Path(String) but avoids some bugs in
-	 * the implementation when pathString is a relative path.
-	 * @param pathString
-	 * @return new Path
-	 */
-	public static IPath createPossiblyRelativePath(String pathString) {
-		// canonicalize slashes
-		char[] pathChars = pathString.toCharArray();
-		int offset = 0;
-		for (int i = 0; i < pathChars.length; i++) {
-			if (pathChars[i] == '\\')
-				pathChars[i] = '/';
-		}
-		
-		// The bug is, if "./" appears, then "../"'s after it are dropped,
-		// so get rid of "./" early.  The result will still be relative.
-		while (offset + 2 <= pathChars.length) { 
-			if (pathChars[offset] == '.' && pathChars[offset+1] == '/') {
-				offset += 2;
-			} else {
-				break;
-			}
-		}
-		
-		return new Path(new String(pathChars, offset, pathChars.length - offset));
-	}
-
-	/**
-	 * Tell if the given path refers to a parent directory (e.g.
-	 * contains ".." entries)
-	 * @param path
-	 * @return true if resolved path contains ".."
-	 */
-	public static boolean isPathInParent(IPath path) {
-		// first see if any segments are ".." at all
-		for (int i = 0; i < path.segmentCount(); i++) {
-			if (path.segment(i).equals("..")) { //$NON-NLS-1$
-				// comprehensive check, canonicalizing
-				path = new Path(path.toString());
-				if (path.segmentCount() > 0 && path.segment(0).equals("..")) { //$NON-NLS-1$
-					return true;
-				} else {
-					return false;
-				}
-			}
-		}
-		return false;
-	}
-
-	/**
-	 * Recurse the directory, returning files that match the given filter.
-	 * The directories "." and ".." are filtered out before the filter sees them.
-	 * The filter is passed files and directories, and a directory must
-	 * pass the filter to be recursed.
-	 * @param dir
-	 * @param filter
-	 * @param recordDirectories if true, accepted directories are added to the returned list;
-	 * otherwise, directories are not added to the file list.
-	 * @return array of matching files , never null
-	 */
-	public static File[] listFilesInTree(File dir, FileFilter filter, boolean recordDirectories) {
-		List<File> files = new ArrayList<File>();
-		listFilesInTreeHelper(files, dir, filter, recordDirectories);
-		return (File[]) files.toArray(new File[files.size()]);
-	}
-
-	private static void listFilesInTreeHelper(List<File> files, File dir, FileFilter filter, boolean recordDirectories) {
-		if (recordDirectories)
-			files.add(dir);
-		
-		File[] allEntries = dir.listFiles();
-		if (allEntries == null)
-			return;
-		
-		for (File fileOrDir : allEntries) {
-			if (fileOrDir.getName().equals(".") || fileOrDir.getName().equals("..")) { //$NON-NLS-1$ //$NON-NLS-2$
-				// ignore
-			} else if (fileOrDir.isDirectory()) {
-				if (filter.accept(fileOrDir)) {
-					listFilesInTreeHelper(files, fileOrDir, filter, recordDirectories);
-				}
-			} else if (filter.accept(fileOrDir)) {
-				files.add(fileOrDir);
-			}
-		}
-	}
-	
-	public static URL getParentPathURL(URL url) throws CoreException {
-		URL result;
-		try {
-			String string = url.toString();
-			int loc = string.lastIndexOf('/');
-			result = new URL(string.substring(0, loc + 1));
-		} catch (Exception e) {
-            throw new CoreException(Logging.newStatus(UtilsPlugin.getDefault(), e));
-		}
-		
-		return result;
-	}
-	
-	/**
-	 * Wrapper around {@link FileUtils#validateEdit(IFile[], Shell)} 
-	 * taking a single file. If a modified files multistatus is generated
-	 * the single entry for the single file is retrieved and returned.
-	 */
-	public static IStatus validateEdit(IFile file, Shell context) {
-		IStatus status = validateEdit(new IFile[] {file}, context);
-		if (!status.isOK()) {
-			if (status.isMultiStatus()) {
-				IStatus[] children = status.getChildren();
-				if (children != null && children.length == 1 &&
-					children[0].getSeverity() == IStatus.WARNING &&
-					children[0].getCode() == MODIFIED_FILES_STATUS) {
-					status = children[0];
-				}
-			}
-		}
-		return status;
-	}
-	
-	/**
-	 * Wrapper around {@link IWorkspace#validateEdit(IFile[], Object)}
-	 * Checks if any of the files have been modified by the validate
-	 * operations. If so a MultiStatus is returned with WARNING severity. 
-	 * The code for the multistatus and each child is MODIFIED_FILES_STATUS
-	 * and for each child the message fields is the full workspace
-	 * path to the modified file.
-	 * @param files
-	 * @param context a Shell if UI interaction is allowed
-	 * @return OK status, non-OK status from validateEdit, or a
-	 * MultiStatus with one child for each modified file.
-	 */
-	public static IStatus validateEdit(IFile[] files, Shell context) {
-		List<IFile> readOnly = new ArrayList<IFile>();
-		Map<IFile, Long> timeStamps = new HashMap<IFile, Long>();
-		for (IFile file : files) {
-			if (file.isReadOnly()) {
-				readOnly.add(file);
-				timeStamps.put(file, file.getModificationStamp());
-			}
-		}
-	
-		if (readOnly.isEmpty()) {
-			return Status.OK_STATUS;
-		}
-			
-		IStatus status = ResourcesPlugin.getWorkspace().validateEdit(
-				readOnly.toArray(new IFile[readOnly.size()]), context);
-		if (!status.isOK())
-			return status;
-			
-		List<IFile> modified = new ArrayList<IFile>();
-		for (Map.Entry<IFile, Long> entry : timeStamps.entrySet()) {
-			Long newTimeStamp = entry.getKey().getModificationStamp();
-			if (!newTimeStamp.equals(entry.getValue())) {
-				modified.add(entry.getKey());
-			}
-		}
-		
-		if (modified.size() > 0) {
-			String pluginID = UtilsPlugin.getDefault().getBundle().getSymbolicName();
-			MultiStatus ms = new MultiStatus(pluginID, MODIFIED_FILES_STATUS, "modified files", null);
-			for (IFile file : modified) {
-				String path = file.getFullPath().toString();
-				ms.add(new Status(IStatus.WARNING, pluginID, MODIFIED_FILES_STATUS, path, null));
-			}
-			status = ms;
-		}
-		
-		return status;
-	}
-	
-	/**
-	 * Get the directory used for temporary files.
-	 * @return absolute directory for temporary files, which may be the current directory
-	 */
-	public static File getTemporaryDirectory() {
-		File dir = new File(System.getProperty("java.io.tmpdir", //$NON-NLS-1$
-				System.getProperty("user.dir", "."))); //$NON-NLS-1$ //$NON-NLS-2$
-		try {
-			return dir.getCanonicalFile();
-		} catch (IOException e) {
-			return dir;
-		}
-	}
-	
-	/**
-	 * Get the path in a form amenable to comparing with another path.
-	 * On Win32 hosts, this lowercases the path.  On other hosts, the path is unmodified.
-	 * @param path incoming path or <code>null</code>
-	 * @return path converted to comparison-friendly format, or <code>null</code>
-	 */
-	public static IPath getComparablePath(IPath path) {
-		if (path == null)
-			return null;
-		
-		if (Platform.getOS().equals(Platform.OS_WIN32)) {
-			return new Path(path.toOSString().toLowerCase());
-		}
-		
-		return path;
-	}
-
-	/**
-	 * Get the file extension from path, guaranteed not to return null
-	 * @param path IPath
-	 * @return String non-null
-	 */
-	public static String getSafeFileExtension(IPath path) {
-		String fileExtension = ""; //$NON-NLS-1$
-		if (path != null) {
-			String temp = path.getFileExtension();
-			if (temp != null)
-				fileExtension = temp;
-		}
-		
-		return fileExtension;
-	}
-	
-	/**
-	 * Uses java.io semantics to test existence, because eclipse resources are always case-sensitive, 
-	 * regardless of the file system.
-	 * @param resource {@link IResource}
-	 * @return <code>boolean</code>
-	 */
-	public static boolean exists(IResource resource) {
-		return resource.getLocation().toFile().exists();
-	}
-}
--- a/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/utils/IDisposable.java	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/**
- * Copyright (c) 2009 Symbian Foundation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Symbian Foundation - initial contribution.
- * Contributors:
- * Description:
- * Overview:
- * Details:
- * Platforms/Drives/Compatibility:
- * Assumptions/Requirement/Pre-requisites:
- * Failures and causes:
- */
-package org.symbian.tools.wrttools.previewer.utils;
-
-	/**
-	 * Generic interface for disposable objects
-	 *
-	 */
-public interface IDisposable {
-
-	/**
-	 * Disposes of any resources held by the object.
-	 * The object should not be used after dispose has been called.
-	 */
-	void dispose();
-}
--- a/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/utils/ITimedTask.java	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/**
- * Copyright (c) 2009 Symbian Foundation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Symbian Foundation - initial contribution.
- * Contributors:
- * Description:
- * Overview:
- * Details:
- * Platforms/Drives/Compatibility:
- * Assumptions/Requirement/Pre-requisites:
- * Failures and causes:
- */
-package org.symbian.tools.wrttools.previewer.utils;
-
-/**
- * Interface for use with Logging.timeTask()
- * @author eswartz
- *
- */
-public interface ITimedTask {
-    /** Get label for logging task */
-    public String getLabel();
-    
-    /** Run the task */
-    public void run();
-    
-}
--- a/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/utils/ListenerList.java	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-/**
- * Copyright (c) 2009 Symbian Foundation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Symbian Foundation - initial contribution.
- * Contributors:
- * Description:
- * Overview:
- * Details:
- * Platforms/Drives/Compatibility:
- * Assumptions/Requirement/Pre-requisites:
- * Failures and causes:
- */
-package org.symbian.tools.wrttools.previewer.utils;
-
-import java.util.*;
-
-/**
- * Utility class for listeners. Implemented with the assumption that
- * iteration is much more common than adding or removing listeners.
- *
- * @param <E> a listener interface
- */
-public class ListenerList<E>  implements Iterable<E> {
-
-	private ArrayList<E> listeners;
-	
-	public void add(E listener) {
-		if (listeners == null || !listeners.contains(listener)) {
-			ArrayList<E> newList = new ArrayList();
-			if (listeners != null)
-				newList.addAll(listeners);
-			newList.add(listener);
-			listeners = newList;
-		}
-	}
-	
-	public void remove(E listener) {
-		if (listeners == null)
-			return;
-		ArrayList<E> newList = new ArrayList(listeners);
-		newList.remove(listener);
-		listeners = newList;
-	}
-
-	public Iterator<E> iterator() {
-		Iterator<E> result;
-		if (listeners != null) {
-			result = listeners.iterator();
-		}
-		else {
-			// would be nice if this could be a static, but it can't
-			result = new EmptyIterator<E>();
-		}
-		return result;
-	}
-	
-	public int size() {
-		return listeners != null? listeners.size() : 0;
-	}
-	
-	static class EmptyIterator<E> implements Iterator<E> {
-
-		public boolean hasNext() {
-			return false;
-		}
-
-		public E next() {
-			throw new NoSuchElementException();
-		}
-
-		public void remove() {
-			throw new IllegalStateException();
-		}
-	}
-}
--- a/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/utils/Logging.java	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,456 +0,0 @@
-/**
- * Copyright (c) 2009 Symbian Foundation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Symbian Foundation - initial contribution.
- * Contributors:
- * Description:
- * Overview:
- * Details:
- * Platforms/Drives/Compatibility:
- * Assumptions/Requirement/Pre-requisites:
- * Failures and causes:
- */
-package org.symbian.tools.wrttools.previewer.utils;
-
-import org.symbian.tools.wrttools.previewer.utils.noexport.Messages;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.osgi.framework.Bundle;
-
-import java.io.PrintStream;
-import java.util.*;
-
-/**
- * Utilities for plugins.
- * 
- * All of these take a Plugin parameter, which usually requires a call in the
- * form:
- * <p>
- * <code>
- * Logging.<i>method</i>(MyPlugin.getDefault(), ...);
- * </code>
- * </p>
- * 
- * If this becomes unwieldly, implement a wrapper method in your plugin class to
- * access these methods natively:
- * <p>
- * 
- * <pre>
- * 
- *  class MyPlugin extends Plugin {
- *  ...
- *    void &lt;i&gt;method&lt;/i&gt;(...) {
- *       Logging.&lt;i&gt;method&lt;/i&gt;(getDefault(), ...);
- *    }
- *  ...
- *  }
- *  
- * </pre>
- * 
- * </p>
- * <p>
- * Then call as:
- * 
- * <pre>
- * 
- *  MyPlugin.&lt;i&gt;method&lt;/i&gt;(...); 
- *  
- * </pre>
- * 
- * </p>
- * 
- * @author eswartz
- * 
- */
-public class Logging {
-
-    /** Tell whether Logging.timeStart() / Logging.timeEnd() / Logging.timeTask() show results
-     *  Can't be final because it's modified from unit tests. */
-    static public boolean SHOW_TIMINGS = false;
-    
-    /** List of ILogListener */
-    static private List listeners = new ArrayList(0);
-    
-    /** Target for log messages when platform is not running
-        This can't be final, it's set from tests */
-    static public PrintStream consoleLog = System.err;
-    /** Always dump log messages to console?  If false, only log when platform not running.
-     * Can't be final because it's modified from unit tests. */
-    static public boolean alwaysLogToConsole = false;
-    
-    static public void addListener(ILogListener listener) {
-        listeners.add(listener);
-    }
-    
-    static public void removeListener(ILogListener listener) {
-        listeners.remove(listener);
-    }
-    
-    /**
-     * Create an IStatus instance eminating from the given plugin
-     * which includes detailed info about the plugin vendor, version, etc.
-     * Every IStatus generated by this class includes this information.
-     * 
-     * Adapted from Java Developer's Guide to Eclipse, Ch. 28
-     * 
-     * @param plugin
-     *            the offending plugin
-     * @param severity
-     *            the severity (IStatus.ERROR, IStatus.WARNING, IStatus.INFO)
-     * @param message
-     *            the localized error string, or null to use
-     *            thr.getLocalizedMessage()
-     * @param thr
-     *            the throwable, or null
-     * @return new IStatus object
-     */
-    static public IStatus newStatus(Plugin plugin, int severity,
-            String message, Throwable thr) {
-        if (message == null) {
-			if (thr != null) {
-				message = thr.getLocalizedMessage();
-			}
-			if (message == null) {
-				message = thr.getClass().getName();
-			}
-        }
-            
-        MultiStatus vitalInfoStatus;
-        
-        if (plugin == null || plugin.getBundle() == null) {
-            return new Status(severity, "???", 0,
-                    message, thr);
-        }
-        
-        Bundle bundle = plugin.getBundle();
-        String symbolicName = bundle.getSymbolicName();
-        String bundleName = "" + bundle.getHeaders().get("Bundle-Name"); //$NON-NLS-1$
-        String bundleVendor = "" + bundle.getHeaders().get("Bundle-Vendor"); //$NON-NLS-1$
-        String bundleVersion = "" + bundle.getHeaders().get("Bundle-Version"); //$NON-NLS-1$
-
-        vitalInfoStatus = new MultiStatus(symbolicName, severity,
-                message, thr);
-
-        // Put new info in separate status containers to force newlines in
-        // dialog
-        vitalInfoStatus.add(new Status(severity, symbolicName, 0, 
-                "Plug-in Vendor: " + bundleVendor, null)); //$NON-NLS-1$
-        vitalInfoStatus.add(new Status(severity, symbolicName, 0,
-                "Plug-in Name: " + bundleName, null)); //$NON-NLS-1$
-        vitalInfoStatus.add(new Status(severity, symbolicName, 0,
-                "Plug-in ID: "  + symbolicName, null)); //$NON-NLS-1$
-        vitalInfoStatus.add(new Status(severity, symbolicName, 0,
-                "Plug-in Version: " + bundleVersion, null)); //$NON-NLS-1$
-
-        return vitalInfoStatus;
-    }
-
-    /**
-     * Create an IStatus instance eminating from the given plugin.
-     * 
-     * @param plugin
-     *            the offending plugin
-     * @param severity
-     *            the severity (IStatus.ERROR,WARNING,INFO)
-     * @param message
-     *            the localized error string
-     * @return new IStatus object
-     */
-    static public IStatus newStatus(Plugin plugin, int severity, String message) {
-        if (message == null)
-            message = ""; //$NON-NLS-1$
-
-        return newStatus(plugin, severity, message, null);
-    }
-
-    
-    /**
-     * Create an IStatus instance wrapping an unwanted exception eminating from
-     * the given plugin.
-     * 
-     * @param plugin
-     *            the offending plugin
-     * @param thr
-     *            the throwable, or null
-     * @return new IStatus object
-     */
-    static public IStatus newStatus(Plugin plugin, Throwable thr) {
-        return newStatus(plugin, IStatus.ERROR, thr.getLocalizedMessage(), thr);
-    }
-
-    /**
-     * Create an IStatus instance without plugin context information
-     * (e.g. for logging) 
-     * 
-     * @param plugin
-     *            the plugin
-     * @param severity
-     *            the severity (IStatus.ERROR,WARNING,INFO)
-     * @param message
-     *            the localized error string
-     * @param thr
-     *            the throwable, or null
-     * 
-     * @return new IStatus object
-     */
-    static public IStatus newSimpleStatus(Plugin plugin, int severity, String message, Throwable thr) {
-        return new Status(severity, plugin.getBundle().getSymbolicName(), 
-                0, message, thr);
-    }
-
-    /**
-     * Create an IStatus instance occurring presumably a number of steps up the
-     * call chain (e.g. library code, for which the current plugin is not
-     * known). We report the class name from the stack trace stored in the
-     * exception.  (Eclipse doesn't have a mechanism for looking up the plugin
-     * from a class (multiple plugins can have the same class).)
-     * 
-     * @param depth
-     *            stack depth relative to thr(0 = caller that created thr, 1 =
-     *            caller's caller...)
-     * @param severity
-     *            the severity (IStatus.ERROR,WARNING,INFO)
-     * @param message
-     *            the localized error string
-     * @param thr
-     *            the throwable (if null, assume depth refers to caller)
-     * 
-     * @return new IStatus object
-     */
-    static public IStatus newSimpleStatus(int depth, int severity, String message, Throwable thr) {
-        StackTraceElement els[];
-        if (thr != null)
-            els = thr.getStackTrace();
-        else {
-            els = new Exception().getStackTrace();
-            depth++;
-        }
-        
-        if (depth >= els.length)
-            depth = els.length - 1;
-
-        String klass = els[depth].getClassName();
-        return new Status(severity, klass, 0, message, thr);
-    }
-
-    /**
-     * Create an IStatus instance occurring presumably a number of steps up the
-     * call chain (e.g. library code, for which the current plugin is not
-     * known). We report the class name from the stack trace stored in the
-     * exception.  (Eclipse doesn't have a mechanism for looking up the plugin
-     * from a class (multiple plugins can have the same class).)
-     * 
-     * @param depth
-     *            stack depth relative to thr(0 = caller that created thr, 1 =
-     *            caller's caller...)
-     * @param thr
-     *            the throwable, or null
-     * 
-     * @return new IStatus object
-     */
-    static public IStatus newSimpleStatus(int depth, Throwable thr) {
-        return newSimpleStatus(depth, IStatus.ERROR, thr.getLocalizedMessage(), thr);
-    }
-
-    /**
-     * Tell if plugin configured for debugging and a debug option is enabled
-     * 
-     * @param plugin
-     *            the offending plugin
-     * @param option
-     *            The debug option to test. The plugin's symbolic name is
-     *            prepended to the option name, e.g.
-     *            "com.nokia.myplugin"+"/"+option
-     * @return true if debugging enabled and option enabled (e.g. defined and
-     *         set to "true")
-     */
-    static public boolean isDebugOptionEnabled(Plugin plugin, String option) {
-        if (plugin == null || !plugin.isDebugging())
-            return false;
-        String filter = Platform.getDebugOption(plugin.getBundle()
-                .getSymbolicName()
-                + "/" + option); //$NON-NLS-1$
-        return (filter != null && "true".equalsIgnoreCase(filter)); //$NON-NLS-1$
-    }
-
-    /**
-     * Send a message to the Error Log or stdout if plugin
-     * not defined or not loaded.
-     * 
-     * @param plugin
-     *            the calling plugin
-     * @param status
-     *            the status object
-     *            
-     */
-    static public void log(Plugin plugin, IStatus status) {
-
-        for (Iterator iter = listeners.iterator(); iter.hasNext();) {
-            ILogListener listener = (ILogListener) iter.next();
-            listener.logging(status, plugin != null ? plugin.getBundle().getSymbolicName() : null);
-        } 
-        
-        boolean logToConsole = alwaysLogToConsole;
-        if (plugin != null && plugin.getLog() != null) {
-            plugin.getLog().log(status);
-        } else {
-            logToConsole = true;
-        }
-        
-        if (consoleLog != null && logToConsole) {
-            consoleLog.println(status.getMessage());
-            if (status.getPlugin() != null)
-                consoleLog.println(Messages.getString("Logging.FromPlugin")+status.getPlugin()); //$NON-NLS-1$
-            if (status.getException() != null) {
-                consoleLog.println(Messages.getString("Logging.DueToException")); //$NON-NLS-1$
-                status.getException().printStackTrace();
-            }
-        }
-    }
-
-    /**
-     * Send a message to the Error Log or stdout 
-     * if a given debug option is enabled.
-     * 
-     * @param plugin
-     *            the calling plugin, or null
-     * @param option
-     *            the debug option to test. The plugin name is prepended to the
-     *            option name, e.g. "com.nokia.myplugin"+"/"+option
-     * @param status
-     *            the status object
-     * @see Logging#isDebugOptionEnabled(Plugin, String)
-     */
-    static public void logIf(Plugin plugin, String option, IStatus status) {
-        if (!isDebugOptionEnabled(plugin, option))
-            return;
-        log(plugin, status);
-    }
-
-    /**
-     * Utility to display an error dialog reporting an IStatus.
-     * 
-     * @param title
-     *          title of dialog (if null, use "Error")
-     * @param message
-     *            concise error message (if null, use status message or status'
-     *            wrapped exception message)
-     * @param status
-     *            the offending status
-     */
-    static public void showErrorDialog(String title, String message, final IStatus status) {
-    	showErrorDialog(null, title, message, status);
-    }
-    
-    /**
-     * Utility to display an error dialog reporting an IStatus.
-     * 
-     * @param shell the parent shell
-     * @param title
-     *          title of dialog (if null, use "Error")
-     * @param message
-     *            concise error message (if null, use status message or status'
-     *            wrapped exception message)
-     * @param status
-     *            the offending status
-     */
-    static public void showErrorDialog(final Shell shell, String title, String message, final IStatus status) {
-    	if (!Platform.isRunning())
-    		return;
-    	
-        if (title == null)
-            title = Messages.getString("Logging.ErrorTitle"); //$NON-NLS-1$
-        
-        if (message == null) {
-            // this leads to a lot of redundant text
-            /*if (status != null) {
-                message = status.getMessage();
-                if (message == null) {
-                    if (status.getException() != null) {
-                        message = status.getException().getLocalizedMessage();
-                        if (message == null)
-                            message = Messages.getString("Logging.NoMessage"); //$NON-NLS-1$
-                    }
-                }
-            }*/
-            message = Messages.getString("Logging.GenericErrorMessage"); //$NON-NLS-1$
-        }
-
-        final String title_ = title;
-        final String message_ = message;
-        
-        // yes, syncExec(): this is presumably an important error
-        // that shouldn't wait for cascading failures to complete
-        Display.getDefault().syncExec(new Runnable() {
-            public void run() {
-                ErrorDialog.openError(shell, title_, message_, status);
-            }
-        });
-    }
-    // stack of start times (n.b.: Stack is a Vector and is synchronized)
-    private static Stack<Long> timeStack = new Stack<Long>();
-    // stack of end times (n.b.: Stack is a Vector and is synchronized)
-    private static Stack<String> timeLabelStack = new Stack<String>();
-    
-    private static long lastTime;
-    
-    /**
-     * Start timing a task, reported to console if Logging#SHOW_TIMINGS is set.
-     * Up to 16 timed tasks can be nested at time.
-     * @param label
-     */
-    public synchronized static void timeStart(String label) {
-    	long currentTime = System.currentTimeMillis(); 
-        if (SHOW_TIMINGS) {
-        	if (currentTime > lastTime + 333 && lastTime != 0) {
-                IStatus status = newSimpleStatus(1, IStatus.INFO, "missing time: " + (currentTime - lastTime) + " ms", null); //$NON-NLS-1$
-                log(UtilsPlugin.getDefault(), status);
-        	}
-            IStatus status = newSimpleStatus(1, IStatus.INFO, label + " start...", null); //$NON-NLS-1$
-            log(UtilsPlugin.getDefault(), status);
-        }
-        timeLabelStack.push(label);
-        timeStack.push(currentTime);
-    	lastTime = currentTime;
-    }
-
-    /**
-     * Stop timing a task, reporting results to console if Logging#SHOW_TIMINGS is set
-     * @return time elapsed in ms
-     */
-    public synchronized static long timeEnd() {
-    	lastTime = System.currentTimeMillis();
-        long elapsed = lastTime - timeStack.pop();
-        String label = timeLabelStack.pop();
-        if (SHOW_TIMINGS) {
-            IStatus status = newSimpleStatus(1, IStatus.INFO, label + " end: " + elapsed + " ms", null); //$NON-NLS-1$ //$NON-NLS-2$
-            log(UtilsPlugin.getDefault(), status);
-        }
-        return elapsed;
-    }
-    
-    /**
-     * Time a task and report results if Logging#SHOW_TIMINGS is set.
-     * @param task
-     * @return elapsed time in milliseconds
-     */
-    public synchronized static long timeTask(ITimedTask task) {
-        timeStart(task.getLabel());
-        long elapsed = 0;
-        try {
-            task.run();
-        } finally {
-            elapsed = timeEnd();
-        }
-        return elapsed;
-    }
-}
--- a/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/utils/TrackedResource.java	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,261 +0,0 @@
-/**
- * Copyright (c) 2009 Symbian Foundation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Symbian Foundation - initial contribution.
- * Contributors:
- * Description:
- * Overview:
- * Details:
- * Platforms/Drives/Compatibility:
- * Assumptions/Requirement/Pre-requisites:
- * Failures and causes:
- */
-package org.symbian.tools.wrttools.previewer.utils;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-
-/**
- * Helper class to track changes to a resource handle. To the extent
- * that Eclipse provides the necessary notification, moves and
- * renames will be tracked and getResource() will return a
- * reference to the resource.
- * A listener interface is provided to give notifications of
- * moves, content changes, and deletions.
- * Upon deletion, since this object can no longer provide any
- * useful servce, the dispose method is automatically called
- * @author dpodwall
- *
- */
-public class TrackedResource implements IDisposable {
-	
-	private IResource resource;
-	private long modificationStamp;
-	private IPath resourcePath;
-	private Class resourceClass;
-	private ListenerList<IListener> listeners = new ListenerList<IListener>();
-	private ResourceHandler handler;
-	
-	public interface IListener {
-		void resourceChanged(TrackedResource resource);
-		/**
-		 * Called after a resource has been moved and the
-		 * TrackedResource has been updated.
-		 * @param oldPath the previous location of the resource
-		 */
-		void resourceMoved(TrackedResource resource, IPath oldPath);
-		void resourceDeleted(TrackedResource resource);
-	}
-		
-	/**
-	 * Initialize with the desired resource and being
-	 * listening for changes. Once initialized the initial
-	 * IResource shouldn't be kept, call getResource as
-	 * needed to get the valid resource handle.
-	 */
-	public TrackedResource(IResource resource) {
-		Check.checkArg(resource);
-		this.resource = resource;
-		this.resourceClass = resource.getClass();
-		this.resourcePath = resource.getFullPath();
-		Check.checkState(resourcePath != null);
-		enableTracking(true);
-	}
-
-	/**
-	 * Dispose must be called in order to unregister the workspace listener.
-	 * It is automatically called if the resource is deleted.
-	 */
-	public void dispose() {
-		if (handler != null) {
-			enableTracking(false);
-			resourcePath = null;
-		}
-	}
-	
-	/**
-	 * Set the tracking status to the desired status and return the
-	 * previous state.
-	 */
-	public synchronized boolean enableTracking(boolean enable) {
-		boolean wasEnabled = handler != null;
-		if (enable == wasEnabled) {
-			return wasEnabled;
-		}
-		
-		if (enable) {
-			if (handler == null) {
-				handler = new ResourceHandler();
-				ResourcesPlugin.getWorkspace().addResourceChangeListener(handler);
-				modificationStamp = resource.getModificationStamp();
-			}
-			
-		} else if (handler != null){
-			ResourcesPlugin.getWorkspace().removeResourceChangeListener(handler);
-			handler = null;
-		}
-		return wasEnabled;
-	}
-
-	/**
-	 * Get the current resource handle. It will differ from 
-	 * the constructor argument if the resource moved.
-	 * Can return null if the resource was deleted
-	 * 
-	 * If non-null, the value will be compatible with
-	 * the original resource. In other words if an IFile
-	 * was originally used, this will return an IFile (or subclass)
-	 * or null.
-	 */
-	public IResource getResource() {
-		return resource;
-	}
-	
-	/**
-	 * Returns the last seen modification stamp.
-	 */
-	public long getLastModificationStamp() {
-		return modificationStamp;
-	}
-	
-	/**
-	 * Force an update of the cached modification stamp to
-	 * the lastest value. This will inhibit notifications for
-	 * the same modification stamp value.
-	 */
-	public void updateModificationStamp() {
-		try {
-			resource.refreshLocal(0, null);
-		} catch (CoreException x) {
-			UtilsPlugin.log(x);
-		}
-		modificationStamp = resource.getModificationStamp();
-	}
-	
-	/**
-	 * Convenience routine to return as IFile
-	 */
-	public IFile getFile() {
-		IFile result = null;
-		if (resource instanceof IFile) {
-			result = (IFile) resource;
-		}
-		return result;
-	}
-	
-	/**
-	 * Convenience routine to return resource's project.
-	 * If the resource is a project it will return that resource,
-	 * otherwise the containing project.
-	 */
-	public IProject getProject() {
-		IProject result = null;
-		if (resource != null) {
-			result = resource.getProject();
-		}
-		return result;
-	}
-	
-	/**
-	 * Listener for change events on the tracked resource.
-	 * Note that these events may be delivered on
-	 * threads other than the UI thread.
-	 */
-	public void addListener(IListener listener) {
-		listeners.add(listener);
-	}
-	
-	public void removeListener(IListener listener) {
-		listeners.remove(listener);
-	}
-	
-	private void fireResourceChanged() {
-		for (IListener l : listeners) {
-			l.resourceChanged(this);
-		}
-	}
-	
-	private void fireResourceMoved(IPath oldPath) {
-		for (IListener l : listeners) {
-			l.resourceMoved(this, oldPath);
-		}
-	}
-	
-	private void fireResourceDeleted() {
-		for (IListener l : listeners) {
-			l.resourceDeleted(this);
-		}
-	}
-	
-	private void handleDeletion() {
-		fireResourceDeleted();
-		dispose();
-	}
-	
-	private void handleMove(IResourceDelta delta) {
-		IPath movedToPath = delta.getMovedToPath();
-		if (movedToPath != null) {
-			IResource newResource = ResourcesPlugin.getWorkspace().getRoot().findMember(movedToPath);
-			if (newResource != null) {
-				// the new resource should be compatible with the previous, e.g.
-				// if we started with an IFile the new one should be an IFile
-				Check.checkState(resourceClass.isInstance(newResource));
-				resource = newResource;
-				modificationStamp = resource.getModificationStamp();
-				IPath oldPath = resourcePath;
-				resourcePath = movedToPath;
-				fireResourceMoved(oldPath);
-			}
-		}
-	}
-	
-	private void resourceChanged(IResourceChangeEvent event) {
-		IResourceDelta delta = event.getDelta();
-		if (delta != null && resourcePath != null) {
-			delta = delta.findMember(resourcePath);
-			if (delta != null) {
-				int kind = delta.getKind();
-				switch (kind) {
-				case IResourceDelta.CHANGED:
-					if ((IResourceDelta.CONTENT & delta.getFlags()) != 0) {
-						long currStamp = delta.getResource().getModificationStamp();
-						if (currStamp != modificationStamp) {
-							modificationStamp = currStamp;
-							fireResourceChanged();
-						}
-					}
-					break;
-					
-				case IResourceDelta.REMOVED:
-					if ((IResourceDelta.MOVED_TO & delta.getFlags()) != 0) {
-						handleMove(delta);
-					}
-					else {
-						handleDeletion();
-					}
-					break;
-				}
-			}
-		}
-	}
-	
-	private class ResourceHandler implements IResourceChangeListener {
-
-		public void resourceChanged(IResourceChangeEvent event) {
-			TrackedResource.this.resourceChanged(event);			
-		}
-	}
-}
--- a/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/utils/UtilsPlugin.java	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-/**
- * Copyright (c) 2009 Symbian Foundation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Symbian Foundation - initial contribution.
- * Contributors:
- * Description:
- * Overview:
- * Details:
- * Platforms/Drives/Compatibility:
- * Assumptions/Requirement/Pre-requisites:
- * Failures and causes:
- */
-package org.symbian.tools.wrttools.previewer.utils;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class UtilsPlugin extends Plugin {
-	//The shared instance.
-	private static UtilsPlugin plugin;
-	//Resource bundle.
-	private ResourceBundle resourceBundle;
-	
-	/**
-	 * The constructor.
-	 */
-	public UtilsPlugin() {
-		super();
-		plugin = this;
-	}
-
-	/**
-	 * This method is called upon plug-in activation
-	 */
-	public void start(BundleContext context) throws Exception {
-		super.start(context);
-	}
-
-	/**
-	 * This method is called when the plug-in is stopped
-	 */
-	public void stop(BundleContext context) throws Exception {
-		super.stop(context);
-		plugin = null;
-		resourceBundle = null;
-	}
-
-	/**
-	 * Returns the shared instance.
-	 */
-	public static UtilsPlugin getDefault() {
-		return plugin;
-	}
-
-	/**
-	 * Returns the string from the plugin's resource bundle,
-	 * or 'key' if not found.
-	 */
-	public static String getResourceString(String key) {
-		ResourceBundle bundle = UtilsPlugin.getDefault().getResourceBundle();
-		try {
-			return (bundle != null) ? bundle.getString(key) : key;
-		} catch (MissingResourceException e) {
-			return key;
-		}
-	}
-
-	/**
-	 * Returns the plugin's resource bundle,
-	 */
-	public ResourceBundle getResourceBundle() {
-		try {
-			if (resourceBundle == null)
-				resourceBundle = ResourceBundle.getBundle("com.nokia.sdt.utils.UtilsPluginResources"); //$NON-NLS-1$
-		} catch (MissingResourceException x) {
-			resourceBundle = null;
-		}
-		return resourceBundle;
-	}
-
-	static public void log(IStatus status) {
-		Logging.log(plugin, status);
-	}
-	
-	static public void log(Throwable thr) {
-		Logging.log(plugin, Logging.newStatus(plugin, thr));
-	}
-	
-	static public void log(Throwable thr, String msg) {
-		Logging.log(plugin, Logging.newStatus(plugin, IStatus.ERROR, msg, thr));
-	}
-
-}
--- a/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/utils/noexport/Messages.java	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/**
- * Copyright (c) 2009 Symbian Foundation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Symbian Foundation - initial contribution.
- * Contributors:
- * Description:
- * Overview:
- * Details:
- * Platforms/Drives/Compatibility:
- * Assumptions/Requirement/Pre-requisites:
- * Failures and causes:
- */
-package org.symbian.tools.wrttools.previewer.utils.noexport;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * @author eswartz
- *
- */
-public class Messages {
-    private static final String BUNDLE_NAME = "com.nokia.sdt.utils.noexport.messages";//$NON-NLS-1$
-
-    private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
-            .getBundle(BUNDLE_NAME);
-
-    private Messages() {
-    }
-
-    public static String getString(String key) {
-        try {
-            return RESOURCE_BUNDLE.getString(key);
-        } catch (MissingResourceException e) {
-            return '!' + key + '!';
-        }
-    }
-}
--- a/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/utils/noexport/messages.properties	Wed Jan 20 18:00:15 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-Check.RuntimeError=Runtime Error
-Check.ArgumentIsNull=argument is null
-Check.ArgumentIsInvalid=argument is invalid
-Check.ObjectIsInconsistent=object state is inconsistent
-Check.ApiAssertionFailed=assertion on API contract failed
-Logging.ErrorTitle=Error
-Logging.FromPlugin=plugin: 
-Logging.DueToException=exception: 
-Logging.NoMessage=???
-Logging.GenericErrorMessage=An error has occurred.\nPlease see the Error Log for more details.
-Message.Error=error: 
-Message.Warning=warning: 
-QueryWithBooleanPrefDialog.1=Don't ask again
-TextUtils.Conjunctions=(in|to|of|and|or|but|if|as)
-SimpleSubstitutionEngine.UnknownVariable=unknown variable ''{0}''
-SimpleSubstitutionEngine.InvalidSubstitution=invalid substitution of variable ''{0}'' with value ''{1}''
-NotifyWithBooleanPrefDialog.DoNotNotifyAgain=Do not &notify me again
-FormEditorEditingContext.cantShowUndo=Unable to show undo location.
-EditingContextOperation.cantShowCommandLocation=Unable to display the location for the '{0}' command.
-EditingContextOperation.errorDialogTitle=Error
-ProjectFolderSelectionDialog.SelectFolderDescriptionLabel=Select a folder:
-ProjectFolderSelectionDialog.SelectFolderTitle=Select a folder
-DirectorySelectorWithHistory.BrowseLabel=Browse...
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/org.symbian.tools.wrttools.product/.classpath	Thu Jan 21 11:47:14 2010 -0800
@@ -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/org.symbian.tools.wrttools.product/.project	Thu Jan 21 11:47:14 2010 -0800
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.symbian.tools.wrttools.product</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/org.symbian.tools.wrttools.product/.settings/org.eclipse.jdt.core.prefs	Thu Jan 21 11:47:14 2010 -0800
@@ -0,0 +1,8 @@
+#Wed Jan 13 10:11:07 PST 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/org.symbian.tools.wrttools.product/META-INF/MANIFEST.MF	Thu Jan 21 11:47:14 2010 -0800
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: WRT IDE Product
+Bundle-SymbolicName: org.symbian.tools.wrttools.product;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.symbian.tools.wrttools.product.Activator
+Bundle-Vendor: Symbian Foundation
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.wst.jsdt.ui;bundle-version="1.0.200",
+ org.eclipse.search;bundle-version="3.5.1",
+ org.eclipse.debug.ui;bundle-version="3.5.1",
+ org.eclipse.ui.console;bundle-version="3.4.0",
+ org.symbian.tools.wrttools;bundle-version="1.0.0",
+ org.eclipse.wst.css.ui;bundle-version="1.0.401",
+ org.eclipse.wst.html.ui;bundle-version="1.0.401",
+ org.eclipse.wst.xml.ui;bundle-version="1.1.1"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/org.symbian.tools.wrttools.product/build.properties	Thu Jan 21 11:47:14 2010 -0800
@@ -0,0 +1,7 @@
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               plugin_customization.ini,\
+               icons/
+source.. = src/
Binary file org.symbian.tools.wrttools.product/icons/main16.gif has changed
Binary file org.symbian.tools.wrttools.product/icons/new_xml.gif has changed
Binary file org.symbian.tools.wrttools.product/icons/newcss_wiz.gif has changed
Binary file org.symbian.tools.wrttools.product/icons/newhtml_wiz.gif has changed
Binary file org.symbian.tools.wrttools.product/icons/newjscript_wiz.gif has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/org.symbian.tools.wrttools.product/launch/WRT IDE (Product).launch	Thu Jan 21 11:47:14 2010 -0800
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="true"/>
+<booleanAttribute key="automaticAdd" value="false"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="false"/>
+<booleanAttribute key="clearws" value="false"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/WRT IDE (Product)"/>
+<booleanAttribute key="default" value="false"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../runtime-wrt-ide.product"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms128m -Xmx768m -XX:MaxPermSize=192m"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.symbian.tools.wrttools.product.product"/>
+<stringAttribute key="productFile" value="\org.symbian.tools.wrttools.product\wrt-ide.product"/>
+<booleanAttribute key="restart" value="false"/>
+<stringAttribute key="selected_target_plugins" value="org.apache.xml.resolver@default:default,org.apache.jasper@default:default,org.eclipse.wst.css.ui@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.update.core@default:default,javax.transaction@default:false,org.apache.commons.collections@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.ui.intro@default:default,javax.mail*1.4.0.v200905040518@default:default,org.eclipse.wst.internet.monitor.core@default:default,org.eclipse.wst.jsdt.support.firefox@default:default,org.eclipse.emf.ecore.change.edit@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.core.expressions@default:default,org.eclipse.platform.doc.user@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.equinox.security.win32.x86@default:false,org.eclipse.equinox.p2.repository@default:default,org.eclipse.wst.command.env.core@default:default,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.gef@default:default,org.eclipse.text@default:default,org.eclipse.rcp@default:default,org.eclipse.equinox.p2.ui.sdk@default:default,org.eclipse.core.net.win32.x86@default:false,org.eclipse.ui.ide.application@default:default,org.eclipse.emf.databinding.edit@default:default,org.eclipse.emf.databinding@default:default,org.eclipse.wst.xml.xpath.ui@default:default,org.apache.commons.net@default:default,org.apache.xerces@default:default,org.apache.axis@default:default,org.eclipse.wst.jsdt.doc@default:default,org.objectweb.asm@default:default,org.eclipse.team.cvs.ui@default:default,org.eclipse.core.resources.win32.x86@default:false,org.eclipse.ui.externaltools@default:default,org.mortbay.jetty.server@default:default,org.apache.xalan@default:default,org.eclipse.wst.sse.doc.user@default:default,org.jdom@default:default,org.eclipse.wst.validation.ui@default:default,javax.xml.bind*2.1.9.v200905050702@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.compare.win32@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.ui.console@default:default,org.eclipse.wst.xml.xpath.core@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.servertools.doc.isv@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.apache.commons.logging@default:default,org.eclipse.wst.command.env.infopop@default:default,org.eclipse.jface.text@default:default,org.eclipse.osgi.services@default:default,org.eclipse.equinox.app@default:default,org.eclipse.core.resources.compatibility@default:false,org.eclipse.debug.core@default:default,org.eclipse.core.filesystem.win32.x86@default:false,org.eclipse.ui.views@default:default,org.eclipse.wst.html.ui.infopop@default:default,org.eclipse.jface@default:default,org.eclipse.emf.common@default:default,org.eclipse.ecf.ssl@default:false,org.apache.commons.lang*2.3.0.v200803061910@default:default,javax.jws@default:default,org.apache.commons.codec@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.core.boot@default:default,org.eclipse.platform.doc.isv@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.compare.core@default:default,org.eclipse.wst.jsdt.web.core@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.team.ui@default:default,org.eclipse.wst.jsdt.ui@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.help.ui@default:default,org.eclipse.team.cvs.ssh@default:default,org.apache.commons.discovery@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime@default:true,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.eclipse.emf.mapping.ui@default:default,org.eclipse.wst.sse.ui.infopop@default:default,javax.xml.rpc@default:default,org.apache.lucene.analysis@default:default,org.eclipse.debug.ui@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.ui@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.apache.oro@default:default,org.apache.commons.jxpath@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.wst.command.env.doc.user@default:default,org.eclipse.wst.jsdt.manipulation@default:default,org.eclipse.ui.forms@default:default,org.eclipse.wst.jsdt.core@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.emf.mapping.ecore2xml@default:default,org.eclipse.wst.standard.schemas@default:default,org.eclipse.wst.common.infopop@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.security@default:default,org.eclipse.wst.html.ui@default:default,org.eclipse.wst.xml.ui@default:default,org.eclipse.compare@default:default,org.eclipse.dstore.core@default:default,org.apache.velocity@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.wst.xml.ui.infopop@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.core.filesystem@default:default,org.apache.commons.el@default:default,org.eclipse.platform@default:default,org.eclipse.team.core@default:default,org.mozilla.xulrunner@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.search@default:default,org.eclipse.wst.sse.ui@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.wst.common.frameworks.ui@default:default,javax.xml.stream@default:default,org.eclipse.emf.edit@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.apache.commons.httpclient@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.help.appserver@default:default,org.eclipse.core.jobs@default:default,java_cup.runtime@default:default,org.eclipse.ui.win32@default:false,commonj.sdo@default:default,javax.persistence@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.wst.css.core@default:default,org.eclipse.ui.ide@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,javax.servlet@default:default,org.eclipse.equinox.util@default:default,org.eclipse.core.net@default:default,org.eclipse.jem.util@default:default,org.eclipse.wst.common.snippets@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.workbench.compatibility@default:false,org.eclipse.update.configurator@3:true,net.sourceforge.lpg.lpgjavaruntime@default:default,org.eclipse.update.ui@default:default,org.eclipse.team.cvs.core@default:default,org.eclipse.equinox.common@2:true,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,com.ibm.icu@default:default,javax.xml.ws@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.emf.mapping.ecore@default:default,org.mortbay.jetty.util@default:default,org.eclipse.wtp.epp.package.jee.intro@default:default,org.eclipse.emf.mapping.ecore2ecore@default:default,org.eclipse.emf@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.swt.win32.win32.x86@default:false,javax.servlet.jsp@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.osgi@-1:true,org.eclipse.wst.validation@default:default,org.eclipse.wst.xml.xpath2.processor@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.cvs@default:default,org.eclipse.dstore.extra@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.wst.html.core@default:default,org.eclipse.equinox.preferences@default:default,com.jcraft.jsch@default:default,javax.xml.soap@default:default,org.eclipse.wst.doc.user@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.apache.xml.serializer@default:default,org.sat4j.core@default:default,org.eclipse.wst.jsdt.web.ui@default:default,org.eclipse.wst.xmleditor.doc.user@default:default,org.eclipse.update.core.win32@default:false,org.eclipse.team.cvs.ssh2@default:default,org.eclipse.core.commands@default:default,org.eclipse.jem@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.ui.browser@default:default,org.apache.bcel@default:default,org.eclipse.update.scheduler@default:default,org.eclipse.help@default:default,org.eclipse.wst.internet.cache@default:default,org.eclipse.osgi.util@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.emf.edit.ui@default:default,org.hamcrest.core@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.core.databinding@default:default,org.eclipse.equinox.launcher.win32.win32.x86@default:false,org.eclipse.ui.views.log@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.p2.exemplarysetup@default:default,org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.wst.jsdt.support.ie@default:default,org.eclipse.core.variables@default:default,org.eclipse.swt@default:default,org.eclipse.ecf.identity@default:default,org.apache.lucene@default:default,org.eclipse.wst.common.modulecore@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.mapping.ecore.editor@default:default,org.eclipse.draw2d@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.equinox.p2.reconciler.dropins@default:default,org.eclipse.ui.net@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.emf.mapping@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.wst.common.ui@default:default,org.eclipse.jsch.core@default:default,org.eclipse.wst.internet.monitor.ui@default:default,org.apache.log4j@default:default,org.eclipse.ecf@default:default,org.eclipse.jsch.ui@default:default,org.sat4j.pb@default:default,org.eclipse.ui.presentations.r21@default:default,org.eclipse.wst.xml.core@default:default,org.mozilla.xpcom@default:default,org.eclipse.epp.package.jee@default:default,org.eclipse.ui.editors@default:default,org.eclipse.help.webapp@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.wst.validation.infopop@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.net4j.jms.api@default:default,org.eclipse.wst.command.env@default:default,org.eclipse.help.base@default:default,org.eclipse.wst.validation.doc.isv@default:default,javax.wsdl*1.6.2.v200806030405@default:default,javax.xml@default:default,org.eclipse.ui.intro.universal@default:default,org.mozilla.xulrunner.win32.win32.x86@default:false,javax.activation*1.1.0.v200906290531@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.wst.common.api.doc@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.symbian.tools.wrttools.product@default:default,org.symbian.tools.wrttools.editors@default:default,org.chromium.debug.ui@default:default,org.symbian.tools.wrttools.previewer@default:default,org.symbian.tools.wrttools@default:default,org.chromium.debug.core@default:default,org.chromium.sdk@default:default,org.symbian.tools.wrttools.debug.core@default:default"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="true"/>
+<booleanAttribute key="useProduct" value="true"/>
+<booleanAttribute key="usefeatures" value="false"/>
+</launchConfiguration>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/org.symbian.tools.wrttools.product/plugin.xml	Thu Jan 21 11:47:14 2010 -0800
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension
+         point="org.eclipse.ui.perspectives">
+      <perspective
+            class="org.symbian.tools.wrttools.product.perspective.WRTPerspective"
+            icon="icons/main16.gif"
+            id="org.symbian.tools.wrttools.mainPerspective"
+            name="WebRuntime">
+      </perspective>
+   </extension>
+   <extension
+         point="org.eclipse.ui.actionSets">
+      <actionSet
+            id="org.symbian.tools.wrttools.product.creationActionSet"
+            label="WRT Element Creation">
+         <action
+               class="org.symbian.tools.wrttools.product.actions.NewCSSFileAction"
+               icon="icons/newcss_wiz.gif"
+               id="org.symbian.tools.wrttools.product.newCssFileAction"
+               label="New CSS File..."
+               style="push"
+               toolbarPath="wrtwizards">
+         </action>
+         <action
+               class="org.symbian.tools.wrttools.product.actions.NewHTMLFileAction"
+               icon="icons/newhtml_wiz.gif"
+               id="org.symbian.tools.wrttools.product.newHtmlAction"
+               label="New HTML File..."
+               style="push"
+               toolbarPath="wrtwizards">
+         </action>
+         <action
+               class="org.symbian.tools.wrttools.product.actions.NewJSFileAction"
+               icon="icons/newjscript_wiz.gif"
+               id="org.symbian.tools.wrttools.product.newJSAction"
+               label="New JavaScript File..."
+               style="push"
+               toolbarPath="wrtwizards">
+         </action>
+         <action
+               class="org.symbian.tools.wrttools.product.actions.NewWRTProjectAction"
+               icon="icons/main16.gif"
+               id="org.symbian.tools.wrttools.product.newWRTProjectAction"
+               label="New WRT Application..."
+               style="push"
+               toolbarPath="wrtwizards">
+         </action>
+      </actionSet>
+   </extension>
+   <extension
+         point="org.eclipse.ui.newWizards">
+      <category
+            id="org.eclipse.wst.web.ui"
+            name="Web">
+      </category>
+      <primaryWizard
+            id="org.symbian.tools.wrttools.core.wrtwidgetwizard">
+      </primaryWizard>
+      <primaryWizard
+            id="org.eclipse.wst.html.ui.internal.wizard.NewHTMLWizard">
+      </primaryWizard>
+      <primaryWizard
+            id="org.eclipse.wst.css.ui.internal.wizard.NewCSSWizard">
+      </primaryWizard>
+      <primaryWizard
+            id="org.eclipse.wst.jsdt.ui.NewJSWizard">
+      </primaryWizard>
+   </extension>
+   <extension
+         point="org.eclipse.ui.activities">
+      <activity
+            description="WTP functionality not used in WRT IDE"
+            id="org.symbian.tools.wrttools.product.wtp"
+            name="Web Tools Platform (WTP)">
+      </activity>
+      <activityPatternBinding
+            activityId="org.symbian.tools.wrttools.product.wtp"
+            pattern="org\.eclipse\.wst\.xml\.ui/org\.eclipse\.wst\.xml\.ui\.XMLExampleProjectCreationWizard">
+      </activityPatternBinding>
+      <activityPatternBinding
+            activityId="org.symbian.tools.wrttools.product.wtp"
+            pattern="org\.eclipse\.wst\.xml\.ui/org\.eclipse\.wst\.xml\.ui\.perspective">
+      </activityPatternBinding>
+      <activityPatternBinding
+            activityId="org.symbian.tools.wrttools.product.wtp"
+            pattern="org\.eclipse\.wst\.jsdt\.ui/org\.eclipse\.wst\.jsdt\.ui\.wizards\.JavaProjectWizard">
+      </activityPatternBinding>
+      <activityPatternBinding
+            activityId="org.symbian.tools.wrttools.product.wtp"
+            pattern="org\.eclipse\.wst\.jsdt\.web\.ui/org\.eclipse\.wst\.jsdt\.internal\.web\.ui\.convertProjects">
+      </activityPatternBinding>
+      <category
+            description="WTP UI elements that are not compatible with WRT widget development"
+            id="org.symbian.tools.wrttools.product.wtp"
+            name="Web Tools Platform (WTP)">
+      </category>
+      <categoryActivityBinding
+            activityId="org.symbian.tools.wrttools.product.wtp"
+            categoryId="org.symbian.tools.wrttools.product.wtp">
+      </categoryActivityBinding>
+      <category
+            description="Chromium Developement Tools UI"
+            id="org.symbian.tools.wrttools.product.chdt"
+            name="Google Chrome Developer Tools">
+      </category>
+      <activity
+            description="Google Chrome Developer Tools UI elements"
+            id="org.symbian.tools.wrttools.product.chdtact"
+            name="Google Chrome Developer Tools">
+      </activity>
+      <categoryActivityBinding
+            activityId="org.symbian.tools.wrttools.product.chdtact"
+            categoryId="org.symbian.tools.wrttools.product.chdt">
+      </categoryActivityBinding>
+      <activityPatternBinding
+            activityId="org.symbian.tools.wrttools.product.chdtact"
+            pattern="org\.chromium\.debug\.ui/org\.chromium\.debug\.ui\.LaunchType.*">
+      </activityPatternBinding>
+   </extension>
+   <extension
+         id="product"
+         point="org.eclipse.core.runtime.products">
+      <product
+            application="org.eclipse.ui.ide.workbench"
+            name="WebRuntime Toolkit IDE">
+         <property
+               name="windowImages"
+               value="icons/main16.gif,eclipse32.gif,eclipse48.gif,eclipse.png,eclipse32.png">
+         </property>
+         <property
+               name="aboutText"
+               value="%productBlurb">
+         </property>
+         <property
+               name="aboutImage"
+               value="eclipse_lg.gif">
+         </property>
+         <property
+               name="startupForegroundColor"
+               value="C8D5EA">
+         </property>
+         <property
+               name="startupProgressRect"
+               value="0,280,455,15">
+         </property>
+         <property
+               name="startupMessageRect"
+               value="7,220,441,20">
+         </property>
+         <property
+               name="appName"
+               value="WebRuntime Toolkit IDE">
+         </property>
+         <property
+               name="preferenceCustomization"
+               value="plugin_customization.ini">
+         </property>
+      </product>
+   </extension>
+   <extension
+         point="org.eclipse.ui.preferencePages">
+      <page            
+            category="org.eclipse.ui.preferencePages.Workbench"
+            name="Capabilities"
+            id="org.eclipse.sdk.capabilities">
+            <class class="org.eclipse.ui.activities.ActivityCategoryPreferencePage">
+                <parameter name="allowAdvanced" value="true"/>
+                <parameter name="captionMessage" value="Capabilities allow you to enable or disable various product components.  These capabilities are grouped according to a set of predefined categories." />
+            	<parameter name="activityName" value="&amp;Capabilities" />
+                <parameter name="categoryName" value="&amp;Capabilities" />
+            	<parameter name="activityPromptButton" value="&amp;Prompt when enabling capabilities"/>
+            	<parameter name="activityPromptButtonTooltip" value="Prompt when a feature is first used that requires enablement of capabilities"/>
+            </class>
+      </page>
+   </extension>
+</plugin>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/org.symbian.tools.wrttools.product/plugin_customization.ini	Thu Jan 21 11:47:14 2010 -0800
@@ -0,0 +1,37 @@
+# plugin_customization.ini 
+# sets default values for plug-in-specific preferences
+# keys are qualified by plug-in id
+# e.g., com.example.acmeplugin/myproperty=myvalue
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in plugin_customization.properties
+# This file does not need to be translated.
+
+# WARNING: This file defines the preference overrides for the Platform build 
+# (the one with no JDT or PDE), not the SDK build (aka the IDE).  
+# For the SDK build, use the plugin_customization.ini file in the 
+# org.eclipse.sdk plug-in instead.
+
+# Property "org.eclipse.ui/defaultPerspectiveId" controls the 
+# perspective that the workbench opens initially
+org.eclipse.ui/defaultPerspectiveId=org.symbian.tools.wrttools.mainPerspective
+
+# new-style tabs by default
+org.eclipse.ui/SHOW_TRADITIONAL_STYLE_TABS=false
+
+# put the perspective switcher on the top right
+org.eclipse.ui/DOCK_PERSPECTIVE_BAR=topRight
+
+# show progress on startup
+org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = true
+
+# Welcome theme to use
+#org.eclipse.ui.intro/INTRO_THEME = org.eclipse.wtp.epp.package.jee.intro
+
+# Root page links to show in the Universal Welcome
+#org.eclipse.ui.intro.universal/INTRO_ROOT_PAGES = overview,tutorials,samples,whatsnew
+
+# Initial page layout of the Universal Welcome
+#org.eclipse.ui.intro.universal/INTRO_DATA = product:introData.xml
+
+# Order help books in table of contents
+#org.eclipse.help/HELP_DATA = helpData.xml
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/org.symbian.tools.wrttools.product/src/org/symbian/tools/wrttools/product/Activator.java	Thu Jan 21 11:47:14 2010 -0800
@@ -0,0 +1,50 @@
+package org.symbian.tools.wrttools.product;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.symbian.tools.wrttools.product";
+
+	// The shared instance
+	private static Activator plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+		super.stop(context);
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/org.symbian.tools.wrttools.product/src/org/symbian/tools/wrttools/product/actions/NewCSSFileAction.java	Thu Jan 21 11:47:14 2010 -0800
@@ -0,0 +1,44 @@
+package org.symbian.tools.wrttools.product.actions;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.wst.css.ui.internal.wizard.NewCSSWizard;
+import org.eclipse.wst.jsdt.ui.actions.AbstractOpenWizardAction;
+
+public class NewCSSFileAction extends AbstractOpenWizardAction implements
+		IWorkbenchWindowActionDelegate {
+
+	@SuppressWarnings("restriction")
+	@Override
+	protected INewWizard createWizard() throws CoreException {
+		return new NewCSSWizard();
+	}
+
+	@Override
+	public void dispose() {
+		// TODO Auto-generated method stub
+
+	}
+
+	@Override
+	public void init(IWorkbenchWindow window) {
+		// TODO Auto-generated method stub
+
+	}
+
+	@Override
+	public void run(IAction action) {
+		run();
+	}
+
+	@Override
+	public void selectionChanged(IAction action, ISelection selection) {
+		// TODO Auto-generated method stub
+
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/org.symbian.tools.wrttools.product/src/org/symbian/tools/wrttools/product/actions/NewHTMLFileAction.java	Thu Jan 21 11:47:14 2010 -0800
@@ -0,0 +1,44 @@
+package org.symbian.tools.wrttools.product.actions;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.wst.html.ui.internal.wizard.NewHTMLWizard;
+import org.eclipse.wst.jsdt.ui.actions.AbstractOpenWizardAction;
+
+public class NewHTMLFileAction extends AbstractOpenWizardAction implements
+		IWorkbenchWindowActionDelegate {
+
+	@SuppressWarnings("restriction")
+	@Override
+	protected INewWizard createWizard() throws CoreException {
+		return new NewHTMLWizard();
+	}
+
+	@Override
+	public void dispose() {
+		// TODO Auto-generated method stub
+
+	}
+
+	@Override
+	public void init(IWorkbenchWindow window) {
+		// TODO Auto-generated method stub
+
+	}
+
+	@Override
+	public void run(IAction action) {
+		run();
+	}
+
+	@Override
+	public void selectionChanged(IAction action, ISelection selection) {
+		// TODO Auto-generated method stub
+
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/org.symbian.tools.wrttools.product/src/org/symbian/tools/wrttools/product/actions/NewJSFileAction.java	Thu Jan 21 11:47:14 2010 -0800
@@ -0,0 +1,44 @@
+package org.symbian.tools.wrttools.product.actions;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.wst.jsdt.internal.ui.wizards.NewJSWizard;
+import org.eclipse.wst.jsdt.ui.actions.AbstractOpenWizardAction;
+
+public class NewJSFileAction extends AbstractOpenWizardAction implements
+		IWorkbenchWindowActionDelegate {
+
+	@SuppressWarnings("restriction")
+	@Override
+	protected INewWizard createWizard() throws CoreException {
+		return new NewJSWizard();
+	}
+
+	@Override
+	public void dispose() {
+		// TODO Auto-generated method stub
+
+	}
+
+	@Override
+	public void init(IWorkbenchWindow window) {
+		// TODO Auto-generated method stub
+
+	}
+
+	@Override
+	public void run(IAction action) {
+		run();
+	}
+
+	@Override
+	public void selectionChanged(IAction action, ISelection selection) {
+		// TODO Auto-generated method stub
+
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/org.symbian.tools.wrttools.product/src/org/symbian/tools/wrttools/product/actions/NewWRTProjectAction.java	Thu Jan 21 11:47:14 2010 -0800
@@ -0,0 +1,48 @@
+package org.symbian.tools.wrttools.product.actions;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.wst.jsdt.ui.actions.AbstractOpenWizardAction;
+import org.symbian.tools.wrttools.wizards.WrtWidgetWizard;
+
+public class NewWRTProjectAction extends AbstractOpenWizardAction implements
+		IWorkbenchWindowActionDelegate {
+
+	@Override
+	public void init(IWorkbenchWindow window) {
+		// TODO Auto-generated method stub
+
+	}
+
+	@Override
+	public void run(IAction action) {
+		run();
+	}
+
+	@Override
+	public void selectionChanged(IAction action, ISelection selection) {
+		// TODO Auto-generated method stub
+
+	}
+
+	@Override
+	protected INewWizard createWizard() throws CoreException {
+		return new WrtWidgetWizard();
+	}
+
+	@Override
+	public void dispose() {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	protected boolean doCreateProjectFirstOnEmptyWorkspace(Shell shell) {
+		return true;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/org.symbian.tools.wrttools.product/src/org/symbian/tools/wrttools/product/perspective/WRTPerspective.java	Thu Jan 21 11:47:14 2010 -0800
@@ -0,0 +1,66 @@
+package org.symbian.tools.wrttools.product.perspective;
+
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.search.ui.NewSearchUI;
+import org.eclipse.ui.IFolderLayout;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPerspectiveFactory;
+import org.eclipse.ui.console.IConsoleConstants;
+import org.eclipse.ui.progress.IProgressConstants;
+import org.eclipse.wst.jsdt.ui.JavaScriptUI;
+
+public class WRTPerspective implements IPerspectiveFactory {
+
+	@Override
+	public void createInitialLayout(IPageLayout layout) {
+ 		String editorArea = layout.getEditorArea();
+		
+		IFolderLayout folder= layout.createFolder("left", IPageLayout.LEFT, (float)0.25, editorArea); //$NON-NLS-1$
+		folder.addView("org.symbian.tools.wrttools.wrtnavigator");
+		folder.addView(JavaScriptUI.ID_TYPE_HIERARCHY);
+		
+		IFolderLayout outputfolder= layout.createFolder("bottom", IPageLayout.BOTTOM, (float)0.75, editorArea); //$NON-NLS-1$
+		outputfolder.addView(IPageLayout.ID_PROBLEM_VIEW);
+		outputfolder.addView(JavaScriptUI.ID_JAVADOC_VIEW);
+		outputfolder.addView(JavaScriptUI.ID_SOURCE_VIEW);
+		outputfolder.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
+		outputfolder.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);
+		outputfolder.addPlaceholder(IPageLayout.ID_BOOKMARKS);
+		outputfolder.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
+		
+		layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float)0.75, editorArea);
+		
+		layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
+		layout.addActionSet(JavaScriptUI.ID_ACTION_SET);
+		layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET);
+		layout.addActionSet("org.symbian.tools.wrttools.product.creationActionSet");
+		
+		// views - java
+		layout.addShowViewShortcut(JavaScriptUI.ID_TYPE_HIERARCHY);
+		layout.addShowViewShortcut(JavaScriptUI.ID_SOURCE_VIEW);
+		layout.addShowViewShortcut(JavaScriptUI.ID_JAVADOC_VIEW);
+		layout.addShowViewShortcut("org.symbian.tools.wrttools.wrtnavigator");
+
+		layout.addPerspectiveShortcut(IDebugUIConstants.ID_DEBUG_PERSPECTIVE);
+		
+		// views - search
+		layout.addShowViewShortcut(NewSearchUI.SEARCH_VIEW_ID);
+
+		// views - standard workbench
+		layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
+		layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
+		layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
+				
+		// new actions - Java project creation wizard
+		layout.addNewWizardShortcut("org.symbian.tools.wrttools.core.wrtwidgetwizard"); //$NON-NLS-1$
+		layout.addNewWizardShortcut("org.eclipse.wst.jsdt.ui.NewJSWizard"); //$NON-NLS-1$
+		layout.addNewWizardShortcut("org.eclipse.wst.html.ui.internal.wizard.NewHTMLWizard"); //$NON-NLS-1$
+		layout.addNewWizardShortcut("org.eclipse.wst.css.ui.internal.wizard.NewCSSWizard"); //$NON-NLS-1$
+		layout.addNewWizardShortcut("org.eclipse.wst.xml.ui.internal.wizards.NewXMLWizard"); //$NON-NLS-1$
+		layout.addNewWizardShortcut("org.eclipse.wst.jsdt.ui.wizards.NewSnippetFileCreationWizard"); //$NON-NLS-1$
+		layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//$NON-NLS-1$
+		layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$
+		layout.addNewWizardShortcut("org.eclipse.ui.editors.wizards.UntitledTextFileWizard");//$NON-NLS-1$
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/org.symbian.tools.wrttools.product/wrt-ide.product	Thu Jan 21 11:47:14 2010 -0800
@@ -0,0 +1,306 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?pde version="3.5"?>
+
+<product name="WebRuntime Toolkit IDE" uid="org.symbian.wrtide" id="org.symbian.tools.wrttools.product.product" application="org.eclipse.ui.ide.workbench" version="1.0.0.qualifier" useFeatures="false" includeLaunchers="true">
+
+   <aboutInfo>
+      <image path="eclipse_lg.gif"/>
+      <text>
+         %productBlurb
+      </text>
+   </aboutInfo>
+
+   <configIni use="default">
+   </configIni>
+
+   <launcherArgs>
+      <programArgs>-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}</programArgs>
+      <vmArgs>-Xms128m -Xmx768m -XX:MaxPermSize=192m</vmArgs>
+      <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
+   </launcherArgs>
+
+   <windowImages i16="/org.symbian.tools.wrttools.product/icons/main16.gif" i32="eclipse32.gif" i48="eclipse48.gif" i64="eclipse.png" i128="eclipse32.png"/>
+
+   <splash
+      startupProgressRect="0,280,455,15"
+      startupMessageRect="7,220,441,20"
+      startupForegroundColor="C8D5EA" />
+   <launcher>
+      <solaris/>
+      <win useIco="false">
+         <bmp/>
+      </win>
+   </launcher>
+
+   <vm>
+      <windows>org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6</windows>
+   </vm>
+
+   <plugins>
+      <plugin id="com.ibm.icu"/>
+      <plugin id="com.jcraft.jsch"/>
+      <plugin id="java_cup.runtime"/>
+      <plugin id="javax.activation" version="1.1.0.v200906290531"/>
+      <plugin id="javax.servlet"/>
+      <plugin id="javax.servlet.jsp"/>
+      <plugin id="javax.transaction" fragment="true"/>
+      <plugin id="javax.xml"/>
+      <plugin id="javax.xml.stream"/>
+      <plugin id="javax.xml.ws"/>
+      <plugin id="org.apache.bcel"/>
+      <plugin id="org.apache.commons.codec"/>
+      <plugin id="org.apache.commons.collections"/>
+      <plugin id="org.apache.commons.discovery"/>
+      <plugin id="org.apache.commons.el"/>
+      <plugin id="org.apache.commons.httpclient"/>
+      <plugin id="org.apache.commons.jxpath"/>
+      <plugin id="org.apache.commons.lang" version="2.3.0.v200803061910"/>
+      <plugin id="org.apache.commons.logging"/>
+      <plugin id="org.apache.commons.net"/>
+      <plugin id="org.apache.jasper"/>
+      <plugin id="org.apache.log4j"/>
+      <plugin id="org.apache.lucene"/>
+      <plugin id="org.apache.lucene.analysis"/>
+      <plugin id="org.apache.oro"/>
+      <plugin id="org.apache.velocity"/>
+      <plugin id="org.apache.xalan"/>
+      <plugin id="org.apache.xerces"/>
+      <plugin id="org.apache.xml.resolver"/>
+      <plugin id="org.apache.xml.serializer"/>
+      <plugin id="org.chromium.debug.core"/>
+      <plugin id="org.chromium.debug.ui"/>
+      <plugin id="org.chromium.sdk"/>
+      <plugin id="org.eclipse.ant.core"/>
+      <plugin id="org.eclipse.compare"/>
+      <plugin id="org.eclipse.compare.core"/>
+      <plugin id="org.eclipse.compare.win32"/>
+      <plugin id="org.eclipse.core.boot"/>
+      <plugin id="org.eclipse.core.commands"/>
+      <plugin id="org.eclipse.core.contenttype"/>
+      <plugin id="org.eclipse.core.databinding"/>
+      <plugin id="org.eclipse.core.databinding.beans"/>
+      <plugin id="org.eclipse.core.databinding.observable"/>
+      <plugin id="org.eclipse.core.databinding.property"/>
+      <plugin id="org.eclipse.core.expressions"/>
+      <plugin id="org.eclipse.core.filebuffers"/>
+      <plugin id="org.eclipse.core.filesystem"/>
+      <plugin id="org.eclipse.core.filesystem.linux.x86" fragment="true"/>
+      <plugin id="org.eclipse.core.filesystem.linux.x86_64" fragment="true"/>
+      <plugin id="org.eclipse.core.filesystem.macosx" fragment="true"/>
+      <plugin id="org.eclipse.core.filesystem.win32.x86" fragment="true"/>
+      <plugin id="org.eclipse.core.jobs"/>
+      <plugin id="org.eclipse.core.net"/>
+      <plugin id="org.eclipse.core.net.linux.x86" fragment="true"/>
+      <plugin id="org.eclipse.core.net.win32.x86" fragment="true"/>
+      <plugin id="org.eclipse.core.resources"/>
+      <plugin id="org.eclipse.core.resources.win32.x86" fragment="true"/>
+      <plugin id="org.eclipse.core.runtime"/>
+      <plugin id="org.eclipse.core.runtime.compatibility"/>
+      <plugin id="org.eclipse.core.runtime.compatibility.auth"/>
+      <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
+      <plugin id="org.eclipse.core.variables"/>
+      <plugin id="org.eclipse.cvs"/>
+      <plugin id="org.eclipse.datatools.oda.cshelp"/>
+      <plugin id="org.eclipse.debug.core"/>
+      <plugin id="org.eclipse.debug.ui"/>
+      <plugin id="org.eclipse.draw2d"/>
+      <plugin id="org.eclipse.ecf"/>
+      <plugin id="org.eclipse.ecf.filetransfer"/>
+      <plugin id="org.eclipse.ecf.identity"/>
+      <plugin id="org.eclipse.ecf.provider.filetransfer"/>
+      <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient"/>
+      <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient.ssl" fragment="true"/>
+      <plugin id="org.eclipse.ecf.provider.filetransfer.ssl" fragment="true"/>
+      <plugin id="org.eclipse.ecf.ssl" fragment="true"/>
+      <plugin id="org.eclipse.emf"/>
+      <plugin id="org.eclipse.emf.common"/>
+      <plugin id="org.eclipse.emf.common.ui"/>
+      <plugin id="org.eclipse.emf.databinding"/>
+      <plugin id="org.eclipse.emf.databinding.edit"/>
+      <plugin id="org.eclipse.emf.ecore"/>
+      <plugin id="org.eclipse.emf.ecore.change"/>
+      <plugin id="org.eclipse.emf.ecore.change.edit"/>
+      <plugin id="org.eclipse.emf.ecore.edit"/>
+      <plugin id="org.eclipse.emf.ecore.xmi"/>
+      <plugin id="org.eclipse.emf.edit"/>
+      <plugin id="org.eclipse.emf.edit.ui"/>
+      <plugin id="org.eclipse.emf.mapping"/>
+      <plugin id="org.eclipse.emf.mapping.ecore"/>
+      <plugin id="org.eclipse.emf.mapping.ecore.editor"/>
+      <plugin id="org.eclipse.emf.mapping.ui"/>
+      <plugin id="org.eclipse.equinox.app"/>
+      <plugin id="org.eclipse.equinox.common"/>
+      <plugin id="org.eclipse.equinox.concurrent"/>
+      <plugin id="org.eclipse.equinox.ds"/>
+      <plugin id="org.eclipse.equinox.frameworkadmin"/>
+      <plugin id="org.eclipse.equinox.frameworkadmin.equinox"/>
+      <plugin id="org.eclipse.equinox.http.jetty"/>
+      <plugin id="org.eclipse.equinox.http.registry"/>
+      <plugin id="org.eclipse.equinox.http.servlet"/>
+      <plugin id="org.eclipse.equinox.jsp.jasper"/>
+      <plugin id="org.eclipse.equinox.jsp.jasper.registry"/>
+      <plugin id="org.eclipse.equinox.launcher"/>
+      <plugin id="org.eclipse.equinox.launcher.cocoa.macosx.x86_64" fragment="true"/>
+      <plugin id="org.eclipse.equinox.launcher.gtk.linux.x86" fragment="true"/>
+      <plugin id="org.eclipse.equinox.launcher.gtk.linux.x86_64" fragment="true"/>
+      <plugin id="org.eclipse.equinox.launcher.win32.win32.x86" fragment="true"/>
+      <plugin id="org.eclipse.equinox.p2.artifact.repository"/>
+      <plugin id="org.eclipse.equinox.p2.console"/>
+      <plugin id="org.eclipse.equinox.p2.core"/>
+      <plugin id="org.eclipse.equinox.p2.director"/>
+      <plugin id="org.eclipse.equinox.p2.director.app"/>
+      <plugin id="org.eclipse.equinox.p2.directorywatcher"/>
+      <plugin id="org.eclipse.equinox.p2.engine"/>
+      <plugin id="org.eclipse.equinox.p2.exemplarysetup"/>
+      <plugin id="org.eclipse.equinox.p2.extensionlocation"/>
+      <plugin id="org.eclipse.equinox.p2.garbagecollector"/>
+      <plugin id="org.eclipse.equinox.p2.jarprocessor"/>
+      <plugin id="org.eclipse.equinox.p2.metadata"/>
+      <plugin id="org.eclipse.equinox.p2.metadata.generator"/>
+      <plugin id="org.eclipse.equinox.p2.metadata.repository"/>
+      <plugin id="org.eclipse.equinox.p2.publisher"/>
+      <plugin id="org.eclipse.equinox.p2.reconciler.dropins"/>
+      <plugin id="org.eclipse.equinox.p2.repository"/>
+      <plugin id="org.eclipse.equinox.p2.repository.tools"/>
+      <plugin id="org.eclipse.equinox.p2.touchpoint.eclipse"/>
+      <plugin id="org.eclipse.equinox.p2.touchpoint.natives"/>
+      <plugin id="org.eclipse.equinox.p2.ui"/>
+      <plugin id="org.eclipse.equinox.p2.ui.sdk"/>
+      <plugin id="org.eclipse.equinox.p2.ui.sdk.scheduler"/>
+      <plugin id="org.eclipse.equinox.p2.updatechecker"/>
+      <plugin id="org.eclipse.equinox.p2.updatesite"/>
+      <plugin id="org.eclipse.equinox.preferences"/>
+      <plugin id="org.eclipse.equinox.registry"/>
+      <plugin id="org.eclipse.equinox.security"/>
+      <plugin id="org.eclipse.equinox.security.macosx" fragment="true"/>
+      <plugin id="org.eclipse.equinox.security.ui"/>
+      <plugin id="org.eclipse.equinox.security.win32.x86" fragment="true"/>
+      <plugin id="org.eclipse.equinox.simpleconfigurator"/>
+      <plugin id="org.eclipse.equinox.simpleconfigurator.manipulator"/>
+      <plugin id="org.eclipse.equinox.util"/>
+      <plugin id="org.eclipse.gef"/>
+      <plugin id="org.eclipse.help"/>
+      <plugin id="org.eclipse.help.appserver"/>
+      <plugin id="org.eclipse.help.base"/>
+      <plugin id="org.eclipse.help.ui"/>
+      <plugin id="org.eclipse.help.webapp"/>
+      <plugin id="org.eclipse.jem"/>
+      <plugin id="org.eclipse.jem.util"/>
+      <plugin id="org.eclipse.jface"/>
+      <plugin id="org.eclipse.jface.databinding"/>
+      <plugin id="org.eclipse.jface.text"/>
+      <plugin id="org.eclipse.jsch.core"/>
+      <plugin id="org.eclipse.ltk.core.refactoring"/>
+      <plugin id="org.eclipse.ltk.ui.refactoring"/>
+      <plugin id="org.eclipse.osgi"/>
+      <plugin id="org.eclipse.osgi.services"/>
+      <plugin id="org.eclipse.osgi.util"/>
+      <plugin id="org.eclipse.platform"/>
+      <plugin id="org.eclipse.platform.doc.isv"/>
+      <plugin id="org.eclipse.platform.doc.user"/>
+      <plugin id="org.eclipse.rcp"/>
+      <plugin id="org.eclipse.search"/>
+      <plugin id="org.eclipse.servertools.doc.isv"/>
+      <plugin id="org.eclipse.swt"/>
+      <plugin id="org.eclipse.swt.cocoa.macosx.x86_64" fragment="true"/>
+      <plugin id="org.eclipse.swt.gtk.linux.x86" fragment="true"/>
+      <plugin id="org.eclipse.swt.gtk.linux.x86_64" fragment="true"/>
+      <plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
+      <plugin id="org.eclipse.team.core"/>
+      <plugin id="org.eclipse.team.cvs.core"/>
+      <plugin id="org.eclipse.team.cvs.ssh"/>
+      <plugin id="org.eclipse.team.cvs.ssh2"/>
+      <plugin id="org.eclipse.team.cvs.ui"/>
+      <plugin id="org.eclipse.team.ui"/>
+      <plugin id="org.eclipse.text"/>
+      <plugin id="org.eclipse.ui"/>
+      <plugin id="org.eclipse.ui.browser"/>
+      <plugin id="org.eclipse.ui.cheatsheets"/>
+      <plugin id="org.eclipse.ui.cocoa" fragment="true"/>
+      <plugin id="org.eclipse.ui.console"/>
+      <plugin id="org.eclipse.ui.editors"/>
+      <plugin id="org.eclipse.ui.externaltools"/>
+      <plugin id="org.eclipse.ui.forms"/>
+      <plugin id="org.eclipse.ui.ide"/>
+      <plugin id="org.eclipse.ui.ide.application"/>
+      <plugin id="org.eclipse.ui.intro"/>
+      <plugin id="org.eclipse.ui.intro.universal"/>
+      <plugin id="org.eclipse.ui.navigator"/>
+      <plugin id="org.eclipse.ui.navigator.resources"/>
+      <plugin id="org.eclipse.ui.net"/>
+      <plugin id="org.eclipse.ui.views"/>
+      <plugin id="org.eclipse.ui.views.log"/>
+      <plugin id="org.eclipse.ui.views.properties.tabbed"/>
+      <plugin id="org.eclipse.ui.win32" fragment="true"/>
+      <plugin id="org.eclipse.ui.workbench"/>
+      <plugin id="org.eclipse.ui.workbench.texteditor"/>
+      <plugin id="org.eclipse.update.configurator"/>
+      <plugin id="org.eclipse.update.core"/>
+      <plugin id="org.eclipse.update.core.linux" fragment="true"/>
+      <plugin id="org.eclipse.update.core.win32" fragment="true"/>
+      <plugin id="org.eclipse.update.scheduler"/>
+      <plugin id="org.eclipse.update.ui"/>
+      <plugin id="org.eclipse.wst.common.core"/>
+      <plugin id="org.eclipse.wst.common.emf"/>
+      <plugin id="org.eclipse.wst.common.emfworkbench.integration"/>
+      <plugin id="org.eclipse.wst.common.environment"/>
+      <plugin id="org.eclipse.wst.common.frameworks"/>
+      <plugin id="org.eclipse.wst.common.frameworks.ui"/>
+      <plugin id="org.eclipse.wst.common.infopop"/>
+      <plugin id="org.eclipse.wst.common.modulecore"/>
+      <plugin id="org.eclipse.wst.common.project.facet.core"/>
+      <plugin id="org.eclipse.wst.common.snippets"/>
+      <plugin id="org.eclipse.wst.common.ui"/>
+      <plugin id="org.eclipse.wst.common.uriresolver"/>
+      <plugin id="org.eclipse.wst.css.core"/>
+      <plugin id="org.eclipse.wst.css.ui"/>
+      <plugin id="org.eclipse.wst.doc.user"/>
+      <plugin id="org.eclipse.wst.html.core"/>
+      <plugin id="org.eclipse.wst.html.ui"/>
+      <plugin id="org.eclipse.wst.html.ui.infopop"/>
+      <plugin id="org.eclipse.wst.internet.cache"/>
+      <plugin id="org.eclipse.wst.internet.monitor.core"/>
+      <plugin id="org.eclipse.wst.internet.monitor.ui"/>
+      <plugin id="org.eclipse.wst.jsdt.core"/>
+      <plugin id="org.eclipse.wst.jsdt.doc"/>
+      <plugin id="org.eclipse.wst.jsdt.manipulation"/>
+      <plugin id="org.eclipse.wst.jsdt.support.firefox"/>
+      <plugin id="org.eclipse.wst.jsdt.support.ie"/>
+      <plugin id="org.eclipse.wst.jsdt.ui"/>
+      <plugin id="org.eclipse.wst.jsdt.web.core"/>
+      <plugin id="org.eclipse.wst.jsdt.web.ui"/>
+      <plugin id="org.eclipse.wst.sse.core"/>
+      <plugin id="org.eclipse.wst.sse.doc.user"/>
+      <plugin id="org.eclipse.wst.sse.ui"/>
+      <plugin id="org.eclipse.wst.sse.ui.infopop"/>
+      <plugin id="org.eclipse.wst.standard.schemas"/>
+      <plugin id="org.eclipse.wst.validation"/>
+      <plugin id="org.eclipse.wst.validation.doc.isv"/>
+      <plugin id="org.eclipse.wst.validation.infopop"/>
+      <plugin id="org.eclipse.wst.validation.ui"/>
+      <plugin id="org.eclipse.wst.xml.core"/>
+      <plugin id="org.eclipse.wst.xml.ui"/>
+      <plugin id="org.eclipse.wst.xml.ui.infopop"/>
+      <plugin id="org.eclipse.wst.xml.xpath.core"/>
+      <plugin id="org.eclipse.wst.xml.xpath.ui"/>
+      <plugin id="org.eclipse.wst.xml.xpath2.processor"/>
+      <plugin id="org.eclipse.wst.xmleditor.doc.user"/>
+      <plugin id="org.eclipse.wtp.epp.package.jee.intro"/>
+      <plugin id="org.jdom"/>
+      <plugin id="org.mortbay.jetty.server"/>
+      <plugin id="org.mortbay.jetty.util"/>
+      <plugin id="org.mozilla.xpcom"/>
+      <plugin id="org.mozilla.xulrunner"/>
+      <plugin id="org.mozilla.xulrunner.win32.win32.x86" fragment="true"/>
+      <plugin id="org.objectweb.asm"/>
+      <plugin id="org.sat4j.core"/>
+      <plugin id="org.sat4j.pb"/>
+      <plugin id="org.symbian.tools.wrttools"/>
+      <plugin id="org.symbian.tools.wrttools.debug.core"/>
+      <plugin id="org.symbian.tools.wrttools.editors"/>
+      <plugin id="org.symbian.tools.wrttools.previewer"/>
+      <plugin id="org.symbian.tools.wrttools.product"/>
+   </plugins>
+
+
+</product>