<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension-point id="projectTemplates" name="WRT Project Templates" schema="schema/projectTemplates.exsd"/>
<extension-point id="jsLibraries" name="JavaScript Libraries" schema="schema/jsLibraries.exsd"/>
<!-- Generic Project Builder and Project Natures -->
<!-- Widget Project Nature -->
<extension
id="WidgetProjectNature"
point="org.eclipse.core.resources.natures">
<runtime>
<run class="org.symbian.tools.wrttools.WidgetProjectNature"/>
</runtime>
</extension>
<!-- Widget Project Nature Images -->
<extension
point="org.eclipse.ui.ide.projectNatureImages">
<image
icon="icons/WRT_main_16.png"
id="org.symbian.tools.wrttools.natureImage"
natureId="org.symbian.tools.wrttools.WidgetProjectNature">
</image>
</extension>
<!-- Web Runtime Preferences -->
<extension
point="org.eclipse.core.runtime.preferences">
<initializer class="org.symbian.tools.wrttools.core.deploy.PreferenceInitializer"/>
<initializer
class="org.symbian.tools.wrttools.core.WrtIdeCorePreferences">
</initializer>
</extension>
<!-- WRT Tool Integration (Package, Validate, Include, Exclude Settings)-->
<extension
point="org.eclipse.ui.popupMenus">
<objectContribution
objectClass="org.eclipse.core.resources.IResource"
id="org.symbian.tools.wrttools.widget.wrttool.packageoptions">
<visibility>
<not>
<or>
<objectState name="persistentProperty" value="org.symbian.tools.wrttools.core.packager.exclude"/>
<objectState name="extension" value="plist"/>
<objectClass name="org.eclipse.core.resources.IProject"/>
</or>
</not>
</visibility>
<filter
name="projectNature"
value="org.symbian.tools.wrttools.WidgetProjectNature"/>
<action
class="org.symbian.tools.wrttools.core.packager.ExcludeFileAction"
icon="icons/exclude_archive.gif"
id="org.symbian.tools.wrttools.widget.wrttool.packageoptions.ExcludeFileAction"
label="Exclude From WRT Archive"
menubarPath="org.symbian.tools.wrttools.contextMenuGroupMarker">
</action>
</objectContribution>
<objectContribution
objectClass="org.eclipse.core.resources.IResource"
id="org.symbian.tools.wrttools.widget.wrttool.packageoptions">
<visibility>
<and>
<not>
<objectState name="extension" value="wgz"/>
</not>
<and>
<objectState name="persistentProperty" value="org.symbian.tools.wrttools.core.packager.exclude"/>
<objectState name="projectNature" value="org.symbian.tools.wrttools.WidgetProjectNature"/>
</and>
</and>
</visibility>
<action
class="org.symbian.tools.wrttools.core.packager.IncludeFileAction"
icon="icons/include_archive.gif"
id="org.symbian.tools.wrttools.widget.wrttool.packageoptions.IncludeFileAction"
label="Include in WRT Archive"
menubarPath="org.symbian.tools.wrttools.contextMenuGroupMarker">
</action>
</objectContribution>
</extension>
<!-- CSS Validator -->
<extension id="org.symbian.tools.wrttools.core.cssvalidator"
name="CSS Validator" point="org.eclipse.wst.validation.validatorV2">
<validator build="true"
class="org.symbian.tools.wrttools.core.internal.validation.CssBuildValidator"
manual="true" markerId="org.symbian.tools.wrttools.core.cssValidationMarker"
version="0.0.1">
<include>
<rules>
<contentType exactMatch="false"
id="org.eclipse.wst.css.core.csssource">
</contentType>
</rules>
</include>
</validator>
</extension>
<extension point="org.eclipse.ui.newWizards">
<category id="org.symbian.tools.wrttools.core.category" name="Web Runtime(WRT)">
</category>
<wizard category="org.symbian.tools.wrttools.core.category"
class="org.symbian.tools.wrttools.wizards.WrtWidgetWizard"
finalPerspective="org.symbian.tools.wrttools.mainPerspective"
hasPages="true" icon="icons/WRT_main_16.png"
id="org.symbian.tools.wrttools.core.wrtwidgetwizard" name="Web Runtime Application Project"
project="true">
<description>
Creates a new Symbian WRT application project using one of the provided
templates
</description>
</wizard>
</extension>
<!-- WRT Project Templates -->
<extension point="org.symbian.tools.wrttools.projectTemplates">
<projectTemplate
archive="projecttemplates/basic.zip"
default-css-name="basic"
default-html-name="index"
default-js-name="basic"
icon="icons/main16.gif"
id-pattern="com.{0}.basic.widget"
name="Minimal Project"
order="10">
<description>
This wizard generates an empty widget project with a minimal Info.plist, html,css and js.
</description>
</projectTemplate>
<projectTemplate
archive="projecttemplates/helloWithWRTKit.zip"
default-css-name="HelloWithWRTKit"
default-html-name="index"
default-js-name="HelloWithWRTKit"
icon="icons/WRT_main_16.png"
id-pattern="com.{0}.helloWithWRTKit.widget"
name="Hello World Project"
order="1"
wizard-page-factory="org.symbian.tools.wrttools.wizards.HelloWithWRTKitProjectDetailsWizardPage$Factory">
<description>
This wizard generates a basic Hello project with a minimal Info.plist, html,css and js along with WRTKit.
</description>
<requires-library>org.symbian.wrtkit</requires-library>
</projectTemplate>
<projectTemplate
archive="projecttemplates/flickr.zip"
default-css-name="Flickr"
default-html-name="index"
default-js-name="Flickr"
icon="icons/flickr.gif"
id-pattern="com.{0}.flickr.widget"
name="Flickr Project"
order="2"
wizard-page-factory="org.symbian.tools.wrttools.wizards.FlickrProjectDetailsWizardPage$Factory">
<description>
This wizard generates an Flickr project with a minimal Info.plist, html,css and js and WRTKit.
</description>
<requires-library>org.symbian.wrtkit</requires-library>
</projectTemplate>
<projectTemplate
archive="projecttemplates/rssreader.zip"
default-css-name="RSSReader"
default-html-name="index"
default-js-name="RSSReader"
icon="icons/rss.gif"
id-pattern="com.{0}.rssreader.widget"
name="RSS Reader Project"
order="3"
wizard-page-factory="org.symbian.tools.wrttools.wizards.RssReaderProjectDetailsWizardPage$Factory">
<description>
This wizard generates an RSS Reader project with a minimal Info.plist, html,css and js and WRTKit.
</description>
<requires-library>org.symbian.wrtkit</requires-library>
</projectTemplate>
<projectTemplate
archive="projecttemplates/uitemplate.zip"
default-css-name="basic"
default-html-name="index"
default-js-name="basic"
icon="icons/main16.gif"
id-pattern="com.{0}.basic.widget"
order="4"
name="Various UI Templates">
<description>
Includes templates for high-end devices from Forum.Nokia.
</description>
</projectTemplate>
</extension>
<!-- Import Wizard -->
<extension point="org.eclipse.ui.importWizards">
<category id="org.symbian.tools.wrttools.import" name="Web Runtime (WRT)">
</category>
<wizard category="org.symbian.tools.wrttools.import"
class="org.symbian.tools.wrttools.wizards.projectimport.WrtProjectsImportWizard"
icon="icons/import_aptana_project.gif" id="org.symbian.tools.wrttools.import.projectImport"
name="Existing WRT Projects into Workspace">
<description>
Import WRT project created in Aptana, Adobe Dreamweaver or WRT IDE
</description>
</wizard>
<wizard
category="org.symbian.tools.wrttools.import"
class="org.symbian.tools.wrttools.wizards.WgzImportWizard"
icon="icons/import_16x16px.png"
id="org.symbian.tools.wrttools.importwgz"
name="Application Archive (WGZ)">
<description>
Create WRT project from deployable WGZ application archive
</description>
</wizard>
</extension>
<!-- WRT Content Descriptor (.plist) file -->
<extension point="org.eclipse.core.contenttype.contentTypes">
<content-type base-type="org.eclipse.core.runtime.xml"
file-extensions="plist" id="org.symbian.tools.wrttools.contenttype.plist"
name="WebRuntime Descriptor File" priority="normal">
</content-type>
</extension>
<!-- Perspective Extensions -->
<extension point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension targetID="org.eclipse.wst.jsdt.ui.JavaPerspective">
<newWizardShortcut id="org.symbian.tools.wrttools.core.wrtwidgetwizard">
</newWizardShortcut>
</perspectiveExtension>
<perspectiveExtension targetID="org.eclipse.debug.ui.DebugPerspective">
<newWizardShortcut id="org.symbian.tools.wrttools.core.wrtwidgetwizard">
</newWizardShortcut>
</perspectiveExtension>
</extension>
<!-- Navigator Extensions -->
<extension point="org.eclipse.ui.views">
<view allowMultiple="false" category="org.symbian.tools.wrttools.views"
class="org.eclipse.ui.navigator.CommonNavigator" icon="icons/main16.gif"
id="org.symbian.tools.wrttools.wrtnavigator" name="Projects"
restorable="true">
</view>
<category id="org.symbian.tools.wrttools.views" name="Tools for Mobile Web">
</category>
</extension>
<extension point="org.eclipse.ui.navigator.viewer">
<viewer viewerId="org.symbian.tools.wrttools.wrtnavigator">
<popupMenu allowsPlatformContributions="true"
id="org.eclipse.ui.navigator.ProjectExplorer#PopupMenu">
<insertionPoint name="group.new" />
<insertionPoint name="group.open" separator="true" />
<insertionPoint name="group.openWith" />
<insertionPoint name="group.edit" separator="true" />
<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
isRoot="true"
pattern="org.symbian.tools.wrttools.navigatorcontent"/>
<contentExtension pattern="org.eclipse.ui.navigator.resources.filters.*" />
<contentExtension
isRoot="true"
pattern="org.symbian.tools.wrttools.wrtLinkHelper"/>
</includes>
</viewerContentBinding>
<viewerActionBinding viewerId="org.symbian.tools.wrttools.wrtnavigator">
<includes>
<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
class="org.eclipse.ui.navigator.resources.ResourceDragAdapterAssistant"
viewerId="org.symbian.tools.wrttools.wrtnavigator" />
</extension>
<extension
point="org.eclipse.ui.navigator.navigatorContent">
<navigatorContent
activeByDefault="true"
contentProvider="org.symbian.tools.wrttools.navigator.WRTNavigatorContentProvider"
icon="icons/main16.gif"
id="org.symbian.tools.wrttools.navigatorcontent"
labelProvider="org.eclipse.wst.jsdt.internal.ui.navigator.JavaNavigatorLabelProvider"
name="WRT Elements"
priority="high"
providesSaveables="false">
<triggerPoints>
<or>
<instanceof
value="org.eclipse.wst.jsdt.core.IJavaScriptElement">
</instanceof>
<instanceof
value="org.eclipse.wst.jsdt.core.IJarEntryResource">
</instanceof>
<instanceof
value="org.eclipse.wst.jsdt.internal.ui.packageview.PackageFragmentRootContainer">
</instanceof>
<instanceof
value="org.eclipse.wst.jsdt.ui.ProjectLibraryRoot">
</instanceof>
<instanceof
value="org.eclipse.core.resources.IResource">
</instanceof>
<adapt
type="org.eclipse.core.resources.IProject">
<test
property="org.eclipse.core.resources.projectNature"
value="org.symbian.tools.wrttools.WidgetProjectNature">
</test>
</adapt>
</or>
</triggerPoints>
<possibleChildren>
<or>
<instanceof
value="org.eclipse.core.resources.IResource">
</instanceof>
<instanceof
value="org.eclipse.wst.jsdt.core.IJavaScriptElement">
</instanceof>
<instanceof
value="org.eclipse.wst.jsdt.core.IJarEntryResource">
</instanceof>
<instanceof
value="org.eclipse.wst.jsdt.ui.ProjectLibraryRoot">
</instanceof>
</or>
</possibleChildren>
<actionProvider
class="org.eclipse.wst.jsdt.internal.ui.navigator.JavaNavigatorActionProvider"
id="org.eclipse.wst.jsdt.ui.navigator.actions.StandardActions">
</actionProvider>
<actionProvider
class="org.eclipse.wst.jsdt.internal.ui.navigator.JavaNavigatorRefactorActionProvider"
id="org.eclipse.wst.jsdt.ui.navigator.actions.RefactorActions"
overrides="org.eclipse.ui.navigator.resources.actions.RefactorActions">
<enablement>
<or>
<adapt
type="java.util.Collection">
<count
value="0">
</count>
</adapt>
<and>
<or>
<instanceof
value="org.eclipse.wst.jsdt.core.IJavaScriptElement">
</instanceof>
<instanceof
value="org.eclipse.wst.jsdt.core.IJarEntryResource">
</instanceof>
</or>
<not>
<instanceof
value="org.eclipse.wst.jsdt.core.ITypeRoot">
</instanceof>
</not>
</and>
</or>
</enablement>
</actionProvider>
<actionProvider
class="org.symbian.tools.wrttools.navigator.RenameMoveActionProvider"
id="org.symbian.wrttools.navigator.MoveRename"
overrides="org.eclipse.ui.navigator.resources.actions.RefactorActions">
<enablement>
<and>
<adapt
type="org.eclipse.core.resources.IResource">
</adapt>
<not>
<instanceof
value="org.eclipse.wst.jsdt.core.IType">
</instanceof>
</not>
</and>
</enablement>
</actionProvider>
<actionProvider
class="org.eclipse.wst.jsdt.internal.ui.navigator.PackageExplorerOpenActionProvider"
id="org.eclipse.wst.jsdt.ui.navigator.actions.OpenActions"
overrides="org.eclipse.ui.navigator.resources.OpenActions">
</actionProvider>
<override
policy="InvokeAlwaysRegardlessOfSuppressedExt"
suppressedExtensionId="org.eclipse.ui.navigator.resourceContent">
</override>
<commonWizard
type="import"
wizardId="org.symbian.tools.wrttools.importwgz">
<enablement>
<or>
<adapt
type="org.eclipse.core.resources.IResource">
</adapt>
<adapt
type="java.util.Collection">
</adapt>
</or>
</enablement>
</commonWizard>
<commonWizard
menuGroupId="group.new.z"
type="new"
wizardId="org.symbian.tools.wrttools.core.wrtwidgetwizard">
<enablement>
<or>
<adapt
type="org.eclipse.core.resources.IResource">
</adapt>
<adapt
type="java.util.Collection">
</adapt>
</or>
</enablement>
</commonWizard>
<commonWizard
type="new"
wizardId="org.eclipse.wst.html.ui.internal.wizard.NewHTMLWizard">
<enablement>
<adapt
type="org.eclipse.core.resources.IResource">
</adapt>
</enablement>
</commonWizard>
<commonWizard
menuGroupId="group.new.generic"
type="new"
wizardId="org.eclipse.ui.wizards.new.folder">
<enablement>
<adapt
type="org.eclipse.core.resources.IResource">
</adapt>
</enablement>
</commonWizard>
<commonWizard
menuGroupId="group.new.generic"
type="new"
wizardId="org.eclipse.ui.wizards.new.file">
<enablement>
<adapt
type="org.eclipse.core.resources.IResource">
</adapt>
</enablement>
</commonWizard>
<commonWizard
type="new"
wizardId="org.eclipse.wst.css.ui.internal.wizard.NewCSSWizard">
<enablement>
<adapt
type="org.eclipse.core.resources.IResource">
</adapt>
</enablement>
</commonWizard>
<commonWizard
type="new"
wizardId="org.eclipse.wst.jsdt.ui.NewJSWizard">
<enablement>
<adapt
type="org.eclipse.core.resources.IResource">
</adapt>
</enablement>
</commonWizard>
<commonWizard
type="import"
wizardId="org.symbian.tools.wrttools.import.projectImport">
<enablement>
<or>
<adapt
type="org.eclipse.core.resources.IResource">
</adapt>
<adapt
type="java.util.Collection">
</adapt>
</or>
</enablement>
</commonWizard>
<dropAssistant
class="org.eclipse.wst.jsdt.internal.ui.navigator.JavaDropAdapterAssistant"
id="org.eclipse.wst.jsdt.ui.dropAssistant">
<possibleDropTargets>
<or>
<instanceof
value="org.eclipse.core.resources.IResource">
</instanceof>
<instanceof
value="org.eclipse.wst.jsdt.core.IJavaScriptElement">
</instanceof>
</or>
</possibleDropTargets>
</dropAssistant>
<commonSorter
class="org.symbian.tools.wrttools.navigator.NavigatorSorter"
id="org.symbian.tools.wrttools.sorter">
</commonSorter>
</navigatorContent>
</extension>
<extension
point="org.eclipse.wst.jsdt.core.JsGlobalScopeContainerInitializer">
<JsGlobalScopeContainerInitializer
class="org.symbian.tools.wrttools.core.libraries.WrtLibInitializer"
id="org.symbian.wrt">
</JsGlobalScopeContainerInitializer>
</extension>
<extension
point="org.eclipse.wst.jsdt.ui.JsGlobalScopeContainerPage">
<JsGlobalScopeContainerPage
name="Tools for Mobile Web"
class="org.symbian.tools.wrttools.wizards.WrtLibraryWizardPage"
id="org.symbian.wrt">
</JsGlobalScopeContainerPage>
</extension>
<extension
id="org.symbian.tools.wrttools.core.plistvalidator"
name="WRT Application Descriptor Validator"
point="org.eclipse.wst.validation.validatorV2">
<validator
build="true"
class="org.symbian.tools.wrttools.core.internal.validation.WrtApplicationValidator"
manual="true"
markerId="org.symbian.tools.wrttools.core.cssValidationMarker"
version="0.0.1">
<include>
<rules>
<projectNature
id="org.symbian.tools.wrttools.WidgetProjectNature">
</projectNature>
</rules>
</include>
</validator>
</extension>
<extension
point="org.eclipse.ui.keywords">
<keyword
id="org.symbian.tools.wrttools.wrtwords"
label="wrt, webruntime, web runtime, cwrt widget">
</keyword>
</extension>
<extension
point="org.eclipse.ui.navigator.linkHelper">
<linkHelper
class="org.symbian.tools.wrttools.navigator.WrtNavigatorLinkHelper"
id="org.symbian.tools.wrttools.wrtLinkHelper">
<editorInputEnablement>
<adapt
type="org.eclipse.ui.IFileEditorInput">
</adapt>
</editorInputEnablement>
<selectionEnablement>
<or>
<adapt
type="org.eclipse.wst.jsdt.core.IJavaScriptElement">
</adapt>
<instanceof
value="java.util.Collection">
</instanceof>
<adapt
type="org.eclipse.core.resources.IResource">
</adapt>
</or>
</selectionEnablement>
</linkHelper>
</extension>
<extension
id="org.symbian.tools.wrttools.platformservices"
name="Platform Services Inferrence Support"
point="org.eclipse.wst.jsdt.core.inferrenceSupport">
<inferenceProvider
class="org.symbian.tools.wrttools.core.libraries.PlatformServicesTypeProvider">
</inferenceProvider>
</extension>
<extension
point="org.eclipse.ui.commands">
<category
id="org.symbian.tools.wrttools.commands.maincategory"
name="Tools for Mobile Web">
</category>
<command
categoryId="org.symbian.tools.wrttools.commands.maincategory"
description="Deploys an application to phone or emulator"
id="org.symbian.tools.wrttools.commands.deploy"
name="Deploy Application">
</command>
<command
categoryId="org.symbian.tools.wrttools.commands.maincategory"
description="Packages an application for distribution or deployment"
id="org.symbian.tools.wrttools.commands.package"
name="Package Application">
</command>
<command
categoryId="org.symbian.tools.wrttools.commands.maincategory"
defaultHandler="org.symbian.tools.wrttools.handlers.AddJSLibrary"
description="Adds JavaScript libraries to Mobile Web projects"
id="org.symbian.tools.wrttools.addlibrary"
name="Add JavaScript Libraries...">
</command>
</extension>
<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="toolbar:org.eclipse.ui.main.toolbar">
<toolbar
id="org.symbian.tools.wrttools">
<command
commandId="org.symbian.tools.wrttools.commands.deploy"
icon="icons/deploy_widget.gif"
id="org.symbian.tools.wrttools.toolbars.deploy">
</command>
<command
commandId="org.symbian.tools.wrttools.commands.package"
icon="icons/package_widget.gif"
id="org.symbian.tools.wrttools.toolbars.package">
</command>
</toolbar>
</menuContribution>
<menuContribution
locationURI="menu:project?after=additions">
<separator
name="org.symbian.tools.wrttools.beginwert"
visible="true">
</separator>
<command
commandId="org.symbian.tools.wrttools.addlibrary"
id="org.symbian.tools.wrttools.toolbars.addlibrary"
style="push">
</command>
<separator
name="org.symbian.tools.wrttools.deploypackage"
visible="true">
</separator>
<command
commandId="org.symbian.tools.wrttools.commands.deploy"
icon="icons/deploy_widget.gif"
id="org.symbian.tools.wrttools.toolbars.deploy">
</command>
<command
commandId="org.symbian.tools.wrttools.commands.package"
icon="icons/package_widget.gif"
id="org.symbian.tools.wrttools.toolbars.package">
</command>
<separator
name="org.symbian.tools.wrttools.endwrt"
visible="true">
</separator>
</menuContribution>
<menuContribution
locationURI="popup:org.eclipse.ui.popup.any?after=sourceMenuId">
<separator
name="org.symbian.tools.wrttools.beginwert"
visible="true">
</separator>
<command
commandId="org.symbian.tools.wrttools.commands.deploy"
icon="icons/deploy_widget.gif"
id="org.symbian.tools.wrttools.toolbars.deploy">
<visibleWhen>
<and>
<iterate
ifEmpty="false"
operator="and">
<adapt
type="org.eclipse.core.resources.IProject">
</adapt>
</iterate>
<count
value="1">
</count>
</and>
</visibleWhen>
</command>
<command
commandId="org.symbian.tools.wrttools.commands.package"
icon="icons/package_widget.gif"
id="org.symbian.tools.wrttools.toolbars.package">
<visibleWhen>
<and>
<iterate
ifEmpty="false"
operator="and">
<adapt
type="org.eclipse.core.resources.IProject">
</adapt>
</iterate>
<count
value="1">
</count>
</and>
</visibleWhen>
</command>
<separator
name="org.symbian.tools.wrttools.endwrt"
visible="true">
</separator>
</menuContribution>
<menuContribution
locationURI="popup:org.eclipse.ui.popup.any?after=group.build">
<dynamic
class="org.symbian.tools.wrttools.core.libraries.AddLibraryPopupMenu$LibrariesPopupMenu"
id="org.symbian.tools.wrttools.addlibrary">
<visibleWhen>
<and>
<iterate
ifEmpty="false"
operator="and">
<adapt
type="org.eclipse.core.resources.IProject">
<test
property="org.eclipse.core.resources.projectNature"
value="org.symbian.tools.wrttools.WidgetProjectNature">
</test>
</adapt>
</iterate>
<count
value="1">
</count>
</and>
</visibleWhen>
</dynamic>
<separator
name="org.symbian.tools.wrttools.libs"
visible="true">
</separator>
</menuContribution>
</extension>
<extension
point="org.eclipse.ui.handlers">
<handler
class="org.symbian.tools.wrttools.handlers.DeployHandler"
commandId="org.symbian.tools.wrttools.commands.deploy">
<enabledWhen>
<reference
definitionId="org.symbian.tools.wrttools.symbianproject">
</reference>
</enabledWhen>
</handler>
<handler
class="org.symbian.tools.wrttools.handlers.PackageApplicationHandler"
commandId="org.symbian.tools.wrttools.commands.package">
<enabledWhen>
<reference
definitionId="org.symbian.tools.wrttools.symbianproject">
</reference>
</enabledWhen>
</handler>
</extension>
<extension
point="org.eclipse.core.expressions.definitions">
<definition
id="org.symbian.tools.wrttools.symbianproject">
<or>
<with
variable="selection">
<and>
<count
value="1">
</count>
<iterate>
<adapt
type="org.eclipse.core.resources.IResource">
<test
property="org.eclipse.core.resources.projectNature"
value="org.symbian.tools.wrttools.WidgetProjectNature">
</test>
</adapt>
</iterate>
</and>
</with>
<and>
<with
variable="activePart">
<instanceof
value="org.eclipse.ui.IEditorPart">
</instanceof>
</with>
<with
variable="activeEditorInput">
<adapt
type="org.eclipse.core.resources.IResource">
</adapt>
</with>
</and>
</or>
</definition>
</extension>
<extension
point="org.eclipse.ui.decorators">
<decorator
adaptable="true"
class="org.symbian.tools.wrttools.navigator.PackagingInformationDecorator"
icon="icons/main16.gif"
id="org.symbian.tools.wrttools.packagingDeclarator"
label="WebRuntime Packaging Information"
lightweight="true"
location="TOP_RIGHT"
objectClass="org.eclipse.core.resources.IResource"
state="true">
</decorator>
</extension>
<extension
id="org.symbian.tools.wrttools.excluded"
name="Excluded from Mobile Web packaging marker"
point="org.eclipse.core.resources.markers">
<persistent
value="true">
</persistent>
</extension>
<extension
point="org.symbian.tools.wrttools.jsLibraries">
<library
icon="icons/main16_prev.gif"
id="org.symbian.wrtkit"
installer="org.symbian.tools.wrttools.core.libraries.WRTKitInstaller"
name="WRTKit">
</library>
<library
icon="icons/phonegap.png"
id="phonegap"
installer="org.symbian.tools.wrttools.core.libraries.PhoneGapInstaller"
name="PhoneGap">
</library>
</extension>
<extension
id="org.symbian.tools.wrttools.phonegap"
name="PhoneGap Library Support"
point="org.eclipse.wst.jsdt.core.inferrenceSupport">
<inferenceProvider
class="org.symbian.tools.wrttools.core.libraries.jsdt.PhoneGapInferrenceProvider">
</inferenceProvider>
</extension>
<extension
point="org.eclipse.ltk.core.refactoring.renameParticipants">
<renameParticipant
class="org.symbian.tools.wrttools.core.project.ProjectRenameParticipant"
id="org.symbian.tools.wrttools.renameParticipant1"
name="WRT Projects Rename Participant">
<enablement>
<with variable="affectedNatures">
<iterate operator="or">
<equals value="org.symbian.tools.wrttools.WidgetProjectNature"/>
</iterate>
</with>
<with variable="element">
<adapt
type="org.eclipse.core.resources.IProject">
</adapt>
</with>
</enablement>
</renameParticipant>
</extension>
<extension
point="org.eclipse.ui.editors.templates">
<include
file="templates/default-templates.xml">
</include>
</extension>
<extension
point="org.eclipse.wst.common.snippets.SnippetContributions">
<category
description="WRT-specific JavaScript snippets"
id="org.symbian.tools.wrttools.wrtsnippets"
label="Symbian Web Runtime"
smallicon="icons/main16.gif"
contenttypes="org.eclipse.wst.jsdt.core.jsSource">
<item
class="org.symbian.tools.wrttools.util.SnippetInsertion"
description="Retrieves list of the contacts"
id="org.symbian.tools.wrttools.contacts"
label="Get contacts">
<content>
var contactService = device.getServiceObject("Service.Contact",
"IDataSource");
var result = contactService.IDataSource.GetList(
{ Type : "Contact", Sort : { Order : "Ascending" } }
);
if (result.ErrorCode == 0) {
var contacts = result.ReturnValue;
for ( var contact = contacts.getNext(); contact != null; contact = contacts.getNext()) {
var firstName = contact.FirstName;
var lastName = contact.LastName;
var mobile = contact.MobilePhoneGen;
var landPhone = contact.LandPhoneGen;
var jobTitle = contact.JobTitle;
// Consult WRT documentation for other possible fields
// TODO Process contact information
}
} else {
var errorCode = result.ErrorCode;
var errorMessage = result.ErrorMessage;
// TODO Cannot retrieve contacts list
}
</content>
</item>
<item
class="org.symbian.tools.wrttools.util.SnippetInsertion"
description="This function can be used as a callback in GetLocation and Trace calls to location service."
id="org.symbian.tools.wrttools.location"
label="Location callback">
<content>
// This function can be passed as a callback to locationService.ILocation
// GetLocation or Trace method
function locationUpdated(transactionId, code, result) {
if (result.ErrorCode == 0) {
var longitude = result.ReturnValue.Longitude; // Longitude estimate in degrees. The value range is [+180, -180].
var latitude = result.ReturnValue.Latitude; // Latitude estimate in degrees. The value range is [+90, -90].
var altitude = result.ReturnValue.Altitude; // Elevation estimate in meters relative to the WGS 84 datum.
var satelliteNumView = result.ReturnValue.SatelliteNumView; // Number of satellites currently in view.
var satelliteNumViewUsed = result.ReturnValue.SatelliteNumViewUsed; // Number of satellites used to obtain the location fix.
var horizontalSpeed = result.ReturnValue.HorizontalSpeed; // Horizontal speed estimate in meters per second. This is the speed of the device at the time the location fix was obtained.
var horizontalSpeedError = result.ReturnValue.HorizontalSpeedError; // Horizontal speed error in meters per second.
var trueCourse = result.ReturnValue.TrueCourse; // Current direction of movement in degrees in relation to true north.
var trueCourseError = result.ReturnValue.TrueCourseError; // TrueCourse error in degrees.
var magneticHeading = result.ReturnValue.MagneticHeading; // Current direction of movement in degrees in relation to magnetic north.
var magneticHeadingError = result.ReturnValue.MagneticHeadingError; // MagneticHeading error in degrees.
var heading = result.ReturnValue.Heading; // Current instantaneous direction of movement in degrees in relation to true north.
var headingError = result.ReturnValue.HeadingError; // Heading error in degrees.
var magneticCourse = result.ReturnValue.MagneticCourse; // Current instantaneous direction of movement in degrees in relation to magnetic north.
var magneticCourseError = result.ReturnValue.MagneticCourseError; // MagneticCourse error in degrees
// TODO Location information was received
} else {
var errorCode = result.ErrorCode;
var errorMessage = result.ErrorMessage;
// TODO Failed to retrieve location information
}
} </content>
</item>
<item
class="org.symbian.tools.wrttools.util.SnippetInsertion"
description="Sends SMS message"
id="org.symbian.tools.wrttools.dial"
label="Send SMS message">
<content>
var phoneNumber = "+6505551214";
var text = "Sent from WRT application";
var messaging = device.getServiceObject("Service.Messaging", "IMessaging");
var result = messaging.IMessaging.Send({ MessageType : "SMS", To : phoneNumber, BodyText : text });
if (result.ErrorCode != null) {
var errorCode = result.ErrorCode;
var errorMessage = result.ErrorMessage;
// TODO Cannot send SMS message
}
</content>
</item>
<item
class="org.symbian.tools.wrttools.util.SnippetInsertion"
description="Use this code to track battery status"
id="org.symbian.tools.wrttools.battery"
label="Watch battery status">
<content>
function watchBatteryNotifications() {
var sysInfo = device.getServiceObject("Service.SysInfo", "ISysInfo");
var result = sysInfo.ISysInfo.GetNotification( {
Entity : "Battery",
Key : "BatteryStrength"
}, batteryUpdated);
if (result.ErrorCode == 0) {
var transactionId = result.TransactionID;
// TODO Use this ID to cancel notifications
} else {
var message = result.ErrorMessage;
// TODO Process error
}
}
function batteryUpdated(tId, code, result) {
if (result.ErrorCode == 0) {
var batteryStatus = result.ReturnValue.Status;
// TODO Process battery charge level
} else {
var message = result.ErrorMessage;
// TODO Process error
}
}
</content>
</item>
<item
class="org.symbian.tools.wrttools.util.SnippetInsertion"
description="Use this code to track acceleration, orientation or rotation changes"
id="org.symbian.tools.wrttools.sensor"
label="Watch sensor notifications">
<content>
// Call this function to add a callback that will be notified of orientation changes
function watchSensorNotifications() {
var sensors = device.getServiceObject("Service.Sensor", "ISensor");
var SensorParams = {
SearchCriterion : "Orientation" // TODO Possible values (one of):
// SearchCriterion : "All"
// SearchCriterion : "AccelerometerAxis"
// SearchCriterion : "AccelerometerDoubleTapping"
// SearchCriterion : "Rotation"
};
var result = sensors.ISensor.FindSensorChannel(SensorParams);
if (result.ErrorCode != 0) {
var errorCode = result.ErrorCode;
var errorMessage = result.ErrorMessage;
// TODO Handle error
return null;
}
// TODO Function named "sensorCallback" will be called when device orientation changes. This function should be created.
var result2 = sensors.ISensor.RegisterForNotification(
{ ChannelInfoMap : result.ReturnValue[0],
ListeningType : "ChannelData" }, sensorCallback);
if (result.ErrorCode == 0) {
var transactionId = result.TransactionID;
// TODO Use this transaction ID to cancel notifications when watching orientation is no longer needed
return transactionId;
} else {
var errorCode = result.ErrorCode;
var errorMessage = result.ErrorMessage;
// TODO Handle error
return null;
}
}
// This function can be passed as callback to
// sensors.ISensor.RegisterForNotification method
function sensorCallback(transactionId, code, result) {
if (result.ErrorCode == 0) {
// TODO Process notification
var dataType = result.ReturnValue.DataType; // One of: "AxisData", "DoubleTappingData", "OrientationData" or "RotationData"
var orientation = result.ReturnValue.DeviceOrientation; // Orientation
// var xAxis = result.ReturnValue.XAxisData; // Accelerometer
// var yAxis = result.ReturnValue.YAxisData; // Accelerometer
// var zAxis = result.ReturnValue.ZAxisData; // Accelerometer
// var direction = result.ReturnValue.DeviceDirection; // Accelerometer double tapping
// var xRotation = result.ReturnValue.XRotation; // Rotation
// var yRotation = result.ReturnValue.YRotation; // Rotation
// var zRotation = result.ReturnValue.ZRotation; // Rotation
} else {
var errorCode = result.ErrorCode;
var errorMessage = result.ErrorMessage;
// TODO Handle error
}
}
</content>
</item>
</category>
<category
description="Snippets using PhoneGap APIs"
id="org.symbian.tools.wrttools.phonegapsnippets"
label="PhoneGap"
smallicon="icons/phonegap.png">
<item
class="org.symbian.tools.wrttools.util.SnippetInsertion"
description="Accepts accerelometer data"
id="org.symbian.tools.wrttools.phonegap.accererometer"
label="Accelerometer callback">
<content>
// This callback can be passed as a successCallback argument to
// navigator.accelerometer getCurrentAcceleration and watchAcceleration methods
function updateAcceleration(accel) {
var x = accel.x;
var y = accel.y;
var z = accel.z;
// TODO process the data
}
</content>
</item>
<item
class="org.symbian.tools.wrttools.util.SnippetInsertion"
description="Accepts contacts data"
id="org.symbian.tools.wrttools.phonegap.contacts"
label="Contacts callback">
<content>
// This method can be passed as a successCallback argument to
// navigator.contacts.find method
function displayContacts(contacts) {
for (var i=0; i < contacts.length; i++) {
var contact = contacts[i];
var name = contact.name.formatted;
var phones = contact.name.phone; // Array of phone numbers
var name = contact.name.address;
// TODO Insert your code here
}
}
</content>
</item>
<item
class="org.symbian.tools.wrttools.util.SnippetInsertion"
description="Accepts location data"
id="org.symbian.tools.wrttools.phonegap.location"
label="Location callback">
<content>
// This method can be passed as a successCallback argument to
// navigator.geolocation getCurrentPosition or watchPosition methods
function updateLocation(position) {
var pt = position.coords;
var latitude = pt.latitude;
var longitude = pt.longitude;
var altitude = pt.altitude;
var heading = pt.heading;
var speed = pt.speed;
// TODO Insert your code here
}
</content>
</item>
<item
class="org.symbian.tools.wrttools.util.SnippetInsertion"
description="Accepts orientation data"
id="org.symbian.tools.wrttools.phonegap.orientation"
label="Orientation callback">
<content>
// This method can be passed as a successCallback argument to
// navigator.orientation getCurrentOrientation or watchOrientation methods
function updateOrientation(orientation) {
switch (orientation) {
case DisplayOrientation.PORTRAIT: break;
case DisplayOrientation.REVERSE_PORTRAIT: break;
case DisplayOrientation.LANDSCAPE_LEFT_UP: break;
case DisplayOrientation.LANDSCAPE_RIGHT_UP: break;
case DisplayOrientation.FACE_UP: break;
case DisplayOrientation.FACE_DOWN: break;
}
// TODO Insert your code here
}
</content>
</item>
</category>
</extension>
</plugin>