Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'systemtap/org.eclipse.linuxtools.systemtap.ui.ide')
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/.classpath7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/.project28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/ChangeLog67
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/META-INF/MANIFEST.MF35
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/build.properties9
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/completion/stp_completion.properties569
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/concepts.html16
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/functionBrowser.html17
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/Editor.pngbin0 -> 58169 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/Function.pngbin0 -> 71937 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/KernelSource.pngbin0 -> 63684 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/ProbeAlias.pngbin0 -> 66851 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_long.gifbin0 -> 367 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_str.gifbin0 -> 576 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_unk.gifbin0 -> 368 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_void.gifbin0 -> 183 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/kernelBrowser.html9
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/probeAliasBrowser.html17
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/stpEditor.html13
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/systemtapPerspectives.html23
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial.html15
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/chartbox1.pngbin0 -> 19247 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/editor.pngbin0 -> 54078 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/graph.pngbin0 -> 55043 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/graphics.pngbin0 -> 57714 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/newfile.pngbin0 -> 32385 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/output.pngbin0 -> 58821 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/lesson1.html30
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/lesson2.html70
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/lesson3.html59
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/gettingStarted.html22
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/exampleScripts.html174
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/frequentlyAskedQuestions.html29
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/Console.pngbin0 -> 66102 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/ErrorLog.pngbin0 -> 58821 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/chartbox1.pngbin0 -> 19247 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/consolebox1.pngbin0 -> 19084 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/findbox1.pngbin0 -> 23878 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/gotobox1.pngbin0 -> 7047 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/importbox1.pngbin0 -> 35211 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/newbox1.pngbin0 -> 52828 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/openbox1.pngbin0 -> 49976 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/optionsbox1.pngbin0 -> 28529 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/passbox1.pngbin0 -> 7450 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/preferencesbox1.pngbin0 -> 40679 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/viewbox1.pngbin0 -> 17817 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/dash.pngbin0 -> 1765 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/graphing.pngbin0 -> 1668 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/ide.pngbin0 -> 866 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/import_wiz.gifbin0 -> 327 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/new_wiz.gifbin0 -> 612 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/open_wiz.gifbin0 -> 216 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/run_chart.gifbin0 -> 612 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/run_exc.gifbin0 -> 379 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/run_tool.gifbin0 -> 588 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/stop_obj.gifbin0 -> 215 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/menus.html105
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/preferences.html129
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/reference.html19
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/regex.html144
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/toolbars.html29
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/viewsAndEditors.html34
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/creatingSystemtapScripts.html17
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/images/addedModule.pngbin0 -> 8131 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/images/exportScript.pngbin0 -> 61215 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/images/options.pngbin0 -> 28529 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/tasks.html14
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/usingTheSTPEditor.html30
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/viewingDataCharts.html14
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/toc.html54
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/tocconcepts.xml10
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/tocgettingstarted.xml10
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/tocreference.xml14
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/toctasks.xml8
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/import_wiz.gifbin0 -> 327 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/run/run_chart.gifbin0 -> 612 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/run/run_exc.gifbin0 -> 379 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/run/run_tool.gifbin0 -> 588 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/terminate_co.gifbin0 -> 215 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/files/file_c.gifbin0 -> 351 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/files/file_h.gifbin0 -> 353 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/files/file_stp.gifbin0 -> 360 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/misc/file_obj.gifbin0 -> 354 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/misc/fldr_obj.gifbin0 -> 216 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/misc/probe_obj.gifbin0 -> 374 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/perspective_obj.gifbin0 -> 371 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/sample.gifbin0 -> 983 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_long.gifbin0 -> 367 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_str.gifbin0 -> 576 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_unk.gifbin0 -> 368 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_void.gifbin0 -> 183 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/func_obj.gifbin0 -> 126 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/kernel_obj.gifbin0 -> 227 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/page_obj.gifbin0 -> 359 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/probe_obj.gifbin0 -> 149 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.properties70
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.xml317
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/IDEPerspective.java69
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/IDESessionSettings.java26
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/DefinitionAction.java154
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/ImportTapsetAction.java104
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptAction.java345
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptChartAction.java128
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptOptionsAction.java105
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/TempFileAction.java54
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/FunctionBrowserAction.java142
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/KernelSourceAction.java178
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/ProbeAliasAction.java134
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/TreeExpandCollapseAction.java136
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/dialogs/ErrorMessage.java31
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CConfiguration.java103
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CDocumentProvider.java51
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CEditor.java346
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CPartitionScanner.java42
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CScanner.java110
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/ICColorConstants.java28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPColorConstants.java24
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPCompletionProcessor.java159
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPConfiguration.java144
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPDocumentProvider.java68
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPEditor.java163
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPElementScanner.java110
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPMetadataSingleton.java305
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPPartitionScanner.java94
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPPartitioner.java61
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPReconcilingStrategy.java278
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/strings.properties568
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/IDECloseMonitor.java46
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/IDEPlugin.java81
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/Localization.java22
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/localization.properties70
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/CodeAssistPreferencePage.java73
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/ConditionalFilterPreferencePage.java50
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/EditorPreferencePage.java52
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/IDEPreferenceConstants.java91
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/IDEPreferencePage.java48
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/PathPreferencePage.java54
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/PreferenceInitializer.java93
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/StapOptionsPreferencePage.java60
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/StapPreferencePage.java45
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/SyntaxColoringPreferencePage.java185
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/TapsetsPreferencePage.java52
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/TypeingPreferencePage.java45
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/Query.java176
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/StapErrorParser.java84
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TapsetLibrary.java202
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TapsetParser.java679
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TreeSettings.java253
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/uistructures/StapSettingsDialog.java178
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/BrowserView.java167
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/FunctionBrowserView.java139
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/KernelBrowserView.java141
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/ProbeAliasBrowserView.java103
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/toc.xml17
155 files changed, 9700 insertions, 0 deletions
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/.classpath b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/.classpath
new file mode 100644
index 0000000000..64c5e31b7a
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/.project b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/.project
new file mode 100644
index 0000000000..04197af3c8
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.linuxtools.systemtap.ui.ide</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/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/.settings/org.eclipse.jdt.core.prefs b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..e72ca5ffff
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Fri Feb 27 18:15:33 IST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/ChangeLog
new file mode 100644
index 0000000000..85265a38f4
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/ChangeLog
@@ -0,0 +1,67 @@
+2009-08-07 Andrew Overholt <overholt@redhat.com>
+
+ * META-INF/MANIFEST.MF: Make version 0.3.0.qualifier.
+
+2009-08-07 Andrew Overholt <overholt@redhat.com>
+
+ * META-INF/MANIFEST.MF: Change provider from IBM to Eclipse.
+
+2009-08-06 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPMetadataSingleton.java (parse):
+
+2009-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * ChangeLog:Replacing all /org/eclipse/linuxtools/systemtap/ui/ide/editors/stp
+ files with Phil's editor code
+ * src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptAction.java (isValidFile):
+ (isValid):
+ (getFilePath):
+ * src/org/eclipse/linuxtools/systemtap/ui/ide/internal/IDEPlugin.java (PLUGIN_ID):
+ (getImageDescriptor):
+ * src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/PreferenceInitializer.java (initializeDefaultPreferences):
+
+2009-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * ChangeLog:Refactoring. Renaming all packages directories from *.systemtapgui.
+
+ 2009-01-19 Alexander Kurtakov <akurtako@redhat.com>
+
+ * .settings/org.eclipse.jdt.core.prefs: Enable more warnings.
+
+2009-01-09 Phil Muldoon <pmuldoon@redhat.com>
+
+ * build.properties: Add completion/ folder to binary
+ build.
+
+2008-12-09 Andrew Overholt <overholt@redhat.com>
+
+ * plugin.xml: Remove erroneous metadata element under <plugin>.
+
+2008-11-03 Andrew Overholt <overholt@redhat.com>
+
+ * META-INF/MANIFEST.MF: Add Bundle-ActivationPolicy.
+
+2008-10-31 Andrew Overholt <overholt@redhat.com>
+
+ * META-INF/MANIFEST.MF: Use plugin.properties.
+ * plugin.properties: Initial checkin.
+
+2008-10-28 Andrew Overholt <overholt@redhat.com>
+
+ Bug #252489
+ * META-INF/MANIFEST.MF: Set BREE to 1.6 (STPMetadataSingleton.parse uses
+ ResourceBundle.containsKey).
+
+2009-09-13 Phil Muldoon <pmuldoon@redhat.com>
+
+ * META-INF/MANIFEST.MF: Update to reflect
+ import specifications.
+ * plugin.xml: Likewise.
+
+2008-09-11 Phil Muldoon <pmuldoon@redhat.com>
+
+ * .classpath: Add.
+
+ * Initial import of Systemtap editor
+ \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..4c828d3890
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/META-INF/MANIFEST.MF
@@ -0,0 +1,35 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: IDE Plug-in
+Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.ide;singleton:=true
+Bundle-Version: 0.3.0.qualifier
+Bundle-Activator: org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin
+Bundle-Vendor: Eclipse
+Bundle-Localization: plugin
+Export-Package: org.eclipse.linuxtools.systemtap.ui.ide,
+ org.eclipse.linuxtools.systemtap.ui.ide.actions,
+ org.eclipse.linuxtools.systemtap.ui.ide.structures
+Require-Bundle: org.eclipse.linuxtools.systemtap.ui.logging,
+ org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.linuxtools.systemtap.ui.editor,
+ org.eclipse.linuxtools.systemtap.ui.systemtapgui,
+ org.eclipse.linuxtools.systemtap.ui.consolelog,
+ org.eclipse.linuxtools.systemtap.ui.structures,
+ org.eclipse.core.resources;bundle-version="3.4.1"
+Bundle-ActivationPolicy: lazy
+Import-Package: org.eclipse.core.filesystem,
+ org.eclipse.linuxtools.systemtap.ui.graphing,
+ org.eclipse.linuxtools.systemtap.ui.graphing.views,
+ org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets,
+ org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures,
+ org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.dataset,
+ org.eclipse.linuxtools.systemtap.ui.structures,
+ org.eclipse.linuxtools.systemtap.ui.structures.listeners,
+ org.eclipse.linuxtools.systemtap.ui.structures.runnable,
+ org.eclipse.linuxtools.systemtap.ui.structures.ui,
+ org.eclipse.linuxtools.systemtap.ui.structures.validators,
+ org.eclipse.ui.ide,
+ org.eclipse.ui.part
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/build.properties
new file mode 100644
index 0000000000..e3fe0187cf
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+ META-INF/,\
+ .,\
+ icons/,\
+ toc.xml,\
+ documentation/,\
+ plugin.properties
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/completion/stp_completion.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/completion/stp_completion.properties
new file mode 100644
index 0000000000..7221df6aa3
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/completion/stp_completion.properties
@@ -0,0 +1,569 @@
+syscall.accept(name:string,sockfd:long,addr_uaddr:long,addrlen_uaddr:long,argstr:string)
+syscall.access(name:string,pathname:string,mode:long,mode_str:string,argstr:string)
+syscall.acct(name:string,filename:string,argstr:string)
+syscall.add_key(name:string,type_uaddr:long,description_auddr:long,payload_uaddr:long,plen:long,ringid:long,argstr:string)
+syscall.adjtimex(name:string,argstr:string)
+syscall.alarm(name:string,seconds:long,argstr:string)
+syscall.arch_prctl(name:string,code:long,addr:long,argstr:string)
+syscall.bdflush(name:string,func:long,data:long,data_str:string,argstr:string)
+syscall.bind(name:string,sockfd:long,my_addr_uaddr:long,addrlen:long,argstr:string)
+syscall.brk(name:string,brk:long,argstr:string)
+syscall.capget(name:string,header_uaddr:long,data_uaddr:long,argstr:string)
+syscall.capset(name:string,header_uaddr:long,data_uaddr:long,argstr:string)
+syscall.chdir(name:string,path:string,argstr:string)
+syscall.chmod(name:string,path:string,mode:long,argstr:string)
+syscall.chown(name:string,path:string,owner:long,group:long,argstr:string)
+syscall.chown16(name:string,path:string,owner:long,group:long,argstr:string)
+syscall.chroot(name:string,path:string,argstr:string)
+syscall.clock_getres(name:string,clk_id:long,clk_id_str:string,res_uaddr:long,argstr:string)
+syscall.clock_gettime(name:string,clk_id:long,clk_id_str:string,argstr:string)
+syscall.clock_nanosleep(name:string,flag_str:string,argstr:string)
+syscall.clock_settime(name:string,clk_id:long,clk_id_str:string,tp_uaddr:long,argstr:string)
+syscall.close(name:string,fd:long,argstr:string)
+syscall.compat_adjtimex(name:string,argstr:string)
+syscall.compat_clock_nanosleep(name:string,flag_str:string,argstr:string)
+syscall.compat_execve(name:string,filename:string,args:string,argstr:string)
+syscall.compat_futex(name:string,futex_uaddr:long,op:long,val:long,utime_uaddr:long,uaddr2_uaddr:long,val3:long,argstr:string)
+syscall.compat_futimesat(name:string,dirfd:long,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
+syscall.compat_getitimer(name:string,which:long,value_uaddr:long,argstr:string)
+syscall.compat_io_setup(name:string,maxevents:long,ctxp_uaddr:long,argstr:string)
+syscall.compat_io_submit(name:string,ctx_id:long,nr:long,iocbpp_uaddr:long,argstr:string)
+syscall.compat_nanosleep(name:string,req_uaddr:long,rem_uaddr:long,argstr:string)
+syscall.compat_ppoll(name:string,argstr:string)
+syscall.compat_pselect6(name:string,argstr:string)
+syscall.compat_pselect7a(name:string,argstr:string)
+syscall.compat_select(name:string,n:long,readfds_uaddr:long,writefds_uaddr:long,exceptfds_uaddr:long,timeout_uaddr:long,argstr:string)
+syscall.compat_setitimer(name:string,which:long,value_uaddr:long,ovalue_uaddr:long,argstr:string)
+syscall.compat_signalfd(name:string,argstr:string)
+syscall.compat_sys_msgctl(name:string,argstr:string)
+syscall.compat_sys_msgrcv(name:string,argstr:string)
+syscall.compat_sys_msgsnd(name:string,argstr:string)
+syscall.compat_sys_recvmsg(name:string,s:long,msg_uaddr:long,flags:long,argstr:string)
+syscall.compat_sys_semctl(name:string,argstr:string)
+syscall.compat_sys_semtimedop(name:string,semid:long,sops_uaddr:long,nsops:long,timeout_uaddr:long,argstr:string)
+syscall.compat_sys_sendmsg(name:string,s:long,msg_uaddr:long,flags:long,argstr:string)
+syscall.compat_sys_shmat(name:string,first:long,second:long,third:long,uptr_uaddr:long,argstr:string)
+syscall.compat_sys_shmctl(name:string,first:long,second:long,uptr_uaddr:long,argstr:string)
+syscall.compat_sys_utimes(name:string,filename:string,argstr:string)
+syscall.compat_utime(name:string,filename_uaddr:long,filename:string,buf_uaddr:long,actime:long,modtime:long,argstr:string)
+syscall.compat_utimensat(name:string,argstr:string)
+syscall.compat_vmsplice(name:string,argstr:string)
+syscall.connect(name:string,sockfd:long,serv_addr_uaddr:long,addrlen:long,argstr:string)
+syscall.creat(name:string,mode:long,pathname:string,argstr:string)
+syscall.delete_module(name:string,name_user:string,flags:long,argstr:string)
+syscall.dup(name:string,oldfd:long,argstr:string)
+syscall.dup2(name:string,oldfd:long,newfd:long,argstr:string)
+syscall.epoll_create(name:string,size:long,argstr:string)
+syscall.epoll_ctl(name:string,epfd:long,op:long,op_str:string,fd:long,event_uaddr:long,argstr:string)
+syscall.epoll_pwait(name:string,argstr:string)
+syscall.epoll_wait(name:string,epfd:long,events_uaddr:long,maxevents:long,timeout:long,argstr:string)
+syscall.eventfd(name:string,argstr:string)
+syscall.execve(name:string,filename:string,args:string,argstr:string)
+syscall.exit(name:string,status:long,argstr:string)
+syscall.exit_group(name:string,status:long,argstr:string)
+syscall.faccessat(name:string,dfd:long,dfd_str:string,filename:long,filename_str:string,mode:long,mode_str:string,argstr:string)
+syscall.fadvise64(name:string,fs:long,offset:long,len:long,advice:long,argstr:string)
+syscall.fadvise64_64(name:string,fs:long,offset:long,len:long,advice:long,argstr:string)
+syscall.fchdir(name:string,fd:long,argstr:string)
+syscall.fchmod(name:string,fildes:long,mode:long,argstr:string)
+syscall.fchmodat(name:string,dfd:long,dfd_str:string,filename:long,filename_str:string,mode:long,argstr:string)
+syscall.fchown(name:string,fd:long,owner:long,group:long,argstr:string)
+syscall.fchown16(name:string,fd:long,owner:long,group:long,argstr:string)
+syscall.fchownat(name:string,dfd:long,dfd_str:string,filename:long,filename_str:string,user:long,group:long,flag:long,flag_str:string,argstr:string)
+syscall.fcntl(name:string,fd:long,cmd:long,cmd_str:string,arg:long,argstr:string)
+syscall.fdatasync(name:string,fd:long,argstr:string)
+syscall.fgetxattr(name:string,filedes:long,name2:string,value_uaddr:long,size:long,argstr:string)
+syscall.flistxattr(name:string,filedes:long,list_uaddr:long,size:long,argstr:string)
+syscall.flock(name:string,fd:long,operation:long,argstr:string)
+syscall.fork(clone_flags:long,stack_start:long,regs:long,stack_size:long,parent_tid_uaddr:long,child_tid_uaddr:long,name:string,argstr:string)
+syscall.fremovexattr(name:string,filedes:long,name_uaddr:long,argstr:string)
+syscall.fsetxattr(name:string,filedes:long,name2:string,value_uaddr:long,size:long,flags:long,argstr:string)
+syscall.fstat(name:string,filedes:long,buf_uaddr:long,argstr:string)
+syscall.fstatat(name:string,dirfd:long,path:string,buf_uaddr:long,argstr:string)
+syscall.fstatfs(name:string,fd:long,buf_uaddr:long,argstr:string)
+syscall.fstatfs64(name:string,fd:long,sz:long,buf_uaddr:long,argstr:string)
+syscall.fsync(name:string,fd:long,argstr:string)
+syscall.ftruncate(name:string,fd:long,length:long,argstr:string)
+syscall.futex(name:string,futex_uaddr:long,op:long,val:long,utime_uaddr:long,uaddr2_uaddr:long,val3:long,argstr:string)
+syscall.futimesat(name:string,dirfd:long,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
+syscall.get_mempolicy(name:string,policy_uaddr:long,nmask_uaddr:long,maxnode:long,addr:long,flags:long,argstr:string)
+syscall.getcwd(name:string,buf_uaddr:long,size:long,argstr:string)
+syscall.getdents(name:string,fd:long,dirp_uaddr:long,count:long,argstr:string)
+syscall.getegid(name:string,argstr:string)
+syscall.geteuid(name:string,argstr:string)
+syscall.getgid(name:string,argstr:string)
+syscall.getgroups(name:string,size:long,list_uaddr:long,argstr:string)
+syscall.gethostname(name:string,name_uaddr:long,len:long,argstr:string)
+syscall.getitimer(name:string,which:long,value_uaddr:long,argstr:string)
+syscall.getpeername(name:string,s:long,name_uaddr:long,namelen_uaddr:long,argstr:string)
+syscall.getpgid(name:string,pid:long,argstr:string)
+syscall.getpgrp(name:string,argstr:string)
+syscall.getpid(name:string,argstr:string)
+syscall.getppid(name:string,argstr:string)
+syscall.getpriority(name:string,which:long,who:long,argstr:string)
+syscall.getresgid(name:string,rgid_uaddr:long,egid_uaddr:long,sgid_uaddr:long,argstr:string)
+syscall.getresuid(name:string,ruid_uaddr:long,euid_uaddr:long,suid_uaddr:long,argstr:string)
+syscall.getrlimit(name:string,resource:long,rlim_uaddr:long,argstr:string)
+syscall.getrusage(name:string,who:long,who_str:string,usage_uaddr:long,argstr:string)
+syscall.getsid(name:string,pid:long,argstr:string)
+syscall.getsockname(name:string,s:long,name_uaddr:long,namelen_uaddr:long,argstr:string)
+syscall.getsockopt(name:string,fd:long,level:long,level_str:string,optname:long,optname_str:string,optval_uaddr:long,optlen_uaddr:long,argstr:string)
+syscall.gettid(name:string,argstr:string)
+syscall.gettimeofday(name:string,tv_uaddr:long,tz_uaddr:long,argstr:string)
+syscall.getuid(name:string,argstr:string)
+syscall.getxattr(name:string,path:string,name2:string,value_uaddr:long,size:long,argstr:string)
+syscall.init_module(name:string,umod_uaddr:long,len:long,uargs:string,argstr:string)
+syscall.inotify_add_watch(name:string,fd:long,mask:long,path_uaddr:long,path:string,argstr:string)
+syscall.inotify_init(name:string,argstr:string)
+syscall.inotify_rm_watch(name:string,fd:long,wd:long,argstr:string)
+syscall.io_cancel(name:string,ctx_id:long,iocb_uaddr:long,result_uaddr:long,argstr:string)
+syscall.io_destroy(name:string,ctx:long,argstr:string)
+syscall.io_getevents(name:string,ctx_id:long,min_nr:long,nr:long,events_uaddr:long,timeout_uaddr:long,timestr:string,argstr:string)
+syscall.io_setup(name:string,maxevents:long,ctxp_uaddr:long,argstr:string)
+syscall.io_submit(name:string,ctx_id:long,nr:long,iocbpp_uaddr:long,argstr:string)
+syscall.ioctl(name:string,fd:long,request:long,argp:long,argstr:string)
+syscall.ioperm(name:string,from:long,num:long,turn_on:long,argstr:string)
+syscall.iopl(name:string,level:long,argstr:string)
+syscall.ioprio_get(name:string,which:long,who:long,argstr:string)
+syscall.ioprio_set(name:string,which:long,who:long,ioprio:long,argstr:string)
+syscall.kexec_load(name:string,entry:long,nr_segments:long,segments_uaddr:long,flags:long,argstr:string)
+syscall.keyctl(name:string,argstr:string)
+syscall.kill(name:string,pid:long,sig:long,argstr:string)
+syscall.lchown(name:string,path:string,owner:long,group:long,argstr:string)
+syscall.lchown16(name:string,path:string,owner:long,group:long,argstr:string)
+syscall.lgetxattr(name:string,path:string,name2:string,value_uaddr:long,size:long,argstr:string)
+syscall.link(name:string,oldpath:string,newpath:string,argstr:string)
+syscall.linkat(name:string,olddfd:long,olddfd_str:string,oldname:long,oldname_str:string,newdfd:long,newdfd_str:string,newname:long,newname_str:string,flags:long,flags_str:string,argstr:string)
+syscall.listen(name:string,sockfd:long,backlog:long,argstr:string)
+syscall.listxattr(name:string,list_uaddr:long,size:long,path_uaddr:long,path:string,argstr:string)
+syscall.llistxattr(name:string,list_uaddr:long,size:long,path_uaddr:long,path:string,argstr:string)
+syscall.llseek(name:string,fd:long,offset_high:long,offset_low:long,result_uaddr:long,whence:long,whence_str:string,argstr:string)
+syscall.lookup_dcookie(name:string,cookie:long,buffer_uaddr:long,len:long,argstr:string)
+syscall.lremovexattr(name:string,name_uaddr:long,name2:string,path_uaddr:long,path:string,argstr:string)
+syscall.lseek(name:string,fildes:long,offset:long,whence:long,whence_str:string,argstr:string)
+syscall.lsetxattr(name:string,path_uaddr:long,path:string,name_uaddr:long,name_str:string,value_uaddr:long,size:long,flags:long,argstr:string)
+syscall.lstat(name:string,path:string,buf_uaddr:long,argstr:string)
+syscall.madvise(name:string,start:long,length:long,advice:long,advice_str:string,argstr:string)
+syscall.mbind(name:string,start:long,len:long,mode:long,nmask_uaddr:long,maxnode:long,flags:long,argstr:string)
+syscall.migrate_pages(name:string,argstr:string)
+syscall.mincore(name:string,start:long,length:long,vec_uaddr:long,argstr:string)
+syscall.mkdir(name:string,pathname_uaddr:long,pathname:string,mode:long,argstr:string)
+syscall.mkdirat(name:string,dirfd:long,pathname:string,mode:long,argstr:string)
+syscall.mknod(name:string,pathname:string,mode:long,dev:long,argstr:string)
+syscall.mknodat(name:string,dfd:long,dfd_str:string,filename:long,filename_str:string,mode:long,mode_str:string,dev:long,argstr:string)
+syscall.mlock(name:string,addr:long,len:long,argstr:string)
+syscall.mlockall(name:string,flags:long,argstr:string)
+syscall.mmap(name:string,start:long,len:long,prot:long,flags:long,fd:long,offset:long,argstr:string)
+syscall.mmap2(name:string,argstr:string)
+syscall.mmap32(name:string,argstr:string)
+syscall.modify_ldt(name:string,func:long,ptr_uaddr:long,bytecount:long,argstr:string)
+syscall.mount(name:string,source:string,target:string,filesystemtype:string,mountflags:long,mountflags_str:string,data:string,argstr:string)
+syscall.move_pages(name:string,argstr:string)
+syscall.mprotect(name:string,addr:long,len:long,prot:long,prot_str:string,argstr:string)
+syscall.mq_getsetattr(name:string,mqdes:long,u_mqstat_uaddr:long,u_omqstat_uaddr:long,argstr:string)
+syscall.mq_notify(name:string,mqdes:long,notification_uaddr:long,argstr:string)
+syscall.mq_open(name:string,name_uaddr:long,filename:string,mode:long,u_attr_uaddr:long,oflag:long,argstr:string)
+syscall.mq_timedreceive(name:string,mqdes:long,msg_ptr_uaddr:long,msg_len:long,msg_prio_uaddr:long,abs_timout_uaddr:long,argstr:string)
+syscall.mq_timedsend(name:string,mqdes:long,msg_ptr_uaddr:long,msg_len:long,msg_prio:long,abs_timeout_uaddr:long,argstr:string)
+syscall.mq_unlink(name:string,u_name_uaddr:long,u_name:string,argstr:string)
+syscall.mremap(name:string,old_address:long,old_size:long,new_size:long,flags:long,new_address:long,argstr:string)
+syscall.msgctl(name:string,msqid:long,cmd:long,buf_uaddr:long,argstr:string)
+syscall.msgget(name:string,key:long,msgflg:long,msgflg_str:string,argstr:string)
+syscall.msgrcv(name:string,msqid:long,msgp_uaddr:long,msgsz:long,msgtyp:long,msgflg:long,argstr:string)
+syscall.msgsnd(name:string,msqid:long,msgp_uaddr:long,msgsz:long,msgflg:long,argstr:string)
+syscall.msync(name:string,start:long,length:long,flags:long,argstr:string)
+syscall.munlock(name:string,addr:long,len:long,argstr:string)
+syscall.munlockall(name:string,argstr:string)
+syscall.munmap(name:string,start:long,length:long,argstr:string)
+syscall.nanosleep(name:string,req_uaddr:long,rem_uaddr:long,argstr:string)
+syscall.nfsservctl(name:string,cmd:long,argp_uaddr:long,resp_uaddr:long,argstr:string)
+syscall.ni_syscall(name:string,argstr:string)
+syscall.nice(name:string,inc:long,argstr:string)
+syscall.open(name:string,filename:string,flags:long,mode:long,argstr:string)
+syscall.openat(name:string,filename:string,flags:long,mode:long,argstr:string)
+syscall.pause(name:string,argstr:string)
+syscall.personality(name:string,persona:long,argstr:string)
+syscall.pipe(name:string,argstr:string)
+syscall.pipe32(name:string,argstr:string)
+syscall.pivot_root(name:string,new_root_str:string,old_root_str:string,argstr:string)
+syscall.poll(name:string,ufds_uaddr:long,nfds:long,timeout:long,argstr:string)
+syscall.ppoll(name:string,argstr:string)
+syscall.prctl(name:string,option:long,arg2:long,arg3:long,arg4:long,arg5:long,argstr:string)
+syscall.pread(name:string,fd:long,buf_uaddr:long,count:long,offset:long,argstr:string)
+syscall.pselect6(name:string,argstr:string)
+syscall.pselect7(name:string,argstr:string)
+syscall.ptrace(name:string,request:long,pid:long,addr:long,data:long,argstr:string)
+syscall.pwrite(name:string,fd:long,buf_uaddr:long,count:long,offset:long,argstr:string)
+syscall.quotactl(name:string,cmd:long,cmd_str:string,special:long,special_str:string,id:long,addr_uaddr:long,argstr:string)
+syscall.read(name:string,fd:long,buf_uaddr:long,count:long,argstr:string)
+syscall.readahead(name:string,fd:long,offset:long,count:long,argstr:string)
+syscall.readdir(name:string,argstr:string)
+syscall.readlink(name:string,path:string,buf_uaddr:long,bufsiz:long,argstr:string)
+syscall.readlinkat(name:string,dfd:long,buf_uaddr:long,bufsiz:long,path:string,argstr:string)
+syscall.readv(name:string,vector_uaddr:long,count:long,fd:long,argstr:string)
+syscall.reboot(name:string,magic:long,magic_str:string,magic2:long,magic2_str:string,flag:long,flag_str:string,arg_uaddr:long,argstr:string)
+syscall.recv(name:string,s:long,buf_uaddr:long,len:long,flags:long,flags_str:string,argstr:string)
+syscall.recvfrom(name:string,s:long,buf_uaddr:long,len:long,flags:long,flags_str:string,addr_uaddr:long,addrlen_uaddr:long,argstr:string)
+syscall.recvmsg(name:string,s:long,msg_uaddr:long,flags:long,flags_str:string,argstr:string)
+syscall.remap_file_pages(name:string,start:long,size:long,prot:long,pgoff:long,flags:long,argstr:string)
+syscall.removexattr(name:string,name_str:string,path:string,argstr:string)
+syscall.rename(name:string,oldpath:string,newpath:string,argstr:string)
+syscall.renameat(name:string,olddfd:long,olddfd_str:string,oldname:long,oldname_str:string,newdfd:long,newdfd_str:string,newname:long,newname_str:string,argstr:string)
+syscall.request_key(name:string,type_uaddr:long,description_uaddr:long,callout_info_uaddr:long,destringid:long,argstr:string)
+syscall.restart_syscall(name:string,argstr:string)
+syscall.rmdir(name:string,pathname:string,argstr:string)
+syscall.rt_sigaction(name:string,sig:long,act_uaddr:long,oact_uaddr:long,sigsetsize:long,argstr:string)
+syscall.rt_sigaction32(name:string,sig:long,act_uaddr:long,oact_uaddr:long,sigsetsize:long,argstr:string)
+syscall.rt_sigpending(name:string,set_uaddr:long,sigsetsize:long,argstr:string)
+syscall.rt_sigprocmask(name:string,how:long,how_str:string,set_uaddr:long,oldset_uaddr:long,argstr:string)
+syscall.rt_sigqueueinfo(name:string,pid:long,sig:long,uinfo_uaddr:long,argstr:string)
+syscall.rt_sigreturn(name:string,argstr:string)
+syscall.rt_sigsuspend(name:string,argstr:string)
+syscall.rt_sigtimedwait(name:string,uthese_uaddr:long,uinfo_uaddr:long,uts_uaddr:long,sigsetsize:long,argstr:string)
+syscall.sched_get_priority_max(name:string,policy:long,argstr:string)
+syscall.sched_get_priority_min(name:string,policy:long,argstr:string)
+syscall.sched_getaffinity(name:string,pid:long,len:long,mask_uaddr:long,argstr:string)
+syscall.sched_getparam(name:string,pid:long,p_uaddr:long,argstr:string)
+syscall.sched_getscheduler(name:string,pid:long,argstr:string)
+syscall.sched_rr_get_interval(name:string,pid:long,tp_uaddr:long,argstr:string)
+syscall.sched_setaffinity(name:string,pid:long,len:long,mask_uaddr:long,argstr:string)
+syscall.sched_setparam(name:string,pid:long,p_uaddr:long,argstr:string)
+syscall.sched_setscheduler(name:string,pid:long,policy:long,policy_str:string,p_uaddr:long,argstr:string)
+syscall.sched_yield(name:string,argstr:string)
+syscall.select(name:string,n:long,readfds_uaddr:long,writefds_uaddr:long,exceptfds_uaddr:long,timeout_uaddr:long,argstr:string)
+syscall.semctl(name:string,semid:long,semnum:long,cmd:long,argstr:string)
+syscall.semget(name:string,key:long,nsems:long,semflg:long,argstr:string)
+syscall.semop(name:string,semid:long,tsops_uaddr:long,nsops:long,argstr:string)
+syscall.semtimedop(name:string,semid:long,sops_uaddr:long,nsops:long,timeout_uaddr:long,argstr:string)
+syscall.send(name:string,s:long,buf_uaddr:long,len:long,flags:long,flags_str:string,argstr:string)
+syscall.sendfile(name:string,out_fd:long,in_fd:long,offset_uaddr:long,count:long,argstr:string)
+syscall.sendmsg(name:string,s:long,msg_uaddr:long,flags:long,flags_str:string,argstr:string)
+syscall.sendto(name:string,s:long,buf_uaddr:long,len:long,flags:long,flags_str:string,to_uaddr:long,tolen:long,argstr:string)
+syscall.set_mempolicy(name:string,mode:long,nmask_uaddr:long,maxnode:long,argstr:string)
+syscall.set_tid_address(name:string,tidptr_uaddr:long,argstr:string)
+syscall.setdomainname(name:string,hostname_uaddr:long,len:long,argstr:string)
+syscall.setfsgid(name:string,fsgid:long,argstr:string)
+syscall.setfsuid(name:string,fsuid:long,argstr:string)
+syscall.setgid(name:string,gid:long,argstr:string)
+syscall.setgroups(name:string,size:long,list_uaddr:long,argstr:string)
+syscall.sethostname(name:string,hostname_uaddr:long,name_str:string,len:long,argstr:string)
+syscall.setitimer(name:string,which:long,value_uaddr:long,ovalue_uaddr:long,argstr:string)
+syscall.setpgid(name:string,pid:long,pgid:long,argstr:string)
+syscall.setpriority(name:string,which:long,which_str:string,who:long,prio:long,argstr:string)
+syscall.setregid(name:string,rgid:long,egid:long,argstr:string)
+syscall.setregid16(name:string,rgid:long,egid:long,argstr:string)
+syscall.setresgid(name:string,rgid:long,egid:long,sgid:long,argstr:string)
+syscall.setresgid16(name:string,rgid:long,egid:long,sgid:long,argstr:string)
+syscall.setresuid(name:string,ruid:long,euid:long,suid:long,argstr:string)
+syscall.setresuid16(name:string,ruid:long,euid:long,suid:long,argstr:string)
+syscall.setreuid(name:string,ruid:long,euid:long,argstr:string)
+syscall.setreuid16(name:string,ruid:long,euid:long,argstr:string)
+syscall.setrlimit(name:string,resource:long,rlim_uaddr:long,argstr:string)
+syscall.setsid(name:string,argstr:string)
+syscall.setsockopt(name:string,fd:long,level:long,level_str:string,optname:long,optname_str:string,optval_uaddr:long,optlen:long,argstr:string)
+syscall.settimeofday(name:string,tv_uaddr:long,tz_uaddr:long,argstr:string)
+syscall.settimeofday32(name:string,tv_uaddr:long,tz_uaddr:long,argstr:string)
+syscall.setuid(name:string,uid:long,argstr:string)
+syscall.setxattr(name:string,path_uaddr:long,path:string,name_uaddr:long,name_str:string,value_uaddr:long,size:long,flags:long,argstr:string)
+syscall.sgetmask(name:string,argstr:string)
+syscall.shmat(name:string,shmid:long,shmaddr_uaddr:long,shmflg:long,argstr:string)
+syscall.shmctl(name:string,shmid:long,cmd:long,buf_uaddr:long,argstr:string)
+syscall.shmdt(name:string,shmaddr_uaddr:long,argstr:string)
+syscall.shmget(name:string,key:long,size:long,shmflg:long,argstr:string)
+syscall.shutdown(name:string,s:long,how:long,how_str:string,argstr:string)
+syscall.sigaction32(name:string,sig:long,act_uaddr:long,oact_uaddr:long,argstr:string)
+syscall.sigaltstack(name:string,uss_uaddr:long,uoss_uaddr:long,regs_uaddr:long,argstr:string)
+syscall.signal(name:string,sig:long,handler:long,argstr:string)
+syscall.signalfd(name:string,argstr:string)
+syscall.sigpending(name:string,argstr:string)
+syscall.sigprocmask(name:string,how:long,how_str:string,set_uaddr:long,oldset_uaddr:long,argstr:string)
+syscall.sigreturn(name:string,argstr:string)
+syscall.sigsuspend(name:string,argstr:string)
+syscall.socket(name:string,family:long,type:long,protocol:long,argstr:string)
+syscall.socketpair(name:string,family:long,type:long,protocol:long,sv_uaddr:long,argstr:string)
+syscall.splice(name:string,argstr:string)
+syscall.ssetmask(name:string,newmask:long,argstr:string)
+syscall.stat(name:string,filename_uaddr:long,filename:string,buf_uaddr:long,argstr:string)
+syscall.statfs(name:string,buf_uaddr:long,path:string,argstr:string)
+syscall.statfs64(name:string,sz:long,buf_uaddr:long,path:string,argstr:string)
+syscall.stime(name:string,t_uaddr:long,argstr:string)
+syscall.swapoff(name:string,path:string,argstr:string)
+syscall.swapon(name:string,path:string,swapflags:long,argstr:string)
+syscall.symlink(name:string,oldpath:string,newpath:string,argstr:string)
+syscall.symlinkat(name:string,oldname:long,oldname_str:string,newdfd:long,newdfd_str:string,newname:long,newname_str:string,argstr:string)
+syscall.sync(name:string,argstr:string)
+syscall.sysctl(name:string,argstr:string)
+syscall.sysctl32(name:string,argstr:string)
+syscall.sysfs(name:string,option:long,arg1:long,arg2:long,argstr:string)
+syscall.sysinfo(name:string,info_uaddr:long,argstr:string)
+syscall.syslog(name:string,type:long,bufp_uaddr:long,len:long,argstr:string)
+syscall.tee(name:string,argstr:string)
+syscall.tgkill(name:string,tgid:long,pid:long,sig:long,argstr:string)
+syscall.time(name:string,t_uaddr:long,argstr:string)
+syscall.timer_create(name:string,clockid:long,clockid_str:string,evp_uaddr:long,timerid_uaddr:long,argstr:string)
+syscall.timer_delete(name:string,timerid:long,argstr:string)
+syscall.timer_getoverrun(name:string,timerid:long,argstr:string)
+syscall.timer_gettime(name:string,timerid:long,value_uaddr:long,argstr:string)
+syscall.timer_settime(name:string,timerid:long,flags:long,value_uaddr:long,ovalue_uaddr:long,argstr:string)
+syscall.times(name:string,argstr:string)
+syscall.tkill(name:string,pid:long,sig:long,argstr:string)
+syscall.truncate(name:string,path_uaddr:long,path:string,length:long,argstr:string)
+syscall.umask(name:string,mask:long,argstr:string)
+syscall.umount(name:string,target:string,flags:long,flags_str:string,argstr:string)
+syscall.uname(name:string,argstr:string)
+syscall.unlink(name:string,pathname_uaddr:long,pathname:string,argstr:string)
+syscall.unlinkat(name:string,dfd:long,dfd_str:string,pathname:long,pathname_str:string,flag:long,flag_str:string,argstr:string)
+syscall.unshare(name:string,unshare_flags:long,argstr:string)
+syscall.uselib(name:string,library_uaddr:long,library:string,argstr:string)
+syscall.ustat(name:string,dev:long,ubuf_uaddr:long,argstr:string)
+syscall.ustat32(name:string,dev:long,argstr:string)
+syscall.utime(name:string,filename_uaddr:long,filename:string,buf_uaddr:long,actime:long,modtime:long,argstr:string)
+syscall.utimensat(name:string,argstr:string)
+syscall.utimes(name:string,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
+syscall.vhangup(name:string,argstr:string)
+syscall.vm86_warning(name:string)
+syscall.vmsplice(name:string,argstr:string)
+syscall.wait4(name:string,pid:long,status_uaddr:long,options:long,options_str:string,rusage_uaddr:long,argstr:string)
+syscall.waitid(name:string,pid:long,which:long,which_str:string,infop_uaddr:long,options:long,options_str:string,rusage_uaddr:long,argstr:string)
+syscall.write(name:string,fd:long,buf_uaddr:long,count:long,argstr:string)
+syscall.writev(name:string,vector_uaddr:long,count:long,fd:long,argstr:string)
+signal.check_ignored(sig_pid:long,pid_name:string,sig:long,sig_name:string)
+signal.checkperm(sig:long,task:long,sinfo:long,name:string,sig_name:string,sig_pid:long,pid_name:string,si_code:string)
+signal.do_action(sig:long,sigact_addr:long,oldsigact_addr:long,sa_handler:long,sa_mask:long)
+signal.flush(task:long,sig_pid:long,pid_name:string)
+signal.force_segv(sig_pid:long,pid_name:string,sig:long,sig_name:string)
+signal.handle(sig:unknown,sig_name:string,sinfo:long,sig_code:long,ka_addr:unknown,oldset_addr:unknown,regs:unknown,sig_mode:string)
+signal.pending(sigset_add:long,sigset_size:long)
+signal.procmask(how:long,sigset_addr:long,oldsigset_addr:long,sigset:long)
+signal.send(name:string,sig:long,task:long,sinfo:long,shared:long,send2queue:long,sig_name:string,sig_pid:long,pid_name:string,si_code:string)
+signal.send_sig_queue(sig:long,sig_name:string,sig_pid:long,pid_name:string,sigqueue_addr:long)
+signal.syskill(name:string,pid:long,sig:long,argstr:string,sig_name:string)
+signal.systgkill(name:string,tgid:long,pid:long,sig:long,argstr:string,sig_name:string)
+signal.systkill(name:string,pid:long,sig:long,argstr:string,sig_name:string)
+signal.wakeup(sig_pid:long,pid_name:string,resume:long,state_mask:string)
+begin(-1))
+netdev.receive(dev_name:string,length:long,protocol:long,truesize:long)
+netdev.transmit(dev_name:string,length:long,protocol:long,truesize:long)
+ioblock.end(devname:string,ino:long,bytes_done:long,error:long,sector:long,flags:long,rw:long,vcnt:long,idx:long,phys_segments:long,hw_segments:long,size:long)
+ioblock.request(devname:string,ino:long,sector:long,flags:long,rw:long,vcnt:long,idx:long,phys_segments:long,hw_segments:long,size:long,bdev:long,bdev_contains:long,p_start_sect:long)
+ioscheduler.elv_add_request(elevator_name:string,disk_major:long,disk_minor:long,req:long,req_flags:long)
+ioscheduler.elv_completed_request(elevator_name:string,disk_major:long,disk_minor:long,req:long,req_flags:long)
+ioscheduler.elv_next_request(elevator_name:string)
+nd_syscall.accept(name:string,sockfd:long,addr_uaddr:long,addrlen_uaddr:long,argstr:string)
+nd_syscall.access(name:string,pathname:string,mode:long,mode_str:string,argstr:string)
+nd_syscall.acct(name:string,filename:string,argstr:string)
+nd_syscall.add_key(name:string,type_uaddr:long,description_uaddr:long,payload_uaddr:long,plen:long,ringid:long,argstr:string)
+nd_syscall.adjtimex(name:string,argstr:string)
+nd_syscall.alarm(name:string,seconds:long,argstr:string)
+nd_syscall.bdflush(name:string,func:long,data:long,data_str:string,argstr:string)
+nd_syscall.bind(name:string,sockfd:long,my_addr_uaddr:long,addrlen:long,argstr:string)
+nd_syscall.brk(name:string,brk:long,argstr:string)
+nd_syscall.capget(name:string,header_uaddr:long,data_uaddr:long,argstr:string)
+nd_syscall.capset(name:string,header_uaddr:long,data_uaddr:long,argstr:string)
+nd_syscall.chdir(name:string,path:string,argstr:string)
+nd_syscall.chmod(name:string,path:string,mode:long,argstr:string)
+nd_syscall.chown(name:string,path:string,owner:long,group:long,argstr:string)
+nd_syscall.chown16(name:string,path:string,owner:long,group:long,argstr:string)
+nd_syscall.chroot(name:string,path:string,argstr:string)
+nd_syscall.clock_getres(name:string,clk_id:long,clk_id_str:string,res_uaddr:long,argstr:string)
+nd_syscall.clock_gettime(name:string,clk_id:long,clk_id_str:string,argstr:string)
+nd_syscall.clock_nanosleep(name:string,flags:long,flag_str:string,argstr:string)
+nd_syscall.clock_settime(name:string,clk_id:long,clk_id_str:string,tp_uaddr:long,argstr:string)
+nd_syscall.close(name:string,fd:long,argstr:string)
+nd_syscall.compat_adjtimex(name:string,argstr:string)
+nd_syscall.compat_clock_nanosleep(name:string,flags:long,flag_str:string,argstr:string)
+nd_syscall.compat_execve(name:string,filename:string,args:string,argstr:string)
+nd_syscall.compat_futex(name:string,futex_uaddr:long,op:long,val:long,utime_uaddr:long,uaddr2_uaddr:long,val3:long,argstr:string)
+nd_syscall.compat_futimesat(name:string,dirfd:long,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
+nd_syscall.compat_getitimer(name:string,which:long,value_uaddr:long,argstr:string)
+nd_syscall.compat_io_setup(name:string,maxevents:long,ctxp_uaddr:long,argstr:string)
+nd_syscall.compat_io_submit(name:string,ctx_id:long,nr:long,iocbpp_uaddr:long,argstr:string)
+nd_syscall.compat_sys_msgctl(name:string,argstr:string)
+nd_syscall.compat_sys_msgrcv(name:string,argstr:string)
+nd_syscall.compat_sys_msgsnd(name:string,argstr:string)
+nd_syscall.connect(name:string,sockfd:long,serv_addr_uaddr:long,addrlen:long,argstr:string)
+nd_syscall.creat(name:string,mode:long,pathname:string,argstr:string)
+nd_syscall.delete_module(name:string,name_user:string,flags:long,argstr:string)
+nd_syscall.dup(name:string,old_fd:long,argstr:string)
+nd_syscall.dup2(name:string,oldfd:long,newfd:long,argstr:string)
+nd_syscall.epoll_create(name:string,size:long,argstr:string)
+nd_syscall.epoll_ctl(name:string,epfd:long,op:long,op_str:string,fd:long,event_uaddr:long,argstr:string)
+nd_syscall.epoll_pwait(name:string,argstr:string)
+nd_syscall.epoll_wait(name:string,epfd:long,events_uaddr:long,maxevents:long,timeout:long,argstr:string)
+nd_syscall.eventfd(name:string,argstr:string)
+nd_syscall.execve(name:string,filename:string,args:string,argstr:string)
+nd_syscall.exit(name:string,status:long,argstr:string)
+nd_syscall.exit_group(name:string,status:long,argstr:string)
+nd_syscall.fadvise64(name:string,fs:long,offset:long,len:long,advice:long,argstr:string)
+nd_syscall.fadvise64_64(name:string,fs:long,offset:long,len:long,advice:long,argstr:string)
+nd_syscall.fchdir(name:string,fd:long,argstr:string)
+nd_syscall.fchmod(name:string,fildes:long,mode:long,argstr:string)
+nd_syscall.fchown(name:string,fd:long,owner:long,group:long,argstr:string)
+nd_syscall.fchown16(name:string,fd:long,owner:long,group:long,argstr:string)
+nd_syscall.fcntl(name:string,fd:long,cmd:long,cmd_str:string,arg:long,argstr:string)
+nd_syscall.fdatasync(name:string,fd:long,argstr:string)
+nd_syscall.fgetxattr(name:string,filedes:long,name2:string,value_uaddr:long,size:long,argstr:string)
+nd_syscall.flistxattr(name:string,filedes:long,list_uaddr:long,size:long,argstr:string)
+nd_syscall.flock(name:string,fd:long,operation:long,argstr:string)
+nd_syscall.fork(clone_flags:long,stack_start:long,regs:long,stack_size:long,parent_tid_uaddr:long,child_tid_uaddr:long,name:string,argstr:string)
+nd_syscall.fremovexattr(name:string,filedes:long,name_uaddr:long,argstr:string)
+nd_syscall.fsetxattr(name:string,filedes:long,name2:string,value_uaddr:long,size:long,flags:long,argstr:string)
+nd_syscall.fstat(name:string,filedes:long,buf_uaddr:long,argstr:string)
+nd_syscall.fstatat(name:string,dirfd:long,path:string,buf_uaddr:long,argstr:string)
+nd_syscall.fstatfs(name:string,fd:long,buf_uaddr:long,argstr:string)
+nd_syscall.fstatfs64(name:string,fd:long,sz:long,buf_uaddr:long,argstr:string)
+nd_syscall.fsync(name:string,fd:long,argstr:string)
+nd_syscall.ftruncate(name:string,fd:long,length:long,argstr:string)
+nd_syscall.futex(name:string,futex_uaddr:long,op:long,val:long,utime_uaddr:long,uaddr2_uaddr:long,val3:long,argstr:string)
+nd_syscall.futimesat(name:string,dirfd:long,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
+nd_syscall.get_mempolicy(name:string,policy_uaddr:long,nmask_uaddr:long,maxnode:long,addr:long,flags:long,argstr:string)
+nd_syscall.getcwd(name:string,buf_uaddr:long,size:long,argstr:string)
+nd_syscall.getdents(name:string,fd:long,dirp_uaddr:long,count:long,argstr:string)
+nd_syscall.getegid(name:string,argstr:string)
+nd_syscall.geteuid(name:string,argstr:string)
+nd_syscall.getgid(name:string,argstr:string)
+nd_syscall.getgroups(name:string,size:long,list_uaddr:long,argstr:string)
+nd_syscall.gethostname(name:string,name_uaddr:long,len:long,argstr:string)
+nd_syscall.getitimer(name:string,which:long,value_uaddr:long,argstr:string)
+nd_syscall.getpeername(name:string,s:long,name_uaddr:long,namelen_uaddr:long,argstr:string)
+nd_syscall.getpgid(name:string,pid:long,argstr:string)
+nd_syscall.getpgrp(name:string,argstr:string)
+nd_syscall.getpid(name:string,argstr:string)
+nd_syscall.getppid(name:string,argstr:string)
+nd_syscall.getpriority(name:string,which:long,who:long,argstr:string)
+nd_syscall.getresgid(name:string,rgid_uaddr:long,egid_uaddr:long,sgid_uaddr:long,argstr:string)
+nd_syscall.getresuid(name:string,ruid_uaddr:long,euid_uaddr:long,suid_uaddr:long,argstr:string)
+nd_syscall.getrlimit(name:string,resource:long,rlim_uaddr:long,argstr:string)
+nd_syscall.getrusage(name:string,who:long,who_str:string,usage_uaddr:long,argstr:string)
+nd_syscall.getsid(name:string,pid:long,argstr:string)
+nd_syscall.getsockname(name:string,s:long,name_uaddr:long,namelen_uaddr:long,argstr:string)
+nd_syscall.getsockopt(name:string,fd:long,level:long,level_str:string,optname:long,optname_str:string,optval_uaddr:long,optlen_uaddr:long,argstr:string)
+nd_syscall.gettid(name:string,argstr:string)
+nd_syscall.gettimeofday(name:string,tv_uaddr:long,tz_uaddr:long,argstr:string)
+nd_syscall.getuid(name:string,argstr:string)
+nd_syscall.getxattr(name:string,path:string,name2:string,value_uaddr:long,size:long,argstr:string)
+nd_syscall.init_module(name:string,umod_uaddr:long,len:long,uargs:string,argstr:string)
+nd_syscall.inotify_add_watch(name:string,fd:long,path_uaddr:long,path:string,mask:long,argstr:string)
+nd_syscall.inotify_init(name:string,argstr:string)
+nd_syscall.inotify_rm_watch(name:string,fd:long,wd:long,argstr:string)
+nd_syscall.io_cancel(name:string,ctx_id:long,iocb_uaddr:long,result_uaddr:long,argstr:string)
+nd_syscall.io_destroy(name:string,ctx:long,argstr:string)
+nd_syscall.io_getevents(name:string,ctx_id:long,min_nr:long,nr:long,events_uaddr:long,timeout_uaddr:long,timestr:string,argstr:string)
+nd_syscall.io_setup(name:string,maxevents:long,ctxp_uaddr:long,argstr:string)
+nd_syscall.io_submit(name:string,ctx_id:long,nr:long,iocbpp_uaddr:long,argstr:string)
+nd_syscall.ioctl(name:string,fd:long,request:long,argp:long,argstr:string)
+nd_syscall.ioperm(name:string,from:long,num:long,turn_on:long,argstr:string)
+nd_syscall.ioprio_get(name:string,which:long,who:long,argstr:string)
+nd_syscall.ioprio_set(name:string,which:long,who:long,ioprio:long,argstr:string)
+nd_syscall.kexec_load(name:string,entry:long,nr_segments:long,segments_uaddr:long,flags:long,argstr:string)
+nd_syscall.keyctl(name:string,argstr:string)
+nd_syscall.kill(name:string,pid:long,sig:long,argstr:string)
+nd_syscall.lchown(name:string,path:string,owner:long,group:long,argstr:string)
+nd_syscall.lchown16(name:string,path:string,owner:long,group:long,argstr:string)
+nd_syscall.lgetxattr(name:string,path:string,name2:string,value_uaddr:long,size:long,argstr:string)
+nd_syscall.link(name:string,oldpath:string,newpath:string,argstr:string)
+nd_syscall.listen(name:string,sockfd:long,backlog:long,argstr:string)
+nd_syscall.listxattr(name:string,path_uaddr:long,path:string,list_uaddr:long,size:long,argstr:string)
+nd_syscall.llistxattr(name:string,path_uaddr:long,path:string,list_uaddr:long,size:long,argstr:string)
+nd_syscall.llseek(name:string,fd:long,offset_high:long,offset_low:long,result_uaddr:long,whence:long,whence_str:string,argstr:string)
+nd_syscall.lookup_dcookie(name:string,cookie:long,buffer_uaddr:long,len:long,argstr:string)
+nd_syscall.lremovexattr(name:string,path_uaddr:long,path:string,name_uaddr:long,name2:string,argstr:string)
+nd_syscall.lseek(name:string,fildes:long,offset:long,whence:long,whence_str:string,argstr:string)
+nd_syscall.lsetxattr(name:string,path_uaddr:long,path:string,name_uaddr:long,name_str:string,value_uaddr:long,size:long,flags:long,argstr:string)
+nd_syscall.lstat(name:string,path:string,buf_uaddr:long,argstr:string)
+nd_syscall.madvise(name:string,start:long,length:long,advice:long,advice_str:string,argstr:string)
+nd_syscall.mbind(name:string,start:long,len:long,mode:long,nmask_uaddr:long,maxnode:long,flags:long,argstr:string)
+nd_syscall.migrate_pages(name:string,argstr:string)
+nd_syscall.mincore(name:string,start:long,length:long,vec_uaddr:long,argstr:string)
+nd_syscall.mkdir(name:string,pathname_uaddr:long,pathname:string,mode:long,argstr:string)
+nd_syscall.mkdirat(name:string,dirfd:long,pathname:string,mode:long,argstr:string)
+nd_syscall.mknod(name:string,pathname:string,mode:long,dev:long,argstr:string)
+nd_syscall.mlock(name:string,addr:long,len:long,argstr:string)
+nd_syscall.mlockall(name:string,flags:long,argstr:string)
+nd_syscall.modify_ldt(name:string,func:long,ptr_uaddr:long,bytecount:long,argstr:string)
+nd_syscall.mount(name:string,source:string,target:string,filesystemtype:string,mountflags:long,mountflags_str:string,data:string,argstr:string)
+nd_syscall.move_pages(name:string,argstr:string)
+nd_syscall.mprotect(name:string,addr:long,len:long,prot:long,prot_str:string,argstr:string)
+nd_syscall.mq_getsetattr(name:string,mqdes:long,u_mqstat_uaddr:long,u_omqstat_uaddr:long,argstr:string)
+nd_syscall.mq_notify(name:string,mqdes:long,notification_uaddr:long,argstr:string)
+nd_syscall.mq_open(name:string,name_uaddr:long,filename:string,mode:long,u_attr_uaddr:long,oflag:long,argstr:string)
+nd_syscall.mq_timedreceive(name:string,mqdes:long,msg_ptr_uaddr:long,msg_len:long,msg_prio_uaddr:long,abs_timout_uaddr:long,argstr:string)
+nd_syscall.mq_timedsend(name:string,mqdes:long,msg_ptr_uaddr:long,msg_len:long,msg_prio:long,abs_timeout_uaddr:long,argstr:string)
+nd_syscall.mq_unlink(name:string,u_name_uaddr:long,u_name:string,argstr:string)
+nd_syscall.mremap(name:string,old_address:long,old_size:long,new_size:long,flags:long,new_address:long,argstr:string)
+nd_syscall.msgctl(name:string,msqid:long,cmd:long,buf_uaddr:long,argstr:string)
+nd_syscall.msgget(name:string,key:long,msgflg:long,msgflg_str:string,argstr:string)
+nd_syscall.msgrcv(name:string,msqid:long,msgp_uaddr:long,msgsz:long,msgtyp:long,msgflg:long,argstr:string)
+nd_syscall.msgsnd(name:string,msqid:long,msgp_uaddr:long,msgsz:long,msgflg:long,argstr:string)
+nd_syscall.msync(name:string,start:long,length:long,flags:long,argstr:string)
+nd_syscall.munlock(name:string,addr:long,len:long,argstr:string)
+nd_syscall.munlockall(name:string,argstr:string)
+nd_syscall.munmap(name:string,start:long,length:long,argstr:string)
+vm.brk(address:long,length:long)
+vm.mmap(address:unknown,length:unknown)
+vm.munmap(address:long,length:long)
+vm.oom_kill(task:long)
+vm.pagefault(write_access:long,address:long)
+vm.write_shared(address:long)
+nfsd.close(filename:string,name:string,argstr:string)
+nfsd.commit(fh:string,count:long,offset:long,flag:long,name:string,argstr:string,size:long,units:string)
+nfsd.create(fh:string,filelen:long,filename:string,type:long,iap_valid:long,iap_mode:long,name:string,argstr:string)
+nfsd.createv3(fh:string,filelen:long,filename:string,iap_valid:long,iap_mode:long,truncp:long,verfier:long,createmode:long,name:string,argstr:string)
+nfsd.dispatch(client_ip:long,proto:long,version:long,xid:long,prog:long,proc:long,name:string,argstr:string)
+nfsd.entries(fh:string,access:long,type:long,name:string,argstr:string)
+nfsd.lookup(fh:string,filelen:long,filename:string,name:string,argstr:string)
+nfsd.open(fh:string,access:long,type:long,name:string,argstr:string)
+nfsd.read(fh:string,file:long,count:long,offset:long,vec:long,vlen:long,name:string,argstr:string,size:long,units:string)
+nfsd.rename(fh:string,tfh:string,filelen:long,filename:string,tlen:long,tname:string,name:string,argstr:string)
+nfsd.return(name:string,retstr:string)
+nfsd.unlink(fh:string,filelen:long,filename:string,type:long,name:string,argstr:string)
+nfsd.write(fh:string,file:long,count:long,offset:long,vec:long,vlen:long,name:string,argstr:string,size:long,units:string)
+process.begin)
+process.create(task:long,new_pid:long)
+process.end)
+process.exec(filename:string)
+process.exec_complete(errno:long,success:long)
+process.exit(code:long)
+process.release(task:long,pid:long)
+process.start)
+process.syscall)
+sunrpc.entry(name:string,progname:string,prog:long,vers:long,authflavor:long,servername:string,prot:long,port:long,argstr:string)
+sunrpc.return(name:string,retstr:string)
+scheduler.balance)
+scheduler.cpu_off(task_prev:unknown,task_next:unknown,idle:long)
+scheduler.cpu_on(task_prev:long,idle:long)
+scheduler.ctxswitch(prev_pid:unknown,next_pid:unknown,prev_task:unknown,next_task:unknown,prevtsk_state:unknown)
+scheduler.migrate(task:long,cpu_from:long,cpu_to:long)
+scheduler.tick(idle:long)
+scsi.iocompleted(host_no:long,channel:long,lun:long,dev_id:long,device_state:long,data_direction:long,req_addr:long,goodbytes:long)
+scsi.iodispatching(host_no:long,channel:long,lun:long,dev_id:long,device_state:long,data_direction:long,request_buffer:long,request_bufflen:long,req_addr:long)
+scsi.iodone(host_no:long,channel:long,lun:long,dev_id:long,device_state:long,data_direction:long,req_addr:long,scsi_timer_pending:long)
+scsi.ioentry(disk_major:long,disk_minor:long,device_state:long,req_addr:long)
+socket.aio_read(name:string,_sock:long,size:long,protocol:long,family:long,state:long,flags:long,type:long)
+socket.aio_write(name:string,_sock:long,size:long,protocol:long,family:long,state:long,flags:long,type:long)
+socket.close(name:string,protocol:long,family:long,state:long,flags:long,type:long)
+socket.create(name:string,protocol:long,family:long,type:long,requester:long)
+socket.receive(_dwarf_tvar_tid:long,_dwarf_tvar_sock_16_tmp:long,_dwarf_tvar_sock_17_tmp:long,_dwarf_tvar_sock_18_tmp:long,_dwarf_tvar_sock_19_tmp:long,_dwarf_tvar_sock_20_tmp:long,name:string,size:long,protocol:long,family:long,state:long,flags:long,type:long,success:long)
+socket.recvmsg(name:string,size:long,protocol:long,family:long,state:long,flags:long,type:long)
+socket.send(_dwarf_tvar_tid:long,_dwarf_tvar_sock_32_tmp:long,_dwarf_tvar_sock_33_tmp:long,_dwarf_tvar_sock_34_tmp:long,_dwarf_tvar_sock_35_tmp:long,_dwarf_tvar_sock_36_tmp:long,name:string,size:long,protocol:long,family:long,state:long,flags:long,type:long,success:long)
+socket.sendmsg(name:string,size:long,protocol:long,family:long,state:long,flags:long,type:long)
+kernel.function("sock_recvmsg@net/socket.c:649")(_dwarf_tvar_tid:long)
+kernel.function("sock_aio_read@net/socket.c:750")(_dwarf_tvar_tid:long)
+kernel.function("sock_sendmsg@net/socket.c:566")(_dwarf_tvar_tid:long)
+kernel.function("sock_aio_write@net/socket.c:792")(_dwarf_tvar_tid:long)
+begin(-1001)(num:long)
+end(idx0:string)
+tcp.disconnect(name:string,sock:long,flags:long)
+tcp.recvmsg(name:string,sock:long,size:long)
+tcp.sendmsg(name:string,sock:long,size:long)
+tcp.setsockopt(name:string,sock:long,level:long,optname:long,optstr:string,optlen:long)
+udp.disconnect(name:string,sock:long,flags:long)
+udp.recvmsg(name:string,sock:long,size:long)
+udp.sendmsg(name:string,sock:long,size:long)
+generic.fop.aio_read(file:long,dev:long,devname:string,ino:long,pos:long,count:long,buf:long,name:string,argstr:string,size:long,units:string)
+generic.fop.aio_write(file:long,dev:long,devname:string,ino:long,pos:long,count:long,buf:long,name:string,argstr:string,size:long,units:string)
+generic.fop.llseek(dev:long,devname:string,ino:long,file:long,offset:long,origin:long,maxbyte:long,name:string,argstr:string)
+generic.fop.mmap(file:long,dev:long,devname:string,ino:long,vm_start:long,vm_end:long,vm_flags:long,name:string,argstr:string)
+generic.fop.open(dev:long,devname:string,ino:long,filename:string,flag:long,size:long,name:string,argstr:string)
+generic.fop.splice_read(dev:long,devname:string,ino:long,file:long,len:long,flags:long,name:string,argstr:string,size:long,units:string)
+generic.fop.splice_write(dev:long,devname:string,ino:long,file:long,len:long,flags:long,name:string,argstr:string,size:long,units:string)
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/concepts.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/concepts.html
new file mode 100644
index 0000000000..fbd0152454
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/concepts.html
@@ -0,0 +1,16 @@
+<a href="../toc.html">Table of Contents</a>
+
+<h2>
+Concepts
+</h2>
+
+This section of the IDE User Guide covers conceptual topics of the application; the major
+components, what they do, and how how you interact with them.
+
+<ol>
+<li><a href="systemtapPerspectives.html">SystemTap Perspectives</a></li>
+<li><a href="stpEditor.html">STP Editor</a></li>
+<li><a href="functionBrowser.html">Function Browser</a></li>
+<li><a href="kernelBrowser.html">Kernel Browser</a></li>
+<li><a href="probeAliasBrowser.html">Probe Alias Browser</a></li>
+</ol> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/functionBrowser.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/functionBrowser.html
new file mode 100644
index 0000000000..d71d2c99fe
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/functionBrowser.html
@@ -0,0 +1,17 @@
+<a href="../toc.html">Table of Contents</a> > <a href="concepts.html">Concepts</a>
+
+<h2>
+Function Browser
+</h2>
+
+The Funtion Browser lists all of the functions that are defined in the tapset library. Functions are grouped by the file that they are defined. Each listed function has an icon that corrisponds to its return type.
+
+<ul>
+<li><img src="images/var_str.gif"> String</li>
+<li><img src="images/var_long.gif"> Long</li>
+<li><img src="images/var_void.gif"> Void</li>
+</ul>
+
+If you double click on any function a call to that function will be added to the active editor at the current cursor location. Also if you right click on a function and click "View Definition" the tapset file where the function is defined will be opened.<br><br>
+
+<br><img src="images/Function.png"><br><br> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/Editor.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/Editor.png
new file mode 100644
index 0000000000..1c04a068f5
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/Editor.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/Function.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/Function.png
new file mode 100644
index 0000000000..a4b6cf3409
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/Function.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/KernelSource.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/KernelSource.png
new file mode 100644
index 0000000000..4fe0917b55
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/KernelSource.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/ProbeAlias.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/ProbeAlias.png
new file mode 100644
index 0000000000..5aa3836dbb
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/ProbeAlias.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_long.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_long.gif
new file mode 100644
index 0000000000..678467f2d8
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_long.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_str.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_str.gif
new file mode 100644
index 0000000000..4f4907c3d6
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_str.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_unk.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_unk.gif
new file mode 100644
index 0000000000..10abf0dfad
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_unk.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_void.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_void.gif
new file mode 100644
index 0000000000..c804bbb947
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/images/var_void.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/kernelBrowser.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/kernelBrowser.html
new file mode 100644
index 0000000000..5153a016f0
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/kernelBrowser.html
@@ -0,0 +1,9 @@
+<a href="../toc.html">Table of Contents</a> > <a href="concepts.html">Concepts</a>
+
+<h2>
+Kernel Source Browser
+</h2>
+
+The Kernel Source Browser is used to display the kernel tree. This provides you with a quick way to locate places to add probes. Any file in the Kernel Source tree can be opened by double clicking on it. This will open up the selected file in the Editor view. You can then double click on the ruler next to any line that you wish to probe. If SystemTap can probe that line a probe point will be inserted at the end of the script you were most recently working on. If the line can't be probed, an error message will be displayed.<br><br>
+
+<br><img src="images/KernelSource.png"><br><br> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/probeAliasBrowser.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/probeAliasBrowser.html
new file mode 100644
index 0000000000..34dd752fa5
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/probeAliasBrowser.html
@@ -0,0 +1,17 @@
+<a href="../toc.html">Table of Contents</a> > <a href="concepts.html">Concepts</a>
+
+<h2>
+Probe Alias Browser
+</h2>
+
+The Probe Alias Browser lists all of the probe aliases that are defined in the tapset library. Probes are grouped based on their type. In addition to the list of probes, each probe lists all of the variables that it has access to. Each variable is listed with an icon that represents its type. Types are as follows:
+
+<ul>
+<li><img src="images/var_str.gif"> String</li>
+<li><img src="images/var_long.gif"> Long</li>
+<li><img src="images/var_unk.gif"> Unknown</li>
+</ul>
+
+If you double click on any probe alias, probe point will be added to the end of the active editor. Also if you right click on a probe and click "View Definition" the tapset file where the probe is defined will be opened.<br><br>
+
+<br><img src="images/ProbeAlias.png"><br><br>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/stpEditor.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/stpEditor.html
new file mode 100644
index 0000000000..5d61d56dd9
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/stpEditor.html
@@ -0,0 +1,13 @@
+<a href="../toc.html">Table of Contents</a> > <a href="concepts.html">Concepts</a>
+
+<h2>
+STP Editor
+</h2>
+
+This editor is the most commonly used; it is used for the authoring and editing of Systemtap scripts. It is invoked when the user starts a new file or opens a file with the .stp extension. It provides syntax highlighting, code completion, and run support.<br><br>
+
+<img src="images/Editor.png"><br><br>
+
+
+See also: <a href="../reference/menus.html">IDE Perspective Menus</a>,
+<a href="../reference/exampleScripts.html">Example Scripts</a>, <a href="../reference/toolbars.html">Toolbars</a>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/systemtapPerspectives.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/systemtapPerspectives.html
new file mode 100644
index 0000000000..dedb6ff80f
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/concepts/systemtapPerspectives.html
@@ -0,0 +1,23 @@
+<a href="../toc.html">Table of Contents</a> > <a href="concepts.html">Concepts</a>
+
+<h2>
+SystemTap Perspectives
+</h2>
+
+SystemTap has three perspectives built into it, each with its own purpose.
+
+<ol>
+<li><img src="../reference/images/toolbars/ide.png"> <b>IDE Perspective</b> - This will be the primary perspective for SystemTap script writers. It contains
+the <a href="stpEditor.html">editor</a>, <a href="functionBrowser.html">Function Browser</a>,
+<a href="kernelBrowser.html">Kernel Browser</a>, <a href="probeAliasBrowser.html">Probe Alias Browser</a>,
+and <a href="../reference/viewsAndEditors.html#console">console/error log</a>. The IDE Perspective contains
+the features necessary to <a href="">run SystemTap scripts</a> and the syntax highlighting and code
+completion features to facilitate efficient development.</li>
+<li><img src="../reference/images/toolbars/graphing.png"> <b>Graphing Perspective</b> - This perspective is invoked when the user calls the Run /w Chart option.
+It defaults to showing a data table containing the script results and is capable of producing six different
+chart types: Line Graph, Multi-Line Graph, Bar Graph, Multi-Bar Graph, Scatter Graph, and Multi-Scatter
+Graph.</li>
+<li><img src="../reference/images/toolbars/dash.png"><b>Dashboard Perspective</b> - This perspective will be capable of storing meta-data related to
+each graph such as filters, aggregates, and display options in addition to showing a "dashboard" interface
+with multiple graphs updating simultaneously. It is currently still under development.</li>
+</ol> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial.html
new file mode 100644
index 0000000000..f3995f196c
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial.html
@@ -0,0 +1,15 @@
+<a href="../toc.html">Table of Contents</a> > <a href="gettingStarted.html">Getting Started</a>
+
+<h2>
+IDE Tutorial
+</h2>
+
+The IDE Perspective is a powerful portion of the SystemTap GUI that focuses on writing and editing
+SystemTap scripts. This tutorial consists of three lessons to guide first users through writing and
+running scripts and to illustrate features along the way.<br><br>
+
+<a href="IDETutorial/lesson1.html">Lesson 1: Getting Started</a><br><br>
+
+<a href="IDETutorial/lesson2.html">Lesson 2: Writing Your First Script</a><br><br>
+
+<a href="IDETutorial/lesson3.html">Lesson 3: Running Your Script</a><br><br> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/chartbox1.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/chartbox1.png
new file mode 100644
index 0000000000..0008258b2b
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/chartbox1.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/editor.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/editor.png
new file mode 100644
index 0000000000..5103ada3a4
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/editor.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/graph.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/graph.png
new file mode 100644
index 0000000000..4b1b57f3e0
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/graph.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/graphics.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/graphics.png
new file mode 100644
index 0000000000..91034b6395
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/graphics.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/newfile.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/newfile.png
new file mode 100644
index 0000000000..9b23dec081
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/newfile.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/output.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/output.png
new file mode 100644
index 0000000000..7a869a4c47
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/images/output.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/lesson1.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/lesson1.html
new file mode 100644
index 0000000000..e5b204bbae
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/lesson1.html
@@ -0,0 +1,30 @@
+<a href="../../toc.html">Table of Contents</a> > <a href="../gettingStarted.html">Getting Started</a> > <a href="../IDETutorial.html">IDE Tutorial</a>
+
+<h2>
+IDE Tutorial, Lesson One: Getting Started
+</h2>
+
+In this tutorial we will orient you with IDE Perspective and its functions. At this point we assume
+that you are able to run Systemtap GUI and are unfamiliar with how to procede. If you cannot yet start
+the application, please refer to our <a href="../installation.html">section on installation</a>.
+<b>NOTE:</b> If this is the first time opening the IDE Perspective it will take a while to load as it has to
+parse everything in the tapsets. <br><br>
+
+The IDE Perspective's purpose is to allow the user to create, view, and edit Systemtap scripts. There are
+other editors built in (plain text and the C editor), however, they ultimately exist to facilitate the
+writing of Systemtap scripts.<br><br>
+
+In this lesson we will open a new Systemtap script file to familiarize ourselves with the IDE Perspective.
+Start by opening the <u>F</u>ile menu and selecting <u>O</u>pen. A dialogue box will pop up and request the
+location of the file you want to open. We've included a folder called "examples" right in the tar ball. You
+may chose any of them to use; in this tutorial we will open top.stp. Go ahead and open the file.
+
+<br><br><img src="images/editor.png"><br><br>
+
+You'll see the file is loaded into the editor pane of Systemtap GUI. You'll also noticed different colored
+text. Systemtap GUI supports syntax highlighting for the ease of the writer. Feel free to edit the file.<br><br>
+
+At this point proceed to <a href="lesson2.html">Lesson 2</a> if you wish to learn how to write your
+own script file or <a href="lesson3.html">Lesson 3</a> if you wish to run this one.<br><br>
+
+<a href="../IDETutorial.html>Back to Tutorial Contents</a> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/lesson2.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/lesson2.html
new file mode 100644
index 0000000000..deea0b8561
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/lesson2.html
@@ -0,0 +1,70 @@
+<a href="../../toc.html">Table of Contents</a> > <a href="../gettingStarted.html">Getting Started</a> > <a href="../IDETutorial.html">IDE Tutorial</a>
+
+<h2>
+IDE Tutorial, Lesson Two: Writing Your First Script
+</h2>
+
+In this tutorial we will guide you through the process of writing your first Systemtap script. It is
+strongly recommended that you review the <a href="http://sourceware.org/systemtap/tutorial/">
+Systemtap website's tutorial</a> for up-to-date information on the latest version of Systemtap.<br><br>
+
+Start by selecting <u>F</u>ile-><u>N</u>ew. Specify a file name of your choosing, but be sure that it
+ends with an .stp extension. Click ok. Your blank script should be present in the editor pane.<br><br>
+
+<img src="images/newfile.png"><br><br>
+
+<pre>Now type/copy the following:
+
+<code>
+ global read, write, start
+
+ probe begin {
+ start = gettimeofday_s()
+ }
+ probe syscall.write {
+ write += count
+ }
+
+ probe timer.ms(1000) {
+ printf("%d\t%d\t%d\n", (gettimeofday_s()-start), read, write)
+ read=0
+ write=0
+ }
+</code></pre>
+
+Now to demonstrate the functionality of the Probe Alias browser we will have you complete the read probe
+yourself. Start by opening the syscall folder in the Probe Alias browser. If you do not have any content
+in the browser you are experiencing a problem with Systemtap installation and should refer to our
+<a href="./installation.html">installation help</a>. Ensure your cursor is located at the end of the file.
+Now scroll down and double click the read probe alias. Systemtap GUI will insert the skeleton probe at the
+point at which your cursor is at, and should look similar to the following:
+
+<pre><code>
+probe syscall.read
+{
+ /*
+ * available variables on this probe:
+ * argstr, buf_uaddr, count, fd, name
+ */
+
+}
+</code></pre>
+
+Now insert the following line into the syscall.read probe:<br>
+
+<pre><code>read += count</code></pre>
+
+You may remove the comment (/* ... */) if you wish.<br><br>
+
+This will count the number of bytes read and written each second and print it out. The begin probe executes
+first, by getting the time of day. The read and write probes increment each time the function is called. The
+timer probe prints the information every second. If you typed the script in manually you may have noticed
+that the editor provides code completion for probe aliasi. If you did not, type "syscall.". You'll see a
+box come up that you may use to select an item to complete your probe alias.<br><br>
+
+In <a href="lesson3.html">Lesson 3</a> you will learn how to run Systemtap scripts in the IDE Perspective.<br><br>
+
+<a href="../IDETutorial.html>Back to Tutorial Contents</a>
+
+
+
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/lesson3.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/lesson3.html
new file mode 100644
index 0000000000..bb628313cb
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/IDETutorial/lesson3.html
@@ -0,0 +1,59 @@
+<a href="../../toc.html">Table of Contents</a> > <a href="../gettingStarted.html">Getting Started</a> > <a href="../IDETutorial.html">IDE Tutorial</a>
+
+<h2>
+IDE Tutorial, Lesson Three: Running Your Script
+</h2>
+
+In this lesson we will cover running your script. You may use either the example script you opened in Lesson
+1 or the script you wrote in Lesson two. Select <u>R</u>un-><u>R</u>un. Enter the remote server details. You should receive output in the console
+similar to the following, which shows the reads and write per second. If you do not, please refer to
+<a href="crap.html">troubleshooting</a>.<br><br>
+
+<img src="images/output.png"><br><br>
+
+Now we will demonstrate running Systemtap scripts with graphs. In order to run the chart example you'll
+need to use the code provided in <a href="lesson2.html">Lesson 2</a>. To do this select
+<b><u>R</u>un->Run w/ <u>C</u>hart</b>. This feature will prompt the user for the number of columns for the chart, in addition to
+their titles and regular expressions. The regular expressions are used to parse the console output for
+the script and determine the values of each column at a certain sample point. The combined regular
+expression is shown at the bottom of the dialogue box.
+
+<br><img src="images/chartbox1.png"><br><br></li>
+
+For this example enter the following:<br>
+
+<pre> Columns: 3
+
+ TITLE REGULAR EXPRESSION DELIMITER
+ Time \d+ .* \D+
+ Read \d+ .* \D+
+ Write \d+ .* \D+
+</pre><br>
+
+The title fields simply display the associated string in the column's header. After clicking OK the
+script will prompt you for details regarding the Remote Server. Provide the ip address of the remote server
+that is running the systemtapgui Server or the Data Management Daemon. The port is by default 22462. Enter
+a username and password.This will give the application permissions to run your script on the remote machine.
+You have the option of saving your password as well, however be warned this is currently NOT encrypted so this
+convenience runs at a risk. The username is also used to transfer the file to the remote system using SCP. If the
+same machine is used as both the server and the client enter 'localhost' for the Host field.
+When the script is executed the application will switch into the Graphing perspective. A Data View chart is
+populated with live data, in addition to the output in the console. <br><br>
+You should see a screen similar to the following:<br><br>
+
+<img src="images/graphics.png"><br><br>
+
+You will see that the data table poplulates from live data parsed from the console. Now we'll make a
+graph to briefly illustrate the Graphing perspective. Click the Create Graph button next to bring up the
+Select Chart dialogue.Select line graph. You will be prompted to select a column of the X series and Y
+series; select "Time" and "Write" respectively. After you click ok you should see the line graph as follows:<br><br>
+
+<img src="images/graph.png"><br><br>
+
+Note that the multiple series graphs (Multi-Line, Multi-Bar, and Multi-Scatter) will request two Y series, Y1
+and Y2. In the case of our example, these would be "Read" and "Write". Each series will be assigned a different
+color value for the purposes of differentiation and will be plotted both in respect to the specified X series.<
+
+Those are the basics behind running a script in Systemtap GUI.<br><br>
+
+<a href="../IDETutorial.html>Back to Tutorial Contents</a> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/gettingStarted.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/gettingStarted.html
new file mode 100644
index 0000000000..7d2bb6b088
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/gettingstarted/gettingStarted.html
@@ -0,0 +1,22 @@
+<a href="../toc.html">Table of Contents</a>
+
+<h2>
+Getting Started
+</h2>
+
+Systemtap GUI is a tool being developed to assist in writing SystemTap scripts and viewing kernel performance.
+
+Systemtap scripts can be used to insert probes into the Linux kernel, where they can monitor various system activities and provide information back based on what is going on. The goal of the Systemtap GUI project is to provide three things. The first is an IDE to assist Systemtap scripts. Secondly, a data collection and graphical display that users can use to visually see what is happening in the kernel. Finally, a dashboard with an number of precanned scripts for users to use without having to write their own scripts.
+
+The current code drop comes with the IDE Perspective and the Graphical Perspective. Subsequent installments will include updates to these features as well as the Dashboard perspective.
+
+<ol>
+<li><a href="IDETutorial.html">IDE Tutorial</a>
+<ul>
+<li><a href="IDETutorial/lesson1.html">Lesson 1: Getting Started</a></li>
+<li><a href="IDETutorial/lesson2.html">Lesson 2: Writing Your First Script</a></li>
+<li><a href="IDETutorial/lesson3.html">Lesson 3: Running Your Script</a></li>
+</ul>
+</li>
+</ol>
+</li>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/exampleScripts.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/exampleScripts.html
new file mode 100644
index 0000000000..19185a763d
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/exampleScripts.html
@@ -0,0 +1,174 @@
+<a href="../toc.html">Table of Contents</a> > <a href="reference.html">Reference</a>
+
+<h2>
+Example SystemTap Scripts
+</h2>
+
+What follows is a few SystemTap Scripts that you may use in SystemTap GUI, taken from and linked to
+<a href="http://sourceware.org/systemtap/documentation.html">http://sourceware.org/systemtap/documentation.html</a>
+
+<br><br>There is also a
+<a href="http://sourceware.org/systemtap/examples/demo_script.txt">description of the examples</a>.
+
+<h3>
+top.stp - Prints the top 20 system calls (<a href="http://sourceware.org/systemtap/examples/top.stp">online source</a>)
+</h3>
+
+<code><pre>
+#!/usr/bin/env stap
+#
+# This script continuously lists the top 20 systemcalls on the system
+#
+
+global syscalls
+
+function print_top () {
+ cnt=0
+ log ("SYSCALL\t\t\t\tCOUNT")
+ foreach ([name] in syscalls-) {
+ printf("%-20s\t\t%5d\n",name, syscalls[name])
+ if (cnt++ == 20)
+ break
+ }
+ printf("--------------------------------------\n")
+ delete syscalls
+}
+
+probe kernel.function("sys_*") {
+ syscalls[probefunc()]++
+}
+
+# print top syscalls every 5 seconds
+probe timer.ms(5000) {
+ print_top ()
+</pre></code>
+
+
+<h3>
+prof.stp - Simple profiling (<a href="http://sourceware.org/systemtap/examples/prof.stp">online source</a>)
+</h3>
+
+<code><pre>
+#!/usr/bin/env stap
+
+# This is an example of profiling a specific command or pid.
+# It works by recording the time when a system call is entered
+# exited.
+
+# Usage: prof.stp -c "top -n5"
+# Will start up "top" and after 5 iterations, will exit.
+#
+# Usage: prof.stp -x 3323
+# Will profile pid 3323 until it ^c is hit.
+#
+
+probe kernel.function("sys_*") {
+ if (target() == tid())
+ calltime[tid()] = gettimeofday_us()
+}
+
+probe kernel.function("sys_*").return {
+ if (target() != tid()) next
+ now = gettimeofday_us()
+ c = calltime[tid()]
+ if (!c) next
+ ttime[probefunc()] <<< now - c
+ delete calltime[tid()]
+}
+
+probe end {
+ printf("\n")
+ foreach (x in ttime)
+ printf("%-20s\tcalls:%6d\tavg time (ms):%5d\ttotal(ms):%7d\n",
+ x, @count(ttime[x]), @avg(ttime[x]), @sum(ttime[x]))
+}
+
+global calltime, ttime
+</pre></code>
+
+
+<h3>
+keyhack.stp - Modifying variables in the kernel. (<a href="http://sourceware.org/systemtap/examples/keyhack.stp">online source</a>)
+</h3>
+
+<code><pre>
+#! /usr/bin/env stap
+
+# This is not useful, but it demonstrates that
+# Systemtap can modify variables in a running kernel.
+
+# Usage: ./keyhack.stp -g
+
+probe kernel.function("kbd_event") {
+ # Changes 'm' to 'b' .
+ if ($event_code == 50) $event_code = 48
+}
+
+probe end {
+ printf("\nDONE\n")
+}
+</code></pre>
+
+
+<h3>
+kmalloc.stp - Statistics example. (<a href="http://sourceware.org/systemtap/examples/kmalloc.stp">online source</a>)
+</h3>
+
+<code><pre>
+#! /usr/bin/env stap
+
+# Using statistics to examine kernel memory allocations
+
+global kmalloc
+
+probe kernel.function("__kmalloc") {
+ kmalloc <<< $size
+}
+
+# Exit after 10 seconds
+probe timer.ms(10000) { exit () }
+
+probe end {
+ printf("Count: %d allocations\n", @count(kmalloc))
+ printf("Sum: %d Kbytes\n", @sum(kmalloc)/1000)
+ printf("Average: %d bytes\n", @avg(kmalloc))
+ printf("Min: %d bytes\n", @min(kmalloc))
+ printf("Max: %d bytes\n", @max(kmalloc))
+ print("\nAllocations by size in bytes\n")
+ print(@hist_log(kmalloc))
+}
+</code></pre>
+
+
+<h3>
+kmalloc2.stp - Example using arrays of statistics. (<a href="http://sourceware.org/systemtap/examples/kmalloc2.stp">online source</a>)
+</h3>
+
+<code><pre>
+#! /usr/bin/env stap
+
+# Using statistics and maps to examine kernel memory allocations
+
+global kmalloc
+
+probe kernel.function("__kmalloc") {
+ kmalloc[execname()] <<< $size
+}
+
+# Exit after 10 seconds
+probe timer.ms(10000) { exit () }
+
+probe end {
+ foreach ([name] in kmalloc) {
+ printf("Allocations for %s\n", name)
+ printf("Count: %d allocations\n", @count(kmalloc[name]))
+ printf("Sum: %d Kbytes\n", @sum(kmalloc[name])/1000)
+ printf("Average: %d bytes\n", @avg(kmalloc[name]))
+ printf("Min: %d bytes\n", @min(kmalloc[name]))
+ printf("Max: %d bytes\n", @max(kmalloc[name]))
+ print("\nAllocations by size in bytes\n")
+ print(@hist_log(kmalloc[name]))
+ printf("-------------------------------------------------------\n\n");
+ }
+}
+</code></pre> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/frequentlyAskedQuestions.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/frequentlyAskedQuestions.html
new file mode 100644
index 0000000000..e2326e7337
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/frequentlyAskedQuestions.html
@@ -0,0 +1,29 @@
+<a href="../toc.html">Table of Contents</a> > <a href="reference.html">Reference</a>
+
+<h2>
+Frequently Asked Questions
+</h2>
+
+This section details frequently asked questions relating to the IDE Perspective.<br><br>
+
+<b>
+Where can I find information regarding the Systemtap scripting language?
+</b><br><br>
+
+A: The best place to look for up to date information regarding Systemtap itself is its <A HREF="http://sourceware.org/systemtap/documentation.html">homepage.</A>
+<br><br><br>
+
+<b>
+How do I run a script once I've written it?
+</b><br><br>
+
+A: There are different options as far as running your Systemtap script. Please visit the <a href="menus.html#run">Run menu section</a> to learn more about the four ways of running Systemtap scripts.<br><br>
+<br><br><br>
+
+<b>
+Why does the application seem to hang when switchign to the IDE Perspective?
+</b><br><br>
+
+A: If this is the first time you are trying to open the IDE perspective, or have recently gotten a new version of SystemTap this is expected. In order to generate a full list of all of the available probes, and functions the GUI has to run the stap command. If there are tapsets that do not run correctly using the 'stap -up2' comamnd this takes a long time. In order to build as complete a list as possible it will use a binary filtering algorithm to figure out which tapset function is broken and generate data for all of the others.
+<br><br><br>
+
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/Console.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/Console.png
new file mode 100644
index 0000000000..350a87e416
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/Console.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/ErrorLog.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/ErrorLog.png
new file mode 100644
index 0000000000..396397b552
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/ErrorLog.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/chartbox1.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/chartbox1.png
new file mode 100644
index 0000000000..0008258b2b
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/chartbox1.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/consolebox1.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/consolebox1.png
new file mode 100644
index 0000000000..4ef123c9fd
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/consolebox1.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/findbox1.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/findbox1.png
new file mode 100644
index 0000000000..fbb1195e55
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/findbox1.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/gotobox1.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/gotobox1.png
new file mode 100644
index 0000000000..3a6faae06b
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/gotobox1.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/importbox1.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/importbox1.png
new file mode 100644
index 0000000000..050eb82f9a
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/importbox1.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/newbox1.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/newbox1.png
new file mode 100644
index 0000000000..ced1f3fac8
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/newbox1.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/openbox1.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/openbox1.png
new file mode 100644
index 0000000000..3155183cf4
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/openbox1.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/optionsbox1.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/optionsbox1.png
new file mode 100644
index 0000000000..0ee82f163f
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/optionsbox1.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/passbox1.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/passbox1.png
new file mode 100644
index 0000000000..f8d6dca709
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/passbox1.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/preferencesbox1.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/preferencesbox1.png
new file mode 100644
index 0000000000..31b0cbc9f1
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/preferencesbox1.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/viewbox1.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/viewbox1.png
new file mode 100644
index 0000000000..348b354600
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/menu/viewbox1.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/dash.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/dash.png
new file mode 100644
index 0000000000..4e1dc2ee25
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/dash.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/graphing.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/graphing.png
new file mode 100644
index 0000000000..adfa0c2943
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/graphing.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/ide.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/ide.png
new file mode 100644
index 0000000000..43dacebd97
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/ide.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/import_wiz.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/import_wiz.gif
new file mode 100644
index 0000000000..d38085ad9c
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/import_wiz.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/new_wiz.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/new_wiz.gif
new file mode 100644
index 0000000000..7aea894d0b
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/new_wiz.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/open_wiz.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/open_wiz.gif
new file mode 100644
index 0000000000..51e703b1b9
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/open_wiz.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/run_chart.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/run_chart.gif
new file mode 100644
index 0000000000..b7f03d5679
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/run_chart.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/run_exc.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/run_exc.gif
new file mode 100644
index 0000000000..57f410224c
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/run_exc.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/run_tool.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/run_tool.gif
new file mode 100644
index 0000000000..8fa2ef50f8
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/run_tool.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/stop_obj.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/stop_obj.gif
new file mode 100644
index 0000000000..dc47edf069
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/images/toolbars/stop_obj.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/menus.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/menus.html
new file mode 100644
index 0000000000..0accc78023
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/menus.html
@@ -0,0 +1,105 @@
+<a href="../toc.html">Table of Contents</a> > <a href="reference.html">Reference</a>
+
+<h2>
+Graphics Perspective Menus
+</h2>
+
+What follows is a comprehension list of the menu options available within the IDE Perspective of Systemtap GUI.
+
+
+<h3>
+<u>F</u>ile
+</h3>
+<ul>
+<li><b><u>N</u>ew File</b> - This option will bring up a dialog to create a new file. You may specify any location. Files ending in a .stp or .c extension will have syntax highlighting and code completion features as appropriate. (Shortcut: Crtl+L)<br><img src="images/menu/newbox1.png"><br><br></li>
+<li><b><u>O</u>pen File</b> - This option will bring up a dialog to select a file to open. Once a file is selected it will open in the editor window. (Shortcut: Crtl+O)<br><img src="images/menu/openbox1.png"><br><br></li>
+<li><b><u>C</u>lose</b> - This option closes the file in the editor pane that currently has the focus. (Shortcut: Crtl+F4)</li>
+<li><b>C<u>l</u>ose All</b> - This option closes all files in the editor pane. (Shortcut: Shift+Crtl+F4)</li>
+<li><b><u>S</u>ave</b> - This option saves the file that currently has the focus. (Shortcut: Crtl+S)</li>
+<li><b>Save <u>A</u>s</b> - This option prompts the user for a new location and file name and saves the file that currently has the focus under that new name and location.</li>
+<li><b>Sav<u>e</u> All</b> - This option saves all files currently open in the editor pane. (Shortcut: Shift+Crtl+S)</li>
+<li><b>Rever<u>t</u></b> - This option discards changes to the file currently under the focus replaces it with the last saved version.</li>
+<li><b><u>P</u>rint</b> - This option prints the file in the editor pane currently holding the focus. (Shortcut: Crtl+P)</li>
+<li><b><u>E</u>xport Script</b> - This option prompts the user to enter metadata associated with the Systemtap script to be exported and used in the Dashboard perspective. See the <a href="../tasks/creatingModules.html">Creating Modules task guide</a> for instructions.</li>
+<li><b><u>I</u>mport Tapset</b> - This option allows you to include additional tapset directories when you run a script. (Shortcut: Crtl+I)<br><img src="images/menu/importbox1.png"><br><br></li>
+<li><b>E<u>x</u>it</b> - Exits Systemtap GUI.
+</ul>
+
+
+<h3>
+<u>E</u>dit
+</h3>
+<ul>
+<li><b><u>U</u>ndo</b> - Undos the previous editor related action. (Shortcut: Crtl+Z)</li>
+<li><b><u>R</u>edo</b> - Redos the previous editor related action removed by Undo. (Shortcut: Crtl+Y)</li>
+<li><b>Cu<u>t</u></b> - Removes the selected text from the editor pane and places it in the clipboard. (Shortcut: Shift+Delete, Ctrl+X)</li>
+<li><b><u>C</u>opy</b> - Copies the selected text from the editor pane and places it in the clipboard. (Shortcut: Ctrl+Insert, Crtl+C)</li>
+<li><b><u>P</u>aste</b> - Copies the text from the clipboard to the location of the focus in the editor pane. (Shortcut: Shift+Insert, Crtl+V)</li>
+<li><b>Select <u>A</u>ll</b> - Selects all text within the file in the editor that the focus is currently in. (Shortcut: Crtl+A)</li>
+<li><b><u>F</u>ind/Replace</b> - Opens the Find/Replace dialogue in which users may specify a text string to find and/or replace, with options to search forwards or backwards, the entire document or just the selected lines, and whether or not they want the following options:
+<ul>
+<li>Case sensitive</li>
+<li>Wrap Search</li>
+<li>Whole Word</li>
+<li>Incremental</li>
+<li>Regular expressions</li>
+</ul>(Shortcut: Crtl+F)</li><br><img src="images/menu/findbox1.png"><br><br></li>
+<li><b>Find <u>N</u>ext</b> - Finds the next instance of the search string in the direction indicated in the Find/Replace dialogue box. (Shortcut: Crtl+K)</li>
+<li><b>Find Pre<u>v</u>ious</b> - Finds the previous instance of the search string in the direction indicated in the Find/Replace dialogue box. (Shortcut: Shift+Crtl+K)</li>
+<li><b><u>I</u>ncremental Find Next</b> - Finds the next occurrence of the text and updates the selection after each character typed. To use Incremental Find:
+<ol>
+ <li>In the text (or Java) editor, press Ctrl+J or select Edit > Incremental Find Next from the menu bar.</li>
+ <li>The workbench status line displays "Incremental Find:". The editor is now in the Incremental Find mode.</li>
+ <li>As you type, the editor finds the next occurrence of the text and updates the selection after each character typed.</li>
+ <li>Navigate to the next or previous match by pressing Arrow Down or Arrow Up.</li>
+ <li>Undo the last action within the Incremental Find mode by pressing Backspace.</li>
+ <li>You can leave the Incremental Find mode by pressing Esc</li>
+</ol>(Shortcut: Crtl+J)</li>
+<li><b>Incre<u>m</u>ental Find Previous</b> - Operates as illustrated in above bullet but in the reverse. (Shortcut: Shift+Crtl+J)</li>
+<li><b>Select <u>A</u>ll</b> - Selects all the text in the file that currently has the focus. (Shortcut: Ctrl+A)</li>
+<li><b><u>W</u>ord Completion</b> - Completes the string being typed by using the last example typed by the user. (Shortcut: Alt+/)</i>
+</ul>
+
+<h3>
+<u>N</u>avigate
+</h3>
+<ul>
+<li><b><u>F</u>orward</b> - Navigates to the next file in sequence as they were opened in the editor pane. (Shortcut: Alt+Right)</li>
+<li><b><u>B</u>ack</b> - Navigates to the previous file in sequence as they were opened in the editor pane. (Shortcut: Alt+Left)</li>
+<li><b>Last Edit Lo<u>c</u>ation</b> - Moves the focus to the file containing the last known edit. (Shortcut: Crtl+Q)</li>
+<li><b><u>G</u>oto Line...</b> - Moves the focus to the specified line number, with the range of line numbers listed in the dialogue box. (Shortcut: Ctrl+L)<br><img src="images/menu/gotobox1.png"><br><br></li>
+</ul>
+
+<h3>
+<a name="run"><u>R</u>un</a>
+</h3>
+<ul>
+<li><b><u>R</u>un</b> - Available when a Systemtap script is loaded into the editor, this feature runs the script. You will be prompted to enter details of the remote machine running the systemtapgui server.ShortCut(Ctrl+F5)<br><img src="images/menu/consolebox1.png"><br><br></li>
+<li><b><u>R</u>un w/Chart</b> - Available when a Systemtap script is loaded into the editor, this feature will prompt the user for the number of columns for the chart, in addition to their titles and regular expressions. The regular expressions are used to parse the console output for the script and determine the values of each column at a certain sample point. The combined regular expression is shown at the bottom of the dialogue box. The user has the option to use Command Line Options as well. When you click OK you will be prompted to enter the details of the remote machine running the systemtapgui server. When the script is executed the application will switch into the Graphing perspective. A Data View chart is populated with live data, in addition to the output in the console. More information regarding the Graphing perspective is available here.<br><img src="images/menu/chartbox1.png"><br><br></li>
+<li><b><u>S</u>top</b> - This option terminates the script thread associated with whichever script currently has the focus. (Shortcut: Ctrl+F9)</li>
+</ul>
+
+<h3>
+<u>W</u>indow
+</h3>
+<ul>
+<li><b>Open in <u>N</u>ew Window</b> - This option opens a new instance of SystemTap GUI.</li>
+<li><b><u>O</u>pen Perspective</b> - This submenu lists each of the available perspectives to open:
+<ul>
+<li>IDE Perspective</li>
+<li>Graphing Perspective</li>
+<li>Dashboard Perspective</li>
+</ul></li>
+<li><b>Show <u>V</u>iews</b> - This submenus lists each of the available views to open:
+<ul>
+<li>Console</li>
+<li>Error Log</li>
+<li>Functions</li>
+<li>Kernel Source</li>
+<li>Probe Alias</li>
+<li>Other - Lists all views in the application.</li><br><img src="images/menu/viewbox1.png"><br><br>
+</ul></li>
+<li><b><u>P</u>references</b> - Due to the breath of this topic it is covered in another section. Please see <a href="preferences.html">Preferences Help</a>.<br><br></li>
+</ul>
+
+
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/preferences.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/preferences.html
new file mode 100644
index 0000000000..cb8a709681
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/preferences.html
@@ -0,0 +1,129 @@
+<a href="../toc.html">Table of Contents</a> > <a href="reference.html">Reference</a>
+
+<h2>
+Preferences
+</h2>
+
+This section details each of the options listed under <b><u>W</u>indow-><u>P</u>references</b>. The Preferences dialog is the dialog used to set user preferences. The Preferences dialog pages can be searched using the filter function. To filter by matching the page title, simply type the name of the page you are seeking and the available pages will be presented below. The filter also searches on keywords such as appearance and java.
+
+<ul>
+<li><b>Logging</b>
+<ul>
+<li><b>Enable logging</b> - This option turns on and off the ability to log data from the console.</li>
+<li><b>Logging level</b> - This dropdown box allows you to select one of our levels of logging.
+<ul>
+<li>Debug - A very large quantity of debug information, difficult to identify what you are looking for but extremely exhaustive.</li>
+<li>Info - Displays most information regarding program execution; the default level.</li>
+<li>Critical - Lists only critical errors duration execution.</li>
+<li>Fatal - Lists only fatal errors during execution.</li>
+</ul>
+</li>
+<li><b>Log to</b> - Specifies where you wish the logging to be written:
+<ul>
+<li>Console - Writes the debug information directly to the console.</li>
+<li>File - Write the debug information to a file.</li>
+</ul>
+<li><b>File</b> - The location of the file that logging sends the debug information to.</li>
+</ul>
+<li><b>SystemTap</b> - This section contains options relevent to SystemTap itself.
+<ul>
+<li><b>Remember window state</b> - Preserves the state of the window on exitting SystemTap GUI.
+<li><b>Dashboard Preferences</b> - Preferences relate to the Dashboard Perspective.
+<ul>
+<li>Additional Modules - Provides for the addition of more modules to the Dashboard. Modules are files containing a SystemTap script and associated metadata.</li>
+</ul>
+<li><b>Environment Variables</b> - Allows the user to set specific values to the following environment variables
+<ul>
+<li>LD_LIBRARY_PATH</li>
+<li>PATH</li>
+<li>SYSTEMTAP_TAPSET</li>
+<li>SYSTEMTAP_RUNTIME</li>
+</ul>
+</li>
+<li><b>Graphing</b> - Preferences related to the Graphing Perspective.
+<ul>
+<li><b><u>R</u>efresh Delay (ms)</b> - Milliseconds in between re-painting the graph.</li>
+<li><b>Data Table</b> - Preferences related to the data table.
+<ul>
+<li><u>J</u>ump to the newest entry - Determines whether the scroll bar maintains its location at the newest entry.</li>
+<li><u>A</u>uto resize columns - Determines whether columns automatically resize to the width of the contents or whether they remain placed when moved.</li>
+<li><u>M</u>ax data items - Maximum number of entries that the table shows, though the table itself may have more not visible.</li>
+</ul>
+</li>
+<li><b>Graph</b> - Preferences related to graphs.
+<ul>
+<li><u>S</u>how grid lines - Turns on and off painting of the grid lines.</li>
+<li><u>V</u>iewable data items - Number of maximum samples plotted at any time.</li>
+</ul>
+</ul>
+<li><b>IDE</b> - Preferences when loading the IDE Perspective.
+<ul>
+<li><b>Use stored tapset trees</b> - Loads the stored tapset trees on initialization.</li>
+<li><b>Editor</b> - Preferences related to the editor.
+<ul>
+<li><u>E</u>ditor Background Color - Sets the color painted in the background of the editor pane.</li>
+<li>Show Line <u>N</u>umbers - Option to turn on and off line numbers in the editor pane.
+<li>Code Assist
+<ul>
+<li><u>U</u>se Code Assist - Turns on and off the option to use Code Assist, which is a method that predicts what you are typing based on existing probe aliasi and opens a window that allows you to scroll down and select and/or continue typing for refined results.</li>
+<li>How Code Assist adds code - Method used in Code Assist.
+<ul>
+<li><u>I</u>nsert - Inserts the selected text directly into the cursor point.</li>
+<li><u>O</u>verwrite - Overwrites as you type.</li>
+</ul>
+</li>
+<li>Activation <u>D</u>elay (requires restart) - Delay in milliseconds before the code assist routines attempts to run.
+<li>Activation <u>T</u>rigger - This is the key that actives Code Assist. For SystemTap GUI it is set to the divider between tapset and probe alias.
+</ul>
+</li>
+<li>Syntax Coloring - These options assign color values to identified types within the .stp and .c editors.
+<ul>
+<li>STP editor
+<ul>
+<li><u>D</u>efault Color - Color of normal code.</li>
+<li><u>K</u>eyword Color - Color of keywords.</li>
+<li><u>E</u>mbedded C Color - Color of embedded C code.</li>
+<li><u>E</u>mbedded Color - Color of embedded code.</li>
+<li><u>C</u>omment Color - Color of comments.</li>
+<li><u>T</u>ype Color - Color of items identified as types.</li>
+<li><u>S</u>tring Color - Color of strings.</li>
+</ul>
+</li>
+<li>C editor
+<ul>
+<li><u>D</u>efault Color - Color of normal code.</li>
+<li><u>K</u>eyword Color - Color of keywords.</li>
+<li><u>P</u>reprocessor Color - Color of preprocessor code.</li>
+<li><u>C</u>omment Color - Color of comments.</li>
+<li><u>T</u>ype Color - Color of items identified as types.</li>
+<li><u>S</u>tring Color - Color of strings.</li>
+</ul>
+</li>
+</ul
+</li>
+<li>Typeing - No options available at this time.</li>
+</ul>
+</li>
+<li><b>Path</b>
+<ul>
+<li><u>K</u>ernel Source Directory - Location of the directory that the kernel source code is pulled from.</li>
+<li>Stap - No options available at this time.
+<ul>
+<li>Tapsets - Preferences related to tapsets.
+<ul>
+<li><u>A</u>dditional Tapsets - Allows you to specify additional tapsets scripts to be added in with every script.</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+<li><b>Remote Server</b> - Details regarding the remote machine running the systemtapgui Server
+<ul>
+<li><b>Host Name</b> - IP address of the remote machine</li>
+<li><b>Port</b> - Port used for communication. Default is 22462.</li>
+<li><b>User Name</b> - User name that has sufficient permissions to transfer and run the script on the remote machine. </li>
+<li><b>Password</b> - Password for the above user. </li>
+</ul>
+</ul> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/reference.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/reference.html
new file mode 100644
index 0000000000..fba8de0b13
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/reference.html
@@ -0,0 +1,19 @@
+<a href="../toc.html">Table of Contents</a>
+
+<h2>
+Reference
+</h2>
+
+This section of the IDE User Guild is intended to provide the following resources should you have any
+very specific questions regarding the IDE Perspective in general or one of the options associated with
+it. It also contains example scripts and FAQs.
+
+<ol>
+<li><a href="viewsAndEditors.html">Views and Editors</a></li>
+<li><a href="menus.html">Menus</a></li>
+<li><a href="toolbars.html">Toolbars</a></li>
+<li><a href="preferences.html">Preferences</a></li>
+<li><a href="frequentlyAskedQuestions.html">Frequently Asked Questions</a></li>
+<li><a href="exampleScripts.html">Example SystemTap Scripts</a></li>
+<li><a href="regex.html">Guide to Regular Expressions</a></li>
+</ol>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/regex.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/regex.html
new file mode 100644
index 0000000000..8643733fde
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/regex.html
@@ -0,0 +1,144 @@
+<a href="../toc.html">Table of Contents</a> > <a href="reference.html">Reference</a>
+
+<h2>
+Regex Reference Page
+</h2>
+
+Regular expressions are used in SystemTap GUI to define how the GUI interprets information that it recieves
+from the script file. If the user wishes to change the regular expression during runtime they may do so by
+selecting <b><u>E</u>dit->Modify <u>P</u>arsing Expression</b>.<br><br>
+
+Basic regex (taken from <a href="http://java.sun.com/j2se/1.5.0/docs/api/">http://java.sun.com/j2se/1.5.0/docs/api/</a> ) -
+
+<pre> Summary of regular-expression constructs
+
+Construct Matches
+
+Characters
+x The character x
+\\ The backslash character
+\0n The character with octal value 0n (0 <= n <= 7)
+\0nn The character with octal value 0nn (0 <= n <= 7)
+\0mnn The character with octal value 0mnn (0 <= m <= 3, 0 <= n <= 7)
+\xhh The character with hexadecimal value 0xhh
+\uhhhh The character with hexadecimal value 0xhhhh
+\t The tab character ('\u0009')
+\n The newline (line feed) character ('\u000A')
+\r The carriage-return character ('\u000D')
+\f The form-feed character ('\u000C')
+\a The alert (bell) character ('\u0007')
+\e The escape character ('\u001B')
+\cx The control character corresponding to x
+
+Character classes
+[abc] a, b, or c (simple class)
+[^abc] Any character except a, b, or c (negation)
+[a-zA-Z] a through z or A through Z, inclusive (range)
+[a-d[m-p]] a through d, or m through p: [a-dm-p] (union)
+[a-z&&[def]] d, e, or f (intersection)
+[a-z&&[^bc]] a through z, except for b and c: [ad-z] (subtraction)
+[a-z&&[^m-p]] a through z, and not m through p: [a-lq-z](subtraction)
+
+Predefined character classes
+. Any character (may or may not match line terminators)
+\d A digit: [0-9]
+\D A non-digit: [^0-9]
+\s A whitespace character: [ \t\n\x0B\f\r]
+\S A non-whitespace character: [^\s]
+\w A word character: [a-zA-Z_0-9]
+\W A non-word character: [^\w]
+
+POSIX character classes (US-ASCII only)
+\p{Lower} A lower-case alphabetic character: [a-z]
+\p{Upper} An upper-case alphabetic character:[A-Z]
+\p{ASCII} All ASCII:[\x00-\x7F]
+\p{Alpha} An alphabetic character:[\p{Lower}\p{Upper}]
+\p{Digit} A decimal digit: [0-9]
+\p{Alnum} An alphanumeric character:[\p{Alpha}\p{Digit}]
+\p{Punct} Punctuation: One of !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
+\p{Graph} A visible character: [\p{Alnum}\p{Punct}]
+\p{Print} A printable character: [\p{Graph}\x20]
+\p{Blank} A space or a tab: [ \t]
+\p{Cntrl} A control character: [\x00-\x1F\x7F]
+\p{XDigit} A hexadecimal digit: [0-9a-fA-F]
+\p{Space} A whitespace character: [ \t\n\x0B\f\r]
+
+java.lang.Character classes (simple java character type)
+\p{javaLowerCase} Equivalent to java.lang.Character.isLowerCase()
+\p{javaUpperCase} Equivalent to java.lang.Character.isUpperCase()
+\p{javaWhitespace} Equivalent to java.lang.Character.isWhitespace()
+\p{javaMirrored} Equivalent to java.lang.Character.isMirrored()
+
+Classes for Unicode blocks and categories
+\p{InGreek} A character in the Greek block (simple block)
+\p{Lu} An uppercase letter (simple category)
+\p{Sc} A currency symbol
+\P{InGreek} Any character except one in the Greek block (negation)
+[\p{L}&&[^\p{Lu}]] Any letter except an uppercase letter (subtraction)
+
+Boundary matchers
+^ The beginning of a line
+$ The end of a line
+\b A word boundary
+\B A non-word boundary
+\A The beginning of the input
+\G The end of the previous match
+\Z The end of the input but for the final terminator, if any
+\z The end of the input
+
+Greedy quantifiers
+X? X, once or not at all
+X* X, zero or more times
+X+ X, one or more times
+X{n} X, exactly n times
+X{n,} X, at least n times
+X{n,m} X, at least n but not more than m times
+
+Reluctant quantifiers
+X?? X, once or not at all
+X*? X, zero or more times
+X+? X, one or more times
+X{n}? X, exactly n times
+X{n,}? X, at least n times
+X{n,m}? X, at least n but not more than m times
+
+Possessive quantifiers
+X?+ X, once or not at all
+X*+ X, zero or more times
+X++ X, one or more times
+X{n}+ X, exactly n times
+X{n,}+ X, at least n times
+X{n,m}+ X, at least n but not more than m times
+
+Logical operators
+XY X followed by Y
+X|Y Either X or Y
+(X) X, as a capturing group
+
+Back references
+\n Whatever the nth capturing group matched
+
+Quotation
+\ Nothing, but quotes the following character
+\Q Nothing, but quotes all characters until \E
+\E Nothing, but ends quoting started by \Q
+
+Special constructs (non-capturing)
+(?:X) X, as a non-capturing group
+(?idmsux-idmsux) Nothing, but turns match flags on - off
+(?idmsux-idmsux:X) X, as a non-capturing group with the given flags on - off
+(?=X) X, via zero-width positive lookahead
+(?!X) X, via zero-width negative lookahead
+(?<=X) X, via zero-width positive lookbehind
+(?<!X) X, via zero-width negative lookbehind
+(?>X) X, as an independent, non-capturing group
+Match a position that is not a word boundary.
+</pre>
+
+<br>Information regarding regular expressions can be found all over the Internet. A few examples have been listed
+below:<br><br>
+
+<ul>
+<li><a href="http://www.javascriptkit.com/javatutors/redev.shtml">http://www.javascriptkit.com/javatutors/redev.shtml</a></li>
+<li><a href="http://www.zytrax.com/tech/web/regex.htm">http://www.zytrax.com/tech/web/regex.htm</a></li>
+</ul> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/toolbars.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/toolbars.html
new file mode 100644
index 0000000000..6366a2e7a3
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/toolbars.html
@@ -0,0 +1,29 @@
+<a href="../toc.html">Table of Contents</a> > <a href="reference.html">Reference</a>
+
+<h2>
+Toolbars
+</h2>
+
+SystemTap GUI currently has two toolbars built in; an Action Bar for file and execution operations and a Perspective Selector to jump to different perspectives.
+
+<h3>
+Action Bar
+</h3>
+
+<ul>
+<li><img src="images/toolbars/new_wiz.gif"> <b>New File</b> - This button will bring up a dialog to create a new file. When you click ok the file will be opened in the editor window.</li>
+<li><img src="images/toolbars/open_wiz.gif"> <b>Open File</b> - This button will bring up a dialog to select a file to open. Once a file is selected it will open in the editor window.</li>
+<li><img src="images/toolbars/import_wiz.gif"> <b>Import Tapset</b> - This button allows you to include additional tapset directories when you run a script.</li>
+<li><img src="images/toolbars/run_exc.gif"> <b>Run Script</b> - This will compile the open script and start running it. All output will be sent to the console. If there is an error in the script the error will be reported in the ErrorLog.</li>
+<li><img src="images/toolbars/run_chart.gif"> <b>Run Script w/Chart</b> - This button is also like the standard Run Script button but will bring up a charting dialog box. Once the formatting expressions have been entered it will change the current perspective to the graphing perspective.</li>
+<li><img src="images/toolbars/stop_obj.gif"> <b>Stop Script</b> - This button will stop the currently active script from running.</li>
+</ul>
+
+<h3>
+Perspective Selector
+</h3>
+
+<ul>
+<li><img src="images/toolbars/ide.png"> <b>IDE Perspective</b> - This button brings you into the IDE Perspective, useful for writing and executing scripts.</li>
+<li><img src="images/toolbars/graphing.png"> <b>Graphing Perspective</b> - This button brings you into the Graphing Perspective, useful for graphing scripts.</li>
+</ul> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/viewsAndEditors.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/viewsAndEditors.html
new file mode 100644
index 0000000000..20a705121e
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/reference/viewsAndEditors.html
@@ -0,0 +1,34 @@
+<a href="../toc.html">Table of Contents</a> > <a href="reference.html">Reference</a>
+
+<h2>
+Views and Editors
+</h2>
+
+This section details the views and editor in relation to the IDE Perspective.
+
+<h3>
+Views
+</h3>
+
+The IDE Perspective consists of 5 views and and two editors.<br><br>
+
+<ul>
+<li><b>Probe Alias Browser</b> - A list of all probe aliasi currently available in your version of Systemtap. Covered in detail <a href="../concepts/probeAliasBrowser.html">here</a>.</li>
+<li><b>Function Browser</b> - A list of functions currently supported in your version of Systemtap. Covered in detail <a href="../concepts/functionBrowser.html">here</a>.</li>
+<li><b>Kernel Source Browser</b> - Used to display the kernel tree. Covered in detail <a href="../concepts/kernelBrowser.html">here</a>.</li>
+<a name="console"></a>
+<li><b>Console</b> - The console view is where all of the output from the running script is shown. If more then one script is running at the same time you are able to switch between which console is currently displayed by clicking on the "Display Selected Console" button. The script can halt execution here if the user selects the <b>Stop</b> button. The user also has the option of saving the console output to a file, which can be done by clicking the <b>Save log output</b> button at the top of the console.<br><br><img src="images/Console.png"></li>
+<li><b>Error Log</b> - If the script you tried to run contained errors, this view will become active and display the errors. You can double click on the eror message to jump to the line in the file where the error occured. <img src="images/ErrorLog.png"></li>
+</ul>
+
+<h3>
+Editors
+</h3>
+
+Three editors are available in Systemtap GUI.
+
+<ul>
+<li><b>STP Editor</b> - This editor is the most commonly used; it is used for the authoring and editing of Systemtap scripts. It is invoked when the user starts a new file or opens a file with the .stp extension. It provides syntax highlighting, code completion, and run support.</li>
+<li><b>C Editor</b> - This editor is available for the read only viewing of kernel source. It is invoked when the user opens a file of extension .c. Syntax highlighting is supported in this mode.</li>
+<li><b>Plain Text Editor</b> - A plain text editor is also implemented for the user should they need it.
+</ul>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/creatingSystemtapScripts.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/creatingSystemtapScripts.html
new file mode 100644
index 0000000000..84255eab16
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/creatingSystemtapScripts.html
@@ -0,0 +1,17 @@
+<a href="../toc.html">Table of Contents</a> > <a href="tasks.html">Tasks</a>
+
+<h2>
+Creating SystemTap Scripts
+</h2>
+
+Create a SystemTap script by selecting <b><u>F</u>ile-><u>N</u>ew</b> in the IDE Perspective. You'll be
+prompted to enter a name for the file; <i>make sure that you use a .stp extension or else SystemTap GUI
+will not recognize the file as a SystemTap script and certain editor and run features will not be active.</i>
+Your new file will be open and ready for coding in the Editor pane.<br><br>
+
+A <a href="../gettingstarted/IDETutorial.html">full length tutorial</a> is also provided in the help pages
+for a step by step demo.<br><br>
+
+For advanced SystemTap langauge help please see the SystemTap Development User's
+Guide and <a href="http://sourceware.org/systemtap/documentation.html">the SystemTap website's documentation
+page. \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/images/addedModule.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/images/addedModule.png
new file mode 100644
index 0000000000..989dbb5196
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/images/addedModule.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/images/exportScript.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/images/exportScript.png
new file mode 100644
index 0000000000..cee013d18e
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/images/exportScript.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/images/options.png b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/images/options.png
new file mode 100644
index 0000000000..999051b3fb
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/images/options.png
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/tasks.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/tasks.html
new file mode 100644
index 0000000000..0317e8cf11
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/tasks.html
@@ -0,0 +1,14 @@
+<a href="../toc.html">Table of Contents</a>
+
+<h2>
+Tasks
+</h2>
+
+This section of the IDE User's Guide contains guides on how to accomplish common tasks in the IDE
+Perspective.<br><br>
+
+<ol>
+<li><a href="creatingSystemtapScripts.html">Creating SystemTap Scripts</a></li>
+<li><a href="usingTheSTPEditor.html">Using the STP Editor</a></li>
+<li><a href="viewingDataCharts.html">Viewing Data Charts</a></li>
+</ol> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/usingTheSTPEditor.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/usingTheSTPEditor.html
new file mode 100644
index 0000000000..beea6abd27
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/usingTheSTPEditor.html
@@ -0,0 +1,30 @@
+<a href="../toc.html">Table of Contents</a> > <a href="tasks.html">Tasks</a>
+
+<h2>
+STP Editor
+</h2>
+
+The STP Editor is used for the authoring and editing of Systemtap scripts. It is invoked when the user
+starts a new file or opens a file with the .stp extension. Using the editor is as easy as setting the focus
+to the editor pane and typing.<br><br>
+
+<img src="../concepts/images/Editor.png"><br><br>
+
+There are certain features within the editor you may want to take advantage of:
+<ul>
+<li>Syntax Highlighting - Certain code items are colored in .stp and .c files based on a set of rules and
+colors. You can turn this on or off and change the colors in <b><u>W</u>indow-><u>P</u>references</b>.</li>
+<li>Code Assist - SystemTap GUI will attempt to finish your probe alias names based on what you have already
+typed. You can then select the appropriate probe alias or continue typing to filter the list down even more.
+You can turn this feature on and off or set the speed on it in <b><u>W</u>indow-><u>P</u>references</b>.</li>
+<li>Run Support - See the <a href="../gettingstarted/IDETutorial/lesson3.html">IDE Tutorial: Lesson 3</a>
+help page on a walk through use of the Run command. The Run command allows scripts to be executed directly
+through SystemTap GUI.</li>
+</ul>
+
+
+
+
+See also: <a href="../reference/menus.html">IDE Perspective Menus</a>,
+<a href="../reference/exampleScripts.html">Example Scripts</a>, <a href="../reference/toolbars.html">Toolbars</a>
+
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/viewingDataCharts.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/viewingDataCharts.html
new file mode 100644
index 0000000000..5f5b2f1142
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/tasks/viewingDataCharts.html
@@ -0,0 +1,14 @@
+<a href="../toc.html">Table of Contents</a> > <a href="tasks.html">Tasks</a>
+
+<h2>
+Viewing Data Charts
+</h2>
+
+Viewing data charts from a SystemTap script is accomplished by running that script with the
+<b><u>R</u>un-><u>R</u>un w/ Chart</b> option. This is covered in the
+<a href="../gettingstarted/IDETutorial/lesson3.html">IDE Tutorial: Lesson Three</a>. After running a script
+with the chart option, the user is taken into the Graphing Perspective and the Data Table is loaded by
+default. The data table immediately begins populating as it recieves input back through the console from
+the running SystemTap script.<br><br>
+
+<img src="../gettingstarted/IDETutorial/images/graphics.png">
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/toc.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/toc.html
new file mode 100644
index 0000000000..6898898f7b
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/html/toc.html
@@ -0,0 +1,54 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Table of Contents</title>
+</head>
+
+<body>
+<h1>Table of Contents</h1>
+
+Welcome to SystemTap GUI help pages. Here you will find wide selection of help pages covering the IDE of
+SystemTap GUI.
+
+<ol>
+<li><a href="gettingstarted/gettingStarted.html">Getting Started</a>
+<ol>
+<li><a href="gettingstarted/IDETutorial.html">IDE Tutorial</a>
+<ul>
+<li><a href="gettingstarted/IDETutorial/lesson1.html">Lesson 1: Getting Started</a></li>
+<li><a href="gettingstarted/IDETutorial/lesson2.html">Lesson 2: Writing Your First Script</a></li>
+<li><a href="gettingstarted/IDETutorial/lesson3.html">Lesson 3: Running Your Script</a></li>
+</ul>
+</li>
+</ol>
+</li>
+<li><a href="concepts/concepts.html">Concepts</a></li>
+<ol>
+<li><a href="concepts/systemtapPerspectives.html">SystemTap Perspectives</a></li>
+<li><a href="concepts/stpEditor.html">STP Editor</a></li>
+<li><a href="concepts/functionBrowser.html">Function Browser</a></li>
+<li><a href="concepts/kernelBrowser.html">Kernel Browser</a></li>
+<li><a href="concepts/probeAliasBrowser.html">Probe Alias Browser</a></li>
+</ol>
+<li><a href="tasks/tasks.html">Tasks</a>
+<ol>
+<li><a href="tasks/creatingSystemtapScripts.html">Creating SystemTap Scripts</a></li>
+<li><a href="tasks/executingScripts.html">Executing Scripts</a></li>
+<li><a href="tasks/viewingDataCharts.html">Viewing Data Charts</a></li>
+<li><a href="tasks/creatingModules.html">Creating Modules</a></li>
+</ol>
+</li>
+<li><a href="reference/reference.html">Reference</li>
+<ol>
+<li><a href="reference/viewsAndEditors.html">Views and Editors</a></li>
+<li><a href="reference/menus.html">Menus</a></li>
+<li><a href="reference/toolbars.html">Toolbars</a></li>
+<li><a href="reference/preferences.html">Preferences</a></li>
+<li><a href="reference/frequentlyAskedQuestions.html">Frequently Asked Questions</a></li>
+<li><a href="reference/exampleScripts.html">Example SystemTap Scripts</a></li>
+<li><a href="reference/regex.html">Guide to Regular Expressions</a></li>
+</ol>
+</body>
+</html> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/tocconcepts.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/tocconcepts.xml
new file mode 100644
index 0000000000..81f1229880
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/tocconcepts.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+
+<toc label="Concepts" link_to="toc.xml#concepts">
+ <topic label="Systemtap Perspectives" href="documentation/html/concepts/systemtapPerspectives.html" />
+ <topic label="STP Editor" href="documentation/html/concepts/stpEditor.html" />
+ <topic label="Function Browser" href="documentation/html/concepts/functionBrowser.html" />
+ <topic label="Kernel Browser" href="documentation/html/concepts/kernelBrowser.html" />
+ <topic label="Probe Alias Browser" href="documentation/html/concepts/probeAliasBrowser.html" />
+</toc>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/tocgettingstarted.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/tocgettingstarted.xml
new file mode 100644
index 0000000000..fe20faa677
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/tocgettingstarted.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+
+<toc label="Getting Started" link_to="toc.xml#gettingstarted">
+ <topic label="IDE Tutorial" href="documentation/html/gettingstarted/IDETutorial.html">
+ <topic label="Lesson 1" href="documentation/html/gettingstarted/IDETutorial/lesson1.html" />
+ <topic label="Lesson 2" href="documentation/html/gettingstarted/IDETutorial/lesson2.html" />
+ <topic label="Lesson 3" href="documentation/html/gettingstarted/IDETutorial/lesson3.html" />
+ </topic>
+</toc>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/tocreference.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/tocreference.xml
new file mode 100644
index 0000000000..c383d7c89d
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/tocreference.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+
+<toc label="Reference" link_to="toc.xml#reference">
+ <topic label="Views and editors" href="documentation/html/reference/viewsAndEditors.html" />
+ <topic label="Menus" href="documentation/html/reference/menus.html" />
+ <topic label="Toolbars" href="documentation/html/reference/toolbars.html" />
+ <topic label="Preferences" href="documentation/html/reference/preferences.html" />
+ <topic label="Frequently Asked Questions" href="documentation/html/reference/frequentlyAskedQuestions.html" />
+ <topic label="Example SystemTap Scripts" href="documentation/html/reference/exampleScripts.html" />
+</toc>
+
+
+
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/toctasks.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/toctasks.xml
new file mode 100644
index 0000000000..6f12b5e106
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/documentation/toctasks.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+
+<toc label="Tasks" link_to="toc.xml#tasks">
+ <topic label="Creating systemtap scripts" href="documentation/html/tasks/creatingSystemtapScripts.html" />
+ <topic label="Using the STP Editor" href="documentation/html/tasks/usingTheSTPEditor.html" />
+ <topic label="Viewing data charts" href="documentation/html/tasks/viewingDataCharts.html" />
+</toc>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/import_wiz.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/import_wiz.gif
new file mode 100644
index 0000000000..d38085ad9c
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/import_wiz.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/run/run_chart.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/run/run_chart.gif
new file mode 100644
index 0000000000..b7f03d5679
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/run/run_chart.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/run/run_exc.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/run/run_exc.gif
new file mode 100644
index 0000000000..57f410224c
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/run/run_exc.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/run/run_tool.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/run/run_tool.gif
new file mode 100644
index 0000000000..8fa2ef50f8
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/run/run_tool.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/terminate_co.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/terminate_co.gif
new file mode 100644
index 0000000000..dc47edf069
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/actions/terminate_co.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/files/file_c.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/files/file_c.gif
new file mode 100644
index 0000000000..778bf3d9a8
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/files/file_c.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/files/file_h.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/files/file_h.gif
new file mode 100644
index 0000000000..0212fd8e85
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/files/file_h.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/files/file_stp.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/files/file_stp.gif
new file mode 100644
index 0000000000..d7fabc8064
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/files/file_stp.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/misc/file_obj.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/misc/file_obj.gif
new file mode 100644
index 0000000000..7ccc6a7031
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/misc/file_obj.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/misc/fldr_obj.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/misc/fldr_obj.gif
new file mode 100644
index 0000000000..51e703b1b9
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/misc/fldr_obj.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/misc/probe_obj.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/misc/probe_obj.gif
new file mode 100644
index 0000000000..da1a16602e
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/misc/probe_obj.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/perspective_obj.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/perspective_obj.gif
new file mode 100644
index 0000000000..0aa75fe704
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/perspective_obj.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/sample.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/sample.gif
new file mode 100644
index 0000000000..34fb3c9d8c
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/sample.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_long.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_long.gif
new file mode 100644
index 0000000000..678467f2d8
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_long.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_str.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_str.gif
new file mode 100644
index 0000000000..4f4907c3d6
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_str.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_unk.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_unk.gif
new file mode 100644
index 0000000000..10abf0dfad
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_unk.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_void.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_void.gif
new file mode 100644
index 0000000000..c804bbb947
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/vars/var_void.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/func_obj.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/func_obj.gif
new file mode 100644
index 0000000000..7de61fd84f
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/func_obj.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/kernel_obj.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/kernel_obj.gif
new file mode 100644
index 0000000000..131c28da40
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/kernel_obj.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/page_obj.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/page_obj.gif
new file mode 100644
index 0000000000..c1a19e1937
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/page_obj.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/probe_obj.gif b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/probe_obj.gif
new file mode 100644
index 0000000000..ca8a692bef
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/icons/views/probe_obj.gif
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.properties
new file mode 100644
index 0000000000..155df86936
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.properties
@@ -0,0 +1,70 @@
+perspective.ide.name=SystemTap IDE
+
+view.function.name=Function
+view.probe.name=Probe Alias
+view.kernel.name=Kernel Source
+
+editor.stp.name=SystemTap STP Editor
+editor.simple.name=Simple Editor
+editor.c.name=C Editor
+
+preference.ide.name=SystemTap IDE
+preference.editor.name=Editor
+preference.codeAssist.name=Code Assist
+preference.conditionalFilter.name=Conditional Filters
+preference.syntaxColor.name=Syntax Coloring
+preference.typeing.name=Typeing
+preference.path.name=Path
+preference.stap.name=Stap
+preference.stapOptions.name=Stap Options
+preference.tapsets.name=Tapsets
+
+command.import.name=Import Tapset...
+command.import.desc=Import tapset directory
+command.stop.name=Stop
+command.stop.desc=Stop running script
+command.runOptions.name=Run w/Options
+command.runOptions.desc=Run the Script w/Options
+command.run.name=Run
+command.run.desc=Run the Script
+command.insertProbe.name=Insert Probe
+command.insertProbe.desc=Insert this probe
+command.insertFunction.name=Insert Function
+command.insertFunction.desc=Insert this function
+command.runChart.name=Run w/Chart
+command.runChart.desc=Run the Script w/Chart
+command.modifyParsing.name=Modify Parsing Expression
+command.modifyParsing.desc=Modify Parsing Expression
+
+category.file.name=File
+category.file.desc=File
+category.run.name=Run
+category.run.desc=Run
+category.popup.name=View Menu
+category.popup.desc=View Menu
+
+action.import.name=Import Tapset...
+action.import.desc=Import tapset directory
+action.runOptions.name=Run w/Options
+action.runOptions.desc=Run the Script w/Options
+action.run.name=Run
+action.run.desc=Run the Script
+
+action.runChart.name=Run w/Chart
+action.runChart.desc=Run the Script w/Chart
+action.stop.name=Stop
+action.stop.desc=Stop running script
+action.insertProbe.name=Insert Probe
+action.insertProbe.desc=Insert this probe
+action.insertFunction.name=Insert Function
+action.insertFunction.desc=Insert this function
+action.viewDefinition.name=View Definition
+
+
+actionset.file.name=File Action Set
+actionset.run.name=Run Action Set
+
+
+actionset.parsing.name=Parsing Action Set
+action.modifyParsing.name=Modify Parsing Expression
+action.modifyParsing.desc=Modify Parsing Expression
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.xml
new file mode 100644
index 0000000000..b2744310b7
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.xml
@@ -0,0 +1,317 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.perspectives">
+ <perspective
+ name="%perspective.ide.name"
+ class="org.eclipse.linuxtools.systemtap.ui.ide.IDEPerspective"
+ icon="icons/perspective_obj.gif"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.IDEPerspective"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.views">
+ <view
+ name="%view.function.name"
+ allowMultiple="true"
+ icon="icons/views/func_obj.gif"
+ class="org.eclipse.linuxtools.systemtap.ui.ide.views.FunctionBrowserView"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.views.FunctionBrowserView"/>
+ <view
+ name="%view.kernel.name"
+ allowMultiple="true"
+ icon="icons/views/kernel_obj.gif"
+ class="org.eclipse.linuxtools.systemtap.ui.ide.views.KernelBrowserView"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.views.KernelBrowserView"/>
+ <view
+ name="%view.probe.name"
+ allowMultiple="true"
+ icon="icons/views/probe_obj.gif"
+ class="org.eclipse.linuxtools.systemtap.ui.ide.views.ProbeAliasBrowserView"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.views.ProbeAliasBrowserView"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.help.toc">
+ <toc
+ file="toc.xml"
+ primary="true"/>
+ <toc file="documentation/tocconcepts.xml"/>
+ <toc file="documentation/tocgettingstarted.xml"/>
+ <toc file="documentation/tocreference.xml"/>
+ <toc file="documentation/toctasks.xml"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ class="org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.STPEditor"
+ contributorClass="org.eclipse.ui.texteditor.BasicTextEditorActionContributor"
+ default="true"
+ extensions="stp"
+ icon="icons/views/page_obj.gif"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.STPEditor"
+ name="%editor.stp.name"/>
+ <editor
+ name="%editor.simple.name"
+ id="org.eclipse.linuxtools.systemtap.ui.editor.SimpleEditor"
+ class="org.eclipse.linuxtools.systemtap.ui.editor.SimpleEditor"
+ icon="icons/views/page_obj.gif"
+ contributorClass="org.eclipse.ui.texteditor.BasicTextEditorActionContributor"
+ default="true"/>
+ <editor
+ name="%editor.c.name"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.editors.c.CEditor"
+ class="org.eclipse.linuxtools.systemtap.ui.ide.editors.c.CEditor"
+ contributorClass="org.eclipse.ui.texteditor.BasicTextEditorActionContributor"
+ icon="icons/views/page_obj.gif"
+ default="false"
+ extensions="c,h,cpp"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ name="%preference.ide.name"
+ id="com.qualityeclipse.systemtap.prefs.ide"
+ class="org.eclipse.linuxtools.systemtap.ui.ide.preferences.IDEPreferencePage"
+ category="com.qualityeclipse.systemtap.prefs.view"/>
+ <page
+ name="%preference.editor.name"
+ id="com.qualityeclipse.systemtap.prefs.ide.editor"
+ class="org.eclipse.linuxtools.systemtap.ui.ide.preferences.EditorPreferencePage"
+ category="com.qualityeclipse.systemtap.prefs.ide"/>
+ <page
+ name="%preference.codeAssist.name"
+ id="com.qualityeclipse.systemtap.prefs.ide.codeassist"
+ class="org.eclipse.linuxtools.systemtap.ui.ide.preferences.CodeAssistPreferencePage"
+ category="com.qualityeclipse.systemtap.prefs.ide.editor"/>
+ <page
+ name="%preference.conditionalFilter.name"
+ id="com.qualityeclipse.systemtap.prefs.ide.conditionalfilters"
+ class="org.eclipse.linuxtools.systemtap.ui.ide.preferences.ConditionalFilterPreferencePage"
+ category="com.qualityeclipse.systemtap.prefs.ide.editor"/>
+ <page
+ name="%preference.syntaxColor.name"
+ id="com.qualityeclipse.systemtap.prefs.ide.syntaxcoloring"
+ class="org.eclipse.linuxtools.systemtap.ui.ide.preferences.SyntaxColoringPreferencePage"
+ category="com.qualityeclipse.systemtap.prefs.ide.editor"/>
+ <page
+ name="%preference.typeing.name"
+ id="com.qualityeclipse.systemtap.prefs.ide.typeing"
+ class="org.eclipse.linuxtools.systemtap.ui.ide.preferences.TypeingPreferencePage"
+ category="com.qualityeclipse.systemtap.prefs.ide.editor"/>
+ <page
+ name="%preference.path.name"
+ id="com.qualityeclipse.systemtap.prefs.ide.path"
+ class="org.eclipse.linuxtools.systemtap.ui.ide.preferences.PathPreferencePage"
+ category="com.qualityeclipse.systemtap.prefs.ide"/>
+ <page
+ name="%preference.stap.name"
+ id="com.qualityeclipse.systemtap.prefs.ide.stap"
+ class="org.eclipse.linuxtools.systemtap.ui.ide.preferences.StapPreferencePage"
+ category="com.qualityeclipse.systemtap.prefs.ide"/>
+ <!--page
+ name="%preference.stapOptions.name"
+ id="com.qualityeclipse.systemtap.prefs.ide.stapoptions"
+ class="org.eclipse.linuxtools.systemtap.ui.ide.preferences.StapOptionsPreferencePage"
+ category="com.qualityeclipse.systemtap.prefs.view/com.qualityeclipse.systemtap.prefs.ide/com.qualityeclipse.systemtap.prefs.ide.stap"/-->
+ <page
+ name="%preference.tapsets.name"
+ id="com.qualityeclipse.systemtap.prefs.ide.tapsets"
+ class="org.eclipse.linuxtools.systemtap.ui.ide.preferences.TapsetsPreferencePage"
+ category="com.qualityeclipse.systemtap.prefs.ide.stap"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.core.runtime.preferences">
+ <initializer class="org.eclipse.linuxtools.systemtap.ui.ide.preferences.PreferenceInitializer"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ name="%command.import.name"
+ description="%command.import.desc"
+ categoryId="org.eclipse.linuxtools.systemtap.ui.ide.category.file"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.commands.ImportTapset"/>
+ <!--command
+ name="%command.runOptions.name"
+ description="%command.runOptions.desc"
+ categoryId="org.eclipse.linuxtools.systemtap.ui.ide.category.run"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.commands.RunScriptOptions"/-->
+ <command
+ name="%command.run.name"
+ description="%command.run.desc"
+ categoryId="org.eclipse.linuxtools.systemtap.ui.ide.category.run"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.commands.RunScript"/>
+ <command
+ name="%command.runChart.name"
+ description="%command.runChart.desc"
+ categoryId="org.eclipse.linuxtools.systemtap.ui.ide.category.run"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.commands.RunScriptChart"/>
+ <command
+ name="%command.stop.name"
+ description="%command.stop.desc"
+ categoryId="org.eclipse.linuxtools.systemtap.ui.ide.category.run"
+ id="org.eclipse.linuxtools.systemtap.ui.consolelog.commands.StopScript"/>
+
+
+ <command
+ name="%command.insertProbe.name"
+ description="%command.insertProbe.desc"
+ categoryId="org.eclipse.linuxtools.systemtap.ui.ide.category.popup"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.commands.probealiasaction"/>
+ <command
+ name="%command.insertFunction.name"
+ description="%command.insertFunction.desc"
+ categoryId="org.eclipse.linuxtools.systemtap.ui.ide.category.popup"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.commands.functionaction"/>
+
+ <category
+ name="%category.file.name"
+ description="%category.file.desc"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.category.file"/>
+ <category
+ name="%category.run.name"
+ description="%category.run.desc"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.category.run"/>
+ <category
+ name="%category.popup.name"
+ description="%category.popup.desc"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.category.popup"/>
+ </extension>
+
+
+
+ <extension
+ point="org.eclipse.ui.actionSets">
+ <actionSet
+ label="%actionset.file.name"
+ visible="false"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.FileActionSet">
+ <action
+ label="%action.import.name"
+ tooltip="%action.import.desc"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.actions.ImportTapset"
+ icon="icons/actions/import_wiz.gif"
+ toolbarPath="org.eclipse.ui.workbench.file/import.ext"
+ class="org.eclipse.linuxtools.systemtap.ui.ide.actions.ImportTapsetAction"
+ definitionId="org.eclipse.linuxtools.systemtap.ui.ide.commands.ImportTapset"
+ style="push"
+ state="false"/>
+ </actionSet>
+ <actionSet
+ label="%actionset.run.name"
+ visible="false"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.RunActionSet">
+ <!--action
+ label="%action.runOptions.name"
+ tooltip="%action.runOptions.desc"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.actions.RunScriptOptions"
+ icon="icons/actions/run/run_tool.gif"
+ toolbarPath="org.eclipse.ui.workbench.file/build.group"
+ menubarPath="launch/wbStart"
+ class="org.eclipse.linuxtools.systemtap.ui.ide.actions.RunScriptOptionsAction"
+ definitionId="org.eclipse.linuxtools.systemtap.ui.ide.commands.RunScriptOptions"
+ style="push"
+ state="false"/-->
+ <action
+ label="%action.run.name"
+ tooltip="%action.run.desc"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.actions.RunScript"
+ icon="icons/actions/run/run_exc.gif"
+ toolbarPath="org.eclipse.ui.workbench.file/build.group"
+ class="org.eclipse.linuxtools.systemtap.ui.ide.actions.RunScriptAction"
+ definitionId="org.eclipse.linuxtools.systemtap.ui.ide.commands.RunScript"
+ style="push"
+ state="false"/>
+ <action
+ label="%action.runChart.name"
+ tooltip="%action.runChart.desc"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.actions.RunScriptChartAction"
+ icon="icons/actions/run/run_chart.gif"
+ toolbarPath="org.eclipse.ui.workbench.file/build.group"
+ class="org.eclipse.linuxtools.systemtap.ui.ide.actions.RunScriptChartAction"
+ definitionId="org.eclipse.linuxtools.systemtap.ui.ide.commands.RunScriptChart"
+ style="push"
+ state="false"/>
+ <action
+ label="%action.stop.name"
+ tooltip="%action.stop.desc"
+ id="org.eclipse.linuxtools.systemtap.ui.consolelog.actions.StopScript"
+ icon="icons/actions/terminate_co.gif"
+ toolbarPath="org.eclipse.ui.workbench.file/stop.ext"
+ class="org.eclipse.linuxtools.systemtap.ui.consolelog.actions.StopScriptAction"
+ definitionId="org.eclipse.linuxtools.systemtap.ui.consolelog.commands.StopScript"
+ style="push"
+ state="false"/>
+ </actionSet>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.popupMenus">
+ <objectContribution
+ adaptable="false"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.definitionMenu"
+ objectClass="org.eclipse.linuxtools.systemtap.ui.structures.TreeDefinitionNode">
+ <action
+ label="%action.viewDefinition.name"
+ class="org.eclipse.linuxtools.systemtap.ui.ide.actions.DefinitionAction"
+ icon="icons/misc/file_obj.gif"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.definitionAction"
+ style="push"/>
+ </objectContribution>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.perspectiveExtensions">
+ <perspectiveExtension
+ targetID="org.eclipse.linuxtools.systemtap.ui.ide.IDEPerspective">
+ <actionSet id="org.eclipse.linuxtools.systemtap.ui.ide.RunActionSet"/>
+ <actionSet id="org.eclipse.linuxtools.systemtap.ui.editor.FileActionSet"/>
+ <actionSet id="org.eclipse.linuxtools.systemtap.ui.ide.FileActionSet"/>
+
+ </perspectiveExtension>
+ <perspectiveExtension
+ targetID="org.eclipse.linuxtools.systemtap.ui.graphing.GraphingPerspective">
+ <actionSet id="org.eclipse.linuxtools.systemtap.ui.ide.RunActionSet"/>
+ <view
+ ratio="0.40f"
+ relative="org.eclipse.linuxtools.systemtap.ui.graphing.views.GraphSelectorView"
+ relationship="bottom"
+ id="org.eclipse.ui.console.ConsoleView"/>
+ <viewShortcut id="org.eclipse.ui.console.ConsoleView"/>
+
+ </perspectiveExtension>
+
+ <perspectiveExtension
+ targetID="org.eclipse.linuxtools.systemtap.ui.graphing.GraphingPerspective">
+ <perspectiveShortcut id="org.eclipse.linuxtools.systemtap.ui.ide.IDEPerspective"/>
+ </perspectiveExtension>
+ <perspectiveExtension
+ targetID="org.eclipse.linuxtools.systemtap.ui.ide.IDEPerspective">
+ <actionSet id="org.eclipse.linuxtools.systemtap.ui.ide.RunActionSet"/>
+ <view
+ ratio="1.00f"
+ relative="org.eclipse.ui.navigator.ProjectExplorer"
+ relationship="left"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.views.ProbeAliasBrowserView"/>
+ <viewShortcut id="org.eclipse.linuxtools.systemtap.ui.ide.views.ProbeAliasBrowserView"/>
+ <view
+ ratio="0.33f"
+ relative="org.eclipse.linuxtools.systemtap.ui.ide.views.ProbeAliasBrowserView"
+ relationship="right"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.views.KernelBrowserView"/>
+ <viewShortcut id="org.eclipse.linuxtools.systemtap.ui.ide.views.KernelBrowserView"/>
+ <view
+ ratio="0.33f"
+ relative="org.eclipse.linuxtools.systemtap.ui.ide.views.ProbeAliasBrowserView"
+ relationship="left"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.views.FunctionBrowserView"/>
+ <viewShortcut id="org.eclipse.linuxtools.systemtap.ui.ide.views.FunctionBrowserView"/>
+
+ </perspectiveExtension>
+ </extension>
+</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/IDEPerspective.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/IDEPerspective.java
new file mode 100644
index 0000000000..487b1f5767
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/IDEPerspective.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide;
+
+import org.eclipse.linuxtools.systemtap.ui.consolelog.views.ErrorView;
+import org.eclipse.linuxtools.systemtap.ui.ide.views.FunctionBrowserView;
+import org.eclipse.linuxtools.systemtap.ui.ide.views.KernelBrowserView;
+import org.eclipse.linuxtools.systemtap.ui.ide.views.ProbeAliasBrowserView;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.ui.IFolderLayout;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPerspectiveFactory;
+import org.eclipse.ui.console.IConsoleConstants;
+
+
+
+/**
+ * The <code>IDEPerspective</code> class defines the layout of the IDE perspective
+ * in the application.
+ * @see org.eclipse.ui.IPerspectiveFactory
+ * @author Ryan Morse
+ */
+public class IDEPerspective implements IPerspectiveFactory {
+ public static String ID = "org.eclipse.linuxtools.systemtap.ui.ide.IDEPerspective";
+
+ public void createInitialLayout(IPageLayout layout) {
+ LogManager.logDebug("Start createInitialLayout: layout-" + layout, this);
+ LogManager.logInfo("Initializing", this);
+ String editorArea = layout.getEditorArea();
+ layout.setEditorAreaVisible(true);
+
+ IFolderLayout browsers = layout.createFolder("browsers", IPageLayout.LEFT, 0.25f, editorArea);
+ browsers.addPlaceholder(ProbeAliasBrowserView.ID + ":*");
+
+ browsers.addView(ProbeAliasBrowserView.ID);
+ browsers.addView(FunctionBrowserView.ID);
+ browsers.addView(KernelBrowserView.ID);
+
+ layout.getViewLayout(ProbeAliasBrowserView.ID).setCloseable(false);
+ layout.getViewLayout(FunctionBrowserView.ID).setCloseable(false);
+ layout.getViewLayout(KernelBrowserView.ID).setCloseable(false);
+
+ IFolderLayout output = layout.createFolder("output", IPageLayout.BOTTOM, 0.75f, editorArea);
+ output.addPlaceholder(ErrorView.ID + ":*");
+ output.addView(ErrorView.ID);
+ output.addView(IConsoleConstants.ID_CONSOLE_VIEW);
+
+ layout.getViewLayout(IConsoleConstants.ID_CONSOLE_VIEW).setCloseable(false);
+ layout.getViewLayout(ErrorView.ID).setCloseable(false);
+
+ layout.addShowViewShortcut(ProbeAliasBrowserView.ID);
+ layout.addShowViewShortcut(FunctionBrowserView.ID);
+ layout.addShowViewShortcut(KernelBrowserView.ID);
+ layout.addShowViewShortcut(ErrorView.ID);
+ layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);
+
+ layout.addPerspectiveShortcut(ID);
+ LogManager.logDebug("End createInitialLayout:", this);
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/IDESessionSettings.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/IDESessionSettings.java
new file mode 100644
index 0000000000..8fd15f7331
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/IDESessionSettings.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide;
+
+import org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.STPEditor;
+
+/**
+ * A simple class that contains information about the current session of the IDE, such as
+ * the path to the tapset libraries, the active SystemTap Script Editor, and if the user
+ * chooses, the user's account password.
+ * @author Ryan Morse
+ */
+public class IDESessionSettings {
+ public static String tapsetLocation = "";
+ public static STPEditor activeSTPEditor = null;
+ public static String password = null;
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/DefinitionAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/DefinitionAction.java
new file mode 100644
index 0000000000..e0a3746562
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/DefinitionAction.java
@@ -0,0 +1,154 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.actions;
+
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.linuxtools.systemtap.ui.editor.PathEditorInput;
+import org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.STPEditor;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.linuxtools.systemtap.ui.structures.TreeDefinitionNode;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+
+
+
+/**
+ * This <code>Action</code> is used when the user right clicks on an item in the Tapset Browsers.
+ * Right-clicking on items in the browsers causes a menu item called "Go to definition" to appear,
+ * which fires this action upon selection. The result is that the file containing the definition
+ * for the entity that the user selected is opened in an <code>STPEditor</code> in the current window.
+ * @author Ryan Morse
+ * @see org.eclipse.jface.action.Action
+ * @see org.eclipse.linuxtools.systemtap.ui.ide.views.TapsetBrowserView
+ */
+public class DefinitionAction extends Action implements IObjectActionDelegate, IWorkbenchWindowActionDelegate {
+ private IStructuredSelection selection = null;
+
+ public DefinitionAction() {
+ super();
+ LogManager.logInfo("initialized", this);
+ }
+
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ //LogManager.logDebug("Start/End setActivePart: action-" + action + ", targetPart-" + targetPart, this);
+ }
+
+ /**
+ * The main body of the event. This code gets the filename from the selected entry in the viewer,
+ * then opens a new <code>STPEditor</code> for that file.
+ */
+ public void run(IAction action) {
+ LogManager.logDebug("Start run: action-" + action, this);
+ if(!isEnabled())
+ return;
+ Object o = selection.getFirstElement();
+ if(!(o instanceof TreeDefinitionNode))
+ return;
+ TreeDefinitionNode t = (TreeDefinitionNode)o;
+ String filename = t.getDefinition();
+ Path p = new Path(filename);
+
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ PathEditorInput input = new PathEditorInput(p, window);
+ try {
+ IEditorPart editorPart = window.getActivePage().openEditor(input, STPEditor.ID);
+ STPEditor editor = (STPEditor)editorPart;
+ int line;
+
+ if(t.getData().toString().startsWith("probe"))
+ line = probeFind(t, editor);
+ else
+ line = functionFind(t, editor);
+
+ editor.jumpToLocation(++line, 0);
+ } catch (PartInitException e) {
+ LogManager.logCritical("Exception run: " + e.getMessage(), this);
+ e.printStackTrace();
+ }
+ LogManager.logDebug("End run:", this);
+ }
+
+ /**
+ * Tries to find the line of code that corrisponds to the provided
+ * function node within the file open in the provided editor.
+ * @param t The tree node that we want to look up
+ * @param editor The STPEditor with the file we are searching in
+ * @return int representing the line where the node is defined
+ */
+ private int functionFind(TreeDefinitionNode t, STPEditor editor) {
+ String func = t.toString();
+ func = func.substring(0, func.indexOf('('));
+
+ int line = editor.find("function " + func);
+
+ if(line < 0)
+ line = editor.find(func);
+ return Math.max(line, 0);
+ }
+
+ /**
+ * Tries to find the line of code that corrisponds to the provided
+ * probe node within the file open in the provided editor.
+ * @param t The tree node that we want to look up
+ * @param editor The STPEditor with the file we are searching in
+ * @return int representing the line where the node is defined
+ */
+ private int probeFind(TreeDefinitionNode t, STPEditor editor) {
+ int line = editor.find("probe " + t.toString());
+
+ if(line < 0)
+ line = editor.find(t.getData().toString());
+ if(line < 0)
+ line = editor.find(t.getData().toString().replace(" ", ""));
+ return Math.max(line, 0);
+ }
+
+ /**
+ * Updates <code>selection</code> with the current selection whenever the user changes
+ * the current selection.
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ if(selection instanceof IStructuredSelection) {
+ LogManager.logDebug("this.selection changed: oldValue: "+ this.selection + " newValue: " + selection, this);
+ this.selection = (IStructuredSelection)selection;
+ Object o = this.selection.getFirstElement();
+ if(o instanceof TreeDefinitionNode)
+ {
+ TreeDefinitionNode t = (TreeDefinitionNode)o;
+ String s = t.getDefinition();
+ if(s != null)
+ setEnabled(true);
+ else
+ setEnabled(false);
+ }
+ else
+ setEnabled(false);
+ } else {
+ this.setEnabled(false);
+ }
+ }
+
+ public void dispose() {
+ LogManager.logInfo("disposing", this);
+ }
+
+ public void init(IWorkbenchWindow window) {}
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/ImportTapsetAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/ImportTapsetAction.java
new file mode 100644
index 0000000000..7e434fe41a
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/ImportTapsetAction.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.actions;
+
+import java.io.File;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.DirectoryDialog;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
+import org.eclipse.linuxtools.systemtap.ui.ide.preferences.IDEPreferenceConstants;
+import org.eclipse.linuxtools.systemtap.ui.ide.views.FunctionBrowserView;
+import org.eclipse.linuxtools.systemtap.ui.ide.views.ProbeAliasBrowserView;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+
+
+/**
+ * This <code>Action</code> is used when the user modifies the list of tapset locations.
+ * When it is invoked, the user is presented with a file selection dialog prompting them to
+ * select a location. If the user confirms their selection in this dialog (through the native
+ * widget's method, usually an OK box), the path the user selected is added to the list stored
+ * in preferences that contains tapset locations, and the tapset browsers are told to refresh.
+ * @author Ryan Morse
+ * @see org.eclipse.linuxtools.systemtap.ui.ide.views.TapsetBrowserView
+ */
+public class ImportTapsetAction extends Action implements IWorkbenchWindowActionDelegate {
+ private IWorkbenchWindow fWindow;
+
+ public ImportTapsetAction() {
+ setEnabled(true);
+ }
+
+ public void dispose() {
+ LogManager.logInfo("Disposing", this);
+ fWindow= null;
+ }
+
+ public void init(IWorkbenchWindow window) {
+ LogManager.logInfo("Initializing fWindow: " + window, this);
+ fWindow= window;
+ }
+
+ public void run(IAction action) {
+ run();
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ }
+
+ /**
+ * This method displays the dialog box to the user that prompts for a tapset location.
+ * @return A File representing the directory that the user selected, if the user confirmed, or null otherwise.
+ */
+ private File queryFile() {
+ DirectoryDialog dialog= new DirectoryDialog(fWindow.getShell(), SWT.OPEN);
+ dialog.setText("Import Tapsets"); //$NON-NLS-1$
+ String path= dialog.open();
+ if (path != null && path.length() > 0) {
+ LogManager.logDebug("queryFile: returnVal-" + path, this);
+ return new File(path);
+ }
+ LogManager.logDebug("queryFile: returnVal-null", this);
+ return null;
+ }
+
+ /**
+ * The main body of this event. Prompts the user for a new location using the <code>queryFile</code>
+ * method, then if the return from <code>queryFile</code> is non-null, the path is added to preferences
+ * and the tapset browsers refreshed.
+ */
+ public void run() {
+ LogManager.logDebug("Start run:", this);
+ File file= queryFile();
+ if (file != null) {
+ IPreferenceStore p = IDEPlugin.getDefault().getPreferenceStore();
+ String tapsets = p.getString(IDEPreferenceConstants.P_TAPSETS);
+
+ p.setValue(IDEPreferenceConstants.P_TAPSETS, tapsets + File.pathSeparator + file.getAbsolutePath());
+
+ IViewPart ivp = fWindow.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(FunctionBrowserView.ID);
+ ((FunctionBrowserView)ivp).refresh();
+ ivp = fWindow.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(ProbeAliasBrowserView.ID);
+ ((ProbeAliasBrowserView)ivp).refresh();
+ }
+ LogManager.logDebug("End run:", this);
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptAction.java
new file mode 100644
index 0000000000..d98325e5b4
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptAction.java
@@ -0,0 +1,345 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.actions;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.net.URI;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Preferences;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.wizard.ProgressMonitorPart;
+import org.eclipse.linuxtools.systemtap.ui.consolelog.ClientSession;
+import org.eclipse.linuxtools.systemtap.ui.consolelog.Subscription;
+import org.eclipse.linuxtools.systemtap.ui.consolelog.dialogs.SelectServerDialog;
+import org.eclipse.linuxtools.systemtap.ui.consolelog.internal.ConsoleLogPlugin;
+import org.eclipse.linuxtools.systemtap.ui.consolelog.preferences.ConsoleLogPreferenceConstants;
+import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.ScriptConsole;
+import org.eclipse.linuxtools.systemtap.ui.editor.PathEditorInput;
+import org.eclipse.linuxtools.systemtap.ui.ide.IDESessionSettings;
+import org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.STPEditor;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
+import org.eclipse.linuxtools.systemtap.ui.ide.preferences.IDEPreferenceConstants;
+import org.eclipse.linuxtools.systemtap.ui.ide.structures.TapsetLibrary;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.linuxtools.systemtap.ui.systemtapgui.preferences.EnvironmentVariablesPreferencePage;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.ide.FileStoreEditorInput;
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileStore;
+
+
+
+/**
+ * This <code>Action</code> is used to run a SystemTap script that is currently open in the editor.
+ * @author Ryan Morse
+ */
+public class RunScriptAction extends Action implements IWorkbenchWindowActionDelegate {
+ public RunScriptAction() {
+ super();
+ }
+
+ public void dispose() {
+ LogManager.logInfo("Disposing", this);
+ fWindow= null;
+ }
+
+ public void init(IWorkbenchWindow window) {
+ LogManager.logInfo("Initializing fWindow: "+ window, this);
+ fWindow= window;
+
+ }
+
+ public void run(IAction action) {
+ run();
+ }
+
+ /**
+ * The main body of this event. Starts by making sure the current editor is valid to run,
+ * then builds the command line arguments for stap and retrieves the environment variables.
+ * Finally, it gets an instance of <code>ScriptConsole</code> to run the script.
+ */
+ public void run() {
+ LogManager.logDebug("Start run:", this);
+ continueRun = true;
+ if(isValid()) {
+ // String[] script = buildScript();
+ // String[] envVars = getEnvironmentVariables();
+ if(continueRun)
+ {
+ createClientSession();
+ }
+ }
+
+ LogManager.logDebug("End run:", this);
+ }
+
+ /**
+ * Returns the path of the current editor in the window this action is associated with.
+ * @return The string representation of the path of the current file.
+ */
+ protected String getFilePath() {
+ IEditorPart ed = fWindow.getActivePage().getActiveEditor();
+ String filename = null;
+ if (ed.getEditorInput() instanceof FileStoreEditorInput)
+ {
+ URI uri = ((FileStoreEditorInput)ed.getEditorInput()).getURI();
+ IFileStore location = EFS.getLocalFileSystem().getStore(uri);
+ try {
+ filename = location.toLocalFile(EFS.NONE, null).getAbsolutePath();
+ } catch (CoreException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+ if (ed.getEditorInput() instanceof FileEditorInput)
+ filename = ((FileEditorInput)ed.getEditorInput()).getFile().getFullPath().toString();
+ if (ed.getEditorInput() instanceof PathEditorInput)
+ filename = ((PathEditorInput)ed.getEditorInput()).getPath().toString();
+ return filename;
+ }
+
+ /**
+ * Checks if the current editor is operating on a file that actually exists and can be
+ * used as an argument to stap (as opposed to an unsaved buffer).
+ * @return True if the file is valid.
+ */
+ protected boolean isValid() {
+ IEditorPart ed = fWindow.getActivePage().getActiveEditor();
+ if(isValidFile(ed))
+ {
+ if (ed.getEditorInput() instanceof FileStoreEditorInput)
+ {
+ URI uri = ((FileStoreEditorInput)ed.getEditorInput()).getURI();
+ IFileStore location = EFS.getLocalFileSystem().getStore(uri);
+ try {
+ fileName = location.toLocalFile(EFS.NONE, null).getAbsolutePath();
+ } catch (CoreException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+ if (ed.getEditorInput() instanceof FileEditorInput)
+ fileName = ((FileEditorInput)ed.getEditorInput()).getFile().getFullPath().toString();
+ if (ed.getEditorInput() instanceof PathEditorInput)
+ fileName = ((PathEditorInput)ed.getEditorInput()).getPath().toString();
+ if(isValidDirectory(fileName))
+ return true;
+ }
+ return true;
+ }
+
+ private boolean isValidFile(IEditorPart ed) {
+
+ if(null == ed) {
+ String msg = MessageFormat.format(Localization.getString("RunScriptAction.NoScriptFile"), (Object[])null);
+ LogManager.logInfo("Initializing", MessageDialog.class);
+ MessageDialog.openWarning(fWindow.getShell(), Localization.getString("RunScriptAction.Problem"), msg);
+ LogManager.logInfo("Disposing", MessageDialog.class);
+ return false;
+ }
+
+ if(ed.isDirty())
+ ed.doSave(new ProgressMonitorPart(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), new FillLayout()));
+
+ return true;
+ }
+
+ private boolean isValidDirectory(String fileName) {
+ this.fileName = fileName;
+ if(0 == IDESessionSettings.tapsetLocation.trim().length())
+ TapsetLibrary.getTapsetLocation(IDEPlugin.getDefault().getPreferenceStore());
+ if(fileName.contains(IDESessionSettings.tapsetLocation)) {
+ String msg = MessageFormat.format(Localization.getString("RunScriptAction.TapsetDirectoryRun"), (Object[])null);
+ MessageDialog.openWarning(fWindow.getShell(), Localization.getString("RunScriptAction.Error"), msg);
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Called by <code>run(IAction)</code> to generate the command line necessary to run the script.
+ * @return The arguments to pass to <code>Runtime.exec</code> to start the stap process on this script.
+ * @see TerminalCommand
+ * @see Runtime#exec(java.lang.String[], java.lang.String[])
+ */
+ protected String[] buildScript() {
+ return buildStandardScript();
+ }
+
+ /**
+ * The command line argument generation method used by <code>RunScriptAction</code>. This generates
+ * a stap command line that includes the tapsets specified in user preferences, a guru mode flag
+ * if necessary, and the path to the script on disk.
+ * @return The command to invoke to start the script running in stap.
+ */
+ protected String[] buildStandardScript() {
+ //FixMe: Take care of this in the next release. For now only the guru mode is sent
+ ArrayList<String> cmdList = new ArrayList<String>();
+ String[] script;
+
+ getImportedTapsets(cmdList);
+
+ if(isGuru())
+ cmdList.add("-g"); //$NON-NLS-1$
+
+ script = finalizeScript(cmdList);
+
+ return script;
+ }
+
+ /**
+ * Adds the tapsets that the user has added in preferences to the input <code>ArrayList</code>
+ * @param cmdList The list to add the user-specified tapset locations to.
+ */
+ protected void getImportedTapsets(ArrayList<String> cmdList) {
+ Preferences pref = IDEPlugin.getDefault().getPluginPreferences();
+ String[] tapsets = pref.getString(IDEPreferenceConstants.P_TAPSETS).split(File.pathSeparator);
+
+ //Get all imported tapsets
+ if(null != tapsets && tapsets.length > 0 && tapsets[0].trim().length() > 0) {
+ for(int i=0; i<tapsets.length; i++) {
+ cmdList.add("-I"); //$NON-NLS-1$
+ cmdList.add(tapsets[i]);
+ }
+ }
+ }
+
+ /**
+ * Checks the current script to determine if guru mode is required in order to run. This is determined
+ * by the presence of embedded C.
+ * @return True if the script contains embedded C code.
+ */
+ protected boolean isGuru() {
+ try {
+ File f = new File(fileName);
+ FileReader fr = new FileReader(f);
+
+ int curr = 0;
+ int prev = 0;
+ boolean front = false;
+ boolean imbedded = false;
+ boolean inLineComment = false;
+ boolean inBlockComment = false;
+ while(-1 != (curr = fr.read())) {
+ if(!inLineComment && !inBlockComment && '%' == prev && '{' == curr)
+ front = true;
+ else if(!inLineComment && !inBlockComment && '%' == prev && '}' == curr && front) {
+ imbedded = true;
+ break;
+ } else if(!inBlockComment && (('/' == prev && '/' == curr) || '#' == curr)) {
+ inLineComment = true;
+ } else if(!inLineComment && '/' == prev && '*' == curr) {
+ inBlockComment = true;
+ } else if('\n' == curr) {
+ inLineComment = false;
+ } else if('*' == prev && '/' == curr) {
+ inBlockComment = false;
+ }
+ prev = curr;
+ }
+ if(imbedded)
+ return true;
+ } catch (FileNotFoundException fnfe) {
+ LogManager.logCritical("FileNotFoundException run: " + fnfe.getMessage(), this);
+ } catch (IOException ie) {
+ LogManager.logCritical("IOException run: " + ie.getMessage(), this);
+ }
+ return false;
+ }
+
+ protected boolean createClientSession()
+ {
+ if (!ClientSession.isConnected())
+ {
+ new SelectServerDialog(fWindow.getShell()).open();
+ }
+ if((ConsoleLogPlugin.getDefault().getPluginPreferences().getBoolean(ConsoleLogPreferenceConstants.CANCELLED))!=true)
+ {
+ subscription = new Subscription(fileName,isGuru());
+ if (ClientSession.isConnected())
+ {
+ console = ScriptConsole.getInstance(fileName, subscription);
+ console.run();
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Produces a <code>String[]</code> from the <code>ArrayList</code> passed in with stap inserted
+ * as the first entry, and the filename as the last entry. Used to convert the arguments generated
+ * earlier in <code>buildStandardScript</code> such as tapset locations and guru mode into an actual
+ * command line argument array that can be passed to <code>Runtime.exec</code>.
+ * @param cmdList The list of arguments for stap for this script
+ * @return An array suitable to pass to <code>Runtime.exec</code> to start stap on this file.
+ */
+ protected String[] finalizeScript(ArrayList<String> cmdList) {
+ String[] script;
+
+ script = new String[cmdList.size() + 2];
+ script[0] = "stap"; //$NON-NLS-1$
+
+ script[script.length-1] = fileName;
+ for(int i=0; i< cmdList.size(); i++) {
+ script[i+1] = cmdList.get(i).toString();
+ }
+ return script;
+ }
+
+ protected String[] getEnvironmentVariables() {
+ return EnvironmentVariablesPreferencePage.getEnvironmentVariables();
+ }
+
+ public void selectionChanged(IAction act, ISelection select) {
+ this.act = act;
+ setEnablement(false);
+ buildEnablementChecks();
+ }
+
+ private void buildEnablementChecks() {
+ if(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor() instanceof STPEditor)
+ setEnablement(true);
+ }
+
+ private void setEnablement(boolean enabled) {
+ act.setEnabled(enabled);
+ }
+
+ protected Subscription getSubscription()
+ {
+ return subscription;
+ }
+
+ protected boolean continueRun = true;
+ private String fileName = null;
+ protected IWorkbenchWindow fWindow;
+ private IAction act;
+ protected Subscription subscription;
+ protected int SCRIPT_ID;
+ protected ScriptConsole console;
+
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptChartAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptChartAction.java
new file mode 100644
index 0000000000..23ceb1367a
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptChartAction.java
@@ -0,0 +1,128 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.actions;
+
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.linuxtools.systemtap.ui.graphing.GraphingConstants;
+import org.eclipse.linuxtools.systemtap.ui.graphing.GraphingPerspective;
+import org.eclipse.linuxtools.systemtap.ui.graphing.views.GraphSelectorView;
+import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSet;
+import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSetParser;
+import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures.ChartStreamDaemon2;
+import org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.dataset.DataSetWizard;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.WorkbenchException;
+
+
+
+/**
+ * Action used to run the systemTap script in the active editor. This action will start stap
+ * and send the output to both the <code>ScriptConsole</code> window and a <code>DataSet</code>.
+ * @author Ryan Morse
+ */
+public class RunScriptChartAction extends RunScriptOptionsAction implements IWorkbenchWindowActionDelegate {
+ public RunScriptChartAction() {
+ super();
+ LogManager.logDebug("initialized", this);
+ }
+
+ public void dispose() {
+ LogManager.logDebug("disposed", this);
+ super.dispose();
+ }
+
+ /**
+ * The main body of this event. Starts by making sure the current editor is valid to run,
+ * then builds the command line arguments for stap and retrieves the environment variables.
+ * Next, it gets an instance of <code>ScriptConsole</code> to run the script. Finally, it
+ * Registers a new <code>ChartStreamDaemon2</code> to handle formating the script output
+ * for a <code>DataSet</code>. Once everything is setup, it will attempt to switch to the
+ * Graphing Perspective.
+ */
+ public void run() {
+ LogManager.logDebug("Start run:", this);
+ continueRun = true;
+
+ if(isValid()) {
+ @SuppressWarnings("unused")
+ String[] script = buildScript();
+ @SuppressWarnings("unused")
+ String[] envVars = getEnvironmentVariables();
+
+ if(continueRun) {
+ createClientSession();
+ subscription.addInputStreamListener(new ChartStreamDaemon2(console, dataSet, parser));
+
+ //Change to the graphing perspective
+ try {
+ IWorkbenchPage p = PlatformUI.getWorkbench().showPerspective(GraphingPerspective.ID, PlatformUI.getWorkbench().getActiveWorkbenchWindow());
+ IViewPart ivp = p.findView(GraphSelectorView.ID);
+ String name = console.getName();
+ ((GraphSelectorView)ivp).createScriptSet(name.substring(name.lastIndexOf('/')+1), dataSet);
+ } catch(WorkbenchException we) {
+
+ }
+ }
+ }
+
+ LogManager.logDebug("End run:", this);
+ }
+
+ /**
+ * The <code>buildScript</code> method in this class replaces the one in the superclass and calls
+ * <code>buildOptionsScript</code> or <code>buildStandardScript</code> depending on the users
+ * selection of whether to use script options.
+ * @return String[] representing the entire command that needs to be run.
+ */
+ protected String[] buildScript() {
+ String[] script;
+
+ getChartingOptions();
+
+ if(useOptions)
+ script = buildOptionsScript();
+ else
+ script = buildStandardScript();
+
+ return script;
+ }
+
+ /**
+ * This method is used to prompt the user for the parsing expression to be used in generating
+ * the <code>DataSet</code> from the scripts output.
+ */
+ protected void getChartingOptions() {
+ DataSetWizard wizard = new DataSetWizard(GraphingConstants.DataSetMetaData, getFilePath());
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ wizard.init(workbench, null);
+ WizardDialog dialog = new WizardDialog(workbench.getActiveWorkbenchWindow().getShell(), wizard);
+ dialog.create();
+ dialog.open();
+
+ parser = wizard.getParser();
+ dataSet = wizard.getDataSet();
+
+ if(null == parser || null == dataSet)
+ continueRun = false;
+
+ wizard.dispose();
+ }
+
+ private boolean useOptions = false;
+ private IDataSet dataSet = null;
+ private IDataSetParser parser = null;
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptOptionsAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptOptionsAction.java
new file mode 100644
index 0000000000..44cf1bd452
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptOptionsAction.java
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.actions;
+
+import java.util.ArrayList;
+
+import org.eclipse.linuxtools.systemtap.ui.ide.preferences.IDEPreferenceConstants;
+import org.eclipse.linuxtools.systemtap.ui.ide.uistructures.StapSettingsDialog;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.ui.PlatformUI;
+
+
+/**
+ * This class is a decendent of <code>RunScriptAction</code> that allows for additional arguments, specified
+ * by the user, to be passed to stap. Its behavior is very similar to the <code>RunScriptAction</code> action.
+ * @author Ryan Morse
+ * @see org.eclipse.linuxtools.systemtap.ui.ide.actions.RunScriptAction
+ */
+public class RunScriptOptionsAction extends RunScriptAction implements IWorkbenchWindowActionDelegate {
+ public RunScriptOptionsAction() {
+ super();
+ LogManager.logDebug("initialized", this);
+ }
+
+ /**
+ * The <code>buildScript</code> method in this class replaces the one in the superclass and calls
+ * <code>buildOptionsScript</code> rather than the <code>buildStandardScript</code> method called
+ * in the parent code.
+ */
+ protected String[] buildScript() {
+ return buildOptionsScript();
+ }
+
+ /**
+ * This method executes the same code as the <code>buildStandardScript</code> with one change,
+ * being that instead of calling the <code>getImportedTapsets</code> method from the parent class, it
+ * calls the <code>getCommandLineOptions</code> method, which will contain all the information that the
+ * tapset method contained, as well as whatever optional arguments the user specifies.
+ * @return Command line arguments suitable to pass to <code>Runtime.exec</code> in order to run the script as requested
+ * @see RunScriptAction#buildStandardScript()
+ */
+ protected String[] buildOptionsScript() {
+ ArrayList<String> cmdList = new ArrayList<String>();
+ String[] script;
+
+ getImportedTapsets(cmdList);
+
+ if(isGuru())
+ cmdList.add("-g");
+
+ getCommandLineOptions(cmdList);
+
+ script = finalizeScript(cmdList);
+
+ return script;
+ }
+
+ /**
+ * This method prompts the user to select optional command line arguments to use when running this
+ * script, and adds them to the <code>ArrayList</code> passed in.
+ * @param cmdList The <code>ArrayList</code> to add the arguments to.
+ */
+ protected void getCommandLineOptions(ArrayList<String> cmdList) {
+ StapSettingsDialog ssd = new StapSettingsDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
+ ssd.open();
+
+ boolean[] cmdOpts = ssd.getStapOpts();
+ String[] cmdOptVals = ssd.getStapOptVals();
+
+ if((null != cmdOpts) && (null != cmdOptVals)) {
+ int i;
+ //Get commandline check options
+ for(i=0; i<cmdOpts.length; i++) {
+ if(cmdOpts[i])
+ cmdList.add(IDEPreferenceConstants.P_STAP[i][0]);
+ }
+
+ //Get rest of commandline options
+ for(i=0; i<cmdOptVals.length; i++) {
+ if(null != cmdOptVals[i] && cmdOptVals[i].trim().length() > 0) {
+ if("-v".equals(IDEPreferenceConstants.P_STAP[i+cmdOpts.length][0])) {
+ cmdList.add("-" + cmdOptVals[i]);
+ } else if("-p NUM".equals(IDEPreferenceConstants.P_STAP[i+cmdOpts.length][0])) {
+ cmdList.add("-p" + cmdOptVals[i]);
+ } else {
+ cmdList.add(IDEPreferenceConstants.P_STAP[i+cmdOpts.length][0].substring(0,2));
+
+ cmdList.add(cmdOptVals[i-cmdOpts.length]);
+ }
+ }
+ }
+ } else
+ continueRun = false;
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/TempFileAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/TempFileAction.java
new file mode 100644
index 0000000000..5963c4d6ad
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/TempFileAction.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.actions;
+
+import java.io.IOException;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.linuxtools.systemtap.ui.editor.PathEditorInput;
+import org.eclipse.linuxtools.systemtap.ui.ide.IDEPerspective;
+import org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.STPEditor;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+
+
+
+/**
+ * This <code>Action</code> creates an editor on a temporary file.
+ * @author Henry Hughes
+ */
+public class TempFileAction extends Action {
+ public void run() {
+ LogManager.logDebug("Start run:", this);
+ IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
+ IWorkbenchWindow main = null;
+ for(int i = 0; i < windows.length; i++) {
+ String s = windows[i].getActivePage().getPerspective().getId();
+ if(s.equals(IDEPerspective.ID))
+ main = windows[i];
+ }
+ if(main == null)
+ return;
+ try {
+ PathEditorInput p = new PathEditorInput();
+ main.getActivePage().openEditor(p, STPEditor.ID);
+ } catch (PartInitException e) {
+ LogManager.logDebug("PartInitException run: " + e.getMessage(), this);
+ } catch(IOException e) {
+ LogManager.logCritical("IOException run: " + e.getMessage(), this);
+ }
+ LogManager.logDebug("End run:", this);
+ }
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/FunctionBrowserAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/FunctionBrowserAction.java
new file mode 100644
index 0000000000..ffdb970f6c
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/FunctionBrowserAction.java
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.actions.hidden;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.linuxtools.systemtap.ui.editor.actions.file.NewFileAction;
+import org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.STPEditor;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
+import org.eclipse.linuxtools.systemtap.ui.ide.views.FunctionBrowserView;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.linuxtools.systemtap.ui.structures.TreeNode;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.ISelectionListener;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
+
+
+
+/**
+ * This <code>Action</code> is fired when the user double clicks on an entry in the
+ * IDE's current <code>FunctionBrowserView</code>. The behavior of this <code>Action</code> is
+ * to expand or collapse the function tree if the user clicks on a non-function (say a file containing
+ * functions), or to insert a blank call to the function if the user double clicks on a function
+ * (defined by the clickable property in the <code>TreeNode</code> class, retrieved through
+ * <code>TreeNode.isClickable</code>.
+ * @author Henry Hughes
+ * @author Ryan Morse
+ * @see org.eclipse.linuxtools.systemtap.ui.structures.TreeNode#isClickable()
+ * @see org.eclipse.linuxtools.systemtap.ui.editor.SimpleEditor#insertTextAtCurrent(String)
+ * @see org.eclipse.linuxtools.systemtap.ui.ide.actions.hidden.TreeExpandCollapseAction
+ */
+public class FunctionBrowserAction extends Action implements IWorkbenchAction, ISelectionListener {
+ private final IWorkbenchWindow window;
+ private final FunctionBrowserView viewer;
+ private static final String ID = "org.eclipse.linuxtools.systemtap.ui.ide.FunctionAction";
+ private IStructuredSelection selection;
+ private TreeExpandCollapseAction expandAction;
+
+ /**
+ * The Default Constructor. Takes the <code>IWorkbenchWindow</code> that it effects
+ * as well as the <code>FunctionBrowserView</code> that will fire this action.
+ * @param window window effected by this event
+ * @param browser browser that fires this action
+ */
+ public FunctionBrowserAction(IWorkbenchWindow window, FunctionBrowserView browser) {
+ LogManager.logInfo("initialized", this);
+ this.window = window;
+ setId(ID);
+ setActionDefinitionId(ID);
+ setText(Localization.getString("FunctionBrowserAction.Insert"));
+ setToolTipText(Localization.getString("FunctionBrowserAction.InsertFunction"));
+ window.getSelectionService().addSelectionListener(this);
+ viewer = browser;
+ expandAction = new TreeExpandCollapseAction(FunctionBrowserView.class);
+ }
+
+ public void dispose() {
+ window.getSelectionService().removeSelectionListener(this);
+ selection = null;
+ expandAction.dispose();
+ expandAction = null;
+ LogManager.logInfo("disposed", this);
+ }
+
+ /**
+ * Updates <code>selection</code> with the current selection whenever the user changes
+ * the current selection.
+ */
+ public void selectionChanged(IWorkbenchPart part, ISelection incoming) {
+ if (incoming instanceof IStructuredSelection) {
+ LogManager.logDebug("Changing selection", this);
+ selection = (IStructuredSelection) incoming;
+ setEnabled(selection.size() == 1);
+ } else {
+ LogManager.logDebug("Disabling, selection not IStructuredSelection", this);
+ // Other selections, for example containing text or of other kinds.
+ setEnabled(false);
+ }
+ }
+
+ /**
+ * The main action code, invoked when this action is fired. This code checks the current
+ * selection's clickable property, and either invokes the <code>TreeExpandCollapseAction</code> if
+ * the selection is not clickable (i.e. the selection is not a function, but a category of functions),
+ * or it inserts text for a function call to the selected function in the active STPEditor
+ * (creating a new editor if there is not one currently open).
+ */
+ public void run() {
+ LogManager.logDebug("Start run:", this);
+ IWorkbenchPage page = window.getActivePage();
+ ISelection incoming = viewer.getViewer().getSelection();
+ IStructuredSelection selection = (IStructuredSelection)incoming;
+ Object o = selection.getFirstElement();
+ if (o instanceof TreeNode) {
+ TreeNode t = (TreeNode) o;
+ if(t.isClickable()) {
+ IEditorInput input;
+ IEditorPart ed = page.getActiveEditor();
+ if(ed == null) {
+ NewFileAction action = new NewFileAction(page.getWorkbenchWindow());
+ //action.init(page.getWorkbenchWindow());
+ action.run();
+ ed = page.getWorkbenchWindow().getActivePage().getActiveEditor();
+ }
+ input = ed.getEditorInput();
+ //System.out.println("Node " + t.toString() + "claims to be clickable");
+ IEditorPart editor;
+ try {
+ editor = page.openEditor(input, STPEditor.ID);
+
+ if(editor instanceof STPEditor) {
+ STPEditor stpeditor = (STPEditor)editor;
+ //build the string
+ String s = t.toString() + "\n";
+ stpeditor.insertTextAtCurrent(s);
+
+ }
+ } catch (PartInitException e) {
+ LogManager.logCritical("PartInitException run: " + e.getMessage(), this);
+ }
+ } else {
+ expandAction.run();
+ }
+ }
+ LogManager.logDebug("End run:", this);
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/KernelSourceAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/KernelSourceAction.java
new file mode 100644
index 0000000000..30e610f8f2
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/KernelSourceAction.java
@@ -0,0 +1,178 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.actions.hidden;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.linuxtools.systemtap.ui.editor.PathEditorInput;
+import org.eclipse.linuxtools.systemtap.ui.ide.IDESessionSettings;
+import org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.STPEditor;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
+import org.eclipse.linuxtools.systemtap.ui.ide.views.KernelBrowserView;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.linuxtools.systemtap.ui.structures.TreeNode;
+import org.eclipse.ui.IEditorDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorRegistry;
+import org.eclipse.ui.ISelectionListener;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
+
+
+
+import java.io.File;
+
+/**
+ * This <code>Action</code> is raised by <code>KernelBrowserView</code> whenever the user selects
+ * an item in the view (usually by double clicking). This <code>Action</code> either passes
+ * the event on to <code>TreeExpandCollapseAction</code> if the selection is not clickable, or
+ * it opens a new CEditor for the file selected if the selection is clickable.
+ * @author Henry Hughes
+ * @author Ryan Morse
+ * @see org.eclipse.linuxtools.systemtap.ui.ide.editors.c.CEditor
+ * @see org.eclipse.linuxtools.systemtap.ui.ide.actions.hidden.TreeExpandCollapseAction
+ * @see org.eclipse.linuxtools.systemtap.ui.ide.views.KernelBrowserView
+ */
+public class KernelSourceAction extends Action implements ISelectionListener, IWorkbenchAction {
+ private final IWorkbenchWindow window;
+ public final static String ID = "org.eclipse.linuxtools.systemtap.ui.ide.KBAction";
+ private KernelBrowserView viewer;
+ private IStructuredSelection selection;
+ private TreeExpandCollapseAction expandAction;
+
+ /**
+ * The default constructor for the <code>KernelSourceAction</code>. Takes the window that it affects
+ * and the <code>KernelBrowserView</code> that will fire the event as arguments.
+ * @param window The <code>IWorkbenchWindow</code> that the action operates on.
+ * @param browser The <code>KernelBrowserView</code> that fires this action.
+ */
+ public KernelSourceAction(IWorkbenchWindow window, KernelBrowserView browser) {
+ LogManager.logDebug("Start KernelSourceAction: window-" + window + ", browser-" + browser, this);
+ LogManager.logInfo("Initializing", this);
+ this.window = window;
+ setId(ID);
+ setActionDefinitionId(ID);
+ setText(Localization.getString("KernelSourceAction.Insert"));
+ setToolTipText(Localization.getString("KernelSourceAction.InsertSelectedFunction"));
+ window.getSelectionService().addSelectionListener(this);
+ viewer = browser;
+ expandAction = new TreeExpandCollapseAction(KernelBrowserView.class);
+ LogManager.logDebug("End KernelSourceAction:", this);
+ }
+
+ /**
+ * Updates <code>selection</code> with the current selection whenever the user changes
+ * the current selection.
+ */
+ public void selectionChanged(IWorkbenchPart part, ISelection incoming) {
+ if (incoming instanceof IStructuredSelection) {
+ LogManager.logDebug("Changing selection", this);
+ selection = (IStructuredSelection) incoming;
+ setEnabled(selection.size() == 1);
+ } else {
+ LogManager.logDebug("Disabling, selection not IStructuredSelection", this);
+ // Other selections, for example containing text or of other kinds.
+ setEnabled(false);
+ }
+ }
+
+ public void dispose() {
+ LogManager.logInfo("Disposing", this);
+ window.getSelectionService().removeSelectionListener(this);
+ }
+
+ /**
+ * Creates a <code>PathEditorInput</code> for the file specified.
+ * @param file The <code>File</code> to create an input for.
+ * @return A <code>PathEditorInput</code> that represents the requested file.
+ */
+ private IEditorInput createEditorInput(File file) {
+ IPath location= new Path(file.getAbsolutePath());
+ PathEditorInput input= new PathEditorInput(location, window);
+ LogManager.logDebug("createEditorInput: returnVal-" + input, this);
+ return input;
+ }
+
+ /**
+ * Returns the ID of the editor to use for the requested file. Usually returns
+ * <code>CEditor.ID</code> in this code.
+ * @param file The file to get the ID for.
+ * @return The ID for the editor that handles the requested file type.
+ */
+ private String getEditorId(File file) {
+ IWorkbench workbench= window.getWorkbench();
+ IEditorRegistry editorRegistry= workbench.getEditorRegistry();
+ IEditorDescriptor descriptor= editorRegistry.getDefaultEditor(file.getName());
+ if (descriptor != null) {
+ LogManager.logDebug("getEditorId: returnVal-" + descriptor.getId(), this);
+ return descriptor.getId();
+ }
+ LogManager.logDebug("getEditorId: returnVal-...SimpleEditor", this);
+ return "org.eclipse.linuxtools.systemtap.ui.editor.SimpleEditor";
+ }
+
+ /**
+ * The main code body for this action. Causes one of the following to occur:
+ * <ul>
+ * <li>If the selected node is clickable, as specified in <code>TreeNode.isClickable</code>
+ * the browser creates an instance of <code>CEditor</code> on the file specified in the selection
+ * (<code>KernelBrowserView</code>'s tree only marks clickable on files, not folders) and
+ * opens it on the current window</li>
+ * <li>If the selected node is not clickable, the code runs the action specified in
+ * <code>TreeExpandCollapseAction</code></li>
+ * @see org.eclipse.linuxtools.systemtap.ui.ide.editors.c.CEditor
+ * @see TreeNode#isClickable()
+ * @see TreeExpandCollapseAction
+ */
+ public void run() {
+ LogManager.logDebug("Start run", this);
+ IWorkbench wb = PlatformUI.getWorkbench();
+ ISelection incoming = viewer.getViewer().getSelection();
+ IStructuredSelection selection = (IStructuredSelection)incoming;
+ Object o = selection.getFirstElement();
+ if(o instanceof TreeNode) {
+ TreeNode t = (TreeNode)o;
+ if(t.isClickable()) {
+
+ File file = (File)t.getData();
+ if (file != null) {
+ IEditorInput input= createEditorInput(file);
+ String editorId= getEditorId(file);
+ try {
+ IEditorPart editor = wb.getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ if(editor instanceof STPEditor)
+ IDESessionSettings.activeSTPEditor = (STPEditor)editor;
+ wb.getActiveWorkbenchWindow().getActivePage().openEditor(input, editorId);
+ LogManager.logDebug("Editor opened", this);
+ } catch (PartInitException e) {
+ LogManager.logCritical("PartInitException run: " + e.getMessage(), this);
+ }
+
+ }
+ }
+ else
+ {
+
+ expandAction.run();
+ }
+ }
+ LogManager.logDebug("End run", this);
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/ProbeAliasAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/ProbeAliasAction.java
new file mode 100644
index 0000000000..775ccf77ca
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/ProbeAliasAction.java
@@ -0,0 +1,134 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.actions.hidden;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.linuxtools.systemtap.ui.editor.actions.file.NewFileAction;
+import org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.STPEditor;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
+import org.eclipse.linuxtools.systemtap.ui.ide.views.ProbeAliasBrowserView;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.linuxtools.systemtap.ui.structures.TreeNode;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.ISelectionListener;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
+
+
+
+/**
+ * This <code>Action</code> is fired when the user selects an item in the <code>ProbeAliasBrowserView</code>.
+ * The action taken is to insert a template probe in the current <code>STPEditor</code>, if available, or to
+ * insert the probe into a new <code>STPEditor</code> if one does not exist.
+ * @author Henry Hughes
+ * @author Ryan Morse
+ * @see org.eclipse.linuxtools.systemtap.ui.editor.SimpleEditor#insertText(String)
+ * @see org.eclipse.linuxtools.systemtap.ui.ide.views.ProbeAliasBrowserView
+ * @see org.eclipse.jface.action.Action
+ */
+public class ProbeAliasAction extends Action implements ISelectionListener, IWorkbenchAction {
+ private final IWorkbenchWindow window;
+ private final ProbeAliasBrowserView viewer;
+ private static final String ID = "org.eclipse.linuxtools.systemtap.ui.ide.ProbeAliasAction";
+ private IStructuredSelection selection;
+
+ /**
+ * The Default Constructor. Takes the <code>IWorkbenchWindow</code> that it effects
+ * as well as the <code>ProbeAliasBrowserView</code> that will fire this action.
+ * @param window window effected by this event
+ * @param view browser that fires this action
+ */
+ public ProbeAliasAction(IWorkbenchWindow window, ProbeAliasBrowserView view) {
+ LogManager.logInfo("initialized", this);
+ this.window = window;
+ setId(ID);
+ setActionDefinitionId(ID);
+ setText(Localization.getString("ProbeAliasAction.Insert"));
+ setToolTipText(Localization.getString("ProbeAliasAction.InsertSelectedProbe"));
+ window.getSelectionService().addSelectionListener(this);
+ viewer = view;
+ }
+
+ /**
+ * Updates <code>selection</code> with the current selection whenever the user changes
+ * the current selection.
+ */
+ public void selectionChanged(IWorkbenchPart part, ISelection incoming) {
+ if (incoming instanceof IStructuredSelection) {
+ LogManager.logDebug("Changing selection", this);
+ selection = (IStructuredSelection) incoming;
+ setEnabled(selection.size() == 1);
+ } else {
+ LogManager.logDebug("Disabling, selection not IStructuredSelection", this);
+ // Other selections, for example containing text or of other kinds.
+ setEnabled(false);
+ }
+ }
+
+ public void dispose() {
+ window.getSelectionService().removeSelectionListener(this);
+ LogManager.logInfo("disposed", this);
+ }
+
+ /**
+ * The main body of the action. This method checks for the current editor, creating one
+ * if there is no active <code>STPEditor</code>, and then inserts a template probe for the
+ * item that the user clicked on.
+ */
+ public void run() {
+ LogManager.logDebug("Start run:", this);
+ IWorkbenchPage page = window.getActivePage();
+ IEditorPart editor = page.getActiveEditor();
+ if(null == editor) {
+ NewFileAction action = new NewFileAction(page.getWorkbenchWindow());
+ //action.init(page.getWorkbenchWindow());
+ action.run();
+ editor = page.getWorkbenchWindow().getActivePage().getActiveEditor();
+ }
+ ISelection incoming = viewer.getViewer().getSelection();
+ IStructuredSelection selection = (IStructuredSelection)incoming;
+ Object o = selection.getFirstElement();
+ if (o instanceof TreeNode) {
+ TreeNode t = (TreeNode) o;
+ if(editor instanceof STPEditor) {
+ STPEditor stpeditor = (STPEditor)editor;
+ //build the string
+ StringBuilder s = new StringBuilder("\nprobe "+ t.toString());
+ if(!t.isClickable())
+ if(0 <t.getChildCount())
+ s.append(".*");
+ else
+ return;
+ s.append("\n{\n");
+ if(t.isClickable() && t.getChildCount() > 0) {
+ s.append("\t/*\n\t * " +
+ Localization.getString("ProbeAliasAction.AvailableVariables") +
+ "\n\t * ");
+ boolean first = true;
+ for(int i = 0; i < t.getChildCount(); i++) {
+ if(first) first = false;
+ else s.append(", ");
+ s.append(t.getChildAt(i).toString());
+ }
+ s.append("\n\t */\n");
+ }
+ s.append("\n}\n");
+ stpeditor.insertText(s.toString());
+ }
+ }
+ LogManager.logDebug("End run:", this);
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/TreeExpandCollapseAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/TreeExpandCollapseAction.java
new file mode 100644
index 0000000000..8c971c5d84
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/TreeExpandCollapseAction.java
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.actions.hidden;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.linuxtools.systemtap.ui.ide.views.BrowserView;
+import org.eclipse.linuxtools.systemtap.ui.ide.views.FunctionBrowserView;
+import org.eclipse.linuxtools.systemtap.ui.ide.views.KernelBrowserView;
+import org.eclipse.linuxtools.systemtap.ui.ide.views.ProbeAliasBrowserView;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.ui.ISelectionListener;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IViewReference;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
+
+
+/**
+ * This <code>Action</code> expands or collapses the Viewer to the level of the element that the
+ * user selected.
+ * @author Henry Hughes
+ * @author Ryan Morse
+ */
+public class TreeExpandCollapseAction extends Action implements ISelectionListener,IWorkbenchAction {
+ private final IWorkbenchWindow fWindow;
+ private IStructuredSelection selection;
+ @SuppressWarnings("unchecked")
+ private final Class cl;
+
+ /**
+ * The default constructor. Takes a <code>Class</code> representing the viewer that it is to expand
+ * or collapse, as there is only one in the workbench at a time.
+ * @param cls <code>Class</code> of the viewer to expand/collapse
+ */
+ @SuppressWarnings("unchecked")
+ public TreeExpandCollapseAction(Class cls) {
+ super();
+ LogManager.logDebug("Start TreeExpandCollapseAction: cls-" + cls, this);
+ fWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ fWindow.getSelectionService().addSelectionListener(this);
+ cl = cls;
+ LogManager.logDebug("End TreeExpandCollapseAction:", this);
+ }
+
+ /**
+ * Updates <code>selection</code> with the current selection whenever the user changes
+ * the current selection.
+ */
+ public void selectionChanged(IWorkbenchPart part, ISelection incoming) {
+ LogManager.logDebug("Start selectionChanged: part-" + part + ", incoming-" + incoming, this);
+ if (incoming instanceof IStructuredSelection) {
+ selection = (IStructuredSelection) incoming;
+ setEnabled(selection.size() == 1);
+ } else {
+ // Other selections, for example containing text or of other kinds.
+ setEnabled(false);
+ }
+ LogManager.logDebug("End selectionChanged:", this);
+ }
+
+ public void dispose() {
+ LogManager.logDebug("Start dispose:", this);
+ fWindow.getSelectionService().removeSelectionListener(this);
+ LogManager.logDebug("End dispose:", this);
+ }
+
+ /**
+ * The main body of the action. Expands or Collapses the viewer specified at construction to
+ * the level of the current selection.
+ */
+ public void run() {
+ LogManager.logDebug("Start run:", this);
+ if(!(cl.equals(FunctionBrowserView.class) || cl.equals(ProbeAliasBrowserView.class) || cl.equals(KernelBrowserView.class))) {
+ LogManager.logDebug("End run:", this);
+ return;
+ }
+ IViewReference[] references = fWindow.getActivePage().getViewReferences();
+ IViewPart part = null;
+ boolean found = false;
+ for(int i = 0; i < references.length; i++) {
+ part = references[i].getView(false);
+ if(part == null)
+ continue;
+ if(part.getClass().equals(cl)) {
+ found = true;
+ break;
+ }
+ }
+ if(!found) {
+ LogManager.logDebug("End run:", this);
+ return;
+ }
+ if(part == null) {
+ LogManager.logDebug("End run:", this);
+ return;
+ }
+ BrowserView viewer = (BrowserView) part;
+ ISelection incoming = viewer.getViewer().getSelection();
+ IStructuredSelection selection = (IStructuredSelection)incoming;
+ Object o = selection.getFirstElement();
+
+ if(o == null) {
+ LogManager.logDebug("End run:", this);
+ return;
+ }
+
+ Object[] objs = viewer.getViewer().getVisibleExpandedElements();
+ boolean doExpand = true;
+
+ for(int i = 0; i < objs.length; i++)
+ if(objs[i] == o)
+ doExpand = false;
+
+ if(doExpand) {
+ //System.out.println("Attempting to expand at node "+ o.toString());
+ viewer.getViewer().expandToLevel(o,1);
+ } else {
+ //System.out.println("Attempting to collapse at node " + o.toString());
+ viewer.getViewer().collapseToLevel(o,1);
+ }
+ LogManager.logDebug("End run:", this);
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/dialogs/ErrorMessage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/dialogs/ErrorMessage.java
new file mode 100644
index 0000000000..c05a22caa8
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/dialogs/ErrorMessage.java
@@ -0,0 +1,31 @@
+package org.eclipse.linuxtools.systemtap.ui.ide.dialogs;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * Creates and displays an error message box that runs in the UI thread.
+ *
+ */
+public class ErrorMessage {
+ private String title;
+ private String error;
+
+ public ErrorMessage(String title, String error) {
+ this.title = title;
+ this.error = error;
+ }
+
+ public void open() {
+ Display.getDefault().syncExec(new Runnable() {
+ public void run() {
+ MessageBox messageBox = new MessageBox(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.ICON_ERROR | SWT.OK);
+ messageBox.setMessage(error);
+ messageBox.setText(title);
+ messageBox.open();
+ } // end run
+ }); // end new Runnable
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CConfiguration.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CConfiguration.java
new file mode 100644
index 0000000000..84f6aec87b
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CConfiguration.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.editors.c;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextDoubleClickStrategy;
+import org.eclipse.jface.text.TextAttribute;
+import org.eclipse.jface.text.presentation.IPresentationReconciler;
+import org.eclipse.jface.text.presentation.PresentationReconciler;
+import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.text.source.SourceViewerConfiguration;
+import org.eclipse.linuxtools.systemtap.ui.editor.ColorManager;
+import org.eclipse.linuxtools.systemtap.ui.editor.DoubleClickStrategy;
+import org.eclipse.linuxtools.systemtap.ui.editor.NonRuleBasedDamagerRepairer;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
+import org.eclipse.linuxtools.systemtap.ui.ide.preferences.IDEPreferenceConstants;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.swt.graphics.RGB;
+
+
+
+/**
+ * Configures an instance of <code>CEditor</code>. This class is responsible for starting
+ * the Syntax highlighting system.
+ * @author Henry Hughes
+ * @author Ryan Morse
+ */
+public class CConfiguration extends SourceViewerConfiguration {
+ private DoubleClickStrategy doubleClickStrategy;
+ private CScanner scanner;
+ private ColorManager colorManager;
+
+ /**
+ * The constructor for the <code>CConfiguration</code> class. Takes as its only parameter
+ * the ColorManager to use for syntax highlighting.
+ * @param colorManager the <code>ColorManager</code> to use for text highlighting
+ */
+ public CConfiguration(ColorManager colorManager) {
+ LogManager.logDebug("Start/End CConfiguration: colorManager-" + colorManager, this);
+ this.colorManager = colorManager;
+ }
+ public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
+ LogManager.logDebug("Start/End getConfiguredContentTypes: sourceViewer-" + sourceViewer, this);
+ return new String[] {
+ IDocument.DEFAULT_CONTENT_TYPE,
+ CPartitionScanner.C_COMMENT};
+ }
+ public ITextDoubleClickStrategy getDoubleClickStrategy(ISourceViewer sourceViewer, String contentType) {
+ LogManager.logDebug("Start getDoubleClickStrategy: sourceViewer-" + sourceViewer + ", contentType-" + contentType, this);
+ if (doubleClickStrategy == null)
+ doubleClickStrategy = new DoubleClickStrategy();
+ LogManager.logDebug("End getDoubleClickStrategy: returnVal-" + doubleClickStrategy, this);
+ return doubleClickStrategy;
+ }
+
+ /**
+ * An accessor method for the <code>CScanner</code> associated with this editor. This method is used
+ * in order to dispatch notifications to the <code>CScanner</code> when the color preferences have
+ * been changed. The <code>CEditor</code> class calls this method to get the <code>CScanner</code>
+ * associated with it, and then it reinitializes that <code>CScanner</code> using the
+ * <code>CScanner.initializeScanner</code> method.
+ * @return the instance of the CScanner associated with this instance
+ */
+ protected CScanner getCScanner() {
+ LogManager.logDebug("Start getCScanner:", this);
+ if (scanner == null) {
+ scanner = new CScanner(colorManager);
+ }
+ LogManager.logDebug("End getCScanner: returnVal-" + scanner, this);
+ return scanner;
+ }
+
+ public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
+ LogManager.logDebug("Start getPresentationReconciler: sourceViewer-" + sourceViewer, this);
+ PresentationReconciler reconciler = new PresentationReconciler();
+
+ DefaultDamagerRepairer dr = new DefaultDamagerRepairer(getCScanner());
+ reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
+ reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
+ IPreferenceStore store = IDEPlugin.getDefault().getPreferenceStore();
+ RGB comment = PreferenceConverter.getColor(store, IDEPreferenceConstants.P_C_COMMENT_COLOR);
+ NonRuleBasedDamagerRepairer ndr =
+ new NonRuleBasedDamagerRepairer(
+ new TextAttribute(colorManager.getColor(comment)));
+ reconciler.setDamager(ndr, CPartitionScanner.C_COMMENT);
+ reconciler.setRepairer(ndr, CPartitionScanner.C_COMMENT);
+
+ LogManager.logDebug("End getPresentationReconciler: returnVal-" + reconciler, this);
+ return reconciler;
+ }
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CDocumentProvider.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CDocumentProvider.java
new file mode 100644
index 0000000000..023e678240
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CDocumentProvider.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.editors.c;
+
+import org.eclipse.core.runtime.CoreException;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentPartitioner;
+import org.eclipse.jface.text.rules.FastPartitioner;
+import org.eclipse.jface.text.source.AnnotationModel;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.linuxtools.systemtap.ui.editor.SimpleDocumentProvider;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+
+
+
+/**
+ * The DocumentProvider class used when handling documents containing C code.
+ * @see org.eclipse.linuxtools.systemtap.ui.editor.SimpleDocumentProvider
+ * @see org.eclipse.ui.texteditor.AbstractDocumentProvider
+ * @author Henry Hughes
+ * @author Ryan Morse
+ */
+public class CDocumentProvider extends SimpleDocumentProvider {
+ protected void setupDocument(IDocument document) {
+ LogManager.logDebug("Start setupDocument: document-" + document, this);
+ if (document != null) {
+ IDocumentPartitioner partitioner =
+ new FastPartitioner(
+ new CPartitionScanner(),
+ new String[] {CPartitionScanner.C_COMMENT});
+ partitioner.connect(document);
+ document.setDocumentPartitioner(partitioner);
+ }
+ LogManager.logDebug("End setupDocument:", this);
+ }
+
+ protected IAnnotationModel createAnnotationModel(Object element) throws CoreException {
+ LogManager.logDebug("Start/End createAnnotationModel: element-" + element, this);
+ return new AnnotationModel();
+ }
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CEditor.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CEditor.java
new file mode 100644
index 0000000000..2ae69b1199
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CEditor.java
@@ -0,0 +1,346 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.editors.c;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
+import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.source.AnnotationRulerColumn;
+import org.eclipse.jface.text.source.CompositeRuler;
+import org.eclipse.jface.text.source.IVerticalRuler;
+import org.eclipse.jface.text.source.SourceViewer;
+import org.eclipse.jface.text.source.SourceViewerConfiguration;
+import org.eclipse.linuxtools.systemtap.ui.editor.*;
+import org.eclipse.linuxtools.systemtap.ui.editor.actions.file.NewFileAction;
+import org.eclipse.linuxtools.systemtap.ui.ide.IDESessionSettings;
+import org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.STPEditor;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
+import org.eclipse.linuxtools.systemtap.ui.ide.preferences.IDEPreferenceConstants;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.graphics.Cursor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.texteditor.AbstractDecoratedTextEditor;
+
+
+/**
+ * A text editor for the C language.
+ * @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor
+ * @author Henry Hughes
+ * @author Ryan Morse
+ */
+public class CEditor extends AbstractDecoratedTextEditor {
+ private ColorManager colorManager;
+ /**
+ * The handler for doubleclick events on the ruler for this text editor.
+ */
+ private RulerDoubleClickHandler handler = new RulerDoubleClickHandler();
+ public static final String ID = "org.eclipse.linuxtools.systemtap.ui.ide.editors.c.CEditor";
+
+ /**
+ * The <code>RulerDoubleClickHandler</code> handles double click events on the
+ * ruler for this text editor. It first checks to see if the user clicked on a
+ * comment line, then if they clicked on a line that SystemTap can use as a probe
+ * point, and if the line of code passes both checks, it dispatches an event to the
+ * active STPEditor to insert a code block describing the line of code that the user
+ * clicked on.
+ *
+ * The block of code is sent to the STPEditor only under the following circumstances:
+ * <ul>
+ * <li>The line of code is not blank</li>
+ * <li>If the line of code contains a single-line comment, it must not be the only text on that line</li>
+ * <li>The line of code must not fall within a multiline comment</li>
+ * <li>The line of code must be a line that can be used by SystemTap,
+ * determined by running the following:<br/>
+ * <code>stap -p2 -e 'probe kernel.statement("*@filename:linenumber")'</code><br/>
+ * If <code>stap</code> does not generate errors while running the test command, the
+ * line is assumed valid.</li>
+ * </ul>
+ *
+ * If all of the above are met, the active STPEditor listed in <code>IDESessionSettings</code>
+ * is told to insert a template probe for this line of code using the <code>SimpleEditor.insertText</code> method.
+ * If no the returned STPEditor reference is null, the code opens a new editor.
+ *
+ * @author Henry Hughes
+ * @author Ryan Morse
+ * @see org.eclipse.linuxtools.systemtap.ui.editor.SimpleEditor#insertText
+ * @see org.eclipse.linuxtools.systemtap.ui.structures.runnable.Command
+ * @see org.eclipse.swt.events.MouseListener
+ */
+ private class RulerDoubleClickHandler implements MouseListener
+ {
+ /**
+ * The doubleclick event handler method.
+ * @param e The <code>MouseEvent</code> that represents this doubleclick event.
+ */
+ public void mouseDoubleClick(MouseEvent e)
+ {
+ LogManager.logDebug("Start mouseDoubleClick: e-" + e, this);
+ getSite().getShell().setCursor(new Cursor(getSite().getShell().getDisplay(), SWT.CURSOR_WAIT));
+ int lineno = getVerticalRuler().getLineOfLastMouseButtonActivity();
+
+ String s = getSourceViewer().getDocument().get();
+ String[] lines = s.split("\n");
+ String line = lines[lineno].trim();
+ boolean die = false;
+ if("".equals(line)) //eat blank lines
+ die = true;
+ if(line.startsWith("#")) //eat preprocessor directives
+ die = true;
+ if(line.startsWith("//")) //eat C99 comments
+ die = true;
+ if(line.startsWith("/*") && !line.contains("*/") && !line.endsWith("*/")) //try to eat single-line C comments
+ die = true;
+
+ //gogo find comment segments
+ try
+ {
+ ArrayList<Integer> commentChunks = new ArrayList<Integer>();
+ char[] chars = s.toCharArray();
+ int needle = 1;
+ int offset = getSourceViewer().getDocument().getLineOffset(lineno);
+ while (needle < chars.length)
+ {
+ if(chars[needle-1] == '/' && chars[needle] == '*')
+ {
+ commentChunks.add(new Integer(needle));
+ while(needle < chars.length)
+ {
+ if(chars[needle-1] == '*' && chars[needle] == '/')
+ {
+ commentChunks.add(new Integer(needle));
+ needle++;
+ break;
+ }
+ needle++;
+ }
+ }
+ needle++;
+ }
+ for(int i=0, pair, start, end; i < commentChunks.size(); i++)
+ {
+ if(!(((Integer)(commentChunks.get(i))).intValue() < offset))
+ {
+ pair = i - i%2;
+ start = ((Integer)(commentChunks.get(pair))).intValue();
+ end = ((Integer)(commentChunks.get(pair+1))).intValue();
+ if(offset >= start && offset <= end)
+ die=true;
+ }
+ }
+ } catch (Exception excp) {
+ LogManager.logCritical("Exception mouseDoubleClick: " + excp.getMessage(), this);
+ }
+ if(die) {
+ LogManager.logInfo("Initializing", MessageDialog.class);
+ MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ Localization.getString("CEditor.ProbeInsertFailed"),Localization.getString("CEditor.CanNotProbeLine"));
+ LogManager.logInfo("Disposing", MessageDialog.class);
+ } else {
+ IEditorInput in = getEditorInput();
+ if(in instanceof PathEditorInput) {
+ PathEditorInput input = (PathEditorInput)in;
+
+ IPreferenceStore p = IDEPlugin.getDefault().getPreferenceStore();
+ String kernroot = p.getString(IDEPreferenceConstants.P_KERNEL_SOURCE);
+
+ String filepath = input.getPath().toOSString();
+ String kernrelative = filepath.substring(kernroot.length()+1, filepath.length());
+ StringBuffer sb = new StringBuffer();
+
+ sb.append("probe kernel.statement(\"*@"+ kernrelative + ":" + (lineno+1) + "\")");
+
+ /* if(!checkProbe(sb.toString() + "{ }")) {
+ LogManager.logInfo("Initializing", MessageDialog.class);
+ MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ Localization.getString("CEditor.ProbeInsertFailed"),Localization.getString("CEditor.CanNotProbeLine"));
+ LogManager.logInfo("Disposing", MessageDialog.class);
+ } else { */
+ sb.append("\n{\n\t\n}\n");
+ if(null == IDESessionSettings.activeSTPEditor) {
+ NewFileAction action = new NewFileAction();
+ //action.init(input.getMainWindow());
+ action.run();
+ IEditorPart ed = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ if(ed instanceof STPEditor)
+ IDESessionSettings.activeSTPEditor = (STPEditor)ed;
+ }
+ STPEditor editor = IDESessionSettings.activeSTPEditor;
+ if(null != editor)
+ editor.insertText(sb.toString());
+ //}
+ }
+ }
+ getSite().getShell().setCursor(null); //Return the cursor to normal
+ LogManager.logDebug("End mouseDoubleClick:", this);
+ }
+
+ public void mouseDown(MouseEvent e) {
+ }
+ public void mouseUp(MouseEvent e) {
+ }
+ }
+
+ /**
+ * Default Constructor for the <code>CEditor</code> class. Creates an instance of the editor which
+ * is not associated with any given input.
+ */
+ public CEditor() {
+ super();
+ LogManager.logDebug("Start CEditor:", this);
+ internal_init();
+ IDEPlugin.getDefault().getPluginPreferences().addPropertyChangeListener(cColorPropertyChangeListener);
+ LogManager.logDebug("End CEditor:", this);
+ }
+ /**
+ * Part of the initialization routine. Creates the <code>ColorManager</code> used by this editor,
+ * sets up the CConfiguration for this editor, and sets the DocumentProvider to a new
+ * <code>CDocumentProvider</code>.
+ * @see org.eclipse.linuxtools.systemtap.ui.editor.ColorManager
+ * @see org.eclipse.linuxtools.systemtap.ui.ide.editors.c.CConfiguration
+ * @see org.eclipse.linuxtools.systemtap.ui.ide.editors.c.CDocumentProvider
+ * @see org.eclipse.ui.texteditor.AbstractTextEditor#setDocumentProvider(org.eclipse.ui.texteditor.IDocumentProvider)
+ * @see org.eclipse.ui.texteditor.AbstractTextEditor#setSourceViewerConfiguration(org.eclipse.jface.text.source.SourceViewerConfiguration)
+ */
+ protected void internal_init() {
+ LogManager.logDebug("Start internal_init:", this);
+ LogManager.logInfo("Initializing", this);
+ configureInsertMode(SMART_INSERT, false);
+ colorManager = new ColorManager();
+ setSourceViewerConfiguration(new CConfiguration(colorManager));
+ setDocumentProvider(new CDocumentProvider());
+ LogManager.logDebug("End internal_init", this);
+ }
+
+ /**
+ * Runs the probe passed to it as a single-line SystemTap script. Used as a helper method
+ * by the <code>RulerDoubleClickHandler</code> class to check locations in the current file.
+ * @param probe the systemtap probe to test for validity
+ * @return true when the probe is a valid probe
+ */
+ /*private boolean checkProbe(String probe) {
+ LogManager.logDebug("Start checkProbe: probe-" + probe, this);
+ String[] stap = new String[4];
+ stap[0] = "stap";
+ stap[1] = "-p2";
+ stap[2] = "-e";
+ stap[3] = probe;
+ LogManager.logDebug("running " + probe, this);
+
+ Command cmd = new Command(stap, null, null, 0);
+ cmd.start();
+ while(cmd.isRunning()) {
+ try {
+ Thread.sleep(100);
+ } catch(InterruptedException e) {
+ LogManager.logCritical("InterruptedException runStap: " + e.getMessage(), this);
+ }
+ }
+ boolean success = cmd.getReturnValue() == 0;
+ cmd.dispose();
+ LogManager.logDebug("End checkProbe:", this);
+ return success;
+ }*/
+
+ public void dispose() {
+ LogManager.logDebug("Start dispose:", this);
+ LogManager.logInfo("Disposing", this);
+ IDEPlugin.getDefault().getPluginPreferences().removePropertyChangeListener(cColorPropertyChangeListener);
+ colorManager.dispose();
+ super.dispose();
+ LogManager.logDebug("End dispose:", this);
+ }
+
+ protected CompositeRuler createCompositeRuler() {
+ LogManager.logDebug("Start createCompositeRuler:", this);
+ CompositeRuler ruler = new CompositeRuler();
+ AnnotationRulerColumn column = new AnnotationRulerColumn(VERTICAL_RULER_WIDTH, getAnnotationAccess());
+ ruler.addDecorator(0, column);
+
+ if (isLineNumberRulerVisible())
+ ruler.addDecorator(1, createLineNumberRulerColumn());
+ else if (isPrefQuickDiffAlwaysOn())
+ ruler.addDecorator(1, createLineNumberRulerColumn());
+
+ LogManager.logDebug("End createCompositeRuler: returnVal-" + ruler, this);
+ return ruler;
+ }
+
+ public void createPartControl(Composite parent) {
+ LogManager.logDebug("Start createPartControl: parent-" + parent, this);
+ super.createPartControl(parent);
+ IVerticalRuler ruler = this.getVerticalRuler();
+ Control control = ruler.getControl();
+ try {
+ control.addMouseListener(handler);
+ } catch(Exception e) {
+ LogManager.logCritical("Exception createPartControl: " + e.getMessage(), this);
+ }
+ LogManager.logDebug("End createPartControl:", this);
+ }
+
+ /**
+ * Color Preference Change Notification method, called whenever the user has changed preferences
+ * regarding syntax highlighing. This method notifies its internal structures (<code>CScanner</code>,
+ * <code>CConfiguration</code>) that the preferences have changed, and that they need to reconfigure
+ * themselves.
+ */
+ private void notifyColorPrefsChanged()
+ {
+ LogManager.logDebug("Start notifyColorPrefsChanged:", this);
+ SourceViewerConfiguration svc = getSourceViewerConfiguration();
+ if(!(svc instanceof CConfiguration)) {
+ LogManager.logDebug("End notifyColorPrefsChanged:", this);
+ return;
+ }
+ CConfiguration config = (CConfiguration)svc;
+ CScanner scanner = config.getCScanner();
+ scanner.initializeScanner();
+
+ SourceViewer viewer = (SourceViewer)getSourceViewer();
+ viewer.unconfigure();
+ viewer.configure(svc);
+ viewer.invalidateTextPresentation();
+ viewer.refresh();
+ LogManager.logDebug("End notifyColorPrefsChanged:", this);
+ }
+
+ /**
+ * Detects changes in the preferences relating to the C Editor's syntax highlighting, and
+ * fires the <code>notifyColorPrefsChanged</code> method when a change has occured.
+ * @see #notifyColorPrefsChanged()
+ */
+ private final IPropertyChangeListener cColorPropertyChangeListener = new IPropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent event) {
+ LogManager.logDebug("Start propertyChange: event-" + event, this);
+ if(event.getProperty().equals(IDEPreferenceConstants.P_C_COMMENT_COLOR) ||
+ event.getProperty().equals(IDEPreferenceConstants.P_C_DEFAULT_COLOR) ||
+ event.getProperty().equals(IDEPreferenceConstants.P_C_KEYWORD_COLOR) ||
+ event.getProperty().equals(IDEPreferenceConstants.P_C_PREPROCESSOR_COLOR) ||
+ event.getProperty().equals(IDEPreferenceConstants.P_C_STRING_COLOR) ||
+ event.getProperty().equals(IDEPreferenceConstants.P_C_TYPE_COLOR)) {
+ notifyColorPrefsChanged();
+ }
+ LogManager.logDebug("End propertyChange: event-" + event, this);
+ }
+ };
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CPartitionScanner.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CPartitionScanner.java
new file mode 100644
index 0000000000..8a2297b607
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CPartitionScanner.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.editors.c;
+
+import org.eclipse.jface.text.rules.IPredicateRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.MultiLineRule;
+import org.eclipse.jface.text.rules.RuleBasedPartitionScanner;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+
+
+/**
+ * This class is the Partition Scanner used by the CEditor. It is responsible for
+ * detecting a multiline C comment and partitioning it to type <code>C_COMMENT</code>
+ * so that the <code>CScanner</code> can highlight multiline comments.
+ * @author Henry Hughes
+ * @author Ryan Morse
+ * @see org.eclipse.jface.text.rules.RuleBasedPartitionScanner
+ */
+public class CPartitionScanner extends RuleBasedPartitionScanner {
+ public final static String C_DEFAULT = "__stp_default";
+ public final static String C_COMMENT = "__stp_comment";
+
+ public CPartitionScanner() {
+ LogManager.logDebug("Start CPartitionScanner:", this);
+ IToken stpComment = new Token(C_COMMENT);
+ IPredicateRule[] rules = new IPredicateRule[1];
+ rules[0] = new MultiLineRule("/*", "*/", stpComment);
+ setPredicateRules(rules);
+ LogManager.logDebug("End CPartitionScanner:", this);
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CScanner.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CScanner.java
new file mode 100644
index 0000000000..65153b48d2
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CScanner.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.editors.c;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.jface.text.TextAttribute;
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.jface.text.rules.*;
+import org.eclipse.linuxtools.systemtap.ui.editor.ColorManager;
+import org.eclipse.linuxtools.systemtap.ui.editor.WhitespaceDetector;
+import org.eclipse.linuxtools.systemtap.ui.editor.WordDetector;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
+import org.eclipse.linuxtools.systemtap.ui.ide.preferences.IDEPreferenceConstants;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.RGB;
+
+
+
+/**
+ * This class provides syntax highlighting functionality to <code>CEditor</code>. It uses a simple rule-based
+ * scanning system.
+ * @author Henry Hughes
+ * @author Ryan Morse
+ */
+public class CScanner extends RuleBasedScanner {
+
+ private static String[] fgKeywords= {"auto","break","case","const","continue","default","do","else","extern","for","goto","if","return","signed","sizeof","static","switch","typedef","unsigned","volatile","while" };
+ private static String[] fgTypes= { "char","double","enum","float","int","long","register","short","struct","union","void",
+ "char*","double*","float*","int*","long*","short*","void*","u8","u16","u32","u64",
+ "s8","s16","s32",""};
+ private static String[] fgConstants= { "NULL" };
+ private ColorManager manager;
+ public CScanner(ColorManager manager) {
+ LogManager.logDebug("Start CScanner: manager-" + manager, this);
+ this.manager = manager;
+ initializeScanner();
+ LogManager.logDebug("End CScanner:", this);
+ }
+
+ /**
+ * This method initializes this instance of <code>CScanner</code>, allowing it to be used
+ * for syntax highlighting purposes by the editor.
+ */
+ public void initializeScanner()
+ {
+ LogManager.logDebug("Start initializeScanner:", this);
+ IPreferenceStore store = IDEPlugin.getDefault().getPreferenceStore();
+ RGB cKeyword, cType, cString, cComment, cDefault, cPreprocessor;
+
+ cKeyword = PreferenceConverter.getColor(store, IDEPreferenceConstants.P_C_KEYWORD_COLOR);
+ cType = PreferenceConverter.getColor(store, IDEPreferenceConstants.P_C_TYPE_COLOR);
+ cString = PreferenceConverter.getColor(store, IDEPreferenceConstants.P_C_STRING_COLOR);
+ cComment = PreferenceConverter.getColor(store, IDEPreferenceConstants.P_C_COMMENT_COLOR);
+ cDefault = PreferenceConverter.getColor(store, IDEPreferenceConstants.P_C_DEFAULT_COLOR);
+ cPreprocessor = PreferenceConverter.getColor(store, IDEPreferenceConstants.P_C_PREPROCESSOR_COLOR);
+
+ IToken keyword = new Token(new TextAttribute(manager.getColor(cKeyword), null, SWT.BOLD));
+ IToken type = new Token(new TextAttribute(manager.getColor(cType)));
+ IToken string = new Token(new TextAttribute(manager.getColor(cString)));
+ IToken comment = new Token(new TextAttribute(manager.getColor(cComment)));
+ IToken other = new Token(new TextAttribute(manager.getColor(cDefault)));
+ IToken preprocessor = new Token(new TextAttribute(manager.getColor(cPreprocessor)));
+ /* IToken procInstr =
+ new Token(
+ new TextAttribute(
+ manager.getColor(ICColorConstants.PROC_INSTR)));*/
+
+ List<IRule> rules= new ArrayList<IRule>();
+
+ // Add rules for single line comments.
+ rules.add(new EndOfLineRule("//", comment)); //$NON-NLS-1$
+
+ rules.add(new SingleLineRule("#", " ", preprocessor));
+ // Add rule for strings and character constants.
+ rules.add(new SingleLineRule("\"", "\"", string, '\\')); //$NON-NLS-2$ //$NON-NLS-1$
+ rules.add(new SingleLineRule("'", "'", string, '\\')); //$NON-NLS-2$ //$NON-NLS-1$
+
+ // Add generic whitespace rule.
+ rules.add(new WhitespaceRule(new WhitespaceDetector()));
+
+ // Add word rule for keywords, types, and constants.
+ WordRule wordRule= new WordRule(new WordDetector(), other);
+ for (int i= 0; i < fgKeywords.length; i++)
+ wordRule.addWord(fgKeywords[i], keyword);
+ for (int i= 0; i < fgTypes.length; i++)
+ wordRule.addWord(fgTypes[i], type);
+ for (int i= 0; i < fgConstants.length; i++)
+ wordRule.addWord(fgConstants[i], type);
+ rules.add(wordRule);
+
+ IRule[] result= new IRule[rules.size()];
+ setDefaultReturnToken(other);
+ rules.toArray(result);
+ setRules(result);
+
+ LogManager.logDebug("End initializeScanner:", this);
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/ICColorConstants.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/ICColorConstants.java
new file mode 100644
index 0000000000..dc3da06a31
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/ICColorConstants.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.editors.c;
+
+import org.eclipse.swt.graphics.RGB;
+
+/**
+ * This interface defines the constant colors that are used for syntax highlighting inside
+ * <code>CEditor</code>
+ * @author Ryan Morse
+ */
+public interface ICColorConstants {
+ RGB COMMENT= new RGB(0, 128, 0);
+ RGB PREPROCESSOR = new RGB(180,56,231);
+ RGB KEYWORD= new RGB(127, 0, 85);
+ RGB TYPE= new RGB(0, 0, 128);
+ RGB STRING= new RGB(0, 0, 255);
+ RGB DEFAULT= new RGB(0, 0, 0);
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPColorConstants.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPColorConstants.java
new file mode 100644
index 0000000000..29e46a2335
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPColorConstants.java
@@ -0,0 +1,24 @@
+/* Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
+ *
+ * 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:
+ * Phil Muldoon <pkmuldoon@picobot.org> - initial API and implementation.
+ *******************************************************************************/
+package org.eclipse.linuxtools.systemtap.ui.ide.editors.stp;
+
+import org.eclipse.swt.graphics.RGB;
+
+public interface STPColorConstants {
+ RGB KEYWORD = new RGB(127, 0, 85);
+ RGB COMMENT = new RGB(63, 127, 95);
+ RGB STP_STRING = new RGB(0, 0, 255);
+ RGB DEFAULT = new RGB(0, 0, 0);
+ RGB EMBEDDED = new RGB (0, 64, 64);
+ RGB EMBEDDEDC = new RGB (0, 64, 64);
+ RGB TYPE= new RGB(0, 0, 128);
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPCompletionProcessor.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPCompletionProcessor.java
new file mode 100644
index 0000000000..042cb2a7a0
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPCompletionProcessor.java
@@ -0,0 +1,159 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
+ *
+ * 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:
+ * Phil Muldoon <pkmuldoon@picobot.org> - initial API and implementation.
+ *******************************************************************************/
+package org.eclipse.linuxtools.systemtap.ui.ide.editors.stp;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.contentassist.CompletionProposal;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.jface.text.contentassist.IContextInformationValidator;
+
+class STPCompletionProcessor implements IContentAssistProcessor {
+
+ private final IContextInformation[] NO_CONTEXTS = new IContextInformation[0];
+ private final char[] PROPOSAL_ACTIVATION_CHARS = new char[] { '.' };
+ private ICompletionProposal[] NO_COMPLETIONS = new ICompletionProposal[0];
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeCompletionProposals(org.eclipse.jface.text.ITextViewer, int)
+ */
+ public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer,
+ int offset) {
+
+ IDocument document = viewer.getDocument();
+
+ String prefix;
+ int locationOffset =0;
+
+ // Get completion hint from document
+ try {
+ prefix = completionWord(document, offset);
+ locationOffset = completionReplaceWordLocation(document, offset);
+ } catch (Exception e) {
+ return NO_COMPLETIONS;
+ }
+
+ // If cannot find a place to replace our partial typed completion
+ // with the full one, abort with no completions.
+ if (locationOffset < 0)
+ return NO_COMPLETIONS;
+
+ String[] completionData = STPMetadataSingleton.getCompletionResults(prefix);
+
+ // If cannot find any completions
+ // abort with no completions.
+ if (completionData.length < 1)
+ return NO_COMPLETIONS;
+
+ // Build proposals and submit
+ ICompletionProposal[] result = new ICompletionProposal[completionData.length];
+ for (int i = 0; i < completionData.length; i++)
+ result[i] = new CompletionProposal(
+ completionData[i].substring(offset - locationOffset),
+ offset, 0, completionData[i].length(), null,
+ completionData[i], null, null);
+ return result;
+ }
+
+ /**
+ *
+ * Compute location of completion proposal insertion.
+ *
+ * @param doc - document to insert completion.
+ * @param offset - offset of where completion hint was first generated.
+ * @return - offset into document for completion proposal insertion.
+ * @throws BadLocationException
+ *
+ */
+ private int completionReplaceWordLocation(IDocument doc, int offset)
+ throws BadLocationException {
+ try {
+ for (int n = offset-1; n >= 0; n--) {
+ if (doc.getChar(n) == '.')
+ return n+1;
+ }
+ } catch (BadLocationException e) {
+ throw e;
+ }
+
+ return -1;
+ }
+
+ /**
+ *
+ * Return the word the user wants to submit for completion proposals.
+ *
+ * @param doc - document to insert completion.
+ * @param offset - offset of where completion hint was first generated.
+ * @return - word to generate completion proposals.
+ *
+ * @throws BadLocationException
+ */
+ private String completionWord(IDocument doc, int offset)
+ throws BadLocationException {
+ try {
+ for (int n = offset - 1; n >= 0; n--) {
+ char c = doc.getChar(n);
+ if ((Character.isSpaceChar(c)) || (c == '\n') || (c == '\0')) {
+ String word = doc.get(n + 1, offset - n - 1);
+ if (word.charAt(word.length() - 1) == '.')
+ return word.substring(0, word.length() - 1);
+ else
+ return word;
+ }
+ }
+ } catch (BadLocationException e) {
+ throw e;
+ }
+ return "";
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeContextInformation(org.eclipse.jface.text.ITextViewer, int)
+ */
+ public IContextInformation[] computeContextInformation(ITextViewer viewer,
+ int offset) {
+ return NO_CONTEXTS;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getCompletionProposalAutoActivationCharacters()
+ */
+ public char[] getCompletionProposalAutoActivationCharacters() {
+ return PROPOSAL_ACTIVATION_CHARS;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationAutoActivationCharacters()
+ */
+ public char[] getContextInformationAutoActivationCharacters() {
+ return PROPOSAL_ACTIVATION_CHARS;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationValidator()
+ */
+ public IContextInformationValidator getContextInformationValidator() {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getErrorMessage()
+ */
+ public String getErrorMessage() {
+ // TODO: When does this trigger?
+ return "Error.";
+ }
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPConfiguration.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPConfiguration.java
new file mode 100644
index 0000000000..69b48edbf3
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPConfiguration.java
@@ -0,0 +1,144 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
+ *
+ * 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:
+ * Phil Muldoon <pkmuldoon@picobot.org> - initial API and implementation.
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.editors.stp;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextDoubleClickStrategy;
+import org.eclipse.jface.text.TextAttribute;
+import org.eclipse.jface.text.contentassist.ContentAssistant;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.text.contentassist.IContentAssistant;
+import org.eclipse.jface.text.presentation.IPresentationReconciler;
+import org.eclipse.jface.text.presentation.PresentationReconciler;
+import org.eclipse.jface.text.reconciler.IReconciler;
+import org.eclipse.jface.text.reconciler.MonoReconciler;
+import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.text.source.SourceViewerConfiguration;
+import org.eclipse.linuxtools.systemtap.ui.editor.ColorManager;
+import org.eclipse.linuxtools.systemtap.ui.editor.DoubleClickStrategy;
+
+public class STPConfiguration extends SourceViewerConfiguration {
+
+ private STPElementScanner scanner;
+ private ColorManager colorManager;
+ private STPEditor editor;
+ private DoubleClickStrategy doubleClickStrategy;
+
+ public STPConfiguration(ColorManager colorManager, STPEditor editor) {
+ this.colorManager = colorManager;
+ this.editor = editor;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getConfiguredContentTypes(org.eclipse.jface.text.source.ISourceViewer)
+ */
+ @Override
+ public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
+ return new String[] {
+ IDocument.DEFAULT_CONTENT_TYPE,
+ STPPartitionScanner. STP_COMMENT,
+ STPPartitionScanner.STP_STRING};
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getContentAssistant(org.eclipse.jface.text.source.ISourceViewer)
+ */
+ @Override
+ public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
+ ContentAssistant assistant = new ContentAssistant();
+
+ assistant.enableAutoActivation(true);
+ assistant.setAutoActivationDelay(500);
+ assistant.setProposalPopupOrientation(IContentAssistant.PROPOSAL_OVERLAY);
+ assistant
+ .setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_ABOVE);
+ IContentAssistProcessor processor = new STPCompletionProcessor();
+ assistant.setContentAssistProcessor(processor,IDocument.DEFAULT_CONTENT_TYPE);
+ assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));
+ return assistant;
+ }
+
+ /**
+ * Return the default Element scanner.
+ *
+ * @return default element scanner.
+ */
+ protected STPElementScanner getSTPScanner() {
+ if (scanner == null) {
+ scanner = new STPElementScanner(colorManager);
+ scanner.setDefaultReturnToken(new Token(new TextAttribute(
+ colorManager.getColor(STPColorConstants.DEFAULT))));
+ }
+ return scanner;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getReconciler(org.eclipse.jface.text.source.ISourceViewer)
+ *
+ * Return the reconciler built on the custom Systemtap reconciling strategy that enables code folding for this editor.
+ */
+ @Override
+ public IReconciler getReconciler(ISourceViewer sourceViewer)
+ {
+ STPReconcilingStrategy strategy = new STPReconcilingStrategy();
+ strategy.setEditor(editor);
+ MonoReconciler reconciler = new MonoReconciler(strategy,false);
+ return reconciler;
+ }
+
+ /**
+ * Instantiates and returns a double click strategy object if one does not exist, and returns the
+ * current one if it does.
+ */
+ public ITextDoubleClickStrategy getDoubleClickStrategy(ISourceViewer sourceViewer,String contentType) {
+ if (doubleClickStrategy == null)
+ doubleClickStrategy = new DoubleClickStrategy();
+ return doubleClickStrategy;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getPresentationReconciler(org.eclipse.jface.text.source.ISourceViewer)
+ */
+ @Override
+ public IPresentationReconciler getPresentationReconciler(
+ ISourceViewer sourceViewer) {
+
+ PresentationReconciler reconciler = new PresentationReconciler();
+
+ DefaultDamagerRepairer dr = new DefaultDamagerRepairer(getSTPScanner());
+ reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
+ reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
+
+ dr = new DefaultDamagerRepairer(getSTPScanner());
+ reconciler.setDamager(dr, STPPartitionScanner.STP_COMMENT);
+ reconciler.setRepairer(dr, STPPartitionScanner.STP_COMMENT);
+
+ dr = new DefaultDamagerRepairer(getSTPScanner());
+ reconciler.setDamager(dr, STPPartitionScanner.STP_STRING);
+ reconciler.setRepairer(dr, STPPartitionScanner.STP_STRING);
+
+ dr = new DefaultDamagerRepairer(getSTPScanner());
+ reconciler.setDamager(dr, STPPartitionScanner.STP_KEYWORD);
+ reconciler.setRepairer(dr, STPPartitionScanner.STP_KEYWORD);
+
+ dr = new DefaultDamagerRepairer(getSTPScanner());
+ reconciler.setDamager(dr, STPPartitionScanner.STP_CONDITIONAL);
+ reconciler.setRepairer(dr, STPPartitionScanner.STP_CONDITIONAL);
+
+ return reconciler;
+ }
+
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPDocumentProvider.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPDocumentProvider.java
new file mode 100644
index 0000000000..2f724a1a7b
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPDocumentProvider.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
+ *
+ * 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:
+ * Phil Muldoon <pkmuldoon@picobot.org> - initial API and implementation.
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.editors.stp;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentPartitioner;
+import org.eclipse.jface.text.rules.FastPartitioner;
+import org.eclipse.jface.text.source.AnnotationModel;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.linuxtools.systemtap.ui.editor.SimpleDocumentProvider;
+import org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.STPPartitioner;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+
+public class STPDocumentProvider extends SimpleDocumentProvider {
+ private IDocument document;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.editors.text.TextFileDocumentProvider#getDocument(java.lang.Object)
+ */
+ @Override
+ /*public IDocument getDocument(Object element) {
+ document = super.getDocument(element);
+ if (document != null) {
+ STPPartitioner partitioner = new STPPartitioner(
+ new STPPartitionScanner(),
+ STPPartitionScanner.STP_PARTITION_TYPES);
+
+ partitioner.connect(document, false);
+ if (document.getDocumentPartitioner() == null)
+ document.setDocumentPartitioner(partitioner);
+ }
+ return document;
+ }*/
+
+ protected void setupDocument(IDocument document) {
+ LogManager.logDebug("Start setupDocument: document-" + document, this);
+ if (document != null) {
+ IDocumentPartitioner partitioner =
+ new FastPartitioner(
+ new STPPartitionScanner(),
+ new String[] {
+ STPPartitionScanner.STP_COMMENT});
+ partitioner.connect(document);
+ document.setDocumentPartitioner(partitioner);
+ }
+ LogManager.logDebug("End setupDocument:", this);
+ }
+
+ /**
+ * Instantiates and returns a new AnnotationModel object.
+ */
+ protected IAnnotationModel createAnnotationModel(Object element) throws CoreException {
+ LogManager.logDebug("Start/End createAnnotationModel: element-" + element, this);
+ return new AnnotationModel();
+ }
+
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPEditor.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPEditor.java
new file mode 100644
index 0000000000..8459da82e3
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPEditor.java
@@ -0,0 +1,163 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
+ *
+ * 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:
+ * Phil Muldoon <pkmuldoon@picobot.org> - initial API.
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.editors.stp;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.ResourceBundle;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.text.source.IVerticalRuler;
+import org.eclipse.jface.text.source.projection.ProjectionAnnotation;
+import org.eclipse.jface.text.source.projection.ProjectionAnnotationModel;
+import org.eclipse.jface.text.source.projection.ProjectionSupport;
+import org.eclipse.jface.text.source.projection.ProjectionViewer;
+import org.eclipse.linuxtools.systemtap.ui.editor.ColorManager;
+import org.eclipse.linuxtools.systemtap.ui.editor.SimpleEditor;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.texteditor.ContentAssistAction;
+import org.eclipse.ui.texteditor.ITextEditorActionConstants;
+import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
+
+public class STPEditor extends SimpleEditor {
+
+ private ColorManager colorManager;
+
+ private ProjectionSupport stpProjectionSupport;
+ private Annotation[] stpOldAnnotations;
+ private ProjectionAnnotationModel stpAnnotationModel;
+
+ public STPEditor() {
+ super();
+ URL completionURL = null;
+
+ completionURL = buildCompletionDataLocation("completion/stp_completion.properties");
+ STPMetadataSingleton completionDataStore = STPMetadataSingleton.getInstance();
+
+ if (completionURL != null)
+ completionDataStore.build(completionURL);
+
+ colorManager = new ColorManager();
+ setSourceViewerConfiguration(new STPConfiguration(colorManager,this));
+ setDocumentProvider(new STPDocumentProvider());
+ }
+
+ public void createPartControl(Composite parent)
+ {
+ super.createPartControl(parent);
+ ProjectionViewer viewer =(ProjectionViewer)getSourceViewer();
+ stpProjectionSupport = new ProjectionSupport(viewer,getAnnotationAccess(),getSharedColors());
+ stpProjectionSupport.install();
+ viewer.doOperation(ProjectionViewer.TOGGLE);
+ stpAnnotationModel = viewer.getProjectionAnnotationModel();
+ }
+
+ protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
+
+ ISourceViewer viewer = new ProjectionViewer(parent, ruler,
+ getOverviewRuler(), isOverviewRulerVisible(), styles);
+ getSourceViewerDecorationSupport(viewer);
+ return viewer;
+ }
+
+
+ public void updateFoldingStructure(ArrayList<Position> updatedPositions)
+ {
+ ProjectionAnnotation annotation;
+ Annotation[] updatedAnnotations = new Annotation[updatedPositions.size()];
+ HashMap<ProjectionAnnotation, Position> newAnnotations = new HashMap<ProjectionAnnotation, Position>();
+ for(int i =0;i<updatedPositions.size();i++)
+ {
+ annotation = new ProjectionAnnotation();
+ newAnnotations.put(annotation,updatedPositions.get(i));
+ updatedAnnotations[i]=annotation;
+ }
+ stpAnnotationModel.modifyAnnotations(stpOldAnnotations,newAnnotations,null);
+ stpOldAnnotations = updatedAnnotations;
+ }
+
+ protected void createActions() {
+ Action action = new ContentAssistAction(ResourceBundle.getBundle("org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.strings"), "ContentAssistProposal.", this);
+ String id = ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS;
+ action.setActionDefinitionId(id);
+ setAction("ContentAssistProposal", action);
+ markAsStateDependentAction("ContentAssistProposal", true);
+ super.createActions();
+ }
+
+ public ISourceViewer getMySourceViewer() {
+ return this.getSourceViewer();
+ }
+
+ public void dispose() {
+ colorManager.dispose();
+ super.dispose();
+ }
+
+ protected void editorContextMenuAboutToShow(IMenuManager menu) {
+
+ super.editorContextMenuAboutToShow(menu);
+ addAction(menu, ITextEditorActionConstants.GROUP_EDIT,
+ ITextEditorActionConstants.SHIFT_RIGHT);
+ addAction(menu, ITextEditorActionConstants.GROUP_EDIT,
+ ITextEditorActionConstants.SHIFT_LEFT);
+
+ }
+
+ private URL buildCompletionDataLocation(String completionDataLocation) {
+ URL completionURLLocation = null;
+ try {
+ completionURLLocation = getCompletionURL(completionDataLocation);
+ } catch (IOException e) {
+ completionURLLocation = null;
+ }
+
+ if (completionURLLocation == null) {
+ IDEPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, IDEPlugin.PLUGIN_ID,
+ IStatus.OK, "Cannot locate plug-in location for System Tap completion metadata " +
+ "(completion/stp_completion.properties). Completions are not available.", null));
+ return null;
+ }
+
+ File completionFile = new File(completionURLLocation.getFile());
+ if ((completionFile == null) || (!completionFile.exists()) || (!completionFile.canRead())) {
+ IDEPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, IDEPlugin.PLUGIN_ID,
+ IStatus.OK, "Cannot find System Tap completion metadata at " +completionFile.getPath() +
+ "Completions are not available.", null));
+
+ return null;
+ }
+
+ return completionURLLocation;
+
+ }
+ private URL getCompletionURL(String completionLocation) throws IOException {
+ URL fileURL = null;
+ URL location = IDEPlugin.getDefault().getBundle().getEntry(completionLocation);
+
+ if (location != null)
+ fileURL = FileLocator.toFileURL(location);
+ return fileURL;
+ }
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPElementScanner.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPElementScanner.java
new file mode 100644
index 0000000000..719e521ad9
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPElementScanner.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
+ *
+ * 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:
+ * Phil Muldoon <pkmuldoon@picobot.org> - initial API and implementation.
+ *******************************************************************************/
+package org.eclipse.linuxtools.systemtap.ui.ide.editors.stp;
+
+
+import org.eclipse.jface.text.TextAttribute;
+import org.eclipse.jface.text.rules.BufferedRuleBasedScanner;
+import org.eclipse.jface.text.rules.EndOfLineRule;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.IWhitespaceDetector;
+import org.eclipse.jface.text.rules.IWordDetector;
+import org.eclipse.jface.text.rules.MultiLineRule;
+import org.eclipse.jface.text.rules.SingleLineRule;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.jface.text.rules.WhitespaceRule;
+import org.eclipse.jface.text.rules.WordRule;
+import org.eclipse.linuxtools.systemtap.ui.editor.ColorManager;
+import org.eclipse.swt.SWT;
+
+public class STPElementScanner extends BufferedRuleBasedScanner {
+
+ private String[] keywordList= {"probe", "for", "else", "foreach", "exit", "printf", "in", "return",
+ "break", "global", "next", "while", "if", "delete", "#include", "function", "do",
+ "print", "error","log", "printd", "printdln", "println", "sprint", "sprintf", "system", "warn"};
+
+
+// TODO: Not sure if we want these keywords or not. Defer for now.
+// "backtrace", "caller", "caller_addr", "cpu", "egid", "euid", "execname", "gid", "is_return",
+// "pexecname", "pid", "ppid", "tid", "uid", "print_backtrace", "print_regs", "print_stack",
+// "stack_size", "stack_unused", "stack_used", "stp_pid", "target"};
+
+ /**
+ *
+ * Build Element scanner for Syntax Highlighting for Systemtap Editor
+ *
+ * @param manager ColorManager to source highlighting.
+ *
+ */
+ public STPElementScanner(ColorManager manager) {
+ IToken defaultToken = new Token(new TextAttribute(manager
+ .getColor(STPColorConstants.DEFAULT)));
+
+ IToken keywordToken = new Token(new TextAttribute(manager
+ .getColor(STPColorConstants.KEYWORD),null,SWT.BOLD));
+
+ IToken commentToken = new Token(new TextAttribute(manager
+ .getColor(STPColorConstants.COMMENT)));
+
+ IToken stringToken = new Token(new TextAttribute(manager
+ .getColor(STPColorConstants.STP_STRING)));
+
+
+ // Build keyword scanner
+ WordRule keywordsRule = new WordRule(new IWordDetector() {
+
+ public boolean isWordStart(char c) {
+ // probe kernel.function("schedule") is a valid name in
+ // Systemtap, but we do not want to highlight the function
+ // here as a keyword. Same with foo.return and so on.
+ if (c == '.') {
+ return true;
+ }
+
+ return Character.isJavaIdentifierStart(c);
+ }
+
+ public boolean isWordPart(char c) {
+ // Set isWordStart for . rule.
+ if (c == '.') {
+ return true;
+ }
+
+ return Character.isJavaIdentifierPart(c);
+ }
+
+ }, defaultToken, true);
+
+ for (int i=0; i<keywordList.length; i++)
+ keywordsRule.addWord(keywordList[i], keywordToken);
+
+ setRules(new IRule[] {
+ new MultiLineRule("/*", "*/", commentToken),
+ new EndOfLineRule("/*", commentToken),
+ new EndOfLineRule("#", commentToken),
+ new EndOfLineRule("//", commentToken),
+ new EndOfLineRule("#if", defaultToken),
+ new EndOfLineRule("#else", defaultToken),
+ new EndOfLineRule("#endif", defaultToken),
+ new EndOfLineRule("#define", defaultToken),
+ new SingleLineRule("\"", "\"", stringToken, '\\'),
+ new SingleLineRule("'", "'", stringToken, '\\'),
+ keywordsRule,
+ new WhitespaceRule(new IWhitespaceDetector() {
+ public boolean isWhitespace(char c) {
+ return Character.isWhitespace(c);
+ }
+ }),
+ });
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPMetadataSingleton.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPMetadataSingleton.java
new file mode 100644
index 0000000000..48bb3adf4b
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPMetadataSingleton.java
@@ -0,0 +1,305 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
+ *
+ * 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:
+ * Phil Muldoon <pkmuldoon@picobot.org> - initial API and implementation.
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.editors.stp;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.PrintStream;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.ResourceBundle;
+
+/**
+ *
+ * Build and hold completion metadata fo Systemtap. This originally is generated from stap coverage data
+ *
+ *
+ */
+
+// TODO: Generate a strategy to determine when meta-data is older than what is currently available. Right now
+// the generation of new meta-data is too slow to do this efficiently.
+public class STPMetadataSingleton {
+
+
+ private static STPMetadataSingleton instance = null;
+ private static HashMap<String, ArrayList<String>> builtMetadata = new HashMap<String, ArrayList<String>>();
+
+ private static boolean barLookups = false;
+
+ // Not a true singleton, but enough for the simplistic purpose
+ // it has to serve.
+ protected STPMetadataSingleton() {
+ }
+
+ public static STPMetadataSingleton getInstance() {
+ if (instance == null) {
+ instance = new STPMetadataSingleton();
+ }
+ return instance;
+ }
+
+ /**
+ * Given the parameter return the completion proposals that best match the data.
+ *
+ * @param match - completion hint.
+ *
+ * @return - completion proposals.
+ *
+ */
+ public static String[] getCompletionResults(String match) {
+
+ ArrayList<String> data = new ArrayList<String>();
+
+ // TODO: Until an error strategy is devised to better inform
+ // the user that there was a problem compiling completions other than
+ // a modal error dialog, or a log message use this.
+ if (barLookups)
+ return new String[] {"No completion data found."};
+
+ // Check to see if the proposal hint included a <tapset>.<partialprobe>
+ // or just a <probe>. (ie syscall. or syscall.re).
+ boolean tapsetAndProbeIncluded = isTapsetAndProbe(match);
+
+ // If the result is a tapset and partial probe, get the tapset, then
+ /// narrow down the list with partial probe matches.
+ if (tapsetAndProbeIncluded) {
+ ArrayList<String> temp = builtMetadata.get(getTapset(match));
+ String probe = getTapsetProbe(match);
+ for (int i=0; i<temp.size(); i++) {
+ if (temp.get(i).startsWith(probe)) {
+ data.add(temp.get(i));
+ }
+ }
+ }
+ // If the result was a <tapset>, return all <probe> matches.
+ else
+ data = builtMetadata.get(match);
+
+ if (data == null)
+ return new String[] {};
+ else
+ return data.toArray(new String[0]);
+ }
+
+ /**
+ *
+ * From the file, read the metadata. The data follows the format of
+ *
+ * <tapset>.<probe>(<parameter list>)
+ *
+ * ie
+ *
+ * tcp.disconnect(name:string,sock:long,flags:long)
+ * @param fileURL
+
+ * @throws IOException
+ *
+ */
+ private void readCompletionMetadata(URL fileURL) throws IOException {
+ try {
+ BufferedReader input = new BufferedReader(new FileReader(new File(fileURL.getFile())));
+ try {
+ String line = null;
+ while ((line = input.readLine()) != null) {
+ String tapset = "";
+ String probe = "";
+ try {
+ tapset = getTapset(line);
+ probe = getTapsetProbe(line);
+ } catch (Exception e) {
+ continue;
+ }
+ ArrayList<String> data = builtMetadata.get(tapset);
+ if (data == null)
+ data = new ArrayList<String>();
+
+ data.add(probe);
+ builtMetadata.put(tapset, data);
+ }
+ } finally {
+ input.close();
+ }
+ } catch (IOException ex) {
+ throw ex;
+ }
+ }
+
+ /**
+ * Given data, decide whether it is comprised of a <tapset>.<probe>
+ * hint, or just a <tapset>.
+ *
+ * @param data - hint data
+ * @return
+ */
+ private static boolean isTapsetAndProbe(String data) {
+ if (data.indexOf('.') >= 0)
+ return true;
+
+ return false;
+ }
+
+ /**
+ * Given data, extract <tapset>
+ *
+ * @param data - hint data
+ * @return
+ */
+ private static String getTapset(String data) {
+ int i = data.indexOf('.');
+ if (i < 0)
+ throw new StringIndexOutOfBoundsException();
+ return data.substring(0, data.indexOf('.'));
+ }
+
+ /**
+ * Given data, extract <probe>
+ *
+ * @param data - hint data
+ * @return
+ */
+ private static String getTapsetProbe(String data) {
+ int i = data.indexOf('.');
+ if (i < 0)
+ throw new StringIndexOutOfBoundsException();
+ return data.substring(data.indexOf('.') + 1, data.length());
+ }
+
+ /**
+ *
+ * Decide whether cached metadata exists on disk.
+ *
+ * @return - whether metadata exists.
+ */
+ private boolean haveMetadata(String location) {
+ File fileExists = new File(location);
+ if ((fileExists.canRead()) && fileExists.exists())
+ return true;
+
+ return false;
+ }
+
+ /**
+ *
+ * Build the metadata from visiting the tapsets in turn and
+ * requesting coverage data from each one.
+ *
+ * @throws FileNotFoundException
+ *
+ */
+ private void buildCompletionMetadata(String location) throws FileNotFoundException {
+ String[] tapsets = { "syscall", "signal", "netdev", "ioblock",
+ "ioscheduler", "nd_syscall", "vm", "nfsd", "process", "sunrpc",
+ "scheduler", "scsi", "socket", "tcp", "udp", "generic.fop" };
+ ArrayList<StringBuffer> processedMetadata = new ArrayList<StringBuffer>();
+ boolean openingBracket = false;
+
+ // Execute each tapset, then convert the output from stdin
+ // to a format more acceptable to completion.
+ for (int i = 0; i < tapsets.length; i++) {
+ StringBuffer[] data = executeSystemTap(tapsets[i]);
+ for (int z = 0; z < data.length; z++) {
+ openingBracket = false;
+ for (int c = 0; c < data[z].length(); c++) {
+ if (data[z].charAt(c) == ' ')
+ if (openingBracket == false) {
+ openingBracket = true;
+ data[z].setCharAt(c, '(');
+ } else {
+ data[z].setCharAt(c, ',');
+ }
+ }
+ data[z].append(')');
+ processedMetadata.add(data[z]);
+ }
+
+ }
+
+ // Output massaged data from stdout to a text file.
+ PrintStream out = null;
+ try {
+ out = new PrintStream(new FileOutputStream(location));
+ } catch (FileNotFoundException e) {
+ throw e;
+ }
+ Iterator<StringBuffer> i = processedMetadata.iterator();
+ while (i.hasNext()) {
+ StringBuffer line = i.next();
+ out.println(line.toString().trim());
+ }
+ out.close();
+ }
+
+ /**
+ *
+ * Execute Systemtap binary, cpature stdout and return.
+ *
+ * @param tapset to request coverage data from.
+ * @return
+ */
+
+ // TODO: This could stand to be completely rewritten to be safer,
+ // and be tolerant of faults. As it is we ship default meta-data
+ // so this should never be executed in the user context. But eventually
+ // an option will be made available to the user to regenerate the data.
+ private StringBuffer[] executeSystemTap(String tapset) {
+
+ ArrayList<StringBuffer> data = new ArrayList<StringBuffer>();
+
+ try {
+ String a;
+ Process p = Runtime.getRuntime().exec(
+ "stap -L " + tapset + ".*");
+ BufferedReader in = new BufferedReader(new InputStreamReader(p
+ .getInputStream()), 5000);
+ while ((a = in.readLine()) != null) {
+ data.add(new StringBuffer(a));
+ }
+ p.waitFor();
+ in.close();
+ } catch (IOException e) {
+ return new StringBuffer[] {};
+ }
+
+ catch (java.lang.InterruptedException ie) {
+ return new StringBuffer[] {};
+ }
+
+ return data.toArray(new StringBuffer[0]);
+ }
+
+ public void parse(ResourceBundle bundle) {
+ System.out.println(System.getProperty("user.pwd"));
+
+ System.out.println(System.getProperties());
+ // System.out.println(bundle.containsKey("syscall"));
+ // System.out.println(bundle.containsKey("syscall."));
+ System.out.println(bundle.getKeys());
+ }
+
+ public void build(URL fileURL) {
+ try {
+// if (!haveMetadata(location))
+// buildCompletionMetadata(location);
+ readCompletionMetadata(fileURL);
+ } catch (IOException e) {
+ barLookups = true;
+ }
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPPartitionScanner.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPPartitionScanner.java
new file mode 100644
index 0000000000..0d9194456f
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPPartitionScanner.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
+ *
+ * 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:
+ * Phil Muldoon <pkmuldoon@picobot.org> - initial API and implementation.
+ *******************************************************************************/
+package org.eclipse.linuxtools.systemtap.ui.ide.editors.stp;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.rules.EndOfLineRule;
+import org.eclipse.jface.text.rules.ICharacterScanner;
+import org.eclipse.jface.text.rules.IPredicateRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.IWordDetector;
+import org.eclipse.jface.text.rules.MultiLineRule;
+import org.eclipse.jface.text.rules.RuleBasedPartitionScanner;
+import org.eclipse.jface.text.rules.SingleLineRule;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.jface.text.rules.WordRule;
+
+public class STPPartitionScanner extends RuleBasedPartitionScanner {
+ public final static String STP_COMMENT = "__stp_comment";
+ public final static String STP_KEYWORD = "__stp_keyword";
+ public final static String STP_STRING = "__stp_string";
+ public final static String STP_CONDITIONAL = "__stp_conditional";
+
+ public static String[] STP_PARTITION_TYPES = { IDocument.DEFAULT_CONTENT_TYPE,
+ STP_COMMENT, STP_KEYWORD, STP_STRING, STP_CONDITIONAL};
+
+ /**
+ * Detect empty comments
+ */
+ static class EmptyCommentDetector implements IWordDetector {
+ public boolean isWordStart(char c) {
+ return (c == '/');
+ }
+
+ public boolean isWordPart(char c) {
+ return (c == '*' || c == '/');
+ }
+ }
+
+ /**
+ * Cope with the empty comment issue.
+ */
+ static class EmptyCommentRule extends WordRule implements IPredicateRule {
+
+ private IToken fSuccessToken;
+
+ public EmptyCommentRule(IToken successToken) {
+ super(new EmptyCommentDetector());
+ fSuccessToken= successToken;
+ addWord("/**/", fSuccessToken); //$NON-NLS-1$
+ }
+
+ public IToken evaluate(ICharacterScanner scanner, boolean resume) {
+ return evaluate(scanner);
+ }
+
+ public IToken getSuccessToken() {
+ return fSuccessToken;
+ }
+ }
+
+ public STPPartitionScanner() {
+
+ IToken stpComment = new Token(STP_COMMENT);
+ IToken stpString = new Token(STP_STRING);
+ IToken stpConditional = new Token(STP_CONDITIONAL);
+
+ // Add special case word rule.
+ EmptyCommentRule emptyCommentRule= new EmptyCommentRule(stpComment);
+
+ setPredicateRules(new IPredicateRule[] {
+ new MultiLineRule("/*", "*/", stpComment),
+ new EndOfLineRule("/*", stpComment),
+ new EndOfLineRule("#", stpComment),
+ new EndOfLineRule("//", stpComment),
+ emptyCommentRule,
+ new EndOfLineRule("#if", stpConditional),
+ new EndOfLineRule("#else", stpConditional),
+ new EndOfLineRule("#endif", stpConditional),
+ new EndOfLineRule("#define", stpConditional),
+ new SingleLineRule("\"", "\"", stpString, '\\'),
+ new SingleLineRule("'", "'", stpString, '\\'),
+ });
+
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPPartitioner.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPPartitioner.java
new file mode 100644
index 0000000000..3fa549ed82
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPPartitioner.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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 - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.systemtap.ui.ide.editors.stp;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.jface.text.rules.FastPartitioner;
+import org.eclipse.jface.text.rules.IPartitionTokenScanner;
+
+public class STPPartitioner extends FastPartitioner {
+
+ /**
+ * Straight forward FastPartitioner, with debug output.
+ *
+ * Taken directly from org.eclipse.linuxtools.rpm.ui.editor.SpecFilePartitioner.
+ * No noteworthy alterations so Copyright header and license text untouched.
+ *
+ * @param scanner
+ * @param legalContentTypes
+ */
+ public STPPartitioner(IPartitionTokenScanner scanner, String[] legalContentTypes) {
+ super(scanner, legalContentTypes);
+ }
+
+ @Override
+ public void connect(IDocument document, boolean delayInitialization) {
+ super.connect(document, delayInitialization);
+// printPartitions(document);
+ }
+
+ public void printPartitions(IDocument document) {
+ StringBuffer buffer = new StringBuffer();
+ ITypedRegion[] partitions = computePartitioning(0, document.getLength());
+ for (int i = 0; i < partitions.length; i++) {
+ try {
+ buffer.append("Partition type: "
+ + partitions[i].getType()
+ + ", offset: " + partitions[i].getOffset()
+ + ", length: " + partitions[i].getLength());
+ buffer.append("\n");
+ buffer.append("Text:\n");
+ buffer.append(document.get(partitions[i].getOffset(),
+ partitions[i].getLength()));
+ buffer.append("\n---------------------------------------\n\n\n");
+ } catch (org.eclipse.jface.text.BadLocationException e) {
+ e.printStackTrace();
+ }
+ }
+ System.out.println(buffer);
+ };
+
+}
+
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPReconcilingStrategy.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPReconcilingStrategy.java
new file mode 100644
index 0000000000..41a72657c7
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPReconcilingStrategy.java
@@ -0,0 +1,278 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Phil Muldoon <pkmuldoon@picobot.org>.
+ *
+ * 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:
+ * Phil Muldoon <pkmuldoon@picobot.org> - initial API and implementation.
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.editors.stp;
+
+import java.util.ArrayList;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.reconciler.DirtyRegion;
+import org.eclipse.jface.text.reconciler.IReconcilingStrategy;
+import org.eclipse.jface.text.reconciler.IReconcilingStrategyExtension;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ *
+ * Reconciling strategy for Systemtap editor code folding positions. The positional aspects
+ * of document tag discovery should really be placed with a position builder
+ *
+ */
+public class STPReconcilingStrategy implements IReconcilingStrategy,
+ IReconcilingStrategyExtension {
+
+ // Constants
+ protected static final int STP_NO_TAG = 0;
+ protected static final int STP_MULTILINE_COMMENT_TAG = 1;
+ protected static final int STP_PROBE = 2;
+ protected static final int STP_FUNCTION = 3;
+
+ // Next Character Position
+ protected int nextCharPosition = 0;
+
+ // Current tag start
+ protected int currentTagStart = 0;
+
+ // Current tag end
+ protected int currentTagEnd = 0;
+
+ // List of positions
+ protected final ArrayList<Position> documentPositionList = new ArrayList<Position>();
+
+ // The end offset of the range to be scanned *//*
+ protected int endOfDocumentPostion;
+
+ private IDocument currentDocument;
+ private STPEditor currentEditor;
+
+ /**
+ * Sets the current editor.
+ */
+ public void setEditor(STPEditor editor) {
+ this.currentEditor = editor;
+ }
+
+ /**
+ * Sets the current (ie working) document.
+ */
+ public void setDocument(IDocument document) {
+ this.currentDocument = document;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.reconciler.IReconcilingStrategy#reconcile(org.eclipse.jface.text.IRegion)
+ */
+ public void reconcile(IRegion partition) {
+ // Just rebuild the whole document
+ initialReconcile();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.reconciler.IReconcilingStrategy#reconcile(org.eclipse.jface.text.reconciler.DirtyRegion, org.eclipse.jface.text.IRegion)
+ */
+ public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
+ //Just rebuild the whole document
+ initialReconcile();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.reconciler.IReconcilingStrategyExtension#initialReconcile()
+ */
+ public void initialReconcile() {
+ endOfDocumentPostion = currentDocument.getLength();
+ try {
+ calculatePositions();
+ } catch (BadLocationException e) {
+ // Cannot reconcile, return
+ return;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.reconciler.IReconcilingStrategyExtension#setProgressMonitor(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ public void setProgressMonitor(IProgressMonitor monitor) {
+
+ }
+
+ /**
+ *
+ * From currentDocument, calculate beginning of document
+ * to endOfDocumentPostion to build positions for code folding.
+ *
+ * @throws BadLocationException
+ */
+ private void calculatePositions() throws BadLocationException {
+ // Clear old positions and reset to beginning of document
+ documentPositionList.clear();
+ nextCharPosition = 0;
+
+ // Build the actual document positions
+ buildPositions();
+
+ // Paint the folding annotations in the background.
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ currentEditor.updateFoldingStructure(documentPositionList);
+ }
+ });
+ }
+
+ /**
+ *
+ * Start trying to guess if given char z, what - if any - tag this
+ * begins.
+ *
+ * @param location - location of current position
+ * @return - tag type, if any
+ *
+ * @throws BadLocationException
+ */
+ private int classifyComponent(int location) throws BadLocationException {
+ int deltaLocation = location;
+ char ch = currentDocument.getChar(deltaLocation);
+ switch (ch) {
+ // The 'comment' case.
+ case '/':
+ deltaLocation++;
+ ch = currentDocument.getChar(deltaLocation);
+ if (ch == '*') {
+ currentTagStart = location;
+ deltaLocation++;
+ nextCharPosition = deltaLocation;
+ return STP_MULTILINE_COMMENT_TAG;
+ }
+ break;
+ // The 'probe' case.
+ case 'p':
+ if (isProbe()) {
+ currentTagStart = location;
+ return STP_PROBE;
+ }
+
+ // The 'function' case.
+ case 'f':
+ if (isFunction()) {
+ currentTagStart = location;
+ return STP_FUNCTION;
+ }
+ // No tag, don't fold region.
+ default:
+ break;
+ }
+ return STP_NO_TAG;
+ }
+
+ /**
+ *
+ * Build a list of locations to mark beginning and end of folding regions.
+ *
+ * @throws BadLocationException
+ */
+ private void buildPositions() throws BadLocationException {
+ while (nextCharPosition < endOfDocumentPostion) {
+ switch (classifyComponent(nextCharPosition))
+ {
+ // All of these cases have found the beginning of a tag
+ // to start folding. Each element must now be find
+ // the end of the region it represents.
+ case STP_MULTILINE_COMMENT_TAG:
+ currentTagEnd = findEndOfComment();
+ writePosition(currentTagStart,currentTagEnd);
+ nextCharPosition = currentTagStart + currentTagEnd;
+ break;
+ case STP_PROBE:
+ case STP_FUNCTION:
+ currentTagEnd = findEndOfProbeOrFunction();
+ writePosition(currentTagStart,currentTagEnd);
+ nextCharPosition = currentTagStart + currentTagEnd;
+ break;
+ default:
+ nextCharPosition++;
+ break;
+ }
+ }
+ }
+
+ /**
+ *
+ * Write a Position to the position list.
+ *
+ * @param startOffset - start of position in the document.
+ * @param length - length of position.
+ *
+ */
+ protected void writePosition(int startOffset, int length) {
+ if (length > 0)
+ documentPositionList.add(new Position(startOffset, length));
+ }
+
+ private boolean isProbe() throws BadLocationException {
+ return matchKeyWord("probe");
+ }
+
+ private boolean isFunction() throws BadLocationException {
+ return matchKeyWord("function");
+ }
+
+ private boolean matchKeyWord(String word) throws BadLocationException {
+ StringBuffer keyWord = new StringBuffer();
+ int location = nextCharPosition;
+ while (location < endOfDocumentPostion) {
+ char ch = currentDocument.getChar(location);
+ if ((ch == ' ') || (!Character.isLetter(ch)))
+ break;
+ else
+ keyWord.append(ch);
+ location++;
+ }
+ if (keyWord.toString().compareTo(word) == 0)
+ return true;
+ return false;
+ }
+
+ private int findEndOfProbeOrFunction() throws BadLocationException {
+ int bracketCount = 0;
+ boolean firstBracket = false;
+ char ch;
+
+ while (nextCharPosition < endOfDocumentPostion) {
+ ch = currentDocument.getChar(nextCharPosition);
+ if (ch == '{') {
+ firstBracket = true;
+ bracketCount++;
+ }
+ if (ch == '}')
+ bracketCount--;
+ if ((bracketCount == 0) && (firstBracket))
+ return (nextCharPosition-currentTagStart)+2;
+ nextCharPosition++;
+ }
+ return -1;
+ }
+
+ private int findEndOfComment() throws BadLocationException {
+ while (nextCharPosition < endOfDocumentPostion) {
+ char ch = currentDocument.getChar(nextCharPosition);
+ if (ch == '*') {
+ nextCharPosition++;
+ ch = currentDocument.getChar(nextCharPosition);
+ if (ch == '/')
+ return (nextCharPosition-currentTagStart)+2;
+ }
+ nextCharPosition++;
+ }
+ return -1;
+ }
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/strings.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/strings.properties
new file mode 100644
index 0000000000..8767bb5cea
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/strings.properties
@@ -0,0 +1,568 @@
+syscall.accept(name:string,sockfd:long,addr_uaddr:long,addrlen_uaddr:long,argstr:string)
+syscall.access(name:string,pathname:string,mode:long,mode_str:string,argstr:string)
+syscall.acct(name:string,filename:string,argstr:string)
+syscall.add_key(name:string,type_uaddr:long,description_auddr:long,payload_uaddr:long,plen:long,ringid:long,argstr:string)
+syscall.adjtimex(name:string,argstr:string)
+syscall.alarm(name:string,seconds:long,argstr:string)
+syscall.arch_prctl(name:string,code:long,addr:long,argstr:string)
+syscall.bdflush(name:string,func:long,data:long,data_str:string,argstr:string)
+syscall.bind(name:string,sockfd:long,my_addr_uaddr:long,addrlen:long,argstr:string)
+syscall.brk(name:string,brk:long,argstr:string)
+syscall.capget(name:string,header_uaddr:long,data_uaddr:long,argstr:string)
+syscall.capset(name:string,header_uaddr:long,data_uaddr:long,argstr:string)
+syscall.chdir(name:string,path:string,argstr:string)
+syscall.chmod(name:string,path:string,mode:long,argstr:string)
+syscall.chown(name:string,path:string,owner:long,group:long,argstr:string)
+syscall.chown16(name:string,path:string,owner:long,group:long,argstr:string)
+syscall.chroot(name:string,path:string,argstr:string)
+syscall.clock_getres(name:string,clk_id:long,clk_id_str:string,res_uaddr:long,argstr:string)
+syscall.clock_gettime(name:string,clk_id:long,clk_id_str:string,argstr:string)
+syscall.clock_nanosleep(name:string,flag_str:string,argstr:string)
+syscall.clock_settime(name:string,clk_id:long,clk_id_str:string,tp_uaddr:long,argstr:string)
+syscall.close(name:string,fd:long,argstr:string)
+syscall.compat_adjtimex(name:string,argstr:string)
+syscall.compat_clock_nanosleep(name:string,flag_str:string,argstr:string)
+syscall.compat_execve(name:string,filename:string,args:string,argstr:string)
+syscall.compat_futex(name:string,futex_uaddr:long,op:long,val:long,utime_uaddr:long,uaddr2_uaddr:long,val3:long,argstr:string)
+syscall.compat_futimesat(name:string,dirfd:long,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
+syscall.compat_getitimer(name:string,which:long,value_uaddr:long,argstr:string)
+syscall.compat_io_setup(name:string,maxevents:long,ctxp_uaddr:long,argstr:string)
+syscall.compat_io_submit(name:string,ctx_id:long,nr:long,iocbpp_uaddr:long,argstr:string)
+syscall.compat_nanosleep(name:string,req_uaddr:long,rem_uaddr:long,argstr:string)
+syscall.compat_ppoll(name:string,argstr:string)
+syscall.compat_pselect6(name:string,argstr:string)
+syscall.compat_pselect7a(name:string,argstr:string)
+syscall.compat_select(name:string,n:long,readfds_uaddr:long,writefds_uaddr:long,exceptfds_uaddr:long,timeout_uaddr:long,argstr:string)
+syscall.compat_setitimer(name:string,which:long,value_uaddr:long,ovalue_uaddr:long,argstr:string)
+syscall.compat_signalfd(name:string,argstr:string)
+syscall.compat_sys_msgctl(name:string,argstr:string)
+syscall.compat_sys_msgrcv(name:string,argstr:string)
+syscall.compat_sys_msgsnd(name:string,argstr:string)
+syscall.compat_sys_recvmsg(name:string,s:long,msg_uaddr:long,flags:long,argstr:string)
+syscall.compat_sys_semctl(name:string,argstr:string)
+syscall.compat_sys_semtimedop(name:string,semid:long,sops_uaddr:long,nsops:long,timeout_uaddr:long,argstr:string)
+syscall.compat_sys_sendmsg(name:string,s:long,msg_uaddr:long,flags:long,argstr:string)
+syscall.compat_sys_shmat(name:string,first:long,second:long,third:long,uptr_uaddr:long,argstr:string)
+syscall.compat_sys_shmctl(name:string,first:long,second:long,uptr_uaddr:long,argstr:string)
+syscall.compat_sys_utimes(name:string,filename:string,argstr:string)
+syscall.compat_utime(name:string,filename_uaddr:long,filename:string,buf_uaddr:long,actime:long,modtime:long,argstr:string)
+syscall.compat_utimensat(name:string,argstr:string)
+syscall.compat_vmsplice(name:string,argstr:string)
+syscall.connect(name:string,sockfd:long,serv_addr_uaddr:long,addrlen:long,argstr:string)
+syscall.creat(name:string,mode:long,pathname:string,argstr:string)
+syscall.delete_module(name:string,name_user:string,flags:long,argstr:string)
+syscall.dup(name:string,oldfd:long,argstr:string)
+syscall.dup2(name:string,oldfd:long,newfd:long,argstr:string)
+syscall.epoll_create(name:string,size:long,argstr:string)
+syscall.epoll_ctl(name:string,epfd:long,op:long,op_str:string,fd:long,event_uaddr:long,argstr:string)
+syscall.epoll_pwait(name:string,argstr:string)
+syscall.epoll_wait(name:string,epfd:long,events_uaddr:long,maxevents:long,timeout:long,argstr:string)
+syscall.eventfd(name:string,argstr:string)
+syscall.execve(name:string,filename:string,args:string,argstr:string)
+syscall.exit(name:string,status:long,argstr:string)
+syscall.exit_group(name:string,status:long,argstr:string)
+syscall.faccessat(name:string,dfd:long,dfd_str:string,filename:long,filename_str:string,mode:long,mode_str:string,argstr:string)
+syscall.fadvise64(name:string,fs:long,offset:long,len:long,advice:long,argstr:string)
+syscall.fadvise64_64(name:string,fs:long,offset:long,len:long,advice:long,argstr:string)
+syscall.fchdir(name:string,fd:long,argstr:string)
+syscall.fchmod(name:string,fildes:long,mode:long,argstr:string)
+syscall.fchmodat(name:string,dfd:long,dfd_str:string,filename:long,filename_str:string,mode:long,argstr:string)
+syscall.fchown(name:string,fd:long,owner:long,group:long,argstr:string)
+syscall.fchown16(name:string,fd:long,owner:long,group:long,argstr:string)
+syscall.fchownat(name:string,dfd:long,dfd_str:string,filename:long,filename_str:string,user:long,group:long,flag:long,flag_str:string,argstr:string)
+syscall.fcntl(name:string,fd:long,cmd:long,cmd_str:string,arg:long,argstr:string)
+syscall.fdatasync(name:string,fd:long,argstr:string)
+syscall.fgetxattr(name:string,filedes:long,name2:string,value_uaddr:long,size:long,argstr:string)
+syscall.flistxattr(name:string,filedes:long,list_uaddr:long,size:long,argstr:string)
+syscall.flock(name:string,fd:long,operation:long,argstr:string)
+syscall.fork(clone_flags:long,stack_start:long,regs:long,stack_size:long,parent_tid_uaddr:long,child_tid_uaddr:long,name:string,argstr:string)
+syscall.fremovexattr(name:string,filedes:long,name_uaddr:long,argstr:string)
+syscall.fsetxattr(name:string,filedes:long,name2:string,value_uaddr:long,size:long,flags:long,argstr:string)
+syscall.fstat(name:string,filedes:long,buf_uaddr:long,argstr:string)
+syscall.fstatat(name:string,dirfd:long,path:string,buf_uaddr:long,argstr:string)
+syscall.fstatfs(name:string,fd:long,buf_uaddr:long,argstr:string)
+syscall.fstatfs64(name:string,fd:long,sz:long,buf_uaddr:long,argstr:string)
+syscall.fsync(name:string,fd:long,argstr:string)
+syscall.ftruncate(name:string,fd:long,length:long,argstr:string)
+syscall.futex(name:string,futex_uaddr:long,op:long,val:long,utime_uaddr:long,uaddr2_uaddr:long,val3:long,argstr:string)
+syscall.futimesat(name:string,dirfd:long,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
+syscall.get_mempolicy(name:string,policy_uaddr:long,nmask_uaddr:long,maxnode:long,addr:long,flags:long,argstr:string)
+syscall.getcwd(name:string,buf_uaddr:long,size:long,argstr:string)
+syscall.getdents(name:string,fd:long,dirp_uaddr:long,count:long,argstr:string)
+syscall.getegid(name:string,argstr:string)
+syscall.geteuid(name:string,argstr:string)
+syscall.getgid(name:string,argstr:string)
+syscall.getgroups(name:string,size:long,list_uaddr:long,argstr:string)
+syscall.gethostname(name:string,name_uaddr:long,len:long,argstr:string)
+syscall.getitimer(name:string,which:long,value_uaddr:long,argstr:string)
+syscall.getpeername(name:string,s:long,name_uaddr:long,namelen_uaddr:long,argstr:string)
+syscall.getpgid(name:string,pid:long,argstr:string)
+syscall.getpgrp(name:string,argstr:string)
+syscall.getpid(name:string,argstr:string)
+syscall.getppid(name:string,argstr:string)
+syscall.getpriority(name:string,which:long,who:long,argstr:string)
+syscall.getresgid(name:string,rgid_uaddr:long,egid_uaddr:long,sgid_uaddr:long,argstr:string)
+syscall.getresuid(name:string,ruid_uaddr:long,euid_uaddr:long,suid_uaddr:long,argstr:string)
+syscall.getrlimit(name:string,resource:long,rlim_uaddr:long,argstr:string)
+syscall.getrusage(name:string,who:long,who_str:string,usage_uaddr:long,argstr:string)
+syscall.getsid(name:string,pid:long,argstr:string)
+syscall.getsockname(name:string,s:long,name_uaddr:long,namelen_uaddr:long,argstr:string)
+syscall.getsockopt(name:string,fd:long,level:long,level_str:string,optname:long,optname_str:string,optval_uaddr:long,optlen_uaddr:long,argstr:string)
+syscall.gettid(name:string,argstr:string)
+syscall.gettimeofday(name:string,tv_uaddr:long,tz_uaddr:long,argstr:string)
+syscall.getuid(name:string,argstr:string)
+syscall.getxattr(name:string,path:string,name2:string,value_uaddr:long,size:long,argstr:string)
+syscall.init_module(name:string,umod_uaddr:long,len:long,uargs:string,argstr:string)
+syscall.inotify_add_watch(name:string,fd:long,mask:long,path_uaddr:long,path:string,argstr:string)
+syscall.inotify_init(name:string,argstr:string)
+syscall.inotify_rm_watch(name:string,fd:long,wd:long,argstr:string)
+syscall.io_cancel(name:string,ctx_id:long,iocb_uaddr:long,result_uaddr:long,argstr:string)
+syscall.io_destroy(name:string,ctx:long,argstr:string)
+syscall.io_getevents(name:string,ctx_id:long,min_nr:long,nr:long,events_uaddr:long,timeout_uaddr:long,timestr:string,argstr:string)
+syscall.io_setup(name:string,maxevents:long,ctxp_uaddr:long,argstr:string)
+syscall.io_submit(name:string,ctx_id:long,nr:long,iocbpp_uaddr:long,argstr:string)
+syscall.ioctl(name:string,fd:long,request:long,argp:long,argstr:string)
+syscall.ioperm(name:string,from:long,num:long,turn_on:long,argstr:string)
+syscall.iopl(name:string,level:long,argstr:string)
+syscall.ioprio_get(name:string,which:long,who:long,argstr:string)
+syscall.ioprio_set(name:string,which:long,who:long,ioprio:long,argstr:string)
+syscall.kexec_load(name:string,entry:long,nr_segments:long,segments_uaddr:long,flags:long,argstr:string)
+syscall.keyctl(name:string,argstr:string)
+syscall.kill(name:string,pid:long,sig:long,argstr:string)
+syscall.lchown(name:string,path:string,owner:long,group:long,argstr:string)
+syscall.lchown16(name:string,path:string,owner:long,group:long,argstr:string)
+syscall.lgetxattr(name:string,path:string,name2:string,value_uaddr:long,size:long,argstr:string)
+syscall.link(name:string,oldpath:string,newpath:string,argstr:string)
+syscall.linkat(name:string,olddfd:long,olddfd_str:string,oldname:long,oldname_str:string,newdfd:long,newdfd_str:string,newname:long,newname_str:string,flags:long,flags_str:string,argstr:string)
+syscall.listen(name:string,sockfd:long,backlog:long,argstr:string)
+syscall.listxattr(name:string,list_uaddr:long,size:long,path_uaddr:long,path:string,argstr:string)
+syscall.llistxattr(name:string,list_uaddr:long,size:long,path_uaddr:long,path:string,argstr:string)
+syscall.llseek(name:string,fd:long,offset_high:long,offset_low:long,result_uaddr:long,whence:long,whence_str:string,argstr:string)
+syscall.lookup_dcookie(name:string,cookie:long,buffer_uaddr:long,len:long,argstr:string)
+syscall.lremovexattr(name:string,name_uaddr:long,name2:string,path_uaddr:long,path:string,argstr:string)
+syscall.lseek(name:string,fildes:long,offset:long,whence:long,whence_str:string,argstr:string)
+syscall.lsetxattr(name:string,path_uaddr:long,path:string,name_uaddr:long,name_str:string,value_uaddr:long,size:long,flags:long,argstr:string)
+syscall.lstat(name:string,path:string,buf_uaddr:long,argstr:string)
+syscall.madvise(name:string,start:long,length:long,advice:long,advice_str:string,argstr:string)
+syscall.mbind(name:string,start:long,len:long,mode:long,nmask_uaddr:long,maxnode:long,flags:long,argstr:string)
+syscall.migrate_pages(name:string,argstr:string)
+syscall.mincore(name:string,start:long,length:long,vec_uaddr:long,argstr:string)
+syscall.mkdir(name:string,pathname_uaddr:long,pathname:string,mode:long,argstr:string)
+syscall.mkdirat(name:string,dirfd:long,pathname:string,mode:long,argstr:string)
+syscall.mknod(name:string,pathname:string,mode:long,dev:long,argstr:string)
+syscall.mknodat(name:string,dfd:long,dfd_str:string,filename:long,filename_str:string,mode:long,mode_str:string,dev:long,argstr:string)
+syscall.mlock(name:string,addr:long,len:long,argstr:string)
+syscall.mlockall(name:string,flags:long,argstr:string)
+syscall.mmap(name:string,start:long,len:long,prot:long,flags:long,fd:long,offset:long,argstr:string)
+syscall.mmap2(name:string,argstr:string)
+syscall.mmap32(name:string,argstr:string)
+syscall.modify_ldt(name:string,func:long,ptr_uaddr:long,bytecount:long,argstr:string)
+syscall.mount(name:string,source:string,target:string,filesystemtype:string,mountflags:long,mountflags_str:string,data:string,argstr:string)
+syscall.move_pages(name:string,argstr:string)
+syscall.mprotect(name:string,addr:long,len:long,prot:long,prot_str:string,argstr:string)
+syscall.mq_getsetattr(name:string,mqdes:long,u_mqstat_uaddr:long,u_omqstat_uaddr:long,argstr:string)
+syscall.mq_notify(name:string,mqdes:long,notification_uaddr:long,argstr:string)
+syscall.mq_open(name:string,name_uaddr:long,filename:string,mode:long,u_attr_uaddr:long,oflag:long,argstr:string)
+syscall.mq_timedreceive(name:string,mqdes:long,msg_ptr_uaddr:long,msg_len:long,msg_prio_uaddr:long,abs_timout_uaddr:long,argstr:string)
+syscall.mq_timedsend(name:string,mqdes:long,msg_ptr_uaddr:long,msg_len:long,msg_prio:long,abs_timeout_uaddr:long,argstr:string)
+syscall.mq_unlink(name:string,u_name_uaddr:long,u_name:string,argstr:string)
+syscall.mremap(name:string,old_address:long,old_size:long,new_size:long,flags:long,new_address:long,argstr:string)
+syscall.msgctl(name:string,msqid:long,cmd:long,buf_uaddr:long,argstr:string)
+syscall.msgget(name:string,key:long,msgflg:long,msgflg_str:string,argstr:string)
+syscall.msgrcv(name:string,msqid:long,msgp_uaddr:long,msgsz:long,msgtyp:long,msgflg:long,argstr:string)
+syscall.msgsnd(name:string,msqid:long,msgp_uaddr:long,msgsz:long,msgflg:long,argstr:string)
+syscall.msync(name:string,start:long,length:long,flags:long,argstr:string)
+syscall.munlock(name:string,addr:long,len:long,argstr:string)
+syscall.munlockall(name:string,argstr:string)
+syscall.munmap(name:string,start:long,length:long,argstr:string)
+syscall.nanosleep(name:string,req_uaddr:long,rem_uaddr:long,argstr:string)
+syscall.nfsservctl(name:string,cmd:long,argp_uaddr:long,resp_uaddr:long,argstr:string)
+syscall.ni_syscall(name:string,argstr:string)
+syscall.nice(name:string,inc:long,argstr:string)
+syscall.open(name:string,filename:string,flags:long,mode:long,argstr:string)
+syscall.openat(name:string,filename:string,flags:long,mode:long,argstr:string)
+syscall.pause(name:string,argstr:string)
+syscall.personality(name:string,persona:long,argstr:string)
+syscall.pipe(name:string,argstr:string)
+syscall.pipe32(name:string,argstr:string)
+syscall.pivot_root(name:string,new_root_str:string,old_root_str:string,argstr:string)
+syscall.poll(name:string,ufds_uaddr:long,nfds:long,timeout:long,argstr:string)
+syscall.ppoll(name:string,argstr:string)
+syscall.prctl(name:string,option:long,arg2:long,arg3:long,arg4:long,arg5:long,argstr:string)
+syscall.pread(name:string,fd:long,buf_uaddr:long,count:long,offset:long,argstr:string)
+syscall.pselect6(name:string,argstr:string)
+syscall.pselect7(name:string,argstr:string)
+syscall.ptrace(name:string,request:long,pid:long,addr:long,data:long,argstr:string)
+syscall.pwrite(name:string,fd:long,buf_uaddr:long,count:long,offset:long,argstr:string)
+syscall.quotactl(name:string,cmd:long,cmd_str:string,special:long,special_str:string,id:long,addr_uaddr:long,argstr:string)
+syscall.read(name:string,fd:long,buf_uaddr:long,count:long,argstr:string)
+syscall.readahead(name:string,fd:long,offset:long,count:long,argstr:string)
+syscall.readdir(name:string,argstr:string)
+syscall.readlink(name:string,path:string,buf_uaddr:long,bufsiz:long,argstr:string)
+syscall.readlinkat(name:string,dfd:long,buf_uaddr:long,bufsiz:long,path:string,argstr:string)
+syscall.readv(name:string,vector_uaddr:long,count:long,fd:long,argstr:string)
+syscall.reboot(name:string,magic:long,magic_str:string,magic2:long,magic2_str:string,flag:long,flag_str:string,arg_uaddr:long,argstr:string)
+syscall.recv(name:string,s:long,buf_uaddr:long,len:long,flags:long,flags_str:string,argstr:string)
+syscall.recvfrom(name:string,s:long,buf_uaddr:long,len:long,flags:long,flags_str:string,addr_uaddr:long,addrlen_uaddr:long,argstr:string)
+syscall.recvmsg(name:string,s:long,msg_uaddr:long,flags:long,flags_str:string,argstr:string)
+syscall.remap_file_pages(name:string,start:long,size:long,prot:long,pgoff:long,flags:long,argstr:string)
+syscall.removexattr(name:string,name_str:string,path:string,argstr:string)
+syscall.rename(name:string,oldpath:string,newpath:string,argstr:string)
+syscall.renameat(name:string,olddfd:long,olddfd_str:string,oldname:long,oldname_str:string,newdfd:long,newdfd_str:string,newname:long,newname_str:string,argstr:string)
+syscall.request_key(name:string,type_uaddr:long,description_uaddr:long,callout_info_uaddr:long,destringid:long,argstr:string)
+syscall.restart_syscall(name:string,argstr:string)
+syscall.rmdir(name:string,pathname:string,argstr:string)
+syscall.rt_sigaction(name:string,sig:long,act_uaddr:long,oact_uaddr:long,sigsetsize:long,argstr:string)
+syscall.rt_sigaction32(name:string,sig:long,act_uaddr:long,oact_uaddr:long,sigsetsize:long,argstr:string)
+syscall.rt_sigpending(name:string,set_uaddr:long,sigsetsize:long,argstr:string)
+syscall.rt_sigprocmask(name:string,how:long,how_str:string,set_uaddr:long,oldset_uaddr:long,argstr:string)
+syscall.rt_sigqueueinfo(name:string,pid:long,sig:long,uinfo_uaddr:long,argstr:string)
+syscall.rt_sigreturn(name:string,argstr:string)
+syscall.rt_sigsuspend(name:string,argstr:string)
+syscall.rt_sigtimedwait(name:string,uthese_uaddr:long,uinfo_uaddr:long,uts_uaddr:long,sigsetsize:long,argstr:string)
+syscall.sched_get_priority_max(name:string,policy:long,argstr:string)
+syscall.sched_get_priority_min(name:string,policy:long,argstr:string)
+syscall.sched_getaffinity(name:string,pid:long,len:long,mask_uaddr:long,argstr:string)
+syscall.sched_getparam(name:string,pid:long,p_uaddr:long,argstr:string)
+syscall.sched_getscheduler(name:string,pid:long,argstr:string)
+syscall.sched_rr_get_interval(name:string,pid:long,tp_uaddr:long,argstr:string)
+syscall.sched_setaffinity(name:string,pid:long,len:long,mask_uaddr:long,argstr:string)
+syscall.sched_setparam(name:string,pid:long,p_uaddr:long,argstr:string)
+syscall.sched_setscheduler(name:string,pid:long,policy:long,policy_str:string,p_uaddr:long,argstr:string)
+syscall.sched_yield(name:string,argstr:string)
+syscall.select(name:string,n:long,readfds_uaddr:long,writefds_uaddr:long,exceptfds_uaddr:long,timeout_uaddr:long,argstr:string)
+syscall.semctl(name:string,semid:long,semnum:long,cmd:long,argstr:string)
+syscall.semget(name:string,key:long,nsems:long,semflg:long,argstr:string)
+syscall.semop(name:string,semid:long,tsops_uaddr:long,nsops:long,argstr:string)
+syscall.semtimedop(name:string,semid:long,sops_uaddr:long,nsops:long,timeout_uaddr:long,argstr:string)
+syscall.send(name:string,s:long,buf_uaddr:long,len:long,flags:long,flags_str:string,argstr:string)
+syscall.sendfile(name:string,out_fd:long,in_fd:long,offset_uaddr:long,count:long,argstr:string)
+syscall.sendmsg(name:string,s:long,msg_uaddr:long,flags:long,flags_str:string,argstr:string)
+syscall.sendto(name:string,s:long,buf_uaddr:long,len:long,flags:long,flags_str:string,to_uaddr:long,tolen:long,argstr:string)
+syscall.set_mempolicy(name:string,mode:long,nmask_uaddr:long,maxnode:long,argstr:string)
+syscall.set_tid_address(name:string,tidptr_uaddr:long,argstr:string)
+syscall.setdomainname(name:string,hostname_uaddr:long,len:long,argstr:string)
+syscall.setfsgid(name:string,fsgid:long,argstr:string)
+syscall.setfsuid(name:string,fsuid:long,argstr:string)
+syscall.setgid(name:string,gid:long,argstr:string)
+syscall.setgroups(name:string,size:long,list_uaddr:long,argstr:string)
+syscall.sethostname(name:string,hostname_uaddr:long,name_str:string,len:long,argstr:string)
+syscall.setitimer(name:string,which:long,value_uaddr:long,ovalue_uaddr:long,argstr:string)
+syscall.setpgid(name:string,pid:long,pgid:long,argstr:string)
+syscall.setpriority(name:string,which:long,which_str:string,who:long,prio:long,argstr:string)
+syscall.setregid(name:string,rgid:long,egid:long,argstr:string)
+syscall.setregid16(name:string,rgid:long,egid:long,argstr:string)
+syscall.setresgid(name:string,rgid:long,egid:long,sgid:long,argstr:string)
+syscall.setresgid16(name:string,rgid:long,egid:long,sgid:long,argstr:string)
+syscall.setresuid(name:string,ruid:long,euid:long,suid:long,argstr:string)
+syscall.setresuid16(name:string,ruid:long,euid:long,suid:long,argstr:string)
+syscall.setreuid(name:string,ruid:long,euid:long,argstr:string)
+syscall.setreuid16(name:string,ruid:long,euid:long,argstr:string)
+syscall.setrlimit(name:string,resource:long,rlim_uaddr:long,argstr:string)
+syscall.setsid(name:string,argstr:string)
+syscall.setsockopt(name:string,fd:long,level:long,level_str:string,optname:long,optname_str:string,optval_uaddr:long,optlen:long,argstr:string)
+syscall.settimeofday(name:string,tv_uaddr:long,tz_uaddr:long,argstr:string)
+syscall.settimeofday32(name:string,tv_uaddr:long,tz_uaddr:long,argstr:string)
+syscall.setuid(name:string,uid:long,argstr:string)
+syscall.setxattr(name:string,path_uaddr:long,path:string,name_uaddr:long,name_str:string,value_uaddr:long,size:long,flags:long,argstr:string)
+syscall.sgetmask(name:string,argstr:string)
+syscall.shmat(name:string,shmid:long,shmaddr_uaddr:long,shmflg:long,argstr:string)
+syscall.shmctl(name:string,shmid:long,cmd:long,buf_uaddr:long,argstr:string)
+syscall.shmdt(name:string,shmaddr_uaddr:long,argstr:string)
+syscall.shmget(name:string,key:long,size:long,shmflg:long,argstr:string)
+syscall.shutdown(name:string,s:long,how:long,how_str:string,argstr:string)
+syscall.sigaction32(name:string,sig:long,act_uaddr:long,oact_uaddr:long,argstr:string)
+syscall.sigaltstack(name:string,uss_uaddr:long,uoss_uaddr:long,regs_uaddr:long,argstr:string)
+syscall.signal(name:string,sig:long,handler:long,argstr:string)
+syscall.signalfd(name:string,argstr:string)
+syscall.sigpending(name:string,argstr:string)
+syscall.sigprocmask(name:string,how:long,how_str:string,set_uaddr:long,oldset_uaddr:long,argstr:string)
+syscall.sigreturn(name:string,argstr:string)
+syscall.sigsuspend(name:string,argstr:string)
+syscall.socket(name:string,family:long,type:long,protocol:long,argstr:string)
+syscall.socketpair(name:string,family:long,type:long,protocol:long,sv_uaddr:long,argstr:string)
+syscall.splice(name:string,argstr:string)
+syscall.ssetmask(name:string,newmask:long,argstr:string)
+syscall.stat(name:string,filename_uaddr:long,filename:string,buf_uaddr:long,argstr:string)
+syscall.statfs(name:string,buf_uaddr:long,path:string,argstr:string)
+syscall.statfs64(name:string,sz:long,buf_uaddr:long,path:string,argstr:string)
+syscall.stime(name:string,t_uaddr:long,argstr:string)
+syscall.swapoff(name:string,path:string,argstr:string)
+syscall.swapon(name:string,path:string,swapflags:long,argstr:string)
+syscall.symlink(name:string,oldpath:string,newpath:string,argstr:string)
+syscall.symlinkat(name:string,oldname:long,oldname_str:string,newdfd:long,newdfd_str:string,newname:long,newname_str:string,argstr:string)
+syscall.sync(name:string,argstr:string)
+syscall.sysctl(name:string,argstr:string)
+syscall.sysctl32(name:string,argstr:string)
+syscall.sysfs(name:string,option:long,arg1:long,arg2:long,argstr:string)
+syscall.sysinfo(name:string,info_uaddr:long,argstr:string)
+syscall.syslog(name:string,type:long,bufp_uaddr:long,len:long,argstr:string)
+syscall.tee(name:string,argstr:string)
+syscall.tgkill(name:string,tgid:long,pid:long,sig:long,argstr:string)
+syscall.time(name:string,t_uaddr:long,argstr:string)
+syscall.timer_create(name:string,clockid:long,clockid_str:string,evp_uaddr:long,timerid_uaddr:long,argstr:string)
+syscall.timer_delete(name:string,timerid:long,argstr:string)
+syscall.timer_getoverrun(name:string,timerid:long,argstr:string)
+syscall.timer_gettime(name:string,timerid:long,value_uaddr:long,argstr:string)
+syscall.timer_settime(name:string,timerid:long,flags:long,value_uaddr:long,ovalue_uaddr:long,argstr:string)
+syscall.times(name:string,argstr:string)
+syscall.tkill(name:string,pid:long,sig:long,argstr:string)
+syscall.truncate(name:string,path_uaddr:long,path:string,length:long,argstr:string)
+syscall.umask(name:string,mask:long,argstr:string)
+syscall.umount(name:string,target:string,flags:long,flags_str:string,argstr:string)
+syscall.uname(name:string,argstr:string)
+syscall.unlink(name:string,pathname_uaddr:long,pathname:string,argstr:string)
+syscall.unlinkat(name:string,dfd:long,dfd_str:string,pathname:long,pathname_str:string,flag:long,flag_str:string,argstr:string)
+syscall.unshare(name:string,unshare_flags:long,argstr:string)
+syscall.uselib(name:string,library_uaddr:long,library:string,argstr:string)
+syscall.ustat(name:string,dev:long,ubuf_uaddr:long,argstr:string)
+syscall.ustat32(name:string,dev:long,argstr:string)
+syscall.utime(name:string,filename_uaddr:long,filename:string,buf_uaddr:long,actime:long,modtime:long,argstr:string)
+syscall.utimensat(name:string,argstr:string)
+syscall.utimes(name:string,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
+syscall.vhangup(name:string,argstr:string)
+syscall.vm86_warning(name:string)
+syscall.vmsplice(name:string,argstr:string)
+syscall.wait4(name:string,pid:long,status_uaddr:long,options:long,options_str:string,rusage_uaddr:long,argstr:string)
+syscall.waitid(name:string,pid:long,which:long,which_str:string,infop_uaddr:long,options:long,options_str:string,rusage_uaddr:long,argstr:string)
+syscall.write(name:string,fd:long,buf_uaddr:long,count:long,argstr:string)
+syscall.writev(name:string,vector_uaddr:long,count:long,fd:long,argstr:string)
+signal.check_ignored(sig_pid:long,pid_name:string,sig:long,sig_name:string)
+signal.checkperm(sig:long,task:long,sinfo:long,name:string,sig_name:string,sig_pid:long,pid_name:string,si_code:string)
+signal.do_action(sig:long,sigact_addr:long,oldsigact_addr:long,sa_handler:long,sa_mask:long)
+signal.flush(task:long,sig_pid:long,pid_name:string)
+signal.force_segv(sig_pid:long,pid_name:string,sig:long,sig_name:string)
+signal.handle(sig:unknown,sig_name:string,sinfo:long,sig_code:long,ka_addr:unknown,oldset_addr:unknown,regs:unknown,sig_mode:string)
+signal.pending(sigset_add:long,sigset_size:long)
+signal.procmask(how:long,sigset_addr:long,oldsigset_addr:long,sigset:long)
+signal.send(name:string,sig:long,task:long,sinfo:long,shared:long,send2queue:long,sig_name:string,sig_pid:long,pid_name:string,si_code:string)
+signal.send_sig_queue(sig:long,sig_name:string,sig_pid:long,pid_name:string,sigqueue_addr:long)
+signal.syskill(name:string,pid:long,sig:long,argstr:string,sig_name:string)
+signal.systgkill(name:string,tgid:long,pid:long,sig:long,argstr:string,sig_name:string)
+signal.systkill(name:string,pid:long,sig:long,argstr:string,sig_name:string)
+signal.wakeup(sig_pid:long,pid_name:string,resume:long,state_mask:string)
+netdev.receive(dev_name:string,length:long,protocol:long,truesize:long)
+netdev.transmit(dev_name:string,length:long,protocol:long,truesize:long)
+ioblock.end(devname:string,ino:long,bytes_done:long,error:long,sector:long,flags:long,rw:long,vcnt:long,idx:long,phys_segments:long,hw_segments:long,size:long)
+ioblock.request(devname:string,ino:long,sector:long,flags:long,rw:long,vcnt:long,idx:long,phys_segments:long,hw_segments:long,size:long,bdev:long,bdev_contains:long,p_start_sect:long)
+ioscheduler.elv_add_request(elevator_name:string,disk_major:long,disk_minor:long,req:long,req_flags:long)
+ioscheduler.elv_completed_request(elevator_name:string,disk_major:long,disk_minor:long,req:long,req_flags:long)
+ioscheduler.elv_next_request(elevator_name:string)
+nd_syscall.accept(name:string,sockfd:long,addr_uaddr:long,addrlen_uaddr:long,argstr:string)
+nd_syscall.access(name:string,pathname:string,mode:long,mode_str:string,argstr:string)
+nd_syscall.acct(name:string,filename:string,argstr:string)
+nd_syscall.add_key(name:string,type_uaddr:long,description_uaddr:long,payload_uaddr:long,plen:long,ringid:long,argstr:string)
+nd_syscall.adjtimex(name:string,argstr:string)
+nd_syscall.alarm(name:string,seconds:long,argstr:string)
+nd_syscall.bdflush(name:string,func:long,data:long,data_str:string,argstr:string)
+nd_syscall.bind(name:string,sockfd:long,my_addr_uaddr:long,addrlen:long,argstr:string)
+nd_syscall.brk(name:string,brk:long,argstr:string)
+nd_syscall.capget(name:string,header_uaddr:long,data_uaddr:long,argstr:string)
+nd_syscall.capset(name:string,header_uaddr:long,data_uaddr:long,argstr:string)
+nd_syscall.chdir(name:string,path:string,argstr:string)
+nd_syscall.chmod(name:string,path:string,mode:long,argstr:string)
+nd_syscall.chown(name:string,path:string,owner:long,group:long,argstr:string)
+nd_syscall.chown16(name:string,path:string,owner:long,group:long,argstr:string)
+nd_syscall.chroot(name:string,path:string,argstr:string)
+nd_syscall.clock_getres(name:string,clk_id:long,clk_id_str:string,res_uaddr:long,argstr:string)
+nd_syscall.clock_gettime(name:string,clk_id:long,clk_id_str:string,argstr:string)
+nd_syscall.clock_nanosleep(name:string,flags:long,flag_str:string,argstr:string)
+nd_syscall.clock_settime(name:string,clk_id:long,clk_id_str:string,tp_uaddr:long,argstr:string)
+nd_syscall.close(name:string,fd:long,argstr:string)
+nd_syscall.compat_adjtimex(name:string,argstr:string)
+nd_syscall.compat_clock_nanosleep(name:string,flags:long,flag_str:string,argstr:string)
+nd_syscall.compat_execve(name:string,filename:string,args:string,argstr:string)
+nd_syscall.compat_futex(name:string,futex_uaddr:long,op:long,val:long,utime_uaddr:long,uaddr2_uaddr:long,val3:long,argstr:string)
+nd_syscall.compat_futimesat(name:string,dirfd:long,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
+nd_syscall.compat_getitimer(name:string,which:long,value_uaddr:long,argstr:string)
+nd_syscall.compat_io_setup(name:string,maxevents:long,ctxp_uaddr:long,argstr:string)
+nd_syscall.compat_io_submit(name:string,ctx_id:long,nr:long,iocbpp_uaddr:long,argstr:string)
+nd_syscall.compat_sys_msgctl(name:string,argstr:string)
+nd_syscall.compat_sys_msgrcv(name:string,argstr:string)
+nd_syscall.compat_sys_msgsnd(name:string,argstr:string)
+nd_syscall.connect(name:string,sockfd:long,serv_addr_uaddr:long,addrlen:long,argstr:string)
+nd_syscall.creat(name:string,mode:long,pathname:string,argstr:string)
+nd_syscall.delete_module(name:string,name_user:string,flags:long,argstr:string)
+nd_syscall.dup(name:string,old_fd:long,argstr:string)
+nd_syscall.dup2(name:string,oldfd:long,newfd:long,argstr:string)
+nd_syscall.epoll_create(name:string,size:long,argstr:string)
+nd_syscall.epoll_ctl(name:string,epfd:long,op:long,op_str:string,fd:long,event_uaddr:long,argstr:string)
+nd_syscall.epoll_pwait(name:string,argstr:string)
+nd_syscall.epoll_wait(name:string,epfd:long,events_uaddr:long,maxevents:long,timeout:long,argstr:string)
+nd_syscall.eventfd(name:string,argstr:string)
+nd_syscall.execve(name:string,filename:string,args:string,argstr:string)
+nd_syscall.exit(name:string,status:long,argstr:string)
+nd_syscall.exit_group(name:string,status:long,argstr:string)
+nd_syscall.fadvise64(name:string,fs:long,offset:long,len:long,advice:long,argstr:string)
+nd_syscall.fadvise64_64(name:string,fs:long,offset:long,len:long,advice:long,argstr:string)
+nd_syscall.fchdir(name:string,fd:long,argstr:string)
+nd_syscall.fchmod(name:string,fildes:long,mode:long,argstr:string)
+nd_syscall.fchown(name:string,fd:long,owner:long,group:long,argstr:string)
+nd_syscall.fchown16(name:string,fd:long,owner:long,group:long,argstr:string)
+nd_syscall.fcntl(name:string,fd:long,cmd:long,cmd_str:string,arg:long,argstr:string)
+nd_syscall.fdatasync(name:string,fd:long,argstr:string)
+nd_syscall.fgetxattr(name:string,filedes:long,name2:string,value_uaddr:long,size:long,argstr:string)
+nd_syscall.flistxattr(name:string,filedes:long,list_uaddr:long,size:long,argstr:string)
+nd_syscall.flock(name:string,fd:long,operation:long,argstr:string)
+nd_syscall.fork(clone_flags:long,stack_start:long,regs:long,stack_size:long,parent_tid_uaddr:long,child_tid_uaddr:long,name:string,argstr:string)
+nd_syscall.fremovexattr(name:string,filedes:long,name_uaddr:long,argstr:string)
+nd_syscall.fsetxattr(name:string,filedes:long,name2:string,value_uaddr:long,size:long,flags:long,argstr:string)
+nd_syscall.fstat(name:string,filedes:long,buf_uaddr:long,argstr:string)
+nd_syscall.fstatat(name:string,dirfd:long,path:string,buf_uaddr:long,argstr:string)
+nd_syscall.fstatfs(name:string,fd:long,buf_uaddr:long,argstr:string)
+nd_syscall.fstatfs64(name:string,fd:long,sz:long,buf_uaddr:long,argstr:string)
+nd_syscall.fsync(name:string,fd:long,argstr:string)
+nd_syscall.ftruncate(name:string,fd:long,length:long,argstr:string)
+nd_syscall.futex(name:string,futex_uaddr:long,op:long,val:long,utime_uaddr:long,uaddr2_uaddr:long,val3:long,argstr:string)
+nd_syscall.futimesat(name:string,dirfd:long,filename_uaddr:long,filename:string,tvp_uaddr:long,argstr:string)
+nd_syscall.get_mempolicy(name:string,policy_uaddr:long,nmask_uaddr:long,maxnode:long,addr:long,flags:long,argstr:string)
+nd_syscall.getcwd(name:string,buf_uaddr:long,size:long,argstr:string)
+nd_syscall.getdents(name:string,fd:long,dirp_uaddr:long,count:long,argstr:string)
+nd_syscall.getegid(name:string,argstr:string)
+nd_syscall.geteuid(name:string,argstr:string)
+nd_syscall.getgid(name:string,argstr:string)
+nd_syscall.getgroups(name:string,size:long,list_uaddr:long,argstr:string)
+nd_syscall.gethostname(name:string,name_uaddr:long,len:long,argstr:string)
+nd_syscall.getitimer(name:string,which:long,value_uaddr:long,argstr:string)
+nd_syscall.getpeername(name:string,s:long,name_uaddr:long,namelen_uaddr:long,argstr:string)
+nd_syscall.getpgid(name:string,pid:long,argstr:string)
+nd_syscall.getpgrp(name:string,argstr:string)
+nd_syscall.getpid(name:string,argstr:string)
+nd_syscall.getppid(name:string,argstr:string)
+nd_syscall.getpriority(name:string,which:long,who:long,argstr:string)
+nd_syscall.getresgid(name:string,rgid_uaddr:long,egid_uaddr:long,sgid_uaddr:long,argstr:string)
+nd_syscall.getresuid(name:string,ruid_uaddr:long,euid_uaddr:long,suid_uaddr:long,argstr:string)
+nd_syscall.getrlimit(name:string,resource:long,rlim_uaddr:long,argstr:string)
+nd_syscall.getrusage(name:string,who:long,who_str:string,usage_uaddr:long,argstr:string)
+nd_syscall.getsid(name:string,pid:long,argstr:string)
+nd_syscall.getsockname(name:string,s:long,name_uaddr:long,namelen_uaddr:long,argstr:string)
+nd_syscall.getsockopt(name:string,fd:long,level:long,level_str:string,optname:long,optname_str:string,optval_uaddr:long,optlen_uaddr:long,argstr:string)
+nd_syscall.gettid(name:string,argstr:string)
+nd_syscall.gettimeofday(name:string,tv_uaddr:long,tz_uaddr:long,argstr:string)
+nd_syscall.getuid(name:string,argstr:string)
+nd_syscall.getxattr(name:string,path:string,name2:string,value_uaddr:long,size:long,argstr:string)
+nd_syscall.init_module(name:string,umod_uaddr:long,len:long,uargs:string,argstr:string)
+nd_syscall.inotify_add_watch(name:string,fd:long,path_uaddr:long,path:string,mask:long,argstr:string)
+nd_syscall.inotify_init(name:string,argstr:string)
+nd_syscall.inotify_rm_watch(name:string,fd:long,wd:long,argstr:string)
+nd_syscall.io_cancel(name:string,ctx_id:long,iocb_uaddr:long,result_uaddr:long,argstr:string)
+nd_syscall.io_destroy(name:string,ctx:long,argstr:string)
+nd_syscall.io_getevents(name:string,ctx_id:long,min_nr:long,nr:long,events_uaddr:long,timeout_uaddr:long,timestr:string,argstr:string)
+nd_syscall.io_setup(name:string,maxevents:long,ctxp_uaddr:long,argstr:string)
+nd_syscall.io_submit(name:string,ctx_id:long,nr:long,iocbpp_uaddr:long,argstr:string)
+nd_syscall.ioctl(name:string,fd:long,request:long,argp:long,argstr:string)
+nd_syscall.ioperm(name:string,from:long,num:long,turn_on:long,argstr:string)
+nd_syscall.ioprio_get(name:string,which:long,who:long,argstr:string)
+nd_syscall.ioprio_set(name:string,which:long,who:long,ioprio:long,argstr:string)
+nd_syscall.kexec_load(name:string,entry:long,nr_segments:long,segments_uaddr:long,flags:long,argstr:string)
+nd_syscall.keyctl(name:string,argstr:string)
+nd_syscall.kill(name:string,pid:long,sig:long,argstr:string)
+nd_syscall.lchown(name:string,path:string,owner:long,group:long,argstr:string)
+nd_syscall.lchown16(name:string,path:string,owner:long,group:long,argstr:string)
+nd_syscall.lgetxattr(name:string,path:string,name2:string,value_uaddr:long,size:long,argstr:string)
+nd_syscall.link(name:string,oldpath:string,newpath:string,argstr:string)
+nd_syscall.listen(name:string,sockfd:long,backlog:long,argstr:string)
+nd_syscall.listxattr(name:string,path_uaddr:long,path:string,list_uaddr:long,size:long,argstr:string)
+nd_syscall.llistxattr(name:string,path_uaddr:long,path:string,list_uaddr:long,size:long,argstr:string)
+nd_syscall.llseek(name:string,fd:long,offset_high:long,offset_low:long,result_uaddr:long,whence:long,whence_str:string,argstr:string)
+nd_syscall.lookup_dcookie(name:string,cookie:long,buffer_uaddr:long,len:long,argstr:string)
+nd_syscall.lremovexattr(name:string,path_uaddr:long,path:string,name_uaddr:long,name2:string,argstr:string)
+nd_syscall.lseek(name:string,fildes:long,offset:long,whence:long,whence_str:string,argstr:string)
+nd_syscall.lsetxattr(name:string,path_uaddr:long,path:string,name_uaddr:long,name_str:string,value_uaddr:long,size:long,flags:long,argstr:string)
+nd_syscall.lstat(name:string,path:string,buf_uaddr:long,argstr:string)
+nd_syscall.madvise(name:string,start:long,length:long,advice:long,advice_str:string,argstr:string)
+nd_syscall.mbind(name:string,start:long,len:long,mode:long,nmask_uaddr:long,maxnode:long,flags:long,argstr:string)
+nd_syscall.migrate_pages(name:string,argstr:string)
+nd_syscall.mincore(name:string,start:long,length:long,vec_uaddr:long,argstr:string)
+nd_syscall.mkdir(name:string,pathname_uaddr:long,pathname:string,mode:long,argstr:string)
+nd_syscall.mkdirat(name:string,dirfd:long,pathname:string,mode:long,argstr:string)
+nd_syscall.mknod(name:string,pathname:string,mode:long,dev:long,argstr:string)
+nd_syscall.mlock(name:string,addr:long,len:long,argstr:string)
+nd_syscall.mlockall(name:string,flags:long,argstr:string)
+nd_syscall.modify_ldt(name:string,func:long,ptr_uaddr:long,bytecount:long,argstr:string)
+nd_syscall.mount(name:string,source:string,target:string,filesystemtype:string,mountflags:long,mountflags_str:string,data:string,argstr:string)
+nd_syscall.move_pages(name:string,argstr:string)
+nd_syscall.mprotect(name:string,addr:long,len:long,prot:long,prot_str:string,argstr:string)
+nd_syscall.mq_getsetattr(name:string,mqdes:long,u_mqstat_uaddr:long,u_omqstat_uaddr:long,argstr:string)
+nd_syscall.mq_notify(name:string,mqdes:long,notification_uaddr:long,argstr:string)
+nd_syscall.mq_open(name:string,name_uaddr:long,filename:string,mode:long,u_attr_uaddr:long,oflag:long,argstr:string)
+nd_syscall.mq_timedreceive(name:string,mqdes:long,msg_ptr_uaddr:long,msg_len:long,msg_prio_uaddr:long,abs_timout_uaddr:long,argstr:string)
+nd_syscall.mq_timedsend(name:string,mqdes:long,msg_ptr_uaddr:long,msg_len:long,msg_prio:long,abs_timeout_uaddr:long,argstr:string)
+nd_syscall.mq_unlink(name:string,u_name_uaddr:long,u_name:string,argstr:string)
+nd_syscall.mremap(name:string,old_address:long,old_size:long,new_size:long,flags:long,new_address:long,argstr:string)
+nd_syscall.msgctl(name:string,msqid:long,cmd:long,buf_uaddr:long,argstr:string)
+nd_syscall.msgget(name:string,key:long,msgflg:long,msgflg_str:string,argstr:string)
+nd_syscall.msgrcv(name:string,msqid:long,msgp_uaddr:long,msgsz:long,msgtyp:long,msgflg:long,argstr:string)
+nd_syscall.msgsnd(name:string,msqid:long,msgp_uaddr:long,msgsz:long,msgflg:long,argstr:string)
+nd_syscall.msync(name:string,start:long,length:long,flags:long,argstr:string)
+nd_syscall.munlock(name:string,addr:long,len:long,argstr:string)
+nd_syscall.munlockall(name:string,argstr:string)
+nd_syscall.munmap(name:string,start:long,length:long,argstr:string)
+vm.brk(address:long,length:long)
+vm.mmap(address:unknown,length:unknown)
+vm.munmap(address:long,length:long)
+vm.oom_kill(task:long)
+vm.pagefault(write_access:long,address:long)
+vm.write_shared(address:long)
+nfsd.close(filename:string,name:string,argstr:string)
+nfsd.commit(fh:string,count:long,offset:long,flag:long,name:string,argstr:string,size:long,units:string)
+nfsd.create(fh:string,filelen:long,filename:string,type:long,iap_valid:long,iap_mode:long,name:string,argstr:string)
+nfsd.createv3(fh:string,filelen:long,filename:string,iap_valid:long,iap_mode:long,truncp:long,verfier:long,createmode:long,name:string,argstr:string)
+nfsd.dispatch(client_ip:long,proto:long,version:long,xid:long,prog:long,proc:long,name:string,argstr:string)
+nfsd.entries(fh:string,access:long,type:long,name:string,argstr:string)
+nfsd.lookup(fh:string,filelen:long,filename:string,name:string,argstr:string)
+nfsd.open(fh:string,access:long,type:long,name:string,argstr:string)
+nfsd.read(fh:string,file:long,count:long,offset:long,vec:long,vlen:long,name:string,argstr:string,size:long,units:string)
+nfsd.rename(fh:string,tfh:string,filelen:long,filename:string,tlen:long,tname:string,name:string,argstr:string)
+nfsd.return(name:string,retstr:string)
+nfsd.unlink(fh:string,filelen:long,filename:string,type:long,name:string,argstr:string)
+nfsd.write(fh:string,file:long,count:long,offset:long,vec:long,vlen:long,name:string,argstr:string,size:long,units:string)
+process.begin)
+process.create(task:long,new_pid:long)
+process.end)
+process.exec(filename:string)
+process.exec_complete(errno:long,success:long)
+process.exit(code:long)
+process.release(task:long,pid:long)
+process.start)
+process.syscall)
+sunrpc.entry(name:string,progname:string,prog:long,vers:long,authflavor:long,servername:string,prot:long,port:long,argstr:string)
+sunrpc.return(name:string,retstr:string)
+scheduler.balance)
+scheduler.cpu_off(task_prev:unknown,task_next:unknown,idle:long)
+scheduler.cpu_on(task_prev:long,idle:long)
+scheduler.ctxswitch(prev_pid:unknown,next_pid:unknown,prev_task:unknown,next_task:unknown,prevtsk_state:unknown)
+scheduler.migrate(task:long,cpu_from:long,cpu_to:long)
+scheduler.tick(idle:long)
+scsi.iocompleted(host_no:long,channel:long,lun:long,dev_id:long,device_state:long,data_direction:long,req_addr:long,goodbytes:long)
+scsi.iodispatching(host_no:long,channel:long,lun:long,dev_id:long,device_state:long,data_direction:long,request_buffer:long,request_bufflen:long,req_addr:long)
+scsi.iodone(host_no:long,channel:long,lun:long,dev_id:long,device_state:long,data_direction:long,req_addr:long,scsi_timer_pending:long)
+scsi.ioentry(disk_major:long,disk_minor:long,device_state:long,req_addr:long)
+socket.aio_read(name:string,_sock:long,size:long,protocol:long,family:long,state:long,flags:long,type:long)
+socket.aio_write(name:string,_sock:long,size:long,protocol:long,family:long,state:long,flags:long,type:long)
+socket.close(name:string,protocol:long,family:long,state:long,flags:long,type:long)
+socket.create(name:string,protocol:long,family:long,type:long,requester:long)
+socket.receive(_dwarf_tvar_tid:long,_dwarf_tvar_sock_16_tmp:long,_dwarf_tvar_sock_17_tmp:long,_dwarf_tvar_sock_18_tmp:long,_dwarf_tvar_sock_19_tmp:long,_dwarf_tvar_sock_20_tmp:long,name:string,size:long,protocol:long,family:long,state:long,flags:long,type:long,success:long)
+socket.recvmsg(name:string,size:long,protocol:long,family:long,state:long,flags:long,type:long)
+socket.send(_dwarf_tvar_tid:long,_dwarf_tvar_sock_32_tmp:long,_dwarf_tvar_sock_33_tmp:long,_dwarf_tvar_sock_34_tmp:long,_dwarf_tvar_sock_35_tmp:long,_dwarf_tvar_sock_36_tmp:long,name:string,size:long,protocol:long,family:long,state:long,flags:long,type:long,success:long)
+socket.sendmsg(name:string,size:long,protocol:long,family:long,state:long,flags:long,type:long)
+kernel.function("sock_recvmsg@net/socket.c:649")(_dwarf_tvar_tid:long)
+kernel.function("sock_aio_read@net/socket.c:750")(_dwarf_tvar_tid:long)
+kernel.function("sock_sendmsg@net/socket.c:566")(_dwarf_tvar_tid:long)
+kernel.function("sock_aio_write@net/socket.c:792")(_dwarf_tvar_tid:long)
+begin(-1001)(num:long)
+end(idx0:string)
+tcp.disconnect(name:string,sock:long,flags:long)
+tcp.recvmsg(name:string,sock:long,size:long)
+tcp.sendmsg(name:string,sock:long,size:long)
+tcp.setsockopt(name:string,sock:long,level:long,optname:long,optstr:string,optlen:long)
+udp.disconnect(name:string,sock:long,flags:long)
+udp.recvmsg(name:string,sock:long,size:long)
+udp.sendmsg(name:string,sock:long,size:long)
+generic.fop.aio_read(file:long,dev:long,devname:string,ino:long,pos:long,count:long,buf:long,name:string,argstr:string,size:long,units:string)
+generic.fop.aio_write(file:long,dev:long,devname:string,ino:long,pos:long,count:long,buf:long,name:string,argstr:string,size:long,units:string)
+generic.fop.llseek(dev:long,devname:string,ino:long,file:long,offset:long,origin:long,maxbyte:long,name:string,argstr:string)
+generic.fop.mmap(file:long,dev:long,devname:string,ino:long,vm_start:long,vm_end:long,vm_flags:long,name:string,argstr:string)
+generic.fop.open(dev:long,devname:string,ino:long,filename:string,flag:long,size:long,name:string,argstr:string)
+generic.fop.splice_read(dev:long,devname:string,ino:long,file:long,len:long,flags:long,name:string,argstr:string,size:long,units:string)
+generic.fop.splice_write(dev:long,devname:string,ino:long,file:long,len:long,flags:long,name:string,argstr:string,size:long,units:string)
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/IDECloseMonitor.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/IDECloseMonitor.java
new file mode 100644
index 0000000000..d614c9462a
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/IDECloseMonitor.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * 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:
+ * Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.internal;
+
+import java.text.MessageFormat;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.linuxtools.systemtap.ui.consolelog.actions.StopScriptAction;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchListener;
+import org.eclipse.ui.IWorkbenchWindow;
+
+
+/**
+ * This listener is responsible for monitoring workbench close actions. It is used
+ * to veto a shutdown if there are scripts still running and the user does not really
+ * want to shutdown.
+ * @author Ryan Morse
+ */
+public class IDECloseMonitor implements IWorkbenchListener {
+ public boolean preShutdown(IWorkbench workbench, boolean forced) {
+ boolean close = true;
+ if(!forced) {
+ IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
+
+ StopScriptAction ssa = new StopScriptAction();
+ ssa.init(window);
+ if(ssa.anyRunning()) {
+ String msg = MessageFormat.format(Localization.getString("IDECloseMonitor.StillRunning"),(Object[]) null);
+ close = MessageDialog.openQuestion(window.getShell(), "Closing...", msg);
+ }
+ }
+ return close;
+ }
+
+ public void postShutdown(IWorkbench workbench) {}
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/IDEPlugin.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/IDEPlugin.java
new file mode 100644
index 0000000000..53c4701ab6
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/IDEPlugin.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.internal;
+
+import org.eclipse.ui.IWorkbenchListener;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.plugin.*;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.linuxtools.systemtap.ui.consolelog.actions.StopScriptAction;
+import org.osgi.framework.BundleContext;
+
+
+/**
+ * The main plugin class to be used in the IDE. This class contains lifecycle controls
+ * for the plugin.
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin
+ * @author Ryan Morse
+ */
+public class IDEPlugin extends AbstractUIPlugin {
+ public IDEPlugin() {
+ plugin = this;
+ }
+
+ /**
+ * Called by the Eclipse Workbench at plugin activation time. Starts the plugin lifecycle.
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+
+ workbenchListener = new IDECloseMonitor();
+ plugin.getWorkbench().addWorkbenchListener(workbenchListener);
+ }
+
+ /**
+ * Called by the Eclipse Workbench to deactivate the plugin.
+ */
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+
+ StopScriptAction ssa = new StopScriptAction();
+ ssa.init(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
+ ssa.stopAll();
+
+ plugin.getWorkbench().removeWorkbenchListener(workbenchListener);
+
+ plugin = null;
+ }
+
+ /**
+ * Returns this plugin's instance.
+ */
+ public static IDEPlugin getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Returns an image descriptor for the image file at the given
+ * plug-in relative path.
+ *
+ * @param path the path
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getImageDescriptor(String path) {
+ return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+
+ private IWorkbenchListener workbenchListener;
+ private static IDEPlugin plugin;
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.linuxtools.systemtap.ui.ide";
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/Localization.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/Localization.java
new file mode 100644
index 0000000000..06f73fd023
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/Localization.java
@@ -0,0 +1,22 @@
+package org.eclipse.linuxtools.systemtap.ui.ide.internal;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Localization {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.systemtap.ui.ide.internal.localization";
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+ .getBundle(BUNDLE_NAME);
+
+ private Localization() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/localization.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/localization.properties
new file mode 100644
index 0000000000..56146d7aa1
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/internal/localization.properties
@@ -0,0 +1,70 @@
+RunScriptAction.NoScriptFile=No Script File\!
+RunScriptAction.Problem=Problem
+RunScriptAction.TapsetDirectoryRun=Can not run files in tapset directory\!
+RunScriptAction.Error=Error
+
+KernelSourceAction.Insert=&Insert
+KernelSourceAction.InsertSelectedFunction=Insert the Selected Function
+
+ProbeAliasAction.Insert=&Insert
+ProbeAliasAction.InsertSelectedProbe=Insert the Selected Probe
+ProbeAliasAction.AvailableVariables=available variables on this probe:
+
+FunctionBrowserAction.Insert=&Insert
+FunctionBrowserAction.InsertFunction=Insert the Selected Function
+
+CEditor.ProbeInsertFailed=Probe Insertion Failure
+CEditor.CanNotProbeLine=Stap cannot insert a probe on this line of code.
+
+IDECloseMonitor.StillRunning=There are scripts still running, are you sure you want to close?
+
+TapsetsPreferencePage.AdditionalTapsetsCategory=Additional tapsets to be used with every script
+TapsetsPreferencePage.AdditionalTapsets=&Additional tapsets:
+TapsetsPreferencePage.TapsetDirectory=Tapset Directory
+
+TapsetBrowserView.WhereDefaultTapset=Where are the default tapsets?
+
+SyntaxColoringPreferencePage.SyntaxColoringOptions=Syntax Coloring Options
+SyntaxColoringPreferencePage.STPEditor=stp Editor
+SyntaxColoringPreferencePage.DefaultColor=&Default Color:
+SyntaxColoringPreferencePage.KeywordColor=&Keyword Color:
+SyntaxColoringPreferencePage.EmbeddedCColor=&Embedded C Color:
+SyntaxColoringPreferencePage.EmbeddedColor=&Embedded Color:
+SyntaxColoringPreferencePage.CommentColor=&Comment Color:
+SyntaxColoringPreferencePage.TypeColor=&Type Color:
+SyntaxColoringPreferencePage.StringColor=&String Color:
+SyntaxColoringPreferencePage.CEditor=c Editor
+SyntaxColoringPreferencePage.PreprocessorColor=&Preprocessor Color:
+
+PathPreferencePage.KernelSourceDirectory=&Kernel source directory:
+PathPreferencePage.ExcludedSourceFolders=&Excluded source folders:
+PathPreferencePage.ExcludedDirectory=Excluded Directory
+
+ConditionalFilterPreferencePage.ConditiionalFilterSelector=Conditinal filters to be used with code completion
+ConditionalFilterPreferencePage.ConditionalFilters=&Conditional Filters:
+ConditionalFilterPreferencePage.NewFilter=New Filter
+
+IDEPreferencePage.UseStoredTapsetTree=Use stored tapset trees
+
+StapOptionsPreferencePage.StapOptions=Options for running stap
+
+TypeingPreferencePage.TypingPreferenceDescription=Empty page for now. Thinking of what to add.
+
+CodeAssistPreferencePage.CodeAssistPreferenceDescription=Preferences controling options for code assist in the editor
+CodeAssistPreferencePage.UseCodeAssist=&Use Code Assist
+CodeAssistPreferencePage.HowCodeAdded=How code assist adds code:
+CodeAssistPreferencePage.Insert=&Insert
+CodeAssistPreferencePage.Overwrite=&Overwrite
+CodeAssistPreferencePage.ActivationDelay=Activation &Delay (requires restart):
+CodeAssistPreferencePage.ActivationTrigger=Activation &Trigger:
+
+StapPreferencePage.StapPreferenceDescription=Empty page for now. Thinking of what to add.
+
+EditorPreferencePage.EditorPreferenceDescription=This is for basic properties of the editors.
+EditorPreferencePage.BackgroundColor=&Editor Background Color:
+EditorPreferencePage.ShowLineNumbers=Show Line &Numbers
+
+StapSettingsDialog.StapOptions=Stap Options
+
+KernelBrowserView.WhereKernelSource=Where is the Kernel Source Code?
+TapsetBrowserView.TapsetLocation=Tapset Location
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/CodeAssistPreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/CodeAssistPreferencePage.java
new file mode 100644
index 0000000000..ea1fc87d27
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/CodeAssistPreferencePage.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.preferences;
+
+import org.eclipse.jface.preference.*;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.IWorkbench;
+
+
+public class CodeAssistPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+ public CodeAssistPreferencePage() {
+ super(GRID);
+ LogManager.logDebug("Start CodeAssistPreferencePage:", this);
+ setPreferenceStore(IDEPlugin.getDefault().getPreferenceStore());
+ setDescription(Localization.getString("CodeAssistPreferencePage.CodeAssistPreferenceDescription"));
+ LogManager.logDebug("End CodeAssistPreferencePage:", this);
+ }
+
+ /**
+ * Creates the field editors. Field editors are abstractions of
+ * the common GUI blocks needed to manipulate various types
+ * of preferences. Each field editor knows how to save and
+ * restore itself.
+ */
+ public void createFieldEditors() {
+ LogManager.logDebug("Start createFieldEditors:", this);
+ addField(
+ new BooleanFieldEditor(
+ IDEPreferenceConstants.P_USE_CODE_ASSIST,
+ Localization.getString("CodeAssistPreferencePage.UseCodeAssist"),
+ getFieldEditorParent()));
+ addField(new RadioGroupFieldEditor(
+ IDEPreferenceConstants.P_COMPLETION,
+ Localization.getString("CodeAssistPreferencePage.HowCodeAdded"),
+ 1,
+ new String[][] {
+ {Localization.getString("CodeAssistPreferencePage.Insert"), IDEPreferenceConstants.P_COMPLETION_INSERT },
+ {Localization.getString("CodeAssistPreferencePage.Overwrite"), IDEPreferenceConstants.P_COMPLETION_OVERWRITE }},
+ getFieldEditorParent()));
+ addField(
+ new IntegerFieldEditor(
+ IDEPreferenceConstants.P_ACTIVATION_DELAY,
+ Localization.getString("CodeAssistPreferencePage.ActivationDelay"),
+ getFieldEditorParent()));
+ addField(
+ new StringFieldEditor(
+ IDEPreferenceConstants.P_ACTIVATION_TRIGGER,
+ Localization.getString("CodeAssistPreferencePage.ActivationTrigger"),
+ getFieldEditorParent()));
+ LogManager.logDebug("End createFieldEditors", this);
+ }
+
+ public void init(IWorkbench workbench) {
+ LogManager.logInfo("Initializing", this);
+ }
+
+ public void dispose() {
+ LogManager.logInfo("Disposing", this);
+ super.dispose();
+ }
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/ConditionalFilterPreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/ConditionalFilterPreferencePage.java
new file mode 100644
index 0000000000..f6bcf6d91f
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/ConditionalFilterPreferencePage.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.preferences;
+
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.linuxtools.systemtap.ui.structures.ui.ListEditor;
+import org.eclipse.linuxtools.systemtap.ui.structures.validators.ConditionalExpressionValidator;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+
+
+public class ConditionalFilterPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+ public ConditionalFilterPreferencePage() {
+ super(GRID);
+ LogManager.logDebug("Start ConditionalFilterPreferencePage:", this);
+ setPreferenceStore(IDEPlugin.getDefault().getPreferenceStore());
+ setDescription(Localization.getString("ConditionalFilterPreferencePage.ConditiionalFilterSelector"));
+ LogManager.logDebug("End ConditionalFilterPreferencePage:", this);
+ }
+
+ public void createFieldEditors() {
+ LogManager.logDebug("Start createFieldEditors:", this);
+
+ addField(new ListEditor(IDEPreferenceConstants.P_CONDITIONAL_FILTERS,
+ Localization.getString("ConditionalFilterPreferencePage.ConditionalFilters"), Localization.getString("ConditionalFilterPreferencePage.NewFilter"), "if()", new ConditionalExpressionValidator(), getFieldEditorParent()));
+ LogManager.logDebug("End createFieldEditors:", this);
+ }
+
+ public void init(IWorkbench workbench) {
+ LogManager.logInfo("Initializing", this);
+ }
+
+ public void dispose() {
+ LogManager.logInfo("Disposing", this);
+ super.dispose();
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/EditorPreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/EditorPreferencePage.java
new file mode 100644
index 0000000000..3195f7291b
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/EditorPreferencePage.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.preferences;
+
+import org.eclipse.jface.preference.*;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.IWorkbench;
+
+
+public class EditorPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+ public EditorPreferencePage() {
+ super(GRID);
+ LogManager.logDebug("Start EditorPreferencePage:", this);
+ setPreferenceStore(IDEPlugin.getDefault().getPreferenceStore());
+ setDescription(Localization.getString("EditorPreferencePage.EditorPreferenceDescription"));
+ LogManager.logDebug("End EditorPreferencePage:", this);
+ }
+
+ public void createFieldEditors() {
+ LogManager.logDebug("Start createFieldEditors:", this);
+ addField(new ColorFieldEditor(
+ IDEPreferenceConstants.P_EDITOR_BACKGROUND,
+ Localization.getString("EditorPreferencePage.BackgroundColor"), getFieldEditorParent()));
+
+ addField(new BooleanFieldEditor(
+ IDEPreferenceConstants.P_SHOW_LINE_NUMBERS,
+ Localization.getString("EditorPreferencePage.ShowLineNumbers"),
+ getFieldEditorParent()));
+ LogManager.logDebug("End createFieldEditors:", this);
+ }
+
+ public void init(IWorkbench workbench) {
+ LogManager.logInfo("Initializing", this);
+ }
+
+ public void dispose() {
+ LogManager.logInfo("Disposing", this);
+ super.dispose();
+ }
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/IDEPreferenceConstants.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/IDEPreferenceConstants.java
new file mode 100644
index 0000000000..5e2129531c
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/IDEPreferenceConstants.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.preferences;
+
+public class IDEPreferenceConstants {
+ //ide
+ public static final String P_STORED_TREE = "UseStoredTreePreference";
+
+ //ide.path
+// public static final String P_DEFAULT_TAPSET = "DefaultTapsetPreference";
+ public static final String P_KERNEL_SOURCE = "KernelSourcePreference";
+ public static final String P_EXCLUDED_KERNEL_SOURCE = "ExcludedKernelSource";
+
+ //ide.stap.tapsets
+ public static final String P_TAPSETS = "TapsetPreference";
+
+ //ide.editor
+ public static final String P_EDITOR_BACKGROUND = "EditorBackgroundPreference";
+ public static final String P_SHOW_LINE_NUMBERS = "ShowLineNumbers";
+
+ //ide.editor.codeassist
+ public static final String P_USE_CODE_ASSIST = "UseCodeAssistPreference";
+ public static final String P_COMPLETION = "CompletionPreference";
+ public static final String P_COMPLETION_INSERT = "CompletionInsertPreference";
+ public static final String P_COMPLETION_OVERWRITE = "CompletionOverwritePreference";
+ public static final String P_ACTIVATION_DELAY = "ActivationDelayPreference";
+ public static final String P_ACTIVATION_TRIGGER = "ActivationTriggerPreference";
+
+ //ide.editor.preferenceconstants
+ public static final String P_CONDITIONAL_FILTERS = "ConditionalFilters";
+
+ //ide.stap.stapoptions
+ public static final String[][] P_STAP = new String[][] {
+// {"-h", "\tshow help", "hStapPreference"},
+// {"-V", "\tshow version", "VStapPreference"},
+ {"-k", "\tkeep temporary directory", "kStapPreference"},
+ {"-u", "\tunoptimized translation", "uStapPreference"},
+// {"-g", "\tguru mode", "gStapPreference"},
+ {"-b", "\tbulk (relayfs) mode", "bStapPreference"},
+ {"-t", "\tbenchmarking timing information", "tStapPreference"},
+ {"-v", "\t\t\tincrease verbosity [0]", "vStapPreference"},
+ {"-p NUM", "\t\tstop after pass NUM 1-5"/*, instead of 5 (parse, elaborate, translate, compile, run)"*/, "pStapPreference"},
+ {"-s NUM", "\t\tbuffer size in megabytes", "sStapPreference"},
+// {"-I DIR", "\t\tlook in DIR for additional .stp script files, in addition to /usr/share/systemtap/tapset", "IStapPreference"},
+ {"-D NM=VAL", "\temit macro definition into C code", "DStapPreference"},
+ {"-R DIR", "\t\tlook in DIR for runtime", "RStapPreference"},
+ {"-r RELEASE", "\tuse kernel RELEASE", "rStapPreference"},
+ {"-m MODULE", "\tset probe module name", "mStapPreference"},
+ {"-o FILE", "\t\tsend output to file", "oStapPreference"},
+ {"-c CMD", "\t\tstart the probes, run CMD, and exit when it finishes", "cStapPreference"},
+ {"-x PID", "\t\tsets target() to PID", "xStapPreference"}};
+
+ public static final String[] P_STAP_OPTS = new String[] {
+ "vStapOptPreference",
+ "pStapOptPreference",
+ "sStapOptPreference",
+// "IStapOptPreference",
+ "DStapOptPreference",
+ "RStapOptPreference",
+ "rStapOptPreference",
+ "mStapOptPreference",
+ "oStapOptPreference",
+ "cStapOptPreference",
+ "xStapOptPreference"
+ };
+
+ //ide.editor.syntaxcoloring
+ public static final String P_STP_DEFAULT_COLOR = "stpDefaultColorPreference";
+ public static final String P_STP_KEYWORD_COLOR = "stpKeywordColorPreference";
+ public static final String P_STP_EMBEDDED_C_COLOR = "stpEmbeddedCColorPreference";
+ public static final String P_STP_EMBEDDED_COLOR = "stpEmbeddedColorPreference";
+ public static final String P_STP_COMMENT_COLOR = "stpCommentColorPreference";
+ public static final String P_STP_TYPE_COLOR = "stpTypeColorPreference";
+ public static final String P_STP_STRING_COLOR = "stpStringColorPreference";
+ public static final String P_C_DEFAULT_COLOR = "cDefaultColorPreference";
+ public static final String P_C_KEYWORD_COLOR = "cKeywordColorPreference";
+ public static final String P_C_COMMENT_COLOR = "cCommentColorPreference";
+ public static final String P_C_PREPROCESSOR_COLOR = "cPreprocessorColorPreference";
+ public static final String P_C_TYPE_COLOR = "cTypeColorPreference";
+ public static final String P_C_STRING_COLOR = "cStringColorPreference";
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/IDEPreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/IDEPreferencePage.java
new file mode 100644
index 0000000000..8296a315d7
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/IDEPreferencePage.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.preferences;
+
+import org.eclipse.jface.preference.*;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.IWorkbench;
+
+
+public class IDEPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+ public IDEPreferencePage() {
+ super(GRID);
+ LogManager.logDebug("Start IDEPreferencePage:", this);
+ setPreferenceStore(IDEPlugin.getDefault().getPreferenceStore());
+ setDescription("Preferences when loading the IDE perspective");
+ LogManager.logDebug("End IDEPreferencePage:", this);
+ }
+
+ public void createFieldEditors() {
+ LogManager.logDebug("Start createFieldEditors:", this);
+ addField(new BooleanFieldEditor(
+ IDEPreferenceConstants.P_STORED_TREE,
+ Localization.getString("IDEPreferencePage.UseStoredTapsetTree"),
+ getFieldEditorParent()));
+ LogManager.logDebug("End createFieldEditors:", this);
+ }
+
+ public void init(IWorkbench workbench) {
+ LogManager.logInfo("Initializing", this);
+ }
+
+ public void dispose() {
+ LogManager.logInfo("Disposing", this);
+ super.dispose();
+ }
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/PathPreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/PathPreferencePage.java
new file mode 100644
index 0000000000..b58a9549c6
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/PathPreferencePage.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.preferences;
+
+import org.eclipse.jface.preference.*;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.linuxtools.systemtap.ui.structures.ui.ListEditor;
+import org.eclipse.linuxtools.systemtap.ui.structures.validators.DirectoryValidator;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.IWorkbench;
+
+
+
+public class PathPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+ public PathPreferencePage() {
+ super(GRID);
+ LogManager.logDebug("Start PathPreferencePage:", this);
+ setPreferenceStore(IDEPlugin.getDefault().getPreferenceStore());
+ setDescription("Important directories");
+ LogManager.logDebug("End PathPreferencePage:", this);
+ }
+
+ public void createFieldEditors() {
+ LogManager.logDebug("Start createFieldEditors:", this);
+// addField(new DirectoryFieldEditor(IDEPreferenceConstants.P_DEFAULT_TAPSET,
+// "&Default tapset directory:", getFieldEditorParent()));
+ addField(new DirectoryFieldEditor(IDEPreferenceConstants.P_KERNEL_SOURCE,
+ Localization.getString("PathPreferencePage.KernelSourceDirectory"), getFieldEditorParent()));
+
+ addField(new ListEditor(IDEPreferenceConstants.P_EXCLUDED_KERNEL_SOURCE,
+ Localization.getString("PathPreferencePage.ExcludedSourceFolders"), Localization.getString("PathPreferencePage.ExcludedDirectory"), "", new DirectoryValidator(), getFieldEditorParent()));
+ LogManager.logDebug("End createFieldEditors:", this);
+ }
+
+ public void init(IWorkbench workbench) {
+ LogManager.logInfo("Initializing", this);
+ }
+
+ public void dispose() {
+ LogManager.logInfo("Disposing", this);
+ super.dispose();
+ }
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/PreferenceInitializer.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/PreferenceInitializer.java
new file mode 100644
index 0000000000..d19dfb0e33
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/PreferenceInitializer.java
@@ -0,0 +1,93 @@
+/* Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.preferences;
+
+import java.io.File;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.linuxtools.systemtap.ui.ide.editors.c.ICColorConstants;
+import org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.STPColorConstants;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.swt.graphics.RGB;
+
+
+public class PreferenceInitializer extends AbstractPreferenceInitializer {
+ public void initializeDefaultPreferences() {
+ LogManager.logDebug("Start initializeDefaultPreferences:", this);
+ IPreferenceStore store = IDEPlugin.getDefault().getPreferenceStore();
+
+ //ide
+ store.setDefault(IDEPreferenceConstants.P_STORED_TREE, true);
+
+ //ide.path
+// store.setDefault(PreferenceConstants.P_DEFAULT_TAPSET, "/usr/share/systemtap/tapset");
+ store.setDefault(IDEPreferenceConstants.P_KERNEL_SOURCE, "");
+ store.setDefault(IDEPreferenceConstants.P_EXCLUDED_KERNEL_SOURCE,
+ "CVS/" + File.pathSeparator +
+ ".svn/" + File.pathSeparator +
+ "{arch}/" + File.pathSeparator +
+ ".arch-ids/" + File.pathSeparator +
+ ".bzr/" + File.pathSeparator +
+ "debian/" + File.pathSeparator +
+ ".git/");
+
+ //ide.stap.tapsets
+ store.setDefault(IDEPreferenceConstants.P_TAPSETS, "");
+
+ //ide.editor
+ PreferenceConverter.setDefault(store, IDEPreferenceConstants.P_EDITOR_BACKGROUND, new RGB(255,255,255));
+ store.setDefault(IDEPreferenceConstants.P_SHOW_LINE_NUMBERS, false);
+
+ //ide.editor.codeassist
+ store.setDefault(IDEPreferenceConstants.P_USE_CODE_ASSIST, true);
+ store.setDefault(IDEPreferenceConstants.P_COMPLETION, IDEPreferenceConstants.P_COMPLETION_INSERT);
+ store.setDefault(IDEPreferenceConstants.P_ACTIVATION_DELAY, 200);
+ store.setDefault(IDEPreferenceConstants.P_ACTIVATION_TRIGGER, ".");
+
+ //ide.editor.conditionalfilters
+ store.setDefault(IDEPreferenceConstants.P_CONDITIONAL_FILTERS,
+ "if(pid=currentpid)" + File.pathSeparator +
+ "if(execname=cmdname)" + File.pathSeparator +
+ "if(cpu=0)" + File.pathSeparator +
+ "if(caller=functionname)");
+
+
+ //ide.stap.stapoptions
+ for(int i=0; i<IDEPreferenceConstants.P_STAP.length; i++) {
+ store.setDefault(IDEPreferenceConstants.P_STAP[i][2], false);
+ }
+
+ for(int i=0; i<IDEPreferenceConstants.P_STAP_OPTS.length; i++) {
+ store.setDefault(IDEPreferenceConstants.P_STAP_OPTS[i], "");
+ }
+
+ //ide.editor.syntaxcoloring
+ PreferenceConverter.setDefault(store, IDEPreferenceConstants.P_STP_DEFAULT_COLOR, STPColorConstants.DEFAULT);
+ PreferenceConverter.setDefault(store, IDEPreferenceConstants.P_STP_KEYWORD_COLOR, STPColorConstants.KEYWORD);
+ PreferenceConverter.setDefault(store, IDEPreferenceConstants.P_STP_EMBEDDED_C_COLOR, STPColorConstants.EMBEDDEDC);
+ PreferenceConverter.setDefault(store, IDEPreferenceConstants.P_STP_EMBEDDED_COLOR, STPColorConstants.EMBEDDED);
+ PreferenceConverter.setDefault(store, IDEPreferenceConstants.P_STP_COMMENT_COLOR, STPColorConstants.COMMENT);
+ PreferenceConverter.setDefault(store, IDEPreferenceConstants.P_STP_TYPE_COLOR, STPColorConstants.TYPE);
+ PreferenceConverter.setDefault(store, IDEPreferenceConstants.P_STP_STRING_COLOR, STPColorConstants.STP_STRING);
+
+ PreferenceConverter.setDefault(store, IDEPreferenceConstants.P_C_DEFAULT_COLOR, ICColorConstants.DEFAULT);
+ PreferenceConverter.setDefault(store, IDEPreferenceConstants.P_C_KEYWORD_COLOR, ICColorConstants.KEYWORD);
+ PreferenceConverter.setDefault(store, IDEPreferenceConstants.P_C_COMMENT_COLOR, ICColorConstants.COMMENT);
+ PreferenceConverter.setDefault(store, IDEPreferenceConstants.P_C_PREPROCESSOR_COLOR, ICColorConstants.PREPROCESSOR);
+ PreferenceConverter.setDefault(store, IDEPreferenceConstants.P_C_TYPE_COLOR, ICColorConstants.TYPE);
+ PreferenceConverter.setDefault(store, IDEPreferenceConstants.P_C_STRING_COLOR, ICColorConstants.STRING);
+
+ LogManager.logDebug("End initializeDefaultPreferences:", this);
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/StapOptionsPreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/StapOptionsPreferencePage.java
new file mode 100644
index 0000000000..ecd9ca5e84
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/StapOptionsPreferencePage.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.preferences;
+
+import org.eclipse.jface.preference.*;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.IWorkbench;
+
+
+public class StapOptionsPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+ public StapOptionsPreferencePage() {
+ super(GRID);
+ LogManager.logDebug("Start StapOptionsPreferencePage:", this);
+ setPreferenceStore(IDEPlugin.getDefault().getPreferenceStore());
+ setDescription(Localization.getString("StapOptionsPreferencePage.StapOptions"));
+ LogManager.logDebug("End StapOptionsPreferencePage:", this);
+ }
+
+ public void createFieldEditors() {
+ LogManager.logDebug("Start createFieldEditors:", this);
+ for(int i=0; i<IDEPreferenceConstants.P_STAP.length; i++) {
+ addField(
+ new BooleanFieldEditor(
+ IDEPreferenceConstants.P_STAP[i][2],
+ IDEPreferenceConstants.P_STAP[i][0] + "\t" + IDEPreferenceConstants.P_STAP[i][1],
+ getFieldEditorParent()));
+
+ if(2 < IDEPreferenceConstants.P_STAP[i][0].length()) {
+ StringFieldEditor sfe = new StringFieldEditor(
+ IDEPreferenceConstants.P_STAP_OPTS[i-IDEPreferenceConstants.P_STAP.length+IDEPreferenceConstants.P_STAP_OPTS.length],
+ "\t",
+ getFieldEditorParent());
+
+ addField(sfe);
+ }
+ }
+ LogManager.logDebug("End createFieldEditors:", this);
+ }
+
+ public void init(IWorkbench workbench) {
+ LogManager.logInfo("Initializing", this);
+ }
+
+ public void dispose() {
+ LogManager.logInfo("Disposing", this);
+ super.dispose();
+ }
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/StapPreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/StapPreferencePage.java
new file mode 100644
index 0000000000..51ea2e49f0
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/StapPreferencePage.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.preferences;
+
+import org.eclipse.jface.preference.*;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.IWorkbench;
+
+
+public class StapPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+ public StapPreferencePage() {
+ super(GRID);
+ LogManager.logDebug("Start StapPreferencePage:", this);
+ setPreferenceStore(IDEPlugin.getDefault().getPreferenceStore());
+ setDescription(Localization.getString("StapPreferencePage.StapPreferenceDescription"));
+ LogManager.logDebug("End StapPreferencePage:", this);
+ }
+
+ //TODO: Add content to this page
+ public void createFieldEditors() {
+ LogManager.logDebug("Start createFieldEditors:", this);
+ LogManager.logDebug("End createFieldEditors:", this);
+ }
+
+ public void init(IWorkbench workbench) {
+ LogManager.logInfo("Initializing", this);
+ }
+
+ public void dispose() {
+ LogManager.logInfo("Disposing", this);
+ super.dispose();
+ }
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/SyntaxColoringPreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/SyntaxColoringPreferencePage.java
new file mode 100644
index 0000000000..f66ed2882f
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/SyntaxColoringPreferencePage.java
@@ -0,0 +1,185 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.preferences;
+
+import org.eclipse.jface.preference.*;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.IWorkbench;
+
+
+public class SyntaxColoringPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
+ public SyntaxColoringPreferencePage() {
+ super();
+ LogManager.logDebug("Start SyntaxColoringPreferencePage:", this);
+ setPreferenceStore(IDEPlugin.getDefault().getPreferenceStore());
+ setDescription(Localization.getString("SyntaxColoringPreferencePage.SyntaxColoringOptions"));
+ LogManager.logDebug("End SyntaxColoringPreferencePage:", this);
+ }
+
+ public void init(IWorkbench workbench) {
+ LogManager.logInfo("Initializing", this);
+ }
+
+ protected Control createContents(Composite parent) {
+ LogManager.logDebug("Start createContents: parent-" + parent, this);
+ final TabFolder tabFolder = new TabFolder(parent, SWT.BORDER);
+
+ //STP Editor
+ TabItem stpEditor = new TabItem(tabFolder, SWT.NULL);
+ stpEditor.setText(Localization.getString("SyntaxColoringPreferencePage.STPEditor"));
+ Composite comp = new Composite(tabFolder, SWT.NULL);
+ stpEditor.setControl(comp);
+
+ stpDC = createColorFieldEditor(
+ IDEPreferenceConstants.P_STP_DEFAULT_COLOR,
+ Localization.getString("SyntaxColoringPreferencePage.DefaultColor"), comp);
+ stpKC = createColorFieldEditor(
+ IDEPreferenceConstants.P_STP_KEYWORD_COLOR,
+ Localization.getString("SyntaxColoringPreferencePage.KeywordColor"), comp);
+ stpEC = createColorFieldEditor(
+ IDEPreferenceConstants.P_STP_EMBEDDED_C_COLOR,
+ Localization.getString("SyntaxColoringPreferencePage.EmbeddedCColor"), comp);
+ stpEE = createColorFieldEditor(
+ IDEPreferenceConstants.P_STP_EMBEDDED_COLOR,
+ Localization.getString("SyntaxColoringPreferencePage.EmbeddedColor"), comp);
+ stpCC = createColorFieldEditor(
+ IDEPreferenceConstants.P_STP_COMMENT_COLOR,
+ Localization.getString("SyntaxColoringPreferencePage.CommentColor"), comp);
+ stpTC = createColorFieldEditor(
+ IDEPreferenceConstants.P_STP_TYPE_COLOR,
+ Localization.getString("SyntaxColoringPreferencePage.TypeColor"), comp);
+ stpSC = createColorFieldEditor(
+ IDEPreferenceConstants.P_STP_STRING_COLOR,
+ Localization.getString("SyntaxColoringPreferencePage.StringColor"), comp);
+
+ //C Editor
+ TabItem cEditor = new TabItem(tabFolder, SWT.NULL);
+ cEditor.setText(Localization.getString("SyntaxColoringPreferencePage.CEditor"));
+ comp = new Composite(tabFolder, SWT.NULL);
+ cEditor.setControl(comp);
+
+ cDC = createColorFieldEditor(
+ IDEPreferenceConstants.P_C_DEFAULT_COLOR,
+ Localization.getString("SyntaxColoringPreferencePage.DefaultColor"), comp);
+ cKC = createColorFieldEditor(
+ IDEPreferenceConstants.P_C_KEYWORD_COLOR,
+ Localization.getString("SyntaxColoringPreferencePage.KeywordColor"), comp);
+ cPC = createColorFieldEditor(
+ IDEPreferenceConstants.P_C_PREPROCESSOR_COLOR,
+ Localization.getString("SyntaxColoringPreferencePage.PreprocessorColor"), comp);
+ cCC = createColorFieldEditor(
+ IDEPreferenceConstants.P_C_COMMENT_COLOR,
+ Localization.getString("SyntaxColoringPreferencePage.CommentColor"), comp);
+ cTC = createColorFieldEditor(
+ IDEPreferenceConstants.P_C_TYPE_COLOR,
+ Localization.getString("SyntaxColoringPreferencePage.TypeColor"), comp);
+ cSC = createColorFieldEditor(
+ IDEPreferenceConstants.P_C_STRING_COLOR,
+ Localization.getString("SyntaxColoringPreferencePage.StringColor"), comp);
+
+ LogManager.logDebug("End createContents: returnVal-" + tabFolder, this);
+ return tabFolder;
+ }
+
+ private ColorFieldEditor createColorFieldEditor(String name, String lblText, Composite parent) {
+ LogManager.logDebug("Start createColorFieldEditor: name-" + name + ", lblText-" + lblText + ", parent-" + parent, this);
+ ColorFieldEditor cfe = new ColorFieldEditor(name, lblText, parent);
+ cfe.setPage(this);
+ cfe.setPreferenceStore(getPreferenceStore());
+ cfe.load();
+
+ LogManager.logDebug("End createColorFieldEditor: returnVal-" + cfe, this);
+ return cfe;
+ }
+
+ protected void performDefaults() {
+ LogManager.logDebug("Start performDefaults:", this);
+ stpDC.loadDefault();
+ stpKC.loadDefault();
+ stpEC.loadDefault();
+ stpEE.loadDefault();
+ stpCC.loadDefault();
+ stpTC.loadDefault();
+ stpSC.loadDefault();
+ cDC.loadDefault();
+ cKC.loadDefault();
+ cPC.loadDefault();
+ cCC.loadDefault();
+ cTC.loadDefault();
+ cSC.loadDefault();
+
+ super.performDefaults();
+ LogManager.logDebug("End performDefaults:", this);
+ }
+
+ public boolean performOk() {
+ LogManager.logDebug("Start performOk:", this);
+ stpDC.store();
+ stpKC.store();
+ stpEC.store();
+ stpEE.store();
+ stpCC.store();
+ stpTC.store();
+ stpSC.store();
+ cDC.store();
+ cKC.store();
+ cPC.store();
+ cCC.store();
+ cTC.store();
+ cSC.store();
+
+ LogManager.logDebug("End performOk returnVal-true", this);
+ return true;
+ }
+
+ public void dispose() {
+ LogManager.logInfo("Disposing", this);
+ super.dispose();
+ stpDC.dispose();
+ stpKC.dispose();
+ stpEC.dispose();
+ stpEE.dispose();
+ stpCC.dispose();
+ stpTC.dispose();
+ stpSC.dispose();
+ cDC.dispose();
+ cKC.dispose();
+ cPC.dispose();
+ cCC.dispose();
+ cTC.dispose();
+ cSC.dispose();
+ stpDC = null;
+ stpKC = null;
+ stpEC = null;
+ stpEE = null;
+ stpCC = null;
+ stpTC = null;
+ stpSC = null;
+ cDC = null;
+ cKC = null;
+ cPC = null;
+ cCC = null;
+ cTC = null;
+ cSC = null;
+ }
+
+ private ColorFieldEditor stpDC, stpKC, stpEC, stpEE, stpCC, stpTC, stpSC;
+ private ColorFieldEditor cDC, cKC, cPC, cCC, cTC, cSC;
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/TapsetsPreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/TapsetsPreferencePage.java
new file mode 100644
index 0000000000..ccf5a0f8bd
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/TapsetsPreferencePage.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.preferences;
+
+import org.eclipse.jface.preference.*;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.IWorkbench;
+
+
+public class TapsetsPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+ public TapsetsPreferencePage() {
+ super(GRID);
+ LogManager.logDebug("Start TapsetsPreferencePage:", this);
+ setPreferenceStore(IDEPlugin.getDefault().getPreferenceStore());
+ setDescription(Localization.getString("TapsetsPreferencePage.AdditionalTapsetsCategory"));
+ LogManager.logDebug("End TapsetsPreferencePage:", this);
+ }
+
+ /**
+ * Creates the field editors. Field editors are abstractions of
+ * the common GUI blocks needed to manipulate various types
+ * of preferences. Each field editor knows how to save and
+ * restore itself.
+ */
+ public void createFieldEditors() {
+ LogManager.logDebug("Start createFieldEditors:", this);
+ addField(new PathEditor(IDEPreferenceConstants.P_TAPSETS,
+ Localization.getString("TapsetsPreferencePage.AdditionalTapsets"), Localization.getString("TapsetsPreferencePage.TapsetDirectory"), getFieldEditorParent()));
+ LogManager.logDebug("End createFieldEditors:", this);
+ }
+
+ public void init(IWorkbench workbench) {
+ LogManager.logInfo("Initializing", this);
+ }
+
+ public void dispose() {
+ LogManager.logInfo("Disposing", this);
+ super.dispose();
+ }
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/TypeingPreferencePage.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/TypeingPreferencePage.java
new file mode 100644
index 0000000000..164ca9935a
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/preferences/TypeingPreferencePage.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.preferences;
+
+import org.eclipse.jface.preference.*;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.IWorkbench;
+
+
+public class TypeingPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+ public TypeingPreferencePage() {
+ super(GRID);
+ LogManager.logDebug("Start TypeingPreferencePage:", this);
+ setPreferenceStore(IDEPlugin.getDefault().getPreferenceStore());
+ setDescription(Localization.getString("TypeingPreferencePage.TypingPreferenceDescription"));
+ LogManager.logDebug("End TypeingPreferencePage:", this);
+ }
+
+ //TODO: Add content to this page
+ public void createFieldEditors() {
+ LogManager.logDebug("Start createFieldEditors:", this);
+ LogManager.logDebug("End createFieldEditors:", this);
+ }
+
+ public void init(IWorkbench workbench) {
+ LogManager.logInfo("Initializing", this);
+ }
+
+ public void dispose() {
+ LogManager.logInfo("Disposing", this);
+ super.dispose();
+ }
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/Query.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/Query.java
new file mode 100644
index 0000000000..d931c8e88f
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/Query.java
@@ -0,0 +1,176 @@
+package org.eclipse.linuxtools.systemtap.ui.ide.structures;
+
+import java.util.StringTokenizer;
+
+public final class Query {
+
+ public String tableName;
+ public String where;
+ public String groupBy;
+ public String orderBy;
+ public String[] columnNames;
+ public String[] newColumnNames;
+
+ /**
+ * This constructor is only used internally to set the various fields
+ * to null.
+ */
+ private Query() {
+ this.where = null;
+ this.groupBy = null;
+ this.orderBy = null;
+ this.newColumnNames = null;
+ }
+
+ public Query(final String tableName, final String[] columnNames) {
+ this();
+ this.tableName = tableName;
+ this.columnNames = columnNames;
+ }
+
+ public Query(final Query query) {
+ tableName = query.tableName;
+ columnNames = query.columnNames;
+ newColumnNames = query.newColumnNames;
+ where = query.where;
+ groupBy = query.groupBy;
+ orderBy = query.orderBy;
+ }
+
+ public Query(final String tableName) {
+ this();
+ this.tableName = tableName;
+ this.columnNames = null;
+ }
+
+ public Query(final String tableName, final String[] columnNames,
+ final String[] newColumnNames, final String where,
+ final String groupBy, final String orderBy) {
+ this.tableName = tableName;
+ this.columnNames = columnNames;
+ this.newColumnNames = newColumnNames;
+ this.where = where;
+ this.groupBy = groupBy;
+ this.orderBy = orderBy;
+ }
+
+ public String toString() {
+ return buildQuery(tableName, columnNames, newColumnNames, where,
+ groupBy, orderBy);
+ }
+
+ private String buildQuery(final String tableName, final String[] fields,
+ final String[] columnNames, final String whereClauses,
+ final String groupBy, final String orderBy) {
+ String query = "SELECT ";
+ if (fields == (null))
+ query += "* ";
+ else
+ for (int i = 0; i < fields.length; i++) {
+ query += fields[i];
+ if ((columnNames != null)
+ && (columnNames.length == fields.length))
+ query += " AS " + columnNames[i];
+ if (i != (fields.length - 1))
+ query += ", ";
+ }
+ query += " FROM " + tableName;
+ if (whereClauses != null)
+ query += " WHERE " + whereClauses;
+ if (groupBy != null)
+ query += " GROUP BY " + groupBy;
+ if (orderBy != null)
+ query += " ORDER BY " + orderBy;
+ return query;
+ }
+
+ /**
+ * Turns the query into a string that can be written to a file and easily
+ * recreated as a Query object.
+ *
+ * @return
+ */
+ public String toSavableQueryString() {
+ String query = tableName + ":: COLS ";
+ if (columnNames != null)
+ for (final String element : columnNames)
+ query += element + " ";
+ else
+ query += "*";
+
+ query += ":: NEW_COLS ";
+ if (columnNames != null)
+ for (final String element : newColumnNames)
+ query += element + " ";
+ query += ":: WHERE " + where;
+ query += ":: GROUP " + groupBy;
+ query += ":: ORDER " + orderBy;
+ return query;
+ }
+
+ /**
+ * Creates a Query object from a string created by toSavableQueryString()
+ *
+ * @param query
+ * The query string to be turned into a Query object.
+ * @return a new Query object created by the given string.
+ */
+ public static Query getQueryFromString(final String query) {
+ if (query == null)
+ return null;
+ final String[] subQuery = query.split("::");
+ final Query tempQuery = new Query(subQuery[0]);
+ for (int i = 1; i < subQuery.length; i++) {
+ subQuery[i] = subQuery[i].trim();
+ if (subQuery[i].startsWith("COLS ")) {
+ String temp = subQuery[i].replace("COLS ", "");
+ temp = temp.trim();
+ final StringTokenizer tok = new StringTokenizer(temp);
+ final String next = tok.nextToken();
+ if (next.equals("null") || next.equals("*"))
+ tempQuery.columnNames = null;
+ else {
+ tempQuery.columnNames = new String[tok.countTokens() + 1];
+ tempQuery.columnNames[0] = next;
+ for (int j = 1; j < tempQuery.columnNames.length; j++)
+ tempQuery.columnNames[j] = tok.nextToken();
+ }
+ } else if (subQuery[i].startsWith("NEW_COLS ")) {
+ String temp = subQuery[i].replace("NEW_COLS ", "");
+ temp = temp.trim();
+ final StringTokenizer tok = new StringTokenizer(temp);
+ final String next = tok.nextToken();
+ if (next.equals("null"))
+ tempQuery.newColumnNames = null;
+ else {
+ tempQuery.newColumnNames = new String[tok.countTokens() + 1];
+ tempQuery.newColumnNames[0] = next;
+ for (int j = 1; j < tempQuery.newColumnNames.length; j++)
+ tempQuery.newColumnNames[j] = tok.nextToken();
+ }
+ } else if (subQuery[i].startsWith("WHERE ")) {
+ String temp = subQuery[i].replace("WHERE ", "");
+ temp = temp.trim();
+ if (temp.equals("null"))
+ tempQuery.where = null;
+ else
+ tempQuery.where = temp;
+ } else if (subQuery[i].startsWith("GROUP ")) {
+ String temp = subQuery[i].replace("GROUP ", "");
+ temp = temp.trim();
+ if (temp.equals("null"))
+ tempQuery.groupBy = null;
+ else
+ tempQuery.groupBy = temp;
+ } else if (subQuery[i].startsWith("ORDER ")) {
+ String temp = subQuery[i].replace("ORDER ", "");
+ temp = temp.trim();
+ if (temp.equals("null"))
+ tempQuery.orderBy = null;
+ else
+ tempQuery.orderBy = temp;
+ }
+ }
+ return tempQuery;
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/StapErrorParser.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/StapErrorParser.java
new file mode 100644
index 0000000000..351dc38e3d
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/StapErrorParser.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.structures;
+
+import java.util.ArrayList;
+
+import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.IErrorParser;
+
+
+/**
+ * Parses the output from the stap command into a table of strings that are displayed
+ * in the error log.
+ * @author Ryan Morse
+ */
+public final class StapErrorParser implements IErrorParser {
+ /**
+ * Parses the error log passed in into a table of strings.
+ * @param output The output from the stderr StreamGobbler.
+ * @return A table of strings in the proper format to be displayed in the error log.
+ */
+ public String[][] parseOutput(String output) {
+ String[][] sErrors = null;
+ ArrayList<String[]> errors = new ArrayList<String[]>();
+ int errorType = TYPE;
+
+ if(null != output) {
+ String[] tokens = output.split("\\s");
+ String[] row = null;
+
+ for(int i=0; i<tokens.length; i++) {
+ if(tokens[i].equals("error:")) {
+ row = new String[] {"", "", "", ""};
+ errors.add(row);
+ row[TYPE] = tokens[i-1] + " " + tokens[i];
+ errorType = ERROR;
+ i++;
+ } else if(tokens[i].equals("saw:")) {
+ errorType = SAW;
+ i++;
+ } else if(tokens[i].equals("at")) {
+ errorType = LOCATION;
+ i++;
+ } else if(tokens[i].equals("Pass")) {
+ errorType = PASS;
+
+ }
+
+ if(null != row && errorType != PASS)
+ row[errorType] += tokens[i] + " ";
+ }
+
+ sErrors = new String[errors.size()][4];
+ System.arraycopy(errors.toArray(), 0, sErrors, 0, errors.size());
+
+ for(int i=0; i<sErrors.length; i++)
+ sErrors[i][LOCATION] = fixLocation(sErrors[i][LOCATION]);
+ }
+
+ return sErrors;
+ }
+
+ private static String fixLocation(String loc) {
+ if(loc.contains(":")) {
+ loc = loc.substring(loc.indexOf(':')+1, loc.lastIndexOf(':'));
+ return loc;
+ } else
+ return "";
+ }
+
+ private static final int TYPE = 0;
+ private static final int ERROR = 1;
+ private static final int SAW = 2;
+ private static final int LOCATION = 3;
+ private static final int PASS = 4;
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TapsetLibrary.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TapsetLibrary.java
new file mode 100644
index 0000000000..b884a22200
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TapsetLibrary.java
@@ -0,0 +1,202 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.structures;
+
+import java.io.File;
+
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.linuxtools.systemtap.ui.ide.IDESessionSettings;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
+import org.eclipse.linuxtools.systemtap.ui.ide.preferences.IDEPreferenceConstants;
+import org.eclipse.linuxtools.systemtap.ui.structures.TreeNode;
+import org.eclipse.linuxtools.systemtap.ui.structures.listeners.IUpdateListener;
+import org.eclipse.linuxtools.systemtap.ui.systemtapgui.preferences.PreferenceConstants;
+import org.eclipse.ui.PlatformUI;
+
+
+
+/**
+ * This class is used for obtaining all probes and functions from the tapsets.
+ * It will initially try to obtain the list from the TreeSettings.xml file, but
+ * if there is a problem doing that it will run the TapsetParser in order to
+ * obtain everything that way.
+ * @author Ryan Morse
+ */
+public final class TapsetLibrary {
+ public static TreeNode getProbes() {
+ return probeTree;
+ }
+
+ public static TreeNode getFunctions() {
+ return functionTree;
+ }
+
+ /**
+ * This mthod will attempt to get the most up-to-date information.
+ * However, if the TapsetParser is running already it will quit,
+ * assuming that new information will be avilable soon. By registering
+ * a listener at that point the class can be notified when an update is
+ * available.
+ */
+ public static void init() {
+ if(null != stpp && stpp.isRunning())
+ return;
+
+ if(IDEPlugin.getDefault().getPreferenceStore()
+ .getBoolean(IDEPreferenceConstants.P_STORED_TREE) &&
+ isTreeFileCurrent())
+ readTreeFile();
+ else
+ runStapParser();
+ }
+
+ /**
+ * This method will create a new instance of the TapsetParser in order
+ * to get the information directly from the files.
+ */
+ private static void runStapParser() {
+ String[] tapsets = IDEPlugin.getDefault().getPreferenceStore()
+ .getString(IDEPreferenceConstants.P_TAPSETS).split(File.pathSeparator);
+
+ stpp = new TapsetParser(tapsets);
+ stpp.start();
+ stpp.addListener(completionListener);
+ functionTree = stpp.getFunctions();
+ probeTree = stpp.getProbes();
+ }
+
+ /**
+ * This method will get all of the tree information from
+ * the TreeSettings xml file.
+ */
+ private static void readTreeFile() {
+ functionTree = TreeSettings.getFunctionTree();
+ probeTree = TreeSettings.getProbeTree();
+ }
+
+ /**
+ * This method checks to see if the tapsets have changed
+ * at all since the TreeSettings.xml file was created.
+ * @return boolean indecating whether or not the TreeSettings.xml file has the most up-to-date version
+ */
+ private static boolean isTreeFileCurrent() {
+ long treesDate = TreeSettings.getTreeFileDate();
+
+ IPreferenceStore p = IDEPlugin.getDefault().getPreferenceStore();
+ String[] tapsets = p.getString(IDEPreferenceConstants.P_TAPSETS).split(File.pathSeparator);
+
+ File f = getTapsetLocation(p);
+
+ if(!checkIsCurrentFolder(treesDate, f))
+ return false;
+
+ if(null != tapsets) {
+ for(int i=0; i<tapsets.length; i++) {
+ f = new File(tapsets[i]);
+ if(f.lastModified() > treesDate)
+ return false;
+ if(f.canRead() && !checkIsCurrentFolder(treesDate, f))
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * This method attempts to locate the default tapset directory.
+ * @param p Preference store where the tapset location might be stored
+ * @return File representing the default tapset location.
+ */
+ public static File getTapsetLocation(IPreferenceStore p) {
+ File f;
+ String path = p.getString(PreferenceConstants.P_ENV[2][0]);
+ if(path.trim().equals("")) {
+ f = new File("/usr/share/systemtap/tapset");
+ if(!f.exists()) {
+ f = new File("/usr/local/share/systemtap/tapset");
+ if(!f.exists()) {
+ InputDialog i = new InputDialog(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ Localization.getString("TapsetBrowserView.TapsetLocation"), Localization.getString("TapsetBrowserView.WhereDefaultTapset"), "", null);
+ i.open();
+ p.setValue(PreferenceConstants.P_ENV[2][0], i.getValue());
+ f = new File( i.getValue() );
+ }
+ }
+ } else {
+ f = new File( p.getString(path) );
+ }
+ IDESessionSettings.tapsetLocation = f.getAbsolutePath();
+ return f;
+ }
+
+ /**
+ * This method checks the provided time stap against the folders
+ * time stamp. This is to see if the folder may have new data in it
+ * @param time The current time stamp
+ * @param folder The folder to check if it is newer the then time stamp
+ * @return boolean indicating whther the time stamp is newer then the folder
+ */
+ private static boolean checkIsCurrentFolder(long time, File folder) {
+ File[] fs = folder.listFiles();
+
+ for(int i=0; i<fs.length; i++) {
+ if(fs[i].lastModified() > time)
+ return false;
+
+ if(fs[i].isDirectory() && fs[i].canRead())
+ if(!checkIsCurrentFolder(time, fs[i]))
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Adds a new listener to the TapsetParser
+ * @param listener the listener to be added
+ * @return boolean indacating whether or not the listener was added
+ */
+ public static boolean addListener(IUpdateListener listener) {
+ if(null == stpp)
+ return false;
+
+ stpp.addListener(listener);
+ return true;
+ }
+
+ /**
+ * Removes the provided listener from the tapsetParser.
+ * @param listener The listener to be removed from the tapsetParser
+ */
+ public static void removeUpdateListener(IUpdateListener listener) {
+ stpp.removeListener(listener);
+ }
+
+ /**
+ * This class handles saving the results of the TapsetParser to
+ * the TreeSettings.xml file.
+ */
+ private static final IUpdateListener completionListener = new IUpdateListener() {
+ public void handleUpdateEvent() {
+ functionTree = stpp.getFunctions();
+ probeTree = stpp.getProbes();
+ if(stpp.isFinishSuccessful())
+ TreeSettings.setTrees(functionTree, probeTree);
+ }
+ };
+
+ private static TreeNode functionTree = null;
+ private static TreeNode probeTree = null;
+ private static TapsetParser stpp = null;
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TapsetParser.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TapsetParser.java
new file mode 100644
index 0000000000..e7a41bdf45
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TapsetParser.java
@@ -0,0 +1,679 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.structures;
+
+import java.util.ArrayList;
+
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.linuxtools.systemtap.ui.structures.TreeDefinitionNode;
+import org.eclipse.linuxtools.systemtap.ui.structures.TreeNode;
+import org.eclipse.linuxtools.systemtap.ui.structures.listeners.IUpdateListener;
+import org.eclipse.linuxtools.systemtap.ui.structures.runnable.LoggedCommand;
+
+
+
+/**
+ * Runs stap -vp1 & stap -up2 in order to get all of the probes/functions
+ * that are defined in the tapsets. Builds probeAlias and function trees
+ * with the values obtained from the tapsets.
+ *
+ * Ugly code is a result of two issues with getting stap output. First,
+ * many tapsets do not work under stap -up2. Second since the output
+ * is not a regular language, we can't create a nice lexor/parser combination
+ * to do everything nicely.
+ * @author Ryan Morse
+ */
+public class TapsetParser implements Runnable {
+ public TapsetParser(String[] tapsets) {
+ this.tapsets = tapsets;
+ listeners = new ArrayList<IUpdateListener>();
+ }
+
+ /**
+ * This method sets up everything that is needed before actually creating
+ * a new process. It will run the first pass of stap to build the tapset
+ * tree framework.
+ */
+ protected void init() {
+ disposed = false;
+ functions = new TreeNode("", false);
+ probes = new TreeNode("", false);
+
+ String s = readPass1(null);
+ parseLevel1(s);
+ cleanupTrees();
+ }
+
+ /**
+ * This method will initialize everything and then start the process running.
+ * This method should be called by any class wishing to run the parser.
+ */
+ public void start() {
+ stopped = false;
+ init();
+ Thread t = new Thread(this, "TapsetParser");
+ t.start();
+ }
+
+ /**
+ * This method chanegs the stop variable which is checked periodically by the
+ * running thread to see if it should stop running.
+ */
+ public synchronized void stop() {
+ stopped = true;
+ }
+
+ /**
+ * This method checks to see if the process has been asked to stop
+ * @return Boolean indicating whether or not a stop command has been received
+ */
+ public boolean isRunning() {
+ return !stopped;
+ }
+
+ /**
+ * This method checks to see if the process has been disposed or not.
+ * @return Boolean indicating whether or not the parser has been disposed.
+ */
+ public boolean isDisposed() {
+ return disposed;
+ }
+
+ /**
+ * Returns the root node of the tree of functions generated by
+ * parseFiles. Functions are grouped by source file.
+ * @return A tree of tapset functions grouped by file.
+ */
+ public synchronized TreeNode getFunctions() {
+ return functions;
+ }
+
+ /**
+ * Returns the root node of the tree of the probe alias generated by
+ * parseFiles. Probes are grouped by target location.
+ * @return A tree of tapset probe aliases grouped by probe location.
+ */
+ public synchronized TreeNode getProbes() {
+ return probes;
+ }
+
+ /**
+ * This method checks to see if the parser completed executing on its own.
+ * @return Boolean indicating whether or not the thread finished on its own.
+ */
+ public boolean isFinishSuccessful() {
+ return successfulFinish;
+ }
+
+ /**
+ * Runs stap -up2 on both the function and the probe trees. At this
+ * point the trees are both filled with all data obtained from stap -vp1
+ * After each tree is finished, an update event will be fired so callers
+ * know that they can update.
+ */
+ public void run() {
+ runPass2Functions();
+ fireUpdateEvent(); //Inform listeners that a new batch of functions has variable info
+ runPass2Probes();
+ fireUpdateEvent(); //Inform listeners that a new batch of probes has variable info
+ stop();
+ successfulFinish = true;
+ fireUpdateEvent(); //Inform listeners that everything is done
+ }
+
+ /**
+ * This method will register a new listener with the parser
+ * @param listener The listener that will receive updateEvents
+ */
+ public void addListener(IUpdateListener listener) {
+ if(null != listener)
+ listeners.add(listener);
+ }
+
+ /**
+ * This method will unregister the listener with the parser
+ * @param listener The listener that no longer wants to recieve update events
+ */
+ public void removeListener(IUpdateListener listener) {
+ if(null != listener)
+ listeners.remove(listener);
+ }
+
+ /**
+ * This method will fire an updateEvent to all listeners.
+ */
+ private void fireUpdateEvent() {
+ for(int i=0; i<listeners.size(); i++)
+ ((IUpdateListener)listeners.get(i)).handleUpdateEvent();
+ }
+
+ /**
+ * Runs the stap with the given options and returns the output generated
+ * @param options String[] of any optional parameters to pass to stap
+ * @param probe String containing the script to run stap on
+ * @param level integer representing what point to stop stap at (1,2,3,4,5)
+ */
+ protected String runStap(String[] options, String probe, int level) {
+ String[] script = null;
+
+ int size = 4; //start at 4 for stap, -pX, -e, script
+ if(null != tapsets && tapsets.length > 0 && tapsets[0].trim().length() > 0)
+ size += tapsets.length<<1;
+ if(null != options && options.length > 0 && options[0].trim().length() > 0)
+ size += options.length;
+
+ script = new String[size];
+ script[0] = "stap";
+ script[1] = "-p" + level;
+ script[size-2] = "-e";
+ script[size-1] = probe;
+
+ //Add extra tapset directories
+ if(null != tapsets && tapsets.length > 0 && tapsets[0].trim().length() > 0) {
+ for(int i=0; i<tapsets.length; i++) {
+ script[2+(i<<1)] = "-I";
+ script[3+(i<<1)] = tapsets[i];
+ }
+ }
+ if(null != options && options.length > 0 && options[0].trim().length() > 0) {
+ for(int i=0; i<options.length; i++)
+ script[script.length-options.length-2+i] = options[i];
+ }
+
+ LoggedCommand cmd = new LoggedCommand(script, null, null, 0);
+ cmd.start();
+
+ //Block to prevent errors.
+ while(cmd.isRunning()) {
+ try {
+ Thread.sleep(100);
+ } catch(InterruptedException e) {
+ LogManager.logCritical("InterruptedException runStap: " + e.getMessage(), this);
+ }
+ }
+
+ cmd.stop(); //While stop was already called we do this to ensure things are shutdown before proceding
+ String s = cmd.getOutput();
+ cmd.dispose();
+
+ return s;
+ }
+
+ /**
+ * Returns a String containing all of the content from the files
+ * contained in the tapset libraries. This file always returns
+ * what ever it could get, even if an exception was generated.
+ *
+ * stap -vp1 -e 'probe begin{}'
+ * Will list everything defined in the tapsets
+ * @return the tapset library consolodated into a single string
+ */
+ private String readPass1(String script) {
+ String[] options;
+ if(null == script) {
+ script = "probe begin{}";
+ options = new String[] {"-v"};
+ } else {
+ options = null;
+ }
+
+ return runStap(options, script, 1);
+ }
+
+ /**
+ * Parses the output generated from running stap -vp1. Pulls out all functions
+ * and probe aliases from the provided string. Populates the probe and function
+ * trees.
+ *
+ * ProbeTree organized as:
+ * Root->Files->ProbePoints->Variables
+ *
+ * FunctionTree organized as:
+ * Root->Files->Functions
+ * @param s The entire output from running stap -vp1.
+ */
+ private void parseLevel1(String s) {
+ String prev = null;
+ String prev2 = null;
+ StringBuilder token = new StringBuilder("");
+ TreeNode parent;
+ TreeNode item;
+ char currChar;
+ boolean isProbe = false;
+
+ boolean contains;
+ TreeNode child;
+ int z;
+
+ for(int i=0; i<s.length(); i++) {
+ currChar = s.charAt(i);
+
+ if(!Character.isWhitespace(currChar) && '}' != currChar && '{' != currChar) {
+ token.append(currChar);
+ } else if(token.length() > 0){
+ prev2 = prev;
+ prev = token.toString();
+ token.delete(0, token.length());
+ }
+
+ //Only check for new values when starting a fresh token.
+ if(1 == token.length()) {
+ if("probe".equals(prev2) && "=".equals(token.toString())) {
+ //Probe alias found
+ do {
+ currChar = s.charAt(++i);
+ token.append(currChar);
+ } while('{' != currChar && i < s.length());
+
+ parent = probes.getChildAt(probes.getChildCount()-1);
+ parent.add(new TreeDefinitionNode("probe " + token.toString().substring(2, token.length()-1), prev, parent.getData().toString(), true));
+ isProbe = true;
+ } else if("function".equals(prev2)) {
+ //Function found
+ do {
+ currChar = s.charAt(++i);
+ token.append(currChar);
+ } while(')' != currChar && i < s.length());
+
+ parent = functions.getChildAt(functions.getChildCount()-1);
+ parent.add(new TreeDefinitionNode(prev + token.toString(), prev + token.toString(), parent.getData().toString(), true));
+ isProbe = false;
+ } else if("file".equals(prev2)) {
+ //New file started
+ if(prev.lastIndexOf('/') > 0)
+ prev2 = prev.substring(prev.lastIndexOf('/')+1);
+ functions.add(new TreeNode(prev, prev2, false));
+ probes.add(new TreeNode(prev, prev2, false));
+ isProbe = false;
+ }
+ } else if(prev2 != null && prev2.length() > 2 && token.length() > 2 && isProbe &&
+ '(' == prev2.charAt(0) && ')' == prev2.charAt(prev2.length()-1) &&
+ '(' == token.charAt(0) && ')' == token.charAt(token.length()-1) &&
+ "=".equals(prev)) {
+ //Put all variables in the probe tree
+ item = probes.getChildAt(probes.getChildCount()-1);
+ prev2 = prev2.substring(1,prev2.length()-1);
+
+ child = item.getChildAt(item.getChildCount()-1);
+ contains = false;
+ for(z=0; z<child.getChildCount(); z++) {
+ if(child.getChildAt(z).toString().equals(prev2)) {
+ contains = true;
+ break;
+ }
+ }
+
+ if(!contains)
+ child.add(new TreeNode(prev2 + ":unknown", prev2, false));
+
+ prev2 = null;
+ }
+ }
+ }
+
+ /**
+ * This method is used to build up the list of functions that were found
+ * durring the first pass of stap. These functions will then all be passed
+ * on to have stap -up2 run on them in order to find the variable types
+ * associated with them.
+ */
+ private void runPass2Functions() {
+ int i, j, k, l=0;
+ TreeNode child;
+ String function;
+ String[] parameters = new String[0];
+ StringBuilder probe = new StringBuilder("");
+
+ ArrayList<String> functionNames = new ArrayList<String>();
+
+ //Add Functions
+ for(i=0; i<functions.getChildCount(); i++) {
+ child = functions.getChildAt(i);
+ for(j=0; j<child.getChildCount(); j++) {
+ probe.delete(0, probe.length());
+ function = child.getChildAt(j).toString();
+ probe.append(function.substring(0, function.indexOf("(")+1));
+ function = function.substring(function.indexOf("(")+1, function.indexOf(")"));
+ parameters = function.split(",");
+
+ //Make sure each parameter has a distinct name so there isn't a type problem
+ if(parameters[0].length() > 0) {
+ for(k=0; k<parameters.length; k++) {
+ if(k>0)
+ probe.append(",");
+ probe.append(parameters[k] + l++);
+ }
+ }
+ probe.append(")\n");
+ functionNames.add(probe.toString());
+ }
+ }
+ parameters = (String[])functionNames.toArray(parameters);
+ runPass2FunctionSet(parameters, 0, parameters.length-1);
+ }
+
+ /**
+ * This method runs stap -up2 on the specified group of functions.
+ * If errors result, it will break the batch in half and run again
+ * on each subset
+ * @param funcs The list of all functions available in the tapsets
+ * @param low The lower bound of functions to use in this set
+ * @param high The upper bound of functions to use in this set
+ */
+ private void runPass2FunctionSet(String[] funcs, int low, int high) {
+ if(low == high)
+ return;
+ if(stopped)
+ return;
+
+ StringBuilder functionStr = new StringBuilder("probe begin{\n");
+ for(int i=low; i<high; i++)
+ functionStr.append(funcs[i]);
+ functionStr.append("}\n");
+
+ String result = runStap(new String[] {"-u"}, functionStr.toString(), 2);
+
+ if(0 < result.trim().length()) {
+ parsePass2Functions(result);
+ } else if(low+1 != high) {
+ runPass2FunctionSet(funcs, low, low+((high-low)>>1));
+ runPass2FunctionSet(funcs, low+((high-low)>>1), high);
+ }
+ }
+
+ /**
+ * Runs stap -up2 on the probe tree. The tree is broken up into
+ * smaller components to allow components to be completed at a time.
+ */
+ private void runPass2Probes() {
+ //Add Probes
+ TreeNode temp;
+ for(int i=0; i<probes.getChildCount(); i++) {
+ if(stopped)
+ return;
+ temp = probes.getChildAt(i);
+ runPass2ProbeSet(temp, 0, temp.getChildCount());
+ }
+ }
+
+ /**
+ * Runs stap -up2 on the selected probe group, using high and low
+ * to determin which subelements to select.
+ * @param probe The top level probe group to probe.
+ * @param low The lower bound of child elements of probe to include
+ * @param high The upper bound of child elements of probe to inclue
+ */
+ private void runPass2ProbeSet(TreeNode probe, int low, int high) {
+ if(low == high)
+ return;
+
+ TreeNode temp;
+ StringBuilder probeStr = new StringBuilder("");
+ String result;
+
+ for(int i=low; i<high; i++) {
+ temp = probe.getChildAt(i);
+ if(temp.getData().toString().startsWith("probe"))
+ probeStr.append("\nprobe " + temp.toString() + "{}");
+ else
+ runPass2ProbeSet(temp, 0, temp.getChildCount());
+ }
+ result = runStap(new String[] {"-u"}, probeStr.toString(), 2);
+
+ if(0 < result.trim().length()) {
+ boolean success = parsePass2Probes(result, probe);
+ if(!success) {
+ runPass2ProbeSet(probe, low, low+((high-low)>>1));
+ runPass2ProbeSet(probe, low+((high-low)>>1), high);
+ }
+ } else if(low+1 != high) {
+ runPass2ProbeSet(probe, low, low+((high-low)>>1));
+ runPass2ProbeSet(probe, low+((high-low)>>1), high);
+ }
+ }
+
+ /**
+ * Removes all directories that do not contain any fuctions or
+ * probe aliases from both trees.
+ */
+ protected void cleanupTrees() {
+ for(int i=functions.getChildCount()-1; i>=0; i--) {
+ if(0 == functions.getChildAt(i).getChildCount())
+ functions.remove(i);
+ if(0 == probes.getChildAt(i).getChildCount())
+ probes.remove(i);
+ }
+
+ functions.sortTree();
+ probes.sortTree();
+
+ formatProbes();
+ }
+
+ /**
+ * Reorders the probes tree so that probes are grouped by type
+ * instead of by file they were defined in.
+ *
+ * ProbeTree organized by class grouping. ie:
+ * syscall
+ * syscall.open
+ * filename
+ * flags
+ * mode
+ * name
+ * syscall.open.return
+ * name
+ * retstr
+ * syscall.read
+ * ...
+ * tcp
+ * tcp.disconnect
+ * tcp.disconnect.return
+ */
+ private void formatProbes() {
+ TreeNode probes2 = new TreeNode("", false);
+ TreeNode probe, fileNode, probeGroup, probeFolder;
+ String directory;
+ String[] folders;
+ boolean added;
+
+ for(int j,i=0; i<probes.getChildCount(); i++) { //Probe main group
+ fileNode = probes.getChildAt(i);
+ for(j=0; j<fileNode.getChildCount(); j++) { //Actual probes
+ probe = fileNode.getChildAt(j);
+
+ directory = probe.toString();
+ if(directory.endsWith(".return") || directory.endsWith(".entry"))
+ directory = directory.substring(0, directory.lastIndexOf('.'));
+ folders = directory.split("\\.");
+
+ probeGroup = probes2;
+ for(int k=0; k<folders.length-1; k++) { //Complete path directory
+ added = false;
+ for(int l=0; l<probeGroup.getChildCount(); l++) { //Destination folder
+ probeFolder = probeGroup.getChildAt(l);
+ if(probeFolder.toString().equals(folders[k])) {
+ probeGroup = probeFolder;
+ added = true;
+ break;
+ }
+ }
+ if(!added) { //Create brand new folder since it doesn't exist yet
+ probeFolder = new TreeNode(folders[k], false);
+ probeGroup.add(probeFolder);
+ probeGroup = probeFolder;
+ }
+ }
+ probeGroup.add(probe); //Add the probe to its appropriate directory
+ }
+ }
+ probes = probes2;
+ probes.sortTree();
+ }
+
+ /**
+ * Parses the output generated from running stap -up2 on the list of functions.
+ * Will update the function tree with return values for each function.
+ * @param s The entire output from running stap -up2 on the functions.
+ */
+ private void parsePass2Functions(String s) {
+ int i, j, k;
+ TreeNode child, child2;
+ String childString;
+ String[] functionLines = new String[0];
+ if(s.contains("# functions") && s.contains("# probes"))
+ functionLines = s.substring(s.indexOf("# functions"), s.indexOf("# probes")).split("\n");
+
+ //Rename the functions with types
+ for(i=0; i<functionLines.length; i++) {
+ for(j=0; j<functions.getChildCount(); j++) {
+ child = functions.getChildAt(j);
+ for(k=0; k<child.getChildCount(); k++) {
+ child2 = child.getChildAt(k);
+ childString = child2.toString();
+ if (childString.indexOf("(") != -1) {
+ if(functionLines[i].startsWith(childString.substring(0, childString.indexOf("(")).trim() + ":")) {
+ child2.setData(functionLines[i]);
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Parses the output generated from running stap -up2 on the list of probes.
+ * Will update the probe alias tree with additional variables, as well as
+ * placing the type associated with the variable.
+ * @param s The entire output from running stap -up2 on the provided probeSet.
+ * @param probeSet The group of probes that the String s corresponds to
+ */
+ private boolean parsePass2Probes(String s, TreeNode probeSet) {
+ LogManager.logDebug("Start parseLevel2Probes: probeSet-" + probeSet, this);
+ TreeNode tree = new TreeNode("", false);
+ TreeNode probe = null;
+ String[] probeLines = null;
+ boolean variables = false;
+ String line;
+
+ if(s.contains("# probes"))
+ probeLines = s.substring(s.indexOf("# probes")).split("\n");
+
+ if(null == probeLines)
+ return false;
+
+ //Build Pass 2 tree
+ for(int i=0; i<probeLines.length; i++) {
+ line = probeLines[i].trim();
+
+ if(line.startsWith("kernel.")) {
+ probe = new TreeNode(line, false);
+ tree.add(probe);
+ //probe = lookupProbe(line, probeSet);
+ variables = false;
+ } else if(line.equals("# locals") && null != probe) {
+ variables = true;
+ } else if(null != probe && variables) {
+ if(line.contains(":"))
+ probe.add(new TreeNode(line, line.substring(0, line.lastIndexOf(":")).trim(), false));
+ } else {
+ probe = null;
+ }
+ }
+
+ //Consolidate pass1 and pass2 trees
+ int i, j, k, l;
+ boolean matched;
+ TreeNode one, two, oneC, twoC;
+ for(i=0; i<probeSet.getChildCount(); i++) {
+ for(j=0; j<tree.getChildCount(); j++) {
+ one = probeSet.getChildAt(i);
+ two = tree.getChildAt(j);
+
+ if(probesMatch(one, two)) {
+ for(l=0; l<two.getChildCount(); l++) {
+ matched = false;
+ twoC = two.getChildAt(l);
+ for(k=0; k<one.getChildCount(); k++) {
+ oneC = one.getChildAt(k);
+ if(oneC.getData().toString().substring(0, oneC.getData().toString().indexOf(":")).
+ equals(twoC.getData().toString().substring(0, twoC.getData().toString().indexOf(":")))) {
+ oneC.setData(twoC.getData());
+ matched = true;
+ }
+ }
+ if(!matched)
+ one.add(new TreeNode(twoC.getData(), twoC.toString(), false));
+ }
+ }
+ }
+ }
+
+ tree.dispose();
+ tree = null;
+ return true;
+ }
+
+ /**
+ * Compares the probes contained in the treeNodes to make sure they
+ * are actually probing the same kernel location.
+ * @param one A treeNode generated from stap -p1.
+ * @param two A treeNode generated from stap -up2.
+ * @return A boolean signifing if the treeNodes represent the same probe point.
+ */
+ private boolean probesMatch(TreeNode one, TreeNode two) {
+ try {
+ String valOneA = one.getData().toString();
+ String valTwoA = two.getData().toString();
+ String valOneB = "";
+ String valTwoB = valTwoA.substring(valTwoA.indexOf("\"")+1, valTwoA.indexOf("@"));
+
+ if(valOneA.contains("\""))
+ valOneB = valOneA.substring(valOneA.indexOf("\"")+1);
+ if(valOneB.contains("\""))
+ valOneB = valOneB.substring(0, valOneB.indexOf("\""));
+
+ if(valOneB.equals(valTwoB)) {
+ if(valOneA.contains(".return") == valTwoA.contains(".return"))
+ return true;
+ }
+ } catch(Exception e) {
+ LogManager.logCritical("Exception probesMatch: " + e.getMessage() + "\n" + one + "\n" + two, this);
+ }
+ return false;
+ }
+
+ /**
+ * This method will clean up everything from the run.
+ */
+ public void dispose() {
+ if(!disposed) {
+ disposed = true;
+ functions.dispose();
+ functions = null;
+ probes.dispose();
+ probes = null;
+ tapsets = null;
+ listeners.clear();
+ listeners = null;
+ }
+ }
+
+ private boolean stopped = true;
+ private boolean disposed = true;
+ private boolean successfulFinish = false;
+ private ArrayList<IUpdateListener> listeners;
+ private TreeNode functions;
+ private TreeNode probes;
+ private String[] tapsets;
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TreeSettings.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TreeSettings.java
new file mode 100644
index 0000000000..0aa7b77492
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TreeSettings.java
@@ -0,0 +1,253 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.structures;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.Calendar;
+
+import org.eclipse.linuxtools.systemtap.ui.structures.TreeDefinitionNode;
+import org.eclipse.linuxtools.systemtap.ui.structures.TreeNode;
+import org.eclipse.linuxtools.systemtap.ui.systemtapgui.SystemTapGUISettings;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.WorkbenchException;
+import org.eclipse.ui.XMLMemento;
+
+
+/**
+ * Handles access to the cached stap tapset library tree, including reading the cache back from disk
+ * on startup, writing the cache to disk when the cache is initially generated, checking to make sure
+ * that the cache is up-to-date, and providing accessor methods to the rest of the IDE that allow other
+ * classes to use the cached tree data.
+ * @author Ryan Morse
+ */
+public final class TreeSettings {
+ private TreeSettings() {
+ }
+ /**
+ * Returns the modification date for the Tree File. Used to make sure that the cache is not out of
+ * date.
+ * @return The datestamp for the Tree file.
+ */
+ public static long getTreeFileDate() {
+ if(!readData()) return -1;
+ return treeFileDate;
+ }
+
+ /**
+ * Allows access to the Tapset Function tree, which contains information about all
+ * functions stored in the tapset library.
+ * @return The <code>TreeNode</code> root of the Function tree.
+ */
+ public static TreeNode getFunctionTree() {
+ if(!readData()) return null;
+ return functions;
+ }
+
+ /**
+ * Allows access to the Tapset Probe Alias tree, which contains a list of all probe aliases
+ * in the tapset library.
+ * @return The <code>TreeNode</code> root of the Probe Alias tree.
+ */
+ public static TreeNode getProbeTree() {
+ if(!readData()) return null;
+ return probes;
+ }
+
+ /**
+ * Sets the Probe Alias and Function trees that are being cached to the trees given as arguments.
+ * @param func The Function tree to store in cache.
+ * @param probe The Probe Alias tree to store in cache.
+ * @return True if the caching is successful.
+ */
+ public static boolean setTrees(TreeNode func, TreeNode probe) {
+ if(null == func || null == probe) return false;
+ functions = func;
+ probes = probe;
+ return writeData();
+ }
+
+ /**
+ * Reads the contents of the cache file into memory.
+ * @return True if the read is successful.
+ */
+ private static boolean readData() {
+ if(null == settingsFile && !openFile())
+ return false;
+
+ try {
+ FileReader reader = new FileReader(settingsFile);
+
+ if(!reader.ready())
+ return false;
+
+ XMLMemento data = XMLMemento.createReadRoot(reader, "TreeSettings");
+
+ IMemento child = data.getChild("functionTree");
+ String s = child.getString("string");
+ if("<null>".equals(s))
+ s = null;
+ String d = child.getString("data");
+ if("<null>".equals(d))
+ d = null;
+
+ functions = new TreeNode(d, s, false);
+ readTree(child, functions, 0);
+
+ child = data.getChild("probeTree");
+ s = child.getString("string");
+ if("<null>".equals(s))
+ s = null;
+ d = child.getString("data");
+ if("<null>".equals(d))
+ d = null;
+ probes = new TreeNode(d, s, false);
+ readTree(child, probes, 0);
+
+ child = data.getChild("modifiedDate");
+ treeFileDate = Long.parseLong(child.getString("date"));
+ } catch(FileNotFoundException fnfe) {
+ return false;
+ } catch(WorkbenchException we) {
+ return false;
+ } catch(Exception e) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Writes the tree data currently stored by this class to disk for later access.
+ * @return True if the write is successful.
+ */
+ private static boolean writeData() {
+ if(null == settingsFile && !openFile())
+ return false;
+
+ try {
+ XMLMemento data = XMLMemento.createWriteRoot("TreeSettings");
+
+ IMemento child = data.createChild("functionTree");
+ writeTree(child, functions, 0);
+
+ child = data.createChild("probeTree");
+ writeTree(child, probes, 0);
+
+ child = data.createChild("modifiedDate");
+ child.putString("date", (new Long(Calendar.getInstance().getTimeInMillis())).toString());
+
+ FileWriter writer = new FileWriter(settingsFile);
+ data.save(writer);
+ } catch(FileNotFoundException fnfe) {
+ return false;
+ } catch(Exception e) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Writes the tree passed in to the <code>IMemento</code> argument, up to the specified depth.
+ * @param child The <code>IMemento</code> to store the tree to.
+ * @param tree The <code>TreeNode</code> to store.
+ * @param depth The maximum depth level to write out.
+ */
+ private static void writeTree(IMemento child, TreeNode tree, int depth) {
+ if(null == tree.toString())
+ child.putString("string", "<null>");
+ else
+ child.putString("string", tree.toString());
+
+ if(null == tree.getData())
+ child.putString("data","<null>");
+ else
+ child.putString("data", tree.getData().toString());
+
+ if(tree instanceof TreeDefinitionNode) {
+ if(null == ((TreeDefinitionNode)tree).getDefinition())
+ child.putString("definition","<null>");
+ else
+ child.putString("definition", ((TreeDefinitionNode)tree).getDefinition().toString());
+ }
+
+ child.putInteger("click", (tree.isClickable()?1:0));
+ for(int i=0; i<tree.getChildCount(); i++) {
+ writeTree(child.createChild("level" + depth), tree.getChildAt(i), depth+1);
+ }
+ }
+
+ /**
+ * Opposite action as writeTree. Reads the <code>IMemento</code> passed in into the <code>TreeNode</code>
+ * up to the requested maximum depth.
+ * @param data The <code>IMemento</code> to read the tree out of.
+ * @param parent The <code>TreeNode</code> to store the tree in.
+ * @param depth The maximum depth to read.
+ */
+ private static void readTree(IMemento data, TreeNode parent, int depth) {
+ IMemento[] children = data.getChildren("level" + depth);
+
+ try {
+ if(null != children) {
+ for(int i=0; i<children.length; i++) {
+ String s = children[i].getString("string");
+ String d = children[i].getString("data");
+ String def = children[i].getString("definition");
+
+ boolean c = ((0==children[i].getInteger("click").intValue())?false:true);
+
+ if("<null>".equals(s))
+ s = null;
+ if("<null>".equals(d))
+ d = null;
+
+ TreeNode t;
+ if(null == def) {
+ t = new TreeNode(d, s, c);
+ } else {
+ if("<null>".equals(def))
+ def = null;
+
+ t = new TreeDefinitionNode(d, s, def, c);
+ }
+ parent.add(t);
+
+ readTree(children[i], t, depth+1);
+ }
+ }
+ } catch(NullPointerException e) {
+ }
+ }
+
+ private static boolean openFile() {
+ settingsFile = new File(SystemTapGUISettings.settingsFolder.getAbsolutePath() + fileName);
+
+ try {
+ if (!settingsFile.exists())
+ settingsFile.createNewFile();
+ } catch(IOException ioe) {
+ return false;
+ }
+
+ return true;
+ }
+
+ private static long treeFileDate;
+ private static TreeNode functions;
+ private static TreeNode probes;
+ private static final String fileName = "/TreeSettings.xml";
+ private static File settingsFile = null;
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/uistructures/StapSettingsDialog.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/uistructures/StapSettingsDialog.java
new file mode 100644
index 0000000000..a7d78eea64
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/uistructures/StapSettingsDialog.java
@@ -0,0 +1,178 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.uistructures;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
+import org.eclipse.linuxtools.systemtap.ui.ide.preferences.IDEPreferenceConstants;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.graphics.Rectangle;
+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.Shell;
+import org.eclipse.swt.widgets.Text;
+
+
+import org.eclipse.swt.widgets.Label;
+
+
+/**
+ * A dialog box displayed to prompt the user for additional arguments to pass to stap when the
+ * user presses the Run with Options button.
+ * @author Ryan Morse
+ *
+ */
+public class StapSettingsDialog extends Dialog {
+ public StapSettingsDialog(Shell parentShell) {
+ super(parentShell);
+ LogManager.logDebug("Start/End StapSettingsDialog: parentShell-" + parentShell, this);
+ LogManager.logInfo("Initializing", this);
+ }
+
+ protected void configureShell(Shell shell) {
+ super.configureShell(shell);
+ LogManager.logDebug("Start configureShell: shell-" + shell, this);
+ shell.setText(Localization.getString("StapSettingsDialog.StapOptions"));
+ shell.setSize(new org.eclipse.swt.graphics.Point(640,170 + ((1+checkBox.length)>>1) + 50*((1+text.length)>>1)));
+ LogManager.logDebug("End configureShell:", this);
+ }
+
+ protected Control createDialogArea(Composite parent) {
+ LogManager.logDebug("Start createDialogArea: parent-" + parent, this);
+ Composite comp = (Composite) super.createDialogArea(parent);
+
+ //Check boxes
+ GridLayout gridLayout = new GridLayout();
+ gridLayout.numColumns = 2;
+ cmpChkBoxes = new Composite(comp, SWT.NONE);
+ cmpChkBoxes.setLayout(gridLayout);
+ cmpChkBoxes.setBounds(new Rectangle(100,5,460,30*((1+checkBox.length)>>1)));
+
+ int i;
+ for(i=0; i<IDEPreferenceConstants.P_STAP.length - IDEPreferenceConstants.P_STAP_OPTS.length; i++) {
+ checkBox[i] = new Button(cmpChkBoxes, SWT.CHECK);
+ checkBox[i].setText(IDEPreferenceConstants.P_STAP[i][0] + IDEPreferenceConstants.P_STAP[i][1]);
+ checkBox[i].setBackground(cmpChkBoxes.getBackground());
+ }
+
+ //Labels and Text fields
+ cmpTxtBoxes = new Composite(comp, SWT.NONE);
+ cmpTxtBoxes.setBounds(new Rectangle(5,5+30*((1+checkBox.length)>>1),620,50*((1+text.length)>>1)));
+
+ for(int j=0; j<IDEPreferenceConstants.P_STAP_OPTS.length; i++, j++) {
+ label[j] = new Label(cmpTxtBoxes, SWT.NONE);
+ label[j].setBounds(new Rectangle(320*(j/5),50*(j%5),300,17));
+ label[j].setText(IDEPreferenceConstants.P_STAP[i][0] + IDEPreferenceConstants.P_STAP[i][1]);
+ label[j].setBackground(cmpChkBoxes.getBackground());
+ text[j] = new Text(cmpTxtBoxes, SWT.BORDER);
+ text[j].setBounds(new Rectangle(320*(j/5),20+50*(j%5),300,27));
+
+ if("-v".equals(IDEPreferenceConstants.P_STAP[i][0])) {
+ text[j].addKeyListener(new KeyListener() {
+ public void keyPressed(KeyEvent e) {
+ if('v' != e.character) {
+ e.doit = false;
+ }
+ }
+
+ public void keyReleased(KeyEvent e) {}
+ });
+ } else if("-p NUM".equals(IDEPreferenceConstants.P_STAP[i][0])) {
+ text[j].addKeyListener(new KeyListener() {
+ public void keyPressed(KeyEvent e) {
+ if(32 <= e.character && 126 >= e.character) {
+ if('1' > e.character || '5' < e.character)
+ e.doit = false;
+ else if(0 < text[1].getText().length())
+ e.doit = false;
+ }
+ }
+
+ public void keyReleased(KeyEvent e) {}
+ });
+ } else if("-s NUM".equals(IDEPreferenceConstants.P_STAP[i][0])) {
+ text[j].addKeyListener(new KeyListener() {
+ public void keyPressed(KeyEvent e) {
+ if(32 <= e.character && 126 >= e.character) {
+ if(!Character.isDigit(e.character))
+ e.doit = false;
+ }
+ }
+
+ public void keyReleased(KeyEvent e) {}
+ });
+ }
+ }
+
+ LogManager.logDebug("End createDialogArea: returnVal-" + comp, this);
+ return comp;
+ }
+
+ protected void buttonPressed(int buttonID) {
+ LogManager.logDebug("Start buttonPressed: buttonID-" + buttonID, this);
+ if(0 == buttonID) { //OK
+ cmdOpts = new boolean[checkBox.length];
+ cmdOptVals = new String[text.length];
+
+ for(int i=0; i<cmdOpts.length; i++)
+ cmdOpts[i] = checkBox[i].getSelection();
+
+ for(int i=0; i<cmdOptVals.length; i++)
+ cmdOptVals[i] = text[i].getText();
+ }
+
+ super.buttonPressed(buttonID);
+ LogManager.logDebug("End buttonPressed:", this);
+ }
+
+ public boolean[] getStapOpts() {
+ LogManager.logDebug("Start/End getStapOpts: returnVal-" + cmdOpts, this);
+ return cmdOpts;
+ }
+
+ public String[] getStapOptVals() {
+ LogManager.logDebug("Start/End getStapOptVals: returnVal-" + cmdOptVals, this);
+ return cmdOptVals;
+ }
+
+ public void dispose() {
+ LogManager.logInfo("Disposing", this);
+ cmdOpts = null;
+ cmdOptVals = null;
+ cmpChkBoxes.dispose();
+ cmpTxtBoxes.dispose();
+ for(int i=0; i<checkBox.length; i++)
+ checkBox[i].dispose();
+ checkBox = null;
+ for(int i=0; i<label.length; i++) {
+ label[i].dispose();
+ text[i].dispose();
+ }
+ label = null;
+ text = null;
+ }
+
+ //private static String[] tapsets = null;
+ private static boolean[] cmdOpts = null;
+ private static String[] cmdOptVals = null;
+
+ private Composite cmpChkBoxes = null;
+ private Composite cmpTxtBoxes = null;
+ private Button checkBox[] = new Button[IDEPreferenceConstants.P_STAP.length - IDEPreferenceConstants.P_STAP_OPTS.length];
+ private Label label[] = new Label[IDEPreferenceConstants.P_STAP_OPTS.length];
+ private Text text[] = new Text[IDEPreferenceConstants.P_STAP_OPTS.length];
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/BrowserView.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/BrowserView.java
new file mode 100644
index 0000000000..4d27c13b14
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/BrowserView.java
@@ -0,0 +1,167 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.views;
+
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.linuxtools.systemtap.ui.editor.RecentFileMenuManager;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
+import org.eclipse.linuxtools.systemtap.ui.structures.TreeNode;
+import org.eclipse.linuxtools.systemtap.ui.structures.listeners.IUpdateListener;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Cursor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.ViewPart;
+
+
+
+/**
+ * The parent class of the Kernel Source browser, and grandparent of the Tapset browsers.
+ * Contains code common to all three of those classes.
+ * @author Ryan Morse
+ * @see org.eclipse.linuxtools.systemtap.ui.ide.views.KernelBrowserView
+ * @see org.eclipse.linuxtools.systemtap.ui.ide.views.FunctionBrowserView
+ * @see org.eclipse.linuxtools.systemtap.ui.ide.views.ProbeAliasBrowserView
+ */
+public abstract class BrowserView extends ViewPart {
+ protected TreeViewer viewer;
+
+ public BrowserView() {
+ super();
+ }
+
+ /**
+ * Provides an interface for the TreeViewer to interact with the internal TreeNode data structure.
+ * @author Ryan Morse
+ *
+ */
+ class ViewContentProvider implements IStructuredContentProvider, ITreeContentProvider {
+ public void inputChanged(Viewer v, Object oldInput, Object newInput) {}
+
+ public void dispose() {}
+
+ public Object[] getElements(Object parent) {
+ return getChildren(parent);
+ }
+
+ public Object getParent(Object child) {
+ return null;
+ }
+
+ public Object[] getChildren(Object par) {
+ TreeNode parent = ((TreeNode)par);
+
+ Object[] children = new Object[parent.getChildCount()];
+
+ for(int i=0; i<children.length; i++) {
+ children[i] = parent.getChildAt(i);
+ }
+
+ return children;
+ }
+
+ public boolean hasChildren(Object parent) {
+ return ((TreeNode)parent).getChildCount() > 0;
+ }
+ }
+
+ /**
+ * Provides the icon and text for each entry in the tapset tree.
+ * @author Ryan Morse
+ */
+ class ViewLabelProvider extends LabelProvider {
+ public String getText(Object obj) {
+ return obj.toString();
+ }
+
+ public Image getImage(Object obj) {
+ TreeNode treeObj = (TreeNode)obj;
+ Image img;
+ String item = treeObj.getData().toString();
+
+ img = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_ELEMENT);
+ if (treeObj.getChildCount() > 0)
+ img = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER);
+
+
+ //Kernel Source
+ if(item.endsWith(".c"))
+ img = IDEPlugin.getImageDescriptor("icons/files/file_c.gif").createImage();
+ if(item.endsWith(".h"))
+ img = IDEPlugin.getImageDescriptor("icons/files/file_h.gif").createImage();
+
+ //Functions
+ if(item.endsWith(")") && !item.endsWith("\")")) {
+ item = item.substring(0, item.indexOf("(")).trim();
+ if(item.endsWith(":long"))
+ img = IDEPlugin.getImageDescriptor("icons/vars/var_long.gif").createImage();
+ else if(item.endsWith(":string"))
+ img = IDEPlugin.getImageDescriptor("icons/vars/var_str.gif").createImage();
+ else //if(item.endsWith(":unknown"))
+ img = IDEPlugin.getImageDescriptor("icons/vars/var_void.gif").createImage();
+ } else {
+ //Probes
+ if(item.startsWith("probe"))
+ img = IDEPlugin.getImageDescriptor("icons/misc/probe_obj.gif").createImage();
+
+ //Probe variables
+ if(item.endsWith(":long"))
+ img = IDEPlugin.getImageDescriptor("icons/vars/var_long.gif").createImage();
+ else if(item.endsWith(":string"))
+ img = IDEPlugin.getImageDescriptor("icons/vars/var_str.gif").createImage();
+ else if(item.endsWith(":unknown"))
+ img = IDEPlugin.getImageDescriptor("icons/vars/var_unk.gif").createImage();
+ }
+
+ return img;
+ }
+ }
+
+ public void createPartControl(Composite parent) {
+ parent.getShell().setCursor(new Cursor(parent.getShell().getDisplay(), SWT.CURSOR_WAIT));
+ viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+ viewer.setContentProvider(new ViewContentProvider());
+ viewer.setLabelProvider(new ViewLabelProvider());
+ RecentFileMenuManager.getInstance().registerActionBar(getViewSite().getActionBars());
+ }
+
+ public TreeViewer getViewer() {
+ return viewer;
+ }
+
+ public void setFocus() {
+ viewer.getControl().setFocus();
+ }
+
+ public void dispose() {
+ super.dispose();
+ viewer = null;
+ }
+
+ abstract void refresh();
+
+ protected class ViewUpdater implements IUpdateListener {
+ public void handleUpdateEvent() {
+ viewer.getControl().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ refresh();
+ }
+ });
+ }
+ }
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/FunctionBrowserView.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/FunctionBrowserView.java
new file mode 100644
index 0000000000..e2c48b8b26
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/FunctionBrowserView.java
@@ -0,0 +1,139 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.views;
+
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.linuxtools.systemtap.ui.ide.actions.hidden.FunctionBrowserAction;
+import org.eclipse.linuxtools.systemtap.ui.ide.structures.TapsetLibrary;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.linuxtools.systemtap.ui.structures.TreeNode;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.ui.IWorkbenchActionConstants;
+
+
+
+/**
+ * This class is the Function Tapset Browser, which provides a list of all of the functions
+ * defined in the tapset library for the user to browse through.
+ * @author Ryan Morse
+ * @author Henry Hughes
+ */
+public class FunctionBrowserView extends BrowserView {
+ public FunctionBrowserView() {
+ super();
+ LogManager.logInfo("Initializing", this);
+ }
+
+ /**
+ * Creates the UI on the given <code>Composite</code>
+ */
+ public void createPartControl(Composite parent) {
+ LogManager.logDebug("Start createPartControl: parent-" + parent, this);
+ super.createPartControl(parent);
+ TapsetLibrary.init();
+ TapsetLibrary.addListener(new ViewUpdater());
+ refresh();
+ makeActions();
+ LogManager.logDebug("End createPartControl:", this);
+ }
+
+ /**
+ * Refreshes the list of functions in the viewer.
+ */
+ public void refresh() {
+ LogManager.logDebug("Start refresh:", this);
+ functions = TapsetLibrary.getFunctions();
+ addLocalFunctions(localFunctions);
+ LogManager.logDebug("End refresh:", this);
+ }
+
+ /**
+ * Adds the local functions specified in the argument to the viewer.
+ * @param localFunctionTree A tree of the local functions.
+ */
+ public void addLocalFunctions(TreeNode localFunctionTree) {
+ LogManager.logDebug("Start addLocalFunctions: localFunctionTree-" + localFunctionTree, this);
+
+ if(functions.getChildCount() > 0) {
+ TreeNode localFuncs = functions.getChildAt(0);
+
+ if("<local>".equals(localFuncs.toString()))
+ functions.remove(0);
+
+ if(null != localFunctions) {
+ localFunctions = localFunctionTree;
+ localFunctions.setDisplay("<local>");
+ functions.addAt(localFunctions, 0);
+ }
+ }
+ viewer.setInput(functions);
+ LogManager.logDebug("End addLocalFunctions:", this);
+ }
+
+ /**
+ * Wires up all of the actions for this browser, such as double and right click handlers.
+ */
+ private void makeActions() {
+ LogManager.logDebug("Start makeActions:", this);
+ doubleClickAction = new FunctionBrowserAction(getSite().getWorkbenchWindow(), this);
+ dblClickListener = new IDoubleClickListener() {
+ public void doubleClick(DoubleClickEvent event) {
+ LogManager.logDebug("Start doubleClick: event-" + event, this);
+ doubleClickAction.run();
+ LogManager.logDebug("End doubleClick:", this);
+ }
+ };
+ viewer.addDoubleClickListener(dblClickListener);
+
+ //This loads the menu from plugin.xml
+ MenuManager manager = new MenuManager("functionPopup");
+ Control control = this.viewer.getControl();
+ manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
+ Menu menu = manager.createContextMenu(control);
+ control.setMenu(menu);
+ getSite().registerContextMenu(manager, viewer);
+ LogManager.logDebug("End makeActions:", this);
+ }
+
+ public void dispose() {
+ LogManager.logInfo("Disposing", this);
+ super.dispose();
+ if(null != doubleClickAction)
+ doubleClickAction.dispose();
+ doubleClickAction = null;
+ if(null != viewer)
+ viewer.removeDoubleClickListener(dblClickListener);
+ dblClickListener = null;
+ if(null != localFunctions)
+ localFunctions.dispose();
+ localFunctions = null;
+ if(null != functions)
+ functions.dispose();
+ functions = null;
+ if(null != menu)
+ menu.dispose();
+ menu = null;
+ LogManager.logDebug("End dispose:", this);
+ }
+
+ public static final String ID = "org.eclipse.linuxtools.systemtap.ui.ide.views.FunctionBrowserView";
+ private FunctionBrowserAction doubleClickAction;
+ private IDoubleClickListener dblClickListener;
+ private TreeNode functions;
+ private TreeNode localFunctions;
+ private Menu menu;
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/KernelBrowserView.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/KernelBrowserView.java
new file mode 100644
index 0000000000..da9e0be617
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/KernelBrowserView.java
@@ -0,0 +1,141 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.views;
+
+import java.io.File;
+
+import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
+import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.linuxtools.systemtap.ui.ide.actions.hidden.KernelSourceAction;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.IDEPlugin;
+import org.eclipse.linuxtools.systemtap.ui.ide.internal.Localization;
+import org.eclipse.linuxtools.systemtap.ui.ide.preferences.IDEPreferenceConstants;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.linuxtools.systemtap.ui.structures.KernelSourceTree;
+import org.eclipse.linuxtools.systemtap.ui.structures.TreeNode;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.ui.PlatformUI;
+
+
+
+/**
+ * The Kernel Source Browser module for the SystemTap GUI. This browser provides a list of kernel source
+ * files and allows the user to open those files in an editor in order to place probes in arbitary locations.
+ * @author Henry Hughes
+ * @author Ryan Morse
+ */
+public class KernelBrowserView extends BrowserView {
+ public KernelBrowserView() {
+ super();
+ LogManager.logInfo("Initializing", this);
+ }
+
+ /**
+ * Creates the UI on the given <code>Composite</code>
+ */
+ public void createPartControl(Composite parent) {
+ LogManager.logDebug("Start createPartControl: parent-" + parent, this);
+ super.createPartControl(parent);
+
+ refresh();
+ makeActions();
+ LogManager.logDebug("End createPartControl", this);
+ }
+
+ /**
+ * Wires up all of the actions for this browser, such as double and right click handlers.
+ */
+ public void makeActions() {
+ LogManager.logDebug("Start makeActions:", this);
+ doubleClickAction = new KernelSourceAction(getSite().getWorkbenchWindow(), this);
+ dblClickListener = new IDoubleClickListener() {
+ public void doubleClick(DoubleClickEvent event) {
+ LogManager.logDebug("Start doubleClick: event-" + event, this);
+ doubleClickAction.run();
+ LogManager.logDebug("End doubleClick:", this);
+ }
+ };
+ viewer.addDoubleClickListener(dblClickListener);
+ IDEPlugin.getDefault().getPluginPreferences().addPropertyChangeListener(propertyChangeListener);
+ LogManager.logDebug("End makeActions:", this);
+ }
+
+ /**
+ * Updates the kernel source displayed to the user with the new kernel source tree. Usually
+ * a response to the user changing the preferences related to the kernel source location, requiring
+ * that the application update the kernel source information.
+ */
+ public void refresh() {
+ LogManager.logDebug("Start refresh:", this);
+ KernelSourceTree kst = new KernelSourceTree();
+
+ IPreferenceStore p = IDEPlugin.getDefault().getPreferenceStore();
+ String kernelSource = p.getString(IDEPreferenceConstants.P_KERNEL_SOURCE);
+ if(null == kernelSource || kernelSource.length() < 1) {
+ LogManager.logInfo("Kernel Source Directory not found, querying", this);
+
+ DirectoryDialog dialog= new DirectoryDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.OPEN);
+ dialog.setText(Localization.getString("KernelBrowserView.WhereKernelSource"));
+ kernelSource = dialog.open();
+
+ if(null == kernelSource)
+ kernelSource = "";
+ p.setValue(IDEPreferenceConstants.P_KERNEL_SOURCE, kernelSource);
+ }
+
+ String[] excluded = p.getString(IDEPreferenceConstants.P_EXCLUDED_KERNEL_SOURCE).split(File.pathSeparator);
+
+ kst.buildKernelTree(kernelSource, excluded);
+ if(null != kst)
+ super.viewer.setInput(kst.getTree());
+ else
+ super.viewer.setInput(new TreeNode("", false));
+
+ kst.dispose();
+ LogManager.logDebug("End refresh:", this);
+ }
+
+ /**
+ * A <code>IPropertyChangeListener</code> that detects changes to the Kernel Source location
+ * and runs the <code>updateKernelSourceTree</code> method.
+ */
+ private final IPropertyChangeListener propertyChangeListener = new IPropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent event) {
+ LogManager.logDebug("Start propertyChange: event-" + event, this);
+ if(event.getProperty().equals(IDEPreferenceConstants.P_KERNEL_SOURCE)) {
+ refresh();
+ }
+ LogManager.logDebug("End propertyChange:", this);
+ }
+ };
+
+ public void dispose() {
+ LogManager.logInfo("Disposing", this);
+ super.dispose();
+ IDEPlugin.getDefault().getPluginPreferences().removePropertyChangeListener(propertyChangeListener);
+ if(null != viewer)
+ viewer.removeDoubleClickListener(dblClickListener);
+ dblClickListener = null;
+ if(null != doubleClickAction)
+ doubleClickAction.dispose();
+ doubleClickAction = null;
+ }
+
+ public static final String ID = "org.eclipse.linuxtools.systemtap.ui.ide.views.KernelBrowserView";
+ private KernelSourceAction doubleClickAction;
+ private IDoubleClickListener dblClickListener;
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/ProbeAliasBrowserView.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/ProbeAliasBrowserView.java
new file mode 100644
index 0000000000..ab4e11dd5d
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/ProbeAliasBrowserView.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.ide.views;
+
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.linuxtools.systemtap.ui.ide.actions.hidden.ProbeAliasAction;
+import org.eclipse.linuxtools.systemtap.ui.ide.structures.TapsetLibrary;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.ui.IWorkbenchActionConstants;
+
+
+/**
+ * The Probe Alias Browser module of the SystemTap GUI. This class provides a list of all probe aliases
+ * defined in the tapset (both the standard, and user-specified tapsets), and allows the user to insert
+ * template probes into an editor.
+ * @author Henry Hughes
+ * @author Ryan Morse
+ */
+public class ProbeAliasBrowserView extends BrowserView {
+ public ProbeAliasBrowserView() {
+ super();
+ LogManager.logInfo("Initializing", this);
+ }
+
+ /**
+ * Creates the UI on the given <code>Composite</code>
+ */
+ public void createPartControl(Composite parent) {
+ LogManager.logDebug("Start createPartControl: parent-" + parent, this);
+ super.createPartControl(parent);
+ TapsetLibrary.init();
+ TapsetLibrary.addListener(new ViewUpdater());
+ refresh();
+ makeActions();
+ LogManager.logDebug("End createPartControl:", this);
+ }
+
+ /**
+ * Refreshes the list of probe aliases in the viewer.
+ */
+ public void refresh() {
+ LogManager.logDebug("Start refresh:", this);
+ super.viewer.setInput(TapsetLibrary.getProbes());
+ LogManager.logDebug("End refresh:", this);
+ }
+
+ /**
+ * Wires up all of the actions for this browser, such as double and right click handlers.
+ */
+ private void makeActions() {
+ LogManager.logDebug("Start makeActions:", this);
+ doubleClickAction = new ProbeAliasAction(getSite().getWorkbenchWindow(), this);
+ dblClickListener = new IDoubleClickListener() {
+ public void doubleClick(DoubleClickEvent event) {
+ LogManager.logDebug("doubleClick fired", this);
+ doubleClickAction.run();
+ }
+ };
+ viewer.addDoubleClickListener(dblClickListener);
+ Control control = this.viewer.getControl();
+ MenuManager manager = new MenuManager("probePopup");
+
+ manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
+ Menu menu = manager.createContextMenu(control);
+ viewer.getControl().setMenu(menu);
+ getSite().registerContextMenu(manager, viewer);
+ LogManager.logDebug("End makeActions:", this);
+ }
+
+ public void dispose() {
+ LogManager.logInfo("Disposing", this);
+ super.dispose();
+ if(null != doubleClickAction)
+ doubleClickAction.dispose();
+ doubleClickAction = null;
+ if(null != viewer)
+ viewer.removeDoubleClickListener(dblClickListener);
+ dblClickListener = null;
+ if(null != menu)
+ menu.dispose();
+ menu = null;
+ }
+
+ public static final String ID = "org.eclipse.linuxtools.systemtap.ui.ide.views.ProbeAliasBrowserView";
+ private ProbeAliasAction doubleClickAction;
+ private IDoubleClickListener dblClickListener;
+ private Menu menu;
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/toc.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/toc.xml
new file mode 100644
index 0000000000..7f597e0918
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/toc.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+
+<toc label="Systemtap IDE User Guide" topic="documentation/html/toc.html">
+ <topic label="Getting Started" href="documentation/html/gettingstarted/gettingStarted.html">
+ <anchor id="gettingstarted"/>
+ </topic>
+ <topic label="Concepts" href="documentation/html/concepts/concepts.html">
+ <anchor id="concepts"/>
+ </topic>
+ <topic label="Tasks" href="documentation/html/tasks/tasks.html">
+ <anchor id="tasks"/>
+ </topic>
+ <topic label="Reference" href="documentation/html/reference/reference.html">
+ <anchor id="reference"/>
+ </topic>
+</toc>

Back to the top