author | TasneemS@US-TASNEEMS |
Wed, 27 Jan 2010 15:47:03 -0800 | |
changeset 51 | a0e2f1f4e212 |
parent 50 | 0560e98b9bf6 (current diff) |
parent 49 | e64c52f5ee56 (diff) |
child 53 | ba7c1ce1cc4a |
--- a/org.symbian.tools.wrttools.debug.core/src/org/symbian/tools/wrttools/debug/internal/IConstants.java Wed Jan 27 15:05:37 2010 -0800 +++ b/org.symbian.tools.wrttools.debug.core/src/org/symbian/tools/wrttools/debug/internal/IConstants.java Wed Jan 27 15:47:03 2010 -0800 @@ -20,7 +20,7 @@ public interface IConstants { String PREF_NAME_CHROME_LOCATION="chrome.location"; + String PROP_PROJECT_NAME = "projectName"; - String PROP_PROJECT_NAME = "projectName"; - public static final String WRT_PREVIEW_HTML = "wrt_preview_main.html"; + 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/launch/WidgetLaunchDelegate.java Wed Jan 27 15:05:37 2010 -0800 +++ b/org.symbian.tools.wrttools.debug.core/src/org/symbian/tools/wrttools/debug/internal/launch/WidgetLaunchDelegate.java Wed Jan 27 15:47:03 2010 -0800 @@ -27,6 +27,7 @@ import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; @@ -85,12 +86,11 @@ // 2. Start Chrome synchronized (CHROME_ARGS) { // No chances for collision. Still, better safe then spend several days looking for hard-to-reproduce problem CHROME_ARGS[EXECUTABLE_ARG_NUM] = browserExecutable; - CHROME_ARGS[PROFILE_ARG_NUM] = "--user-data-dir=\"" + Activator.getDefault().getStateLocation().append("chromeprofile").toOSString() + "\""; + CHROME_ARGS[PROFILE_ARG_NUM] = "--user-data-dir=\"" + getChromeProfilePath() + "\""; CHROME_ARGS[PORT_ARG_NUM] = "--remote-shell-port=" + port; CHROME_ARGS[APP_ARG_NUM] = MessageFormat.format("--app={0}", uri.toASCIIString()); try { - Runtime.getRuntime().exec(CHROME_ARGS, null, - new File(browserExecutable).getParentFile()); + Runtime.getRuntime().exec(CHROME_ARGS, null, null); } catch (IOException e) { launchManager.removeLaunch(launch); StringBuffer commandLine = new StringBuffer(CHROME_ARGS[0]); @@ -109,6 +109,12 @@ } + private String getChromeProfilePath() { + IPath location = ResourcesPlugin.getWorkspace().getRoot().getLocation(); + return location.append(".chrome").toOSString(); + } + + private int findFreePort() { try { final ServerSocket socket = new ServerSocket(0);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.feature/.project Wed Jan 27 15:47:03 2010 -0800 @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.symbian.tools.wrttools.feature</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.pde.FeatureBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.FeatureNature</nature> + </natures> +</projectDescription>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.feature/build.properties Wed Jan 27 15:47:03 2010 -0800 @@ -0,0 +1,1 @@ +bin.includes = feature.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.feature/compile.org.symbian.tools.wrttools.xml Wed Jan 27 15:47:03 2010 -0800 @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="Compile org.symbian.tools.wrttools" default="main"> + <target name="main"> + <ant antfile="build.xml" dir="../org.symbian.tools.wrttools.jseditors" target="build.jars"/> + <ant antfile="build.xml" dir="../org.symbian.tools.wrttools" target="build.jars"/> + <ant antfile="build.xml" dir="../org.symbian.tools.wrttools.previewer" target="build.jars"/> + <ant antfile="build.xml" dir="../org.symbian.tools.wrttools.debug.core" target="build.jars"/> + </target> +</project>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.feature/feature.xml Wed Jan 27 15:47:03 2010 -0800 @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?> +<feature + id="org.symbian.tools.wrttools" + label="WRT Tools Feature" + version="1.0.0.qualifier" + provider-name="Symbian Foundation"> + + <description url="http://www.example.com/description"> + [Enter Feature Description here.] + </description> + + <copyright url="http://www.example.com/copyright"> + [Enter Copyright Description here.] + </copyright> + + <license url="http://www.example.com/license"> + [Enter License Description here.] + </license> + + <requires> + <import feature="org.eclipse.wst.jsdt.feature" version="1.1.2.v200908101420-77-FGCCcNBC-BhLcE_Pm" match="greaterOrEqual"/> + <import plugin="org.chromium.debug.ui"/> + <import plugin="org.chromium.sdk"/> + <import plugin="org.mozilla.xpcom"/> + <import plugin="org.mozilla.xulrunner"/> + <import plugin="org.chromium.debug.core"/> + </requires> + + <plugin + id="org.symbian.tools.wrttools" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + + <plugin + id="org.symbian.tools.wrttools.debug.core" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + + <plugin + id="org.symbian.tools.wrttools.previewer" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + + <plugin + id="org.symbian.tools.wrttools.editors" + download-size="0" + install-size="0" + version="0.0.0"/> + +</feature>
--- a/org.symbian.tools.wrttools.jseditors/META-INF/MANIFEST.MF Wed Jan 27 15:05:37 2010 -0800 +++ b/org.symbian.tools.wrttools.jseditors/META-INF/MANIFEST.MF Wed Jan 27 15:47:03 2010 -0800 @@ -15,7 +15,6 @@ org.eclipse.ui.intro, org.eclipse.ui.intro.universal, org.eclipse.ui.console, - org.eclipse.jdt.ui, org.eclipse.swt, org.eclipse.jface, org.eclipse.ui.workbench
--- a/org.symbian.tools.wrttools.jseditors/src/org/symbian/tools/wrttools/jseditors/perspectives/RelEngPerspective.java Wed Jan 27 15:05:37 2010 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,128 +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: - */ - -/******************************************************************************* - * Copyright (c) 2006 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.symbian.tools.wrttools.jseditors.perspectives; - -import org.eclipse.ui.IFolderLayout; -import org.eclipse.ui.IPageLayout; -import org.eclipse.ui.IPerspectiveFactory; -import org.eclipse.ui.console.IConsoleConstants; -import org.eclipse.jdt.ui.JavaUI; - - -/** - * This class is meant to serve as an example for how various contributions - * are made to a perspective. Note that some of the extension point id's are - * referred to as API constants while others are hardcoded and may be subject - * to change. - */ -public class RelEngPerspective implements IPerspectiveFactory { - - private IPageLayout factory; - - public RelEngPerspective() { - super(); - } - - public void createInitialLayout(IPageLayout factory) { - this.factory = factory; - addViews(); - addActionSets(); - addNewWizardShortcuts(); - addPerspectiveShortcuts(); - addViewShortcuts(); - } - - private void addViews() { - // Creates the overall folder layout. - // Note that each new Folder uses a percentage of the remaining EditorArea. - - IFolderLayout bottom = - factory.createFolder( - "bottomRight", //NON-NLS-1 - IPageLayout.BOTTOM, - 0.75f, - factory.getEditorArea()); - bottom.addView(IPageLayout.ID_PROBLEM_VIEW); - bottom.addView("org.eclipse.team.ui.GenericHistoryView"); //NON-NLS-1 - bottom.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW); - - IFolderLayout topLeft = - factory.createFolder( - "topLeft", //NON-NLS-1 - IPageLayout.LEFT, - 0.25f, - factory.getEditorArea()); - topLeft.addView(IPageLayout.ID_RES_NAV); - topLeft.addView("org.eclipse.jdt.junit.ResultView"); //NON-NLS-1 - - factory.addFastView("org.eclipse.team.ccvs.ui.RepositoriesView",0.50f); //NON-NLS-1 - factory.addFastView("org.eclipse.team.sync.views.SynchronizeView", 0.50f); //NON-NLS-1 - } - - private void addActionSets() { - factory.addActionSet("org.eclipse.debug.ui.launchActionSet"); //NON-NLS-1 - factory.addActionSet("org.eclipse.debug.ui.debugActionSet"); //NON-NLS-1 - factory.addActionSet("org.eclipse.debug.ui.profileActionSet"); //NON-NLS-1 - factory.addActionSet("org.eclipse.jdt.debug.ui.JDTDebugActionSet"); //NON-NLS-1 - factory.addActionSet("org.eclipse.jdt.junit.JUnitActionSet"); //NON-NLS-1 - factory.addActionSet("org.eclipse.team.ui.actionSet"); //NON-NLS-1 - factory.addActionSet("org.eclipse.team.cvs.ui.CVSActionSet"); //NON-NLS-1 - factory.addActionSet("org.eclipse.ant.ui.actionSet.presentation"); //NON-NLS-1 - factory.addActionSet(JavaUI.ID_ACTION_SET); - factory.addActionSet(JavaUI.ID_ELEMENT_CREATION_ACTION_SET); - factory.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET); //NON-NLS-1 - } - - private void addPerspectiveShortcuts() { - factory.addPerspectiveShortcut("org.eclipse.team.ui.TeamSynchronizingPerspective"); //NON-NLS-1 - factory.addPerspectiveShortcut("org.eclipse.team.cvs.ui.cvsPerspective"); //NON-NLS-1 - factory.addPerspectiveShortcut("org.eclipse.ui.resourcePerspective"); //NON-NLS-1 - } - - private void addNewWizardShortcuts() { - factory.addNewWizardShortcut("org.eclipse.team.cvs.ui.newProjectCheckout");//NON-NLS-1 - factory.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//NON-NLS-1 - factory.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//NON-NLS-1 - } - - private void addViewShortcuts() { - factory.addShowViewShortcut("org.eclipse.ant.ui.views.AntView"); //NON-NLS-1 - factory.addShowViewShortcut("org.eclipse.team.ccvs.ui.AnnotateView"); //NON-NLS-1 - factory.addShowViewShortcut("org.eclipse.pde.ui.DependenciesView"); //NON-NLS-1 - factory.addShowViewShortcut("org.eclipse.jdt.junit.ResultView"); //NON-NLS-1 - factory.addShowViewShortcut("org.eclipse.team.ui.GenericHistoryView"); //NON-NLS-1 - factory.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW); - factory.addShowViewShortcut(JavaUI.ID_PACKAGES); - factory.addShowViewShortcut(IPageLayout.ID_RES_NAV); - factory.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW); - factory.addShowViewShortcut(IPageLayout.ID_OUTLINE); - } - -}
--- a/org.symbian.tools.wrttools.previewer/META-INF/MANIFEST.MF Wed Jan 27 15:05:37 2010 -0800 +++ b/org.symbian.tools.wrttools.previewer/META-INF/MANIFEST.MF Wed Jan 27 15:47:03 2010 -0800 @@ -9,7 +9,9 @@ org.eclipse.core.resources;bundle-version="3.5.0", org.eclipse.core.net;bundle-version="1.2.0", org.mozilla.xpcom;bundle-version="1.9.1", - org.eclipse.equinox.http.jetty;bundle-version="2.0.0" + org.eclipse.equinox.http.jetty;bundle-version="2.0.0", + org.eclipse.wst.jsdt.core;bundle-version="1.0.201", + org.eclipse.wst.jsdt.ui;bundle-version="1.0.200" Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Export-Package: org.symbian.tools.wrttools.previewer,
--- a/org.symbian.tools.wrttools.previewer/build.properties Wed Jan 27 15:05:37 2010 -0800 +++ b/org.symbian.tools.wrttools.previewer/build.properties Wed Jan 27 15:47:03 2010 -0800 @@ -6,4 +6,5 @@ preview/,\ preferences.ini,\ icons/,\ - wrt.xml + wrt.xml,\ + http-content/
--- a/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/http/WorkspaceResourcesServlet.java Wed Jan 27 15:05:37 2010 -0800 +++ b/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/http/WorkspaceResourcesServlet.java Wed Jan 27 15:47:03 2010 -0800 @@ -71,7 +71,6 @@ if (contents != null) { copyData(contents, resp.getOutputStream()); } else { - System.err.println(path); resp.setStatus(HttpServletResponse.SC_NOT_FOUND); } } catch (CoreException e) {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/jsdt/WrtContainerInitializer.java Wed Jan 27 15:47:03 2010 -0800 @@ -0,0 +1,25 @@ +package org.symbian.tools.wrttools.previewer.jsdt; + +import org.eclipse.core.runtime.IPath; +import org.eclipse.wst.jsdt.core.IJavaScriptProject; +import org.eclipse.wst.jsdt.core.JsGlobalScopeContainerInitializer; +import org.eclipse.wst.jsdt.core.compiler.libraries.LibraryLocation; + +public class WrtContainerInitializer extends JsGlobalScopeContainerInitializer { + public static final String CONTAINER_ID = "org.symbian.wrt"; + + @Override + public LibraryLocation getLibraryLocation() { + return new WrtLibraryLocation(); + } + + @Override + public String getDescription() { + return "WebRuntime Support Library"; + } + + @Override + public String getDescription(IPath containerPath, IJavaScriptProject project) { + return getDescription(); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/jsdt/WrtLibraryLocation.java Wed Jan 27 15:47:03 2010 -0800 @@ -0,0 +1,60 @@ +package org.symbian.tools.wrttools.previewer.jsdt; + +import java.io.IOException; +import java.net.URL; + +import org.eclipse.core.runtime.FileLocator; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.Path; +import org.eclipse.wst.jsdt.core.compiler.libraries.LibraryLocation; +import org.symbian.tools.wrttools.previewer.PreviewerPlugin; + +public class WrtLibraryLocation implements LibraryLocation { + private static final Path LIBRARIES_PATH = new Path("/preview/script/lib"); + private static final char[][] FILE_NAMES = { + "console.js".toCharArray(), + "device.js".toCharArray(), + "loader.js".toCharArray(), + "menu.js".toCharArray(), + "menuItem.js".toCharArray(), + "systeminfo.js".toCharArray(), + "widget.js".toCharArray(), + }; + + @Override + public char[][] getLibraryFileNames() { + return FILE_NAMES; + } + + @Override + public String getLibraryPath(String name) { + System.out.println(name); + return null; + } + + @Override + public String getLibraryPath(char[] name) { + URL entry = FileLocator.find(PreviewerPlugin.getDefault().getBundle(), LIBRARIES_PATH.append(new String(name)), null); + if (entry != null) { + try { + URL fileURL = FileLocator.toFileURL(entry); + final IPath path = new Path(fileURL.getPath()); + return path.toString(); + } catch (IOException e) { + PreviewerPlugin.log(e); + } + } + return null; + } + + @Override + public IPath getLibraryPathInPlugin() { + return LIBRARIES_PATH; + } + + @Override + public IPath getWorkingLibPath() { + return new Path(getLibraryPath("")); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/jsdt/WrtLibraryWizardPage.java Wed Jan 27 15:47:03 2010 -0800 @@ -0,0 +1,69 @@ +package org.symbian.tools.wrttools.previewer.jsdt; + +import org.eclipse.core.runtime.Path; +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.wst.jsdt.core.IIncludePathEntry; +import org.eclipse.wst.jsdt.core.IJavaScriptProject; +import org.eclipse.wst.jsdt.core.JavaScriptCore; +import org.eclipse.wst.jsdt.internal.ui.wizards.dialogfields.DialogField; +import org.eclipse.wst.jsdt.internal.ui.wizards.dialogfields.LayoutUtil; +import org.eclipse.wst.jsdt.ui.wizards.IJsGlobalScopeContainerPage; +import org.eclipse.wst.jsdt.ui.wizards.IJsGlobalScopeContainerPageExtension; +import org.eclipse.wst.jsdt.ui.wizards.IJsGlobalScopeContainerPageExtension2; +import org.eclipse.wst.jsdt.ui.wizards.NewElementWizardPage; + +/** + * Wizard page for adding IE library support to the project. + */ +public class WrtLibraryWizardPage extends NewElementWizardPage implements + IJsGlobalScopeContainerPage, IJsGlobalScopeContainerPageExtension, + IJsGlobalScopeContainerPageExtension2 { + + private static final String CONTAINER_ID = WrtContainerInitializer.CONTAINER_ID; + + public WrtLibraryWizardPage() { + super("InternetExplorerBrowserLib"); + setTitle("WRT Library"); + // setImageDescriptor(JavaPluginImages.DESC_WIZBAN_ADD_LIBRARY); + } + + public boolean finish() { + return true; + } + + public IIncludePathEntry getSelection() { + System.out + .println("Unimplemented method:BaseLibraryWizardPage.getSelection"); + return null; + } + + public void setSelection(IIncludePathEntry containerEntry) { + } + + public void createControl(Composite parent) { + Composite composite = new Composite(parent, SWT.NONE); + composite.setFont(parent.getFont()); + DialogField field = new DialogField(); + + field + .setLabelText("WRT Library added to Project.\n\n - This library supports WRT APIs for Symbian platform."); + LayoutUtil.doDefaultLayout(composite, new DialogField[] { field }, + false, SWT.DEFAULT, SWT.DEFAULT); + Dialog.applyDialogFont(composite); + setControl(composite); + setDescription("WebRuntime Libraries"); + } + + public void initialize(IJavaScriptProject project, + IIncludePathEntry[] currentEntries) { + // nothing to initialize + } + + public IIncludePathEntry[] getNewContainers() { + IIncludePathEntry library = JavaScriptCore.newContainerEntry(new Path( + CONTAINER_ID)); + return new IIncludePathEntry[] { library }; + } +}
--- a/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preview/PreviewPage.java Wed Jan 27 15:05:37 2010 -0800 +++ b/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preview/PreviewPage.java Wed Jan 27 15:47:03 2010 -0800 @@ -217,7 +217,6 @@ } private void applyProxySettings() { - IProxyService px = PreviewerPlugin.getDefault().getProxyService(); if(px != null){ boolean proxyEnabled = px.isProxiesEnabled();
--- a/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preview/PreviewView.java Wed Jan 27 15:05:37 2010 -0800 +++ b/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preview/PreviewView.java Wed Jan 27 15:47:03 2010 -0800 @@ -183,7 +183,7 @@ } private boolean isWrtProject(IProject project) { - return project.getFile("wrt_preview_main.html").exists(); + return project.getFile("wrt_preview_frame.html").exists(); } private void loadPreferences() {
--- a/org.symbian.tools.wrttools.product/launch/WRT IDE (Product).launch Wed Jan 27 15:05:37 2010 -0800 +++ b/org.symbian.tools.wrttools.product/launch/WRT IDE (Product).launch Wed Jan 27 15:47:03 2010 -0800 @@ -1,32 +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.eclipse.core.databinding@default:default,org.eclipse.help.base@default:default,org.eclipse.team.cvs.ssh@default:default,org.eclipse.epp.package.jee@default:default,org.hamcrest.core@default:default,org.apache.commons.net@default:default,org.eclipse.emf.databinding@default:default,org.jdom@default:default,org.eclipse.wst.jsdt.core@default:default,org.eclipse.team.cvs.ssh2@default:default,org.eclipse.wst.doc.user@default:default,org.eclipse.cvs@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.apache.commons.el@default:default,org.eclipse.equinox.launcher@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.core.resources@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.wst.html.core@default:default,org.eclipse.update.core.linux@default:false,javax.activation*1.1.0.v200906290531@default:default,org.eclipse.wst.common.snippets@default:default,org.eclipse.wst.sse.ui.infopop@default:default,org.eclipse.compare@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.wst.sse.ui@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.wst.command.env@default:default,org.eclipse.wst.css.core@default:default,org.apache.velocity@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.wst.jsdt.web.core@default:default,org.eclipse.wst.jsdt.doc@default:default,org.eclipse.osgi.util@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.equinox.util@default:default,org.mozilla.xulrunner.gtk.linux.x86@default:false,org.eclipse.ui.workbench.compatibility@default:false,org.eclipse.wst.common.infopop@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ui.forms@default:default,org.eclipse.emf.databinding.edit@default:default,org.eclipse.ui.presentations.r21@default:default,org.eclipse.platform.doc.user@default:default,org.eclipse.update.ui@default:default,org.eclipse.core.boot@default:default,org.mozilla.xpcom@default:default,org.eclipse.equinox.http.registry@default:default,com.ibm.icu@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.emf.mapping.ecore2xml@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.apache.commons.lang*2.3.0.v200803061910@default:default,org.eclipse.equinox.jsp.jasper@default:default,java_cup.runtime@default:default,org.eclipse.compare.core@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.p2.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.emf.mapping.ecore2ecore@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.wst.internet.monitor.core@default:default,org.eclipse.update.scheduler@default:default,org.eclipse.wst.jsdt.web.ui@default:default,org.eclipse.wst.xml.xpath2.processor@default:default,org.eclipse.swt@default:default,org.eclipse.swt.gtk.linux.x86@default:false,org.eclipse.wst.command.env.doc.user@default:default,org.eclipse.jsch.ui@default:default,org.eclipse.ui.intro@default:default,com.jcraft.jsch@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.mortbay.jetty.server@default:default,org.eclipse.wst.jsdt.ui@default:default,org.eclipse.wst.common.frameworks.ui@default:default,org.eclipse.wst.validation.infopop@default:default,org.eclipse.core.jobs@default:default,org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.ui.ide@default:default,org.eclipse.wst.html.ui.infopop@default:default,org.eclipse.wst.command.env.infopop@default:default,org.eclipse.ui.externaltools@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.jsch.core@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.wst.jsdt.support.firefox@default:default,org.eclipse.core.net.linux.x86@default:false,org.eclipse.team.cvs.core@default:default,org.eclipse.equinox.launcher.gtk.linux.x86@default:false,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.core.resources.compatibility@default:false,org.eclipse.core.variables@default:default,javax.xml.rpc@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.debug.ui@default:default,org.eclipse.ui.net@default:default,org.eclipse.equinox.p2.console@default:default,org.apache.lucene@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.wst.jsdt.support.ie@default:default,org.apache.commons.codec@default:default,net.sourceforge.lpg.lpgjavaruntime@default:default,org.eclipse.equinox.common@2:true,org.eclipse.emf.ecore.change@default:default,javax.servlet@default:default,org.eclipse.emf.mapping.ui@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.eclipse.gef@default:default,javax.servlet.jsp@default:default,org.eclipse.wst.xml.ui@default:default,org.apache.bcel@default:default,org.eclipse.equinox.p2.reconciler.dropins@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.ui.editors@default:default,org.eclipse.dstore.core@default:default,org.eclipse.team.ui@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.emf@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.p2.publisher@default:default,org.apache.commons.jxpath@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.wst.css.ui@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ecf.filetransfer@default:default,org.apache.commons.logging@default:default,org.eclipse.jface@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.equinox.security@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.emf.mapping.ecore.editor@default:default,javax.transaction@default:false,org.apache.xalan@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.wst.sse.doc.user@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.ui.intro.universal@default:default,org.eclipse.equinox.p2.exemplarysetup@default:default,org.apache.jasper@default:default,org.eclipse.osgi.services@default:default,org.eclipse.ui.workbench@default:default,commonj.sdo@default:default,org.eclipse.core.expressions@default:default,org.apache.lucene.analysis@default:default,org.eclipse.jem@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,javax.xml.bind@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.wst.validation@default:default,org.eclipse.wst.xml.xpath.core@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.emf.common@default:default,org.apache.xml.serializer@default:default,org.eclipse.emf.edit.ui@default:default,org.mozilla.xulrunner@default:default,org.eclipse.jface.text@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.emf.mapping.ecore@default:default,javax.xml.soap@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.wst.standard.schemas@default:default,org.eclipse.core.runtime@default:true,org.eclipse.equinox.simpleconfigurator@1:true,javax.persistence@default:default,org.eclipse.jem.util@default:default,org.eclipse.wst.internet.monitor.ui@default:default,org.eclipse.wst.html.ui@default:default,org.eclipse.core.net@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.dstore.extra@default:default,org.eclipse.wst.xml.ui.infopop@default:default,javax.mail*1.4.0.v200905040518@default:default,org.eclipse.wst.validation.ui@default:default,org.eclipse.emf.ecore.change.edit@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.ui.views@default:default,org.apache.log4j@default:default,org.eclipse.update.configurator@3:true,org.apache.xml.resolver@default:default,org.eclipse.core.filesystem.linux.x86@default:false,org.eclipse.platform@default:default,org.eclipse.ui.browser@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.ui.console@default:default,org.apache.axis@default:default,org.eclipse.wst.xml.xpath.ui@default:default,org.eclipse.debug.core@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.emf.mapping@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,javax.xml@default:default,org.eclipse.wst.internet.cache@default:default,org.eclipse.help.appserver@default:default,org.eclipse.wst.command.env.core@default:default,org.eclipse.equinox.p2.ui.sdk@default:default,org.eclipse.wst.xmleditor.doc.user@default:default,org.eclipse.core.runtime.compatibility@default:default,javax.xml.stream@default:default,org.eclipse.team.cvs.ui@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.wst.common.modulecore@default:default,org.eclipse.help@default:default,org.objectweb.asm@default:default,org.eclipse.ui.views.log@default:default,org.sat4j.core@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.net4j.jms.api@default:default,javax.wsdl@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.wtp.epp.package.jee.intro@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.help.ui@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.update.core@default:default,org.apache.xerces@default:default,org.mortbay.jetty.util@default:default,org.eclipse.core.commands@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.apache.commons.httpclient@default:default,org.eclipse.help.webapp@default:default,org.eclipse.wst.common.ui@default:default,org.eclipse.wst.jsdt.manipulation@default:default,org.eclipse.core.databinding.observable@default:default,org.apache.commons.discovery@default:default,org.eclipse.ui@default:default,org.eclipse.rcp@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.eclipse.team.core@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.search@default:default,org.apache.oro@default:default,org.eclipse.draw2d@default:default,org.sat4j.pb@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.text@default:default,org.eclipse.osgi@-1:true,org.eclipse.equinox.p2.director@default:default,org.apache.commons.collections@default:default,org.eclipse.ecf@default:default"/> -<stringAttribute key="selected_workspace_plugins" value="org.symbian.tools.wrttools.editors@default:default,org.symbian.tools.wrttools.previewer@default:default,org.chromium.sdk@default:default,org.chromium.debug.core@default:default,org.symbian.tools.wrttools.debug.core@default:default,org.symbian.tools.wrttools@default:default,org.symbian.tools.wrttools.product@default:default,org.chromium.debug.ui@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> +<?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.eclipse.wst.jsdt.manipulation@default:default,org.eclipse.equinox.p2.publisher@default:default,org.apache.xerces@default:default,org.apache.commons.logging@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ui@default:default,org.eclipse.wst.validation.infopop@default:default,org.eclipse.wst.validation.ui@default:default,org.eclipse.equinox.p2.ui@default:default,org.mozilla.xpcom@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.wst.command.env.core@default:default,org.eclipse.wst.doc.user@default:default,org.eclipse.wst.html.ui.infopop@default:default,org.eclipse.equinox.launcher.gtk.linux.x86@default:false,org.apache.oro@default:default,org.eclipse.swt.gtk.linux.x86@default:false,org.eclipse.emf.mapping.ecore2ecore@default:default,org.eclipse.wst.internet.monitor.core@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.update.ui@default:default,org.eclipse.wst.common.snippets@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.emf.ecore.change.edit@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.debug.ui@default:default,org.eclipse.compare@default:default,org.eclipse.platform@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.equinox.launcher.win32.win32.x86@default:false,org.eclipse.equinox.registry@default:default,org.eclipse.update.core@default:default,org.eclipse.emf.mapping.ecore.editor@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.draw2d@default:default,org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.apache.axis@default:default,org.eclipse.core.runtime@default:true,net.sourceforge.lpg.lpgjavaruntime@default:default,org.eclipse.team.core@default:default,org.eclipse.core.boot@default:default,org.eclipse.core.variables@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.emf.databinding.edit@default:default,org.eclipse.ui.browser@default:default,org.eclipse.wst.jsdt.core@default:default,org.apache.velocity@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.wst.xmleditor.doc.user@default:default,org.eclipse.core.jobs@default:default,org.eclipse.ui.views@default:default,org.eclipse.compare.core@default:default,org.eclipse.wtp.epp.package.jee.intro@default:default,org.eclipse.equinox.p2.repository@default:default,javax.servlet.jsp@default:default,org.mozilla.xulrunner.win32.win32.x86@default:false,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.mapping@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.platform.doc.user@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,commonj.sdo@default:default,org.apache.commons.httpclient@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.apache.commons.jxpath@default:default,org.eclipse.core.net.linux.x86@default:false,org.eclipse.ui.presentations.r21@default:default,org.eclipse.wst.standard.schemas@default:default,org.eclipse.equinox.launcher.win32.win32.x86_64@default:false,org.eclipse.ui.intro.universal@default:default,org.eclipse.dstore.extra@default:default,org.eclipse.team.cvs.ssh2@default:default,org.eclipse.jsch.core@default:default,org.eclipse.wst.jsdt.doc@default:default,org.eclipse.cvs@default:default,javax.wsdl*1.5.1.v200806030408@default:default,org.apache.jasper@default:default,javax.persistence@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.core.net@default:default,org.apache.xml.resolver@default:default,javax.mail*1.4.0.v200905040518@default:default,org.eclipse.jface@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.equinox.p2.ui.sdk@default:default,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.wst.command.env.infopop@default:default,org.eclipse.emf.mapping.ecore2xml@default:default,org.eclipse.debug.core@default:default,org.eclipse.core.resources.compatibility@default:false,org.eclipse.emf@default:default,javax.transaction@default:false,org.eclipse.team.cvs.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.ecf@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.ui.intro@default:default,org.eclipse.wst.common.core@default:default,org.mortbay.jetty.util@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.wst.common.environment@default:default,com.ibm.icu@default:default,com.jcraft.jsch@default:default,org.eclipse.wst.css.core@default:default,org.eclipse.emf.common@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.common@2:true,org.apache.commons.codec@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.search@default:default,javax.xml.soap@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.ui.ide@default:default,org.eclipse.wst.xml.ui@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.wst.html.ui@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.wst.xml.xpath2.processor@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.jem@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.team.cvs.ssh@default:default,org.apache.commons.lang*2.3.0.v200803061910@default:default,org.eclipse.wst.xml.xpath.ui@default:default,org.eclipse.ui.console@default:default,org.eclipse.net4j.jms.api@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.objectweb.asm@default:default,org.apache.commons.net@default:default,java_cup.runtime@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.epp.package.jee@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.http.jetty@default:default,org.jdom@default:default,org.eclipse.ui.forms@default:default,org.eclipse.wst.jsdt.web.core@default:default,org.eclipse.core.resources@default:default,org.eclipse.wst.html.core@default:default,org.eclipse.ui.views.log@default:default,javax.xml.stream@default:default,org.eclipse.ui.editors@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.wst.validation@default:default,org.eclipse.emf.mapping.ui@default:default,org.eclipse.wst.jsdt.ui@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.equinox.util@default:default,org.eclipse.wst.sse.doc.user@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.team.cvs.core@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.core.filesystem.linux.x86@default:false,javax.xml.bind*2.0.0.v20080604-1500@default:default,org.eclipse.help.webapp@default:default,org.eclipse.text@default:default,org.eclipse.equinox.security@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.wst.sse.ui.infopop@default:default,org.eclipse.wst.internet.cache@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.wst.common.infopop@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.update.core.linux@default:false,org.apache.xml.serializer@default:default,org.apache.commons.collections@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.jem.util@default:default,org.eclipse.wst.common.modulecore@default:default,org.eclipse.osgi.services@default:default,org.eclipse.wst.internet.monitor.ui@default:default,org.eclipse.wst.command.env@default:default,org.apache.bcel@default:default,org.apache.commons.discovery@default:default,javax.wsdl*1.6.2.v200806030405@default:default,javax.servlet@default:default,org.eclipse.core.expressions@default:default,org.apache.lucene@default:default,org.eclipse.wst.css.ui@default:default,org.mozilla.xulrunner@default:default,org.eclipse.equinox.app@default:default,org.eclipse.core.commands@default:default,org.hamcrest.core@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.jface.text@default:default,javax.xml.rpc@default:default,org.eclipse.equinox.p2.reconciler.dropins@default:default,org.eclipse.osgi.util@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,javax.xml.bind*2.1.9.v200905050702@default:default,javax.xml@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.eclipse.wst.xml.ui.infopop@default:default,org.apache.log4j@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.osgi@-1:true,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.help.base@default:default,org.eclipse.wst.xml.core@default:default,org.mortbay.jetty.server@default:default,org.eclipse.help.ui@default:default,org.eclipse.wst.common.ui@default:default,org.eclipse.equinox.concurrent@default:default,org.apache.lucene.analysis@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,javax.activation*1.1.0.v200906290531@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.ui.net@default:default,org.sat4j.pb@default:default,org.eclipse.wst.xml.xpath.core@default:default,org.eclipse.rcp@default:default,org.eclipse.help.appserver@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.emf.databinding@default:default,org.eclipse.wst.command.env.doc.user@default:default,org.eclipse.wst.common.frameworks.ui@default:default,org.eclipse.swt@default:default,org.sat4j.core@default:default,org.eclipse.ui.externaltools@default:default,org.eclipse.dstore.core@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.update.scheduler@default:default,org.eclipse.emf.mapping.ecore@default:default,org.eclipse.wst.jsdt.support.ie@default:default,org.eclipse.wst.sse.ui@default:default,org.eclipse.ui.workbench.compatibility@default:false,org.eclipse.swt.win32.win32.x86@default:false,org.apache.xalan@default:default,org.apache.commons.el@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.team.ui@default:default,org.eclipse.update.configurator@3:true,org.eclipse.equinox.p2.exemplarysetup@default:default,org.eclipse.wst.jsdt.support.firefox@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.gef@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.wst.jsdt.web.ui@default:default,org.eclipse.help@default:default,org.eclipse.jsch.ui@default:default,org.eclipse.emf.ecore@default:default"/> +<stringAttribute key="selected_workspace_plugins" value="org.chromium.debug.core@default:default,org.chromium.sdk@default:default,org.symbian.tools.wrttools@default:default,org.symbian.tools.wrttools.product@default:default,org.symbian.tools.wrttools.debug.core@default:default,org.symbian.tools.wrttools.previewer@default:default,org.chromium.debug.ui@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>
--- a/org.symbian.tools.wrttools.product/wrt-ide.product Wed Jan 27 15:05:37 2010 -0800 +++ b/org.symbian.tools.wrttools.product/wrt-ide.product Wed Jan 27 15:47:03 2010 -0800 @@ -46,7 +46,6 @@ <plugin id="javax.transaction" fragment="true"/> <plugin id="javax.xml"/> <plugin id="javax.xml.stream"/> - <plugin id="javax.xml.ws" fragment=""/> <plugin id="org.apache.bcel"/> <plugin id="org.apache.commons.codec"/> <plugin id="org.apache.commons.collections"/> @@ -73,7 +72,7 @@ <plugin id="org.eclipse.ant.core"/> <plugin id="org.eclipse.compare"/> <plugin id="org.eclipse.compare.core"/> - <plugin id="org.eclipse.compare.win32" fragment=""/> + <plugin id="org.eclipse.compare.win32"/> <plugin id="org.eclipse.core.boot"/> <plugin id="org.eclipse.core.commands"/> <plugin id="org.eclipse.core.contenttype"/> @@ -196,11 +195,9 @@ <plugin id="org.eclipse.osgi.services"/> <plugin id="org.eclipse.osgi.util"/> <plugin id="org.eclipse.platform"/> - <plugin id="org.eclipse.platform.doc.isv" fragment=""/> <plugin id="org.eclipse.platform.doc.user"/> <plugin id="org.eclipse.rcp"/> <plugin id="org.eclipse.search"/> - <plugin id="org.eclipse.servertools.doc.isv" fragment=""/> <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"/> @@ -275,7 +272,6 @@ <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" fragment=""/> <plugin id="org.eclipse.wst.validation.infopop"/> <plugin id="org.eclipse.wst.validation.ui"/> <plugin id="org.eclipse.wst.xml.core"/>
--- a/org.symbian.tools.wrttools/plugin.xml Wed Jan 27 15:05:37 2010 -0800 +++ b/org.symbian.tools.wrttools/plugin.xml Wed Jan 27 15:47:03 2010 -0800 @@ -212,30 +212,35 @@ <insertionPoint name="group.open" separator="true" /> <insertionPoint name="group.openWith" /> <insertionPoint name="group.edit" separator="true" /> - <insertionPoint name="group.reorganize" /> + <insertionPoint name="group.reorganize" separator="true" /> <insertionPoint name="group.port" separator="true" /> <insertionPoint name="group.build" separator="true" /> <insertionPoint name="group.generate" separator="true" /> <insertionPoint name="group.search" separator="true" /> <insertionPoint name="additions" separator="true" /> <insertionPoint name="group.properties" separator="true" /> - </popupMenu> </viewer> <viewerContentBinding viewerId="org.symbian.tools.wrttools.wrtnavigator"> <includes> - <contentExtension pattern="org.eclipse.ui.navigator.resourceContent" /> <contentExtension isRoot="true" pattern="org.symbian.tools.wrttools.navigatorcontent"/> <contentExtension pattern="org.eclipse.ui.navigator.resources.filters.*" /> <contentExtension pattern="org.eclipse.ui.navigator.resources.linkHelper" /> - <contentExtension pattern="org.eclipse.ui.navigator.resources.workingSets" /> </includes> </viewerContentBinding> <viewerActionBinding viewerId="org.symbian.tools.wrttools.wrtnavigator"> <includes> - <actionExtension pattern="org.eclipse.ui.navigator.resources.*" /> + <actionExtension pattern="org.eclipse.ui.navigator.resources.PortingActions" /> + <actionExtension pattern="org.eclipse.ui.navigator.resources.GotoActions" /> + <actionExtension pattern="org.eclipse.ui.navigator.resources.GoIntoActions" /> + <actionExtension pattern="org.eclipse.ui.navigator.resources.NewActions" /> + <actionExtension pattern="org.eclipse.ui.navigator.resources.PropertiesActionProvider" /> + <actionExtension pattern="org.eclipse.ui.navigator.resources.WorkManagementActionProvider" /> + <actionExtension pattern="org.eclipse.ui.navigator.resources.ResourceMgmtActions" /> + <actionExtension pattern="org.eclipse.ui.navigator.resources.UndoRedoActionProvider" /> + <actionExtension pattern="org.eclipse.ui.navigator.resources.WorkingSetActions" /> </includes> </viewerActionBinding> <dragAssistant @@ -316,9 +321,8 @@ </actionProvider> <actionProvider class="org.eclipse.wst.jsdt.internal.ui.navigator.JavaNavigatorActionProvider" - id="org.eclipse.wst.jsdt.ui.navigator.actions.StandardActions" - overrides="org.eclipse.ui.navigator.resources.actions.EditActions"> - <enablement> + id="org.eclipse.wst.jsdt.ui.navigator.actions.StandardActions"> +<!-- <enablement> <or> <and> <instanceof @@ -345,7 +349,7 @@ </count> </adapt> </or> - </enablement> + </enablement>--> </actionProvider> <actionProvider class="org.eclipse.wst.jsdt.internal.ui.navigator.JavaNavigatorRefactorActionProvider"
--- a/org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/dialogs/AptanaProjectSelectionDialog.java Wed Jan 27 15:05:37 2010 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,131 +0,0 @@ -package org.symbian.tools.wrttools.dialogs; - -import java.io.File; -import java.text.MessageFormat; - -import org.eclipse.jface.dialogs.IDialogConstants; -import org.eclipse.jface.dialogs.TitleAreaDialog; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.DirectoryDialog; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Text; -import org.symbian.tools.wrttools.util.ProjectUtils; - -public class AptanaProjectSelectionDialog extends TitleAreaDialog { - private File project; - private Text location; - - public AptanaProjectSelectionDialog(Shell parentShell) { - super(parentShell); - } - - @Override - protected void configureShell(Shell newShell) { - super.configureShell(newShell); - newShell.setText("WebRuntime Tools"); - } - - @Override - protected Control createDialogArea(Composite parent) { - setTitle("Select Aptana WRT Project"); - setMessage("Select an Aptana WRT project or Aptana workspace containing one"); - Composite root = (Composite) super.createDialogArea(parent); - - Composite workingArea = new Composite(root, SWT.NONE); - workingArea.setLayoutData(new GridData(GridData.FILL_BOTH)); - - workingArea.setLayout(new GridLayout(2, false)); - Label label = new Label(workingArea, SWT.NONE); - label.setLayoutData(new GridData(GridData.BEGINNING, - GridData.BEGINNING, false, false, 2, 1)); - label.setText("Specify Aptana project or Aptana workspace location:"); - location = new Text(workingArea, SWT.BORDER); - location.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - location.addModifyListener(new ModifyListener() { - @Override - public void modifyText(ModifyEvent e) { - validate(); - } - }); - - Button browse = new Button(workingArea, SWT.NONE); - browse.setText("Browse..."); - browse.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { - browse(); - } - }); - - location.setText(ProjectUtils.getDefaultAptanaLocation()); - - return root; - } - - @Override - protected void createButtonsForButtonBar(Composite parent) { - super.createButtonsForButtonBar(parent); - validate(); - setErrorMessage(null); - } - - protected void browse() { - DirectoryDialog dialog = new DirectoryDialog(getShell()); - dialog.setFilterPath(location.getText()); - dialog.setMessage("Select Aptana WRT project or workspace"); - dialog.setText("Web Runtime Tools"); - - String string = dialog.open(); - if (string != null) { - location.setText(string); - } - } - - protected void validate() { - String error = null; - File f = new File(location.getText()); - if (f.isDirectory()) { - if (!ProjectUtils.isAptanaProject(f)) { - File[] files = f.listFiles(); - f = null; - for (File file : files) { - if (ProjectUtils.isAptanaProject(file)) { - f = file; - break; - } - } - if (f == null) { - error = MessageFormat.format("{0} is not a WRT project or an Aptana workspace containing WRT projects", location.getText()); - } - } - } else { - error = "Specified folder does not exist"; - } - project = f; - setErrorMessage(error); - Button button = getButton(IDialogConstants.OK_ID); - if (button != null) { - button.setEnabled(error == null); - } - } - - @Override - protected void cancelPressed() { - project = null; - super.cancelPressed(); - } - - public File getProject() { - return project; - } -}
--- a/org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/navigator/WRTNavigatorContentProvider.java Wed Jan 27 15:05:37 2010 -0800 +++ b/org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/navigator/WRTNavigatorContentProvider.java Wed Jan 27 15:47:03 2010 -0800 @@ -6,10 +6,19 @@ import org.eclipse.core.resources.IFolder; 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.IWorkspace; +import org.eclipse.core.resources.IWorkspaceRoot; +import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IPath; import org.eclipse.jface.viewers.ITreeContentProvider; +import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.jface.viewers.Viewer; import org.eclipse.wst.jsdt.core.IJavaScriptElement; import org.eclipse.wst.jsdt.core.IJavaScriptModel; import org.eclipse.wst.jsdt.core.IJavaScriptProject; @@ -20,8 +29,52 @@ public class WRTNavigatorContentProvider extends JavaNavigatorContentProvider implements ITreeContentProvider { + private static final class RootResourceFinder implements + IResourceDeltaVisitor { + public IResource resource = null; - private static final class TreeElementsComparator implements Comparator<Object> { + private IResource getCommonAncestor(IResource r1, IResource r2) { + if (r1 == null) { + return r2; + } + if (r2 == null) { + return null; + } + if (r1.equals(r2)) { + return r1; + } + IPath p1 = r1.getFullPath(); + IPath p2 = r2.getFullPath(); + int l1 = p1.segmentCount(); + int l2 = p2.segmentCount(); + + if (l1 == 0 || l2 == 0) { + return null; + } + int l = Math.min(l1, l2); + do { + p1 = p1.uptoSegment(l); + p2 = p2.uptoSegment(l); + l = l - 1; + } while (l > 0 && (p1 != p2)); + IWorkspaceRoot r = r1.getWorkspace().getRoot(); + return l == 0 ? null : l == 1 ? r.getProject(p1.lastSegment()) : r + .getFolder(p1); + } + + @Override + public boolean visit(IResourceDelta delta) throws CoreException { + if ((delta.getKind() & (IResourceDelta.ADDED | IResourceDelta.REMOVED)) != 0) { + resource = getCommonAncestor(resource, delta.getResource() + .getParent()); + return false; + } + return true; + } + } + + private static final class TreeElementsComparator implements + Comparator<Object> { @Override public int compare(Object o1, Object o2) { IResource res1 = getResource(o1); @@ -33,10 +86,10 @@ } else if (o2 == null) { return 1; } - + boolean isFolder1 = isFolder(res1); boolean isFolder2 = isFolder(res2); - + if (isFolder1 == isFolder2) { return res1.getName().compareTo(res2.getName()); } else if (isFolder1) { @@ -46,37 +99,52 @@ } } - private boolean isFolder(IResource res1) { - return res1.getType() == IResource.FOLDER || res1.getType() == IResource.PROJECT; - } - private IResource getResource(Object o1) { final IResource result; if (o1 instanceof IResource) { result = (IResource) o1; } else if (o1 instanceof IAdaptable) { - result = (IResource) ((IAdaptable) o1).getAdapter(IResource.class); + result = (IResource) ((IAdaptable) o1) + .getAdapter(IResource.class); } else { result = null; } return result; } + + private boolean isFolder(IResource res1) { + return res1.getType() == IResource.FOLDER + || res1.getType() == IResource.PROJECT; + } } - - + + private IResourceChangeListener listener = new IResourceChangeListener() { + @Override + public void resourceChanged(IResourceChangeEvent event) { + RootResourceFinder visitor = new RootResourceFinder(); + try { + event.getDelta().accept(visitor); + } catch (CoreException e) { + Activator.log(e); + refreshViewer(null); + } + refreshViewer(visitor.resource); + } + }; + private Viewer viewer; + @Override - protected Object[] getPackageFragmentRoots(IJavaScriptProject project) - throws JavaScriptModelException { - try { - return filter(project.getProject().members()); - } catch (CoreException e) { - Activator.log(e); + public void dispose() { + if (viewer != null) { + ResourcesPlugin.getWorkspace().removeResourceChangeListener( + listener); } - return new Object[0]; + super.dispose(); } - + private Object[] filter(IResource[] members) { - TreeSet<Object> output = new TreeSet<Object>(new TreeElementsComparator()); + TreeSet<Object> output = new TreeSet<Object>( + new TreeElementsComparator()); for (int i = 0; i < members.length; i++) { IResource resource = members[i]; Object res = resource; @@ -95,7 +163,49 @@ protected Object[] getFolderContent(IFolder folder) throws CoreException { return filter(folder.members()); } - + + @Override + protected Object[] getPackageFragmentRoots(IJavaScriptProject project) + throws JavaScriptModelException { + try { + return filter(project.getProject().members()); + } catch (CoreException e) { + Activator.log(e); + } + return new Object[0]; + } + + @Override + public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { + if (this.viewer == null) { + ResourcesPlugin.getWorkspace().addResourceChangeListener(listener); + } + this.viewer = viewer; + super.inputChanged(viewer, oldInput, newInput); + } + // + // @SuppressWarnings("unchecked") + // @Override + // protected void postAdd(final Object parent, final Object element, + // Collection runnables) { + // final Object p; + // if (element instanceof IProject) { + // p = null; + // } else { + // p = parent; + // } + // runnables.add(new Runnable() { + // @Override + // public void run() { + // if (p != null) { + // ((TreeViewer) viewer).refresh(p); + // } else { + // ((TreeViewer) viewer).refresh(); + // } + // } + // }); + // } + @Override protected void postAdd(Object parent, Object element, Collection runnables) { if (parent instanceof IWorkspace) { @@ -107,31 +217,13 @@ super.postAdd(parent, element, runnables); } } - -// @Override -// public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { -// this.viewer = viewer; -// super.inputChanged(viewer, oldInput, newInput); -// } -// -// @SuppressWarnings("unchecked") -// @Override -// protected void postAdd(final Object parent, final Object element, Collection runnables) { -// final Object p; -// if (element instanceof IProject) { -// p = null; -// } else { -// p = parent; -// } -// runnables.add(new Runnable() { -// @Override -// public void run() { -// if (p != null) { -// ((TreeViewer) viewer).refresh(p); -// } else { -// ((TreeViewer) viewer).refresh(); -// } -// } -// }); -// } + + protected void refreshViewer(final IResource resource) { + viewer.getControl().getDisplay().asyncExec(new Runnable() { + @Override + public void run() { + ((TreeViewer) viewer).refresh(resource); + } + }); + } }
--- a/org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/util/ProjectUtils.java Wed Jan 27 15:05:37 2010 -0800 +++ b/org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/util/ProjectUtils.java Wed Jan 27 15:47:03 2010 -0800 @@ -18,23 +18,15 @@ */ package org.symbian.tools.wrttools.util; -import java.io.BufferedInputStream; +import java.io.ByteArrayInputStream; import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; import java.net.URI; -import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; -import java.util.zip.ZipOutputStream; import javax.swing.filechooser.FileSystemView; import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.ResourcesPlugin; @@ -45,24 +37,14 @@ import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.SubProgressMonitor; -import org.eclipse.jface.window.Window; -import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.PlatformUI; import org.eclipse.ui.statushandlers.StatusManager; import org.eclipse.wst.jsdt.internal.ui.wizards.buildpaths.BuildPathsBlock; -import org.eclipse.wst.sse.core.StructuredModelManager; -import org.eclipse.wst.sse.core.internal.provisional.IModelManager; import org.eclipse.wst.validation.ValidationFramework; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument; -import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel; import org.symbian.tools.wrttools.Activator; -import org.symbian.tools.wrttools.dialogs.AptanaProjectSelectionDialog; -import org.w3c.dom.Element; -import org.w3c.dom.NodeList; public class ProjectUtils { private static final String DEFAULT_APTANA_WORKSPACE = "Aptana Studio Workspace"; - private static final String WRT_PREVIEW_MAIN_HTML = "wrt_preview_main.html"; + private static final String WRT_PREVIEW_MAIN_HTML = "wrt_preview_frame.html"; public static final String PREVIEW_FOLDER = "preview"; public static final String PREVIEW_FRAME_FILE = "wrt_preview_frame.html"; @@ -72,9 +54,9 @@ monitor.beginTask("Create project resources", 20); IWorkspace workspace = ResourcesPlugin.getWorkspace(); IProject project = workspace.getRoot().getProject(name); - ValidationFramework.getDefault().addValidationBuilder(project); BuildPathsBlock.createProject(project, uri, new SubProgressMonitor( monitor, 10)); + ValidationFramework.getDefault().addValidationBuilder(project); BuildPathsBlock.addJavaNature(project, new SubProgressMonitor(monitor, 10)); @@ -89,23 +71,7 @@ } public static void addPreviewer(IProject project, IPath mainHtml) { - URI archive = getPreviewerArchive(); try { - if (archive != null) { - ZipInputStream stream = new ZipInputStream(archive.toURL().openStream()); - ZipEntry entry; - while ((entry = stream.getNextEntry()) != null) { - if (!entry.isDirectory()) { - copyFile(project, entry.getName(), stream, entry.getSize(), new NullProgressMonitor()); - } else { - IFolder folder = project.getFolder(entry.getName()); - if (!folder.exists()) { - folder.create(false, true, new NullProgressMonitor()); - } - } - stream.closeEntry(); - } - } createPreviewerHomePage(project, mainHtml); } catch (IOException e) { StatusManager.getManager().handle(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Unable to add previewer to project")); @@ -114,138 +80,11 @@ } } - @SuppressWarnings("restriction") private static void createPreviewerHomePage(IProject project, IPath mainHtml) throws CoreException, IOException { - IFile file = project.getFile(mainHtml + ".html"); - if (file.exists()) { - IFile newFile = project.getFile(WRT_PREVIEW_MAIN_HTML); - file.copy(newFile.getFullPath(), false, new NullProgressMonitor()); - IModelManager modelManager = StructuredModelManager - .getModelManager(); - IDOMModel model = (IDOMModel) modelManager - .getModelForEdit(newFile); - if (model != null) { - try { - addJS(model); - } finally { - model.releaseFromEdit(); - } - } - } - } - - @SuppressWarnings("restriction") - private static void addJS(IDOMModel model) throws IOException, CoreException { - IDOMDocument document = model.getDocument(); - Element documentElement = document.getDocumentElement(); - if (documentElement != null) { - NodeList elementsByTagName = documentElement.getElementsByTagName("head"); - if (elementsByTagName.getLength() == 1) { // We do not want to handle malformed HTMLs - Element head = (Element) elementsByTagName.item(0); - Element script = document.createElement("script"); - script.setAttribute("language", "JavaScript"); - script.setAttribute("type", "text/javascript"); - script.setAttribute("src", "preview/script/lib/loader.js"); - head.insertBefore(script, head.getFirstChild()); - model.save(); - } - } - } - - private static URI getPreviewerArchive() { - File file = getPreviewerZip(); - if (file.isFile()) { - return file.toURI(); - } - Display display = Display.getDefault(); - display.syncExec(new Runnable() { - @Override - public void run() { - importPreviewer(); - } - }); - if (file.isFile()) { - return file.toURI(); - } - return null; - } - - private static File getPreviewerZip() { - return Activator.getDefault().getStateLocation() - .append("previewer.zip").toFile(); - } - - private static void importPreviewer() { - AptanaProjectSelectionDialog dialog = new AptanaProjectSelectionDialog( - PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell()); - int open = dialog.open(); - if (open == Window.OK) { - File project = dialog.getProject(); - try { - zipPreviewer(project); - } catch (IOException e) { - StatusManager - .getManager() - .handle( - new Status( - IStatus.ERROR, - Activator.PLUGIN_ID, - "Failed to create Web Runtime previewer archive.", - e), StatusManager.SHOW); - } - } - } - - private static void zipPreviewer(File project) throws IOException { - ZipOutputStream stream = new ZipOutputStream(new FileOutputStream( - getPreviewerZip())); - try { - zip(new File(project, PREVIEW_FOLDER), stream, PREVIEW_FOLDER + "/"); - zipFile(new File(project, PREVIEW_FRAME_FILE), - PREVIEW_FRAME_FILE, stream); - } finally { - stream.close(); - } - } - - private static void zip(File folder, ZipOutputStream stream, String path) - throws IOException { - ZipEntry entry = new ZipEntry(path); - stream.putNextEntry(entry); - stream.closeEntry(); - File[] files = folder.listFiles(); - for (File file : files) { - if (file.isFile()) { - zipFile(file, path + file.getName(), stream); - } else { - zip(file, stream, path + file.getName() + "/"); - } - } - } - - private static void zipFile(File file, String zipEntry, - ZipOutputStream stream) throws IOException, FileNotFoundException { - ZipEntry entry = new ZipEntry(zipEntry); - stream.putNextEntry(entry); - BufferedInputStream inputStream = new BufferedInputStream( - new FileInputStream(file)); - try { - copy(inputStream, stream); - } finally { - inputStream.close(); - } - stream.closeEntry(); - } - - private static void copy(InputStream in, OutputStream out) - throws IOException { - byte[] buffer = new byte[131072]; // 128k - should be enough for most - // JS/CSS files - int count; - while ((count = in.read(buffer)) > 0) { - out.write(buffer, 0, count); - } + IFile newFile = project.getFile(WRT_PREVIEW_MAIN_HTML); + newFile.create(new ByteArrayInputStream("Should not be in release!" + .getBytes()), false, new NullProgressMonitor()); } public static String getDefaultAptanaLocation() { @@ -275,17 +114,6 @@ new SubProgressMonitor(monitor, 1)); } - public static void importPreviewer(URI locationURI) { - if (!getPreviewerZip().exists()) { - File file = new File(locationURI); - try { - zipPreviewer(file); - } catch (IOException e) { - Activator.log(e); - } - } - } - public static boolean isAptanaProject(URI locationURI) { return isAptanaProject(new File(locationURI)); }
--- a/org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/wizards/AptanaProjectLocationWizardPage.java Wed Jan 27 15:05:37 2010 -0800 +++ b/org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/wizards/AptanaProjectLocationWizardPage.java Wed Jan 27 15:47:03 2010 -0800 @@ -343,7 +343,7 @@ private static final Collection<String> EXCLUDED; static { - EXCLUDED = new TreeSet<String>(Arrays.asList(".project")); + EXCLUDED = new TreeSet<String>(Arrays.asList(".project", "preview", "wrt_preview_main.html")); } public AptanaProjectLocationWizardPage() { @@ -582,7 +582,6 @@ operation.setCreateContainerStructure(false); operation.run(monitor); } - ProjectUtils.importPreviewer(record.description.getLocationURI()); } catch (CoreException e) { Activator.log(e); return false;