Merge sources from S-Core's RSA git (release) 2.0alpha master 2.0_alpha
authorJenkins <taeyoung2.son@samsung.com>
Tue, 18 Sep 2012 04:31:42 +0000 (13:31 +0900)
committerJenkins <taeyoung2.son@samsung.com>
Tue, 18 Sep 2012 04:31:42 +0000 (13:31 +0900)
Change-Id: I7934809d98c859fcb9b371580a784b89cfbc86f2

120 files changed:
AUTHORS [new file with mode: 0644]
LICENSE [new file with mode: 0644]
builder/build.properties.clean [new file with mode: 0644]
builder/customTargets.xml [new file with mode: 0644]
org.tizen.web.simulator.feature/.project [new file with mode: 0644]
org.tizen.web.simulator.feature/build.properties [new file with mode: 0644]
org.tizen.web.simulator.feature/feature.xml [new file with mode: 0644]
org.tizen.web.simulator.help/.project [new file with mode: 0644]
org.tizen.web.simulator.help/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.web.simulator.help/build.properties [new file with mode: 0644]
org.tizen.web.simulator.help/build.xml [new file with mode: 0644]
org.tizen.web.simulator.help/html/appdemos.html [new file with mode: 0644]
org.tizen.web.simulator.help/html/debugging.html [new file with mode: 0644]
org.tizen.web.simulator.help/html/design.html [new file with mode: 0644]
org.tizen.web.simulator.help/html/gettingstarted/TizenAPI.html [new file with mode: 0644]
org.tizen.web.simulator.help/html/gettingstarted/configandstartup.html [new file with mode: 0644]
org.tizen.web.simulator.help/html/gettingstarted/implementedTizenAPI.html [new file with mode: 0644]
org.tizen.web.simulator.help/html/gettingstarted/simulatorfeatures.html [new file with mode: 0644]
org.tizen.web.simulator.help/html/gettingstarted/simulatorpreferences.html [new file with mode: 0644]
org.tizen.web.simulator.help/html/gettingstarted/standalone.html [new file with mode: 0644]
org.tizen.web.simulator.help/html/gettingstarted/troubleshooting.html [new file with mode: 0644]
org.tizen.web.simulator.help/html/images/simpanel-accelerometer.png [new file with mode: 0644]
org.tizen.web.simulator.help/html/images/simpanel-application.png [new file with mode: 0644]
org.tizen.web.simulator.help/html/images/simpanel-battery.png [new file with mode: 0644]
org.tizen.web.simulator.help/html/images/simpanel-call.png [new file with mode: 0644]
org.tizen.web.simulator.help/html/images/simpanel-device-and-network-cell.png [new file with mode: 0644]
org.tizen.web.simulator.help/html/images/simpanel-device-and-network-config.png [new file with mode: 0644]
org.tizen.web.simulator.help/html/images/simpanel-device-and-network-device.png [new file with mode: 0644]
org.tizen.web.simulator.help/html/images/simpanel-device-and-network-display.png [new file with mode: 0644]
org.tizen.web.simulator.help/html/images/simpanel-device-and-network-wifi.png [new file with mode: 0644]
org.tizen.web.simulator.help/html/images/simpanel-feature-configuration.png [new file with mode: 0644]
org.tizen.web.simulator.help/html/images/simpanel-geo-location.png [new file with mode: 0644]
org.tizen.web.simulator.help/html/images/simpanel-messaging.png [new file with mode: 0644]
org.tizen.web.simulator.help/html/images/simpanel-nfc.png [new file with mode: 0644]
org.tizen.web.simulator.help/html/images/simpanel-platform-api.png [new file with mode: 0644]
org.tizen.web.simulator.help/html/images/simpanel-power-mananger.png [new file with mode: 0644]
org.tizen.web.simulator.help/html/images/simpanel-resolution-and-orientation.png [new file with mode: 0644]
org.tizen.web.simulator.help/html/images/simpanel-sensors.png [new file with mode: 0644]
org.tizen.web.simulator.help/html/images/simpanel-system-summary.png [new file with mode: 0644]
org.tizen.web.simulator.help/html/images/simpanel-time.png [new file with mode: 0644]
org.tizen.web.simulator.help/html/images/simulator-launch-icon.png [new file with mode: 0644]
org.tizen.web.simulator.help/html/images/simulator.png [new file with mode: 0644]
org.tizen.web.simulator.help/html/images/simulator1.png [new file with mode: 0644]
org.tizen.web.simulator.help/html/images/simulator_launch.png [new file with mode: 0755]
org.tizen.web.simulator.help/html/images/simulator_pref.png [new file with mode: 0755]
org.tizen.web.simulator.help/html/images/simulator_thumb.png [new file with mode: 0644]
org.tizen.web.simulator.help/html/knownissues.html [new file with mode: 0644]
org.tizen.web.simulator.help/html/toc.html [new file with mode: 0644]
org.tizen.web.simulator.help/plugin.xml [new file with mode: 0644]
org.tizen.web.simulator.help/toc.xml [new file with mode: 0644]
org.tizen.web.simulator.help/tocgettingstarted.xml [new file with mode: 0644]
org.tizen.web.simulator/.classpath [new file with mode: 0644]
org.tizen.web.simulator/.project [new file with mode: 0644]
org.tizen.web.simulator/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
org.tizen.web.simulator/LICENSE [new file with mode: 0644]
org.tizen.web.simulator/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.web.simulator/OSGI-INF/l10n/bundle.properties [new file with mode: 0644]
org.tizen.web.simulator/README.md [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/Activator.class [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/FieldEditorComposite.class [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/Messages.class [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/PreferenceInitializer.class [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/Settings.class [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/Simulator.class [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/SimulatorActionDelegate$InvalidConfiguartionException.class [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/SimulatorActionDelegate.class [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/Startup.class [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/WorkbenchPreferencePage$1.class [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/WorkbenchPreferencePage$2.class [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/WorkbenchPreferencePage.class [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/Constants.class [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/LaunchMessages.class [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/LaunchMessages.properties [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/LaunchShortcut.class [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/Messages.class [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/Messages.properties [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/SimulatorApplicationDelegate.class [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/SimulatorApplicationLaunchShortcut.class [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/SimulatorApplicationLaunchTabGroup.class [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/SimulatorMainTab$1.class [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/SimulatorMainTab$2.class [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/SimulatorMainTab.class [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/messages.properties [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/preferences/FieldEditorComposite.class [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/preferences/PreferenceInitializer.class [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/preferences/Settings.class [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/preferences/WorkbenchPreferencePage$1.class [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/preferences/WorkbenchPreferencePage$2.class [new file with mode: 0644]
org.tizen.web.simulator/bin/org/tizen/web/simulator/preferences/WorkbenchPreferencePage.class [new file with mode: 0644]
org.tizen.web.simulator/build.properties [new file with mode: 0644]
org.tizen.web.simulator/icons/c_app.gif [new file with mode: 0644]
org.tizen.web.simulator/icons/c_app_Item.gif [new file with mode: 0644]
org.tizen.web.simulator/icons/tizen16.png [new file with mode: 0644]
org.tizen.web.simulator/plugin.xml [new file with mode: 0644]
org.tizen.web.simulator/profile/stub [new file with mode: 0644]
org.tizen.web.simulator/sdk-profile-data/stub [new file with mode: 0644]
org.tizen.web.simulator/src/org/tizen/web/simulator/Activator.java [new file with mode: 0644]
org.tizen.web.simulator/src/org/tizen/web/simulator/Messages.java [new file with mode: 0644]
org.tizen.web.simulator/src/org/tizen/web/simulator/PreferenceInitializer.java [new file with mode: 0644]
org.tizen.web.simulator/src/org/tizen/web/simulator/Settings.java [new file with mode: 0644]
org.tizen.web.simulator/src/org/tizen/web/simulator/Simulator.java [new file with mode: 0644]
org.tizen.web.simulator/src/org/tizen/web/simulator/SimulatorActionDelegate.java [new file with mode: 0644]
org.tizen.web.simulator/src/org/tizen/web/simulator/Startup.java [new file with mode: 0644]
org.tizen.web.simulator/src/org/tizen/web/simulator/WorkbenchPreferencePage.java [new file with mode: 0644]
org.tizen.web.simulator/src/org/tizen/web/simulator/launch/Constants.java [new file with mode: 0644]
org.tizen.web.simulator/src/org/tizen/web/simulator/launch/LaunchMessages.java [new file with mode: 0644]
org.tizen.web.simulator/src/org/tizen/web/simulator/launch/LaunchMessages.properties [new file with mode: 0644]
org.tizen.web.simulator/src/org/tizen/web/simulator/launch/LaunchShortcut.java [new file with mode: 0644]
org.tizen.web.simulator/src/org/tizen/web/simulator/launch/Messages.java [new file with mode: 0644]
org.tizen.web.simulator/src/org/tizen/web/simulator/launch/Messages.properties [new file with mode: 0644]
org.tizen.web.simulator/src/org/tizen/web/simulator/launch/SimulatorApplicationDelegate.java [new file with mode: 0644]
org.tizen.web.simulator/src/org/tizen/web/simulator/launch/SimulatorApplicationLaunchShortcut.java [new file with mode: 0644]
org.tizen.web.simulator/src/org/tizen/web/simulator/launch/SimulatorApplicationLaunchTabGroup.java [new file with mode: 0644]
org.tizen.web.simulator/src/org/tizen/web/simulator/launch/SimulatorMainTab.java [new file with mode: 0644]
org.tizen.web.simulator/src/org/tizen/web/simulator/messages.properties [new file with mode: 0644]
org.tizen.web.simulator/src/org/tizen/web/simulator/preferences/PreferenceInitializer.java [new file with mode: 0644]
org.tizen.web.simulator/src/org/tizen/web/simulator/preferences/Settings.java [new file with mode: 0644]
org.tizen.web.simulator/src/org/tizen/web/simulator/preferences/WorkbenchPreferencePage.java [new file with mode: 0644]
package/build.linux [new file with mode: 0755]
package/pkginfo.manifest [new file with mode: 0644]

diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..97dea6e
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1 @@
+Ziv Chang <ziv.chang@intel.com>
diff --git a/LICENSE b/LICENSE
new file mode 100644 (file)
index 0000000..f57bdb2
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,206 @@
+Copyright 2012 Intel Corporation. Alli rights reserved.\r
+\r
+                                 Apache License\r
+                           Version 2.0, January 2004\r
+                        http://www.apache.org/licenses/\r
+\r
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\r
+\r
+   1. Definitions.\r
+\r
+      "License" shall mean the terms and conditions for use, reproduction,\r
+      and distribution as defined by Sections 1 through 9 of this document.\r
+\r
+      "Licensor" shall mean the copyright owner or entity authorized by\r
+      the copyright owner that is granting the License.\r
+\r
+      "Legal Entity" shall mean the union of the acting entity and all\r
+      other entities that control, are controlled by, or are under common\r
+      control with that entity. For the purposes of this definition,\r
+      "control" means (i) the power, direct or indirect, to cause the\r
+      direction or management of such entity, whether by contract or\r
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the\r
+      outstanding shares, or (iii) beneficial ownership of such entity.\r
+\r
+      "You" (or "Your") shall mean an individual or Legal Entity\r
+      exercising permissions granted by this License.\r
+\r
+      "Source" form shall mean the preferred form for making modifications,\r
+      including but not limited to software source code, documentation\r
+      source, and configuration files.\r
+\r
+      "Object" form shall mean any form resulting from mechanical\r
+      transformation or translation of a Source form, including but\r
+      not limited to compiled object code, generated documentation,\r
+      and conversions to other media types.\r
+\r
+      "Work" shall mean the work of authorship, whether in Source or\r
+      Object form, made available under the License, as indicated by a\r
+      copyright notice that is included in or attached to the work\r
+      (an example is provided in the Appendix below).\r
+\r
+      "Derivative Works" shall mean any work, whether in Source or Object\r
+      form, that is based on (or derived from) the Work and for which the\r
+      editorial revisions, annotations, elaborations, or other modifications\r
+      represent, as a whole, an original work of authorship. For the purposes\r
+      of this License, Derivative Works shall not include works that remain\r
+      separable from, or merely link (or bind by name) to the interfaces of,\r
+      the Work and Derivative Works thereof.\r
+\r
+      "Contribution" shall mean any work of authorship, including\r
+      the original version of the Work and any modifications or additions\r
+      to that Work or Derivative Works thereof, that is intentionally\r
+      submitted to Licensor for inclusion in the Work by the copyright owner\r
+      or by an individual or Legal Entity authorized to submit on behalf of\r
+      the copyright owner. For the purposes of this definition, "submitted"\r
+      means any form of electronic, verbal, or written communication sent\r
+      to the Licensor or its representatives, including but not limited to\r
+      communication on electronic mailing lists, source code control systems,\r
+      and issue tracking systems that are managed by, or on behalf of, the\r
+      Licensor for the purpose of discussing and improving the Work, but\r
+      excluding communication that is conspicuously marked or otherwise\r
+      designated in writing by the copyright owner as "Not a Contribution."\r
+\r
+      "Contributor" shall mean Licensor and any individual or Legal Entity\r
+      on behalf of whom a Contribution has been received by Licensor and\r
+      subsequently incorporated within the Work.\r
+\r
+   2. Grant of Copyright License. Subject to the terms and conditions of\r
+      this License, each Contributor hereby grants to You a perpetual,\r
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r
+      copyright license to reproduce, prepare Derivative Works of,\r
+      publicly display, publicly perform, sublicense, and distribute the\r
+      Work and such Derivative Works in Source or Object form.\r
+\r
+   3. Grant of Patent License. Subject to the terms and conditions of\r
+      this License, each Contributor hereby grants to You a perpetual,\r
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r
+      (except as stated in this section) patent license to make, have made,\r
+      use, offer to sell, sell, import, and otherwise transfer the Work,\r
+      where such license applies only to those patent claims licensable\r
+      by such Contributor that are necessarily infringed by their\r
+      Contribution(s) alone or by combination of their Contribution(s)\r
+      with the Work to which such Contribution(s) was submitted. If You\r
+      institute patent litigation against any entity (including a\r
+      cross-claim or counterclaim in a lawsuit) alleging that the Work\r
+      or a Contribution incorporated within the Work constitutes direct\r
+      or contributory patent infringement, then any patent licenses\r
+      granted to You under this License for that Work shall terminate\r
+      as of the date such litigation is filed.\r
+\r
+   4. Redistribution. You may reproduce and distribute copies of the\r
+      Work or Derivative Works thereof in any medium, with or without\r
+      modifications, and in Source or Object form, provided that You\r
+      meet the following conditions:\r
+\r
+      (a) You must give any other recipients of the Work or\r
+          Derivative Works a copy of this License; and\r
+\r
+      (b) You must cause any modified files to carry prominent notices\r
+          stating that You changed the files; and\r
+\r
+      (c) You must retain, in the Source form of any Derivative Works\r
+          that You distribute, all copyright, patent, trademark, and\r
+          attribution notices from the Source form of the Work,\r
+          excluding those notices that do not pertain to any part of\r
+          the Derivative Works; and\r
+\r
+      (d) If the Work includes a "NOTICE" text file as part of its\r
+          distribution, then any Derivative Works that You distribute must\r
+          include a readable copy of the attribution notices contained\r
+          within such NOTICE file, excluding those notices that do not\r
+          pertain to any part of the Derivative Works, in at least one\r
+          of the following places: within a NOTICE text file distributed\r
+          as part of the Derivative Works; within the Source form or\r
+          documentation, if provided along with the Derivative Works; or,\r
+          within a display generated by the Derivative Works, if and\r
+          wherever such third-party notices normally appear. The contents\r
+          of the NOTICE file are for informational purposes only and\r
+          do not modify the License. You may add Your own attribution\r
+          notices within Derivative Works that You distribute, alongside\r
+          or as an addendum to the NOTICE text from the Work, provided\r
+          that such additional attribution notices cannot be construed\r
+          as modifying the License.\r
+\r
+      You may add Your own copyright statement to Your modifications and\r
+      may provide additional or different license terms and conditions\r
+      for use, reproduction, or distribution of Your modifications, or\r
+      for any such Derivative Works as a whole, provided Your use,\r
+      reproduction, and distribution of the Work otherwise complies with\r
+      the conditions stated in this License.\r
+\r
+   5. Submission of Contributions. Unless You explicitly state otherwise,\r
+      any Contribution intentionally submitted for inclusion in the Work\r
+      by You to the Licensor shall be under the terms and conditions of\r
+      this License, without any additional terms or conditions.\r
+      Notwithstanding the above, nothing herein shall supersede or modify\r
+      the terms of any separate license agreement you may have executed\r
+      with Licensor regarding such Contributions.\r
+\r
+   6. Trademarks. This License does not grant permission to use the trade\r
+      names, trademarks, service marks, or product names of the Licensor,\r
+      except as required for reasonable and customary use in describing the\r
+      origin of the Work and reproducing the content of the NOTICE file.\r
+\r
+   7. Disclaimer of Warranty. Unless required by applicable law or\r
+      agreed to in writing, Licensor provides the Work (and each\r
+      Contributor provides its Contributions) on an "AS IS" BASIS,\r
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\r
+      implied, including, without limitation, any warranties or conditions\r
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\r
+      PARTICULAR PURPOSE. You are solely responsible for determining the\r
+      appropriateness of using or redistributing the Work and assume any\r
+      risks associated with Your exercise of permissions under this License.\r
+\r
+   8. Limitation of Liability. In no event and under no legal theory,\r
+      whether in tort (including negligence), contract, or otherwise,\r
+      unless required by applicable law (such as deliberate and grossly\r
+      negligent acts) or agreed to in writing, shall any Contributor be\r
+      liable to You for damages, including any direct, indirect, special,\r
+      incidental, or consequential damages of any character arising as a\r
+      result of this License or out of the use or inability to use the\r
+      Work (including but not limited to damages for loss of goodwill,\r
+      work stoppage, computer failure or malfunction, or any and all\r
+      other commercial damages or losses), even if such Contributor\r
+      has been advised of the possibility of such damages.\r
+\r
+   9. Accepting Warranty or Additional Liability. While redistributing\r
+      the Work or Derivative Works thereof, You may choose to offer,\r
+      and charge a fee for, acceptance of support, warranty, indemnity,\r
+      or other liability obligations and/or rights consistent with this\r
+      License. However, in accepting such obligations, You may act only\r
+      on Your own behalf and on Your sole responsibility, not on behalf\r
+      of any other Contributor, and only if You agree to indemnify,\r
+      defend, and hold each Contributor harmless for any liability\r
+      incurred by, or claims asserted against, such Contributor by reason\r
+      of your accepting any such warranty or additional liability.\r
+\r
+   END OF TERMS AND CONDITIONS\r
+\r
+   APPENDIX: How to apply the Apache License to your work.\r
+\r
+      To apply the Apache License to your work, attach the following\r
+      boilerplate notice, with the fields enclosed by brackets "[]"\r
+      replaced with your own identifying information. (Don't include\r
+      the brackets!)  The text should be enclosed in the appropriate\r
+      comment syntax for the file format. We also recommend that a\r
+      file or class name and description of purpose be included on the\r
+      same "printed page" as the copyright notice for easier\r
+      identification within third-party archives.\r
+\r
+   Copyright [yyyy] [name of copyright owner]\r
+\r
+   Licensed under the Apache License, Version 2.0 (the "License");\r
+   you may not use this file except in compliance with the License.\r
+   You may obtain a copy of the License at\r
+\r
+       http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+   Unless required by applicable law or agreed to in writing, software\r
+   distributed under the License is distributed on an "AS IS" BASIS,\r
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+   See the License for the specific language governing permissions and\r
+   limitations under the License.\r
+\r
+\r
+\r
diff --git a/builder/build.properties.clean b/builder/build.properties.clean
new file mode 100644 (file)
index 0000000..8fbdc35
--- /dev/null
@@ -0,0 +1,260 @@
+###############################################################################
+# Copyright (c) 2003, 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
+###############################################################################
+#####################
+# Parameters describing how and where to execute the build.
+# Typical users need only update the following properties:
+#    baseLocation - where things you are building against are installed
+#    bootclasspath - The base jars to compile against (typicaly rt.jar)
+#    configs - the list of {os, ws, arch} configurations to build.  
+#
+# Of course any of the settings here can be overridden by spec'ing 
+# them on the command line (e.g., -DbaseLocation=d:/eclipse
+
+#The type of the top level element we are building,  generally "feature"
+topLevelElementType=feature
+#The id of the top level element we are building
+topLevelElementId=org.tizen.web.simulator.feature
+
+############# PRODUCT/PACKAGING CONTROL #############
+#product=/com.samsung.freshide/SLPSDK.product
+#runPackager=true
+
+#Set the name of the archive that will result from the product build.
+#archiveNamePrefix=
+
+# The prefix that will be used in the generated archive.
+archivePrefix="Do not touch here."
+
+# The location underwhich all of the build output will be collected.
+collectingFolder=${archivePrefix}
+
+# The list of {os, ws, arch} configurations to build.  This 
+# value is a '&' separated list of ',' separate triples.  For example, 
+#     configs=win32,win32,x86 & linux,motif,x86
+# By default the value is *,*,*
+configs="Do not touch here."
+#configs=win32, win32, x86 & \
+#      win32,win32,x86_64 & \
+#      win32,win32,wpf & \
+#      linux, gtk, ppc & \
+#      linux, gtk, x86 & \
+#      linux, gtk, x86_64 & \
+#      linux, motif, x86 & \
+#      solaris, motif, sparc & \
+#      solaris, gtk, sparc & \
+#      aix, motif, ppc & \
+#      hpux, motif, ia64_32 & \
+#      macosx, carbon, ppc & \
+#      macosx, carbon, x86 & \
+#      macosx, cocoa, ppc & \
+#      macosx, cocoa, x86 & \
+#      macosx, cocoa, x86_64
+
+# By default PDE creates one archive (result) per entry listed in the configs property.
+# Setting this value to true will cause PDE to only create one output containing all 
+# artifacts for all the platforms listed in the configs property.
+# To control the output format for the group, add a "group, group, group - <format>" entry to the
+# archivesFormat. 
+#groupConfigurations=true
+
+#The format of the archive. By default a zip is created using antZip.
+#The list can only contain the configuration for which the desired format is different than zip.
+#archivesFormat=win32, win32, x86 - antZip& \
+#      linux, gtk, ppc - antZip &\
+#    linux, gtk, x86 - antZip& \
+#      linux, gtk, x86_64 - antZip& \
+# linux, motif, x86 - antZip& \
+#      solaris, motif, sparc - antZip& \
+#      solaris, gtk, sparc - antZip& \
+#      aix, motif, ppc - antZip& \
+#      hpux, motif, PA_RISC - antZip& \
+#      macosx, carbon, ppc - antZip
+
+#Allow cycles involving at most one bundle that needs to be compiled with the rest being binary bundles.
+allowBinaryCycles=true
+
+#Sort bundles depenedencies across all features instead of just within a given feature.
+#flattenDependencies = true
+
+#Parallel compilation, requires flattenedDependencies=true
+#parallelCompilation=true
+#parallelThreadCount=
+#parallelThreadsPerProcessor=
+       
+#Set to true if you want the output to be ready for an update jar (no site.xml generated)
+#outputUpdateJars = false
+
+#Set to true for Jnlp generation
+#codebase should be a URL that will be used as the root of all relative URLs in the output.
+#generateJnlp=false
+#jnlp.codebase=<codebase url>
+#jnlp.j2se=<j2se version>
+#jnlp.locale=<a locale>
+#jnlp.generateOfflineAllowed=true or false generate <offlineAllowed/> attribute in the generated features
+#jnlp.configs=${configs}                       #uncomment to filter the content of the generated jnlp files based on the configuration being built
+
+#Set to true if you want to sign jars
+#signJars=false
+#sign.alias=<alias>
+#sign.keystore=<keystore location>
+#sign.storepass=<keystore password>
+#sign.keypass=<key password>
+
+#Arguments to send to the zip executable
+#zipargs=
+
+#Arguments to send to the tar executable
+#tarargs=
+
+#Control the creation of a file containing the version included in each configuration - on by default 
+#generateVersionsLists=false
+
+############## BUILD NAMING CONTROL ################
+# The directory into which the build elements are fetched and where
+# the build takes place.
+buildDirectory="Do not touch here"
+
+# Type of build.  Used in naming the build output.  Typically this value is
+# one of I, N, M, S, ...
+buildType="Do not touch here"
+
+# ID of the build.  Used in naming the build output.
+buildId="Do not touch here"
+
+# Label for the build.  Used in naming the build output
+buildLabel=${buildType}.${buildId}
+
+# Timestamp for the build.  Used in naming the build output
+timestamp=007
+
+#The value to be used for the qualifier of a plugin or feature when you want to override the value computed by pde.
+#The value will only be applied to plugin or features indicating build.properties, qualifier = context 
+#forceContextQualifier=<the value for the qualifier>
+
+#Enable / disable the generation of a suffix for the features that use .qualifier. 
+#The generated suffix is computed according to the content of the feature   
+#generateFeatureVersionSuffix=true
+
+############# BASE CONTROL #############
+# Settings for the base Eclipse components and Java class libraries 
+# against which you are building.
+# Base location for anything the build needs to compile against.  For example,
+# in most RCP app or a plug-in,  the baseLocation should be the location of a previously
+# installed Eclipse against which the application or plug-in code will be compiled and the RCP delta pack.
+
+base="Do not touch here"
+baseLocation="Do not touch here"
+
+
+#Folder containing repositories whose content is needed to compile against
+#repoBaseLocation=${base}/repos
+#Folder where the content of the repositories from ${repoBaseLocation} will be made available as a form suitable to be compiled against
+#transformedRepoLocation=${base}/transformedRepos
+
+#Os/Ws/Arch/nl of the eclipse specified by baseLocation
+baseos=linux
+basews=gtk
+basearch=x86
+
+#this property indicates whether you want the set of plug-ins and features to be considered during the build to be limited to the ones reachable from the features / plugins being built
+filteredDependencyCheck=false
+
+#this property indicates whether the resolution should be done in development mode (i.e. ignore multiple bundles with singletons)
+resolution.devMode=false
+
+#pluginPath is a list of locations in which to find plugins and features.  This list is separated by the platform file separator (; or :)
+#a location is one of:  
+#- the location of the jar or folder that is the plugin or feature : /path/to/foo.jar or /path/to/foo
+#- a directory that contains a /plugins or /features subdirectory
+#- the location of a feature.xml, or for 2.1 style plugins, the plugin.xml or fragment.xml
+#pluginPath=
+
+skipBase=true
+eclipseURL=<url for eclipse download site>
+eclipseBuildId=<Id of Eclipse build to get>
+eclipseBaseURL=${eclipseURL}/eclipse-platform-${eclipseBuildId}-win32.zip
+
+
+############# MAP FILE CONTROL ################
+# This section defines CVS tags to use when fetching the map files from the repository.
+# If you want to fetch the map file from repository / location, change the getMapFiles target in the customTargets.xml
+
+skipMaps=true
+mapsRepo=:pserver:anonymous@example.com/path/to/repo
+mapsRoot=path/to/maps
+mapsCheckoutTag=HEAD
+
+#tagMaps=true
+mapsTagTag=v${buildId}
+
+
+############ REPOSITORY CONTROL ###############
+# This section defines properties parameterizing the repositories where plugins, fragments
+# bundles and features are being obtained from. 
+
+# The tags to use when fetching elements to build.
+# By default thebuilder will use whatever is in the maps.  
+# This value takes the form of a comma separated list of repository identifier (like used in the map files) and the 
+# overriding value
+# For example fetchTag=CVS=HEAD, SVN=v20050101
+# fetchTag=HEAD
+skipFetch=true
+
+
+############# P2 OPTIONS ##############
+#p2.gathering = true
+#p2.compress=true
+
+############# JAVA COMPILER OPTIONS ##############
+# The location of the Java jars to compile against.  Typically the rt.jar for your JDK/JRE
+#bootclasspath=${java.home}/lib/rt.jar
+
+# specific JRE locations to compile against. These values are used to compile bundles specifying a 
+# Bundle-RequiredExecutionEnvironment. Uncomment and set values for environments that you support
+#CDC-1.0/Foundation-1.0= /path/to/rt.jar
+#CDC-1.1/Foundation-1.1=
+#OSGi/Minimum-1.0=
+#OSGi/Minimum-1.1=
+#JRE-1.1=
+#J2SE-1.2=
+#J2SE-1.3=
+#J2SE-1.4=
+#J2SE-1.5=
+#JavaSE-1.6=
+#PersonalJava-1.1=
+#PersonalJava-1.2=
+#CDC-1.0/PersonalBasis-1.0=
+#CDC-1.0/PersonalJava-1.0=
+#CDC-1.1/PersonalBasis-1.1=
+#CDC-1.1/PersonalJava-1.1=
+
+# Specify the output format of the compiler log when eclipse jdt is used
+logExtension=.log
+
+# Whether or not to include debug info in the output jars
+javacDebugInfo=true
+
+# Whether or not to fail the build if there are compiler errors
+javacFailOnError=true
+
+# Enable or disable verbose mode of the compiler
+javacVerbose=false
+
+# Extra arguments for the compiler. These are specific to the java compiler being used.
+#compilerArg=
+
+# Default value for the version of the source code. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacSource in build.properties
+javacSource=1.6
+
+# Default value for the version of the byte code targeted. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacTarget in build.properties.
+javacTarget=1.6
+
+
diff --git a/builder/customTargets.xml b/builder/customTargets.xml
new file mode 100644 (file)
index 0000000..6a42e92
--- /dev/null
@@ -0,0 +1,187 @@
+<project name="Build specific targets and properties" default="noDefault">
+
+       <!-- ===================================================================== -->
+       <!-- Run a given ${target} on all elements being built -->
+       <!-- Add on <ant> task for each top level element being built. -->
+       <!-- ===================================================================== -->
+       <available property="allElementsFile" file="${builder}/allElements.xml" value="${builder}/allElements.xml"/>
+       <property name="allElementsFile" location="${eclipse.pdebuild.templates}/headless-build/allElements.xml"/>
+
+       <import file="${allElementsFile}" />
+       <target name="allElements">
+               <ant antfile="${genericTargets}" target="${target}">
+                       <property name="type" value="${topLevelElementType}"/>
+                       <property name="id" value="${topLevelElementId}"/>
+               </ant>
+       </target>
+
+       <target
+               name="assemble.${topLevelElementId}.linux.gtk.x86">
+               <ant antfile="{$assembleScriptName}" dir="${buildDirectory}"/>
+       </target>
+       <target
+               name="assemble.${topLevelElementId}.win32.win32.x86">
+               <ant antfile="{$assembleScriptName}" dir="${buildDirectory}"/>
+       </target>
+       
+       <!-- ===================================================================== -->
+       <!-- ===================================================================== -->
+       <target name="getBaseComponents" depends="checkLocalBase" unless="skipBase">
+               <get src="${eclipseBaseURL}" dest="${buildDirectory}/../temp-base.zip" />
+               <unzip dest="${base}" overwrite="true" src="${buildDirectory}/../temp-base.zip" />
+       </target>
+
+       <target name="checkLocalBase">
+               <available file="${base}" property="skipBase" />
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Check out map files from correct repository -->
+       <!-- Replace values for mapsCheckoutTag as desired. -->
+       <!-- ===================================================================== -->
+       <target name="getMapFiles" depends="checkLocalMaps" unless="skipMaps">
+               <property name="mapsCheckoutTag" value="HEAD" />
+               <cvs cvsRoot="${mapsRepo}" package="${mapsRoot}" dest="${buildDirectory}/maps" tag="${mapsCheckoutTag}" />
+       </target>
+
+       <target name="checkLocalMaps">
+               <available property="skipMaps" file="${buildDirectory}/maps" />
+       </target>
+
+       <target name="tagMapFiles" if="tagMaps">
+               <cvs dest="${buildDirectory}/maps/${mapsRoot}" command="tag ${mapsTagTag}" />
+       </target>
+
+       <!-- ===================================================================== -->
+
+       <target name="clean" unless="noclean">
+               <antcall target="allElements">
+                       <param name="target" value="cleanElement" />
+               </antcall>
+       </target>
+
+       <target name="gatherLogs">
+               <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
+               <antcall target="allElements">
+                       <param name="target" value="gatherLogs" />
+               </antcall>
+               <unzip dest="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true">
+                       <fileset dir="${buildDirectory}/features">
+                               <include name="**/*.log.zip" />
+                       </fileset>
+               </unzip>
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do before setup -->
+       <!-- ===================================================================== -->
+       <target name="preSetup">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after setup but before starting the build proper -->
+       <!-- ===================================================================== -->
+       <target name="postSetup">
+               <antcall target="getBaseComponents" />
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do before fetching the build elements -->
+       <!-- ===================================================================== -->
+       <target name="preFetch">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after fetching the build elements -->
+       <!-- ===================================================================== -->
+       <target name="postFetch">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do before the repositories are being processed -->
+       <!-- ===================================================================== -->
+       <target name="preProcessRepos">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after the repositories have been processed -->
+       <!-- ===================================================================== -->
+       <target name="postProcessRepos">
+       </target>
+       
+       <!-- ===================================================================== -->
+       <!-- Steps to do before generating the build scripts. -->
+       <!-- ===================================================================== -->
+       <target name="preGenerate">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after generating the build scripts. -->
+       <!-- ===================================================================== -->
+       <target name="postGenerate">
+               <antcall target="clean" />
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do before running the build.xmls for the elements being built. -->
+       <!-- ===================================================================== -->
+       <target name="preProcess">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after running the build.xmls for the elements being built. -->
+       <!-- ===================================================================== -->
+       <target name="postProcess">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do before running assemble. -->
+       <!-- ===================================================================== -->
+       <target name="preAssemble">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after  running assemble. -->
+       <!-- ===================================================================== -->
+       <target name="postAssemble">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do before running package. -->
+       <!-- ===================================================================== -->
+       <target name="prePackage">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after  running package. -->
+       <!-- ===================================================================== -->
+       <target name="postPackage">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do after the build is done. -->
+       <!-- ===================================================================== -->
+       <target name="postBuild">
+               <antcall target="gatherLogs" />
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do to test the build results -->
+       <!-- ===================================================================== -->
+       <target name="test">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Steps to do to publish the build results -->
+       <!-- ===================================================================== -->
+       <target name="publish">
+       </target>
+
+       <!-- ===================================================================== -->
+       <!-- Default target                                                        -->
+       <!-- ===================================================================== -->
+       <target name="noDefault">
+               <echo message="You must specify a target when invoking this file" />
+       </target>
+
+</project>
diff --git a/org.tizen.web.simulator.feature/.project b/org.tizen.web.simulator.feature/.project
new file mode 100644 (file)
index 0000000..dce33bd
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.tizen.web.simulator.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>
diff --git a/org.tizen.web.simulator.feature/build.properties b/org.tizen.web.simulator.feature/build.properties
new file mode 100644 (file)
index 0000000..64f93a9
--- /dev/null
@@ -0,0 +1 @@
+bin.includes = feature.xml
diff --git a/org.tizen.web.simulator.feature/feature.xml b/org.tizen.web.simulator.feature/feature.xml
new file mode 100644 (file)
index 0000000..698e5fe
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.tizen.web.simulator.feature"
+      label="Tizen Web Simulator"
+      version="1.0.0.qualifier"
+      provider-name="Samsung"
+      plugin="org.tizen.base.platform"
+      license-feature="org.tizen.base.feature">
+
+   <description>
+      Web Simulator for Tizen SDK.
+   </description>
+
+   <copyright>
+      Copyright (c) 2010-2011, Samsung Electronics Co., LTD. All rights reserved.
+   </copyright>
+
+   <license url="http://www.example.com/license">
+      [Enter License Description here.]
+   </license>
+
+   <plugin
+         id="org.tizen.web.simulator"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"/>
+
+   <plugin
+         id="org.tizen.web.simulator.help"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"/>
+
+</feature>
diff --git a/org.tizen.web.simulator.help/.project b/org.tizen.web.simulator.help/.project
new file mode 100644 (file)
index 0000000..c846c9c
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.tizen.web.simulator.help</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.tizen.web.simulator.help/META-INF/MANIFEST.MF b/org.tizen.web.simulator.help/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..85a851a
--- /dev/null
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Tizen Simulator Help
+Bundle-SymbolicName: org.tizen.web.simulator.help;singleton:=true
+Bundle-Version: 1.0.0
+Bundle-Vendor: Intel
diff --git a/org.tizen.web.simulator.help/build.properties b/org.tizen.web.simulator.help/build.properties
new file mode 100644 (file)
index 0000000..8ad51cb
--- /dev/null
@@ -0,0 +1,2 @@
+bin.includes = META-INF/,\
+               plugin.xml
diff --git a/org.tizen.web.simulator.help/build.xml b/org.tizen.web.simulator.help/build.xml
new file mode 100644 (file)
index 0000000..b2c69f2
--- /dev/null
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="org.tizen.simulator.help" default="build.jars" basedir=".">
+
+       <property name="p2.build.repo" value="file:${buildDirectory}/buildRepo"/>
+       <property name="basews" value="${ws}"/>
+       <property name="baseos" value="${os}"/>
+       <property name="basearch" value="${arch}"/>
+       <property name="basenl" value="${nl}"/>
+       <property name="bundleId" value="org.tizen.simulator.help"/>
+       <property name="bundleVersion" value="1.0.0"/>
+       <property name="p2.publishonerror" value="false"/>
+
+       <!-- Compiler settings. -->
+       <property name="javacFailOnError" value="false"/>
+       <property name="javacDebugInfo" value="on"/>
+       <property name="javacVerbose" value="false"/>
+       <property name="logExtension" value=".log"/>
+       <property name="compilerArg" value=""/>
+       <property name="compilation.prereq.log" value="${buildDirectory}/prereqErrors.log"/>
+       <property name="javacSource" value="1.3"/>
+       <property name="javacTarget" value="1.2"/>
+       <condition property="dir_bootclasspath" value="${java.home}/../Classes">
+               <os family="mac"/>
+       </condition>
+       <property name="dir_bootclasspath" value="${java.home}/lib"/>
+       <path id="path_bootclasspath">
+               <fileset dir="${dir_bootclasspath}">
+                       <include name="*.jar"/>
+               </fileset>
+       </path>
+       <property name="bootclasspath" refid="path_bootclasspath"/>
+       <property name="bundleJavacSource" value="${javacSource}"/>
+       <property name="bundleJavacTarget" value="${javacTarget}"/>
+       <property name="bundleBootClasspath" value="${bootclasspath}"/>
+
+       <target name="init" depends="properties">
+               <condition property="pluginTemp" value="${buildTempFolder}/plugins"             >
+                       <isset property="buildTempFolder"/>
+               </condition>
+               <property name="pluginTemp" value="${basedir}"/>
+               <condition property="build.result.folder" value="${pluginTemp}/org.tizen.simulator.help_1.0.0"          >
+                       <isset property="buildTempFolder"/>
+               </condition>
+               <property name="build.result.folder" value="${basedir}"/>
+               <property name="temp.folder" value="${basedir}/temp.folder"/>
+               <property name="plugin.destination" value="${basedir}"/>
+               <condition property="p2.publish.parts" value="true"             >
+                       <istrue value="${p2.gathering}"/>
+               </condition>
+               <property name="compilation.problem.marker" value="${build.result.folder}/compilation.problem"/>
+               <condition property="compilation.problem.marker.exists" value="true"            >
+                       <and>
+                       <available file="${compilation.problem.marker}"/>
+                       <isfalse value="${p2.publishonerror}"/>
+                       </and>
+               </condition>
+       </target>
+
+       <target name="properties" if="eclipse.running">
+               <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
+
+       </target>
+
+       <target name="build.update.jar" depends="init" description="Build the plug-in: org.tizen.simulator.help for an update site.">
+               <delete dir="${temp.folder}"/>
+               <mkdir dir="${temp.folder}"/>
+               <antcall target="build.jars"/>
+               <antcall target="gather.bin.parts">
+                       <param name="destination.temp.folder" value="${temp.folder}/"/>
+               </antcall>
+               <jar destfile="${plugin.destination}/org.tizen.simulator.help_1.0.0.jar" basedir="${temp.folder}/org.tizen.simulator.help_1.0.0" filesetmanifest="merge"/>
+               <delete dir="${temp.folder}"/>
+       </target>
+
+       <target name="build.jars" depends="init" description="Compile classes and build nested jars for the plug-in: org.tizen.simulator.help.">
+               <delete file="${compilation.problem.marker}" quiet="true"/>
+       </target>
+
+       <target name="checkCompilationResults" if="compilation.error.occured">
+               <echo file="${compilation.problem.marker}" message="org.tizen.simulator.help_1.0.0${line.separator}compilation.error.occured=${compilation.error.occured}"/>
+               <eclipse.logCompileError bundle="org.tizen.simulator.help_1.0.0" log="${compilation.prereq.log}">
+               </eclipse.logCompileError>
+       </target>
+
+       <target name="build.sources" depends="init">
+       </target>
+
+       <target name="publish.bin.parts" depends="init" if="p2.publish.parts" unless="compilation.problem.marker.exists">
+               <mkdir dir="${build.result.folder}/org.tizen.simulator.help_1.0.0"/>
+               <copy todir="${build.result.folder}" failonerror="true" overwrite="true">
+                       <fileset dir="${basedir}">
+                               <include name="META-INF/MANIFEST.MF"/>
+                               <include name="plugin.xml"/>
+                               <include name="fragment.xml"/>
+                       </fileset>
+               </copy>
+               <antcall target="apitools.generation">
+                       <param name="target.folder" value="${build.result.folder}"/>
+                       <param name="projectLocation" value="${basedir}"/>
+                       <param name="binary.folders" value="/home/bob/src/tizen/org.tizen.simulator.help"/>
+                       <param name="projectName" value="${bundleId}_${bundleVersion}"/>
+               </antcall>
+               <eclipse.gatherBundle 
+                  metadataRepository="${p2.build.repo}"
+                  artifactRepository="${p2.build.repo}"
+                  buildResultFolder="${build.result.folder}"
+                  baseDirectory="${basedir}"
+               />
+       </target>
+
+       <target name="gather.bin.parts" depends="init" if="destination.temp.folder">
+               <mkdir dir="${destination.temp.folder}/org.tizen.simulator.help_1.0.0"/>
+               <copy todir="${destination.temp.folder}/org.tizen.simulator.help_1.0.0" failonerror="true" overwrite="true">
+                       <fileset dir="${basedir}">
+                               <include name="META-INF/"/>
+                               <include name="plugin.xml"/>
+                       </fileset>
+               </copy>
+               <antcall target="apitools.generation">
+                       <param name="target.folder" value="${destination.temp.folder}/org.tizen.simulator.help_1.0.0"/>
+                       <param name="projectLocation" value="${basedir}"/>
+                       <param name="binary.folders" value="/home/bob/src/tizen/org.tizen.simulator.help"/>
+                       <param name="projectName" value="${bundleId}_${bundleVersion}"/>
+               </antcall>
+       </target>
+
+       <target name="build.zips" depends="init">
+       </target>
+
+       <target name="gather.sources" depends="init" if="destination.temp.folder">
+               <antcall target="copy.src.includes">
+                       <param name="source.destination.folder" value="${destination.temp.folder}/org.tizen.simulator.help_1.0.0"/>
+               </antcall>
+       </target>
+
+       <target name="gather.individual.sources" depends="init">
+               <antcall target="copy.src.includes">
+                       <param name="source.destination.folder" value="${destination.temp.folder}"/>
+               </antcall>
+       </target>
+
+       <target name="copy.src.includes" depends="init">
+       </target>
+
+       <target name="gather.logs" depends="init" if="destination.temp.folder">
+       </target>
+
+       <target name="clean" depends="init" description="Clean the plug-in: org.tizen.simulator.help of all the zips, jars and logs created.">
+               <delete file="${plugin.destination}/org.tizen.simulator.help_1.0.0.jar"/>
+               <delete file="${plugin.destination}/org.tizen.simulator.help_1.0.0.zip"/>
+               <delete dir="${temp.folder}"/>
+               <delete file="${compilation.problem.marker}" quiet="true"/>
+       </target>
+
+       <target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder.">
+               <eclipse.convertPath fileSystemPath="/home/bob/src/tizen/org.tizen.simulator.help" property="resourcePath"/>
+               <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
+       </target>
+
+       <target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: org.tizen.simulator.help.">
+               <delete dir="${temp.folder}"/>
+               <mkdir dir="${temp.folder}"/>
+               <antcall target="build.jars"/>
+               <antcall target="build.sources"/>
+               <antcall target="gather.bin.parts">
+                       <param name="destination.temp.folder" value="${temp.folder}/"/>
+               </antcall>
+               <antcall target="gather.sources">
+                       <param name="destination.temp.folder" value="${temp.folder}/"/>
+               </antcall>
+               <delete>
+                       <fileset dir="${temp.folder}">
+                               <include name="**/*.bin${logExtension}"/>
+                       </fileset>
+               </delete>
+               <zip destfile="${plugin.destination}/org.tizen.simulator.help_1.0.0.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip" update="false"/>
+               <delete dir="${temp.folder}"/>
+       </target>
+
+       <target name="apitools.generation" if="generateAPIDescription">
+               <apitooling.apigeneration  projectName="${projectName}" project="${projectLocation}" binary="${binary.folders}" target="${target.folder}" extramanifests="${extraManifests}" allownonapiproject="${allowNonApiProject}"         />
+       </target>
+
+</project>
diff --git a/org.tizen.web.simulator.help/html/appdemos.html b/org.tizen.web.simulator.help/html/appdemos.html
new file mode 100644 (file)
index 0000000..5956535
--- /dev/null
@@ -0,0 +1,82 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+       <title>Application Demos for Tizen Simulator</title>
+       <!-- 
+             <link rel="stylesheet" type="text/css" href="scripts/content.css" />
+       -->
+</head>
+
+<body>
+       <h2>Introduction of Tizen API Demo Application</h2>
+       <p> Each feature of the Tizen API Demo application is briefly
+       presented in the following paragraphs.</p>
+
+       <h3>Accelerometer</h3>
+       <p>Accelerometer API can access accelerometer sensor values and
+               functionalities are provided via deviceapis.accelerometer interface.</p>
+
+       <p>Application can subscribe to accelerometer device to receive
+               notifications about device acceleration changes.</p>
+
+       <p>X,Y and Z Axis values are show in the middle and when you can
+               click and drag with mouse, those value will change concurrently.</p>
+
+       <p>Also, we can click the "Shake" button to simulate the device is
+               shaken along the X axis.</p>
+
+       <h3>Device Orientation</h3>
+       <p>This example simulates a device orientation change event.</p>
+
+       <p>Switch between portrait and landscape icon from the Device
+               panel, as you can see, the platform screen is rotated accordingly.</p>
+
+       <h3>Device APIs</h3>
+       This page shows the result of deviceapis.listAvailableFeatures() and
+       deviceapis.listActivatedFeatures().
+
+       <h3>Geo Positioning</h3>
+       <p>Geographical data can be configured from the "Geo Location"
+               panel and web simulator will pass the geo location data to the
+               application.</p>
+       <p>As shown in the video, we change the value of Latitude from the
+               "Geo Location" panel and the map in the panel is updated instantly for
+               reference. Then click the "Update Map" button in our application, the
+               map in the center is updated accordingly with correct geographical
+               data, just like the map on the Geo Location panel.</p>
+
+       <h3>Camera</h3>
+
+       <p>The example shows the emulated camera window for the device.
+               Click capture to take a picture or use "Record Start" and "Record
+               Stop" to record video.</p>
+
+       <h3>Device Interaction</h3>
+       <p>This example demonstrates a few device notification mechanisms
+               provided by WAC 2.0 DeviceInteraction API. As shown in the "Device &
+               Network Setting", you can turn on/off device vibrator and backlight
+               and adjust audio volume.</p>
+       <p>If backlight is off, the whole device is dimmed to simulate this
+               effect.</p>
+       <p>One of the most prominent case of DeviceInteraction module is to
+               test startNotify. If the device volume is above 0, a device beeper is
+               played when startNotify is invoked. If the device volume is set to 0
+               and vibrator is active, then the device will render a shake-like
+               movement. If the vibrator is also off, backlight will be switched on
+               for a specified duration.</p>
+       <h3>Contact</h3>
+       <p>This example demonstrates the usage of pim.contact API. Start by
+               getting an Address Book and you can add/update/delete/find contacts in
+               that Address Book.</p>
+
+       <h3>Filesystem</h3>
+
+       <p>Filesystem example showcases the capability of Filesystem API.
+               You can traverse the file system hierarchy by clicking through the
+               folders or back button. You can also execute copy/paste/delete
+               operations by clicking corresponding buttons. In addition, a simple
+               editor is provided for you to create/edit text files.</p>
+</body>
+</html>
diff --git a/org.tizen.web.simulator.help/html/debugging.html b/org.tizen.web.simulator.help/html/debugging.html
new file mode 100644 (file)
index 0000000..fa9e32a
--- /dev/null
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Debugging with the Tizen Simulator</title>
+</head>
+
+<body>
+       <h2>Debugging with the Tizen Simulator</h2>
+       More to come...
+</body>
+</html>
\ No newline at end of file
diff --git a/org.tizen.web.simulator.help/html/design.html b/org.tizen.web.simulator.help/html/design.html
new file mode 100644 (file)
index 0000000..288b28f
--- /dev/null
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+       <title>Tizen Simulator Design</title>
+
+</head>
+
+<body>
+       <h2>Tizen Web Simulator Design</h2>
+       More to come...
+</body>
+</html>
diff --git a/org.tizen.web.simulator.help/html/gettingstarted/TizenAPI.html b/org.tizen.web.simulator.help/html/gettingstarted/TizenAPI.html
new file mode 100644 (file)
index 0000000..eb1bc07
--- /dev/null
@@ -0,0 +1,97 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+   <head>
+      <title>Tizen API Coverage</title>
+   </head>
+
+   <body>
+      <h2>Tizen API Coverage</h2>
+        Below is a summary of the Tizen APIs supported in this release.  Some APIs are supported 
+        with a Javascript backend and others are provided by Google Chrome.
+        <h3>Supported Tizen APIs</h3>
+        The following APIs are implemented by the simulator in JavaScript.   
+          <ul>
+              <li>Tizen</li>
+              <li>Alarm</li>
+              <li>Application</li>
+              <li>Calendar</li>
+              <li>Call</li>
+              <li>Contact</li>
+              <li>Filesystem</li>
+              <li>Geocoder</li>
+              <li>LBS</li>
+              <li>Media Content</li>
+              <li>Messaging</li>
+              <li>NFC</li>
+              <li>System Information</li>
+              <li>Time</li>
+              <li>Power</li>
+          </ul>
+        <h3>Non-supported Tizen APIs</h3>
+        The following APIs are not supported by the current version of the simulator.  Support for these APIs 
+        is under development.
+          <ul>
+              <li>Bluetooth</li>
+          </ul>
+
+        <h3>W3C/HTML5 Specifications</h3>
+        <h4>Widget</h4>
+        <ul>
+              <li>The config.xml of a widget is parsed by the simulator and the information is shown 
+              in the "feature configuration" panel.</li>
+        </ul>
+        <h4>Content (documents, graphics, multimedia)</h4>
+        <ul>
+              <li>HTML5 audio</li>
+              <li>HTML5 video</li>
+              <li>HTML5 Forms</li>
+              <li>Session History API</li>
+              <li>HTML5 2D Canvas</li>
+              <li>Inline SVG</li>
+          </ul>
+        <h4>CSS3</h4>
+        <ul>
+              <li>CSS3 2D Transforms</li>
+              <li>CSS3 3D Transforms</li>
+              <li>CSS3 Animations</li>
+              <li>CSS3 Transitions</li>
+              <li>iframe sandbox attribute</li>
+              <li>HTML5 2D Canvas</li>
+              <li>CSS3 Colors</li>
+        </ul>
+        <h4>Device/OS Integration</h4>
+        <ul>
+              <li>W3C Geolocation API (via Javascript backend)</li>
+              <li>Orientation and Acceleration (via Javascript backend)</li>
+              <li>Browser onLine State</li>
+              <li>W3C Vibration API (via Javascript backend)</li>
+              <li>Web Audio</li>
+              <li>Web Notifications</li>
+              <li>Sensors (via Javascript backend)</li>
+        </ul>
+        <h4>Network & Communication</h4>
+        <ul>
+              <li>The WebSocket API</li>
+              <li>Web Messaging</li>
+              <li>XMLHttpRequest Level 2 (Partial)</li>
+              <li>Cross-Origin Resource Sharing (CORS)</li>
+              <li>Server-Sent Events</li>
+        </ul>
+        <h4>Storage</h4>
+        <ul>
+              <li>Web Storage</li>
+              <li>File API</li>
+              <li>File API: Directories and System</li>
+              <li>File API: Writer</li>
+              <li>HTML5 Application Cache</li>
+              <li>Web SQL Database</li>
+              <li>Indexed DB API</li>
+        </ul>
+        <h4>Performance</h4>
+        <ul>
+              <li>Web Workers</li>
+              <li>Page Visibility API (via Javascript backend)</li>
+              <li>Animation Timing Control</li>
+        </ul>
+   </body>
+</html>
diff --git a/org.tizen.web.simulator.help/html/gettingstarted/configandstartup.html b/org.tizen.web.simulator.help/html/gettingstarted/configandstartup.html
new file mode 100644 (file)
index 0000000..a00e0f6
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<base href=".." />
+<title>Using the Simulator with Eclipse</title>
+</head>
+
+<body>
+       <h2>Getting started with the Tizen Web Simulator</h2>
+
+       <h3>Install Google Chrome</h3>
+       <p>The Tizen Web Simulator runs on the Google Chrome browser.
+       To use the Tizen Web Simulator you must first download and install Google Chrome on your development platform:
+               <a href="http://www.google.com/chrome/">http://www.google.com/chrome/</a>
+       </p>
+       <h4>Configure Simulator Preferences</h4>
+       The Tizen SDK attempts to discover the location of Google Chrome on your system.  You may need to set the 
+       location manually in the Preferences.  For details, see <a href="gettingstarted/simulatorpreferences.html">Simulator Preferences</a>.
+       
+       <h3>Launch your application in the Simulator</h3>
+       <p>The web simulator Eclipse plugin is an Eclipse launch configuration type.  You can launch
+       it by doing one of the following:</p>
+       <ul>
+               <li>Right-click your web project. Select "Run As->Tizen Web Simulator Application".</li>
+               <li>If the simulator has been launched before, click the Run icon in the toolbar or 
+               from the menu select Run->Run Last Launched (Ctrl+F11).</li>
+               <li>For first-time launch, create a run configuration. From the menu, select
+               "Run->Run Configurations...".  Configure the "Tizen Web Simulator Application" properties and then run it.</li>
+       </ul>
+       <p>
+       <a href="images/simulator_launch.png"><img src="images/simulator_launch.png" style="width:700px"/></a>
+       </p>
+
+       <p>When started, the simulator loads the file specified in the "Content" field of the config.xml file. 
+       This is usually index.html.</p>
+       <p>The simulator renders your application using the Chrome/Webkit backend.  All of the same development 
+       features of Chrome are available in the simulator, including Web Inspector (press F12 to access).</p>
+       
+       <p>The advantages of using the Tizen Simulator include:
+               <ul>
+               <li>Ability to set device screen size and orientation</li>
+               <li>Ability to run applications that use the Tizen API</li>
+               <li>Ability to send events and messages to your application for debugging purposes.  
+               These include messages, geolocation data, and sensor input such as accelerometer events.</li>
+               </ul>
+       </p>
+</body>
+</html>
diff --git a/org.tizen.web.simulator.help/html/gettingstarted/implementedTizenAPI.html b/org.tizen.web.simulator.help/html/gettingstarted/implementedTizenAPI.html
new file mode 100644 (file)
index 0000000..4de9452
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+   <head>
+      <title>Implemented Tizen API</title>
+   </head>
+
+   <body>
+      <h2>Implemented Tizen API</h2>
+         In this release, the following Tizen APIs are implemented by the simulator:
+      <ul>
+               <li>Tizen</li>
+               <li>Alarms</li>
+                       <li>Application</li>
+                       <li>Calendar</li>
+               <li>Call</li>
+               <li>Contact</li>
+                       <li>Filesystem</li>
+                       <li>Geocoder</li>
+                       <li>LBS</li>
+                       <li>Media Content</li>
+                       <li>Messaging</li>
+                       <li>NFC</li>
+                       <li>System Information</li>
+                       <li>Time</li>
+                       <li>Power</li>
+               <li>W3C Geolocation</li>
+               <li>W3C Sensors</li>
+               <li>W3C Battery</li>
+               <li>W3C Vibration</li>
+               <li>W3C Page Visibility</li>
+      </ul>     
+   </body>
+</html>
diff --git a/org.tizen.web.simulator.help/html/gettingstarted/simulatorfeatures.html b/org.tizen.web.simulator.help/html/gettingstarted/simulatorfeatures.html
new file mode 100644 (file)
index 0000000..147fca8
--- /dev/null
@@ -0,0 +1,267 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<base href=".." />
+<title>Tizen Simulator Features</title>
+</head>
+
+<body>
+       <h2>Tizen Simulator Features</h2>
+       
+       <h3>Loading application address bar</h3>
+       
+       <p>When the simulator is started from the Tizen IDE, the path to
+       your application's main content file is loaded into the
+       application address bar.  You can change which file or project
+       is being run by editing this field.</p>
+
+       <h3>Basic panel operation</h3>
+               <h4>Expand/Collapse</h4>
+               <p>Each panel can be opened or closed by clicking the small
+               arrow on the left side of the panel bar.</p>
+               <h4>Reorder</h4>
+               <p>Each panel can be moved and reordered by dragging the drag area
+                on the right side of the panel bar.</p>
+                <h4>Show/Hide</h4>
+                <p>Each panel can be showed or hid by clicking the panel-setting button
+                on the right side of the application address bar.</p>
+
+       <h2>Tizen Simulator</h2>
+
+       <h3>Simulator Panels</h3>
+       <p>
+       <img src="images/simpanel-resolution-and-orientation.png" 
+            style="float:right; margin: 0px 20px 0px 20px;" />         
+       <h4>Resolution and Orientation</h4>                                                                             
+               <p>In this panel you can change the target device you are
+               emulating. The drop down box on the top shows current device's
+               resolution and all four device resolutions supported by the Tizen 
+               emulator are also supported by the simulator.  
+               In addition, you can switch its orientation between
+               portrait mode and landscape mode. If your application has 
+               subscribed to this event, it should receive the event and 
+               the subscribed callback is invoked.</p>
+               <br clear="right" />            
+       </p>
+       <p>
+       <img src="images/simpanel-platform-api.png" 
+            style="float:right; margin: 0px 20px 0px 20px;" />
+       <h4>Platform API</h4>
+               <p>The platform API panel allows you to select which platform you are on.
+                       Currently, only the Tizen API is supported.</p>
+               <br clear="right" />
+       </p>
+       <p>
+       <img src="images/simpanel-system-summary.png" 
+            style="float:right; margin: 0px 20px 0px 20px;" />         
+       <h4>System Summary</h4>
+
+               <p>The System Summary panel provides a summary of system
+               configuration settings, what device you are simulating, and
+               other notes that are of interest in the emulated environment.</p>
+               <br clear="right" />
+       </p>
+       <p>
+       <img src="images/simpanel-accelerometer.png" 
+            style="float:right; margin: 0px 20px 0px 20px;" />         
+       <h4>Accelerometer</h4>
+
+               <p>The accelerometer panel allows you to click and drag with your
+               mouse to manipulate the physical position of the device.  
+               Accelerometer events are sent into the running application, allowing
+               you to debug accelerometer change events. A "Shake" button 
+               simulates a back and forth movement along the X axis.</p>
+
+               <br clear="right" />
+       </p>
+       <p>
+       <img src="images/simpanel-messaging.png" 
+            style="float:right; margin: 0px 20px 0px 20px;" />                                 
+       <h4>Messaging</h4>
+               <p>The messaging panel enables sending and receiving email, SMS, 
+                       and MMS types of messages.</p>
+               <p>SENDING</p>
+               <p>This section can be used to test if the application can handle incoming
+               messages properly.  For example, an application can use the following Tizen API 
+               to receive an email message:
+               
+               <p>&nbsp;&nbsp;&nbsp;tizen.messaged.getMessageService (messaging.email, <br \>
+               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;successCallback, errorCallback)</p>
+               
+               <p>Sending a message with <i>email</i> type from the panel should be 
+               received by the application.</p>
+                <p>You can compose a new message by providing a 
+               sender's address, message type, and message content. After clicking the
+               "Send" button, the application should receive the new message. A default "From" 
+               is given to all sent messages.</p>
+
+               <p><b>NOTE:</b>  To simulate the 'sync' scenario, as described in the Tizen Web API documentation,
+                       email messages sent to an application are intentionally withheld
+                       until the application invokes 'sync' or 'syncFolders' (INBOX) from the
+                       email messagingService's MessageStorage.</p>
+               <p>SMS and MMS messages are kept synchronized all the time. When an
+                       application starts, all folders are synchronized.</p>
+
+               <p>RECEIVING</p>
+                       <p>Messages sent from the application will be received and listed in
+                       the Receiving area of the panel.</p>
+                       
+                        <p>Recipients: The recipients field shows all recipients from the application sending
+                        the message. Multiple recipients are separated by ",". The message field shows message 
+                        contents sent from the applications.</p>
+    <br clear="right" />
+  </p>
+  <p>
+  <img src="images/simpanel-geo-location.png" 
+       style="float:right; margin: 0px 20px 0px 20px;" />
+
+       <h4>Geo Location</h4>
+
+               <p>The Geo Location panel enables your application to debug APIs 
+                       to retrieve geographical data from the device. The panel 
+                       provides an input interface to configure the geographical data
+                       being sent from the device.  Additionally, a map is shown in 
+                       response to the change of the data so that you can correlate 
+                       geo location data with a real map.</p>
+               <br clear="right" />
+       </p>
+       <p>
+       <img src="images/simpanel-time.png" 
+            style="float:right; margin: 0px 20px 0px 20px;" />         
+       <h4>Time Zone</h4>
+
+               <p>The Time Zone panel displays a timezone which can be 
+                       manipulated for an application to test Time APIs.</p>
+
+               <p>You can change current time locale by selecting a different option.</p>
+               <br clear="right" />
+       </p>
+       <p>
+       <img src="images/simpanel-feature-configuration.png" 
+            style="float:right; margin: 0px 20px 0px 20px;" />         
+       <h4>Feature Configuration</h4>
+
+               <p>The Feature Configuration panel displays a graphical 
+                       representation of the config.xml file.</p>
+       
+               <br clear="right" />
+       </p>
+       <p>
+       <img src="images/simpanel-device-and-network-config.png" 
+            style="float:right; margin: 0px 20px 0px 20px;" />                                         
+       <h4>Device and Network Settings</h4>
+
+               <p>Tizen SystemInfo provides various APIs to retrieve device and 
+                       networking information. This panel allows you to specify 
+                       device status and see if the application can retrieve device 
+                       status correctly from the Tizen SystemInfo API. The application can also
+                        add listeners for system status change notifications.</p>
+                <p>In the "Config" section, you can turn on/off vibrator and lock/unlock 
+                the screen. If something is required, the CPU load can also be manually specified.</p>
+               <p>In the "CPU" section, you can manually specify the CPU load.</p>
+                <p>In the "Storage" section, the default setting of the STORAGE mode is "INTERNAL".</p>
+                <p>In the "Display" section, it shows some information about device status, such as 'Resolution', 
+                'DPI', and 'Physical width/height'. In addition, the brightness can also be set according to your
+                preference.</p>
+                <p>In the "Device" section, more information about device, sunch as 'IMEI', 'Version'.</p>
+                <p>In the "Network", "WiFi Network", "Cellurlar Network", and "Ethernet Network" sections, you 
+                can select various network parameter and settings.</p>
+                <p>In the "SIM" section, you can also set 'SIM' informations.</p>
+
+
+               <br clear="right" />
+       </p>
+       <p>
+       <img src="images/simpanel-sensors.png" 
+            style="float:right; margin: 0px 20px 0px 20px;" />         
+       <h4>Sensors</h4>
+
+               <p>The sensors panel provides three slide bars to configure the ambient magnetic field in X, Y and Z.</p>
+
+               <br clear="right" />
+       </p>
+       <p>
+       <img src="images/simpanel-call.png" 
+            style="float:right; margin: 0px 20px 0px 20px;" />                                                                                                 
+       <h4>Call</h4>
+
+               <p>The Call panel provides a control panel for simulating sending and 
+                       receiving calls. These calls can be tracked by CallHistory related
+                       methods using the Tizen Call APIs.</p>
+               <p>You can make a call from "LOCAL PARTY"(simulator) to "REMOTE PARTY" 
+                       or accept/reject a call placed by the "REMOTE PARTY". They can also
+                       pick a reason to simulate a failed call from the "Reason" drop down
+                        menu.</p>
+                <p>When you clicks "End", the "call" functionality will be closed.</p>
+               <br clear="right" />
+       </p>
+       <p>
+       <img src="images/simpanel-battery.png" 
+            style="float:right; margin: 0px 20px 0px 20px;" />                                                                                                 
+       <h4>Battery</h4>
+
+               <p>The Battery panel allows you to test an application that
+                       uses the battery API.</p>
+               <p>
+                       "Total time" shows either the time (in minutes) needed to charge the 
+                       battery from empty to full capacity (if "Is Charging" is checked), or
+                       the time until the battery will be empty (if "Is Charging" is not checked).</p>
+               <p>
+                "Battery Level" and "Remaining Power" indicates the remaining battery capacity (with percentage 
+                and in minutes, respectively). For example, if the total time is set into '600 minutes', it means
+                that the simulator will take 600 minutes to fully charge the battery from empty to fill. Currently, 
+                it has been charged to 75.42% capacity and has been charged for 452.52 minutes.</p>
+       </p>
+       <br>
+       <p>
+       <img src="images/simpanel-application.png"
+            style="float:right; margin: 0px 20px 0px 20px;" />
+       <h4>Application</h4>
+        <p>The Application panel provides control of install/uninstall/update methods and a list of the applications
+        in the simulator.</p>
+               <br clear="right" />
+       </p>
+       <br>
+       <p>
+       <img src="images/simpanel-nfc.png"
+            style="float:right; margin: 0px 20px 0px 20px;" />
+       <h4>NFC Adapter</h4>
+        <p>The NFC Adapter panel allows you to turn power on/off and poll NFC adapter. It also 
+           enables sending and receiving NFC tag/peer data.</p>
+        <P>Power</p>
+        <P>Turn on/off power.</P>
+        <P>Polling</p>
+        <P>Turn on/off polling.</P>
+        <p>NFC data sending and receiving</p>
+        <p>At first, select Tag or Peer to attach to, then you can set up more detailed data and the click "Attach"/"Detach" 
+        button to attach or detach.</p>
+               <br clear="right" />
+       </p>
+       <br>
+       <p>
+       <img src="images/simpanel-power-mananger.png"
+            style="float:right; margin: 0px 20px 0px 20px;" />
+       <h4>Power Manager</h4>
+\r
+               <p>The Power Manager panel provides a control and display panel for power resource states.</p>
+                <p>The RESOURCES section shows the current resource states, according to resource property values
+                 (CPU.load, DISPLAY.brightness).</p>
+               <p>CPU and Display state ranges define, as follows:<br>
+               &nbsp;&nbsp;CPU.load [0, 1]<br>
+               &nbsp;&nbsp;&nbsp;&nbsp;Low[0, 0.5],<br>
+               &nbsp;&nbsp;High (0.5, 1]<br>
+               &nbsp;&nbsp;Display.brightness [0, 1]<br>
+               &nbsp;&nbsp;&nbsp;&nbsp;Off [0, 0],<br>
+               &nbsp;&nbsp;&nbsp;&nbsp;Dim (0, 0.5],<br>
+               &nbsp;&nbsp;&nbsp;&nbsp;Normal (0.5, 0.7],<br>
+               &nbsp;&nbsp;&nbsp;&nbsp;Bright (0.7, 1]</p>
+                <p>Power Management Rules defines power management rules and developers can change these rules.If the state 
+                rule is "Allow", requesting for this state is granted in an application. Or, if the state rule is "Deny", 
+                requesting for this state is not granted in an application.</p>
+               <br clear="right" />
+       </p>
+
+</body>
+</html>
diff --git a/org.tizen.web.simulator.help/html/gettingstarted/simulatorpreferences.html b/org.tizen.web.simulator.help/html/gettingstarted/simulatorpreferences.html
new file mode 100644 (file)
index 0000000..dfd9f7b
--- /dev/null
@@ -0,0 +1,50 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Simulator Preferences</title>
+</head>
+
+<body>
+       <h2>Simulator Preferences</h2>
+       <p>The Tizen Web Simulator provides a few configuration options, set in 
+       the Preferences dialog (from the top-menu, select Window, Preferences).
+       Select Tizen SDK, Web, Simulator in the left pane.</p>
+       
+       <a href="../images/simulator_pref.png"><img src="../images/simulator_pref.png" style="width:700px"/></a>
+       <h3>Google Chrome Settings</h3>
+       <h4>Google Chrome location</h4>
+       <p>Enter the full path to the Google Chrome program.  When first started, the Tizen SDK will attempt to discover the location. However, it may 
+       be necessary to enter or modify this value manually.</p>
+       <p>In Linux the path is  often /opt/google/chrome/google-chrome.  <br \>
+       In Windows the path is often C:\Users\&lt;user name&gt;\AppData\Local\Google\Chrome\Application\chrome.exe.</p>
+       
+
+       <h4>Extra parameters</h4>
+       The simulator is started with a few default parameters including: 
+       <table border="0" cellspacing="10" padding="0">
+        <tr><td width="10px">&nbsp;</td><td>--allow-access-from-files</td><td>Allow the simulator Javascript 
+        APIs to access files on the disk (such as config.xml and the application icon).</td></tr>
+        <tr><td width="10px">&nbsp;</td><td>--disable-web-security</td><td>Allow the simulator to do cross 
+        domain requests (such as access map location on another server).</td></tr>
+       </table>
+       If you wish to add any additional startup parameters, enter them here.
+       <h4>Profile data location</h4>
+       <p>Enter the full directory path for the simulator to store user preferences and web application data.</p>
+
+       <p><b>NOTE: </b>Instead of using default value for this parameter, it is HIGHLY recommended that Linux users specify this parameter, since the total length of the directory path in Linux is very limited for this parameter.  Possible consequence for using default value is only one application being able to be launched at the same time.</p>
+       <p>There is no such restriction in Windows version.</p>
+
+       <h3>Simulator Settings</h3> 
+       <h4>Simulator location</h4>
+       <p>Set whether to use the default version of the simulator or another, custom version.</p>
+       Internal:  Use the simulator that is part of the Tizen SDK <br />
+       External:  Use a custom build or other simulator version.  Enter the full path to the "index.html" file for 
+       that version of the simulator. </p>
+       <h4>Launch simulator in Google Chrome application mode</h4>
+       Selecting this option will launch the simulator without the Google URL bar or tabs at the top.  It will
+       appear as if the simulator is a stand-alone application.  It has no effect on simulator features.
+
+</body>
+</html>
diff --git a/org.tizen.web.simulator.help/html/gettingstarted/standalone.html b/org.tizen.web.simulator.help/html/gettingstarted/standalone.html
new file mode 100644 (file)
index 0000000..7965adc
--- /dev/null
@@ -0,0 +1,126 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Using the Tizen Simulator by itself</title>
+
+<!--
+        <link rel="stylesheet" href="styles/style.css">
+        <script type="text/javascript" src="jquery.js"></script>
+        <link rel="stylesheet" type="text/css" href="scripts/content.css" />
+ -->
+<style type="text/css">
+#code {
+       background-color: #EFF3F2;
+       border: 1px solid #E0E8E5;
+       border-collapse: collapse;
+       border-spacing: 0;
+       color: #444444;
+       font-family: Monaco, "Courier New", Courier, monospace;
+       font-size: 100%;
+       overflow: auto;
+       padding: 1em;
+}
+</style>
+</head>
+
+<body>
+
+       <h1>Using the Simulator by itself</h1>
+       <div>
+
+               <h2>Install Google Chrome (or Chromium)</h2>
+               <p>
+                       The Tizen Simulator runs on the Google Chrome or Chromium browser. To
+                       use the Tizen Simulator you must first download and install Google
+                       Chrome on your development platform: <a
+                               href="http://www.google.com/chrome/">http://www.google.com/chrome/</a>
+
+                       1. Use in Eclipse 2. Use as stand-alone
+               <h2>Launch web simulator</h2>
+               <p>After you install Google Chrome (download from
+                       www.google.com/chrome/) and Web Simulator to your local host, you can
+                       launch it and see how it works.</p>
+               <b>NOTE : </b>Since Chrome doesn't allow new windows bringing its own
+               startup options after chrome starts, be sure to close all Chrome
+               instances and start Chrome manually. There a few command line switches
+               that must be included to grant Web Simulator local file access and to
+               achieve optimized visual effects. They are
+               <ul>
+
+                       <p></p>
+                       <li>--allow-file-access-from-files<br> <i>By default,
+                                       file:// URIs cannot read other file:// URIs. This is an override
+                                       for developers who need the old behavior for testing.</i></li>
+                       <p></p>
+                       <p></p>
+                       <li>--disable-web-security<br> <i>Don't enforce the
+                                       same-origin policy. (Used by people testing their sites.)</i></li>
+                       <p></p>
+                       <p></p>
+                       <li>--start-maximized<br> <i>Start the Web Simulator
+                                       maximized for best effect</i></li>
+
+                       <p></p>
+                       <li>--app=&ltfile:///my/path/to/Ripple-UI/pkg/web/index.html&gt<br>
+                               <i>Runs Web Simulator in "app mode": with no browser toolbars.</i></li>
+                       <p></p>
+               </ul>
+
+               Other useful switches are:
+               <ul>
+                       <li>--user-data-dir<br> <i>Specifies the directory that
+                                       user data is kept in. Defaults to ~/.config/google-chrome</i>
+
+                       </li>
+               </ul>
+
+               <h3>Mac</h3>
+               <ul>
+                       <li>Make sure your default browser is Google Chrome, not Safari.</li>
+                       <li>Open the terminal and open the Google Chrome with file
+                               access: The syntax is<br>
+                               <p>open &ltPath to Chrome.app&gt --args
+                                       --allow-file-access-from-files --disable-web-security
+                                       --start-maximized --app=&lturi to Web Simulator&gt
+                                       [--user-data-dir=&ltpath to user data directory&gt]</p>
+                       </li>
+
+               </ul>
+               <div id="code">
+                       <pre>tizen$ open /Applications/Google\ Chrome.app --args --allow-file-access-from-files --disable-web-security --start-maximized --app=file:///Users/tizen/Desktop/web/index.html  --user-data-dir=/Users/tizen/simulator-profile-data/</pre>
+               </div>
+
+               <h3>Windows</h3>
+               <ul>
+                       <li>lanuch "cmd.exe" and open the Google Chrome with file
+                               access: The syntax is<br>
+
+                               <p>&ltpath to chrome.exe&gt --allow-file-access-from-files
+                                       --disable-web-security --start-maximized --app=&lturi to Web
+                                       Simulator&gt [--user-data-dir=&ltpath to user data directory&gt]</p>
+                       </li>
+               </ul>
+               <div id="code">
+                       <pre>C:\>C:\app\Google\Chrome\Application\chrome.exe --allow-file-access-from-files --disable-web-security --start-maximized --app=file:///C://tizen/web/index.html --user-data-dir=C://tizen/simulator-profile-data/</pre>
+
+               </div>
+
+               <h3>Linux</h3>
+               <ul>
+                       <li>open a terminal and open the Google Chrome with file access:
+                               The syntax is<br>
+                               <p>$ &ltpath to google-chrome&gt --allow-file-access-from-files
+                                       --disable-web-security --start-maximized --app=&lturi to Web
+                                       Simulator&gt [--user-data-dir=&ltpath to user data directory&gt]</p>
+                       </li>
+
+               </ul>
+               <div id="code">
+                       <pre>$ google-chrome --allow-file-access-from-files --disable-web-security --start-maximized --app=file:///home/tizen/web/index.html --user-data-dir=/home/tizen/simulator-profile-data/</pre>
+               </div>
+
+       </div>
+</body>
+</html>
diff --git a/org.tizen.web.simulator.help/html/gettingstarted/troubleshooting.html b/org.tizen.web.simulator.help/html/gettingstarted/troubleshooting.html
new file mode 100644 (file)
index 0000000..4ebb138
--- /dev/null
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+       <title>Troubleshooting</title>
+</head>
+
+<body>
+<h2>Troubleshooting</h2>
+Enter details here... 
+</body>
+</html>
\ No newline at end of file
diff --git a/org.tizen.web.simulator.help/html/images/simpanel-accelerometer.png b/org.tizen.web.simulator.help/html/images/simpanel-accelerometer.png
new file mode 100644 (file)
index 0000000..659c180
Binary files /dev/null and b/org.tizen.web.simulator.help/html/images/simpanel-accelerometer.png differ
diff --git a/org.tizen.web.simulator.help/html/images/simpanel-application.png b/org.tizen.web.simulator.help/html/images/simpanel-application.png
new file mode 100644 (file)
index 0000000..1e4cc13
Binary files /dev/null and b/org.tizen.web.simulator.help/html/images/simpanel-application.png differ
diff --git a/org.tizen.web.simulator.help/html/images/simpanel-battery.png b/org.tizen.web.simulator.help/html/images/simpanel-battery.png
new file mode 100644 (file)
index 0000000..465257e
Binary files /dev/null and b/org.tizen.web.simulator.help/html/images/simpanel-battery.png differ
diff --git a/org.tizen.web.simulator.help/html/images/simpanel-call.png b/org.tizen.web.simulator.help/html/images/simpanel-call.png
new file mode 100644 (file)
index 0000000..8426b57
Binary files /dev/null and b/org.tizen.web.simulator.help/html/images/simpanel-call.png differ
diff --git a/org.tizen.web.simulator.help/html/images/simpanel-device-and-network-cell.png b/org.tizen.web.simulator.help/html/images/simpanel-device-and-network-cell.png
new file mode 100644 (file)
index 0000000..f4d29b1
Binary files /dev/null and b/org.tizen.web.simulator.help/html/images/simpanel-device-and-network-cell.png differ
diff --git a/org.tizen.web.simulator.help/html/images/simpanel-device-and-network-config.png b/org.tizen.web.simulator.help/html/images/simpanel-device-and-network-config.png
new file mode 100644 (file)
index 0000000..022c402
Binary files /dev/null and b/org.tizen.web.simulator.help/html/images/simpanel-device-and-network-config.png differ
diff --git a/org.tizen.web.simulator.help/html/images/simpanel-device-and-network-device.png b/org.tizen.web.simulator.help/html/images/simpanel-device-and-network-device.png
new file mode 100644 (file)
index 0000000..facced9
Binary files /dev/null and b/org.tizen.web.simulator.help/html/images/simpanel-device-and-network-device.png differ
diff --git a/org.tizen.web.simulator.help/html/images/simpanel-device-and-network-display.png b/org.tizen.web.simulator.help/html/images/simpanel-device-and-network-display.png
new file mode 100644 (file)
index 0000000..3bbaa4e
Binary files /dev/null and b/org.tizen.web.simulator.help/html/images/simpanel-device-and-network-display.png differ
diff --git a/org.tizen.web.simulator.help/html/images/simpanel-device-and-network-wifi.png b/org.tizen.web.simulator.help/html/images/simpanel-device-and-network-wifi.png
new file mode 100644 (file)
index 0000000..4b8093f
Binary files /dev/null and b/org.tizen.web.simulator.help/html/images/simpanel-device-and-network-wifi.png differ
diff --git a/org.tizen.web.simulator.help/html/images/simpanel-feature-configuration.png b/org.tizen.web.simulator.help/html/images/simpanel-feature-configuration.png
new file mode 100644 (file)
index 0000000..f00ba9a
Binary files /dev/null and b/org.tizen.web.simulator.help/html/images/simpanel-feature-configuration.png differ
diff --git a/org.tizen.web.simulator.help/html/images/simpanel-geo-location.png b/org.tizen.web.simulator.help/html/images/simpanel-geo-location.png
new file mode 100644 (file)
index 0000000..35089aa
Binary files /dev/null and b/org.tizen.web.simulator.help/html/images/simpanel-geo-location.png differ
diff --git a/org.tizen.web.simulator.help/html/images/simpanel-messaging.png b/org.tizen.web.simulator.help/html/images/simpanel-messaging.png
new file mode 100644 (file)
index 0000000..6c9a046
Binary files /dev/null and b/org.tizen.web.simulator.help/html/images/simpanel-messaging.png differ
diff --git a/org.tizen.web.simulator.help/html/images/simpanel-nfc.png b/org.tizen.web.simulator.help/html/images/simpanel-nfc.png
new file mode 100644 (file)
index 0000000..ac89e41
Binary files /dev/null and b/org.tizen.web.simulator.help/html/images/simpanel-nfc.png differ
diff --git a/org.tizen.web.simulator.help/html/images/simpanel-platform-api.png b/org.tizen.web.simulator.help/html/images/simpanel-platform-api.png
new file mode 100644 (file)
index 0000000..a975607
Binary files /dev/null and b/org.tizen.web.simulator.help/html/images/simpanel-platform-api.png differ
diff --git a/org.tizen.web.simulator.help/html/images/simpanel-power-mananger.png b/org.tizen.web.simulator.help/html/images/simpanel-power-mananger.png
new file mode 100644 (file)
index 0000000..18e03e6
Binary files /dev/null and b/org.tizen.web.simulator.help/html/images/simpanel-power-mananger.png differ
diff --git a/org.tizen.web.simulator.help/html/images/simpanel-resolution-and-orientation.png b/org.tizen.web.simulator.help/html/images/simpanel-resolution-and-orientation.png
new file mode 100644 (file)
index 0000000..10b1235
Binary files /dev/null and b/org.tizen.web.simulator.help/html/images/simpanel-resolution-and-orientation.png differ
diff --git a/org.tizen.web.simulator.help/html/images/simpanel-sensors.png b/org.tizen.web.simulator.help/html/images/simpanel-sensors.png
new file mode 100644 (file)
index 0000000..3aebcc9
Binary files /dev/null and b/org.tizen.web.simulator.help/html/images/simpanel-sensors.png differ
diff --git a/org.tizen.web.simulator.help/html/images/simpanel-system-summary.png b/org.tizen.web.simulator.help/html/images/simpanel-system-summary.png
new file mode 100644 (file)
index 0000000..f5729a9
Binary files /dev/null and b/org.tizen.web.simulator.help/html/images/simpanel-system-summary.png differ
diff --git a/org.tizen.web.simulator.help/html/images/simpanel-time.png b/org.tizen.web.simulator.help/html/images/simpanel-time.png
new file mode 100644 (file)
index 0000000..d270d44
Binary files /dev/null and b/org.tizen.web.simulator.help/html/images/simpanel-time.png differ
diff --git a/org.tizen.web.simulator.help/html/images/simulator-launch-icon.png b/org.tizen.web.simulator.help/html/images/simulator-launch-icon.png
new file mode 100644 (file)
index 0000000..908f6c8
Binary files /dev/null and b/org.tizen.web.simulator.help/html/images/simulator-launch-icon.png differ
diff --git a/org.tizen.web.simulator.help/html/images/simulator.png b/org.tizen.web.simulator.help/html/images/simulator.png
new file mode 100644 (file)
index 0000000..ee2e200
Binary files /dev/null and b/org.tizen.web.simulator.help/html/images/simulator.png differ
diff --git a/org.tizen.web.simulator.help/html/images/simulator1.png b/org.tizen.web.simulator.help/html/images/simulator1.png
new file mode 100644 (file)
index 0000000..9749046
Binary files /dev/null and b/org.tizen.web.simulator.help/html/images/simulator1.png differ
diff --git a/org.tizen.web.simulator.help/html/images/simulator_launch.png b/org.tizen.web.simulator.help/html/images/simulator_launch.png
new file mode 100755 (executable)
index 0000000..c5800d9
Binary files /dev/null and b/org.tizen.web.simulator.help/html/images/simulator_launch.png differ
diff --git a/org.tizen.web.simulator.help/html/images/simulator_pref.png b/org.tizen.web.simulator.help/html/images/simulator_pref.png
new file mode 100755 (executable)
index 0000000..0018c16
Binary files /dev/null and b/org.tizen.web.simulator.help/html/images/simulator_pref.png differ
diff --git a/org.tizen.web.simulator.help/html/images/simulator_thumb.png b/org.tizen.web.simulator.help/html/images/simulator_thumb.png
new file mode 100644 (file)
index 0000000..f240d43
Binary files /dev/null and b/org.tizen.web.simulator.help/html/images/simulator_thumb.png differ
diff --git a/org.tizen.web.simulator.help/html/knownissues.html b/org.tizen.web.simulator.help/html/knownissues.html
new file mode 100644 (file)
index 0000000..13c1b00
--- /dev/null
@@ -0,0 +1,54 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Known Issues</title>
+<style type="text/css">
+#code {
+       background-color: #EFF3F2;
+       border: 1px solid #E0E8E5;
+       border-collapse: collapse;
+       border-spacing: 0;
+       color: #444444;
+       font-family: Monaco, "Courier New", Courier, monospace;
+       font-size: 100%;
+       overflow: auto;
+       padding: 1em;
+}
+</style>
+</head>
+
+<body>
+       <h2>Known Issues</h2>
+       <p>There are a few known issues when running application in Web
+               Simulator, and they are listed below and we are wokring on either a
+               better solution or workarounds</p>
+
+       <ul>
+               <li>Application will be loaded twice during refresh. <br><br /></li>
+
+               <li>Using instanceof to check if the return restult  is Array or Date
+                       wouldn't work.<br /> workaround: use the following snippet to
+                       type-check Date and Array.
+                       <div id="code">
+<pre>
+isValidDate = function (d) {
+    if (Object.prototype.toString.call(d) !== "[object Date]")
+        return false;
+    return !isNaN(d.getTime());
+}
+
+isValidArray = function (a) {
+    return (Object.prototype.toString.call(a) === "[object Array]");
+}
+</pre>
+                       </div>
+                       <p />
+               </li>
+
+       </ul>
+       <div></div>
+
+</body>
+</html>
diff --git a/org.tizen.web.simulator.help/html/toc.html b/org.tizen.web.simulator.help/html/toc.html
new file mode 100644 (file)
index 0000000..4f48465
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+        <base href="." />
+        <title>Tizen Web Simulator</title>
+    </head>
+
+    <body>
+        <h2>Tizen Web Simulator</h2>
+        <a href="images/simulator1.png"><img src="images/simulator1.png" style="float:right; margin: 0px 20px 20px 20px; width:500px; " /></a>
+        <br>
+        The Tizen Web Simulator is a light-weight tool for developing mobile web applications.
+
+        <h3>Features:</h3>
+        <ul>
+            <li>Supports running and debugging modern HTML5 web applications</li>
+            <li>Simulates Tizen Web APIs via JavaScript backend</li>
+            <li>Includes configuration panels for sending the application events and messages to debug features 
+                       such as Geo Location, Accelerometer, Messaging, and more.</li>
+            <li>Runs on Google Chrome</li>
+        </ul>
+        <p>For detailed feature descriptions and screenshots, see
+            <a href="gettingstarted/simulatorfeatures.html">Simulator Features</a>.
+        </p>
+
+        <!--
+        <h4>Contents</h4>
+        <ul>
+        <li><a href="#gettingstarted">Getting Started</a></li>
+        <li><a href="appdemos.html">Tizen API Demos</a></li>
+        <li><a href="debugging.html">Debugging with the Simulator</a></li>
+        <li><a href="design.html">Simulator Design</a></li>
+        <li><a href="knownissues.html">Known Issues and Release Notes</a></li>
+        </ul>
+        -->
+
+        <p>The Tizen Web Simulator is based on the <a href="https://github.com/blackberry-webworks/Ripple-UI">Ripple-UI Framework</a> and is licensed under Apache Software License v.2.0.</p>
+    </body>
+</html>
diff --git a/org.tizen.web.simulator.help/plugin.xml b/org.tizen.web.simulator.help/plugin.xml
new file mode 100644 (file)
index 0000000..4df7fcb
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension
+         point="org.eclipse.help.toc">
+      <toc
+            file="toc.xml"
+            primary="true">
+      </toc>
+      <toc
+            file="tocgettingstarted.xml">
+      </toc>
+   </extension>
+
+</plugin>
diff --git a/org.tizen.web.simulator.help/toc.xml b/org.tizen.web.simulator.help/toc.xml
new file mode 100644 (file)
index 0000000..eea7286
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+
+<toc label="Tizen Web Simulator Guide" topic="html/toc.html">
+   <topic href="html/toc.html" label="Overview">
+   </topic>
+   <topic label="Getting Started">
+      <anchor id="gettingstarted"/>
+   </topic>
+</toc>
diff --git a/org.tizen.web.simulator.help/tocgettingstarted.xml b/org.tizen.web.simulator.help/tocgettingstarted.xml
new file mode 100644 (file)
index 0000000..deddca9
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+
+<toc label="Getting Started" link_to="toc.xml#gettingstarted"> 
+       <topic label="Starting the Simulator"  href="html/gettingstarted/configandstartup.html" />
+       <topic href="html/gettingstarted/simulatorfeatures.html" label="Simulator Features" />
+       <topic href="html/gettingstarted/TizenAPI.html" label="Tizen API Coverage" />
+       <topic href="html/gettingstarted/simulatorpreferences.html" label="Simulator Preferences" />
+</toc>
diff --git a/org.tizen.web.simulator/.classpath b/org.tizen.web.simulator/.classpath
new file mode 100644 (file)
index 0000000..1fa3e68
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.tizen.web.simulator/.project b/org.tizen.web.simulator/.project
new file mode 100644 (file)
index 0000000..3b4b8dd
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.tizen.web.simulator</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.tizen.web.simulator/.settings/org.eclipse.jdt.core.prefs b/org.tizen.web.simulator/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..848a353
--- /dev/null
@@ -0,0 +1,8 @@
+#Mon Sep 05 14:25:40 CST 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/org.tizen.web.simulator/LICENSE b/org.tizen.web.simulator/LICENSE
new file mode 100644 (file)
index 0000000..cb4dcce
--- /dev/null
@@ -0,0 +1,335 @@
+                                Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+-------------------------------------------------------
+Copyright 2011 Research In Motion Limited.
+
+Contributors:
+        Brent Lintner (blintner@rim.com)
+        Dan Silivestru (dsilivestru@rim.com)
+        Gord Tanner (gtanner@rim.com)
+        Nino D'Aversa (ndaversa@rim.com)
+        Nukul Bhasin (nbhasin@rim.com)
+
+-------------------------------------------------------
+--> Kudos to third party awesomeness:
+
+* browser-require *
+
+https://github.com/rsms/browser-require
+
+The MIT License
+http://www.opensource.org/licenses/mit-license.php
+Copyright (c) 2010 Rasmus Andersson http://hunch.se/
+
+-------------------------------------------------------
+* jWorkflow *
+
+http://github.com/tinyhippos/jWorkflow/
+
+The MIT License
+http://www.opensource.org/licenses/mit-license.php
+Copyright (c) 2010 all contributors:
+Gord Tanner
+
+-------------------------------------------------------
+* jXHR.js (JSON-P XHR) *
+ v0.1 (c) Kyle Simpson 
+ MIT License
+
+-------------------------------------------------------
+* UI.Acceleromter Control (panel plugin) *
+
+Licensed under the MIT license:
+  Copyright Train Hack 2010
+  Contributors: Wolfram Kriesing, Dan Silivestru, Brent Lintner
+  http://www.opensource.org/licenses/mit-license.php
+
+-------------------------------------------------------
+* jQuery JavaScript Library *
+
+http://jquery.com/
+
+Copyright 2010, John Resig
+Licensed under MIT
+http://jquery.org/license
+
+Includes Sizzle.js
+http://sizzlejs.com/
+Copyright 2010, The Dojo Foundation
+Released under the MIT, BSD, and GPL Licenses.
+
+-------------------------------------------------------
+* jQuery UI *
+
+Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
+licensed under the MIT (MIT-LICENSE.txt)
+
+http://docs.jquery.com/UI
+
+-------------------------------------------------------
+* jQuery Tooltip plugin *
+
+http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/
+http://docs.jquery.com/Plugins/Tooltip
+
+Copyright (c) 2006 - 2008 Jörn Zaefferer
+
+Dual licensed under the MIT and GPL licenses:
+  http://www.opensource.org/licenses/mit-license.php
+  http://www.gnu.org/licenses/gpl.html
+
+-------------------------------------------------------
+* Math.uuid.js (v1.4) *
+
+http://www.broofa.com
+mailto:robert@broofa.com
+
+Copyright (c) 2010 Robert Kieffer
+Dual licensed under the MIT and GPL licenses.
+
+-------------------------------------------------------
+* Wii Opera SDK - 3D Math Class v2.7.22 2008-12-14 *
+(c) 2007-2008 Daniel Gump. All Rights Reserved.                          
+ http://wiioperasdk.com, http://hullbreachonline.com                      
+ hullbreach@hullbreachonline.com                                          
+                                                                          
+* Wii Opera SDK - Drawing Class v2.6.16 2008-12-14 * 
+(c) 2007-2008 Daniel Gump. All Rights Reserved
+http://wiioperasdk.com, http://hullbreachonline.com
+hullbreach@hullbreachonline.com
+
+  Wii is a trademark of Nintendo Co., Ltd.                                
+  Opera is a trademark of Opera, ASA.                                     
+  This software package is not associated with either company             
+  but was created to support users of both.  Its alternative name         
+  when supporting other products is the HULLBREACH SDK.                   
+                                                                          
+  Redistribution and use in source and binary forms, with or without      
+  modification, are permitted provided that the following conditions      
+  are met:                                                                
+    * Redistributions of source code must retain the above copyright      
+      notice, this list of conditions and the following disclaimer.       
+    * Redistributions in binary form must reproduce the above copyright   
+      notice, this list of conditions and the following disclaimer in     
+      the documentation and/or other materials provided with the          
+      distribution.                                                       
+    * Neither the names HULLBREACH ONLINE nor WII OPERA SDK nor the names 
+      of its contributors may be used to endorse or promote products      
+      derived from this software without specific prior written           
+      permission.                                                         
+    * If the explicit purpose of the software is not to support the       
+      Nintendo Wii or the Opera Web browser, then the names of such must  
+      not be used in any derived product. The name shall be the           
+      HULLBREACH SDK with a reference link to http://hullbreachonline.    
+                                                                          
+  THIS SOFTWARE IS PROVIDED BY Daniel Gump ''AS IS'' AND ANY EXPRESS OR   
+  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED          
+  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE  
+  DISCLAIMED. IN NO EVENT SHALL Daniel Gump BE LIABLE FOR ANY DIRECT,     
+  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES      
+  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR      
+  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)      
+  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,     
+  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING   
+  IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE      
+  POSSIBILITY OF SUCH DAMAGE.                                             
diff --git a/org.tizen.web.simulator/META-INF/MANIFEST.MF b/org.tizen.web.simulator/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..8c7d511
--- /dev/null
@@ -0,0 +1,28 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %plugin.name
+Bundle-SymbolicName: org.tizen.web.simulator;singleton:=true
+Bundle-Version: 0.2.0.qualifier
+Bundle-Activator: org.tizen.web.simulator.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.core.filesystem;bundle-version="1.3.100",
+ org.eclipse.ui.ide;bundle-version="3.7.0",
+ org.eclipse.core.resources;bundle-version="3.7.100",
+ org.tizen.common,
+ org.tizen.web.project
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6,
+ OSGi/Minimum-1.0
+Export-Package: org.tizen.web.simulator;
+  uses:="org.eclipse.jface.action,
+   org.eclipse.jface.resource,
+   org.eclipse.ui,
+   org.eclipse.ui.plugin,
+   org.eclipse.jface.viewers,
+   org.osgi.framework"
+Bundle-Vendor: %Bundle-Vendor
+Import-Package: org.eclipse.debug.core,
+ org.eclipse.debug.core.model,
+ org.eclipse.debug.ui,
+ org.tizen.web.common
diff --git a/org.tizen.web.simulator/OSGI-INF/l10n/bundle.properties b/org.tizen.web.simulator/OSGI-INF/l10n/bundle.properties
new file mode 100644 (file)
index 0000000..1943aa5
--- /dev/null
@@ -0,0 +1,13 @@
+#Properties file for org.tizen.web.simulator
+action.label = Web Simulator
+action.tooltip = Launch in Tizen Web Simulator
+plugin.preference.name = Simulator
+plugin.name = Tizen Web Simulator
+actionSet.label = Simulator
+Bundle-Vendor = Intel Corporation
+Bundle-Name = Tizen Web Simulator
+#Properties file for org.tizen.web.simulator.launch
+launchConfigurationType.name = Tizen Web Simulator Application
+launchDelegate.name = Tizen Web Simulator Application
+shortcut.label = Tizen Web Simulator Application
+description.description = Runs an application in simulator
diff --git a/org.tizen.web.simulator/README.md b/org.tizen.web.simulator/README.md
new file mode 100644 (file)
index 0000000..2d1a336
--- /dev/null
@@ -0,0 +1,33 @@
+# Tizen Web Simulator plug-in for Tizen Web IDE
+
+Copyright (c) 2012 Intel Inc.
+
+## License 
+
+All assets in this repository, unless otherwise stated through sub-directory LICENSE or NOTICE files, are subject to the Apache Software License v.2.0.
+
+## Perquisites
+
+You need to install Google Chrome.
+
+## Installation
+
+EXTRACT(not copy) the plugin jar to the plugin folder of the Tizen Web IDE:
+unzip <filename>.jar -d /path-to-tizen-web-ide/plugins/<filename>
+e.g. 
+unzip org.tizen.web.simulator_0.1.1.201202161444.jar -d ~/tizen-sdk/IDE/plugins/org.tizen.web.simulator_0.1.1.201202161444
+
+## Usage
+
+1. Start Tizen Web IDE.
+2. Switch to Tizen Web perspective if not in it.
+3. Create/Open a Tizen Web Project.
+4. Click the Tizen icon in the toolbar. The simulator will open the start file in the Tizen Web project.
+
+## Build
+
+1.     Import the project in Eclipse. 
+( It's recommended to install Eclipse Plug-in Development Environment in the Tizen Web IDE, and import the project in it. So that you can directly run and test the plugin.)  
+2.     Open the plugin.xml
+3.     In the Overview tab, find Export Wizard in the lower-right corner.
+4.     Follow the wizard to get the plugin in JAR format.
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/Activator.class b/org.tizen.web.simulator/bin/org/tizen/web/simulator/Activator.class
new file mode 100644 (file)
index 0000000..099c018
Binary files /dev/null and b/org.tizen.web.simulator/bin/org/tizen/web/simulator/Activator.class differ
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/FieldEditorComposite.class b/org.tizen.web.simulator/bin/org/tizen/web/simulator/FieldEditorComposite.class
new file mode 100644 (file)
index 0000000..e04ddda
Binary files /dev/null and b/org.tizen.web.simulator/bin/org/tizen/web/simulator/FieldEditorComposite.class differ
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/Messages.class b/org.tizen.web.simulator/bin/org/tizen/web/simulator/Messages.class
new file mode 100644 (file)
index 0000000..064293c
Binary files /dev/null and b/org.tizen.web.simulator/bin/org/tizen/web/simulator/Messages.class differ
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/PreferenceInitializer.class b/org.tizen.web.simulator/bin/org/tizen/web/simulator/PreferenceInitializer.class
new file mode 100644 (file)
index 0000000..9cc7d1d
Binary files /dev/null and b/org.tizen.web.simulator/bin/org/tizen/web/simulator/PreferenceInitializer.class differ
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/Settings.class b/org.tizen.web.simulator/bin/org/tizen/web/simulator/Settings.class
new file mode 100644 (file)
index 0000000..740dc5d
Binary files /dev/null and b/org.tizen.web.simulator/bin/org/tizen/web/simulator/Settings.class differ
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/Simulator.class b/org.tizen.web.simulator/bin/org/tizen/web/simulator/Simulator.class
new file mode 100644 (file)
index 0000000..e576ef8
Binary files /dev/null and b/org.tizen.web.simulator/bin/org/tizen/web/simulator/Simulator.class differ
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/SimulatorActionDelegate$InvalidConfiguartionException.class b/org.tizen.web.simulator/bin/org/tizen/web/simulator/SimulatorActionDelegate$InvalidConfiguartionException.class
new file mode 100644 (file)
index 0000000..ea60cf9
Binary files /dev/null and b/org.tizen.web.simulator/bin/org/tizen/web/simulator/SimulatorActionDelegate$InvalidConfiguartionException.class differ
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/SimulatorActionDelegate.class b/org.tizen.web.simulator/bin/org/tizen/web/simulator/SimulatorActionDelegate.class
new file mode 100644 (file)
index 0000000..70cd6c6
Binary files /dev/null and b/org.tizen.web.simulator/bin/org/tizen/web/simulator/SimulatorActionDelegate.class differ
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/Startup.class b/org.tizen.web.simulator/bin/org/tizen/web/simulator/Startup.class
new file mode 100644 (file)
index 0000000..06a738c
Binary files /dev/null and b/org.tizen.web.simulator/bin/org/tizen/web/simulator/Startup.class differ
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/WorkbenchPreferencePage$1.class b/org.tizen.web.simulator/bin/org/tizen/web/simulator/WorkbenchPreferencePage$1.class
new file mode 100644 (file)
index 0000000..a60bca4
Binary files /dev/null and b/org.tizen.web.simulator/bin/org/tizen/web/simulator/WorkbenchPreferencePage$1.class differ
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/WorkbenchPreferencePage$2.class b/org.tizen.web.simulator/bin/org/tizen/web/simulator/WorkbenchPreferencePage$2.class
new file mode 100644 (file)
index 0000000..db3d2a6
Binary files /dev/null and b/org.tizen.web.simulator/bin/org/tizen/web/simulator/WorkbenchPreferencePage$2.class differ
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/WorkbenchPreferencePage.class b/org.tizen.web.simulator/bin/org/tizen/web/simulator/WorkbenchPreferencePage.class
new file mode 100644 (file)
index 0000000..3add44a
Binary files /dev/null and b/org.tizen.web.simulator/bin/org/tizen/web/simulator/WorkbenchPreferencePage.class differ
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/Constants.class b/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/Constants.class
new file mode 100644 (file)
index 0000000..37548e6
Binary files /dev/null and b/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/Constants.class differ
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/LaunchMessages.class b/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/LaunchMessages.class
new file mode 100644 (file)
index 0000000..0081a5a
Binary files /dev/null and b/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/LaunchMessages.class differ
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/LaunchMessages.properties b/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/LaunchMessages.properties
new file mode 100644 (file)
index 0000000..227fe87
--- /dev/null
@@ -0,0 +1,6 @@
+MAINTAB = Simulator Application
+PROJECT_NAME = Project:
+SimulatorMainTab_TITLE = Project Selection
+SimulatorMainTab_MESSAGE = Select a project to launch.
+PROJECT_NOT_SPECIFIED = Project not specified
+PROJECT_MUST_BE_OPENED = Project must be opened
\ No newline at end of file
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/LaunchShortcut.class b/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/LaunchShortcut.class
new file mode 100644 (file)
index 0000000..3b84f60
Binary files /dev/null and b/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/LaunchShortcut.class differ
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/Messages.class b/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/Messages.class
new file mode 100644 (file)
index 0000000..3d6c29b
Binary files /dev/null and b/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/Messages.class differ
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/Messages.properties b/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/Messages.properties
new file mode 100644 (file)
index 0000000..c97c82f
--- /dev/null
@@ -0,0 +1,6 @@
+LaunchShortcut_ChooseDialogTitle=Select Simulator Application\r
+LaunchShortcut_ChooseDialogMessage=&Select existing configuration:\r
+LaunchShortcut_EditableNotLaunchable=The current editable item is not launchable\r
+LaunchShortcut_ErrorDialogTitle=Unable to launch\r
+LaunchShortcut_SelectionNotLaunchable=The currently selected item is not launchable\r
+LaunchShortcut_IncompatibleProject=The selected project is not a simulator project
\ No newline at end of file
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/SimulatorApplicationDelegate.class b/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/SimulatorApplicationDelegate.class
new file mode 100644 (file)
index 0000000..a9b073f
Binary files /dev/null and b/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/SimulatorApplicationDelegate.class differ
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/SimulatorApplicationLaunchShortcut.class b/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/SimulatorApplicationLaunchShortcut.class
new file mode 100644 (file)
index 0000000..3190c0c
Binary files /dev/null and b/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/SimulatorApplicationLaunchShortcut.class differ
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/SimulatorApplicationLaunchTabGroup.class b/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/SimulatorApplicationLaunchTabGroup.class
new file mode 100644 (file)
index 0000000..83ac47b
Binary files /dev/null and b/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/SimulatorApplicationLaunchTabGroup.class differ
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/SimulatorMainTab$1.class b/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/SimulatorMainTab$1.class
new file mode 100644 (file)
index 0000000..db3e559
Binary files /dev/null and b/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/SimulatorMainTab$1.class differ
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/SimulatorMainTab$2.class b/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/SimulatorMainTab$2.class
new file mode 100644 (file)
index 0000000..9a38144
Binary files /dev/null and b/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/SimulatorMainTab$2.class differ
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/SimulatorMainTab.class b/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/SimulatorMainTab.class
new file mode 100644 (file)
index 0000000..4a68155
Binary files /dev/null and b/org.tizen.web.simulator/bin/org/tizen/web/simulator/launch/SimulatorMainTab.class differ
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/messages.properties b/org.tizen.web.simulator/bin/org/tizen/web/simulator/messages.properties
new file mode 100644 (file)
index 0000000..08bbb1d
--- /dev/null
@@ -0,0 +1,23 @@
+EightSpacesIndent=\ \ \ \ \ \ \ \ 
+msgErrConfigurationFile=There is an error in the configuration file.
+msgErrFileMissing=%s is missing in the plugin. Reinstall the plugin or contact the developer.
+msgErrFileMissing2=%s doesn't exist in the plugin.
+msgErrURLConversion=The LocationURI can not be converted to the URL.
+msgErrInvalidSimulator=The specified external simulator is invalid.
+msgErrLaunchFailed=Google Chrome could not be found (%s). \n\nPlease install Google Chrome and specify the Google Chrome program location in Window->Preferences under "Tizen SDK/Web/Simulator".
+msgErrSimulatorFailed=Tizen Web Simulator could not be found (%s). \n\nPlease install Tizen Web Simulator and specify the program location in Window->Preferences under "Tizen SDK/Web/Simulator".
+msgErrProfileWritableDirectory=Profile data location should be an existing writable directory.
+msgErrProfileLengthExceeded=Profile data location should be shorter than %d characters.
+msgPreferencePageDescription=General settings for the Tizen Web Simulator:
+
+Chrome_excutable=&Google Chrome location:
+Chrome_Settings=Google Chrome Settings
+Extra_parameters=&Extra parameters:
+Internal=&Internal:  Use the simulator included with the Tizen SDK.
+Launch_in_app_mode=&Launch the simulator in Google Chrome application mode
+MsgErrProfileInvalid=The Google Chrome profile location is not valid. Please specify it in Window->Preferences under "Tizen SDK/Web/Simulator".
+Profile_data_location=&Profile data location:
+Simulator_Settings=Simulator Settings
+Simulator_to_use=Simulator location:
+User_specified=E&xternal:  Use a custom simulator.  Enter the location below.
+msgErrStartMaximized=Warning: --start-maximized doesn't work in application mode.
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/preferences/FieldEditorComposite.class b/org.tizen.web.simulator/bin/org/tizen/web/simulator/preferences/FieldEditorComposite.class
new file mode 100644 (file)
index 0000000..e7f8b58
Binary files /dev/null and b/org.tizen.web.simulator/bin/org/tizen/web/simulator/preferences/FieldEditorComposite.class differ
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/preferences/PreferenceInitializer.class b/org.tizen.web.simulator/bin/org/tizen/web/simulator/preferences/PreferenceInitializer.class
new file mode 100644 (file)
index 0000000..1a4c41a
Binary files /dev/null and b/org.tizen.web.simulator/bin/org/tizen/web/simulator/preferences/PreferenceInitializer.class differ
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/preferences/Settings.class b/org.tizen.web.simulator/bin/org/tizen/web/simulator/preferences/Settings.class
new file mode 100644 (file)
index 0000000..c708c71
Binary files /dev/null and b/org.tizen.web.simulator/bin/org/tizen/web/simulator/preferences/Settings.class differ
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/preferences/WorkbenchPreferencePage$1.class b/org.tizen.web.simulator/bin/org/tizen/web/simulator/preferences/WorkbenchPreferencePage$1.class
new file mode 100644 (file)
index 0000000..982cdb2
Binary files /dev/null and b/org.tizen.web.simulator/bin/org/tizen/web/simulator/preferences/WorkbenchPreferencePage$1.class differ
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/preferences/WorkbenchPreferencePage$2.class b/org.tizen.web.simulator/bin/org/tizen/web/simulator/preferences/WorkbenchPreferencePage$2.class
new file mode 100644 (file)
index 0000000..3fd45d2
Binary files /dev/null and b/org.tizen.web.simulator/bin/org/tizen/web/simulator/preferences/WorkbenchPreferencePage$2.class differ
diff --git a/org.tizen.web.simulator/bin/org/tizen/web/simulator/preferences/WorkbenchPreferencePage.class b/org.tizen.web.simulator/bin/org/tizen/web/simulator/preferences/WorkbenchPreferencePage.class
new file mode 100644 (file)
index 0000000..49a6522
Binary files /dev/null and b/org.tizen.web.simulator/bin/org/tizen/web/simulator/preferences/WorkbenchPreferencePage.class differ
diff --git a/org.tizen.web.simulator/build.properties b/org.tizen.web.simulator/build.properties
new file mode 100644 (file)
index 0000000..6752594
--- /dev/null
@@ -0,0 +1,15 @@
+source.. = src/
+output.. = bin/
+bin.includes = OSGI-INF/,\
+               LICENSE,\
+               META-INF/,\
+               README.md,\
+               plugin.xml,\
+               icons/,\
+               profile/stub,\
+               .
+src.includes = README.md,\
+               LICENSE,\
+               bin/,\
+               icons/,\
+               profile/stub
diff --git a/org.tizen.web.simulator/icons/c_app.gif b/org.tizen.web.simulator/icons/c_app.gif
new file mode 100644 (file)
index 0000000..e2dd0c4
Binary files /dev/null and b/org.tizen.web.simulator/icons/c_app.gif differ
diff --git a/org.tizen.web.simulator/icons/c_app_Item.gif b/org.tizen.web.simulator/icons/c_app_Item.gif
new file mode 100644 (file)
index 0000000..f198283
Binary files /dev/null and b/org.tizen.web.simulator/icons/c_app_Item.gif differ
diff --git a/org.tizen.web.simulator/icons/tizen16.png b/org.tizen.web.simulator/icons/tizen16.png
new file mode 100644 (file)
index 0000000..a9696cb
Binary files /dev/null and b/org.tizen.web.simulator/icons/tizen16.png differ
diff --git a/org.tizen.web.simulator/plugin.xml b/org.tizen.web.simulator/plugin.xml
new file mode 100644 (file)
index 0000000..081feb8
--- /dev/null
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+   <extension
+         point="org.eclipse.ui.preferencePages">
+      <page
+            category="org.tizen.web.preferences.WebPreferencePage"
+            class="org.tizen.web.simulator.preferences.WorkbenchPreferencePage"
+            id="org.tizen.web.simulator.preferencepage"
+            name="%plugin.preference.name">
+      </page>
+   </extension>
+   <extension
+         point="org.eclipse.core.runtime.preferences">
+      <initializer
+            class="org.tizen.web.simulator.preferences.PreferenceInitializer">
+      </initializer>
+   </extension>
+   <extension
+         point="org.eclipse.debug.core.launchConfigurationTypes">
+      <launchConfigurationType
+            id="org.tizen.web.simulator.launch.simulatorApplication"
+            name="%launchConfigurationType.name"
+            public="true">
+      </launchConfigurationType>
+   </extension>
+   <extension
+         point="org.eclipse.debug.core.launchDelegates">
+      <launchDelegate
+            delegate="org.tizen.web.simulator.launch.SimulatorApplicationDelegate"
+            id="org.tizen.web.simulator.launch.SimulatorApplicationDelegate"
+            modes="run"
+            name="%launchDelegate.name"
+            type="org.tizen.web.simulator.launch.simulatorApplication">
+      </launchDelegate>
+   </extension>
+   <extension
+         point="org.eclipse.debug.ui.launchShortcuts">
+      <shortcut
+            class="org.tizen.web.simulator.launch.SimulatorApplicationLaunchShortcut"
+            icon="icons/tizen16.png"
+            id="org.tizen.web.simulator.launch.SimulatorApplication.shortcut"
+            label="%shortcut.label"
+            modes="run">
+         <configurationType
+               id="org.tizen.web.simulator.launch.simulatorApplication">
+         </configurationType>
+         <contextualLaunch>
+            <enablement>
+               <with
+                     variable="selection">
+                  <count
+                        value="1">
+                  </count>
+                  <iterate>
+                     <and>
+                        <test
+                              property="org.eclipse.core.resources.projectNature"
+                              value="org.tizen.web.project.builder.WebNature">
+                        </test>
+                     </and>
+                  </iterate>
+               </with>
+            </enablement>
+         </contextualLaunch>
+         <description
+               description="%description.description"
+               mode="run">
+         </description>
+      </shortcut>
+   </extension>
+   <extension
+         point="org.eclipse.debug.ui.launchConfigurationTypeImages">
+      <launchConfigurationTypeImage
+            configTypeID="org.tizen.web.simulator.launch.simulatorApplication"
+            icon="icons/c_app_Item.gif"
+            id="org.tizen.web.launch.SimulatorApplicationImage">
+      </launchConfigurationTypeImage>
+   </extension>
+   <extension
+         point="org.eclipse.debug.ui.launchConfigurationTabGroups">
+      <launchConfigurationTabGroup
+            class="org.tizen.web.simulator.launch.SimulatorApplicationLaunchTabGroup"
+            id="org.tizen.web.launch.SimulatorApplicationTabGroup"
+            type="org.tizen.web.simulator.launch.simulatorApplication">
+      </launchConfigurationTabGroup>
+   </extension>
+   <extension
+         point="org.eclipse.core.runtime.adapters">
+      <factory
+            adaptableType="org.eclipse.core.resources.IResource"
+            class="org.eclipse.core.runtime.IAdaptable">
+         <adapter
+               type="org.eclipse.debug.ui.actions.ILaunchable">
+         </adapter>
+      </factory>
+   </extension>
+
+</plugin>
diff --git a/org.tizen.web.simulator/profile/stub b/org.tizen.web.simulator/profile/stub
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/org.tizen.web.simulator/sdk-profile-data/stub b/org.tizen.web.simulator/sdk-profile-data/stub
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/org.tizen.web.simulator/src/org/tizen/web/simulator/Activator.java b/org.tizen.web.simulator/src/org/tizen/web/simulator/Activator.java
new file mode 100644 (file)
index 0000000..a3dcf48
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ *  Copyright (c) 2012 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.web.simulator;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+       // The plug-in ID
+       public static final String PLUGIN_ID = Simulator.pluginID; //$NON-NLS-1$
+
+       // The shared instance
+       private static Activator plugin;
+       
+       /**
+        * The constructor
+        */
+       public Activator() {
+       }
+
+       /*
+        * (non-Javadoc)
+        * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+        */
+       public void start(BundleContext context) throws Exception {
+               super.start(context);
+               plugin = this;
+       }
+
+       /*
+        * (non-Javadoc)
+        * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+        */
+       public void stop(BundleContext context) throws Exception {
+               plugin = null;
+               super.stop(context);
+       }
+
+       public static String getUniqueIdentifier() {
+               return PLUGIN_ID;
+       }
+
+       /**
+        * Returns the shared instance
+        *
+        * @return the shared instance
+        */
+       public static Activator getDefault() {
+               return plugin;
+       }
+
+       /**
+        * Returns an image descriptor for the image file at the given
+        * plug-in relative path
+        *
+        * @param path the path
+        * @return the image descriptor
+        */
+       public static ImageDescriptor getImageDescriptor(String path) {
+               return imageDescriptorFromPlugin(PLUGIN_ID, path);
+       }
+}
diff --git a/org.tizen.web.simulator/src/org/tizen/web/simulator/Messages.java b/org.tizen.web.simulator/src/org/tizen/web/simulator/Messages.java
new file mode 100644 (file)
index 0000000..7d94613
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2012 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.web.simulator;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+       private static final String BUNDLE_NAME = "org.tizen.web.simulator.messages"; //$NON-NLS-1$
+       public static String Chrome_excutable;
+       public static String Chrome_Settings;
+       public static String EightSpacesIndent;
+       public static String Extra_parameters;
+       public static String Internal;
+       public static String Launch_in_app_mode;
+       public static String msgErrConfigurationFile;
+       public static String msgErrFileMissing;
+       public static String msgErrFileMissing2;
+       public static String msgErrInvalidSimulator;
+       public static String msgErrLaunchFailed;
+       public static String msgErrSimulatorFailed;
+       public static String MsgErrProfileInvalid;
+       public static String msgErrProfileWritableDirectory;
+       public static String msgErrProfileLengthExceeded;
+       public static String msgErrURLConversion;
+       public static String msgPreferencePageDescription;
+       public static String Profile_data_location;
+       public static String Simulator_Settings;
+       public static String Simulator_to_use;
+       public static String User_specified;
+       static {
+               // initialize resource bundle
+               NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+       }
+
+       private Messages() {
+       }
+}
diff --git a/org.tizen.web.simulator/src/org/tizen/web/simulator/PreferenceInitializer.java b/org.tizen.web.simulator/src/org/tizen/web/simulator/PreferenceInitializer.java
new file mode 100644 (file)
index 0000000..27d6a8e
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2012 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.web.simulator;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.util.Properties;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.preference.IPreferenceStore;
+
+public class PreferenceInitializer extends AbstractPreferenceInitializer {
+
+       private static final String ENV_USERPROFILE = "USERPROFILE";
+       private static final String ENV_LOCALAPPDATA = "LOCALAPPDATA";
+       private static final String WIN_VER_6 = "6";
+       private static final String OS_VERSION = "os.version";
+       private static final String CHROME_LINUX = "/opt/google/chrome/google-chrome";
+       private static final String CHROME_WIN = "\\Google\\Chrome\\Application\\chrome.exe";
+       private static final String CHROME_MACOS = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome";
+
+       public PreferenceInitializer() {
+       }
+
+       @Override
+       public void initializeDefaultPreferences() {
+               reinitializeDefaultPreferences();
+       }
+
+       public static void reinitializeDefaultPreferences(){
+               IPreferenceStore store = Activator.getDefault().getPreferenceStore();
+               //the process of finding Chrome is according to the start script of WebSimulatorAIO
+               String os = Platform.getOS();
+               String chrome;
+               if (os.equals(Platform.OS_MACOSX)) {
+                       chrome = CHROME_MACOS;
+               } else if (os.equals(Platform.OS_WIN32)) {
+                       String chromeDir;
+                       if (System.getProperty(OS_VERSION).startsWith(WIN_VER_6))
+                               chromeDir = System.getenv(ENV_LOCALAPPDATA);
+                       else
+                               // XP does not have LOCALAPPDATA environment variable
+                               chromeDir = System.getenv(ENV_USERPROFILE) + File.separator + "Local Settings" + File.separator + "Application Data";
+                       chrome = chromeDir + CHROME_WIN;
+               } else {
+                       chrome = CHROME_LINUX;
+               }
+               StringBuffer simulatorPath = new StringBuffer();
+               StringBuffer simulatorLoc = new StringBuffer();
+               simulatorLoc.append(System.getProperty("user.home"));
+               simulatorLoc.append("/.TizenSDK/tizensdkpath");
+               Properties pro = new Properties();
+               try {
+                       pro.load(new FileInputStream(simulatorLoc.toString()));
+                       simulatorPath.append(pro.getProperty("TIZEN_SDK_INSTALLED_PATH"));
+                       simulatorPath.append("/Simulator/web/index.html");
+               } catch (Exception e) {
+                       System.out.println("cannot find the simulator exec path");
+               }
+               store.setDefault(Settings.CHROME_EXECUTABLE, chrome);
+               store.setDefault(Settings.EXTRA_PARAM, "");
+               store.setDefault(Settings.USE_INTERNAL_SIMULATOR, Settings.FALSE);
+               store.setDefault(Settings.SIMULATOR_PATH, simulatorPath.toString());
+               store.setDefault(Settings.APP_MODE, true);
+       }
+}
diff --git a/org.tizen.web.simulator/src/org/tizen/web/simulator/Settings.java b/org.tizen.web.simulator/src/org/tizen/web/simulator/Settings.java
new file mode 100644 (file)
index 0000000..5fdce6d
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2012 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.web.simulator;
+
+public class Settings {
+       public static final String CHROME_EXECUTABLE = "CHROME_EXECUTABLE"; //$NON-NLS-1$ //$NON-NLS-2$
+       public static final String EXTRA_PARAM  = "EXTRA_PARAM"; //$NON-NLS-1$ //$NON-NLS-2$
+       public static final String USE_INTERNAL_SIMULATOR = "USE_INTERNAL_SIMULATOR"; //$NON-NLS-1$ //$NON-NLS-2$
+       public static final String SIMULATOR_PATH = "SIMULATOR_PATH"; //$NON-NLS-1$ //$NON-NLS-2$
+       public static final String APP_MODE = "APP_MODE"; //$NON-NLS-1$ //$NON-NLS-2$
+       public static final String TRUE = "TRUE"; //$NON-NLS-1$ //$NON-NLS-2$
+       public static final String FALSE = "FALSE"; //$NON-NLS-1$ //$NON-NLS-2$
+       
+       private Settings (){
+       }
+}
diff --git a/org.tizen.web.simulator/src/org/tizen/web/simulator/Simulator.java b/org.tizen.web.simulator/src/org/tizen/web/simulator/Simulator.java
new file mode 100644 (file)
index 0000000..8eaead1
--- /dev/null
@@ -0,0 +1,289 @@
+/*
+ * Copyright (c) 2012 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.web.simulator;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLDecoder;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.core.filesystem.URIUtil;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+import org.tizen.web.project.core.WidgetConfigurator;
+import org.tizen.web.simulator.preferences.Settings;
+import org.tizen.common.util.DialogUtil;
+
+
+public class Simulator {
+
+    //plug-in ID
+    public static final String pluginID = "org.tizen.web.simulator"; //$NON-NLS-1$ //$NON-NLS-2$
+
+    public static final String CHROME_PARAM_DEFAULT = "--allow-file-access-from-files --disable-web-security "; //$NON-NLS-1$ //$NON-NLS-2$
+    private static final String CHROME_PARAM_USERDATADIR = "--user-data-dir="; //$NON-NLS-1$ //$NON-NLS-2$
+    public static final String CHROME_PARAM_URL = "?url="; //$NON-NLS-1$ //$NON-NLS-2$
+    public static final String CHROME_PARAM_APP = "--app="; //$NON-NLS-1$ //$NON-NLS-2$
+
+    public static final String INTERNAL_SIMULATOR_PATH = "/pkg/web/index.html"; //$NON-NLS-1$ //$NON-NLS-2$
+
+    public static final String[] DEFAULT_INDEXHTML_NAMES = {
+            "index.html", "index.htm", //$NON-NLS-1$ //$NON-NLS-2$
+            "index.xhtml", "index.xht" //$NON-NLS-1$ //$NON-NLS-2$
+        };
+    public static final String[] TIZEN_NATURE_IDS = {
+        "org.tizen.web.project.builder.WebNature" //$NON-NLS-1$ //$NON-NLS-2$
+    };
+
+    public static final String REGEX_SPACES = "\\s+"; //$NON-NLS-1$ //$NON-NLS-2$
+    public static final String UTF_8 = "UTF-8"; //$NON-NLS-1$
+
+    /**
+    * Convenience method to get the window that owns this action's Shell.
+    */
+    public static Shell getShell() {
+        IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+        if (window == null) {
+            IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
+            if (windows.length > 0) {
+                return windows[0].getShell();
+            }
+        } else {
+            return window.getShell();
+        }
+        return null;
+    }
+
+    public static Process launch(URL url) {
+        IPreferenceStore store = Activator.getDefault().getPreferenceStore();
+        String chromeExecutable = store.getString(Settings.CHROME_EXECUTABLE);
+        String chromeParam = CHROME_PARAM_DEFAULT + store.getString(Settings.EXTRA_PARAM);
+        StringBuffer simulatorURL = new StringBuffer();
+
+        if (store.getBoolean(Settings.APP_MODE))
+            simulatorURL.append(CHROME_PARAM_APP);
+        if (Settings.TRUE.equals(store.getString(Settings.USE_INTERNAL_SIMULATOR))) {
+            try {
+                simulatorURL.append(URLtoString(getPluginFileURL(INTERNAL_SIMULATOR_PATH)));
+            } catch (IOException e) {
+                DialogUtil.openErrorDialog(getShell(), "Error", String.format(Messages.msgErrFileMissing, INTERNAL_SIMULATOR_PATH)); //$NON-NLS-1$
+                return null;
+            }
+        } else {
+            try {
+                simulatorURL.append(URLtoString(URIUtil.toURI(new Path(store.getString(Settings.SIMULATOR_PATH))).toURL()));
+            } catch (MalformedURLException e) {
+                DialogUtil.openErrorDialog(getShell(), "Error", Messages.msgErrInvalidSimulator); //$NON-NLS-1$
+                return null;
+            }
+        }
+
+        simulatorURL.append(CHROME_PARAM_URL);
+        String fileURL;
+        fileURL = URLtoString(url);
+        simulatorURL.append(fileURL);
+
+        
+        StringBuffer userdataDir = new StringBuffer();
+        userdataDir.append(CHROME_PARAM_USERDATADIR);
+        String profilePath = store.getString(Settings.PROFILE_PATH);
+/*
+        if (!isWritableDirectory(profilePath) || isProfilePathTooLong(profilePath)) {
+               DialogUtil.openErrorDialog(getShell(), "Error", Messages.MsgErrProfileInvalid); //$NON-NLS-1$
+               return null;
+        }
+*/        
+        userdataDir.append(profilePath);
+        List<String> commandArgs = new ArrayList<String> ();
+        commandArgs.add(chromeExecutable);
+        commandArgs.addAll(Arrays.asList(chromeParam.split(REGEX_SPACES)));
+        commandArgs.add(simulatorURL.toString());
+        commandArgs.add(userdataDir.toString());
+
+        File f = new File(store.getString(Settings.SIMULATOR_PATH));
+        if (!f.exists()) {
+            DialogUtil.openErrorDialog(getShell(), "Error", String.format(Messages.msgErrSimulatorFailed, store.getString(Settings.SIMULATOR_PATH)));
+            return null;
+        }
+
+        try {
+            return Runtime.getRuntime().exec(commandArgs.toArray(new String[commandArgs.size()]));
+        } catch (Exception e) {
+            DialogUtil.openErrorDialog(getShell(), "Error", String.format(Messages.msgErrLaunchFailed, chromeExecutable)); //$NON-NLS-1$
+            return null;
+        }
+    }
+
+    public static Process launchProject(IProject prj){
+        if (!Simulator.checkTizenNature(prj)) return null;
+        IFile contentFile = Simulator.getContentFile(prj);
+        if (null ==contentFile) {
+            DialogUtil.openErrorDialog(getShell(), "Error", Messages.msgErrConfigurationFile); //$NON-NLS-1$
+            return null;
+        }
+        URL url;
+        try {
+            url = contentFile.getLocationURI().toURL();
+            return Simulator.launch(url);
+        } catch (MalformedURLException e) {
+            DialogUtil.openErrorDialog(getShell(), "Error", Messages.msgErrURLConversion); //$NON-NLS-1$
+            return null;
+        }
+    }
+
+    /**
+     * Convert a filename in the plug-in to the URL.
+     * @param filename
+     * @return the URL
+     * @throws IOException
+     */
+    public static URL getPluginFileURL(String filename) throws IOException {
+            URL url = Platform.getBundle(pluginID).getEntry(filename);
+            if (url == null) throw new IOException(String.format(Messages.msgErrFileMissing2, filename));
+            return FileLocator.toFileURL(Platform.getBundle(pluginID).getEntry(filename));
+    }
+
+    public static String URLtoString(URL url) {
+        if (url == null) return null;
+        String s = url.toExternalForm();
+        //toExternalForm returns file:/ while simulator needs file:///
+        if (s.startsWith("file:/") && !s.startsWith("file://")) { //$NON-NLS-1$ //$NON-NLS-2$
+            s = s.replaceFirst("file:/", "file:///"); //$NON-NLS-1$ //$NON-NLS-2$
+        }
+        return s;
+    }
+
+    public static String URLtoFile(URL url) throws UnsupportedEncodingException {
+        String path = URLDecoder.decode(url.getPath() , UTF_8);
+        return new File(path).getAbsolutePath();
+    }
+    
+  
+    public static boolean isWritableDirectory(String fileName){
+        if (fileName.trim().length() == 0 ) return false;
+        File file = new File(fileName);
+        return file.isDirectory() && file.canWrite();
+    }
+    
+    public static boolean isProfilePathTooLong(String fileName){
+               final int MAX_PROFILE_DIR_LENGTH = 108 - "/SingletonSocket".length(); //$NON-NLS-1$
+               if (Platform.OS_WIN32.equals(Platform.getOS())) return false;
+               if (fileName.length()>=MAX_PROFILE_DIR_LENGTH) {
+                       return true;
+               }
+               return false;
+    }
+    
+    public static IProject getSelectedProject(ISelection sel) {
+        //ref: http://wiki.eclipse.org/FAQ_How_do_I_access_the_active_project%3F
+        IResource res;
+        if (!(sel instanceof IStructuredSelection))
+            res = null;
+        else {
+            IStructuredSelection ss = (IStructuredSelection) sel;
+            Object element = ss.getFirstElement();
+            if (element instanceof IResource)
+                res = (IResource) element;
+            else if ((element instanceof IAdaptable)) {
+                IAdaptable adaptable = (IAdaptable) element;
+                Object adapter = adaptable.getAdapter(IResource.class);
+                res = (IResource) adapter;
+            } else {
+                res = null;
+            }
+        }
+
+        if (res == null) {
+            try {
+                IEditorInput input = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
+                        .getActivePage().getActiveEditor().getEditorInput();
+                if (input instanceof IFileEditorInput)
+                    res = ((IFileEditorInput) input).getFile();
+                else
+                    res = null;
+            } catch (NullPointerException e) {
+                res = null;
+            }
+        }
+
+        if (res == null)
+            return null;
+        else
+            return res.getProject();
+    }
+
+    public static boolean checkTizenNature(IProject prj) {
+        if (prj == null) return false;
+        try {
+            for (String nature : TIZEN_NATURE_IDS)
+                if (prj.hasNature(nature)) return true;
+            return false;
+        } catch (CoreException e) {
+            return false;
+        }
+    }
+
+    /**
+     * get the content file of a Tizen project in the same way as in org.tizen.web.project.builder.CongigurationFileChecker
+     * @param prj: The Tizen project
+     * @return The content File, null if it doesn't exist.
+     */
+    public static IFile getContentFile(IProject prj) {
+        IFile indexhtml_file = null;
+        if (prj == null || !checkTizenNature(prj)) return null;
+        WidgetConfigurator tmpConfigurator = null;
+        try {
+            tmpConfigurator = new WidgetConfigurator(prj);
+            String indexhtml_path = tmpConfigurator.getContent();
+            if (null != indexhtml_path) {
+                indexhtml_file = prj.getFile(indexhtml_path);
+            } else {
+                for (String pathi : DEFAULT_INDEXHTML_NAMES) {
+                    indexhtml_file = prj.getFile(pathi);
+                    if (indexhtml_file.exists()) break;
+                }
+            }
+            if (null != indexhtml_file && indexhtml_file.exists())
+                return indexhtml_file;
+            else
+                return null;
+        } catch (Exception e) {
+           return null;
+        }
+    }
+}
diff --git a/org.tizen.web.simulator/src/org/tizen/web/simulator/SimulatorActionDelegate.java b/org.tizen.web.simulator/src/org/tizen/web/simulator/SimulatorActionDelegate.java
new file mode 100644 (file)
index 0000000..2cdd668
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ *  Copyright 2012 Intel Corporation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.web.simulator;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.*;
+import org.tizen.common.util.DialogUtil;
+
+public class SimulatorActionDelegate implements IWorkbenchWindowActionDelegate {
+       
+       private IProject prj;
+       
+       @SuppressWarnings("serial")
+       class InvalidConfiguartionException extends Exception{
+                InvalidConfiguartionException(String str){
+                        super(str);
+                }
+       }
+       // load the content file with tizen web simulator in chrome. 
+       @Override
+       public void run(IAction action) {
+               IFile contentFile = Simulator.getContentFile(prj);
+               if (null ==contentFile) {
+                       DialogUtil.openErrorDialog(Messages.msgErrConfigurationFile);
+                       return;
+               }
+               URL url;
+               try {
+                       url = contentFile.getLocationURI().toURL();
+                       Simulator.launch(url);
+               } catch (MalformedURLException e) {
+                       DialogUtil.openErrorDialog(Messages.msgErrURLConversion);
+               }
+       }
+       
+       @Override
+       public void dispose() {
+               
+       }
+
+       @Override
+       public void init(IWorkbenchWindow window) {
+               
+       }
+
+       @Override
+       public void selectionChanged(IAction action, ISelection selection) {
+               prj = Simulator.getSelectedProject(selection);
+               if (Simulator.checkTizenNature(prj)) {
+                       action.setEnabled(true);
+               } else {
+                       action.setEnabled(false);
+               }
+       }
+
+}
diff --git a/org.tizen.web.simulator/src/org/tizen/web/simulator/Startup.java b/org.tizen.web.simulator/src/org/tizen/web/simulator/Startup.java
new file mode 100644 (file)
index 0000000..d333ef0
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ *  Copyright 2012 Intel Corporation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.web.simulator;
+
+import org.eclipse.ui.IStartup;
+
+public class Startup implements IStartup {
+
+       @Override
+       public void earlyStartup() {
+
+       }
+
+}
diff --git a/org.tizen.web.simulator/src/org/tizen/web/simulator/WorkbenchPreferencePage.java b/org.tizen.web.simulator/src/org/tizen/web/simulator/WorkbenchPreferencePage.java
new file mode 100644 (file)
index 0000000..026384a
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2012 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.web.simulator;
+
+import org.eclipse.jface.preference.*;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+public class WorkbenchPreferencePage extends FieldEditorPreferencePage implements
+               IWorkbenchPreferencePage {
+       
+       public WorkbenchPreferencePage () {
+               super(FLAT);
+       }
+       
+       @Override
+       public void init(IWorkbench workbench) {
+               this.setPreferenceStore(Activator.getDefault().getPreferenceStore());
+               this.setDescription(Messages.msgPreferencePageDescription);
+       }
+
+       protected Control createContents(Composite parent) {
+               Composite page = new Composite(parent, SWT.NONE);
+               page.setLayout(new GridLayout());
+               
+               Group grpChrome = new Group(page, SWT.NONE);
+               grpChrome.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+               grpChrome.setLayout(new GridLayout());
+               grpChrome.setText(Messages.Chrome_Settings);
+               addField(new FileFieldEditor(Settings.CHROME_EXECUTABLE, Messages.Chrome_excutable, new FieldEditorComposite(grpChrome)){
+                       @Override
+                       //The executable may be in the path, so we don't check it's existence. 
+                       protected boolean checkState() {
+                               clearErrorMessage();
+                               return true;
+                       }
+               });
+               addField(new StringFieldEditor(Settings.EXTRA_PARAM,Messages.Extra_parameters, new FieldEditorComposite(grpChrome)));
+
+               Group grpSimulator = new Group(page, SWT.NONE);
+               grpSimulator.setLayoutData( new GridData(GridData.FILL_HORIZONTAL));
+               grpSimulator.setLayout(new GridLayout());
+               grpSimulator.setText(Messages.Simulator_Settings);
+               RadioGroupFieldEditor feUseInternal = new RadioGroupFieldEditor(Settings.USE_INTERNAL_SIMULATOR,Messages.Simulator_to_use, 1,
+                               new String[][]{ { Messages.Internal, Settings.TRUE },
+                               { Messages.User_specified, Settings.FALSE } }, new FieldEditorComposite(grpSimulator));
+               addField(feUseInternal);
+               final Composite cpSimulatorDir = new FieldEditorComposite(grpSimulator);
+               final FieldEditor feSimulatorDir = new FileFieldEditor(Settings.SIMULATOR_PATH, Messages.EightSpacesIndent, cpSimulatorDir);
+               addField(feSimulatorDir);
+               addField(new BooleanFieldEditor(Settings.APP_MODE,Messages.Launch_in_app_mode, new FieldEditorComposite(grpSimulator)));
+               
+               initialize();
+
+               feUseInternal.setPropertyChangeListener( new IPropertyChangeListener () {
+                       @Override
+                       public void propertyChange(PropertyChangeEvent event) {
+                               feSimulatorDir.setEnabled(Settings.FALSE.equals(event.getNewValue()), cpSimulatorDir);
+               }});
+               feSimulatorDir.setEnabled(Settings.FALSE.equals(getPreferenceStore().getString(Settings.USE_INTERNAL_SIMULATOR)), cpSimulatorDir);
+
+               checkState();
+               return page;    
+       }
+
+       @Override
+       protected void performDefaults () {
+               PreferenceInitializer.reinitializeDefaultPreferences();
+               super.performDefaults();
+       }
+       
+       @Override
+       protected void createFieldEditors() {
+               
+       }
+}
+
+class FieldEditorComposite extends Composite{
+        FieldEditorComposite (Composite parent) {
+                super(parent, SWT.NONE);
+                this.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+        }
+}
+
diff --git a/org.tizen.web.simulator/src/org/tizen/web/simulator/launch/Constants.java b/org.tizen.web.simulator/src/org/tizen/web/simulator/launch/Constants.java
new file mode 100644 (file)
index 0000000..416764d
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2012 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.web.simulator.launch;
+
+import org.tizen.web.simulator.Activator;
+
+public class Constants {
+       public static final String EMPTY_STRING = ""; //$NON-NLS-1$
+       public static final String ATTR_PROJECT_NAME = Activator.getUniqueIdentifier() + ".PROJECT_NAME";//$NON-NLS-1$
+}
diff --git a/org.tizen.web.simulator/src/org/tizen/web/simulator/launch/LaunchMessages.java b/org.tizen.web.simulator/src/org/tizen/web/simulator/launch/LaunchMessages.java
new file mode 100644 (file)
index 0000000..fe05963
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2012 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.web.simulator.launch;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * It defines error messages for the main delegate classes.
+ */
+public class LaunchMessages extends NLS {
+
+       public static String MAINTAB;
+       public static String PROJECT_NAME;
+       public static String SimulatorMainTab_TITLE;
+       public static String SimulatorMainTab_MESSAGE; 
+       public static String PROJECT_NOT_SPECIFIED;
+       public static String PROJECT_MUST_BE_OPENED;
+
+       static {
+               NLS.initializeMessages(LaunchMessages.class.getName(), LaunchMessages.class);
+       }
+}
diff --git a/org.tizen.web.simulator/src/org/tizen/web/simulator/launch/LaunchMessages.properties b/org.tizen.web.simulator/src/org/tizen/web/simulator/launch/LaunchMessages.properties
new file mode 100644 (file)
index 0000000..227fe87
--- /dev/null
@@ -0,0 +1,6 @@
+MAINTAB = Simulator Application
+PROJECT_NAME = Project:
+SimulatorMainTab_TITLE = Project Selection
+SimulatorMainTab_MESSAGE = Select a project to launch.
+PROJECT_NOT_SPECIFIED = Project not specified
+PROJECT_MUST_BE_OPENED = Project must be opened
\ No newline at end of file
diff --git a/org.tizen.web.simulator/src/org/tizen/web/simulator/launch/LaunchShortcut.java b/org.tizen.web.simulator/src/org/tizen/web/simulator/launch/LaunchShortcut.java
new file mode 100644 (file)
index 0000000..4789bf7
--- /dev/null
@@ -0,0 +1,157 @@
+/*
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2012 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.web.simulator.launch;
+
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.debug.ui.IDebugModelPresentation;
+import org.eclipse.debug.ui.ILaunchShortcut;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.dialogs.ElementListSelectionDialog;
+import org.tizen.web.project.builder.WebNature;
+import org.tizen.web.simulator.launch.Messages;
+import org.tizen.web.simulator.Simulator;
+
+
+public abstract class LaunchShortcut implements ILaunchShortcut {
+
+    public void launch(IEditorPart editor, String mode) {
+        IEditorInput input = editor.getEditorInput();
+        if (input instanceof IFileEditorInput) {
+            IFile inputFile = ((IFileEditorInput) input).getFile();
+            IProject proj = inputFile.getProject();
+            if (proj != null) {
+                try {
+                    if(proj.getNature(WebNature.WEB_NATURE_ID) != null) {
+                        launch(proj, mode);
+                        return;
+                    }
+                } catch (CoreException e) {}
+                MessageDialog.openError(Simulator.getShell(), Messages.LaunchShortcut_ErrorDialogTitle, getIncompatibleProjectMessage());
+                return;
+            }
+        }
+        MessageDialog.openError(Simulator.getShell(), Messages.LaunchShortcut_ErrorDialogTitle, getEditorEmptyMessage());
+    }
+
+    public void launch(ISelection selection, String mode) {
+        if (selection instanceof IStructuredSelection) {
+            IStructuredSelection sel = (IStructuredSelection) selection;
+            Object res = sel.getFirstElement();
+            if (res instanceof IResource) {
+                IProject proj = ((IResource)res).getProject();
+                if(proj != null) {
+                    try {
+                        if(proj.getNature(WebNature.WEB_NATURE_ID) != null) {
+                            launch(proj, mode);
+                            return;
+                        }
+                    } catch (CoreException e) {}
+                    MessageDialog.openError(Simulator.getShell(), Messages.LaunchShortcut_ErrorDialogTitle, getIncompatibleProjectMessage());
+                    return;
+                }
+            }
+        }
+        MessageDialog.openError(Simulator.getShell(), Messages.LaunchShortcut_ErrorDialogTitle, getSelectionEmptyMessage());
+    }
+
+    /**
+     * Show a selection dialog that allows the user to choose one of the
+     * specified launch configurations. Return the chosen config, or
+     * <code>null</code> if the user cancelled the dialog.
+     */
+    protected ILaunchConfiguration chooseConfiguration(List<ILaunchConfiguration> configList) {
+        IDebugModelPresentation labelProvider = DebugUITools.newDebugModelPresentation();
+        ElementListSelectionDialog dialog = new ElementListSelectionDialog(Simulator.getShell(), labelProvider);
+        dialog.setElements(configList.toArray());
+        dialog.setTitle(getConfigSelectionTitle());
+        dialog.setMessage(Messages.LaunchShortcut_ChooseDialogMessage);
+        dialog.setMultipleSelection(false);
+        int result = dialog.open();
+        labelProvider.dispose();
+        if (result == Window.OK) {
+            return (ILaunchConfiguration) dialog.getFirstResult();
+        }
+        return null;
+    }
+
+    protected abstract ILaunchConfiguration createConfiguration(IProject project);
+
+    protected ILaunchConfiguration findLaunchConfiguration(IProject project, ILaunchConfigurationType configType) {
+        List<ILaunchConfiguration> candidateConfigs = getCandidateConfigs(project, configType);
+
+        int candidateCount = candidateConfigs.size();
+        if (candidateCount < 1) {
+            return createConfiguration(project);
+        } else if (candidateCount == 1) {
+            return candidateConfigs.get(0);
+        } else {
+            ILaunchConfiguration config = chooseConfiguration(candidateConfigs);
+            if (config != null) {
+                return config;
+            }
+        }
+        return null;
+    }
+
+    protected abstract List<ILaunchConfiguration> getCandidateConfigs(IProject project, ILaunchConfigurationType configType);
+
+    protected abstract ILaunchConfigurationType getConfigurationType();
+
+    protected ILaunchManager getLaunchManager() {
+        return DebugPlugin.getDefault().getLaunchManager();
+    }
+
+    protected void launch(IProject project, String mode) {
+        ILaunchConfiguration config = findLaunchConfiguration(project, getConfigurationType());
+        if (config != null) {
+            DebugUITools.launch(config, mode);
+        }
+    }
+
+    protected String getEditorEmptyMessage() {
+        return Messages.LaunchShortcut_EditableNotLaunchable;
+    }
+
+    protected String getSelectionEmptyMessage() {
+        return Messages.LaunchShortcut_SelectionNotLaunchable;
+    }
+
+    protected String getConfigSelectionTitle() {
+        return Messages.LaunchShortcut_ChooseDialogTitle;
+    }
+
+    protected String getIncompatibleProjectMessage() {
+        return Messages.LaunchShortcut_IncompatibleProject;
+    }
+}
diff --git a/org.tizen.web.simulator/src/org/tizen/web/simulator/launch/Messages.java b/org.tizen.web.simulator/src/org/tizen/web/simulator/launch/Messages.java
new file mode 100644 (file)
index 0000000..ebad245
--- /dev/null
@@ -0,0 +1,37 @@
+/*\r
+ * Copyright (c) 2012 Intel Corporation. All rights reserved.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+package org.tizen.web.simulator.launch;\r
+\r
+import org.eclipse.osgi.util.NLS;\r
+\r
+public class Messages extends NLS {\r
+\r
+       public static String LaunchShortcut_ChooseDialogTitle;\r
+       public static String LaunchShortcut_ChooseDialogMessage;\r
+       public static String LaunchShortcut_EditableNotLaunchable;\r
+       public static String LaunchShortcut_ErrorDialogTitle;\r
+       public static String LaunchShortcut_SelectionNotLaunchable;\r
+       public static String LaunchShortcut_IncompatibleProject;\r
+\r
+       static {\r
+               // initialize resource bundle\r
+               NLS.initializeMessages(Messages.class.getName(), Messages.class);\r
+       }\r
+\r
+       private Messages() {\r
+       }\r
+}\r
diff --git a/org.tizen.web.simulator/src/org/tizen/web/simulator/launch/Messages.properties b/org.tizen.web.simulator/src/org/tizen/web/simulator/launch/Messages.properties
new file mode 100644 (file)
index 0000000..c97c82f
--- /dev/null
@@ -0,0 +1,6 @@
+LaunchShortcut_ChooseDialogTitle=Select Simulator Application\r
+LaunchShortcut_ChooseDialogMessage=&Select existing configuration:\r
+LaunchShortcut_EditableNotLaunchable=The current editable item is not launchable\r
+LaunchShortcut_ErrorDialogTitle=Unable to launch\r
+LaunchShortcut_SelectionNotLaunchable=The currently selected item is not launchable\r
+LaunchShortcut_IncompatibleProject=The selected project is not a simulator project
\ No newline at end of file
diff --git a/org.tizen.web.simulator/src/org/tizen/web/simulator/launch/SimulatorApplicationDelegate.java b/org.tizen.web.simulator/src/org/tizen/web/simulator/launch/SimulatorApplicationDelegate.java
new file mode 100644 (file)
index 0000000..226f188
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2012 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.web.simulator.launch;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
+import org.tizen.web.simulator.Simulator;
+//import org.eclipse.debug.core.DebugPlugin;
+//import org.eclipse.debug.core.model.IProcess;
+
+import static org.tizen.web.simulator.launch.Constants.*;
+
+public class SimulatorApplicationDelegate extends
+LaunchConfigurationDelegate {
+
+       /**
+        * A list of prerequisite projects ordered by their build order.
+        */
+       private IProject[] fOrderedProjects;
+
+       public SimulatorApplicationDelegate() {
+               // TODO Auto-generated constructor stub
+       }
+
+       @Override
+       public void launch(ILaunchConfiguration configuration, String mode,
+                       ILaunch launch, IProgressMonitor monitor) throws CoreException {
+               IProject prj = getProject(configuration);
+               Simulator.launchProject(prj);
+/*
+               Process p = Simulator.launchProject(prj);
+               if (p!=null){
+                       IProcess iprocess=DebugPlugin.newProcess(launch, p, prj.getName());
+                       launch.addProcess(iprocess);
+               }
+*/             
+       }
+       
+       private IProject getProject(ILaunchConfiguration config) throws CoreException {
+               String projectName = config.getAttribute(ATTR_PROJECT_NAME, (String)null);
+               if (projectName != null && !projectName.equals(EMPTY_STRING)) { //$NON-NLS-1$
+                       return ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+               }
+               return null;
+       }
+
+       @Override
+       public boolean preLaunchCheck(ILaunchConfiguration configuration,
+                       String mode, IProgressMonitor monitor) throws CoreException {
+               fOrderedProjects = null;
+               IProject currentProject = getProject(configuration);
+               if (currentProject != null) {
+                       fOrderedProjects = computeReferencedBuildOrder(new IProject[] { currentProject
+                                       .getProject() });
+               }
+               // do generic launch checks
+               return super.preLaunchCheck(configuration, mode, monitor);
+       }
+
+       @Override
+       protected IProject[] getBuildOrder(ILaunchConfiguration configuration,
+                       String mode) throws CoreException {
+               return fOrderedProjects;
+       }
+
+       @Override
+       protected void buildProjects(IProject[] projects, IProgressMonitor monitor) throws CoreException {
+               // do nothing
+       }
+
+}
diff --git a/org.tizen.web.simulator/src/org/tizen/web/simulator/launch/SimulatorApplicationLaunchShortcut.java b/org.tizen.web.simulator/src/org/tizen/web/simulator/launch/SimulatorApplicationLaunchShortcut.java
new file mode 100644 (file)
index 0000000..bf9da6b
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2012 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.web.simulator.launch;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.debug.ui.ILaunchShortcut;
+
+import static org.tizen.web.simulator.launch.Constants.*;
+
+public class SimulatorApplicationLaunchShortcut extends LaunchShortcut implements ILaunchShortcut {
+       private static final String CONFIGURATION_TYPE = "org.tizen.web.simulator.launch.simulatorApplication"; //$NON-NLS-1$
+
+       protected ILaunchConfiguration createConfiguration(IProject project) {
+        ILaunchConfiguration config = null;
+        try {
+            ILaunchConfigurationType configType = getConfigurationType();
+
+            String launchConfigName = DebugPlugin.getDefault().getLaunchManager().generateLaunchConfigurationName(project.getName());
+            ILaunchConfigurationWorkingCopy wc = configType.newInstance(null, launchConfigName);
+
+            wc.setAttribute(ATTR_PROJECT_NAME, project.getName());
+
+            // If ILaunchConfigurationWorkingCopy#setMappedResources() is not called, LaunchManager#resourceChanged() does not work properly.
+            //  ex.)) Run History is not deleted although mapped project is deleted in Project Explorer.
+            // CONTEXTLAUNCHING
+            wc.setMappedResources(new IResource[] { project });
+
+            DebugUITools.setLaunchPerspective(configType, ILaunchManager.RUN_MODE, IDebugUIConstants.PERSPECTIVE_DEFAULT);
+
+            config = wc.doSave();
+
+        } catch (CoreException ce) {/* TODO: add warning log */}
+
+        return config;
+    }
+
+    protected List<ILaunchConfiguration> getCandidateConfigs(IProject project, ILaunchConfigurationType configType) {
+        List<ILaunchConfiguration> candidateConfigs = Collections.emptyList();
+        try {
+            ILaunchConfiguration[] configs = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations(configType);
+            candidateConfigs = new ArrayList<ILaunchConfiguration>(configs.length);
+            for (ILaunchConfiguration config : configs) {
+                String projectName = config.getAttribute(ATTR_PROJECT_NAME, ""); //$NON-NLS-1$
+                if (projectName.equals(project.getName())) {
+                    candidateConfigs.add(config);
+                }
+            }
+        } catch (CoreException e) {/* TODO: add warning log */}
+        return candidateConfigs;
+    }
+
+    protected ILaunchConfigurationType getConfigurationType() {
+        ILaunchManager lm = DebugPlugin.getDefault().getLaunchManager();
+        ILaunchConfigurationType configType = lm.getLaunchConfigurationType(CONFIGURATION_TYPE);
+        return configType;
+    }
+}
diff --git a/org.tizen.web.simulator/src/org/tizen/web/simulator/launch/SimulatorApplicationLaunchTabGroup.java b/org.tizen.web.simulator/src/org/tizen/web/simulator/launch/SimulatorApplicationLaunchTabGroup.java
new file mode 100644 (file)
index 0000000..639e464
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2012 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.web.simulator.launch;
+
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
+import org.eclipse.debug.ui.ILaunchConfigurationDialog;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
+import org.tizen.web.simulator.launch.SimulatorMainTab;
+
+public class SimulatorApplicationLaunchTabGroup extends
+               AbstractLaunchConfigurationTabGroup {
+
+       public SimulatorApplicationLaunchTabGroup() {
+       }
+
+       @Override
+       public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
+               SimulatorMainTab mainTab = new SimulatorMainTab();
+
+               ILaunchConfigurationTab[] tabList;
+               tabList = new ILaunchConfigurationTab[] { mainTab };
+               setTabs(tabList);
+       }
+}
diff --git a/org.tizen.web.simulator/src/org/tizen/web/simulator/launch/SimulatorMainTab.java b/org.tizen.web.simulator/src/org/tizen/web/simulator/launch/SimulatorMainTab.java
new file mode 100644 (file)
index 0000000..c8eefd5
--- /dev/null
@@ -0,0 +1,199 @@
+/*\r
+ * Copyright (c) 2012 Intel Corporation. All rights reserved.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+package org.tizen.web.simulator.launch;\r
+\r
+import org.eclipse.core.resources.IProject;\r
+import org.eclipse.core.resources.IResource;\r
+import org.eclipse.core.resources.ResourcesPlugin;\r
+import org.eclipse.core.runtime.CoreException;\r
+import org.eclipse.debug.core.ILaunchConfiguration;\r
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;\r
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;\r
+import org.eclipse.jface.viewers.ISelection;\r
+import org.eclipse.jface.viewers.IStructuredSelection;\r
+import org.eclipse.jface.window.Window;\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.events.ModifyEvent;\r
+import org.eclipse.swt.events.ModifyListener;\r
+import org.eclipse.swt.events.SelectionAdapter;\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.layout.GridLayout;\r
+import org.eclipse.swt.widgets.Button;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Label;\r
+import org.eclipse.swt.widgets.Slider;\r
+import org.eclipse.swt.widgets.Text;\r
+import org.eclipse.ui.PlatformUI;\r
+import org.eclipse.ui.dialogs.ElementListSelectionDialog;\r
+import org.eclipse.ui.model.WorkbenchLabelProvider;\r
+\r
+import org.tizen.common.util.ImageUtil;\r
+import org.tizen.web.common.CommonMessages;\r
+import org.tizen.web.simulator.Activator;\r
+\r
+import static org.tizen.web.simulator.launch.Constants.*;\r
+\r
+public class SimulatorMainTab extends AbstractLaunchConfigurationTab {\r
+       public static final String PROJECT_NAME = "project_name"; //$NON-NLS-1$\r
+\r
+       // Project UI widgets\r
+       protected Label fProjLabel;\r
+       protected Text fProjText;\r
+       protected Button fProjButton;\r
+       protected Slider fslider;\r
+       protected Label fsliderLabel;\r
+\r
+       @Override\r
+       public void createControl(Composite parent) {\r
+               Composite comp = new Composite(parent, SWT.NONE);\r
+               setControl(comp);\r
+               \r
+               GridLayout topLayout = new GridLayout();\r
+               comp.setLayout(topLayout);\r
+               \r
+               createVerticalSpacer(comp, 1);\r
+               createProjectGroup(comp, 1);\r
+       }\r
+       \r
+       protected void createProjectGroup(Composite parent, int colSpan) {\r
+               Composite projComp = new Composite(parent, SWT.NONE);\r
+               GridLayout projLayout = new GridLayout();\r
+               projLayout.numColumns = 2;\r
+               projLayout.marginHeight = 0;\r
+               projLayout.marginWidth = 0;\r
+               projComp.setLayout(projLayout);\r
+               GridData gd = new GridData(GridData.FILL_HORIZONTAL);\r
+               gd.horizontalSpan = colSpan;\r
+               projComp.setLayoutData(gd);\r
+\r
+               fProjLabel = new Label(projComp, SWT.NONE);\r
+               fProjLabel.setText(LaunchMessages.PROJECT_NAME); \r
+               gd = new GridData();\r
+               gd.horizontalSpan = 2;\r
+               fProjLabel.setLayoutData(gd);\r
+\r
+               fProjText = new Text(projComp, SWT.SINGLE | SWT.BORDER);\r
+               gd = new GridData(GridData.FILL_HORIZONTAL);\r
+               fProjText.setLayoutData(gd);\r
+               fProjText.addModifyListener(new ModifyListener() {\r
+                       @Override\r
+                       public void modifyText(ModifyEvent e) {\r
+                               updateLaunchConfigurationDialog();\r
+                       }\r
+               });\r
+\r
+               fProjButton = createPushButton(projComp, CommonMessages.Dialog_browse, null); //$NON-NLS-1$\r
+               fProjButton.addSelectionListener(new SelectionAdapter() {\r
+                       public void widgetSelected(SelectionEvent evt) {\r
+                               handleProjectButtonSelected();\r
+                               updateLaunchConfigurationDialog();\r
+                       }\r
+               });\r
+       }\r
+\r
+       protected void handleProjectButtonSelected() {\r
+               IProject project = chooseProject();\r
+               if (project == null) {\r
+                       return;\r
+               }\r
+\r
+               fProjText.setText(project.getName());\r
+       }\r
+       \r
+       private IProject chooseProject() {\r
+               IProject projects[] = ResourcesPlugin.getWorkspace().getRoot().getProjects();\r
+\r
+               ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), new WorkbenchLabelProvider());\r
+               dialog.setTitle(LaunchMessages.SimulatorMainTab_TITLE);\r
+               dialog.setMessage(LaunchMessages.SimulatorMainTab_MESSAGE);\r
+               dialog.setElements(projects);\r
+\r
+               if (dialog.open() == Window.OK) {\r
+                       return (IProject) dialog.getFirstResult();\r
+               }\r
+               return null;\r
+       }\r
+       \r
+       @Override\r
+       public String getName() {\r
+               return LaunchMessages.MAINTAB;\r
+       }\r
+\r
+       @Override\r
+       public Image getImage() {\r
+               return ImageUtil.getImage(Activator.getDefault(), "icons/tizen16.png"); //$NON-NLS-1$\r
+       }\r
+       \r
+       @Override\r
+       public void initializeFrom(ILaunchConfiguration configuration) {\r
+               updateProjectFromConfig(configuration);\r
+       }\r
+       \r
+       protected void updateProjectFromConfig(ILaunchConfiguration config) {\r
+               String projectName = EMPTY_STRING;\r
+               try {\r
+                       projectName = config.getAttribute(ATTR_PROJECT_NAME, EMPTY_STRING);\r
+                       if(projectName.equals(EMPTY_STRING)) {\r
+                               ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getSelection();\r
+                               if (selection instanceof IStructuredSelection) {\r
+                                       IStructuredSelection sel = (IStructuredSelection) selection;\r
+                                       Object res = sel.getFirstElement();\r
+                                       if (res instanceof IResource) {\r
+                                               projectName = ((IResource)res).getProject().getName();\r
+                                       }\r
+                               }\r
+                       }\r
+               } catch (CoreException ce) {\r
+\r
+               }\r
+               fProjText.setText(projectName);\r
+       }\r
+       \r
+       @Override\r
+       public boolean isValid(ILaunchConfiguration launchConfig) {\r
+               setErrorMessage(null);\r
+               setMessage(null);\r
+\r
+               String name = fProjText.getText().trim();\r
+               if (name.length() == 0) {\r
+                       setErrorMessage(LaunchMessages.PROJECT_NOT_SPECIFIED);\r
+                       return false;\r
+               }\r
+               if (!ResourcesPlugin.getWorkspace().getRoot().getProject(name).exists()) {\r
+                       setErrorMessage(CommonMessages.Project_does_not_exist);\r
+                       return false;\r
+               }\r
+               IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);\r
+               if (!project.isOpen()) {\r
+                       setErrorMessage(LaunchMessages.PROJECT_MUST_BE_OPENED);\r
+                       return false;\r
+               }\r
+               return true;\r
+       }\r
+\r
+       @Override\r
+       public void performApply(ILaunchConfigurationWorkingCopy configuration) {\r
+               configuration.setAttribute(ATTR_PROJECT_NAME, fProjText.getText());\r
+       }\r
+\r
+       @Override\r
+       public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {\r
+               configuration.setAttribute(ATTR_PROJECT_NAME, EMPTY_STRING);\r
+       }\r
+}\r
diff --git a/org.tizen.web.simulator/src/org/tizen/web/simulator/messages.properties b/org.tizen.web.simulator/src/org/tizen/web/simulator/messages.properties
new file mode 100644 (file)
index 0000000..08bbb1d
--- /dev/null
@@ -0,0 +1,23 @@
+EightSpacesIndent=\ \ \ \ \ \ \ \ 
+msgErrConfigurationFile=There is an error in the configuration file.
+msgErrFileMissing=%s is missing in the plugin. Reinstall the plugin or contact the developer.
+msgErrFileMissing2=%s doesn't exist in the plugin.
+msgErrURLConversion=The LocationURI can not be converted to the URL.
+msgErrInvalidSimulator=The specified external simulator is invalid.
+msgErrLaunchFailed=Google Chrome could not be found (%s). \n\nPlease install Google Chrome and specify the Google Chrome program location in Window->Preferences under "Tizen SDK/Web/Simulator".
+msgErrSimulatorFailed=Tizen Web Simulator could not be found (%s). \n\nPlease install Tizen Web Simulator and specify the program location in Window->Preferences under "Tizen SDK/Web/Simulator".
+msgErrProfileWritableDirectory=Profile data location should be an existing writable directory.
+msgErrProfileLengthExceeded=Profile data location should be shorter than %d characters.
+msgPreferencePageDescription=General settings for the Tizen Web Simulator:
+
+Chrome_excutable=&Google Chrome location:
+Chrome_Settings=Google Chrome Settings
+Extra_parameters=&Extra parameters:
+Internal=&Internal:  Use the simulator included with the Tizen SDK.
+Launch_in_app_mode=&Launch the simulator in Google Chrome application mode
+MsgErrProfileInvalid=The Google Chrome profile location is not valid. Please specify it in Window->Preferences under "Tizen SDK/Web/Simulator".
+Profile_data_location=&Profile data location:
+Simulator_Settings=Simulator Settings
+Simulator_to_use=Simulator location:
+User_specified=E&xternal:  Use a custom simulator.  Enter the location below.
+msgErrStartMaximized=Warning: --start-maximized doesn't work in application mode.
diff --git a/org.tizen.web.simulator/src/org/tizen/web/simulator/preferences/PreferenceInitializer.java b/org.tizen.web.simulator/src/org/tizen/web/simulator/preferences/PreferenceInitializer.java
new file mode 100644 (file)
index 0000000..3395454
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2012 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.web.simulator.preferences;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.tizen.web.simulator.Activator;
+import org.tizen.web.simulator.Simulator;
+import org.tizen.common.core.application.InstallPathConfig;
+
+public class PreferenceInitializer extends AbstractPreferenceInitializer {
+
+       private static final String ENV_USERPROFILE = "USERPROFILE";
+       private static final String ENV_LOCALAPPDATA = "LOCALAPPDATA";
+       private static final String WIN_VER_6 = "6";
+       private static final String OS_VERSION = "os.version";
+       private static final String CHROME_LINUX = "/opt/google/chrome/google-chrome";
+       private static final String CHROME_WIN = "\\Google\\Chrome\\Application\\chrome.exe";
+       private static final String CHROME_MACOS = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome";
+       private static final String PROFILE_PATH_DEFAULT = "/profile/";
+       
+       public PreferenceInitializer() {
+       }
+
+       @Override
+       public void initializeDefaultPreferences() {
+               reinitializeDefaultPreferences();
+       }
+
+       public static void reinitializeDefaultPreferences(){
+               IPreferenceStore store = Activator.getDefault().getPreferenceStore();
+               //the process of finding Chrome is according to the start script of WebSimulatorAIO
+               String os = Platform.getOS();
+               String chrome;
+               if (os.equals(Platform.OS_MACOSX)) {
+                       chrome = CHROME_MACOS;
+               } else if (os.equals(Platform.OS_WIN32)) {
+                       String chromeDir;
+                       if (System.getProperty(OS_VERSION).startsWith(WIN_VER_6))
+                               chromeDir = System.getenv(ENV_LOCALAPPDATA);
+                       else
+                               // XP does not have LOCALAPPDATA environment variable
+                               chromeDir = System.getenv(ENV_USERPROFILE) + File.separator + "Local Settings" + File.separator + "Application Data";
+                       chrome = chromeDir + CHROME_WIN;
+               } else {
+                       chrome = CHROME_LINUX;
+               }
+               StringBuffer simulatorPath = new StringBuffer();
+               simulatorPath.append(InstallPathConfig.getSDKPath());
+               simulatorPath.append("/tools/websimulator/web/index.html");
+
+               store.setDefault(Settings.CHROME_EXECUTABLE, chrome);
+               store.setDefault(Settings.EXTRA_PARAM, "");
+               store.setDefault(Settings.USE_INTERNAL_SIMULATOR, Settings.FALSE);
+               store.setDefault(Settings.SIMULATOR_PATH, simulatorPath.toString());
+               store.setDefault(Settings.APP_MODE, true);
+               
+               String profilePath ="";
+               try {
+                       profilePath = Simulator.URLtoFile(Simulator.getPluginFileURL(PROFILE_PATH_DEFAULT));
+               } catch (IOException e) {
+                       
+               } finally {
+                       store.setDefault(Settings.PROFILE_PATH, profilePath);
+               }
+       }
+}
diff --git a/org.tizen.web.simulator/src/org/tizen/web/simulator/preferences/Settings.java b/org.tizen.web.simulator/src/org/tizen/web/simulator/preferences/Settings.java
new file mode 100644 (file)
index 0000000..15acc13
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2012 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.web.simulator.preferences;
+
+public class Settings {
+       public static final String CHROME_EXECUTABLE = "CHROME_EXECUTABLE"; //$NON-NLS-1$ //$NON-NLS-2$
+       public static final String EXTRA_PARAM  = "EXTRA_PARAM"; //$NON-NLS-1$ //$NON-NLS-2$
+       public static final String USE_INTERNAL_SIMULATOR = "USE_INTERNAL_SIMULATOR"; //$NON-NLS-1$ //$NON-NLS-2$
+       public static final String SIMULATOR_PATH = "SIMULATOR_PATH"; //$NON-NLS-1$ //$NON-NLS-2$
+       public static final String APP_MODE = "APP_MODE"; //$NON-NLS-1$ //$NON-NLS-2$
+       public static final String TRUE = "TRUE"; //$NON-NLS-1$ //$NON-NLS-2$
+       public static final String FALSE = "FALSE"; //$NON-NLS-1$ //$NON-NLS-2$
+       public static final String PROFILE_PATH = "PROFILE_PATH"; //$NON-NLS-1$ //$NON-NLS-2$
+       
+       private Settings (){
+       }
+}
diff --git a/org.tizen.web.simulator/src/org/tizen/web/simulator/preferences/WorkbenchPreferencePage.java b/org.tizen.web.simulator/src/org/tizen/web/simulator/preferences/WorkbenchPreferencePage.java
new file mode 100644 (file)
index 0000000..c8b90a7
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2012 Intel Corporation. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.web.simulator.preferences;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.preference.*;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.tizen.web.simulator.Activator;
+import org.tizen.web.simulator.Messages;
+import org.tizen.web.simulator.Simulator;
+
+public class WorkbenchPreferencePage extends FieldEditorPreferencePage implements
+               IWorkbenchPreferencePage {
+       
+       public WorkbenchPreferencePage () {
+               super(FLAT);
+       }
+       
+       @Override
+       public void init(IWorkbench workbench) {
+               this.setPreferenceStore(Activator.getDefault().getPreferenceStore());
+               this.setDescription(Messages.msgPreferencePageDescription);
+       }
+
+       protected Control createContents(Composite parent) {
+               Composite page = new Composite(parent, SWT.NONE);
+               page.setLayout(new GridLayout());
+               
+               Group grpChrome = new Group(page, SWT.NONE);
+               grpChrome.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+               grpChrome.setLayout(new GridLayout());
+               grpChrome.setText(Messages.Chrome_Settings);
+               addField(new FileFieldEditor(Settings.CHROME_EXECUTABLE, Messages.Chrome_excutable, new FieldEditorComposite(grpChrome)){
+                       @Override
+                       //The executable may be in the path, so we don't check it's existence. 
+                       protected boolean checkState() {
+                               clearErrorMessage();
+                               return true;
+                       }
+               });
+               addField(new StringFieldEditor(Settings.EXTRA_PARAM,Messages.Extra_parameters, new FieldEditorComposite(grpChrome)));
+               addField(new DirectoryFieldEditor(Settings.PROFILE_PATH, Messages.Profile_data_location, new FieldEditorComposite(grpChrome)){
+                       @Override
+                       //Add checks for the dir length. Fix for bug of unix sockect addr length limit when launching chrome.
+                       protected boolean doCheckState() {
+                               final int MAX_PROFILE_DIR_LENGTH = 108 - "/SingletonSocket".length(); //$NON-NLS-1$
+                               String fileName = getTextControl().getText();
+                               if (!Simulator.isWritableDirectory(fileName)){
+                                       setErrorMessage(String.format(Messages.msgErrProfileWritableDirectory));
+                                       return false;
+                               }
+                               
+                               if (Platform.OS_WIN32.equals(Platform.getOS())) return true;
+                               if (Simulator.isProfilePathTooLong(fileName)) {
+                                       setErrorMessage(String.format(Messages.msgErrProfileLengthExceeded, MAX_PROFILE_DIR_LENGTH));
+                                       return false;
+                               }
+                               
+                               return true;
+                       }
+                       public boolean isEmptyStringAllowed(){
+                               return false;
+                       }
+               });
+               
+               Group grpSimulator = new Group(page, SWT.NONE);
+               grpSimulator.setLayoutData( new GridData(GridData.FILL_HORIZONTAL));
+               grpSimulator.setLayout(new GridLayout());
+               grpSimulator.setText(Messages.Simulator_Settings);
+               final Composite cpSimulatorDir = new FieldEditorComposite(grpSimulator);
+               final FieldEditor feSimulatorDir = new FileFieldEditor(Settings.SIMULATOR_PATH, Messages.EightSpacesIndent, cpSimulatorDir);
+               addField(feSimulatorDir);
+               addField(new BooleanFieldEditor(Settings.APP_MODE,Messages.Launch_in_app_mode, new FieldEditorComposite(grpSimulator)));
+
+               initialize();
+
+               feSimulatorDir.setEnabled(Settings.FALSE.equals(getPreferenceStore().getString(Settings.USE_INTERNAL_SIMULATOR)), cpSimulatorDir);
+
+               checkState();
+               return page;    
+       }
+
+       @Override
+       protected void performDefaults () {
+               PreferenceInitializer.reinitializeDefaultPreferences();
+               super.performDefaults();
+       }
+       
+       @Override
+       protected void createFieldEditors() {
+               
+       }
+}
+
+class FieldEditorComposite extends Composite{
+        FieldEditorComposite (Composite parent) {
+                super(parent, SWT.NONE);
+                this.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+        }
+}
+
diff --git a/package/build.linux b/package/build.linux
new file mode 100755 (executable)
index 0000000..00b5166
--- /dev/null
@@ -0,0 +1,308 @@
+#!/bin/bash -x
+
+build_path=${SRCDIR}/build_result
+
+__set_parameter()
+{
+       build_id=${package_name}
+       build_type=N
+       build_result_directory=${build_type}.${build_id}
+       build_result_path="$build_path/$build_result_directory"
+       architecture=x86
+       ide_root_path_name=ide
+
+       case ${TARGET_OS} in
+               ubuntu-32|ubuntu-64)
+                       archive_platform_name=linux
+                       windowing=gtk
+                       ;;
+               windows-32|windows-64)
+                       archive_platform_name=win32
+                       windowing=win32
+                       ;;
+        macos-64)
+            archive_platform_name=macosx
+            windowing=cocoa
+            ;;
+               *)
+                       echo "${TARGET_OS} is not support yet."
+                       ;;
+       esac
+
+       result_archive_file=${build_id}-${archive_platform_name}.${windowing}.${architecture}.zip
+}
+
+__set_build_parameter()
+{
+       case ${TARGET_OS} in
+               ubuntu-32|ubuntu-64)
+                       reference_ide_path=${ROOTDIR}/indigo-pde/eclipse
+                       ;;
+               windows-32|windows-64)
+                       reference_ide_path=${ROOTDIR}/indigo-winpde/eclipse
+                       ;;
+        macos-64)
+            reference_ide_path=${ROOTDIR}/indigo-macpde/eclipse
+            ;;
+               *)
+                       echo "${TARGET_OS} is not support yet."
+                       ;;
+       esac
+}
+
+__set_install_parameter()
+{
+       INSTALL_DIR=${SRCDIR}/package/${package_name}.package.${platform}/data
+}
+
+__clean_build_environment()
+{
+       if [ -d $build_path ]
+       then
+               echo "Build result directory : [$build_path]"
+       else
+               echo "Make build result directory [$build_path]"
+               mkdir -p $build_path
+       fi
+
+       echo "Remove legacy build files..."
+       if [ -d ${build_result_path}/${archive_platform_name}.${windowing}.${architecture} ]
+       then
+               rm -rf ${build_result_path}/${archive_platform_name}.${windowing}.${architecture}
+       fi
+       if [ -e ${build_result_path}/${result_archive_file} ]
+       then
+               rm -rf ${build_result_path}/${result_archive_file}
+       fi
+       if [ -d ${build_path}/tmp ]
+       then
+               rm -rf ${build_path}/tmp
+       fi
+
+       if [ -d ${build_path}/buildRepo ]
+       then
+               rm -rf ${build_path}/buildRepo
+       fi
+
+       rm -rf ${build_path}/*.xml
+       rm -rf ${build_path}/*.properties
+       rm -rf ${build_path}/*.clean
+
+
+       if [ -d $build_path/plugins ]
+       then
+               echo "plugins directory recreate..."
+               rm -rf $build_path/plugins
+               mkdir $build_path/plugins
+       else
+               echo "Make plugins directory..."
+               mkdir $build_path/plugins
+       fi
+       if [ -d $build_path/features/ ]
+       then
+               echo "features directory recreate..."
+               rm -rf $build_path/features
+               mkdir $build_path/features
+       else
+               echo "Make features directory..."
+               mkdir $build_path/features
+       fi
+
+}
+
+__copy_build_sources()
+{
+       echo "Copy features from $SRCDIR to $build_path/features"
+       temp_dir="`mktemp -d /tmp/ide.XXXXX`"
+       cp -r $SRCDIR/* $temp_dir
+       cp -r $temp_dir/* $build_path/features
+       rm -rf $temp_dir
+
+       echo "Copy plugins from $SRCDIR to $build_path/plugins"
+       temp_dir="`mktemp -d /tmp/ide.XXXXX`"
+       cp -r $SRCDIR/* $temp_dir
+       cp -r $temp_dir/* $build_path/plugins
+       rm -rf $temp_dir
+}
+
+__copy_dependency_plugins()
+{
+       dependency_plugin_path=${ROOTDIR}/${ide_root_path_name}
+       if [ -d ${dependency_plugin_path} ]
+       then
+               cp -rf ${dependency_plugin_path}/features/* ${build_path}/features/
+               cp -rf ${dependency_plugin_path}/plugins/* ${build_path}/plugins/
+    else
+        echo "ERROR : ${dependency_plugin_path} is not exist."
+       fi
+}
+
+__make_ant_build_properties_file()
+{
+       builder_path="${SRCDIR}/builder"
+       parent_path_of_based_eclipse=${reference_ide_path}/..
+
+       echo "Make build.properties file..."
+       if [ ! -e $builder_path/build.properties.clean ] ; then
+               echo "ERROR : \"build.properties.clean\" file does not exist..."
+               exit 1
+       fi
+       cp $builder_path/build.properties.clean $build_path
+       cp $builder_path/customTargets.xml $build_path
+
+       if [ -d $reference_ide_path ] 
+       then
+               sed -e "s;\(^buildDirectory=\).*;\1${build_path};g" \
+               -e "s;\(^base=\).*;\1${parent_path_of_based_eclipse};g" \
+               -e "s;\(^baseLocation=\).*;\1${reference_ide_path};g" \
+               -e "s;\(^configs=\).*;\1${archive_platform_name},${windowing},${architecture};g" \
+               -e "s;\(^buildType=\).*;\1${build_type};g" \
+               -e "s;\(^buildId=\).*;\1${build_id};g" \
+               -e "s;\(^archivePrefix=\).*;\1${build_id};g" \
+               < $build_path/build.properties.clean > $build_path/build.properties
+
+       else
+               echo "ERROR : target eclipse is not exist."
+               exit 1
+       fi
+}
+
+__execute_pde_build()
+{
+       echo "Execute Product Ant Builder..."
+       equinox_launcher=`echo org.eclipse.equinox.launcher_*.jar`
+       pde_build=`echo org.eclipse.pde.build_*`
+
+       java -jar ${reference_ide_path}/plugins/$equinox_launcher -application org.eclipse.ant.core.antRunner -buildfile ${reference_ide_path}/plugins/$pde_build/scripts/productBuild/productBuild.xml -Dbuilder=$build_path -Dosgi.locking=none 2>&1
+
+       if [ $? != 0 ];
+       then
+               echo "Build failed..."
+               exit 1
+       fi
+}
+
+__unzip_plugin_pack()
+{
+       echo "unzip to $build_result_path"
+       unzip -a $build_result_path/${result_archive_file} -d $build_result_path/${archive_platform_name}.${windowing}.${architecture}
+}
+
+build_plugins()
+{
+       case ${platform} in
+               ubuntu-32|ubuntu-64)
+                       echo "build plugin for ${platform}"
+                       ;;
+               windows-32|windows-64)
+                       echo "build plugin for ${platform}"
+                       ;;
+        macos-64)
+            echo "build plugin for ${platform}"
+            ;;
+               *)
+                       echo "${platform} is not support yet."
+                       exit 1
+                       ;;
+       esac
+
+       __set_parameter
+       __set_build_parameter
+       __clean_build_environment
+       __copy_build_sources
+       __copy_dependency_plugins
+       __make_ant_build_properties_file
+       __execute_pde_build
+       __unzip_plugin_pack
+
+       echo "Build SUCCESS. You will find SDK IDE in \"${build_result_path}\"."
+}
+
+__clean_packaging_environment()
+{
+
+       if [ -d ${INSTALL_DIR} ]
+       then
+               rm -rf ${INSTALL_DIR}
+       else
+               mkdir -p ${INSTALL_DIR}
+       fi
+}
+
+__copy_necessary_binaries()
+{
+       echo "add necessary files."
+       ## ex) cp -rf ~~~~/file.file ${INSTALL_DIR}/${ide_root_path_name}/
+}
+
+packaging_plugins()
+{
+       __set_parameter
+       __set_install_parameter
+
+       __clean_packaging_environment
+       __copy_necessary_binaries
+
+       install_ide_path=${INSTALL_DIR}/${ide_root_path_name}
+       
+       if [ ! -d ${install_ide_path} ]
+       then
+               mkdir -p ${install_ide_path}
+       fi
+
+       cp -rf ${build_result_path}/${archive_platform_name}.${windowing}.${architecture}/${package_name}/* ${install_ide_path}/
+}
+
+# clean
+clean()
+{
+       echo "=========================================CLEAN============================================"
+       rm -rf ${SRCDIR}/*.zip
+       rm -rf ${SRCDIR}/*.tar.gz
+       rm -rf ${build_path}
+}
+
+# build
+build() 
+{
+       echo "=========================================BUILD============================================"
+       pkgname_and_platform_list=`awk 'BEGIN{RS="\n\n"; FS="\n"} /Package:/{for(i=1;i<NF;i++){if($i ~ /^OS:/){print $1,$i}}}' ${SRCDIR}/package/pkginfo.manifest | tr ' ' '@'`
+       for pkgname_and_platform in ${pkgname_and_platform_list}
+       do
+               pkgname_and_platform=`echo $pkgname_and_platform | tr '@' ' '`
+               package_name=`echo ${pkgname_and_platform} | cut -f1 -d " " | cut -f2 -d ":"`
+               platform=`echo ${pkgname_and_platform} | cut -f2 -d " " | cut -f2 -d ":"`
+       
+               if [ "x${TARGET_OS}" = "x${platform}" ]
+               then
+                       build_plugins
+               else
+                       echo ""
+               fi
+       done
+}
+
+# install
+install() 
+{
+       pkgname_and_platform_list=`awk 'BEGIN{RS="\n\n"; FS="\n"} /Package:/{for(i=1;i<NF;i++){if($i ~ /^OS:/){print $1,$i}}}' ${SRCDIR}/package/pkginfo.manifest | tr ' ' '@'`
+       for pkgname_and_platform in ${pkgname_and_platform_list}
+       do
+               echo "=========================================INSTALL============================================"
+               pkgname_and_platform=`echo $pkgname_and_platform | tr '@' ' '`
+               package_name=`echo ${pkgname_and_platform} | cut -f1 -d " " | cut -f2 -d ":"`
+               platform=`echo ${pkgname_and_platform} | cut -f2 -d " " | cut -f2 -d ":"`
+
+               if [ "x${TARGET_OS}" = "x${platform}" ]
+               then
+                       packaging_plugins
+               else
+                       echo ""
+               fi
+       done    
+}
+
+[ "$1" = "clean" ] && clean
+[ "$1" = "build" ] && build
+[ "$1" = "install" ] && install
+exit 0
diff --git a/package/pkginfo.manifest b/package/pkginfo.manifest
new file mode 100644 (file)
index 0000000..a51af7e
--- /dev/null
@@ -0,0 +1,42 @@
+Version:1.0.13
+Maintainer:hyeongseok heo <hyeong-seok.heo@samsung.com>, gyeongseok seo <gyeongseok.seo@samsung.com>, jihoon song <jihoon80.song@samsung.com>, changhyun lee <changhyun1.lee@samsung.com>, bonyong lee <bonyong.lee@samsung.com>
+
+Package:websimulator-eplugin
+OS:ubuntu-32
+Build-host-os:ubuntu-32
+Build-dependency:indigo-pde [ubuntu-32], common-eplugin [ubuntu-32], webapp-eplugin [ubuntu-32]
+Install-dependency:base-ide-product [ubuntu-32], webapp-eplugin [ubuntu-32]
+Source:websimulator-eplugin
+Description:Web Simulator Plugin
+
+Package:websimulator-eplugin
+OS:ubuntu-64
+Build-host-os:ubuntu-64
+Build-dependency:indigo-pde [ubuntu-64], common-eplugin [ubuntu-64], webapp-eplugin [ubuntu-64]
+Install-dependency:base-ide-product [ubuntu-64], webapp-eplugin [ubuntu-64]
+Source:websimulator-eplugin
+Description:Web Simulator Plugin
+
+Package:websimulator-eplugin
+OS:windows-32
+Build-host-os:ubuntu-32
+Build-dependency:indigo-winpde [windows-32], common-eplugin [windows-32], webapp-eplugin [windows-32]
+Install-dependency:base-ide-product [windows-32], webapp-eplugin [windows-32]
+Source:websimulator-eplugin
+Description:Web Simulator Plugin
+
+Package:websimulator-eplugin
+OS:windows-64
+Build-host-os:ubuntu-64
+Build-dependency:indigo-winpde [windows-64], common-eplugin [windows-64], webapp-eplugin [windows-64]
+Install-dependency:base-ide-product [windows-64], webapp-eplugin [windows-64]
+Source:websimulator-eplugin
+Description:Web Simulator Plugin
+
+Package:websimulator-eplugin
+OS:macos-64
+Build-host-os:ubuntu-64
+Build-dependency:indigo-macpde [macos-64], common-eplugin [macos-64], webapp-eplugin [macos-64]
+Install-dependency:base-ide-product [macos-64], webapp-eplugin [macos-64]
+Source:websimulator-eplugin
+Description:Web Simulator Plugin