[Title] Added Tizen IDE shortcuts pdf file and menu
authorshingil.kang <shingil.kang@samsung.com>
Wed, 10 Apr 2013 03:09:43 +0000 (12:09 +0900)
committershingil.kang <shingil.kang@samsung.com>
Wed, 10 Apr 2013 03:09:43 +0000 (12:09 +0900)
[Desc.]
[Issue]

13 files changed:
org.tizen.common.feature/feature.xml
org.tizen.common.ui/.classpath [new file with mode: 0644]
org.tizen.common.ui/.project [new file with mode: 0644]
org.tizen.common.ui/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
org.tizen.common.ui/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.common.ui/OSGI-INF/l10n/bundle.properties [new file with mode: 0644]
org.tizen.common.ui/build.properties [new file with mode: 0644]
org.tizen.common.ui/icons/16_TIZEN_SDK_icon.png [new file with mode: 0644]
org.tizen.common.ui/plugin.xml [new file with mode: 0644]
org.tizen.common.ui/src/org/tizen/common/ui/Activator.java [new file with mode: 0644]
org.tizen.common.ui/src/org/tizen/common/ui/commands/DownloadCardCommandHandler.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/application/InstallPathConfig.java
package/addingFiles/documents/shortcuts.pdf [new file with mode: 0644]

index 03ff740..33e3704 100755 (executable)
          version="0.0.0"
          unpack="false"/>
 
+   <plugin
+         id="org.tizen.common.ui"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
 </feature>
diff --git a/org.tizen.common.ui/.classpath b/org.tizen.common.ui/.classpath
new file mode 100644 (file)
index 0000000..ad32c83
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.tizen.common.ui/.project b/org.tizen.common.ui/.project
new file mode 100644 (file)
index 0000000..8cc1453
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.tizen.common.ui</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.common.ui/.settings/org.eclipse.jdt.core.prefs b/org.tizen.common.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..c537b63
--- /dev/null
@@ -0,0 +1,7 @@
+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.common.ui/META-INF/MANIFEST.MF b/org.tizen.common.ui/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..6d9b82d
--- /dev/null
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.tizen.common.ui;singleton:=true
+Bundle-Version: 2.0.0.qualifier
+Bundle-Activator: org.tizen.common.ui.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.tizen.common
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/org.tizen.common.ui/OSGI-INF/l10n/bundle.properties b/org.tizen.common.ui/OSGI-INF/l10n/bundle.properties
new file mode 100644 (file)
index 0000000..a41fe4c
--- /dev/null
@@ -0,0 +1,2 @@
+Bundle-Vendor = The Linux Foundation
+Bundle-Name = Tizen Common UI
diff --git a/org.tizen.common.ui/build.properties b/org.tizen.common.ui/build.properties
new file mode 100644 (file)
index 0000000..660d08d
--- /dev/null
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               OSGI-INF/,\
+               plugin.xml,\
+               icons/
diff --git a/org.tizen.common.ui/icons/16_TIZEN_SDK_icon.png b/org.tizen.common.ui/icons/16_TIZEN_SDK_icon.png
new file mode 100644 (file)
index 0000000..1b75de1
Binary files /dev/null and b/org.tizen.common.ui/icons/16_TIZEN_SDK_icon.png differ
diff --git a/org.tizen.common.ui/plugin.xml b/org.tizen.common.ui/plugin.xml
new file mode 100644 (file)
index 0000000..fb2e905
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<?eclipse version="3.4"?>\r
+<plugin>\r
+   <extension\r
+         point="org.eclipse.ui.commands">\r
+      <category\r
+            id="org.tizen.common.ui.category"\r
+            name="Tizen SDK">\r
+      </category>\r
+      <command\r
+            categoryId="org.tizen.common.ui.category"\r
+            defaultHandler="org.tizen.common.ui.commands.DownloadCardCommandHandler"\r
+            description="Download keyboard shortcuts in PDF"\r
+            id="org.tizen.common.ui.command.downloadcard"\r
+            name="Keyboard Shortcuts">\r
+      </command>\r
+   </extension>\r
+   <extension\r
+         point="org.eclipse.ui.menus">\r
+      <menuContribution\r
+            locationURI="menu:help?before=helpEnd">\r
+         <menu\r
+               icon="icons/16_TIZEN_SDK_icon.png"\r
+               id="tizensdkhelp"\r
+               label="Tizen SDK">\r
+            <command\r
+                  commandId="org.tizen.common.ui.command.downloadcard"\r
+                  style="push">\r
+            </command>\r
+         </menu>\r
+         <separator\r
+               name="helpSep"\r
+               visible="true">\r
+         </separator>\r
+      </menuContribution>\r
+   </extension>\r
+</plugin>\r
diff --git a/org.tizen.common.ui/src/org/tizen/common/ui/Activator.java b/org.tizen.common.ui/src/org/tizen/common/ui/Activator.java
new file mode 100644 (file)
index 0000000..4375faf
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Shingil Kang <shingil.kang@samsung.com>
+ *
+ * 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.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.common.ui;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+    // The plug-in ID
+    public static final String PLUGIN_ID = "org.tizen.nativecpp.ui"; //$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);
+    }
+
+    /**
+     * Returns the shared instance
+     *
+     * @return the shared instance
+     */
+    public static Activator getDefault() {
+        return plugin;
+    }
+}
diff --git a/org.tizen.common.ui/src/org/tizen/common/ui/commands/DownloadCardCommandHandler.java b/org.tizen.common.ui/src/org/tizen/common/ui/commands/DownloadCardCommandHandler.java
new file mode 100644 (file)
index 0000000..638286b
--- /dev/null
@@ -0,0 +1,56 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * Shingil Kang <shingil.kang@samsung.com>\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
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+\r
+package org.tizen.common.ui.commands;\r
+\r
+import java.awt.Desktop;\r
+import java.io.File;\r
+import java.io.IOException;\r
+\r
+import org.eclipse.core.commands.AbstractHandler;\r
+import org.eclipse.core.commands.ExecutionEvent;\r
+import org.eclipse.core.commands.ExecutionException;\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+\r
+import org.tizen.common.core.application.InstallPathConfig;\r
+\r
+public class DownloadCardCommandHandler extends AbstractHandler {\r
+    final Logger logger = LoggerFactory.getLogger(DownloadCardCommandHandler.class);\r
+    final String pdfFileName = "shortcuts.pdf";\r
+    final String pdfFilePath = InstallPathConfig.getDocumentsPath() + File.separator + pdfFileName;\r
+\r
+    @Override\r
+    public Object execute(ExecutionEvent event) throws ExecutionException {\r
+        File pdfFile = new File(pdfFilePath);\r
+        try {\r
+            Desktop.getDesktop().open(pdfFile);\r
+        } catch (IOException e) {\r
+            // fallback\r
+            logger.error("Failed to open a file " + pdfFile, e);\r
+        }\r
+        return null;\r
+    }\r
+}\r
index c9b9727..1d84621 100755 (executable)
@@ -55,6 +55,7 @@ final public class InstallPathConfig {
     private static final String DIR_LIBRARY = "library";
     private static final String DIR_SDK_DATA = "tizen-sdk-data";
     private static final String DIR_CHECKER = "checker";
+    private static final String DIR_DOCUMENTS = "documents";
 
     private final static String SDKSUFFIX = DIR_SDK_DATA + File.separatorChar + "tizensdkpath";
 
@@ -187,6 +188,10 @@ final public class InstallPathConfig {
         return getUserHomePath() + File.separator + DIR_SDK_DATA;
     }
 
+    public static String getDocumentsPath() {
+        return getSDKPath()  + File.separator + DIR_DOCUMENTS;
+    }
+
     private static void loadSdkPath(String sdkPath) {
         boolean status = true;
         if (HostUtil.exists(sdkPath)) {
@@ -236,4 +241,4 @@ final public class InstallPathConfig {
 
         return value;
     }
-}
\ No newline at end of file
+}
diff --git a/package/addingFiles/documents/shortcuts.pdf b/package/addingFiles/documents/shortcuts.pdf
new file mode 100644 (file)
index 0000000..b672489
Binary files /dev/null and b/package/addingFiles/documents/shortcuts.pdf differ