COMMON : remove oprofile packages and update contact information 56/30256/1
authorseokgil.kang <seokgil.kang@samsung.com>
Thu, 13 Nov 2014 09:04:28 +0000 (18:04 +0900)
committerseokgil.kang <seokgil.kang@samsung.com>
Thu, 13 Nov 2014 09:04:28 +0000 (18:04 +0900)
Change-Id: Idaca329105d44dc024670f986ea7e6574b5697f1
Signed-off-by: seokgil.kang <seokgil.kang@samsung.com>
169 files changed:
org.eclipse.linuxtools.oprofile.core/.classpath [deleted file]
org.eclipse.linuxtools.oprofile.core/.project [deleted file]
org.eclipse.linuxtools.oprofile.core/.settings/org.eclipse.core.resources.prefs [deleted file]
org.eclipse.linuxtools.oprofile.core/.settings/org.eclipse.core.runtime.prefs [deleted file]
org.eclipse.linuxtools.oprofile.core/META-INF/MANIFEST.MF [deleted file]
org.eclipse.linuxtools.oprofile.core/NOTICE [deleted file]
org.eclipse.linuxtools.oprofile.core/README [deleted file]
org.eclipse.linuxtools.oprofile.core/about.html [deleted file]
org.eclipse.linuxtools.oprofile.core/build.properties [deleted file]
org.eclipse.linuxtools.oprofile.core/schema/OpxmlProvider.exsd [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/IOpcontrolProvider.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/IOpxmlProvider.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/OpcontrolException.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/Oprofile.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/OprofileCorePlugin.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/OprofileProperties.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/OpxmlException.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/daemon/OpEvent.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/daemon/OpInfo.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/daemon/OpUnitMask.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/daemon/OprofileDaemonEvent.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/daemon/OprofileDaemonOptions.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/linux/LinuxOpcontrolProvider.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/linux/LinuxOpxmlProvider.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/linux/OpxmlRunner.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/model/OpModelEvent.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/model/OpModelImage.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/model/OpModelRoot.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/model/OpModelSample.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/model/OpModelSession.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/model/OpModelSymbol.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/oprofile.properties [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/OprofileSAXHandler.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/OpxmlConstants.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/XMLProcessor.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/checkevent/CheckEventsProcessor.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/info/DefaultsProcessor.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/info/EventListProcessor.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/info/OpInfoProcessor.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/modeldata/DependentProcessor.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/modeldata/ModelDataProcessor.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/modeldata/SamplesProcessor.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/modeldata/SymbolsProcessor.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/sessions/SessionsProcessor.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/CommandManager.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/OprofileComm.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/OprofileCommonConstants.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/checkevent/CheckEventsProcessor.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/checkkernel/CheckKernelProcessor.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/eventinfo/EventListProcessor.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/eventinfo/OpInfoProcessor.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/ModelDataProcessor.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/handler/OprofileSAXHandler.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/handler/XMLParser.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/BinaryParser.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/ClassesParser.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/DetailDataParser.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/DetailTableParser.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/ModuleParser.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/ModuleSymbolParser.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/SetupParser.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/SymbolDetailsParser.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/SymbolParser.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/SymbolTableParser.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/util/ParserUtil.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/sessions/SessionsProcessor.java [deleted file]
org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/provider/OpcontrolDataProvider.java [deleted file]
org.eclipse.linuxtools.oprofile.launch.exe/.classpath [deleted file]
org.eclipse.linuxtools.oprofile.launch.exe/.project [deleted file]
org.eclipse.linuxtools.oprofile.launch.exe/.settings/org.eclipse.core.resources.prefs [deleted file]
org.eclipse.linuxtools.oprofile.launch.exe/.settings/org.eclipse.core.runtime.prefs [deleted file]
org.eclipse.linuxtools.oprofile.launch.exe/META-INF/MANIFEST.MF [deleted file]
org.eclipse.linuxtools.oprofile.launch.exe/NOTICE [deleted file]
org.eclipse.linuxtools.oprofile.launch.exe/build.properties [deleted file]
org.eclipse.linuxtools.oprofile.launch.exe/icons/event_tab.gif [deleted file]
org.eclipse.linuxtools.oprofile.launch.exe/icons/global_tab.gif [deleted file]
org.eclipse.linuxtools.oprofile.launch.exe/icons/profile_run.png [deleted file]
org.eclipse.linuxtools.oprofile.launch.exe/plugin.xml [deleted file]
org.eclipse.linuxtools.oprofile.launch.exe/src/org/tizen/oprofile/launch/Activator.java [deleted file]
org.eclipse.linuxtools.oprofile.launch.exe/src/org/tizen/oprofile/launch/NormalOprofileLaunchShortcut.java [deleted file]
org.eclipse.linuxtools.oprofile.launch.exe/src/org/tizen/oprofile/launch/TizenOprofileLaunchDelegate.java [deleted file]
org.eclipse.linuxtools.oprofile.launch.exe/src/org/tizen/oprofile/launch/configuration/NormalOprofileLaunchConfigurationTabGroup.java [deleted file]
org.eclipse.linuxtools.oprofile.launch/.classpath [deleted file]
org.eclipse.linuxtools.oprofile.launch/.project [deleted file]
org.eclipse.linuxtools.oprofile.launch/.settings/org.eclipse.core.resources.prefs [deleted file]
org.eclipse.linuxtools.oprofile.launch/.settings/org.eclipse.core.runtime.prefs [deleted file]
org.eclipse.linuxtools.oprofile.launch/META-INF/MANIFEST.MF [deleted file]
org.eclipse.linuxtools.oprofile.launch/META-INF/eclipse.inf [deleted file]
org.eclipse.linuxtools.oprofile.launch/NOTICE [deleted file]
org.eclipse.linuxtools.oprofile.launch/about.html [deleted file]
org.eclipse.linuxtools.oprofile.launch/build.properties [deleted file]
org.eclipse.linuxtools.oprofile.launch/icons/event_tab.gif [deleted file]
org.eclipse.linuxtools.oprofile.launch/icons/global_tab.gif [deleted file]
org.eclipse.linuxtools.oprofile.launch/icons/profile_run.png [deleted file]
org.eclipse.linuxtools.oprofile.launch/plugin.properties [deleted file]
org.eclipse.linuxtools.oprofile.launch/plugin.xml [deleted file]
org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/OprofileLaunchMessages.java [deleted file]
org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/OprofileLaunchPlugin.java [deleted file]
org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/configuration/EventConfigCache.java [deleted file]
org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/configuration/LaunchOptions.java [deleted file]
org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/configuration/OprofileCounter.java [deleted file]
org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/configuration/OprofileEventConfigTab.java [deleted file]
org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/configuration/OprofileLaunchConfigurationTabGroup.java [deleted file]
org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/configuration/OprofileSetupTab.java [deleted file]
org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/launching/OprofileLaunchConfigurationDelegate.java [deleted file]
org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/launching/OprofileLaunchShortcut.java [deleted file]
org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/oprofilelaunch.properties [deleted file]
org.eclipse.linuxtools.oprofile.launch/src/org/tizen/oprofile/launch/DefaultSettingConstants.java [deleted file]
org.eclipse.linuxtools.oprofile.launch/src/org/tizen/oprofile/launch/listen/OProfileTargetConnectionListener.java [deleted file]
org.eclipse.linuxtools.oprofile.launch/src/org/tizen/oprofile/launch/listen/OprofileStartup.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/.classpath [deleted file]
org.eclipse.linuxtools.oprofile.ui/.project [deleted file]
org.eclipse.linuxtools.oprofile.ui/.settings/org.eclipse.core.resources.prefs [deleted file]
org.eclipse.linuxtools.oprofile.ui/.settings/org.eclipse.core.runtime.prefs [deleted file]
org.eclipse.linuxtools.oprofile.ui/META-INF/MANIFEST.MF [deleted file]
org.eclipse.linuxtools.oprofile.ui/META-INF/eclipse.inf [deleted file]
org.eclipse.linuxtools.oprofile.ui/NOTICE [deleted file]
org.eclipse.linuxtools.oprofile.ui/about.html [deleted file]
org.eclipse.linuxtools.oprofile.ui/build.properties [deleted file]
org.eclipse.linuxtools.oprofile.ui/icons/chart.png [deleted file]
org.eclipse.linuxtools.oprofile.ui/icons/dependent.gif [deleted file]
org.eclipse.linuxtools.oprofile.ui/icons/dump.gif [deleted file]
org.eclipse.linuxtools.oprofile.ui/icons/event.gif [deleted file]
org.eclipse.linuxtools.oprofile.ui/icons/image.gif [deleted file]
org.eclipse.linuxtools.oprofile.ui/icons/open_log.png [deleted file]
org.eclipse.linuxtools.oprofile.ui/icons/oprofile_view.png [deleted file]
org.eclipse.linuxtools.oprofile.ui/icons/refresh.gif [deleted file]
org.eclipse.linuxtools.oprofile.ui/icons/reset_log.gif [deleted file]
org.eclipse.linuxtools.oprofile.ui/icons/sample.gif [deleted file]
org.eclipse.linuxtools.oprofile.ui/icons/save_log.png [deleted file]
org.eclipse.linuxtools.oprofile.ui/icons/session.gif [deleted file]
org.eclipse.linuxtools.oprofile.ui/icons/symbol.gif [deleted file]
org.eclipse.linuxtools.oprofile.ui/plugin.properties [deleted file]
org.eclipse.linuxtools.oprofile.ui/plugin.xml [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/OprofileUiMessages.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/OprofileUiPlugin.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/IUiModelElement.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelDependent.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelEvent.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelImage.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelRoot.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSample.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSession.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSymbol.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/oprofileui.properties [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/view/OprofileView.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/view/OprofileViewContentProvider.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/view/OprofileViewDoubleClickListener.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/view/OprofileViewLabelProvider.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/view/OprofileViewLogReaderAction.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/view/OprofileViewRefreshAction.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/chart/ChartControl.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/chart/ChartEditorInput.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/chart/ChartModelRoot.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/chart/PieChart.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/editor/ChartEditor.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/editor/OprofileEditor.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/handler/OprofileDrawChartHandler.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/handler/OprofileOpenDaemonLogHandler.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/handler/OprofileRefreshViewHandler.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/handler/OprofileResetHandler.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/handler/OprofileSaveFileHandler.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/view/OprofileViewDoubleClickListener.java [deleted file]
org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/view/OprofileViewLabelProvider.java [deleted file]
org.eclipse.linuxtools.valgrind.launch.exe/src/org/eclipse/linuxtools/valgrind/launch/TizenValgrindLaunchDelegate.java
org.eclipse.linuxtools.valgrind.nativelaunch.exe/src/org/eclipse/linuxtools/valgrind/launch/TizenValgrindLaunchDelegate.java
org.tizen.profiler.feature/feature.xml
package/changelog
package/pkginfo.manifest

diff --git a/org.eclipse.linuxtools.oprofile.core/.classpath b/org.eclipse.linuxtools.oprofile.core/.classpath
deleted file mode 100644 (file)
index ad32c83..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.eclipse.linuxtools.oprofile.core/.project b/org.eclipse.linuxtools.oprofile.core/.project
deleted file mode 100644 (file)
index f6a0d69..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.eclipse.linuxtools.oprofile.core</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.eclipse.linuxtools.oprofile.core/.settings/org.eclipse.core.resources.prefs b/org.eclipse.linuxtools.oprofile.core/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644 (file)
index 04d1538..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#Wed Dec 01 09:13:12 CET 2010
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/org.eclipse.linuxtools.oprofile.core/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.linuxtools.oprofile.core/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644 (file)
index 98f42b9..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#Tue Dec 14 16:36:19 CET 2010
-eclipse.preferences.version=1
-line.separator=\n
diff --git a/org.eclipse.linuxtools.oprofile.core/META-INF/MANIFEST.MF b/org.eclipse.linuxtools.oprofile.core/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index 66723fd..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Tizen SDK Oprofile Core
-Bundle-SymbolicName: org.eclipse.linuxtools.oprofile.core;singleton:=true
-Bundle-Version: 1.3.18.qualifier
-Bundle-Activator: org.eclipse.linuxtools.oprofile.core.OprofileCorePlugin
-Bundle-Vendor: Eclipse Linux Tools
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.4.0",
- org.eclipse.ui;bundle-version="3.4.0",
- org.eclipse.linuxtools.profiling.launch,
- org.tizen.common,
- org.tizen.common.connection
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Export-Package: org.tizen.oprofile.core,
- org.tizen.oprofile.core.processor.modeldata.handler,
- org.eclipse.linuxtools.oprofile.core,
- org.eclipse.linuxtools.oprofile.core.daemon,
- org.eclipse.linuxtools.oprofile.core.linux,
- org.eclipse.linuxtools.oprofile.core.model,
- org.eclipse.linuxtools.oprofile.core.opxml,
- org.eclipse.linuxtools.oprofile.core.opxml.checkevent,
- org.eclipse.linuxtools.oprofile.core.opxml.info,
- org.eclipse.linuxtools.oprofile.core.opxml.modeldata,
- org.eclipse.linuxtools.oprofile.core.opxml.sessions
-Import-Package: org.tizen.sdblib,
- org.tizen.sdblib.exception,
- org.tizen.sdblib.receiver,
- org.tizen.sdblib.service,
- org.tizen.sdblib.util
diff --git a/org.eclipse.linuxtools.oprofile.core/NOTICE b/org.eclipse.linuxtools.oprofile.core/NOTICE
deleted file mode 100644 (file)
index 86a9823..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-2010-02-10 SPRC SDK Team <d.kozinski@samsung.com>\r
-       * MANIFEST.MF : delete Bundle-Localization\r
-       * build.properties : fix bin.includes\r
-       * Oprofile.java : commented _OPROFILE_CPU_TYPE_FILES member\r
-       * OprofileCorePlugin.java : commented some member varaible (OPXMLPROVIDER_XPT_NAME, _opcontrolDataProvider)\r
-       * LinuxOpcontrolProvider.java : commented some variables and functions\r
-       \r
-2010-10-21 HyungJong, Shin <hj_shin@samsung.com>\r
-       * opxml, scripts directory : remove unnecessary files\r
-       \r
-2010-10-21 HyungJong, Shin <hj_shin@samsung.com>\r
-       * build.properties : modify bin.includes\r
-       * remove unused code (38 files in ./native/linux/*.*)\r
-       \r
-2010-11-03 HyungJong, Shin <hj_shin@samsung.com>\r
-       * LinuxOpcontrolProvider.java : modify 'session.run' code\r
-       * OpxmlRunner.java : modify 'session.run' code\r
-       \r
-2010-11-05 sdk <sdk@sdk-laptop.(none)>\r
-       * MANIFEST.MF : changed some package name\r
-       * Oprofile.java : changed some package name\r
-       * LinuxOpcontrolProvider.java : changed some package name\r
-       * LinuxOpxmlProvider.java : changed some package name\r
-       * OpxmlRunner.java : changed some package name\r
-       * OpModelRoot.java : changed some package name\r
-       \r
-2011-06-09 jaewon81.lim <jaewon81.lim@samsung.com>\r
-       * MANIFEST.MF : rearrange plugins dependency\r
-\r
-2011-06-13 jaewon81.lim <jaewon81.lim@samsung.com>\r
-       * LinuxOpcontrolProvider.java : some bug fix\r
-       \r
-2011-07-13 jaewon81.lim <jaewon81.lim@samsung.com>\r
-       * MANIFEST.MF : modified import package name\r
-       * LinuxOpcontrolProvider.java : modified import package name\r
-       * OpxmlRunner.java : modified import package name\r
-       \r
-2011-08-22 joogwan.kim <joogwan.kim@samsung.com>\r
-       * MANIFEST.MF : Change plug-in name\r
-       * LinuxOpcontrolProvider.java : Change plug-in name\r
-       * OpxmlRunner.java : Change plug-in name\r
-\r
-2011-10-14 wonhyoung2.park <wonhyoung2.park@samsung.com>\r
-       * PathParser.java : profile bug fix for window\r
-       * OpxmlRunner.java : profile bug fix for window\r
-\r
-2011-11-16 wonhyoung2.park <wonhyoung2.park@samsung.com>\r
-       * MANIFEST.MF : Profiler sdb apply\r
-       * CommandManager.java : added new file\r
-       * PathParser.java : deleted file\r
-       * LinuxOpcontrolProvider.java : Profiler sdb apply\r
-       * OpxmlRunner.java : Profiler sdb apply\r
-\r
-2011-11-29 wonhyoung2.park <wonhyoung2.park@samsung.com>\r
-       * MANIFEST.MF : chagne slp to tizen\r
-       * CommandManager.java : chagne slp to tizen\r
-       * Oprofile.java : chagne slp to tizen\r
-       * LinuxOpcontrolProvider.java : chagne slp to tizen\r
-       * LinuxOpxmlProvider.java : chagne slp to tizen\r
-       * OpxmlRunner.java : chagne slp to tizen\r
-       * OpModelRoot.java : chagne slp to tizen\r
-       \r
-2011-11-30 wonhyoung2.park <wonhyoung2.park@samsung.com>\r
-       * MANIFEST.MF : provider and plugin name modify\r
-\r
-2011-12-02 taeyoung2.son <taeyoung2.son@samsung.com>\r
-       * MANIFEST.MF : Delete dependency feature's version value.\r
-\r
-2011-12-03 wonhyoung2.park <wonhyoung2.park@samsung.com>\r
-       * MANIFEST.MF : package instll routine chage\r
-       * plugin.xml : package instll routine chage\r
-       * CommandManager.java : package instll routine chage\r
-\r
-2011-12-04 wonhyoung2.park <wonhyoung2.park@samsung.com>\r
-       * plugin.xml : deleted file\r
-\r
-2011-12-05 wonhyoung2.park <wonhyoung2.park@samsung.com>\r
-       * LinuxOpcontrolProvider.java : add console (profile stop available)\r
-       * OpxmlRunner.java : add console (profile stop available)\r
diff --git a/org.eclipse.linuxtools.oprofile.core/README b/org.eclipse.linuxtools.oprofile.core/README
deleted file mode 100644 (file)
index f872c8a..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-An extra step is required to install the plugin (due to OProfile's lack of a user-space mode):
-
-* Run the install script in the natives/linux/scripts directory (must be as root):
-
-               # ./install
-               
-  * This will ensure all the necessary programs are installed, and create a wrapper for opcontrol
-    which prompts for the root password (since OProfile must be run as root). It will also load the
-    OProfile kernel module, however it is not loaded persistently. Hence, after the computer is 
-    restarted and any functions of the plugin are used, there will be an extra prompt to run 
-    opcontrol that would not normally appear.
-  
-  * If there are any programs missing or an error occurs, the script will fail and display the error.
-    If there are no errors, you will see the message:
-       
-       Eclipse-OProfile plugin install successful.
-    
-    
-* To uninstall the plugin, run the uninstall script in the natives/linux/scripts (must be root):
-
-               # ./uninstall
-               
-  * This will simply remove the same files the install script created.
diff --git a/org.eclipse.linuxtools.oprofile.core/about.html b/org.eclipse.linuxtools.oprofile.core/about.html
deleted file mode 100644 (file)
index 0c6525d..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-<p>24th October, 2008</p>      
-<h3>License</h3>
-<p>The Eclipse Software Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the EPL, any Contributions, as defined in the EPL, uploaded, submitted, or otherwise
-made available to the Eclipse Foundation, its members and/or the host of the Eclipse Foundation web site, by you that relate to such
-Content are provided under the terms and conditions of the <a href="http://www.eclipse.org/legal/termsofuse.html">Terms of Use</a>
-for the Eclipse Foundation web site and can be made available to others under the terms of the licenses as set out in the
-<a href="http://www.eclipse.org/legal/termsofuse.html">Terms of Use</a>.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the EPL (&quot;Other License&quot;), any modifications, enhancements and/or
-other code and/or documentation (&quot;Modifications&quot;) uploaded, submitted, or otherwise made available to the Eclipse Foundation, its members and/or the
-host of the Eclipse Foundation web site, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License.  In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the <a href="http://www.eclipse.org/legal/termsofuse.html">Terms of Use</a>
-for the Eclipse Foundation web site and such Modifications can be made available to others under the terms of the licenses as set out in the
-<a href="http://www.eclipse.org/legal/termsofuse.html">Terms of Use</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.oprofile.core/build.properties b/org.eclipse.linuxtools.oprofile.core/build.properties
deleted file mode 100644 (file)
index fb21e3e..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-source.. = src/
-bin.includes = META-INF/,\
-               README,\
-               about.html,\
-               .
-javacSource = 1.6
-javacTarget = 1.6
diff --git a/org.eclipse.linuxtools.oprofile.core/schema/OpxmlProvider.exsd b/org.eclipse.linuxtools.oprofile.core/schema/OpxmlProvider.exsd
deleted file mode 100644 (file)
index 8b02e63..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.linuxtools.oprofile.core" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
-      <appinfo>
-         <meta.schema plugin="org.eclipse.linuxtools.oprofile.core" id="OpxmlProvider" name="OpxmlProvider"/>
-      </appinfo>
-      <documentation>
-         An extension point to allow architecture fragments to provide the opxml binary.
-      </documentation>
-   </annotation>
-
-   <element name="extension">
-      <annotation>
-         <appinfo>
-            <meta.element />
-         </appinfo>
-      </annotation>
-      <complexType>
-         <sequence>
-            <element ref="opxmlProvider"/>
-         </sequence>
-         <attribute name="point" type="string" use="required">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="id" type="string">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="name" type="string">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-               <appinfo>
-                  <meta.attribute translatable="true"/>
-               </appinfo>
-            </annotation>
-         </attribute>
-      </complexType>
-   </element>
-
-   <element name="opxmlProvider">
-      <complexType>
-         <attribute name="class" type="string" use="required">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-               <appinfo>
-                  <meta.attribute kind="java" basedOn=":org.eclipse.linuxtools.oprofile.core.IOpxmlProvider"/>
-               </appinfo>
-            </annotation>
-         </attribute>
-      </complexType>
-   </element>
-
-
-
-
-
-
-</schema>
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/IOpcontrolProvider.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/IOpcontrolProvider.java
deleted file mode 100644 (file)
index 3d55bb6..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.core;
-
-import org.eclipse.linuxtools.oprofile.core.daemon.OprofileDaemonEvent;
-import org.eclipse.linuxtools.oprofile.core.daemon.OprofileDaemonOptions;
-
-/**
- * Interface for oprofile core to utilize opcontrol program. Platform plugins should define/register
- * an OpcontrolProvider for the core to use.
- */
-public interface IOpcontrolProvider {
-       
-       /**
-        * Initialize the Oprofile kernel module
-        * @throws OpcontrolException
-        */
-       public void initModule() throws OpcontrolException;
-       
-       /**
-        * De-initialize (unload) the kernel module
-        * @throws OpcontrolException
-        */
-       public void deinitModule() throws OpcontrolException;
-       
-       /**
-        * Clears out data from the current session
-        * @throws OpcontrolException
-        */
-       public void reset() throws OpcontrolException;
-       
-       /**
-        * Flush the current oprofiled sample buffers to disk
-        * @throws OpcontrolException
-        */
-       public void dumpSamples() throws OpcontrolException;
-       
-       /**
-        * Setup oprofiled collection parameters
-        * @param options a list of command-line arguments for opcontrol
-        * @param events list of events to collect
-        * @throws OpcontrolException
-        */
-       public void setupDaemon(OprofileDaemonOptions options, OprofileDaemonEvent[] events) throws OpcontrolException;
-       
-       //jinu added at 20090602
-       public void setupDaemon(OprofileDaemonOptions options, OprofileDaemonEvent[] events, String defaultEvent) throws OpcontrolException;
-       
-       /**
-        * Start data collection by oprofiled (will start oprofiled if necessary)
-        * @throws OpcontrolException
-        */
-       public void startCollection() throws OpcontrolException;
-       
-       /**
-        * Stop data collection (does NOT stop daemon)
-        * @throws OpcontrolException
-        */
-       public void stopCollection() throws OpcontrolException;
-       
-       /**
-        * Stop data collection and shutdown oprofiled
-        * @throws OpcontrolException
-        */
-       public void shutdownDaemon() throws OpcontrolException;
-       
-       /**
-        * Start oprofiled (does NOT start data collection)
-        * @throws OpcontrolException
-        */
-       public void startDaemon() throws OpcontrolException;
-       
-       /**
-        * Save the current session
-        * @throws OpcontrolException
-        */
-       public void saveSession(String name) throws OpcontrolException;
-       
-       //jinu added at 20090526
-       public void removeDaemonSetting() throws OpcontrolException;
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/IOpxmlProvider.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/IOpxmlProvider.java
deleted file mode 100644 (file)
index 97e05bc..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004,2008 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *    Kent Sebastian <ksebasti@redhat.com> - 
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.core;
-
-import java.util.ArrayList;
-
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.linuxtools.oprofile.core.daemon.OpInfo;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelEvent;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelImage;
-
-/**
- * Interface for the core to utilize opxml. Platform plugins should define/register an
- * OpxmlProvider for the core to use.
- */
-public interface IOpxmlProvider {
-       
-       /**
-        * Returns an <code>IRunnableWithProgress</code> that fetches generic information from opxml
-        * @param info <code>OpInfo</code> object for results
-        * @return <code>IRunnableWithProgress</code> that may be run by the caller
-        */
-       public IRunnableWithProgress info(OpInfo info);
-       
-       /**
-        * Returns an <code>IRunnableWithProgress</code> that fetches samples for the
-        * given <code>OpModelSession</code>
-        * @param eventName the event for which to fetch samples
-        * @param sessionName the session for which to fetch samples
-        * @param image the image being profiled to be returned to the caller
-        * @return <code>IRunnableWithProgress</code> that may be run by the caller
-        */
-       public IRunnableWithProgress modelData(String eventName, String sessionName, OpModelImage image);
-       
-       /**
-        * Returns an <code>IRunnableWithProgress</code> that checks the validity of the given
-        * event, unit mask, and counter combination 
-        * @param ctr the counter
-        * @param event the integer event number
-        * @param um the integer unit mask
-        * @param eventValid a size one array to hold the return result (see <code>CheckKernelProcessor</code>)
-        * @return <code>IRunnableWithProgress</code> that may be run by the caller
-        */
-       public IRunnableWithProgress checkEvents(int ctr, int event, int um, int[] eventValid);
-       
-       /**
-        * Returns an /code>IRunnableWithProgress</code> that fetches the list of sessions
-        * @param info the <code>OpInfo</code> for oprofile
-        * @param sessionList an <code>ArrayList</code> in which to return the list of sessions
-        * @return <code>IRunnableWithProgress</code> that may be run by the caller
-        */
-       public IRunnableWithProgress sessions(ArrayList<OpModelEvent> sessionList);
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/OpcontrolException.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/OpcontrolException.java
deleted file mode 100644 (file)
index f6de34b..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004,2008 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *    Kent Sebastian <ksebasti@redhat.com> - 
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.core;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-
-public class OpcontrolException extends CoreException {
-       //without this there's a warning..
-       private static final long serialVersionUID = 8508930482724912901L;
-
-       public OpcontrolException(IStatus status) {
-               super(status);
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/Oprofile.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/Oprofile.java
deleted file mode 100644 (file)
index 757fe29..0000000
+++ /dev/null
@@ -1,482 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008, 2009 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *    Kent Sebastian <ksebasti@redhat.com> - 
- *******************************************************************************/ 
-
-package org.eclipse.linuxtools.oprofile.core;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.linuxtools.oprofile.core.daemon.OpEvent;
-import org.eclipse.linuxtools.oprofile.core.daemon.OpInfo;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelEvent;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelImage;
-import org.eclipse.linuxtools.oprofile.core.opxml.checkevent.CheckEventsProcessor;
-
-import org.tizen.oprofile.core.OprofileComm;
-import org.tizen.oprofile.core.provider.OpcontrolDataProvider;
-
-
-/**
- * Common class wrapper for all things Oprofile.
- */
-public abstract class Oprofile
-{
-       // Ugh. Need to know whether the module is loaded without running oprofile commands...
-//     private static final String[] _OPROFILE_CPU_TYPE_FILES = {
-//             "/dev/oprofile/cpu_type", //$NON-NLS-1$
-//             "/proc/sys/dev/oprofile/cpu_type"  //$NON-NLS-1$
-//     };
-       
-       // Oprofile information
-       private static OpInfo _info;
-       
-       
-       // Make sure that oprofile is ready to go
-       //jinu removed at 20090603
-       /*
-       static {
-               initializeOprofileModule();
-       }
-       */
-       
-       /**
-        * Initialize the oprofile module
-        * 
-        * This function will check if the kernel module is
-        * loaded. If it is not, it will attempt to load it
-        * (which will cause the system to prompt the user for
-        * root access).
-        */
-       static private void initializeOprofileModule() throws OpcontrolException{
-               // Check if kernel module is loaded, if not, try to load it
-
-               //jinu removed at 20090628
-               //if (!isKernelModuleLoaded())
-                       _initializeOprofile();
-               
-               //it still may not have loaded, if not, critical error
-               if (!isKernelModuleLoaded()) {
-                       //jinu modified at 20090628
-                       /*
-                       OprofileCorePlugin.showErrorDialog("oprofileInit", null); //$NON-NLS-1$
-                       throw new ExceptionInInitializerError(OprofileProperties.getString("fatal.kernelModuleNotLoaded")); //$NON-NLS-1$
-                       */
-                       String error = "The OProfile kernel module could not be loaded";
-                       String reason = "An error occurred initializing OProfile for use with the plugin. Please check Oprofile to be installed successfully";
-                       OprofileComm.showErrorDialog(error, reason , null); //$NON-NLS-1$
-               } else {
-                       _initializeOprofileCore();
-               }
-       }
-       
-       // This requires more inside knowledge about Oprofile than one would like,
-       // but it is the only way of knowing whether the module is loaded (and we can
-       // succesfully call into the oprofile wrapper library without causing it to print out
-       // a lot of warnings).
-       //jinu modified at 20090619
-       /*
-       private static boolean isKernelModuleLoaded() {
-               for (int i = 0; i < _OPROFILE_CPU_TYPE_FILES.length; ++i) {
-                       File f = new File(_OPROFILE_CPU_TYPE_FILES[i]);
-                       if (f.exists())
-                               return true;
-               }
-               
-               return false;
-       }
-       */
-       private static boolean isKernelModuleLoaded() {
-               String[] result = new String[1];
-               try {
-                       IRunnableWithProgress opxml = OpcontrolDataProvider.checkKernelModule(result);
-                       //seokgil.kang modified at 20140326
-                       // intended to resolve issue.
-                       opxml.run(new IProgressMonitor() {
-                               @Override
-                               public void beginTask(String name, int totalWork) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void done() {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void internalWorked(double work) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public boolean isCanceled() {
-                                       // TODO Auto-generated method stub
-                                       return false;
-                               }
-                               @Override
-                               public void setCanceled(boolean value) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void setTaskName(String name) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void subTask(String name) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void worked(int work) {
-                                       // TODO Auto-generated method stub
-                               }
-                       });
-               } catch (InvocationTargetException e) {
-                       String error = "The OProfile kernel module could not be loaded";
-                       String reason = "An error occurred initializing OProfile for use with the plugin. Please check OProfile to be installed successfully";
-                       OprofileComm.showErrorDialog(error, reason , e); //$NON-NLS-1$
-               } catch (InterruptedException e) {
-                       String error = "The OProfile kernel module could not be loaded";
-                       String reason = "An error occurred initializing OProfile for use with the plugin. Please check OProfile to be installed successfully";
-                       OprofileComm.showErrorDialog(error, reason , e); //$NON-NLS-1$
-               }
-               
-               setCpuType(result[0]);
-               return !(result[0] == null);
-       }
-       
-       //jinu modified at 20090619
-       // initialize oprofile module by calling `opcontrol --init`
-       /*
-       private static void _initializeOprofile() {
-               try {
-                       OprofileCorePlugin.getDefault().getOpcontrolProvider().initModule();
-               } catch (OpcontrolException e) {
-                       OprofileCorePlugin.showErrorDialog("opcontrolProvider", e); //$NON-NLS-1$
-               } 
-       }
-       */
-       private static void _initializeOprofile() throws OpcontrolException{
-               OprofileCorePlugin.getDefault().getOpcontrolProvider().initModule();
-       }
-       
-       // Initializes static data for oprofile.        
-       private static void _initializeOprofileCore () {
-               //jinu modified at 20090622
-               //_info = OpInfo.getInfo();
-               _info = OprofileComm.getEventInfo();
-       }
-       
-
-       /**
-        * Queries oprofile for the number of counters on the current CPU.
-        * Used only in launch config tabs.
-        * @return the number of counters
-        */
-       public static int getNumberOfCounters() {
-               //jinu modified at 20090622
-               //return _info.getNrCounters();
-               return getOpInfo().getNrCounters();
-       }
-       
-       /**
-        * Returns the CPU speed of the current configuration.
-        * @return the cpu speed in MHz
-        */
-       public static double getCpuFrequency() {
-               //jinu modified at 20090622
-               //return _info.getCPUSpeed();
-               return getOpInfo().getCPUSpeed();
-       }
-
-       /**
-        * Finds the event with the given name
-        * @param name the event's name (i.e., CPU_CLK_UNHALTED)
-        * @return the event or <code>null</code> if not found
-        */
-       public static OpEvent findEvent(String name) {
-               //jinu modified at 20090622
-               //return _info.findEvent(name);
-               return getOpInfo().findEvent(name);
-       }
-
-       /**
-        * Get all the events that may be collected on the given counter.
-        * @param num the counter number
-        * @return an array of all valid events -- NEVER RETURNS NULL!
-        */
-       public static OpEvent[] getEvents(int num) {
-               //jinu modified at 20090622
-               //return _info.getEvents(num);
-               return getOpInfo().getEvents(num);
-       }
-       
-       /**
-        * Returns the default location of the oprofile samples directory.
-        * @return the default samples directory
-        */
-       public static String getDefaultSamplesDirectory() {
-               //jinu modified at 20090622
-               //return _info.getDefault(OpInfo.DEFAULT_SAMPLE_DIR);
-               return getOpInfo().getDefault(OpInfo.DEFAULT_SAMPLE_DIR);
-       }
-       
-       /**
-        * Returns the oprofile daemon log file.
-        * @return the log file (absolute pathname)
-        */
-       public static String getLogFile() {
-               //jinu modified at 20090622
-               //return _info.getDefault(OpInfo.DEFAULT_LOG_FILE);
-               return getOpInfo().getDefault(OpInfo.DEFAULT_LOG_FILE);
-       }
-       
-       /**
-        * Returns whether or not oprofile is in timer mode.
-        * @return true if oprofile is in timer mode, false otherwise
-        */
-       public static boolean getTimerMode() {
-               //jinu modified at 20090622
-               //return _info.getTimerMode();
-               return getOpInfo().getTimerMode();
-       }
-       
-       /**
-        * Checks the requested counter, event, and unit mask for vailidity.
-        * @param ctr   the counter
-        * @param event the event number
-        * @param um    the unit mask
-        * @return whether the requested event is valid
-        */
-       // seokgil.kang modified at 20140326
-       // occurred NPE(NullPointException) for Boolean object unboxing  
-       // return value
-       //      1 : true 
-       //      0 : false 
-       //      -1 : error
-//     public static Boolean checkEvent(int ctr, int event, int um) {
-       public static int checkEvent(int ctr, int event, int um) {
-               int[] validResult = new int[1];
-               try {
-                       IRunnableWithProgress opxml = OprofileCorePlugin.getDefault().getOpxmlProvider().checkEvents(ctr, event, um, validResult);
-                       //seokgil.kang modified at 20140326
-                       // intended to resolve issue.
-                       opxml.run(new IProgressMonitor() {
-                               @Override
-                               public void beginTask(String name, int totalWork) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void done() {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void internalWorked(double work) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public boolean isCanceled() {
-                                       // TODO Auto-generated method stub
-                                       return false;
-                               }
-                               @Override
-                               public void setCanceled(boolean value) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void setTaskName(String name) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void subTask(String name) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void worked(int work) {
-                                       // TODO Auto-generated method stub
-                               }
-                       });
-               } catch (InvocationTargetException e) {
-                       e.printStackTrace();
-               } catch (InterruptedException e) {
-                       e.printStackTrace();
-               } catch (OpxmlException e) {
-                       OprofileCorePlugin.showErrorDialog("opxmlProvider", e); //$NON-NLS-1$
-//                     return (Boolean)null;
-                       return -1;
-               }
-               
-//             return (validResult[0] == CheckEventsProcessor.EVENT_OK);
-               if (validResult[0] == CheckEventsProcessor.EVENT_OK) {
-                       return 1;
-               } else {
-                       return 0;
-               }
-       }
-       
-       
-       
-       /**
-        * Returns a list of all the events collected on the system, as well as
-        * the sessions under each of them.
-        * @returns a list of all collected events
-        */
-       public static OpModelEvent[] getEvents() {
-               OpModelEvent[] events = null;
-               
-               ArrayList<OpModelEvent> sessionList = new ArrayList<OpModelEvent>();
-               try {
-                       IRunnableWithProgress opxml = OprofileCorePlugin.getDefault().getOpxmlProvider().sessions(sessionList);
-                       //seokgil.kang modified at 20140326
-                       // intended to resolve issue.
-                       opxml.run(new IProgressMonitor() {
-                               @Override
-                               public void beginTask(String name, int totalWork) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void done() {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void internalWorked(double work) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public boolean isCanceled() {
-                                       // TODO Auto-generated method stub
-                                       return false;
-                               }
-                               @Override
-                               public void setCanceled(boolean value) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void setTaskName(String name) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void subTask(String name) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void worked(int work) {
-                                       // TODO Auto-generated method stub
-                               }
-                       });
-                       events = new OpModelEvent[sessionList.size()];
-                       sessionList.toArray(events);
-               } catch (InvocationTargetException e) {
-                       e.printStackTrace();
-               } catch (InterruptedException e) {
-                       e.printStackTrace();
-               } catch (OpxmlException e) {
-                       OprofileCorePlugin.showErrorDialog("opxmlProvider", e); //$NON-NLS-1$
-               }
-               return events;
-       }
-       
-       
-       /**
-        * Return a list of all the Samples in the given session.
-        * @param session the session for which to get samples
-        * @param shell the composite shell to use for the progress dialog
-        */
-       public static OpModelImage getModelData(String eventName, String sessionName) {         
-               OpModelImage image = new OpModelImage();
-               
-               final IRunnableWithProgress opxml;
-               try {
-                       opxml = OprofileCorePlugin.getDefault().getOpxmlProvider().modelData(eventName, sessionName, image);
-                       //seokgil.kang modified at 20140326
-                       // intended to resolve issue.
-                       opxml.run(new IProgressMonitor() {
-                               @Override
-                               public void beginTask(String name, int totalWork) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void done() {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void internalWorked(double work) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public boolean isCanceled() {
-                                       // TODO Auto-generated method stub
-                                       return false;
-                               }
-                               @Override
-                               public void setCanceled(boolean value) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void setTaskName(String name) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void subTask(String name) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void worked(int work) {
-                                       // TODO Auto-generated method stub
-                               }
-                       });
-               } catch (InvocationTargetException e) { 
-                       e.printStackTrace();
-               } catch (InterruptedException e) { 
-                       e.printStackTrace();
-               } catch (OpxmlException e) {
-                       OprofileCorePlugin.showErrorDialog("opxmlProvider", e); //$NON-NLS-1$
-                       return null;
-               }
-
-               return image;
-       }
-       
-       
-       
-       
-
-       
-       //jinu added at 20090604 -----------------------------
-       public static void initialize(){
-               if(_info != null)
-                       _info = null;
-       }
-       
-       public static OpInfo getOpInfo(){
-               try {
-                       if(_info==null||isValid(_info))
-                               initializeOprofileModule();
-               } catch (OpcontrolException e) {
-                       e.printStackTrace();
-               }
-               
-               return _info;
-       }
-       
-       private static boolean isValid(OpInfo info){
-               return info.getNrCounters()==0 ^ info.getTimerMode();
-       }
-       
-       private static String _cpuType;
-       public static String getCpuType() {
-               return _cpuType;
-       }
-       public static void setCpuType(String cpuType) {
-               _cpuType = cpuType;
-       }
-       //------------------------------------
-       
-       
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/OprofileCorePlugin.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/OprofileCorePlugin.java
deleted file mode 100644 (file)
index bea8799..0000000
+++ /dev/null
@@ -1,196 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008, 2009 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *    Kent Sebastian <ksebasti@redhat.com> - 
- *******************************************************************************/ 
-
-package org.eclipse.linuxtools.oprofile.core;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.linuxtools.oprofile.core.linux.LinuxOpcontrolProvider;
-import org.eclipse.linuxtools.oprofile.core.linux.LinuxOpxmlProvider;
-import org.eclipse.swt.widgets.Display;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class OprofileCorePlugin extends Plugin {
-       private static final String PLUGIN_ID = "org.eclipse.linuxtools.oprofile.core"; //$NON-NLS-1$
-//     private static final String OPXMLPROVIDER_XPT_NAME = "OpxmlProvider"; //$NON-NLS-1$
-
-       //The shared instance.
-       private static OprofileCorePlugin plugin;
-       private IOpxmlProvider _opxmlProvider;
-//     private OpcontrolDataProvider _opcontrolDataProvider;
-       
-       /**
-        * The constructor.
-        */
-       public OprofileCorePlugin() {
-               plugin = this;
-       }
-       
-       /**
-        * This method is called upon plug-in activation
-        */
-       public void start(BundleContext context) throws Exception {
-               super.start(context);
-       }
-
-       /**
-        * This method is called when the plug-in is stopped
-        */
-       public void stop(BundleContext context) throws Exception {
-               super.stop(context);
-               plugin = null;
-       }
-       
-       /**
-        * Returns the shared instance.
-        */
-       public static OprofileCorePlugin getDefault() {
-               return plugin;
-       }
-
-       /**
-        * Returns the unique id of this plugin. Should match plugin.xml!
-        */
-       public static String getId() {
-               return PLUGIN_ID;
-       }
-       
-       /**
-        * Returns the OpxmlProvider registered with the plugin or throws an exception
-        * @return the OpxmlProvider
-        * @throws OpxmlException
-        */
-       public IOpxmlProvider getOpxmlProvider() throws OpxmlException {
-               //jinu modified at 20090526
-               /*
-               Exception except = null;
-               
-               if (_opxmlProvider == null) {
-                       IExtensionRegistry registry = Platform.getExtensionRegistry();
-                       IExtensionPoint extension = registry.getExtensionPoint(PLUGIN_ID, OPXMLPROVIDER_XPT_NAME);
-                       if (extension != null) {
-                               IExtension[] extensions = extension.getExtensions();
-                               for (IExtension e : extensions) {
-                                       IConfigurationElement[] configElements = e.getConfigurationElements();
-                                       if (configElements.length != 0) {
-                                               try {
-                                                       _opxmlProvider = (IOpxmlProvider) configElements[0].createExecutableExtension("class"); //$NON-NLS-1$
-                                                       if (_opxmlProvider != null)
-                                                               break;
-                                               } catch (CoreException ce) {
-                                                       except = ce;
-                                               }
-                                       }
-                               }
-                       }
-               }
-               
-               // If there was a problem finding opxml, throw an exception
-               if (_opxmlProvider == null) {
-                       throw new OpxmlException(createErrorStatus("opxmlProvider", except)); //$NON-NLS-1$
-               } else {
-                       return _opxmlProvider;
-               }
-               */
-               if(_opxmlProvider==null)
-                       _opxmlProvider = new LinuxOpxmlProvider();
-               
-               return _opxmlProvider;
-       }
-       
-       
-       /*public OpcontrolDataProvider getOpcontrolDataProvider() throws OpcontrolException {
-               if(_opcontrolDataProvider==null)
-                       _opcontrolDataProvider = new OpcontrolDataProvider();
-               
-               return _opcontrolDataProvider;
-       }*/
-       
-       /**
-        * Returns the registered opcontrol provider or throws an exception
-        * @return the OpcontrolProvider registered with the plugin
-        * @throws OpcontrolException
-        */
-       public IOpcontrolProvider getOpcontrolProvider() throws OpcontrolException {
-               //jinu modified at 20090526
-               /*
-               Exception except = null;
-               
-               if (_opcontrol == null) {
-                       IExtensionRegistry registry = Platform.getExtensionRegistry();
-                       IExtensionPoint extension = registry.getExtensionPoint(PLUGIN_ID, "OpcontrolProvider"); //$NON-NLS-1$
-                       if (extension != null) {
-                               IExtension[] extensions = extension.getExtensions();
-                               IConfigurationElement[] configElements = extensions[0].getConfigurationElements();
-                               if (configElements.length != 0) {
-                                       try {
-                                               _opcontrol = (IOpcontrolProvider) configElements[0].createExecutableExtension("class"); //$NON-NLS-1$
-                                       } catch (CoreException ce) {
-                                               except = ce;
-                                       }
-                               }
-                       }
-               }
-               
-               // If there was a problem finding opcontrol, throw an exception
-               if (_opcontrol == null) {
-                       String msg = getResourceString("opcontrolProvider.error.missing"); //$NON-NLS-1$
-                       Status status = new Status(IStatus.ERROR, getId(), IStatus.OK, msg, except);
-                       throw new OpcontrolException(status);
-               }
-
-               return _opcontrol;
-               */
-               
-               return new LinuxOpcontrolProvider();
-       }
-       
-       public static IStatus createErrorStatus(String errorClassString, Exception e) {
-               String statusMessage = OprofileProperties.getString(errorClassString + ".error.statusMessage"); //$NON-NLS-1$
-
-               if (e == null) {
-                       return new Status(IStatus.ERROR, getId(), IStatus.OK, statusMessage, null);
-               } else {
-                       return new Status(IStatus.ERROR, getId(), IStatus.OK, statusMessage, e);
-               }
-       }
-       
-       public static void showErrorDialog(String errorClassString, CoreException ex) {
-               final IStatus status;
-               final String dialogTitle = OprofileProperties.getString(errorClassString + ".error.dialog.title"); //$NON-NLS-1$
-               final String errorMessage = OprofileProperties.getString(errorClassString + ".error.dialog.message"); //$NON-NLS-1$
-               
-               if (ex == null) {
-                       status = createErrorStatus(errorClassString, null);
-               } else {
-                       status = ex.getStatus();
-               }
-
-               //needs to be run in the ui thread otherwise swt throws invalid thread access 
-               Display.getDefault().syncExec(new Runnable() {
-                       public void run() {
-                               ErrorDialog.openError(null, dialogTitle, errorMessage, status);
-                       }
-               });
-
-       }
-       
-
-       
-       
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/OprofileProperties.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/OprofileProperties.java
deleted file mode 100644 (file)
index f1bf26e..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.oprofile.core;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class OprofileProperties {
-       private static final String BUNDLE_NAME = "org.eclipse.linuxtools.oprofile.core.oprofile"; //$NON-NLS-1$
-       private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
-
-       private OprofileProperties() {
-       }
-
-       public static String getString(String key) {
-               try {
-                       return RESOURCE_BUNDLE.getString(key);
-               } catch (MissingResourceException e) {
-                       return '!' + key + '!';
-               }
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/OpxmlException.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/OpxmlException.java
deleted file mode 100644 (file)
index 21b40e0..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.core;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * An exception thrown by any of the IOpxmlProvider functions
- */
-public class OpxmlException extends CoreException {
-
-       /**
-        * 
-        */
-       private static final long serialVersionUID = 2788304536155025911L;
-
-       /**
-        * Constructor
-        * @param status <code>IStatus</code> for the exception
-        */
-       public OpxmlException(IStatus status) {
-               super(status);
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/daemon/OpEvent.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/daemon/OpEvent.java
deleted file mode 100644 (file)
index 9204f02..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *    Kent Sebastian <ksebasti@redhat.com>
- *******************************************************************************/ 
-
-package org.eclipse.linuxtools.oprofile.core.daemon;
-
-/**
- * A class which represents an Oprofile event
- */
-public class OpEvent {
-       // The Oprofile event name, i.e., "CPU_CLK_UNHALTED"
-       private String _name;
-       
-       // The Oprofile event number
-       private int _number;
-       
-        //  A description of the event
-       private String _description;
-
-       // Unit masks for this event type
-       private OpUnitMask _unitMask;
-       
-       // Minimum count
-       private int _minCount;
-       
-       /**
-        * Sets the unit mask for this event.
-        * Only called from XML parsers.
-        * @param mask the new unit mask
-        */
-       public void _setUnitMask(OpUnitMask mask) {
-               _unitMask = mask;
-       }
-
-       /**
-        * Sets the name of this event.
-        * Only called from XML parsers.
-        * @param text the name
-        */
-       public void _setText(String text) {
-               _name = text;
-       }
-
-       /**
-        * Sets the description of this oprofile event.
-        * Only called from XML parsers.
-        * @param text the description
-        */
-       public void _setTextDescription(String text) {
-               _description = text;
-       }
-
-       /**
-        * Sets the minimum count for this event.
-        * Only called from XML parsers.
-        * @param min the minimum count
-        */
-       public void _setMinCount(int min) {
-               _minCount = min;
-       }
-
-       /**
-        * Sets oprofile's event number for this event.
-        * Only called from XML parsers.
-        * @param num the number
-        */
-       public void _setNumber(int num) {
-               _number = num;
-       }
-
-       /**
-        * Returns the unit mask corresponding to this event.
-        * @return the unit mask
-        */
-       public OpUnitMask getUnitMask() {               
-               return _unitMask;
-       }
-       
-       /**
-        * Returns the name of this oprofile event.
-        * @return the name
-        */
-       public String getText() {
-               return _name;
-       }
-       
-       /**
-        * Returns the description of this oprofile event.
-        * @return the description
-        */
-       public String getTextDescription() {
-               return _description;
-       }
-       
-       /**
-        * Returns the minimum count allowed for this event.
-        * @return the minimum count
-        */
-       public int getMinCount() {
-               return _minCount;
-       }
-       
-       /**
-        * Returns oprofile's event number for this event.
-        * @return the event number
-        */
-       public int getNumber() {
-               return _number;
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/daemon/OpInfo.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/daemon/OpInfo.java
deleted file mode 100644 (file)
index b43731c..0000000
+++ /dev/null
@@ -1,251 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008, 2009 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *    Kent Sebastian <ksebasti@redhat.com>
- *******************************************************************************/ 
-
-package org.eclipse.linuxtools.oprofile.core.daemon;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.HashMap;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.linuxtools.oprofile.core.OprofileCorePlugin;
-import org.eclipse.linuxtools.oprofile.core.OpxmlException;
-import org.eclipse.linuxtools.oprofile.core.opxml.info.DefaultsProcessor;
-
-
-/**
- * A class to hold generic information about Oprofile.
- */
-public class OpInfo {
-       // Oprofile defaults
-       public static final String DEFAULT_SAMPLE_DIR = DefaultsProcessor.SAMPLE_DIR;
-       public static final String DEFAULT_LOCK_FILE = DefaultsProcessor.LOCK_FILE;
-       public static final String DEFAULT_LOG_FILE = DefaultsProcessor.LOG_FILE; //use
-       public static final String DEFAULT_DUMP_STATUS = DefaultsProcessor.DUMP_STATUS;
-       
-       // A comparator class used when sorting events
-       // (sorting by event name)
-       private static class SortEventComparator implements Comparator<OpEvent> {
-               public int compare(OpEvent o1, OpEvent o2) {
-                       return o1.getText().compareTo(o2.getText());
-               }
-       }
-
-       // A comparator class used when searching events
-       // (searching by event name)
-       private static class SearchEventComparator implements Comparator<Object> {
-               public int compare(Object a, Object b) {
-                       String astr, bstr;
-                       if (a instanceof String) {
-                               astr = (String) a;
-                               bstr = ((OpEvent) b).getText();
-                       } else {
-                               astr = ((OpEvent) a).getText();
-                               bstr = (String) b;
-                       }
-                       return astr.compareTo(bstr);
-               }
-       }
-       
-       // The number of counters supported by this configuration
-       private int _nrCounters;
-       
-       // A HashMap of Oprofile defaults
-       private HashMap<String,String> _defaults;
-       
-       // The permanent list of events indexed by counter
-       private OpEvent[][] _eventList;
-       
-       // The CPU frequency of this CPU in MHz
-       private double _cpuSpeed;
-       
-       // Whether or not oprofile is running in timer mode
-       private boolean _timerMode;
-       
-       /**
-        * Return all of Oprofile's generic information.
-        * @return a class containing the information
-        */
-       public static OpInfo getInfo() {                
-               // Run opmxl and get the static information
-               OpInfo info = new OpInfo();
-
-               try {
-                       IRunnableWithProgress opxml = OprofileCorePlugin.getDefault().getOpxmlProvider().info(info);
-                       //seokgil.kang modified at 20140326
-                       // intended to resolve issue.
-                       opxml.run(new IProgressMonitor() {
-                               @Override
-                               public void beginTask(String name, int totalWork) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void done() {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void internalWorked(double work) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public boolean isCanceled() {
-                                       // TODO Auto-generated method stub
-                                       return false;
-                               }
-                               @Override
-                               public void setCanceled(boolean value) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void setTaskName(String name) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void subTask(String name) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void worked(int work) {
-                                       // TODO Auto-generated method stub
-                               }
-                       });
-               } catch (InvocationTargetException e) {
-                       e.printStackTrace();
-               } catch (InterruptedException e) {
-                       e.printStackTrace();
-               } catch (OpxmlException e) {
-                       OprofileCorePlugin.showErrorDialog("opxmlProvider", e); //$NON-NLS-1$
-               }
-               
-               return info;
-       }
-
-       /**
-        * Sets the number of counters allowed by Oprofile. This method is called
-        * after this object is contstructed, while opxml is run (the first tag output
-        * is num-counters).
-        * Only called from XML parsers.
-        * @param ctrs the number of counters
-        */
-       public void _setNrCounters(int ctrs) {
-               _nrCounters = ctrs;
-               
-               // Allocate room for event lists for the counters
-               _eventList = new OpEvent[_nrCounters][];
-       }
-
-       /**
-        * Set the CPU frequency (in MHz).
-        * Only called from the XML parsers.
-        * @param freq the frequency
-        */
-       public void _setCPUSpeed(double freq) {
-               _cpuSpeed = freq;
-       }
-
-       /**
-        * Sets the defaults associated with this configuration of Oprofile.
-        * Only called from XML parsers.
-        * @param map the <code>HashMap</code> containing the defaults
-        */
-       public void _setDefaults(HashMap<String,String> map) {
-               _defaults = map;
-       }
-
-       /**
-        * Adds the events of the counter counterNum into the list of all events.
-        * Note they are sorted here.
-        * Only called from XML parsers.
-        * @param counterNum the counter with the events
-        * @param events an array of OpEvent events belonging to this counter
-        */
-       public void _setEvents(int counterNum, OpEvent[] events) {
-               if (counterNum < _eventList.length) {
-                       _eventList[counterNum] = events;
-                       Arrays.sort(_eventList[counterNum], new SortEventComparator());
-               }
-       }
-       
-       /**
-        * Sets whether or not oprofile is operating in timer mode.
-        * Only called from XML parsers.
-        * @param timerMode true if oprofile is in timer mode, false if not
-        */
-       public void _setTimerMode(boolean timerMode) {
-               _timerMode = timerMode;
-       }
-
-       /**
-        * Returns the number of counters allowed by Oprofile
-        * @return the number of counters
-        */
-       public int getNrCounters() {
-               return _nrCounters;
-       }
-               
-       /**
-        * Returns the CPU's speed in MHz
-        * @return the speed
-        */
-       public double getCPUSpeed() {
-               return _cpuSpeed;
-       }
-       
-       /**
-        * Returns the requested default. Valid defaults are <code>DEFAULT_DUMP_STATUS</code>,
-        * <code>DEFAULT_LOCK_FILE</code>, <code>DEFAULT_LOG_FILE</code>, and
-        * <code>DEFAULT_SAMPLE_DIR</code>.
-        * @param what which default to return
-        * @return the requested default or <code>null</code> if not known
-        */
-       public String getDefault(String what) {
-               return (String) _defaults.get(what);
-       }
-
-       /**
-        * Returns an array of events valid for the given counter number.
-        * @param num the counter number
-        * @return an array of valid events
-        */ 
-       public OpEvent[] getEvents(int num) {
-               if (num >= 0 && num < _eventList.length)
-                       return _eventList[num];
-               
-               return new OpEvent[0];
-       }
-       
-       /**
-        * Returns whether or not oprofile is operating in timer mode.
-        * @return a boolean, true if in timer mode, false if not
-        */
-       public boolean getTimerMode() {
-               return _timerMode;
-       }
-       
-       /**
-        * Searches the for the event with the given name
-        * @param name the name of the event (e.g., CPU_CLK_UNHALTED)
-        * @return the event or <code>null</code> if not found
-        */
-       public OpEvent findEvent(String name) {
-               // Search through all counters
-               for (int counter = 0; counter < getNrCounters(); ++counter) {
-                       int idx = Arrays.binarySearch(getEvents(counter), name, new SearchEventComparator());
-                       if (idx >= 0)
-                               return _eventList[counter][idx];
-               }
-               
-               return null;
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/daemon/OpUnitMask.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/daemon/OpUnitMask.java
deleted file mode 100644 (file)
index 050cf0f..0000000
+++ /dev/null
@@ -1,244 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004,2008 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *    Kent Sebastian <ksebasti@redhat.com> 
- *******************************************************************************/
-
-package org.eclipse.linuxtools.oprofile.core.daemon;
-
-/**
- * A class representing the unit mask that may be associated with oprofile
- * events. Note that since this class was originally written, oprofile unit
- * masks have changed -- a single unit mask may affect several bits at once.
- * Hence, instead of a certain bit being flipped, the specific bits to be changed 
- * are determined by the particular mask's index 
- */
-public class OpUnitMask {
-       /**
-        * A class which describes an individual unit mask value. Used in XML parsing.
-        */
-       public static class MaskInfo {
-               /**
-                * The integer value of the mask.
-                */
-               public int value;
-
-               /**
-                * A description of the mask.
-                */
-               public String description;
-       };
-       
-       public static final int SET_DEFAULT_MASK = -1;
-
-       /**
-        * Invalid mask type.
-        */
-       public static final int INVALID = -1;
-
-       /**
-        * The mask is mandatory. It must be used.
-        */
-       public static final int MANDATORY = 1;
-
-       /**
-        * The mask is exclusive. Only one of its mask values may be used.
-        */
-       public static final int EXCLUSIVE = 2;
-
-       /**
-        * The mask is a bitmask. Any combination of its values may be used.
-        */
-       public static final int BITMASK = 3;
-
-
-       // The current value of this unitmask
-       private int _mask;
-
-       // The default mask provided by the oprofile library
-       private int _defaultMask;
-
-       // The type of this unitmask
-       private int _maskType;
-
-       // Descriptions of the bits of this mask
-       private String[] _maskOptionDescriptions = new String[0];
-
-       // mask values -- now bit masks have distinct values (eg: an all of the
-       // above)
-       private int[] _maskOptionValues;
-
-       /**
-        * Set the descriptions and values for this unitmask's mask options.
-        * Only used from the XML parsers.
-        * @param masks a list of all the mask options
-        */
-       public void _setMaskDescriptions(MaskInfo[] masks) {
-               _maskOptionDescriptions = new String[masks.length];
-               _maskOptionValues = new int[masks.length];
-
-               for (int i = 0; i < masks.length; ++i) {
-                       _maskOptionDescriptions[i] = masks[i].description;
-                       _maskOptionValues[i] = masks[i].value;
-               }
-       }
-
-       /**
-        * Sets the default value for this unitmask, and initializes
-        *   the current unitmask value to this default.
-        * Only used from the XML parsers.
-        * @param theDefault the default value
-        */
-       public void _setDefault(int theDefault) {
-               _defaultMask = theDefault;
-               setDefaultMaskValue();  
-       }
-       
-       /**
-        * Sets the unitmask type.
-        * Only used from the XML parsers.
-        * @param type the type
-        */
-       public void _setType(int type) {
-               _maskType = type;
-       }
-       
-       /**
-        * Returns the integer value of this unitmask, suitable for passing to oprofile.
-        * @return the integer value
-        */
-       public int getMaskValue() {
-               return _mask;
-       }
-
-       /**
-        * Tests whether a particular mask is set in the unitmask value, based on the
-        * value of the mask option at the given index.
-        * 
-        * @param index the index of the mask option to check
-        * @return whether the given mask option's value is set
-        */
-       public boolean isMaskSetFromIndex(int index) {
-               boolean result = false;
-
-               if (index >= 0 && index < _maskOptionValues.length) {
-                       switch (_maskType) {
-                       case EXCLUSIVE:
-                               result = (_mask == _maskOptionValues[index]);
-                               break;
-
-                       case BITMASK:
-                               result = ((_mask & _maskOptionValues[index]) != 0);
-                               break;
-
-                       default:
-                               result = false;
-                       }
-               }
-
-               return result;
-       }
-
-       /**
-        * Sets the absolute unitmask value. 
-        * 
-        * @param newValue the new value of this unitmask
-        */
-       public void setMaskValue(int newValue) {
-               if (newValue == SET_DEFAULT_MASK) {
-                       _mask = _defaultMask;
-               } else {
-                       _mask = newValue;
-               }
-       }
-       
-       /**
-        * Sets the bits of the given mask option's value in the unitmask value.
-        * @param index the index of the mask option to set
-        */
-       public void setMaskFromIndex(int index) {
-               //mandatory masks only use the default value
-               if (index >= 0 && index < _maskOptionValues.length) {
-                       if (_maskType == BITMASK)
-                               _mask |= _maskOptionValues[index];
-                       else if (_maskType == EXCLUSIVE) {
-                               _mask = _maskOptionValues[index];
-                       }
-               }
-       }
-
-       /**
-        * Returns the value of the mask based on the unitmask index.
-        * @param index the index of the mask option
-        * @return the mask option's value
-        */
-       public int getMaskFromIndex(int index) {
-               //mandatory masks only use the default value
-               if (_maskType == BITMASK) {
-                       if (index >= 0 && index < _maskOptionValues.length) {
-                               return _maskOptionValues[index];
-                       }
-               } else if (_maskType == EXCLUSIVE) {
-                       if (index >= 0 && index < _maskOptionValues.length) {
-                               return _maskOptionValues[index];
-                       }
-               } else if (_maskType == MANDATORY) {
-                       return _defaultMask;
-               }
-
-               //type invalid or unknown, or out of bounds
-               return -1;
-       }
-       
-       /**
-        * Unset the bits of the given mask option's value in the unitmask value.
-        * @param index the index of the mask option to set
-        */
-       public void unSetMaskFromIndex(int index) {
-               if (index >= 0 && index < _maskOptionValues.length && _maskType == BITMASK) {
-                       _mask = _mask & ~_maskOptionValues[index];
-               }
-       }
-
-       /**
-        * Sets the current unitmask value to the default mask value.
-        */
-       public void setDefaultMaskValue() {
-               _mask = _defaultMask;
-       }
-
-       /**
-        * Returns a description of the requested mask option.
-        * @param num the mask option index
-        * @return the description
-        */
-       public String getText(int num) {
-               if (num >= 0 && num < _maskOptionDescriptions.length)
-                       return _maskOptionDescriptions[num];
-
-               return null;
-       }
-       
-       /**
-        * Returns the number of mask options in this unitmask.
-        * @return the number of mask options
-        */
-       public int getNumMasks() {
-               return _maskOptionDescriptions.length;
-       }
-
-       /**
-        * Returns the mask type for this unit mask.
-        * @return <code>BITMASK</code>, <code>EXCLUSIVE</code>, or
-        *         <code>MANDATORY</code>
-        */
-       public int getType() {
-               return _maskType;
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/daemon/OprofileDaemonEvent.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/daemon/OprofileDaemonEvent.java
deleted file mode 100644 (file)
index 34ae43e..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004,2008 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *    Kent Sebastian <ksebasti@redhat.com>
- *******************************************************************************/ 
-
-package org.eclipse.linuxtools.oprofile.core.daemon;
-
-import org.eclipse.linuxtools.oprofile.core.Oprofile;
-
-/**
- * This class represents an event used to configure the OProfile
- * daemon.
- */
-public class OprofileDaemonEvent {
-       public static final int COUNT_UNINITIALIZED = 0;
-       public static final int COUNT_INVALID = -1;
-       
-       // The event to collect on this counter
-       private OpEvent _event;
-       
-       // Profile kernel?
-       private boolean _profileKernel;
-       
-       // Profile userspace?
-       private boolean _profileUser;
-       
-       // Reset counter value
-       private int _count;
-
-       public OprofileDaemonEvent() {
-               _profileKernel = true;
-               _profileUser = true;
-               _count = COUNT_UNINITIALIZED;
-               _event = null;
-       }
-
-       /**
-        * Set the event to collect
-        * @param event the OProfile event
-        */
-       public void setEvent(OpEvent event) {
-               _event = event;
-       }
-       
-       /**
-        * Get the event to collect
-        * @returns the OProfile event
-        */
-       public OpEvent getEvent() {
-               return _event;
-       }
-
-       /**
-        * Set whether to profile the kernel
-        * @param profileKernel whether to enable kernel profiling
-        */
-       public void setProfileKernel(boolean profileKernel) {
-               _profileKernel = profileKernel;
-       }
-       
-       /**
-        * Get whether to profile the kernel
-        * @return whether to profile the kernel
-        */
-       public boolean getProfileKernel() {
-               return _profileKernel;
-       }
-
-       /**
-        * Set whether to profile userspace
-        * @param profileUser whether to profile userspace
-        */
-       public void setProfileUser(boolean profileUser) {
-               _profileUser = profileUser;
-       }
-       
-       /**
-        * Get whether to profile userspace
-        * @return whether to profile userspace
-        */
-       public boolean getProfileUser() {
-               return _profileUser;
-       }
-
-       /**
-        * Set the reset count
-        * @param count the new count
-        */
-       public void setResetCount(int count) {
-               _count = count;
-       }
-       
-       /**
-        * Get the reset count
-        * @return the reset count
-        */
-       public int getResetCount() {
-               // FIXME: This isn't quite in the right place...
-               if (_count == COUNT_UNINITIALIZED) {
-                       // This is what Oprofile does in oprof_start.cpp:
-                       double speed = Oprofile.getCpuFrequency();
-                       if (speed == 0.0) {
-                               _count = _event.getMinCount() * 30;
-                       } else {
-                               _count = (int) speed * 20;
-                       }
-               }
-               
-               return _count;
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/daemon/OprofileDaemonOptions.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/daemon/OprofileDaemonOptions.java
deleted file mode 100644 (file)
index 358ea27..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008, 2009 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *    Kent Sebastian <ksebasti@redhat.com>
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.core.daemon;
-
-
-/**
- * This class represents the global launch options for the
- * OProfile daemon.
- */
-public class OprofileDaemonOptions {
-       // Kernel image file
-       private String _kernelImageFile;
-       
-       // Enable verbose logging?
-       private boolean _verboseLogging;
-       
-       // How to separate profiles (mask)
-       private int _separateProfiles;
-       
-       // the image to profile
-       private String _binaryImage;
-       
-       //how many calls down to profile
-       private int _callgraphDepth;
-       
-       /**
-        * Sample separation options. Determines how oprofiled will group
-        *   samples for binaries which isn't the main binary being profiled.
-        *   
-        * Currently only properly support:
-        *   -none: ignore all other binaries
-        *   -library: include shared library samples
-        *   -kernel: include kernel module samples (which implicitly includes library)
-        *   
-        *   the others probably wouldn't show nicely in the view
-        */
-       public static final int SEPARATE_NONE = 0;
-       public static final int SEPARATE_LIBRARY = 1;
-       public static final int SEPARATE_KERNEL = 2;
-       public static final int SEPARATE_THREAD = 4;
-       public static final int SEPARATE_CPU = 8;
-       
-       public OprofileDaemonOptions() {
-               //defaults
-//             _kernelImageFile = Oprofile.getKernelImageFile();
-               _kernelImageFile = ""; //$NON-NLS-1$
-               _verboseLogging = false;
-               
-               //jinu modified at 20090526
-//             _separateProfiles = SEPARATE_NONE;
-               _separateProfiles = SEPARATE_LIBRARY;   
-               _binaryImage = ""; //$NON-NLS-1$
-               _callgraphDepth = 0;
-       }
-       
-       /**
-        * Get the kernel image file
-        * @return the kernel image file
-        */
-       public String getKernelImageFile() {
-               return _kernelImageFile;
-       }
-       
-       /**
-        * Set the kernel image file
-        * @param image the kernel image
-        */
-       public void setKernelImageFile(String image) {
-               _kernelImageFile = image;
-       }
-
-       /**
-        * Get daemon verbose logging
-        * @return whether verbose logging is enabled
-        */
-       public boolean getVerboseLogging() {
-               return _verboseLogging;
-       }
-       
-       /**
-        * Set daemon verbose logging
-        * @param logging whether to enable verbose logging
-        */
-       public void setVerboseLogging(boolean logging) {
-               _verboseLogging = logging;
-       }
-
-       /**
-        * Get daemon profile separation mask
-        * @return mask of options
-        */
-       public int getSeparateProfilesMask() {
-               return _separateProfiles;
-       }
-       
-       /**
-        * Set daemon profile separation mask
-        * @param mask the new separation mask
-        */
-       public void setSeparateProfilesMask(int mask) {
-               _separateProfiles = mask;
-       }
-
-       /**
-        * Get the path to the binary image being profiled.
-        * @return full path to the binary
-        */
-       public String getBinaryImage() {
-               return _binaryImage;
-       }
-
-       /**
-        * Sets the path of the binary image to profile.
-        * @param _image full path to the binary
-        */
-       public void setBinaryImage(String _image) {
-               this._binaryImage = _image;
-       }
-
-       /**
-        * Get the call depth value.
-        * @return integer amount of calls down to profile
-        */
-       public int getCallgraphDepth() {
-               return _callgraphDepth;
-       }
-
-       /**
-        * Sets the call depth value.
-        * @param depth integer amount of calls down to profile
-        */
-       public void setCallgraphDepth(int depth) {
-               this._callgraphDepth = depth;
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/linux/LinuxOpcontrolProvider.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/linux/LinuxOpcontrolProvider.java
deleted file mode 100644 (file)
index 5e93062..0000000
+++ /dev/null
@@ -1,422 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008, 2009 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *    Kent Sebastian <ksebasti@redhat.com>
- *******************************************************************************/
-package org.eclipse.linuxtools.oprofile.core.linux;
-
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.oprofile.core.IOpcontrolProvider;
-import org.eclipse.linuxtools.oprofile.core.OpcontrolException;
-import org.eclipse.linuxtools.oprofile.core.Oprofile;
-import org.eclipse.linuxtools.oprofile.core.OprofileCorePlugin;
-import org.eclipse.linuxtools.oprofile.core.daemon.OprofileDaemonEvent;
-import org.eclipse.linuxtools.oprofile.core.daemon.OprofileDaemonOptions;
-
-import org.tizen.common.connection.ConnectionPlugin;
-import org.tizen.oprofile.core.CommandManager;
-import org.tizen.oprofile.core.OprofileComm;
-import org.tizen.oprofile.core.OprofileCommonConstants;
-
-/**
- * A class which encapsulates running opcontrol.
- */
-public class LinuxOpcontrolProvider implements IOpcontrolProvider {
-       // Location of opcontrol security wrapper
-       //      private static final String _OPCONTROL_REL_PATH = "natives/linux/scripts/opcontrol"; //$NON-NLS-1$
-       private final String OPCONTROL_PROGRAM;
-
-       // Initialize the Oprofile kernel module and oprofilefs
-       private static final String _OPD_INIT_MODULE = "init"; //$NON-NLS-1$
-
-       // Setup daemon collection arguments
-       private static final String _OPD_SETUP = "setup"; //$NON-NLS-1$
-       private static final String _OPD_SETUP_SEPARATE = "separate="; //$NON-NLS-1$
-       private static final String _OPD_SETUP_SEPARATE_SEPARATOR = ","; //$NON-NLS-1$
-       //      private static final String _OPD_SETUP_SEPARATE_NONE = "none"; //$NON-NLS-1$
-       private static final String _OPD_SETUP_SEPARATE_LIBRARY = "library"; //$NON-NLS-1$
-       private static final String _OPD_SETUP_SEPARATE_KERNEL = "kernel"; //$NON-NLS-1$
-       private static final String _OPD_SETUP_SEPARATE_THREAD = "thread"; //$NON-NLS-1$
-       private static final String _OPD_SETUP_SEPARATE_CPU = "cpu"; //$NON-NLS-1$
-
-       private static final String _OPD_SETUP_EVENT = "event="; //$NON-NLS-1$
-       private static final String _OPD_SETUP_EVENT_SEPARATOR = ":"; //$NON-NLS-1$
-       private static final String _OPD_SETUP_EVENT_TRUE = "1"; //$NON-NLS-1$
-       private static final String _OPD_SETUP_EVENT_FALSE = "0"; //$NON-NLS-1$
-       private static final String _OPD_SETUP_EVENT_DEFAULT = "default"; //$NON-NLS-1$
-
-       private static final String _OPD_SETUP_IMAGE = "image="; //$NON-NLS-1$
-
-       private static final String _OPD_CALLGRAPH_DEPTH = "callgraph="; //$NON-NLS-1$
-
-       // Kernel image file options
-       private static final String _OPD_KERNEL_NONE = "vmlinux=no"; //$NON-NLS-1$
-       private static final String _OPD_KERNEL_FILE = "vmlinux="; //$NON-NLS-1$
-
-       // Logging verbosity
-       // private static final String _OPD_VERBOSE_LOGGING = "--verbose=";
-       // //$NON-NSL-1$
-       //      private static final String _OPD_VERBOSE_ALL = "all"; //$NON-NLS-1$
-       //      private static final String _OPD_VERBOSE_SFILE = "sfile"; //$NON-NLS-1$
-       //      private static final String _OPD_VERBOSE_ARCS = "arcs"; //$NON-NLS-1$
-       //      private static final String _OPD_VERBOSE_SAMPLES = "samples"; //$NON-NLS-1$
-       //      private static final String _OPD_VERBOSE_MODULE = "module"; //$NON-NLS-1$
-       //      private static final String _OPD_VERBOSE_MISC = "misc"; //$NON-NLS-1$
-
-       // Start the daemon process without starting data collection
-       private static final String _OPD_START_DAEMON = "startdaemon"; //$NON-NLS-1$
-
-       // Start collecting profiling data
-       private static final String _OPD_START_COLLECTION = "start"; //$NON-NLS-1$
-
-       // Flush the collected profiling data to disk
-       private static final String _OPD_DUMP = "dump"; //$NON-NLS-1$
-
-       // Stop data collection
-       private static final String _OPD_STOP_COLLECTION = "stop"; //$NON-NLS-1$
-
-       // Stop data collection and stop daemon
-       private static final String _OPD_SHUTDOWN = "shutdown"; //$NON-NLS-1$
-
-       // Clear out data from current session
-       private static final String _OPD_RESET = "reset"; //$NON-NLS-1$
-
-       // Save data from the current session
-       private static final String _OPD_SAVE_SESSION = "save "; //$NON-NLS-1$
-
-       // Unload the oprofile kernel module and oprofilefs
-       private static final String _OPD_DEINIT_MODULE = "deinit"; //$NON-NLS-1$
-
-       // Logging verbosity. Specified with setupDaemon.
-       // --verbosity=all generates WAY too much stuff in the log
-       private String _verbosity = ""; //$NON-NLS-1$
-
-       public LinuxOpcontrolProvider() throws OpcontrolException {
-               // jinu modified at 20090526
-               // OPCONTROL_PROGRAM = _findOpcontrol();
-               OPCONTROL_PROGRAM = OprofileCommonConstants.OPROFILE_SCRIPT; 
-       }
-
-       /**
-        * Unload the kernel module and oprofilefs
-        * 
-        * @throws OpcontrolException
-        */
-       public void deinitModule() throws OpcontrolException {
-               _runOpcontrol(_OPD_DEINIT_MODULE);
-       }
-
-       /**
-        * Dump collected profiling data
-        * 
-        * @throws OpcontrolException
-        */
-       public void dumpSamples() throws OpcontrolException {
-               _runOpcontrol(_OPD_DUMP);
-       }
-
-       /**
-        * Loads the kernel module and oprofilefs
-        * 
-        * @throws OpcontrolException
-        */
-       public void initModule() throws OpcontrolException {
-               _runOpcontrol(_OPD_INIT_MODULE);
-       }
-
-       /**
-        * Clears out data from current session
-        * 
-        * @throws OpcontrolException
-        */
-       public void reset() throws OpcontrolException {
-               _runOpcontrol(_OPD_RESET);
-       }
-
-       /**
-        * Saves the current ("default") session
-        * 
-        * @param name
-        *            the name to which to save the session
-        * @throws OpcontrolException
-        */
-       public void saveSession(String name) throws OpcontrolException {
-               ArrayList<String> cmd = new ArrayList<String>();
-               cmd.add(_OPD_SAVE_SESSION + name);
-               _runOpcontrol(cmd);
-       }
-
-       /**
-        * Give setup aruments
-        * 
-        * @param args
-        *            list of parameters for daemon
-        * @throws OpcontrolException
-        */
-       public void setupDaemon(OprofileDaemonOptions options,
-                       OprofileDaemonEvent[] events) throws OpcontrolException {
-               // Convert options & events to arguments for opcontrol
-               ArrayList<String> args = new ArrayList<String>();
-               args.add(_OPD_SETUP);
-               _optionsToArguments(args, options);
-               if (!Oprofile.getTimerMode()) {
-                       if (events == null || events.length == 0) {
-                               args.add(_OPD_SETUP_EVENT + _OPD_SETUP_EVENT_DEFAULT);
-                       } else {
-                               for (int i = 0; i < events.length; ++i) {
-                                       _eventToArguments(args, events[i]);
-                               }
-                       }
-               }
-               _runOpcontrol(args);
-       }
-
-       // jinu added at 20090602
-       public void setupDaemon(OprofileDaemonOptions options,
-                       OprofileDaemonEvent[] events, String defaultEvent)
-                       throws OpcontrolException {
-               // Convert options & events to arguments for opcontrol
-               ArrayList<String> args = new ArrayList<String>();
-               args.add(_OPD_SETUP);
-               _optionsToArguments(args, options);
-               if (!Oprofile.getTimerMode()) {
-                       if (events == null || events.length == 0) {
-                               // jinu modified at 20090602
-                               // args.add(_OPD_SETUP_EVENT + _OPD_SETUP_EVENT_DEFAULT);
-                               if(null != defaultEvent)
-                                       args.add(defaultEvent);
-                       } else {
-                               for (int i = 0; i < events.length; ++i) {
-                                       _eventToArguments(args, events[i]);
-                               }
-                       }
-               }
-               _runOpcontrol(args);
-       }
-
-       /**
-        * Stop data collection and remove daemon
-        * 
-        * @throws OpcontrolException
-        */
-       public void shutdownDaemon() throws OpcontrolException {
-               _runOpcontrol(_OPD_SHUTDOWN);
-       }
-
-       /**
-        * Start data collection (will start daemon if necessary)
-        * 
-        * @throws OpcontrolException
-        */
-       public void startCollection() throws OpcontrolException {
-               _runOpcontrol(_OPD_START_COLLECTION);
-       }
-
-       /**
-        * Start daemon without starting profiling
-        * 
-        * @throws OpcontrolException
-        */
-       public void startDaemon() throws OpcontrolException {
-               _runOpcontrol(_OPD_START_DAEMON);
-       }
-
-       /**
-        * Stop data collection
-        * 
-        * @throws OpcontrolException
-        */
-       public void stopCollection() throws OpcontrolException {
-               _runOpcontrol(_OPD_STOP_COLLECTION);
-       }
-
-       // Convenience function
-       private void _runOpcontrol(String cmd) throws OpcontrolException {
-               ArrayList<String> list = new ArrayList<String>();
-               list.add(cmd);
-               _runOpcontrol(list);
-       }
-
-       // Will add opcontrol program to beginning of args
-       // args: list of opcontrol arguments (not including opcontrol program
-       // itself)
-       private void _runOpcontrol(ArrayList<String> args)
-                       throws OpcontrolException {
-               args.add(0, OPCONTROL_PROGRAM);
-               // Verbosity hack. If --start or --start-daemon, add verbosity, if set
-               String cmd = (String) args.get(1);
-               if (_verbosity.length() > 0
-                               && (cmd.equals(_OPD_START_COLLECTION) || cmd
-                                               .equals(_OPD_START_DAEMON))) {
-                       args.add(_verbosity);
-               }
-
-               String[] cmdArray = new String[args.size()];
-               args.toArray(cmdArray);
-
-               // jinu modified at 20090526
-               runCommand(cmdArray);
-               /*
-                * Process p = null; try { p = Runtime.getRuntime().exec(cmdArray); }
-                * catch (IOException ioe) { if (p != null) { p.destroy(); p = null; }
-                * 
-                * throw new
-                * OpcontrolException(OprofileCorePlugin.createErrorStatus("opcontrolRun"
-                * , ioe)); //$NON-NLS-1$ }
-                * 
-                * if (p != null) { BufferedReader stdout = new BufferedReader(new
-                * InputStreamReader(p.getErrorStream())); String output = "", s;
-                * //$NON-NLS-1$ try { while ((s = stdout.readLine()) != null) { output
-                * += s; }
-                * 
-                * int ret = p.waitFor(); if (ret != 0) { System.out.println(output);
-                * throw new OpcontrolException(OprofileCorePlugin.createErrorStatus(
-                * "opcontrolNonZeroExitCode", null)); //$NON-NLS-1$ } } catch
-                * (IOException ioe) { ioe.printStackTrace(); } catch
-                * (InterruptedException e) { e.printStackTrace(); } }
-                */
-       }
-
-       // private static String _findOpcontrol() throws OpcontrolException {
-       // URL url =
-       // FileLocator.find(Platform.getBundle(OprofileCorePlugin.getId()), new
-       // Path(_OPCONTROL_REL_PATH), null);
-       //
-       // if (url != null) {
-       // try {
-       // return FileLocator.toFileURL(url).getPath();
-       // } catch (IOException ignore) { }
-       // } else {
-       //                      throw new OpcontrolException(OprofileCorePlugin.createErrorStatus("opcontrolProvider", null)); //$NON-NLS-1$
-       // }
-       //
-       // return null;
-       // }
-
-       // Convert the event into arguments for opcontrol
-       private void _eventToArguments(ArrayList<String> args,
-                       OprofileDaemonEvent event) {
-               // Event spec: "EVENT:count:mask:profileKernel:profileUser"
-               String spec = new String(_OPD_SETUP_EVENT);
-               spec += event.getEvent().getText();
-               spec += _OPD_SETUP_EVENT_SEPARATOR;
-               spec += event.getResetCount();
-               spec += _OPD_SETUP_EVENT_SEPARATOR;
-               spec += event.getEvent().getUnitMask().getMaskValue();
-               spec += _OPD_SETUP_EVENT_SEPARATOR;
-               spec += (event.getProfileKernel() ? _OPD_SETUP_EVENT_TRUE
-                               : _OPD_SETUP_EVENT_FALSE);
-               spec += _OPD_SETUP_EVENT_SEPARATOR;
-               spec += (event.getProfileUser() ? _OPD_SETUP_EVENT_TRUE
-                               : _OPD_SETUP_EVENT_FALSE);
-               args.add(spec);
-       }
-
-       // Convert the options into arguments for opcontrol
-       private void _optionsToArguments(ArrayList<String> args,
-                       OprofileDaemonOptions options) {
-               // Add separate flags
-               int mask = options.getSeparateProfilesMask();
-
-               String separate = new String(_OPD_SETUP_SEPARATE);
-
-               if (mask == OprofileDaemonOptions.SEPARATE_NONE) {
-                       separate += _OPD_SETUP_SEPARATE_LIBRARY
-                                       + _OPD_SETUP_SEPARATE_SEPARATOR
-                                       + _OPD_SETUP_SEPARATE_KERNEL;
-                       // separate += _OPD_SETUP_SEPARATE_NONE;
-               } else {
-                       // note that opcontrol will nicely ignore the trailing comma
-                       if ((mask & OprofileDaemonOptions.SEPARATE_LIBRARY) != 0)
-                               separate += _OPD_SETUP_SEPARATE_LIBRARY
-                                               + _OPD_SETUP_SEPARATE_SEPARATOR;
-                       if ((mask & OprofileDaemonOptions.SEPARATE_KERNEL) != 0)
-                               separate += _OPD_SETUP_SEPARATE_KERNEL
-                                               + _OPD_SETUP_SEPARATE_SEPARATOR;
-                       if ((mask & OprofileDaemonOptions.SEPARATE_THREAD) != 0)
-                               separate += _OPD_SETUP_SEPARATE_THREAD
-                                               + _OPD_SETUP_SEPARATE_SEPARATOR;
-                       if ((mask & OprofileDaemonOptions.SEPARATE_CPU) != 0)
-                               separate += _OPD_SETUP_SEPARATE_CPU
-                                               + _OPD_SETUP_SEPARATE_SEPARATOR;
-               }
-               args.add(separate);
-
-               // Add kernel image
-               if (options.getKernelImageFile() == null
-                               || options.getKernelImageFile().length() == 0) {
-                       args.add(_OPD_KERNEL_NONE);
-               } else {
-                       args.add(_OPD_KERNEL_FILE + options.getKernelImageFile());
-               }
-
-               // image filter -- always non-null
-               args.add(_OPD_SETUP_IMAGE + options.getBinaryImage());
-
-               // callgraph depth
-               args.add(_OPD_CALLGRAPH_DEPTH + options.getCallgraphDepth());
-       }
-
-       // jinu added at 20090528
-       public void removeDaemonSetting() throws OpcontrolException {
-               final String[] _OPD_REMOVE_SETTING = { "rm", "-rf",
-                               "/home/developer/sdk_tools/.oprofile/daemonrc" };
-               runCommand(_OPD_REMOVE_SETTING);
-       }
-
-       // jinu added at 20090528
-       private void runCommand(String[] comm) throws OpcontrolException {
-
-               String str = OprofileComm.getCommandString(comm);
-//             String result=null;
-//             try {
-//                     result = session.run(str);
-//                     session.run(str, null);
-                       CommandManager.runShell(str);
-/*                     
-               } catch (Exception e) {
-                       String devType = null;
-                       if(null == ConnectionPlugin.getDefault().getCurrentDevice()){
-                               devType = "";
-                       }
-                       else if (CommandManager.isEmulator()) {
-                               devType = "Emulator";
-                       } else {
-                               devType = "RealDevice";
-                       }
-                       throw new OpcontrolException(OprofileCorePlugin.createErrorStatus(
-                                       "opcontrolRun (" + devType + ")", e)); //$NON-NLS-1$
-               }
-*/
-               // -----------------------------------
-
-               // jinu removed at 20090616
-               /*
-                * Process p = null; try { p = Runtime.getRuntime().exec(comm); } catch
-                * (IOException ioe) { if (p != null) { p.destroy(); p = null; }
-                * 
-                * throw new
-                * OpcontrolException(OprofileCorePlugin.createErrorStatus("opcontrolRun"
-                * , ioe)); //$NON-NLS-1$ }
-                * 
-                * if (p != null) { BufferedReader stdout = new BufferedReader(new
-                * InputStreamReader(p.getErrorStream())); String output = "", s;
-                * //$NON-NLS-1$ try { while ((s = stdout.readLine()) != null) { output
-                * += s; }
-                * 
-                * int ret = p.waitFor(); if (ret != 0) { System.out.println(output);
-                * throw new OpcontrolException(OprofileCorePlugin.createErrorStatus(
-                * "opcontrolNonZeroExitCode", null)); //$NON-NLS-1$ } } catch
-                * (IOException ioe) { ioe.printStackTrace(); } catch
-                * (InterruptedException e) { e.printStackTrace(); } }
-                */
-       }
-
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/linux/LinuxOpxmlProvider.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/linux/LinuxOpxmlProvider.java
deleted file mode 100644 (file)
index 2478c80..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008, 2009 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *    Kent Sebastian <ksebasti@redhat.com> 
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.core.linux;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.linuxtools.oprofile.core.IOpxmlProvider;
-import org.eclipse.linuxtools.oprofile.core.OprofileCorePlugin;
-import org.eclipse.linuxtools.oprofile.core.OpxmlException;
-import org.eclipse.linuxtools.oprofile.core.daemon.OpInfo;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelEvent;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelImage;
-import org.eclipse.linuxtools.oprofile.core.opxml.OpxmlConstants;
-import org.eclipse.linuxtools.oprofile.core.opxml.modeldata.ModelDataProcessor;
-import org.eclipse.linuxtools.oprofile.core.opxml.sessions.SessionsProcessor;
-
-import org.tizen.oprofile.core.OprofileCommonConstants;
-
-/**
- * A class which implements the IOpxmlProvider interface for running opxml.
- */
-public class LinuxOpxmlProvider implements IOpxmlProvider {
-       private String _pathToOpxml;
-       
-       public LinuxOpxmlProvider() throws OpxmlException {
-               _pathToOpxml = _getOpxmlPath();
-               
-               if (_pathToOpxml == null) {
-                       throw new OpxmlException(OprofileCorePlugin.createErrorStatus("opxmlProvider", null)); //$NON-NLS-1$
-               }
-       }
-       
-       //jinu modified at 20090526
-       //public abstract String _getOpxmlPath();
-       public String _getOpxmlPath(){
-               String opxmlPath = OprofileCommonConstants.COMMAND_OPXML;
-               return opxmlPath;
-       }
-       
-       public IRunnableWithProgress info(final OpInfo info) {
-               IRunnableWithProgress runnable = new IRunnableWithProgress() {
-                       public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
-                               OpxmlRunner runner = new OpxmlRunner(_pathToOpxml);
-                               String[] args = new String[] {
-                                       OpxmlConstants.OPXML_INFO
-                               };
-                               runner.run(args, info);
-                       }
-               };
-               
-               return runnable;
-       }
-       
-       public IRunnableWithProgress modelData(final String eventName, final String sessionName, final OpModelImage image) {
-               IRunnableWithProgress runnable = new IRunnableWithProgress() {  
-                       public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
-                               OpxmlRunner runner = new OpxmlRunner(_pathToOpxml);
-
-                               String[] args = new String[] {
-                                               OpxmlConstants.OPXML_MODELDATA,
-                                               eventName,
-                                               sessionName
-                               };
-                               
-                               ModelDataProcessor.CallData data = new ModelDataProcessor.CallData(image);
-                               runner.run(args, data);
-                       }
-               };
-               
-               return runnable;
-       }
-               
-       public IRunnableWithProgress checkEvents(final int ctr, final int event, final int um, final int[] eventValid) {
-               IRunnableWithProgress runnable = new IRunnableWithProgress() {
-                       public void run(IProgressMonitor monitor) {
-                               OpxmlRunner runner = new OpxmlRunner(_pathToOpxml);
-                               String[] args = new String[] {
-                                       OpxmlConstants.CHECKEVENTS_TAG,
-                                       Integer.toString(ctr),
-                                       Integer.toString(event),
-                                       Integer.toString(um)
-                               };
-                               
-                               runner.run(args, eventValid);
-                       }
-               };
-               return runnable;
-       }
-       
-       public IRunnableWithProgress sessions(final ArrayList<OpModelEvent> sessionList) {
-               
-               IRunnableWithProgress runnable = new IRunnableWithProgress() {
-                       public void run(IProgressMonitor monitor) {
-                               OpxmlRunner runner = new OpxmlRunner(_pathToOpxml);
-                               String[] args = new String[] {
-                                       OpxmlConstants.OPXML_SESSIONS,
-                               };
-               
-                               SessionsProcessor.SessionInfo sinfo  = new SessionsProcessor.SessionInfo(sessionList);
-                               runner.run(args, sinfo);
-                       }
-               };
-
-               return runnable;
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/linux/OpxmlRunner.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/linux/OpxmlRunner.java
deleted file mode 100644 (file)
index 1331f08..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008, 2009 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *    Kent Sebastian <ksebasti@redhat.com> - 
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.core.linux;
-
-import java.io.IOException;
-import java.io.StringReader;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParserFactory;
-
-import org.eclipse.linuxtools.oprofile.core.OprofileCorePlugin;
-import org.eclipse.linuxtools.oprofile.core.OpxmlException;
-import org.eclipse.linuxtools.oprofile.core.opxml.OprofileSAXHandler;
-import org.eclipse.linuxtools.oprofile.core.opxml.XMLProcessor;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-
-import org.tizen.oprofile.core.CommandManager;
-import org.tizen.oprofile.core.OprofileComm;
-import org.eclipse.linuxtools.profiling.launch.ProfileLaunchPlugin;
-
-/**
- * This class will run opxml.
- * 
- * opxml is a small program which acts as a textual interface between Oprofile and
- * BFD and the oprofile plugins. 
- */
-public class OpxmlRunner {
-       private OprofileSAXHandler _handler;
-       private String _pathToOpxml;
-
-       public OpxmlRunner(String pathToOpxml) {
-               //assume that the path given is valid
-               _pathToOpxml = pathToOpxml;
-       }
-       
-       /**
-        * Returns the current XMLProcessor handling parsing of opxml output.
-        * @return the processor
-        */
-       public XMLProcessor getProcessor() {
-               return _handler.getProcessor();
-       }
-       
-       /**
-        * Runs opxml with the given arguments.
-        * @param args the arguments to pass to opxml
-        * @param callData any callData to pass to the processor
-        * @return boolean indicating the success/failure of opxml
-        * @throws OpxmlException 
-        */
-       public boolean run(String[] args, Object callData) {
-               XMLReader reader = null;
-               _handler = OprofileSAXHandler.getInstance(callData);
-               
-               // Create XMLReader
-        SAXParserFactory factory = SAXParserFactory.newInstance();
-        try {
-                       reader = factory.newSAXParser().getXMLReader();
-               } catch (ParserConfigurationException e) {
-                       e.printStackTrace();
-                       return false;
-               } catch (SAXException e) {
-                       e.printStackTrace();
-                       return false;
-               }
-               
-               // Set content/error handlers
-               reader.setContentHandler(_handler);
-               reader.setErrorHandler(_handler);
-               
-               // Setup args
-               String[] cmdArray = new String[args.length + 1];
-               cmdArray[0] = _pathToOpxml;
-               System.arraycopy(args, 0, cmdArray, 1, args.length);
-               
-               
-               // Run opxml
-               try {
-                       //jinu added at 20090604 --------------------------
-                       if(ProfileLaunchPlugin.checkTarget() == 0) return false;
-                       //ISession session =OprofileComm.getSession();
-                       
-                       String command = OprofileComm.getCommandString(cmdArray)+" | sed 's/^[^<]*//' | sed 's/&//'";
-                       //String str = session.run(command, null);
-                       String str = CommandManager.runCommandReturningResult(command);
-                       
-                       reader.parse(new InputSource(new StringReader(str)));   
-                       
-                       //jinu removed at 20090616
-                       /*
-                       // before procedure
-                       Process p = Runtime.getRuntime().exec(cmdArray);
-                               
-                       BufferedReader bi = new BufferedReader(new InputStreamReader(p.getInputStream()));
-                       reader.parse(new InputSource(bi));      
-                       
-                       if (p.waitFor() != 0) {
-                               //System.out.println("error running opxml");
-                               return false;
-                       }
-                       */
-                       
-                       return true;
-               } catch (SAXException e) {
-                       e.printStackTrace();
-               } catch (IOException e) {
-//                     System.out.println("IOException: " + e.getMessage());
-                       e.printStackTrace();
-                       OprofileCorePlugin.showErrorDialog("opxmlIOException", null); //$NON-NLS-1$
-               //jinu added at 20090604
-               } catch (Exception e) {
-                       e.printStackTrace();
-                       OprofileCorePlugin.showErrorDialog("opxmlIOException", null); //$NON-NLS-1$
-               }
-               
-               return false;
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/model/OpModelEvent.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/model/OpModelEvent.java
deleted file mode 100644 (file)
index bd4fab7..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008, 2009 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *    Kent Sebastian <ksebasti@redhat.com> - 
- *******************************************************************************/ 
-
-package org.eclipse.linuxtools.oprofile.core.model;
-
-/**
- * A class which represents the event collected in a given session.
- */
-public class OpModelEvent {
-       private String _eventName;
-       private OpModelSession[] _sessions;
-       private String _printTabs = "";         //for nice output  //$NON-NLS-1$
-       
-       public OpModelEvent(String name) {
-               _eventName = name;
-       }
-
-       public OpModelSession[] getSessions() {
-               return _sessions;
-       }
-
-       public void _setSessions(OpModelSession[] sessions) {
-               _sessions = sessions;
-       }
-
-       public String getName() {
-               return _eventName;
-       }
-
-       //populate all sessions
-       public void refreshModel() {
-               if (_sessions != null) {
-                       for (int i = 0; i < _sessions.length; i++) {
-                               _sessions[i].refreshModel();
-                       }
-               }
-       }
-       
-       public String toString(String tabs) {
-               _printTabs = tabs;
-               String s = toString();
-               _printTabs = ""; //$NON-NLS-1$
-               return s;
-       }
-
-       @Override
-       public String toString() {
-               String s = _eventName + "\n"; //$NON-NLS-1$
-               if (_sessions != null) {
-                       for (int i = 0; i < _sessions.length; i++) {
-                               s += _printTabs + "Session: "; //$NON-NLS-1$
-                               s += _sessions[i].toString(_printTabs + "\t"); //$NON-NLS-1$
-                       }
-               }
-               return s;
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/model/OpModelImage.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/model/OpModelImage.java
deleted file mode 100644 (file)
index 42ee8e0..0000000
+++ /dev/null
@@ -1,181 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008, 2009 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *    Kent Sebastian <ksebasti@redhat.com> - 
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.core.model;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-
-
-/**
- * A class which represents an image (executables,
- * libraries, modules) profile by OProfile.
- */
-public class OpModelImage {
-       public static final int IMAGE_PARSE_ERROR = -1;
-       
-       //The count of all samples from this image
-       private int _count;
-       
-       //the count for all dependent images -- needed?
-       private int _depcount;
-       
-       //The name of this image (the full path, where applicable)
-       private String _name;
-       
-       //The symbols profiled in this image
-       private OpModelSymbol[] _symbols;
-       
-       //Any dependent images on this image (usually shared libs, kernel modules)
-       private OpModelImage[] _dependents;
-       
-       private String _printTabs = "";         //for nice output //$NON-NLS-1$
-       
-       public OpModelImage() {
-               _name = ""; //$NON-NLS-1$
-               _count = 0;
-               _depcount = 0;
-               _symbols = null;
-               _dependents = null;
-       }
-       
-       public int getCount() {
-               return _count;
-       }
-       
-       public int getDepCount() {
-               return _depcount;
-       }
-
-       public String getName() {
-               return _name;
-       }
-
-       //jinu added at 20090622--------------------
-       private ArrayList<OpModelSymbol> _symbolList = new ArrayList<OpModelSymbol>();
-       private ArrayList<OpModelImage> _dependentList = new ArrayList<OpModelImage>();
-       public void _addSymbol(OpModelSymbol symbol){
-               _symbolList.add(symbol);
-       }
-       public void _addDependent(OpModelImage image){
-               _dependentList.add(image);
-       }
-       
-       private static class SortSymbolComparator implements Comparator<OpModelSymbol> {
-               public int compare(OpModelSymbol o1, OpModelSymbol o2) {
-                       int cnt1 = o1.getCount();
-                       int cnt2 = o2.getCount();
-                       
-                       return cnt1<cnt2?1:(cnt1==cnt2?0:-1);
-               }
-       }
-       
-       private static class SortImageComparator implements Comparator<OpModelImage> {
-               public int compare(OpModelImage o1, OpModelImage o2) {
-                       int cnt1 = o1.getCount();
-                       int cnt2 = o2.getCount();
-                       
-                       return cnt1<cnt2?1:(cnt1==cnt2?0:-1);
-               }
-       }
-       //-------------------------------
-       
-       public OpModelSymbol[] getSymbols() {
-               //jinu modified at 20090622
-               //return _symbols;
-               Collections.sort(_symbolList,new SortSymbolComparator());
-               return _symbolList.toArray(new OpModelSymbol[_symbolList.size()]);
-       }
-
-       public OpModelImage[] getDependents() {
-               //jinu modified at 20090622
-               //return _dependents;
-               Collections.sort(_dependentList,new SortImageComparator());
-               return  _dependentList.toArray(new OpModelImage[_dependentList.size()]);
-       }
-
-       public boolean hasDependents() {
-               //jinu modified at 20090622
-               //return (_dependents == null || _dependents.length == 0 ? false : true);
-               return _dependentList.size() == 0 ? false : true;
-       }
-       
-       /**
-        * This method is not meant to be called publicly, used only 
-        * from the XML processors      
-        * @param _count
-        */
-       public void _setCount(int _count) {
-               this._count = _count;
-       }
-       
-       /**
-        * This method is not meant to be called publicly, used only 
-        * from the XML processors      
-        * @param _depcount
-        */
-       public void _setDepCount(int _depcount) {
-               this._depcount = _depcount;
-       }
-
-       /**
-        * This method is not meant to be called publicly, used only 
-        * from the XML processors      
-        * @param _name
-        */
-       public void _setName(String _name) {
-               this._name = _name;
-       }
-
-       /**
-        * This method is not meant to be called publicly, used only 
-        * from the XML processors      
-        * @param _symbols
-        */
-       public void _setSymbols(OpModelSymbol[] _symbols) {
-               this._symbols = _symbols;
-       }
-
-       /**
-        * This method is not meant to be called publicly, used only 
-        * from the XML processors      
-        * @param _dependents
-        */
-       public void _setDependents(OpModelImage[] _dependents) {
-               this._dependents = _dependents;
-       }
-
-       public String toString(String tabs) {
-               _printTabs = tabs;
-               String s = toString();
-               _printTabs = ""; //$NON-NLS-1$
-               return s;
-       }
-
-       @Override
-       public String toString() {
-               String s = _name + ", Count: " + _count + (_depcount !=0 ? ", Dependent Count: " + _depcount + "\n" : "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-               if (_symbols != null) {
-                       for (int i = 0; i < _symbols.length; i++) {
-                               s += _printTabs + "Symbols: "; //$NON-NLS-1$
-                               s += _symbols[i].toString(_printTabs + "\t"); //$NON-NLS-1$
-                       }
-               }
-               if (_dependents != null) {
-                       for (int i = 0; i < _dependents.length; i++) {
-                               s += _printTabs + "Dependent Image: "; //$NON-NLS-1$
-                               s += _dependents[i].toString(_printTabs + "\t"); //$NON-NLS-1$
-                       }                       
-               }
-               return s;
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/model/OpModelRoot.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/model/OpModelRoot.java
deleted file mode 100644 (file)
index 21029f2..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Red Hat, Inc.
- * 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:
- *    Kent Sebastian <ksebasti@redhat.com> - initial API and implementation 
- *******************************************************************************/ 
-
-package org.eclipse.linuxtools.oprofile.core.model;
-
-import org.tizen.oprofile.core.OprofileComm;
-
-/**
- * A root node for the data model. Only one instance exists at any time,
- * although the contents will change. On instantiation the events and
- * sessions are gathered. 
- * 
- * Note that this data model does not map 1:1 to the oprofile data model.
- * This model is for use in profiling one application compiled with debug
- * info, from within eclipse. 
- */
-
-public class OpModelRoot {
-       //jinu removed at 20090704
-       //single instance
-       //private static OpModelRoot _modelRoot = new OpModelRoot();
-
-       private OpModelEvent[] _events;
-//     private String _printTabs = "\t";               //for nice output
-
-       //jinu removed at 20090704
-       /*
-       protected OpModelRoot() {
-//             refreshModel();
-               _events = null;
-//             _modelRoot = this;
-       }
-       */
-       public OpModelRoot() {
-               _events = null;
-       }
-
-       //jinu removed at 20090618
-       /*
-       public static OpModelRoot getDefault() {
-               return _modelRoot;
-       }
-       */
-       
-       //jinu added at 20090628 --------------------------
-       public void reset() {
-               _events = new OpModelEvent[0];
-       }
-
-       //jinu modified at 20090620
-       /*public void refreshModel() {
-               //TODO-performance/interactivity: some persistence for events/sessions
-               // that dont change from run to run (non default sessions) 
-               
-               _events = getNewEvents();
-               if (_events != null) {
-                       for (int i = 0; i < _events.length; i++) {
-                               if (_events[i] != null)
-                                       _events[i].refreshModel();
-                       }
-               }
-       }*/
-       
-       protected OpModelEvent[] getNewEvents() {
-               //launch `opxml sessions`, gather up events & the sessions under them
-               //jinu modified at 20090618
-               //return Oprofile.getEvents(); 
-               return OprofileComm.getEventList();
-       }
-       
-       public OpModelEvent[] getEvents() {
-               return _events;
-       }
-       
-
-       
-       @Override
-       public String toString() {
-//             String s = ""; //$NON-NLS-1$
-//             if (_events != null) {
-//                     for (int i = 0; i < _events.length; i++) {
-//                             if (_events[i] != null) {
-//                                     s += "Event: "; //$NON-NLS-1$
-//                                     s += _events[i].toString("\t"); //$NON-NLS-1$
-//                             }
-//                     }
-//             }
-//             return s;
-               StringBuffer buf = new StringBuffer();
-               if (_events != null) {
-                       for (int i = 0; i < _events.length; i++) {
-                               if (_events[i] != null) {
-                                       buf.append("Event: ");  //$NON-NLS-1$
-                                       buf.append(_events[i].toString("\t"));  //$NON-NLS-1$
-                               }
-                       }
-               }
-               
-               return buf.toString();
-       }
-       
-       //jinu added at 20090620
-       public void _setEvents(OpModelEvent[] _events) {
-               this._events = _events;
-       }
-       
-       //jinu added at 20090704----------------------
-       private String xmlStr;
-       public void setXML(String xmlStr) {
-               this.xmlStr = xmlStr;
-       }
-
-       public String getXML() {
-               return xmlStr;
-       }
-       //--------------------------------
-
-       
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/model/OpModelSample.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/model/OpModelSample.java
deleted file mode 100644 (file)
index a705c09..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004,2008 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *    Kent Sebastian <ksebasti@redhat.com> - 
- *******************************************************************************/ 
-
-package org.eclipse.linuxtools.oprofile.core.model;
-
-/**
- * Represents an OProfile sample.
- */
-public class OpModelSample {
-       private int _count;
-       private int _line;
-
-       public OpModelSample() {
-               _count = 0;
-               _line = 0;
-       }
-       
-       public void _setCount(int _count) {
-               this._count = _count;
-       }
-
-       public void _setLine(int _line) {
-               this._line = _line;
-       }
-
-       public int getCount() {
-               return _count;
-       }
-
-       public int getLine() {
-               return _line;
-       }
-
-       @Override
-       public String toString() {
-               String s = "Line #: " + _line + ", Count: " + _count + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-               return s;
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/model/OpModelSession.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/model/OpModelSession.java
deleted file mode 100644 (file)
index 1d2e66a..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Red Hat, Inc.
- * 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:
- *    Kent Sebastian <ksebasti@redhat.com> - initial API and implementation 
- *******************************************************************************/ 
-
-package org.eclipse.linuxtools.oprofile.core.model;
-
-import org.eclipse.linuxtools.oprofile.core.Oprofile;
-
-
-/**
- * This class represents oprofile sessions. Sessions contain an image
- * of the profiled binary.
- */
-public class OpModelSession {
-       private static final String DEFAULT_SESSION_STRING = "current"; //$NON-NLS-1$
-
-       private OpModelEvent _parentEvent;
-       private OpModelImage _image;
-       private String _name;
-       private String _printTabs = "";         //for nice output //$NON-NLS-1$
-
-       public OpModelSession(OpModelEvent event, String name) {
-               _parentEvent = event;
-               _name = name;
-               _image = null;
-       }
-       
-       public OpModelImage getImage() {
-               return _image;
-       }
-
-       public OpModelEvent getEvent() {
-               return _parentEvent;
-       }
-       
-       public String getName() {
-               return _name;
-       }
-       
-       public int getCount() {
-               if (_image == null) {
-                       return 0;
-               } else {
-                       return _image.getCount();
-               }
-       }
-       
-       public boolean isDefaultSession() {
-               return _name.equals(DEFAULT_SESSION_STRING); 
-       }
-       
-       public void refreshModel() {
-               //populate this session with samples
-               _image = getNewImage();
-       }
-       
-       protected OpModelImage getNewImage() {
-               return Oprofile.getModelData(_parentEvent.getName(), _name);
-       }
-
-       public String toString(String tabs) {
-               _printTabs = tabs;
-               String s = toString();
-               _printTabs = ""; //$NON-NLS-1$
-               return s;
-       }
-
-       @Override
-       public String toString() {
-               String s = _name + "\n"; //$NON-NLS-1$
-               if (_image != null) {
-                       s += _printTabs + "Image: "; //$NON-NLS-1$
-                       s += _image.toString(_printTabs + "\t"); //$NON-NLS-1$
-               }
-               return s;
-               
-       }
-       
-       public void _setImage(OpModelImage image){
-               this._image = image;
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/model/OpModelSymbol.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/model/OpModelSymbol.java
deleted file mode 100644 (file)
index 13ae7ec..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Red Hat, Inc.
- * 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:
- *    Kent Sebastian <ksebasti@redhat.com> - initial API and implementation 
- *******************************************************************************/ 
-
-package org.eclipse.linuxtools.oprofile.core.model;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-
-
-/**
- * This class represents a debugging symbol, the symbol output
- *  from opxml. If a symbol exists, it must have samples (which are
- *  OpModelSamples), although those samples may or may not have 
- *  complete debug info.
- */
-public class OpModelSymbol {
-       private String _name;
-       private String _file;
-       private int _count;
-       private OpModelSample[] _samples;
-       private String _printTabs = "";         //for nice output //$NON-NLS-1$
-       
-       public OpModelSymbol() {
-               _name = ""; //$NON-NLS-1$
-               _file = ""; //$NON-NLS-1$
-               _count = 0;
-               _samples = null;
-       }
-       
-       public void _setName(String _name) {
-               this._name = _name;
-       }
-
-       public void _setFile(String _file) {
-               this._file = _file;
-       }
-
-       public void _setCount(int _count) {
-               this._count = _count;
-       }
-
-       public void _setSamples(OpModelSample[] _samples) {
-               this._samples = _samples;
-       }
-
-       public String getName() {
-               return _name;
-       }
-
-       public String getFile() {
-               return _file;
-       }
-
-       public int getCount() {
-               return _count;
-       }
-       
-       //jinu added at 20090623------------------
-       private ArrayList<OpModelSample> _sampleList = new ArrayList<OpModelSample>();
-       public void _addSample(OpModelSample sample){
-               _sampleList.add(sample);
-       }
-       
-       private static class SortSampleComparator implements Comparator<OpModelSample> {
-               public int compare(OpModelSample o1, OpModelSample o2) {
-                       int cnt1 = o1.getCount();
-                       int cnt2 = o2.getCount();
-                       
-                       return cnt1<cnt2?1:(cnt1==cnt2?0:-1);
-               }
-       }
-       //-----------------------------
-
-       public OpModelSample[] getSamples() {
-               //jinu modified at 20090623
-               //return _samples;
-               Collections.sort(_sampleList,new SortSampleComparator());
-               return _sampleList.toArray(new OpModelSample[_sampleList.size()]);
-       }
-
-       public String toString(String tabs) {
-               _printTabs = tabs;
-               String s = toString();
-               _printTabs = ""; //$NON-NLS-1$
-               return s;
-       }
-
-       @Override
-       public String toString() {
-//             String s = _name + ", File: " + _file + ", Count: " + _count + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-//             if (_samples != null) {
-//                     for (int i = 0; i < _samples.length; i++) {
-//                             s += _printTabs + "Sample: "; //$NON-NLS-1$
-//                             s += _samples[i].toString();
-//                     }
-//             }
-//             return s;
-               StringBuffer buf = new StringBuffer(_name + ", File: " + _file + ", Count: " + _count + "\n");  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-               if (_samples != null) {
-                       for (int i = 0; i < _samples.length; i++) {
-                               buf.append(_printTabs + "Sample: ");    //$NON-NLS-1$
-                               buf.append(_samples[i].toString());
-                       }
-               }
-               
-               return buf.toString();
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/oprofile.properties b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/oprofile.properties
deleted file mode 100644 (file)
index 4c6e221..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-######################################################################
-# Copyright (c) 2004, 2008, 2009 Red Hat, Inc.
-# 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:
-#    Keith Seitz <keiths@redhat.com> - Initial implementation
-#    Kent Sebastian <ksebasti@redhat.com>
-######################################################################
-unknown-kernel=unknown
-getSamples.caption=Reading samples for session \"{0}\"...
-getSamples.caption.default-session=Reading samples for session \"Default\"...
-
-oprofileInit.error.statusMessage=An error occurred initializing OProfile for use with the plugin. Try loading the kernel module via OProfile itself with the command `opcontrol --init` (must be run as root).
-oprofileInit.error.dialog.title=Error initializing OProfile
-oprofileInit.error.dialog.message=FATAL: The OProfile kernel module could not be loaded.
-
-opcontrolRun.error.statusMessage=Error during run of opcontrol
-opcontrolNonZeroExitCode.error.statusMessage=Exit code of opcontrol indicates failure
-
-opcontrolProvider.error.statusMessage=Could not find an OpcontrolProvider, or no opcontrol binary exists.\n\nPlease ensure you have run the install script as the root user. The install script will be in the org.eclipse.linuxtools.oprofile.core plugin, which may be located in one of a few places. You can locate it with the following command (type in a terminal):\n\nfind ~/.eclipse -name 'org.eclipse.linuxtools.oprofile.core*'\n\nIf that doesn't return results, try looking for it in your Eclipse installation:\n\nfind <location from which you're running eclipse> -name 'org.eclipse.linuxtools.oprofile.core*'\n\nWhen you have found the location of the plugin, change to the following directory and run, as root, the install script contained therein:\n\ncd <path to org.eclipse.linuxtools.oprofile.core>/natives/linux/scripts\nsh -x install.sh\n\nYou may need to set the script as executable before running this command; do this with:\n\nchmod u+x install.sh
-
-opcontrolProvider.error.dialog.title=Error running opcontrol
-opcontrolProvider.error.dialog.message=FATAL: An error occurred running opcontrol.
-
-opxmlParse.error.statusMessage=An unexpected error occurred with parsing opxml's output. Please file a bug at http://bugs.eclipse.org/bugs.
-opxmlParse.error.dialog.title=Error with opxml
-opxmlParse.error.dialog.message=An error occurred with opxml.
-
-opxmlIOException.error.statusMessage=The opxml binary can not be read or executed. Either your user does not have sufficient permissions, or the install script was not run.\n\nPlease ensure you have run the install script as the root user. The install script will be in the org.eclipse.linuxtools.oprofile.core plugin, which may be located in one of a few places. You can locate it with the following command (type in a terminal):\n\nfind ~/.eclipse -name 'org.eclipse.linuxtools.oprofile.core*'\n\nIf that doesn't return results, try looking for it in your Eclipse installation:\n\nfind <location from which you're running eclipse> -name 'org.eclipse.linuxtools.oprofile.core*'\n\nWhen you have found the location of the plugin, change to the following directory and run, as root, the install script contained therein:\n\ncd <path to org.eclipse.linuxtools.oprofile.core>/natives/linux/scripts\nsh -x install.sh\n\nYou may need to set the script as executable before running this command; do this with:\n\nchmod u+x install.sh   
-opxmlIOException.error.dialog.title=Error with opxml
-opxmlIOException.error.dialog.message=FATAL: An error occurred with opxml.
-
-opxmlProvider.error.statusMessage=Could not find an OpxmlProvider, or no opxml binary exists. Please fix the issue before continuing.
-opxmlProvider.error.dialog.title=Error with opxml
-opxmlProvider.error.dialog.message=FATAL: An error occurred with opxml.
-
-fatal.kernelModuleNotLoaded=OProfile kernel module not loaded or no opcontrol. Please fix the issue and restart Eclipse.
-
-ui.annotate.no.sessions.error.statusMessage=There are no sessions to annotate. Please profile a binary.
-ui.annotate.no.sessions.error.dialog.title=Annotation Error
-ui.annotate.no.sessions.error.dialog.message=Error annotating
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/OprofileSAXHandler.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/OprofileSAXHandler.java
deleted file mode 100644 (file)
index 9a05d37..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.core.opxml;
-
-import java.util.HashMap;
-import java.util.Stack;
-
-import org.eclipse.linuxtools.oprofile.core.opxml.checkevent.CheckEventsProcessor;
-import org.eclipse.linuxtools.oprofile.core.opxml.info.OpInfoProcessor;
-import org.eclipse.linuxtools.oprofile.core.opxml.modeldata.ModelDataProcessor;
-import org.eclipse.linuxtools.oprofile.core.opxml.sessions.SessionsProcessor;
-import org.xml.sax.Attributes;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * The SAX handler class that is used to parse the output of opxml.
- * @see org.eclipse.linuxtools.oprofile.core.opxml.OpxmlRunner
- */
-public class OprofileSAXHandler extends DefaultHandler {
-       // The only allowed instance of this class
-       private static OprofileSAXHandler _instance = null;
-       
-       // A Map of all the XML processors for opxml
-       private static HashMap<String,Class<?>> _processors = new HashMap<String,Class<?>>();
-       
-       // The current processor being used to parse the document
-       private XMLProcessor _processor = null;
-       private Object _callData;
-       
-       /* A stack of XML processors. This allows processors to invoke sub-processors
-          for handling nested tags more efficiently. */
-       private Stack<XMLProcessor> _processorStack = new Stack<XMLProcessor>();
-       
-       // A convenience class for specifying XMLProcessors
-       private static class ProcessorItem {
-               public String tagName;
-               public Class<?> handlerClass;
-               public ProcessorItem(String name, Class<?> cls) {
-                       tagName = name;
-                       handlerClass = cls;
-               }
-       }
-       
-       // The list of all "root" XML tags and their handler classes 
-       private static final ProcessorItem[] _handlerList = {
-               new ProcessorItem(OpxmlConstants.INFO_TAG, OpInfoProcessor.class),
-               new ProcessorItem(OpxmlConstants.CHECKEVENTS_TAG, CheckEventsProcessor.class),
-               new ProcessorItem(OpxmlConstants.MODELDATA_TAG, ModelDataProcessor.class),
-               new ProcessorItem(OpxmlConstants.SESSIONS_TAG, SessionsProcessor.class)
-       };
-       
-       /**
-        * Returns an instance of the handler. This must be used to access the parser!
-        * @return a handler instance
-        */
-       public static OprofileSAXHandler getInstance(Object callData) {
-               if (_instance == null) {
-                       _instance = new OprofileSAXHandler();
-                       
-                       // Initialize processor map
-                       for (int i = 0; i < _handlerList.length; ++i) {
-                               _processors.put(_handlerList[i].tagName, _handlerList[i].handlerClass);
-                       }
-               }
-               
-               // Set calldata into handler
-               _instance.setCallData (callData);
-               return _instance;
-       }
-       
-       /**
-        * Sets the calldata for the processor.
-        * @param callData the calldata to pass to the processor
-        */
-       public void setCallData(Object callData)
-       {
-               _callData = callData;
-       }
-       
-       /**
-        * Returns the processor for a given request type.
-        * @param type the name of the processor
-        * @return the requested processor or null
-        */
-       public static XMLProcessor getProcessor(String type) {
-               XMLProcessor processor = null;
-               
-               Class<?> handlerClass = (Class<?>) _processors.get(type);
-               if (handlerClass != null) {
-                       try {
-                               processor = (XMLProcessor) handlerClass.newInstance();
-                       } catch (InstantiationException e) {
-                               e.printStackTrace();
-                       } catch (IllegalAccessException e) {
-                               e.printStackTrace();
-                       }
-               }
-               
-               return processor;
-       }
-       
-       /**
-        * @see org.xml.sax.ContentHandler#startDocument()
-        */
-       public void startDocument() {
-               // Reset processor
-               _processor = null;
-       }
-       
-       /**
-        * @see org.xml.sax.ContentHandler#endDocument()
-        */
-       public void endDocument() {
-       }
-       
-       /**
-        * @see org.xml.sax.ContentHandler#startElement(String, String, String, Attributes)
-        */
-       public void startElement(String uri, String lName, String qName, Attributes attrs) {
-               if (_processor == null) {
-                       // Get processor for this event type
-                       _processor = getProcessor(qName);
-                       if (_processor == null) {
-                               return;
-                       }
-                       _processor.reset(_callData);
-               }
-               
-               // If we already have a processor, so let it deal with this new element.
-               // Allow the processor to deal with it's own tag as well: this way it can
-               // grab attributes from it.
-               _processor.startElement(qName, attrs, _callData);
-       }
-       
-       /**
-        * @see org.xml.sax.ContentHandler#endElement(String, String, String)
-        */
-       public void endElement(String uri, String name, String qName) {
-               _processor.endElement(qName, _callData);
-       }
-       
-       /**
-        * @see org.xml.sax.ContentHandler#characters(char[], int, int)
-        */
-       public void characters(char ch[], int start, int length) {
-               // Ignore characters which are only whitespace
-               String str = new String(ch, start, length).trim();
-               if (str.length() > 0 && _processor != null)
-                       _processor.characters(new String(ch, start, length), _callData);
-       }
-       
-       /**
-        * Returns the processor used to parse the document.
-        * @return the XMLProcessor
-        */
-       public XMLProcessor getProcessor() {
-               return _processor;
-       }
-       
-       /**
-        * Pushes the current XMLProcessor onto the stack and installs the given
-        * processor as the document's parser/handler.
-        * @param proc the processor to continue parsing the document
-        */
-       public void push(XMLProcessor proc) {
-               _processorStack.add(_processor);
-               _processor = proc;
-               _processor.reset(_callData);
-       }
-       
-       /**
-        * Removes the current XMLProcessor and installs the previous processor.
-        * NOTE: This assumes that endElement caused the pop, so it calls endElement in
-        * the parent processor.
-        * @param tag the XML tag to pass to the parent processor
-        */
-       public void pop(String tag) {
-               _processor = (XMLProcessor) _processorStack.pop();
-               _processor.endElement(tag, _callData);
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/OpxmlConstants.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/OpxmlConstants.java
deleted file mode 100644 (file)
index 3a0f62a..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004,2008 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *    Kent Sebastian <ksebasti@redhat.com> - change samples to model-data
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.core.opxml;
-
-/**
- * A class of constants for communications with the opxml wrapper
- * program.
- * @see org.eclipse.linuxtools.oprofile.core.opxml.OprofileSAXHandler
- */
-public class OpxmlConstants {
-       /**
-        * Request static oprofile information (num counters, defaults, event lists) 
-        */
-       public static final String OPXML_INFO = "info"; //$NON-NLS-1$
-       public static final String INFO_TAG = OPXML_INFO;
-
-       /**
-        * Request model data for a session
-        */
-       public static final String OPXML_MODELDATA = "model-data"; //$NON-NLS-1$
-       public static final String MODELDATA_TAG = OPXML_MODELDATA;
-       
-       /**
-        * Request event validity check
-        */
-       public static final String OPXML_CHECKEVENTS = "check-events"; //$NON-NLS-1$
-       public static final String CHECKEVENTS_TAG = OPXML_CHECKEVENTS;
-       
-       /**
-        * Request session list
-        */
-       public static final String OPXML_SESSIONS  = "sessions"; //$NON-NLS-1$
-       public static final String SESSIONS_TAG = OPXML_SESSIONS;
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/XMLProcessor.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/XMLProcessor.java
deleted file mode 100644 (file)
index 11a4a5d..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.core.opxml;
-
-import org.xml.sax.Attributes;
-
-/**
- * A class which (minimally) parses XML documents. This class provides only basic
- * support for collecting information from XML documents. It is intended to be subclassed,
- * providing only common functionality for all parser classes.
- * @see org.eclipse.linuxtools.oprofile.core.opxml.OpxmlRunner
- */
-public class XMLProcessor {
-       // The characters in the current tag
-       protected String _characters;
-       
-       /**
-        * This method is called whenever the SAXHandler is about to invoke the
-        * processor for the first time on a given document.
-        * @param callData call data for the processor (usually the result is stored here)
-        */
-       public void reset(Object callData) {
-       };
-       
-       //jinu added at 20090620
-       public void release(Object callData) {
-       };
-       
-       /**
-        * This method is called whenever a new tag is seen in the document. By default,
-        * this process will clear the characters collected for the tag. Processors will typically
-        * call this baseclass method to setup for collecting new character information for a
-        * tag.
-        * @param name the name of the tag
-        * @param attrs the tag's attributes
-        * @param callData call data for the processor (usually the result is stored here)
-        */
-       public void startElement(String name, Attributes attrs, Object callData) {
-               _characters = new String();
-       }
-       
-       /**
-        * This method is called whenever the closing tag for an element is seen in the
-        * document.
-        * @param name the element which is ending
-        * @param callData call data for the processor (usually the result is stored here)
-        */
-       public void endElement(String name, Object callData) {
-       }
-       
-       /**
-        * This method is called whenever characters are seen in the document that are not in
-        *  a markup tag.
-        * @param chars the characters read
-        * @param callData call data for the processor (usually the result is stored here)
-        */
-       public void characters(String chars, Object callData) {
-               _characters = chars;
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/checkevent/CheckEventsProcessor.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/checkevent/CheckEventsProcessor.java
deleted file mode 100644 (file)
index 79c8a58..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *    Kent Sebastian <ksebasti@redhat.com> 
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.core.opxml.checkevent;
-
-import org.eclipse.linuxtools.oprofile.core.opxml.XMLProcessor;
-
-/**
- * XML handler class for opxml's "check-events".
- * @see org.eclipse.linuxtools.oprofile.core.opxml.OpxmlRunner
- */
-public class CheckEventsProcessor extends XMLProcessor {
-       public static final int INVALID_UNKNOWN = 0;    //unexpected error
-       public static final int EVENT_OK = 1;                   //valid
-       public static final int INVALID_EVENT = 2;              //invalid event number
-       public static final int INVALID_UMASK = 3;              //invalid unit mask value
-       public static final int INVALID_COUNTER = 4;    //invalid event for given counter number
-
-       private static final String _RESULT_TAG = "result"; //$NON-NLS-1$
-       private static final String _CHECK_EVENTS_TAG ="check-events"; //$NON-NLS-1$
-
-       private static final String _EVENT_OK = "ok"; //$NON-NLS-1$
-       private static final String _INVALID_EVENT = "invalid-event"; //$NON-NLS-1$
-       private static final String _INVALID_UMASK = "invalid-um"; //$NON-NLS-1$
-       private static final String _INVALID_COUNTER = "invalid-counter"; //$NON-NLS-1$
-
-       private int _result;
-
-       /**
-        * @see org.eclipse.linuxtools.oprofile.core.XMLProcessor#reset()
-        */
-       public void reset(Object callData) {
-               _result = INVALID_UNKNOWN;
-       }
-       
-       /**
-        * @see org.eclipse.linuxtools.oprofile.core.XMLProcessor#endElement(String)
-        */
-       public void endElement(String name, Object callData) {
-               if (name.equals(_RESULT_TAG)) {
-                       if (_characters.equals(_EVENT_OK)) {
-                               _result = EVENT_OK;
-                       } else if (_characters.equals(_INVALID_EVENT)) {
-                                       _result = INVALID_EVENT;
-                       } else if (_characters.equals(_INVALID_UMASK)) {
-                               _result = INVALID_UMASK;
-                       } else if (_characters.equals(_INVALID_COUNTER)) {
-                               _result = INVALID_COUNTER;
-                       }
-               } else if (name.equals(_CHECK_EVENTS_TAG)) {
-                       int[] result = (int[]) callData;
-                       result[0] = _result;
-               }
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/info/DefaultsProcessor.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/info/DefaultsProcessor.java
deleted file mode 100644 (file)
index 817d842..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.core.opxml.info;
-
-import java.util.HashMap;
-
-import org.eclipse.linuxtools.oprofile.core.daemon.OpInfo;
-import org.eclipse.linuxtools.oprofile.core.opxml.OprofileSAXHandler;
-import org.eclipse.linuxtools.oprofile.core.opxml.XMLProcessor;
-
-/**
- * XML handler class for opxml's "defaults".
- * @see org.eclipse.linuxtools.oprofile.core.opxml.OpxmlRunner
- */
-public class DefaultsProcessor extends XMLProcessor {
-       // XML tags reconize by this processor (public)
-       public static final String SAMPLE_DIR = "sample-dir"; //$NON-NLS-1$
-       public static final String LOCK_FILE = "lock-file"; //$NON-NLS-1$
-       public static final String LOG_FILE = "log-file"; //$NON-NLS-1$
-       public static final String DUMP_STATUS = "dump-status"; //$NON-NLS-1$
-       protected HashMap<String,String> _map = new HashMap<String,String>();
-
-       /**
-        * @see org.eclipse.linuxtools.oprofile.core.XMLProcessor#reset()
-        */
-       public void reset(Object callData) {
-               _map.clear();
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.linuxtools.oprofile.core.opxml.XMLProcessor#endElement(java.lang.String, java.lang.Object)
-        */
-       public void endElement(String name, Object callData) {
-               if (name.equals(OpInfoProcessor.DEFAULTS_TAG)) {
-                       OpInfo info = (OpInfo) callData;
-                       info._setDefaults(_map);
-                       OprofileSAXHandler.getInstance(callData).pop(name);
-               } else {
-                       _map.put(name, _characters);
-               }
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/info/EventListProcessor.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/info/EventListProcessor.java
deleted file mode 100644 (file)
index e4e60e7..0000000
+++ /dev/null
@@ -1,241 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004,2009 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *    Kent Sebastian <ksebasti@redhat.com>
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.core.opxml.info;
-
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.oprofile.core.daemon.OpEvent;
-import org.eclipse.linuxtools.oprofile.core.daemon.OpUnitMask;
-import org.eclipse.linuxtools.oprofile.core.opxml.OprofileSAXHandler;
-import org.eclipse.linuxtools.oprofile.core.opxml.XMLProcessor;
-import org.xml.sax.Attributes;
-
-
-/**
- * XML handler class for opxml's "event-list".
- * @see org.eclipse.linuxtools.oprofile.core.opxml.OpxmlRunner
- */
-public class EventListProcessor extends XMLProcessor {
-       // The current event being constructed
-       private OpEvent _currentEvent;
-       private int _counter;
-       private ArrayList<OpEvent> _currentEventList;
-       
-       // An XML processor for reading the unit mask information for an event
-       private UnitMaskProcessor _umProcessor;
-       
-       // XML elements recognized by this processor
-       private static final String _EVENT_TAG = "event"; //$NON-NLS-1$
-       private static final String _UNIT_MASK_TAG = "unit-mask"; //$NON-NLS-1$
-       private static final String _NAME_TAG = "name"; //$NON-NLS-1$
-       private static final String _VALUE_TAG = "value"; //$NON-NLS-1$
-       private static final String _DESCRIPTION_TAG = "description"; //$NON-NLS-1$
-       private static final String _MASK_TAG = "mask"; //$NON-NLS-1$
-       private static final String _MINIMUM_COUNT_TAG = "minimum"; //$NON-NLS-1$
-       private static final String _ATTR_EVENT_LIST_COUNTER = "counter"; //$NON-NLS-1$
-       
-       // This is a special processor which is used to deal with a single mask value
-       private static class MaskProcessor extends XMLProcessor {
-               private OpUnitMask.MaskInfo _info;
-               
-               /**
-                * @see org.eclipse.linuxtools.oprofile.core.XMLProcessor#reset()
-                */
-               public void reset(Object callData) {
-                       _info = new OpUnitMask.MaskInfo();
-               }
-               
-               /**
-                * @see org.eclipse.linuxtools.oprofile.core.XMLProcessor#endElement(String)
-                */
-               public void endElement(String name, Object callData) {
-                       if (name.equals(_VALUE_TAG)) {
-                               // Set mask's value
-                               _info.value = Integer.parseInt(_characters);
-                       } else if (name.equals(_DESCRIPTION_TAG)) {
-                               _info.description = _characters;
-                       } else if (name.equals(_MASK_TAG)) {
-                               // Pop and pass mask tag to previous processor (UnitMaskProcessor)
-                               OprofileSAXHandler.getInstance(callData).pop(_MASK_TAG);
-                       }
-               }
-
-               /**
-                * Returns the information that has been collected about a mask.
-                * @return the mask information
-                */
-               public OpUnitMask.MaskInfo getResult() {
-                       return _info;
-               }
-       }
-       
-       // This is a special processor to handle unit mask information
-       private static class UnitMaskProcessor extends XMLProcessor {
-               // An ArrayList to hold all the valid masks for a unit mask.
-               private ArrayList<OpUnitMask.MaskInfo> _masks;
-               
-               // The unit mask being constructed
-               private OpUnitMask _unitMask;
-               
-               // An XML processor for each individual mask value.
-               private MaskProcessor _maskProcessor;
-               
-               // XML elements recognized by this processor
-               private static final String _MASK_TYPE_TAG = "type"; //$NON-NLS-1$
-               private static final String _MASK_DEFAULT_TAG = "default"; //$NON-NLS-1$
-               private static final String _MASK_TYPE_BITMASK = "bitmask"; //$NON-NLS-1$
-               private static final String _MASK_TYPE_MANDATORY = "mandatory"; //$NON-NLS-1$
-               private static final String _MASK_TYPE_EXCLUSIVE = "exclusive"; //$NON-NLS-1$
-               
-               /**
-                * Constructor for UnitMaskProcessor. Initializes internal state.
-                */
-               public UnitMaskProcessor() {
-                       super();
-                       _maskProcessor = new MaskProcessor();
-                       _masks = new ArrayList<OpUnitMask.MaskInfo>();
-               }
-               
-               /**
-                * @see org.eclipse.linuxtools.oprofile.core.XMLProcessor#reset()
-                */
-               public void reset(Object callData) {
-                       _unitMask = new OpUnitMask();
-                       _masks.clear();
-               }
-               
-               /**
-                * @see org.eclipse.linuxtools.oprofile.core.XMLProcessor#startElement(String, Attributes)
-                */
-               public void startElement(String name, Attributes attrs, Object callData) {
-                       if (name.equals(_MASK_TAG)) {
-                               // Tell SAX handler to use the mask processor
-                               OprofileSAXHandler.getInstance(callData).push(_maskProcessor);
-                       } else {
-                               super.startElement(name, attrs, callData);
-                       }
-               }
-               
-               /**
-                * @see org.eclipse.linuxtools.oprofile.core.XMLProcessor#endElement(String)
-                */
-               public void endElement(String name, Object callData) {
-                       if (name.equals(_MASK_TYPE_TAG)) {
-                               // Set the mask type
-                               _unitMask._setType(_getTypeFromString(_characters));
-                       } else if (name.equals(_MASK_DEFAULT_TAG)) {
-                               // Set the default mask
-                               _unitMask._setDefault(Integer.parseInt(_characters));
-                       } else if (name.equals(_MASK_TAG)) {
-                               // Add this mask description to the list of all masks
-                               _masks.add(_maskProcessor.getResult());
-                       } else if (name.equals(_UNIT_MASK_TAG)) {
-                               // All done. Add the known masks to the unit mask
-                               OpUnitMask.MaskInfo[] descs = new OpUnitMask.MaskInfo[_masks.size()];
-                               _masks.toArray(descs);
-                               _unitMask._setMaskDescriptions(descs);
-                               
-                               // Pop this processor and pass _UNIT_MASK_TAG to previoius processor
-                               OprofileSAXHandler.getInstance(callData).pop(_UNIT_MASK_TAG);
-                       }
-               }
-                               
-               /**
-                * Returns the constructed unit mask.
-                * @return the unit mask
-                */
-               public OpUnitMask getResult() {
-                       return _unitMask;
-               }
-               
-               // Converts a string representing a mask type into an integer
-               private int _getTypeFromString(String string) {
-                       if (string.equals(_MASK_TYPE_MANDATORY)) {
-                               return OpUnitMask.MANDATORY;
-                       } else if (string.equals(_MASK_TYPE_BITMASK)) {
-                               return OpUnitMask.BITMASK;
-                       } else if (string.equals(_MASK_TYPE_EXCLUSIVE)) {
-                               return OpUnitMask.EXCLUSIVE;
-                       }
-
-                       return -1;
-               }
-       };
-       
-       /**
-        * Constructor for EventListProcessor. Initializes internal state.
-        */
-       public EventListProcessor() {
-               super();
-               _umProcessor = new UnitMaskProcessor();
-       }
-       
-       @Override
-       public void reset(Object callData) {
-               _currentEventList = new ArrayList<OpEvent>();
-       }
-       
-       /**
-        * @see org.eclipse.linuxtools.oprofile.core.XMLProcessor#startElement(String, Attributes)
-        */
-       public void startElement(String name, Attributes attrs, Object callData) {
-               if (name.equals(_EVENT_TAG)) {
-                       // new event
-                       _currentEvent = new OpEvent();
-               } else if (name.equals(_UNIT_MASK_TAG)) {
-                       // Tell the SAX handler to use the unit mask processor
-                       OprofileSAXHandler.getInstance(callData).push(_umProcessor);
-               } else if (name.equals(OpInfoProcessor.EVENT_LIST_TAG)) {
-                       // Our start tag: grab the counter number from the attributes
-                       _counter = Integer.parseInt(attrs.getValue(_ATTR_EVENT_LIST_COUNTER));
-               } else {
-                       super.startElement(name, attrs, callData);
-               }
-       }
-       
-       /**
-        * @see org.eclipse.linuxtools.oprofile.core.XMLProcessor#endElement(String)
-        */
-       public void endElement(String name, Object callData) {
-               if (name.equals(_EVENT_TAG)) {
-                       // Finished constructing an event. Add it to the list.
-                       _currentEventList.add(_currentEvent);
-               } else if (name.equals(_UNIT_MASK_TAG)) {
-                       // Set the event's unit mask
-                       _currentEvent._setUnitMask(_umProcessor.getResult());
-               } else if (name.equals(_NAME_TAG)) {
-                       // Set event's name
-                       _currentEvent._setText(_characters);
-               } else if (name.equals(_VALUE_TAG)) {
-                       // Set event's value
-                       _currentEvent._setNumber(Integer.parseInt(_characters));
-               } else if (name.equals(_DESCRIPTION_TAG)) {
-                       // Set event's description
-                       _currentEvent._setTextDescription(_characters);
-               } else if (name.equals(_MINIMUM_COUNT_TAG)) {
-                       // Set event's minimum count
-                       _currentEvent._setMinCount(Integer.parseInt(_characters));
-               } else if (name.equals(OpInfoProcessor.EVENT_LIST_TAG)) {
-                       OprofileSAXHandler.getInstance(callData).pop(name);
-               }
-       }
-       
-       public int getCounterNum() {
-               return _counter;
-       }
-       
-       public OpEvent[] getEvents() {
-               OpEvent[] events = new OpEvent[_currentEventList.size()];
-               _currentEventList.toArray(events);
-               return events;
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/info/OpInfoProcessor.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/info/OpInfoProcessor.java
deleted file mode 100644 (file)
index c64b3af..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004,2009 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *    Kent Sebastian <ksebasti@redhat.com>
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.core.opxml.info;
-
-import org.eclipse.linuxtools.oprofile.core.daemon.OpInfo;
-import org.eclipse.linuxtools.oprofile.core.opxml.OprofileSAXHandler;
-import org.eclipse.linuxtools.oprofile.core.opxml.XMLProcessor;
-import org.xml.sax.Attributes;
-
-
-/**
- * Opxml processor for the "info" command.
- * @see org.eclipse.linuxtools.oprofile.core.opxml.OpxmlRunner
- */
-public class OpInfoProcessor extends XMLProcessor {
-       // Other XMLProcessors used by this processor
-       private DefaultsProcessor _defaultsProc;
-       private EventListProcessor _eventListProc;
-       
-       // XML tags processed by this processor
-       public static final String NUM_COUNTERS_TAG = "num-counters"; //$NON-NLS-1$
-       public static final String DEFAULTS_TAG = "defaults"; //$NON-NLS-1$
-       public static final String EVENT_LIST_TAG = "event-list"; //$NON-NLS-1$
-       public static final String CPU_FREQUENCY_TAG = "cpu-frequency"; //$NON-NLS-1$
-       public static final String TIMER_MODE = "timer-mode";  //$NON-NLS-1$
-
-       public OpInfoProcessor() {
-               _defaultsProc = new DefaultsProcessor();
-               _eventListProc = new EventListProcessor();
-       }
-       
-       /* (non-Javadoc)
-        * @see org.eclipse.linuxtools.oprofile.core.opxml.XMLProcessor#startElement(java.lang.String, org.xml.sax.Attributes, java.lang.Object)
-        */
-       public void startElement(String name, Attributes attrs, Object callData) {
-               if (name.equals(DEFAULTS_TAG)) {
-                       OprofileSAXHandler.getInstance(callData).push(_defaultsProc);
-               } else if (name.equals(EVENT_LIST_TAG)) {
-                       OprofileSAXHandler.getInstance(callData).push(_eventListProc);
-                       _eventListProc.startElement(name, attrs, callData);
-               } else {
-                       super.startElement(name, attrs, callData);
-               }
-       }
-       
-       /* (non-Javadoc)
-        * @see org.eclipse.linuxtools.oprofile.core.opxml.XMLProcessor#endElement(java.lang.String, java.lang.Object)
-        */
-       public void endElement(String name, Object callData) {
-               if (name.equals(CPU_FREQUENCY_TAG)) {
-                       double speed = Double.parseDouble(_characters);
-                       OpInfo info = (OpInfo) callData;
-                       info._setCPUSpeed(speed);
-               } else if (name.equals(TIMER_MODE)) {
-                       boolean timerMode = Boolean.parseBoolean(_characters);
-                       OpInfo info = (OpInfo) callData;
-                       info._setTimerMode(timerMode);
-               } else if (name.equals(NUM_COUNTERS_TAG)) {
-                       int numCounters = 0;
-                       try {
-                               numCounters = Integer.parseInt(_characters);
-                       } catch (NumberFormatException nfe) {
-                               nfe.printStackTrace();
-                       }
-                       OpInfo info = (OpInfo) callData;
-                       info._setNrCounters(numCounters);
-               } else if (name.equals(EVENT_LIST_TAG)) {
-                       OpInfo info = (OpInfo) callData;
-                       info._setEvents(_eventListProc.getCounterNum(), _eventListProc.getEvents());
-               }
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/modeldata/DependentProcessor.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/modeldata/DependentProcessor.java
deleted file mode 100644 (file)
index 7ead484..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * 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:
- *    Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.core.opxml.modeldata;
-
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.oprofile.core.model.OpModelImage;
-import org.eclipse.linuxtools.oprofile.core.opxml.OprofileSAXHandler;
-import org.eclipse.linuxtools.oprofile.core.opxml.XMLProcessor;
-import org.xml.sax.Attributes;
-
-
-/**
- * XML handler class for dependent images (<image> tags under <dependent>)
- */
-public class DependentProcessor extends XMLProcessor {
-       //XML tags parsed by this processor
-       private static final String IMAGE_TAG = "image"; //$NON-NLS-1$
-       private static final String SYMBOLS_TAG = "symbols"; //$NON-NLS-1$
-       private static final String DEPENDENT_TAG = "dependent"; //$NON-NLS-1$
-       
-       //attribute tags
-       private static final String ATTR_IMAGENAME = "name"; //$NON-NLS-1$
-       private static final String ATTR_COUNT = "count"; //$NON-NLS-1$
-
-       //the current image being constructed
-       private OpModelImage _image;
-       //a list of all the dependent images
-       private ArrayList<OpModelImage> _imageList;
-
-       //processor used for symbols of an image
-       private SymbolsProcessor _symbolsProcessor = new SymbolsProcessor();
-
-       public void reset(Object callData) {
-               _image = new OpModelImage();
-               _imageList = new ArrayList<OpModelImage>();
-       }
-
-       public void startElement(String name, Attributes attrs, Object callData) {
-               super.startElement(name, attrs, callData);
-               if (name.equals(IMAGE_TAG)) {
-                       _image._setName(attrs.getValue(ATTR_IMAGENAME));
-                       _image._setCount(Integer.parseInt(attrs.getValue(ATTR_COUNT)));
-               } else if (name.equals(SYMBOLS_TAG)) {
-                       OprofileSAXHandler.getInstance(callData).push(_symbolsProcessor);
-               }
-       }
-       /**
-        * @see org.eclipse.linuxtools.oprofile.core.XMLProcessor#endElement(String)
-        */
-       public void endElement(String name, Object callData) {
-               if (name.equals(IMAGE_TAG)) {
-                       _imageList.add(_image);
-                       _image = new OpModelImage();
-               } else if (name.equals(SYMBOLS_TAG)) {
-                       _image._setSymbols(_symbolsProcessor.getSymbols());
-               } else if (name.equals(DEPENDENT_TAG)) {
-                       OprofileSAXHandler.getInstance(callData).pop(DEPENDENT_TAG);
-               }
-       }
-       
-       public OpModelImage[] getImages() {
-               OpModelImage[] images = new OpModelImage[_imageList.size()];
-               _imageList.toArray(images);
-               return images;
-       }
-
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/modeldata/ModelDataProcessor.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/modeldata/ModelDataProcessor.java
deleted file mode 100644 (file)
index 06a0011..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004,2008 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *    Kent Sebastian <ksebasti@redhat.com> - 
- *******************************************************************************/ 
-
-package org.eclipse.linuxtools.oprofile.core.opxml.modeldata;
-
-import org.eclipse.linuxtools.oprofile.core.model.OpModelImage;
-import org.eclipse.linuxtools.oprofile.core.opxml.OprofileSAXHandler;
-import org.eclipse.linuxtools.oprofile.core.opxml.XMLProcessor;
-import org.xml.sax.Attributes;
-
-
-/**
- * A processor for `opxml samples`.
- */
-public class ModelDataProcessor extends XMLProcessor {
-       //The resulting image compiled by the processor to be used by the caller.
-       public static class CallData {
-               public OpModelImage image;
-               public CallData(OpModelImage im) { image = im; }
-       }
-
-       //XML tags parsed by this processor
-       private static final String IMAGE_TAG = "image"; //$NON-NLS-1$
-       private static final String SYMBOLS_TAG = "symbols"; //$NON-NLS-1$
-       private static final String DEPENDENT_TAG = "dependent"; //$NON-NLS-1$
-       
-       //attribute tags
-       private static final String ATTR_IMAGENAME = "name"; //$NON-NLS-1$
-       private static final String ATTR_COUNT = "count"; //$NON-NLS-1$
-       private static final String ATTR_DEPCOUNT = "count"; //$NON-NLS-1$
-       
-       //the current image being constructed
-       private OpModelImage _image;
-       private int img_seen;   //for ensuring image singleton-ness
-
-       //processors used for symbols and dependent images
-       private SymbolsProcessor _symbolsProcessor = new SymbolsProcessor();
-       private DependentProcessor _dependentProcessor = new DependentProcessor();
-       
-       
-       public void reset(Object callData) {
-               _image = ((CallData) callData).image;
-               img_seen = 0;
-       }
-
-       public void startElement(String name, Attributes attrs, Object callData) {
-               if (name.equals(IMAGE_TAG)) {
-                       if (img_seen == 0) {
-                               _image._setName(attrs.getValue(ATTR_IMAGENAME));
-                               _image._setCount(Integer.parseInt(attrs.getValue(ATTR_COUNT)));
-                       }
-
-                       img_seen++;
-               } else if (name.equals(SYMBOLS_TAG)) {
-                       OprofileSAXHandler.getInstance(callData).push(_symbolsProcessor);
-               } else if (name.equals(DEPENDENT_TAG)) {
-                       _image._setDepCount(Integer.parseInt(attrs.getValue(ATTR_DEPCOUNT)));
-                       OprofileSAXHandler.getInstance(callData).push(_dependentProcessor);
-               } else {
-                       super.startElement(name, attrs, callData);
-               }
-       }
-       
-       public void endElement(String name, Object callData) {
-               if (name.equals(IMAGE_TAG)) {
-                       if (img_seen > 1) {
-                               //should only ever be one image, otherwise oprofile was run
-                               // outside of eclipse and the ui would not handle it properly
-                               _image._setCount(OpModelImage.IMAGE_PARSE_ERROR);
-                               _image._setDepCount(0);
-                               _image._setDependents(null);
-                               _image._setSymbols(null);
-                               _image._setName(""); //$NON-NLS-1$                              
-                       }
-               } else if (name.equals(SYMBOLS_TAG)){
-                       _image._setSymbols(_symbolsProcessor.getSymbols());
-               } else if (name.equals(DEPENDENT_TAG)){
-                       _image._setDependents(_dependentProcessor.getImages());
-               } else {
-                       super.endElement(name, callData);
-               }
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/modeldata/SamplesProcessor.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/modeldata/SamplesProcessor.java
deleted file mode 100644 (file)
index a2bf5a4..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * 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:
- *    Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
- *      - Note: the original SetupParser class was removed, this is a new 
- *        implementation 
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.core.opxml.modeldata;
-
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.oprofile.core.model.OpModelSample;
-import org.eclipse.linuxtools.oprofile.core.opxml.OprofileSAXHandler;
-import org.eclipse.linuxtools.oprofile.core.opxml.XMLProcessor;
-
-
-/**
- * XML handler class for <sample> tags (individual samples).
- */
-public class SamplesProcessor extends XMLProcessor {
-       //XML tags parsed by this processor
-       private static final String SAMPLE_TAG = "sample"; //$NON-NLS-1$
-       private static final String COUNT_TAG = "count"; //$NON-NLS-1$
-       private static final String LINE_TAG = "line";  //$NON-NLS-1$
-       private static final String SYMBOL_TAG = "symbol";  //$NON-NLS-1$
-       
-       //the current sample being constructed
-       private OpModelSample _sample;
-       //a list of all samples (for this symbol)
-       private ArrayList<OpModelSample> _sampleList;
-
-       public void reset(Object callData) {
-               _sample = new OpModelSample();
-               _sampleList = new ArrayList<OpModelSample>();
-       }
-
-       /**
-        * @see org.eclipse.linuxtools.oprofile.core.XMLProcessor#endElement(String)
-        */
-       public void endElement(String name, Object callData) {
-               if (name.equals(COUNT_TAG)) {
-                       _sample._setCount(Integer.parseInt(_characters));
-               } else if (name.equals(LINE_TAG)) {
-                       _sample._setLine(Integer.parseInt(_characters));
-               } else if (name.equals(SAMPLE_TAG)) {
-                       _sampleList.add(_sample);
-                       _sample = new OpModelSample();
-               } else if (name.equals(SYMBOL_TAG)) {
-                       OprofileSAXHandler.getInstance(callData).pop(SYMBOL_TAG);
-               }
-       }
-       
-       public OpModelSample[] getSamples() {
-               OpModelSample[] samples = new OpModelSample[_sampleList.size()];
-               _sampleList.toArray(samples);
-               return samples;
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/modeldata/SymbolsProcessor.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/modeldata/SymbolsProcessor.java
deleted file mode 100644 (file)
index c593315..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * 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:
- *    Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.core.opxml.modeldata;
-
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.oprofile.core.model.OpModelSymbol;
-import org.eclipse.linuxtools.oprofile.core.opxml.OprofileSAXHandler;
-import org.eclipse.linuxtools.oprofile.core.opxml.XMLProcessor;
-import org.xml.sax.Attributes;
-
-/**
- * A processor for the <symbols> tag from `opxml samples ..`
- */
-public class SymbolsProcessor extends XMLProcessor {
-       //XML tags parsed by this processor
-       private static final String SYMBOLS_TAG = "symbols"; //$NON-NLS-1$
-       private static final String SYMBOL_TAG = "symbol";  //$NON-NLS-1$
-       private static final String SAMPLE_TAG = "sample"; //$NON-NLS-1$
-
-       //attribute tags
-       private static final String ATTR_NAME = "name"; //$NON-NLS-1$
-       private static final String ATTR_FILE = "file"; //$NON-NLS-1$
-       private static final String ATTR_COUNT = "count";        //$NON-NLS-1$
-       
-       //the current symbol being constructed
-       private OpModelSymbol _symbol;
-       //all the symbols in this <symbols> tag, to be returned to the calling ModelDataProcessor
-       private ArrayList<OpModelSymbol> _symbols;
-       
-       //the processor used for individual samples
-       private SamplesProcessor _samplesProcessor = new SamplesProcessor();
-       
-       
-       public void reset(Object callData) {
-               _symbol = new OpModelSymbol();
-               _symbols = new ArrayList<OpModelSymbol>();
-       }
-
-       /**
-        * @see org.eclipse.linuxtools.oprofile.core.XMLProcessor#startElement(String, Attributes)
-        */
-       public void startElement(String name, Attributes attrs, Object callData) {
-               super.startElement(name, attrs, callData);
-               if (name.equals(SYMBOL_TAG)) {
-                       _symbol._setName(attrs.getValue(ATTR_NAME));
-                       _symbol._setCount(Integer.parseInt(attrs.getValue(ATTR_COUNT)));
-                       _symbol._setFile(attrs.getValue(ATTR_FILE));
-               } else if (name.equals(SAMPLE_TAG)) {
-                       OprofileSAXHandler.getInstance(callData).push(_samplesProcessor);
-               }
-       }
-       
-       /**
-        * @see org.eclipse.linuxtools.oprofile.core.XMLProcessor#endElement(String)
-        */
-       public void endElement(String name, Object callData) {
-               if (name.equals(SYMBOL_TAG)) {
-                       _symbol._setSamples(_samplesProcessor.getSamples());
-                       _symbols.add(_symbol);
-                       _symbol = new OpModelSymbol();
-               } else if (name.equals(SYMBOLS_TAG)) {
-                       OprofileSAXHandler.getInstance(callData).pop(SYMBOLS_TAG);
-               }
-       }
-       
-       //return all parsed samples
-       public OpModelSymbol[] getSymbols() {
-               OpModelSymbol [] symbols = new OpModelSymbol[_symbols.size()];
-               _symbols.toArray(symbols);
-               return symbols;
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/sessions/SessionsProcessor.java b/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/opxml/sessions/SessionsProcessor.java
deleted file mode 100644 (file)
index 7c3fcc8..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.core.opxml.sessions;
-
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.oprofile.core.model.OpModelEvent;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelSession;
-import org.eclipse.linuxtools.oprofile.core.opxml.XMLProcessor;
-import org.xml.sax.Attributes;
-
-
-/**
- * A processor for sessions.
- * @see org.eclipse.linuxtools.oprofile.core.opxml.OpxmlRunner
- */
-public class SessionsProcessor extends XMLProcessor {
-       public static class SessionInfo {
-               // A list of SessionEvents
-               public ArrayList<OpModelEvent> list;
-               
-               public SessionInfo(ArrayList<OpModelEvent> _list){
-                       list = _list;
-               }
-       };
-       
-       // XML tags recognized by this processor
-       public static final String SESSION_TAG = "session"; //$NON-NLS-1$
-       private static final String _SESSION_NAME_ATTR = "name"; //$NON-NLS-1$
-       public static final String SAMPLE_COUNT_TAG = "count"; //$NON-NLS-1$
-       public static final String EVENT_TAG = "event"; //$NON-NLS-1$
-       private static final String _EVENT_NAME_ATTR = "name"; //$NON-NLS-1$
-       
-       // The current session being constructed
-       private OpModelSession _currentSession;
-       
-       // The current event being constructed
-       private OpModelEvent _currentEvent;
-       
-       // A list of all sessions
-       private ArrayList<OpModelSession> _sessionList;
-       
-       /* (non-Javadoc)
-        * @see org.eclipse.linuxtools.oprofile.core.opxml.XMLProcessor#startElement(java.lang.String, org.xml.sax.Attributes, java.lang.Object)
-        */
-       public void startElement(String name, Attributes attrs, Object callData) {
-               if (name.equals(SESSION_TAG)) {
-                       String sessionName = attrs.getValue(_SESSION_NAME_ATTR);
-                       _currentSession = new OpModelSession(_currentEvent, sessionName);
-               } else if (name.equals(EVENT_TAG)) {
-                       String eventName = attrs.getValue(_EVENT_NAME_ATTR);
-                       _currentEvent = new OpModelEvent(eventName);
-                       _sessionList = new ArrayList<OpModelSession>();
-               } else {
-                       super.startElement(name, attrs, callData);
-               }
-       }
-       
-       /* (non-Javadoc)
-        * @see org.eclipse.linuxtools.oprofile.core.opxml.XMLProcessor#endElement(java.lang.String, java.lang.Object)
-        */
-       public void endElement(String name, Object callData) {
-               if (name.equals(SESSION_TAG)) {
-                       // Got end of session -- save in session list
-                       _sessionList.add(_currentSession);
-                       _currentSession = null;
-               } else if (name.equals(EVENT_TAG)) {
-                       // Got end of event -- save session list into current OpModelEvent and
-                       // save current event into call data
-                       OpModelSession[] s = new OpModelSession[_sessionList.size()];
-                       _sessionList.toArray(s);
-                       _currentEvent._setSessions(s);
-                       SessionInfo info = (SessionInfo) callData;
-                       info.list.add(_currentEvent);
-                       _currentEvent = null;
-                       _sessionList = null;
-               } else {
-                       super.endElement(name, callData);
-               }
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/CommandManager.java b/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/CommandManager.java
deleted file mode 100644 (file)
index 5565d84..0000000
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- *  Command Manager
- *
- * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Seokgil Kang <seokgil.kang@samsung.com>
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.core;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.nio.charset.Charset;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.tizen.common.connection.ConnectionPlugin;
-import org.tizen.sdblib.IDevice;
-import org.tizen.sdblib.exception.SdbCommandRejectedException;
-import org.tizen.sdblib.exception.ShellCommandUnresponsiveException;
-import org.tizen.sdblib.exception.TimeoutException;
-import org.tizen.sdblib.receiver.MultiLineReceiver;
-
-
-class CommonReceiver extends MultiLineReceiver {
-       
-       private List<String> output = null;
-
-       public String[] getOutput() {
-               if(output == null)
-                       return null;
-               else
-               {
-                       String[] returnarray = new String[output.size()];
-                       output.toArray(returnarray);
-                       return returnarray;
-               }
-       }
-
-       @Override
-       public void processNewLines(String[] lines) {
-               if(output == null)
-               {
-                       output = new ArrayList<String>();
-               }
-               for(int i = 0; i < lines.length; i++)
-               {
-                       output.add(lines[i]);
-               }
-       }
-}
-
-class OneStringReceiver extends MultiLineReceiver {
-
-       private String output = "";
-
-       public String getOutput() {
-               return output;
-       }
-
-       @Override
-       public void processNewLines(String[] lines) {
-               // output = lines;
-               StringBuilder out = new StringBuilder("");
-               for (int i = 0; i < lines.length; i++) {
-                       if (lines[i].equals(""))
-                               continue;
-                       out.append(lines[i]);
-                       out.append("\r\n");
-               }
-               output = output + out.toString();
-       }
-
-}
-
-public class CommandManager {
-       
-       static private final String CMD_RET = "cmd_ret";
-       
-       public static Process runApplication(String command){
-               IDevice device = ConnectionPlugin.getDefault().getCurrentDevice();
-               Process sdbShellProc = null;
-               
-               try {
-                       sdbShellProc = device.executeShellCommand(command, false);
-               } catch (IOException e) {
-                       e.printStackTrace();
-               }
-               return sdbShellProc;
-       }
-
-       public static void runShell(String command) {
-               IDevice device = ConnectionPlugin.getDefault().getCurrentDevice();
-               org.tizen.common.sdb.command.SdbCommand sdbCmd = new org.tizen.common.sdb.command.SdbCommand(device);
-               Process sdbShellProc = null;
-               BufferedReader br = null;
-               
-               try {
-                       sdbShellProc = sdbCmd.runHostCommand(command, false);
-                       br = new BufferedReader(new InputStreamReader(
-                                       sdbShellProc.getInputStream(), Charset.forName("UTF-8")));
-
-                       String message;
-                       if (null != br) {
-                               while (null != (message = br.readLine())) {
-                                       if (message.equals("start_ok")) {
-                                               break;
-                                       }
-                               }
-                       }
-               } catch (IOException e) {
-                       e.printStackTrace();
-               } finally {
-                       try {
-                               if (null != br) {
-                                       br.close();
-                               }
-                       } catch (Exception e1) {
-                               e1.printStackTrace();
-                       }
-               }
-       }
-
-       public static String runCommandReturningResult(String command) {
-               IDevice device = ConnectionPlugin.getDefault().getCurrentDevice();
-               OneStringReceiver oneStringReceiver = new OneStringReceiver();
-                               
-               try {
-                       device.executeShellCommand(command, oneStringReceiver);
-               } catch (TimeoutException e) {
-                       e.printStackTrace();
-               } catch (SdbCommandRejectedException e) {
-                       e.printStackTrace();
-               } catch (ShellCommandUnresponsiveException e) {
-                       e.printStackTrace();
-               } catch (IOException e) {
-                       e.printStackTrace();
-               }
-               return oneStringReceiver.getOutput();
-       }
-
-       public static String[] runCommandReturningResultArray(String command) {
-               IDevice device = ConnectionPlugin.getDefault().getCurrentDevice();
-               CommonReceiver commonReceiver = null;
-                       
-               try {
-                       /* Add by yangangx.han@intel.com 2013.03.04
-                        * But Title: Tizen Mobile TDIS-4316 Profile Configuration popup an error dialog without connected device
-                        */
-                       if (null == device) {
-                           return null;
-                       }
-                       commonReceiver = new CommonReceiver();
-                       device.executeShellCommand(command, commonReceiver);
-               } catch (TimeoutException e) {
-                       e.printStackTrace();
-               } catch (SdbCommandRejectedException e) {
-                       e.printStackTrace();
-               } catch (ShellCommandUnresponsiveException e) {
-                       e.printStackTrace();
-               } catch (IOException e) {
-                       e.printStackTrace();
-               }
-               return commonReceiver.getOutput();
-       }
-
-       public static String runHostCommandReturningResult(String command) {
-               IDevice device = ConnectionPlugin.getDefault().getCurrentDevice();
-               OneStringReceiver oneStringReceiver = new OneStringReceiver();
-                               
-               try {
-                       device.executeHostCommand(command, oneStringReceiver);
-               } catch (IOException e) {
-                       e.printStackTrace();
-               }
-               return oneStringReceiver.getOutput();
-       }
-
-       public static String[] runHostCommandReturningResultArray(String command) {
-               IDevice device = ConnectionPlugin.getDefault().getCurrentDevice();
-               CommonReceiver commonReceiver = null;
-                       
-               try {
-                       /* Add by yangangx.han@intel.com 2013.03.04
-                        * But Title: Tizen Mobile TDIS-4316 Profile Configuration popup an error dialog without connected device
-                        */
-                       if (null == device) {
-                           return null;
-                       }
-                       commonReceiver = new CommonReceiver();
-                       device.executeHostCommand(command, commonReceiver);
-               } catch (IOException e) {
-                       e.printStackTrace();
-               }
-               return commonReceiver.getOutput();
-       }
-       
-       public static void runCommand(String command) {
-               
-               try {
-                       ConnectionPlugin.getDefault().getCurrentDevice()
-                                       .executeShellCommand(command);
-               } catch (SdbCommandRejectedException e) {
-                       e.printStackTrace();
-               } catch (IOException e) {
-                       e.printStackTrace();
-               }
-       }
-
-       public static boolean isPathExist(String path) {
-               String[] result = runCommandReturningResultArray(path);
-               if (null != result && result[0].equals("No such file or directory")) {
-                       return false;
-               }
-               return true;
-       }
-
-       public static boolean isEmulator() {
-               return ConnectionPlugin.getDefault().getCurrentDevice().isEmulator();
-       }
-
-       public static boolean isRunSuccessfuly(String[] result) {
-               if (null != result)
-               {
-                       for(int i = 0; i < result.length; i++)
-                       {
-                               if(result[i].startsWith(CMD_RET) && result[i].contains("0"))
-                               {
-                                       return true;
-                               }
-                       }
-               }
-               
-               return false;
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/OprofileComm.java b/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/OprofileComm.java
deleted file mode 100644 (file)
index 3a40a61..0000000
+++ /dev/null
@@ -1,302 +0,0 @@
-/*
- *  OprofileComm
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-
-package org.tizen.oprofile.core;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.linuxtools.oprofile.core.OprofileCorePlugin;
-import org.eclipse.linuxtools.oprofile.core.daemon.OpInfo;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelEvent;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelRoot;
-import org.eclipse.swt.widgets.Display;
-
-import org.tizen.oprofile.core.provider.OpcontrolDataProvider;
-
-public abstract class OprofileComm {
-
-       public static Boolean checkEvent(String event, int count, int unitmask) {
-               int[] result = new int[1];
-               try {
-                       IRunnableWithProgress opxml = OpcontrolDataProvider.checkEvent(event, count, unitmask, result);
-                       //seokgil.kang modified at 20140326
-                       // intended to resolve issue.
-                       opxml.run(new IProgressMonitor() {
-                               @Override
-                               public void beginTask(String name, int totalWork) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void done() {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void internalWorked(double work) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public boolean isCanceled() {
-                                       // TODO Auto-generated method stub
-                                       return false;
-                               }
-                               @Override
-                               public void setCanceled(boolean value) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void setTaskName(String name) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void subTask(String name) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void worked(int work) {
-                                       // TODO Auto-generated method stub
-                               }
-                       });
-               } catch (InvocationTargetException e) {
-                       String error = "An error has occured during check event setting for OProfile";
-                       String reason = "An unexpected error occurred with parsing data. This might be caused by closed connection to target";
-                       showErrorDialog(error, reason , e); //$NON-NLS-1$
-               } catch (InterruptedException e) {
-                       String error = "An error has occured during check event setting for OProfile";
-                       String reason = "An unexpected error occurred with parsing data. This might be caused by closed connection to target";
-                       showErrorDialog(error, reason , e); //$NON-NLS-1$
-               }
-               
-               return (result[0] == 0);
-       }
-       
-       public static OpModelEvent[] getEventList() {
-               OpModelEvent[] events = null;
-               
-               ArrayList<OpModelEvent> eventList = new ArrayList<OpModelEvent>();
-               try {
-                       IRunnableWithProgress runner = OpcontrolDataProvider.getEventList(eventList);
-                       //seokgil.kang modified at 20140326
-                       // intended to resolve issue.
-                       runner.run(new IProgressMonitor() {
-                               @Override
-                               public void beginTask(String name, int totalWork) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void done() {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void internalWorked(double work) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public boolean isCanceled() {
-                                       // TODO Auto-generated method stub
-                                       return false;
-                               }
-                               @Override
-                               public void setCanceled(boolean value) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void setTaskName(String name) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void subTask(String name) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void worked(int work) {
-                                       // TODO Auto-generated method stub
-                               }
-                       });
-                       events = new OpModelEvent[eventList.size()];
-                       eventList.toArray(events);
-               } catch (InvocationTargetException e) {
-                       String error = "An error has occured during get detailed information of supported event for OProfile";
-                       String reason = "An unexpected error occurred with parsing data. This might be caused by closed connection to target";
-                       showErrorDialog(error ,reason, e); //$NON-NLS-1$
-               } catch (InterruptedException e) {
-                       String error = "An error has occured during get detailed information of supported event for OProfile";
-                       String reason = "An unexpected error occurred with parsing data. This might be caused by closed connection to target";
-                       showErrorDialog(error ,reason, e); //$NON-NLS-1$
-               }
-               return events;
-       }
-       
-       public static OpModelRoot getModelData() {              
-               OpModelRoot model = new OpModelRoot();
-               try {
-                       IRunnableWithProgress runner = OpcontrolDataProvider.getModelData(model);
-                       //seokgil.kang modified at 20140326
-                       // intended to resolve issue.
-                       runner.run(new IProgressMonitor() {
-                               @Override
-                               public void beginTask(String name, int totalWork) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void done() {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void internalWorked(double work) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public boolean isCanceled() {
-                                       // TODO Auto-generated method stub
-                                       return false;
-                               }
-                               @Override
-                               public void setCanceled(boolean value) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void setTaskName(String name) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void subTask(String name) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void worked(int work) {
-                                       // TODO Auto-generated method stub
-                               }
-                       });
-               } catch (InvocationTargetException e) {
-                       String error = "An error has occured during get reported data in current session";
-                       String reason = "An unexpected error occurred with parsing data. This might be caused by closed connection to target";
-                       showErrorDialog(error, reason, e); //$NON-NLS-1$
-                       return null;
-               } catch (InterruptedException e) {
-                       String error = "An error has occured during get reported data in current session";
-                       String reason = "An unexpected error occurred with parsing data. This might be caused by closed connection to target";
-                       showErrorDialog(error, reason, e); //$NON-NLS-1$
-                       return null;
-               }
-
-               return model;
-       }
-       
-       public static OpInfo getEventInfo() {           
-               OpInfo info = new OpInfo();
-
-               try {
-                       IRunnableWithProgress runner = OpcontrolDataProvider.getEventInfo(info);
-                       //seokgil.kang modified at 20140326
-                       // intended to resolve issue.
-                       runner.run(new IProgressMonitor() {
-                               @Override
-                               public void beginTask(String name, int totalWork) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void done() {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void internalWorked(double work) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public boolean isCanceled() {
-                                       // TODO Auto-generated method stub
-                                       return false;
-                               }
-                               @Override
-                               public void setCanceled(boolean value) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void setTaskName(String name) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void subTask(String name) {
-                                       // TODO Auto-generated method stub
-                               }
-                               @Override
-                               public void worked(int work) {
-                                       // TODO Auto-generated method stub
-                               }
-                       });
-
-               } catch (InvocationTargetException e) {
-                       String error = "An error has occured during get event list in current session";
-                       String reason = "An unexpected error occurred with parsing data. This might be caused by closed connection to target";
-                       showErrorDialog(error , reason, e); //$NON-NLS-1$
-               } catch (InterruptedException e) {
-                       String error = "An error has occured during get event list in current session";
-                       String reason = "An unexpected error occurred with parsing data. This might be caused by closed connection to target";
-                       showErrorDialog(error , reason, e); //$NON-NLS-1$
-               }       
-               return info;
-       }
-       
-       public static void showErrorDialog(final String errorMessage, final String reasonMessage, final Exception ex) {
-               
-               final String dialogTitle = "Oprofile Error";
-               final IStatus status = new Status(IStatus.ERROR, OprofileCorePlugin.getId(), IStatus.OK, reasonMessage, ex);
-               
-               Display.getDefault().syncExec(new Runnable() {
-                       public void run() {
-                               ErrorDialog.openError(null, dialogTitle, errorMessage, status);
-                       }
-               });
-
-       }
-       
-       
-       public static String getCommandString(String[] comm){
-               StringBuffer sb = new StringBuffer();
-               for(int i=0;i<comm.length;i++){
-                       sb.append(comm[i]);
-                       sb.append(" ");
-               }
-               return sb.toString();
-       }
-       
-//     // changed by greatim 2011.06.01 for fresh ide
-//     public static ISession getSession() throws InterruptedException{
-//             ISession session = null;
-//             try {
-//                     DeviceMachine selected = DeviceManager.getSelectedDevice();
-//                     if(selected.getMachineType().equals(IMachine.VIRTUAL_DEVICE))
-//                             session = SessionManager.getSession("OPROFILER_CONTROL_VIRTUAL", selected, new NullProgressMonitor());
-//                     else
-//                             session = SessionManager.getSession("OPROFILER_CONTROL_REAL", selected, new NullProgressMonitor());
-//             } catch (Exception e) {
-//
-//             }
-//             return session;
-//     }
-
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/OprofileCommonConstants.java b/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/OprofileCommonConstants.java
deleted file mode 100644 (file)
index 799661d..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *  OprofileCommonConstants
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.core;
-
-import org.tizen.common.TizenPlatformConstants;
-
-public abstract class OprofileCommonConstants {
-
-       private static final String COMMAND_PATH = TizenPlatformConstants.TOOLS_TARGET_PATH + "/oprofile/usr/bin/";
-
-       public static final String OPROFILE_SCRIPT = "oprofile";
-       
-       public static final String COMMAND_OPREPORT = "LD_LIBRARY_PATH=" + COMMAND_PATH + " " + COMMAND_PATH + "opreport";
-       
-       public static final String COMMAND_OPHELP = OPROFILE_SCRIPT+" ophelp";
-       
-       public static final String COMMAND_OPXML = COMMAND_PATH+"opxml";
-       
-       public static final String LOG_PATH = "/var/lib/oprofile/samples/";
-       
-       public static final String LOG_DAEMON = LOG_PATH+"oprofiled.log";
-       
-       public static final String DEV_CPU_TYPE = "/dev/oprofile/cpu_type";
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/checkevent/CheckEventsProcessor.java b/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/checkevent/CheckEventsProcessor.java
deleted file mode 100644 (file)
index 47a0251..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *  CheckEventsProcessor
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.core.processor.checkevent;
-
-import org.tizen.oprofile.core.CommandManager;
-import org.tizen.oprofile.core.OprofileCommonConstants;
-
-
-public class CheckEventsProcessor {
-
-       private final static String COMMAND_CHECK_EVENT = OprofileCommonConstants.COMMAND_OPHELP;
-
-       public void parse(String event, int count, int unitmask, int[] result)
-                       throws InterruptedException {
-               String[] resultStr = null;
-
-                       resultStr = CommandManager
-                                       .runHostCommandReturningResultArray(COMMAND_CHECK_EVENT + " "
-                                                       + event + ":" + count + ":" + unitmask);
-
-               if (resultStr != null && resultStr.length > 0
-                               && resultStr[0].trim().length() > 0) {
-                       try {
-                               result[0] = Integer.parseInt(resultStr[0].trim());
-                       } catch (NumberFormatException e) {
-                               result[0] = -1;
-                       }
-               }
-
-       }
-
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/checkkernel/CheckKernelProcessor.java b/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/checkkernel/CheckKernelProcessor.java
deleted file mode 100644 (file)
index 7006d4f..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *  CheckKernel Processor
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.core.processor.checkkernel;
-
-
-import org.tizen.oprofile.core.CommandManager;
-import org.tizen.oprofile.core.OprofileCommonConstants;
-
-public class CheckKernelProcessor {
-
-       private final static String COMMAND_CHECK_KERNEL = "cat "
-                       + OprofileCommonConstants.DEV_CPU_TYPE + " 2> /dev/null; echo";
-
-       public void parse(String[] result) throws InterruptedException {
-               String[] resultStr = null;
-
-               resultStr = CommandManager
-                                       .runCommandReturningResultArray(COMMAND_CHECK_KERNEL);
-
-               if (resultStr != null && resultStr.length > 0
-                               && resultStr[0].trim().length() > 0) {
-                       result[0] = resultStr[0].trim();
-               }
-
-       }
-
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/eventinfo/EventListProcessor.java b/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/eventinfo/EventListProcessor.java
deleted file mode 100644 (file)
index 5b079cb..0000000
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- *  EventListProcessor
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.core.processor.eventinfo;
-
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.oprofile.core.daemon.OpEvent;
-import org.eclipse.linuxtools.oprofile.core.daemon.OpInfo;
-import org.eclipse.linuxtools.oprofile.core.daemon.OpUnitMask;
-import org.eclipse.linuxtools.oprofile.core.daemon.OpUnitMask.MaskInfo;
-
-import org.tizen.oprofile.core.CommandManager;
-import org.tizen.oprofile.core.OprofileCommonConstants;
-
-public class EventListProcessor {
-       private OpInfo info;
-       private ArrayList<OpEvent>[] eventList;
-
-       public EventListProcessor(OpInfo info) throws InterruptedException {
-               this.info = info;
-               initializeEventList();
-       }
-
-       private void initializeEventList() {
-               eventList = new ArrayList[info.getNrCounters()];
-               for (int i = 0; i < eventList.length; i++) {
-                       eventList[i] = new ArrayList<OpEvent>();
-               }
-       }
-
-       private static final String COMMAND_EVENT_LIST = OprofileCommonConstants.OPROFILE_SCRIPT + " list";
-       
-       //Add by yangang.han(yangangx.han@intel.com) 2013.03.06 to fix the bug TDIS-4049.
-       //In IA device the event pattern like "CPU_CLK_UNHALTED: (counter: all)" and in ARM device it like "ISS_NO_DISP1: (counter: 1, 2, 3, 4, 5, 6)"
-       //So change this RegExp to match this two type.
-       //private static final String EVENT_PATTERN = "^[A-Z1-9]+.*\\(counter: \\d+.*\\)$";
-       private static final String EVENT_PATTERN = "^[A-Z1-9]+.*\\(counter: (\\d|all)+.*\\)$";
-       //private static final String EVENT_DETAIL_PATTERN = "^\\s+.*\\(min count: \\d+\\).*";
-       private static final String EVENT_DETAIL_PATTERN = ".*\\(min count: \\d+\\).*";
-       private static final String UNIT_MASK_PATTERN = "Unit masks \\(default: 0x..\\)$";
-       private static final String MASK_INFO_PATTERN = "0x..: .*";
-
-       public void parse() throws InterruptedException {
-               String resultStr = null;
-               resultStr = CommandManager.runHostCommandReturningResult(COMMAND_EVENT_LIST);                   
-               
-               if (resultStr == null || resultStr.trim().length() == 0)
-                       return;
-
-               String eventStr[] = resultStr.split("\r?\n");
-               OpEvent event = null;
-               OpUnitMask unitMask = null;
-               ArrayList<MaskInfo> maskList = null;
-
-               boolean isDummy = true;
-               boolean isContinued = false;
-               String str = null;
-               String prevStr = null;
-
-               for (int i = 0; i < eventStr.length; i++) {
-
-                       if (isContinued && !isDummy) {
-                               str = prevStr + " " + eventStr[i].replaceFirst("^\\s*", "");
-                       } else {
-                               str = eventStr[i];
-                       }
-
-                       isContinued = false;
-
-                       if (str.matches(EVENT_PATTERN)) {
-                               setOpUnitMaskList(unitMask, maskList);
-
-                               event = new OpEvent();
-                               unitMask = new OpUnitMask();
-                               setOpEventUnitMask(event, unitMask);
-                               setOpEventName(event, str);
-                               setOpEventCounter(event, str);
-
-                               isDummy = false;
-                       } else if (str.matches(EVENT_DETAIL_PATTERN)) {
-                               if (null == event) {
-                                   event = new OpEvent();//add by yangang.han
-                               }
-                               setOpEventDescription(event, str);
-                               setOpEventMinCount(event, str);
-                       } else if (str.matches(UNIT_MASK_PATTERN)) {
-                               if (null == unitMask) {
-                                   unitMask = new OpUnitMask();//add by yangang.han
-                               }
-                               setOpUnitMaskDefault(unitMask, str);
-                               maskList = new ArrayList<MaskInfo>();
-                       } else if (str.matches(MASK_INFO_PATTERN)) {
-                               if (null == maskList) {
-                                   maskList = new ArrayList<MaskInfo>();//add by yangang.han
-                               }
-                               addMaskInfo(maskList, str);
-                       } else {
-                               isContinued = true;
-                               prevStr = eventStr[i];
-                       }
-
-               }
-
-               setOpInfoEventList();
-       }
-
-       private void setOpUnitMaskList(OpUnitMask unitMask,
-                       ArrayList<MaskInfo> maskList) {
-               if (unitMask == null || (unitMask != null && maskList == null))
-                       return;
-
-               unitMask._setMaskDescriptions(maskList.toArray(new MaskInfo[maskList
-                               .size()]));
-
-               boolean hasSameValue = false;
-               for (int i = 0; i < maskList.size(); i++) {
-                       MaskInfo info = maskList.get(i);
-                       if (info.value == unitMask.getMaskValue()) {
-                               hasSameValue = true;
-                               break;
-                       }
-               }
-
-               unitMask._setType(hasSameValue ? OpUnitMask.EXCLUSIVE
-                               : OpUnitMask.BITMASK);
-       }
-
-       private void addMaskInfo(ArrayList<MaskInfo> maskList, String str) {
-               int idx = str.indexOf(":");
-
-               String desc = str.substring(idx + 1, str.length()).trim();
-               int val = Integer.parseInt(str.substring(2, idx).trim(), 16);
-
-               MaskInfo maskInfo = new MaskInfo();
-               maskInfo.description = desc;
-               maskInfo.value = val;
-
-               maskList.add(maskInfo);
-       }
-
-       private void setOpInfoEventList() {
-               for (int i = 0; i < eventList.length; i++) {
-                       info._setEvents(i,
-                                       eventList[i].toArray(new OpEvent[eventList[i].size()]));
-               }
-       }
-
-       private void setOpEventUnitMask(OpEvent event, OpUnitMask unitMask) {
-               event._setUnitMask(unitMask);
-               unitMask._setType(OpUnitMask.MANDATORY);
-       }
-
-       private void setOpUnitMaskDefault(OpUnitMask unitMask, String str) {
-               String defaultUnitMask = str.substring(str.lastIndexOf("0x") + 2,
-                               str.lastIndexOf(")"));
-               unitMask._setDefault(Integer.parseInt(defaultUnitMask, 16));
-       }
-
-       private void setOpEventMinCount(OpEvent event, String str) {
-               String minCount = str.substring(str.lastIndexOf(":") + 1,
-                               str.lastIndexOf(")"));
-               event._setMinCount(Integer.parseInt(minCount.trim()));
-       }
-
-       private void setOpEventDescription(OpEvent event, String str) {
-               String eventDescription = str.substring(0, str.lastIndexOf("("));
-               event._setTextDescription(eventDescription.trim());
-       }
-
-       private void setOpEventCounter(OpEvent event, String str) {
-               String counters = str.substring(str.lastIndexOf(":") + 1,
-                               str.lastIndexOf(")"));
-               if (counters == null)
-                       return;
-
-               if (counters.trim().equals("all")) {
-                       for (int i = 0; i < eventList.length; i++) {
-                               eventList[i].add(event);
-                       }
-               } else {
-                       String[] counter = counters.trim().split(",");
-                       for (int i = 0; i < counter.length; i++) {
-                               int counterval = Integer.parseInt(counter[i].trim());
-                               if(counterval >= eventList.length) {
-                                       continue;
-                               } else {
-                                       eventList[counterval].add(event);
-                               }
-                       }
-               }
-       }
-
-       private void setOpEventName(OpEvent event, String str) {
-               String eventName = str.substring(0, str.indexOf(":"));
-               event._setText(eventName.trim());
-       }
-
-       public static void main(String[] args) {
-               String str = "             500) ";
-               String convStr = str.replaceFirst("^\\s*", "");
-
-               System.out.println("[" + str + "]");
-               System.out.println("[" + convStr + "]");
-
-       }
-
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/eventinfo/OpInfoProcessor.java b/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/eventinfo/OpInfoProcessor.java
deleted file mode 100644 (file)
index a6c1622..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- *  OpInfoProcessor
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.core.processor.eventinfo;
-
-import org.eclipse.linuxtools.oprofile.core.daemon.OpInfo;
-
-import org.tizen.oprofile.core.CommandManager;
-
-import org.eclipse.linuxtools.oprofile.core.OprofileCorePlugin;
-import org.eclipse.linuxtools.oprofile.core.OpcontrolException;
-import org.tizen.oprofile.core.OprofileCommonConstants;
-
-public class OpInfoProcessor {
-       private OpInfo info;
-
-       public OpInfoProcessor(OpInfo info) throws InterruptedException {
-               this.info = info;
-       }
-
-       private final static String COMMAND_COUNTER_NO = "ls -d /dev/oprofile/[0-9] -c1 2> /dev/null";
-
-       /* Start yangang.han
-        * Add by yangangx.han@intel.com in 2013.02.28
-        * Bug title: Tizen Mobile TDIS-3969 "Profile with Oprofile" to IA device cannot show results".
-        * Solution:Set nmi_watchdog 0 to switch off timer_moder. In this case, IA device can run Oprofile.
-        */
-
-       private final String COMMAND_WATCHDOG = OprofileCommonConstants.OPROFILE_SCRIPT + " watchdogoff";
-       public void parse() throws InterruptedException {
-               String[] resultStr = null;
-
-               resultStr = CommandManager.runCommandReturningResultArray(COMMAND_COUNTER_NO);
-
-               try {
-                       if (null == resultStr || resultStr.length <= 1) {
-                               OprofileCorePlugin.getDefault().getOpcontrolProvider().initModule();
-                               OprofileCorePlugin.getDefault().getOpcontrolProvider().deinitModule();
-                           CommandManager.runShell(COMMAND_WATCHDOG);
-                               OprofileCorePlugin.getDefault().getOpcontrolProvider().initModule();
-                           resultStr = CommandManager.runCommandReturningResultArray(COMMAND_COUNTER_NO);
-                               OprofileCorePlugin.getDefault().getOpcontrolProvider().deinitModule();
-                       }
-               } catch (OpcontrolException oe) {
-                       OprofileCorePlugin.showErrorDialog("opcontrolProvider", oe);
-               }
-
-               /*End Yangang.han*/
-
-               if (resultStr != null && resultStr.length >1) {
-                       // System.out.println("######## opcontrol -l : "+resultStr);
-                       //int cnt = resultStr.split("\r?\n").length;
-                       int cnt = resultStr.length;
-                       info._setNrCounters(cnt);
-                       info._setTimerMode(false);
-               } else {
-                       // System.out.println("######## opcontrol -l : no data");
-                       info._setNrCounters(0);
-                       info._setTimerMode(true);
-               }
-
-               // FIXME:jinu removed at 20090620
-               // this logic isn't exactly matched with real result
-               /*
-                * command = "grep  \"cpu MHz\" /proc/cpuinfo";
-                * 
-                * try { resultStr = session.run(command); } catch (Exception e) { throw
-                * new InterruptedException(); }
-                * 
-                * if(resultStr!=null&&resultStr.trim().length()>0){ String speed =
-                * resultStr.split(lineSeparator)[0].split(":")[1].trim();
-                * info._setCPUSpeed(Double.parseDouble(speed)); }else{
-                * info._setCPUSpeed(0); }
-                */
-
-       }
-
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/ModelDataProcessor.java b/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/ModelDataProcessor.java
deleted file mode 100644 (file)
index 8bdf771..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- *  ModelDataProcessor
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.core.processor.modeldata;
-
-import java.io.IOException;
-import java.io.StringReader;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-
-import org.eclipse.linuxtools.oprofile.core.model.OpModelRoot;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-import org.tizen.oprofile.core.CommandManager;
-import org.tizen.oprofile.core.OprofileCommonConstants;
-import org.tizen.oprofile.core.processor.modeldata.handler.OprofileSAXHandler;
-import org.tizen.sdblib.util.Preferences;
-
-
-public class ModelDataProcessor{
-       private OpModelRoot root;
-       
-       public ModelDataProcessor(OpModelRoot root) throws InterruptedException{
-               this.root = root;
-       }
-       
-//     private final String DEFAULT_SESSION_NAME = "current";
-       private final String COMMAND_SESSION_EVENT =OprofileCommonConstants.COMMAND_OPREPORT+" -gdlfX 2> /dev/null" +" | sed 's/^\\s</</' | sed 's/&//g'";
-//     private final String COMMAND_SESSION_EVENT =OprofilerCommonConstants.COMMAND_OPREPORT+" -gdlfX 2> /dev/null" +" | sed 's/^[^<]*//' | sed 's/&//'";
-       
-       public void parse() throws InterruptedException, SAXException, IOException, ParserConfigurationException{
-               SAXParserFactory factory = SAXParserFactory.newInstance();
-               SAXParser saxParser = factory.newSAXParser();
-               
-               OprofileSAXHandler handler = new OprofileSAXHandler(root);
-               
-               String resultStr= null;
-               
-               //resultStr = session.run(COMMAND_SESSION_EVENT, null);
-               int orgtimeout = Preferences.getTimeOut();
-               Preferences.setTimeOut(60000);
-               resultStr = CommandManager.runCommandReturningResult(COMMAND_SESSION_EVENT);
-               Preferences.setTimeOut(orgtimeout);
-                       
-               
-               if(resultStr==null||resultStr.trim().length() ==0){
-//                     root.reset();
-                       return;
-               }else{
-                       root.setXML(resultStr);
-               }
-               
-               try {
-                       saxParser.parse(new InputSource(new StringReader(resultStr)),handler);
-               } catch (SAXException e) {
-                       e.printStackTrace();
-               } catch (IOException e) {
-                       e.printStackTrace();
-               }
-               
-       }
-
-       
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/handler/OprofileSAXHandler.java b/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/handler/OprofileSAXHandler.java
deleted file mode 100644 (file)
index f298f0b..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- *  OprofileSAXHandler
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.core.processor.modeldata.handler;
-
-import java.util.HashMap;
-
-import org.eclipse.linuxtools.oprofile.core.model.OpModelImage;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelRoot;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelSymbol;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-import org.tizen.oprofile.core.processor.modeldata.parser.BinaryParser;
-import org.tizen.oprofile.core.processor.modeldata.parser.ClassesParser;
-import org.tizen.oprofile.core.processor.modeldata.parser.DetailTableParser;
-import org.tizen.oprofile.core.processor.modeldata.parser.SetupParser;
-import org.tizen.oprofile.core.processor.modeldata.parser.SymbolTableParser;
-
-public class OprofileSAXHandler extends DefaultHandler {
-
-
-       private String _valueStr;
-       private XMLParser _subParser = null;
-       
-       // setup - eventsetup | timersetup
-       private String SETUP_TAG = "setup";
-       // classes - class
-       private String CLASSES_TAG = "classes";
-       // binary - count | symbol | module
-       //                           module - count | symbol
-       //                                            symbol - count
-       private String BINARY_TAG = "binary";
-       private String BINARY_NAME_ATTR = "name";
-       // symboltable - symboldata
-       private String SYMBOLTABLE_TAG = "symboltable";
-       // detailtable - symboldetails - detaildata - count
-       private String DETAILTABLE_TAG = "detailtable";
-       
-       private OpModelRoot _model;
-       private HashMap<String, OpModelImage> _imageMap;
-       private HashMap<String, OpModelSymbol> _symbolMap;
-       
-       public OprofileSAXHandler(OpModelRoot model){
-               this._model = model;
-       }
-       
-       public void startDocument() {
-               _subParser = null;
-               _imageMap  = new HashMap<String, OpModelImage>();
-               _symbolMap = new HashMap<String, OpModelSymbol>();
-       }
-       
-       public void startElement(String uri, String localName, String name,
-                       Attributes attrs) throws SAXException {
-               
-//             System.out.print("<"+name);
-//             for(int i=0;i<attrs.getLength();i++){
-//                     System.out.print(" "+attrs.getQName(i)+"=\""+attrs.getValue(i)+"\"");
-//             }
-//             System.out.print(" >");
-               
-               if(_subParser!=null)
-                       _subParser.startElement(name, attrs, null);
-               
-               if (name.equals(SETUP_TAG)) {
-                       _subParser = new SetupParser(_imageMap);
-               }else if(name.equals(CLASSES_TAG)) {
-                       _subParser = new ClassesParser(_imageMap);
-               }else if (name.equals(BINARY_TAG)) {
-                       String binaryName = attrs.getValue(BINARY_NAME_ATTR);
-                       _subParser = new BinaryParser(binaryName,_imageMap, _symbolMap);
-               }else if (name.equals(SYMBOLTABLE_TAG)) {
-                       _subParser = new SymbolTableParser(_imageMap,_symbolMap);
-               }else if (name.equals(DETAILTABLE_TAG)) {
-                       _subParser = new DetailTableParser(_symbolMap);
-               }
-               
-       }
-       
-       public void characters(char[] buf, int start, int length)
-                       throws SAXException {
-               _valueStr = new String(buf, start, length);
-               
-//             System.out.print(_valueStr);
-               
-               if(_subParser!=null)
-                       _subParser.characters(_valueStr.trim(), null);
-       }
-
-       public void endElement(String uri, String localName, String name)
-                       throws SAXException {
-               
-//             System.out.println("</"+name+">");
-               
-               if (name.equals(SETUP_TAG)) {
-                       _subParser.release(_model);
-                       _subParser = null;
-               }else if(name.equals(CLASSES_TAG)) {
-                       _subParser = null;
-               }else if (name.equals(BINARY_TAG)) {
-                       _subParser.release(new Object());
-                       _subParser = null;
-               }else if (name.equals(SYMBOLTABLE_TAG)) {
-                       _subParser = null;
-               }else if (name.equals(DETAILTABLE_TAG)) {
-                       _subParser = null;
-               }
-               
-               if(_subParser!=null)
-                       _subParser.endElement(name, null);
-       }
-
-       
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/handler/XMLParser.java b/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/handler/XMLParser.java
deleted file mode 100644 (file)
index a1c09d7..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- *  XMLParser
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.core.processor.modeldata.handler;
-
-import org.xml.sax.Attributes;
-
-/**
- * A class which (minimally) parses XML documents. This class provides only basic
- * support for collecting information from XML documents. It is intended to be subclassed,
- * providing only common functionality for all parser classes.
- * @see org.eclipse.linuxtools.oprofile.core.opxml.OpxmlRunner
- */
-public class XMLParser {
-       // The characters in the current tag
-       protected String _characters;
-       
-       /**
-        * This method is called whenever the SAXHandler is about to invoke the
-        * processor for the first time on a given document.
-        * @param callData call data for the processor (usually the result is stored here)
-        */
-       public void reset(Object callData) {
-       };
-       
-       //jinu added at 20090620
-       public void release(Object callData) {
-       };
-       
-       /**
-        * This method is called whenever a new tag is seen in the document. By default,
-        * this process will clear the characters collected for the tag. Processors will typically
-        * call this baseclass method to setup for collecting new character information for a
-        * tag.
-        * @param name the name of the tag
-        * @param attrs the tag's attributes
-        * @param callData call data for the processor (usually the result is stored here)
-        */
-       public void startElement(String name, Attributes attrs, Object callData) {
-               _characters = new String("");
-       }
-       
-       /**
-        * This method is called whenever the closing tag for an element is seen in the
-        * document.
-        * @param name the element which is ending
-        * @param callData call data for the processor (usually the result is stored here)
-        */
-       public void endElement(String name, Object callData) {
-       }
-       
-       /**
-        * This method is called whenever characters are seen in the document that are not in
-        *  a markup tag.
-        * @param chars the characters read
-        * @param callData call data for the processor (usually the result is stored here)
-        */
-       public void characters(String chars, Object callData) {
-               _characters = chars;
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/BinaryParser.java b/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/BinaryParser.java
deleted file mode 100644 (file)
index 66cd444..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- *  Binary Parser
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.core.processor.modeldata.parser;
-
-import java.util.HashMap;
-
-import org.eclipse.linuxtools.oprofile.core.model.OpModelImage;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelSymbol;
-import org.xml.sax.Attributes;
-
-import org.tizen.oprofile.core.processor.modeldata.handler.XMLParser;
-import org.tizen.oprofile.core.processor.modeldata.util.ParserUtil;
-
-public class BinaryParser extends XMLParser {
-//     private static BinaryParser parser;
-       
-       private XMLParser _subParser;
-       private Attributes _attrs;
-       private String _valueStr;
-       private int _level;
-       
-       private static final String COUNT_TAG = "count";
-       private static final String SYMBOL_TAG = "symbol"; 
-       private static final String SYMBOL_IDREF_ATTR = "idref"; 
-       private static final String MODULE_TAG = "module";
-       private static final String MODULE_NAME_ATTR = "name"; 
-       
-       private String _binaryName;
-       private HashMap<String, OpModelImage> _imageMap;
-       private HashMap<String, OpModelSymbol> _symbolMap;
-
-       public BinaryParser(String binaryName, 
-                       HashMap<String, OpModelImage> imageMap, 
-                       HashMap<String, OpModelSymbol> symbolMap){
-
-               this._level = 0;
-               this._binaryName = binaryName;
-               this._imageMap = imageMap;
-               this._symbolMap = symbolMap;
-       }
-       
-       
-       
-       public void startElement(String name, Attributes attrs, Object callData) {
-               _attrs = attrs;
-               
-               if(_subParser!=null)
-                       _subParser.startElement(name, attrs, callData);
-               
-               if (_level<=1 && name.equals(COUNT_TAG)) {
-                       _level = 1;
-               }else if (_level<=2 && name.equals(SYMBOL_TAG)) {
-                       _level = 2;
-                       String symbolIdRef =  attrs.getValue(SYMBOL_IDREF_ATTR);
-                       _subParser = new SymbolParser(symbolIdRef, _imageMap, _symbolMap);
-               }else if (_level<=3 && name.equals(MODULE_TAG)) {
-                       _level = 3;
-                       String moduleName =  attrs.getValue(MODULE_NAME_ATTR);
-                       _subParser = new ModuleParser(moduleName, _imageMap, _symbolMap);
-               }
-       }
-
-       public void characters(String str, Object callData) {
-               set_valueStr(str);
-               if(_subParser!=null)
-                       _subParser.characters(str, callData);
-       }
-
-       public void endElement(String name, Object callData) {
-               
-               if (_level<=1 && name.equals(COUNT_TAG)) {
-                       OpModelImage image = ParserUtil.getImage(_imageMap, ParserUtil.getImageKey(_attrs));
-                       image._setName(_binaryName);
-               }else if (_level<=2 && name.equals(SYMBOL_TAG)) {
-                       _subParser = null;
-               }else if (_level<=3 && name.equals(MODULE_TAG)) {
-                       _subParser = null;
-               }
-               
-               if(_subParser!=null)
-                       _subParser.endElement(name, callData);
-               
-       
-       }
-       
-       public void release(Object callData) {
-               OpModelImage[] images = _imageMap.values().toArray(new OpModelImage[_imageMap.size()]);
-               
-               for(int i=0;i<images.length;i++){
-                       setTotalCount(images[i]);
-               }
-               
-       }
-
-       private void setTotalCount(OpModelImage image) {
-               int symbolTotalCount = 0;
-               int dependentTotalCount = 0;
-               
-               OpModelSymbol[] symbols = image.getSymbols();
-               for(int i=0;i<symbols.length;i++){
-                       symbolTotalCount+=symbols[i].getCount();
-               }
-               
-               OpModelImage[] dependents = image.getDependents();
-               for(int i=0;i<dependents.length;i++){
-                       dependentTotalCount+=dependents[i].getCount();
-               }
-               
-               image._setDepCount(dependentTotalCount);
-               image._setCount(dependentTotalCount+symbolTotalCount);
-       }
-
-
-
-       public void set_valueStr(String _valueStr) {
-               this._valueStr = _valueStr;
-       }
-
-
-
-       public String get_valueStr() {
-               return _valueStr;
-       }
-
-       
-       
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/ClassesParser.java b/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/ClassesParser.java
deleted file mode 100644 (file)
index b29fb10..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- *  Classes Parser
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.core.processor.modeldata.parser;
-
-import java.util.HashMap;
-
-import org.eclipse.linuxtools.oprofile.core.model.OpModelImage;
-import org.xml.sax.Attributes;
-
-import org.tizen.oprofile.core.processor.modeldata.handler.XMLParser;
-
-
-public class ClassesParser extends XMLParser {
-//     private static ClassesParser parser;
-       
-       private Attributes _attrs;
-       
-       private static final String CLASS_TAG = "class";
-       private static final String CLASS_NAME_ATTR = "name";
-       private static final String CLASS_EVENT_ATTR = "event";
-
-       private HashMap<String, OpModelImage> _imageMap;
-
-       public ClassesParser(HashMap<String, OpModelImage> imageMap) {
-
-               this._imageMap = imageMap;
-       }
-
-       public void startElement(String name, Attributes attrs, Object callData) {
-               _attrs = attrs;
-       }
-
-       public void endElement(String name, Object callData) {
-               if (name.equals(CLASS_TAG)) {
-                       changeImageId(_attrs.getValue(CLASS_EVENT_ATTR), _attrs.getValue(CLASS_NAME_ATTR));
-               }
-       }
-
-       private void changeImageId(String eventId, String imageId) {
-               OpModelImage image = _imageMap.get(eventId);
-               if(image!=null){
-                       _imageMap.remove(eventId);
-                       _imageMap.put(imageId, image);
-               }
-       }
-
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/DetailDataParser.java b/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/DetailDataParser.java
deleted file mode 100644 (file)
index 1adb7c0..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- *  Detail Data Parser
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.core.processor.modeldata.parser;
-
-import java.util.HashMap;
-
-import org.eclipse.linuxtools.oprofile.core.model.OpModelSample;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelSymbol;
-import org.xml.sax.Attributes;
-
-import org.tizen.oprofile.core.processor.modeldata.handler.XMLParser;
-import org.tizen.oprofile.core.processor.modeldata.util.ParserUtil;
-
-
-public class DetailDataParser extends XMLParser {
-//     private static DetailDataParser parser;
-       
-       private Attributes _attrs;
-       private String _valueStr;
-       
-       private static final String COUNT_TAG = "count";
-
-       private String _symbolId;
-       private int _sampleLine;
-       private HashMap<String, OpModelSymbol> _symbolMap;
-
-       public DetailDataParser(String symbolId, int sampleLine, 
-                       HashMap<String, OpModelSymbol> symbolMap){
-
-               this._symbolId = symbolId;
-               this._sampleLine = sampleLine;
-               this._symbolMap = symbolMap;
-       }
-
-       public void startElement(String name, Attributes attrs, Object callData) {
-               _attrs = attrs;
-       }
-       
-       public void characters(String str, Object callData) {
-               _valueStr = str;
-       }
-
-       public void endElement(String name, Object callData) {
-               if (name.equals(COUNT_TAG)) {
-                       
-                       int count = Integer.parseInt(_valueStr);
-                       
-                       String imageId = ParserUtil.getImageKey(_attrs);
-                       OpModelSymbol symbol = _symbolMap.get(ParserUtil.getSymbolKey(imageId,_symbolId));
-                       
-                       OpModelSample sample = getSample(symbol, _sampleLine);
-                       if(sample==null){
-                               sample = new OpModelSample();
-                               sample._setCount(count);
-                               sample._setLine(_sampleLine);
-                               
-                               symbol._addSample(sample);
-                       }else{
-                               sample._setCount(sample.getCount()+count);
-                       }
-                               
-               }
-       }
-
-       private OpModelSample getSample(OpModelSymbol symbol, int sampleLine) {
-               OpModelSample[] samples = symbol.getSamples();
-               
-               for(int i=0;i<samples.length;i++){
-                       int line = samples[i].getLine();
-                       if(sampleLine==line)
-                               return samples[i];
-               }
-               
-               return null;
-               
-       }
-
-       
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/DetailTableParser.java b/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/DetailTableParser.java
deleted file mode 100644 (file)
index add682d..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- *  Detail Table Parser
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.core.processor.modeldata.parser;
-
-import java.util.HashMap;
-
-import org.eclipse.linuxtools.oprofile.core.model.OpModelSymbol;
-import org.xml.sax.Attributes;
-
-import org.tizen.oprofile.core.processor.modeldata.handler.XMLParser;
-
-
-
-public class DetailTableParser extends XMLParser {
-//     private static DetailTableParser parser;
-       
-       private XMLParser _subParser;
-       private Attributes _attrs;
-       private String _valueStr;
-       
-       private static final String SYMBOL_DETAILS_TAG = "symboldetails";
-       private static final String SYMBOL_DETAILS_ID_ATTR = "id";
-       
-       private HashMap<String, OpModelSymbol> _symbolMap;
-
-       public DetailTableParser(HashMap<String, OpModelSymbol> symbolMap){
-
-               this._symbolMap = symbolMap;
-       }
-       
-       public void startElement(String name, Attributes attrs, Object callData) {
-               set_attrs(attrs);
-               
-               if(_subParser!=null)
-                       _subParser.startElement(name, attrs, callData);
-               
-               if (name.equals(SYMBOL_DETAILS_TAG)) {
-                       String symbolId =  attrs.getValue(SYMBOL_DETAILS_ID_ATTR);
-                       _subParser = new SymbolDetailsParser(symbolId, _symbolMap);
-               }
-       }
-
-       public void characters(String str, Object callData) {
-               set_valueStr(str);
-               if(_subParser!=null)
-                       _subParser.characters(str, callData);
-       }
-       
-       public void endElement(String name, Object callData) {
-
-               if (name.equals(SYMBOL_DETAILS_TAG)) {
-                       _subParser = null;
-               }
-               
-               if(_subParser!=null)
-                       _subParser.endElement(name, callData);
-       }
-
-       public void set_attrs(Attributes _attrs) {
-               this._attrs = _attrs;
-       }
-
-       public Attributes get_attrs() {
-               return _attrs;
-       }
-
-       public void set_valueStr(String _valueStr) {
-               this._valueStr = _valueStr;
-       }
-
-       public String get_valueStr() {
-               return _valueStr;
-       }
-       
-
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/ModuleParser.java b/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/ModuleParser.java
deleted file mode 100644 (file)
index cadba05..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Module Parser 
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.core.processor.modeldata.parser;
-
-import java.util.HashMap;
-
-import org.eclipse.linuxtools.oprofile.core.model.OpModelImage;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelSymbol;
-import org.xml.sax.Attributes;
-
-import org.tizen.oprofile.core.processor.modeldata.handler.XMLParser;
-import org.tizen.oprofile.core.processor.modeldata.util.ParserUtil;
-
-
-
-public class ModuleParser extends XMLParser {
-//     private static ModuleParser parser;
-       
-       private XMLParser _subParser;
-       private Attributes _attrs;
-       private String _valueStr;
-       private int _level;
-       
-       private static final String COUNT_TAG = "count";
-       private static final String SYMBOL_TAG = "symbol"; 
-       private static final String SYMBOL_IDREF_ATTR = "idref"; 
-       
-       private String _moduleName;
-       private HashMap<String, OpModelImage> _imageMap;
-       private HashMap<String, OpModelSymbol> _symbolMap;
-       private HashMap<String, OpModelImage> _dependentMap = new HashMap<String, OpModelImage>();
-
-       public ModuleParser(String moduleName,
-                       HashMap<String, OpModelImage> imageMap, 
-                       HashMap<String, OpModelSymbol> symbolMap){
-
-               this._level = 0;
-               this._moduleName = moduleName;
-               this._imageMap = imageMap;
-               this._symbolMap = symbolMap;
-       }
-       
-       public void startElement(String name, Attributes attrs, Object callData) {
-               _attrs = attrs;
-               
-               if(_subParser!=null)
-                       _subParser.startElement(name, attrs, callData);
-               
-               if (_level<=1 && name.equals(COUNT_TAG)) {
-                       _level = 1;
-               }else if (_level<=2 && name.equals(SYMBOL_TAG)) {
-                       _level = 2;
-                       String symbolIdRef =  attrs.getValue(SYMBOL_IDREF_ATTR);
-                       _subParser = new ModuleSymbolParser(symbolIdRef, _dependentMap, _symbolMap);
-               }
-       }
-
-       public void characters(String str, Object callData) {
-               _valueStr = str;
-               if(_subParser!=null)
-                       _subParser.characters(str, callData);
-       }
-
-       public void endElement(String name, Object callData) {
-
-               if (_level<=1 && name.equals(COUNT_TAG)) {
-                       OpModelImage dependent = new OpModelImage();
-                       dependent._setCount(Integer.parseInt(_valueStr));
-                       dependent._setName(_moduleName);
-                       
-                       String imageId = ParserUtil.getImageKey(_attrs);
-                       
-                       OpModelImage image = ParserUtil.getImage(_imageMap, imageId);
-                       image._addDependent(dependent);
-                       
-                       _dependentMap.put(imageId, dependent);
-               }else if (_level<=2 && name.equals(SYMBOL_TAG)) {
-                       _subParser = null;
-               }
-               
-               if(_subParser!=null)
-                       _subParser.endElement(name, null);
-       }
-       
-       
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/ModuleSymbolParser.java b/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/ModuleSymbolParser.java
deleted file mode 100644 (file)
index faa9f80..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- *  Module Symbol Parser
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.core.processor.modeldata.parser;
-
-import java.util.HashMap;
-
-import org.eclipse.linuxtools.oprofile.core.model.OpModelImage;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelSymbol;
-import org.xml.sax.Attributes;
-
-import org.tizen.oprofile.core.processor.modeldata.handler.XMLParser;
-import org.tizen.oprofile.core.processor.modeldata.util.ParserUtil;
-
-
-public class ModuleSymbolParser extends XMLParser {
-//     private static ModuleSymbolParser parser;
-       
-       private Attributes _attrs;
-       private String _valueStr;
-       
-       private static final String COUNT_TAG = "count";
-       
-       private String _idRef;
-       private HashMap<String, OpModelImage> _dependentMap;
-       private HashMap<String, OpModelSymbol> _symbolMap;
-       
-       public ModuleSymbolParser(String idRef,
-                       HashMap<String, OpModelImage> dependentMap, 
-                       HashMap<String, OpModelSymbol> symbolMap) {
-
-               this._idRef = idRef;
-               this._dependentMap = dependentMap;
-               this._symbolMap = symbolMap;
-       }
-
-
-       public void startElement(String name, Attributes attrs, Object callData) {
-               _attrs = attrs;
-       }
-       
-       public void characters(String str, Object callData) {
-               _valueStr = str;
-       }
-
-       public void endElement(String name, Object callData) {
-               if (name.equals(COUNT_TAG)) {
-                       OpModelSymbol symbol = new OpModelSymbol();
-                       symbol._setCount(Integer.parseInt(_valueStr));
-
-                       String imageId = ParserUtil.getImageKey(_attrs);
-                       OpModelImage dependent = ParserUtil.getImage(_dependentMap, imageId);
-                       dependent._addSymbol(symbol);
-                       
-                       _symbolMap.put(ParserUtil.getSymbolKey(imageId,_idRef), symbol);
-               }
-       }
-
-
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/SetupParser.java b/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/SetupParser.java
deleted file mode 100644 (file)
index fc77b82..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Setup Parser 
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.core.processor.modeldata.parser;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-
-import org.eclipse.linuxtools.oprofile.core.model.OpModelEvent;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelImage;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelRoot;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelSession;
-import org.xml.sax.Attributes;
-
-import org.tizen.oprofile.core.processor.modeldata.handler.XMLParser;
-import org.tizen.oprofile.core.processor.modeldata.util.ParserUtil;
-
-public class SetupParser extends XMLParser {
-//     private static SetupParser parser;
-       
-       private Attributes _attrs;
-       
-       private static final String EVENTSETUP_TAG = "eventsetup";
-       private static final String EVENTSETUP_EVENTNAME_ATTR = "eventname";
-       private static final String EVENTSETUP_ID_ATTR = "id";
-       private static final String TIMERSETUP_TAG = "timersetup";
-
-       private final static String DEFAULT_SESSION_NAME = "current";
-       private final static String TIMER_EVENT_NAME = "TIMER";
-
-       private ArrayList<OpModelEvent> _eventList = new ArrayList<OpModelEvent>();
-       private HashMap<String, OpModelImage> _imageMap;
-
-       public SetupParser(HashMap<String, OpModelImage> imageMap) {
-               this._imageMap = imageMap;
-       }
-
-
-       public void startElement(String name, Attributes attrs, Object callData) {
-               _attrs = attrs;
-       }
-
-       public void endElement(String name, Object callData) {
-               String eventName = _attrs.getValue(EVENTSETUP_EVENTNAME_ATTR);
-               String eventId = _attrs.getValue(EVENTSETUP_ID_ATTR)==null?ParserUtil.DEFAULT_EVENT_ID:_attrs.getValue(EVENTSETUP_ID_ATTR);
-               
-               if (name.equals(EVENTSETUP_TAG)) {
-                       addEvent(eventId, eventName);
-               } else if (name.equals(TIMERSETUP_TAG)) {
-                       addEvent(eventId, TIMER_EVENT_NAME);
-               }
-       }
-
-       private void addEvent(String eventId, String eventName) {
-               OpModelEvent event = new OpModelEvent(eventName);
-               OpModelImage image = new OpModelImage();
-
-               OpModelSession[] sessions = new OpModelSession[1];
-               sessions[0] = new OpModelSession(event, DEFAULT_SESSION_NAME);
-               sessions[0]._setImage(image);
-
-               event._setSessions(sessions);
-               
-               _eventList.add(event);
-               _imageMap.put(eventId,image);
-       }
-
-       public void release(Object data) {
-               changeImageId();
-               
-               OpModelRoot model = (OpModelRoot) data;
-               model._setEvents(_eventList.toArray(new OpModelEvent[_eventList.size()]));
-       }
-
-       private void changeImageId() {
-               if(_imageMap.size()==1){
-                       OpModelImage[] image = _imageMap.values().toArray(new OpModelImage[1]);
-//                     _imageMap.remove(image[0]);
-                       _imageMap.clear();
-                       _imageMap.put(ParserUtil.DEFAULT_EVENT_ID,image[0]);
-               }
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/SymbolDetailsParser.java b/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/SymbolDetailsParser.java
deleted file mode 100644 (file)
index 989d02c..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- *  Symbol Details Parser
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.core.processor.modeldata.parser;
-
-import java.util.HashMap;
-
-import org.eclipse.linuxtools.oprofile.core.model.OpModelSymbol;
-import org.xml.sax.Attributes;
-
-import org.tizen.oprofile.core.processor.modeldata.handler.XMLParser;
-
-
-
-public class SymbolDetailsParser extends XMLParser {
-//     private static SymbolDetailsParser parser;
-       
-       private XMLParser _subParser;
-       private Attributes _attrs;
-       private String _valueStr;
-       
-       private static final String DETAIL_DATA_TAG = "detaildata";
-       private static final String DETAIL_DATA_LINE_ATTR = "line";
-       
-       private String _symbolId;
-       private HashMap<String, OpModelSymbol> _symbolMap;
-
-       public SymbolDetailsParser(String symboldId,
-                       HashMap<String, OpModelSymbol> symbolMap){
-
-               this._symbolId = symboldId;
-               this._symbolMap = symbolMap;
-       }
-       
-       public void startElement(String name, Attributes attrs, Object callData) {
-               set_attrs(attrs);
-               
-               if(_subParser!=null)
-                       _subParser.startElement(name, attrs, callData);
-               
-               
-               if (name.equals(DETAIL_DATA_TAG)) {
-                       String sampleLine =  attrs.getValue(DETAIL_DATA_LINE_ATTR);
-                       int line = sampleLine==null?0:Integer.parseInt(sampleLine);
-                       _subParser = new DetailDataParser(_symbolId,line, _symbolMap);
-               }
-                
-       }
-
-       public void characters(String str, Object callData) {
-               set_valueStr(str);
-               if(_subParser!=null)
-                       _subParser.characters(str, callData);
-               
-       }
-       
-       public void endElement(String name, Object callData) {
-
-               if (name.equals(DETAIL_DATA_TAG))
-                       _subParser = null;
-               
-               
-               if(_subParser!=null)
-                       _subParser.endElement(name, callData);
-               
-       }
-
-       public void set_attrs(Attributes _attrs) {
-               this._attrs = _attrs;
-       }
-
-       public Attributes get_attrs() {
-               return _attrs;
-       }
-
-       public void set_valueStr(String _valueStr) {
-               this._valueStr = _valueStr;
-       }
-
-       public String get_valueStr() {
-               return _valueStr;
-       }
-       
-
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/SymbolParser.java b/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/SymbolParser.java
deleted file mode 100644 (file)
index c899e97..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- *  Symbol Parser
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.core.processor.modeldata.parser;
-
-import java.util.HashMap;
-
-import org.eclipse.linuxtools.oprofile.core.model.OpModelImage;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelSymbol;
-import org.xml.sax.Attributes;
-
-import org.tizen.oprofile.core.processor.modeldata.handler.XMLParser;
-import org.tizen.oprofile.core.processor.modeldata.util.ParserUtil;
-
-
-public class SymbolParser extends XMLParser {
-//     private static SymbolParser parser;
-       
-       private Attributes _attrs;
-       private String _valueStr;
-       
-       private static final String COUNT_TAG = "count";
-       
-       private String _idRef;
-       private HashMap<String, OpModelImage> _imageMap;
-       private HashMap<String, OpModelSymbol> _symbolMap;
-       
-       public SymbolParser(String idRef,
-                       HashMap<String, OpModelImage> imageMap, 
-                       HashMap<String, OpModelSymbol> symbolMap) {
-
-               this._idRef = idRef;
-               this._imageMap = imageMap;
-               this._symbolMap = symbolMap;
-       }
-
-
-       public void startElement(String name, Attributes attrs, Object callData) {
-               _attrs = attrs;
-       }
-       
-       public void characters(String str, Object callData) {
-               _valueStr = str;
-       }
-
-       public void endElement(String name, Object callData) {
-               if (name.equals(COUNT_TAG)) {
-                       OpModelSymbol symbol = new OpModelSymbol();
-                       symbol._setCount(Integer.parseInt(_valueStr));
-
-                       String imageId = ParserUtil.getImageKey(_attrs);
-                       OpModelImage image = ParserUtil.getImage(_imageMap, imageId);
-                       image._addSymbol(symbol);
-                       
-                       _symbolMap.put(ParserUtil.getSymbolKey(imageId,_idRef), symbol);
-               }
-       }
-
-
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/SymbolTableParser.java b/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/parser/SymbolTableParser.java
deleted file mode 100644 (file)
index 5eaa14b..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- *  Symbol Table Parser
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.core.processor.modeldata.parser;
-
-import java.util.HashMap;
-
-import org.eclipse.linuxtools.oprofile.core.model.OpModelImage;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelSymbol;
-import org.xml.sax.Attributes;
-
-import org.tizen.oprofile.core.processor.modeldata.handler.XMLParser;
-import org.tizen.oprofile.core.processor.modeldata.util.ParserUtil;
-
-
-public class SymbolTableParser extends XMLParser {
-//     private static SymbolTableParser parser;
-       
-       private Attributes _attrs;
-       
-       private static final String SYMBOLDATA_TAG = "symboldata";
-       private static final String SYMBOLDATA_ID_ATTR = "id";
-       private static final String SYMBOLDATA_NAME_ATTR = "name";
-       private static final String SYMBOLDATA_FILE_ATTR = "file";
-       private static final String SYMBOLDATA_LINE_ATTR = "line";
-
-       private String[] _imageIds;
-       private HashMap<String, OpModelSymbol> _symbolMap;
-
-       public SymbolTableParser(HashMap<String,OpModelImage> imageMap,
-                       HashMap<String, OpModelSymbol> symbolMap) {
-
-               this._imageIds = imageMap.keySet().toArray(new String[imageMap.size()]);
-               this._symbolMap = symbolMap;
-       }
-
-
-       public void startElement(String name, Attributes attrs, Object callData) {
-               _attrs = attrs;
-       }
-
-       public void endElement(String name, Object callData) {
-               if (name.equals(SYMBOLDATA_TAG)) {
-                       String symbolId = _attrs.getValue(SYMBOLDATA_ID_ATTR);
-                       String symbolName = _attrs.getValue(SYMBOLDATA_NAME_ATTR);
-                       String symbolFile = _attrs.getValue(SYMBOLDATA_FILE_ATTR);
-                       String symbolLine = _attrs.getValue(SYMBOLDATA_LINE_ATTR);
-                       
-                       setSymbolDetail(symbolId, symbolName, symbolFile, symbolLine);
-               }
-       }
-       
-
-       private void setSymbolDetail(String symbolId, String symbolName, String symbolFile, String symbolLine) {
-               for(String imageId : _imageIds){
-                       OpModelSymbol symbol = _symbolMap.get(ParserUtil.getSymbolKey(imageId,symbolId));
-                       if(symbol!=null){
-                               if(symbolFile!=null)
-                                       symbol._setFile(symbolFile);
-                               symbol._setName(symbolName);
-                       }
-               }
-       }
-
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/util/ParserUtil.java b/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/modeldata/util/ParserUtil.java
deleted file mode 100644 (file)
index 4063b2b..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- *  Parser Util
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.core.processor.modeldata.util;
-
-import java.util.HashMap;
-
-import org.eclipse.linuxtools.oprofile.core.model.OpModelImage;
-import org.xml.sax.Attributes;
-
-public abstract class ParserUtil {
-       
-       private static final String COUNT_CLASS_ATTR = "class";
-       public static final String DEFAULT_EVENT_ID = "";
-
-       public static String getImageKey(Attributes attrs) {
-               String key = attrs.getValue(COUNT_CLASS_ATTR);
-               return key==null?DEFAULT_EVENT_ID:key;
-       }
-       
-       public static String getSymbolKey(String imageId, String symbolId) {
-               if(imageId==null||imageId.equals(DEFAULT_EVENT_ID))
-                       return symbolId;
-               else
-                       return imageId+":"+symbolId;
-       }       
-       
-       public static OpModelImage getImage(HashMap<String, OpModelImage> imageMap, String imageId) {
-               String key = imageId==null?DEFAULT_EVENT_ID:imageId;
-               return imageMap.get(key);
-       }
-       
-       
-       
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/sessions/SessionsProcessor.java b/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/processor/sessions/SessionsProcessor.java
deleted file mode 100644 (file)
index ba47eb8..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Sessions Processor 
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.core.processor.sessions;
-
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.oprofile.core.Oprofile;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelEvent;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelSession;
-
-import org.tizen.oprofile.core.CommandManager;
-import org.tizen.oprofile.core.OprofileCommonConstants;
-
-
-public class SessionsProcessor{
-       
-       public SessionsProcessor() throws InterruptedException{
-       }
-       
-       private final static String DEFAULT_SESSION_NAME = "current";
-       private final static String TIMER_EVENT = "TIMER";
-       private final static String COMMAND_SESSION_EVENT =OprofileCommonConstants.OPROFILE_SCRIPT+" status";
-       
-       public void parse(ArrayList<OpModelEvent> eventList) throws InterruptedException{
-               if(Oprofile.getTimerMode()){
-                       addTimerEvent(eventList);
-                       return;
-               }
-               
-               String[] resultStr= null;
-               
-               resultStr = CommandManager.runHostCommandReturningResultArray(COMMAND_SESSION_EVENT);
-               
-               if(resultStr==null||resultStr.length == 0 )
-                       return;
-               
-               
-               for(int i=0;i<resultStr.length;i++){
-                       String str = resultStr[i];
-                       addEvent(eventList, str);
-               }
-}
-
-       private void addTimerEvent(ArrayList<OpModelEvent> eventList) {
-               OpModelEvent event = new OpModelEvent(TIMER_EVENT);
-               
-               OpModelSession[] sessions = new OpModelSession[1];
-               sessions[0] = new OpModelSession(event,DEFAULT_SESSION_NAME);
-               
-               event._setSessions(sessions);
-               
-               eventList.add(event);
-       }
-
-       private void addEvent(ArrayList<OpModelEvent> eventList, String str) {
-               String[] strs = str.split(":");
-               
-               if(strs.length<6)
-                       return;
-               
-               OpModelEvent event = new OpModelEvent(strs[1].trim());
-               
-               OpModelSession[] sessions = new OpModelSession[1];
-               sessions[0] = new OpModelSession(event,DEFAULT_SESSION_NAME);
-               
-               event._setSessions(sessions);
-               eventList.add(event);
-       }
-       
-       
-}
diff --git a/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/provider/OpcontrolDataProvider.java b/org.eclipse.linuxtools.oprofile.core/src/org/tizen/oprofile/core/provider/OpcontrolDataProvider.java
deleted file mode 100644 (file)
index 9925475..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- *  Opcontrol Data Provider
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.core.provider;
-
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.linuxtools.oprofile.core.daemon.OpInfo;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelEvent;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelRoot;
-
-import org.tizen.oprofile.core.processor.checkevent.CheckEventsProcessor;
-import org.tizen.oprofile.core.processor.checkkernel.CheckKernelProcessor;
-import org.tizen.oprofile.core.processor.eventinfo.EventListProcessor;
-import org.tizen.oprofile.core.processor.eventinfo.OpInfoProcessor;
-import org.tizen.oprofile.core.processor.modeldata.ModelDataProcessor;
-import org.tizen.oprofile.core.processor.sessions.SessionsProcessor;
-import org.xml.sax.SAXException;
-
-public abstract class OpcontrolDataProvider{
-       
-       
-       public static IRunnableWithProgress getEventInfo(final OpInfo info) {
-               IRunnableWithProgress runnable = new IRunnableWithProgress() {
-                       public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
-//                             if(!OprofileComm.checkTarget()) return;
-                               
-                               new OpInfoProcessor(info).parse();
-                               
-                               if(!info.getTimerMode()){
-                                       new EventListProcessor(info).parse();
-                               }
-                       
-                       }
-               };
-               
-               return runnable;
-       }
-       
-       public static IRunnableWithProgress checkEvent(final String event, final int count, final int unitmask, final int[] result) {
-               IRunnableWithProgress runnable = new IRunnableWithProgress() {
-                       public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
-//                             if(!OprofileComm.checkTarget()) return;
-
-                               new CheckEventsProcessor().parse(event,count, unitmask,result);
-                       
-                       }
-               };
-               
-               return runnable;
-       }
-       
-       
-       public static IRunnableWithProgress getEventList(final ArrayList<OpModelEvent> eventList) {
-               IRunnableWithProgress runnable = new IRunnableWithProgress() {
-                       public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
-//                             if(!OprofileComm.checkTarget()) return;
-                               //ISession session = OprofileComm.getSession();
-                               
-                               new SessionsProcessor().parse(eventList);
-                       }
-               };
-               
-               return runnable;
-       }
-       
-       public static IRunnableWithProgress getModelData(final OpModelRoot model) {
-               IRunnableWithProgress runnable = new IRunnableWithProgress() {
-                       public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
-//                             if(!OprofileComm.checkTarget()) return;
-                               //ISession session = OprofileComm.getSession();
-                               
-                               try {
-                                       new ModelDataProcessor(model).parse();
-                               } catch (InterruptedException e) {
-                                       throw new InterruptedException();
-                               } catch (SAXException e) {
-                                       throw new InterruptedException();
-                               } catch (IOException e) {
-                                       throw new InterruptedException();
-                               } catch (ParserConfigurationException e) {
-                                       throw new InterruptedException();
-                               }
-                       }
-               };
-               
-               return runnable;
-       }
-
-       public static IRunnableWithProgress checkKernelModule(final String[] result) {
-               IRunnableWithProgress runnable = new IRunnableWithProgress() {
-                       public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
-//                             if(!OprofileComm.checkTarget()) return;
-                               //ISession session = OprofileComm.getSession();
-                               
-                               new CheckKernelProcessor().parse(result);
-                       
-                       }
-               };
-               
-               return runnable;
-       }
-       
-               
-       
-}
diff --git a/org.eclipse.linuxtools.oprofile.launch.exe/.classpath b/org.eclipse.linuxtools.oprofile.launch.exe/.classpath
deleted file mode 100644 (file)
index 4c62a80..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="src" path="src"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-       <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.linuxtools.oprofile.launch.exe/.project b/org.eclipse.linuxtools.oprofile.launch.exe/.project
deleted file mode 100644 (file)
index 3f9c10a..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.eclipse.linuxtools.oprofile.launch.exe</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.eclipse.linuxtools.oprofile.launch.exe/.settings/org.eclipse.core.resources.prefs b/org.eclipse.linuxtools.oprofile.launch.exe/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644 (file)
index fcc43a9..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#Wed Dec 01 09:13:21 CET 2010
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/org.eclipse.linuxtools.oprofile.launch.exe/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.linuxtools.oprofile.launch.exe/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644 (file)
index f02480a..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#Tue Dec 14 16:36:28 CET 2010
-eclipse.preferences.version=1
-line.separator=\n
diff --git a/org.eclipse.linuxtools.oprofile.launch.exe/META-INF/MANIFEST.MF b/org.eclipse.linuxtools.oprofile.launch.exe/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index ab54e67..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-Manifest-Version: 1.0\r
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.4.0",\r
- org.eclipse.ui;bundle-version="3.4.0",\r
- org.eclipse.cdt.core;bundle-version="5.2.1",\r
- org.eclipse.cdt.debug.core;bundle-version="5.0.1",\r
- org.eclipse.cdt.launch;bundle-version="6.1.0",\r
- org.eclipse.linuxtools.oprofile.core,\r
- org.eclipse.linuxtools.oprofile.launch,\r
- org.eclipse.debug.ui;bundle-version="3.4.2",\r
- org.eclipse.linuxtools.profiling.launch,\r
- org.tizen.common,\r
- org.tizen.common.connection,\r
- org.tizen.nativecommon\r
-Bundle-Vendor: Eclipse Linux Tools\r
-Bundle-Version: 1.3.18.qualifier\r
-Bundle-Name: Tizen SDK Oprofile Exe Launch\r
-Bundle-ManifestVersion: 2\r
-Import-Package: org.eclipse.cdt.debug.core,\r
- org.eclipse.cdt.managedbuilder.core,\r
- org.eclipse.debug.core,\r
- org.eclipse.linuxtools.oprofile.core,\r
- org.eclipse.linuxtools.oprofile.core.daemon,\r
- org.eclipse.linuxtools.oprofile.ui,\r
- org.eclipse.linuxtools.oprofile.ui.view,\r
- org.eclipse.ui,\r
- org.tizen.common.gom.launch,\r
- org.tizen.nativecommon.launch,\r
- org.tizen.nativecommon.launch.ui,\r
- org.tizen.sdblib,\r
- org.tizen.sdblib.util\r
-Bundle-SymbolicName: org.eclipse.linuxtools.oprofile.launch.exe;singleton:=true\r
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6\r
-Bundle-Activator: org.tizen.oprofile.launch.Activator\r
-Export-Package: org.tizen.oprofile.launch\r
-\r
-\r
-\r
-\r
-\r
diff --git a/org.eclipse.linuxtools.oprofile.launch.exe/NOTICE b/org.eclipse.linuxtools.oprofile.launch.exe/NOTICE
deleted file mode 100644 (file)
index aff595a..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-2010-01-25 Dawid Kozinski <d.kozinski@samsung.com>\r
-       * plugin.xml : add cnature property\r
-\r
-2010-02-03 SPRC SDK Team <d.kozinski@samsung.com>\r
-       * MANIFEST.MF : changed some package names\r
-       * plugin.xml : changed some package names\r
-\r
-2010-02-10 SPRC SDK Team <d.kozinski@samsung.com>\r
-       * MANIFEST.MF : remove Bundle-Localization, fix Bundle-Activator\r
-\r
-2010-07-14 HyungJong, Shin <hj_shin@samsung.com>\r
-       * plugin.xml : delete daemon property\r
-       \r
-2010-07-23 HyungJong, Shin <hj_shin@samsung.com>\r
-       * NormalOprofileDeployer.java : application launching exception message shows several times.==> solved\r
-       \r
-2010-11-05 sdk <sdk@sdk-laptop.(none)>\r
-       * MANIFEST.MF : changed some package name\r
-       * plugin.xml : changed some package name\r
-\r
-2010-11-09 DongGi Jang <dg0402.jang.samsung.com>\r
-       * MANIFEST.MF : changed launcher name\r
-\r
-2011-06-07 jaewon81.lim <jaewon81.lim@samsung.com>\r
-       * MANIFEST.MF : modify imported package name of freshide.common.ui\r
-\r
-2011-06-09 jaewon81.lim <jaewon81.lim@samsung.com>\r
-       * MANIFEST.MF : rearrange plugins dependency\r
-\r
-2011-07-13 jaewon81.lim <jaewon81.lim@samsung.com>\r
-       * MANIFEST.MF : modified import package name\r
-\r
-2011-08-22 joogwan.kim <joogwan.kim@samsung.com>\r
-       * MANIFEST.MF : Change plug-in name\r
-\r
-2011-08-25 wonhyoung2.park <wonhyoung2.park@samsung.com>\r
-       * MANIFEST.MF : plugin provider and name modified\r
-\r
-2011-09-28 wonhyoung2.park <wonhyoung2.park@samsung.com>\r
-       * SLPOprofileLaunchDelegate.java : add oprofile build configuration selection routine\r
-\r
-2011-11-16 wonhyoung2.park <wonhyoung2.park@samsung.com>\r
-       * MANIFEST.MF : Profiler sdb apply\r
-\r
-2011-11-22 taeyoung2.son <taeyoung2.son@samsung.com>\r
-       * MANIFEST.MF :  Modify SDK naming from "SLP(or Samsung Linux Platform)" to "Tizen"\r
-       * plugin.xml :  Modify SDK naming from "SLP(or Samsung Linux Platform)" to "Tizen"\r
-\r
-2011-11-29 wonhyoung2.park <wonhyoung2.park@samsung.com>\r
-       * MANIFEST.MF : chagne slp to tizen\r
-       * plugin.xml : chagne slp to tizen\r
-\r
-2011-12-02 taeyoung2.son <taeyoung2.son@samsung.com>\r
-       * MANIFEST.MF : Delete dependency feature's version value.\r
-\r
-2011-12-03 wonhyoung2.park <wonhyoung2.park@samsung.com>\r
-       * MANIFEST.MF : package instll routine chage\r
-\r
-2011-12-04 wonhyoung2.park <wonhyoung2.park@samsung.com>\r
-       * MANIFEST.MF : change oprofile install\r
-       * plugin.xml : change oprofile install\r
-\r
-2011-12-12 wonhyoung2.park <wonhyoung2.park@samsung.com>\r
-       * plugin.xml : profile menu only show in native perspective\r
-\r
diff --git a/org.eclipse.linuxtools.oprofile.launch.exe/build.properties b/org.eclipse.linuxtools.oprofile.launch.exe/build.properties
deleted file mode 100644 (file)
index 90406de..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
-               .,\
-               plugin.xml,\
-               icons/
-javacSource = 1.6
-javacTarget = 1.6
diff --git a/org.eclipse.linuxtools.oprofile.launch.exe/icons/event_tab.gif b/org.eclipse.linuxtools.oprofile.launch.exe/icons/event_tab.gif
deleted file mode 100644 (file)
index c91f254..0000000
Binary files a/org.eclipse.linuxtools.oprofile.launch.exe/icons/event_tab.gif and /dev/null differ
diff --git a/org.eclipse.linuxtools.oprofile.launch.exe/icons/global_tab.gif b/org.eclipse.linuxtools.oprofile.launch.exe/icons/global_tab.gif
deleted file mode 100644 (file)
index ec6cca4..0000000
Binary files a/org.eclipse.linuxtools.oprofile.launch.exe/icons/global_tab.gif and /dev/null differ
diff --git a/org.eclipse.linuxtools.oprofile.launch.exe/icons/profile_run.png b/org.eclipse.linuxtools.oprofile.launch.exe/icons/profile_run.png
deleted file mode 100644 (file)
index 4f8488f..0000000
Binary files a/org.eclipse.linuxtools.oprofile.launch.exe/icons/profile_run.png and /dev/null differ
diff --git a/org.eclipse.linuxtools.oprofile.launch.exe/plugin.xml b/org.eclipse.linuxtools.oprofile.launch.exe/plugin.xml
deleted file mode 100644 (file)
index 6cdd0b1..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
-       <!--<extension
-         point="org.eclipse.debug.core.launchConfigurationTypes">
-      <launchConfigurationType
-            delegate="org.tizen.oprofile.launch.TizenOprofileLaunchDelegate"
-            id="org.eclipse.linuxtools.oprofile.launch.oprofile"
-            modes="profile"
-            name="Profile With OProfile"
-            public="true">
-      </launchConfigurationType>      
-   </extension>
-   <extension
-         point="org.eclipse.debug.ui.launchConfigurationTypeImages">
-      <launchConfigurationTypeImage
-            configTypeID="org.eclipse.linuxtools.oprofile.launch.oprofile"
-            icon="icons/profile_run.png"
-            id="org.eclipse.linuxtools.oprofile.launch.oprofileImage">
-      </launchConfigurationTypeImage>
-   </extension>        
-   <extension
-         point="org.eclipse.debug.ui.launchConfigurationTabGroups">
-      <launchConfigurationTabGroup
-            class="org.tizen.oprofile.launch.configuration.NormalOprofileLaunchConfigurationTabGroup"
-            id="org.eclipse.linuxtools.oprofile.launch.launchConfigurationTabGroup"
-            type="org.eclipse.linuxtools.oprofile.launch.oprofile">
-      </launchConfigurationTabGroup>
-   </extension>-->
-   <!--<extension
-         point="org.eclipse.debug.ui.launchShortcuts">
-      <shortcut
-            class="org.tizen.oprofile.launch.NormalOprofileLaunchShortcut"
-            icon="icons/profile_run.png"
-            id="org.eclipse.linuxtools.oprofile.launch.profileshortcut"
-            label="Profile With OProfile"
-            modes="profile">
-        <contextualLaunch>
-            <enablement>
-                <with variable="selection">
-                <count value="1"/>
-                <iterate>
-                    <and>
-                       <or>
-                          <instanceof
-                                value="org.eclipse.cdt.core.model.IBinary">
-                          </instanceof>
-                          <instanceof
-                                value="org.eclipse.cdt.core.model.ICProject">
-                          </instanceof>
-                          <test
-                                forcePluginActivation="true"
-                                property="org.eclipse.cdt.launch.isExecutable">
-                          </test>
-                          <test
-                                forcePluginActivation="true"
-                                property="org.eclipse.cdt.launch.isCProject">
-                          </test>
-                          <and>
-                             <instanceof
-                                   value="org.eclipse.ui.IFileEditorInput">
-                             </instanceof>
-                             <adapt
-                                   type="org.eclipse.core.resources.IResource">
-                                <adapt
-                                      type="org.eclipse.cdt.core.model.ICElement">
-                                </adapt>
-                             </adapt>
-                          </and>
-                       </or>
-                       <not>
-                          <adapt
-                                type="org.eclipse.core.resources.IResource">
-                             <test
-                                   property="org.eclipse.core.resources.projectNature"
-                                   value="org.tizen.tizentest.nature">
-                             </test>
-                          </adapt>
-                       </not>
-                    </and>
-                </iterate>
-                </with>
-            </enablement>
-        </contextualLaunch>
-        <description
-            mode="profile"
-            description="Profile a Tizen application with Oprofile"/>
-        <configurationType
-               id="org.eclipse.linuxtools.oprofile.launch.oprofile">
-        </configurationType>
-      </shortcut>
-   </extension>-->
-   <extension
-         id="org.tizen.oprofile.tool"
-         point="org.tizen.common.connection.tools">
-      <tools
-            packagename="oprofile"
-            sourcepath="/on-demand">
-      </tools>
-   </extension>
-   <extension
-         point="org.eclipse.ui.activities">
-      <activity
-            id="org.eclipse.linuxtools.oprofile.launch.exe.activity"
-            name="name">
-         <enabledWhen>
-            <with
-                  variable="activeWorkbenchWindow.activePerspective">
-               <and>
-                  <equals
-                        value="org.tizen.nativeapp.perspective">
-                  </equals>
-               </and>
-            </with>
-         </enabledWhen>
-      </activity>
-      <activityPatternBinding
-            activityId="org.eclipse.linuxtools.oprofile.launch.exe.activity"
-            pattern="org.eclipse.linuxtools.oprofile.launch.exe/org.eclipse.linuxtools.oprofile.launch.profileshortcut">
-      </activityPatternBinding>
-   </extension>
-</plugin>
-
diff --git a/org.eclipse.linuxtools.oprofile.launch.exe/src/org/tizen/oprofile/launch/Activator.java b/org.eclipse.linuxtools.oprofile.launch.exe/src/org/tizen/oprofile/launch/Activator.java
deleted file mode 100644 (file)
index e7c6af8..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- *  Activator
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.launch;
-
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends Plugin {
-
-       // The shared instance
-       private static Activator plugin;
-       
-       /**
-        * The constructor
-        */
-       public Activator() {
-       }
-
-       /*
-        * (non-Javadoc)
-        * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
-        */
-       public void start(BundleContext context) throws Exception {
-               super.start(context);
-               plugin = this;
-       }
-
-       /*
-        * (non-Javadoc)
-        * @see org.eclipse.core.runtime.Plugin#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.eclipse.linuxtools.oprofile.launch.exe/src/org/tizen/oprofile/launch/NormalOprofileLaunchShortcut.java b/org.eclipse.linuxtools.oprofile.launch.exe/src/org/tizen/oprofile/launch/NormalOprofileLaunchShortcut.java
deleted file mode 100644 (file)
index facc963..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- *  Normal Oprofile Launch Shortcut
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.launch;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.linuxtools.oprofile.launch.OprofileLaunchMessages;
-import org.eclipse.linuxtools.oprofile.launch.OprofileLaunchPlugin;
-import org.eclipse.linuxtools.oprofile.launch.configuration.LaunchOptions;
-import org.eclipse.linuxtools.profiling.launch.ProfileLaunchPlugin;
-import org.eclipse.linuxtools.profiling.launch.ProfileLaunchShortcut;
-import org.eclipse.ui.IEditorPart;
-import org.tizen.common.gom.launch.GomLaunchData;
-import org.tizen.common.gom.launch.IGomSmartLaunchShortcut;
-import org.tizen.common.util.SWTUtil;
-
-
-/**
- * A class that takes care of the right-click -> profile with oprofile
- *   shortcut, where the ProfileLaunchShortcut has the logic to automatically
- *   find binaries and create a default launch if one doesn't exist.
- */
-public class NormalOprofileLaunchShortcut extends ProfileLaunchShortcut implements IGomSmartLaunchShortcut {
-       
-       public void launch(IEditorPart editor, String mode) {
-               int targetResult = ProfileLaunchPlugin.checkTarget();
-               if(targetResult == 0)
-               {
-                       ProfileLaunchShortcut.showErrorDialog(OprofileLaunchMessages.getString("common.cannotrun"),
-                                       OprofileLaunchMessages.getString("common.notarget"), null);
-               }
-               else
-               {
-                       super.launch(editor, mode);
-               }
-       }
-
-       public void launch(ISelection selection, String mode) {
-               int targetResult = ProfileLaunchPlugin.checkTarget();
-               if(targetResult == 0)
-               {
-                       ProfileLaunchShortcut.showErrorDialog(OprofileLaunchMessages.getString("common.cannotrun"),
-                                       OprofileLaunchMessages.getString("common.notarget"), null);
-               }
-               else
-               {
-                       super.launch(selection, mode);
-               }
-       }
-       
-       @Override
-       protected ILaunchConfigurationType getLaunchConfigType() {
-               return getLaunchManager().getLaunchConfigurationType(OprofileLaunchPlugin.ID_LAUNCH_PROFILE);
-       }
-
-       /**
-        * Default settings for the OProfile-specific option tabs.
-        */
-       @Override
-       protected void setDefaultProfileAttributes(ILaunchConfigurationWorkingCopy wc) throws CoreException {
-               //default global setup options
-               LaunchOptions options = new LaunchOptions();
-               options.saveConfiguration(wc);
-
-               //default event option
-               wc.setAttribute(OprofileLaunchPlugin.ATTR_USE_DEFAULT_EVENT, true);
-       
-               // commented by greatim at 2011.06.01 for fresh ide
-               //jinu added at 20090618
-//             wc.setAttribute(ISMLCDTLaunchConstants.ATTR_LAUNCH_MODE, "oprofile");
-//             wc.setAttribute(ISMLCDTLaunchConstants.ATTR_SKIP_DOWNLOAD, false);
-               wc.setAttribute(IDebugUIConstants.ATTR_LAUNCH_IN_BACKGROUND, true);
-       }
-       
-       public void smartLaunch(final GomLaunchData data) {
-        final ILaunchConfiguration configuration = createConfiguration(data.getProject(), data.getMode());
-        SWTUtil.syncExec(new Runnable()
-        {
-            @Override
-            public void run() {
-                DebugUITools.launch(configuration, data.getMode());
-            }
-        });
-    }
-}
diff --git a/org.eclipse.linuxtools.oprofile.launch.exe/src/org/tizen/oprofile/launch/TizenOprofileLaunchDelegate.java b/org.eclipse.linuxtools.oprofile.launch.exe/src/org/tizen/oprofile/launch/TizenOprofileLaunchDelegate.java
deleted file mode 100644 (file)
index 05fdb3e..0000000
+++ /dev/null
@@ -1,507 +0,0 @@
-/*
- *  Tizen Oprofile Launch Delegate
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.launch;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.nio.charset.Charset;
-import java.util.ArrayList;
-
-import org.eclipse.cdt.debug.core.CDebugUtils;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.ILaunchesListener2;
-import org.eclipse.linuxtools.oprofile.core.OpcontrolException;
-import org.eclipse.linuxtools.oprofile.core.Oprofile;
-import org.eclipse.linuxtools.oprofile.core.OprofileCorePlugin;
-import org.eclipse.linuxtools.oprofile.core.daemon.OprofileDaemonEvent;
-import org.eclipse.linuxtools.oprofile.launch.OprofileLaunchMessages;
-import org.eclipse.linuxtools.oprofile.launch.OprofileLaunchPlugin;
-import org.eclipse.linuxtools.oprofile.launch.configuration.LaunchOptions;
-import org.eclipse.linuxtools.oprofile.launch.configuration.OprofileCounter;
-import org.eclipse.linuxtools.oprofile.ui.OprofileUiPlugin;
-import org.eclipse.linuxtools.oprofile.ui.view.OprofileView;
-import org.eclipse.linuxtools.profiling.launch.ProfileLaunchPlugin;
-import org.eclipse.linuxtools.profiling.launch.ProfileLaunchShortcut;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.MessageBox;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.tizen.common.TizenPlatformConstants;
-import org.tizen.nativecommon.launch.IProjectLaunchCommand;
-import org.tizen.nativecommon.launch.TizenLaunchCommand;
-import org.tizen.nativecommon.launch.TizenLaunchDelegate;
-import org.tizen.nativecommon.launch.TizenLaunchMessages;
-import org.tizen.oprofile.core.CommandManager;
-import org.tizen.oprofile.core.OprofileCommonConstants;
-import org.tizen.nativecommon.Activator;
-import org.tizen.nativecommon.IXMLStore;
-import org.tizen.nativecommon.ProjectUtil;
-
-public class TizenOprofileLaunchDelegate extends TizenLaunchDelegate {
-
-       protected static final String MAKE_DIRECTORY_CMD = "mkdir -p ";
-       protected static final String CHANGE_DIRECTORY_CMD = "cd ";
-
-       protected static final String PACKAGE_NAME = "oprofile";
-       protected static final String PACKAGE_FILENAME_ARM = "oprofile_armel.deb";
-       protected static final String BADA_EXT = ".exe";
-       
-       protected static final String LAUNCHPAD_DAEMON = "/usr/bin/launchpad_preloading_preinitializing_daemon";
-       protected static final String LAUNCHPAD_LAUNCHER = "launch_app ";
-       protected static final String LAUNCHPAD_SYNCMODE = " __LAUNCH_APP_MODE__ SYNC";
-
-       protected static String appName = null;
-
-       public static String getAppName() {
-               return appName;
-       }
-
-       public static void setAppName(String appName) {
-               TizenOprofileLaunchDelegate.appName = appName;
-       }
-
-       private String getPackageName(ILaunchConfiguration config) throws CoreException {
-               IProject project = ProjectUtil.getProject(config);
-               IProjectLaunchCommand manifest = ProjectUtil.getProjectManifest(project);
-               
-               return manifest.getPackageName();
-       }
-       
-    private String getExecutableName(ILaunchConfiguration config) throws CoreException {
-       String ExeName = ProjectUtil.getExecutableName(config);
-
-       // for bada application
-               // execute non-exe file instead of .exe file
-               if(ExeName.endsWith(BADA_EXT))
-               {
-                       ExeName = ExeName.substring(0, ExeName.length() - BADA_EXT.length());
-               }
-       
-               return ExeName;
-       }
-       
-       @Override
-       public void launch(ILaunchConfiguration config, String mode,
-                       ILaunch launch, IProgressMonitor monitor) throws CoreException {
-               if (monitor == null)
-                       monitor = new NullProgressMonitor();
-               
-               if(ProfileLaunchPlugin.isProfiling()) {
-                       monitor.done();
-                       ProfileLaunchShortcut.showErrorDialog(OprofileLaunchMessages.getString("common.cannotrun"),
-                                       OprofileLaunchMessages.getString("common.isprofiling"), null);
-                       return;
-               }
-
-               int targetResult = ProfileLaunchPlugin.checkTarget();
-               if(targetResult == 0) {
-                       monitor.done();
-                       ProfileLaunchShortcut.showErrorDialog(OprofileLaunchMessages.getString("common.cannotrun"),
-                                       OprofileLaunchMessages.getString("common.notarget"), null);
-                       return;
-               }
-               
-               try {
-                       ProfileLaunchPlugin.startProfiling();
-               
-                       // check for IME app
-                       IXMLStore store = ProjectUtil.getXmlStore(ProjectUtil.getProject(config));
-                       if(store.isImeCategory())
-                       {
-                               newCoreException("Profiling of IME application is not supported.", null);
-                       }
-
-                       monitor.beginTask(TizenLaunchMessages.LAUNCH_APPLICATION, 30);
-
-                       activateProgressView();
-
-                       verifyCProjectConfigurationSettings(config);
-                       verifyDeviceReachability(config,
-                                       new SubProgressMonitor(monitor, 9));
-                       verifyBuildConfiguration(config, mode, new SubProgressMonitor(
-                                       monitor, 11));
-
-                       setConsole(config);
-            tizenCommand = new TizenLaunchCommand(currentDevice, launchConsole);
-            // FIXME: ad-hoc code.
-            launchConsole.show();
-
-                       Oprofile.getOpInfo();
-
-                       // ISession session = getLaunchSession(config, new
-                       // SubProgressMonitor(monitor, 1));
-
-                       if (mode.equals(ILaunchManager.PROFILE_MODE)) {
-                               deployApplication(config, new SubProgressMonitor(monitor, 9));
-                               monitor.worked(1);
-
-                               launchApplicationWithOprofile(launch, config, monitor);
-                       } else {
-                               newCoreException(TizenLaunchMessages.CANNOT_LAUNCH, null);
-                       }
-               } finally {
-                       monitor.done();
-                       ProfileLaunchPlugin.stopProfiling();
-               }
-       }
-
-       protected void launchApplicationWithOprofile(ILaunch launch,
-                       ILaunchConfiguration config, IProgressMonitor monitor)
-                       throws CoreException {
-               try {
-                       // check oprofile tool
-                       checkProfilingTool(monitor);
-                       
-                       String remoteExePath = getDebugLaunchCommand(config);
-
-//                     String remoteExePath = ProjectUtil.getAppDirectory(ProjectUtil.getProject(config), currentDevice) + "/bin/";
-//                     remoteExePath = remoteExePath.replace("/opt/usr/apps/", "/opt/apps/");
-//                     IPath exeFile = CDebugUtils.verifyProgramPath(config);
-//                     remoteExePath += exeFile.toFile().getName();
-                               
-                       if (monitor.isCanceled())
-                               throw new OperationCanceledException();
-
-                       // for bada application
-                       // execute non-exe file instead of .exe file
-                       if(remoteExePath.endsWith(BADA_EXT))
-                       {
-                               remoteExePath = remoteExePath.substring(0, remoteExePath.length() - BADA_EXT.length());
-                       }
-                       
-                       String cmd = OprofileCommonConstants.OPROFILE_SCRIPT + " lsapp " + remoteExePath;
-                       // resultRsp = session.run(cmd, null);
-                       String[] resultRsp = CommandManager.runHostCommandReturningResultArray(cmd);
-                       if (!CommandManager.isRunSuccessfuly(resultRsp))
-                               newCoreException(
-                                               TizenLaunchMessages.CANNOT_LAUNCH,
-                                               new Exception(
-                                                               "Executable does not exist on a valid path. You must install your application before running it."));
-
-                       if (monitor.isCanceled())
-                               throw new OperationCanceledException();
-                       
-                       monitor.worked(2);
-
-                       preProcedure(config, launch, monitor, remoteExePath);
-
-                       if (monitor.isCanceled())
-                               throw new OperationCanceledException();
-
-                       // commentted by greatim (2013.7.25)
-//                     String arguments = config
-//                                     .getAttribute(
-//                                                     ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, "");
-//                     cmd = remoteExePath.trim();
-//                     appName = remoteExePath;
-//                     if (arguments != null && !arguments.equals(""))
-//                             cmd += " " + arguments;
-
-                       try {           
-                               appName = remoteExePath;
-                               cmd = LAUNCHPAD_LAUNCHER + getPackageName(config) + "." + getExecutableName(config) + LAUNCHPAD_SYNCMODE;
-                       } catch (CoreException e) {
-                               newCoreException(e.getMessage(), e.getCause());
-                       }
-
-                       // remoteShellProcess = session.launch(cmd, null);
-                       // CommandManager.runShell(cmd);
-                       runApplication(config, launch, cmd);
-
-                       if (monitor.isCanceled())
-                               throw new OperationCanceledException();
-
-                       postProcedure(config, launch, monitor, remoteExePath);
-
-                       if (monitor.isCanceled())
-                               throw new OperationCanceledException();
-               } catch (CoreException e) {
-                       newCoreException(e.getMessage(), e.getCause());
-               } catch (OperationCanceledException e) {
-                       Display.getDefault().syncExec(new Runnable() {
-                               public void run() {
-                                       IWorkbenchWindow wbench = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-                                       MessageBox confirm = new MessageBox(wbench.getShell(), SWT.ICON_WARNING | SWT.OK);
-                                       confirm.setMessage("Operation canceled by user.");
-                                       confirm.open();
-                               }
-                       });
-               } catch (Exception e) {
-                       newCoreException(TizenLaunchMessages.CANNOT_LAUNCH, e);
-               } finally {
-                       monitor.done();
-                       ProfileLaunchPlugin.stopProfiling();
-               }
-       }
-
-       private void runApplication(ILaunchConfiguration config, ILaunch launch,
-                       String command) throws CoreException {
-               String cmd = command;
-               
-               Process oprofileProc = CommandManager.runApplication(cmd);
-               if (oprofileProc == null) {
-                       newCoreException(TizenLaunchMessages.CANNOT_LAUNCH, null);
-               }
-               IPath exeFile = null;
-               try {
-                       exeFile = CDebugUtils.verifyProgramPath(config);
-                       if (exeFile == null) {
-                               newCoreException(TizenLaunchMessages.CANNOT_LAUNCH, null);
-                       }
-                       DebugPlugin.newProcess(launch, oprofileProc, exeFile
-                                       .toFile().getName());
-                       BufferedReader br = new BufferedReader(new InputStreamReader(
-                                       oprofileProc.getInputStream(), Charset.forName("UTF-8")));
-                       if (null != br) {
-                               while (null != br.readLine()) {
-                                       ;
-                               }
-                               br.close();                             
-                       }
-               } catch (CoreException e) {
-                       // TODO Auto-generated catch block
-                       e.printStackTrace();
-               } catch (IOException e) {
-                       // TODO Auto-generated catch block
-                       e.printStackTrace();
-               }
-       }
-
-       private void preProcedure(ILaunchConfiguration config, ILaunch launch,
-                       IProgressMonitor monitor, String imagePath) throws CoreException {
-               // FIXME: this assumes that project names are always the directory names
-               // in the workspace.
-               // this assumption may be wrong, but a shallow lookup seems ok
-               // jinu removed at 20090603
-               /*
-                * String workspacePath =
-                * ResourcesPlugin.getWorkspace().getRoot().getLocation().toString();
-                * String imagePath = workspacePath + Path.SEPARATOR +
-                * config.getAttribute
-                * (ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, "")
-                * //$NON-NLS-1$ + Path.SEPARATOR +
-                * config.getAttribute(ICDTLaunchConfigurationConstants
-                * .ATTR_PROGRAM_NAME, ""); //$NON-NLS-1$
-                */
-
-               LaunchOptions options = new LaunchOptions(); // default options created
-                                                                                                               // in the constructor
-               options.loadConfiguration(config);
-               // if application is launched via launcher, oprofile samples for the application goes under launchpad daemon binary
-               options.setBinaryImage(LAUNCHPAD_DAEMON); 
-
-               // if daemonEvents null or zero size, the default event will be used
-               String defaultEvent = null;
-               OprofileDaemonEvent[] daemonEvents = null;
-               if (!config.getAttribute(OprofileLaunchPlugin.ATTR_USE_DEFAULT_EVENT,
-                               false)) {
-                       // get the events to profile from the counters
-                       OprofileCounter[] counters = OprofileCounter.getCounters(config);
-                       ArrayList<OprofileDaemonEvent> events = new ArrayList<OprofileDaemonEvent>();
-
-                       for (int i = 0; i < counters.length; ++i) {
-                               if (counters[i].getEnabled())
-                                       events.add(counters[i].getDaemonEvent());
-                       }
-
-                       daemonEvents = new OprofileDaemonEvent[events.size()];
-                       events.toArray(daemonEvents);
-               }
-               // jinu added at 20090602--------------------------------
-               else {
-                       String keyStr = config.getAttribute(
-                                       OprofileLaunchPlugin.ATTR_SELECTED_DEFAULT_SETTING, "");
-                       defaultEvent = DefaultSettingConstants.getSettingValue(keyStr);
-               }
-               // --------------------------------------
-
-               // set up and launch the oprofile daemon
-               try {
-
-                       // kill the daemon (it shouldn't be running already, but to be safe)
-                       OprofileCorePlugin.getDefault().getOpcontrolProvider()
-                                       .shutdownDaemon();
-
-                       // reset data from the (possibly) existing default session,
-                       // otherwise multiple runs will combine samples and results
-                       // won't make much sense
-                       OprofileCorePlugin.getDefault().getOpcontrolProvider().reset();
-
-                       // setup the events and other parameters
-                       // jinu modified at 20090603
-                       // OprofileCorePlugin.getDefault().getOpcontrolProvider().setupDaemon(options.getOprofileDaemonOptions(),
-                       // daemonEvents);
-                       OprofileCorePlugin
-                                       .getDefault()
-                                       .getOpcontrolProvider()
-                                       .setupDaemon(options.getOprofileDaemonOptions(),
-                                                       daemonEvents, defaultEvent);
-
-                       // start the daemon & collection of samples
-                       // note: since the daemon is only profiling for the specific image
-                       // we told
-                       // it to, no matter to start the daemon before the binary itself is
-                       // run
-                       OprofileCorePlugin.getDefault().getOpcontrolProvider()
-                                       .startCollection();
-
-               } catch (OpcontrolException oe) {
-                       OprofileCorePlugin.showErrorDialog("opcontrolProvider", oe); //$NON-NLS-1$
-                       return;
-               }
-
-       }
-
-       private void postProcedure(ILaunchConfiguration config, ILaunch launch,
-                       IProgressMonitor monitor, String remoteExePath) throws CoreException {
-               // ILaunchManager lmgr = DebugPlugin.getDefault().getLaunchManager();
-               // lmgr.addLaunchListener(new LaunchTerminationWatcher(launch));
-
-               // terminate application when stop button clicked
-               String cmd = OprofileCommonConstants.OPROFILE_SCRIPT + " killapp " + getExecutableName(config);
-               CommandManager.runShell(cmd);
-               
-               OprofileCorePlugin.getDefault().getOpcontrolProvider().dumpSamples();
-               OprofileCorePlugin.getDefault().getOpcontrolProvider().shutdownDaemon();
-
-               // need to run this in the ui thread otherwise get SWT Exceptions
-               // based on concurrency issues
-               Display.getDefault().syncExec(new Runnable() {
-                       public void run() {
-                               OprofileView view = OprofileUiPlugin.getDefault()
-                                               .getOprofileView();
-                               if (view != null) {
-                                       view.refreshView();
-                               } else {
-                                       try {
-                                               PlatformUI.getWorkbench().getActiveWorkbenchWindow()
-                                                               .getActivePage()
-                                                               .showView(OprofileUiPlugin.ID_OPROFILE_VIEW);
-                                       } catch (PartInitException e) {
-                                               e.printStackTrace();
-                                       }
-                                       OprofileUiPlugin.getDefault().getOprofileView()
-                                                       .refreshView();
-                               }
-                       }
-               });
-       }
-
-       public static void checkProfilingTool(IProgressMonitor monitor)
-                       throws CoreException {
-               // find oprofile
-               String oprofileCmd = "/usr/bin/opcontrol";
-               String cmd = "ls " + oprofileCmd + TizenPlatformConstants.CMD_SUFFIX;
-               // String resultRsp = session.run(cmd, null);
-               String[] resultRsp = CommandManager.runCommandReturningResultArray(cmd);
-               if (!CommandManager.isRunSuccessfuly(resultRsp)) {
-                       // if (CommandManager.isEmulator()) {
-               Status status = new Status(Status.ERROR, Activator.PLUGIN_ID,
-                               TizenLaunchMessages.CANNOT_LAUNCH,
-                                       new Exception(
-                                                       "No oprofile in this target (" + oprofileCmd + ".)"));
-               throw new CoreException(status);
-                       // } else {
-                       // transferProfilingToolPackage(monitor);
-                       // installProfilingToolPackage(monitor);
-                       // }
-               }
-       }
-
-       static class LaunchTerminationWatcher implements ILaunchesListener2 {
-               private ILaunch launch;
-
-               public LaunchTerminationWatcher(ILaunch il) {
-                       launch = il;
-               }
-
-               public void launchesTerminated(ILaunch[] launches) {
-                       try {
-                               for (ILaunch l : launches) {
-                                       /**
-                                        * Dump samples from the daemon, shut down the daemon,
-                                        * activate the OProfile view (open it if it isn't already),
-                                        * refresh the view (which parses the data/ui model and
-                                        * displays it).
-                                        */
-                                       if (l.equals(launch)) {
-                                               OprofileCorePlugin.getDefault().getOpcontrolProvider()
-                                                               .dumpSamples();
-                                               OprofileCorePlugin.getDefault().getOpcontrolProvider()
-                                                               .shutdownDaemon();
-
-                                               // need to run this in the ui thread otherwise get SWT
-                                               // Exceptions
-                                               // based on concurrency issues
-                                               Display.getDefault().syncExec(new Runnable() {
-                                                       public void run() {
-                                                               OprofileView view = OprofileUiPlugin
-                                                                               .getDefault().getOprofileView();
-                                                               if (view != null) {
-                                                                       view.refreshView();
-                                                               } else {
-                                                                       try {
-                                                                               PlatformUI
-                                                                                               .getWorkbench()
-                                                                                               .getActiveWorkbenchWindow()
-                                                                                               .getActivePage()
-                                                                                               .showView(
-                                                                                                               OprofileUiPlugin.ID_OPROFILE_VIEW);
-                                                                       } catch (PartInitException e) {
-                                                                               e.printStackTrace();
-                                                                       }
-                                                                       OprofileUiPlugin.getDefault()
-                                                                                       .getOprofileView().refreshView();
-                                                               }
-                                                       }
-                                               });
-                                       }
-                               }
-                       } catch (OpcontrolException oe) {
-                               OprofileCorePlugin.showErrorDialog("opcontrolProvider", oe); //$NON-NLS-1$
-                       }
-               }
-
-               public void launchesAdded(ILaunch[] launches) { /* dont care */
-               }
-
-               public void launchesChanged(ILaunch[] launches) { /* dont care */
-               }
-
-               public void launchesRemoved(ILaunch[] launches) { /* dont care */
-               }
-       }
-
-}
diff --git a/org.eclipse.linuxtools.oprofile.launch.exe/src/org/tizen/oprofile/launch/configuration/NormalOprofileLaunchConfigurationTabGroup.java b/org.eclipse.linuxtools.oprofile.launch.exe/src/org/tizen/oprofile/launch/configuration/NormalOprofileLaunchConfigurationTabGroup.java
deleted file mode 100644 (file)
index 10fd2bf..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- *  Normal Oprofile Launch Configuration Tab Group
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.launch.configuration;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
-import org.eclipse.debug.ui.ILaunchConfigurationDialog;
-import org.eclipse.linuxtools.oprofile.launch.configuration.OprofileEventConfigTab;
-import org.eclipse.linuxtools.profiling.launch.ProfileConfigurationMainTab;
-import org.eclipse.linuxtools.profiling.launch.ProfileLaunchConfigurationTabGroup;
-import org.tizen.nativecommon.launch.ui.TizenMainTab;
-import org.tizen.oprofile.launch.TizenOprofileLaunchDelegate;
-
-public class NormalOprofileLaunchConfigurationTabGroup extends ProfileLaunchConfigurationTabGroup {
-
-       public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
-               ArrayList<AbstractLaunchConfigurationTab> tabs = new ArrayList<AbstractLaunchConfigurationTab>();
-               tabs.add(new ProfileConfigurationMainTab());
-//             tabs.add(new TizenArgumentsTab());
-               tabs.addAll(Arrays.asList(getProfileTabs()));
-//             tabs.add(new TizenEnvironmentTab());
-//             tabs.add(new SourceLookupTab());
-               
-               setTabs(tabs.toArray(new AbstractLaunchConfigurationTab[tabs.size()]));
-               
-       }       
-       @Override
-       public AbstractLaunchConfigurationTab[] getProfileTabs() {
-               //jinu modified at 20090602
-               //return new AbstractLaunchConfigurationTab[] { new OprofileSetupTab(), new OprofileEventConfigTab() };
-
-               // added by greatim at 20110613
-               try{
-                       IProgressMonitor monitor = new NullProgressMonitor();
-                       
-                       TizenOprofileLaunchDelegate.checkProfilingTool(monitor);
-               } catch(CoreException e) {
-                       e.printStackTrace();
-               }
-               
-               return new AbstractLaunchConfigurationTab[] { new OprofileEventConfigTab() };
-       }
-
-}
diff --git a/org.eclipse.linuxtools.oprofile.launch/.classpath b/org.eclipse.linuxtools.oprofile.launch/.classpath
deleted file mode 100644 (file)
index 4c62a80..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="src" path="src"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-       <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.linuxtools.oprofile.launch/.project b/org.eclipse.linuxtools.oprofile.launch/.project
deleted file mode 100644 (file)
index 7e16bda..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.eclipse.linuxtools.oprofile.launch</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.eclipse.linuxtools.oprofile.launch/.settings/org.eclipse.core.resources.prefs b/org.eclipse.linuxtools.oprofile.launch/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644 (file)
index bd9cda7..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#Wed Dec 01 09:13:16 CET 2010
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/org.eclipse.linuxtools.oprofile.launch/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.linuxtools.oprofile.launch/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644 (file)
index 30f3872..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#Tue Dec 14 16:36:24 CET 2010
-eclipse.preferences.version=1
-line.separator=\n
diff --git a/org.eclipse.linuxtools.oprofile.launch/META-INF/MANIFEST.MF b/org.eclipse.linuxtools.oprofile.launch/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index 9a1ad35..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-Manifest-Version: 1.0\r
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.4.0",\r
- org.eclipse.ui;bundle-version="3.4.0",\r
- org.eclipse.cdt.core,\r
- org.eclipse.cdt.launch;bundle-version="5.0.1",\r
- org.eclipse.cdt.debug.core;bundle-version="5.0.1",\r
- org.eclipse.linuxtools.oprofile.core,\r
- org.tizen.common,\r
- org.tizen.common.connection\r
-Bundle-Vendor: Eclipse Linux Tools\r
-Bundle-ActivationPolicy: lazy\r
-Bundle-Version: 1.3.18.qualifier\r
-Bundle-Localization: plugin\r
-Bundle-Name: Tizen SDK Oprofile Launch\r
-Bundle-Activator: org.eclipse.linuxtools.oprofile.launch.OprofileLaunc\r
- hPlugin\r
-Bundle-ManifestVersion: 2\r
-Import-Package: org.eclipse.cdt.debug.core,\r
- org.eclipse.cdt.launch,\r
- org.eclipse.cdt.utils.pty,\r
- org.eclipse.cdt.utils.spawner,\r
- org.eclipse.core.resources,\r
- org.eclipse.debug.core,\r
- org.eclipse.debug.ui,\r
- org.eclipse.linuxtools.oprofile.core,\r
- org.eclipse.linuxtools.oprofile.core.daemon,\r
- org.eclipse.linuxtools.oprofile.ui,\r
- org.eclipse.linuxtools.oprofile.ui.view,\r
- org.eclipse.linuxtools.profiling.launch,\r
- org.eclipse.ui,\r
- org.tizen.sdblib,\r
- org.tizen.sdblib.service\r
-Bundle-SymbolicName: org.eclipse.linuxtools.oprofile.launch;singleton:\r
- =true\r
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6\r
-Export-Package: org.tizen.oprofile.launch,\r
- org.eclipse.linuxtools.oprofile.launch,\r
- org.eclipse.linuxtools.oprofile.launch.configuration\r
-\r
diff --git a/org.eclipse.linuxtools.oprofile.launch/META-INF/eclipse.inf b/org.eclipse.linuxtools.oprofile.launch/META-INF/eclipse.inf
deleted file mode 100644 (file)
index 92ffed2..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#Processed using Jarprocessor
-pack200.conditioned = true
diff --git a/org.eclipse.linuxtools.oprofile.launch/NOTICE b/org.eclipse.linuxtools.oprofile.launch/NOTICE
deleted file mode 100644 (file)
index 82ee064..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-2010-02-03 SPRC SDK Team <d.kozinski@samsung.com>\r
-       * MANIFEST.MF : changed some package names\r
-\r
-2010-03-11 SPRC SDK Team <d.kozinski@samsung.com>\r
-       * OprofileEventConfigTab.java : add help string\r
-\r
-2010-11-05 sdk <sdk@sdk-laptop.(none)>\r
-       * MANIFEST.MF : changed some package name\r
-       * plugin.xml : changed some package name\r
-       * OprofileEventConfigTab.java : changed some package name\r
-       * OprofileLaunchConfigurationDelegate.java : changed some package name\r
-       * OprofileLaunchShortcut.java : changed some package name\r
-\r
-2010-11-09 DongGi Jang <dg0402.jang.samsung.com>\r
-       * MANIFEST.MF : changed launcher name\r
-\r
-2011-06-09 jaewon81.lim <jaewon81.lim@samsung.com>\r
-       * MANIFEST.MF : rearrange plugins dependency\r
-\r
-2011-06-13 jaewon81.lim <jaewon81.lim@samsung.com>\r
-       * OprofileEventConfigTab.java : some bug fix\r
-\r
-2011-07-13 jaewon81.lim <jaewon81.lim@samsung.com>\r
-       * MANIFEST.MF : modified import package name\r
-\r
-2011-08-22 joogwan.kim <joogwan.kim@samsung.com>\r
-       * MANIFEST.MF : Change plug-in name\r
-\r
-2011-08-25 wonhyoung2.park <wonhyoung2.park@samsung.com>\r
-       * MANIFEST.MF : plugin provider and name modified\r
-\r
-2011-11-16 wonhyoung2.park <wonhyoung2.park@samsung.com>\r
-       * MANIFEST.MF : Profiler sdb apply\r
-\r
-2011-11-22 taeyoung2.son <taeyoung2.son@samsung.com>\r
-       * MANIFEST.MF :  Modify SDK naming from "SLP(or Samsung Linux Platform)" to "Tizen"\r
-\r
-2011-11-29 wonhyoung2.park <wonhyoung2.park@samsung.com>\r
-       * MANIFEST.MF : chagne slp to tizen\r
-       * plugin.xml : chagne slp to tizen\r
-       * OprofileEventConfigTab.java : chagne slp to tizen\r
-       * OprofileLaunchConfigurationDelegate.java : chagne slp to tizen\r
-\r
-2011-12-02 taeyoung2.son <taeyoung2.son@samsung.com>\r
-       * MANIFEST.MF : Delete dependency feature's version value.\r
-\r
-2011-12-03 wonhyoung2.park <wonhyoung2.park@samsung.com>\r
-       * MANIFEST.MF : package instll routine chage\r
diff --git a/org.eclipse.linuxtools.oprofile.launch/about.html b/org.eclipse.linuxtools.oprofile.launch/about.html
deleted file mode 100644 (file)
index bf06e8c..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-<p>8th September, 2004</p>     
-<h3>License</h3>
-<p>The Eclipse Software Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the EPL, any Contributions, as defined in the EPL, uploaded, submitted, or otherwise
-made available to the Eclipse Foundation, its members and/or the host of the Eclipse Foundation web site, by you that relate to such
-Content are provided under the terms and conditions of the <a href="http://www.eclipse.org/legal/termsofuse.html">Terms of Use</a>
-for the Eclipse Foundation web site and can be made available to others under the terms of the licenses as set out in the
-<a href="http://www.eclipse.org/legal/termsofuse.html">Terms of Use</a>.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the EPL (&quot;Other License&quot;), any modifications, enhancements and/or
-other code and/or documentation (&quot;Modifications&quot;) uploaded, submitted, or otherwise made available to the Eclipse Foundation, its members and/or the
-host of the Eclipse Foundation web site, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License.  In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the <a href="http://www.eclipse.org/legal/termsofuse.html">Terms of Use</a>
-for the Eclipse Foundation web site and such Modifications can be made available to others under the terms of the licenses as set out in the
-<a href="http://www.eclipse.org/legal/termsofuse.html">Terms of Use</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.oprofile.launch/build.properties b/org.eclipse.linuxtools.oprofile.launch/build.properties
deleted file mode 100644 (file)
index 6b70fb2..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
-               .,\
-               plugin.xml,\
-               plugin.properties,\
-               icons/,\
-               about.html
-javacSource = 1.6
-javacTarget = 1.6
diff --git a/org.eclipse.linuxtools.oprofile.launch/icons/event_tab.gif b/org.eclipse.linuxtools.oprofile.launch/icons/event_tab.gif
deleted file mode 100644 (file)
index c91f254..0000000
Binary files a/org.eclipse.linuxtools.oprofile.launch/icons/event_tab.gif and /dev/null differ
diff --git a/org.eclipse.linuxtools.oprofile.launch/icons/global_tab.gif b/org.eclipse.linuxtools.oprofile.launch/icons/global_tab.gif
deleted file mode 100644 (file)
index ec6cca4..0000000
Binary files a/org.eclipse.linuxtools.oprofile.launch/icons/global_tab.gif and /dev/null differ
diff --git a/org.eclipse.linuxtools.oprofile.launch/icons/profile_run.png b/org.eclipse.linuxtools.oprofile.launch/icons/profile_run.png
deleted file mode 100644 (file)
index 4f8488f..0000000
Binary files a/org.eclipse.linuxtools.oprofile.launch/icons/profile_run.png and /dev/null differ
diff --git a/org.eclipse.linuxtools.oprofile.launch/plugin.properties b/org.eclipse.linuxtools.oprofile.launch/plugin.properties
deleted file mode 100644 (file)
index fd1976b..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#*******************************************************************************
-# Copyright (c) 2008 Red Hat, Inc.
-# 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:
-#    Red Hat, Inc. - initial API and implementation
-#*******************************************************************************
-pluginName=OProfile Launch Support
-launchconfigurationtype.label=Profile With OProfile
-
-launchgroup.label = OProfile
-launchgroup.titile = Select a run configuration to profile with OProfile
-
-launchmode.label = Profile
-launchmode.launchaslabel = Profile As
-
-launchshortcuts.label = Profile With OProfile
diff --git a/org.eclipse.linuxtools.oprofile.launch/plugin.xml b/org.eclipse.linuxtools.oprofile.launch/plugin.xml
deleted file mode 100644 (file)
index ea3089e..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
-
-        <extension
-              point="org.eclipse.ui.startup">
-           <startup
-                 class="org.tizen.oprofile.launch.listen.OprofileStartup">
-           </startup>
-        </extension>   
-  
-   
-   
-   
-</plugin>
diff --git a/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/OprofileLaunchMessages.java b/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/OprofileLaunchMessages.java
deleted file mode 100644 (file)
index 869bd29..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.oprofile.launch;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class OprofileLaunchMessages {
-       private static final String BUNDLE_NAME = "org.eclipse.linuxtools.oprofile.launch.oprofilelaunch"; //$NON-NLS-1$
-       private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
-
-       private OprofileLaunchMessages() {
-       }
-
-       public static String getString(String key) {
-               try {
-                       return RESOURCE_BUNDLE.getString(key);
-               } catch (MissingResourceException e) {
-                       return '!' + key + '!';
-               }
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/OprofileLaunchPlugin.java b/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/OprofileLaunchPlugin.java
deleted file mode 100644 (file)
index fd46c29..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008, 2009 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *    Kent Sebastian <ksebasti@redhat.com>
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.launch;
-
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.linuxtools.oprofile.launch.configuration.EventConfigCache;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class OprofileLaunchPlugin extends AbstractUIPlugin {
-       //The shared instance.
-       private static OprofileLaunchPlugin plugin;
-       //shared cache instance for configuration
-       private static EventConfigCache _eventConfigCache = null;
-
-       private static final String ID_PLUGIN = "org.eclipse.linuxtools.oprofile.launch"; //$NON-NLS-1$
-
-       // The launch type ID for profiling
-       public static final String ID_LAUNCH_PROFILE = ID_PLUGIN + ".oprofile"; //$NON-NLS-1$
-
-
-       /* Launch Configuration attributes */
-       
-       // Global options \\
-       public static final String ATTR_KERNEL_IMAGE_FILE = ID_LAUNCH_PROFILE + ".KERNEL_IMAGE";                        //$NON-NLS-1$
-       public static final String ATTR_SEPARATE_SAMPLES = ID_LAUNCH_PROFILE + ".SEPARATE_SAMPLES";             //$NON-NLS-1$
-       public static final String ATTR_USE_DEFAULT_EVENT = ID_LAUNCH_PROFILE + ".USE_DEFAULT_EVENT";           //$NON-NLS-1$
-       
-       //jinu added at 20090602
-       public static final String ATTR_SELECTED_DEFAULT_SETTING = ID_LAUNCH_PROFILE + ".SELECTED_DEFAULT_SETTING";             //$NON-NLS-1$
-       
-       // Counter Attributes \\
-       private static final String ATTR_COUNTER(int nr) { return ID_LAUNCH_PROFILE + ".COUNTER_" + nr; }                                       //$NON-NLS-1$
-       public static final String ATTR_COUNTER_ENABLED(int nr)  { return ATTR_COUNTER(nr) + ".ENABLED"; }                                      //$NON-NLS-1$
-       public static final String ATTR_COUNTER_EVENT(int nr) { return ATTR_COUNTER(nr)  + ".EVENT"; }                                          //$NON-NLS-1$
-       public static final String ATTR_COUNTER_PROFILE_KERNEL(int nr) { return ATTR_COUNTER(nr) + ".PROFILE_KERNEL"; }         //$NON-NLS-1$
-       public static final String ATTR_COUNTER_PROFILE_USER(int nr) { return ATTR_COUNTER(nr) + ".PROFILE_USER"; }             //$NON-NLS-1$
-       public static final String ATTR_COUNTER_COUNT(int nr) { return ATTR_COUNTER(nr) + ".COUNT"; }                                           //$NON-NLS-1$
-       public static final String ATTR_COUNTER_UNIT_MASK(int nr) { return  ATTR_COUNTER(nr) + ".UNIT_MASK"; }                          //$NON-NLS-1$
-       
-       
-       public static final String ICON_PATH = "icons/"; //$NON-NLS-1$
-       public static final String ICON_EVENT_TAB = ICON_PATH + "event_tab.gif"; //$NON-NLS-1$
-       public static final String ICON_GLOBAL_TAB = ICON_PATH + "global_tab.gif"; //$NON-NLS-1$
-       
-       
-       /**
-        * The constructor.
-        */
-       public OprofileLaunchPlugin() {
-               plugin = this;
-       }
-
-       public void start(BundleContext context) throws Exception {
-               super.start(context);
-       }
-
-       public void stop(BundleContext context) throws Exception {
-               super.stop(context);
-               plugin = null;
-       }       
-
-       public static OprofileLaunchPlugin getDefault() {
-               return plugin;
-       }
-
-       public static IWorkspace getWorkspace() {
-               return ResourcesPlugin.getWorkspace();
-       }
-       
-       public static String getUniqueIdentifier() {
-               return ID_PLUGIN;
-       }
-       
-       public static ImageDescriptor getImageDescriptor(String path) {
-               return imageDescriptorFromPlugin(ID_PLUGIN, path);
-       }
-
-       public static IWorkbenchWindow getActiveWorkbenchWindow() {
-               return getDefault().getWorkbench().getActiveWorkbenchWindow();
-       }
-       
-       public static Shell getActiveWorkbenchShell() {
-               IWorkbenchWindow window = getActiveWorkbenchWindow();
-               if (window != null) {
-                       return window.getShell();
-               }
-               return null;
-       }       
-
-       public static EventConfigCache getCache() {
-               if (_eventConfigCache == null) {
-                       _eventConfigCache = new EventConfigCache();
-               }
-               
-               return _eventConfigCache;
-       }
-
-}
diff --git a/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/configuration/EventConfigCache.java b/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/configuration/EventConfigCache.java
deleted file mode 100644 (file)
index 2538fcd..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Red Hat, Inc.
- * 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:
- *    Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
- *    
- *******************************************************************************/
-package org.eclipse.linuxtools.oprofile.launch.configuration;
-
-import java.util.HashMap;
-import org.eclipse.linuxtools.oprofile.core.Oprofile;
-
-/**
- * Cache class for event configuration. Currently only used to cache the results
- * of an `opxml check-event ..` run, since the isValid() method in the EventConfigTab
- * needlessly spawns opxml dozens of times with the same values. Note that multiple
- * checks of the same value will necessarily return the same result (for a given 
- * processor) so there is no worry of an invalid cache entry.
- */
-public class EventConfigCache {
-       //a cache entry for an event check, used as the hashmap key 
-       static class CheckEventEntry {
-               public Integer counterNum, eventNum, maskValue;
-               
-               public CheckEventEntry(int counterNum, int eventNum, int maskValue) {
-                       this.counterNum = new Integer(counterNum);
-                       this.eventNum = new Integer(eventNum);
-                       this.maskValue = new Integer(maskValue);
-               }
-               
-               @Override
-               public boolean equals(Object obj) {
-                       if (obj instanceof CheckEventEntry) {
-                               CheckEventEntry other = (CheckEventEntry)obj;
-                               return (counterNum.equals(other.counterNum) && eventNum.equals(other.eventNum) && maskValue.equals(other.maskValue));
-                       } else {
-                               return false;
-                       }
-               }
-               
-               @Override
-               public int hashCode() {
-                       int prime = 11, result = 3;
-                       result = prime*result + counterNum.hashCode();
-                       result = prime*result + eventNum.hashCode();
-                       result = prime*result + maskValue.hashCode();
-                       return result;
-               }
-       }
-       
-       HashMap<CheckEventEntry, Boolean> validEventCache;
-
-       /**
-        * Default constructor, creates an empty cache.
-        */
-       public EventConfigCache() {
-               validEventCache = new HashMap<CheckEventEntry, Boolean>();
-       }
-
-       /**
-        * Method to be used to check the validity of an event. Will check
-        * the cache for the result of a previous check of the same values,
-        * or otherwise will spawn opxml to check properly.
-        * @param counter counter number
-        * @param event event number
-        * @param mask unit mask value
-        * @return true or false, depending if the event config is valid
-        */
-       // seokgil.kang modified at 20140328
-       public boolean checkEvent(int counter, int event, int mask) {
-               CheckEventEntry e = new CheckEventEntry(counter, event, mask);
-//             Boolean result = null;
-//             
-//             result = validEventCache.get(e);
-//             
-//             if (result == null) {
-//                     //not in the map, get its value and add it in
-//                     result = Oprofile.checkEvent(counter, event, mask);
-//                     
-//                     //possible to be null if there is no opxmlProvider
-//                     if (result != null) {
-//                             validEventCache.put(e, result);
-//                     }
-//             }
-//
-//             return (result == null ? false : result);
-               
-               Boolean result = null;
-               int res = 0;
-               
-               result = validEventCache.get(e);
-               
-               if (result == null) {
-                       //not in the map, get its value and add it in
-                       res = Oprofile.checkEvent(counter, event, mask);
-                       
-                       //possible to be -1 if there is no opxmlProvider
-                       if (res != -1) {
-                               validEventCache.put(e, result);
-                       }
-               }
-
-               if (result == null) {
-                       if (res == -1) {
-                               return false;
-                       } else if (res == 1) {
-                               return true;
-                       } else {
-                               return false;
-                       }
-               } else {
-                       return result;
-               }
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/configuration/LaunchOptions.java b/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/configuration/LaunchOptions.java
deleted file mode 100644 (file)
index 11ceeb4..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004,2008 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *    Kent Sebastian <ksebasti@redhat.com> - 
- *******************************************************************************/ 
-
-package org.eclipse.linuxtools.oprofile.launch.configuration;
-
-import java.io.File;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.linuxtools.oprofile.core.daemon.OprofileDaemonOptions;
-import org.eclipse.linuxtools.oprofile.launch.OprofileLaunchPlugin;
-
-/**
- * This class wraps OProfile's global launch options for the
- * Eclipse launcher facility.
- */
-public class LaunchOptions {
-       
-       // The launch options for the daemon
-       private OprofileDaemonOptions _options;
-
-       public LaunchOptions() {
-               _options = new OprofileDaemonOptions();
-       }
-       
-       /**
-        * Determines whether the global oprofile options represented by this
-        * object are valid
-        * @return whether the options are valid
-        */
-       public boolean isValid() {
-               // The only point of contention is whether the specified vmlinux *file* exists.
-               String fn = _options.getKernelImageFile();
-               if (fn != null && fn.length() > 0) {
-                       File file = new File(_options.getKernelImageFile());
-                       return (file.exists() && file.isFile());
-               }
-               
-               return true;
-       }
-       
-       /**
-        * Saves the global options of this object into the specified launch
-        * configuration
-        * @param config        the launch configuration
-        */
-       public void saveConfiguration(ILaunchConfigurationWorkingCopy config) {
-               config.setAttribute(OprofileLaunchPlugin.ATTR_KERNEL_IMAGE_FILE, _options.getKernelImageFile());
-               config.setAttribute(OprofileLaunchPlugin.ATTR_SEPARATE_SAMPLES, _options.getSeparateProfilesMask());
-       }
-       
-       /**
-        * Loads this object with the global options in the given launch
-        * configuration
-        * @param config        the launch configuration
-        */
-       public void loadConfiguration(ILaunchConfiguration config) {
-               try {
-                       _options.setKernelImageFile(config.getAttribute(OprofileLaunchPlugin.ATTR_KERNEL_IMAGE_FILE, "")); //$NON-NLS-1$
-                       _options.setSeparateProfilesMask(config.getAttribute(OprofileLaunchPlugin.ATTR_SEPARATE_SAMPLES, OprofileDaemonOptions.SEPARATE_NONE));
-               } catch (CoreException e) {
-                       e.printStackTrace();
-               }
-       }
-       
-       /**
-        * Get the daemon launch options
-        * @return the OprofileDaemonOption
-        */
-       public OprofileDaemonOptions getOprofileDaemonOptions() {
-               return _options;
-       }
-       
-       /**
-        * Method getKernelImageFile.
-        * @return the kernel image file
-        */
-       public String getKernelImageFile() {
-               return _options.getKernelImageFile();
-       }
-       
-       /**
-        * Sets the kernel image file
-        * @param image the kernel image file
-        */
-       public void setKernelImageFile(String image) {
-               _options.setKernelImageFile(image);
-       }
-
-       /**
-        * Method getSeparateSamples.
-        * @return whether and how to separate samples for each distinct application
-        */
-       public int getSeparateSamples() {
-               return _options.getSeparateProfilesMask();
-       }
-
-       /**
-        * Sets whether/how to collect separate samples for each distinct application
-        * @param how   one of SEPARATE_{NONE, LIBRARY, KERNEL, THREAD, CPU}
-        */
-       public void setSeparateSamples(int how) {
-               _options.setSeparateProfilesMask(how);
-       }
-       
-       /**
-        * Returns the path of the binary to profile.
-        * @return the full path to the binary being profile
-        */
-       public String getBinaryImage() {
-               return _options.getBinaryImage();
-       }
-
-       /**
-        * Sets the binary to profile in this launch.
-        * @param _image string of the full path to the binary
-        */
-       public void setBinaryImage(String _image) {
-               _options.setBinaryImage(_image);
-       }
-
-}
diff --git a/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/configuration/OprofileCounter.java b/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/configuration/OprofileCounter.java
deleted file mode 100644 (file)
index 40745ef..0000000
+++ /dev/null
@@ -1,253 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004,2008 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *    Kent Sebastian <ksebasti@redhat.com>
- *******************************************************************************/ 
-
-package org.eclipse.linuxtools.oprofile.launch.configuration;
-
-import java.text.MessageFormat;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.linuxtools.oprofile.core.Oprofile;
-import org.eclipse.linuxtools.oprofile.core.daemon.OpEvent;
-import org.eclipse.linuxtools.oprofile.core.daemon.OpUnitMask;
-import org.eclipse.linuxtools.oprofile.core.daemon.OprofileDaemonEvent;
-import org.eclipse.linuxtools.oprofile.launch.OprofileLaunchPlugin;
-import org.eclipse.linuxtools.oprofile.launch.OprofileLaunchMessages;
-
-/**
- * This class represents an oprofile runtime configuration of a counter. It is
- * used to construct arguments for launching op_start on the host. It
- * simply wraps OprofileDaemonEvent.
- */
-public class OprofileCounter {
-       private static final String COUNTER_STRING = OprofileLaunchMessages.getString("oprofileCounter.counterString"); //$NON-NLS-1$
-       
-       // The counter number
-       private int _number;
-       
-       // Is this counter enabled?
-       private boolean _enabled;
-       
-       // The event to collect on this counter
-       private OprofileDaemonEvent _daemonEvent;
-       
-       // List of valid events on this counter
-       private OpEvent[] _eventList = null;
-
-       /**
-        * Constructor for OprofileCounter.
-        * @param nr    the counter number
-        */
-       public OprofileCounter(int nr) {
-               _number = nr;
-               _enabled = false;
-               _eventList = Oprofile.getEvents(_number);
-               _daemonEvent = new OprofileDaemonEvent();
-       }
-
-       /**
-        * Constructs all of the counters in  the given launch configuration.
-        * @param config the launch configuration
-        * @return an array of all counters
-        */
-       public static OprofileCounter[] getCounters(ILaunchConfiguration config) {
-               OprofileCounter[] ctrs = new OprofileCounter[Oprofile.getNumberOfCounters()];
-               for (int i = 0; i < ctrs.length; i++)
-               {
-                       ctrs[i] = new OprofileCounter(i);
-                       if (config != null)
-                               ctrs[i].loadConfiguration(config);
-               }
-               
-               return ctrs;
-       }
-
-       /**
-        * Method setEnabled.
-        * @param enabled       whether to set this counter as enabled
-        */
-       public void setEnabled(boolean enabled) {
-               _enabled = enabled;
-       }
-       
-       /**
-        * Method setEvent.
-        * @param event the event for this counter
-        */
-       public void setEvent(OpEvent event) {
-               _daemonEvent.setEvent(event);
-       }
-       
-       /**
-        * Method setProfileKernel.
-        * @param profileKernel whether this counter should count kernel events
-        */
-       public void setProfileKernel(boolean profileKernel) {
-               _daemonEvent.setProfileKernel(profileKernel);
-       }
-       
-       /**
-        * Method setProfileUser.
-        * @param profileUser   whether this counter should count user events
-        */
-       public void setProfileUser(boolean profileUser) {
-               _daemonEvent.setProfileUser(profileUser);
-       }
-       
-       /**
-        * Method setCount.
-        * @param count the number of events between samples for this counter
-        */
-       public void setCount(int count) {
-               _daemonEvent.setResetCount(count);
-       }
-       
-       /**
-        * Saves this counter's configuration into the specified launch
-        * configuration.
-        * @param config        the launch configuration
-        */
-       public void saveConfiguration(ILaunchConfigurationWorkingCopy config) {
-               config.setAttribute(OprofileLaunchPlugin.ATTR_COUNTER_ENABLED(_number), _enabled);
-               if (_daemonEvent.getEvent() != null) {
-                       config.setAttribute(OprofileLaunchPlugin.ATTR_COUNTER_EVENT(_number), _daemonEvent.getEvent().getText());
-                       config.setAttribute(OprofileLaunchPlugin.ATTR_COUNTER_UNIT_MASK(_number), _daemonEvent.getEvent().getUnitMask().getMaskValue());
-               }
-               config.setAttribute(OprofileLaunchPlugin.ATTR_COUNTER_PROFILE_KERNEL(_number), _daemonEvent.getProfileKernel());
-               config.setAttribute(OprofileLaunchPlugin.ATTR_COUNTER_PROFILE_USER(_number), _daemonEvent.getProfileUser());
-               config.setAttribute(OprofileLaunchPlugin.ATTR_COUNTER_COUNT(_number), _daemonEvent.getResetCount());
-       }
-       
-       /**
-        * Loads a counter configuration from the specified launch configuration.
-        * @param config        the launch configuration
-        */
-       public void loadConfiguration(ILaunchConfiguration config) {
-               try {
-                       _enabled = config.getAttribute(OprofileLaunchPlugin.ATTR_COUNTER_ENABLED(_number), false);
-
-                       String str = config.getAttribute(OprofileLaunchPlugin.ATTR_COUNTER_EVENT(_number), ""); //$NON-NLS-1$
-                       _daemonEvent.setEvent(_eventFromString(str));
-
-                       if (_daemonEvent.getEvent() == null) {
-                               return;
-                       }
-                       
-                       
-                       int maskValue =  config.getAttribute(OprofileLaunchPlugin.ATTR_COUNTER_UNIT_MASK(_number), OpUnitMask.SET_DEFAULT_MASK);
-                       _daemonEvent.getEvent().getUnitMask().setMaskValue(maskValue);
-                       
-                       _daemonEvent.setProfileKernel(config.getAttribute(OprofileLaunchPlugin.ATTR_COUNTER_PROFILE_KERNEL(_number), false));
-                       _daemonEvent.setProfileUser(config.getAttribute(OprofileLaunchPlugin.ATTR_COUNTER_PROFILE_USER(_number), false));
-                       
-                       _daemonEvent.setResetCount(config.getAttribute(OprofileLaunchPlugin.ATTR_COUNTER_COUNT(_number), OprofileDaemonEvent.COUNT_UNINITIALIZED));
-               } catch (CoreException e) {
-                       e.printStackTrace();
-               }
-       }
-       
-       public OpUnitMask getUnitMask() {
-               OpEvent event = _daemonEvent.getEvent();
-               
-               if (event != null) {
-                       return event.getUnitMask();
-               } else {
-                       return null;
-               }
-       }
-       
-       /**
-        * Returns a textual label for this counter (used by UI)
-        * @return the label to use in widgets referring to this counter
-        */
-       public String getText() {
-               Object[] args = new Object[] {new Integer(_number)};
-               return MessageFormat.format(COUNTER_STRING, args);
-       }
-       
-       /**
-        * Method getNumber.
-        * @return the counter's number
-        */
-       public int getNumber() {
-               return _number;
-       }
-       
-       /**
-        * Method getEnabled.
-        * @return whether this counter is enabled
-        */
-       public boolean getEnabled() {
-               return _enabled;
-       }
-
-       /**
-        * Method getEvent.
-        * @return the event for this counter
-        */
-       public OpEvent getEvent() {
-               return _daemonEvent.getEvent();
-       }
-       
-       /**
-        * Method getProfileKernel.
-        * @return whether this counter is counting kernel events
-        */
-       public boolean getProfileKernel() {
-               return _daemonEvent.getProfileKernel();
-       }
-       
-       /**
-        * Method getProfileUser.
-        * @return whether this counter is counting user events
-        */
-       public boolean getProfileUser() {
-               return _daemonEvent.getProfileUser();
-       }
-
-       /**
-        * Method getCount.
-        * @return the number of events between samples for this counter
-        */
-       public int getCount() {
-               return _daemonEvent.getResetCount();
-       }
-       
-       /**
-        * Method getValidEvents.
-        * @return an array of all events that this counter can monitor
-        */
-       public OpEvent[] getValidEvents() {             
-               return _eventList;
-       }
-       
-       /**
-        * Gets the daemon event configuration for this counter.
-        * <B>Not</B> valid if this counter is not enabled!
-        * @return the OprofileDaemonEvent
-        */
-       public OprofileDaemonEvent getDaemonEvent() {
-               return _daemonEvent;
-       }
-
-       // Returns the event with the same label as the parameter STR
-       private OpEvent _eventFromString(String str) {
-               for (int i = 0; i < _eventList.length; i++) {
-                       if (_eventList[i].getText().equals(str))
-                               return _eventList[i];
-               }
-               
-               return null;
-       }
-}
-
diff --git a/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/configuration/OprofileEventConfigTab.java b/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/configuration/OprofileEventConfigTab.java
deleted file mode 100644 (file)
index b0085a0..0000000
+++ /dev/null
@@ -1,919 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008, 2009 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *    Kent Sebastian <ksebasti@redhat.com> -
- *    
- * CounterSubTab Contributors:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation (before subclassing)
- *    Kent Sebastian <ksebasti@redhat.com> - turned into a sub class,
- *          changed layouts, fixed up some interactivity issues, ..
- * 
- * UnitMaskViewer Contributors:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *    Kent Sebastian <ksebasti@redhat.com>
- *******************************************************************************/
-
-package org.eclipse.linuxtools.oprofile.launch.configuration;
-
-import java.text.MessageFormat;
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ListViewer;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.linuxtools.oprofile.core.Oprofile;
-import org.eclipse.linuxtools.oprofile.core.OprofileCorePlugin;
-import org.eclipse.linuxtools.oprofile.core.daemon.OpEvent;
-import org.eclipse.linuxtools.oprofile.core.daemon.OpUnitMask;
-import org.eclipse.linuxtools.oprofile.core.daemon.OprofileDaemonEvent;
-import org.eclipse.linuxtools.oprofile.launch.OprofileLaunchMessages;
-import org.eclipse.linuxtools.oprofile.launch.OprofileLaunchPlugin;
-import org.eclipse.linuxtools.profiling.launch.ProfileLaunchPlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.ScrolledComposite;
-import org.eclipse.swt.custom.StackLayout;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.TabFolder;
-import org.eclipse.swt.widgets.TabItem;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-
-import org.tizen.oprofile.core.OprofileComm;
-import org.tizen.oprofile.launch.DefaultSettingConstants;
-
-
-/**
- * Thic class represents the event configuration tab of the launcher dialog.
- */
-public class OprofileEventConfigTab extends AbstractLaunchConfigurationTab {
-       private Button _defaultEventCheck;
-       private OprofileCounter[] _counters ;
-       private CounterSubTab[] _counterSubTabs;
-       private StackLayout stackLayout = new StackLayout();
-       TabFolder tabFolder;
-       Group buttonGroup;
-
-       
-       
-       private boolean canInitialize; 
-
-       /**
-        * Essentially the constructor for this tab; creates the 'default event'
-        * checkbox and an appropriate number of counter tabs.
-        * @param parent the parent composite
-        */
-       public void createControl(Composite parent) {
-               Oprofile.initialize();
-               Composite top = new Composite(parent, SWT.NONE);
-               setControl(top);
-               top.setLayout(new GridLayout());
-               
-               // TODO : have to change help context id (temporarily empty string)
-               PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), ""); //$NON-NLS-1$
-
-               //jinu added at 20090602----------------------
-               if(ProfileLaunchPlugin.checkTarget() == 0 || Oprofile.getOpInfo()==null){
-                       Label timerModeLabel = new Label(top, SWT.LEFT);
-                       timerModeLabel.setText(OprofileLaunchMessages.getString("common.notarget")); //$NON-NLS-1$
-                       canInitialize = false;
-                       return;
-               }else{
-                       canInitialize = true;
-               }
-               //--------------------------------------
-               
-               if (Oprofile.getTimerMode()) {
-                       Label timerModeLabel = new Label(top, SWT.LEFT);
-                       timerModeLabel.setText(OprofileLaunchMessages.getString("tab.event.timermode.no.options")); //$NON-NLS-1$
-               } else {
-                       createVerticalSpacer(top, 1);
-       
-                       _counters = OprofileCounter.getCounters(null);
-                       
-                       //default event checkbox
-                       _defaultEventCheck = new Button(top, SWT.CHECK);
-                       _defaultEventCheck.setText(OprofileLaunchMessages.getString("tab.event.defaultevent.button.text")); //$NON-NLS-1$
-                       _defaultEventCheck.setLayoutData(new GridData());
-                       _defaultEventCheck.addSelectionListener(new SelectionAdapter() {
-                               public void widgetSelected(SelectionEvent se) {
-                                       _handleEnabledToggle();
-                               }
-                       });
-       
-                       createVerticalSpacer(top, 1);
-                       
-                       //tabs for each of the counters
-                       OprofileCounter[] counters = OprofileCounter.getCounters(null);
-                       TabItem[] counterTabs = new TabItem[counters.length];
-                       _counterSubTabs = new CounterSubTab[counters.length];
-       
-                       //jinu added at 20090602 -------------------------------
-                       Composite stackComp = new Composite(top, SWT.NONE);
-                       stackComp.setLayout(stackLayout);
-                       stackComp.setLayoutData(new GridData(GridData.FILL_BOTH));
-                       
-                       buttonGroup = new Group(stackComp,SWT.BORDER);
-                       buttonGroup.setText("Supported Type");
-                       buttonGroup.setLayout(new GridLayout(1,false));
-                       
-                       String[][] defaultSettings = DefaultSettingConstants.getDefaultSettings();
-                       for(int i=0;i<defaultSettings.length;i++){
-                               Button button = new Button(buttonGroup, SWT.RADIO);
-                               button.setText(defaultSettings[i][0]);
-                               button.addSelectionListener(new SelectionAdapter() {
-                                       public void widgetSelected(SelectionEvent se) {
-                                               _handleDefaultSettingToggle();
-                                       }
-                               });
-                       }
-                       
-                       tabFolder = new TabFolder(stackComp, SWT.NONE);
-                       tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-                       //--------------------------------------
-       
-                       //jinu removed at 20090602
-                       /*
-                       TabFolder tabFolder = new TabFolder(top, SWT.NONE);
-                       tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-                        */
-       
-                       for (int i = 0; i < counters.length; i++) {
-                               Composite c = new Composite(tabFolder, SWT.NONE);
-                               CounterSubTab currentTab = new CounterSubTab(c, counters[i]);
-                               _counterSubTabs[i] = currentTab;
-                               
-                               counterTabs[i] = new TabItem(tabFolder, SWT.NONE);
-                               counterTabs[i].setControl(c);
-                               counterTabs[i].setText(OprofileLaunchMessages.getString("tab.event.counterTab.counterText") + String.valueOf(i)); //$NON-NLS-1$
-                       }
-                       
-               }
-       }
-       
-       //jinu added at 20090602
-       private void setButtonSelection(String keyStr){
-               Control[] controls = buttonGroup.getChildren();
-               for(int i=0;i<controls.length;i++){
-                       String str = ((Button)controls[i]).getText();
-                       
-                       if (str.equals(keyStr)){
-                               ((Button)controls[i]).setSelection(true);
-                               return;
-                       }
-               }
-               
-               if(controls.length>0)
-                       ((Button)controls[0]).setSelection(true);
-       }
-       
-       //jinu added at 20090602
-       private String getSelectedButton(){
-               Control[] controls = buttonGroup.getChildren();
-               String ret=null;
-               for(int i=0;i<controls.length;i++){
-                       boolean bool = ((Button)controls[i]).getSelection();
-                       
-                       if (bool){
-                               ret = ((Button)controls[i]).getText();
-                               break;
-                       }
-               }
-               
-               return ret;
-       }
-
-       //jinu added at 20090602
-       private void _handleDefaultSettingToggle(){
-               updateLaunchConfigurationDialog();
-       }
-       
-       /**
-        * @see ILaunchConfigurationTab#initializeFrom(ILaunchConfiguration)
-        */
-       public void initializeFrom(ILaunchConfiguration config) {
-               //jinu added at 20090602--------------------------------
-               if(!canInitialize){
-                       return;
-               }
-               //--------------------------------------
-               
-               if (!Oprofile.getTimerMode()) {
-                       try {
-                               for (int i = 0; i < _counters.length; i++) {
-                                       _counters[i].loadConfiguration(config);
-                               }
-                               
-                               for (CounterSubTab tab : _counterSubTabs) {
-                                       tab.initializeTab(config);
-                               }
-       
-                               boolean enabledState = config.getAttribute(OprofileLaunchPlugin.ATTR_USE_DEFAULT_EVENT, true);
-                               _defaultEventCheck.setSelection(enabledState);
-                               
-                               //jinu added at 20090602-----------------------------
-                               String type = config.getAttribute(OprofileLaunchPlugin.ATTR_SELECTED_DEFAULT_SETTING, "");
-                               setButtonSelection(type);
-                               //--------------------------------------
-                               
-                               setEnabledState(!enabledState);
-       
-                               updateLaunchConfigurationDialog();
-                       } catch (CoreException e) {
-                               e.printStackTrace();
-                       }
-               }
-       }
-
-       /**
-        * @see ILaunchConfigurationTab#isValid(ILaunchConfiguration)
-        */
-       public boolean isValid(ILaunchConfiguration config) {
-               //jinu added at 20090608--------------------------------
-               if(!canInitialize || ProfileLaunchPlugin.checkTarget() == 0){
-                       setErrorMessage(OprofileLaunchMessages.getString("common.notarget"));
-                       return false;
-               }
-               //--------------------------------------
-               
-               if (Oprofile.getTimerMode()) {
-                       return true;            //no options to check for validity
-               } else {
-                       int numEnabledEvents = 0;
-                       boolean valid = true;
-       
-                       try {
-                               if (config.getAttribute(OprofileLaunchPlugin.ATTR_USE_DEFAULT_EVENT, false)) {
-                                       numEnabledEvents = 1;
-                               } else {
-                                       //This seems like an odd way to validate, but since most of the validation
-                                       // is done with the OprofileDaemonEvent that the counter wraps, this
-                                       // is the easiest way.
-                                       OprofileCounter[] counters = new OprofileCounter[Oprofile.getNumberOfCounters()];
-                                       for (int i = 0; i < counters.length; i++) {
-                                               counters[i] = new OprofileCounter(i);
-                                               counters[i].loadConfiguration(config);
-                                               if (counters[i].getEnabled()) {
-                                                       ++numEnabledEvents;
-       
-                                                       if (counters[i].getEvent() == null) {
-                                                               valid = false;
-                                                               break;
-                                                       }
-       
-                                                       // First check min count
-                                                       int min = counters[i].getEvent().getMinCount();
-                                                       if (counters[i].getCount() < min) {
-                                                               valid = false;
-                                                               break;
-                                                       }
-       
-       
-                                                       // Next ask oprofile if it is valid
-                                                       //jinu removed at 20090618
-                                                       /*
-                                                       if (!OprofileLaunchPlugin.getCache().checkEvent(
-                                                                               counters[i].getNumber(), 
-                                                                               counters[i].getEvent().getNumber(),
-                                                                               counters[i].getEvent().getUnitMask().getMaskValue())) {
-                                                               valid = false;
-                                                               break;
-                                                       }
-                                                       */
-                                                       //jinu added but this is not unused. so remarked 
-                                                       /*
-                                                       if (!Oprofile.checkEvent(
-                                                                       counters[i].getEvent().getText(),
-                                                                       counters[i].getCount(),
-                                                                       counters[i].getEvent().getUnitMask().getMaskValue())) {
-                                                       valid = false;
-                                                       break;
-                                                       }
-                                                       */
-                                               }
-                                       }
-                               }
-                       } catch (CoreException e) {
-                               e.printStackTrace();
-                       }
-       
-                       return (numEnabledEvents > 0 && valid);
-               } 
-       }
-
-       /**
-        * @see ILaunchConfigurationTab#performApply(ILaunchConfigurationWorkingCopy)
-        */
-       public void performApply(ILaunchConfigurationWorkingCopy config) {
-               //jinu added at 20090602-------------------------------
-               if(!canInitialize || ProfileLaunchPlugin.checkTarget() == 0){
-                       return;
-               }
-               //--------------------------------------
-               
-               if (Oprofile.getTimerMode()) {
-                       config.setAttribute(OprofileLaunchPlugin.ATTR_USE_DEFAULT_EVENT, true);
-               } else {
-                       config.setAttribute(OprofileLaunchPlugin.ATTR_USE_DEFAULT_EVENT, _defaultEventCheck.getSelection());
-                       
-                       //jinu added at 20090602
-                       config.setAttribute(OprofileLaunchPlugin.ATTR_SELECTED_DEFAULT_SETTING, getSelectedButton());
-                       
-                       for (CounterSubTab cst : _counterSubTabs) {
-                               cst.performApply(config);
-                       }
-               }
-       }
-
-       /**
-        * @see ILaunchConfigurationTab#setDefaults(ILaunchConfigurationWorkingCopy)
-        */
-       
-       public void setDefaults(ILaunchConfigurationWorkingCopy config) {
-               // commented by greatim at 2011.06.01 for fresh ide
-               //jinu added at 20090616
-//             config.setAttribute(ISMLCDTLaunchConstants.ATTR_LAUNCH_MODE, "oprofile");
-               //config.setAttribute(ISMLCDTLaunchConstants.ATTR_SKIP_DOWNLOAD, false);
-               
-               //jinu removed at 20090616
-               /*
-               boolean useDefault = true;
-               
-               // When instantiated, the OprofileCounter will set defaults.
-               if(_counters!=null){
-                       for (int i = 0; i < _counters.length; i++) {
-                               _counters[i].saveConfiguration(config);
-                               if (_counters[i].getEnabled()) {
-                                       useDefault = false;
-                               }
-                       }
-               }
-
-               config.setAttribute(OprofileLaunchPlugin.ATTR_USE_DEFAULT_EVENT, useDefault);
-               */
-       }
-       
-       
-       /**
-        * @see ILaunchConfigurationTab#getName()
-        */
-       public String getName() {
-               return OprofileLaunchMessages.getString("tab.event.name"); //$NON-NLS-1$
-       }
-
-       /**
-        * @see ILaunchConfigurationTab#getImage()
-        */
-       @Override
-       public Image getImage() {
-               return OprofileLaunchPlugin.getImageDescriptor(OprofileLaunchPlugin.ICON_EVENT_TAB).createImage();
-       }
-
-       /**
-        * Handles the toggling of the default event check box. Not meant to be called
-        * directly.
-        */
-       private void _handleEnabledToggle() {
-               setEnabledState(!_defaultEventCheck.getSelection());
-               updateLaunchConfigurationDialog();
-       }
-       
-       /**
-        * Sets the state of the child counter tabs' widgets.
-        * @param state true for enabled, false for disabled
-        */
-       private void setEnabledState(boolean state) {
-               //jinu added at 20090602-------------------------------
-               if(!state)
-                       stackLayout.topControl = buttonGroup;
-               else
-                       stackLayout.topControl = tabFolder;
-               //--------------------------------------
-               
-               for (CounterSubTab cst : _counterSubTabs) {
-                       cst.setEnabledState(state);
-               }
-       }
-
-       
-       /**
-        * A sub-tab of the OprofileEventConfigTab launch configuration tab. 
-        * Essentially, it is a frontend to an OprofileCounter. This is an 
-        * inner class because it requires methods from the parent tab (such as
-        * updateLaunchConfigurationDialog() when a widget changes state).
-        */ 
-       class CounterSubTab {
-               private Button _enabledCheck;
-               private Button _profileKernelCheck;
-               private Button _profileUserCheck;
-               private Label _countTextLabel;
-               private Text _countText;
-               private Label _eventDescLabel;
-               private Text _eventDescText;
-               private UnitMaskViewer _unitMaskViewer;
-               private ListViewer _eventList;
-               private OprofileCounter _counter;
-               
-               private ScrolledComposite _scrolledTop;
-               private Composite _tabTopContainer;
-
-               /**
-                * Constructor for a subtab. Creates the layout and widgets for its content.
-                * @param parent composite the widgets will be created in 
-                * @param counter the associated OprofileCounter object
-                */
-               public CounterSubTab(Composite parent, OprofileCounter counter) {
-                       _counter = counter;
-
-                       parent.setLayout(new GridLayout());
-
-                       //scrollable composite on top
-                       ScrolledComposite scrolledContainer = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL);
-                       scrolledContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-                       GridLayout layout = new GridLayout();
-                       layout.marginHeight = 0;
-                       layout.marginWidth = 0;
-                       scrolledContainer.setLayout(layout);
-                       scrolledContainer.setExpandHorizontal(true);
-                       scrolledContainer.setExpandVertical(true);
-                       
-                       //composite to contain the rest of the tab
-                       Composite tabTopContainer = new Composite(scrolledContainer, SWT.NONE);
-                       scrolledContainer.setContent(tabTopContainer);
-                       layout = new GridLayout();
-                       layout.marginHeight = 0;
-                       layout.marginWidth = 0;
-                       layout.numColumns = 2;
-                       tabTopContainer.setLayout(layout);
-                       tabTopContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); 
-
-                       //top cell
-                       Composite topCellComp = new Composite(tabTopContainer, SWT.NONE);
-                       layout = new GridLayout();
-                       layout.marginHeight = 0;
-                       layout.marginWidth = 0;
-                       layout.numColumns = 2;
-                       topCellComp.setLayout(layout);
-                       topCellComp.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 2, 1));
-                       
-                       createTopCell(topCellComp);
-                       
-                       createVerticalSpacer(tabTopContainer, 2);
-                       
-                       //left side composite group for eventList
-                       Composite eventListComp = new Composite(tabTopContainer, SWT.NONE);
-                       layout = new GridLayout();
-                       layout.marginHeight = 0;
-                       layout.marginWidth = 0;
-                       eventListComp.setLayout(layout);
-                       //layoutdata is set later
-
-                       createLeftCell(eventListComp);
-                       
-                       
-                       //right side composite group for other event config and unit mask
-                       Composite eventConfigComp = new Composite(tabTopContainer, SWT.NONE);
-                       layout = new GridLayout();
-                       layout.numColumns = 2;
-                       layout.marginHeight = 0;
-                       layout.marginWidth = 0;
-                       eventConfigComp.setLayout(layout);
-                       eventConfigComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
-                       
-                       createRightCell(eventConfigComp);
-
-                       
-                       //set the list's composite layout based on the right cell's size
-                       GridData data = new GridData(SWT.FILL, SWT.FILL, false, true);
-                       data.heightHint = eventConfigComp.getSize().x;
-                       eventListComp.setLayoutData(data);
-                       
-                       _scrolledTop = scrolledContainer;
-                       _tabTopContainer = tabTopContainer;
-               }
-               
-               /**
-                * Creates the "Enabled" checkbox, and the event description text.
-                * @param parent composite these widgets will be created in
-                */
-               private void createTopCell(Composite parent) {
-                       //checkbox
-                       _enabledCheck = new Button(parent, SWT.CHECK);
-                       _enabledCheck.setText(OprofileLaunchMessages.getString("tab.event.counterSettings.enabled.button.text")); //$NON-NLS-1$
-                       _enabledCheck.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1));
-                       _enabledCheck.addSelectionListener(new SelectionAdapter() {
-                               public void widgetSelected(SelectionEvent se) {
-                                       _counter.setEnabled(_enabledCheck.getSelection());
-                                       _setEnabledState(_counter.getEnabled());
-                                       updateLaunchConfigurationDialog();
-                               }
-                       });
-                       _enabledCheck.setEnabled(false);
-                       
-                       //label for textbox
-                       _eventDescLabel = new Label(parent, SWT.NONE);
-                       _eventDescLabel.setText(OprofileLaunchMessages.getString("tab.event.eventDescription.label.text")); //$NON-NLS-1$
-                       _eventDescLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
-
-                       //textbox
-                       _eventDescText = new Text(parent, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
-                       _eventDescText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
-               }
-
-               /**
-                * Creates the event list widget.
-                * @param parent composite these widgets will be created in
-                */
-               private void createLeftCell(Composite parent) {
-                       _eventList = new ListViewer(parent, SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
-                       _eventList.getList().setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, true));
-
-                       _eventList.setLabelProvider(new ILabelProvider(){
-                               public String getText(Object element) {
-                                       OpEvent e = (OpEvent) element;
-                                       return e.getText();
-                               }
-                               public Image getImage(Object element) { return null; }
-                               public void addListener(ILabelProviderListener listener) { }
-                               public void dispose() { }
-                               public boolean isLabelProperty(Object element, String property) { return false; }
-                               public void removeListener(ILabelProviderListener listener) { }
-                       });
-                       
-                       _eventList.setContentProvider(new IStructuredContentProvider() {
-                               public Object[] getElements(Object inputElement) {
-                                       OprofileCounter ctr = (OprofileCounter) inputElement;
-                                       return (OpEvent[]) ctr.getValidEvents();
-                               }
-                               public void dispose() { }
-                               public void inputChanged(Viewer arg0, Object arg1, Object arg2) { }
-                       });
-
-                       //adds the events to the list from the counter
-                       _eventList.setInput(_counter);
-                       
-                       _eventList.addSelectionChangedListener(new ISelectionChangedListener() {
-                               public void selectionChanged(SelectionChangedEvent sce) {
-                                       _handleEventListSelectionChange();
-                               }
-                       });
-               }
-               
-               /**
-                * Creates the 2 profile space checkboxes, event count and unit mask widget.
-                * @param parent composite these widgets will be created in
-                */
-               private void createRightCell(Composite parent) {
-                       //profile kernel checkbox
-                       _profileKernelCheck = new Button(parent, SWT.CHECK);
-                       _profileKernelCheck.setText(OprofileLaunchMessages.getString("tab.event.counterSettings.profileKernel.check.text")); //$NON-NLS-1$
-                       _profileKernelCheck.addSelectionListener(new SelectionAdapter() {
-                               public void widgetSelected(SelectionEvent se) {
-                                       _handleProfileKernelToggle();
-                               }
-                       });
-                       
-                       //profile user checkbox -- should this ever be disabled?
-                       _profileUserCheck = new Button(parent, SWT.CHECK);
-                       _profileUserCheck.setText(OprofileLaunchMessages.getString("tab.event.counterSettings.profileUser.check.text")); //$NON-NLS-1$
-                       _profileUserCheck.addSelectionListener(new SelectionAdapter() {
-                               public void widgetSelected(SelectionEvent se) {
-                                       _handleProfileUserToggle();
-                               }
-                       });
-                       
-                       //event count label/text 
-                       _countTextLabel = new Label(parent, SWT.NONE);
-                       _countTextLabel.setText(OprofileLaunchMessages.getString("tab.event.counterSettings.count.label.text")); //$NON-NLS-1$
-                       _countText = new Text(parent, SWT.SINGLE | SWT.BORDER);
-                       _countText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
-                       _countText.addModifyListener(new ModifyListener() {
-                               public void modifyText(ModifyEvent me) {
-                                       _handleCountTextModify();
-                               }
-                       });
-
-                       //unit mask widget
-                       Composite unitMaskComp = new Composite(parent, SWT.NONE);
-                       GridLayout layout = new GridLayout();
-                       layout.marginHeight = 0;
-                       layout.marginWidth = 0;
-                       unitMaskComp.setLayout(layout);
-                       unitMaskComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
-
-                       _unitMaskViewer = new UnitMaskViewer(unitMaskComp);
-               }
-               
-               /**
-                * Initializes the tab on first creation.
-                * @param config default configuration for the counter and the associated widgets
-                */
-               public void initializeTab(ILaunchConfiguration config) {
-                       //make all controls inactive, since the 'default event' checkbox
-                       // is checked by default
-                       setEnabledState(false);
-                       
-                       if (config != null) {
-                               _counter.loadConfiguration(config);
-                       }
-
-                       boolean enabled = _counter.getEnabled();
-                       _enabledCheck.setSelection(enabled);
-
-                       if (_counter.getEvent() == null) {
-                               // Default to first in list
-                               _counter.setEvent(_counter.getValidEvents()[0]);
-                       }
-
-                       //load default states
-                       _profileKernelCheck.setSelection(_counter.getProfileKernel());
-                       _profileUserCheck.setSelection(_counter.getProfileUser());
-                       _countText.setText(Integer.toString(_counter.getCount()));
-                       _eventDescText.setText(_counter.getEvent().getTextDescription());
-                       _unitMaskViewer.displayEvent(_counter.getEvent());
-                       _eventList.setSelection(new StructuredSelection(_counter.getEvent()));
-               }
-               
-               /**
-                * Applies the tab's current state to the launch configuration.
-                * @param config launch config to apply to
-                */
-               public void performApply(ILaunchConfigurationWorkingCopy config) {
-                       _counter.saveConfiguration(config);
-               }
-
-               /**
-                * Enables/disables the widgets in this tab.
-                * @param state true to enable to the counter's state, false to disable all
-                */
-               public void setEnabledState(boolean state) {
-                       _enabledCheck.setEnabled(state);
-                       
-                       if (state) {
-                               _setEnabledState(_counter.getEnabled());
-                       } else {
-                               _setEnabledState(false);
-                       }
-               }
-               
-               /**
-                * Method split from setEnabledState to avoid code duplication.
-                * Not meant to be called directly.
-                * @param state true to enable all widgets, false to disable all widgets
-                */
-               private void _setEnabledState(boolean state) {
-                       _profileKernelCheck.setEnabled(state);
-                       _profileUserCheck.setEnabled(state);
-                       _countText.setEnabled(state);
-                       _eventDescText.setEnabled(state);
-                       _unitMaskViewer.setEnabled(state);
-                       _eventList.getList().setEnabled(state);
-               }
-
-               /**
-                * Handling method for the event list. Gets the selection from the listviewer 
-                * and updates the UnitMask and event description text box. 
-                */
-               private void _handleEventListSelectionChange() {
-                       int index = _eventList.getList().getSelectionIndex();
-                       OpEvent event = (OpEvent) _eventList.getElementAt(index);
-                       if (event == null) {
-                               return;
-                       }
-                       _counter.setEvent(event);
-                       _eventDescText.setText(event.getTextDescription());
-                       _unitMaskViewer.displayEvent(event);
-
-                       // Check the min count to update the error message (events can have
-                       // different minimum reset counts)
-                       int min = _counter.getEvent().getMinCount();
-                       if (_counter.getCount() < min) {
-                               setErrorMessage(getMinCountErrorMessage(min));
-                       }
-
-                       updateLaunchConfigurationDialog();
-               }
-               
-               /**
-                * Handles the toggling of the "profile user" button.
-                */
-               private void _handleProfileUserToggle() {
-                       _counter.setProfileUser(_profileUserCheck.getSelection());
-                       updateLaunchConfigurationDialog();
-               }
-
-               /**
-                * Handles the toggling of the "profile kernel" button.
-                */
-               private void _handleProfileKernelToggle() {
-                       _counter.setProfileKernel(_profileKernelCheck.getSelection());
-                       updateLaunchConfigurationDialog();
-               }
-               
-               /**
-                * Handles text modify events in the count text widget.
-                */
-               private void _handleCountTextModify() {
-                       String errorMessage = null;
-                       try {
-
-                               // This seems counter-intuitive, but we must save the count
-                               // so that isValid knows this launch config is invalid
-                               int count = Integer.parseInt(_countText.getText());
-                               _counter.setCount(count);
-
-                               // Check minimum count
-                               int min = _counter.getEvent().getMinCount();
-                               if (count < min) {
-                                       errorMessage = getMinCountErrorMessage(min);
-                               }
-                       } catch (NumberFormatException e) {
-                               errorMessage = OprofileLaunchMessages.getString("tab.event.counterSettings.count.invalid"); //$NON-NLS-1$
-                               _counter.setCount(OprofileDaemonEvent.COUNT_INVALID);
-                       } finally {
-                               setErrorMessage(errorMessage);
-                               updateLaunchConfigurationDialog();
-                       }
-               }
-               
-               /**
-                * Returns a string with the minimum allowed count, suitable foruse with setErrorMessage().
-                * @param min minimum count
-                * @return a String containing the error message
-                */
-               private String getMinCountErrorMessage(int min) {
-                       String msg = OprofileLaunchMessages.getString("tab.event.counterSettings.count.too-small"); //$NON-NLS-1$
-                       Object[] args = new Object[] { new Integer(min) };
-                       return MessageFormat.format(msg, args);
-               }
-               
-               /**
-                * Changes parameters for the top scrolled composite which makes the scroll bars
-                * appear when content overflows the visible area. Called by the UnitMaskViewer 
-                * whenever a new set of unit mask buttons are created, since the number of them is
-                * variable and there is no guarantee as to the default size of the launch configuration
-                * dialog in general.
-                */
-               private void resizeScrollContainer() {
-                       _scrolledTop.setMinSize(_tabTopContainer.computeSize(SWT.DEFAULT, SWT.DEFAULT));
-               }
-               
-               
-               /**
-                * This class displays event unit masks via check boxes and appropriate labels.
-                */
-               class UnitMaskViewer {
-                       private Label _unitMaskLabel;
-                       private Composite _top;
-                       private Composite _maskListComp;
-                       private Button[] _unitMaskButtons;
-
-                       /**
-                        * Constructor, creates the widget.
-                        * @param parent composite the widget will be created in
-                        */
-                       public UnitMaskViewer(Composite parent) {
-                               //"Unit Mask:" label
-                               _unitMaskLabel = new Label(parent, SWT.NONE);
-                               _unitMaskLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
-                               _unitMaskLabel.setText(OprofileLaunchMessages.getString("unitmaskViewer.label.text")); //$NON-NLS-1$
-                               _unitMaskLabel.setVisible(true);
-
-                               //composite to contain the button widgets
-                               Composite top = new Composite(parent, SWT.NONE);
-                               top.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-                               GridLayout layout = new GridLayout();
-                               layout.marginHeight = 0;
-                               layout.marginWidth = 0;
-                               top.setLayout(layout);
-                               _top = top;
-                               
-                               _maskListComp = null;
-                               _unitMaskButtons = null;
-                       }
-
-                       /**
-                        * Handles button toggles; updates the counter's unit mask to the appropriate value.
-                        * @param maskButton the button object
-                        * @param index the button's mask index (used in OpUnitMask for a proper mask value) 
-                        */
-                       private void _handleToggle(Button maskButton, int index) {
-                               OpUnitMask mask = _counter.getUnitMask();
-                               if (mask != null) {
-                                       if (maskButton.getSelection()) {
-                                               mask.setMaskFromIndex(index);
-                                       } else {
-                                               mask.unSetMaskFromIndex(index);
-                                       }
-                               }
-
-                               //update the parent tab
-                               updateLaunchConfigurationDialog();
-                       }
-
-                       /**
-                        * Disposes of the old unit mask check list and creates a new one with 
-                        *   the appropriate default value. 
-                        * @param oe the event
-                        */
-                       public void displayEvent(OpEvent oe) {
-                               OpUnitMask mask = oe.getUnitMask();
-                               int totalMasks = mask.getNumMasks();
-                               
-                               if (_maskListComp != null) {
-                                       _maskListComp.dispose();
-                               }
-                               
-                               Composite newMaskComp = new Composite(_top, SWT.NONE);
-                               newMaskComp.setLayout(new GridLayout());
-                               newMaskComp.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, true));
-                               _maskListComp = newMaskComp;
-
-                               //creates these buttons with the default masks
-                               mask.setDefaultMaskValue();
-                               
-                               ArrayList<Button> maskButtons = new ArrayList<Button>();
-                               
-                               for (int i = 0; i < totalMasks; i++) {
-                                       Button maskButton;
-
-                                       if (mask.getType() == OpUnitMask.INVALID) {
-                                               //big problem, most likely parsing went awry or opxml output mangled
-                                               OprofileCorePlugin.showErrorDialog("opxmlParse", null); //$NON-NLS-1$
-                                               return;
-                                       } else if (mask.getType() == OpUnitMask.MANDATORY) {
-                                               maskButton = new Button(newMaskComp, SWT.RADIO);
-                                               maskButton.setEnabled(false);
-                                               maskButton.setText(mask.getText(i));
-                                               maskButton.setSelection(true);
-                                       } else {
-                                               int buttonType;
-                                               final int maskButtonIndex = i;
-                                               boolean selected = mask.isMaskSetFromIndex(maskButtonIndex);
-
-                                               if (mask.getType() == OpUnitMask.EXCLUSIVE) {
-                                                       buttonType = SWT.RADIO;
-                                               } else {        //mask type is OpUnitMask.BITMASK
-                                                       buttonType = SWT.CHECK;
-                                               }
-                                               
-                                               maskButton = new Button(newMaskComp, buttonType);
-                                               maskButton.setEnabled(true);
-                                               maskButton.setText(mask.getText(i));
-                                               maskButton.setSelection(selected);
-                                               maskButton.addSelectionListener(new SelectionAdapter() {
-                                                       public void widgetSelected(SelectionEvent se) {
-                                                               _handleToggle((Button)se.getSource(), maskButtonIndex);
-                                                       }
-                                               });
-                                               
-                                               maskButtons.add(maskButton);
-                                       }
-                               }
-                               
-                               _unitMaskButtons = new Button[maskButtons.size()];
-                               maskButtons.toArray(_unitMaskButtons);
-                               
-                               resizeScrollContainer();
-                       }
-
-                       /**
-                        * Enables and disables the viewer for UI input
-                        * @param enabled whether this viewer should be enabled
-                        */
-                       public void setEnabled(boolean enabled) {
-                               if (_unitMaskButtons != null) {
-                                       for (Button b : _unitMaskButtons) {
-                                               b.setEnabled(enabled);
-                                       }
-                               }
-                       }
-               }
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/configuration/OprofileLaunchConfigurationTabGroup.java b/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/configuration/OprofileLaunchConfigurationTabGroup.java
deleted file mode 100644 (file)
index 9ab1ce1..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * 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:
- *    Kent Sebastian <ksebasti@redhat.com> - initial API and implementation 
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.launch.configuration;
-
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
-import org.eclipse.linuxtools.profiling.launch.ProfileLaunchConfigurationTabGroup;
-
-public class OprofileLaunchConfigurationTabGroup extends ProfileLaunchConfigurationTabGroup {
-       @Override
-       public AbstractLaunchConfigurationTab[] getProfileTabs() {
-               //jinu modified at 20090602
-               //return new AbstractLaunchConfigurationTab[] { new OprofileSetupTab(), new OprofileEventConfigTab() };
-               return new AbstractLaunchConfigurationTab[] { new OprofileEventConfigTab() };
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/configuration/OprofileSetupTab.java b/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/configuration/OprofileSetupTab.java
deleted file mode 100644 (file)
index 5cf1cc0..0000000
+++ /dev/null
@@ -1,267 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004,2008 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *    Kent Sebastian <ksebasti@redhat.com> - 
- *******************************************************************************/
-package org.eclipse.linuxtools.oprofile.launch.configuration;
-
-import java.io.File;
-import java.text.MessageFormat;
-
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
-import org.eclipse.linuxtools.oprofile.core.daemon.OprofileDaemonOptions;
-import org.eclipse.linuxtools.oprofile.launch.OprofileLaunchMessages;
-import org.eclipse.linuxtools.oprofile.launch.OprofileLaunchPlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.MessageBox;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * This tab is used by the launcher to configure global oprofile run options.
- */
-public class OprofileSetupTab extends AbstractLaunchConfigurationTab {
-       private Text _kernelImageFileText;
-       
-       private Button _checkSeparateLibrary;
-       private Button _checkSeparateKernel;
-       //maybe these later
-//     private Button _checkSeparateThread;
-//     private Button _checkSeparateCpu;
-
-       private static LaunchOptions _options = null;
-
-       public String getName() {
-               return OprofileLaunchMessages.getString("tab.global.name"); //$NON-NLS-1$
-       }
-
-       public boolean isValid(ILaunchConfiguration config) {
-               boolean b = _options.isValid();
-               // System.out.println("SetupTab isValid = " + b);
-               return b;
-       }
-
-       public void performApply(ILaunchConfigurationWorkingCopy config) {
-               _options.saveConfiguration(config);
-       }
-
-       public void initializeFrom(ILaunchConfiguration config) {
-               _options.loadConfiguration(config);
-               
-               int separate = _options.getSeparateSamples();
-               
-               if (separate == OprofileDaemonOptions.SEPARATE_NONE) {
-                       _checkSeparateLibrary.setSelection(false);
-                       _checkSeparateKernel.setSelection(false);
-               } else {
-                       //note that opcontrol will nicely ignore the trailing comma
-                       if ((separate & OprofileDaemonOptions.SEPARATE_LIBRARY) != 0)
-                               _checkSeparateLibrary.setSelection(true);
-                       if ((separate & OprofileDaemonOptions.SEPARATE_KERNEL) != 0)
-                               _checkSeparateKernel.setSelection(true);
-//                     if ((separate & OprofileDaemonOptions.SEPARATE_THREAD) != 0)
-//                             _checkSeparateThread.setSelection(true);
-//                     if ((separate & OprofileDaemonOptions.SEPARATE_CPU) != 0)
-//                             _checkSeparateCpu.setSelection(true);
-               }
-       }
-
-       public void setDefaults(ILaunchConfigurationWorkingCopy config) {
-               _options = new LaunchOptions();
-               _options.saveConfiguration(config);
-       }
-       
-       @Override
-       public Image getImage() {
-               return OprofileLaunchPlugin.getImageDescriptor(OprofileLaunchPlugin.ICON_GLOBAL_TAB).createImage();
-       }
-
-       public void createControl(Composite parent) {
-               _options = new LaunchOptions();
-
-               Composite top = new Composite(parent, SWT.NONE);
-               setControl(top);
-               top.setLayout(new GridLayout());
-
-               GridData data;
-               GridLayout layout;
-               createVerticalSpacer(top, 1);
-
-               // Create container for kernel image file selection
-               Composite p = new Composite(top, SWT.NONE);
-               layout = new GridLayout();
-               layout.numColumns = 2;
-               layout.marginHeight = 0;
-               layout.marginWidth = 0;
-               p.setLayout(layout);
-               data = new GridData(GridData.FILL_HORIZONTAL);
-               p.setLayoutData(data);
-
-               Label l = new Label(p, SWT.NONE);
-               l.setText(OprofileLaunchMessages.getString("tab.global.kernelImage.label.text")); //$NON-NLS-1$
-               data = new GridData();
-               data.horizontalSpan = 2;
-               l.setLayoutData(data);
-
-               _kernelImageFileText = new Text(p, SWT.SINGLE | SWT.BORDER);
-               data = new GridData(GridData.FILL_HORIZONTAL);
-               _kernelImageFileText.setLayoutData(data);
-               _kernelImageFileText.addModifyListener(new ModifyListener() {
-                       public void modifyText(ModifyEvent mev) {
-                               _handleKernelImageFileTextModify(_kernelImageFileText);
-                       };
-               });
-
-               Button button = createPushButton(p, OprofileLaunchMessages.getString("tab.global.kernelImage.browse.button.text"), null); //$NON-NLS-1$
-               final Shell shell = top.getShell();
-               button.addSelectionListener(new SelectionAdapter() {
-                       public void widgetSelected(SelectionEvent sev) {
-                               _showFileDialog(shell);
-                       }
-               });
-
-               createVerticalSpacer(top, 1);
-
-               // Create checkbox options container
-               p = new Composite(top, SWT.NONE);
-               layout = new GridLayout();
-               layout.numColumns = 1;
-               layout.marginHeight = 0;
-               layout.marginWidth = 0;
-               p.setLayout(layout);
-               data = new GridData(GridData.FILL_HORIZONTAL);
-               data.horizontalSpan = 2;
-               p.setLayoutData(data);
-
-               _checkSeparateLibrary = _createCheckButton(p, OprofileLaunchMessages.getString("tab.global.check.separateLibrary.text")); //$NON-NLS-1$
-               _checkSeparateKernel = _createCheckButton(p, OprofileLaunchMessages.getString("tab.global.check.separateKernel.text")); //$NON-NLS-1$
-//             _checkSeparateThread = _createCheckButton(p, OprofileLaunchMessages.getString("tab.global.check.separateThread.text")); //$NON-NLS-1$
-//             _checkSeparateCpu = _createCheckButton(p, OprofileLaunchMessages.getString("tab.global.check.separateCpu.text")); //$NON-NLS-1$
-       }
-
-       // convenience method to create radio buttons with the given label
-       private Button _createCheckButton(Composite parent, String label) {
-               final Button b = new Button(parent, SWT.CHECK);
-               b.setText(label);
-               b.addSelectionListener(new SelectionAdapter() {
-                       public void widgetSelected(SelectionEvent se) {
-                               _handleCheckSelected(b);
-                       }
-               });
-
-               return b;
-       }
-
-       //sets the proper separation mask for sample separation 
-       private void _handleCheckSelected(Button button) {
-               int oldSeparate = _options.getSeparateSamples();
-               int newSeparate = oldSeparate;          //initalize
-               
-               if (button == _checkSeparateLibrary) {
-                       if (button.getSelection()) {
-                               newSeparate = oldSeparate | OprofileDaemonOptions.SEPARATE_LIBRARY;
-                       } else {
-                               newSeparate = oldSeparate & ~OprofileDaemonOptions.SEPARATE_LIBRARY;
-                       }
-               } else if (button == _checkSeparateKernel) {
-                       if (button.getSelection()) {
-                               newSeparate = oldSeparate | OprofileDaemonOptions.SEPARATE_KERNEL;
-                       } else {
-                               newSeparate = oldSeparate & ~OprofileDaemonOptions.SEPARATE_KERNEL;
-                       }
-//             } else if (button == _checkSeparateThread) {
-//                     if (button.getSelection()) {
-//                             newSeparate = oldSeparate | OprofileDaemonOptions.SEPARATE_THREAD;
-//                     } else {
-//                             newSeparate = oldSeparate & ~OprofileDaemonOptions.SEPARATE_THREAD;
-//                     }
-//             } else if (button == _checkSeparateCpu) {
-//                     if (button.getSelection()) {
-//                             newSeparate = oldSeparate | OprofileDaemonOptions.SEPARATE_CPU;
-//                     } else {
-//                             newSeparate = oldSeparate & ~OprofileDaemonOptions.SEPARATE_CPU;
-//                     }
-               }
-               
-               _options.setSeparateSamples(newSeparate);
-
-               updateLaunchConfigurationDialog();
-       }
-
-       // handles text modification events for all text boxes in this tab
-       private void _handleKernelImageFileTextModify(Text text) {
-               String errorMessage = null;
-               String filename = text.getText();
-
-               if (filename.length() > 0) {
-                       File file = new File(filename);
-                       if (!file.exists() || !file.isFile()) {
-                               String msg = OprofileLaunchMessages.getString("tab.global.kernelImage.kernel.nonexistent"); //$NON-NLS-1$
-                               Object[] args = new Object[] { filename };
-                               errorMessage = MessageFormat.format(msg, args);
-                       }
-
-                       //seems odd, but must set it even if it is invalid so that performApply
-                       // and isValid work properly
-                       _options.setKernelImageFile(filename);
-               } else {
-                       // no kernel image file
-                       _options.setKernelImageFile(new String(""));
-               }
-
-               // Update dialog and error message
-               setErrorMessage(errorMessage);
-               updateLaunchConfigurationDialog();
-       }
-
-       // Displays a file dialog to allow the user to select the kernel image file
-       private void _showFileDialog(Shell shell) {
-               FileDialog d = new FileDialog(shell, SWT.OPEN);
-               File kernel = new File(_options.getKernelImageFile());
-               if (!kernel.exists()) {
-                       kernel = new File("/boot");     //$NON-NLS-1$
-                       if (!kernel.exists())
-                               kernel = new File("/");         //$NON-NLS-1$
-               }
-               d.setFileName(kernel.toString());
-               d.setText(OprofileLaunchMessages.getString("tab.global.selectKernelDialog.text")); //$NON-NLS-1$
-               String newKernel = d.open();
-               if (newKernel != null) {
-                       kernel = new File(newKernel);
-                       if (!kernel.exists()) {
-                               MessageBox mb = new MessageBox(shell, SWT.ICON_ERROR | SWT.RETRY | SWT.CANCEL);
-                               mb.setMessage(OprofileLaunchMessages.getString("tab.global.selectKernelDialog.error.kernelDoesNotExist.text"));         //$NON-NLS-1$
-                               switch (mb.open()) {
-                                       case SWT.RETRY:
-                                               // Ok, it's recursive, but it shouldn't matter
-                                               _showFileDialog(shell);
-                                               break;
-                                       default:
-                                       case SWT.CANCEL:
-                                               break;
-                               }
-                       } else {
-                               _kernelImageFileText.setText(newKernel);
-                       }
-               }
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/launching/OprofileLaunchConfigurationDelegate.java b/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/launching/OprofileLaunchConfigurationDelegate.java
deleted file mode 100644 (file)
index 3bfd497..0000000
+++ /dev/null
@@ -1,235 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008, 2009 Red Hat, Inc. 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:
- *    Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
- *    Keith Seitz <keiths@redhat.com> - setup code in launch the method, initially 
- *        written in the now-defunct OprofileSession class
- *    QNX Software Systems and others - the section of code marked in the launch 
- *        method, and the exec method
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.launch.launching;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
-import org.eclipse.cdt.launch.AbstractCLaunchDelegate;
-import org.eclipse.cdt.utils.pty.PTY;
-import org.eclipse.cdt.utils.spawner.ProcessFactory;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.ILaunchesListener2;
-import org.eclipse.linuxtools.oprofile.core.OpcontrolException;
-import org.eclipse.linuxtools.oprofile.core.OprofileCorePlugin;
-import org.eclipse.linuxtools.oprofile.core.daemon.OprofileDaemonEvent;
-import org.eclipse.linuxtools.oprofile.launch.OprofileLaunchPlugin;
-import org.eclipse.linuxtools.oprofile.launch.configuration.LaunchOptions;
-import org.eclipse.linuxtools.oprofile.launch.configuration.OprofileCounter;
-import org.eclipse.linuxtools.oprofile.ui.OprofileUiPlugin;
-import org.eclipse.linuxtools.oprofile.ui.view.OprofileView;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-
-import org.tizen.oprofile.launch.DefaultSettingConstants;
-
-
-public class OprofileLaunchConfigurationDelegate extends AbstractCLaunchDelegate {
-
-       @Override
-       public void launch(ILaunchConfiguration config, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
-               //FIXME: this assumes that project names are always the directory names in the workspace.
-               //this assumption may be wrong, but a shallow lookup seems ok
-               String workspacePath = ResourcesPlugin.getWorkspace().getRoot().getLocation().toString();
-               String imagePath = workspacePath
-                               + Path.SEPARATOR
-                               + config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, "") //$NON-NLS-1$
-                               + Path.SEPARATOR
-                               + config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, ""); //$NON-NLS-1$
-               
-               LaunchOptions options = new LaunchOptions();            //default options created in the constructor
-               options.loadConfiguration(config);
-               options.setBinaryImage(imagePath);
-
-               //if daemonEvents null or zero size, the default event will be used
-               String defaultEvent = null;
-               OprofileDaemonEvent[] daemonEvents = null;
-               if (!config.getAttribute(OprofileLaunchPlugin.ATTR_USE_DEFAULT_EVENT, false)) {
-                       //get the events to profile from the counters
-                       OprofileCounter[] counters = OprofileCounter.getCounters(config);
-                       ArrayList<OprofileDaemonEvent> events = new ArrayList<OprofileDaemonEvent>();
-                       
-                       for (int i = 0; i < counters.length; ++i) {
-                               if (counters[i].getEnabled())
-                                       events.add(counters[i].getDaemonEvent());
-                       }
-                       
-                       daemonEvents = new OprofileDaemonEvent[events.size()];
-                       events.toArray(daemonEvents);
-               }
-               //jinu added at 20090602
-               else{
-                       String keyStr = config.getAttribute(OprofileLaunchPlugin.ATTR_SELECTED_DEFAULT_SETTING,"");
-                       defaultEvent = DefaultSettingConstants.getSettingValue(keyStr);
-               }
-
-               //set up and launch the oprofile daemon
-               try {
-                       //kill the daemon (it shouldn't be running already, but to be safe)
-                       OprofileCorePlugin.getDefault().getOpcontrolProvider().shutdownDaemon();
-                       
-                       //reset data from the (possibly) existing default session, 
-                       // otherwise multiple runs will combine samples and results
-                       // won't make much sense
-                       OprofileCorePlugin.getDefault().getOpcontrolProvider().reset();
-                       
-                       //setup the events and other parameters
-                       OprofileCorePlugin.getDefault().getOpcontrolProvider().setupDaemon(options.getOprofileDaemonOptions(), daemonEvents, defaultEvent);
-                       
-                       //start the daemon & collection of samples 
-                       //note: since the daemon is only profiling for the specific image we told 
-                       // it to, no matter to start the daemon before the binary itself is run
-                       OprofileCorePlugin.getDefault().getOpcontrolProvider().startCollection();
-               } catch (OpcontrolException oe) {
-                       OprofileCorePlugin.showErrorDialog("opcontrolProvider", oe); //$NON-NLS-1$
-                       return;
-               }
-
-               /* 
-                * this code written by QNX Software Systems and others and was 
-                * originally in the CDT under LocalCDILaunchDelegate::RunLocalApplication
-                */
-               //set up and launch the local c/c++ program
-               try {
-                       IPath exePath = verifyProgramPath( config );
-                       File wd = getWorkingDirectory( config );
-                       if ( wd == null ) {
-                               wd = new File( System.getProperty( "user.home", "." ) ); //$NON-NLS-1$ //$NON-NLS-2$
-                       }
-                       String arguments[] = getProgramArgumentsArray( config );
-                       ArrayList<String> command = new ArrayList<String>( 1 + arguments.length );
-                       command.add( exePath.toOSString() );
-                       command.addAll( Arrays.asList( arguments ) );
-                       String[] commandArray = (String[])command.toArray( new String[command.size()] );
-                       boolean usePty = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_USE_TERMINAL, ICDTLaunchConfigurationConstants.USE_TERMINAL_DEFAULT);
-                       Process process;
-                       process = exec( commandArray, getEnvironment( config ), wd, usePty );
-                       DebugPlugin.newProcess( launch, process, renderProcessLabel( commandArray[0] ) );
-               } catch (IOException e) {
-                       e.printStackTrace();
-               }
-               
-               //add a listener for termination of the launch
-               ILaunchManager lmgr = DebugPlugin.getDefault().getLaunchManager();
-               lmgr.addLaunchListener(new LaunchTerminationWatcher(launch));
-
-       }
-       
-       /**
-        * This code was adapted from code written by QNX Software Systems and others 
-        * and was originally in the CDT under LocalCDILaunchDelegate::exec
-        * 
-        * @param cmdLine
-        *            the command line
-        * @param workingDirectory
-        *            the working directory, or <code>null</code>
-        * @return the resulting process or <code>null</code> if the exec is
-        *         cancelled
-        * @see Runtime
-        */
-       protected Process exec( String[] cmdLine, String[] environ, File workingDirectory, boolean usePty ) throws CoreException, IOException {
-               Process p = null;
-               try {
-                       if ( workingDirectory == null ) {
-                               p = ProcessFactory.getFactory().exec( cmdLine, environ );
-                       }
-                       else {
-                               if ( usePty && PTY.isSupported() ) {
-                                       p = ProcessFactory.getFactory().exec( cmdLine, environ, workingDirectory, new PTY() );
-                               }
-                               else {
-                                       p = ProcessFactory.getFactory().exec( cmdLine, environ, workingDirectory );
-                               }
-                       }
-               }
-               catch( IOException e ) {
-                       if ( p != null ) {
-                               p.destroy();
-                       }
-                       throw e;
-               }
-               return p;
-       }
-
-       @Override
-       protected String getPluginID() {
-               return OprofileLaunchPlugin.getUniqueIdentifier();
-       }
-
-       
-       //A class used to listen for the termination of the current launch, and 
-       // run some functions when it is finished. 
-       static class LaunchTerminationWatcher implements ILaunchesListener2 {
-               private ILaunch launch;
-               
-               public LaunchTerminationWatcher(ILaunch il) {
-                       launch = il;
-               }
-               
-               public void launchesTerminated(ILaunch[] launches) {
-                       try {
-                               for (ILaunch l : launches) {
-                                       /**
-                                        * Dump samples from the daemon,
-                                        * shut down the daemon,
-                                        * activate the OProfile view (open it if it isn't already),
-                                        * refresh the view (which parses the data/ui model and displays it).
-                                        */
-                                       if (l.equals(launch)) {
-                                               OprofileCorePlugin.getDefault().getOpcontrolProvider().dumpSamples();
-                                               OprofileCorePlugin.getDefault().getOpcontrolProvider().shutdownDaemon();
-
-                                               //need to run this in the ui thread otherwise get SWT Exceptions
-                                               // based on concurrency issues
-                                               Display.getDefault().syncExec(new Runnable() {
-                                                       public void run() {
-                                                               OprofileView view = OprofileUiPlugin.getDefault().getOprofileView();
-                                                               if (view != null) {
-                                                                       view.refreshView();
-                                                               } else {
-                                                                       try {
-                                                                               PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(OprofileUiPlugin.ID_OPROFILE_VIEW);
-                                                                       } catch (PartInitException e) {
-                                                                               e.printStackTrace();
-                                                                       }
-                                                                       OprofileUiPlugin.getDefault().getOprofileView().refreshView();
-                                                               }
-                                                       }
-                                               });
-                                       }
-                               }
-                       } catch (OpcontrolException oe) {
-                               OprofileCorePlugin.showErrorDialog("opcontrolProvider", oe); //$NON-NLS-1$
-                       }
-               }
-
-               public void launchesAdded(ILaunch[] launches) { /* dont care */}
-               public void launchesChanged(ILaunch[] launches) { /* dont care */ }
-               public void launchesRemoved(ILaunch[] launches) { /* dont care */ }
-       }       
-       
-}
diff --git a/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/launching/OprofileLaunchShortcut.java b/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/launching/OprofileLaunchShortcut.java
deleted file mode 100644 (file)
index de7bd25..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * 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:
- *    Kent Sebastian <ksebasti@redhat.com> - initial API and implementation 
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.launch.launching;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.linuxtools.oprofile.launch.OprofileLaunchPlugin;
-import org.eclipse.linuxtools.oprofile.launch.configuration.LaunchOptions;
-import org.eclipse.linuxtools.profiling.launch.ProfileLaunchShortcut;
-
-
-/**
- * A class that takes care of the right-click -> profile with oprofile
- *   shortcut, where the ProfileLaunchShortcut has the logic to automatically
- *   find binaries and create a default launch if one doesn't exist.
- */
-public class OprofileLaunchShortcut extends ProfileLaunchShortcut {
-       @Override
-       protected ILaunchConfigurationType getLaunchConfigType() {
-               return getLaunchManager().getLaunchConfigurationType(OprofileLaunchPlugin.ID_LAUNCH_PROFILE);
-       }
-
-       /**
-        * Default settings for the OProfile-specific option tabs.
-        */
-       @Override
-       protected void setDefaultProfileAttributes(ILaunchConfigurationWorkingCopy wc) throws CoreException {
-               //default global setup options
-               LaunchOptions options = new LaunchOptions();
-               options.saveConfiguration(wc);
-
-               //default event option
-               wc.setAttribute(OprofileLaunchPlugin.ATTR_USE_DEFAULT_EVENT, true);
-       
-               // commented by greatim at 2011.06.01 for fresh ide
-               //jinu added at 20090618
-//             wc.setAttribute(ICDTLaunchConstants.ATTR_LAUNCH_MODE, "oprofile");
-               //wc.setAttribute(ISMLCDTLaunchConstants.ATTR_SKIP_DOWNLOAD, false);
-       }
-
-}
diff --git a/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/oprofilelaunch.properties b/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/oprofile/launch/oprofilelaunch.properties
deleted file mode 100644 (file)
index 097e438..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#####################################################################
-# Copyright (c) 2004,2008 Red Hat, Inc.
-# 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:
-#    Keith Seitz <keiths@redhat.com> - initial implementation
-#    Kent Sebastian <ksebasti@redhat.com> - 
-###################################################################### 
-tab.claunch.name=&Application
-tab.claunch.launchConfig.label.text=C/C++ Launch &Configuration:
-tab.claunch.launchConfig.button.browse.text=&Browse...
-tab.claunch.launchConfigDialog.title=Launch Configuration Selection
-tab.claunch.launchConfigDialog.message=Choose a C/C++ Application Launch Configuration to profile:
-oprofileCounter.counterString=Counter: {0,number,integer}
-
-#jinu modified at 20090602
-#tab.event.name=Events
-tab.event.name=OProfile Options
-tab.event.counterSettings.label.text=Counter settings
-tab.event.counterSettings.enabled.button.text=Enabled
-tab.event.eventDescription.label.text=Event Description:
-tab.event.counterSettings.profileKernel.check.text=Profile kernel
-tab.event.counterSettings.profileUser.check.text=Profile user binaries
-tab.event.counterSettings.count.label.text=Count:
-tab.event.counterSettings.count.too-small=Minimum count must be at least {0,number,integer}
-tab.event.counterSettings.count.invalid=Invalid count value, must be an integer
-#jinu modified at 20090602
-#tab.event.defaultevent.button.text=Use default event
-tab.event.defaultevent.button.text=Use default setting
-#jinu modified at 20090602
-#tab.event.counterTab.counterText=Ctr 
-tab.event.counterTab.counterText=Counter 
-tab.event.timermode.no.options=OProfile is running in timer mode; no event options can be specified.
-
-tab.global.name=Global
-tab.global.kernelImage.label.text=&Kernel image file (optional):
-tab.global.kernelImage.kernel.nonexistent=Kernel image \"{0}\" does not exist
-tab.global.kernelImage.browse.button.text=&Browse...
-tab.global.selectKernelDialog.text=Select current kernel file
-tab.global.selectKernelDialog.error.kernelDoesNotExist.text=The selected kernel image file does not exist.
-tab.global.check.separateLibrary.text=Include dependent shared libraries 
-tab.global.check.separateKernel.text=Include dependent kernel modules (also includes libraries)
-tab.global.check.separateThread.text=Separate profiles per thread
-tab.global.check.separateCpu.text=Separate profiles per CPU
-
-common.cannotrun=Cannot run oprofile profiling.
-common.notarget=Target isn't connected. Please confirm it and retry.
-common.isprofiling=Another profiling is running. Please rerun after terminate the profiling.
-
-unitmaskViewer.label.text=Unit mask:
-
-launchshortcut.no_project_error=No project associated with selected element.
-launchshortcut.errordialog.title=OProfile Launcher
-launchshortcut.errordialog.no_launch_error=Error: No launch configurations exist for this project.
-
-launchshortcut.launchselectiondialog.no_project_name=<no name>
-launchshortcut.launchselectiondialog.title=Profile Configuration Selection
-launchshortcut.launchselectiondialog.message=Select a profiling launch configuration:
diff --git a/org.eclipse.linuxtools.oprofile.launch/src/org/tizen/oprofile/launch/DefaultSettingConstants.java b/org.eclipse.linuxtools.oprofile.launch/src/org/tizen/oprofile/launch/DefaultSettingConstants.java
deleted file mode 100644 (file)
index 2a07b13..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- *  Default Setting Constants
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.launch;
-
-import java.util.HashMap;
-
-import org.eclipse.linuxtools.oprofile.core.Oprofile;
-
-public abstract class DefaultSettingConstants {
-       
-       private static HashMap<String, String[][]> settingMap;
-       
-       private static void initialize() {
-               settingMap = new HashMap<String, String[][]>();
-               settingMap.put("i386/core_2", settingForCore2);
-               settingMap.put("arm/armv7", settingForARMv7);
-       }
-       
-       private static final String[] basicSetting = {
-               "Bottleneck Analysis", "event=default"
-       };
-       
-       private static final String[][] settingForARMv7 = {
-               basicSetting,
-               {"Instruction Cache Efficiency Analysis", "event=IFETCH_MISS:10000:0:1:1 event=INSTR_EXECUTED:10000:0:1:1"}
-       };
-       
-       private  static final String[][] settingForCore2 = {
-               basicSetting
-       };
-       
-       public static String[][] getDefaultSettings(){
-               String[][] settings = getSetting(Oprofile.getCpuType());
-               
-               if(settings==null){
-                       settings = new String[1][];
-                       settings[0] = basicSetting;
-               }
-               
-               return settings;
-       }
-
-
-       public static String getSettingValue(String key){
-               String value = null;
-               String[][] settings = getSetting(Oprofile.getCpuType());
-               
-               if(settings!=null){
-                       for(int i=0;i<settings.length;i++){
-                               if(settings[i][0].equals(key)){
-                                       value = settings[i][1];
-                               }
-                       }
-               }else{
-                       value = basicSetting[1];
-               }
-               
-               return value;
-       }
-
-       private static String[][] getSetting(String cpuType) {
-               if(settingMap==null)
-                       initialize();
-               
-               return settingMap.get(cpuType);
-       }
-       
-}
diff --git a/org.eclipse.linuxtools.oprofile.launch/src/org/tizen/oprofile/launch/listen/OProfileTargetConnectionListener.java b/org.eclipse.linuxtools.oprofile.launch/src/org/tizen/oprofile/launch/listen/OProfileTargetConnectionListener.java
deleted file mode 100644 (file)
index 2787c98..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *  Oprofile target Connection Listener
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.launch.listen;
-
-import org.eclipse.linuxtools.oprofile.core.Oprofile;
-
-import org.tizen.common.connection.ConnectionPlugin;
-import org.tizen.common.connection.ConnectionPlugin.ISelectionListener;
-import org.tizen.sdblib.service.FileEntry;
-
-public class OProfileTargetConnectionListener  implements ISelectionListener{
-
-       @Override
-       public void selectionChanged(FileEntry selectedEntry) {
-               // TODO Auto-generated method stub
-               if(null == ConnectionPlugin.getDefault().getCurrentDevice()){
-                       Oprofile.initialize();
-               }               
-       }
-       
-}
diff --git a/org.eclipse.linuxtools.oprofile.launch/src/org/tizen/oprofile/launch/listen/OprofileStartup.java b/org.eclipse.linuxtools.oprofile.launch/src/org/tizen/oprofile/launch/listen/OprofileStartup.java
deleted file mode 100644 (file)
index a73021d..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *  Oprofile Startup
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-
-package org.tizen.oprofile.launch.listen;
-
-import org.eclipse.ui.IStartup;
-
-import org.tizen.common.connection.ConnectionPlugin;
-
-public class OprofileStartup implements IStartup {
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.IStartup#earlyStartup()
-        */
-       private OProfileTargetConnectionListener mDeviceListener = null;
-//     
-       public void earlyStartup() {
-               mDeviceListener = new OProfileTargetConnectionListener();
-               ConnectionPlugin.getDefault().addSelectionListener(mDeviceListener);
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.ui/.classpath b/org.eclipse.linuxtools.oprofile.ui/.classpath
deleted file mode 100644 (file)
index 121e527..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="src" path="src"/>
-       <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="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.linuxtools.oprofile.ui/.project b/org.eclipse.linuxtools.oprofile.ui/.project
deleted file mode 100644 (file)
index ed72d2c..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.eclipse.linuxtools.oprofile.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.eclipse.linuxtools.oprofile.ui/.settings/org.eclipse.core.resources.prefs b/org.eclipse.linuxtools.oprofile.ui/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644 (file)
index 25df1f5..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#Wed Dec 01 09:13:25 CET 2010
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/org.eclipse.linuxtools.oprofile.ui/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.linuxtools.oprofile.ui/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644 (file)
index 0519b50..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#Tue Dec 14 16:36:33 CET 2010
-eclipse.preferences.version=1
-line.separator=\n
diff --git a/org.eclipse.linuxtools.oprofile.ui/META-INF/MANIFEST.MF b/org.eclipse.linuxtools.oprofile.ui/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index 23d746b..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Tizen SDK Oprofile UI
-Bundle-SymbolicName: org.eclipse.linuxtools.oprofile.ui;singleton:=true
-Bundle-Version: 1.3.18.qualifier
-Bundle-Vendor: Eclipse Linux Tools
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Require-Bundle: org.eclipse.ui;bundle-version="3.4.0",
- org.eclipse.ui.forms;bundle-version="3.3.0",
- org.eclipse.ui.editors;bundle-version="3.4.0",
- org.eclipse.birt.chart.engine,
- org.eclipse.core.resources;bundle-version="3.4.2",
- org.eclipse.jface.text;bundle-version="3.4.2",
- org.eclipse.linuxtools.oprofile.core,
- org.eclipse.linuxtools.profiling.ui,
- org.tizen.common
-Bundle-Activator: org.eclipse.linuxtools.oprofile.ui.OprofileUiPlugin
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.linuxtools.oprofile.ui;
-  uses:="org.eclipse.jface.resource,
-   org.eclipse.ui,
-   org.eclipse.linuxtools.oprofile.ui.sample,
-   org.eclipse.linuxtools.oprofile.ui.system,
-   org.eclipse.ui.plugin,
-   org.eclipse.core.resources,
-   org.eclipse.jface.viewers,
-   org.eclipse.swt.graphics,
-   org.osgi.framework,
-   org.eclipse.swt.widgets",
- org.eclipse.linuxtools.oprofile.ui.model,
- org.eclipse.linuxtools.oprofile.ui.view
diff --git a/org.eclipse.linuxtools.oprofile.ui/META-INF/eclipse.inf b/org.eclipse.linuxtools.oprofile.ui/META-INF/eclipse.inf
deleted file mode 100644 (file)
index 92ffed2..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#Processed using Jarprocessor
-pack200.conditioned = true
diff --git a/org.eclipse.linuxtools.oprofile.ui/NOTICE b/org.eclipse.linuxtools.oprofile.ui/NOTICE
deleted file mode 100644 (file)
index 72907e9..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-2010-02-03 SPRC SDK Team <d.kozinski@samsung.com>\r
-       * plugin.xml : changed some package names and delete category\r
-       * OprofileView.java : bug fix\r
-\r
-2010-02-08 Lukasz Czaplinski <l.czaplinski@samsung.com>\r
-       * MANIFEST.MF : Removed not needed birt.chart plugin  dependency\r
-\r
-2010-02-10 SPRC SDK Team <d.kozinski@samsung.com>\r
-       * OprofileUiPlugin.java : remove some import\r
-       * IUiModelElement.java : remove some import\r
-       * UiModelImage.java : remove some import\r
-       * UiModelSymbol.java : remove some import\r
-       * OprofileView.java : remove some import\r
-       * OprofileViewDoubleClickListener.java : remove some import\r
-\r
-2010-02-11 Zbigniew Kosinski <z.kosinski@samsung.com>\r
-       * OprofileView.java : remove unnecessary import, Fix display output data in SDK oprofile\r
-\r
-2010-03-08 Zbigniew Kosinski <z.kosinski@samsung.com>\r
-       * OprofileEditor.java : Fix display output data in SDK oprofile after read from log\r
-\r
-2010-03-19 HyungJong, Shin <hj_shin@samsung.com>\r
-       * MANIFEST.MF : add some plugin dependency\r
-\r
-2010-03-22 HyungJong, Shin <hj_shin@samsung.com>\r
-       * MANIFEST.MF : remove unused dependencies.\r
-\r
-2010-04-05 HyungJong, Shin <hj_shin@samsung.com>\r
-       * OprofileSaveFileHandler.java : bugfix : add the code to check the write permission of folder to save a file adn to set default location to home folder.\r
-\r
-2010-04-06 HyungJong, Shin <hj_shin@samsung.com>\r
-       * OprofileSaveFileHandler.java : bugfix : for unintentional error message to save a file in syslog, oprofile, valgrind.\r
-\r
-2010-08-26 HyungJong, Shin <hj_shin@samsung.com>\r
-       * MANIFEST.MF : modify plugin dependency\r
-       * OprofileViewDoubleClickListener.java : modify some import, modify target control code\r
-       \r
-2010-11-05 sdk <sdk@sdk-laptop.(none)>\r
-       * MANIFEST.MF : changed some package name\r
-       * plugin.xml : changed some package name\r
-       * OprofileView.java : changed some package name\r
-       * OprofileViewDoubleClickListener.java : changed some package name\r
-\r
-2011-06-09 jaewon81.lim <jaewon81.lim@samsung.com>\r
-       * MANIFEST.MF : rearrange plugins dependency\r
-\r
-2011-07-13 jaewon81.lim <jaewon81.lim@samsung.com>\r
-       * MANIFEST.MF : modified import package name\r
-\r
-2011-08-22 joogwan.kim <joogwan.kim@samsung.com>\r
-       * MANIFEST.MF : Change plug-in name\r
-\r
-2011-08-25 wonhyoung2.park <wonhyoung2.park@samsung.com>\r
-       * MANIFEST.MF : plugin provider and name modified\r
-\r
-2011-09-17 YoonKi Park <yoonki.park@samsung.com>\r
-       * plugin.xml : change view category name to SLP SDK\r
-\r
-2011-11-22 taeyoung2.son <taeyoung2.son@samsung.com>\r
-       * MANIFEST.MF :  Modify SDK naming from "SLP(or Samsung Linux Platform)" to "Tizen"\r
-\r
-2011-11-29 wonhyoung2.park <wonhyoung2.park@samsung.com>\r
-       * MANIFEST.MF : chagne slp to tizen\r
-       * plugin.xml : chagne slp to tizen\r
-       * OprofileView.java : chagne slp to tizen\r
-\r
-2011-12-02 taeyoung2.son <taeyoung2.son@samsung.com>\r
-       * MANIFEST.MF : Delete dependency feature's version value.\r
-\r
-2011-12-03 wonhyoung2.park <wonhyoung2.park@samsung.com>\r
-       * MANIFEST.MF : package instll routine chage\r
diff --git a/org.eclipse.linuxtools.oprofile.ui/about.html b/org.eclipse.linuxtools.oprofile.ui/about.html
deleted file mode 100644 (file)
index bf06e8c..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-<p>8th September, 2004</p>     
-<h3>License</h3>
-<p>The Eclipse Software Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the EPL, any Contributions, as defined in the EPL, uploaded, submitted, or otherwise
-made available to the Eclipse Foundation, its members and/or the host of the Eclipse Foundation web site, by you that relate to such
-Content are provided under the terms and conditions of the <a href="http://www.eclipse.org/legal/termsofuse.html">Terms of Use</a>
-for the Eclipse Foundation web site and can be made available to others under the terms of the licenses as set out in the
-<a href="http://www.eclipse.org/legal/termsofuse.html">Terms of Use</a>.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the EPL (&quot;Other License&quot;), any modifications, enhancements and/or
-other code and/or documentation (&quot;Modifications&quot;) uploaded, submitted, or otherwise made available to the Eclipse Foundation, its members and/or the
-host of the Eclipse Foundation web site, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License.  In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the <a href="http://www.eclipse.org/legal/termsofuse.html">Terms of Use</a>
-for the Eclipse Foundation web site and such Modifications can be made available to others under the terms of the licenses as set out in the
-<a href="http://www.eclipse.org/legal/termsofuse.html">Terms of Use</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.oprofile.ui/build.properties b/org.eclipse.linuxtools.oprofile.ui/build.properties
deleted file mode 100644 (file)
index 6b70fb2..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
-               .,\
-               plugin.xml,\
-               plugin.properties,\
-               icons/,\
-               about.html
-javacSource = 1.6
-javacTarget = 1.6
diff --git a/org.eclipse.linuxtools.oprofile.ui/icons/chart.png b/org.eclipse.linuxtools.oprofile.ui/icons/chart.png
deleted file mode 100644 (file)
index d65084d..0000000
Binary files a/org.eclipse.linuxtools.oprofile.ui/icons/chart.png and /dev/null differ
diff --git a/org.eclipse.linuxtools.oprofile.ui/icons/dependent.gif b/org.eclipse.linuxtools.oprofile.ui/icons/dependent.gif
deleted file mode 100644 (file)
index 122bada..0000000
Binary files a/org.eclipse.linuxtools.oprofile.ui/icons/dependent.gif and /dev/null differ
diff --git a/org.eclipse.linuxtools.oprofile.ui/icons/dump.gif b/org.eclipse.linuxtools.oprofile.ui/icons/dump.gif
deleted file mode 100644 (file)
index d5b8001..0000000
Binary files a/org.eclipse.linuxtools.oprofile.ui/icons/dump.gif and /dev/null differ
diff --git a/org.eclipse.linuxtools.oprofile.ui/icons/event.gif b/org.eclipse.linuxtools.oprofile.ui/icons/event.gif
deleted file mode 100644 (file)
index c91f254..0000000
Binary files a/org.eclipse.linuxtools.oprofile.ui/icons/event.gif and /dev/null differ
diff --git a/org.eclipse.linuxtools.oprofile.ui/icons/image.gif b/org.eclipse.linuxtools.oprofile.ui/icons/image.gif
deleted file mode 100644 (file)
index 8aa0162..0000000
Binary files a/org.eclipse.linuxtools.oprofile.ui/icons/image.gif and /dev/null differ
diff --git a/org.eclipse.linuxtools.oprofile.ui/icons/open_log.png b/org.eclipse.linuxtools.oprofile.ui/icons/open_log.png
deleted file mode 100644 (file)
index 60bf946..0000000
Binary files a/org.eclipse.linuxtools.oprofile.ui/icons/open_log.png and /dev/null differ
diff --git a/org.eclipse.linuxtools.oprofile.ui/icons/oprofile_view.png b/org.eclipse.linuxtools.oprofile.ui/icons/oprofile_view.png
deleted file mode 100644 (file)
index 4f8488f..0000000
Binary files a/org.eclipse.linuxtools.oprofile.ui/icons/oprofile_view.png and /dev/null differ
diff --git a/org.eclipse.linuxtools.oprofile.ui/icons/refresh.gif b/org.eclipse.linuxtools.oprofile.ui/icons/refresh.gif
deleted file mode 100644 (file)
index 4f884d7..0000000
Binary files a/org.eclipse.linuxtools.oprofile.ui/icons/refresh.gif and /dev/null differ
diff --git a/org.eclipse.linuxtools.oprofile.ui/icons/reset_log.gif b/org.eclipse.linuxtools.oprofile.ui/icons/reset_log.gif
deleted file mode 100644 (file)
index b6922ac..0000000
Binary files a/org.eclipse.linuxtools.oprofile.ui/icons/reset_log.gif and /dev/null differ
diff --git a/org.eclipse.linuxtools.oprofile.ui/icons/sample.gif b/org.eclipse.linuxtools.oprofile.ui/icons/sample.gif
deleted file mode 100644 (file)
index 061161a..0000000
Binary files a/org.eclipse.linuxtools.oprofile.ui/icons/sample.gif and /dev/null differ
diff --git a/org.eclipse.linuxtools.oprofile.ui/icons/save_log.png b/org.eclipse.linuxtools.oprofile.ui/icons/save_log.png
deleted file mode 100644 (file)
index 5950473..0000000
Binary files a/org.eclipse.linuxtools.oprofile.ui/icons/save_log.png and /dev/null differ
diff --git a/org.eclipse.linuxtools.oprofile.ui/icons/session.gif b/org.eclipse.linuxtools.oprofile.ui/icons/session.gif
deleted file mode 100644 (file)
index c2b41bd..0000000
Binary files a/org.eclipse.linuxtools.oprofile.ui/icons/session.gif and /dev/null differ
diff --git a/org.eclipse.linuxtools.oprofile.ui/icons/symbol.gif b/org.eclipse.linuxtools.oprofile.ui/icons/symbol.gif
deleted file mode 100644 (file)
index 6ae4604..0000000
Binary files a/org.eclipse.linuxtools.oprofile.ui/icons/symbol.gif and /dev/null differ
diff --git a/org.eclipse.linuxtools.oprofile.ui/plugin.properties b/org.eclipse.linuxtools.oprofile.ui/plugin.properties
deleted file mode 100644 (file)
index bf32971..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#*******************************************************************************
-# Copyright (c) 2004, 2008 Red Hat, Inc.
-# 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:
-#    Red Hat, Inc. - initial API and implementation
-#*******************************************************************************
-
-view.groupname=C/C++ Profiling
-view.name=OProfile
-
-view.annotate.toggle.label=Toggle Annotation
-view.annotate.toggle.tooltip=Toggle Annotation
-
-annotateCommand.name=Annotate
-lt.min.pct.label=OProfile Annotation: <0.01%
-lt.05.pct.label=OProfile Annotation: 0.01% - 4.99%
-lt.10.pct.label=OProfile Annotation: 05% - 9.99%
-lt.20.pct.label=OProfile Annotation: 10% - 19.99%
-lt.30.pct.label=OProfile Annotation: 20% - 29.99%
-lt.40.pct.label=OProfile Annotation: 30% - 39.99%
-lt.50.pct.label=OProfile Annotation: 40% - 49.99%
-gt.50.pct.label=OProfile Annotation: >50%
diff --git a/org.eclipse.linuxtools.oprofile.ui/plugin.xml b/org.eclipse.linuxtools.oprofile.ui/plugin.xml
deleted file mode 100644 (file)
index ef737b5..0000000
+++ /dev/null
@@ -1,184 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
-   <!--<extension
-         point="org.eclipse.ui.views">
-      <view
-            category="org.tizen.nativeapp.viewCategory"
-            class="org.eclipse.linuxtools.oprofile.ui.view.OprofileView"
-            icon="icons/oprofile_view.png"
-            id="org.eclipse.linuxtools.oprofile.ui.OProfileView"
-            name="Oprofile"
-            restorable="true">
-      </view>
-   </extension>-->
-   <!-- jinu added at 20090528-->
-   <extension
-         point="org.eclipse.ui.menus">
-      <menuContribution
-            locationURI="toolbar:org.eclipse.linuxtools.oprofile.ui.OProfileView?after=additions">
-       <!--            <command
-               commandId="org.tizen.oprofile.ui.command.refreshView"
-               icon="icons/refresh.gif"
-               tooltip="Refresh">
-         </command>
-         <command
-               commandId="org.tizen.oprofile.ui.command.reset"
-               icon="icons/reset_log.gif"
-               tooltip="Reset">
-         </command> -->
-         <command
-               commandId="org.tizen.oprofile.ui.command.drawChart"
-               icon="icons/chart.png"
-               tooltip="Draw Chart">
-         </command>
-                       <separator
-               name="org.tizen.oprofile.ui.view.separator1"
-               visible="true">
-         </separator>
-                       <command
-               commandId="org.tizen.oprofile.command.saveFile"
-               icon="icons/save_log.png"
-               tooltip="Save file">
-            <parameter
-                  name="org.tizen.oprofile.command.saveFile.parameter"
-                  value="oprofile">
-            </parameter>
-         </command>
-         <command
-               commandId="org.tizen.common.command.openFile"
-               icon="icons/open_log.png"
-               tooltip="Open file">
-            <parameter
-                  name="org.tizen.common.command.openFile.parameter"
-                  value="oprofile">
-            </parameter>
-         </command>                  
-      </menuContribution>
-               <!--menuContribution
-            locationURI="menu:org.eclipse.linuxtools.oprofile.ui.OProfileView?after=additions">
-                       <command
-               commandId="org.tizen.oprofile.ui.command.openDaemonLog"
-               tooltip="Open Daemon Log">
-         </command>
-      </menuContribution-->
-   </extension>
-       <extension point="org.eclipse.ui.commands">
-      <category
-            description="Commands related to the Oprofile"
-            id="org.tizen.oprofile.ui.command.category"
-            name="Oprofile">
-      </category>
-      <command
-            categoryId="org.tizen.oprofile.ui.command.category"
-            id="org.tizen.oprofile.ui.command.refreshView"
-            name="Refresh View">
-      </command>
-      <command
-            categoryId="org.tizen.oprofile.ui.command.category"
-            id="org.tizen.oprofile.ui.command.drawChart"
-            name="Draw Chart">
-      </command>    
-        <command
-            categoryId="org.tizen.oprofile.ui.command.category"
-            id="org.tizen.oprofile.ui.command.openDaemonLog"
-            name="Open DaemonLog">
-      </command>
-      <command
-            categoryId="org.tizen.oprofile.ui.command.category"
-            id="org.tizen.oprofile.ui.command.reset"
-            name="Reset Log">
-      </command>
-               <command
-            categoryId="org.tizen.oprofile.ui.command.category"
-            description="Save"
-            id="org.tizen.oprofile.command.saveFile"
-            name="Save">
-         <commandParameter
-               id="org.tizen.oprofile.command.saveFile.parameter"
-               name="Extension"
-               optional="false">
-         </commandParameter>
-      </command>          
-       </extension>     
-       <extension point="org.eclipse.ui.handlers">
-      <handler class="org.tizen.oprofile.ui.handler.OprofileSaveFileHandler"
-            commandId="org.tizen.oprofile.command.saveFile">
-      </handler>       
-      <handler class="org.tizen.oprofile.ui.handler.OprofileRefreshViewHandler"
-            commandId="org.tizen.oprofile.ui.command.refreshView">
-         <activeWhen>
-                       <with
-                                       variable="org.tizen.connection.sourceProvider.TargetState">
-                                       <or>
-                                               <equals
-                                                       value="SIMULATOR_CONNECTED">  
-                                               </equals>
-                                               <equals
-                                                       value="REAL_DEVICE_CONNECTED">  
-                                               </equals>
-                                       </or>
-                               </with>
-         </activeWhen>
-      </handler>
-      <handler
-            class="org.tizen.oprofile.ui.handler.OprofileDrawChartHandler"
-            commandId="org.tizen.oprofile.ui.command.drawChart">
-         <activeWhen>
-                     <with
-                                       variable="selection">
-                               <count
-                                       value="1">
-                               </count>
-                     </with>
-         </activeWhen>
-      </handler>
-               <handler class="org.tizen.oprofile.ui.handler.OprofileResetHandler"
-            commandId="org.tizen.oprofile.ui.command.reset">
-         <activeWhen>
-                       <with
-                                       variable="org.tizen.connection.sourceProvider.TargetState">
-                                       <or>
-                                               <equals
-                                                       value="SIMULATOR_CONNECTED">  
-                                               </equals>
-                                               <equals
-                                                       value="REAL_DEVICE_CONNECTED">  
-                                               </equals>
-                                       </or>
-                               </with>
-         </activeWhen>
-      </handler>
-      <handler
-            class="org.tizen.oprofile.ui.handler.OprofileOpenDaemonLogHandler"
-            commandId="org.tizen.oprofile.ui.command.openDaemonLog">
-      </handler>                        
-       </extension>      
-   <extension
-         point="org.eclipse.ui.editors">
-      <editor
-            class="org.tizen.oprofile.ui.editor.ChartEditor"
-            default="false"
-            icon="icons/oprofile_view.png"
-            id="org.tizen.oprofile.ui.editor.ChartEditor"
-            name="Pie Chart for Oprofile">
-      </editor>
-               <editor
-                       class="org.tizen.oprofile.ui.editor.OprofileEditor"
-                       default="true"
-                       extensions="oprofile"
-                       icon="icons/oprofile_view.png"
-                       id="org.tizen.oprofile.ui.editor.OprofileEditor"
-                       name="Oprofile Editor">
-               </editor>      
-   </extension>         
-   <extension
-         point="org.eclipse.ui.perspectiveExtensions">
-      <perspectiveExtension
-            targetID="org.tizen.nativeapp.perspective">
-         <viewShortcut
-               id="org.eclipse.linuxtools.oprofile.ui.OProfileView">
-         </viewShortcut>
-      </perspectiveExtension>
-   </extension>    
-</plugin>
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/OprofileUiMessages.java b/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/OprofileUiMessages.java
deleted file mode 100644 (file)
index dc195d4..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *******************************************************************************/ 
-
-package org.eclipse.linuxtools.oprofile.ui;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class OprofileUiMessages
-{
-
-       private static final String BUNDLE_NAME = "org.eclipse.linuxtools.oprofile.ui.oprofileui"; //$NON-NLS-1$
-
-       private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
-
-       private OprofileUiMessages()
-       {
-       }
-
-       public static String getString(String key)
-       {
-               try
-               {
-                       return RESOURCE_BUNDLE.getString(key);
-               }
-               catch (MissingResourceException e)
-               {
-                       return '!' + key + '!';
-               }
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/OprofileUiPlugin.java b/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/OprofileUiPlugin.java
deleted file mode 100644 (file)
index 3b4da4b..0000000
+++ /dev/null
@@ -1,161 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008, 2009 Red Hat, Inc.
- * 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:
- *    Keith Seitz <keiths@redhat.com> - initial API and implementation
- *    Kent Sebastian <ksebasti@redhat.com> - 
- *******************************************************************************/ 
-
-package org.eclipse.linuxtools.oprofile.ui;
-
-import java.text.DecimalFormat;
-import java.text.NumberFormat;
-
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.linuxtools.oprofile.ui.view.OprofileView;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class OprofileUiPlugin extends AbstractUIPlugin {
-       //The shared instance.
-       private static OprofileUiPlugin plugin;
-
-       private OprofileView _oprofileview = null;
-       
-       public static final String ID_PLUGIN = "org.eclipse.linuxtools.oprofile.ui"; //$NON-NLS-1$
-       public static final String ID_OPROFILE_VIEW = ID_PLUGIN + ".OProfileView"; //$NON-NLS-1$
-
-       private static final String ICON_PATH = "icons/"; //$NON-NLS-1$
-       public static final String SESSION_ICON = ICON_PATH + "session.gif"; //$NON-NLS-1$
-       public static final String EVENT_ICON = ICON_PATH + "event.gif"; //$NON-NLS-1$
-       public static final String IMAGE_ICON = ICON_PATH + "image.gif"; //$NON-NLS-1$
-       public static final String DEPENDENT_ICON = ICON_PATH + "dependent.gif"; //$NON-NLS-1$
-       public static final String SYMBOL_ICON = ICON_PATH + "symbol.gif"; //$NON-NLS-1$
-       public static final String SAMPLE_ICON = ICON_PATH + "sample.gif"; //$NON-NLS-1$
-       
-       public static final double MINIMUM_SAMPLE_PERCENTAGE = 0.0001;
-       public static final double MINIMUM_CHART_PERCENTAGE = 0.01;
-       
-       public static final String ANNOTATION_TYPE_LT_MIN_PERCENTAGE = "org.eclipse.linuxtools.oprofile.ui.annotation.lt.min.pct"; //$NON-NLS-1$
-       public static final String ANNOTATION_TYPE_LT_05 = "org.eclipse.linuxtools.oprofile.ui.annotation.lt.05.pct"; //$NON-NLS-1$
-       public static final String ANNOTATION_TYPE_LT_10 = "org.eclipse.linuxtools.oprofile.ui.annotation.lt.10.pct"; //$NON-NLS-1$
-       public static final String ANNOTATION_TYPE_LT_20 = "org.eclipse.linuxtools.oprofile.ui.annotation.lt.20.pct"; //$NON-NLS-1$
-       public static final String ANNOTATION_TYPE_LT_30 = "org.eclipse.linuxtools.oprofile.ui.annotation.lt.30.pct"; //$NON-NLS-1$
-       public static final String ANNOTATION_TYPE_LT_40 = "org.eclipse.linuxtools.oprofile.ui.annotation.lt.40.pct"; //$NON-NLS-1$
-       public static final String ANNOTATION_TYPE_LT_50 = "org.eclipse.linuxtools.oprofile.ui.annotation.lt.50.pct"; //$NON-NLS-1$
-       public static final String ANNOTATION_TYPE_GT_50 = "org.eclipse.linuxtools.oprofile.ui.annotation.gt.50.pct"; //$NON-NLS-1$
-       
-       /**
-        * The constructor.
-        */
-       public OprofileUiPlugin() {
-               plugin = this;
-       }
-
-       /**
-        * This method is called upon plug-in activation
-        */
-       public void start(BundleContext context) throws Exception {
-               super.start(context);
-       }
-
-       /**
-        * This method is called when the plug-in is stopped
-        */
-       public void stop(BundleContext context) throws Exception {
-               super.stop(context);
-               plugin = null;
-       }
-       
-       
-       /**
-        * Returns the shared instance.
-        */
-       public static OprofileUiPlugin getDefault() {
-               return plugin;
-       }
-
-       /**
-        * Returns the workspace instance.
-        */
-       public static IWorkspace getWorkspace() {
-               return ResourcesPlugin.getWorkspace();
-       }
-
-       /**     
-        * 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(ID_PLUGIN, path);
-       }
-       
-       
-       public OprofileView getOprofileView() {
-               return _oprofileview;
-       }
-
-       public void setOprofileView(OprofileView _oprofileview) {
-               this._oprofileview = _oprofileview;
-       }
-
-       public static IWorkbenchWindow getActiveWorkbenchWindow() {
-               return getDefault().getWorkbench().getActiveWorkbenchWindow();
-       }
-       
-       public static Shell getActiveWorkbenchShell() {
-               IWorkbenchWindow window = getActiveWorkbenchWindow();
-               if (window != null) {
-                       return window.getShell();
-               }
-               return null;
-       }
-       
-       public static String getPercentageString(double percentage) {
-               NumberFormat nf = NumberFormat.getPercentInstance();
-               if (nf instanceof DecimalFormat) {
-                       nf.setMinimumFractionDigits(2);
-                       nf.setMaximumFractionDigits(2);
-               }
-               
-               if (percentage < OprofileUiPlugin.MINIMUM_SAMPLE_PERCENTAGE) {
-                       return "<" + nf.format(OprofileUiPlugin.MINIMUM_SAMPLE_PERCENTAGE); //$NON-NLS-1$
-               } else {
-                       return nf.format(percentage);
-               }
-       }
-       
-       
-//     jinu added at 20090526
-       public static String getPercentage(double percentage) {
-               String strValue = null;
-               if(percentage < OprofileUiPlugin.MINIMUM_SAMPLE_PERCENTAGE){
-                       strValue="< "+getDoubleFloor(OprofileUiPlugin.MINIMUM_SAMPLE_PERCENTAGE*100,2);
-               }else{
-                       strValue = String.valueOf( getDoubleFloor(percentage*100,2));                   
-               }
-               
-               return strValue;
-       }
-       
-       //jinu added at 20090602
-       public static double getDoubleFloor(double dblDigit, int position){
-               double dblCal = Math.pow(10, position);
-               return (int)(dblDigit*(int)dblCal) / dblCal;
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/IUiModelElement.java b/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/IUiModelElement.java
deleted file mode 100644 (file)
index 4183b12..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * 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:
- *    Kent Sebastian <ksebasti@redhat.com> - initial API and implementation 
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.ui.model;
-
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Interface for all model elements to ease use with the tree viewer.
- */
-public interface IUiModelElement {
-       /**
-        * Returns the text to display in the tree viewer as required by the label provider.
-        * @return text describing this element
-        */
-       String getLabelText();
-
-       /**
-        * Returns the children of this element.
-        * @return an array of IUiModelElements
-        */
-       IUiModelElement[] getChildren();
-       
-       /**
-        * Returns if this element has any children. Unless there is no data in
-        * a session, only samples should not have any children.
-        * @return true if children, false if no children
-        */
-       boolean hasChildren();
-       
-       /**
-        * Returns the parent element.
-        * @return the parent element
-        */
-       IUiModelElement getParent();
-
-       /**
-        * Returns the Image to display next to the text in the tree viewer.
-        * @return an Image object of the icon
-        */
-       Image getLabelImage();
-       
-       //jinu added at 20090602----------
-       double getPercentage();
-       String getName();
-       //-------------------------
-}
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelDependent.java b/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelDependent.java
deleted file mode 100644 (file)
index 8c2bfd1..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * 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:
- *    Kent Sebastian <ksebasti@redhat.com> - initial API and implementation 
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.ui.model;
-
-import org.eclipse.linuxtools.oprofile.core.model.OpModelImage;
-import org.eclipse.linuxtools.oprofile.ui.OprofileUiMessages;
-import org.eclipse.linuxtools.oprofile.ui.OprofileUiPlugin;
-import org.eclipse.swt.graphics.Image;
-
-public class UiModelDependent implements IUiModelElement {
-       private IUiModelElement _parent;
-       private OpModelImage _dataModelDependents[];
-       private UiModelImage _dependents[];
-       private int _totalCount;
-       private int _depCount;
-       
-       public UiModelDependent(IUiModelElement parent, OpModelImage dependents[], int totalCount, int depCount) {
-               _parent = parent;
-               _dataModelDependents = dependents;
-               _dependents = null;
-               _totalCount = totalCount;
-               _depCount = depCount;
-               refreshModel();
-       }
-
-       private void refreshModel() {
-               _dependents = new UiModelImage[_dataModelDependents.length];
-               
-               for (int i = 0; i < _dataModelDependents.length; i++) {
-                       _dependents[i] = new UiModelImage(this, _dataModelDependents[i], _totalCount, 0);
-               }
-       }
-       
-       @Override
-       public String toString() {
-               double countPercentage = (double)_depCount / (double)_totalCount;
-               String percentage = OprofileUiPlugin.getPercentageString(countPercentage);
-
-               return percentage + " " + OprofileUiMessages.getString("uimodel.percentage.in") + OprofileUiMessages.getString("uimodel.dependent.dependent.images"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ 
-       }
-
-       /** IUiModelElement functions **/
-       public String getLabelText() {
-               return toString();
-       }
-
-       public IUiModelElement[] getChildren() {
-               return _dependents;
-       }
-
-       public boolean hasChildren() {
-               return true;    //must have children, or this object wouldn't be created
-       }
-
-       public IUiModelElement getParent() {
-               return _parent;
-       }
-
-       public Image getLabelImage() {
-               return OprofileUiPlugin.getImageDescriptor(OprofileUiPlugin.DEPENDENT_ICON).createImage();
-       }
-       
-//     jinu added at 20090526--------------------
-       public String getName(){
-               return null;
-       }
-       
-       public double getPercentage(){
-               return (double)_depCount / (double)_totalCount;
-       }
-//     ----------------------------------
-}
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelEvent.java b/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelEvent.java
deleted file mode 100644 (file)
index 8dec55f..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * 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:
- *    Kent Sebastian <ksebasti@redhat.com> - initial API and implementation 
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.ui.model;
-
-import org.eclipse.linuxtools.oprofile.core.model.OpModelEvent;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelSession;
-import org.eclipse.linuxtools.oprofile.ui.OprofileUiPlugin;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Top level elements displayed in the view -- events that oprofile 
- *  has profiled. Must have children sessions.
- */
-public class UiModelEvent implements IUiModelElement {
-       private IUiModelElement _parent = null;         //parent node -- necessary?
-       private OpModelEvent _event;                            //the node in the data model
-       private UiModelSession _sessions[];                     //this node's children
-       
-       public UiModelEvent(OpModelEvent event) {
-               if (event != null) {
-                       _event = event;
-                       refreshModel();
-               }
-       }
-
-       /**
-        * Create the ui sessions from the data model.
-        */
-       private void refreshModel() {
-               OpModelSession dataModelSessions[] = _event.getSessions();
-               _sessions = new UiModelSession[dataModelSessions.length];
-               
-               for (int i = 0; i < dataModelSessions.length; i++) {
-                       _sessions[i] = new UiModelSession(this, dataModelSessions[i]);
-               }
-       }
-
-       @Override
-       public String toString() {
-               return (_event == null ? "" : _event.getName()); //$NON-NLS-1$
-       }
-
-       /** IUiModelElement functions **/
-       public String getLabelText() {
-               return toString();
-       }
-       
-       public IUiModelElement[] getChildren() {
-               return _sessions;
-       }
-
-       public boolean hasChildren() {
-               return (_sessions == null || _sessions.length == 0 ? false : true);
-       }
-
-       public IUiModelElement getParent() {
-               return _parent;
-       }
-
-       public Image getLabelImage() {
-               return OprofileUiPlugin.getImageDescriptor(OprofileUiPlugin.EVENT_ICON).createImage();
-       }
-       
-//     jinu added at 20090526-------------------
-       public String getName(){
-               return null;
-       }
-       
-       public double getPercentage(){
-               return -1;
-       }       
-//     -----------------------------
-}
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelImage.java b/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelImage.java
deleted file mode 100644 (file)
index 6fc87a5..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * 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:
- *    Kent Sebastian <ksebasti@redhat.com> - initial API and implementation 
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.ui.model;
-
-import org.eclipse.linuxtools.oprofile.core.model.OpModelImage;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelSymbol;
-import org.eclipse.linuxtools.oprofile.ui.OprofileUiMessages;
-import org.eclipse.linuxtools.oprofile.ui.OprofileUiPlugin;
-import org.eclipse.swt.graphics.Image;
-
-
-/**
- * Children of sessions in the view -- the binary which was profiled. 
- * May or may not have child symbols. Note that although the dependent
- * images are children of OpModelImages in the data model, for usability's
- * sake they are children of the parent session in the tree.
- */
-public class UiModelImage implements IUiModelElement {
-       private IUiModelElement _parent;                //parent element, may be UiModelSession or UiModelDependent
-       private OpModelImage _image;                    //the node in the data model
-       private UiModelSymbol _symbols[];               //this node's child (symbols)
-       private int _totalCount;                                //total number of samples 
-       private int _depCount;                                  //number of samples from dependent images
-
-       public UiModelImage(IUiModelElement parent, OpModelImage image, int totalCount, int depCount) {
-               _parent = parent;
-               _image = image;
-               _symbols = null;
-               _totalCount = totalCount;
-               _depCount = depCount;
-               refreshModel();
-               
-               //jinu added at 20090602                
-               //addChartModel();
-       }
-       
-       //jinu added at 20090602
-       /*
-       private void addChartModel(){
-               ChartModelRoot chartModel = ChartModelRoot.getDefault();
-               if(_parent instanceof UiModelDependent || _symbols==null){
-                       chartModel.addElement(this);
-               }
-       }
-       */
-
-       private void refreshModel() {
-               OpModelSymbol[] dataModelSymbols = _image.getSymbols();
-               
-               //dependent images may not have symbols
-               if (dataModelSymbols != null) {
-                       _symbols = new UiModelSymbol[dataModelSymbols.length];
-       
-                       for (int i = 0; i < dataModelSymbols.length; i++) {
-                               _symbols[i] = new UiModelSymbol(this, dataModelSymbols[i], _totalCount);
-                       }
-               }
-       }
-       
-       @Override
-       public String toString() {
-               if (_image.getCount() == OpModelImage.IMAGE_PARSE_ERROR) {
-                       return OprofileUiMessages.getString("opxmlParse.error.multipleImages"); //$NON-NLS-1$
-               } else {
-                       double countPercentage = (double)(_image.getCount() - _depCount) / (double)_totalCount;
-                       String percentage = OprofileUiPlugin.getPercentageString(countPercentage);
-                       
-                       return percentage + " " + OprofileUiMessages.getString("uimodel.percentage.in") + _image.getName(); //$NON-NLS-1$ //$NON-NLS-2$
-               }
-       }
-       
-       /** IUiModelElement functions **/
-       public String getLabelText() {
-               return toString();
-       }
-
-       public IUiModelElement[] getChildren() {
-               IUiModelElement children[] = null;
-               
-               if (_symbols != null) {
-                       children = new IUiModelElement[_symbols.length];
-                       
-                       for (int i = 0; i < _symbols.length; i++) {
-                               children[i] = _symbols[i];
-                       }
-               }
-               
-               return children;
-       }
-
-       public boolean hasChildren() {
-               return (_symbols == null || _symbols.length == 0 ? false : true);
-       }
-
-       public IUiModelElement getParent() {
-               return _parent;
-       }
-
-       public Image getLabelImage() {
-               return OprofileUiPlugin.getImageDescriptor(OprofileUiPlugin.IMAGE_ICON).createImage();
-       }
-       
-//     jinu added at 20090526--------------------------
-       public double getPercentage(){
-               return (double)(_image.getCount() - _depCount) / (double)_totalCount;
-       }
-       
-       public String getName(){
-               return  _image.getName();
-       }
-//     -----------------------------   
-}
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelRoot.java b/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelRoot.java
deleted file mode 100644 (file)
index bceb693..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * 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:
- *    Kent Sebastian <ksebasti@redhat.com> - initial API and implementation 
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.ui.model;
-
-import org.eclipse.linuxtools.oprofile.core.model.OpModelEvent;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelRoot;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelSession;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Convenience class for creating the UI model from the oprofile data model,
- *  via a single point of access.
- */
-public class UiModelRoot implements IUiModelElement {
-       //jinu removed at 20090704
-       //private static UiModelRoot _uiModelRoot = new UiModelRoot();  //singleton
-       private UiModelEvent[] _events;                                                 //this node's children
-
-
-       /** constructor, private for singleton use **/
-       //jinu removed at 20090704
-       /*
-       protected UiModelRoot() {
-//             refreshModel();
-               _events = null;
-//             _uiModelRoot = this;
-       }
-       */
-       
-       public UiModelRoot() {
-               _events = null;
-       }
-       
-       /**
-        * Get the instance of this ui model root.
-        * @return the ui model root object
-        */
-       //jinu removed at 20090704
-       /*
-       public static UiModelRoot getDefault() {
-               return _uiModelRoot;
-       }
-       */
-
-       /**
-        * Kick off creating the UI model from the data model. Meant to 
-        *      be called from UI code. The refreshModel() method is called for 
-        *  the child elements from their constructor.
-        */
-       //jinu removed at 20090704
-       /*
-       public void refreshModel() {
-               OpModelEvent dataModelEvents[] = getModelDataEvents();
-
-               if (dataModelEvents != null) {
-                       _events = new UiModelEvent[dataModelEvents.length];
-                       for (int i = 0; i < dataModelEvents.length; i++) {
-                               _events[i] = new UiModelEvent(dataModelEvents[i]);
-                       }
-               }
-       }
-       
-       
-       protected OpModelEvent[] getModelDataEvents() {
-               OpModelRoot modelRoot = OpModelRoot.getDefault();
-               return modelRoot.getEvents();
-       }
-       */
-
-       /** IUiModelElement functions **/
-       public String getLabelText() {
-               return null;
-       }
-
-       public IUiModelElement[] getChildren() {
-               return _events;
-       }
-
-       public boolean hasChildren() {
-               return (_events == null || _events.length == 0 ? false : true);
-       }
-
-       public IUiModelElement getParent() {
-               return null;
-       }
-
-       public Image getLabelImage() {
-               return null;
-       }
-       
-//     jinu added at 20090526-------------
-       public String getName(){
-               return null;
-       }
-       
-       public double getPercentage(){
-               return -1;
-       }
-       
-       public void refreshModel(OpModelRoot modelRoot ) {
-                       setXML(modelRoot.getXML());
-                       
-                       OpModelEvent dataModelEvents[] = modelRoot.getEvents();
-       
-                       if (dataModelEvents != null) {
-                               _events = new UiModelEvent[dataModelEvents.length];
-                               for (int i = 0; i < dataModelEvents.length; i++) {
-                                       _events[i] = new UiModelEvent(dataModelEvents[i]);
-                               }
-                       }else{
-                               String message = "There is no sample data.";
-                               _events = new UiModelEvent[1];
-                               OpModelEvent event = new OpModelEvent(message);
-                               event._setSessions(new OpModelSession[0]);
-                               _events[0] = new UiModelEvent(event);
-                       }
-               /*if(modelRoot==null)
-                       return;
-                       
-               setXML(modelRoot.getXML());
-               
-               OpModelEvent dataModelEvents[] = modelRoot.getEvents();
-
-               if (dataModelEvents != null) {
-                       _events = new UiModelEvent[dataModelEvents.length];
-                       for (int i = 0; i < dataModelEvents.length; i++) {
-                               _events[i] = new UiModelEvent(dataModelEvents[i]);
-                       }
-               }*/
-       }
-//--------------------------
-       //jinu added at 20090704----------------------
-       private String xmlStr;
-       public void setXML(String xmlStr) {
-               this.xmlStr = xmlStr;
-       }
-
-       public String getXML() {
-               return xmlStr;
-       }
-       //--------------------------------
-       
-}
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSample.java b/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSample.java
deleted file mode 100644 (file)
index e52885b..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * 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:
- *    Kent Sebastian <ksebasti@redhat.com> - initial API and implementation 
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.ui.model;
-
-import org.eclipse.linuxtools.oprofile.core.model.OpModelSample;
-import org.eclipse.linuxtools.oprofile.ui.OprofileUiMessages;
-import org.eclipse.linuxtools.oprofile.ui.OprofileUiPlugin;
-import org.eclipse.swt.graphics.Image;
-
-public class UiModelSample implements IUiModelElement {
-       private IUiModelElement _parent;                //parent element
-       private OpModelSample _sample;                  //the node in the data model
-       private int _totalCount;                                //total sample count for the parent session
-       
-       public UiModelSample(IUiModelElement parent, OpModelSample sample, int totalCount) {
-               _parent = parent;
-               _sample = sample;
-               _totalCount = totalCount;
-       }
-       
-       @Override
-       public String toString() {
-               double countPercentage = (double)_sample.getCount() / (double)_totalCount;
-               String percentage = OprofileUiPlugin.getPercentageString(countPercentage);
-               
-               return percentage + " " + OprofileUiMessages.getString("uimodel.sample.on.line") + Integer.toString(_sample.getLine()); //$NON-NLS-1$ //$NON-NLS-2$
-       }
-       
-       public int getLine() {
-               return _sample.getLine();
-       }
-       
-       public double getCountPercentage() {
-               return (double)_sample.getCount() / (double)_totalCount;
-       }
-       
-       /** IUiModelElement functions **/
-       public String getLabelText() {
-               return toString();
-       }
-
-       public IUiModelElement[] getChildren() {
-               return null;
-       }
-
-       public boolean hasChildren() {
-               return false;           //bottom level element
-       }
-
-       public IUiModelElement getParent() {
-               return _parent;
-       }
-
-       public Image getLabelImage() {
-               return OprofileUiPlugin.getImageDescriptor(OprofileUiPlugin.SAMPLE_ICON).createImage();
-       }
-       
-//     jinu added at 20090526-------------------------
-       public double getPercentage(){
-               return (double)_sample.getCount() / (double)_totalCount;
-       }
-       
-       public String getName(){
-               return  ((UiModelSymbol)_parent).getShortFileName() + " : "+Integer.toString(_sample.getLine());
-       }
-//     -----------------------------
-}
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSession.java b/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSession.java
deleted file mode 100644 (file)
index fb7cd12..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * 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:
- *    Kent Sebastian <ksebasti@redhat.com> - initial API and implementation 
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.ui.model;
-
-import org.eclipse.linuxtools.oprofile.core.model.OpModelImage;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelSession;
-import org.eclipse.linuxtools.oprofile.ui.OprofileUiPlugin;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Children of events in the view -- sessions containing images/symbols
- *  for its parent event. Must have a child image. May also have dependent
- *  images, which are children of the Image in the data model, but are 
- *  displayed as children of the session in the view.
- */
-public class UiModelSession implements IUiModelElement {
-       private IUiModelElement _parent;                //parent element
-       private OpModelSession _session;                //the node in the data model
-       private UiModelImage _image;                    //this node's child
-       private UiModelDependent _dependent;    //dependent images of the OpModelImage
-
-       //OProfile's default session name
-       private static final String DEFAULT_SESSION_NAME = "current"; //$NON-NLS-1$
-       
-       public UiModelSession(IUiModelElement parent, OpModelSession session) {
-               _parent = parent;
-               _session = session;
-               _image = null;
-               _dependent = null;
-               refreshModel();
-       }
-       
-       private void refreshModel() {
-               OpModelImage dataModelImage = _session.getImage();
-               if (dataModelImage != null) {
-                       _image = new UiModelImage(this, dataModelImage, dataModelImage.getCount(), dataModelImage.getDepCount());
-                       
-                       if (dataModelImage.hasDependents()) {
-                               _dependent = new UiModelDependent(this, dataModelImage.getDependents(), dataModelImage.getCount(), dataModelImage.getDepCount());
-                       }
-               }
-       }
-
-       @Override
-       public String toString() {
-               return _session.getName();
-       }
-       
-       public boolean isDefaultSession() {
-               return _session.getName().equalsIgnoreCase(DEFAULT_SESSION_NAME);
-       }
-
-       /** IUiModelElement functions **/
-       public String getLabelText() {
-               return toString();
-       }
-
-       public IUiModelElement[] getChildren() {
-               if (_dependent != null) {
-                       return new IUiModelElement[] {_image, _dependent};
-               } else {
-                       return new IUiModelElement[] {_image};
-               }
-       }
-
-       public boolean hasChildren() {
-               return (_image != null);
-       }
-
-       public IUiModelElement getParent() {
-               return _parent;
-       }
-
-       public Image getLabelImage() {
-               return OprofileUiPlugin.getImageDescriptor(OprofileUiPlugin.SESSION_ICON).createImage();
-       }
-       
-//     jinu added at 20090526-------------------
-       public String getName(){
-               return null;
-       }
-       
-       public double getPercentage(){
-               return -1;
-       }
-//     -----------------------------
-}
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSymbol.java b/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSymbol.java
deleted file mode 100644 (file)
index 5f2cf2c..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * 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:
- *    Kent Sebastian <ksebasti@redhat.com> - initial API and implementation 
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.ui.model;
-
-import java.io.File;
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.oprofile.core.model.OpModelSample;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelSymbol;
-import org.eclipse.linuxtools.oprofile.ui.OprofileUiMessages;
-import org.eclipse.linuxtools.oprofile.ui.OprofileUiPlugin;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Children of images in the view -- a function name in the profiled 
- *  image's source code. May or may not have child samples.
- */
-public class UiModelSymbol implements IUiModelElement {
-       private IUiModelElement _parent;        //parent element
-       private OpModelSymbol _symbol;          //the node in the data model
-       private UiModelSample _samples[];       //this node's children
-       private int _totalCount;                        //total count of samples for the parent session
-       
-       public UiModelSymbol(IUiModelElement parent, OpModelSymbol symbol, int totalCount) {
-               _parent = parent;
-               _symbol = symbol;
-               _samples = null;
-               _totalCount = totalCount;
-               refreshModel();
-               
-               //jinu added at 20090602                
-               //addChartModel();
-       }       
-       
-       //jinu added at 20090602
-       /*
-       private void addChartModel(){
-               ChartModelRoot chartModel = ChartModelRoot.getDefault();
-               if(_parent.getParent() instanceof UiModelSession){
-                       chartModel.addElement(this);
-               }
-       }
-       */
-       
-       private void refreshModel() {
-               ArrayList<UiModelSample> sampleList = new ArrayList<UiModelSample>();
-               OpModelSample dataModelSamples []= _symbol.getSamples();
-               
-               for (int i = 0; i < dataModelSamples.length; i++) {
-                       //dont display samples with line number of 0, meaning no line number
-                       // was correlated, more likely that no source file exists
-                       if (dataModelSamples[i].getLine() != 0) {
-                               sampleList.add(new UiModelSample(this, dataModelSamples[i], _totalCount));
-                       }
-               }
-               
-               _samples = new UiModelSample[sampleList.size()];
-               sampleList.toArray(_samples);
-       }
-       
-       @Override
-       public String toString() {
-               double countPercentage = (double)_symbol.getCount() / (double)_totalCount;
-               String percentage = OprofileUiPlugin.getPercentageString(countPercentage);
-               
-               //a hack to get `basename` type functionality
-               String fileName = (new File(_symbol.getFile())).getName();
-//             String fileName = _symbol.getFile();
-
-               return percentage + " " + OprofileUiMessages.getString("uimodel.percentage.in") + _symbol.getName() + (fileName.length() == 0 ? "" : " [" + fileName + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
-       }
-       
-       public String getFileName() {
-               return _symbol.getFile();
-       }
-
-       /** IUiModelElement functions **/
-       public String getLabelText() {
-               return toString();
-       }
-
-       public IUiModelElement[] getChildren() {
-               return _samples;
-       }
-
-       public boolean hasChildren() {
-               return (_samples == null || _samples.length == 0 ? false : true);
-       }
-
-       public IUiModelElement getParent() {
-               return _parent;
-       }
-
-       public Image getLabelImage() {
-               return OprofileUiPlugin.getImageDescriptor(OprofileUiPlugin.SYMBOL_ICON).createImage();
-       }
-       
-//     jinu added at 20090526--------------------
-       public double getPercentage(){
-               return (double)_symbol.getCount() / (double)_totalCount;
-       }
-       
-       public String getName(){
-               //String fileName = (new File(_symbol.getFile())).getName();
-               String fileName = getShortFileName();
-               return  _symbol.getName() + (fileName.length() == 0 ? "" : " [" + fileName + "]");
-       }
-       
-       public String getShortFileName() {
-               return (new File(getFileName())).getName();
-       }
-//     -----------------------------
-}
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/oprofileui.properties b/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/oprofileui.properties
deleted file mode 100644 (file)
index a82ce3f..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-######################################################################
-# Copyright (c) 2004,2008 Red Hat, Inc.
-# 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:
-#    Keith Seitz <keiths@redhat.com> - initial implementation
-#    Kent Sebastian <ksebasti@redhat.com>
-###################################################################### 
-savedialog.title=Save Session
-savedialog.message=Enter the new name of the default session
-savedialog.initial=
-savedialog.validator.invalidChar={0} is an invalid character in session name \"{1}\".
-savedialog.validator.containsWhitespace=Session name \"{0}\" cannot contain whitespace.
-savedialog.validator.exists=Session \"{0}\" already exists.
-
-defaultsessiondialog.nodefaultsession.title=Error Saving Default Session
-defaultsessiondialog.nodefaultsession.message=No default session exists.
-
-view.dialog.parsing.text=Parsing OProfile Data
-view.actions.refresh.label=Refresh View
-view.actions.logreader.label=Open OProfile Daemon Log
-view.actions.savedefaultsession.label=Save Default Session
-
-oprofiled.logreader.dialog.title=OProfiled Log
-oprofiled.logreader.error.fileNotFound=Log file empty or does not exist.
-oprofiled.logreader.error.io=Error reading log file.
-
-uimodel.percentage.in=in 
-uimodel.sample.on.line=on line 
-uimodel.dependent.dependent.images=dependent images
-
-opxmlParse.error.multipleImages=Error: samples not created from Eclipse-OProfile plugin. Please remove this session.
-
-annotation.text.from=from event 
-annotation.text.in=in session 
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/view/OprofileView.java b/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/view/OprofileView.java
deleted file mode 100644 (file)
index 1e56070..0000000
+++ /dev/null
@@ -1,249 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Red Hat, Inc.
- * 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:
- *    Kent Sebastian <ksebasti@redhat.com> - initial API and implementation 
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.ui.view;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelRoot;
-import org.eclipse.linuxtools.oprofile.ui.OprofileUiMessages;
-import org.eclipse.linuxtools.oprofile.ui.OprofileUiPlugin;
-import org.eclipse.linuxtools.oprofile.ui.model.UiModelRoot;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.GC;
-// commented by greatim 2011.06.01
-//import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeColumn;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.Section;
-import org.eclipse.ui.part.ViewPart;
-
-import org.tizen.oprofile.core.OprofileComm;
-import org.tizen.oprofile.ui.view.OprofileViewLabelProvider;
-
-/**
- * The view for the OProfile plugin. Shows the elements gathered by the data model
- *   in a tree viewer, parsed by the ui model (in the model package). The hierarchy
- *   (as it is displayed) looks like:
- *   
- *   UiModelRoot (not shown in the view)
- *   \_ UiModelEvent
- *   \_ ...
- *   \_ UiModelEvent
- *      \_ UiModelSession
- *      \_ ...
- *      \_ UiModelSession
- *         \_ UiModelImage
- *         |  \_ UiModelSymbol
- *         |  \_ ...
- *         |  \_ UiModelSymbol
- *         |     \_ UiModelSample
- *         |     \_ ...
- *         |     \_ UiModelSample
- *         \_ UiModelDependent
- *            \_ UiModelImage
- *            |  \_ ... (see above)
- *            \_ ...
- * 
- * The refreshView() function takes care of launching the data model parsing and
- *   ui model parsing in a separate thread.
- */
-public class OprofileView extends ViewPart {
-       private TreeViewer _viewer;
-       private FormToolkit toolkit;
-       
-       @Override
-       public void createPartControl(Composite parent) {
-               //jinu removed at 20090602              
-//             _createTreeViewer(parent);
-//             _createActionMenu();
-               
-               //jinu added at 20090616------------------------------
-               Display display = parent.getDisplay();
-               toolkit = new FormToolkit(display);
-               parent.setLayout(new GridLayout(1, false));
-               parent.setBackground(display.getSystemColor(SWT.COLOR_WHITE));
-               
-               createTitle(parent);
-               createTreeViewer(parent);
-               //--------------------------------------
-
-               OprofileUiPlugin.getDefault().setOprofileView(this);
-       }
-       
-       //jinu added at 20090526
-       private void createTitle(Composite parent) {
-               Section section = toolkit.createSection(parent, Section.TITLE_BAR);
-               section.setText("Profiling Information");
-               section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-               toolkit.createCompositeSeparator(section);
-               
-               //String text = "Sampling data from oprofiler daemon is shown on treeview as following";
-               //toolkit.createLabel(parent, text);
-               
-       }
-       
-       private void createTreeViewer(Composite parent) {
-               _viewer = new TreeViewer(parent, SWT.SINGLE|SWT.H_SCROLL|SWT.FULL_SELECTION);
-               
-               final Tree tree = _viewer.getTree();
-               tree.setHeaderVisible(true);
-               tree.setLinesVisible(true);
-               tree.setLayoutData(new GridData(GridData.FILL_BOTH));
-               
-               String[] columnNames = {"Type", "Percent(%)", "Name"};
-               int[] columnWidths = {250,100,100}; 
-               
-               final TreeColumn[] column = new TreeColumn[columnNames.length];
-               
-               for(int i=0;i<column.length;i++){
-                       column[i] = new TreeColumn(tree, SWT.LEFT);
-                       column[i].setText(columnNames[i]);
-                       column[i].setWidth(columnWidths[i]);
-               }
-               
-               final int targetColumnIdx = 1;
-               
-               tree.addListener(SWT.PaintItem, new Listener() {
-                       public void handleEvent(Event event) {
-                               if (event.index == targetColumnIdx) {
-                                       GC gc = event.gc;
-                                       
-                                       String text = ((TreeItem)(event.item)).getText(targetColumnIdx);
-                                       int percent = 0;
-                                       if( !(text==null||text.length()<=0||text.startsWith("<"))){
-                                               percent = (int)Double.parseDouble(text);
-                                       }
-                                       int width = column[targetColumnIdx].getWidth() * percent / 100;
-
-                                       if(width>5){
-                                               Display display = Display.getCurrent();
-                                               gc.setForeground(display.getSystemColor(SWT.COLOR_GREEN));
-                                               gc.setBackground(display.getSystemColor(SWT.COLOR_DARK_CYAN));
-                                               gc.fillGradientRectangle(event.x+40, event.y, width-5, event.height, true);
-                                               
-                                               Rectangle rect = new Rectangle(event.x+40, event.y, width-5, event.height-1);
-                                               gc.drawRectangle(rect);
-                                               gc.setForeground(display.getSystemColor(SWT.COLOR_LIST_FOREGROUND));
-                                       }
-
-                                       // commented by greatim at 2011.06.01
-//                                     Point size = gc.textExtent(text);                                       
-//                                     int offset = Math.max(0, (event.height - size.y) / 2);
-                                       //gc.drawText(text, event.x+2, event.y+offset, true);
-                               }
-                       }
-               });             
-               
-               _viewer.setContentProvider(new OprofileViewContentProvider());
-               _viewer.setLabelProvider(new OprofileViewLabelProvider());
-               _viewer.addDoubleClickListener(new OprofileViewDoubleClickListener());
-               _viewer.setAutoExpandLevel(4);
-               getSite().setSelectionProvider(_viewer);
-       }
-       
-       //jinu removed at 20090526
-       /*
-       private void _createTreeViewer(Composite parent) {
-               _viewer = new TreeViewer(parent, SWT.SINGLE);
-               _viewer.setContentProvider(new OprofileViewContentProvider());
-               _viewer.setLabelProvider(new OprofileViewLabelProvider());
-               _viewer.addDoubleClickListener(new OprofileViewDoubleClickListener());
-       }
-       */
-
-       //jinu removed at 20090707
-       /*
-       private void _createActionMenu() {
-               IMenuManager manager = getViewSite().getActionBars().getMenuManager();
-               manager.add(new OprofileViewLogReaderAction());
-               manager.add(new OprofileViewRefreshAction());
-               manager.add(new OprofileViewSaveDefaultSessionAction());
-       }
-       */
-       
-       private TreeViewer getTreeViewer() {
-               return _viewer;
-       }
-       
-       /**
-        * Extremely convoluted way of getting the running and parsing to happen in 
-        *   a separate thread, with a progress monitor. In most cases and on fast 
-        *   machines this will probably only be a blip.
-        */
-       public void refreshView() {
-               try {
-                       PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(OprofileUiPlugin.ID_OPROFILE_VIEW);
-               } catch (PartInitException e) {
-                       e.printStackTrace();
-               }
-
-               IRunnableWithProgress refreshRunner = new IRunnableWithProgress() {
-                       public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
-                               monitor.beginTask(OprofileUiMessages.getString("view.dialog.parsing.text"), 2); //$NON-NLS-1$
-
-                               //jinu added at 20090622
-                               //ChartModelRoot.getDefault().clear();
-                               
-                               //jinu modified at 20090704                             
-//                             OpModelRoot dataModelRoot = OpModelRoot.getDefault();
-//                             dataModelRoot.refreshModel();
-                               OpModelRoot opModel = OprofileComm.getModelData();
-                               
-//                             System.out.println(dataModelRoot);      //debugging
-                               monitor.worked(1);
-
-                               final UiModelRoot UiRoot = new UiModelRoot();
-                               if (opModel != null) {
-                                       UiRoot.refreshModel(opModel);
-                               }
-                               
-                               Display.getDefault().asyncExec(new Runnable() {
-                                       public void run() {
-                                                       OprofileUiPlugin.getDefault().getOprofileView().getTreeViewer().setInput(UiRoot);
-                                       }
-                               });
-                               monitor.worked(1);
-
-                               monitor.done();
-                       }
-               };
-               
-               ProgressMonitorDialog dialog = new ProgressMonitorDialog(null);
-               try {
-                       dialog.run(true, false, refreshRunner);
-               } catch (InvocationTargetException e) {
-                       e.printStackTrace();
-               } catch (InterruptedException e) {
-                       e.printStackTrace();
-               }
-       }
-       
-       @Override
-       public void setFocus() {
-               // TODO Auto-generated method stub
-       }
-
-}
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/view/OprofileViewContentProvider.java b/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/view/OprofileViewContentProvider.java
deleted file mode 100644 (file)
index 8db2dcb..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * 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:
- *    Kent Sebastian <ksebasti@redhat.com> - initial API and implementation,
- *     adapted from Keith Seitz's ProfileContentProvider 
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.ui.view;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.linuxtools.oprofile.ui.model.IUiModelElement;
-
-/**
- * Content provider for the OprofileView's tree viewer.
- */
-public class OprofileViewContentProvider implements ITreeContentProvider {
-
-       public Object[] getChildren(Object element) {
-               Assert.isLegal(element instanceof IUiModelElement, "in OprofileViewContentProvider"); //$NON-NLS-1$
-                       return ((IUiModelElement) element).getChildren();
-       }
-
-       public Object getParent(Object element) {
-               Assert.isLegal(element instanceof IUiModelElement, "in OprofileViewContentProvider"); //$NON-NLS-1$
-               return ((IUiModelElement) element).getParent();
-       }
-
-       public boolean hasChildren(Object element) {
-               Assert.isLegal(element instanceof IUiModelElement, "in OprofileViewContentProvider"); //$NON-NLS-1$
-                       return ((IUiModelElement) element).hasChildren();
-       }
-
-       public Object[] getElements(Object parentElement) {
-               return getChildren(parentElement);
-       }
-       
-       public void dispose() {
-               // TODO Auto-generated method stub
-       }
-
-       public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-               // TODO Auto-generated method stub
-       }
-
-}
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/view/OprofileViewDoubleClickListener.java b/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/view/OprofileViewDoubleClickListener.java
deleted file mode 100644 (file)
index c6183b3..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Red Hat, Inc.
- * 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:
- *    Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.ui.view;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.TreeSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.linuxtools.oprofile.ui.model.IUiModelElement;
-import org.eclipse.linuxtools.oprofile.ui.model.UiModelEvent;
-import org.eclipse.linuxtools.oprofile.ui.model.UiModelImage;
-import org.eclipse.linuxtools.oprofile.ui.model.UiModelSample;
-import org.eclipse.linuxtools.oprofile.ui.model.UiModelSession;
-import org.eclipse.linuxtools.oprofile.ui.model.UiModelSymbol;
-import org.eclipse.linuxtools.profiling.ui.ProfileUIUtils;
-import org.eclipse.ui.PartInitException;
-
-/**
- * Listener for the oprofile view when a user double clicks on an element in the tree.
- * 
- * Different things occur based on the event:
- *   
- *   UiModelEvent              - nothing (?)
- *   UiModelSession    - save the session to a different name
- *   UiModelImage              - nothing (?)
- *   UiModelSymbol             - nothing (?)
- *   UiModelSample             - go to line number in appropriate file
- */
-public class OprofileViewDoubleClickListener implements IDoubleClickListener {
-       public void doubleClick(DoubleClickEvent event) {
-               IUiModelElement element = (IUiModelElement)((TreeSelection)((TreeViewer)event.getSource()).getSelection()).getFirstElement();
-/*             
-               if (element instanceof UiModelEvent) {
-//                     UiModelEvent event = (UiModelEvent)element;
-               } else if (element instanceof UiModelSession) {
-                       // moved into an action menu
-               } else if (element instanceof UiModelImage) {
-//                     UiModelImage image = (UiModelImage)element;
-               } else if (element instanceof UiModelSymbol) {
-                       // disable this.. for binary section such as .plt, 
-                       // this will open the binary in an editor = bad
-
-                       //jump to 1st line in the file
-//                     UiModelSymbol symbol = (UiModelSymbol)element;
-//                     String fileName = symbol.getFileName();
-//                     
-//                     if (fileName.length() > 0) {
-//                             try {
-//                                     ProfileUIUtils.openEditorAndSelect(fileName, 1);
-//                             } catch (PartInitException e) {
-//                                     e.printStackTrace();
-//                             } catch (BadLocationException e) {
-//                                     e.printStackTrace();
-//                             }
-//                     }
-               } else
-*/
-               if (element instanceof UiModelSample) {
-                       //jump to line number in the appropriate file
-                       UiModelSample sample = (UiModelSample)element;
-                       int line = sample.getLine();
-                       
-                       //get file name from the parent sample 
-                       String fileName = ((UiModelSymbol)sample.getParent()).getFileName();
-                       
-                       //fixed for sb2
-                       //String filePath = ScratchboxTargetControl.getHostpathFromSboxpath(fileName);
-                       String filePath = fileName;
-                       //--------------------------------
-                       
-                       try {
-                               ProfileUIUtils.openEditorAndSelect(filePath, line);
-                       } catch (PartInitException e) {
-                               e.printStackTrace();
-                       } catch (BadLocationException e) {
-                               e.printStackTrace();
-                       }
-               }
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/view/OprofileViewLabelProvider.java b/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/view/OprofileViewLabelProvider.java
deleted file mode 100644 (file)
index 2cb4f9a..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * 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:
- *    Kent Sebastian <ksebasti@redhat.com> - initial API and implementation,
- *     adapted from Keith Seitz's ProfileLabelProvider 
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.ui.view;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.linuxtools.oprofile.ui.model.IUiModelElement;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Content provider for OprofileView's tree viewer.
- */
-public class OprofileViewLabelProvider implements ILabelProvider {
-
-       public Image getImage(Object element) {
-               Assert.isLegal(element instanceof IUiModelElement, "in OprofileViewLabelProvider"); //$NON-NLS-1$
-               return ((IUiModelElement) element).getLabelImage();
-       }
-
-       public String getText(Object element) {
-               Assert.isLegal(element instanceof IUiModelElement, "in OprofileViewLabelProvider"); //$NON-NLS-1$
-               return ((IUiModelElement) element).getLabelText();
-       }
-
-       public void addListener(ILabelProviderListener listener) {
-               // TODO Auto-generated method stub
-       }
-
-       public void dispose() {
-               // TODO Auto-generated method stub
-       }
-
-       public boolean isLabelProperty(Object element, String property) {
-               return false;
-       }
-
-       public void removeListener(ILabelProviderListener listener) {
-               // TODO Auto-generated method stub
-       }
-
-}
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/view/OprofileViewLogReaderAction.java b/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/view/OprofileViewLogReaderAction.java
deleted file mode 100644 (file)
index b93b19a..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004,2008 Red Hat, Inc.
- * 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:
- *    Kent Sebastian <ksebasti@redhat.com> - initial API and implementation 
- *    Keith Seitz <keiths@redhat.com> - much of the code in the LogReader class
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.ui.view;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.FileInputStream;
-import java.lang.reflect.InvocationTargetException;
-import java.nio.charset.Charset;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.linuxtools.oprofile.core.Oprofile;
-import org.eclipse.linuxtools.oprofile.ui.OprofileUiMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Layout;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Log reader action. Reads /var/lib/oprofile/samples/oprofiled.log and displays
- *  it in a nice dialog. Although the log is of dubious utility, it might be useful 
- *  to some.
- */
-public class OprofileViewLogReaderAction extends Action {
-       public OprofileViewLogReaderAction() {
-               super(OprofileUiMessages.getString("view.actions.logreader.label")); //$NON-NLS-1$
-       }
-       
-       @Override
-       public void run() {
-               Shell activeShell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
-               LogReader log = new LogReader();
-               
-               try {
-                       new ProgressMonitorDialog(activeShell).run(true, false, log);
-               } catch (InvocationTargetException e) {
-                       e.printStackTrace();
-               } catch (InterruptedException e) {
-                       e.printStackTrace();
-               }
-           
-               //open custom log dialog
-           OprofiledLogDialog odlg = new OprofiledLogDialog(activeShell, log.getLogContents());
-           odlg.open();
-       }
-}
-
-/**
- * A Runnable to read oprofiled's logfile 
- */
-class LogReader implements Runnable, IRunnableWithProgress {
-       private static long _lastModified = -1;
-       private static String _contents = null;
-
-       public void run() {
-               File logFile = new File(Oprofile.getLogFile());
-               long modified = logFile.lastModified();
-               
-               //only reread it if it has been modified since the last run
-               if (modified != _lastModified) {
-                       _lastModified = modified;
-                       _contents = new String("");
-                       
-                       BufferedReader reader = null;
-                       try {
-                               reader = new BufferedReader(new InputStreamReader(new FileInputStream(logFile), Charset.forName("UTF-8")));
-                               String line;
-                               if (reader != null) {
-                                       while ((line = reader.readLine()) != null) {
-                                               _contents += line + "\n"; //$NON-NLS-1$
-                                       }
-                               }
-                       } catch (FileNotFoundException e) {
-                               // The file doesn't exist or was erased. Try again next time.
-                               _contents = OprofileUiMessages.getString("oprofiled.logreader.error.fileNotFound"); //$NON-NLS-1$
-                       } catch (IOException e) {
-                               // Error reading log. Try again next time.
-                               _lastModified = 0;
-                               _contents = OprofileUiMessages.getString("oprofiled.logreader.error.io"); //$NON-NLS-1$
-                       } finally {
-                               try {
-                                       if (reader != null) {
-                                               reader.close();
-                                       }
-                               } catch (Exception e) {
-                                       e.printStackTrace();
-                               }
-                       }
-               }
-       }
-       
-       public String getLogContents() {
-               return _contents;
-       }
-
-
-       public void run(IProgressMonitor monitor) throws InvocationTargetException,
-                       InterruptedException {
-               this.run();
-       }
-}
-
-/**
- * A custom dialog box to display the oprofiled log file.
- */
-class OprofiledLogDialog extends MessageDialog {
-       //string to contain the log file
-       String textContent = null;
-       
-       final static int GRID_WIDTH = 350;
-       final static int GRID_HEIGHT = 400;
-       
-       public OprofiledLogDialog (Shell parentShell, String dialogMessage) {
-               super(parentShell, OprofileUiMessages.getString("oprofiled.logreader.dialog.title"), null, null, MessageDialog.NONE, new String[] { IDialogConstants.OK_LABEL }, 0); //$NON-NLS-1$
-               textContent = dialogMessage;
-       }
-       
-       @Override
-    protected Control createCustomArea(Composite parent) {
-               Composite area = new Composite(parent, 0);
-               Layout layout = new GridLayout(1, true);
-               GridData gd = new GridData(GRID_WIDTH, GRID_HEIGHT);
-               
-               area.setLayout(layout);
-               area.setLayoutData(gd);
-               
-               Text txt = new Text(area, SWT.READ_ONLY | SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
-               txt.setText(textContent);
-               txt.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-               
-        return area;
-    }
-}
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/view/OprofileViewRefreshAction.java b/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/view/OprofileViewRefreshAction.java
deleted file mode 100644 (file)
index 5f554cd..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * 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:
- *    Kent Sebastian <ksebasti@redhat.com> - initial API and implementation 
- *******************************************************************************/ 
-package org.eclipse.linuxtools.oprofile.ui.view;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.linuxtools.oprofile.ui.OprofileUiMessages;
-import org.eclipse.linuxtools.oprofile.ui.OprofileUiPlugin;
-
-/**
- * Refresh menu item. 
- */
-public class OprofileViewRefreshAction extends Action {
-       public OprofileViewRefreshAction() {
-               super(OprofileUiMessages.getString("view.actions.refresh.label")); //$NON-NLS-1$
-       }
-       
-       @Override
-       public void run() {
-               OprofileUiPlugin.getDefault().getOprofileView().refreshView();
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/chart/ChartControl.java b/org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/chart/ChartControl.java
deleted file mode 100644 (file)
index 076b442..0000000
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- *  Chart Control
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.ui.chart;
-
-import org.eclipse.birt.chart.device.IDeviceRenderer;
-import org.eclipse.birt.chart.exception.ChartException;
-import org.eclipse.birt.chart.factory.GeneratedChartState;
-import org.eclipse.birt.chart.factory.Generator;
-import org.eclipse.birt.chart.factory.RunTimeContext;
-import org.eclipse.birt.chart.model.Chart;
-import org.eclipse.birt.chart.model.attribute.Bounds;
-import org.eclipse.birt.chart.model.attribute.impl.BoundsImpl;
-import org.eclipse.birt.chart.util.PluginSettings;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.events.ControlListener;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Canvas;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-
-public class ChartControl extends Canvas implements PaintListener, ControlListener{
-
-       private Chart cm = null;
-
-       private transient boolean bIsPainting = false;
-
-       private transient Image buffer;
-
-       private static int X_OFFSET = 3;
-
-       private static int Y_OFFSET = 3;
-
-       public ChartControl(Composite parent, Chart chart) {
-               super(parent, SWT.BORDER);
-               this.cm = chart;
-               setLayoutData(new GridData(GridData.FILL_BOTH));
-               setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
-
-               addPaintListener(this);
-               addControlListener(this);
-               
-               updateBuffer( );
-               
-               StringBuffer str = new StringBuffer();
-               str.lastIndexOf("", -1);
-
-       }
-
-       public void setChart(Chart chart){
-               this.cm = chart;
-               updateBuffer( );
-       }
-       
-       /**
-        * Generate and render the chart model,the chart image is stored in a
-        * buffer. The buffer will be updated only when the chart model is changed.
-        */
-       private void updateBuffer( )
-       {
-               if ( bIsPainting )
-               {
-                       return;
-               }
-               Throwable paintError = null;
-
-               Rectangle re = this.getClientArea( );
-               final Rectangle adjustedRe = new Rectangle( 0, 0, re.width, re.height );
-
-               if ( adjustedRe.width - 2 * X_OFFSET <= 0
-                               || adjustedRe.height - 2 * Y_OFFSET <= 0 )
-               {
-                       if ( buffer != null && !buffer.isDisposed( ) )
-                       {
-                               buffer.dispose( );
-                               buffer = null;
-                       }
-                       return;
-               }
-
-               if ( cm == null )
-               {
-                       buffer = null;
-               }
-               else
-               {
-                       bIsPainting = true;
-                       Image oldBuffer = null;
-                       if ( buffer == null )
-                       {
-                               buffer = new Image( Display.getDefault( ), adjustedRe );
-                       }
-                       else
-                       {
-                               Rectangle ore = buffer.getBounds( );
-
-                               oldBuffer = buffer;
-
-                               if ( !adjustedRe.equals( ore ) )
-                               {
-                                       buffer = new Image( Display.getDefault( ), adjustedRe );
-                               }
-                       }
-
-                       GC gc = new GC( buffer );
-
-                       // fill default backgournd as white.
-                       gc.setForeground( Display.getDefault( )
-                                       .getSystemColor( SWT.COLOR_WHITE ) );
-                       gc.fillRectangle( buffer.getBounds( ) );
-
-                       final Bounds bo = BoundsImpl.create( X_OFFSET,
-                                       Y_OFFSET,
-                                       adjustedRe.width - 2 * X_OFFSET,
-                                       adjustedRe.height - 2 * Y_OFFSET );
-
-                       IDeviceRenderer deviceRenderer = null;
-                       try
-                       {
-                               deviceRenderer = PluginSettings.instance( )
-                                               .getDevice( "dv.SWT" ); //$NON-NLS-1$
-                               if (deviceRenderer == null) {
-                                       return;
-                               }
-                               deviceRenderer.setProperty( IDeviceRenderer.GRAPHICS_CONTEXT,
-                                               gc );
-                               bo.scale( 72d / deviceRenderer.getDisplayServer( )
-                                               .getDpiResolution( ) ); // CONVERT
-                               // TO
-                               // POINTS
-
-                               // GENERATE AND RENDER THE CHART
-                               final Generator gr = Generator.instance( );
-                               RunTimeContext rtc = new RunTimeContext( );
-
-                               GeneratedChartState state = gr.build( deviceRenderer.getDisplayServer( ),
-                                               cm,
-                                               bo,
-                                               null,
-                                               rtc,
-                                               null );
-
-                               gr.render( deviceRenderer, state );
-                       }
-                       catch ( ChartException ex )
-                       {
-                               paintError = ex;
-                       }
-                       finally
-                       {
-                               gc.dispose( );
-                               if ( deviceRenderer != null )
-                               {
-                                       deviceRenderer.dispose( );
-                               }
-                       }
-
-                       if ( paintError != null )
-                       {
-                               buffer = oldBuffer;
-                       }
-                       if ( oldBuffer != null && oldBuffer != buffer )
-                       {
-                               oldBuffer.dispose( );
-                       }
-                       bIsPainting = false;
-               }
-
-       }
-
-       /*
-        * (non-Javadoc)
-        * 
-        * @see org.eclipse.swt.events.PaintListener#paintControl(org.eclipse.swt.events.PaintEvent)
-        */
-       public void paintControl( PaintEvent pe )
-       {
-               GC gc = pe.gc;
-               if ( buffer != null )
-               {
-                       gc.drawImage( buffer, 0, 0 );
-               }
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.swt.events.ControlListener#controlMoved(org.eclipse.swt.events.ControlEvent)
-        */
-       public void controlMoved( ControlEvent e )
-       {
-               // TODO Auto-generated method stub
-               
-       }
-
-       /* (non-Javadoc)
-        * @see org.eclipse.swt.events.ControlListener#controlResized(org.eclipse.swt.events.ControlEvent)
-        */
-       public void controlResized( ControlEvent e )
-       {
-                       updateBuffer( );
-                       this.redraw( );
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/chart/ChartEditorInput.java b/org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/chart/ChartEditorInput.java
deleted file mode 100644 (file)
index ca7a8a7..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- *  Chart Editor Input
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.ui.chart;
-
-import org.eclipse.birt.chart.model.Chart;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IPersistableElement;
-
-public class ChartEditorInput implements IEditorInput {
-       
-       protected Chart chart;
-       protected String name;
-
-       public ChartEditorInput(Chart chart, String name) {
-               this.chart = chart;
-               this.name = name;
-       }
-
-       public boolean exists() {
-               return false;
-       }
-
-       public ImageDescriptor getImageDescriptor() {
-               return null; //$NON-NLS-1$
-       }
-
-       public String getName() {               
-               return name;
-       }
-
-       public IPersistableElement getPersistable() {
-               return null;
-       }
-
-       public String getToolTipText() {
-               return getName();
-       }
-
-       public Object getAdapter(Class adapter) {
-               return null;
-       }
-       
-       public Chart getChart() {
-               return chart;
-       }
-
-}
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/chart/ChartModelRoot.java b/org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/chart/ChartModelRoot.java
deleted file mode 100644 (file)
index 8106062..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- *  Chart Model Root
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.ui.chart;
-
-import java.util.ArrayList;
-
-import org.eclipse.linuxtools.oprofile.ui.OprofileUiPlugin;
-import org.eclipse.linuxtools.oprofile.ui.model.IUiModelElement;
-import org.eclipse.linuxtools.oprofile.ui.model.UiModelEvent;
-
-/**
- * Convenience class for creating the data model model from the oprofile chart,
- */
-public class ChartModelRoot{
-       private ArrayList<IUiModelElement> list ;
-
-       public ChartModelRoot() {
-               list = new ArrayList<IUiModelElement>();
-       }
-       
-       public IUiModelElement[] getElements() {
-               return list.toArray(new IUiModelElement[list.size()]);
-       }
-       
-       public void addElement(IUiModelElement element){
-               double percentage = element.getPercentage();
-               if (percentage > OprofileUiPlugin.MINIMUM_CHART_PERCENTAGE)
-                       list.add(element);
-       }
-       
-       public void refreshModel(UiModelEvent event){
-//             IUiModelElement[] events = root.getChildren();
-//             if(events==null||events.length==0)
-//                     return;
-               
-               IUiModelElement[] sessions = event.getChildren();
-               if(sessions==null||sessions.length==0)
-                       return;
-               
-               IUiModelElement[] images = sessions[0].getChildren();
-               if(images==null||images.length==0)
-                       return;
-               
-               for(int i=0;i<images.length;i++){
-                       IUiModelElement element = images[i];
-                       addChartModel(element);
-               }
-               
-       }
-
-       private void addChartModel(IUiModelElement element) {
-               IUiModelElement[] symbols = element.getChildren();
-               if(symbols!=null){
-                       for(int j=0;j<symbols.length;j++){
-                               addElement(symbols[j]);
-                       }
-               }
-       }
-       
-       public int size(){
-               return list.size();
-       }
-       
-       public void clear(){
-               list.clear();
-       }
-
-       public String[] getCategorys(){
-               String[] categorys = new String[list.size()];  
-               for(int i=0;i<list.size();i++){
-                       categorys[i] = list.get(i).getName();
-               }
-               return categorys;
-       }
-
-       public double[] getValues(){
-               double[] values = new double[list.size()];  
-               for(int i=0;i<list.size();i++){
-                       double tmp = list.get(i).getPercentage();
-                       values[i] = OprofileUiPlugin.getDoubleFloor(tmp*100,2);
-               }
-               return values;
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/chart/PieChart.java b/org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/chart/PieChart.java
deleted file mode 100644 (file)
index 7e01ad3..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-/*\r
- *  Pie Chart\r
- *\r
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
- *\r
- * Contact: \r
- * Jaewon Lim <jaewon81.lim@samsung.com>\r
- * Wonhyoung Park <wonhyoung2.park@samsung.com>\r
- * Juyoung Kim <j0.kim@samsung.com>\r
- *\r
- * This program and the accompanying materials are made available\r
- * under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- * \r
- * Contributors:\r
- * - S-Core Co., Ltd\r
- * \r
- */\r
-\r
\r
-package org.tizen.oprofile.ui.chart;\r
-\r
-import org.eclipse.birt.chart.model.Chart;\r
-import org.eclipse.birt.chart.model.ChartWithoutAxes;\r
-import org.eclipse.birt.chart.model.attribute.ChartDimension;\r
-import org.eclipse.birt.chart.model.component.Series;\r
-import org.eclipse.birt.chart.model.component.impl.SeriesImpl;\r
-import org.eclipse.birt.chart.model.data.BaseSampleData;\r
-import org.eclipse.birt.chart.model.data.DataFactory;\r
-import org.eclipse.birt.chart.model.data.NumberDataSet;\r
-import org.eclipse.birt.chart.model.data.OrthogonalSampleData;\r
-import org.eclipse.birt.chart.model.data.SampleData;\r
-import org.eclipse.birt.chart.model.data.SeriesDefinition;\r
-import org.eclipse.birt.chart.model.data.TextDataSet;\r
-import org.eclipse.birt.chart.model.data.impl.NumberDataSetImpl;\r
-import org.eclipse.birt.chart.model.data.impl.SeriesDefinitionImpl;\r
-import org.eclipse.birt.chart.model.data.impl.TextDataSetImpl;\r
-import org.eclipse.birt.chart.model.impl.ChartWithoutAxesImpl;\r
-import org.eclipse.birt.chart.model.type.PieSeries;\r
-import org.eclipse.birt.chart.model.type.impl.PieSeriesImpl;\r
-\r
-public class PieChart\r
-{\r
-\r
-       public static final Chart createPie(ChartModelRoot modelRoot)\r
-       {\r
-               ChartWithoutAxes cwoaPie = ChartWithoutAxesImpl.create( );\r
-               cwoaPie.setDimension( ChartDimension.TWO_DIMENSIONAL_WITH_DEPTH_LITERAL );\r
-               cwoaPie.setType( "Pie Chart" ); //$NON-NLS-1$   \r
-               cwoaPie.setSubType( "Standard Pie Chart" ); //$NON-NLS-1$\r
-               \r
-               // Plot\r
-               cwoaPie.setSeriesThickness( 10 );\r
-\r
-               // Legend\r
-               //jinu modified at 20090528\r
-               //Legend lg = cwoaPie.getLegend( );\r
-               //lg.getOutline( ).setVisible( true );\r
-\r
-               // Title\r
-               cwoaPie.getTitle( ).getLabel( ).getCaption( ).setValue( "Pie Chart for OProfile" );//$NON-NLS-1$\r
-\r
-               // Data Set\r
-               //jinu modified at 20090528\r
-               /*\r
-               TextDataSet categoryValues = TextDataSetImpl.create( new String[]{\r
-                               "slow_multiply[multiply.c]", "/lib/libc.so", "fast_multiply[multiply.c]", "/lib/ld.so", "main[multiply.c]"} );//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$\r
-               NumberDataSet seriesOneValues = NumberDataSetImpl.create( new double[]{\r
-                               89.94, 0.06, 5.75, 0.25, 4.00\r
-               } );\r
-               */\r
-               TextDataSet categoryValues = TextDataSetImpl.create(modelRoot.getCategorys()); \r
-               NumberDataSet seriesOneValues = NumberDataSetImpl.create(modelRoot.getValues());\r
-               \r
-               SampleData sdata = DataFactory.eINSTANCE.createSampleData( );\r
-               \r
-               BaseSampleData sdBase = DataFactory.eINSTANCE.createBaseSampleData( );\r
-               sdBase.setDataSetRepresentation( "sdBase" );//$NON-NLS-1$\r
-               sdata.getBaseSampleData( ).add( sdBase );\r
-\r
-               OrthogonalSampleData sdOrthogonal = DataFactory.eINSTANCE.createOrthogonalSampleData( );\r
-               sdOrthogonal.setDataSetRepresentation( "sdOrthogonal" );//$NON-NLS-1$\r
-               sdOrthogonal.setSeriesDefinitionIndex( 0 );\r
-               sdata.getOrthogonalSampleData( ).add( sdOrthogonal );\r
-\r
-               cwoaPie.setSampleData( sdata );\r
-\r
-               // Base Series\r
-               Series seCategory = SeriesImpl.create( );\r
-               seCategory.setDataSet( categoryValues );\r
-\r
-               SeriesDefinition sd = SeriesDefinitionImpl.create( );\r
-               sd.getSeriesPalette( ).shift( 0 );\r
-               sd.getSeries( ).add( seCategory );\r
-               cwoaPie.getSeriesDefinitions( ).add( sd );\r
-\r
-               // Orthogonal Series\r
-               PieSeries sePie = (PieSeries) PieSeriesImpl.create( );\r
-               sePie.setDataSet( seriesOneValues );\r
-               sePie.setExplosion( 5 );\r
-               \r
-               //jinu modified at 20090528\r
-               //sePie.setSeriesIdentifier( "..." );//$NON-NLS-1$ \r
-               \r
-               SeriesDefinition sdCity = SeriesDefinitionImpl.create( );\r
-               sdCity.getSeries( ).add( sePie );\r
-               sd.getSeriesDefinitions( ).add( sdCity );\r
-               \r
-\r
-               return cwoaPie;\r
-       }\r
-\r
-}\r
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/editor/ChartEditor.java b/org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/editor/ChartEditor.java
deleted file mode 100644 (file)
index ce9f884..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- *  Chart Editor
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.ui.editor;
-
-import org.eclipse.birt.chart.model.Chart;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.swt.SWT; 
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.EditorPart;
-
-import org.tizen.oprofile.ui.chart.ChartControl;
-import org.tizen.oprofile.ui.chart.ChartEditorInput;
-
-public class ChartEditor extends EditorPart {
-       protected ChartControl control;
-
-       @Override
-       public void doSave(IProgressMonitor monitor) {
-       }
-
-       @Override
-       public void doSaveAs() {
-       }
-
-       @Override
-       public void init(IEditorSite site, IEditorInput input)
-                       throws PartInitException {
-               if (input instanceof ChartEditorInput) {
-                       setInput(input);
-                       setSite(site);
-                       setPartName(input.getName()); //$NON-NLS-1$
-               }
-               else {
-                       throw new PartInitException(ChartEditorInput.class.getName()); //$NON-NLS-1$
-               }
-       }
-
-       @Override
-       public boolean isDirty() {
-               return false;
-       }
-
-       @Override
-       public boolean isSaveAsAllowed() {
-               return false;
-       }
-
-       @Override
-       public void createPartControl(Composite parent) {
-               Composite top = new Composite(parent, SWT.NONE);
-               top.setLayout(new GridLayout());
-               top.setLayoutData(new GridData(GridData.FILL_BOTH));
-               
-               ChartEditorInput input = (ChartEditorInput) getEditorInput();
-               Chart chart = input.getChart();
-               control = new ChartControl(top, chart);
-
-       }
-       
-       public void redraw(Chart chart) {
-               control.setChart(chart);
-               control.redraw();
-       }
-
-       @Override
-       public void setFocus() {
-               if (control != null) {
-                       control.setFocus();
-               }
-       }
-       
-
-}
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/editor/OprofileEditor.java b/org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/editor/OprofileEditor.java
deleted file mode 100644 (file)
index 4811d87..0000000
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
- *  Oprofile Editor
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.ui.editor;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.linuxtools.oprofile.core.model.OpModelRoot;
-import org.eclipse.linuxtools.oprofile.ui.model.UiModelRoot;
-import org.eclipse.linuxtools.oprofile.ui.view.OprofileViewContentProvider;
-import org.eclipse.linuxtools.oprofile.ui.view.OprofileViewDoubleClickListener;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeColumn;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.editors.text.TextEditor;
-import org.eclipse.ui.part.MultiPageEditorPart;
-import org.eclipse.ui.progress.UIJob;
-
-import org.tizen.oprofile.core.processor.modeldata.handler.OprofileSAXHandler;
-import org.tizen.oprofile.ui.view.OprofileViewLabelProvider;
-import org.xml.sax.SAXException;
-
-
-public class OprofileEditor extends MultiPageEditorPart {
-       private TreeViewer _viewer;
-       private TextEditor sourceEditor;
-
-       private String fileName;
-       private String filePath;
-       Cursor waitCursor;
-       
-       private void initialize(){
-               waitCursor = Display.getCurrent().getSystemCursor(SWT.CURSOR_WAIT);
-               fileName = getEditorInput().getName();
-               filePath = getEditorInput().getToolTipText();
-       }
-       
-       @Override
-       public void init(IEditorSite site, IEditorInput input)
-                       throws PartInitException {
-               super.init(site, input);
-               initialize();
-       }
-
-       @Override
-       public boolean isDirty() {
-               return false;
-       }
-       
-
-       @Override
-       public void createPages() {
-               createOprofilePage();
-               createSourcePage();
-               updateTitle();
-               
-               try {
-                       loadOprofileData();
-               } catch (InvocationTargetException e) {
-                       e.printStackTrace();
-               } catch (InterruptedException e) {
-                       e.printStackTrace();
-               }
-       }
-       
-       private void createOprofilePage(){
-               Composite parent = new Composite(getContainer(), SWT.NULL);
-               parent.setLayout(new FillLayout());
-               
-               createTable(parent);
-               
-               int index = addPage(parent);
-               setPageText(index, "Oprofile");
-       }
-       
-       private void createTable(Composite parent){
-               _viewer = new TreeViewer(parent, SWT.SINGLE|SWT.H_SCROLL|SWT.FULL_SELECTION);
-               
-               final Tree tree = _viewer.getTree();
-               tree.setHeaderVisible(true);
-               tree.setLinesVisible(true);
-               tree.setLayoutData(new GridData(GridData.FILL_BOTH));
-               
-               String[] columnNames = {"Type", "Percent(%)", "Name"};
-               int[] columnWidths = {250,100,100}; 
-               
-               final TreeColumn[] column = new TreeColumn[columnNames.length];
-               
-               for(int i=0;i<column.length;i++){
-                       column[i] = new TreeColumn(tree, SWT.LEFT);
-                       column[i].setText(columnNames[i]);
-                       column[i].setWidth(columnWidths[i]);
-               }
-               
-               final int targetColumnIdx = 1;
-               
-               tree.addListener(SWT.PaintItem, new Listener() {
-                       public void handleEvent(Event event) {
-                               if (event.index == targetColumnIdx) {
-                                       GC gc = event.gc;
-                                       
-                                       String text = ((TreeItem)(event.item)).getText(targetColumnIdx);
-                                       int percent = 0;
-                                       if( !(text==null||text.length()<=0||text.startsWith("<"))){
-                                               percent = (int)Double.parseDouble(text);
-                                       }
-                                       int width = column[targetColumnIdx].getWidth() * percent / 100;
-
-                                       if(width>5){
-                                               Display display = Display.getCurrent();
-                                               gc.setForeground(display.getSystemColor(SWT.COLOR_GREEN));
-                                               gc.setBackground(display.getSystemColor(SWT.COLOR_DARK_CYAN));
-                                               gc.fillGradientRectangle(event.x+40, event.y, width-5, event.height, true);     
-                                               
-                                               Rectangle rect = new Rectangle(event.x+40, event.y, width-5, event.height-1);
-                                               gc.drawRectangle(rect);
-                                               gc.setForeground(display.getSystemColor(SWT.COLOR_LIST_FOREGROUND));
-                                       }
-                                       
-//                                     Point size = 
-                                       gc.textExtent(text);                                    
-//                                     int offset = Math.max(0, (event.height - size.y) / 2);
-//                                     gc.drawText(text, event.x+2, event.y+offset, true);
-                               }
-                       }
-               });             
-               
-               _viewer.setContentProvider(new OprofileViewContentProvider());
-               _viewer.setLabelProvider(new OprofileViewLabelProvider());
-               _viewer.addDoubleClickListener(new OprofileViewDoubleClickListener());
-               _viewer.setAutoExpandLevel(4);
-               getSite().setSelectionProvider(_viewer);
-       }
-       
-       private void createSourcePage(){
-               try{
-                       sourceEditor = new TextEditor();
-                       int index = addPage(sourceEditor, getEditorInput());
-                       setPageText(index, "Source");
-               }catch(PartInitException e)     {
-                       e.printStackTrace();
-               }
-       }
-       
-       private void updateTitle(){
-               setPartName(fileName);
-               setTitleToolTip(filePath);
-       }
-
-       private void loadOprofileData() throws InvocationTargetException, InterruptedException{
-               UiModelRoot uiModel = new UiModelRoot();
-               loadData(uiModel);
-               refreshView(uiModel);
-       }
-       
-       private void loadData(final UiModelRoot uiModel) throws InvocationTargetException, InterruptedException{
-               getSite().getWorkbenchWindow().run(false, false, new IRunnableWithProgress(){
-                       public void run(IProgressMonitor monitor) {
-                               monitor.beginTask("Load data", 100);
-                               
-                               OpModelRoot opModel = new OpModelRoot();
-                               try {
-                                       SAXParser saxParser = SAXParserFactory.newInstance().newSAXParser();
-                                       saxParser.parse(new File(filePath),new OprofileSAXHandler(opModel));
-                               } catch (ParserConfigurationException e) {
-                                       e.printStackTrace();
-                               } catch (SAXException e) {
-                                       e.printStackTrace();
-                               } catch (IOException e) {
-                                       e.printStackTrace();
-                               }       
-                               
-                               monitor.worked(1);
-                               
-                               uiModel.refreshModel(opModel);
-                               
-                               monitor.worked(1);
-                               monitor.done();
-                       }
-               });
-       }
-       
-       public void refreshView(final UiModelRoot uiModel){
-               UIJob refreshView = new UIJob("Refresh View"){
-                       @Override
-                       public IStatus runInUIThread(IProgressMonitor monitor) {
-                               _viewer.getControl().setCursor(waitCursor);
-                               _viewer.setInput(uiModel);
-                               _viewer.refresh();
-                               _viewer.getControl().setCursor(null);
-                               return Status.OK_STATUS;
-                       }
-               };
-               refreshView.schedule();
-       }
-       
-       @Override
-       public void doSave(IProgressMonitor monitor) {
-       }
-
-       @Override
-       public void doSaveAs() {
-       }
-
-       @Override
-       public boolean isSaveAsAllowed() {
-               return false;
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/handler/OprofileDrawChartHandler.java b/org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/handler/OprofileDrawChartHandler.java
deleted file mode 100644 (file)
index 38aa575..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- *  Oprofile Draw Chart Handler
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.ui.handler;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.linuxtools.oprofile.ui.model.IUiModelElement;
-import org.eclipse.linuxtools.oprofile.ui.model.UiModelEvent;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-import org.tizen.common.core.application.StatusLineMessageManager;
-import org.tizen.oprofile.ui.chart.ChartEditorInput;
-import org.tizen.oprofile.ui.chart.ChartModelRoot;
-import org.tizen.oprofile.ui.chart.PieChart;
-import org.tizen.oprofile.ui.editor.ChartEditor;
-
-public class OprofileDrawChartHandler extends AbstractHandler {
-       private IViewPart part;
-//     private Shell shell; 
-       private StatusLineMessageManager statusLine;
-//     private TreeViewer viewer;
-       private UiModelEvent uiModel;
-       private String editorId = "org.tizen.oprofile.ui.editor.ChartEditor";
-       
-       public Object execute(ExecutionEvent event) throws ExecutionException {
-
-               part = (IViewPart) HandlerUtil.getActivePart(event);
-               statusLine = new StatusLineMessageManager(part);
-               
-               IStructuredSelection selection = (IStructuredSelection)HandlerUtil.getCurrentSelection(event);
-               
-               if(selection==null){
-                       statusLine.setErrorMessage("There is no selection");
-                       return null;
-               }
-               IUiModelElement element = (IUiModelElement)selection.getFirstElement();
-               if(element==null){
-                       statusLine.setErrorMessage("There is no selected event");
-                       return null;
-               }else{
-                       statusLine.setErrorMessage("");
-               }
-               
-               uiModel = findEvent(element);
-               if(uiModel.getChildren().length==0){
-                       statusLine.setErrorMessage("There is no selected event");
-                       return null;
-               }else{
-                       statusLine.setErrorMessage("");
-               }
-               
-               drawChart();
-               return null;
-       }
-
-       private UiModelEvent findEvent(IUiModelElement element) {
-               if(element instanceof UiModelEvent)
-                       return (UiModelEvent)element;
-               else 
-                       return findEvent(element.getParent());
-       }
-
-       private void drawChart() {
-               Display.getDefault().syncExec(new Runnable() {
-                       public void run() {
-                               try {
-                                       ChartModelRoot chartModel = new ChartModelRoot();
-                                       chartModel.refreshModel(uiModel);
-                                       
-                                       openEditor(chartModel);
-                               } catch (PartInitException e) {
-                                       e.printStackTrace();
-                               }
-                       }
-               });
-       }
-       
-       public void openEditor(ChartModelRoot chartModel) throws PartInitException{
-               IWorkbenchPage page = PlatformUI.getWorkbench()
-               .getActiveWorkbenchWindow().getActivePage();
-               
-               IEditorReference[] editors = page.getEditorReferences();
-               
-               for(int i=0;i<editors.length;i++){
-                       IEditorPart editor = editors[i].getEditor(true);
-                       if(editor instanceof ChartEditor){
-                               ((ChartEditor)editor).redraw(PieChart.createPie(chartModel));
-                               page.activate(editor);
-                               return;
-                       }
-               }
-               
-               ChartEditorInput chartInput = new ChartEditorInput(PieChart.createPie(chartModel), "Chart");
-               page.openEditor(chartInput, editorId);
-       } 
-}
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/handler/OprofileOpenDaemonLogHandler.java b/org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/handler/OprofileOpenDaemonLogHandler.java
deleted file mode 100644 (file)
index b30cf67..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *  Oprofile Open Deamon Log Handler
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.ui.handler;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.linuxtools.profiling.ui.ProfileUIUtils;
-import org.eclipse.ui.PartInitException;
-
-import org.tizen.oprofile.core.OprofileCommonConstants;
-
-public class OprofileOpenDaemonLogHandler extends AbstractHandler {
-
-       public Object execute(ExecutionEvent event) throws ExecutionException {
-               resetSession();
-               return null;
-       }
-
-       private void resetSession() {
-               try {
-                       ProfileUIUtils.openEditorAndSelect(OprofileCommonConstants.LOG_DAEMON, 0);
-               } catch (PartInitException e) {
-                       e.printStackTrace();
-               } catch (BadLocationException e) {
-                       e.printStackTrace();
-               }
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/handler/OprofileRefreshViewHandler.java b/org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/handler/OprofileRefreshViewHandler.java
deleted file mode 100644 (file)
index 92638f0..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *  Oprofile Refresh Voew Handler
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.ui.handler;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.linuxtools.oprofile.ui.view.OprofileView;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-public class OprofileRefreshViewHandler extends AbstractHandler {
-       private IViewPart part;
-//     private Shell shell;
-
-       public Object execute(ExecutionEvent event) throws ExecutionException {
-
-               part = (IViewPart) HandlerUtil.getActivePart(event);
-               
-               refreshView();
-               return null;
-       }
-
-       private void refreshView() {
-               ((OprofileView)part).refreshView();
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/handler/OprofileResetHandler.java b/org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/handler/OprofileResetHandler.java
deleted file mode 100644 (file)
index 8fb4fb5..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- *  Oprofile Reset Handler
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.ui.handler;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.linuxtools.oprofile.core.OpcontrolException;
-import org.eclipse.linuxtools.oprofile.core.OprofileCorePlugin;
-import org.eclipse.linuxtools.oprofile.ui.view.OprofileView;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-public class OprofileResetHandler extends AbstractHandler {
-       private IViewPart part;
-//     private Shell shell;
-
-       public Object execute(ExecutionEvent event) throws ExecutionException {
-
-               part = (IViewPart) HandlerUtil.getActivePart(event);
-               
-               resetSession();
-               return null;
-       }
-
-       private void resetSession() {
-               try {
-                       OprofileCorePlugin.getDefault().getOpcontrolProvider().reset();
-                       ((OprofileView)part).refreshView();
-               } catch (OpcontrolException e) {
-                       OprofileCorePlugin.showErrorDialog("opcontrolProvider", e);
-               }
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/handler/OprofileSaveFileHandler.java b/org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/handler/OprofileSaveFileHandler.java
deleted file mode 100644 (file)
index 47f74dd..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- *  Oprofile Save File Handler
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.ui.handler;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.linuxtools.oprofile.ui.model.UiModelRoot;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-import org.tizen.common.core.application.StatusLineMessageManager;
-import org.tizen.common.util.DialogUtil;
-
-public class OprofileSaveFileHandler extends AbstractHandler {
-       private IViewPart part;
-       private TreeViewer viewer;
-       private String fileName;
-       private Shell shell;
-       private StatusLineMessageManager statusLine;
-       private UiModelRoot uiModel;
-       
-       private final static String title = "Save File";
-       private final static String PARAMETER_ID = "org.tizen.oprofile.command.saveFile.parameter";
-
-
-       public Object execute(ExecutionEvent event) throws ExecutionException {
-
-               part = (IViewPart)HandlerUtil.getActivePart(event);
-               shell = part.getSite().getShell();
-               statusLine = new StatusLineMessageManager(part);
-               
-               viewer = (TreeViewer)part.getSite().getSelectionProvider();
-               uiModel = (UiModelRoot)viewer.getInput();
-               
-               String extension = event.getParameter(PARAMETER_ID);
-               
-               if(uiModel==null||!uiModel.hasChildren()){
-                       statusLine.setErrorMessage("There is no data");
-                       return null;
-               }else{
-                       statusLine.setErrorMessage("");
-               }
-               
-               try {
-                       saveFile(extension);
-               } catch (InvocationTargetException e) {
-                       e.printStackTrace();
-               } catch (InterruptedException e) {
-                       e.printStackTrace();
-               }
-
-               return null;
-       }
-
-       private void saveFile(String extension) throws InvocationTargetException, InterruptedException {
-               fileName = getSaveFileName(extension);
-               
-               if(fileName==null)
-                       return;
-               
-               if(!fileName.endsWith("."+extension))
-                       fileName= fileName+"."+extension;
-               
-               if(!(new File(fileName).getParentFile().canWrite())){
-                       DialogUtil.openErrorDialog("You can store a file into the direcotry that has write permission. please select another directory");
-                       return;
-               }
-               
-               part.getSite().getWorkbenchWindow().run(false, false, new IRunnableWithProgress(){
-                       public void run(IProgressMonitor monitor) {
-                               monitor.beginTask("Save File", 100);
-                               writeData();
-                               monitor.done();
-                       }
-               });
-               
-       }
-
-       private String getSaveFileName(String extension) {
-               String[] extFilter = {"*."+extension,"*.*"};
-               
-               FileDialog dialog = new FileDialog(shell, SWT.SAVE);
-               dialog.setFilterExtensions(extFilter);
-               dialog.setText(title);
-               dialog.setOverwrite(true);
-               dialog.setFilterPath(System.getProperty("user.home"));
-               dialog.setFileName("untitled."+extension);
-               return dialog.open();
-       }
-       
-       private void writeData() {
-//             FileWriter writer = null;
-//             
-//             try {
-//                     writer = new FileWriter(fileName);
-//                     writer.write(uiModel.getXML());
-//             }catch (IOException e) {
-//                     e.printStackTrace();
-//             }finally{
-//                     try {
-//                             if (writer != null)
-//                                     writer.close();
-//                     } catch (IOException e) {
-//                             e.printStackTrace();
-//                     }
-//             }
-               PrintWriter writer = null;
-               
-               try {
-                       writer = new PrintWriter(fileName, "UTF-8");
-                       writer.write(uiModel.getXML());
-               } catch (IOException e) {
-                       e.printStackTrace();
-               } finally {
-                       try {
-                               if (writer != null) {
-                                       writer.flush();
-                                       writer.close();
-                               }
-                       } catch (Exception e) {
-                               e.printStackTrace();
-                       }
-               }
-       }
-       
-}
-
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/view/OprofileViewDoubleClickListener.java b/org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/view/OprofileViewDoubleClickListener.java
deleted file mode 100644 (file)
index 21a2fca..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Oprofile View Double Click Listener 
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.ui.view;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.TreeSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.linuxtools.oprofile.ui.model.IUiModelElement;
-import org.eclipse.linuxtools.oprofile.ui.model.UiModelEvent;
-import org.eclipse.linuxtools.oprofile.ui.model.UiModelImage;
-import org.eclipse.linuxtools.oprofile.ui.model.UiModelSample;
-import org.eclipse.linuxtools.oprofile.ui.model.UiModelSession;
-import org.eclipse.linuxtools.oprofile.ui.model.UiModelSymbol;
-import org.eclipse.linuxtools.profiling.ui.ProfileUIUtils;
-import org.eclipse.ui.PartInitException;
-
-/**
- * Listener for the oprofile view when a user double clicks on an element in the tree.
- * 
- * Different things occur based on the event:
- *   
- *   UiModelEvent              - nothing (?)
- *   UiModelSession    - save the session to a different name
- *   UiModelImage              - nothing (?)
- *   UiModelSymbol             - nothing (?)
- *   UiModelSample             - go to line number in appropriate file
- */
-public class OprofileViewDoubleClickListener implements IDoubleClickListener {
-       public void doubleClick(DoubleClickEvent event) {
-               IUiModelElement element = (IUiModelElement)((TreeSelection)((TreeViewer)event.getSource()).getSelection()).getFirstElement();
-/*
-               if (element instanceof UiModelEvent) {
-//                     UiModelEvent event = (UiModelEvent)element;
-
-               } else if (element instanceof UiModelSession) {
-                       // moved into an action menu
-               } else if (element instanceof UiModelImage) {
-//                     UiModelImage image = (UiModelImage)element;
-       
-               } else if (element instanceof UiModelSymbol) {
-                       // disable this.. for binary section such as .plt, 
-                       // this will open the binary in an editor = bad 
-
-                       //jump to 1st line in the file
-//                     UiModelSymbol symbol = (UiModelSymbol)element;
-//                     String fileName = symbol.getFileName();
-//                     
-//                     if (fileName.length() > 0) {
-//                             try {
-//                                     ProfileUIUtils.openEditorAndSelect(fileName, 1);
-//                             } catch (PartInitException e) {
-//                                     e.printStackTrace();
-//                             } catch (BadLocationException e) {
-//                                     e.printStackTrace();
-//                             }
-//                     }
-               } else
-*/             
-               if (element instanceof UiModelSample) {
-                       //jump to line number in the appropriate file
-                       UiModelSample sample = (UiModelSample)element;
-                       int line = sample.getLine();
-                       
-                       //get file name from the parent sample 
-                       String fileName = ((UiModelSymbol)sample.getParent()).getFileName();
-                       //jinu added at 20090602
-                       //fixed for sb2
-                       //String strpath = ScratchboxTargetControl.getHostpathFromSboxpath(fileName);
-                       String strpath = fileName;
-                       
-                       try {
-                               //jinu modified at 20090602
-                               //ProfileUIUtils.openEditorAndSelect(fileName, line);
-                               ProfileUIUtils.openEditorAndSelect(strpath, line);
-                       } catch (PartInitException e) {
-                               e.printStackTrace();
-                       } catch (BadLocationException e) {
-                               e.printStackTrace();
-                       }
-               }
-       }
-}
diff --git a/org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/view/OprofileViewLabelProvider.java b/org.eclipse.linuxtools.oprofile.ui/src/org/tizen/oprofile/ui/view/OprofileViewLabelProvider.java
deleted file mode 100644 (file)
index 4c7a568..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- *  Oprofile View Label Provider
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Wonhyoung Park <wonhyoung2.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * 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:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.oprofile.ui.view;
-
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.linuxtools.oprofile.ui.OprofileUiPlugin;
-import org.eclipse.linuxtools.oprofile.ui.model.IUiModelElement;
-import org.eclipse.linuxtools.oprofile.ui.model.UiModelDependent;
-import org.eclipse.linuxtools.oprofile.ui.model.UiModelImage;
-import org.eclipse.linuxtools.oprofile.ui.model.UiModelSample;
-import org.eclipse.linuxtools.oprofile.ui.model.UiModelSymbol;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Content provider for OprofileView's tree viewer.
- */
-public class OprofileViewLabelProvider extends LabelProvider implements ITableLabelProvider {
-
-       public Image getColumnImage(Object element, int columnIndex) {
-               if(columnIndex==0){
-                       return ((IUiModelElement) element).getLabelImage();
-               }
-               
-               return null;
-       }
-
-       public String getColumnText(Object element, int columnIndex) {
-               IUiModelElement modelElement = (IUiModelElement) element;
-               
-               if(columnIndex==0){
-                       if(modelElement instanceof UiModelDependent){
-                               return "dependent library";
-                       }else if(modelElement instanceof UiModelImage){
-                               return "module";
-                       }else if(modelElement instanceof UiModelSymbol){
-                               return "symbol";
-                       }else if(modelElement instanceof UiModelSample){
-                               return "detailed code";
-                       }else{
-                               return modelElement.getLabelText();
-                       }
-               }else if(columnIndex==1){
-                       double value = modelElement.getPercentage();
-                       return value<0?null:OprofileUiPlugin.getPercentage(value);
-               }else   if(columnIndex==2){
-                       return modelElement.getName();
-               }
-               
-               return null;
-       }
-
-}
index 91dc647..d9311f7 100644 (file)
@@ -4,6 +4,7 @@
  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
  *
  * Contact: 
+ * Seokgil Kang <seokgil.kang@samsung.com>
  * Jaewon Lim <jaewon81.lim@samsung.com>
  * Wonhyoung Park <wonhyoung2.park@samsung.com>
  * Juyoung Kim <j0.kim@samsung.com>
index f4e6278..e2f56ea 100644 (file)
@@ -3,7 +3,8 @@
  *
  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
  *
- * Contact: 
+ * Contact:
+ * Seokgil Kang <seokgil.kang@samsung.com> 
  * Jaewon Lim <jaewon81.lim@samsung.com>
  * Wonhyoung Park <wonhyoung2.park@samsung.com>
  * Juyoung Kim <j0.kim@samsung.com>
index decd896..f9358a4 100644 (file)
@@ -35,34 +35,6 @@ BY CLICKING THE "I AGREE" BUTTON OR BY USING ANY PART OF TIZEN SDK, YOU AGREE (O
          version="0.0.0"/>
 
    <plugin
-         id="org.eclipse.linuxtools.oprofile.core"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.linuxtools.oprofile.launch"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.linuxtools.oprofile.launch.exe"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.linuxtools.oprofile.ui"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
          id="org.eclipse.linuxtools.profiling.launch"
          download-size="0"
          install-size="0"
index 418f82e..09706a5 100644 (file)
@@ -1,3 +1,6 @@
+* 2.2.32
+- remove oprofile packages and update contact information
+== Seokgil Kang <seokgil.kang@samsung.com> 2014-11-13
 * 2.2.31
 - modify valgrind error message
 == Seokgil Kang <seokgil.kang@samsung.com> 2014-10-31
index a9c2b84..9a8ed85 100644 (file)
@@ -1,5 +1,5 @@
 Source:profiler-eplugin
-Version:2.2.31
+Version:2.2.32
 Maintainer:seokgil.kang <seokgil.kang@samsung.com>, Juyoung Kim
 
 Package:profiler-eplugin