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>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
--- /dev/null
+<?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>
--- /dev/null
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
--- /dev/null
+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
--- /dev/null
+Bundle-Vendor = The Linux Foundation
+Bundle-Name = Tizen Common UI
--- /dev/null
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ OSGI-INF/,\
+ plugin.xml,\
+ icons/
--- /dev/null
+<?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
--- /dev/null
+/*
+ * 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;
+ }
+}
--- /dev/null
+/*\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
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";
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)) {
return value;
}
-}
\ No newline at end of file
+}