Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Overholt2011-02-28 03:50:37 +0000
committerAndrew Overholt2011-02-28 03:50:37 +0000
commit1503d4738ec76f5f93c301a421c2236dfee7a42a (patch)
treebb7c8866a298fa07e35f60e5e83c050f4e10d19c /systemtap
parent473918270ef63f6a78943ee1259f2af13bf4517b (diff)
parent8f827fc0d38b4b621087559b68e46f8bc48f29d6 (diff)
downloadorg.eclipse.linuxtools-1503d4738ec76f5f93c301a421c2236dfee7a42a.tar.gz
org.eclipse.linuxtools-1503d4738ec76f5f93c301a421c2236dfee7a42a.tar.xz
org.eclipse.linuxtools-1503d4738ec76f5f93c301a421c2236dfee7a42a.zip
Merge systemtap 0.6.0
Diffstat (limited to 'systemtap')
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph-feature/ChangeLog23
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph-feature/build.properties3
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph-feature/feature.properties132
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph-feature/feature.xml5
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph-feature/license.html107
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/ChangeLog239
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/META-INF/MANIFEST.MF18
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/about.html26
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/build.properties9
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/errors.prop9
-rwxr-xr-xsystemtap/org.eclipse.linuxtools.callgraph.core/install.sh2
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/parse_function_mark_partial.stp122
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/parse_function_partial.stp24
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/plugin.properties7
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/plugin.xml28
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/schema/org.eclipse.linuxtools.callgraph.core.parser.exsd24
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/Activator.java133
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/DocWriter.java68
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/FileFinderOpener.java133
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/Helper.java50
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/LaunchConfigurationConstants.java8
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/PluginConstants.java40
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/ShellOpener.java40
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapCommandGenerator.java184
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapErrorHandler.java472
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapParser.java329
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapTextParser.java62
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/messages.properties54
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch.tests/ChangeLog4
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch.tests/META-INF/MANIFEST.MF2
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch.tests/resources/.cproject936
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch.tests/resources/.project82
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/ChangeLog165
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/META-INF/MANIFEST.MF7
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/about.html26
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/build.properties4
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/plugin.properties16
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/plugin.xml11
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/ASTTranslationUnitVisitor.java54
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/Activator.java105
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/ConfigurationOptionsSetter.java155
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/LaunchStapGraph.java120
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/LaunchWizard.java56
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/ListTreeContentProvider.java7
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/RuledTreeSelectionDialog.java1
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java351
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchShortcut.java827
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapOptionsTab.java62
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/messages.properties100
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests-feature/feature.properties4
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/ChangeLog34
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/META-INF/MANIFEST.MF3
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/basic.graph12
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/build.properties8
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/catlan.graph495
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/eag.graph197
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/parse_function_nomark.stp29
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/AllTests.java3
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/MouseListenerTest.java48
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/StapGraphParserTest.java72
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/SystemTapGraphTest.java290
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/SystemTapGraphViewTest.java16
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/ChangeLog233
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/META-INF/MANIFEST.MF6
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/about.html26
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/build.properties4
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/plugin.properties6
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/plugin.xml34
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/Activator.java95
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/AggregateLayoutAlgorithm.java35
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/CallGraphConstants.java7
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/CallgraphView.java1405
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/GraphUIJob.java226
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapData.java230
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapGraph.java491
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapGraphParser.java715
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapNode.java43
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/SystemTapCommandParser.java123
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/AutoScrollHelper.java8
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphKeyListener.java17
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphMouseListener.java44
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphMouseWheelListener.java2
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/messages.properties98
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeContentProvider.java10
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeDoubleClickListener.java2
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeLabelProvider.java6
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap-feature/ChangeLog51
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap-feature/build.properties (renamed from systemtap/org.eclipse.linuxtools.systemtap.local-feature/build.properties)4
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap-feature/feature.properties141
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap-feature/feature.xml109
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap-feature/license.html107
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup-feature/ChangeLog52
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup-feature/feature.properties138
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup-feature/license.html107
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/plugin.properties12
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local-feature/.project17
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local-feature/epl-v10.html256
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local-feature/feature.properties114
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local-feature/feature.xml68
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/.classpath7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/.project28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/META-INF/MANIFEST.MF18
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/basic.graph6
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/catlan.graph6
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/eag.graph6
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/icons/sample.gifbin983 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/makefile30
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/parse_function_nomark.stp43
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/Activator.java83
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/AllTests.java33
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/MouseListenerTest.java60
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/StapGraphParserTest.java106
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/SystemTapGraphTest.java321
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/SystemTapGraphViewTest.java34
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/test.xml54
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/.classpath7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/.project28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/META-INF/MANIFEST.MF21
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/build.properties16
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/compare_method.gifbin193 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/down.gifbin99 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/genericregister_obj.gifbin115 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/mode_collapsednodes.gifbin88 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/nav_refresh.gifbin327 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/public_co.gifbin194 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/radial_view.gifbin362 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/showchild_mode.gifbin323 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/tree_view.gifbin91 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/up.gifbin105 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/view_aggregateview.gifbin131 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/plugin.xml92
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/Activator.java95
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/AggregateLayoutAlgorithm.java72
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/CallGraphConstants.java24
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/CallgraphView.java1172
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/GraphUIJob.java226
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/Messages.java32
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapData.java228
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapGraph.java1832
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapGraphParser.java368
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapNode.java143
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/SystemTapCommandParser.java123
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/InsertMarkerAction.java123
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/Messages.java32
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/RemoveMarkerAction.java125
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/messages.properties10
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/AutoScrollHelper.java58
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/AutoScrollSelectionListener.java42
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/Messages.java17
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphFocusListener.java38
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphKeyListener.java78
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseExitListener.java28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseListener.java278
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseMoveListener.java82
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseWheelListener.java143
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/messages.properties13
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/messages.properties82
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeContentProvider.java74
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeDoubleClickListener.java55
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeLabelProvider.java55
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeListener.java73
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/.classpath7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/.project28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/META-INF/MANIFEST.MF21
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/build.properties23
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/errors.prop13
-rwxr-xr-xsystemtap/org.eclipse.linuxtools.systemtap.local.core/install.sh21
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/parse_function_mark_partial.stp122
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/parse_function_partial.stp21
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/plugin.xml6
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/schema/org.eclipse.linuxtools.systemtap.local.core.parser.exsd109
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/schema/systemtapCommands.exsd84
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/Activator.java133
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/FileFinderOpener.java153
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/Helper.java142
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/LaunchConfigurationConstants.java92
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/MP.java45
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/Messages.java36
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/PluginConstants.java51
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/ShellOpener.java40
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapCommandGenerator.java236
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapErrorHandler.java323
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapParser.java169
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapUIErrorMessages.java62
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/messages.properties38
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/systemtap.pngbin3538 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.core/systemtapbanner.pngbin4071 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/.classpath7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/.project28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/META-INF/MANIFEST.MF21
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/build.properties16
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.cproject936
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.lock0
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.mylyn/repositories.xml.zipbin402 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.mylyn/tasks.xml.zipbin250 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.history/e4/0056fdb7b8a6001e143aec015f68a92782
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.projects/CallGraphDemo/.indexes/history.indexbin42 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.projects/CallGraphDemo/1.treebin627069 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version1
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.indexbin151 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version1
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/2.treebin361 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resourcesbin568 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.collabnet.subversion.merge.prefs3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs15
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.context.core.prefs3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.cvs.ui.prefs3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.ui.prefs3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs6
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.tigris.subversion.subclipse.ui.prefs3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCachebin4 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.datbin115 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml2
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml2
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml10
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ltk.ui.refactoring/dialog_settings.xml7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml5
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml235
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml4
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/version.ini1
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.project82
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/.cproject593
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/.project81
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/main.c25
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/uncalled.c3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/AbstractStapTest.java67
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/Activator.java82
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/AllTests.java41
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/ConfigurationTest.java104
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/LaunchShortcutsTest.java69
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapCommandGeneratorTest.java94
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapCommandLineTest.java172
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapCommandTest.java59
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapTabTest.java50
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/TestConstants.java15
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/test.xml54
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/.classpath7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/.project28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/META-INF/MANIFEST.MF30
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/build.properties18
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/icons/Wizard.gifbin10445 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/icons/bar_graph.pngbin467 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/icons/question.pngbin438 -> 0 bytes
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/index.xml5
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/plugin.properties12
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/plugin.xml90
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/ASTTranslationUnitVisitor.java54
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/Activator.java105
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/ConfigurationOptionsSetter.java235
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/LaunchStapGraph.java301
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/LaunchWizard.java332
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/ListTreeContentProvider.java151
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/Messages.java32
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/RuledTreeSelectionDialog.java109
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLCTG.java37
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLaunchConfigurationDelegate.java473
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLaunchConfigurationTabGroup.java30
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLaunchShortcut.java793
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapOptionsTab.java1011
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/TranslationUnitVisitor.java49
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/messages.properties135
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/toc.xml6
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.launch/tree.htm1
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/.project17
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/build.properties1
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/epl-v10.html256
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/feature.properties112
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/feature.xml51
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/ChangeLog74
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/META-INF/MANIFEST.MF25
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/about.html26
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/build.properties10
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/plugin.properties8
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/plugin.xml47
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/actions/StopScriptAction.java100
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/ScriptConsole.java315
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/ChangeLog151
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/META-INF/MANIFEST.MF26
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/about.html26
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/build.properties11
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/plugin.properties42
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/plugin.xml295
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardModuleLocator.java98
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardModuleTreeBuilder.java140
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/ChangeLog46
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/META-INF/MANIFEST.MF23
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/about.html26
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/build.properties8
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/plugin.properties21
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/plugin.xml114
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/src/org/eclipse/linuxtools/systemtap/ui/dashboardextension/dialogs/ScriptDetails.java129
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/ChangeLog46
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/META-INF/MANIFEST.MF17
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/about.html26
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/build.properties8
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/plugin.properties19
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/actions/file/OpenFileAction.java117
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphicalrun/ChangeLog39
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphicalrun/META-INF/MANIFEST.MF22
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphicalrun/about.html26
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphicalrun/build.properties8
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphicalrun/plugin.properties18
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphicalrun/plugin.xml94
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/ChangeLog38
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/META-INF/MANIFEST.MF26
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/about.html26
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/build.properties10
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/plugin.properties34
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/plugin.xml157
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/ChangeLog27
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/META-INF/MANIFEST.MF22
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/about.html26
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/build.properties (renamed from systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/build.properties)4
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/plugin.properties2
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/ChangeLog55
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/META-INF/MANIFEST.MF27
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/about.html26
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/build.properties8
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/plugin.properties6
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/plugin.xml27
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/ChangeLog124
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/META-INF/MANIFEST.MF35
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/about.html26
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/build.properties10
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.properties72
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.xml305
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptAction.java342
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/FunctionBrowserAction.java145
-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/views/BrowserView.java172
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.logging/ChangeLog23
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.logging/META-INF/MANIFEST.MF15
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.logging/about.html26
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.logging/build.properties7
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.logging/plugin.properties3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.logging/plugin.xml17
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/ChangeLog23
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/META-INF/MANIFEST.MF17
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/about.html26
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/build.properties8
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/plugin.properties3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/plugin.xml12
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/StreamGobbler.java201
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/ChangeLog30
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/META-INF/MANIFEST.MF20
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/about.html28
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/plugin.properties10
356 files changed, 10513 insertions, 21895 deletions
diff --git a/systemtap/org.eclipse.linuxtools.callgraph-feature/ChangeLog b/systemtap/org.eclipse.linuxtools.callgraph-feature/ChangeLog
new file mode 100644
index 0000000000..34fc183b02
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.callgraph-feature/ChangeLog
@@ -0,0 +1,23 @@
+2010-05-18 Andrew Overholt <overholt@redhat.com>
+
+ * feature.properties: Fix provider name.
+
+2010-04-26 Andrew Overholt <overholt@redhat.com>
+
+ * feature.xml: Use featureURL property instead of explicit URL.
+
+2010-04-26 Andrew Overholt <overholt@redhat.com>
+
+ * feature.properties: Match consistent license text (bug #306627). Update
+ copyright year.
+ * license.html: New file. HTML version of SUA (bug #306627).
+ * build.properties: Include license.html.
+
+2010-04-13 Andrew Overholt <overholt@redhat.com>
+
+ * feature.xml: Restrict to os=linux.
+
+2009-11-03 Charley Wang <chwang@redhat.com>
+
+ * feature.properties: Change description for Callgraph feature. Add Changelog
+ * feature.properties: Change featureName \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph-feature/build.properties b/systemtap/org.eclipse.linuxtools.callgraph-feature/build.properties
index 0c6ef87303..b74af86fe4 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph-feature/build.properties
+++ b/systemtap/org.eclipse.linuxtools.callgraph-feature/build.properties
@@ -1,3 +1,4 @@
bin.includes = feature.xml,\
feature.properties,\
- epl-v10.html
+ epl-v10.html,\
+ license.html
diff --git a/systemtap/org.eclipse.linuxtools.callgraph-feature/feature.properties b/systemtap/org.eclipse.linuxtools.callgraph-feature/feature.properties
index fc10012e06..4823e9a6ee 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph-feature/feature.properties
+++ b/systemtap/org.eclipse.linuxtools.callgraph-feature/feature.properties
@@ -8,16 +8,14 @@
# Contributors:
# Red Hat, Inc. - initial API and implementation
#********************************************************************************
-featureName=SystemTap C/C++ Visualization Tool (Incubation)
-featureProvider=Eclipse
-description=Graphically displays the call hierarchy from executing a C/C++ binary, along with various other runtime statistics.
-copyright=Copyright (c) 2009 Red Hat, Inc.\n\
-All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html
+featureName=C/C++ Call Graph Visualization (Incubation)
+featureProvider=Eclipse Linux Tools
+description=Tracks function calls in a C/C++ program as they occur. Records start and end time for each function as well as any user-specified information, and displays everything as a graph of nodes.
+copyright=Copyright (c) 2009, 2010 Red Hat, Inc.
+licenseURL=license.html
license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
\n\
Usage Of Content\n\
\n\
@@ -25,42 +23,38 @@ THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/
OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
\n\
Applicable Licenses\n\
\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
For purposes of the EPL, "Program" will mean the Content.\n\
\n\
Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
as downloadable archives ("Downloads").\n\
\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
\n\
The terms and conditions governing Plug-ins and Fragments should be\n\
contained in files named "about.html" ("Abouts"). The terms and\n\
@@ -69,46 +63,76 @@ in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
Licenses may be located in any directory of a Download or Module\n\
including, but not limited to the following locations:\n\
\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
\n\
Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
Included Features, the Feature Update License should either provide you\n\
with the terms and conditions governing the Included Features or inform\n\
you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
\n\
IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
govern that particular Content.\n\
\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+ 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+ the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+ extending or updating the functionality of an Eclipse-based product.\n\
+ 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+ Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+ 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+ govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+ Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+ with the Specification. Such Installable Software Agreement must inform the user of the\n\
+ terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+ the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+ indication of agreement by the user, the provisioning Technology will complete installation\n\
+ of the Installable Software.\n\
+\n\
Cryptography\n\
\n\
Content may contain encryption software. The country in which you are\n\
currently may have restrictions on the import, possession, and use,\n\
and/or re-export to another country, of encryption software. BEFORE\n\
using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n \ No newline at end of file
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
diff --git a/systemtap/org.eclipse.linuxtools.callgraph-feature/feature.xml b/systemtap/org.eclipse.linuxtools.callgraph-feature/feature.xml
index fe8e7f2094..d6c8e23496 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph-feature/feature.xml
+++ b/systemtap/org.eclipse.linuxtools.callgraph-feature/feature.xml
@@ -3,7 +3,8 @@
id="org.eclipse.linuxtools.callgraph"
label="%featureName"
version="0.0.1.qualifier"
- provider-name="%featureProvider">
+ provider-name="%featureProvider"
+ os="linux">
<description>
%description
@@ -13,7 +14,7 @@
%copyright
</copyright>
- <license url="http://www.eclipse.org/legal/epl-v10.html">
+ <license url="%licenseURL">
%license
</license>
diff --git a/systemtap/org.eclipse.linuxtools.callgraph-feature/license.html b/systemtap/org.eclipse.linuxtools.callgraph-feature/license.html
new file mode 100644
index 0000000000..c184ca36a9
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.callgraph-feature/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 14, 2010</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+ repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ (&quot;Specification&quot;).</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
+ on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/ChangeLog b/systemtap/org.eclipse.linuxtools.callgraph.core/ChangeLog
new file mode 100644
index 0000000000..8fa121bee1
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/ChangeLog
@@ -0,0 +1,239 @@
+2010-06-02 Roland Grunberg <rgrunber@redhat.com>
+
+ * plugin.properties: Externalize some strings in the Manifest.
+ * build.properties: See above
+ * META-INF/MANIFEST.MF: See above
+ * plugin.xml: See above
+
+2010-06-01 Roland Grunberg <rgrunber@redhat.com>
+
+ * errors.prop: Modify error message for uprobes to list both
+ /usr/share/ and /usr/local/share in the make step for standard
+ SystemTap installs, and local installations.
+
+2010-04-13 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapTextParser.java:
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapErrorHandler.java:
+ Clean up code.
+
+2010-04-08 Roland Grunberg <rgrunber@redhat.com>
+
+ * META-INF/MANIFEST.MF: Add required import packages.
+ * src/org/eclipse/linuxtools/callgraph/core/FileFinderOpener.java
+ (findAndOpen): Simplify logic by using functions in profiling
+ framework o.e.l.profiling to link to source code.
+
+2010-03-22 Roland Grunberg <rgrunber@redhat.com>
+
+ * META-INF/MANIFEST.MF: Add o.e.l.profiling.ui to imported packages.
+ * src/org/eclipse/linuxtools/callgraph/core/FileFinderOpener.java:
+ Clean up code by using openEditorAndSelect which is now in profiling framework.
+ * src/org/eclipse/linuxtools/callgraph/core/messages.properties: Remove these strings.
+
+2010-02-26 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapParser.java:
+ Clean up code and add getter for internal data field.
+
+2010-02-23 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapParser.java: Add a Thread.sleep() to stop abusing CPU cycles so much
+ Get rid of extraneous parsing job as a further optimization
+
+2010-02-12 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapView.java: Create default implementations of getParser and setParser using a private SystemTapParser variable.
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapTextView.java: Get rid of getParser and setParser functions.
+
+2010-02-11 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapTextParser.java: Properly grab new lines in text parser.
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapParser.java: Call makeView earlier so SystemTapTextView will stop breaking.
+
+2010-02-02 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapCommandGenerator.java: Fix binary argument handling.
+
+2010-02-01 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/messages.properties: Remove unused externalized string.
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapView.java: Remove Callgraph Version string.
+
+2010-01-28 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapErrorHandler.java: Clean up unnecessary code.
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapTextView.java: Same as above.
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapView.java: Same as above.
+
+2010-01-26 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapParser.java: Fix settings for nonrealtimeparsing.
+
+2010-01-22 Roland Grunberg <rgrunber@redhat.com>
+
+ * errors.prop: Add case for when uprobes.ko built for a previous kernel, and must be updated.
+ * src/org/eclipse/linuxtools/callgraph/core/messages.properties: Remove Error Log externalized strings.
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapErrorHandler.java:
+ (writeToLog): Output logged errors using the Eclipse Error Log.
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapTextView.java:
+ (createPartControl): remove the Error Log from being displayed.
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapView.java: Remove the Error Log window.
+
+2009-12-22 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapErrorHandler.java: Remove extraneous logic
+ * errors.prop: Re-add uprobes error after slight modification to popup error
+
+2009-12-21 Charley Wang <chwang@redhat.com>
+
+ * errors.prop: Get rid of error for uprobes -- the stap output is pretty descriptive. The popup box is just annoying.
+
+2009-12-17 rgrunber <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/messages.properties: Fix certain externalized strings.
+ * src/org/eclipse/linuxtools/callgraph/core/Helper.java:
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapParser.java:
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapView.java:
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapErrorHandler.java
+ (finishHandling): Change method to void.
+
+2009-12-16 rgrunber <rgrunber@redhat.com>
+
+ * errors.prop: Update / Clean up error file.
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapErrorHandler.java:
+ Remove function extracting logic. It was used to determine which probe points did not match.
+ Stap now silently fails on a probe point that fails to match.
+ Add some methods to assist in testing.
+
+2009-12-15 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/FileFinderOpener.java: Make findAndOpen safety-valve return null if project is null.
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapParser.java: Set monitor
+ * parse_function_partial.stp: Remove semicolon from partial script
+
+2009-12-14 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/Helper.java:
+ BufferedWriter helper methods can be static if we simply pass in the BufferedWriter to be acted upon.
+
+2009-12-10 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/FileFinderOpener.java: Properly quit if findAndOpen encounters a user-sent 'Cancel'
+
+2009-12-10 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/CallgraphCorePlugin.java: Add NON-NLS as needed
+ * src/org/eclipse/linuxtools/callgraph/core/messages.properties: Add Callgraph version
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapView.java: Let Help->Version refer to systemtap, and callgraph versions
+
+2009-12-09 Charley Wang <chwang@redhat.com>
+
+ * parse_function_partial.stp: Add threading capability
+
+2009-12-08 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/messages.properties: Clean up unused externalized strings
+ * parse_function_partial.stp: Replace syscall.exit with process(@1).end to eliminate use of debug-info
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapErrorHandler.java: Remove obsolete code
+
+2009-11-30 Charley Wang <chwang@redhat.com>
+
+ * plugin.xml: Add icon to SystemTapTextView (Icon 12446.monitorOn.gif is from 3.4 Ganymede, source: http://xantorohara.110mb.com/core-icons/Eclipse.html)
+
+2009-11-28 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/ViewFactory.java:Add createView function that uses secondaryID.
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapParser.java: Add secondaryID
+ * src/org/eclipse/linuxtools/callgraph/core/StapUIJob.java: Add toggle for creating views with and without multiples
+ * src/org/eclipse/linuxtools/callgraph/core/LaunchConfigurationConstants.java: Add SECONDARY_VIEW_ID and DEFAULT_SECONDARY_VIEW_ID
+
+2009-11-27 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapCommandGenerator.java: Add capacity to change the command used. The command attribute should be derived from Config.getLaunchAttribute(LaunchConfigurationConstants.COMMAND)
+ * src/org/eclipse/linuxtools/callgraph/core/LaunchConfigurationConstants.java: Adding Command to LaunchConfigurationConstants. The default value is PluginConstants.STAP_PATH.
+
+2009-11-26 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/PluginConstants.java: Rearrange constants. Add DEFAULT_PARSER_ID. Remove final modifier on STAP_PATH, so it can be changed to accommodate other commands, if need be.
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapTextParser.java: Get rid of println statement
+
+2009-11-23 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapView.java: Use deleteLog function
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapErrorHandler.java: Add deleteLog function
+
+2009-11-18 Roland Grunberg <rgrunber@redhat.com>
+
+ * build.properties: Add errors.prop to build.
+
+2009-11-18 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/PluginConstants.java: Correct default viewID.
+
+2009-11-16 Roland Grunberg <rgrunber@redhat.com>
+
+ * META-INF/MANIFEST.MF: Add Eclipse to Provider field.
+
+2009-11-16 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapCommandGenerator.java: Remove unused functions, variables. Make commandGenerator methods static.
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapParser.java: (testRun): Change testRun so it will actually work and actually mimicks the properties of run.
+
+2009-11-12 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapParser.java: Remove unused functions. Add docs to setDone.
+
+2009-11-12 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapErrorHandler.java: (appendToLog):
+ Method writes directly to the log without requires String argument to go through lengthy validation.
+ General cleanup of SystemTapErrorhandler
+
+2009-11-12 Charley Wang <chwang@redhat.com>
+
+ * ChangeLog: Remove the ShellOpener class.
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapCommandGenerator.java (buildScript): CommandGenerator no longer extends action or IWindow...Delegate. None of those functions were being used.
+ * src/org/eclipse/linuxtools/callgraph/core/CallgraphCorePlugin.java (getPluginLocation): Add javadoc. Remove commented functions at the bottom.
+
+2009-11-11 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapErrorHandler.java: Create cleanScript(): function as a possible first step to abstraction of Error Handling
+
+2009-11-10 Charley Wang <chwang@redhat.com>
+
+ * plugin.xml: Add icons to build.properties
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapView.java: Change reference to kill button to use imageDescriptor function in AbstractUIPlugin
+ * src/org/eclipse/linuxtools/callgraph/core/CallgraphCorePlugin.java: Add PLUGIN_ID string
+
+
+2009-11-09 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/messages.properties: Externalize/Fix Strings
+ * src/org/eclipse/linuxtools/callgraph/core/PluginConstants.java: Externalize/Fix Strings
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapErrorHandler.java: Give some variables more meaningful names.
+
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapCommandGenerator.java: Remove commented out unused code.
+ * src/org/eclipse/linuxtools/callgraph/core/DocWriter.java: Add necessary headers to all files listed below.
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapTextParser.java:
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapTextView.java:
+ * src/org/eclipse/linuxtools/callgraph/core/XMLParser.java:
+
+2009-11-06 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/CallgraphCorePlugin.java: Rename Activator --> CallgraphCorePlugin.
+ (start): Clean out the start method to contain only the bare essentials instead of always finding the location, etc. on startup.
+ * src/org/eclipse/linuxtools/callgraph/core/ViewFactory.java: Change the way viewFactory creates views. Have ViewFactory set the view id.
+ * src/org/eclipse/linuxtools/callgraph/core/StapUIJob.java: Simplify StapUIJob by using ViewFactory to instantiate views.
+ * src/org/eclipse/linuxtools/callgraph/core/DocWriter.java: Update DocWriter's methods.
+ * src/org/eclipse/linuxtools/callgraph/core/XMLParser.java: Add javadocs, modify functions for ease of use.
+
+2009-11-05 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapView.java: Rename loadView --> initializeView
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapTextView.java: Rename loadView --> initializeView
+ * src/org/eclipse/linuxtools/callgraph/core/StapUIJob.java: Rename loadView --> initializeView
+
+2009-11-04 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/SystemTapParser.java: Fix nonRealTimeParsing. \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.callgraph.core/META-INF/MANIFEST.MF
index 871c6a5747..ffb4c474b9 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/META-INF/MANIFEST.MF
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/META-INF/MANIFEST.MF
@@ -1,21 +1,19 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: SystemTap Local Core Project
+Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.linuxtools.callgraph.core;singleton:=true
Bundle-Version: 0.0.1.qualifier
-Bundle-Activator: org.eclipse.linuxtools.callgraph.core.Activator
+Bundle-Activator: org.eclipse.linuxtools.callgraph.core.CallgraphCorePlugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: org.eclipse.linuxtools.callgraph.core
-Import-Package: org.eclipse.cdt.core,
- org.eclipse.cdt.core.dom.ast,
- org.eclipse.cdt.core.index,
- org.eclipse.cdt.core.model,
- org.eclipse.core.filesystem,
+Import-Package: org.eclipse.cdt.core.model,
+ org.eclipse.debug.ui.sourcelookup,
org.eclipse.jface.text,
+ org.eclipse.linuxtools.profiling.ui,
org.eclipse.ui,
- org.eclipse.ui.console,
- org.eclipse.ui.ide,
- org.eclipse.ui.texteditor
+ org.eclipse.ui.console
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Localization: plugin
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/about.html b/systemtap/org.eclipse.linuxtools.callgraph.core/about.html
new file mode 100644
index 0000000000..23506a4bae
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/about.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>About</title>
+</head><body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/build.properties b/systemtap/org.eclipse.linuxtools.callgraph.core/build.properties
index 1b9a74f53b..b55ab26674 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/build.properties
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/build.properties
@@ -14,10 +14,13 @@ bin.includes = META-INF/,\
.,\
install.sh,\
systemtap.png,\
- parse_function_mark_partial.stp,\
parse_function_partial.stp,\
- bin/,\
systemtapbanner.png,\
- plugin.xml
+ plugin.xml,\
+ about.html,\
+ icons/,\
+ errors.prop,\
+ plugin.properties
+
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/errors.prop b/systemtap/org.eclipse.linuxtools.callgraph.core/errors.prop
index 319cd16dc8..f2acee1a36 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/errors.prop
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/errors.prop
@@ -1,13 +1,14 @@
.*no match while resolving probe point.*=One or more of the functions you specified could not be found.
-.*debuginfo under.*=No debuginfo could be found. As root, try running debuginfo-install kernel.
+.*debuginfo under.*=No debuginfo could be found. Make sure you have yum-utils installed, and run debuginfo-install kernel as root.
+.*libdwfl failure.*=Some debug info could not be found. On Fedora, try 'yum install systemtap kernel-devel yum-utils' and 'debuginfo-install kernel', as root.
.*___STAP_MARKER___.*=No ___STAP_MARKER___ functions were found in the target binary. Please insert markers, or try again without marking mode.
.*semantic error.*debuginfo.*=No debuginfo was found, try debuginfo-install kernel
-.*libdwfl failure.*=Some debug info could not be found. On Fedora, try 'yum install systemtap kernel-devel yum-utils' and 'debuginfo-install kernel', as root.
.*MAXACTION exceeded.*=SystemTap attempted to execute too many actions, please change the MAXACTIONS directive in the options tab of SystemTap Profile Configurations.
-.*uprobes.*=Probes were not compiled on your system. Try 'make -C /usr/local/share/systemtap/runtime/uprobes' as root
.*Unable to find full path for "stap".*=SystemTap is necessary for the running of this command. If it is installed please make sure it is on the standard path.
.*parse error.*=There may be an error in the arguments you sent or in the stap script, consult the log for more details.
.*MAXMAPENTRIES exceeded.*=The maximum number of entries for a map has been exceeded, please change the MAXMAPENTRIES directive in the options tap of SystemTap Profile Configurations.
-.*stapdev.*=Please add yourself to the 'stapdev' or 'stapusr' group in order to run stap. If you have not done so already please also run as rppt 'debuginfo-install kernel' and 'make -C /usr/local/share/systemtap/runtime/uprobes'.
+.*stapdev.*stapusr.*=Please add yourself to the 'stapdev' or 'stapusr' group in order to run stap.
.*Error inserting module.*File exists=A previous run of systemtap did not finish execution properly. In commandline, try ps aux | grep stap, kill any running stap processes and try again.
.*line 0: syntax error near unexpected token.*=Your workspace name may contain opening and closing brackets -- please switch to a workspace that does not use brackets and try again.
+.*SystemTap's version of uprobes is out of date.*=SystemTap's version of uprobes is out of date. If this is a standard SystemTap install, please run as root "make -C /usr/share/systemtap/runtime/uprobes". If SystemTap was built from source, please run as root "make -C /usr/local/share/systemtap/runtime/uprobes".
+.*Error inserting module.*Invalid module format.*=SystemTap's version of uprobes is out of date. If this is a standard SystemTap install, please run as root "make -C /usr/share/systemtap/runtime/uprobes". If SystemTap was built from source, please run as root "make -C /usr/local/share/systemtap/runtime/uprobes". \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/install.sh b/systemtap/org.eclipse.linuxtools.callgraph.core/install.sh
index 004fe90319..97783c3792 100755
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/install.sh
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/install.sh
@@ -4,7 +4,7 @@ num=1
#CREATE A BACKUP FILE WITHOUT OVERWRITING ANYTHING
while [ -e "${FILE}.bak${num}" ]; do
- num=`expr ${num} + 1`
+ num=$[ ${num} + 1 ]
done
USEREXISTS=`grep stapdev ${FILE}| grep ${USER}`
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/parse_function_mark_partial.stp b/systemtap/org.eclipse.linuxtools.callgraph.core/parse_function_mark_partial.stp
deleted file mode 100644
index 5145c21d1d..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/parse_function_mark_partial.stp
+++ /dev/null
@@ -1,122 +0,0 @@
-
-probe begin{
- printf("\nPROBE_BEGIN\n")
- printf("0<")
- funcName[0] = "init"
- serial++
- exitCalled = 0
- start[0] = gettimeofday_ns()
-}
-
-
-/*HANDLE CASE WHEN AN EXIT() IS MADE*/
-probe syscall.exit{
- if (target() == pid()){
- exitCalled = 1
- }
-}
-
-function callFunction(probefunc) {
-
- start[serial] = gettimeofday_ns()
-
- if (probefunc != "___STAP_MARKER___" && !(isinstr(probefunc,"(")) && !(isinstr(probefunc,")")) ) {
- currentLevel++
- currentlyIn[currentLevel] = serial
-
-
- /*RELATED TO MEASURING TOTAL TIME A FUNCTION TAKES */
- if (nested[probefunc] == 0){
- start_total[probefunc] = start_total[probefunc] - gettimeofday_ns()
- }
- nested[probefunc]++
-
-
- /*TRACK THE DEPTH OF A FUNCTION*/
- depth[serial] = val
- printf("%d<",serial)
-
-
- /*RECORD NAME OF THE FUNCTION*/
- funcName[serial] = probefunc
- /*TALLY NUMBER OF USES OF FUNCTION*/
-
- val++
- serial++
- }
-}
-
-function returnFunction(probefunc) {
- if (probefunc != "___STAP_MARKER___" && !(isinstr(probefunc,"(")) && !(isinstr(probefunc,")")) ) {
- val--
- currentLevel--
-
- /*IF WE ARE BACK TO THE DEPTH OF ANY FUNCTION WE HAVE RETURNED FROM IT*/
- foreach (ser in depth)
- if (depth[ser] == val){
- total[ser] = gettimeofday_ns() - start[ser]
- delete start[ser]
- }
- /*PREVENT CHANGING THE TIME OF THIS FUNCTION ONCE FOUND*/
- delete depth[ser]
-
- /*RELATED TO MEASURING TOTAL TIME A FUNCTION TAKES */
- if (nested[probefunc] == 1){
- start_total[probefunc] = start_total[probefunc] + ( gettimeofday_ns() )
- }
-
- printf(">")
-
- /*RELATED TO MEASURING TOTAL TIME A FUNCTION TAKES */
- nested[probefunc]--
- }
-}
-
-
-
-probe end{
- total[0] = gettimeofday_ns() - start[0]
- start_total["init"] = total[0]
-
- /*IF EXIT() WAS CALLED TALLY TIME FOR FUNCTIONS THAT DID NOT RETURN*/
- if (exitCalled == 1){
- foreach (fc in funcName){
- if (total[fc] == 0){
- total[fc] = gettimeofday_ns() - start[fc]
- }
- }
-
- foreach (fd in nested){
- if (start_total[fd] < 0){
- start_total[fd] = start_total[fd] + (nested[fd] * gettimeofday_ns())
- }
- }
- }
-
- printf(">")
-
- printf("\n")
-
- foreach (fa in funcName)
- printf("%d:%s;", fa, funcName[fa])
-
- printf("\n")
-
- foreach (ser in total)
- printf("%d:%d;", ser, total[ser])
-
- printf("\n")
-
- foreach (fn in start_total) {
- if (start_total[fn] > 0)
- printf("%s:%d;", fn, start_total[fn])
- }
-
- printf("\n")
-
- foreach (fc in markedFunctions) {
- printf("%d:%s;", markedFunctions[fc], markedMessages[fc])
- }
- printf("\n")
- exit()
-}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/parse_function_partial.stp b/systemtap/org.eclipse.linuxtools.callgraph.core/parse_function_partial.stp
index 06003ec96c..17033b337b 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/parse_function_partial.stp
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/parse_function_partial.stp
@@ -1,21 +1,29 @@
-function callFunction(probefunc) {
+global serial
+global startTime
+global finalTime
+
+
+function callFunction(probefunc, tid) {
if (startTime == 0) {
startTime = gettimeofday_ns()
- printf("<%s,,%d,,%d;", probefunc, serial, startTime)
+ printf("<%s,,%d,,%d,,%d\n", probefunc, serial, startTime, tid)
} else
- printf("<%s,,%d,,%d;", probefunc, serial, gettimeofday_ns())
+ printf("<%s,,%d,,%d,,%d\n", probefunc, serial, gettimeofday_ns(), tid)
serial++
}
-
-function returnFunction(probefunc) {
+function returnFunction(probefunc, tid) {
finalTime = gettimeofday_ns()
- printf(">%s,,%d;", probefunc, finalTime)
+ printf(">%s,,%d,,%d\n", probefunc, finalTime, tid)
}
probe end {
- printf("\n%d",finalTime);
- printf("\n%d",finalTime - startTime);
+ printf("-%d\n",finalTime);
+ printf("+%d\n",finalTime - startTime);
exit()
}
+
+probe process(@1).end {
+finalTime = gettimeofday_ns()
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/plugin.properties b/systemtap/org.eclipse.linuxtools.callgraph.core/plugin.properties
new file mode 100644
index 0000000000..0c48e5e101
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/plugin.properties
@@ -0,0 +1,7 @@
+#Properties file for org.eclipse.linuxtools.callgraph.core
+Bundle-Vendor=Eclipse Linux Tools
+Bundle-Name=Callgraph Core (Incubation)
+systemtaptextviewname=SystemTapTextView
+view.name=SystemTap Text View
+systemtapsleepingthreadparser=SleepingThreadParser
+systemtapparserextensionpoint=SystemTapParserPoint \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/plugin.xml b/systemtap/org.eclipse.linuxtools.callgraph.core/plugin.xml
index 3de9b750b8..3d9e0c9bf0 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/plugin.xml
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/plugin.xml
@@ -1,6 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
- <extension-point id="org.eclipse.linuxtools.callgraph.core.parser" name="SystemTapParserPoint" schema="schema/org.eclipse.linuxtools.callgraph.core.parser.exsd"/>
+ <extension-point id="org.eclipse.linuxtools.callgraph.core.parser" name="%systemtapparserextensionpoint" schema="schema/org.eclipse.linuxtools.callgraph.core.parser.exsd"/>
+
+ <extension
+ id="org.eclipse.linuxtools.callgraph.core.systemtaptextview"
+ name="%systemtaptextviewname"
+ point="org.eclipse.ui.views">
+ <view
+ category="org.eclipse.cdt.ui.views"
+ class="org.eclipse.linuxtools.callgraph.core.SystemTapTextView"
+ id="org.eclipse.linuxtools.callgraph.core.staptextview"
+ name="%view.name"
+ restorable="true"
+ icon="icons/12446.monitorOn.gif"
+ allowMultiple="true">
+ </view>
+ </extension>
+
+ <extension
+ id="org.eclipse.linuxtools.callgraph.core.systemtaptextparser"
+ name="%systemtapsleepingthreadparser"
+ point="org.eclipse.linuxtools.callgraph.core.parser">
+ <parser
+ class="org.eclipse.linuxtools.callgraph.core.SystemTapTextParser"
+ realtime="true">
+ </parser>
+ </extension>
+
</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/schema/org.eclipse.linuxtools.callgraph.core.parser.exsd b/systemtap/org.eclipse.linuxtools.callgraph.core/schema/org.eclipse.linuxtools.callgraph.core.parser.exsd
index 1d37983bbc..5aec36ef5d 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/schema/org.eclipse.linuxtools.callgraph.core.parser.exsd
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/schema/org.eclipse.linuxtools.callgraph.core.parser.exsd
@@ -6,7 +6,7 @@
<meta.schema plugin="org.eclipse.linuxtools.callgraph.core" id="org.eclipse.linuxtools.callgraph.core.parser" name="StapParserPoint"/>
</appinfo>
<documentation>
- [Enter description of this extension point.]
+ Extension point for SystemTap data parsers. Parsers have a bit of flexibility: You can create a parser that just generates data structures for a SystemTapView object to render, or a parser that continuously and actively updates the view.
</documentation>
</annotation>
@@ -83,7 +83,7 @@
<meta.section type="examples"/>
</appinfo>
<documentation>
- [Enter extension point usage example here.]
+ See org.eclipse.linuxtools.callgraph family of plugins
</documentation>
</annotation>
@@ -92,7 +92,7 @@
<meta.section type="apiinfo"/>
</appinfo>
<documentation>
- [Enter API information here.]
+ See built-in JavaDocs.
</documentation>
</annotation>
@@ -105,5 +105,23 @@
</documentation>
</annotation>
+ <annotation>
+ <appinfo>
+ <meta.section type="copyright"/>
+ </appinfo>
+ <documentation>
+ /*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+
+ </documentation>
+ </annotation>
</schema>
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/Activator.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/Activator.java
deleted file mode 100644
index e54a96ab45..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/Activator.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.callgraph.core;
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-
-
-/**
- * Activator class behaves like standard Wizard-created activator,
- * except for the checkRun() function.
- *
- */
-public class Activator extends AbstractUIPlugin {
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- PluginConstants.setPluginLocation(getPluginLocation());
- PluginConstants.setWorkspaceLocation(getDefault().getStateLocation().toString()+"/"); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
-
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(LaunchConfigurationConstants.PLUGIN_ID, path);
- }
-
- public String getPluginLocation() {
- Bundle bundle = getBundle();
-
- URL locationUrl = FileLocator.find(bundle,new Path("/"), null); //$NON-NLS-1$
- URL fileUrl = null;
- try {
- fileUrl = FileLocator.toFileURL(locationUrl);
- } catch (IOException e) {
- e.printStackTrace();
- }
- return fileUrl.getFile();
-
- }
-
-
-
- /**
- * Check if install script has been executed. Install script MUST delete the FirstRun file,
- * or else this will execute every time!
- *
- * Opens an install script to prompt user to properly install the plugin.
- */
- //@SuppressWarnings("static-access")
-/* private void checkRun() {
-
- PluginConstants.setPluginLocation(getPluginLocation());
- File initFile = new File(PluginConstants.PLUGIN_LOCATION + "SystemTapPlugin.init");//$NON-NLS-1
- String line;
-
- try {
- BufferedReader br = new BufferedReader (new FileReader(initFile));
- while ( (line = br.readLine()) != null) {
- if (line.contains("First time")) {
- Shell sh = new Shell();
- //String command = "SystemTapPluginInstall/" + "install.sh"; //$NON-NLS-1$ $NON-NLS-2$
- MessageDialog.openInformation(sh, Messages.getString("Activator.0"), Messages.getString("Activator.1")); //$NON-NLS-1$ //$NON-NLS-2$
- BufferedWriter bw = new BufferedWriter(new FileWriter(initFile));
- bw.append("Easter egg");
- bw.close();
- }
- }
-
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- }*/
-
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/DocWriter.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/DocWriter.java
index 3878e5e275..4daef577c7 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/DocWriter.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/DocWriter.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
package org.eclipse.linuxtools.callgraph.core;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -11,10 +21,14 @@ import org.eclipse.ui.progress.UIJob;
public class DocWriter extends UIJob {
private TextConsole console;
private String message;
+ private int length;
+ private int start;
/**
* Initiate DocWriter class. DocWriter will append the given message
- * to the given console in a separate UI job.
+ * to the given console in a separate UI job. By default, DocWriter will
+ * append to the end of the console and replace 0 characters. To change this,
+ * see DocWriter's set methods.
*
*
* @param name
@@ -26,34 +40,56 @@ public class DocWriter extends UIJob {
super(name);
this.console = console;
this.message = message;
+ this.start=-1;
+ this.length=-1;
}
+
+
+ /**
+ * Set the start location for DocWriter. Defaults to 0.
+ * @param val
+ */
+ public void setStart(int val) {
+ this.start =val;
+ }
+
+ /**
+ * Sets the number of characters to replace for DocWriter. Defaults
+ * @param val
+ */
+ public void setLength(int val) {
+ this.length=val;
+ }
+
+ /**
+ * Convenience method to set start and length.
+ * @param start
+ * @param length
+ */
+ public void setRegion(int start, int length) {
+ this.start = start;
+ this.length = length;
+ }
+
@Override
public IStatus runInUIThread(IProgressMonitor monitor) {
-
if (console == null)
return Status.CANCEL_STATUS;
+ if (message == null)
+ return Status.OK_STATUS;
IDocument doc = console.getDocument();
-
+ if (length < 0)
+ length = 0;
+ if (start < 0)
+ start = doc.getLength();
try {
- doc.replace(doc.getLength(), 0, message);
+ doc.replace(start, length, message);
} catch (BadLocationException e) {
e.printStackTrace();
}
-// try {
-// doc.replace(doc.getLength(), 0,
-// PluginConstants.NEW_LINE +
-// PluginConstants.NEW_LINE + "-------------" + //$NON-NLS-1$
-// PluginConstants.NEW_LINE +
-// "Configuration name: "//$NON-NLS-1$
-// + configName + PluginConstants.NEW_LINE +
-// "No binary commands specified. To specify commands, check under the Binary Arguments tab for this configuration in Profile As --> Profile Configurations." + //$NON-NLS-1$
-// PluginConstants.NEW_LINE + PluginConstants.NEW_LINE);
-// } catch (BadLocationException e) {
-// e.printStackTrace();
-// }
return Status.OK_STATUS;
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/FileFinderOpener.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/FileFinderOpener.java
index 60b2a7b97f..6b7fd4d16d 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/FileFinderOpener.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/FileFinderOpener.java
@@ -10,33 +10,16 @@
*******************************************************************************/
package org.eclipse.linuxtools.callgraph.core;
-import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
-import org.eclipse.cdt.core.CCorePlugin;
-import org.eclipse.cdt.core.dom.ast.IBinding;
-import org.eclipse.cdt.core.dom.ast.IFunction;
-import org.eclipse.cdt.core.index.IIndex;
-import org.eclipse.cdt.core.index.IIndexFile;
-import org.eclipse.cdt.core.index.IIndexFileLocation;
-import org.eclipse.cdt.core.index.IIndexManager;
-import org.eclipse.cdt.core.index.IIndexName;
-import org.eclipse.cdt.core.index.IndexFilter;
import org.eclipse.cdt.core.model.ICProject;
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.linuxtools.callgraph.core.SystemTapUIErrorMessages;
+import org.eclipse.linuxtools.profiling.ui.ProfileUIUtils;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.ui.texteditor.ITextEditor;
+
/**
* Helper class that finds and opens files. Finds based on function names,
* opens based on path and in the current default editor.
@@ -44,110 +27,58 @@ import org.eclipse.ui.texteditor.ITextEditor;
*/
public class FileFinderOpener {
- private static HashMap<String, Integer> offset = new HashMap<String, Integer>();
- private static HashMap<String, Integer> length = new HashMap<String, Integer>();
-
+ private static HashMap<String, int []> map = new HashMap<String, int []>();
/**
- * @param project : C Project Type
- * @param functionName : name of a function
- * @return an ArrayList of String paths (relative to current workspace) of
- * files with specified function name
+ * Seeks all functions in the given proejct that contains the given function name.
+ * Farms off the work of generating the list to the findFunctionsInProject function.
+ * Opens a selection dialog if more than one file is found.
+ *
+ * @param project
+ * @param functionName
+ * @return
*/
- private static ArrayList<String> findFunctionsInProject(ICProject project,
- String functionName) {
- ArrayList<String> files = new ArrayList<String>() ;
-
- IIndexManager manager = CCorePlugin.getIndexManager();
- IIndex index = null;
- try {
- index = manager.getIndex(project);
- index.acquireReadLock();
- IBinding[] bindings = index.findBindings(functionName.toCharArray(), IndexFilter.ALL, null);
- for (IBinding bind : bindings) {
- if (bind instanceof IFunction) {
- IFunction ifunction = (IFunction) bind;
- IIndexName[] names = index.findNames(ifunction,
- IIndex.FIND_DEFINITIONS);
- for (IIndexName iname : names) {
- IIndexFile file = iname.getFile();
- if (file != null) {
- IIndexFileLocation filelocation = file.getLocation();
- String loc = filelocation.getURI().getPath();
- files.add(loc);
- offset.put(loc, iname.getNodeOffset());
- length.put(loc, iname.getNodeLength());
- }
- }
- }
- }
-
- } catch (CoreException e) {
- e.printStackTrace();
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
-
- index.releaseReadLock();
- return files;
- }
-
-
- public static String findAndOpen(ICProject project, String functionName) {
- offset.clear();
- length.clear();
-
- ArrayList<String> files = findFunctionsInProject(project, functionName);
+ public static void findAndOpen(ICProject project, String functionName) {
+ //Safety valve: Do not enforce use of project names
+ if (project == null)
+ return;
+
+ map = ProfileUIUtils.findFunctionsInProject(project, functionName, -1, null);
+ ArrayList<String> files = new ArrayList<String>(map.keySet());
if (files == null || files.size() < 1)
- return null;
- StringBuilder output = new StringBuilder();
+ return;
if (files.size() == 1) {
- open(files.get(0), offset.get(files.get(0)), length.get(files.get(0)));
+ open(files.get(0), map.get(files.get(0))[0], map.get(files.get(0))[1]);
} else {
- ElementListSelectionDialog d = new ElementListSelectionDialog(
- new Shell(), new LabelProvider());
+ ElementListSelectionDialog d = new ElementListSelectionDialog(new Shell(), new LabelProvider());
d.setTitle(Messages.getString("FileFinderOpener.MultipleFilesDialog")); //$NON-NLS-1$
d.setMessage(Messages.getString("FileFinderOpener.MultFilesDialogM1") + functionName + Messages.getString("FileFinderOpener.MultFilesDialogM2") + //$NON-NLS-1$ //$NON-NLS-2$
Messages.getString("FileFinderOpener.MultFilesDialogM3")); //$NON-NLS-1$
d.setElements(files.toArray());
d.open();
+
+ if (d.getResult() == null) {
+ return;
+ }
+
for (Object o : d.getResult()) {
if (o instanceof String) {
String s = (String) o;
- output.append(open(s, offset.get(s), length.get(s)));
+ open(s, map.get(s)[0], map.get(s)[1]);
}
}
}
-
- return output.toString();
}
-
- public static String open(String path, int offset, int length) {
+ public static void open(String path, int offset, int length) {
if (path == null)
- return null;
- File fileToOpen = new File(path);
-
- if (fileToOpen.exists() && fileToOpen.isFile()) {
- IFileStore fileStore = EFS.getLocalFileSystem().getStore(fileToOpen.toURI());
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
-
- try {
- IEditorPart ed = IDE.openEditorOnFileStore( page, fileStore );
- if (ed instanceof ITextEditor && offset > 0) {
- ITextEditor text = (ITextEditor) ed;
- text.selectAndReveal(offset, length);
- return text.getTitle();
- }
- } catch ( PartInitException e ) {
- }
- } else {
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("FileFinderOpener.FileNotFound"), //$NON-NLS-1$
- Messages.getString("FileFinderOpener.FileNotFound1"), Messages.getString("FileFinderOpener.FileNotFound2") + path); //$NON-NLS-1$ //$NON-NLS-2$
- mess.schedule();
+ return;
+ try {
+ ProfileUIUtils.openEditorAndSelect(path, offset, length);
+ } catch (PartInitException e) {
+ e.printStackTrace();
}
- return null;
}
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/Helper.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/Helper.java
index 01e9543b94..2c442f12a7 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/Helper.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/Helper.java
@@ -65,15 +65,20 @@ public class Helper {
out.write(content);
out.close();
} catch (Exception e) {
- SystemTapUIErrorMessages err = new SystemTapUIErrorMessages(Messages.getString("SystemTapView.31"), //$NON-NLS-1$
- Messages.getString("SystemTapView.32"), //$NON-NLS-1$
- Messages.getString("SystemTapView.33")); //$NON-NLS-1$
+ SystemTapUIErrorMessages err = new SystemTapUIErrorMessages
+ (Messages.getString("SystemTapView.FileIOErr"), //$NON-NLS-1$
+ Messages.getString("SystemTapView.FileIOErr"), //$NON-NLS-1$
+ Messages.getString("SystemTapView.FileIOErrMsg")); //$NON-NLS-1$
err.schedule();
e.printStackTrace();
}
}
-
+ /**
+ * Append a String to a file
+ * @param absoluteFilePath : The absolute path to the file to which we will append.
+ * @param content : The contents to append.
+ */
public static void appendToFile(String absoluteFilePath, String content) {
try {
FileWriter fstream;
@@ -82,14 +87,20 @@ public class Helper {
out.append(content);
out.close();
} catch (Exception e) {
- SystemTapUIErrorMessages err = new SystemTapUIErrorMessages(Messages.getString("SystemTapView.31"), //$NON-NLS-1$
- Messages.getString("SystemTapView.32"), //$NON-NLS-1$
- Messages.getString("SystemTapView.33")); //$NON-NLS-1$
+ SystemTapUIErrorMessages err = new SystemTapUIErrorMessages
+ (Messages.getString("SystemTapView.FileIOErr"), //$NON-NLS-1$
+ Messages.getString("SystemTapView.FileIOErr"), //$NON-NLS-1$
+ Messages.getString("SystemTapView.FileIOErrMsg")); //$NON-NLS-1$
err.schedule();
e.printStackTrace();
}
}
-
+
+ /**
+ * Read the contents of a file
+ * @param absoluteFilePath : The absolute path of the file from which to read.
+ * @return : The contents of the file as a String.
+ */
public static String readFile(String absoluteFilePath) {
try {
@@ -110,33 +121,24 @@ public class Helper {
return null;
}
- private static BufferedWriter bw;
-
- public void setBufferedWriter(String absoluteFilePath) {
+ public static BufferedWriter setBufferedWriter(String absoluteFilePath) {
try {
File f = new File(absoluteFilePath);
f.delete();
f.createNewFile();
FileWriter fstream;
fstream = new FileWriter(absoluteFilePath, true);
- bw = new BufferedWriter(fstream);
+ return new BufferedWriter(fstream);
} catch (Exception e) {
- SystemTapUIErrorMessages err = new SystemTapUIErrorMessages(Messages.getString("SystemTapView.31"), //$NON-NLS-1$
- Messages.getString("SystemTapView.32"), //$NON-NLS-1$
- Messages.getString("SystemTapView.33")); //$NON-NLS-1$
+ SystemTapUIErrorMessages err = new SystemTapUIErrorMessages
+ (Messages.getString("SystemTapView.FileIOErr"), //$NON-NLS-1$
+ Messages.getString("SystemTapView.FileIOErr"), //$NON-NLS-1$
+ Messages.getString("SystemTapView.FileIOErrMsg")); //$NON-NLS-1$
err.schedule();
e.printStackTrace();
+ return null;
}
}
- public void appendToExistingFile(String content) throws IOException {
- bw.append(content);
- }
-
- public void closeBufferedWriter() throws IOException {
- bw.close();
- }
-
-
}
\ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/LaunchConfigurationConstants.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/LaunchConfigurationConstants.java
index 4df7831026..ef019fef50 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/LaunchConfigurationConstants.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/LaunchConfigurationConstants.java
@@ -48,13 +48,15 @@ public final class LaunchConfigurationConstants {
public static final String BUILD_PROJECT = PLUGIN_ID + ".BUILD_PROJECT"; //$NON-NLS-1$
public static final String COMMAND_LIST = PLUGIN_ID + ".COMMAND_LIST"; //$NON-NLS-1$
public static final String BINARY_ARGUMENTS = PLUGIN_ID + ".BINARY_ARGUMENTS"; //$NON-NLS-1$
- public static final String PARSER_CLASS = PLUGIN_ID + ".PARSER_CLASS";
+ public static final String PARSER_CLASS = PLUGIN_ID + ".PARSER_CLASS"; //$NON-NLS-1$
+ public static final String VIEW_CLASS = PLUGIN_ID + ".VIEW_CLASS"; //$NON-NLS-1$
+ public static final String SECONDARY_VIEW_ID = PLUGIN_ID + ".SECONDARY_VIEW_ID"; //$NON-NLS-1$
public static final String GENERATED_SCRIPT = PLUGIN_ID + ".GENERATED_SCRIPT"; //$NON-NLS-1$
public static final String NEED_TO_GENERATE = PLUGIN_ID + ".NEED_TO_GENERATE"; //$NON-NLS-1$
public static final String USE_COLOUR = PLUGIN_ID + ".USE_COLOUR"; //$NON-NLS-1$
-
+ public static final String COMMAND = ".COMMAND"; //$NON-NLS-1$
//Defaults
public static final boolean DEFAULT_COMMAND_VERBOSE = false;
@@ -88,5 +90,7 @@ public final class LaunchConfigurationConstants {
public static final boolean DEFAULT_USE_COLOUR = false;
public static final String DEFAULT_PARSER_CLASS = INVALID;
+ public static final String DEFAULT_VIEW_CLASS = INVALID;
+ public static final String DEFAULT_SECONDARY_VIEW_ID = INVALID;
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/PluginConstants.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/PluginConstants.java
index 4e30876503..d71c6e0e93 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/PluginConstants.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/PluginConstants.java
@@ -12,21 +12,27 @@ package org.eclipse.linuxtools.callgraph.core;
public final class PluginConstants {
- public static String DEFAULT_OUTPUT = ""; //$NON-NLS-1$
+ private static String PLUGIN_LOCATION = ""; //$NON-NLS-1$
public static final String CONFIGURATION_TYPE_ID = "org.eclipse.linuxtools.callgraph.launch.systemtapLaunch"; //$NON-NLS-1$
- public static final String PARSER_CLASS = "org.eclipse.linuxtools.callgraph.core.parser";
- public static final String PARSER_RESOURCE = "org.eclipse.linuxtools.callgraph.core";
- public static final String PARSER_NAME = "parser";
+ public static final String PARSER_CLASS = "org.eclipse.linuxtools.callgraph.core.parser"; //$NON-NLS-1$
+ public static final String PARSER_RESOURCE = "org.eclipse.linuxtools.callgraph.core"; //$NON-NLS-1$
+ public static final String PARSER_NAME = "parser"; //$NON-NLS-1$
+ public static final String VIEW_CLASS = "org.eclipse.linuxtools.callgraph.core.view"; //$NON-NLS-1$
+ public static final String VIEW_RESOURCE = "org.eclipse.ui"; //$NON-NLS-1$
+ public static final String VIEW_NAME = "views"; //$NON-NLS-1$
+ public static final String ATTR_CLASS = "class"; //$NON-NLS-1$
+ public static final String ATTR_REALTIME = "realtime"; //$NON-NLS-1$
+ public static final String VAL_TRUE = "true"; //$NON-NLS-1$
public static final String NEW_LINE = "\n"; //$NON-NLS-1$
-
public static final int MAX_ERRORS = 500; //Maximum number of errors to tolerate
-
- public static String PLUGIN_LOCATION = ""; //$NON-NLS-1$
public static int SYSTEMTAP_OPTIONS_TAB_HORIZONTAL_SPACING = 30;
+ public static String STAP_PATH = "stap"; //$NON-NLS-1$
- public static final String STAP_PATH = "stap"; //$NON-NLS-1$
- public static String STAP_GRAPH_DEFAULT_IO_PATH = ""; //$NON-NLS-1$
+ public static final String DEFAULT_VIEW_ID = "org.eclipse.linuxtools.callgraph.core.staptextview"; //$NON-NLS-1$
+ public static final String DEFAULT_PARSER_ID = "org.eclipse.linuxtools.callgraph.core.systemtaptextparser"; //$NON-NLS-1$
+ private static String DEFAULT_OUTPUT = ""; //$NON-NLS-1$
+ private static String STAP_GRAPH_DEFAULT_IO_PATH = ""; //$NON-NLS-1$
/**
* Sets the absolute path of the Plugin folder and updates
@@ -39,12 +45,22 @@ public final class PluginConstants {
}
public static String getPluginLocation() {
+ if (PLUGIN_LOCATION.length() < 1)
+ PluginConstants.setPluginLocation(CallgraphCorePlugin.getDefault().getPluginLocation());
+
return PLUGIN_LOCATION;
}
+
+ public static String getDefaultOutput() {
+ if (DEFAULT_OUTPUT.length() < 1)
+ DEFAULT_OUTPUT = CallgraphCorePlugin.getDefault().getStateLocation().toString()+"/"; //$NON-NLS-1$
+ return DEFAULT_OUTPUT;
+ }
- public static void setWorkspaceLocation(String loc){
- DEFAULT_OUTPUT = loc;
- STAP_GRAPH_DEFAULT_IO_PATH = DEFAULT_OUTPUT+"callgraph.out"; //$NON-NLS-1$
+ public static String getDefaultIOPath() {
+ if (STAP_GRAPH_DEFAULT_IO_PATH.length() < 1)
+ STAP_GRAPH_DEFAULT_IO_PATH = CallgraphCorePlugin.getDefault().getStateLocation().toString()+"/callgraph.out"; //$NON-NLS-1$
+ return STAP_GRAPH_DEFAULT_IO_PATH;
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/ShellOpener.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/ShellOpener.java
deleted file mode 100644
index 962c65ffa3..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/ShellOpener.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.callgraph.core;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.progress.UIJob;
-
-public class ShellOpener extends UIJob{
- private Shell shell;
-
- public ShellOpener(String name, Shell sh) {
- super(name);
- shell = sh;
- }
-
- @Override
- public IStatus runInUIThread(IProgressMonitor monitor) {
- shell.open();
- return Status.OK_STATUS;
- }
-
- public boolean isDisposed() {
- if (shell.isDisposed())
- return true;
- return false;
- }
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapCommandGenerator.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapCommandGenerator.java
index c0837dd118..24c7aaa87b 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapCommandGenerator.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapCommandGenerator.java
@@ -13,61 +13,36 @@ package org.eclipse.linuxtools.callgraph.core;
import java.util.ArrayList;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-
-
/**
- * This <code>Action</code> is used to run a SystemTap script that is currently open in the editor.
- * @author Ryan Morse
+ * Contains methods for generating a stap command
+ * @author chwang
+ *
*/
-public class SystemTapCommandGenerator extends Action implements IWorkbenchWindowActionDelegate {
-
- private boolean needsToSendCommand;
- private boolean needsArguments;
- protected String arguments;
- protected String scriptPath;
- protected String commands;
- protected boolean isGuru;
- private String binaryPath = null;
- protected IWorkbenchWindow actionWindow = null;
- private IAction act;
- private String executeCommand;
- private String binaryArguments;
-
-
- public SystemTapCommandGenerator() {
- super();
- }
-
- public void dispose() {
- actionWindow= null;
- }
-
- public void init(IWorkbenchWindow window) {
- actionWindow= window;
- }
-
- public void run(IAction action) {
- System.out.println("Not implemented"); //$NON-NLS-1$
- }
-
- public void run() {
- System.out.println("Calling run() without parameters not implemented"); //$NON-NLS-1$
- }
+public class SystemTapCommandGenerator {
- public String generateCommand(String scrPath, String binPath, String cmds, boolean needBinary, boolean needsArgs, String arg, String binArguments) {
+ private static boolean needsToSendCommand;
+ private static boolean needsArguments;
+ protected static String arguments;
+ protected static String scriptPath;
+ protected static String flags;
+ protected static boolean isGuru;
+ private static String binaryPath = null;
+ private static String binaryArguments;
+ private static String command;
+
+
+ public static String generateCommand(String scrPath, String binPath, String opts, boolean needBinary, boolean needsArgs, String arg, String binArguments,
+ String cmdTarget) {
needsToSendCommand = needBinary;
needsArguments = needsArgs;
binaryPath = binPath;
scriptPath = scrPath;
isGuru = false;
arguments = arg;
- commands = cmds;
+ flags = opts;
binaryArguments = binArguments;
+ command = cmdTarget;
+
String[] script = buildScript();
@@ -76,7 +51,6 @@ public class SystemTapCommandGenerator extends Action implements IWorkbenchWindo
cmd = cmd + script[i] + " "; //$NON-NLS-1$
cmd = cmd + script[script.length-1];
- this.executeCommand = cmd;
return cmd;
}
@@ -85,14 +59,14 @@ public class SystemTapCommandGenerator extends Action implements IWorkbenchWindo
* Parses the data created from generateCommand
* @return An array of strings to be joined and executed by the shell
*/
- protected String[] buildScript() {
+ protected static String[] buildScript() {
//TODO: 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 (commands.length() > 0){
- cmdList.add(commands);
+ if (flags.length() > 0){
+ cmdList.add(flags);
}
//Execute a binary
@@ -100,7 +74,7 @@ public class SystemTapCommandGenerator extends Action implements IWorkbenchWindo
if (binaryArguments.length() < 1){
cmdList.add("-c '" + binaryPath + "'"); //$NON-NLS-1$ //$NON-NLS-2$
}else{
- cmdList.add("-c '" + binaryPath + " " + binaryArguments +"'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ cmdList.add("-c \"" + binaryPath + " " + binaryArguments +"\""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
@@ -114,7 +88,7 @@ public class SystemTapCommandGenerator extends Action implements IWorkbenchWindo
script[script.length-1] = scriptPath;
}
- script[0] = PluginConstants.STAP_PATH; //$NON-NLS-1$
+ script[0] = command; //$NON-NLS-1$
for(int i=0; i< cmdList.size(); i++) {
if (cmdList.get(i) != null)
@@ -125,112 +99,4 @@ public class SystemTapCommandGenerator extends Action implements IWorkbenchWindo
}
-
- public void selectionChanged(IAction act, ISelection select) {
- this.act = act;
- setEnablement(false);
- //buildEnablementChecks();
- }
-
- private void setEnablement(boolean enabled) {
- act.setEnabled(enabled);
- }
-
- public String getExecuteCommand(){
- return this.executeCommand;
- }
-
-
- /**
- * Convenience method to return the current window
- */
- public IWorkbenchWindow getWindow() {
- return actionWindow;
- }
-
}
-
-
-/**
- * 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 (ed == null) return true;
-// if(isValidFile(ed)){
-//
-// String ret = getFilePath();
-//
-// if(isValidDirectory(ret))
-// return true;
-// }
-// return true;
-//}
-
-//private boolean isValidFile(IEditorPart editor) {
-// if(null == editor) {
-// String msg = MessageFormat.format("No script file is selected", (Object[])null);
-// //LogManager.logInfo("Initializing", MessageDialog.class);
-// MessageDialog.openWarning(fWindow.getShell(), "Problem running SystemTap script - invalid script", msg);
-// //LogManager.logInfo("Disposing", MessageDialog.class);
-// return false;
-// }
-//
-// if(editor.isDirty())
-// editor.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;
-}*/
-
-//protected Subscription getSubscription()
-//{
-// return subscription;
-//}
-//
-
-//private void buildEnablementChecks() {
-//if(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor() instanceof STPEditor)
-// setEnablement(true);
-//}
-//
-
-//
-//protected String[] getEnvironmentVariables() {
-// return EnvironmentVariablesPreferencePage.getEnvironmentVariables();
-//}
-
-//
-//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;
-//}
-//
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapErrorHandler.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapErrorHandler.java
index 5121e3d83b..cf54203699 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapErrorHandler.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapErrorHandler.java
@@ -4,7 +4,7 @@
* 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
*******************************************************************************/
@@ -12,315 +12,189 @@
package org.eclipse.linuxtools.callgraph.core;
import java.io.BufferedReader;
-import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
-import java.io.FileWriter;
import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
/**
- * Helper class parses the given string for recognizable error messages
+ * Helper class parses the given string for recognizable error messages
*
*/
public class SystemTapErrorHandler {
-
- public static final String FILE_PROP = "errors.prop"; //$NON-NLS-1$
- public static final String FILE_ERROR_LOG = "Error.log"; //$NON-NLS-1$
- public static final int MAX_LOG_SIZE = 50000;
- private boolean errorRecognized;
- private String errorMessage = ""; //$NON-NLS-1$
- private StringBuilder logContents;
- private boolean mismatchedProbePoints;
- ArrayList<String> functions = new ArrayList<String>();
-
- /**
- * Delete the log file and create an empty one
- */
- public static void delete(){
- File log = new File(PluginConstants.DEFAULT_OUTPUT + FILE_ERROR_LOG); //$NON-NLS-1$
- log.delete();
- try {
- log.createNewFile();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
-
- public SystemTapErrorHandler() {
- mismatchedProbePoints = false;
- errorRecognized = false;
- if (errorMessage.length() < 1) {
- errorMessage =
- Messages.getString("SystemTapErrorHandler.ErrorMessage") + //$NON-NLS-1$
- Messages.getString("SystemTapErrorHandler.ErrorMessage1"); //$NON-NLS-1$
- }
-
- logContents = new StringBuilder(); //$NON-NLS-1$
- }
-
-
- /**
- * Search given string for recognizable error messages. Can append the contents of
- * the string to the error log if writeToLog() or finishHandling() are called.
- * A call to finishHandling() will also open a popup window with user-friendly messages
- * corresponding to the recognizable errors.
- *
- * @param doc
- */
- public void handle (IProgressMonitor m, String errors){
- String[] blah = errors.split("\n"); //$NON-NLS-1$
-
- //READ FROM THE PROP FILE AND DETERMINE TYPE OF ERROR
- File file = new File(PluginConstants.PLUGIN_LOCATION+FILE_PROP);
- try {
- BufferedReader buff = new BufferedReader (new FileReader(file));
- String line;
- int index;
-
- for (String message : blah) {
- boolean firstLine = true; //Keep the error about mismatched probe points first
- buff = new BufferedReader (new FileReader(file));
- while ((line = buff.readLine()) != null){
- if (m != null && m.isCanceled())
- return;
- index = line.indexOf('=');
- String matchString = line.substring(0, index);
- Pattern pat = Pattern.compile(matchString, Pattern.DOTALL);
- Matcher matcher = pat.matcher(message);
-
-
- if (matcher.matches()) {
- if (!isErrorRecognized()) {
- errorMessage+=Messages.getString("SystemTapErrorHandler.ErrorMessage2"); //$NON-NLS-1$
- setErrorRecognized(true);
- }
-
- //TODO: Rough hack, very slow
- if (!errorMessage.contains(line.substring(index+1))) {
- errorMessage+=line.substring(index+1)
- + PluginConstants.NEW_LINE;
- }
-
- if (firstLine) {
- findFunctions(m, message, pat);
- mismatchedProbePoints = true;
- }
- break;
- }
- firstLine = false;
- }
- buff.close();
- }
-
- logContents.append(errors);
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- }
-
-
- public String handle (IProgressMonitor m, FileReader f) throws IOException {
- BufferedReader br = new BufferedReader (f);
-
- String line;
- StringBuilder builder = new StringBuilder();
- int counter = 0;
- while ( (line = br.readLine()) != null) {
- counter++;
- builder.append(line);
- builder.append("\n"); //$NON-NLS-1$
- if (m != null && m.isCanceled())
- return "";
- if (counter == 300) {
- handle(m, builder.toString());
- builder = new StringBuilder();
- counter = 0;
- }
- }
- handle(m, builder.toString());
- return errorMessage;
- }
-
- /**
- * Run this method when there are no more error messages to handle.
- * Creates the error pop-up message and writes to log.
- *
- */
- public void finishHandling(IProgressMonitor m, int numberOfErrors) {
- if (!isErrorRecognized()) {
- errorMessage+=Messages.getString("SystemTapErrorHandler.4") + //$NON-NLS-1$
- Messages.getString("SystemTapErrorHandler.5"); //$NON-NLS-1$
- }
-
- writeToLog();
-
- if (mismatchedProbePoints){
- if (numberOfErrors > PluginConstants.MAX_ERRORS) {
- errorMessage = PluginConstants.NEW_LINE
- + Messages.getString("SystemTapErrorHandler.TooManyErrors1") + numberOfErrors +Messages.getString("SystemTapErrorHandler.TooManyErrors2") + //$NON-NLS-1$ //$NON-NLS-2$
- Messages.getString("SystemTapErrorHandler.TooManyErrors3") + //$NON-NLS-1$
- Messages.getString("SystemTapErrorHandler.TooManyErrors4"); //$NON-NLS-1$
-// SystemTapUIErrorMessages mes = new SystemTapUIErrorMessages(
-// Messages.getString("SystemTapErrorHandler.ErrorMessageName"), //$NON-NLS-1$
-// Messages.getString("SystemTapErrorHandler.ErrorMessageTitle"), //$NON-NLS-1$
-// errorMessage); //$NON-NLS-1$ //$NON-NLS-2$
-// mes.schedule();
- m.setCanceled(true);
- return;
- }
-
-
- StringBuffer resultFileContent = new StringBuffer();
- String fileLocation = PluginConstants.DEFAULT_OUTPUT + "callgraphGen.stp"; //$NON-NLS-1$
- String line;
- boolean skip = false;
- File file = new File(fileLocation);
- try {
- BufferedReader buff = new BufferedReader(new FileReader(file));
- while ((line = buff.readLine()) != null){
- if (m != null && m.isCanceled())
- return;
- skip = false;
- for (String func : functions){
- if (line.contains("function(\"" + func + "\").call")){ //$NON-NLS-1$ //$NON-NLS-2$
- skip = true;
- break;
- }
- }
-
- if (!skip && !line.equals("\n")){ //$NON-NLS-1$
- resultFileContent.append(line);
- resultFileContent.append("\n"); //$NON-NLS-1$
- }
- }
-
- buff.close();
-
- BufferedWriter wbuff= new BufferedWriter(new FileWriter(file));
- wbuff.write(resultFileContent.toString());
- wbuff.close();
-
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- }else{
-// SystemTapUIErrorMessages mes = new SystemTapUIErrorMessages(
-// Messages.getString("SystemTapErrorHandler.ErrorMessageName"), //$NON-NLS-1$
-// Messages.getString("SystemTapErrorHandler.ErrorMessageTitle"), //$NON-NLS-1$
-// errorMessage); //$NON-NLS-1$ //$NON-NLS-2$
-// mes.schedule();
- }
-
-
- }
-
-
- /**
- * Writes the contents of logContents to the error log, along with date and time.
- */
- public void writeToLog() {
- File errorLog = new File(PluginConstants.DEFAULT_OUTPUT + "Error.log"); //$NON-NLS-1$
-
- try {
- //CREATE THE ERROR LOG IF IT DOES NOT EXIST
- //CLEAR THE ERROR LOG AFTER A FIXED SIZE(BYTES)
- if (!errorLog.exists()
- || errorLog.length() > MAX_LOG_SIZE) {
- errorLog.delete();
- errorLog.createNewFile();
- }
-
- Calendar cal = Calendar.getInstance(TimeZone.getDefault());
- int year = cal.get(Calendar.YEAR);
- int month = cal.get(Calendar.MONTH);
- int day = cal.get(Calendar.DAY_OF_MONTH);
- int hour = cal.get(Calendar.HOUR_OF_DAY);
- int minute = cal.get(Calendar.MINUTE);
- int second = cal.get(Calendar.SECOND);
-
- //APPEND THE ERROR TO THE LOG
- Helper
- .appendToFile(errorLog.getAbsolutePath(),
- Messages.getString("SystemTapErrorHandler.ErrorLogDashes") //$NON-NLS-1$
- + PluginConstants.NEW_LINE
- + day + "/" + month //$NON-NLS-1$
- + "/" + year + " - " + hour + ":" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- + minute + ":" + second //$NON-NLS-1$
- + PluginConstants.NEW_LINE + logContents
- + PluginConstants.NEW_LINE + PluginConstants.NEW_LINE);
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- logContents = new StringBuilder(); //$NON-NLS-1$
- }
-
- /**
- * Returns true if an error matches one of the regex's in error.prop
- * @return
- */
- public boolean isErrorRecognized() {
- return errorRecognized;
- }
-
-
- /**
- * Convenience method to change the error recognition value.
- * @param errorsRecognized
- */
- private void setErrorRecognized(boolean errorsRecognized) {
- errorRecognized = errorsRecognized;
- }
-
-
- public boolean hasMismatchedProbePoints() {
- return mismatchedProbePoints;
- }
-
-
- public void setMismatchedProbePoints(boolean mismatchedProbePoints) {
- this.mismatchedProbePoints = mismatchedProbePoints;
- }
-
-
- public void findFunctions(IProgressMonitor m, String message, Pattern pat) {
- String[] list = message.split("\n"); //$NON-NLS-1$
- String result;
- for (String s : list) {
- if (m.isCanceled())
- return;
- if (pat.matcher(s).matches()) {
- int lastQuote = s.lastIndexOf('"');
- if (lastQuote < 0)
- return;
- int secondLastQuote = s.lastIndexOf('"', lastQuote - 1);
- if (secondLastQuote < 0)
- return;
- result = s.substring(secondLastQuote+1, lastQuote);
- if (!functions.contains(result))
- functions.add(result);
- }
- }
- }
-
-
- public ArrayList<String> getFunctions() {
- return functions;
- }
-}
+ public static final String FILE_PROP = "errors.prop"; //$NON-NLS-1$
+ private final int LINE_LIMIT = 300;
+ private boolean errorRecognized;
+ private StringBuilder errorMessage = new StringBuilder(""); //$NON-NLS-1$
+ private StringBuilder logContents;
+
+ public SystemTapErrorHandler() {
+ errorRecognized = false;
+ errorMessage.append(Messages
+ .getString("SystemTapErrorHandler.ErrorMessage") + //$NON-NLS-1$
+ Messages.getString("SystemTapErrorHandler.ErrorMessage1")); //$NON-NLS-1$
+
+ logContents = new StringBuilder(); //$NON-NLS-1$
+ }
+
+ /**
+ * Search given string for recognizable error messages. Can append the
+ * contents of the string to the error log if writeToLog() or
+ * finishHandling() are called.
+ * @param doc
+ */
+ public void handle(IProgressMonitor m, String errors) {
+ String[] errorsList = errors.split("\n"); //$NON-NLS-1$
+
+ // READ FROM THE PROP FILE AND DETERMINE TYPE OF ERROR
+ File file = new File(PluginConstants.getPluginLocation() + FILE_PROP);
+ try {
+ BufferedReader buff = new BufferedReader(new FileReader(file));
+ String line;
+
+ for (String message : errorsList) {
+ buff = new BufferedReader(new FileReader(file));
+ while ((line = buff.readLine()) != null) {
+ if (m != null && m.isCanceled())
+ return;
+ int index = line.indexOf('=');
+ Pattern pat = Pattern.compile(line.substring(0, index),Pattern.DOTALL);
+ Matcher matcher = pat.matcher(message);
+
+ if (matcher.matches()) {
+ if (!isErrorRecognized()) {
+ //First error
+ errorMessage.append(Messages.getString("SystemTapErrorHandler.ErrorMessage2")); //$NON-NLS-1$
+ setErrorRecognized(true);
+ }
+ String errorFound = line.substring(index+1);
+
+ if (!errorMessage.toString().contains(errorFound)) {
+ errorMessage.append(errorFound + PluginConstants.NEW_LINE);
+ }
+ break;
+ }
+ }
+ buff.close();
+ }
+
+ logContents.append(errors);
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ /**
+ * Append to the log contents
+ */
+ public void appendToLog (String header){
+ logContents.append(header);
+ }
+
+ /**
+ * Handle the error.
+ *
+ * @param m
+ * @param f Temporary error file
+ * @throws IOException
+ */
+ public void handle(IProgressMonitor m, FileReader f) throws IOException {
+ BufferedReader br = new BufferedReader(f);
+
+ String line;
+ StringBuilder builder = new StringBuilder();
+ int counter = 0;
+ while ((line = br.readLine()) != null) {
+ counter++;
+ builder.append(line + "\n"); //$NON-NLS-1$
+ if (m != null && m.isCanceled())
+ return;
+ if (counter == LINE_LIMIT) {
+ handle(m, builder.toString());
+ builder = new StringBuilder();
+ counter = 0;
+ }
+ }
+ handle(m, builder.toString());
+ }
+
+ /**
+ * Run this method when there are no more error messages to handle. Creates
+ * the error pop-up message and writes to log.Currently relaunch only works
+ * for the callgraph script.
+ */
+ public void finishHandling(IProgressMonitor m, String scriptPath) {
+ if (!isErrorRecognized()) {
+ errorMessage.append(Messages.getString("SystemTapErrorHandler.NoErrRecognized") + //$NON-NLS-1$
+ Messages.getString("SystemTapErrorHandler.NoErrRecognizedMsg")); //$NON-NLS-1$
+ }
+
+ writeToLog();
+ }
+
+ /**
+ * Writes the contents of logContents to the error log, along with date and
+ * time.
+ */
+ public void writeToLog() {
+ IStatus status = new Status(IStatus.ERROR,CallgraphCorePlugin.PLUGIN_ID,logContents.toString());
+ CallgraphCorePlugin.getDefault().getLog().log(status);
+
+ logContents = new StringBuilder(); //$NON-NLS-1$
+ }
+
+ /**
+ * Delete the log at File and replace it with a new (empty) file
+ * @param log The File object for the log file to delete and refresh
+ */
+ public static void deleteLog(File log) {
+ log.delete();
+ try {
+ log.createNewFile();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * @return Returns true if an error matches one of the regex's in error.prop
+ * and false otherwise.
+ */
+ public boolean isErrorRecognized() {
+ return errorRecognized;
+ }
+
+ /**
+ * Convenience method to change the error recognition value.
+ * @param errorsRecognized True if the handler recognizes some error
+ * and false otherwise.
+ */
+ private void setErrorRecognized(boolean errorsRecognized) {
+ errorRecognized = errorsRecognized;
+ }
+
+ /**
+ * @return The error message string
+ */
+ public String getErrorMessage(){
+ return errorMessage.toString();
+ }
+
+ /**
+ * @return The string contents of what will be printed to the log
+ */
+ public String getLogContents(){
+ return logContents.toString();
+ }
+
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapParser.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapParser.java
index 84307e15d2..c04270fb20 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapParser.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapParser.java
@@ -10,64 +10,101 @@
*******************************************************************************/
package org.eclipse.linuxtools.callgraph.core;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
public abstract class SystemTapParser extends Job {
protected IProgressMonitor monitor;
- protected String filePath;
+ protected String sourcePath;
+ protected String viewID;
+ protected SystemTapView view;
+ protected boolean realTime = false;
+ protected Object data;
+ protected Object internalData;
+ private String secondaryID = ""; //$NON-NLS-1$
+
+ public boolean done;
public SystemTapParser() {
- super("New_Job");
- this.filePath = PluginConstants.STAP_GRAPH_DEFAULT_IO_PATH;
+ super("Parsing data"); //$NON-NLS-1$
+ this.sourcePath = PluginConstants.getDefaultIOPath();
+ this.viewID = null;
+ initialize();
+ done = false;
+
+ //PURELY FOR TESTING
+ if (monitor == null){
+ monitor = new NullProgressMonitor();
+ }
+ }
+
+
+ public SystemTapParser(String name, String filePath) {
+ super(name);
+ // BY DEFAULT READ/WRITE FROM HERE
+ if (filePath != null)
+ this.sourcePath = filePath;
+ else
+ this.sourcePath = PluginConstants.getDefaultIOPath();
+ this.viewID = null;
initialize();
}
+
/**
- * Initialize will be called in the constructors for this class.
- * Use this method to initialize variables.
+ * Initialize will be called in the constructors for this class. Use this
+ * method to initialize variables.
*/
protected abstract void initialize();
-
+
/**
* Implement this method to execute parsing. The return from
* executeParsing() will be the return value of the run command.
*
- * SystemTapParser will call executeParsing() within its run method.
- * (i.e. will execute in a separate, non-UI thread)
+ * SystemTapParser will call executeParsing() within its run method. (i.e.
+ * will execute in a separate, non-UI thread)
+ *
* @return
*/
- public abstract IStatus executeParsing();
-
- public abstract void saveData(String filePath);
-
+ public abstract IStatus nonRealTimeParsing();
+
+
+ /**
+ * Implement this method if your parser is to execute in realtime. This method
+ * will be called as part of a while loop in a separate Job. Use the setInternalData
+ * method to initialize some data object for use in realTimeParsing. The default
+ * setInternalMethod method will set internalData to a BufferedReader
+ * <br> <br>
+ * After the isDone flag is set to true, the realTimeParsing() method will
+ * be run one more time to catch any stragglers.
+ */
+ public abstract IStatus realTimeParsing();
- public SystemTapParser(String name, String filePath) {
- super(name);
- //BY DEFAULT READ/WRITE FROM HERE
- if (filePath != null)
- this.filePath = filePath;
- else
- this.filePath = PluginConstants.STAP_GRAPH_DEFAULT_IO_PATH;
- initialize();
- }
/**
* Cleans names of form 'name").return', returning just the name
+ *
* @param name
*/
protected String cleanFunctionName(String name) {
return name.split("\"")[0]; //$NON-NLS-1$
}
-
+
/**
* Checks for quotations and brackets in the function name
+ *
* @param name
*/
protected boolean isFunctionNameClean(String name) {
@@ -75,95 +112,271 @@ public abstract class SystemTapParser extends Job {
return false;
return true;
}
-
+
/**
- * Creates a popup error dialog in a separate UI thread.
- * Dialog title is 'Unexpected symbol,' name is 'ParseError' and body
- * is the specified message.
+ * Creates a popup error dialog in a separate UI thread. Dialog title is
+ * 'Unexpected symbol,' name is 'ParseError' and body is the specified
+ * message.
+ *
* @param message
*/
protected void parsingError(String message) {
SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
- Messages.getString("SystemTapParser.0"), Messages.getString("SystemTapParser.1"), message); //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.getString("SystemTapParser.ParseErr"), //$NON-NLS-1$
+ Messages.getString("SystemTapParser.ErrSymbol"), //$NON-NLS-1$
+ message);
mess.schedule();
}
-
-
+
+ /**
+ * Load the specified viewID by creating a StapUIJob. Does not return until the StapUIJob has.
+ * Returns true if the makeView was successful, false otherwise.
+ */
+ protected boolean makeView() {
+ // Create a UIJob to handle the rest
+ if (viewID != null && viewID.length() > 0) {
+ try {
+ StapUIJob uijob = new StapUIJob(Messages
+ .getString("StapGraphParser.JobName"), this, viewID); //$NON-NLS-1$
+ uijob.schedule();
+ uijob.join();
+ view = uijob.getViewer();
+ return true;
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ return false;
+ }
@Override
protected IStatus run(IProgressMonitor monitor) {
+ // Generate real-time job
+ IStatus returnStatus = Status.CANCEL_STATUS;
this.monitor = monitor;
- return executeParsing();
+ if (this.monitor == null) {
+ this.monitor = new NullProgressMonitor();
+ }
+ makeView();
+ if (realTime) {
+ try {
+ setInternalData();
+ while (!done){
+ returnStatus = realTimeParsing();
+ if (monitor.isCanceled() || returnStatus == Status.CANCEL_STATUS) {
+ done = true;
+ return Status.CANCEL_STATUS;
+ }
+
+ Thread.sleep(500);
+ }
+ if (!monitor.isCanceled()) returnStatus = realTimeParsing();
+ done = true;
+ return returnStatus;
+ } catch (Exception e) {
+ SystemTapUIErrorMessages m = new SystemTapUIErrorMessages(
+ Messages.getString("SystemTapParser.InternalData"), //$NON-NLS-1$
+ Messages.getString("SystemTapParser.FailedToSetData"), //$NON-NLS-1$
+ Messages.getString("SystemTapParser.FailedToSetDataMessage")); //$NON-NLS-1$
+ m.schedule();
+ return Status.CANCEL_STATUS;
+ }
+ } else {
+ returnStatus = nonRealTimeParsing();
+ if (!returnStatus.isOK()){
+ return returnStatus;
+ }
+
+ setData(this);
+ return returnStatus;
+ }
+
}
-
+
public void printArrayListMap(HashMap<Integer, ArrayList<Integer>> blah) {
int amt = 0;
for (int a : blah.keySet()) {
amt++;
MP.print(a + " ::> "); //$NON-NLS-1$
for (int c : blah.get(a)) {
- System.out.print(c + " "); //$NON-NLS-1$
+ System.out.print(c + " "); //$NON-NLS-1$
}
MP.println(""); //$NON-NLS-1$
}
}
-
+
@SuppressWarnings("unchecked")
public void printMap(Map blah) {
int amt = 0;
for (Object a : blah.keySet()) {
amt++;
- MP.println(a + " ::> "+blah.get(a)); //$NON-NLS-1$
+ MP.println(a + " ::> " + blah.get(a)); //$NON-NLS-1$
}
}
-
-
+
/**
- * Returns the monitor
+ * For easier JUnit testing only. Allows public access to run method without
+ * scheduling an extra job.
+ *
+ * @param m
* @return
*/
- public IProgressMonitor getMonitor() {
- return monitor;
+ public IStatus testRun(IProgressMonitor m, boolean realTime) {
+ try {
+ internalData = new BufferedReader(new FileReader(new File(sourcePath)));
+ if (realTime)
+ return realTimeParsing();
+ else
+ return nonRealTimeParsing();
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ }
+ return Status.CANCEL_STATUS;
+ }
+
+
+ public void launchFileErrorDialog() {
+ SystemTapUIErrorMessages err = new SystemTapUIErrorMessages(Messages
+ .getString("SystemTapParser.InvalidFile"), //$NON-NLS-1$
+ Messages.getString("SystemTapParser.InvalidFile"), //$NON-NLS-1$
+ Messages.getString("SystemTapParser.InvalidFileMsg1") + sourcePath + //$NON-NLS-1$
+ Messages.getString("SystemTapParser.InvalidFileMsg2")); //$NON-NLS-1$
+ err.schedule();
}
/**
- * For easier JUnit testing only. Allows public access to run method without scheduling an extra job.
- *
- * @param m
- * @return
+ * @return the Data object
*/
- public IStatus testRun(IProgressMonitor m) {
- return run(m);
+ public Object getData() {
+ return data;
}
-
- public void launchFileDialogError(){
- SystemTapUIErrorMessages err = new SystemTapUIErrorMessages(
- Messages.getString("SystemTapParser.2"), //$NON-NLS-1$
- Messages.getString("SystemTapParser.3"), //$NON-NLS-1$
- Messages.getString("SystemTapParser.4")+filePath+ //$NON-NLS-1$
- Messages.getString("SystemTapParser.5")); //$NON-NLS-1$
- err.schedule();
+ /**
+ * @return the internal data object
+ */
+ public Object getInternalData(){
+ return internalData;
}
+
/**
- * Sets the file to read from
- * @param filePath
+ * Generic method for setting the internalData object. This will be called
+ * by a real-time-parser immediately before its main polling loop. By default,
+ * this method will attempt to create a bufferedReader around File(filePath)
+ *
+ * @throws Exception
*/
- public void setFile(String filePath) {
- this.filePath = filePath;
+ protected void setInternalData() throws Exception {
+ File file = new File(sourcePath);
+ internalData = new BufferedReader(new FileReader(file));
}
+
+ /**
+ * Returns the monitor
+ *
+ * @return
+ */
+ public IProgressMonitor getMonitor() {
+ return monitor;
+ }
+
/**
* Gets the file to read from
+ *
* @return
*/
public String getFile() {
- return filePath;
+ return sourcePath;
+ }
+
+ /**
+ * Sets the file to read from
+ *
+ * @param source
+ */
+ public void setSourcePath(String source) {
+ this.sourcePath = source;
+ }
+
+ /**
+ * Will terminate the parser at the next opportunity (~once every 0.5s)s
+ *
+ * @param val
+ */
+ public void setDone(boolean val) {
+ done = val;
+ }
+
+ public void setMonitor(IProgressMonitor m) {
+ this.monitor = m;
+ }
+
+ /**
+ * Set whether or not this parser runs in real time. If viewID has already
+ * been set, this will also attempt to open the view.
+ *
+ * @throws InterruptedException
+ */
+ public void setRealTime(boolean val) throws InterruptedException {
+ realTime = val;
+
+ }
+
+ /**
+ * Set the viewID to use for this parser -- see the callgraph.core view
+ * extension point. If realTime is set to true, this will also attempt to
+ * open the view.
+ *
+ * @throws InterruptedException
+ */
+ public void setViewID(String value) throws InterruptedException {
+ viewID = value;
+ }
+
+ /**
+ * Called at the end of a non-realtime run.
+ * Feel free to override this method if using non-realtime functions.
+ * The setData method will be called after executeParsing() is run.
+ * The getData() method will be used by the SystemTapView to get the
+ * data associated with this parser.
+ * <br><br>
+ * Alternatively, you can cast the parser within SystemTapView to your
+ * own parser class and access its data structures that way.
+ */
+ public void setData(Object obj) {
+ data = obj;
}
+ /**
+ * Sends a message to cancel the job. Job may not terminate immediately.
+ */
+ public void cancelJob() {
+ done = true;
+ }
+
+ public boolean isDone() {
+ return done;
+ }
+
+ public void setKillButtonEnabled(boolean val) {
+ if (view != null)
+ view.setKillButtonEnabled(val);
+ }
+
+ public boolean isRealTime() {
+ return realTime;
+ }
+
+ public void setSecondaryID(String secondaryID) {
+ this.secondaryID = secondaryID;
+ }
+
+ public String getSecondaryID() {
+ return secondaryID;
+ }
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapTextParser.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapTextParser.java
new file mode 100644
index 0000000000..6c533f9b11
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/SystemTapTextParser.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.callgraph.core;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+
+public class SystemTapTextParser extends SystemTapParser{
+
+ protected String contents;
+
+ @Override
+ public IStatus nonRealTimeParsing() {
+ contents = Helper.readFile(sourcePath);
+ System.out.println(contents);
+ return Status.OK_STATUS;
+ }
+
+ @Override
+ protected void initialize() {
+ }
+
+ @Override
+ public IStatus realTimeParsing() {
+ if (!(internalData instanceof BufferedReader))
+ return Status.CANCEL_STATUS;
+
+ BufferedReader buff = (BufferedReader) internalData;
+ StringBuffer text = new StringBuffer();
+
+ String line;
+ try {
+ while ((line = buff.readLine()) != null) {
+ if (monitor.isCanceled())
+ return Status.CANCEL_STATUS;
+ text.append(line + "\n"); //$NON-NLS-1$
+ }
+ setData(text.toString());
+ if (text.length() > 0)
+ System.out.println(text.toString());
+ view.update();
+ } catch (IOException e) {
+ e.printStackTrace();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+
+ return Status.OK_STATUS;
+ }
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/messages.properties b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/messages.properties
index 6531ba7c47..05d4338715 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/messages.properties
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/messages.properties
@@ -1,9 +1,3 @@
-FileFinderOpener.FileNotFound1=File not found
-FileFinderOpener.FileNotFound2=Could not find file to open:\n\n
-FileFinderOpener.MultFilesDialogM1=Multiple files found which define a function '
-FileFinderOpener.MultFilesDialogM2='.
-FileFinderOpener.MultFilesDialogM3=Please select a file or files to open
-FileFinderOpener.MultipleFilesDialog=Multiple files found
###############################################################################
# Copyright (c) 2009 Red Hat, Inc.
# All rights reserved. This program and the accompanying materials
@@ -14,25 +8,31 @@ FileFinderOpener.MultipleFilesDialog=Multiple files found
# Contributors:
# Red Hat - initial API and implementation
###############################################################################
-FileFinderOpener.FileNotFound=File not found
-SystemTapErrorHandler.4=No recognizable errors detected.
-SystemTapErrorHandler.5=Please consult error log for more information.
-SystemTapErrorHandler.ErrorLogDashes=-----------------------
-SystemTapErrorHandler.ErrorMessage=\n------------ERROR-----------\nOne or more errors were encountered and logged in the error log.
+FileFinderOpener.MultFilesDialogM1=Multiple files found which define a function '
+FileFinderOpener.MultFilesDialogM2='.
+FileFinderOpener.MultFilesDialogM3=Please select a file or files to open
+FileFinderOpener.MultipleFilesDialog=Multiple files found
+SystemTapErrorHandler.NoErrRecognized=No recognizable errors detected.
+SystemTapErrorHandler.NoErrRecognizedMsg=Please consult error log for more information.
+SystemTapErrorHandler.ErrorMessage=One or more errors were encountered and logged in the error log.
SystemTapErrorHandler.ErrorMessage1=(Errors -> Open log from the SystemTap View menu).\n
-SystemTapErrorHandler.ErrorMessage2=Possible causes:\n
-SystemTapErrorHandler.ErrorMessageName=Error
-SystemTapErrorHandler.ErrorMessageTitle=Error
-SystemTapErrorHandler.TooManyErrors1=***WARNING*** Cataclysmic failure. Detected
-SystemTapErrorHandler.TooManyErrors2=\ possible faulty probes. Not attempting relaunch.
-SystemTapErrorHandler.TooManyErrors3=Try probing all available files instead - this will also be faster
-SystemTapErrorHandler.TooManyErrors4=as it does not require Eclipse to search for functions.
-SystemTapParser.0=ParseError
-SystemTapParser.1=Unexpected symbol
-SystemTapParser.2=Invalid File Error
-SystemTapParser.3=File Specified Invalid
-SystemTapParser.4=The file :
-SystemTapParser.5=\ could not be rendered. Please make sure the file exists and is valid.
-SystemTapView.31=IO error
-SystemTapView.32=File access error
-SystemTapView.33=Could not access the selected file. This could be because due to a permissions error.
+SystemTapErrorHandler.ErrorMessage2=Possible causes:\n\n
+SystemTapParser.ParseErr=ParseError
+SystemTapParser.ErrSymbol=Unexpected symbol
+SystemTapParser.FailedToSetData=Failed to set data
+SystemTapParser.FailedToSetDataMessage=SystemTapParser failed to set internal data.
+SystemTapParser.InternalData=InternalData
+SystemTapParser.InvalidFile=Invalid File Error
+SystemTapParser.InvalidFileMsg1=The file :
+SystemTapParser.InvalidFileMsg2=\ could not be rendered. Please make sure the file exists and is valid.
+SystemTapView.Help=Help
+SystemTapView.FileIOErr=File Access Error
+SystemTapView.FileIOErrMsg=Could not access the selected file. This could be because due to a permissions error.
+SystemTapView.1=\n
+SystemTapView.StopScript=Stop Script
+SystemTapView.Version=Version
+SystemTapView.StapVersion=Systemtap Version
+SystemTapView.AboutMenu=About
+SystemTapView.FileMenu=File
+SystemTapView.SaveMenu=Save
+StapGraphParser.JobName=GraphUIJob instance \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/ChangeLog b/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/ChangeLog
index 1ee9db69f4..e467693530 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/ChangeLog
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/ChangeLog
@@ -3,6 +3,10 @@
* src/org/eclipse/linuxtools/callgraph/launch/tests/SystemTapErrorHandlerTest.java (testUprobesError):
Update message to reflect new error message.
+2009-12-22 Roland Grunberg <rgrunber@redhat.com>
+
+ * META-INF/MANIFEST.MF: Make necessary changes to switch from JUnit 3 to JUnit 4.
+
2009-12-16 rgrunber <rgrunber@redhat.com>
* src/org/eclipse/linuxtools/callgraph/launch/tests/SystemTapErrorHandlerTest.java:
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/META-INF/MANIFEST.MF
index ccf6227d77..d02e29639f 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/META-INF/MANIFEST.MF
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/META-INF/MANIFEST.MF
@@ -7,7 +7,7 @@ Bundle-Activator: org.eclipse.linuxtools.callgraph.launch.tests.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.debug.ui;bundle-version="3.4.1",
- org.junit;bundle-version="[0.0.0,4.0.0)"
+ org.junit;bundle-version="4.7.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.eclipse.cdt.core.model,
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/resources/.cproject b/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/resources/.cproject
deleted file mode 100644
index c0cd73664f..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/resources/.cproject
+++ /dev/null
@@ -1,936 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?fileVersion 4.0.0?>
-
-<cproject>
-<storageModule moduleId="org.eclipse.cdt.core.settings">
-<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.1770452088">
-<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.1770452088" moduleId="org.eclipse.cdt.core.settings" name="Debug">
-<externalSettings/>
-<extensions>
-<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
-<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-</extensions>
-</storageModule>
-<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-<configuration artifactName="eag" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.1770452088" name="Debug" parent="cdt.managedbuild.config.gnu.exe.debug">
-<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.1770452088." name="/" resourcePath="">
-<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.1442429891" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
-<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.535947733" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
-<builder buildPath="${workspace_loc:/eag/Debug}" id="cdt.managedbuild.target.gnu.builder.exe.debug.1661255968" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
-<tool id="cdt.managedbuild.tool.gnu.archiver.base.225690961" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
-<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.374528198" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
-<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.886738070" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
-<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.1663737825" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
-<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.28775023" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
-</tool>
-<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1832776764" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
-<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.534412024" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/>
-<option id="gnu.c.compiler.exe.debug.option.debugging.level.1449229527" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
-<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1481141764" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
-</tool>
-<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.739464353" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug"/>
-<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.843559057" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
-<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1416890963" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
-<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
-<additionalInput kind="additionalinput" paths="$(LIBS)"/>
-</inputType>
-</tool>
-<tool id="cdt.managedbuild.tool.gnu.assembler.exe.debug.1550114770" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug">
-<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1413052230" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
-</tool>
-</toolChain>
-</folderInfo>
-<sourceEntries>
-<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
-</sourceEntries>
-</configuration>
-</storageModule>
-<storageModule moduleId="scannerConfiguration">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.2027009676;cdt.managedbuild.config.gnu.exe.release.2027009676.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.832705582;cdt.managedbuild.tool.gnu.c.compiler.input.1127782331">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.2027009676;cdt.managedbuild.config.gnu.exe.release.2027009676.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1081690282;cdt.managedbuild.tool.gnu.cpp.compiler.input.1387572330">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1770452088;cdt.managedbuild.config.gnu.exe.debug.1770452088.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.374528198;cdt.managedbuild.tool.gnu.cpp.compiler.input.28775023">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1770452088;cdt.managedbuild.config.gnu.exe.debug.1770452088.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1832776764;cdt.managedbuild.tool.gnu.c.compiler.input.1481141764">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-</storageModule>
-<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
-<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
-</cconfiguration>
-<cconfiguration id="cdt.managedbuild.config.gnu.exe.release.2027009676">
-<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.release.2027009676" moduleId="org.eclipse.cdt.core.settings" name="Release">
-<externalSettings/>
-<extensions>
-<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
-<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-</extensions>
-</storageModule>
-<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-<configuration artifactName="eag" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.release.2027009676" name="Release" parent="cdt.managedbuild.config.gnu.exe.release">
-<folderInfo id="cdt.managedbuild.config.gnu.exe.release.2027009676." name="/" resourcePath="">
-<toolChain id="cdt.managedbuild.toolchain.gnu.exe.release.1386132769" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.release">
-<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.release.1801541583" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.release"/>
-<builder buildPath="${workspace_loc:/eag/Release}" id="cdt.managedbuild.target.gnu.builder.exe.release.1322398833" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.release"/>
-<tool id="cdt.managedbuild.tool.gnu.archiver.base.861618002" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
-<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1081690282" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release">
-<option id="gnu.cpp.compiler.exe.release.option.optimization.level.1242434100" name="Optimization Level" superClass="gnu.cpp.compiler.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
-<option id="gnu.cpp.compiler.exe.release.option.debugging.level.1288000062" name="Debug Level" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
-<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1387572330" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
-</tool>
-<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.832705582" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release">
-<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.1207253534" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" valueType="enumerated"/>
-<option id="gnu.c.compiler.exe.release.option.debugging.level.2131641039" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
-<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1127782331" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
-</tool>
-<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.release.1835444074" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.release"/>
-<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.release.1813279246" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.release">
-<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1312332519" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
-<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
-<additionalInput kind="additionalinput" paths="$(LIBS)"/>
-</inputType>
-</tool>
-<tool id="cdt.managedbuild.tool.gnu.assembler.exe.release.32275748" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.release">
-<inputType id="cdt.managedbuild.tool.gnu.assembler.input.2043969971" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
-</tool>
-</toolChain>
-</folderInfo>
-<sourceEntries>
-<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
-</sourceEntries>
-</configuration>
-</storageModule>
-<storageModule moduleId="scannerConfiguration">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.2027009676;cdt.managedbuild.config.gnu.exe.release.2027009676.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.832705582;cdt.managedbuild.tool.gnu.c.compiler.input.1127782331">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.2027009676;cdt.managedbuild.config.gnu.exe.release.2027009676.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1081690282;cdt.managedbuild.tool.gnu.cpp.compiler.input.1387572330">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1770452088;cdt.managedbuild.config.gnu.exe.debug.1770452088.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.374528198;cdt.managedbuild.tool.gnu.cpp.compiler.input.28775023">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1770452088;cdt.managedbuild.config.gnu.exe.debug.1770452088.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1832776764;cdt.managedbuild.tool.gnu.c.compiler.input.1481141764">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-</storageModule>
-<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
-<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
-</cconfiguration>
-</storageModule>
-<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-<project id="eag.cdt.managedbuild.target.gnu.exe.2013229658" name="Executable" projectType="cdt.managedbuild.target.gnu.exe"/>
-</storageModule>
-</cproject>
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/resources/.project b/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/resources/.project
deleted file mode 100644
index ddf0661f81..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch.tests/resources/.project
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>CallGraphDemo</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
- <triggers>clean,full,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>?name?</key>
- <value></value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.append_environment</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.autoBuildTarget</key>
- <value>all</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.buildArguments</key>
- <value></value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.buildCommand</key>
- <value>make</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.buildLocation</key>
- <value>${workspace_loc:/eag/Debug}</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
- <value>clean</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.contents</key>
- <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
- <value>false</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.enableFullBuild</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.fullBuildTarget</key>
- <value>all</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.stopOnError</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
- <value>true</value>
- </dictionary>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.cdt.core.ccnature</nature>
- <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
- <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
- <nature>org.eclipse.cdt.core.cnature</nature>
- </natures>
-</projectDescription>
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/ChangeLog b/systemtap/org.eclipse.linuxtools.callgraph.launch/ChangeLog
new file mode 100644
index 0000000000..af6e47037f
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/ChangeLog
@@ -0,0 +1,165 @@
+2010-06-02 Roland Grunberg <rgrunber@redhat.com>
+
+ * build.properties: Externalize some strings in the Manifest.
+ * META-INF/MANIFEST.MF: See above
+ * plugin.properties: See above
+ * plugin.xml: See above
+
+2010-06-01 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/messages.properties: Externalize string.
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java'
+ (finishLaunch): Display error message pop-up when stap may not be on the system path
+ or installed.
+
+2010-04-13 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java:
+ Clean up code.
+
+2010-03-05 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java: Stop passsing a useless argument to finishLaunch
+
+2010-03-02 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java (launch): Toss out a message dialog if output path is broken.
+
+2010-02-26 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchShortcut.java:
+ Cleanup code.
+
+2010-02-23 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java: Change cancellation language/checks
+ * src/org/eclipse/linuxtools/callgraph/launch/LaunchStapGraph.java: Add tid to marker functions
+
+2009-12-22 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java: Only display error popup if there is something to say -- use isErrorRecognized instead of message length.
+
+
+2009-12-17 rgrunber <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/messages.properties: Externalize Strings and cleanup.
+ * src/org/eclipse/linuxtools/callgraph/launch/LaunchStapGraph.java:
+ * src/org/eclipse/linuxtools/callgraph/launch/LaunchWizard.java:
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchShortcut.java:
+
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java
+ (finishLaunch): Create error dialog when launch fails and specify the potential problem.
+ Simplify error message logic.
+
+2009-12-15 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapOptionsTab.java: Prevent Preprocessor Directives textbox from auto-resizing at will.
+
+2009-12-14 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java:
+ Refactor BufferedWriter logic to reflect the static only methods.
+
+2009-12-09 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java (generateCommand): Tweaks for threading. Force command generation every time (otherwise may skip for bad reasons)
+ * src/org/eclipse/linuxtools/callgraph/launch/LaunchStapGraph.java (launch): Enable threading, make process probes accept tid() argument
+
+2009-12-08 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/messages.properties: Clean up unused externalized strings
+ * src/org/eclipse/linuxtools/callgraph/launch/LaunchStapGraph.java: Use '?' at the end of probe point for silent failure if any.
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java: Comment out potentially obsolete code.
+
+
+2009-12-08 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java: Externalize strings and cleanup of the finishLaunch function
+ Rename 'command' to 'stap' -- variable name was confusing
+
+2009-12-06 rgrunber <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java
+ (finishLaunch): Write to error log when stap command does not exist.
+
+2009-11-28 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchShortcut.java (finishLaunch): Set LaunchConfigurationConstants.SECONDARY_VIEW_ID using an overrideable function (defaults to returning "")
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java: Set the parser's secondary view id.
+
+2009-11-27 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java: Add capacity to use the new command option in the CommandGenerator.
+
+2009-11-26 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchShortcut.java: Provide default implementation of launch in SystemTapLaunchShortcut.
+ Fix naming of basic configurations. Add call to PluginConstants.DEFAULT_PARSER_ID instead of hard-coding.
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java: Make use of the generateCommand abstract function in ProfileLaunchDelegate
+
+2009-11-23 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java: Use the new ProfileLaunchConfiguration.
+ Correct binaryArguments being passed into the final error message
+
+2009-11-20 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/LaunchStapGraph.java (launch): Remove redundant check for projectName == null
+
+2009-11-18 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchShortcut.java: Make setParserID non-abstract. Default implementation returns the id of the SystemTap Text View. Create error message.
+
+2009-11-17 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchShortcut.java: Have parser default to text parser if not selected
+
+2009-11-16 Roland Grunberg <rgrunber@redhat.com>
+
+ * META-INF/MANIFEST.MF: Add Eclipse to Provider field.
+
+2009-11-16 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java: Reflect change to static methods in SystemTapCommandGenerator
+
+2009-11-12 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java:
+ Number of errors can be taken from the number of functions that have been matched, in the error handler
+
+2009-11-12 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java (StreamListener.streamAppended): Add a return if text is less than 1 character
+
+2009-11-12 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java: (finishLaunch):
+ Use appendToLog when writing header string to the log contents.
+
+2009-11-12 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/ListTreeContentProvider.java (getElements): Use validElement in SystemTapLaunchShortcut
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchShortcut.java: Rename validFile --> validElement
+ Add method validFile(ICElement e): this function will return true if the given element is a .c, .cpp or .h file.
+ (validFile): Fix remaining manual check for file ending.
+ * src/org/eclipse/linuxtools/callgraph/launch/LaunchWizard.java (.widgetSelected): Remove dependency on ShellOpener, use Display.asyncExec() instead.
+
+2009-11-11 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java: Mild code cleanup, commenting
+
+2009-11-10 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/RuledTreeSelectionDialog.java: Delete unnecessary TODO
+
+2009-11-09 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/ConfigurationOptionsSetter.java: Use StringBuilder instead of String
+ * META-INF/MANIFEST.MF: Change to reflect rename of Activator
+ * src/org/eclipse/linuxtools/callgraph/launch/CallgraphLaunchPlugin.java: RENAME: Activator --> CallgraphLaunchPlugin
+
+2009-11-06 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/ConfigurationOptionsSetter.java: Remove unused Options setting function
+ * src/org/eclipse/linuxtools/callgraph/launch/: Removed the ASTTranslationVisitor, which is never used.
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java: Delete unused functions, add javadoc comments to other functions. \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.callgraph.launch/META-INF/MANIFEST.MF
index e009cb2929..eacedce7f3 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/META-INF/MANIFEST.MF
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/META-INF/MANIFEST.MF
@@ -1,9 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: SystemTap Local Launch
+Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.linuxtools.callgraph.launch;singleton:=true
Bundle-Version: 0.0.1.qualifier
-Bundle-Activator: org.eclipse.linuxtools.callgraph.launch.Activator
+Bundle-Activator: org.eclipse.linuxtools.callgraph.launch.CallgraphLaunchPlugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.debug.ui,
@@ -14,8 +14,6 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.eclipse.cdt.core.model,
org.eclipse.cdt.debug.core,
org.eclipse.cdt.launch,
- org.eclipse.cdt.utils.pty,
- org.eclipse.cdt.utils.spawner,
org.eclipse.core.resources,
org.eclipse.debug.core,
org.eclipse.debug.ui,
@@ -28,3 +26,4 @@ Import-Package: org.eclipse.cdt.core.model,
org.eclipse.ui.views.navigator
Bundle-Localization: plugin
Export-Package: org.eclipse.linuxtools.callgraph.launch
+Bundle-Vendor: %Bundle-Vendor
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/about.html b/systemtap/org.eclipse.linuxtools.callgraph.launch/about.html
new file mode 100644
index 0000000000..23506a4bae
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/about.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>About</title>
+</head><body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/build.properties b/systemtap/org.eclipse.linuxtools.callgraph.launch/build.properties
index bbba056b40..1ef19a8878 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/build.properties
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/build.properties
@@ -14,5 +14,5 @@ bin.includes = plugin.xml,\
META-INF/,\
plugin.properties,\
.,\
- icons/,\
- bin/
+ about.html,\
+ icons/
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/plugin.properties b/systemtap/org.eclipse.linuxtools.callgraph.launch/plugin.properties
index 06458bf8f8..b90890d310 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/plugin.properties
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/plugin.properties
@@ -1,12 +1,6 @@
-###############################################################################
-# Copyright (c) 2009 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Red Hat - initial API and implementation
-###############################################################################
+#Properties file for org.eclipse.linuxtools.callgraph.launch
+Bundle-Vendor=Eclipse Linux Tools
+Bundle-Name=Callgraph Launch (Incubation)
launchConfigurationType.name.0 = Profile with SystemTap
-launchConfigurationTabGroup.description.0 = Launch a custom SystemTap Script \ No newline at end of file
+launchConfigurationTabGroup.description.0 = Launch a custom SystemTap Script
+launch.name=Function callgraph \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/plugin.xml b/systemtap/org.eclipse.linuxtools.callgraph.launch/plugin.xml
index 8c41103218..df5cbd90e0 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/plugin.xml
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/plugin.xml
@@ -26,7 +26,6 @@
<extension
point="org.eclipse.debug.ui.launchConfigurationTabGroups">
- name = "SystemTap Control Tab"
<launchConfigurationTabGroup
class="org.eclipse.linuxtools.callgraph.launch.SystemTapLaunchConfigurationTabGroup"
description="%launchConfigurationTabGroup.description.0"
@@ -42,7 +41,7 @@
class="org.eclipse.linuxtools.callgraph.launch.LaunchStapGraph"
id="org.eclipse.linuxtools.systemtap.quicklaunchStapGraph1"
icon="icons/bar_graph.png"
- label="Function callgraph"
+ label="%launch.name"
modes="profile">
<contextualLaunch>
<enablement>
@@ -85,6 +84,14 @@
</contextualLaunch>
</shortcut>
</extension>
+ <extension
+ point="org.eclipse.debug.ui.launchConfigurationTypeImages">
+ <launchConfigurationTypeImage
+ configTypeID="org.eclipse.linuxtools.callgraph.launch.systemtapLaunch"
+ icon="icons/bar_graph.png"
+ id="org.eclipse.linuxtools.callgraph.launch.systemtapLaunchImage">
+ </launchConfigurationTypeImage>
+ </extension>
</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/ASTTranslationUnitVisitor.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/ASTTranslationUnitVisitor.java
deleted file mode 100644
index f7c52c3a9a..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/ASTTranslationUnitVisitor.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.callgraph.launch;
-
-import java.util.ArrayList;
-
-import org.eclipse.cdt.core.dom.ast.ASTVisitor;
-import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
-import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
-
-
-//TODO: Remove unused class?
-public class ASTTranslationUnitVisitor extends ASTVisitor{
-
- public ASTTranslationUnitVisitor () {
- super();
- shouldVisitStatements = true;
- shouldVisitDeclarations = true;
- funcs = new ArrayList<String>();
- }
-
-
- private String fileName;
-
- private ArrayList<String> funcs;
- public int visit(IASTDeclaration s) {
- if (!s.getParent().getContainingFilename().contains(fileName))
- return PROCESS_SKIP;
- if (s instanceof IASTFunctionDefinition) {
- String name =((IASTFunctionDefinition) s).getDeclarator().getName().toString();
- if (!name.substring(0, 2).equals("__")) { //$NON-NLS-1$
- funcs.add(name);
- }
- }
- return PROCESS_CONTINUE;
- }
-
-
- public ArrayList<String> getFunctions() {
- return funcs;
- }
-
- public void setFileName(String val) {
- fileName = val;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/Activator.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/Activator.java
deleted file mode 100644
index 221c6b6a81..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/Activator.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.callgraph.launch;
-
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.linuxtools.callgraph.core.LaunchConfigurationConstants;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- *
- * This is more or less the default Eclipse plugin-wizard Activator.
- */
-public class Activator extends AbstractUIPlugin {
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
-
- }
-
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
-
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(LaunchConfigurationConstants.PLUGIN_ID, path);
- }
-
-
-}
-
-
-//public String getPluginLocation() {
-//Bundle bundle = getBundle();
-//
-//URL locationUrl = FileLocator.find(bundle,new Path("/"), null);
-//URL fileUrl = null;
-//try {
-// fileUrl = FileLocator.toFileURL(locationUrl);
-//} catch (IOException e) {
-// e.printStackTrace();
-//}
-//return fileUrl.getFile();
-//}
-
-//private void checkRun() {
-////Check if install script has been executed. Install script MUST delete the FirstRun file,
-////this will execute every time!
-//String firstRun = getPluginLocation() + "FirstRun";
-//File firstFile = new File(firstRun);
-//if (firstFile.exists()) {
-// Shell sh = new Shell();
-// String command = "./" + getPluginLocation() + "install.sh " + firstRun;
-// InputDialog id = new InputDialog(sh, "First time startup", "Hi there! Looks like this is your first time running the SystemTap Eclipse plugin. In order for this plugin to work, you will first need to install SystemTap. Then please open a terminal and execute the following command. ", command, null);
-// id.open();
-//}
-//}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/ConfigurationOptionsSetter.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/ConfigurationOptionsSetter.java
index 8911be1e3b..7154f2bfd5 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/ConfigurationOptionsSetter.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/ConfigurationOptionsSetter.java
@@ -12,224 +12,121 @@ package org.eclipse.linuxtools.callgraph.launch;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.linuxtools.callgraph.core.LaunchConfigurationConstants;
public class ConfigurationOptionsSetter {
- public static String setOptions(ILaunchConfiguration config) {
- String options = ""; //$NON-NLS-1$
- try {
- if (config.getAttribute(LaunchConfigurationConstants.COMMAND_VERBOSE,
- LaunchConfigurationConstants.DEFAULT_COMMAND_VERBOSE)) {
- options += "-v "; //$NON-NLS-1$
- }
-
-
- if (config.getAttribute(LaunchConfigurationConstants.COMMAND_PASS,
- LaunchConfigurationConstants.DEFAULT_COMMAND_PASS) > 0) {
- options += "-p" + config.getAttribute(LaunchConfigurationConstants.COMMAND_PASS, LaunchConfigurationConstants.DEFAULT_COMMAND_PASS) + " "; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_KEEP_TEMPORARY,
- LaunchConfigurationConstants.DEFAULT_COMMAND_KEEP_TEMPORARY)) {
- options += "-k "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(LaunchConfigurationConstants.COMMAND_GURU,
- LaunchConfigurationConstants.DEFAULT_COMMAND_GURU)) {
- options += "-g "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_PROLOGUE_SEARCH,
- LaunchConfigurationConstants.DEFAULT_COMMAND_PROLOGUE_SEARCH)) {
- options += "-P "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_NO_CODE_ELISION,
- LaunchConfigurationConstants.DEFAULT_COMMAND_NO_CODE_ELISION)) {
- options += "-u "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_DISABLE_WARNINGS,
- LaunchConfigurationConstants.DEFAULT_COMMAND_DISABLE_WARNINGS)) {
- options += "-w "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(LaunchConfigurationConstants.COMMAND_BULK_MODE,
- LaunchConfigurationConstants.DEFAULT_COMMAND_BULK_MODE)) {
- options += "-b "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_TIMING_INFO,
- LaunchConfigurationConstants.DEFAULT_COMMAND_TIMING_INFO)) {
- options += "-t "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_BUFFER_BYTES,
- LaunchConfigurationConstants.DEFAULT_COMMAND_BUFFER_BYTES) > 0) {
- options += "-s" + config.getAttribute(LaunchConfigurationConstants.COMMAND_BUFFER_BYTES, LaunchConfigurationConstants.DEFAULT_COMMAND_BUFFER_BYTES) + " "; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_TARGET_PID,
- LaunchConfigurationConstants.DEFAULT_COMMAND_TARGET_PID) > 0) {
- options += "-x" + config.getAttribute(LaunchConfigurationConstants.COMMAND_TARGET_PID, LaunchConfigurationConstants.DEFAULT_COMMAND_TARGET_PID) + " "; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_C_DIRECTIVES,
- LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES) != LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES) {
- options += config.getAttribute(
- LaunchConfigurationConstants.COMMAND_C_DIRECTIVES,
- LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES)
- + " "; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_LEAVE_RUNNING,
- LaunchConfigurationConstants.DEFAULT_COMMAND_LEAVE_RUNNING)) {
- options += "-F "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_SKIP_BADVARS,
- LaunchConfigurationConstants.DEFAULT_COMMAND_SKIP_BADVARS)) {
- options += "--skip-badvars "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_IGNORE_DWARF,
- LaunchConfigurationConstants.DEFAULT_COMMAND_IGNORE_DWARF)) {
- options += "--ignore-dwarf "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_TAPSET_COVERAGE,
- LaunchConfigurationConstants.DEFAULT_COMMAND_TAPSET_COVERAGE)) {
- options += "-q "; //$NON-NLS-1$
- }
- return options;
-
- } catch (CoreException e) {
- e.printStackTrace();
- }
-
- return null;
- }
- public static String setOptions(ILaunchConfigurationWorkingCopy config) {
- String options = ""; //$NON-NLS-1$
+ /**
+ * Returns a SystemTap command string containing the options specified
+ * in the configuration.
+ * @param config
+ * @return
+ */
+ public static String setOptions(ILaunchConfiguration config) {
+ StringBuilder options = new StringBuilder(); //$NON-NLS-1$
try {
if (config.getAttribute(LaunchConfigurationConstants.COMMAND_VERBOSE,
LaunchConfigurationConstants.DEFAULT_COMMAND_VERBOSE)) {
- options += "-v "; //$NON-NLS-1$
+ options.append("-v "); //$NON-NLS-1$
}
if (config.getAttribute(LaunchConfigurationConstants.COMMAND_PASS,
LaunchConfigurationConstants.DEFAULT_COMMAND_PASS) > 0) {
- options += "-p" + config.getAttribute(LaunchConfigurationConstants.COMMAND_PASS, LaunchConfigurationConstants.DEFAULT_COMMAND_PASS) + " "; //$NON-NLS-1$ //$NON-NLS-2$
+ options.append("-p" + config.getAttribute(LaunchConfigurationConstants.COMMAND_PASS, LaunchConfigurationConstants.DEFAULT_COMMAND_PASS) + " "); //$NON-NLS-1$ //$NON-NLS-2$
}
if (config.getAttribute(
LaunchConfigurationConstants.COMMAND_KEEP_TEMPORARY,
LaunchConfigurationConstants.DEFAULT_COMMAND_KEEP_TEMPORARY)) {
- options += "-k "; //$NON-NLS-1$
+ options.append("-k "); //$NON-NLS-1$
}
if (config.getAttribute(LaunchConfigurationConstants.COMMAND_GURU,
LaunchConfigurationConstants.DEFAULT_COMMAND_GURU)) {
- options += "-g "; //$NON-NLS-1$
+ options.append("-g "); //$NON-NLS-1$
}
if (config.getAttribute(
LaunchConfigurationConstants.COMMAND_PROLOGUE_SEARCH,
LaunchConfigurationConstants.DEFAULT_COMMAND_PROLOGUE_SEARCH)) {
- options += "-P "; //$NON-NLS-1$
+ options.append("-P "); //$NON-NLS-1$
}
if (config.getAttribute(
LaunchConfigurationConstants.COMMAND_NO_CODE_ELISION,
LaunchConfigurationConstants.DEFAULT_COMMAND_NO_CODE_ELISION)) {
- options += "-u "; //$NON-NLS-1$
+ options.append("-u "); //$NON-NLS-1$
}
if (config.getAttribute(
LaunchConfigurationConstants.COMMAND_DISABLE_WARNINGS,
LaunchConfigurationConstants.DEFAULT_COMMAND_DISABLE_WARNINGS)) {
- options += "-w "; //$NON-NLS-1$
+ options.append("-w "); //$NON-NLS-1$
}
if (config.getAttribute(LaunchConfigurationConstants.COMMAND_BULK_MODE,
LaunchConfigurationConstants.DEFAULT_COMMAND_BULK_MODE)) {
- options += "-b "; //$NON-NLS-1$
+ options.append("-b "); //$NON-NLS-1$
}
if (config.getAttribute(
LaunchConfigurationConstants.COMMAND_TIMING_INFO,
LaunchConfigurationConstants.DEFAULT_COMMAND_TIMING_INFO)) {
- options += "-t "; //$NON-NLS-1$
+ options.append("-t "); //$NON-NLS-1$
}
if (config.getAttribute(
LaunchConfigurationConstants.COMMAND_BUFFER_BYTES,
LaunchConfigurationConstants.DEFAULT_COMMAND_BUFFER_BYTES) > 0) {
- options += "-s" + config.getAttribute(LaunchConfigurationConstants.COMMAND_BUFFER_BYTES, LaunchConfigurationConstants.DEFAULT_COMMAND_BUFFER_BYTES) + " "; //$NON-NLS-1$ //$NON-NLS-2$
+ options.append("-s" + config.getAttribute(LaunchConfigurationConstants.COMMAND_BUFFER_BYTES, LaunchConfigurationConstants.DEFAULT_COMMAND_BUFFER_BYTES) + " "); //$NON-NLS-1$ //$NON-NLS-2$
}
if (config.getAttribute(
LaunchConfigurationConstants.COMMAND_TARGET_PID,
LaunchConfigurationConstants.DEFAULT_COMMAND_TARGET_PID) > 0) {
- options += "-x" + config.getAttribute(LaunchConfigurationConstants.COMMAND_TARGET_PID, LaunchConfigurationConstants.DEFAULT_COMMAND_TARGET_PID) + " "; //$NON-NLS-1$ //$NON-NLS-2$
+ options.append("-x" + config.getAttribute(LaunchConfigurationConstants.COMMAND_TARGET_PID, LaunchConfigurationConstants.DEFAULT_COMMAND_TARGET_PID) + " "); //$NON-NLS-1$ //$NON-NLS-2$
}
if (config.getAttribute(
LaunchConfigurationConstants.COMMAND_C_DIRECTIVES,
LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES) != LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES) {
- options += config.getAttribute(
+ options.append(config.getAttribute(
LaunchConfigurationConstants.COMMAND_C_DIRECTIVES,
LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES)
- + " "; //$NON-NLS-1$ //$NON-NLS-2$
+ + " "); //$NON-NLS-1$ //$NON-NLS-2$
}
if (config.getAttribute(
LaunchConfigurationConstants.COMMAND_LEAVE_RUNNING,
LaunchConfigurationConstants.DEFAULT_COMMAND_LEAVE_RUNNING)) {
- options += "-F "; //$NON-NLS-1$
+ options.append("-F "); //$NON-NLS-1$
}
if (config.getAttribute(
LaunchConfigurationConstants.COMMAND_SKIP_BADVARS,
LaunchConfigurationConstants.DEFAULT_COMMAND_SKIP_BADVARS)) {
- options += "--skip-badvars "; //$NON-NLS-1$
+ options.append("--skip-badvars "); //$NON-NLS-1$
}
if (config.getAttribute(
LaunchConfigurationConstants.COMMAND_IGNORE_DWARF,
LaunchConfigurationConstants.DEFAULT_COMMAND_IGNORE_DWARF)) {
- options += "--ignore-dwarf "; //$NON-NLS-1$
+ options.append("--ignore-dwarf "); //$NON-NLS-1$
}
if (config.getAttribute(
LaunchConfigurationConstants.COMMAND_TAPSET_COVERAGE,
LaunchConfigurationConstants.DEFAULT_COMMAND_TAPSET_COVERAGE)) {
- options += "-q "; //$NON-NLS-1$
+ options.append("-q "); //$NON-NLS-1$
}
- return options;
+ return options.toString();
} catch (CoreException e) {
- // TODO Auto-generated catch block
e.printStackTrace();
}
return null;
-
}
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/LaunchStapGraph.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/LaunchStapGraph.java
index ad42939295..b70ea4bece 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/LaunchStapGraph.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/LaunchStapGraph.java
@@ -24,48 +24,17 @@ import org.eclipse.linuxtools.callgraph.core.SystemTapUIErrorMessages;
import org.eclipse.ui.IEditorPart;
public class LaunchStapGraph extends SystemTapLaunchShortcut {
- /*
- * The following protected parameters are provided by
- * SystemTapLaunchShortcut:
- *
- * Optional customization parameters: protected String name; protected
- * String binaryPath; protected String arguments; protected String
- * outputPath; protected String dirPath; protected String generatedScript;
- * protected boolean needToGenerate; protected boolean overwrite;
- *
- * Mandatory: protected String scriptPath; protected ILaunchConfiguration
- * config;
- */
- /**
- * Launch method for a generated script that executes on a binary
- *
- * MUST specify (String) scriptPath and call config =
- * createConfiguration(bin)!
- *
- * Noteworthy defaults: name defaults to "", but please set it (for
- * usability) overwrite defaults to true - don't change it unless you really
- * have to.
- *
- * To create new launches: -Copy shortcut code in xml, changing class name
- * and label accordingly -Create a class that extends
- * SystemTapLaunchShortcut with a function launch(IBinary bin, String mode)
- * -Call super.Init() -Set name (this is shortcut-specific) -If a binary is
- * used, call binName = getName(bin) -Call createConfiguration(bin, name)
- *
- * -Specify whichever of the optional parameters you need -Set scriptPath
- * -Set an ILaunchConfiguration -Call finishLaunch or
- * finishLaunchWithoutBinary
- */
-
+
+ //TODO: Do not let this class persist, or otherwise change it so persistence doesn't matter.
private String partialScriptPath;
private String funcs;
private ArrayList<String> exclusions;
private String projectName;
+ protected static final String ATTR_PARSER = "org.eclipse.linuxtools.callgraph.graphparser"; //$NON-NLS-1$
+ protected static final String ATTR_VIEWER = "org.eclipse.linuxtools.callgraph.callgraphview"; //$NON-NLS-1$
+
- public void setProjectName(String val) {
- projectName = val;
- }
public LaunchStapGraph() {
funcs = null;
@@ -85,51 +54,39 @@ public class LaunchStapGraph extends SystemTapLaunchShortcut {
}
public void launch(IBinary bin, String mode) {
- super.Init();
+ super.initialize();
this.bin = bin;
name = "SystemTapGraph"; //$NON-NLS-1$
binName = getName(bin);
partialScriptPath = PluginConstants.getPluginLocation()
+ "parse_function_partial.stp"; //$NON-NLS-1$
- scriptPath = PluginConstants.DEFAULT_OUTPUT
- + "callgraphGen.stp"; //$NON-NLS-1$
-
- parserID = "org.eclipse.linuxtools.callgraph.graphparser";
+ viewID = "org.eclipse.linuxtools.callgraph.callgraphview"; //$NON-NLS-1$
- if (projectName == null || projectName.length() < 1)
- projectName = bin.getCProject().getElementName();
+ projectName = bin.getCProject().getElementName();
try {
config = createConfiguration(bin, name);
binaryPath = bin.getResource().getLocation().toString();
arguments = binaryPath;
- outputPath = PluginConstants.STAP_GRAPH_DEFAULT_IO_PATH;
+ outputPath = PluginConstants.getDefaultIOPath();
- writeFunctionListToScript(resourceToSearchFor);
- if (funcs == null || funcs.length() < 0)
+ if (writeFunctionListToScript(resourceToSearchFor) == null)
return;
- generatedScript = generateScript();
- if (generatedScript == null || generatedScript.length() < 0)
+ if (funcs == null || funcs.length() < 0)
return;
- generatedScript+= "probe syscall.exit {\n" +
- "if (pid() == target()) {\n" +
- "finalTime = gettimeofday_ns()\n" +
- "}\n" +
- "}\n";
needToGenerate = true;
-
finishLaunch(name, mode);
} catch (IOException e) {
SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
"LaunchShortcutScriptGen", //$NON-NLS-1$
- Messages.getString("LaunchStapGraph.0"), //$NON-NLS-1$
- Messages.getString("LaunchStapGraph.6")); //$NON-NLS-1$
+ Messages.getString("LaunchStapGraph.ScriptGenErr"), //$NON-NLS-1$
+ Messages.getString("LaunchStapGraph.ScriptGenErrMsg")); //$NON-NLS-1$
mess.schedule();
e.printStackTrace();
} catch (CoreException e1) {
@@ -154,14 +111,7 @@ public class LaunchStapGraph extends SystemTapLaunchShortcut {
* @return
*/
private String generateProbe(String function) {
- String output = "probe process(@1).function(\"" + //$NON-NLS-1$
- function + "\").call{" + //$NON-NLS-1$
- "\tcallFunction(probefunc())\t" + //$NON-NLS-1$
- "}\t" + //$NON-NLS-1$
- "probe process(@1).function(\"" + //$NON-NLS-1$
- function + "\").return{\t" + //$NON-NLS-1$
- "\treturnFunction(probefunc())\t" + //$NON-NLS-1$
- "}\n"; //$NON-NLS-1$
+ String output = "probe process(@1).function(\"" + function + "\").call ? { if ( ! isinstr(probefunc(), \"___STAP_MARKER___\")) { callFunction(probefunc(),tid()) } } probe process(@1).function(\"" + function + "\").return ? { if ( ! isinstr(probefunc(), \"___STAP_MARKER___\")) returnFunction(probefunc(),tid()) else { printf(\"?%d,,%s\\n\", tid(), user_string(strtol(tokenize($$return, \"return=\"),16)))}}\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
return output;
}
@@ -204,7 +154,7 @@ public class LaunchStapGraph extends SystemTapLaunchShortcut {
private String writeFromPartialScript(String projectName) throws IOException {
String toWrite = ""; //$NON-NLS-1$
String temp = ""; //$NON-NLS-1$
- toWrite += "probe begin{\n" + //$NON-NLS-1$
+ toWrite += "\nprobe begin{\n" + //$NON-NLS-1$
"printf(\"\\nPROBE_BEGIN\\n\")\n" + //$NON-NLS-1$
"serial=1\n" + //$NON-NLS-1$
"startTime = 0;\n" + //$NON-NLS-1$
@@ -226,46 +176,42 @@ public class LaunchStapGraph extends SystemTapLaunchShortcut {
exclusions = e;
}
-
- /**
- * Writes global variables for the StapGraph script to the BufferedWriter.
- * Should be called first.
- *
- * @param bw
- * @return
- * @throws IOException
- */
- private String writeGlobalVariables() throws IOException {
- String toWrite = "global serial\n" + //$NON-NLS-1$
- "global startTime\n " + //$NON-NLS-1$
- "global finalTime\n"; //$NON-NLS-1$
-
- return toWrite;
- }
-
@Override
public String generateScript() throws IOException {
String scriptContents = ""; //$NON-NLS-1$
- scriptContents += writeGlobalVariables();
// scriptContents += writeStapMarkers();
scriptContents += funcs;
scriptContents += writeFromPartialScript(projectName);
-// BufferedWriter bw = new BufferedWriter(new FileWriter(scriptFile));
-//// bw.write("probe begin { printf(\"HELLO\") }");
-// bw.write(scriptContents);
-// bw.close();
return scriptContents;
}
public void setPartialScriptPath(String val) {
partialScriptPath = val;
}
+
+ @Override
+ public String setScriptPath() {
+ scriptPath = PluginConstants.getDefaultOutput()
+ + "callgraphGen.stp"; //$NON-NLS-1$
+ return scriptPath;
+ }
+
+ @Override
+ public String setParserID() {
+ parserID = ATTR_PARSER;
+ return parserID;
+ }
+
+ @Override
+ public String setViewID() {
+ return ATTR_VIEWER;
+ }
// /**
// * Determines whether or not the user wants StapMarkers and inserts them. To
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/LaunchWizard.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/LaunchWizard.java
index 68a240e98b..d3be5c27bf 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/LaunchWizard.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/LaunchWizard.java
@@ -22,7 +22,6 @@ import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.linuxtools.callgraph.core.PluginConstants;
-import org.eclipse.linuxtools.callgraph.core.ShellOpener;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
@@ -32,6 +31,7 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
@@ -101,7 +101,7 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
@Override
public void launch(IEditorPart ed, String mode) {
- super.Init();
+ super.initialize();
promptForInputs();
this.mode = mode;
@@ -111,7 +111,7 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
@Override
public void launch(ISelection selection, String mode) {
- super.Init();
+ super.initialize();
completed = false;
promptForInputs();
@@ -122,12 +122,12 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
private void promptForInputs() {
- InputDialog id = new InputDialog(new Shell(), Messages.getString("LaunchWizard.0"), //$NON-NLS-1$
- Messages.getString("LaunchWizard.1") + //$NON-NLS-1$
- Messages.getString("LaunchWizard.2") + //$NON-NLS-1$
- Messages.getString("LaunchWizard.3"), //$NON-NLS-1$
+ InputDialog id = new InputDialog(new Shell(), Messages.getString("LaunchWizard.WelcomeWizard"), //$NON-NLS-1$
+ Messages.getString("LaunchWizard.Text1") + //$NON-NLS-1$
+ Messages.getString("LaunchWizard.Text2") + //$NON-NLS-1$
+ Messages.getString("LaunchWizard.Text3"), //$NON-NLS-1$
getLaunchManager().generateUniqueLaunchConfigurationNameFrom(
- Messages.getString("LaunchWizard.4")), null); //$NON-NLS-1$
+ Messages.getString("LaunchWizard.NamePrefix")), null); //$NON-NLS-1$
id.open();
if (id.getReturnCode() == InputDialog.CANCEL){
@@ -147,7 +147,7 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
sh.setText(name);
- Image img = new Image(sh.getDisplay(), PluginConstants.PLUGIN_LOCATION + "systemtapbanner.png"); //$NON-NLS-1$
+ Image img = new Image(sh.getDisplay(), PluginConstants.getPluginLocation() + "systemtapbanner.png"); //$NON-NLS-1$
Composite imageCmp = new Composite(sh, SWT.BORDER);
imageCmp.setLayout(new FillLayout());
GridData imageData = new GridData(650, 157);
@@ -164,7 +164,7 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
.span(2,1);
Label scriptLabel = new Label(fileComp, SWT.HORIZONTAL);
- scriptLabel.setText(Messages.getString("LaunchWizard.19")); //$NON-NLS-1$
+ scriptLabel.setText(Messages.getString("LaunchWizard.Script")); //$NON-NLS-1$
labelData.applyTo(scriptLabel);
GridDataFactory textData = GridDataFactory.fillDefaults().grab( true, false )
@@ -190,7 +190,7 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
GridData gd2 = new GridData();
gd2.horizontalSpan = 3;
Label binaryLabel= new Label(fileComp, SWT.HORIZONTAL);
- binaryLabel.setText(Messages.getString("LaunchWizard.20")); //$NON-NLS-1$
+ binaryLabel.setText(Messages.getString("LaunchWizard.BinFile")); //$NON-NLS-1$
labelData.applyTo(binaryLabel);
binaryLocation = new Text(fileComp, SWT.SINGLE | SWT.BORDER);
@@ -217,7 +217,7 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
argumentsComp.setLayout(new GridLayout(2, false));
Label argumentsLabel= new Label(argumentsComp, SWT.HORIZONTAL);
- argumentsLabel.setText(Messages.getString("LaunchWizard.21")); //$NON-NLS-1$
+ argumentsLabel.setText(Messages.getString("LaunchWizard.Args")); //$NON-NLS-1$
labelData.applyTo(argumentsLabel);
argumentsLocation = new Text(argumentsComp, SWT.MULTI | SWT.WRAP | SWT.BORDER);
@@ -225,7 +225,7 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
gd3.heightHint=200;
argumentsLocation.setLayoutData(gd3);
Button argumentsButton = new Button(argumentsComp, SWT.PUSH);
- argumentsButton.setText(Messages.getString("LaunchWizard.22")); //$NON-NLS-1$
+ argumentsButton.setText(Messages.getString("LaunchWizard.Func")); //$NON-NLS-1$
argumentsButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
argumentsLocation.setText(
@@ -242,7 +242,7 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
Button launch = new Button(sh, SWT.PUSH);
launch.setLayoutData(new GridData(GridData.CENTER, GridData.BEGINNING, false, false));
- launch.setText(Messages.getString("LaunchWizard.24")); //$NON-NLS-1$
+ launch.setText(Messages.getString("LaunchWizard.Launch")); //$NON-NLS-1$
launch.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
scriptPath = scriptLocation.getText();
@@ -260,10 +260,17 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
});
- ShellOpener so = new ShellOpener(Messages.getString("LaunchWizard.23"), sh); //$NON-NLS-1$
- so.schedule();
+ //TODO: Verify that this works
+ Display.getCurrent().asyncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ sh.open();
+ completed = true;
+ }
+
+ });
- completed = true;
}
@@ -271,6 +278,21 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
return completed;
}
+ public String setScriptPath() {
+ scriptPath = "IMPLEMENT";
+ return scriptPath;
+ }
+
+ @Override
+ public String setParserID() {
+ return null;
+ }
+
+ @Override
+ public String setViewID() {
+ return null;
+ }
+
}
//
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/ListTreeContentProvider.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/ListTreeContentProvider.java
index ae7b979d84..ac66e616b8 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/ListTreeContentProvider.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/ListTreeContentProvider.java
@@ -35,7 +35,7 @@ public class ListTreeContentProvider implements ITreeContentProvider {
output.add(item);
} else if (item instanceof ICElement) {
ICElement el = (ICElement) item;
- if (el.getElementName().contains(".c")) //$NON-NLS-1$
+ if (SystemTapLaunchShortcut.validElement(el)) //$NON-NLS-1$
output.add(el);
}
@@ -61,7 +61,7 @@ public class ListTreeContentProvider implements ITreeContentProvider {
for (ICElement child : cont.getChildren()) {
if (child instanceof ICElement)
- if (child.getElementName().endsWith(".c")) //$NON-NLS-1$
+ if (SystemTapLaunchShortcut.validElement(child)) //$NON-NLS-1$
return true;
if (child instanceof ICContainer) {
if (checkForValidChildren((ICContainer) child))
@@ -112,8 +112,7 @@ public class ListTreeContentProvider implements ITreeContentProvider {
output.add(item);
}
- if (item.getElementName().endsWith(".cpp") || //$NON-NLS-1$
- item.getElementName().endsWith(".c")) //$NON-NLS-1$
+ if (SystemTapLaunchShortcut.validElement(item))
output.add(item);
}
return output.toArray();
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/RuledTreeSelectionDialog.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/RuledTreeSelectionDialog.java
index 1810039aac..aa6c9c011a 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/RuledTreeSelectionDialog.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/RuledTreeSelectionDialog.java
@@ -38,7 +38,6 @@ public class RuledTreeSelectionDialog extends CheckedTreeSelectionDialog {
public RuledTreeSelectionDialog(Shell parent, ILabelProvider labelProvider,
ITreeContentProvider contentProvider) {
super(parent, labelProvider, contentProvider);
- // TODO Auto-generated constructor stub
}
/*
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java
index 6cbd4c6f13..c96e54285a 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java
@@ -16,11 +16,7 @@ import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
-import java.util.ArrayList;
-import org.eclipse.cdt.launch.AbstractCLaunchDelegate;
-import org.eclipse.cdt.utils.pty.PTY;
-import org.eclipse.cdt.utils.spawner.ProcessFactory;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionRegistry;
@@ -28,13 +24,11 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.IStreamListener;
import org.eclipse.debug.core.model.IProcess;
import org.eclipse.debug.core.model.IStreamMonitor;
-import org.eclipse.jface.text.IDocument;
import org.eclipse.linuxtools.callgraph.core.DocWriter;
import org.eclipse.linuxtools.callgraph.core.Helper;
import org.eclipse.linuxtools.callgraph.core.LaunchConfigurationConstants;
@@ -43,19 +37,19 @@ import org.eclipse.linuxtools.callgraph.core.SystemTapCommandGenerator;
import org.eclipse.linuxtools.callgraph.core.SystemTapErrorHandler;
import org.eclipse.linuxtools.callgraph.core.SystemTapParser;
import org.eclipse.linuxtools.callgraph.core.SystemTapUIErrorMessages;
+import org.eclipse.linuxtools.profiling.launch.ProfileLaunchConfigurationDelegate;
import org.eclipse.ui.console.TextConsole;
-
/**
* Delegate for Stap scripts. The Delegate generates part of the command string
* and schedules a job to finish generation of the command and execute.
*
*/
public class SystemTapLaunchConfigurationDelegate extends
- AbstractCLaunchDelegate {
+ ProfileLaunchConfigurationDelegate {
private static final String TEMP_ERROR_OUTPUT =
- PluginConstants.PLUGIN_LOCATION + "stapTempError.error"; //$NON-NLS-1$
+ PluginConstants.getDefaultOutput() + "stapTempError.error"; //$NON-NLS-1$
private String cmd;
private File temporaryScript = null;
private String arguments = ""; //$NON-NLS-1$
@@ -67,38 +61,51 @@ public class SystemTapLaunchConfigurationDelegate extends
@SuppressWarnings("unused")
private boolean useColour = false;
private String binaryArguments = ""; //$NON-NLS-1$
-
+ private String partialCommand = ""; //$NON-NLS-1$
+ private String stap = ""; //$NON-NLS-1$
@Override
protected String getPluginID() {
return null;
}
-
+
+ /**
+ * Sets strings to blank, booleans to false and everything else to null
+ */
+ private void initialize() {
+ temporaryScript = null;
+ arguments = ""; //$NON-NLS-1$
+ scriptPath = ""; //$NON-NLS-1$
+ binaryPath = ""; //$NON-NLS-1$
+ outputPath = ""; //$NON-NLS-1$
+ needsBinary = false; // Set to false if we want to use SystemTap
+ needsArguments = false;
+ useColour = false;
+ binaryArguments = ""; //$NON-NLS-1$
+ }
+
@Override
public void launch(ILaunchConfiguration config, String mode,
ILaunch launch, IProgressMonitor m) throws CoreException {
-
+
if (m == null) {
m = new NullProgressMonitor();
}
SubMonitor monitor = SubMonitor.convert(m,
"SystemTap runtime monitor", 5); //$NON-NLS-1$
-
- //System.out.println("SystemTapLaunchConfigurationDelegate: launch"); //$NON-NLS-1$
+ initialize();
// check for cancellation
if (monitor.isCanceled()) {
return;
}
-
-
-
- String command = ConfigurationOptionsSetter.setOptions(config);
+ /*
+ * Set variables
+ */
if (config.getAttribute(LaunchConfigurationConstants.USE_COLOUR,
LaunchConfigurationConstants.DEFAULT_USE_COLOUR))
useColour = true;
-
if (!config.getAttribute(LaunchConfigurationConstants.ARGUMENTS,
LaunchConfigurationConstants.DEFAULT_ARGUMENTS).equals(
LaunchConfigurationConstants.DEFAULT_ARGUMENTS)) {
@@ -107,8 +114,6 @@ public class SystemTapLaunchConfigurationDelegate extends
LaunchConfigurationConstants.DEFAULT_ARGUMENTS);
needsArguments = true;
}
-
-
if (!config.getAttribute(LaunchConfigurationConstants.BINARY_PATH,
LaunchConfigurationConstants.DEFAULT_BINARY_PATH).equals(
LaunchConfigurationConstants.DEFAULT_BINARY_PATH)) {
@@ -117,7 +122,6 @@ public class SystemTapLaunchConfigurationDelegate extends
LaunchConfigurationConstants.DEFAULT_BINARY_PATH);
needsBinary = true;
}
-
if (!config.getAttribute(LaunchConfigurationConstants.BINARY_ARGUMENTS,
LaunchConfigurationConstants.DEFAULT_BINARY_ARGUMENTS).equals(
LaunchConfigurationConstants.DEFAULT_BINARY_ARGUMENTS)) {
@@ -125,9 +129,6 @@ public class SystemTapLaunchConfigurationDelegate extends
LaunchConfigurationConstants.BINARY_ARGUMENTS,
LaunchConfigurationConstants.DEFAULT_BINARY_ARGUMENTS);
}
-
-
-
if (!config.getAttribute(LaunchConfigurationConstants.SCRIPT_PATH,
LaunchConfigurationConstants.DEFAULT_SCRIPT_PATH).equals(
LaunchConfigurationConstants.DEFAULT_SCRIPT_PATH)) {
@@ -135,13 +136,11 @@ public class SystemTapLaunchConfigurationDelegate extends
LaunchConfigurationConstants.SCRIPT_PATH,
LaunchConfigurationConstants.DEFAULT_SCRIPT_PATH);
}
-
// Generate script if needed
if (config.getAttribute(LaunchConfigurationConstants.NEED_TO_GENERATE,
LaunchConfigurationConstants.DEFAULT_NEED_TO_GENERATE)) {
temporaryScript = new File(scriptPath);
temporaryScript.delete();
-
try {
temporaryScript.createNewFile();
FileWriter fstream = new FileWriter(temporaryScript);
@@ -154,121 +153,59 @@ public class SystemTapLaunchConfigurationDelegate extends
e1.printStackTrace();
}
}
+
+ stap = config.getAttribute(LaunchConfigurationConstants.COMMAND,
+ PluginConstants.STAP_PATH);
+
+ /**
+ * Generate partial command
+ */
+ partialCommand = ConfigurationOptionsSetter.setOptions(config);
outputPath = config.getAttribute(
LaunchConfigurationConstants.OUTPUT_PATH,
- PluginConstants.DEFAULT_OUTPUT);
- command += "-o " + outputPath; //$NON-NLS-1$
- try {
- File tempFile = new File(outputPath);
- tempFile.createNewFile();
- //Make sure the output file exists
- } catch (IOException e1) {
- e1.printStackTrace();
- }
-
+ PluginConstants.getDefaultOutput());
+ partialCommand += "-o " + outputPath; //$NON-NLS-1$
// check for cancellation
- if (monitor.isCanceled()) {
+ if ( !testOutput(outputPath) || monitor.isCanceled() ) {
+ SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("SystemTapLaunchConfigurationDelegate.0"), //$NON-NLS-1$
+ Messages.getString("SystemTapLaunchConfigurationDelegate.1"), Messages.getString("SystemTapLaunchConfigurationDelegate.2") + outputPath + //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.getString("SystemTapLaunchConfigurationDelegate.3")); //$NON-NLS-1$
+ mess.schedule();
return;
}
- finishLaunch(launch, config, command, m, true);
+ finishLaunch(launch, config, m, true);
}
-
+
+ /**
+ * Returns the current SystemTap command, or returns an error message.
+ * @return
+ */
public String getCommand() {
if (cmd.length() > 0)
return cmd;
else
- return Messages.getString("SystemTapLaunchConfigurationDelegate.0"); //$NON-NLS-1$
- }
-
- public Process execute(String[] commandArray, String[] env, File wd,
- boolean usePty) throws IOException {
- Process process = null;
- try {
- if (wd == null) {
- process = ProcessFactory.getFactory().exec(commandArray, env);
- } else {
- if (PTY.isSupported() && usePty) {
- process = ProcessFactory.getFactory().exec(commandArray,
- env, wd, new PTY());
- } else {
- process = ProcessFactory.getFactory().exec(commandArray,
- env, wd);
- }
- }
- } catch (IOException e) {
- if (process != null) {
- process.destroy();
- }
- return null;
- }
- return process;
- }
-
-
-
- protected IProcess createNewProcess(ILaunch launch, Process systemProcess,
- String programName) {
- return DebugPlugin.newProcess(launch, systemProcess,
- renderProcessLabel(programName));
+ return Messages.getString("SystemTapLaunchConfigurationDelegate.NoCommand"); //$NON-NLS-1$
}
- public String getCommandLine(String[] args) {
- StringBuffer ret = new StringBuffer();
- for (String arg : args) {
- ret.append(arg + " "); //$NON-NLS-1$
- }
- return ret.toString().trim();
- }
-
-
-
- private void finishLaunch(ILaunch launch, ILaunchConfiguration config, String command,
+ private void finishLaunch(ILaunch launch, ILaunchConfiguration config,
IProgressMonitor monitor, boolean retry) {
- String errorMessage = "";
try {
- File workDir = getWorkingDirectory(config);
- if (workDir == null) {
- workDir = new File(System.getProperty("user.home", ".")); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
-
-
- // Generate the command
- SystemTapCommandGenerator cmdGenerator = new SystemTapCommandGenerator();
- cmd = cmdGenerator.generateCommand(scriptPath, binaryPath,
- command, needsBinary, needsArguments, arguments, binaryArguments);
-
-
-// MP.println(cmd);
- // Prepare cmd for execution - we need a command array of strings,
- // no string can contain a space character. (One of the process'
- // requirements)
- String tmp[] = cmd.split(" "); //$NON-NLS-1$
- ArrayList<String> cmdLine = new ArrayList<String>();
- for (String str : tmp) {
- cmdLine.add(str);
- }
- String[] commandArray = (String[]) cmdLine
- .toArray(new String[cmdLine.size()]);
-
// Check for cancellation
- if (monitor.isCanceled()) {
+ if (monitor.isCanceled() || launch == null) {
return;
}
-
monitor.worked(1);
-
- if (launch == null) {
- return;
- }
- // Not sure if this line is necessary
+
// set the default source locator if required
setDefaultSourceLocator(launch, config);
+ /*
+ * Fetch a parser
+ */
String parserClass = config.getAttribute(LaunchConfigurationConstants.PARSER_CLASS,
LaunchConfigurationConstants.DEFAULT_PARSER_CLASS);
IExtensionRegistry reg = Platform.getExtensionRegistry();
@@ -276,101 +213,108 @@ public class SystemTapLaunchConfigurationDelegate extends
.getConfigurationElementsFor(PluginConstants.PARSER_RESOURCE,
PluginConstants.PARSER_NAME,
parserClass);
-
-
if (extensions == null || extensions.length < 1) {
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("SystemTapLaunchConfigurationDelegate.InvalidParser1"), Messages.getString("SystemTapLaunchConfigurationDelegate.InvalidParser2"), //$NON-NLS-1$ //$NON-NLS-2$
- Messages.getString("SystemTapLaunchConfigurationDelegate.InvalidParser3") + //$NON-NLS-1$
- Messages.getString("SystemTapLaunchConfigurationDelegate.InvalidParser4") + parserClass); //$NON-NLS-1$
+ SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("SystemTapLaunchConfigurationDelegate.InvalidParser1"), //$NON-NLS-1$
+ Messages.getString("SystemTapLaunchConfigurationDelegate.InvalidParser1"), //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.getString("SystemTapLaunchConfigurationDelegate.InvalidParser2") + //$NON-NLS-1$
+ Messages.getString("SystemTapLaunchConfigurationDelegate.InvalidParser3") + parserClass); //$NON-NLS-1$
mess.schedule();
return;
}
IConfigurationElement element = extensions[0];
-
SystemTapParser parser =
- (SystemTapParser) element.createExecutableExtension("class"); //$NON-NLS-1$
+ (SystemTapParser) element.createExecutableExtension(PluginConstants.ATTR_CLASS);
-
- if (element.getAttribute("realtime") == "true") { //$NON-NLS-1$ //$NON-NLS-2$
+ //Set parser options
+ parser.setViewID(config.getAttribute(LaunchConfigurationConstants.VIEW_CLASS,
+ LaunchConfigurationConstants.VIEW_CLASS));
+ parser.setSourcePath(outputPath);
+ parser.setMonitor(SubMonitor.convert(monitor));
+ parser.setDone(false);
+ parser.setSecondaryID(config.getAttribute(LaunchConfigurationConstants.SECONDARY_VIEW_ID,
+ LaunchConfigurationConstants.DEFAULT_SECONDARY_VIEW_ID));
+
+ parser.setKillButtonEnabled(true);
+
+ if (element.getAttribute(PluginConstants.ATTR_REALTIME).equals(PluginConstants.VAL_TRUE)) {
+ parser.setRealTime(true);
parser.schedule();
}
-
monitor.worked(1);
+ /*
+ * Launch
+ */
+ IProcess process = createProcess(config, launch);
- Process subProcess = execute(commandArray, getEnvironment(config),
- workDir, true);
-
- if (subProcess == null){
- //TODO: FIgure out what the console error message is so we can catch it in errorlog
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("SystemTapLaunchConfigurationDelegate.NullProcessErrorName"), Messages.getString("SystemTapLaunchConfigurationDelegate.NullProcessErrorTitle"), //$NON-NLS-1$ //$NON-NLS-2$
- Messages.getString("SystemTapLaunchConfigurationDelegate.NullProcessErrorMessage1") + //$NON-NLS-1$
- Messages.getString("SystemTapLaunchConfigurationDelegate.NullProcessErrorMessage2")); //$NON-NLS-1$
- mess.schedule();
- return;
- }
-
- IProcess process = createNewProcess(launch, subProcess,
- commandArray[0]);
- // set the command line used
- process.setAttribute(IProcess.ATTR_CMDLINE,
- cmd);
monitor.worked(1);
- ((TextConsole)Helper.getConsoleByName(config.getName())).activate();
StreamListener s = new StreamListener();
process.getStreamsProxy().getErrorStreamMonitor().addListener(s);
-
-
while (!process.isTerminated()) {
Thread.sleep(100);
- if (monitor.isCanceled()) {
- Runtime run = Runtime.getRuntime();
- run.exec("kill stap"); //$NON-NLS-1$
+ if ((monitor != null && monitor.isCanceled()) || parser.isDone()) {
+ parser.cancelJob();
process.terminate();
return;
}
}
Thread.sleep(100);
s.close();
-
+ parser.setKillButtonEnabled(false);
if (process.getExitValue() != 0) {
- //SystemTap terminated with errors, parse console to figure out which error
- IDocument doc = Helper.getConsoleDocumentByName(config.getName());
- //Sometimes the console has not been printed to yet, wait for a little while longer
- if (doc.get().length() < 1)
- Thread.sleep(300);
- SystemTapErrorHandler errorHandler = new SystemTapErrorHandler();
- errorHandler.handle(monitor, config.getName() + Messages.getString("SystemTapLaunchConfigurationDelegate.stap_command") //$NON-NLS-1$
- + PluginConstants.NEW_LINE + cmd
- + PluginConstants.NEW_LINE + PluginConstants.NEW_LINE);
- errorMessage = errorHandler.handle(monitor, new FileReader(TEMP_ERROR_OUTPUT)); //$NON-NLS-1$
- if (monitor != null && monitor.isCanceled())
- return;
-
-
- if (errorHandler.hasMismatchedProbePoints() && retry) {
- errorHandler.finishHandling(monitor, s.getNumberOfErrors());
- if (monitor != null && monitor.isCanceled())
+ parser.cancelJob();
+ //exit code for command not found
+ if (process.getExitValue() == 127){
+ SystemTapUIErrorMessages errorDialog = new SystemTapUIErrorMessages(
+ Messages.getString("SystemTapLaunchConfigurationDelegate.CallGraphGenericError"), //$NON-NLS-1$
+ Messages.getString("SystemTapLaunchConfigurationDelegate.CallGraphGenericError"), //$NON-NLS-1$
+ Messages.getString("SystemTapLaunchConfigurationDelegate.stapNotFound")); //$NON-NLS-1$
+
+ errorDialog.schedule();
+ }else{
+ SystemTapErrorHandler errorHandler = new SystemTapErrorHandler();
+
+ //Prepare stap information
+ errorHandler.appendToLog(config.getName() + Messages.getString("SystemTapLaunchConfigurationDelegate.stap_command") + cmd+ PluginConstants.NEW_LINE + PluginConstants.NEW_LINE);//$NON-NLS-1$
+
+ //Handle error from TEMP_ERROR_OUTPUT
+ errorHandler.handle(monitor, new FileReader(TEMP_ERROR_OUTPUT)); //$NON-NLS-1$
+ if ((monitor != null && monitor.isCanceled()))
return;
- finishLaunch(launch, config, command, monitor, false);
- return;
- }
- errorHandler.finishHandling(monitor, s.getNumberOfErrors());
+ errorHandler.finishHandling(monitor, scriptPath);
+ if (errorHandler.isErrorRecognized()) {
+ SystemTapUIErrorMessages errorDialog = new SystemTapUIErrorMessages(
+ Messages.getString("SystemTapLaunchConfigurationDelegate.CallGraphGenericError"), //$NON-NLS-1$
+ Messages.getString("SystemTapLaunchConfigurationDelegate.CallGraphGenericError"), //$NON-NLS-1$
+ errorHandler.getErrorMessage());
+
+ errorDialog.schedule();
+ }
+ }
return;
}
- if (element.getAttribute(Messages.getString("SystemTapLaunchConfigurationDelegate.8")) != Messages.getString("SystemTapLaunchConfigurationDelegate.9")) { //$NON-NLS-1$ //$NON-NLS-2$
+ if (! element.getAttribute(PluginConstants.ATTR_REALTIME).equals(PluginConstants.VAL_TRUE)) { //$NON-NLS-1$ //$NON-NLS-2$
parser.schedule();
+ } else {
+ //Parser already scheduled, but double-check
+ if (parser != null)
+ parser.cancelJob();
}
-
monitor.worked(1);
-
+
+ String message = generateErrorMessage(config.getName(), binaryArguments);
+
+ DocWriter dw = new DocWriter(Messages.getString("SystemTapLaunchConfigurationDelegate.DocWriterName"), //$NON-NLS-1$
+ ((TextConsole)Helper.getConsoleByName(config.getName())), message);
+ dw.schedule();
+
} catch (IOException e) {
e.printStackTrace();
} catch (InterruptedException e) {
@@ -378,74 +322,75 @@ public class SystemTapLaunchConfigurationDelegate extends
} catch (CoreException e) {
e.printStackTrace();
} finally {
- errorMessage = generateErrorMessage(config.getName(), command) + errorMessage;
-
- DocWriter dw = new DocWriter(Messages.getString("SystemTapLaunchConfigurationDelegate.DocWriterName"), //$NON-NLS-1$
- ((TextConsole)Helper.getConsoleByName(config.getName())), errorMessage);
- dw.schedule();
monitor.done();
+
}
}
-
private String generateErrorMessage(String configName, String binaryCommand) {
- String output = "";
+ String output = ""; //$NON-NLS-1$
if (binaryCommand == null || binaryCommand.length() < 0) {
output = PluginConstants.NEW_LINE +
PluginConstants.NEW_LINE + "-------------" + //$NON-NLS-1$
PluginConstants.NEW_LINE +
- "Configuration name: "//$NON-NLS-1$
+ Messages.getString("SystemTapLaunchConfigurationDelegate.Relaunch10") //$NON-NLS-1$
+ configName + PluginConstants.NEW_LINE +
- "No binary commands specified. To specify commands, " +
- "check under the Binary Arguments tab for this " +
+ Messages.getString("SystemTapLaunchConfigurationDelegate.Relaunch8") + //$NON-NLS-1$
+ Messages.getString("SystemTapLaunchConfigurationDelegate.Relaunch9") + //$NON-NLS-1$
"configuration in Profile As --> Profile Configurations." + //$NON-NLS-1$
PluginConstants.NEW_LINE + PluginConstants.NEW_LINE;
- }
- else {
+ } else {
output = PluginConstants.NEW_LINE
+ PluginConstants.NEW_LINE +"-------------" //$NON-NLS-1$
+ PluginConstants.NEW_LINE
- + "Configuration name: "//$NON-NLS-1$
+ + Messages.getString("SystemTapLaunchConfigurationDelegate.EndMessage1") //$NON-NLS-1$
+ configName + PluginConstants.NEW_LINE +
- "Binary arguments : "//$NON-NLS-1$
+ Messages.getString("SystemTapLaunchConfigurationDelegate.EndMessage2") //$NON-NLS-1$
+ binaryCommand + PluginConstants.NEW_LINE +
- "To change this command, check under the Binary " + //$NON-NLS-1$
- "Arguments tab for this configuration in " + //$NON-NLS-1$
- "Profile As --> Profile Configurations." + //$NON-NLS-1$
+ Messages.getString("SystemTapLaunchConfigurationDelegate.EndMessage3") + //$NON-NLS-1$
+ Messages.getString("SystemTapLaunchConfigurationDelegate.EndMessage4") + //$NON-NLS-1$
+ Messages.getString("SystemTapLaunchConfigurationDelegate.EndMessage5") + //$NON-NLS-1$
PluginConstants.NEW_LINE + PluginConstants.NEW_LINE;
}
return output;
}
-
private class StreamListener implements IStreamListener{
- private Helper h;
private int counter;
+ private BufferedWriter bw;
+
public StreamListener() throws IOException {
- h = new Helper();
+ File file = new File(TEMP_ERROR_OUTPUT);
+ file.delete();
+ file.createNewFile();
+ bw = Helper.setBufferedWriter(TEMP_ERROR_OUTPUT); //$NON-NLS-1$
counter = 0;
- h.setBufferedWriter(TEMP_ERROR_OUTPUT); //$NON-NLS-1$
}
+
@Override
public void streamAppended(String text, IStreamMonitor monitor) {
try {
+ if (text.length() < 1) return;
counter++;
if (counter < PluginConstants.MAX_ERRORS)
- h.appendToExistingFile(text);
+ bw.append(text);
} catch (IOException e) {
e.printStackTrace();
}
-
}
public void close() throws IOException {
- h.closeBufferedWriter();
- }
-
- public int getNumberOfErrors() {
- return counter;
+ bw.close();
}
}
+
+ @Override
+ public String generateCommand(ILaunchConfiguration config) {
+ // Generate the command
+ cmd = SystemTapCommandGenerator.generateCommand(scriptPath, binaryPath,
+ partialCommand, needsBinary, needsArguments, arguments, binaryArguments, stap);
+ return cmd;
+ }
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchShortcut.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchShortcut.java
index 2aa9de5783..77bef9aa7e 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchShortcut.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchShortcut.java
@@ -11,7 +11,6 @@
package org.eclipse.linuxtools.callgraph.launch;
-
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
@@ -35,6 +34,7 @@ import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.debug.core.DebugPlugin;
@@ -51,11 +51,62 @@ import org.eclipse.swt.widgets.Button;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.model.WorkbenchLabelProvider;
+/**
+ * Launch method for a generated script that executes on a binary <br>
+ * MUST specify (String) scriptPath and call config = createConfiguration(bin)! <br>
+ * Noteworthy defaults:
+ * <ul>
+ * <li>'name' defaults to ""</li>
+ * <li>'overwrite' defaults to true</li>
+ * </ul>
+ * To create new launches: <br>
+ * <ul>
+ * <li>
+ * Extend the shortcut extension in Eclipse (recommend copying code from the
+ * existing launch in the plugin.xml)</li>
+ * <li>
+ * Create a class that extends SystemTapLaunchShortcut with a function public
+ * void launch(IBinary bin, String mode) that calls super.Init().</li>
+ * <li>
+ * Set name</li>
+ * <li>
+ * If the script is to be launched with a binary, call binName = getName(bin)</li>
+ * <li>
+ * Call config=createConfiguration(bin, name) or
+ * config=createConfiguration(name)</li>
+ * <li>
+ * Specify whichever of the optional parameters you need</li>
+ * <li>
+ * Extend the parser extension defined in org.eclipse.linuxtools.callgraph
+ * .core. Build a basic parsing class.</li>
+ * <li>
+ * Set parserID to the id of your extension</li>
+ * <li>
+ * Set scriptPath</li>
+ * <li>
+ * If you wish to generate a script on-the-fly, override generateScript() and
+ * set needToGenerate to true</li>
+ * <li>
+ * Call finishLaunch or finishLaunchWithoutBinary</li>
+ * </ul>
+ *<br>
+ *<br>
+ * The following protected parameters are provided by
+ * SystemTapLaunchShortcut:
+ *<br> <br>
+ * Optional customization parameters: <code> protected String name; protected
+ * String binaryPath; protected String arguments; protected String
+ * outputPath; protected String dirPath; protected String generatedScript;
+ * protected boolean needToGenerate; protected boolean overwrite;</code>
+ * <br> <br>
+ * Mandatory: <code> protected String scriptPath; protected ILaunchConfiguration
+ * config;</code>
-public class SystemTapLaunchShortcut extends ProfileLaunchShortcut{
+ */
+public abstract class SystemTapLaunchShortcut extends ProfileLaunchShortcut {
protected IEditorPart editor;
protected ILaunchConfiguration config;
-
+
private static final String USER_SELECTED_ALL = "ALL"; //$NON-NLS-1$
protected String name;
@@ -67,18 +118,18 @@ public class SystemTapLaunchShortcut extends ProfileLaunchShortcut{
protected String dirPath;
protected String generatedScript;
protected String parserID;
+ protected String viewID;
protected boolean needToGenerate;
protected boolean overwrite;
protected boolean useColours;
protected String resourceToSearchFor;
protected boolean searchForResource;
protected IBinary bin;
-
-
+
private Button OKButton;
private boolean testMode = false;
-
-
+ protected String secondaryID = ""; //$NON-NLS-1$
+
/**
* Provides access to the Profiling Frameworks' launch method
*
@@ -88,105 +139,104 @@ public class SystemTapLaunchShortcut extends ProfileLaunchShortcut{
public void reLaunch(IEditorPart editor, String mode) {
launch(editor, mode);
}
-
- public void Init() {
+
+ /**
+ * Initialize variables. Highly recommend calling this function within the
+ * launch methods. Will call setScriptPath, setParserID and setViewID.
+ */
+ public void initialize() {
name = ""; //$NON-NLS-1$
dirPath = ResourcesPlugin.getWorkspace().getRoot().getLocation().toString();
binaryPath = LaunchConfigurationConstants.DEFAULT_BINARY_PATH;
arguments = LaunchConfigurationConstants.DEFAULT_ARGUMENTS;
- outputPath = PluginConstants.STAP_GRAPH_DEFAULT_IO_PATH;
+ outputPath = PluginConstants.getDefaultIOPath();
overwrite = true;
- scriptPath = null; //Every shortcut MUST declare its own script path.
generatedScript = LaunchConfigurationConstants.DEFAULT_GENERATED_SCRIPT;
needToGenerate = false;
useColours = false;
- parserID = null;
+ secondaryID = ""; //$NON-NLS-1$
}
@Override
protected ILaunchConfigurationType getLaunchConfigType() {
- //System.out.println("SystemTapLaunchShortcut: getLaunchConfigType"); //$NON-NLS-1$
- return getLaunchManager().getLaunchConfigurationType(PluginConstants.CONFIGURATION_TYPE_ID);
+ return getLaunchManager().getLaunchConfigurationType(
+ PluginConstants.CONFIGURATION_TYPE_ID);
}
-
@Override
protected void setDefaultProfileAttributes(
ILaunchConfigurationWorkingCopy wc) throws CoreException {
SystemTapOptionsTab tab = new SystemTapOptionsTab();
tab.setDefaults(wc);
- //System.out.println("SystemTapLaunchShortcut: setDefaultProfileAttributes"); //$NON-NLS-1$
- }
-
+ }
protected ILaunchConfiguration checkForExistingConfiguration() {
ILaunchConfigurationType configType = getLaunchConfigType();
try {
- ILaunchConfiguration[] configs = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations(configType);
-
+ ILaunchConfiguration[] configs = DebugPlugin.getDefault()
+ .getLaunchManager().getLaunchConfigurations(configType);
+
for (int i = 0; i < configs.length; i++) {
- if (configs[i].exists() && configs[i]!=null && !config.equals(configs[i])) {
- if(checkIfAttributesAreEqual(config, configs[i])) {
+ if (configs[i].exists() && configs[i] != null
+ && !config.equals(configs[i])) {
+ if (checkIfAttributesAreEqual(config, configs[i])) {
config.delete();
config = configs[i];
- }
+ }
}
}
-
+
} catch (CoreException e) {
e.printStackTrace();
}
-
+
return config;
-
+
}
-
-
+
/**
- * Returns true if two configurations are exactly identical (i.e. all attributes are equal)
+ * Returns true if two configurations are exactly identical (i.e. all
+ * attributes are equal)
*
* @param first
* @param second
- * @return True if two configurations are exactly identical (i.e. all attributes are equal)
+ * @return True if two configurations are exactly identical (i.e. all
+ * attributes are equal)
*/
- private boolean checkIfAttributesAreEqual(ILaunchConfiguration first,ILaunchConfiguration second) {
+ private boolean checkIfAttributesAreEqual(ILaunchConfiguration first,
+ ILaunchConfiguration second) {
boolean isEqual = false;
-
+
try {
if (first.getAttributes().equals(second.getAttributes()))
isEqual = true;
} catch (CoreException e) {
e.printStackTrace();
}
-
+
return isEqual;
}
-
-/**
- * Helper function to complete launches. Uses protected parameters
- * (Strings) scriptPath, binaryPath, arguments, outputPath and (boolean)
- * overwrite. These must be set by the calling function (or else
- * nonsensical results will occur).
- *
- * ScriptPath MUST be set.
- *
- * @param name: Used to generate the name of the new configuration
- * @param bin: Affiliated executable
- * @param mode: Mode setting
- * @throws Exception
- */
+
+ /**
+ * Helper function to complete launches. Uses protected parameters (Strings)
+ * scriptPath, binaryPath, arguments, outputPath and (boolean) overwrite.
+ * These must be set by the calling function (or else nonsensical results
+ * will occur). <br>
+ * If scriptPath has not been set, the setScriptPath() method will be
+ * called.
+ *
+ * @param name
+ * : Used to generate the name of the new configuration
+ * @param bin
+ * : Affiliated executable
+ * @param mode
+ * : Mode setting
+ * @throws Exception
+ */
protected void finishLaunch(String name, String mode) throws Exception {
- if (parserID == null)
- throw new Exception();
-
- if (scriptPath.length() < 1) {
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("SystemTapLaunchShortcut.ErrorMessageName"), //$NON-NLS-1$
- Messages.getString("SystemTapLaunchShortcut.ErrorMessageTitle"), Messages.getString("SystemTapLaunchShortcut.ErrorMessage") + name); //$NON-NLS-1$ //$NON-NLS-2$
- mess.schedule();
+ if (!finishLaunchHelper())
return;
- }
-
-
+
ILaunchConfigurationWorkingCopy wc = null;
if (config != null) {
try {
@@ -194,128 +244,150 @@ public class SystemTapLaunchShortcut extends ProfileLaunchShortcut{
} catch (CoreException e1) {
e1.printStackTrace();
}
-
- wc.setAttribute(LaunchConfigurationConstants.SCRIPT_PATH, scriptPath);
- wc.setAttribute(LaunchConfigurationConstants.BINARY_PATH, binaryPath);
- wc.setAttribute(LaunchConfigurationConstants.OUTPUT_PATH, outputPath);
+
+ wc.setAttribute(LaunchConfigurationConstants.SCRIPT_PATH,scriptPath);
+
+ if (!invalid(binaryPath))
+ wc.setAttribute(LaunchConfigurationConstants.BINARY_PATH,binaryPath);
+
+ wc.setAttribute(LaunchConfigurationConstants.OUTPUT_PATH,outputPath);
wc.setAttribute(LaunchConfigurationConstants.ARGUMENTS, arguments);
- wc.setAttribute(LaunchConfigurationConstants.GENERATED_SCRIPT, generatedScript);
- wc.setAttribute(LaunchConfigurationConstants.NEED_TO_GENERATE, needToGenerate);
+ wc.setAttribute(LaunchConfigurationConstants.GENERATED_SCRIPT,generatedScript);
+ wc.setAttribute(LaunchConfigurationConstants.NEED_TO_GENERATE,needToGenerate);
wc.setAttribute(LaunchConfigurationConstants.OVERWRITE, overwrite);
- wc.setAttribute(LaunchConfigurationConstants.USE_COLOUR, useColours);
- wc.setAttribute(LaunchConfigurationConstants.PARSER_CLASS, parserID);
-
-
+ wc.setAttribute(LaunchConfigurationConstants.USE_COLOUR,useColours);
+ wc.setAttribute(LaunchConfigurationConstants.PARSER_CLASS,parserID);
+ wc.setAttribute(LaunchConfigurationConstants.VIEW_CLASS, viewID);
+ wc.setAttribute(LaunchConfigurationConstants.SECONDARY_VIEW_ID, setSecondaryViewID());
+
try {
config = wc.doSave();
} catch (CoreException e) {
e.printStackTrace();
}
-
+
checkForExistingConfiguration();
-
+
if (!testMode)
DebugUITools.launch(config, mode);
- }
-
+ } else
+ throw new Exception(
+ Messages
+ .getString("SystemTapLaunchShortcut.NullConfiguration") + name); //$NON-NLS-1$
+
}
-
- //TODO: Should merge finishWith and Without binary - we only use
- //the IBinary to find the name, in any case.
+
/**
- * This function is identical to the function above, except it does not
- * require a binary.
- *
- * Helper function to complete launches. Uses protected parameters
- * (Strings) scriptPath, arguments, outputPath and (boolean)
- * overwrite. These must be set by the calling function (or else
- * nonsensical results will occur).
+ * returns true if str == null || str.length() < 1. Convenience method.
*
- * ScriptPath MUST be set.
+ * @param str
+ * @return
+ */
+ private static boolean invalid(String str) {
+ return (str == null || str.length() < 1);
+ }
+
+ /**
+ * Helper function for methods common to both types of finishLaunch.
*
- * @param name: Used to generate the name of the new configuration
- * @param bin: Affiliated executable
- * @param mode: Mode setting
+ * @throws Exception
*/
-protected void finishLaunchWithoutBinary(String name, String mode) {
-
-
- if (scriptPath.length() < 1) {
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("SystemTapLaunchShortcut.ErrorMessagename"), //$NON-NLS-1$
- Messages.getString("SystemTapLaunchShortcut.ErrorMessageTitle"), Messages.getString("SystemTapLaunchShortcut.ErrorMessage") + name); //$NON-NLS-1$ //$NON-NLS-2$
+ private boolean finishLaunchHelper() throws Exception {
+ if (invalid(scriptPath))
+ scriptPath = setScriptPath();
+ if (invalid(scriptPath)) {
+ // Setting the variable didn't work, do not launch.
+
+ SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
+ Messages
+ .getString("SystemTapLaunchShortcut.ErrorMessageName"), //$NON-NLS-1$
+ Messages
+ .getString("SystemTapLaunchShortcut.ErrorMessageTitle"), Messages.getString("SystemTapLaunchShortcut.ErrorMessage") + name); //$NON-NLS-1$ //$NON-NLS-2$
mess.schedule();
- return;
+ return false;
}
-
- ILaunchConfigurationWorkingCopy wc = null;
- if (config != null) {
- try {
- wc = config.getWorkingCopy();
- } catch (CoreException e1) {
- e1.printStackTrace();
- }
-
- wc.setAttribute(LaunchConfigurationConstants.SCRIPT_PATH, scriptPath);
- wc.setAttribute(LaunchConfigurationConstants.OUTPUT_PATH, outputPath);
- wc.setAttribute(LaunchConfigurationConstants.ARGUMENTS, arguments);
- wc.setAttribute(LaunchConfigurationConstants.GENERATED_SCRIPT, generatedScript);
- wc.setAttribute(LaunchConfigurationConstants.NEED_TO_GENERATE, needToGenerate);
- wc.setAttribute(LaunchConfigurationConstants.OVERWRITE, overwrite);
- wc.setAttribute(LaunchConfigurationConstants.USE_COLOUR, useColours);
-
- try {
- config = wc.doSave();
- } catch (CoreException e) {
- e.printStackTrace();
- }
- checkForExistingConfiguration();
+ if (invalid(parserID))
+ parserID = setParserID();
+ if (invalid(parserID)) {
+ SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
+ Messages.getString("SystemTapLaunchShortcut.InvalidParser1"), //$NON-NLS-1$
+ Messages.getString("SystemTapLaunchShortcut.InvalidParser2"), Messages.getString("SystemTapLaunchShortcut.InvalidParser3")); //$NON-NLS-1$ //$NON-NLS-2$
+ mess.schedule();
+ return false;
+ }
- if (!testMode)
- DebugUITools.launch(config, mode);
+ if (invalid(viewID))
+ viewID = setViewID();
+ if (invalid(viewID)) {
+ // Setting the variable didn't work, do not launch.
+ SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
+ Messages.getString("SystemTapLaunchShortcut.InvalidView1"), //$NON-NLS-1$
+ Messages.getString("SystemTapLaunchShortcut.InvalidView2"), Messages.getString("SystemTapLaunchShortcut.InvalidView3")); //$NON-NLS-1$ //$NON-NLS-2$
+ mess.schedule();
+ return false;
}
- }
+ if (needToGenerate) {
+ if (invalid(generatedScript))
+ generatedScript = generateScript();
+ if (invalid(generatedScript)) {
+ // Setting the variable didn't work, do not launch.
+ SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
+ Messages
+ .getString("SystemTapLaunchShortcut.InvalidGeneration1"), //$NON-NLS-1$
+ Messages
+ .getString("SystemTapLaunchShortcut.InvalidGeneration2"), Messages.getString("SystemTapLaunchShortcut.InvalidGeneration3"));//$NON-NLS-1$ //$NON-NLS-2$
+ mess.schedule();
+ return false;
+ }
+ }
+ return true;
+ }
-/**
- * Returns bin.getPath().toString()
- *
- * @param bin
- * @return
- */
+ /**
+ * Returns bin.getPath().toString()
+ *
+ * @param bin
+ * @return
+ */
public String getName(IBinary bin) {
if (bin != null) {
binName = bin.getPath().toString();
} else {
binName = ""; //$NON-NLS-1$
-// SystemTapUIErrorMessages error = new SystemTapUIErrorMessages(
-// "Null_Binary",
-// "Invalid executable",
-// "An error has occured: a binary/executable file was not given to the launch shortcut.");
-// error.schedule();
+ // SystemTapUIErrorMessages error = new SystemTapUIErrorMessages(
+ // "Null_Binary",
+ // "Invalid executable",
+ // "An error has occured: a binary/executable file was not given to the launch shortcut.");
+ // error.schedule();
}
return binName;
}
-
+
/**
* Creates a configuration for the given IBinary
*
*/
@Override
- protected ILaunchConfiguration createConfiguration(IBinary bin){
- if (bin != null){
+ protected ILaunchConfiguration createConfiguration(IBinary bin) {
+ if (bin != null) {
return super.createConfiguration(bin);
- }else{
+ } else {
try {
- return getLaunchConfigType().newInstance(null, getLaunchManager().generateUniqueLaunchConfigurationNameFrom(Messages.getString("SystemTapLaunchShortcut.0"))); //$NON-NLS-1$
+ return getLaunchConfigType()
+ .newInstance(
+ null,
+ getLaunchManager()
+ .generateUniqueLaunchConfigurationNameFrom(
+ Messages
+ .getString("SystemTapLaunchShortcut.Invalid"))); //$NON-NLS-1$
} catch (CoreException e) {
e.printStackTrace();
}
}
return null;
}
-
-
/**
* Creates a configuration with the given name - does not use a binary
@@ -327,51 +399,61 @@ protected void finishLaunchWithoutBinary(String name, String mode) {
ILaunchConfiguration config = null;
try {
ILaunchConfigurationType configType = getLaunchConfigType();
- ILaunchConfigurationWorkingCopy wc = configType.newInstance(null, getLaunchManager().generateUniqueLaunchConfigurationNameFrom(name));
-
+ ILaunchConfigurationWorkingCopy wc = configType.newInstance(null,
+ getLaunchManager()
+ .generateUniqueLaunchConfigurationNameFrom(name));
+
setDefaultProfileAttributes(wc);
-
+
config = wc.doSave();
} catch (CoreException e) {
e.printStackTrace();
}
return config;
}
-
+
/**
- * Allows null configurations to be launched. Any launch that uses a binary should
- * never call this configuration with a null parameter, and any launch that does not
- * use a binary should never call this function. The null handling is included for
- * ease of testing.
+ * Allows null configurations to be launched. Any launch that uses a binary
+ * should never call this configuration with a null parameter, and any
+ * launch that does not use a binary should never call this function. The
+ * null handling is included for ease of testing.
*
* @param bin
- * @param name - Customize the name based on the shortcut being launched
+ * @param name
+ * - Customize the name based on the shortcut being launched
* @return A launch configuration, or null
*/
protected ILaunchConfiguration createConfiguration(IBinary bin, String name) {
if (bin != null) {
config = null;
try {
- String projectName = bin.getResource().getProjectRelativePath().toString();
+ String projectName = bin.getResource().getProjectRelativePath()
+ .toString();
ILaunchConfigurationType configType = getLaunchConfigType();
- ILaunchConfigurationWorkingCopy wc = configType.newInstance(null,
- getLaunchManager().generateUniqueLaunchConfigurationNameFrom(name + " - " + bin.getElementName())); //$NON-NLS-1$
-
- wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, projectName);
+ ILaunchConfigurationWorkingCopy wc = configType.newInstance(
+ null, getLaunchManager()
+ .generateUniqueLaunchConfigurationNameFrom(
+ name + " - " + bin.getElementName())); //$NON-NLS-1$
+
+ wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME,projectName);
wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, bin.getCProject().getElementName());
- wc.setMappedResources(new IResource[] {bin.getResource(), bin.getResource().getProject()});
- wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, (String) null);
-
+ wc.setMappedResources(new IResource[] { bin.getResource(),bin.getResource().getProject() });
+ wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,(String) null);
+
setDefaultProfileAttributes(wc);
-
+
config = wc.doSave();
} catch (CoreException e) {
e.printStackTrace();
}
- }
- else
+ } else
try {
- ILaunchConfigurationWorkingCopy wc = getLaunchConfigType().newInstance(null, getLaunchManager().generateUniqueLaunchConfigurationNameFrom(name)); //$NON-NLS-1$
+ ILaunchConfigurationWorkingCopy wc = getLaunchConfigType()
+ .newInstance(
+ null,
+ getLaunchManager()
+ .generateUniqueLaunchConfigurationNameFrom(
+ name)); //$NON-NLS-1$
setDefaultProfileAttributes(wc);
config = wc.doSave();
} catch (CoreException e) {
@@ -380,58 +462,60 @@ protected void finishLaunchWithoutBinary(String name, String mode) {
}
return config;
}
-
+
/**
- * Creates an error message stating that the launch failed for the specified reason.
+ * Creates an error message stating that the launch failed for the specified
+ * reason.
*
* @param reason
*/
protected void failedToLaunch(String reason) {
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("SystemTapLaunchShortcut.StapLaunchFailed"), //$NON-NLS-1$
- Messages.getString("SystemTapLaunchShortcut.StapLaunchFailedTitle"), Messages.getString("SystemTapLaunchShortcut.StapLaunchFailedMessage") + reason); //$NON-NLS-1$ //$NON-NLS-2$
+ SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
+ Messages.getString("SystemTapLaunchShortcut.StapLaunchFailed"), //$NON-NLS-1$
+ Messages
+ .getString("SystemTapLaunchShortcut.StapLaunchFailedTitle"), Messages.getString("SystemTapLaunchShortcut.StapLaunchFailedMessage") + reason); //$NON-NLS-1$ //$NON-NLS-2$
mess.schedule();
}
-
-
+
public void errorHandler() {
};
-
- /**
+ /*
* The following are convenience methods for test programs, etc. to check
* the value of certain protected parameters.
- *
*/
+
public ILaunchConfigurationType outsideGetLaunchConfigType() {
return getLaunchConfigType();
}
public ILaunchConfiguration getConfig() {
- return config;
+ return config;
}
public String getScriptPath() {
return scriptPath;
}
-
+
public String getDirPath() {
return dirPath;
}
-
+
public String getArguments() {
return arguments;
}
-
+
public String getBinaryPath() {
return binaryPath;
}
/**
- * Retrieves the names of all functions referenced by the binary. If searchForResource
- * is true, this function will return all function names belonging to an element with name
- * matching the String held by resourceToSearchFor. Otherwise it will create a dialog
- * prompting the user to select from a list of files to profile, or select the only
- * available file if only one file is available.
+ * Retrieves the names of all functions referenced by the binary. If
+ * searchForResource is true, this function will return all function names
+ * belonging to an element with name matching the String held by
+ * resourceToSearchFor. Otherwise it will create a dialog prompting the user
+ * to select from a list of files to profile, or select the only available
+ * file if only one file is available.
*
*
* @param bin
@@ -441,34 +525,39 @@ protected void finishLaunchWithoutBinary(String name, String mode) {
String funcs = ""; //$NON-NLS-1$
if (bin == null)
return funcs;
- try {
+ try {
ArrayList<ICContainer> list = new ArrayList<ICContainer>();
TranslationUnitVisitor v = new TranslationUnitVisitor();
-// ASTTranslationUnitVisitor v = new ASTTranslationUnitVisitor();
+ // ASTTranslationUnitVisitor v = new ASTTranslationUnitVisitor();
- for (ICElement b : bin.getCProject().getChildrenOfType(ICElement.C_CCONTAINER)) {
+ for (ICElement b : bin.getCProject().getChildrenOfType(
+ ICElement.C_CCONTAINER)) {
ICContainer c = (ICContainer) b;
-
- for (ITranslationUnit tu : c .getTranslationUnits()) {
- if (searchForResource && tu.getElementName().contains(targetResource)) {
+
+ for (ITranslationUnit tu : c.getTranslationUnits()) {
+ if (searchForResource
+ && tu.getElementName().contains(targetResource)) {
tu.accept(v);
- funcs+=v.getFunctions();
+ funcs += v.getFunctions();
return funcs;
} else {
if (!list.contains(c))
list.add(c);
}
}
-
- //Iterate down to all children, checking for more C_Containers
+
+ // Iterate down to all children, checking for more C_Containers
while (c.getChildrenOfType(ICElement.C_CCONTAINER).size() > 0) {
ICContainer e = null;
- for (ICElement d : c.getChildrenOfType(ICElement.C_CCONTAINER)) {
+ for (ICElement d : c
+ .getChildrenOfType(ICElement.C_CCONTAINER)) {
e = (ICContainer) d;
for (ITranslationUnit tu : e.getTranslationUnits()) {
- if (searchForResource && tu.getElementName().contains(targetResource)) {
+ if (searchForResource
+ && tu.getElementName().contains(
+ targetResource)) {
tu.accept(v);
- funcs+=(v.getFunctions());
+ funcs += (v.getFunctions());
return funcs;
} else {
if (!list.contains(c))
@@ -479,250 +568,255 @@ protected void finishLaunchWithoutBinary(String name, String mode) {
c = e;
}
}
-
+
int numberOfFiles = numberOfValidFiles(list.toArray());
if (numberOfFiles == 1) {
for (ICContainer c : list) {
for (ITranslationUnit e : c.getTranslationUnits()) {
- if (e.getElementName().endsWith(".c") || //$NON-NLS-1$
- e.getElementName().endsWith(".cpp")) { //$NON-NLS-1$
+ if (validElement(e)) {
e.accept(v);
- funcs+=v.getFunctions();
+ funcs += v.getFunctions();
}
}
}
} else {
- Object[] unitList = chooseUnit(list, numberOfFiles);
+ Object[] unitList = chooseUnit(list, numberOfFiles);
if (unitList == null || unitList.length == 0) {
return null; //$NON-NLS-1$
- } else if (unitList.length == 1 && unitList[0].toString().equals(USER_SELECTED_ALL)) {
+ } else if (unitList.length == 1
+ && unitList[0].toString().equals(USER_SELECTED_ALL)) {
funcs = "*"; //$NON-NLS-1$
- return funcs;
+ return funcs;
}
-
- StringBuffer tmpFunc = new StringBuffer();
- for (String item : getAllFunctions(bin.getCProject(), unitList)){
- tmpFunc.append(item);
- tmpFunc.append(" "); //$NON-NLS-1$
- }
- funcs = tmpFunc.toString();
-
+
+ StringBuilder tmpFunc = new StringBuilder();
+ for (String item : getAllFunctions(bin.getCProject(), unitList)) {
+ tmpFunc.append(item);
+ tmpFunc.append(" "); //$NON-NLS-1$
+ }
+ funcs = tmpFunc.toString();
+
}
-
+
return funcs;
-
+
} catch (CModelException e) {
e.printStackTrace();
} catch (CoreException e) {
e.printStackTrace();
}
-
+
return null;
}
-
+
/**
- * Creates a dialog that prompts the user to select from the given list
- * of ICElements
+ * Creates a dialog that prompts the user to select from the given list of
+ * ICElements
*
- * @param list: list of ICElements
+ * @param list
+ * : list of ICElements
* @return
*/
- protected Object[] chooseUnit(List<ICContainer> list, int numberOfValidFiles) {
+ protected Object[] chooseUnit(List<ICContainer> list, int numberOfValidFiles) {
ListTreeContentProvider prov = new ListTreeContentProvider();
-
- RuledTreeSelectionDialog dialog = new RuledTreeSelectionDialog(getActiveWorkbenchShell(),
- new WorkbenchLabelProvider(), prov);
-
- dialog.setTitle(Messages.getString("SystemTapLaunchShortcut.8")); //$NON-NLS-1$
- dialog.setMessage(Messages.getString("SystemTapLaunchShortcut.9")); //$NON-NLS-1$
- dialog.setInput(list);
- dialog.setHelpAvailable(false);
- dialog.setStatusLineAboveButtons(false);
- dialog.setEmptyListMessage(Messages.getString("SystemTapLaunchShortcut.10")); //$NON-NLS-1$
- dialog.setContainerMode(true);
-
- Object[] topLevel = prov.findElements(list);
- dialog.setInitialSelections(topLevel);
- dialog.setSize(cap(topLevel.length*10, 30, 55),
- cap((int) (topLevel.length*1.5), 3, 13));
-
- dialog.create();
- OKButton = dialog.getOkButton();
-
- Object[] result = null;
-
-
- if (testMode) {
- OKButton.setSelection(true);
- result = list.toArray();
+
+ RuledTreeSelectionDialog dialog = new RuledTreeSelectionDialog(
+ getActiveWorkbenchShell(), new WorkbenchLabelProvider(), prov);
+
+ dialog.setTitle(Messages.getString("SystemTapLaunchShortcut.SelectFiles")); //$NON-NLS-1$
+ dialog.setMessage(Messages.getString("SystemTapLaunchShortcut.SelectFilesMsg")); //$NON-NLS-1$
+ dialog.setInput(list);
+ dialog.setHelpAvailable(false);
+ dialog.setStatusLineAboveButtons(false);
+ dialog.setEmptyListMessage(Messages
+ .getString("SystemTapLaunchShortcut.NoFiles")); //$NON-NLS-1$
+ dialog.setContainerMode(true);
+
+ Object[] topLevel = prov.findElements(list);
+ dialog.setInitialSelections(topLevel);
+ dialog.setSize(cap(topLevel.length * 10, 30, 55), cap(
+ (int) (topLevel.length * 1.5), 3, 13));
+
+ dialog.create();
+ OKButton = dialog.getOkButton();
+
+ Object[] result = null;
+
+ if (testMode) {
+ OKButton.setSelection(true);
+ result = list.toArray();
ArrayList<Object> output = new ArrayList<Object>();
try {
for (Object obj : result) {
- if (obj instanceof ICContainer){
+ if (obj instanceof ICContainer) {
ICElement[] array = ((ICContainer) obj).getChildren();
for (ICElement c : array) {
- if (!(c.getElementName().endsWith(".c") || //$NON-NLS-1$
- c.getElementName().endsWith(".cpp"))) //$NON-NLS-1$
+ if (!(validElement(c))) //$NON-NLS-1$
continue;
if (c.getElementName().contains("main") && !output.contains(c)) //$NON-NLS-1$
output.add(c);
}
}
}
-
- if ( output.size() >= numberOfValidFiles) {
+
+ if (output.size() >= numberOfValidFiles) {
output.clear();
output.add(USER_SELECTED_ALL);
}
} catch (CModelException e) {
e.printStackTrace();
}
-
+
result = output.toArray();
- }
- else {
- if (dialog.open() == Window.CANCEL)
- return null;
- result = dialog.getResult();
- }
+ } else {
+ if (dialog.open() == Window.CANCEL)
+ return null;
+ result = dialog.getResult();
+ }
if (result == null)
return null;
-
+
ArrayList<Object> output = new ArrayList<Object>();
try {
for (Object obj : result) {
- if (obj instanceof ICContainer){
+ if (obj instanceof ICContainer) {
ICElement[] array = ((ICContainer) obj).getChildren();
for (ICElement c : array) {
- if (!(c.getElementName().endsWith(".c") || //$NON-NLS-1$
- c.getElementName().endsWith(".cpp"))) //$NON-NLS-1$
+ if (!(validElement(c))) //$NON-NLS-1$
continue;
if (!output.contains(c))
output.add(c);
}
- }
- else if (obj instanceof ICElement) {
- if (((ICElement) obj).getElementName().endsWith(".c") //$NON-NLS-1$
- || ((ICElement) obj).getElementName().endsWith(".cpp")) { //$NON-NLS-1$
+ } else if (obj instanceof ICElement) {
+ if (validElement((ICElement) obj)) { //$NON-NLS-1$
if (!output.contains(obj)) {
output.add(obj);
}
}
}
}
-
- if ( output.size() >= numberOfValidFiles) {
+
+ if (output.size() >= numberOfValidFiles) {
output.clear();
output.add(USER_SELECTED_ALL);
}
} catch (CModelException e) {
e.printStackTrace();
}
-
+
return output.toArray();
}
-
-
+
private int numberOfValidFiles(Object[] list) throws CModelException {
int output = 0;
for (Object parent : list) {
if (parent instanceof ICContainer) {
ICContainer cont = (ICContainer) parent;
- for (ICElement ele : cont.getChildren()) {
+ for (ICElement ele : cont.getChildren()) {
if (ele instanceof ICContainer) {
- output += numberOfValidFiles(((ICContainer) ele).getChildren());
+ output += numberOfValidFiles(((ICContainer) ele)
+ .getChildren());
}
if (ele instanceof ICElement) {
- if (ele.getElementName().endsWith(".c") || //$NON-NLS-1$
- ele.getElementName().endsWith(".cpp")) //$NON-NLS-1$
+ if (validElement(ele))
output++;
}
}
} else if (parent instanceof ICElement) {
- if (((ICElement) parent).getElementName().endsWith(".c") || //$NON-NLS-1$
- ((ICElement) parent).getElementName().endsWith(".cpp")) //$NON-NLS-1$
- output++;
+ if (validElement((ICElement) parent))
+ output++;
}
}
return output;
}
-
/**
* Convenience method for creating a new configuration
+ *
* @return a new configuration
- * @throws CoreException
+ * @throws CoreException
*/
public ILaunchConfiguration getNewConfiguration() throws CoreException {
ILaunchConfigurationType configType = getLaunchConfigType();
- ILaunchConfigurationWorkingCopy wc = configType.newInstance(null,
- getLaunchManager().generateUniqueLaunchConfigurationNameFrom("TestingConfiguration")); //$NON-NLS-1$
+ ILaunchConfigurationWorkingCopy wc = configType.newInstance(null,
+ getLaunchManager().generateUniqueLaunchConfigurationNameFrom(
+ "TestingConfiguration")); //$NON-NLS-1$
return wc.doSave();
-
+
}
-
-
+
/**
- * @param project : C Project Type
- * @return A String list of all functions contained within the specified
- * C Project
+ * @param project
+ * : C Project Type
+ * @return A String list of all functions contained within the specified C
+ * Project
*/
- public static ArrayList<String> getAllFunctions(ICProject project, Object [] listOfFiles){
+ public static ArrayList<String> getAllFunctions(ICProject project,
+ Object[] listOfFiles) {
try {
- GetFunctionsJob j = new GetFunctionsJob(project.getHandleIdentifier(), project, listOfFiles);
+ GetFunctionsJob j = new GetFunctionsJob(project
+ .getHandleIdentifier(), project, listOfFiles);
j.schedule();
j.join();
ArrayList<String> functionList = j.getFunctionList();
-
+
return functionList;
} catch (InterruptedException e) {
e.printStackTrace();
}
return null;
}
-
- private static boolean specialContains (Object [] list, String input){
- for (Object val : list){
+
+ /**
+ * Returns all ICElements in val that contains the given path. WARNING: Uses
+ * .contains, so be careful with the String path or you'll get too many
+ * hits.
+ *
+ * @param list
+ * @param path
+ * @return
+ */
+ private static boolean specialContains(Object[] list, String path) {
+ for (Object val : list) {
if (val instanceof ICElement) {
ICElement el = (ICElement) val;
- if (el.getPath().toString().contains(input)){
+ if (el.getPath().toString().contains(path)) {
return true;
}
}
}
return false;
}
-
-
-
- private int cap (int number, int low, int high) {
+
+ /**
+ * Returns a number clipped into the range [low,high].
+ *
+ * @param number
+ * @param low
+ * @param high
+ * @return number if number is in [low,high], low, or high.
+ */
+ private int cap(int number, int low, int high) {
if (number > high)
return high;
if (number < low)
return low;
return number;
}
-
+
/**
- * Function for generating scripts. Should be overriden by interested classes
- * @throws IOException
+ * Function for generating scripts. Should be overriden by interested
+ * classes
+ *
+ * @throws IOException
*/
public String generateScript() throws IOException {
return null;
}
-
- public void setScriptPath(String val) {
- this.scriptPath = val;
- }
- public void setBinary(IBinary val) {
- this.bin = val;
- }
-
-
private static class GetFunctionsJob extends Job {
private ArrayList<String> functionList;
private ICProject project;
@@ -739,55 +833,154 @@ protected void finishLaunchWithoutBinary(String name, String mode) {
protected IStatus run(IProgressMonitor monitor) {
IIndexManager manager = CCorePlugin.getIndexManager();
IIndex index = null;
-
+ IProgressMonitor m = monitor;
+
+ if (m == null)
+ m = new NullProgressMonitor();
+ m.worked(1);
+
try {
index = manager.getIndex(project);
index.acquireReadLock();
-
+
IIndexFile[] blah = index.getAllFiles();
for (IIndexFile file : blah) {
String fullFilePath = file.getLocation().getFullPath();
- if (fullFilePath == null || !specialContains(listOfFiles, fullFilePath)) {
+ if (fullFilePath == null
+ || !specialContains(listOfFiles, fullFilePath)) {
continue;
}
- IIndexName[] indexNamesArray = file.findNames(0, Integer.MAX_VALUE);
+ IIndexName[] indexNamesArray = file.findNames(0,
+ Integer.MAX_VALUE);
for (IIndexName name : indexNamesArray) {
- if (name.isDefinition() && specialContains(listOfFiles, name.getFile().getLocation().getFullPath())) {
- IIndexBinding binder = index.findBinding(name);
- if (binder instanceof IFunction && !functionList.contains(binder.getName())) {
- functionList.add(binder.getName());
- }
+ if (name.isDefinition()
+ && specialContains(listOfFiles, name.getFile()
+ .getLocation().getFullPath())) {
+ IIndexBinding binder = index.findBinding(name);
+ if (binder instanceof IFunction
+ && !functionList.contains(binder.getName())) {
+ functionList.add(binder.getName());
+ }
}
}
-
+
+ m.worked(1);
}
-
+
} catch (CoreException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
-
+
index.releaseReadLock();
return Status.OK_STATUS;
}
-
+
public ArrayList<String> getFunctionList() {
return functionList;
}
}
-
+
+ /**
+ * Set the parserID variable. ParserID should point to the ID of an
+ * extension extending the org.eclipse.linuxtools.callgraph.core.parser
+ * extension point. This function must return the parserID to be set.
+ *
+ * If not declared, the parserID will be set to the default SystemTap
+ * Text parser with colour support
+ *
+ * @return a valid parserID
+ */
+ public String setParserID() {
+ return PluginConstants.DEFAULT_PARSER_ID;
+ }
+
public String getScript() {
return generatedScript;
}
-
+
public Button getButton() {
return OKButton;
}
-
+
public void setTestMode(boolean val) {
testMode = val;
}
+
+ /**
+ * Set the viewID variable. ViewID should point to the ID of an extension
+ * extending the org.eclipse.ui.views extension point. This function must
+ * return the viewID to be set. Defaults to the SystemTap Text View, if
+ * not overridden.
+ *
+ * @return a valid viewID
+ */
+ public String setViewID() {
+ return PluginConstants.DEFAULT_VIEW_ID;
+ }
+
+ public static boolean validElement(ICElement e) {
+ return e.getElementName().endsWith(".c") || //$NON-NLS-1$
+ e.getElementName().endsWith(".cpp") || //$NON-NLS-1$
+ e.getElementName().endsWith(".h"); //$NON-NLS-1$
+ }
+
+
+ /**
+ * Default implementation of launch. It will run stap with the selected binary
+ * as an argument and set the output path to <code>PluginConstants.getDefaultIOPath()</code>.
+ * <br>
+ * The name of the created launch will be 'DefaultSystemTapLaunch'
+ */
+ public void launch(IBinary bin, String mode) {
+ initialize();
+ this.bin = bin;
+ binName = getName(bin);
+ name = "DefaultSystemTapLaunch"; //$NON-NLS-1$
+
+ try {
+
+ config = createConfiguration(bin, name);
+ binaryPath = bin.getResource().getLocation().toString();
+ arguments = binaryPath;
+ outputPath = PluginConstants.getDefaultIOPath();
+ finishLaunch(name, mode);
+
+ } catch (IOException e) {
+ SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
+ "LaunchShortcutScriptGen", //$NON-NLS-1$
+ Messages.getString("LaunchStapGraph.ScriptGenErr"), //$NON-NLS-1$
+ Messages.getString("LaunchStapGraph.ScriptGenErrMsg")); //$NON-NLS-1$
+ mess.schedule();
+ e.printStackTrace();
+ } catch (CoreException e1) {
+ e1.printStackTrace();
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ resourceToSearchFor = ""; //$NON-NLS-1$
+ searchForResource = false;
+ }
+
+
+ }
+
+
+ /**
+ * Each launch class should define its own script path. Must return the
+ * correct script path or launch will fail.
+ */
+ public abstract String setScriptPath();
+
+ /**
+ * Overwrite to return a non-empty string if you want to be able to create
+ * multiple views.
+ * @return
+ */
+ public String setSecondaryViewID() {
+ return ""; //$NON-NLS-1$
+ }
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapOptionsTab.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapOptionsTab.java
index b6fc8c1f5a..896e9e8171 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapOptionsTab.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapOptionsTab.java
@@ -12,6 +12,7 @@
package org.eclipse.linuxtools.callgraph.launch;
import java.io.File;
+import java.util.ArrayList;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
@@ -32,6 +33,7 @@ import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.linuxtools.callgraph.core.LaunchConfigurationConstants;
import org.eclipse.linuxtools.callgraph.core.PluginConstants;
+import org.eclipse.linuxtools.callgraph.core.SystemTapView;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.events.FocusEvent;
@@ -87,11 +89,14 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
protected Text button_D_text;
protected Text binaryArguments;
protected Text parser;
+ protected Text viewer;
// protected Text commandFile;
protected Button fileBrowseButton;
protected Button workspaceBrowseButton;
protected Button parserButton;
+ protected Button viewerButton;
+
protected Button button_v;
protected Button button_k;
@@ -149,7 +154,7 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
scriptFile.setEnabled(false);
workspaceBrowseButton.setEnabled(false);
fileBrowseButton.setEnabled(false);
- scriptFile.setText(PluginConstants.PLUGIN_LOCATION+"parse_function.stp"); //$NON-NLS-1$
+ scriptFile.setText(PluginConstants.getPluginLocation()+"parse_function.stp"); //$NON-NLS-1$
}else{
scriptFile.setEnabled(true);
workspaceBrowseButton.setEnabled(true);
@@ -307,7 +312,7 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
/*
- * Parser folder -- Tab for selecting a parser to use
+ * Parser folder -- Tab for selecting a parser and viewer to use
*/
parserFolder = new TabFolder(top, SWT.BORDER);
parserFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
@@ -367,7 +372,7 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
browseTop.setLayoutData(browseData);
Label suppFileLabel = new Label(browseTop, SWT.NONE);
- suppFileLabel.setText("Parser");
+ suppFileLabel.setText("Parser"); //$NON-NLS-1$
parser = new Text(browseTop, SWT.BORDER);
parser.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
@@ -393,6 +398,46 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
}
}
});
+
+
+ viewer = new Text(browseTop, SWT.BORDER);
+ viewer.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ viewer.addModifyListener(modifyListener);
+
+ viewerButton = createPushButton(browseTop,
+ "Find viewers", null); //$NON-NLS-1$
+ viewerButton.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(),
+ new ListLabelProvider());
+ dialog.setTitle("Select viewer"); //$NON-NLS-1$
+ dialog.setMessage("Select viewer to use."); //$NON-NLS-1$
+ IExtensionRegistry reg = Platform.getExtensionRegistry();
+ IConfigurationElement[] extensions = reg
+ .getConfigurationElementsFor(PluginConstants.VIEW_RESOURCE,
+ PluginConstants.VIEW_NAME);
+ ArrayList<IConfigurationElement> ext = new ArrayList<IConfigurationElement>();
+ for (IConfigurationElement el : extensions) {
+ if (!el.getNamespaceIdentifier().contains("org.eclipse.linuxtools")) //$NON-NLS-1$
+ continue;
+ //TODO: Rough hack to get all the objects. We restrict to id's containing org.eclipse.linuxtools, then see if the class extends SystemTapView
+ try {
+ if (el.createExecutableExtension(PluginConstants.ATTR_CLASS)
+ instanceof SystemTapView) {
+ ext.add(el);
+ }
+ } catch (CoreException e1) {
+ }
+ }
+
+ dialog.setElements(ext.toArray());
+ if (dialog.open() == IDialogConstants.OK_ID) {
+ String arg = getUsefulLabel(dialog.getFirstResult());
+ viewer.setText(arg);
+ }
+ }
+ });
+
}
protected void createGeneratedScriptOption(Composite generatedScriptTop) {
@@ -757,7 +802,7 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
Label button_D_label = new Label(buttonsTop, SWT.NONE);
button_D_label.setText(Messages.getString("SystemTapOptionsTab.PreprocessorDirective")); //$NON-NLS-1$
button_D_text = new Text(buttonsTop, SWT.BORDER);
- button_D_text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ button_D_text.setLayoutData(new GridData(200,15));
button_D_text.addModifyListener(modifyListener);
button_D_label.setToolTipText(
Messages.getString("SystemTapOptionsTab.42") + //$NON-NLS-1$
@@ -807,6 +852,7 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
binaryArguments.setText(configuration.getAttribute(LaunchConfigurationConstants.BINARY_ARGUMENTS, LaunchConfigurationConstants.DEFAULT_BINARY_ARGUMENTS));
parser.setText(configuration.getAttribute(LaunchConfigurationConstants.PARSER_CLASS, LaunchConfigurationConstants.DEFAULT_PARSER_CLASS));
+ viewer.setText(configuration.getAttribute(LaunchConfigurationConstants.VIEW_CLASS, LaunchConfigurationConstants.DEFAULT_VIEW_CLASS));
if (generatedScript != null){
generatedScript.setText(configuration.getAttribute(LaunchConfigurationConstants.GENERATED_SCRIPT, LaunchConfigurationConstants.DEFAULT_GENERATED_SCRIPT));
@@ -845,6 +891,8 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
configuration.setAttribute(LaunchConfigurationConstants.COMMAND_TARGET_PID, button_x_Spinner.getSelection());
configuration.setAttribute(LaunchConfigurationConstants.PARSER_CLASS, parser.getText());
+ configuration.setAttribute(LaunchConfigurationConstants.VIEW_CLASS, viewer.getText());
+
configuration.setAttribute(LaunchConfigurationConstants.COMMAND_C_DIRECTIVES, button_D_text.getText());
configuration.setAttribute(LaunchConfigurationConstants.BINARY_PATH, binaryFile.getText());
configuration.setAttribute(LaunchConfigurationConstants.SCRIPT_PATH, scriptFile.getText());
@@ -912,6 +960,8 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
configuration.setAttribute(LaunchConfigurationConstants.GENERATED_SCRIPT, LaunchConfigurationConstants.DEFAULT_GENERATED_SCRIPT);
configuration.setAttribute(LaunchConfigurationConstants.NEED_TO_GENERATE, LaunchConfigurationConstants.DEFAULT_NEED_TO_GENERATE);
configuration.setAttribute(LaunchConfigurationConstants.PARSER_CLASS, LaunchConfigurationConstants.DEFAULT_PARSER_CLASS);
+ configuration.setAttribute(LaunchConfigurationConstants.VIEW_CLASS, LaunchConfigurationConstants.DEFAULT_VIEW_CLASS);
+
configuration.setAttribute(LaunchConfigurationConstants.USE_COLOUR, LaunchConfigurationConstants.DEFAULT_USE_COLOUR);
@@ -962,7 +1012,7 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
return e.getUniqueIdentifier();
}
}
- return "Invalid";
+ return Messages.getString("SystemTapOptionsTab.1"); //$NON-NLS-1$
}
@@ -987,7 +1037,7 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
}
}
- return "No name -- set name attribute of extension"; }
+ return Messages.getString("SystemTapOptionsTab.46"); } //$NON-NLS-1$
@Override
public void addListener(ILabelProviderListener listener) {
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/messages.properties b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/messages.properties
index 797ef1fec1..72e1ce360f 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/messages.properties
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/messages.properties
@@ -1,65 +1,56 @@
-###############################################################################
-# Copyright (c) 2009 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Red Hat - initial API and implementation
-###############################################################################
-LaunchAbout.0=About SystemTap Eclipse plugin
-LaunchAbout.11=Function callgraph: Produces a graph of all function calls. You can also mark functions by
-LaunchAbout.12=\ pressing CTRL+4 while in the editor. (Warning: Marking functions currently annotates your code
-LaunchAbout.13=\ by adding calls to a ___STAP_MARKER___ function.)\n\n
-LaunchAbout.17=Launch Wizard: Helper for launching SystemTap scripts.\n\n
-LaunchAbout.2=-------------SystemTap Eclipse Plugin---------\n
-LaunchAbout.20=Thank you for trying the SystemTap Eclipse plugin - if you have any comments or
-LaunchAbout.21=suggestions, please feel free to direct them to the e-mails above\!
-LaunchAbout.3=/*********************************************\n
-LaunchAbout.4=* Comments and concerns:\n
-LaunchAbout.5=* Charley Wang (chwang@redhat.com)\t\t\n
-LaunchAbout.6=* Roland Grunberg (rgrunber@redhat.com) \n
-LaunchAbout.7=*********************************************/\n\n
-LaunchAbout.8=Available pre-bundled scripts:\n\n
-LaunchStapGraph.0=Error generating script
-LaunchStapGraph.6=The path to the temporary script could not be opened.
-LaunchWizard.0=Welcome to SystemTap Wizard
-LaunchWizard.1=The SystemTap Wizard will guide you through the process of launching a
-LaunchWizard.2=script through Eclipse. \n\nFirst, please name your new launch configuration.
-LaunchWizard.20=Binary file:
-LaunchWizard.21=Arguments:
-LaunchWizard.22=Function
-LaunchWizard.23=Wizard Opener
-LaunchWizard.24=Launch
-LaunchWizard.3=If the name already exists, a (1), (2), etc. will be appended to make the name unique.\n
-LaunchWizard.4=MyWizardLaunch
-LaunchWizard.19=Script:
-RunSystemTapAction.0=System Tap Command Executing...
-SystemTapLaunchConfigurationDelegate.0=SystemTapLaunchConfigurationDelegate does not have a command yet
-SystemTapLaunchConfigurationDelegate.8=realtime
-SystemTapLaunchConfigurationDelegate.9=true
+LaunchStapGraph.ScriptGenErr=Error generating script
+LaunchStapGraph.ScriptGenErrMsg=The path to the temporary script could not be opened.
+LaunchWizard.WelcomeWizard=Welcome to SystemTap Wizard
+LaunchWizard.Text1=The SystemTap Wizard will guide you through the process of launching a
+LaunchWizard.Text2=script through Eclipse. \n\nFirst, please name your new launch configuration.
+LaunchWizard.Text3=If the name already exists, a (1), (2), etc. will be appended to make the name unique.\n
+LaunchWizard.NamePrefix=MyWizardLaunch
+LaunchWizard.BinFile=Binary file:
+LaunchWizard.Args=Arguments:
+LaunchWizard.Func=Function
+LaunchWizard.Launch=Launch
+LaunchWizard.Script=Script:
+SystemTapLaunchConfigurationDelegate.0=NoOutput
+SystemTapLaunchConfigurationDelegate.1=Output file broken
+SystemTapLaunchConfigurationDelegate.2=Output file
+SystemTapLaunchConfigurationDelegate.3=\ threw an IOException
+SystemTapLaunchConfigurationDelegate.NoCommand=SystemTapLaunchConfigurationDelegate does not have a command yet
+SystemTapLaunchConfigurationDelegate.CallGraphGenericError=CallGraph Error
SystemTapLaunchConfigurationDelegate.DocWriterName=DocWriter, Delegate
+SystemTapLaunchConfigurationDelegate.EndMessage1=Configuration name:
+SystemTapLaunchConfigurationDelegate.EndMessage2=Binary arguments :
+SystemTapLaunchConfigurationDelegate.EndMessage3=To change this command, check under the Binary
+SystemTapLaunchConfigurationDelegate.EndMessage4=Arguments tab for this configuration in
+SystemTapLaunchConfigurationDelegate.EndMessage5=Profile As --> Profile Configurations.
SystemTapLaunchConfigurationDelegate.InvalidParser1=Invalid parser
-SystemTapLaunchConfigurationDelegate.InvalidParser2=invalid parser
-SystemTapLaunchConfigurationDelegate.InvalidParser3=The selected parser is not valid. Please select a different parser. \n\n
-SystemTapLaunchConfigurationDelegate.InvalidParser4=Invalid id:
-SystemTapLaunchConfigurationDelegate.NullProcessErrorMessage1=SystemTap could not execute. This could be due to missing
-SystemTapLaunchConfigurationDelegate.NullProcessErrorMessage2=packages that are necessary to the running of SystemTap
-SystemTapLaunchConfigurationDelegate.NullProcessErrorName=Error
-SystemTapLaunchConfigurationDelegate.NullProcessErrorTitle=SystemTap Error
-SystemTapLaunchConfigurationDelegate.stap_command=\ stap command:
-SystemTapLaunchShortcut.0=invalid
-SystemTapLaunchShortcut.10=No files found.
-SystemTapLaunchShortcut.8=Select files to probe
-SystemTapLaunchShortcut.9=For faster probing, select all files.
+SystemTapLaunchConfigurationDelegate.InvalidParser2=The selected parser is not valid. Please select a different parser. \n\n
+SystemTapLaunchConfigurationDelegate.InvalidParser3=Invalid id:
+SystemTapLaunchConfigurationDelegate.Relaunch10=Configuration name:
+SystemTapLaunchConfigurationDelegate.Relaunch8=No binary commands specified. To specify commands,
+SystemTapLaunchConfigurationDelegate.Relaunch9=check under the Binary Arguments tab for this
+SystemTapLaunchConfigurationDelegate.stap_command=\ stap command: \n
+SystemTapLaunchConfigurationDelegate.stapNotFound=The SystemTap command 'stap' could not be executed. Please make sure SystemTap is installed and that 'stap' is on the system path.
+SystemTapLaunchShortcut.Invalid=invalid
+SystemTapLaunchShortcut.NoFiles=No files found.
+SystemTapLaunchShortcut.SelectFiles=Select files to probe
+SystemTapLaunchShortcut.SelectFilesMsg=For faster probing, select all files.
SystemTapLaunchShortcut.ErrorMessage=Error: Script path not given by :
-SystemTapLaunchShortcut.ErrorMessagename=Error
SystemTapLaunchShortcut.ErrorMessageName=Error
SystemTapLaunchShortcut.ErrorMessageTitle=Script not found
+SystemTapLaunchShortcut.InvalidGeneration1=Generation Error
+SystemTapLaunchShortcut.InvalidGeneration2=Script not generated
+SystemTapLaunchShortcut.InvalidGeneration3=Launch shortcut specifies needToGenerate but does not specify a corresponding generateScript() function.
+SystemTapLaunchShortcut.InvalidParser1=no_parser_specified_error_message
+SystemTapLaunchShortcut.InvalidParser2=No parser specified
+SystemTapLaunchShortcut.InvalidParser3=A null parserID or empty parserID was submitted. Please submit a valid parserID. Parsers should extend the bundled parser extension point.
+SystemTapLaunchShortcut.InvalidView1=no_view_specified_error_message
+SystemTapLaunchShortcut.InvalidView2=No view specified
+SystemTapLaunchShortcut.InvalidView3=A null viewID or empty viewID was submitted. Please submit a valid viewID. Views should extend org.eclipse.ui.views.
+SystemTapLaunchShortcut.NullConfiguration=Configuration is null for
SystemTapLaunchShortcut.StapLaunchFailed=FailedToLaunch
SystemTapLaunchShortcut.StapLaunchFailedMessage=The launch failed. This could be because of :
SystemTapLaunchShortcut.StapLaunchFailedTitle=Launch failed
+SystemTapOptionsTab.1=Invalid
SystemTapOptionsTab.10=Prologue-searching mode. Activate heuristics to work around
SystemTapOptionsTab.11=incorrect debugging information for $target variables.
SystemTapOptionsTab.12=Unoptimized mode. Disable unused code elision during elaboration.
@@ -99,6 +90,7 @@ SystemTapOptionsTab.42=Add the given C preprocessor directive to the module Make
SystemTapOptionsTab.43=These can be used to override limit parameters.
SystemTapOptionsTab.44=Binary Arguments
SystemTapOptionsTab.45=Please input the desired arguments, separated by spaces to be given to your binary.
+SystemTapOptionsTab.46=No name -- set name attribute of extension
SystemTapOptionsTab.5=Keep the temporary directory after all processing. This may be
SystemTapOptionsTab.6=useful in order to examine the generated C code, or to reuse the
SystemTapOptionsTab.7=compiled kernel object.
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests-feature/feature.properties b/systemtap/org.eclipse.linuxtools.callgraph.tests-feature/feature.properties
index 00e7f1d7b5..57b41ba1d6 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests-feature/feature.properties
+++ b/systemtap/org.eclipse.linuxtools.callgraph.tests-feature/feature.properties
@@ -8,9 +8,9 @@
# Contributors:
# Red Hat, Inc. - initial API and implementation
#********************************************************************************
-featureName=Tests for local SystemTap on Eclipse
+featureName=Callgraph Tests (Incubation)
description=Tests for local integration of SystemTap on Eclipse
-featureProvider=Eclipse
+featureProvider=Eclipse Linux Tools
copyright=Copyright 2009 Red Hat, Inc.
licenseURL=epl-v10.html
license=\
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/ChangeLog b/systemtap/org.eclipse.linuxtools.callgraph.tests/ChangeLog
new file mode 100644
index 0000000000..5831001654
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.callgraph.tests/ChangeLog
@@ -0,0 +1,34 @@
+2010-03-22 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/tests/MouseListenerTest.java: Remove printline call.
+
+2009-12-15 Charley Wang <chwang@redhat.com>
+
+ * (all).graph: Modify to remove semi-colon from ends of lines
+
+2009-12-09 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/tests/StapGraphParserTest.java: Fix to correlate with the new threading output. There are a lot of changes to the .graph files, all to add ',,1;' to the end of each call/return line to indicate that these are single-threaded. Tests for multi-threaded runs will come soon.
+
+2009-11-16 Roland Grunberg <rgrunber@redhat.com>
+
+ * META-INF/MANIFEST.MF: Add Eclipse to Provider field.
+
+2009-11-16 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/tests/SystemTapGraphViewTest.java: Change call to TestHelper to a call to ViewFactory
+ * src/org/eclipse/linuxtools/callgraph/tests/SystemTapGraphTest.java: Change call to TestHelper to a call to ViewFactory. Remove unnecessary checklist, add assert in the call to parse.testRun
+ * src/org/eclipse/linuxtools/callgraph/tests/MouseListenerTest.java: Change call to TestHelper to a call to ViewFactory
+
+2009-11-04 Roland Grunberg <rgrunber@redhat.com>
+
+ * build.properties: Add data files to build.properties
+ * src/org/eclipse/linuxtools/callgraph/tests/StapGraphParserTest.java: Set the correct location for graph data files.
+ * basic.graph: Change all .graph data files format to conform with new parsing strategy
+ * catlan.graph:
+ * comprehensive.graph:
+ * eag.graph:
+ * heavy.graph:
+ * main.graph:
+ * parse_function_nomark.stp: Update stap test script to conform with new data output format
+ * StapGraphParserTest.java: Use non-realtime parsing when parsing the data \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.callgraph.tests/META-INF/MANIFEST.MF
index ca7ea89e3b..3c86f4f56f 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests/META-INF/MANIFEST.MF
+++ b/systemtap/org.eclipse.linuxtools.callgraph.tests/META-INF/MANIFEST.MF
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Tests
+Bundle-Name: Calgraph Graphing Tests (Incubation)
Bundle-SymbolicName: org.eclipse.linuxtools.callgraph.tests;singleton:=true
Bundle-Version: 0.0.1.qualifier
Bundle-Activator: org.eclipse.linuxtools.callgraph.tests.Activator
@@ -16,3 +16,4 @@ Import-Package: org.eclipse.cdt.core.model,
org.eclipse.zest.core.widgets,
org.eclipse.zest.layouts,
org.eclipse.zest.layouts.algorithms
+Bundle-Vendor: Eclipse
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/basic.graph b/systemtap/org.eclipse.linuxtools.callgraph.tests/basic.graph
index f40f0cbc11..ffbea0ad03 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests/basic.graph
+++ b/systemtap/org.eclipse.linuxtools.callgraph.tests/basic.graph
@@ -1,6 +1,8 @@
-
PROBE_BEGIN
-eag
-<main,,1,,1253642348832787256;<foo,,2,,1253642348832800639;>foo,,1253642348832807674;>main,,1253642348832811601;
-1253642348832817971
-30715 \ No newline at end of file
+basic
+<main,,1,,1257346304668588887,,1
+<foo,,2,,1257346304668603747,,1
+>foo,,1257346304668628537,,1
+>main,,1257346304668634399,,1
+-1257346304668646035
++57148 \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/build.properties b/systemtap/org.eclipse.linuxtools.callgraph.tests/build.properties
index c6baffa001..07caf543a7 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests/build.properties
+++ b/systemtap/org.eclipse.linuxtools.callgraph.tests/build.properties
@@ -2,4 +2,10 @@ source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
- icons/
+ icons/,\
+ catlan.graph,\
+ comprehensive.graph,\
+ eag.graph,\
+ heavy.graph,\
+ basic.graph,\
+ main.graph
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/catlan.graph b/systemtap/org.eclipse.linuxtools.callgraph.tests/catlan.graph
index 3ab50c2871..327a464070 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests/catlan.graph
+++ b/systemtap/org.eclipse.linuxtools.callgraph.tests/catlan.graph
@@ -1,6 +1,493 @@
PROBE_BEGIN
-eag
-<main,,1,,1253642412717911933;<catlan,,2,,1253642412717925326;<catlan,,3,,1253642412717935566;<catlan,,4,,1253642412717944129;<catlan,,5,,1253642412717952833;<catlan,,6,,1253642412717961350;<catlan,,7,,1253642412717969909;>catlan,,1253642412717975575;<catlan,,8,,1253642412717982613;>catlan,,1253642412717988032;>catlan,,1253642412717991647;<catlan,,9,,1253642412717998252;>catlan,,1253642412718003749;<catlan,,10,,1253642412718010330;>catlan,,1253642412718015806;<catlan,,11,,1253642412718022399;<catlan,,12,,1253642412718030940;>catlan,,1253642412718036387;<catlan,,13,,1253642412718042961;>catlan,,1253642412718048489;>catlan,,1253642412718051966;>catlan,,1253642412718055421;<catlan,,14,,1253642412718061905;>catlan,,1253642412718067343;<catlan,,15,,1253642412718073881;<catlan,,16,,1253642412718082492;>catlan,,1253642412718087950;<catlan,,17,,1253642412718094603;>catlan,,1253642412718109066;>catlan,,1253642412718113093;<catlan,,18,,1253642412718119950;<catlan,,19,,1253642412718128522;>catlan,,1253642412718133938;<catlan,,20,,1253642412718140537;>catlan,,1253642412718145992;>catlan,,1253642412718149511;<catlan,,21,,1253642412718156100;>catlan,,1253642412718161475;<catlan,,22,,1253642412718168106;<catlan,,23,,1253642412718176633;<catlan,,24,,1253642412718185165;>catlan,,1253642412718190648;<catlan,,25,,1253642412718197291;>catlan,,1253642412718202828;>catlan,,1253642412718206326;<catlan,,26,,1253642412718212993;>catlan,,1253642412718218350;<catlan,,27,,1253642412718224942;>catlan,,1253642412718230292;<catlan,,28,,1253642412718236849;<catlan,,29,,1253642412718245432;>catlan,,1253642412718250903;<catlan,,30,,1253642412718257537;>catlan,,1253642412718262975;>catlan,,1253642412718266930;>catlan,,1253642412718287059;>catlan,,1253642412718290848;<catlan,,31,,1253642412718298051;>catlan,,1253642412718303690;<catlan,,32,,1253642412718310301;<catlan,,33,,1253642412718318860;<catlan,,34,,1253642412718327347;>catlan,,1253642412718332905;<catlan,,35,,1253642412718339525;>catlan,,1253642412718345019;>catlan,,1253642412718348511;<catlan,,36,,1253642412718355149;>catlan,,1253642412718360592;<catlan,,37,,1253642412718367227;>catlan,,1253642412718372682;<catlan,,38,,1253642412718379287;<catlan,,39,,1253642412718387804;>catlan,,1253642412718393293;<catlan,,40,,1253642412718399904;>catlan,,1253642412718405458;>catlan,,1253642412718408944;>catlan,,1253642412718412469;<catlan,,41,,1253642412718419058;<catlan,,42,,1253642412718427597;>catlan,,1253642412718433109;<catlan,,43,,1253642412718439666;>catlan,,1253642412718445127;>catlan,,1253642412718448679;<catlan,,44,,1253642412718455389;<catlan,,45,,1253642412718463888;>catlan,,1253642412718469419;<catlan,,46,,1253642412718475981;>catlan,,1253642412718481416;>catlan,,1253642412718484974;<catlan,,47,,1253642412718491578;<catlan,,48,,1253642412718500098;<catlan,,49,,1253642412718508607;>catlan,,1253642412718514038;<catlan,,50,,1253642412718520679;>catlan,,1253642412718526134;>catlan,,1253642412718529647;<catlan,,51,,1253642412718536221;>catlan,,1253642412718541734;<catlan,,52,,1253642412718548381;>catlan,,1253642412718553824;<catlan,,53,,1253642412718560435;<catlan,,54,,1253642412718568940;>catlan,,1253642412718574314;<catlan,,55,,1253642412718581036;>catlan,,1253642412718586507;>catlan,,1253642412718590044;>catlan,,1253642412718593511;<catlan,,56,,1253642412718600083;>catlan,,1253642412718605544;<catlan,,57,,1253642412718612194;<catlan,,58,,1253642412718620750;<catlan,,59,,1253642412718629316;<catlan,,60,,1253642412718637809;>catlan,,1253642412718643345;<catlan,,61,,1253642412718649980;>catlan,,1253642412718655511;>catlan,,1253642412718659003;<catlan,,62,,1253642412718665508;>catlan,,1253642412718671069;<catlan,,63,,1253642412718677589;>catlan,,1253642412718683126;<catlan,,64,,1253642412718689784;<catlan,,65,,1253642412718698362;>catlan,,1253642412718703832;<catlan,,66,,1253642412718710404;>catlan,,1253642412718715817;>catlan,,1253642412718719339;>catlan,,1253642412718722741;<catlan,,67,,1253642412718729369;>catlan,,1253642412718734816;<catlan,,68,,1253642412718741456;<catlan,,69,,1253642412718749967;>catlan,,1253642412718755555;<catlan,,70,,1253642412718762175;>catlan,,1253642412718767826;>catlan,,1253642412718771330;<catlan,,71,,1253642412718777868;<catlan,,72,,1253642412718786352;>catlan,,1253642412718791793;<catlan,,73,,1253642412718798445;>catlan,,1253642412718803892;>catlan,,1253642412718807330;<catlan,,74,,1253642412718813943;>catlan,,1253642412718819501;<catlan,,75,,1253642412718826063;<catlan,,76,,1253642412718834653;<catlan,,77,,1253642412718843149;>catlan,,1253642412718848559;<catlan,,78,,1253642412718855095;>catlan,,1253642412718860592;>catlan,,1253642412718864042;<catlan,,79,,1253642412718870682;>catlan,,1253642412718876063;<catlan,,80,,1253642412718882646;>catlan,,1253642412718888051;<catlan,,81,,1253642412718894634;<catlan,,82,,1253642412718903176;>catlan,,1253642412718908574;<catlan,,83,,1253642412718915167;>catlan,,1253642412718920601;>catlan,,1253642412718924045;>catlan,,1253642412718927600;>catlan,,1253642412718931022;>catlan,,1253642412718934475;<catlan,,84,,1253642412718941040;>catlan,,1253642412718946556;<catlan,,85,,1253642412718953079;<catlan,,86,,1253642412718961683;<catlan,,87,,1253642412718970074;<catlan,,88,,1253642412718978589;>catlan,,1253642412718984071;<catlan,,89,,1253642412718990739;>catlan,,1253642412718996153;>catlan,,1253642412718999602;<catlan,,90,,1253642412719006149;>catlan,,1253642412719011719;<catlan,,91,,1253642412719018390;>catlan,,1253642412719023836;<catlan,,92,,1253642412719030405;<catlan,,93,,1253642412719038922;>catlan,,1253642412719044378;<catlan,,94,,1253642412719051000;>catlan,,1253642412719056612;>catlan,,1253642412719060071;>catlan,,1253642412719063551;<catlan,,95,,1253642412719070140;>catlan,,1253642412719075650;<catlan,,96,,1253642412719082305;<catlan,,97,,1253642412719090669;>catlan,,1253642412719096167;<catlan,,98,,1253642412719107443;>catlan,,1253642412719113365;>catlan,,1253642412719116976;<catlan,,99,,1253642412719123605;<catlan,,100,,1253642412719132212;>catlan,,1253642412719137674;<catlan,,101,,1253642412719144456;>catlan,,1253642412719149966;>catlan,,1253642412719153545;<catlan,,102,,1253642412719160068;>catlan,,1253642412719165545;<catlan,,103,,1253642412719172152;<catlan,,104,,1253642412719180660;<catlan,,105,,1253642412719189196;>catlan,,1253642412719194603;<catlan,,106,,1253642412719201174;>catlan,,1253642412719206642;>catlan,,1253642412719210077;<catlan,,107,,1253642412719216624;>catlan,,1253642412719222070;<catlan,,108,,1253642412719229998;>catlan,,1253642412719235622;<catlan,,109,,1253642412719242230;<catlan,,110,,1253642412719250876;>catlan,,1253642412719256374;<catlan,,111,,1253642412719262918;>catlan,,1253642412719268314;>catlan,,1253642412719271754;>catlan,,1253642412719275171;>catlan,,1253642412719278587;<catlan,,112,,1253642412719285129;<catlan,,113,,1253642412719293787;>catlan,,1253642412719299219;<catlan,,114,,1253642412719305700;>catlan,,1253642412719311068;>catlan,,1253642412719314599;<catlan,,115,,1253642412719321141;<catlan,,116,,1253642412719329844;<catlan,,117,,1253642412719338338;>catlan,,1253642412719343826;<catlan,,118,,1253642412719350398;>catlan,,1253642412719355976;>catlan,,1253642412719359426;<catlan,,119,,1253642412719366003;>catlan,,1253642412719371453;<catlan,,120,,1253642412719378064;>catlan,,1253642412719383444;<catlan,,121,,1253642412719390051;<catlan,,122,,1253642412719398593;>catlan,,1253642412719404078;<catlan,,123,,1253642412719410662;>catlan,,1253642412719416193;>catlan,,1253642412719419633;>catlan,,1253642412719423116;<catlan,,124,,1253642412719429750;<catlan,,125,,1253642412719438361;<catlan,,126,,1253642412719446791;>catlan,,1253642412719452222;<catlan,,127,,1253642412719458749;>catlan,,1253642412719464202;>catlan,,1253642412719467690;<catlan,,128,,1253642412719474195;>catlan,,1253642412719479693;<catlan,,129,,1253642412719486283;>catlan,,1253642412719491693;<catlan,,130,,1253642412719498313;<catlan,,131,,1253642412719506860;>catlan,,1253642412719512348;<catlan,,132,,1253642412719518941;>catlan,,1253642412719524454;>catlan,,1253642412719527882;>catlan,,1253642412719531371;<catlan,,133,,1253642412719537876;<catlan,,134,,1253642412719546556;>catlan,,1253642412719552035;<catlan,,135,,1253642412719558736;>catlan,,1253642412719564180;>catlan,,1253642412719567692;<catlan,,136,,1253642412719574174;<catlan,,137,,1253642412719582793;<catlan,,138,,1253642412719591307;<catlan,,139,,1253642412719599792;>catlan,,1253642412719605226;<catlan,,140,,1253642412719611912;>catlan,,1253642412719617394;>catlan,,1253642412719620943;<catlan,,141,,1253642412719627500;>catlan,,1253642412719633045;<catlan,,142,,1253642412719639668;>catlan,,1253642412719645151;<catlan,,143,,1253642412719651764;<catlan,,144,,1253642412719660303;>catlan,,1253642412719665713;<catlan,,145,,1253642412719672290;>catlan,,1253642412719677752;>catlan,,1253642412719681223;>catlan,,1253642412719684651;<catlan,,146,,1253642412719691172;>catlan,,1253642412719696678;<catlan,,147,,1253642412719703400;<catlan,,148,,1253642412719712074;>catlan,,1253642412719717568;<catlan,,149,,1253642412719724134;>catlan,,1253642412719729550;>catlan,,1253642412719733069;<catlan,,150,,1253642412719739565;<catlan,,151,,1253642412719748290;>catlan,,1253642412719753704;<catlan,,152,,1253642412719760311;>catlan,,1253642412719765746;>catlan,,1253642412719769267;<catlan,,153,,1253642412719775791;>catlan,,1253642412719781361;<catlan,,154,,1253642412719787950;<catlan,,155,,1253642412719796633;<catlan,,156,,1253642412719805177;>catlan,,1253642412719810705;<catlan,,157,,1253642412719817372;>catlan,,1253642412719822915;>catlan,,1253642412719826431;<catlan,,158,,1253642412719833122;>catlan,,1253642412719838653;<catlan,,159,,1253642412719845348;>catlan,,1253642412719850879;<catlan,,160,,1253642412719857516;<catlan,,161,,1253642412719866058;>catlan,,1253642412719871574;<catlan,,162,,1253642412719878172;>catlan,,1253642412719883748;>catlan,,1253642412719887237;>catlan,,1253642412719890716;>catlan,,1253642412719894175;<catlan,,163,,1253642412719900906;>catlan,,1253642412719906427;<catlan,,164,,1253642412719913125;<catlan,,165,,1253642412719921672;<catlan,,166,,1253642412719930253;<catlan,,167,,1253642412719938704;<catlan,,168,,1253642412719947236;>catlan,,1253642412719952683;<catlan,,169,,1253642412719959326;>catlan,,1253642412719964749;>catlan,,1253642412719968237;<catlan,,170,,1253642412719974830;>catlan,,1253642412719980445;<catlan,,171,,1253642412719987034;>catlan,,1253642412719992499;<catlan,,172,,1253642412719999070;<catlan,,173,,1253642412720007633;>catlan,,1253642412720013070;<catlan,,174,,1253642412720019756;>catlan,,1253642412720025248;>catlan,,1253642412720028691;>catlan,,1253642412720032105;<catlan,,175,,1253642412720038793;>catlan,,1253642412720044234;<catlan,,176,,1253642412720050790;<catlan,,177,,1253642412720059287;>catlan,,1253642412720064884;<catlan,,178,,1253642412720071476;>catlan,,1253642412720076956;>catlan,,1253642412720080390;<catlan,,179,,1253642412720086889;<catlan,,180,,1253642412720095304;>catlan,,1253642412720100745;<catlan,,181,,1253642412720124363;>catlan,,1253642412720129875;>catlan,,1253642412720133316;<catlan,,182,,1253642412720139818;>catlan,,1253642412720145238;<catlan,,183,,1253642412720151752;<catlan,,184,,1253642412720160314;<catlan,,185,,1253642412720168798;>catlan,,1253642412720174350;<catlan,,186,,1253642412720180862;>catlan,,1253642412720186416;>catlan,,1253642412720189926;<catlan,,187,,1253642412720196609;>catlan,,1253642412720201995;<catlan,,188,,1253642412720208479;>catlan,,1253642412720213872;<catlan,,189,,1253642412720220431;<catlan,,190,,1253642412720230055;>catlan,,1253642412720235697;<catlan,,191,,1253642412720242365;>catlan,,1253642412720247842;>catlan,,1253642412720251324;>catlan,,1253642412720254885;>catlan,,1253642412720258317;<catlan,,192,,1253642412720265014;>catlan,,1253642412720270539;<catlan,,193,,1253642412720277123;<catlan,,194,,1253642412720285634;<catlan,,195,,1253642412720294148;>catlan,,1253642412720299534;<catlan,,196,,1253642412720306268;>catlan,,1253642412720311679;>catlan,,1253642412720315213;<catlan,,197,,1253642412720321742;>catlan,,1253642412720327291;<catlan,,198,,1253642412720333793;>catlan,,1253642412720339261;<catlan,,199,,1253642412720345799;<catlan,,200,,1253642412720354433;>catlan,,1253642412720359916;<catlan,,201,,1253642412720366479;>catlan,,1253642412720371886;>catlan,,1253642412720375387;>catlan,,1253642412720378788;<catlan,,202,,1253642412720385305;<catlan,,203,,1253642412720393892;>catlan,,1253642412720399438;<catlan,,204,,1253642412720406012;>catlan,,1253642412720411597;>catlan,,1253642412720415077;<catlan,,205,,1253642412720421657;<catlan,,206,,1253642412720430147;>catlan,,1253642412720435666;<catlan,,207,,1253642412720442204;>catlan,,1253642412720447687;>catlan,,1253642412720451137;<catlan,,208,,1253642412720457687;<catlan,,209,,1253642412720466279;<catlan,,210,,1253642412720474791;>catlan,,1253642412720480291;<catlan,,211,,1253642412720486875;>catlan,,1253642412720492348;>catlan,,1253642412720495798;<catlan,,212,,1253642412720502345;>catlan,,1253642412720507768;<catlan,,213,,1253642412720514436;>catlan,,1253642412720519966;<catlan,,214,,1253642412720526622;<catlan,,215,,1253642412720535175;>catlan,,1253642412720540571;<catlan,,216,,1253642412720547166;>catlan,,1253642412720552700;>catlan,,1253642412720556126;>catlan,,1253642412720559677;<catlan,,217,,1253642412720566231;>catlan,,1253642412720571797;<catlan,,218,,1253642412720578435;<catlan,,219,,1253642412720586901;<catlan,,220,,1253642412720595391;<catlan,,221,,1253642412720603903;>catlan,,1253642412720609352;<catlan,,222,,1253642412720615936;>catlan,,1253642412720621331;>catlan,,1253642412720624835;<catlan,,223,,1253642412720631397;>catlan,,1253642412720636802;<catlan,,224,,1253642412720643358;>catlan,,1253642412720648847;<catlan,,225,,1253642412720655358;<catlan,,226,,1253642412720663923;>catlan,,1253642412720669304;<catlan,,227,,1253642412720675980;>catlan,,1253642412720681457;>catlan,,1253642412720684982;>catlan,,1253642412720688452;<catlan,,228,,1253642412720695093;>catlan,,1253642412720700588;<catlan,,229,,1253642412720707267;<catlan,,230,,1253642412720715830;>catlan,,1253642412720721246;<catlan,,231,,1253642412720727845;>catlan,,1253642412720733418;>catlan,,1253642412720736861;<catlan,,232,,1253642412720743439;<catlan,,233,,1253642412720751929;>catlan,,1253642412720757390;<catlan,,234,,1253642412720763989;>catlan,,1253642412720769468;>catlan,,1253642412720772978;<catlan,,235,,1253642412720779592;>catlan,,1253642412720785083;<catlan,,236,,1253642412720791742;<catlan,,237,,1253642412720800196;<catlan,,238,,1253642412720808659;>catlan,,1253642412720814094;<catlan,,239,,1253642412720820644;>catlan,,1253642412720826124;>catlan,,1253642412720829739;<catlan,,240,,1253642412720836316;>catlan,,1253642412720841919;<catlan,,241,,1253642412720848530;>catlan,,1253642412720854006;<catlan,,242,,1253642412720860590;<catlan,,243,,1253642412720869197;>catlan,,1253642412720874593;<catlan,,244,,1253642412720881260;>catlan,,1253642412720886740;>catlan,,1253642412720890229;>catlan,,1253642412720893621;>catlan,,1253642412720896996;>catlan,,1253642412720900511;>catlan,,1253642412720903898;>main,,1253642412722440674;
-1253642412722448040
-4536107 \ No newline at end of file
+basic
+<main,,1,,1257346407168350569,,1
+<catlan,,2,,1257346407168366590,,1
+<catlan,,3,,1257346407168378951,,1
+<catlan,,4,,1257346407168389516,,1
+<catlan,,5,,1257346407168399720,,1
+<catlan,,6,,1257346407168410102,,1
+<catlan,,7,,1257346407168420408,,1
+>catlan,,1257346407168427797,,1
+<catlan,,8,,1257346407168436630,,1
+>catlan,,1257346407168443914,,1
+>catlan,,1257346407168449418,,1
+<catlan,,9,,1257346407168457820,,1
+>catlan,,1257346407168465113,,1
+<catlan,,10,,1257346407168473525,,1
+>catlan,,1257346407168480923,,1
+<catlan,,11,,1257346407168489194,,1
+<catlan,,12,,1257346407168499530,,1
+>catlan,,1257346407168506697,,1
+<catlan,,13,,1257346407168515157,,1
+>catlan,,1257346407168522372,,1
+>catlan,,1257346407168527725,,1
+>catlan,,1257346407168532940,,1
+<catlan,,14,,1257346407168541436,,1
+>catlan,,1257346407168548639,,1
+<catlan,,15,,1257346407168557057,,1
+<catlan,,16,,1257346407168567267,,1
+>catlan,,1257346407168574502,,1
+<catlan,,17,,1257346407168582899,,1
+>catlan,,1257346407168590198,,1
+>catlan,,1257346407168595534,,1
+<catlan,,18,,1257346407168603804,,1
+<catlan,,19,,1257346407168614041,,1
+>catlan,,1257346407168621340,,1
+<catlan,,20,,1257346407168629728,,1
+>catlan,,1257346407168636949,,1
+>catlan,,1257346407168642335,,1
+<catlan,,21,,1257346407168650861,,1
+>catlan,,1257346407168658130,,1
+<catlan,,22,,1257346407168666557,,1
+<catlan,,23,,1257346407168676695,,1
+<catlan,,24,,1257346407168687014,,1
+>catlan,,1257346407168694189,,1
+<catlan,,25,,1257346407168702616,,1
+>catlan,,1257346407168709867,,1
+>catlan,,1257346407168715247,,1
+<catlan,,26,,1257346407168723560,,1
+>catlan,,1257346407168761483,,1
+<catlan,,27,,1257346407168770845,,1
+>catlan,,1257346407168778234,,1
+<catlan,,28,,1257346407168786571,,1
+<catlan,,29,,1257346407168796952,,1
+>catlan,,1257346407168804158,,1
+<catlan,,30,,1257346407168812576,,1
+>catlan,,1257346407168819830,,1
+>catlan,,1257346407168825222,,1
+>catlan,,1257346407168830416,,1
+>catlan,,1257346407168835679,,1
+<catlan,,31,,1257346407168844115,,1
+>catlan,,1257346407168851342,,1
+<catlan,,32,,1257346407168859666,,1
+<catlan,,33,,1257346407168869874,,1
+<catlan,,34,,1257346407168880069,,1
+>catlan,,1257346407168887332,,1
+<catlan,,35,,1257346407168895764,,1
+>catlan,,1257346407168903070,,1
+>catlan,,1257346407168908396,,1
+<catlan,,36,,1257346407168916816,,1
+>catlan,,1257346407168924052,,1
+<catlan,,37,,1257346407168932428,,1
+>catlan,,1257346407168939619,,1
+<catlan,,38,,1257346407168947989,,1
+<catlan,,39,,1257346407168958241,,1
+>catlan,,1257346407168965540,,1
+<catlan,,40,,1257346407168973879,,1
+>catlan,,1257346407168981197,,1
+>catlan,,1257346407168986574,,1
+>catlan,,1257346407168991906,,1
+<catlan,,41,,1257346407169000252,,1
+<catlan,,42,,1257346407169010555,,1
+>catlan,,1257346407169017725,,1
+<catlan,,43,,1257346407169026172,,1
+>catlan,,1257346407169033438,,1
+>catlan,,1257346407169038858,,1
+<catlan,,44,,1257346407169047149,,1
+<catlan,,45,,1257346407169057516,,1
+>catlan,,1257346407169064704,,1
+<catlan,,46,,1257346407169073170,,1
+>catlan,,1257346407169080412,,1
+>catlan,,1257346407169085801,,1
+<catlan,,47,,1257346407169094059,,1
+<catlan,,48,,1257346407169104342,,1
+<catlan,,49,,1257346407169114639,,1
+>catlan,,1257346407169121926,,1
+<catlan,,50,,1257346407169130317,,1
+>catlan,,1257346407169137628,,1
+>catlan,,1257346407169142924,,1
+<catlan,,51,,1257346407169151273,,1
+>catlan,,1257346407169158433,,1
+<catlan,,52,,1257346407169166983,,1
+>catlan,,1257346407169174186,,1
+<catlan,,53,,1257346407169182809,,1
+<catlan,,54,,1257346407169193028,,1
+>catlan,,1257346407169200303,,1
+<catlan,,55,,1257346407169208684,,1
+>catlan,,1257346407169215977,,1
+>catlan,,1257346407169221249,,1
+>catlan,,1257346407169226651,,1
+<catlan,,56,,1257346407169234966,,1
+>catlan,,1257346407169242389,,1
+<catlan,,57,,1257346407169250776,,1
+<catlan,,58,,1257346407169261008,,1
+<catlan,,59,,1257346407169271260,,1
+<catlan,,60,,1257346407169281440,,1
+>catlan,,1257346407169288580,,1
+<catlan,,61,,1257346407169296967,,1
+>catlan,,1257346407169304122,,1
+>catlan,,1257346407169309587,,1
+<catlan,,62,,1257346407169317869,,1
+>catlan,,1257346407169325291,,1
+<catlan,,63,,1257346407169333685,,1
+>catlan,,1257346407169341005,,1
+<catlan,,64,,1257346407169349393,,1
+<catlan,,65,,1257346407169359718,,1
+>catlan,,1257346407169366896,,1
+<catlan,,66,,1257346407169375317,,1
+>catlan,,1257346407169382553,,1
+>catlan,,1257346407169387960,,1
+>catlan,,1257346407169393169,,1
+<catlan,,67,,1257346407169401713,,1
+>catlan,,1257346407169408907,,1
+<catlan,,68,,1257346407169417286,,1
+<catlan,,69,,1257346407169427526,,1
+>catlan,,1257346407169434669,,1
+<catlan,,70,,1257346407169443014,,1
+>catlan,,1257346407169450265,,1
+>catlan,,1257346407169455519,,1
+<catlan,,71,,1257346407169463988,,1
+<catlan,,72,,1257346407169474153,,1
+>catlan,,1257346407169481422,,1
+<catlan,,73,,1257346407169489813,,1
+>catlan,,1257346407169497037,,1
+>catlan,,1257346407169502294,,1
+<catlan,,74,,1257346407169510783,,1
+>catlan,,1257346407169517995,,1
+<catlan,,75,,1257346407169526380,,1
+<catlan,,76,,1257346407169536620,,1
+<catlan,,77,,1257346407169546978,,1
+>catlan,,1257346407169554157,,1
+<catlan,,78,,1257346407169562614,,1
+>catlan,,1257346407169569822,,1
+>catlan,,1257346407169575203,,1
+<catlan,,79,,1257346407169583563,,1
+>catlan,,1257346407169590838,,1
+<catlan,,80,,1257346407169599121,,1
+>catlan,,1257346407169606477,,1
+<catlan,,81,,1257346407169614820,,1
+<catlan,,82,,1257346407169625159,,1
+>catlan,,1257346407169632374,,1
+<catlan,,83,,1257346407169640828,,1
+>catlan,,1257346407169648040,,1
+>catlan,,1257346407169653501,,1
+>catlan,,1257346407169658710,,1
+>catlan,,1257346407169664072,,1
+>catlan,,1257346407169669272,,1
+<catlan,,84,,1257346407169677575,,1
+>catlan,,1257346407169684845,,1
+<catlan,,85,,1257346407169693338,,1
+<catlan,,86,,1257346407169703473,,1
+<catlan,,87,,1257346407169713716,,1
+<catlan,,88,,1257346407169723896,,1
+>catlan,,1257346407169735847,,1
+<catlan,,89,,1257346407169744476,,1
+>catlan,,1257346407169751850,,1
+>catlan,,1257346407169757227,,1
+<catlan,,90,,1257346407169765672,,1
+>catlan,,1257346407169772896,,1
+<catlan,,91,,1257346407169781458,,1
+>catlan,,1257346407169788661,,1
+<catlan,,92,,1257346407169797118,,1
+<catlan,,93,,1257346407169807382,,1
+>catlan,,1257346407169814630,,1
+<catlan,,94,,1257346407169823039,,1
+>catlan,,1257346407169830392,,1
+>catlan,,1257346407169835721,,1
+>catlan,,1257346407169841056,,1
+<catlan,,95,,1257346407169849297,,1
+>catlan,,1257346407169856605,,1
+<catlan,,96,,1257346407169864980,,1
+<catlan,,97,,1257346407169875290,,1
+>catlan,,1257346407169882505,,1
+<catlan,,98,,1257346407169890956,,1
+>catlan,,1257346407169898216,,1
+>catlan,,1257346407169903602,,1
+<catlan,,99,,1257346407169911965,,1
+<catlan,,100,,1257346407169922248,,1
+>catlan,,1257346407169929526,,1
+<catlan,,101,,1257346407169938055,,1
+>catlan,,1257346407169945324,,1
+>catlan,,1257346407169950713,,1
+<catlan,,102,,1257346407169959089,,1
+>catlan,,1257346407169966388,,1
+<catlan,,103,,1257346407169974751,,1
+<catlan,,104,,1257346407169985004,,1
+<catlan,,105,,1257346407169995166,,1
+>catlan,,1257346407170002414,,1
+<catlan,,106,,1257346407170010814,,1
+>catlan,,1257346407170018052,,1
+>catlan,,1257346407170023412,,1
+<catlan,,107,,1257346407170031778,,1
+>catlan,,1257346407170039011,,1
+<catlan,,108,,1257346407170047537,,1
+>catlan,,1257346407170054749,,1
+<catlan,,109,,1257346407170063227,,1
+<catlan,,110,,1257346407170073428,,1
+>catlan,,1257346407170080658,,1
+<catlan,,111,,1257346407170089067,,1
+>catlan,,1257346407170096378,,1
+>catlan,,1257346407170101683,,1
+>catlan,,1257346407170106976,,1
+>catlan,,1257346407170112221,,1
+<catlan,,112,,1257346407170120675,,1
+<catlan,,113,,1257346407170130858,,1
+>catlan,,1257346407170138133,,1
+<catlan,,114,,1257346407170146488,,1
+>catlan,,1257346407170153775,,1
+>catlan,,1257346407170159038,,1
+<catlan,,115,,1257346407170167531,,1
+<catlan,,116,,1257346407170177819,,1
+<catlan,,117,,1257346407170188177,,1
+>catlan,,1257346407170195461,,1
+<catlan,,118,,1257346407170203806,,1
+>catlan,,1257346407170211132,,1
+>catlan,,1257346407170216519,,1
+<catlan,,119,,1257346407170224987,,1
+>catlan,,1257346407170232187,,1
+<catlan,,120,,1257346407170240683,,1
+>catlan,,1257346407170247934,,1
+<catlan,,121,,1257346407170256379,,1
+<catlan,,122,,1257346407170266674,,1
+>catlan,,1257346407170273954,,1
+<catlan,,123,,1257346407170282345,,1
+>catlan,,1257346407170289723,,1
+>catlan,,1257346407170295052,,1
+>catlan,,1257346407170300384,,1
+<catlan,,124,,1257346407170308714,,1
+<catlan,,125,,1257346407170318985,,1
+<catlan,,126,,1257346407170329249,,1
+>catlan,,1257346407170336593,,1
+<catlan,,127,,1257346407170344969,,1
+>catlan,,1257346407170352307,,1
+>catlan,,1257346407170357636,,1
+<catlan,,128,,1257346407170365949,,1
+>catlan,,1257346407170373224,,1
+<catlan,,129,,1257346407170381554,,1
+>catlan,,1257346407170388784,,1
+<catlan,,130,,1257346407170397439,,1
+<catlan,,131,,1257346407170407719,,1
+>catlan,,1257346407170415012,,1
+<catlan,,132,,1257346407170423373,,1
+>catlan,,1257346407170430578,,1
+>catlan,,1257346407170435956,,1
+>catlan,,1257346407170441165,,1
+<catlan,,133,,1257346407170449531,,1
+<catlan,,134,,1257346407170459781,,1
+>catlan,,1257346407170466986,,1
+<catlan,,135,,1257346407170475419,,1
+>catlan,,1257346407170482667,,1
+>catlan,,1257346407170488143,,1
+<catlan,,136,,1257346407170496408,,1
+<catlan,,137,,1257346407170506802,,1
+<catlan,,138,,1257346407170517027,,1
+<catlan,,139,,1257346407170527348,,1
+>catlan,,1257346407170534497,,1
+<catlan,,140,,1257346407170542987,,1
+>catlan,,1257346407170550166,,1
+>catlan,,1257346407170555603,,1
+<catlan,,141,,1257346407170563994,,1
+>catlan,,1257346407170571239,,1
+<catlan,,142,,1257346407170579536,,1
+>catlan,,1257346407170586947,,1
+<catlan,,143,,1257346407170595313,,1
+<catlan,,144,,1257346407170605632,,1
+>catlan,,1257346407170612937,,1
+<catlan,,145,,1257346407170621364,,1
+>catlan,,1257346407170628666,,1
+>catlan,,1257346407170634037,,1
+>catlan,,1257346407170639234,,1
+<catlan,,146,,1257346407170647706,,1
+>catlan,,1257346407170654923,,1
+<catlan,,147,,1257346407170663468,,1
+<catlan,,148,,1257346407170673741,,1
+>catlan,,1257346407170681058,,1
+<catlan,,149,,1257346407170689503,,1
+>catlan,,1257346407170696757,,1
+>catlan,,1257346407170702149,,1
+<catlan,,150,,1257346407170710477,,1
+<catlan,,151,,1257346407170720738,,1
+>catlan,,1257346407170733007,,1
+<catlan,,152,,1257346407170742318,,1
+>catlan,,1257346407170749581,,1
+>catlan,,1257346407170754949,,1
+<catlan,,153,,1257346407170763295,,1
+>catlan,,1257346407170770696,,1
+<catlan,,154,,1257346407170779096,,1
+<catlan,,155,,1257346407170789358,,1
+<catlan,,156,,1257346407170799501,,1
+>catlan,,1257346407170806759,,1
+<catlan,,157,,1257346407170815098,,1
+>catlan,,1257346407170822415,,1
+>catlan,,1257346407170827786,,1
+<catlan,,158,,1257346407170836261,,1
+>catlan,,1257346407170843497,,1
+<catlan,,159,,1257346407170851999,,1
+>catlan,,1257346407170859202,,1
+<catlan,,160,,1257346407170867587,,1
+<catlan,,161,,1257346407170877788,,1
+>catlan,,1257346407170885135,,1
+<catlan,,162,,1257346407170893505,,1
+>catlan,,1257346407170900789,,1
+>catlan,,1257346407170906163,,1
+>catlan,,1257346407170911492,,1
+>catlan,,1257346407170916755,,1
+<catlan,,163,,1257346407170925197,,1
+>catlan,,1257346407170932373,,1
+<catlan,,164,,1257346407170940878,,1
+<catlan,,165,,1257346407170951109,,1
+<catlan,,166,,1257346407170961455,,1
+<catlan,,167,,1257346407170971725,,1
+<catlan,,168,,1257346407170981938,,1
+>catlan,,1257346407170989204,,1
+<catlan,,169,,1257346407170997655,,1
+>catlan,,1257346407171004882,,1
+>catlan,,1257346407171010343,,1
+<catlan,,170,,1257346407171018692,,1
+>catlan,,1257346407171026003,,1
+<catlan,,171,,1257346407171034397,,1
+>catlan,,1257346407171041633,,1
+<catlan,,172,,1257346407171050029,,1
+<catlan,,173,,1257346407171060414,,1
+>catlan,,1257346407171067590,,1
+<catlan,,174,,1257346407171076071,,1
+>catlan,,1257346407171083382,,1
+>catlan,,1257346407171088645,,1
+>catlan,,1257346407171093832,,1
+<catlan,,175,,1257346407171102317,,1
+>catlan,,1257346407171109543,,1
+<catlan,,176,,1257346407171117931,,1
+<catlan,,177,,1257346407171128183,,1
+>catlan,,1257346407171135416,,1
+<catlan,,178,,1257346407171143804,,1
+>catlan,,1257346407171151043,,1
+>catlan,,1257346407171156390,,1
+<catlan,,179,,1257346407171164745,,1
+<catlan,,180,,1257346407171175066,,1
+>catlan,,1257346407171182314,,1
+<catlan,,181,,1257346407171190801,,1
+>catlan,,1257346407171198073,,1
+>catlan,,1257346407171203435,,1
+<catlan,,182,,1257346407171211754,,1
+>catlan,,1257346407171219053,,1
+<catlan,,183,,1257346407171227335,,1
+<catlan,,184,,1257346407171237693,,1
+<catlan,,185,,1257346407171247918,,1
+>catlan,,1257346407171255229,,1
+<catlan,,186,,1257346407171263695,,1
+>catlan,,1257346407171271039,,1
+>catlan,,1257346407171276302,,1
+<catlan,,187,,1257346407171284654,,1
+>catlan,,1257346407171291917,,1
+<catlan,,188,,1257346407171300296,,1
+>catlan,,1257346407171307468,,1
+<catlan,,189,,1257346407171315910,,1
+<catlan,,190,,1257346407171326141,,1
+>catlan,,1257346407171333492,,1
+<catlan,,191,,1257346407171341867,,1
+>catlan,,1257346407171349154,,1
+>catlan,,1257346407171354474,,1
+>catlan,,1257346407171359716,,1
+>catlan,,1257346407171364880,,1
+<catlan,,192,,1257346407171373208,,1
+>catlan,,1257346407171380444,,1
+<catlan,,193,,1257346407171389033,,1
+<catlan,,194,,1257346407171399270,,1
+<catlan,,195,,1257346407171409540,,1
+>catlan,,1257346407171416785,,1
+<catlan,,196,,1257346407171425239,,1
+>catlan,,1257346407171432403,,1
+>catlan,,1257346407171437861,,1
+<catlan,,197,,1257346407171446159,,1
+>catlan,,1257346407171453497,,1
+<catlan,,198,,1257346407171461906,,1
+>catlan,,1257346407171469175,,1
+<catlan,,199,,1257346407171477580,,1
+<catlan,,200,,1257346407171487896,,1
+>catlan,,1257346407171495129,,1
+<catlan,,201,,1257346407171503544,,1
+>catlan,,1257346407171510776,,1
+>catlan,,1257346407171516217,,1
+>catlan,,1257346407171521456,,1
+<catlan,,202,,1257346407171529873,,1
+<catlan,,203,,1257346407171540096,,1
+>catlan,,1257346407171547323,,1
+<catlan,,204,,1257346407171555659,,1
+>catlan,,1257346407171562994,,1
+>catlan,,1257346407171568263,,1
+<catlan,,205,,1257346407171576771,,1
+<catlan,,206,,1257346407171586958,,1
+>catlan,,1257346407171594287,,1
+<catlan,,207,,1257346407171602695,,1
+>catlan,,1257346407171610001,,1
+>catlan,,1257346407171615294,,1
+<catlan,,208,,1257346407171623639,,1
+<catlan,,209,,1257346407171633849,,1
+<catlan,,210,,1257346407171644213,,1
+>catlan,,1257346407171651524,,1
+<catlan,,211,,1257346407171659798,,1
+>catlan,,1257346407171667151,,1
+>catlan,,1257346407171672453,,1
+<catlan,,212,,1257346407171680750,,1
+>catlan,,1257346407171688055,,1
+<catlan,,213,,1257346407171696449,,1
+>catlan,,1257346407171703616,,1
+<catlan,,214,,1257346407171712148,,1
+<catlan,,215,,1257346407171722448,,1
+>catlan,,1257346407171733953,,1
+<catlan,,216,,1257346407171742701,,1
+>catlan,,1257346407171750082,,1
+>catlan,,1257346407171755383,,1
+>catlan,,1257346407171760626,,1
+<catlan,,217,,1257346407171768980,,1
+>catlan,,1257346407171776276,,1
+<catlan,,218,,1257346407171784589,,1
+<catlan,,219,,1257346407171795013,,1
+<catlan,,220,,1257346407171805238,,1
+<catlan,,221,,1257346407171815475,,1
+>catlan,,1257346407171822660,,1
+<catlan,,222,,1257346407171831126,,1
+>catlan,,1257346407171838395,,1
+>catlan,,1257346407171843757,,1
+<catlan,,223,,1257346407171852075,,1
+>catlan,,1257346407171859416,,1
+<catlan,,224,,1257346407171867771,,1
+>catlan,,1257346407171875070,,1
+<catlan,,225,,1257346407171883368,,1
+<catlan,,226,,1257346407171893761,,1
+>catlan,,1257346407171900931,,1
+<catlan,,227,,1257346407171909310,,1
+>catlan,,1257346407171916573,,1
+>catlan,,1257346407171921935,,1
+>catlan,,1257346407171927141,,1
+<catlan,,228,,1257346407171935468,,1
+>catlan,,1257346407171942734,,1
+<catlan,,229,,1257346407171951200,,1
+<catlan,,230,,1257346407171961483,,1
+>catlan,,1257346407171968694,,1
+<catlan,,231,,1257346407171977067,,1
+>catlan,,1257346407171984249,,1
+>catlan,,1257346407171989494,,1
+<catlan,,232,,1257346407171997902,,1
+<catlan,,233,,1257346407172008107,,1
+>catlan,,1257346407172015466,,1
+<catlan,,234,,1257346407172023824,,1
+>catlan,,1257346407172031141,,1
+>catlan,,1257346407172036428,,1
+<catlan,,235,,1257346407172044803,,1
+>catlan,,1257346407172052078,,1
+<catlan,,236,,1257346407172060571,,1
+<catlan,,237,,1257346407172070785,,1
+<catlan,,238,,1257346407172081004,,1
+>catlan,,1257346407172088312,,1
+<catlan,,239,,1257346407172096709,,1
+>catlan,,1257346407172103924,,1
+>catlan,,1257346407172109174,,1
+<catlan,,240,,1257346407172117556,,1
+>catlan,,1257346407172124864,,1
+<catlan,,241,,1257346407172133168,,1
+>catlan,,1257346407172140412,,1
+<catlan,,242,,1257346407172148692,,1
+<catlan,,243,,1257346407172159098,,1
+>catlan,,1257346407172166358,,1
+<catlan,,244,,1257346407172174712,,1
+>catlan,,1257346407172182035,,1
+>catlan,,1257346407172187277,,1
+>catlan,,1257346407172192564,,1
+>catlan,,1257346407172197788,,1
+>catlan,,1257346407172202937,,1
+>catlan,,1257346407172208197,,1
+>main,,1257346407172253125,,1
+-1257346407172259825
++3909256 \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/eag.graph b/systemtap/org.eclipse.linuxtools.callgraph.tests/eag.graph
index 49135620bb..4c894574e9 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests/eag.graph
+++ b/systemtap/org.eclipse.linuxtools.callgraph.tests/eag.graph
@@ -1,6 +1,195 @@
PROBE_BEGIN
-eag
-<main,,1,,1253642440673012134;<callThisOnce,,2,,1253642440673025906;>callThisOnce,,1253642440673033205;<callThisTwice,,3,,1253642440673041635;>callThisTwice,,1253642440673048612;<callThisTwice,,4,,1253642440673055457;>callThisTwice,,1253642440673060982;<callThisThirtyTimes,,5,,1253642440673069187;>callThisThirtyTimes,,1253642440673076110;<callThisThirtyTimes,,6,,1253642440673082940;>callThisThirtyTimes,,1253642440673088573;<callThisThirtyTimes,,7,,1253642440673095259;>callThisThirtyTimes,,1253642440673100820;<callThisThirtyTimes,,8,,1253642440673109301;>callThisThirtyTimes,,1253642440673114862;<callThisThirtyTimes,,9,,1253642440673121508;>callThisThirtyTimes,,1253642440673127051;<callThisThirtyTimes,,10,,1253642440673133797;>callThisThirtyTimes,,1253642440673139286;<callThisThirtyTimes,,11,,1253642440673146079;>callThisThirtyTimes,,1253642440673151713;<callThisThirtyTimes,,12,,1253642440673158392;>callThisThirtyTimes,,1253642440673163947;<callThisThirtyTimes,,13,,1253642440673170594;>callThisThirtyTimes,,1253642440673176013;<callThisThirtyTimes,,14,,1253642440673182789;>callThisThirtyTimes,,1253642440673188353;<callThisThirtyTimes,,15,,1253642440673194981;>callThisThirtyTimes,,1253642440673200593;<callThisThirtyTimes,,16,,1253642440673207387;>callThisThirtyTimes,,1253642440673212960;<callThisThirtyTimes,,17,,1253642440673219739;>callThisThirtyTimes,,1253642440673246186;<callThisThirtyTimes,,18,,1253642440673254258;>callThisThirtyTimes,,1253642440673259981;<callThisThirtyTimes,,19,,1253642440673266718;>callThisThirtyTimes,,1253642440673272231;<callThisThirtyTimes,,20,,1253642440673278916;>callThisThirtyTimes,,1253642440673284549;<callThisThirtyTimes,,21,,1253642440673291358;>callThisThirtyTimes,,1253642440673296919;<callThisThirtyTimes,,22,,1253642440673303641;>callThisThirtyTimes,,1253642440673309184;<callThisThirtyTimes,,23,,1253642440673315873;>callThisThirtyTimes,,1253642440673321340;<callThisThirtyTimes,,24,,1253642440673328065;>callThisThirtyTimes,,1253642440673333641;<callThisThirtyTimes,,25,,1253642440673340308;>callThisThirtyTimes,,1253642440673345815;<callThisThirtyTimes,,26,,1253642440673352624;>callThisThirtyTimes,,1253642440673358062;<callThisThirtyTimes,,27,,1253642440673364817;>callThisThirtyTimes,,1253642440673370393;<callThisThirtyTimes,,28,,1253642440673377102;>callThisThirtyTimes,,1253642440673382648;<callThisThirtyTimes,,29,,1253642440673389511;>callThisThirtyTimes,,1253642440673395060;<callThisThirtyTimes,,30,,1253642440673401806;>callThisThirtyTimes,,1253642440673407373;<callThisThirtyTimes,,31,,1253642440673414056;>callThisThirtyTimes,,1253642440673419634;<callThisThirtyTimes,,32,,1253642440673426449;>callThisThirtyTimes,,1253642440673431938;<callThisThirtyTimes,,33,,1253642440673438699;>callThisThirtyTimes,,1253642440673444230;<callThisThirtyTimes,,34,,1253642440673450964;>callThisThirtyTimes,,1253642440673456413;<hasOneChild,,35,,1253642440673464843;<callThisOnce,,36,,1253642440673504942;>callThisOnce,,1253642440673510584;>hasOneChild,,1253642440673514133;<hasTwoDifferentChildren,,37,,1253642440673522199;<hasOneChild,,38,,1253642440673563062;<callThisOnce,,39,,1253642440673602797;>callThisOnce,,1253642440673608244;>hasOneChild,,1253642440673611781;<callThisOnce,,40,,1253642440673618364;>callThisOnce,,1253642440673623856;>hasTwoDifferentChildren,,1253642440673627483;<chainOfFifty,,41,,1253642440673635645;<chainOfFifty,,42,,1253642440673645666;<chainOfFifty,,43,,1253642440673654285;<chainOfFifty,,44,,1253642440673662872;<chainOfFifty,,45,,1253642440673671488;<chainOfFifty,,46,,1253642440673680138;<chainOfFifty,,47,,1253642440673688854;<chainOfFifty,,48,,1253642440673697473;<chainOfFifty,,49,,1253642440673706144;<chainOfFifty,,50,,1253642440673714688;<chainOfFifty,,51,,1253642440673723281;<chainOfFifty,,52,,1253642440673731921;<chainOfFifty,,53,,1253642440673740883;<chainOfFifty,,54,,1253642440673749723;<chainOfFifty,,55,,1253642440673758505;<chainOfFifty,,56,,1253642440673767100;<chainOfFifty,,57,,1253642440673775810;<chainOfFifty,,58,,1253642440673784474;<chainOfFifty,,59,,1253642440673792997;<chainOfFifty,,60,,1253642440673801761;<chainOfFifty,,61,,1253642440673810321;<chainOfFifty,,62,,1253642440673818889;<chainOfFifty,,63,,1253642440673827491;<chainOfFifty,,64,,1253642440673835924;<chainOfFifty,,65,,1253642440673844609;<chainOfFifty,,66,,1253642440673853157;<chainOfFifty,,67,,1253642440673861899;<chainOfFifty,,68,,1253642440673870645;<chainOfFifty,,69,,1253642440673879168;<chainOfFifty,,70,,1253642440673887845;<chainOfFifty,,71,,1253642440673896284;<chainOfFifty,,72,,1253642440673904961;<chainOfFifty,,73,,1253642440673913463;<chainOfFifty,,74,,1253642440673921935;<chainOfFifty,,75,,1253642440673930404;<chainOfFifty,,76,,1253642440673938945;<chainOfFifty,,77,,1253642440673947553;<chainOfFifty,,78,,1253642440673956145;<chainOfFifty,,79,,1253642440673964768;<chainOfFifty,,80,,1253642440673973312;<chainOfFifty,,81,,1253642440673981929;<chainOfFifty,,82,,1253642440673990711;<chainOfFifty,,83,,1253642440673999390;<chainOfFifty,,84,,1253642440674007856;<chainOfFifty,,85,,1253642440674016398;<chainOfFifty,,86,,1253642440674024945;<chainOfFifty,,87,,1253642440674033495;<chainOfFifty,,88,,1253642440674042415;<chainOfFifty,,89,,1253642440674051125;<chainOfFifty,,90,,1253642440674059757;<chainOfFifty,,91,,1253642440674068271;>chainOfFifty,,1253642440674074072;>chainOfFifty,,1253642440674077874;>chainOfFifty,,1253642440674081537;>chainOfFifty,,1253642440674085200;>chainOfFifty,,1253642440674088927;>chainOfFifty,,1253642440674092605;>chainOfFifty,,1253642440674096250;>chainOfFifty,,1253642440674099889;>chainOfFifty,,1253642440674103736;>chainOfFifty,,1253642440674107405;>chainOfFifty,,1253642440674111095;>chainOfFifty,,1253642440674114695;>chainOfFifty,,1253642440674118283;>chainOfFifty,,1253642440674121910;>chainOfFifty,,1253642440674125618;>chainOfFifty,,1253642440674129215;>chainOfFifty,,1253642440674132806;>chainOfFifty,,1253642440674136439;>chainOfFifty,,1253642440674140117;>chainOfFifty,,1253642440674143846;>chainOfFifty,,1253642440674147425;>chainOfFifty,,1253642440674151098;>chainOfFifty,,1253642440674154824;>chainOfFifty,,1253642440674158454;>chainOfFifty,,1253642440674162078;>chainOfFifty,,1253642440674165678;>chainOfFifty,,1253642440674169305;>chainOfFifty,,1253642440674172890;>chainOfFifty,,1253642440674176484;>chainOfFifty,,1253642440674180159;>chainOfFifty,,1253642440674183924;>chainOfFifty,,1253642440674187557;>chainOfFifty,,1253642440674191239;>chainOfFifty,,1253642440674194842;>chainOfFifty,,1253642440674198559;>chainOfFifty,,1253642440674202204;>chainOfFifty,,1253642440674205897;>chainOfFifty,,1253642440674209476;>chainOfFifty,,1253642440674213133;>chainOfFifty,,1253642440674216826;>chainOfFifty,,1253642440674220457;>chainOfFifty,,1253642440674224162;>chainOfFifty,,1253642440674232376;>chainOfFifty,,1253642440674236178;>chainOfFifty,,1253642440674239775;>chainOfFifty,,1253642440674243465;>chainOfFifty,,1253642440674247176;>chainOfFifty,,1253642440674250797;>chainOfFifty,,1253642440674254469;>chainOfFifty,,1253642440674258088;>chainOfFifty,,1253642440674261820;<abcdefghijklmnopqrstuvwxyz,,92,,1253642440674270132;>abcdefghijklmnopqrstuvwxyz,,1253642440674277146;<finalCall,,93,,1253642440674285356;>finalCall,,1253642440674292127;>main,,1253642440674295760;
-1253642440674312367
-1300233 \ No newline at end of file
+basic
+<_GLOBAL__I_main").call,,1,,1257346369862712856,,1
+<__static_initialization_and_destruction_0").call,,2,,1257346369862740988,,1
+>__static_initialization_and_destruction_0").return,,1257346369862819833,,1
+>_GLOBAL__I_main").return,,1257346369862826426,,1
+<main,,3,,1257346369862837782,,1
+<callThisOnce,,4,,1257346369862850744,,1
+>callThisOnce,,1257346369862859261,,1
+<callThisTwice,,5,,1257346369862868987,,1
+>callThisTwice,,1257346369862877606,,1
+<callThisTwice,,6,,1257346369862886045,,1
+>callThisTwice,,1257346369862893227,,1
+<hasOneChild,,7,,1257346369862902881,,1
+<callThisOnce,,8,,1257346369896715797,,1
+>callThisOnce,,1257346369896724720,,1
+>hasOneChild,,1257346369896734489,,1
+<hasTwoDifferentChildren,,9,,1257346369896745791,,1
+<hasOneChild,,10,,1257346369929634234,,1
+<callThisOnce,,11,,1257346369960416668,,1
+>callThisOnce,,1257346369960426623,,1
+>hasOneChild,,1257346369960432572,,1
+<callThisOnce,,12,,1257346369960441311,,1
+>callThisOnce,,1257346369960448580,,1
+>hasTwoDifferentChildren,,1257346369960454336,,1
+<chainOfFifty,,13,,1257346369960466119,,1
+<chainOfFifty,,14,,1257346369960478155,,1
+<chainOfFifty,,15,,1257346369960488519,,1
+<chainOfFifty,,16,,1257346369960498684,,1
+<chainOfFifty,,17,,1257346369960508864,,1
+<chainOfFifty,,18,,1257346369960519126,,1
+<chainOfFifty,,19,,1257346369960529372,,1
+<chainOfFifty,,20,,1257346369960539380,,1
+<chainOfFifty,,21,,1257346369960549564,,1
+<chainOfFifty,,22,,1257346369960559606,,1
+<chainOfFifty,,23,,1257346369960569473,,1
+<chainOfFifty,,24,,1257346369960579545,,1
+<chainOfFifty,,25,,1257346369960589592,,1
+<chainOfFifty,,26,,1257346369960599571,,1
+<chainOfFifty,,27,,1257346369960609655,,1
+<chainOfFifty,,28,,1257346369960619598,,1
+<chainOfFifty,,29,,1257346369960629639,,1
+<chainOfFifty,,30,,1257346369960639886,,1
+<chainOfFifty,,31,,1257346369960650075,,1
+<chainOfFifty,,32,,1257346369960660309,,1
+<chainOfFifty,,33,,1257346369960670372,,1
+<chainOfFifty,,34,,1257346369960680471,,1
+<chainOfFifty,,35,,1257346369960690522,,1
+<chainOfFifty,,36,,1257346369960700485,,1
+<chainOfFifty,,37,,1257346369960710774,,1
+<chainOfFifty,,38,,1257346369960720840,,1
+<chainOfFifty,,39,,1257346369960738234,,1
+<chainOfFifty,,40,,1257346369960749102,,1
+<chainOfFifty,,41,,1257346369960759523,,1
+<chainOfFifty,,42,,1257346369960769766,,1
+<chainOfFifty,,43,,1257346369960780043,,1
+<chainOfFifty,,44,,1257346369960790024,,1
+<chainOfFifty,,45,,1257346369960800048,,1
+<chainOfFifty,,46,,1257346369960810105,,1
+<chainOfFifty,,47,,1257346369960820252,,1
+<chainOfFifty,,48,,1257346369960830489,,1
+<chainOfFifty,,49,,1257346369960840724,,1
+<chainOfFifty,,50,,1257346369960850760,,1
+<chainOfFifty,,51,,1257346369960860861,,1
+<chainOfFifty,,52,,1257346369960870861,,1
+<chainOfFifty,,53,,1257346369960881023,,1
+<chainOfFifty,,54,,1257346369960891173,,1
+<chainOfFifty,,55,,1257346369960901122,,1
+<chainOfFifty,,56,,1257346369960912749,,1
+<chainOfFifty,,57,,1257346369960922751,,1
+<chainOfFifty,,58,,1257346369960932664,,1
+<chainOfFifty,,59,,1257346369960942649,,1
+<chainOfFifty,,60,,1257346369960952558,,1
+<chainOfFifty,,61,,1257346369960962512,,1
+<chainOfFifty,,62,,1257346369960972479,,1
+<chainOfFifty,,63,,1257346369960982341,,1
+>chainOfFifty,,1257346369960989597,,1
+>chainOfFifty,,1257346369960994936,,1
+>chainOfFifty,,1257346369961000175,,1
+>chainOfFifty,,1257346369961005389,,1
+>chainOfFifty,,1257346369961010475,,1
+>chainOfFifty,,1257346369961015723,,1
+>chainOfFifty,,1257346369961020812,,1
+>chainOfFifty,,1257346369961025930,,1
+>chainOfFifty,,1257346369961031016,,1
+>chainOfFifty,,1257346369961036267,,1
+>chainOfFifty,,1257346369961041485,,1
+>chainOfFifty,,1257346369961046624,,1
+>chainOfFifty,,1257346369961051842,,1
+>chainOfFifty,,1257346369961056973,,1
+>chainOfFifty,,1257346369961062203,,1
+>chainOfFifty,,1257346369961067409,,1
+>chainOfFifty,,1257346369961072795,,1
+>chainOfFifty,,1257346369961077938,,1
+>chainOfFifty,,1257346369961083162,,1
+>chainOfFifty,,1257346369961088361,,1
+>chainOfFifty,,1257346369961093543,,1
+>chainOfFifty,,1257346369961098683,,1
+>chainOfFifty,,1257346369961103913,,1
+>chainOfFifty,,1257346369961109176,,1
+>chainOfFifty,,1257346369961114382,,1
+>chainOfFifty,,1257346369961119714,,1
+>chainOfFifty,,1257346369961124857,,1
+>chainOfFifty,,1257346369961129969,,1
+>chainOfFifty,,1257346369961135235,,1
+>chainOfFifty,,1257346369961140342,,1
+>chainOfFifty,,1257346369961145647,,1
+>chainOfFifty,,1257346369961150801,,1
+>chainOfFifty,,1257346369961156001,,1
+>chainOfFifty,,1257346369961161237,,1
+>chainOfFifty,,1257346369961166566,,1
+>chainOfFifty,,1257346369961171965,,1
+>chainOfFifty,,1257346369961177084,,1
+>chainOfFifty,,1257346369961182295,,1
+>chainOfFifty,,1257346369961187399,,1
+>chainOfFifty,,1257346369961192539,,1
+>chainOfFifty,,1257346369961197721,,1
+>chainOfFifty,,1257346369961202917,,1
+>chainOfFifty,,1257346369961208084,,1
+>chainOfFifty,,1257346369961213185,,1
+>chainOfFifty,,1257346369961218324,,1
+>chainOfFifty,,1257346369961223527,,1
+>chainOfFifty,,1257346369961228898,,1
+>chainOfFifty,,1257346369961234140,,1
+>chainOfFifty,,1257346369961239280,,1
+>chainOfFifty,,1257346369961244384,,1
+>chainOfFifty,,1257346369961249683,,1
+<callThisThirtyTimes,,64,,1257346369961260101,,1
+>callThisThirtyTimes,,1257346369961268879,,1
+<callThisThirtyTimes,,65,,1257346369961277610,,1
+>callThisThirtyTimes,,1257346369961285140,,1
+<callThisThirtyTimes,,66,,1257346369961293651,,1
+>callThisThirtyTimes,,1257346369961301113,,1
+<callThisThirtyTimes,,67,,1257346369961309534,,1
+>callThisThirtyTimes,,1257346369961316914,,1
+<callThisThirtyTimes,,68,,1257346369961325280,,1
+>callThisThirtyTimes,,1257346369961332646,,1
+<callThisThirtyTimes,,69,,1257346369961341157,,1
+>callThisThirtyTimes,,1257346369961348396,,1
+<callThisThirtyTimes,,70,,1257346369961356928,,1
+>callThisThirtyTimes,,1257346369961364263,,1
+<callThisThirtyTimes,,71,,1257346369961372657,,1
+>callThisThirtyTimes,,1257346369961380049,,1
+<callThisThirtyTimes,,72,,1257346369961388497,,1
+>callThisThirtyTimes,,1257346369961395781,,1
+<callThisThirtyTimes,,73,,1257346369961404187,,1
+>callThisThirtyTimes,,1257346369961411543,,1
+<callThisThirtyTimes,,74,,1257346369961420045,,1
+>callThisThirtyTimes,,1257346369961427310,,1
+<callThisThirtyTimes,,75,,1257346369961435771,,1
+>callThisThirtyTimes,,1257346369961443241,,1
+<callThisThirtyTimes,,76,,1257346369961451596,,1
+>callThisThirtyTimes,,1257346369961458967,,1
+<callThisThirtyTimes,,77,,1257346369961467469,,1
+>callThisThirtyTimes,,1257346369961474792,,1
+<callThisThirtyTimes,,78,,1257346369961483255,,1
+>callThisThirtyTimes,,1257346369961490551,,1
+<callThisThirtyTimes,,79,,1257346369961498996,,1
+>callThisThirtyTimes,,1257346369961506352,,1
+<callThisThirtyTimes,,80,,1257346369961514746,,1
+>callThisThirtyTimes,,1257346369961522147,,1
+<callThisThirtyTimes,,81,,1257346369961530667,,1
+>callThisThirtyTimes,,1257346369961537963,,1
+<callThisThirtyTimes,,82,,1257346369961546477,,1
+>callThisThirtyTimes,,1257346369961553830,,1
+<callThisThirtyTimes,,83,,1257346369961562185,,1
+>callThisThirtyTimes,,1257346369961569580,,1
+<callThisThirtyTimes,,84,,1257346369961578007,,1
+>callThisThirtyTimes,,1257346369961585303,,1
+<callThisThirtyTimes,,85,,1257346369961593802,,1
+>callThisThirtyTimes,,1257346369961601131,,1
+<callThisThirtyTimes,,86,,1257346369961609693,,1
+>callThisThirtyTimes,,1257346369961616968,,1
+<callThisThirtyTimes,,87,,1257346369961625419,,1
+>callThisThirtyTimes,,1257346369961632832,,1
+<callThisThirtyTimes,,88,,1257346369961641181,,1
+>callThisThirtyTimes,,1257346369961648621,,1
+<callThisThirtyTimes,,89,,1257346369961657180,,1
+>callThisThirtyTimes,,1257346369961664470,,1
+<callThisThirtyTimes,,90,,1257346369961672900,,1
+>callThisThirtyTimes,,1257346369961680323,,1
+<callThisThirtyTimes,,91,,1257346369961688725,,1
+>callThisThirtyTimes,,1257346369961696018,,1
+<callThisThirtyTimes,,92,,1257346369961704463,,1
+>callThisThirtyTimes,,1257346369961711825,,1
+<callThisThirtyTimes,,93,,1257346369961720285,,1
+>callThisThirtyTimes,,1257346369961731754,,1
+<abcdefghijklmnopqrstuvwxyz,,94,,1257346369961742448,,1
+>abcdefghijklmnopqrstuvwxyz,,1257346369961751516,,1
+<finalCall,,95,,1257346369961761654,,1
+>finalCall,,1257346369961770008,,1
+>main,,1257346369961775263,,1
+-1257346369961811478
++99098622 \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/parse_function_nomark.stp b/systemtap/org.eclipse.linuxtools.callgraph.tests/parse_function_nomark.stp
index 34b01b6ca1..b56e3d1c87 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests/parse_function_nomark.stp
+++ b/systemtap/org.eclipse.linuxtools.callgraph.tests/parse_function_nomark.stp
@@ -1,6 +1,8 @@
global serial
global startTime
global finalTime
+global currentDepth
+
probe process(@1).function("*"){
callFunction(probefunc())
@@ -10,34 +12,31 @@ probe process(@1).function("*").return{
returnFunction(probefunc())
}
-probe begin {
- printf("PROBE_BEGIN\n");
- printf("testing\n");
-}
function callFunction(probefunc) {
if (startTime == 0) {
startTime = gettimeofday_ns()
- printf("<%s,,%d,,%d;", probefunc, serial, startTime)
+ printf("<%s,,%d,,%d;\n", probefunc, serial, startTime)
} else
- printf("<%s,,%d,,%d;", probefunc, serial, gettimeofday_ns())
+ printf("<%s,,%d,,%d;\n", probefunc, serial, gettimeofday_ns())
+ currentDepth++
serial++
}
-
function returnFunction(probefunc) {
finalTime = gettimeofday_ns()
- printf(">%s,,%d;", probefunc, finalTime)
+ printf(">%s,,%d;\n", probefunc, finalTime)
+ currentDepth--
}
-probe syscall.exit {
- if (pid() == target()) {
- finalTime = gettimeofday_ns()
- }
-}
probe end {
- printf("\n%d",finalTime);
- printf("\n%d",finalTime - startTime);
+ printf("-%d\n",finalTime);
+ printf("+%d\n",finalTime - startTime);
exit()
+}
+probe syscall.exit {
+if (pid() == target()) {
+finalTime = gettimeofday_ns()
+}
} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/AllTests.java b/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/AllTests.java
index 6bfa8e2ae1..75d5541834 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/AllTests.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/AllTests.java
@@ -25,7 +25,8 @@ public class AllTests {
//$JUnit-BEGIN$
suite.addTestSuite(StapGraphParserTest.class);
suite.addTestSuite(SystemTapGraphViewTest.class);
- suite.addTestSuite(SystemTapGraphTest.class);
+// suite.addTestSuite(SystemTapGraphTest.class);
+// suite.addTestSuite(MouseListenerTest.class);
//$JUnit-END$
return suite;
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/MouseListenerTest.java b/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/MouseListenerTest.java
index 3dba348a4f..b5a49be6ef 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/MouseListenerTest.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/MouseListenerTest.java
@@ -13,46 +13,44 @@ package org.eclipse.linuxtools.callgraph.tests;
import junit.framework.TestCase;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.linuxtools.callgraph.CallGraphConstants;
import org.eclipse.linuxtools.callgraph.CallgraphView;
-import org.eclipse.linuxtools.callgraph.GraphUIJob;
import org.eclipse.linuxtools.callgraph.StapGraph;
import org.eclipse.linuxtools.callgraph.StapGraphParser;
+import org.eclipse.linuxtools.callgraph.core.StapUIJob;
+import org.eclipse.linuxtools.callgraph.core.ViewFactory;
import org.eclipse.linuxtools.callgraph.graphlisteners.StapGraphMouseListener;
import org.eclipse.zest.core.widgets.GraphItem;
-
-public class MouseListenerTest extends TestCase{
+public class MouseListenerTest extends TestCase {
public void test() {
StapGraphParser parse = new StapGraphParser();
- parse.setFile(Activator.PLUGIN_LOCATION + "eag.graph");
- parse.testRun(new NullProgressMonitor());
+ parse.setSourcePath(Activator.PLUGIN_LOCATION + "eag.graph");
+ parse.testRun(new NullProgressMonitor(), true);
- CallgraphView.forceDisplay();
+ CallgraphView cView = (CallgraphView) ViewFactory.createView("org.eclipse.linuxtools.callgraph.callgraphview");
- GraphUIJob j = new GraphUIJob("Test Graph UI Job", parse);
+ StapUIJob j = new StapUIJob("Test Graph UI Job", parse,
+ CallGraphConstants.viewID);
j.runInUIThread(new NullProgressMonitor());
-
-
- StapGraphMouseListener mListener = CallgraphView.getGraph().getMouseListener();
-// StapGraphKeyListener kListener = CallgraphView.getGraph().getKeyListener();
-// StapGraphMouseWheelListener mwListener = CallgraphView.getGraph().getMouseWheelListener();
-
- StapGraph g = (StapGraph) CallgraphView.getGraph();
+
+ StapGraphMouseListener mListener = cView.getGraph().getMouseListener();
+ // StapGraphKeyListener kListener =
+ // CallgraphView.getGraph().getKeyListener();
+ // StapGraphMouseWheelListener mwListener =
+ // CallgraphView.getGraph().getMouseWheelListener();
+
+ StapGraph g = (StapGraph) cView.getGraph();
g.setProject(parse.project);
-
-
- GraphItem[] nodes = {g.getNode(g.getFirstUsefulNode())};
+
+ GraphItem[] nodes = { g.getNode(g.getFirstUsefulNode()) };
g.setSelection(nodes);
-
-
- System.out.println(mListener.controlDoubleClick());
+
mListener.mouseDownEvent(0, 0);
- g.draw(StapGraph.CONSTANT_DRAWMODE_TREE, StapGraph.CONSTANT_ANIMATION_FASTEST,
- g.getFirstUsefulNode());
+ g.draw(StapGraph.CONSTANT_DRAWMODE_TREE,
+ StapGraph.CONSTANT_ANIMATION_FASTEST, g.getFirstUsefulNode());
mListener.mouseUpEvent();
-
- System.out.println("TEST");
-
+
}
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/StapGraphParserTest.java b/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/StapGraphParserTest.java
index 2f14ab8f26..29d17aff8f 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/StapGraphParserTest.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/StapGraphParserTest.java
@@ -10,10 +10,11 @@
*******************************************************************************/
package org.eclipse.linuxtools.callgraph.tests;
-import java.io.File;
import java.util.ArrayList;
+import java.util.HashMap;
+
import junit.framework.TestCase;
-import org.eclipse.core.runtime.NullProgressMonitor;
+
import org.eclipse.linuxtools.callgraph.StapGraphParser;
public class StapGraphParserTest extends TestCase {
@@ -21,21 +22,31 @@ public class StapGraphParserTest extends TestCase {
//RENDER THE GRAPH
public static StapGraphParser initializeGraph(String filePath){
StapGraphParser grph = new StapGraphParser();
- grph.setFile(filePath);
- grph.testRun(new NullProgressMonitor());
+ grph.setSourcePath(filePath);
+ grph.nonRealTimeParsing();
return grph;
}
public static void assertSanity(StapGraphParser grph){
+ /*if (grph.serialMap.size() == 0 || grph.timeMap.size() == 0
+ || grph.outNeighbours.size() == 0 || grph.countMap.size() == 0
+ || grph.aggregateTimeMap.size() == 0){
+ fail("Parsing Error : One or more data structures were empty.");
+ }*/
+
//SAME NUMBER OF NODES ENTRIES
assertEquals(grph.serialMap.size(),grph.timeMap.size());
- assertEquals(grph.serialMap.size(),grph.outNeighbours.size());
+ int nsize = 0;
+ for (int key : grph.neighbourMaps.keySet())
+ if (grph.neighbourMaps.get(key)!= null)
+ nsize+=grph.neighbourMaps.get(key).size();
+ assertEquals(grph.serialMap.size(),nsize);
//ALL UNIQUE FUNCTIONS HAVE A TIME
//ALL FUNCTIONS HAVE A CUMULATIVE TIME
for (int val : grph.serialMap.keySet()){
String fname = grph.serialMap.get(val);
assertTrue(grph.timeMap.get(val) != null);
- assertTrue(grph.cumulativeTimeMap.get(fname) != null);
+ assertTrue(grph.aggregateTimeMap.get(fname) != null);
}
}
@@ -45,7 +56,7 @@ public class StapGraphParserTest extends TestCase {
for (int val : grph.serialMap.keySet()){
String fname = grph.serialMap.get(val);
assertTrue(grph.totalTime >= grph.timeMap.get(val));
- assertTrue(grph.totalTime >= grph.cumulativeTimeMap.get(fname));
+ assertTrue(grph.totalTime >= grph.aggregateTimeMap.get(fname));
}
}
@@ -55,17 +66,21 @@ public class StapGraphParserTest extends TestCase {
//ALL NODES MUST HAVE A PARENT EXCEPT THE ROOT
for (int key : grph.serialMap.keySet()){
hasParent = false;
- for (ArrayList<Integer> list : grph.outNeighbours.values()){
- if (list.contains(key)){
- hasParent = true;
- break;
+ for (int k:grph.neighbourMaps.keySet()) {
+ HashMap<Integer, ArrayList<Integer>> outNeighbours = grph.neighbourMaps.get(k);
+ if (outNeighbours != null && outNeighbours.size() > 0)
+ for (ArrayList<Integer> list : outNeighbours.values()){
+ if (list.contains(key)){
+ hasParent = true;
+ break;
+ }
}
- }
-
- if (!hasParent){
- for (int other : grph.serialMap.keySet()){
- if (key > other){
- fail(key + " " + grph.serialMap.get(key) + " had no parent");
+
+ if (!hasParent){
+ for (int other : grph.serialMap.keySet()){
+ if (key > other){
+ fail(key + " " + grph.serialMap.get(key) + " had no parent");
+ }
}
}
}
@@ -74,8 +89,7 @@ public class StapGraphParserTest extends TestCase {
}
- File tmpfile = new File("");
- public final String currentPath = tmpfile.getAbsolutePath();
+ public final String currentPath = Activator.PLUGIN_LOCATION;
public String graphDataPath= "";
//FOR TESTING THE GRAPH PARSING
@@ -87,20 +101,34 @@ public class StapGraphParserTest extends TestCase {
}
+ public void testJustMain(){
+ graphDataPath = currentPath+"main.graph";
+ executeGraphTests();
+ }
+
public void testCallGraphRunBasic(){
- graphDataPath = currentPath+"/basic.graph";
+ graphDataPath = currentPath+"basic.graph";
executeGraphTests();
}
public void testCallGraphRunRecursive(){
- graphDataPath = currentPath+"/catlan.graph";
+ graphDataPath = currentPath+"catlan.graph";
executeGraphTests();
}
public void testManyFuncs(){
- graphDataPath = currentPath+"/eag.graph";
+ graphDataPath = currentPath+"eag.graph";
+ executeGraphTests();
+ }
+
+ public void testComprehensive(){
+ graphDataPath = currentPath+"comprehensive.graph";
executeGraphTests();
}
+ public void testHeavy(){
+ graphDataPath = currentPath+"heavy.graph";
+ executeGraphTests();
+ }
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/SystemTapGraphTest.java b/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/SystemTapGraphTest.java
index 25a591bd64..d2b0f08e02 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/SystemTapGraphTest.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/SystemTapGraphTest.java
@@ -16,20 +16,13 @@ import java.util.ArrayList;
import junit.framework.TestCase;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.linuxtools.callgraph.CallGraphConstants;
import org.eclipse.linuxtools.callgraph.CallgraphView;
-import org.eclipse.linuxtools.callgraph.GraphUIJob;
import org.eclipse.linuxtools.callgraph.StapGraphParser;
-import org.eclipse.linuxtools.callgraph.core.SystemTapUIErrorMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.ScrolledComposite;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
+import org.eclipse.linuxtools.callgraph.core.StapUIJob;
+import org.eclipse.linuxtools.callgraph.core.ViewFactory;
public class SystemTapGraphTest extends TestCase {
@@ -41,40 +34,19 @@ public class SystemTapGraphTest extends TestCase {
launch.launch(bin, mode);
checkScript(launch);
}*/
- private ArrayList<Button> list = new ArrayList<Button>();
private boolean manual = false;
- private class ButtonSelectionListener implements SelectionListener {
- private Action action;
-
- public ButtonSelectionListener(Action action) {
- this.action = action;
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- action.run();
- }
-
- }
-
public void testGraphLoading() throws InterruptedException {
StapGraphParser parse = new StapGraphParser();
- parse.setFile(Activator.PLUGIN_LOCATION+"eag.graph");
+ parse.setSourcePath(Activator.PLUGIN_LOCATION+"eag.graph");
// parse.setTestMode(true);
- parse.testRun(new NullProgressMonitor());
+ assertEquals(Status.OK_STATUS, parse.testRun(new NullProgressMonitor(), true));
- CallgraphView.forceDisplay();
- GraphUIJob j = new GraphUIJob("Test Graph UI Job", parse);
+ StapUIJob j = new StapUIJob("Test Graph UI Job", parse, CallGraphConstants.viewID);
j.runInUIThread(new NullProgressMonitor());
+ CallgraphView cView = (CallgraphView) ViewFactory.createView(CallGraphConstants.viewID);
if (!manual) {
ArrayList<String> tasks = new ArrayList<String>();
@@ -107,44 +79,44 @@ public class SystemTapGraphTest extends TestCase {
case 1:
break;
case 2:
- act = CallgraphView.getView_refresh();
+ act = cView.getView_refresh();
break;
case 3:
- act = CallgraphView.getView_treeview();
+ act = cView.getView_treeview();
break;
case 4:
- act = CallgraphView.getView_aggregateview();
+ act = cView.getView_aggregateview();
break;
case 5:
- act = CallgraphView.getView_boxview();
+ act = cView.getView_levelview();
break;
case 6:
- act = CallgraphView.getAnimation_fast();
+ act = cView.getAnimation_fast();
break;
case 7:
case 8:
- act = CallgraphView.getMode_collapsednodes();
+ act = cView.getMode_collapsednodes();
break;
case 9:
- act = CallgraphView.getView_radialview();
+ act = cView.getView_radialview();
break;
case 10:
- act = CallgraphView.getMode_collapsednodes();
+ act = cView.getMode_collapsednodes();
break;
case 14:
String tempLocation = Activator.PLUGIN_LOCATION+"eag.graph2";
File temp = new File(tempLocation);
temp.delete();
- parse.saveData(tempLocation);
+ cView.saveData(tempLocation);
temp.delete();
break;
case 15:
StapGraphParser new_parser = new StapGraphParser();
- new_parser.setFile(Activator.PLUGIN_LOCATION+"eag.graph");
- new_parser.testRun(new NullProgressMonitor());
+ new_parser.setSourcePath(Activator.PLUGIN_LOCATION+"eag.graph");
+ new_parser.testRun(new NullProgressMonitor(), true);
break;
case 16:
- CallgraphView.maximizeIfUnmaximized();
+ cView.maximizeIfUnmaximized();
break;
default:
break;
@@ -156,105 +128,105 @@ public class SystemTapGraphTest extends TestCase {
return;
}
- //TODO: Figure out how to make the graph display at the same time as the dialog
- SystemTapUIErrorMessages testRadial = new SystemTapUIErrorMessages("Test graph", "Opening graph",
- "Testing Graph. Press OK, then go through the list of tasks.");
- testRadial.schedule();
-
- testRadial.cancel();
-
- ArrayList<String> tasks = new ArrayList<String>();
-
-
- tasks.add("(Manually) Maximize CallgraphView");
- tasks.add("Refresh");
- tasks.add("Tree View");
- tasks.add("Aggregate View");
- tasks.add("Box View");
- tasks.add("Animation->Fast");
- tasks.add("Collapse");
- tasks.add("Uncollapse");
- tasks.add("Radial View");
- tasks.add("Collapse.");
- tasks.add("(Manually) Double-click node with no children in TreeViewer");
- tasks.add("(Manually) Expand an arrow in the TreeViewer");
- tasks.add("(Manually) Collapse an arrow in the TreeViewer");
- tasks.add("Save file");
- tasks.add("Reload file");
- tasks.add("Check Version");
-
-
- final Shell sh = new Shell(SWT.SHELL_TRIM);
- sh.setSize(450,tasks.size()*38);
- sh.setText("Tasklist - press Finished when finished.");
- sh.setLayout(new GridLayout(1, false));
- sh.setAlpha(150);
-
- ScrolledComposite testComp = new ScrolledComposite(sh, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
-
-
- Composite buttons = new Composite(testComp, SWT.NONE);
- testComp.setContent(buttons);
- buttons.setLayout(new GridLayout(1, false));
- testComp.setExpandHorizontal(true);
- testComp.setExpandVertical(true);
-
- int taskNumber = 0;
- for (String task : tasks) {
- taskNumber++;
-
-
- Button checkBox = new Button(buttons, SWT.CHECK);
- list.add(checkBox);
- checkBox.setText(task);
- Action act = null;
- switch (taskNumber) {
- case 1:
- break;
- case 2:
- act = CallgraphView.getView_refresh();
- break;
- case 3:
- act = CallgraphView.getView_treeview();
- break;
- case 4:
- act = CallgraphView.getView_aggregateview();
- break;
- case 5:
- act = CallgraphView.getView_boxview();
- break;
- case 6:
- act = CallgraphView.getAnimation_fast();
- break;
- case 7:
- case 8:
- act = CallgraphView.getMode_collapsednodes();
- break;
- case 9:
- act = CallgraphView.getView_radialview();
- break;
- case 10:
- act = CallgraphView.getMode_collapsednodes();
- break;
- case 14:
- act = CallgraphView.getSave_callgraph();
- break;
- case 15:
- act = CallgraphView.getOpen_callgraph();
- break;
- case 16:
- act = CallgraphView.getHelp_version();
- break;
- default:
- break;
- }
- if (act != null) {
- ButtonSelectionListener bl = new ButtonSelectionListener(act);
- checkBox.addSelectionListener(bl);
- }
-
-
- }
+// //TODO: Figure out how to make the graph display at the same time as the dialog
+// SystemTapUIErrorMessages testRadial = new SystemTapUIErrorMessages("Test graph", "Opening graph",
+// "Testing Graph. Press OK, then go through the list of tasks.");
+// testRadial.schedule();
+//
+// testRadial.cancel();
+//
+// ArrayList<String> tasks = new ArrayList<String>();
+//
+//
+// tasks.add("(Manually) Maximize CallgraphView");
+// tasks.add("Refresh");
+// tasks.add("Tree View");
+// tasks.add("Aggregate View");
+// tasks.add("Box View");
+// tasks.add("Animation->Fast");
+// tasks.add("Collapse");
+// tasks.add("Uncollapse");
+// tasks.add("Radial View");
+// tasks.add("Collapse.");
+// tasks.add("(Manually) Double-click node with no children in TreeViewer");
+// tasks.add("(Manually) Expand an arrow in the TreeViewer");
+// tasks.add("(Manually) Collapse an arrow in the TreeViewer");
+// tasks.add("Save file");
+// tasks.add("Reload file");
+// tasks.add("Check Version");
+//
+//
+// final Shell sh = new Shell(SWT.SHELL_TRIM);
+// sh.setSize(450,tasks.size()*38);
+// sh.setText("Tasklist - press Finished when finished.");
+// sh.setLayout(new GridLayout(1, false));
+// sh.setAlpha(150);
+//
+// ScrolledComposite testComp = new ScrolledComposite(sh, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+//
+//
+// Composite buttons = new Composite(testComp, SWT.NONE);
+// testComp.setContent(buttons);
+// buttons.setLayout(new GridLayout(1, false));
+// testComp.setExpandHorizontal(true);
+// testComp.setExpandVertical(true);
+//
+// int taskNumber = 0;
+// for (String task : tasks) {
+// taskNumber++;
+//
+//
+// Button checkBox = new Button(buttons, SWT.CHECK);
+// list.add(checkBox);
+// checkBox.setText(task);
+// Action act = null;
+// switch (taskNumber) {
+// case 1:
+// break;
+// case 2:
+// act = cView.getView_refresh();
+// break;
+// case 3:
+// act = cView.getView_treeview();
+// break;
+// case 4:
+// act = cView.getView_aggregateview();
+// break;
+// case 5:
+// act = cView.getView_levelview();
+// break;
+// case 6:
+// act = cView.getAnimation_fast();
+// break;
+// case 7:
+// case 8:
+// act = cView.getMode_collapsednodes();
+// break;
+// case 9:
+// act = cView.getView_radialview();
+// break;
+// case 10:
+// act = cView.getMode_collapsednodes();
+// break;
+// case 14:
+// act = cView.getSave_file();
+// break;
+// case 15:
+// act = cView.getOpen_file();
+// break;
+// case 16:
+// act = cView.getHelp_version();
+// break;
+// default:
+// break;
+// }
+// if (act != null) {
+// ButtonSelectionListener bl = new ButtonSelectionListener(act);
+// checkBox.addSelectionListener(bl);
+// }
+//
+//
+// }
// Button finish = new Button(buttons, SWT.PUSH);
// finish.setText("Finish");
@@ -272,20 +244,20 @@ public class SystemTapGraphTest extends TestCase {
// });
//
- sh.open();
+// sh.open();
-
- boolean doneTasks =MessageDialog.openConfirm(new Shell(SWT.ON_TOP), "Check Graph",
- "Press OK if all "+ tasks.size() + " boxes in the checklist have been checked.\n" +
- "Hit Cancel if any test fails.");
- assertEquals(true, doneTasks);
+//
+// boolean doneTasks =MessageDialog.openConfirm(new Shell(SWT.ON_TOP), "Check Graph",
+// "Press OK if all "+ tasks.size() + " boxes in the checklist have been checked.\n" +
+// "Hit Cancel if any test fails.");
+// assertEquals(true, doneTasks);
- for (Button b : list) {
- if (!b.getSelection()) {
- fail("Task failed: " + b.getText());
- }
- assertEquals(true, b.getSelection());
- }
+// for (Button b : list) {
+// if (!b.getSelection()) {
+// fail("Task failed: " + b.getText());
+// }
+// assertEquals(true, b.getSelection());
+// }
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/SystemTapGraphViewTest.java b/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/SystemTapGraphViewTest.java
index 48217426b1..eb804add5a 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/SystemTapGraphViewTest.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.tests/src/org/eclipse/linuxtools/callgraph/tests/SystemTapGraphViewTest.java
@@ -13,16 +13,26 @@ package org.eclipse.linuxtools.callgraph.tests;
import junit.framework.TestCase;
-import org.eclipse.linuxtools.callgraph.CallgraphView;
+import org.eclipse.linuxtools.callgraph.core.SystemTapTextView;
+import org.eclipse.linuxtools.callgraph.core.ViewFactory;
public class SystemTapGraphViewTest extends TestCase {
- private CallgraphView stapView = new CallgraphView();
+ private SystemTapTextView stapView = new SystemTapTextView();
private String testText = "blah";
+ //TODO: write some better tests here
public void test() {
System.out.println("\n\nLaunching RunSystemTapActionTest\n");
- CallgraphView.forceDisplay();
+
+ stapView = (SystemTapTextView) ViewFactory.createView("org.eclipse.linuxtools.callgraph.core.staptextview");
+ if (stapView == null)
+ try {
+ throw new Exception("The SystemTapView is null");
+ } catch (Exception e) {
+ e.printStackTrace();
+ return;
+ }
stapView.println(testText);
assertEquals(stapView.getText(), testText);
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/ChangeLog b/systemtap/org.eclipse.linuxtools.callgraph/ChangeLog
new file mode 100644
index 0000000000..127eb8ac52
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.callgraph/ChangeLog
@@ -0,0 +1,233 @@
+2010-06-02 Roland Grunberg <rgrunber@redhat.com>
+
+ * plugin.properties: Externalize some strings in the Manifest.
+ * build.properties: See above
+ * META-INF/MANIFEST.MF: See above
+ * plugin.xml: See above
+
+2010-03-22 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphMouseListener.java (controlDoubleClick):
+ Remove unnecessary return value from this method.
+
+2010-02-23 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/StapGraphParser.java: Fix markers to work with threads
+
+2010-02-01 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphMouseListener.java: ctrl+double-click go to actual function instead of its parent. Very confusing otherwise.
+
+2010-01-28 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java : Clean up unnecessary code.
+
+2010-01-26 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Fix miscounting caused by lack of proper escape clause.
+
+2010-01-22 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/StapGraph.java: removed extra loadData function that is never used.
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Fix miscounting in non-dot-file-node
+
+2010-01-22 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java:
+ (createPartControl): Prepare for removal of Error Log window functionality.
+
+2010-01-18 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/StapGraph.java: Add addCalled method, which increments the timesCalled variable on stapData corresponding to the input id.
+ Change bounds on radius in radial view.
+ * src/org/eclipse/linuxtools/callgraph/StapGraphParser.java: Add multiple identical entries to neighbourMap for collapsed nodes (dot-file)
+ Proper error catching for number parsing failures.
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Properly attach dot-file nodes with id < 0
+ Properly account for collapsed nodes (dot-file)
+ Cleanup of TODO's
+
+2010-01-14 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Remove extraneous println
+
+2010-01-13 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/StapGraphParser.java: Add function parseDotFile() -- all calls to this function assumes non-real-time.
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Add capacity for parsing .dot files generated by the program
+
+2009-12-24 rgrunber <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java
+ (setGraphOptions): Add save_text so it is disabled when context does not require it.
+ * src/org/eclipse/linuxtools/callgraph/messages.properties:
+ Give relevant names to save_text externalized Strings.
+
+2009-12-23 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/StapGraph.java: Properly align nodes in radial mode. No more annoying 'just-off-center'ness!!
+ Remove System.out.println hooks.
+
+2009-12-21 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/StapGraph.java: Gentle code cleaning
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Fix setLimits logic
+ Add save as ASCII option -- TODO: Implement a table view in Eclipse.
+
+2009-12-18 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Reorganize menus and externalize.
+
+2009-12-17 rgrunber <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/messages.properties:
+ Rename externalized strings to be more descriptive.
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java:
+ * src/org/eclipse/linuxtools/callgraph/StapGraph.java:
+ * src/org/eclipse/linuxtools/callgraph/StapGraphParser.java:
+
+2009-12-15 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/StapGraphParser.java: Make the project variable non-mandatory. Read and reset buffer to avoid eating an extra line while looking for project name.
+
+2009-12-15 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Minor name change to File option.
+ * src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeDoubleClickListener.java: Do not maximize Callgraph View when clicking on list element.
+
+2009-12-15 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/StapGraphParser.java: Terminate properly if an unknown symbol is encountered. Do not split on the semicolon
+ Add extra catch to prevent missing data in the graph.
+
+2009-12-11 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Fix misgraph error in the writeToDot function.
+ Minor StringBuilder optimization tweak. Create function writeToDot to handle writing to dot, all three actions call this function with different parameters.
+ Add "Save current view as .dot" which will save only the currently visible nodes, in whatever collapse mode they are in. Fix problem where nodes will display parent's timeCalled instead of their own.
+ Add check for nullity when attaching parent nodes.
+ Add a missing newline to uncollapsed.
+ Do not graph Start Of Program
+
+
+
+2009-12-11 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Do not try to find parent for the root node.
+
+2009-12-11 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Write to .dot in a slightly modified way that will make it easier for users to just delete chunks of data and still graph accurately. (FIX: uncollapse should attach to d.parent, not d.collapsedParent)
+
+2009-12-11 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Reset StringBuilder per iteration as opposed to creating a new one each time.
+
+2009-12-11 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/StapNode.java: Make numberFormat public.
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Create the 'Save as .dot' option.
+ Create 'save uncollapsed as .dot' and 'save collapsed as .dot' options in the File menu.
+ Remove unused import.
+ Rename save_dot, save_col_dot. Add these to the list of actions enabled/disabled by opening a graph.
+ Do not label edges in uncollapsed .dot files. Change order of collapsed/uncollapsed .dot's
+ * src/org/eclipse/linuxtools/callgraph/StapGraph.java: Make the DataMap publically accessible
+
+2009-12-10 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/StapGraphParser.java: Quit with error message if opening a file encounters an I/O error.
+
+2009-12-09 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/StapGraph.java (getFirstUsefulNode): Return 0 if threaded
+ * src/org/eclipse/linuxtools/callgraph/StapGraphParser.java (parse): Add basic threading capability into parse. Create maps sorted by thread ID for neighbours.
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java (loadData): Add basic threading capability into loadData
+ Fix faulty marking of threaded nodes.
+ (view_radialview): Set StapGraph.threaded if the profiled program contains threads.
+
+2009-12-08 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/StapGraph.java: Return endTime - time if time > 38 years
+
+2009-12-01 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/StapGraph.java: While collapsing nodes, first check for existing collapsed nodes.
+
+2009-11-20 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java (finishLoad): Set project in the regular load, not just in finishLoad
+
+2009-11-17 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/StapGraph.java: Fix draw() to redraw from the root visible node number rather than the first available node.
+
+2009-11-16 Roland Grunberg <rgrunber@redhat.com>
+
+ * META-INF/MANIFEST.MF: Add Eclipse to Provider field.
+
+2009-11-12 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/StapData.java (StapData): Eliminate useless variables, rearrange functions, add javadoc.
+ * src/org/eclipse/linuxtools/callgraph/AggregateLayoutAlgorithm.java (postLayoutAlgorithm): Rearrange declarations, update documentation.
+
+2009-11-10 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Up/Down.gif now refer to the correct icons. Remove import of CallgraphCorePlugin
+
+
+2009-11-09 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/StapData.java: Cleanup
+ * src/org/eclipse/linuxtools/callgraph/StapGraph.java: Delete unused functions, simplify logic in StapGraph setCollapsedMode.
+
+2009-11-09 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Externalize/Fix Strings
+ * src/org/eclipse/linuxtools/callgraph/messages.properties:
+ * src/org/eclipse/linuxtools/callgraph/StapGraphParser.java:
+
+2009-11-09 Charley Wang <chwang@redhat.com>
+
+ * META-INF/MANIFEST.MF: Change reference to Activator to reflect name change
+ * src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeLabelProvider.java: Change references to PLUGIN_LOCATION to use getter.
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Change references to PLUGIN_LOCATION to use getter.
+ * src/org/eclipse/linuxtools/callgraph/CallGraphConstants.java: Change PLUGIN_LOCATION to private, create getter.
+ * src/org/eclipse/linuxtools/callgraph/CallgraphPlugin.java: RENAME: Activator --> CallgraphPlugin
+
+2009-11-06 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/AggregateLayoutAlgorithm.java: Improve javadocs
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Add better progress monitor use to updateMethod.
+ Remove many unused methods. Remove reference to SystemTapView because we can just use 'this' instead.
+
+
+
+2009-11-05 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Rename loadView --> initializeView
+ * src/org/eclipse/linuxtools/callgraph/StapGraphParser.java: Externalize strings.
+ * src/org/eclipse/linuxtools/callgraph/messages.properties: Updated UnknownMarkers error message.
+
+2009-11-04 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Make Callgraph draw in space provided regardless of window size or view size.
+
+2009-11-04 Charley Wang <chwang@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/StapGraphParser.java: Make nonRealTimeParser work again
+ * src/org/eclipse/linuxtools/callgraph/StapGraph.java: Fix problem with marked messages not displaying until the methods have closed.
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Remove unused comments. Minor formatting. Make nonRealTimeParser work again.
+
+
+
+2009-11-03 chwang <chwang@toto>
+
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Delete unused temporary variable
+
+2009-11-03 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Disable Callgraph View from stealing focus when an update has been made.
+
+2009-11-03 chwang <chwang@toto>
+
+ * src/org/eclipse/linuxtools/callgraph/CallgraphView.java: Fix capability to mark nodes.
+ * src/org/eclipse/linuxtools/callgraph/StapGraph.java: Enhance capability for collapse nodes by making collapse nodes take a negative ID. \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.callgraph/META-INF/MANIFEST.MF
index 82b9890c1e..ad4e5eebe9 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/META-INF/MANIFEST.MF
+++ b/systemtap/org.eclipse.linuxtools.callgraph/META-INF/MANIFEST.MF
@@ -1,9 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Graphing Plug-in
+Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.linuxtools.callgraph;singleton:=true
Bundle-Version: 0.0.1.qualifier
-Bundle-Activator: org.eclipse.linuxtools.callgraph.Activator
+Bundle-Activator: org.eclipse.linuxtools.callgraph.CallgraphPlugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.draw2d,
@@ -19,3 +19,5 @@ Import-Package: org.eclipse.cdt.core.model,
org.eclipse.zest.core.widgets,
org.eclipse.zest.layouts,
org.eclipse.zest.layouts.algorithms
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Localization: plugin
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/about.html b/systemtap/org.eclipse.linuxtools.callgraph/about.html
new file mode 100644
index 0000000000..23506a4bae
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.callgraph/about.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>About</title>
+</head><body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/build.properties b/systemtap/org.eclipse.linuxtools.callgraph/build.properties
index 2fe877d1f8..5edbf80b97 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/build.properties
+++ b/systemtap/org.eclipse.linuxtools.callgraph/build.properties
@@ -13,4 +13,6 @@ output.. = bin/
bin.includes = plugin.xml,\
META-INF/,\
.,\
- icons/
+ icons/,\
+ about.html,\
+ plugin.properties
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/plugin.properties b/systemtap/org.eclipse.linuxtools.callgraph/plugin.properties
new file mode 100644
index 0000000000..d9ce3f34c2
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.callgraph/plugin.properties
@@ -0,0 +1,6 @@
+#Properties file for org.eclipse.linuxtools.callgraph
+Bundle-Vendor = Eclipse Linux Tools
+Bundle-Name = Callgraph Graphing (Incubation)
+extension.name = Callgraph View
+view.name = Call Graph
+extension.name.0 = GraphParser \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/plugin.xml b/systemtap/org.eclipse.linuxtools.callgraph/plugin.xml
index ebf9fc9d95..6208254ab9 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/plugin.xml
+++ b/systemtap/org.eclipse.linuxtools.callgraph/plugin.xml
@@ -1,19 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
-
-
- <extension
- point="org.eclipse.ui.views">
- <view
- category="org.eclipse.cdt.ui.views"
- class="org.eclipse.linuxtools.callgraph.CallgraphView"
- icon="icons/genericregister_obj.gif"
- id="org.eclipse.linuxtools.callgraph.callgraphview"
- name="Call Graph"
- restorable="true">
- </view>
- </extension>
<extension
point="org.eclipse.ui.perspectiveExtensions">
@@ -27,8 +14,23 @@
</perspectiveExtension>
</extension>
+
+ <extension
+ id="org.eclipse.linuxtools.callgraph.callgraphview"
+ name="%extension.name"
+ point="org.eclipse.ui.views">
+ <view
+ category="org.eclipse.cdt.ui.views"
+ class="org.eclipse.linuxtools.callgraph.CallgraphView"
+ icon="icons/genericregister_obj.gif"
+ id="org.eclipse.linuxtools.callgraph.callgraphview"
+ name="%view.name"
+ restorable="true">
+ </view>
+ </extension>
+<!--
<extension
point="org.eclipse.ui.actionSets">
<actionSet
@@ -79,14 +81,14 @@
id="org.eclipse.linuxtools.callgraph.command4"
name="Remove stap marker function">
</command>
- </extension>
+ </extension>-->
<extension
id="org.eclipse.linuxtools.callgraph.graphparser"
- name="GraphParser"
+ name="%extension.name.0"
point="org.eclipse.linuxtools.callgraph.core.parser">
<parser
class="org.eclipse.linuxtools.callgraph.StapGraphParser"
- realtime="false">
+ realtime="true">
</parser>
</extension>
</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/Activator.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/Activator.java
deleted file mode 100644
index 80235a019c..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/Activator.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.callgraph;
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.linuxtools.callgraph"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
-
- //TODO: Is this too slow?
- CallGraphConstants.setPluginLocation(getPluginLocation());
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- public String getPluginLocation() {
- Bundle bundle = getBundle();
-
- URL locationUrl = FileLocator.find(bundle,new Path("/"), null); //$NON-NLS-1$
- URL fileUrl = null;
- try {
- fileUrl = FileLocator.toFileURL(locationUrl);
- } catch (IOException e) {
- e.printStackTrace();
- }
- return fileUrl.getFile();
-
- }
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/AggregateLayoutAlgorithm.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/AggregateLayoutAlgorithm.java
index d57454706e..166f9a8442 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/AggregateLayoutAlgorithm.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/AggregateLayoutAlgorithm.java
@@ -25,36 +25,46 @@ import org.eclipse.zest.layouts.dataStructures.InternalRelationship;
*/
public class AggregateLayoutAlgorithm extends GridLayoutAlgorithm{
- protected ArrayList<Long> sortedAggregateTimes;
+ protected ArrayList<Long> list;
protected Long totalTime;
protected int graphWidth;
+
+ /**
+ * Layout algorithm for the Aggregate View in Eclipse Callgraph, based on the GridLayoutAlgorithm in Zest.
+ * @param styles
+ * @param entries
+ * @param time
+ * @param width
+ */
public AggregateLayoutAlgorithm(int styles, TreeSet<Entry<String, Long>> entries, Long time, int width){
super(styles);
- this.sortedAggregateTimes = new ArrayList<Long>();
- for (Entry<String,Long> val : entries){
- this.sortedAggregateTimes.add(val.getValue());
- }
+ list = new ArrayList<Long>();
+ for (Entry<String, Long> ent : entries)
+ list.add(ent.getValue());
this.totalTime = time;
this.graphWidth = width;
}
-
- //THIS METHOD OVERRIDES THE PARENT'S IMPLEMENTATION (WHICH IS EMPTY ANYWAYS)
- protected void postLayoutAlgorithm(InternalNode[] entitiesToLayout, InternalRelationship[] relationshipsToConsider) {
- Long time;
+
+ /**
+ * Called at the end of the layout algorithm -- change the size and colour
+ * of each node according to times called/total time
+ */
+ protected void postLayoutAlgorithm(InternalNode[] entitiesToLayout,
+ InternalRelationship[] relationshipsToConsider) {
final int minimumSize = 40;
- double percent;
double xcursor = 0.0;
double ycursor = 0.0;
for (InternalNode sn : entitiesToLayout) {
- time = sortedAggregateTimes.remove(0);
- percent = (double) time / (double) totalTime;
+ Long time = list.remove(0);
+ double percent = (double) time / (double) totalTime;
double snWidth = (sn.getInternalWidth() * percent) + minimumSize;
double snHeight = (sn.getInternalHeight() * percent) + minimumSize;
+
sn.setSize(snWidth, snHeight);
if (xcursor + snWidth > graphWidth) {
//reaching the end of row, move to lower column
@@ -66,7 +76,6 @@ public class AggregateLayoutAlgorithm extends GridLayoutAlgorithm{
xcursor += snWidth;
}
}
-
}
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/CallGraphConstants.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/CallGraphConstants.java
index d08fb7f34a..a44ad95d71 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/CallGraphConstants.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/CallGraphConstants.java
@@ -13,11 +13,16 @@ package org.eclipse.linuxtools.callgraph;
public class CallGraphConstants {
- public static String PLUGIN_LOCATION = ""; //$NON-NLS-1$
+ private static String PLUGIN_LOCATION = ""; //$NON-NLS-1$
+ public static final String viewID = "org.eclipse.linuxtools.callgraph.callgraphview"; //$NON-NLS-1$
public static void setPluginLocation(String val) {
PLUGIN_LOCATION = val;
}
+
+ public static String getPluginLocation() {
+ return PLUGIN_LOCATION;
+ }
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/CallgraphView.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/CallgraphView.java
index f5f954d7b3..2b48a761b8 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/CallgraphView.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/CallgraphView.java
@@ -11,131 +11,323 @@
package org.eclipse.linuxtools.callgraph;
-import java.io.BufferedReader;
+import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
-import java.io.FileReader;
+import java.io.FileWriter;
import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.Vector;
-
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.draw2d.LightweightSystem;
+import org.eclipse.draw2d.parts.ScrollableThumbnail;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.linuxtools.callgraph.core.PluginConstants;
-import org.eclipse.linuxtools.callgraph.core.SystemTapErrorHandler;
+import org.eclipse.linuxtools.callgraph.core.SystemTapParser;
import org.eclipse.linuxtools.callgraph.core.SystemTapUIErrorMessages;
+import org.eclipse.linuxtools.callgraph.core.SystemTapView;
+import org.eclipse.linuxtools.callgraph.graphlisteners.AutoScrollSelectionListener;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Canvas;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Spinner;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-import org.eclipse.ui.part.ViewPart;
/**
* The SystemTap View for displaying output of the 'stap' command, and acts
* as a container for any graph to be rendered. Any buttons/controls/actions
* necessary to the smooth running of SystemTap could be placed here.
*/
-public class CallgraphView extends ViewPart {
- private static final String NEW_LINE = Messages.getString("CallgraphView.3"); //$NON-NLS-1$
- private static CallgraphView stapview;
- private static boolean isInitialized = false;
-
- private Display display;
- private static StyledText viewer;
- private int previousEnd;
-
-
- private static Action open_callgraph;
- private static Action save_callgraph;
- private static Action open_default;
- private static Action error_errorLog;
- private static Action error_deleteError;
- private static Action view_treeview;
- private static Action view_radialview;
- private static Action view_aggregateview;
- private static Action view_boxview;
- private static Action view_refresh;
- private static Action animation_slow;
- private static Action animation_fast;
- private static Action mode_collapsednodes;
- private static Action markers_next;
- private static Action markers_previous;
- private static Action limits;
- private static Action goto_next;
- private static Action goto_previous;
- private static Action goto_last;
-
- private static IMenuManager menu;
- private static IMenuManager gotoMenu;
- private static IMenuManager file;
- private static IMenuManager errors;
- private static IMenuManager view;
- private static IMenuManager animation;
- private static IMenuManager markers; //Unused
- private static IMenuManager help;
- @SuppressWarnings("unused")
- private static Action help_about;
- private static Action help_version;
- public static IToolBarManager mgr;
+public class CallgraphView extends SystemTapView {
+
+ private StapGraphParser parser;
+
+ private Action view_treeview;
+ private Action view_radialview;
+ private Action view_aggregateview;
+ private Action view_levelview;
+ private Action view_refresh;
+ private Action animation_slow;
+ private Action animation_fast;
+ private Action mode_collapsednodes;
+ private Action markers_next;
+ private Action markers_previous;
+ private Action limits;
+ private Action goto_next;
+ private Action goto_previous;
+ private Action goto_last;
+ private Action play;
+ private Action save_dot;
+ private Action save_col_dot;
+ private Action save_cur_dot;
+ private Action save_text;
+ ImageDescriptor playImage= CallgraphPlugin.getImageDescriptor("icons/perform.png"); //$NON-NLS-1$
+ ImageDescriptor pauseImage= CallgraphPlugin.getImageDescriptor("icons/pause.gif"); //$NON-NLS-1$
- public static Composite masterComposite;
- private static Composite graphComp;
- private static Composite treeComp;
+ private IMenuManager menu;
+ private IMenuManager gotoMenu;
+ private IMenuManager view;
+ private IMenuManager animation;
+ private IMenuManager markers; //Unused
+ private IMenuManager saveMenu;
+ public IToolBarManager mgr;
- private static StapGraphParser parser;
- private static StapGraph graph;
+ private Composite graphComp;
+ private Composite treeComp;
+ private StapGraph g;
+ private int treeSize = 200;
+
+
/**
- * The constructor.
- * @return
+ * Initializes the view by creating composites (if necessary) and canvases
+ * Calls loadData(), and calls finishLoad() if not in realTime mode (otherwise
+ * it is up to the user-defined update methods to finish loading).
+ *
+ * @return status
+ *
*/
- public CallgraphView() {
- isInitialized = true;
+ public IStatus initializeView(Display targetDisplay, IProgressMonitor monitor) {
+
+ Display disp = targetDisplay;
+ if (disp == null)
+ disp = Display.getCurrent();
+ if (disp == null)
+ disp = Display.getDefault();
+
+ treeSize = 200;
+ makeTreeComp(treeSize);
+ makeGraphComp();
+ graphComp.setBackgroundMode(SWT.INHERIT_FORCE);
+
+ //Create papa canvas
+ Canvas papaCanvas = new Canvas(graphComp, SWT.BORDER);
+ GridLayout papaLayout = new GridLayout(1, true);
+ papaLayout.horizontalSpacing=0;
+ papaLayout.verticalSpacing=0;
+ papaLayout.marginHeight=0;
+ papaLayout.marginWidth=0;
+ papaCanvas.setLayout(papaLayout);
+ GridData papaGD = new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false);
+ papaGD.widthHint=160;
+ papaCanvas.setLayoutData(papaGD);
+
+
+ //Add first button
+ Image image = CallgraphPlugin.getImageDescriptor("icons/up.gif").createImage(); //$NON-NLS-1$
+ Button up = new Button(papaCanvas, SWT.PUSH);
+ GridData buttonData = new GridData(SWT.CENTER, SWT.CENTER, true, false);
+ buttonData.widthHint = 150;
+ buttonData.heightHint = 20;
+ up.setData(buttonData);
+ up.setImage(image);
+ up.setToolTipText(Messages.getString("CallgraphView.ThumbNailUp")); //$NON-NLS-1$
+
+
+ //Add thumb canvas
+ Canvas thumbCanvas = new Canvas(papaCanvas, SWT.NONE);
+
+
+ //Add second button
+ image = CallgraphPlugin.getImageDescriptor("icons/down.gif").createImage(); //$NON-NLS-1$
+ Button down = new Button(papaCanvas, SWT.PUSH);
+ buttonData = new GridData(SWT.CENTER, SWT.CENTER, true, false);
+ buttonData.widthHint = 150;
+ buttonData.heightHint = 0;
+ down.setData(buttonData);
+ down.setImage(image);
+ down.setToolTipText(Messages.getString("CallgraphView.ThumbNailDown")); //$NON-NLS-1$
+
+
+ //Initialize graph
+ g = new StapGraph(graphComp, SWT.BORDER, treeComp, papaCanvas, this);
+ g.setLayoutData(new GridData(masterComposite.getBounds().width,Display.getCurrent().getBounds().height - treeSize));
+
+ up.addSelectionListener(new AutoScrollSelectionListener(
+ AutoScrollSelectionListener.AutoScroll_up, g));
+ down.addSelectionListener(new AutoScrollSelectionListener(
+ AutoScrollSelectionListener.AutoScroll_down, g));
+
+
+ //Initialize thumbnail
+ GridData thumbGD = new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false);
+ thumbGD.widthHint=160;
+ thumbCanvas.setLayoutData(thumbGD);
+ LightweightSystem lws = new LightweightSystem(thumbCanvas);
+ ScrollableThumbnail thumb = new ScrollableThumbnail(g.getViewport());
+ thumb.setSource(g.getContents());
+ lws.setContents(thumb);
+
+ loadData(monitor);
+ return finishLoad(monitor);
}
- public static CallgraphView getSingleInstance(){
- if (isInitialized){
- return stapview;
+ /**
+ * Load data.
+ * @param mon -- Progress monitor.
+ * @return
+ */
+ private IStatus loadData(IProgressMonitor mon) {
+ IProgressMonitor monitor = mon;
+ //Dummy node, set start time
+ if (g.getNodeData(0) == null) {
+ g.loadData(SWT.NONE, 0, StapGraph.CONSTANT_TOP_NODE_NAME,
+ 1, 1, -1, false, ""); //$NON-NLS-1$
}
- return null;
- }
-
-
- public static void testFunction() {
- if (masterComposite != null && !masterComposite.isDisposed())
- masterComposite.dispose();
+ g.setStartTime(parser.startTime);
+ g.setEndTime(parser.endingTimeInNS);
+
+
+ /*
+ * Load graph data
+ */
+ for (int id_parent : parser.serialMap.keySet()) {
+ if (id_parent < 0) continue;
+ boolean marked = false;
+ String msg = ""; //$NON-NLS-1$
+ if (g.getNodeData(id_parent) == null) {
+ if (parser.markedMap.get(id_parent) != null) {
+ marked = true;
+ msg = parser.markedMap.remove(id_parent);
+ }
+ g.loadData(SWT.NONE, id_parent, parser.serialMap.get(id_parent), parser.timeMap.get(id_parent),
+ 1, 0, marked, msg);
+ }
+
+ for (int key :parser.neighbourMaps.keySet()) {
+ HashMap<Integer, ArrayList<Integer>> outNeighbours = parser.neighbourMaps.get(key);
+ if (outNeighbours == null || outNeighbours.get(id_parent) == null)
+ continue;
+ for (int id_child : outNeighbours.get(id_parent)) {
+ if (g.getNodeData(id_child) != null && id_child < 0) {
+ //Assume this is an additional call of the same node
+ //Should only happen in dot-files!!
+ g.addCalled(id_child);
+ continue;
+ } else if (g.getNodeData(id_child) != null) {
+ continue;
+ }
+ if (monitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+
+ marked = false;
+ msg = ""; //$NON-NLS-1$
+ if (parser.markedMap.get(id_child) != null) {
+ marked = true;
+ msg = parser.markedMap.remove(id_child);
+ }
+ if (id_child != -1) {
+ if (parser.timeMap.get(id_child) == null){
+ g.loadData(SWT.NONE, id_child, parser.serialMap
+ .get(id_child), parser.timeMap.get(0),
+ 1, id_parent, marked,msg);
+ }else{
+ g.loadData(SWT.NONE, id_child, parser.serialMap
+ .get(id_child), parser.timeMap.get(id_child),
+ 1, id_parent, marked,msg);
+ }
+ }
+ }
+ }
+
+ if (parser.neighbourMaps.size() > 1) {
+ g.setThreaded();
+ }
+ }
+
+ monitor.worked(1);
+ if (parser.markedMap.size() > 0) {
+ //Still some markers left
+ for (int key : parser.markedMap.keySet()) {
+ g.insertMessage(key, parser.markedMap.get(key));
+ }
+
+ //Erase the remaining nodes, just in case
+ parser.markedMap.clear();
+ }
+
+
+ if (g.aggregateTime == null)
+ g.aggregateTime = new HashMap<String, Long>();
+ if (g.aggregateCount == null)
+ g.aggregateCount = new HashMap<String, Integer>();
+
+ g.aggregateCount.putAll(parser.countMap);
+ g.aggregateTime.putAll(parser.aggregateTimeMap);
+ //TODO: Do not set to 0.
+ g.setLastFunctionCalled(0);
+
+
+ //Finish off by collapsing nodes, initializing the tree and setting options
+ g.recursivelyCollapseAllChildrenOfNode(g.getTopNode());
+ monitor.worked(1);
+ setGraphOptions(true);
+ g.initializeTree();
+ g.setProject(parser.project);
+
+
+ return Status.OK_STATUS;
}
- public static void setValues(Composite graphC, Composite treeC, StapGraph g, StapGraphParser p){
- treeComp = treeC;
- graphComp = graphC;
- graph = g;
- parser = p;
+ /**
+ * Completes the loading process by calculating aggregate data.
+ *
+ * @param monitor
+ * @return
+ */
+ private IStatus finishLoad(IProgressMonitor monitor) {
+
+ if (g.aggregateCount == null)
+ g.aggregateCount = new HashMap<String, Integer>();
+
+ g.aggregateCount.putAll(parser.countMap);
+
+ if (g.aggregateTime == null)
+ g.aggregateTime = new HashMap<String, Long>();
+ g.aggregateTime.putAll(parser.aggregateTimeMap);
+
+ //Set total time
+ if (parser.totalTime != -1)
+ g.setTotalTime(parser.totalTime);
+
+ //-------------Finish initializations
+ //Generate data for collapsed nodes
+ if (monitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+ g.initializeTree();
+
+
+ if (monitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+ g.setCallOrderList(parser.callOrderList);
+ g.setProject(parser.project);
+
+
+ this.initializePartControl();
+ return Status.OK_STATUS;
}
@@ -143,12 +335,18 @@ public class CallgraphView extends ViewPart {
* Enable or Disable the graph options
* @param visible
*/
- public static void setGraphOptions (boolean visible){
- save_callgraph.setEnabled(visible);
+ public void setGraphOptions (boolean visible){
+ play.setEnabled(visible);
+ save_file.setEnabled(visible);
+ save_dot.setEnabled(visible);
+ save_col_dot.setEnabled(visible);
+ save_cur_dot.setEnabled(visible);
+ save_text.setEnabled(visible);
+
view_treeview.setEnabled(visible);
view_radialview.setEnabled(visible);
view_aggregateview.setEnabled(visible);
- view_boxview.setEnabled(visible);
+ view_levelview.setEnabled(visible);
view_refresh.setEnabled(visible);
limits.setEnabled(visible);
@@ -163,51 +361,26 @@ public class CallgraphView extends ViewPart {
goto_previous.setEnabled(visible);
goto_last.setEnabled(visible);
}
-
-/**
- * @param doMaximize : true && view minimized will maximize the view,
- * otherwise it will just 'refresh'
- */
- public static void maximizeOrRefresh(boolean doMaximize){
- IWorkbenchPage page = CallgraphView
- .getSingleInstance().getViewSite().getWorkbenchWindow().getActivePage();
-
- if (doMaximize && page.getPartState(page.getActivePartReference()) != IWorkbenchPage.STATE_MAXIMIZED){
- IWorkbenchAction action = ActionFactory.MAXIMIZE.create(CallgraphView
- .getSingleInstance().getViewSite().getWorkbenchWindow());
- action.run();
- }else{
- CallgraphView.layout();
- }
- }
-
-
- public static void firstTimeRefresh(){
- graphComp.setSize(masterComposite.getSize().x ,masterComposite.getSize().y);
- }
- public static Composite makeTreeComp(int treeSize) {
+ public void makeTreeComp(int treeSize) {
if (treeComp != null && !treeComp.isDisposed()) {
- return treeComp;
+ treeComp.dispose();
}
- Composite treeComp = new Composite(CallgraphView.masterComposite, SWT.NONE);
+ treeComp = new Composite(this.masterComposite, SWT.NONE);
GridData treegd = new GridData(SWT.BEGINNING, SWT.FILL, false, true);
treegd.widthHint = treeSize;
treeComp.setLayout(new FillLayout());
treeComp.setLayoutData(treegd);
- return treeComp;
}
- public static Composite makeGraphComp() {
-// if (graphComp != null && !graphComp.isDisposed()) {
-// return graphComp;
-// }
- if (graphComp != null)
+ public void makeGraphComp() {
+ if (graphComp != null && !graphComp.isDisposed()) {
graphComp.dispose();
- Composite graphComp = new Composite(CallgraphView.masterComposite, SWT.NONE);
+ }
+ graphComp = new Composite(this.masterComposite, SWT.NONE);
GridData graphgd = new GridData(SWT.FILL, SWT.FILL, true, true);
GridLayout gl = new GridLayout(2, false);
gl.horizontalSpacing=0;
@@ -215,89 +388,25 @@ public class CallgraphView extends ViewPart {
graphComp.setLayout(gl);
graphComp.setLayoutData(graphgd);
- return graphComp;
- }
-
- public static void layout() {
- masterComposite.layout();
- }
-
- /**
- * If view is not maximized it will be maximized
- */
- public static void maximizeIfUnmaximized() {
- IWorkbenchPage page = CallgraphView
- .getSingleInstance().getViewSite().getWorkbenchWindow().getActivePage();
-
- if (page.getPartState(page.getActivePartReference()) != IWorkbenchPage.STATE_MAXIMIZED){
- IWorkbenchAction action = ActionFactory.MAXIMIZE.create(CallgraphView
- .getSingleInstance().getViewSite().getWorkbenchWindow());
- action.run();
- }
-
}
-
-
-//
-// public static void disposeAll() {
-// if (graphComp != null) {
-// graphComp.setVisible(false);
-// GridData gd = (GridData) graphComp.getLayoutData();
-// gd.exclude = true;
-// graphComp.setLayoutData(gd);
-// graphComp.dispose();
-// }
-// if (treeComp != null) {
-// treeComp.setVisible(false);
-// GridData gd = (GridData) treeComp.getLayoutData();
-// gd.exclude = true;
-// treeComp.setLayoutData(gd);
-// treeComp.dispose();
-// }
-// }
+
/**
* This must be executed before a Graph is displayed
*/
- public static void createPartControl(){
-
-
+ private void initializePartControl(){
setGraphOptions(true);
- String text = ""; //$NON-NLS-1$
- StyleRange[] sr = null;
-
-
- if (viewer != null && !viewer.isDisposed()) {
- text = viewer.getText();
- sr = viewer.getStyleRanges();
- viewer.dispose();
- }
-
-
+ if (graphComp == null)
+ return;
graphComp.setParent(masterComposite);
if (treeComp != null)
treeComp.setParent(masterComposite);
- if (graph == null) {
- createViewer(masterComposite);
- viewer.setText(text);
- viewer.setStyleRanges(sr);
- }
-
- //MAXIMIZE THE SYSTEMTAP VIEW WHEN RENDERING A GRAPH
- firstTimeRefresh();
+ graphComp.setSize(masterComposite.getSize().x ,masterComposite.getSize().y);
}
- public static void createViewer(Composite parent){
- viewer = new StyledText(parent, SWT.READ_ONLY | SWT.MULTI
- | SWT.V_SCROLL | SWT.WRAP);
-
- viewer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- Font font = new Font(parent.getDisplay(), "Monospace", 11, SWT.NORMAL); //$NON-NLS-1$
- viewer.setFont(font);
- }
/**
* This is a callback that will allow us to create the viewer and
@@ -307,7 +416,6 @@ public class CallgraphView extends ViewPart {
if (masterComposite != null)
masterComposite.dispose();
masterComposite = parent;
- this.display = parent.getDisplay();
GridLayout layout = new GridLayout(2, false);
layout.horizontalSpacing=0;
GridData gd = new GridData(100, 100);
@@ -315,10 +423,6 @@ public class CallgraphView extends ViewPart {
parent.setLayout(layout);
parent.setLayoutData(gd);
- //CREATE THE TEXT VIEWER
- if (graph == null)
- createViewer(parent);
-
// LOAD ALL ACTIONS
createActions();
@@ -330,56 +434,116 @@ public class CallgraphView extends ViewPart {
menu = getViewSite().getActionBars().getMenuManager();
// ADD OPTIONS TO THE GRAPH MENU
- file = new MenuManager(Messages.getString("CallgraphView.0")); //$NON-NLS-1$
- view = new MenuManager(Messages.getString("CallgraphView.1")); //$NON-NLS-1$
- errors = new MenuManager(Messages.getString("CallgraphView.Errors")); //$NON-NLS-1$
- animation = new MenuManager(Messages.getString("CallgraphView.2")); //$NON-NLS-1$
- help = new MenuManager(Messages.getString("CallgraphView.5")); //$NON-NLS-1$
- markers = new MenuManager(Messages.getString("CallgraphView.6")); //$NON-NLS-1$
- gotoMenu = new MenuManager(Messages.getString("CallgraphView.9")); //$NON-NLS-1$
-
+ addFileMenu();
+
+ save_cur_dot = new Action(Messages.getString("CallgraphView.SaveViewAsDot")) { //$NON-NLS-1$
+ public void run(){
+ writeToDot(g.getCollapseMode(), g.nodeMap.keySet());
+ }
+ };
+ save_dot = new Action(Messages.getString("CallgraphView.SaveAllUncollapsedAsDot")) { //$NON-NLS-1$
+ public void run(){
+ writeToDot(false, g.nodeDataMap.keySet());
+ }
+ };
- menu.add(file);
+ save_col_dot = new Action (Messages.getString("CallgraphView.SaveAllCollapsedAsDot")) { //$NON-NLS-1$
+ public void run(){
+ writeToDot(true, g.nodeDataMap.keySet());
+ }
+
+ };
+
+ save_text = new Action (Messages.getString("CallgraphView.SaveCollapsedAsASCII")) { //$NON-NLS-1$
+ public void run() {
+ //Prints an 80 char table
+ Shell sh = new Shell();
+ FileDialog dialog = new FileDialog(sh, SWT.SAVE);
+ String filePath = dialog.open();
+
+ if (filePath == null)
+ return;
+ File f = new File(filePath);
+ f.delete();
+ try {
+ f.createNewFile();
+ BufferedWriter out = new BufferedWriter(new FileWriter(f));
+ StringBuilder builder = new StringBuilder();
+ builder.append(" Function | Called | Time\n"); //$NON-NLS-1$
+
+ for (StapData k : g.nodeDataMap.values()) {
+ if ( (!k.isCollapsed ) && !k.isOnlyChildWithThisName())
+ continue;
+ if (k.isCollapsed) {
+ StringBuilder name = new StringBuilder(k.name);
+ name = fixString(name, 60);
+ builder.append(" " + name + " | "); //$NON-NLS-1$ //$NON-NLS-2$
+
+ StringBuilder called = new StringBuilder("" + k.timesCalled); //$NON-NLS-1$
+ called = fixString(called, 6);
+
+ StringBuilder time = new StringBuilder("" + //$NON-NLS-1$
+ StapNode.numberFormat.format((float) k.getTime()/g.getTotalTime() * 100)
+ + "%"); //$NON-NLS-1$
+ time = fixString(time, 6);
+
+ builder.append(called + " | " + time + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ if (builder.length() > 2000) {
+ out.append(builder.toString());
+ out.flush();
+ builder.setLength(0);
+ }
+ }
+
+ if (builder.length() > 0)
+ out.append(builder.toString());
+ out.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ };
+ saveMenu = new MenuManager(Messages.getString("CallgraphView.SaveMenu")); //$NON-NLS-1$
+ file.add(saveMenu);
+ saveMenu.add(save_cur_dot);
+ saveMenu.add(save_col_dot);
+ saveMenu.add(save_text);
+ saveMenu.add(save_dot);
+ view = new MenuManager(Messages.getString("CallgraphView.ViewMenu")); //$NON-NLS-1$
+ animation = new MenuManager(Messages.getString("CallgraphView.AnimationMenu")); //$NON-NLS-1$
+ markers = new MenuManager(Messages.getString("CallgraphView.Markers")); //$NON-NLS-1$
+ gotoMenu = new MenuManager(Messages.getString("CallgraphView.GoTo")); //$NON-NLS-1$
menu.add(view);
-// menu.add(animation);
menu.add(gotoMenu);
- menu.add(errors);
- menu.add(help);
-
-
- file.add(open_callgraph);
- file.add(open_default);
- file.add(save_callgraph);
-
-
- errors.add(error_errorLog);
- errors.add(error_deleteError);
-
+ addHelpMenu();
view.add(view_treeview);
view.add(view_radialview);
view.add(view_aggregateview);
- view.add(view_boxview);
+ view.add(view_levelview);
view.add(getView_refresh());
view.add(mode_collapsednodes);
view.add(limits);
+ view.add(animation);
+ gotoMenu.add(play);
gotoMenu.add(goto_previous);
gotoMenu.add(goto_next);
gotoMenu.add(goto_last);
+ gotoMenu.add(markers);
-
+ addKillButton();
+ mgr.add(play);
mgr.add(view_radialview);
mgr.add(view_treeview);
- mgr.add(view_boxview);
+ mgr.add(view_levelview);
mgr.add(view_aggregateview);
- mgr.add(getView_refresh());
mgr.add(mode_collapsednodes);
// help.add(help_about);
- help.add(help_version);
markers.add(markers_next);
markers.add(markers_previous);
@@ -389,432 +553,92 @@ public class CallgraphView extends ViewPart {
// menu.add(markers);
setGraphOptions(false);
-
- // Colouring helper variable
- previousEnd = 0;
- stapview = this;
}
- /**
- * Passing the focus request to the viewer's control.
- */
- public void setFocus() {
- if (viewer != null && !viewer.isDisposed())
- viewer.setFocus();
- }
-
- /**
- * Force the CallgraphView to initialize
- */
- public static void forceDisplay(){
- try {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- window.getActivePage().showView("org.eclipse.linuxtools.callgraph.callgraphview").setFocus(); //$NON-NLS-1$
- } catch (PartInitException e2) {
- e2.printStackTrace();
- }
-
- }
-
- public void prettyPrintln(String text) {
- Vector<StyleRange> styles = new Vector<StyleRange>();
- String[] txt = text.split("\\n"); //$NON-NLS-1$
- int lineOffset = 0;
- int inLineOffset;
-
- //txt[] contains text, with one entry for each new line
- for (int i = 0; i < txt.length; i++) {
-
- //Skip blank strings
- if (txt[i].length() == 0) {
- viewer.append(NEW_LINE);
- continue;
- }
-
- //Search for colour codes, if none exist then continue
- String[] split_txt = txt[i].split("~\\("); //$NON-NLS-1$
- if (split_txt.length == 1) {
- viewer.append(split_txt[0]);
- viewer.append(NEW_LINE);
- continue;
- }
-
- inLineOffset = 0;
- for (int k = 0; k < split_txt.length; k++) {
- //Skip blank substrings
- if (split_txt[k].length() == 0)
- continue;
-
- //Split for the number codes
- String[] coloursAndText = split_txt[k].split("\\)~"); //$NON-NLS-1$
-
- //If the string is properly formatted, colours should be length 2
- //If it is not properly formatted, don't colour (just print)
- if (coloursAndText.length != 2) {
- for (int j = 0; j < coloursAndText.length; j++) {
- viewer.append(coloursAndText[j]);
- inLineOffset += coloursAndText[j].length();
- }
- continue;
- }
-
- //The first element in the array should contain the colours
- String[] colours = coloursAndText[0].split(","); //$NON-NLS-1$
- if (colours.length < 3) continue;
-
- //The second element in the array should contain the text
- viewer.append(coloursAndText[1]);
-
- //Create a colour based on the 3 integers (if there are any more integers, just ignore)
- int R = new Integer(colours[0].replaceAll(" ", "")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$
- int G = new Integer(colours[1].replaceAll(" ", "")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$
- int B = new Integer(colours[2].replaceAll(" ", "")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$
-
- if (R > 255) R = 255;
- if (G > 255) G = 255;
- if (B > 255) B = 255;
-
- if (R < 0 ) R = 0;
- if (G < 0 ) G = 0;
- if (B < 0 ) B = 0;
-
- Color newColor = new Color(display, R, G, B);
-
- //Find the offset of the current line
- lineOffset = viewer.getOffsetAtLine(viewer.getLineCount() - 1);
-
- //Create a new style that lasts no further than the length of the line
- StyleRange newStyle = new StyleRange(lineOffset + inLineOffset,
- coloursAndText[1].length(),
- newColor, null);
- styles.addElement(newStyle);
-
- inLineOffset+=coloursAndText[1].length();
- }
-
- viewer.append(NEW_LINE);
- }
-
- //Create a new style range
- StyleRange[] s = new StyleRange[styles.size()];
- styles.copyInto(s);
-
- int cnt = viewer.getCharCount();
-
- //Using replaceStyleRanges with previousEnd, etc, effectively adds
- //the StyleRange to the existing set of Style Ranges (so we don't
- //waste time fudging with old style ranges that haven't changed)
- viewer.replaceStyleRanges(previousEnd, cnt - previousEnd, s);
- previousEnd = cnt;
-
- //Change focus and update
- viewer.setTopIndex(viewer.getLineCount() - 1);
- viewer.update();
- }
-
- public void println(String text) {
- if (viewer != null && !viewer.isDisposed()) {
- viewer.append(text);
- viewer.setTopIndex(viewer.getLineCount() - 1);
- viewer.update();
- }
- }
- public void clearAll() {
- if (viewer != null && !viewer.isDisposed()) {
- previousEnd = 0;
- viewer.setText(""); //$NON-NLS-1$
- viewer.update();
- }
- }
-
- /**
- * Testing convenience method to see what was printed
- *
- * @return viewer text
- */
- public String getText() {
- return viewer.getText();
- }
-
-
- /**
- * Populates the file menu
- */
- public void createFileActions() {
- //Opens from some location in your program
- open_callgraph = new Action(Messages.getString("CallgraphView.7")){ //$NON-NLS-1$
- public void run(){
- FileDialog dialog = new FileDialog(new Shell(), SWT.DEFAULT);
- String filePath = dialog.open();
- if (filePath != null){
- StapGraphParser new_parser = new StapGraphParser();
- new_parser.setFile(filePath);
- new_parser.schedule();
+ public StringBuilder fixString(StringBuilder name, int length) {
+ if (name.length() > length)
+ name = new StringBuilder(name.substring(0, length - 1));
+ else {
+ int diff = length - name.length();
+ boolean left = true;
+ while (diff > 0) {
+ if (left) {
+ name.insert(0, " "); //$NON-NLS-1$
+ left = false;
}
- }
- };
-
- //Opens from the default location
- open_default = new Action(Messages.getString("CallgraphView.11")){ //$NON-NLS-1$
- public void run(){
- StapGraphParser new_parser = new StapGraphParser();
- new_parser.schedule();
- }
- };
-
-
- //Save callgraph.out
- save_callgraph = new Action(Messages.getString("CallgraphView.8")){ //$NON-NLS-1$
- public void run(){
- Shell sh = new Shell();
- FileDialog dialog = new FileDialog(sh, SWT.SAVE);
- String filePath = dialog.open();
-
- if (filePath != null) {
- parser.saveData(filePath);
- }
- }
- };
-
- }
-
- public void createHelpActions() {
- help_version = new Action(Messages.getString("CallgraphView.13")) { //$NON-NLS-1$
- public void run() {
- Runtime rt = Runtime.getRuntime();
- try {
- Process pr = rt.exec("stap -V"); //$NON-NLS-1$
- BufferedReader buf = new BufferedReader(new InputStreamReader(pr
- .getErrorStream()));
- String line = ""; //$NON-NLS-1$
- String message = ""; //$NON-NLS-1$
-
- while ((line = buf.readLine()) != null) {
- message += line + NEW_LINE; //$NON-NLS-1$
- }
-
- try {
- pr.waitFor();
- } catch (InterruptedException e) {
- e.printStackTrace();
+ else {
+ name.append(" "); //$NON-NLS-1$
+ left = true;
}
-
-
- Shell sh = new Shell();
-
- MessageDialog.openInformation(sh, Messages.getString("CallgraphView.SystemTapVersionBox"), message); //$NON-NLS-1$
-
- } catch (IOException e) {
- e.printStackTrace();
+ diff--;
}
}
- };
-
- help_about = new Action(Messages.getString("CallgraphView.4")) { //$NON-NLS-1$
- public void run() {
- Display disp = Display.getCurrent();
- if (disp == null){
- disp = Display.getDefault();
- }
-
-
- Shell sh = new Shell(disp, SWT.MIN | SWT.MAX);
- sh.setSize(425, 540);
- GridLayout gl = new GridLayout(1, true);
- sh.setLayout(gl);
-
- sh.setText(""); //$NON-NLS-1$
-
- Image img = new Image(disp, PluginConstants.PLUGIN_LOCATION+"systemtap.png"); //$NON-NLS-1$
- Composite cmp = new Composite(sh, sh.getStyle());
- cmp.setLayout(gl);
- GridData data = new GridData(415,100);
- cmp.setLayoutData(data);
- cmp.setBackgroundImage(img);
-
- Composite c = new Composite(sh, sh.getStyle());
- c.setLayout(gl);
- GridData gd = new GridData(415,400);
- c.setLayoutData(gd);
- c.setLocation(0,300);
- StyledText viewer = new StyledText(c, SWT.READ_ONLY | SWT.MULTI
- | SWT.V_SCROLL | SWT.WRAP | SWT.BORDER);
-
- GridData viewerGD = new GridData(SWT.FILL, SWT.FILL, true, true);
- viewer.setLayoutData(viewerGD);
- Font font = new Font(sh.getDisplay(), "Monospace", 11, SWT.NORMAL); //$NON-NLS-1$
- viewer.setFont(font);
- viewer.setText(
- "" + //$NON-NLS-1$
- "" + //$NON-NLS-1$
- "" + //$NON-NLS-1$
- "" + //$NON-NLS-1$
- "" + //$NON-NLS-1$
- "" + //$NON-NLS-1$
-
- "" + //$NON-NLS-1$
-//
-// Messages.getString("LaunchAbout.9") + //$NON-NLS-1$
-// Messages.getString("LaunchAbout.10") + //$NON-NLS-1$
-
- "" + //$NON-NLS-1$
- "" + //$NON-NLS-1$
- "" + //$NON-NLS-1$
-
-// Messages.getString("LaunchAbout.14") + //$NON-NLS-1$
-// Messages.getString("LaunchAbout.15") + //$NON-NLS-1$
-// Messages.getString("LaunchAbout.16") + //$NON-NLS-1$
-
- "" + //$NON-NLS-1$
-
-// Messages.getString("LaunchAbout.18") + //$NON-NLS-1$
-// Messages.getString("LaunchAbout.19") + //$NON-NLS-1$
-
- "" + //$NON-NLS-1$
- "" //$NON-NLS-1$
- );
-
-
-
- sh.open();
- }
- };
+ return name;
}
- /**
- * Populates the Errors menu
- */
- public void createErrorActions() {
-
- error_errorLog = new Action(Messages.getString("CallgraphView.OpenLog")) { //$NON-NLS-1$
- public void run() {
- boolean error = false;
- File log = new File(PluginConstants.DEFAULT_OUTPUT + "Error.log"); //$NON-NLS-1$
- BufferedReader buff;
- try {
- buff = new BufferedReader(new FileReader(log));
- String logText = ""; //$NON-NLS-1$
- String line;
-
- while ((line = buff.readLine()) != null) {
- logText+=line + PluginConstants.NEW_LINE;
- }
-
- Shell sh = new Shell(SWT.BORDER | SWT.TITLE);
-
- sh.setText(Messages.getString("CallgraphView.15")); //$NON-NLS-1$
- sh.setLayout(new FillLayout());
- sh.setSize(600,600);
-
- StyledText txt = new StyledText(sh, SWT.MULTI | SWT.V_SCROLL | SWT.WRAP | SWT.READ_ONLY);
-
- txt.setText(logText);
-
- sh.setText(Messages.getString("CallgraphView.21")); //$NON-NLS-1$
-
- sh.open();
- txt.setTopIndex(txt.getLineCount());
-
-
- } catch (FileNotFoundException e) {
- error = true;
- } catch (IOException e) {
- error = true;
- } finally {
- if (error) {
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
- Messages.getString("CallgraphView.ErrorMessageName"), //$NON-NLS-1$
- Messages.getString("CallgraphView.ErrorMessageTitle"), //$NON-NLS-1$
- Messages.getString("CallgraphView.ErrorMessageBody") + //$NON-NLS-1$
- Messages.getString("CallgraphView.ErrorMessageBody2")); //$NON-NLS-1$
- mess.schedule();
- }
- }
-
- }
- };
-
-
- error_deleteError = new Action(Messages.getString("CallgraphView.ClearLog")) { //$NON-NLS-1$
- public void run() {
- if (!MessageDialog.openConfirm(new Shell(), Messages.getString("CallgraphView.DeleteLogsTitle"), //$NON-NLS-1$
- Messages.getString("CallgraphView.DeleteLogsMessage") + //$NON-NLS-1$
- Messages.getString("CallgraphView.DeleteLogsMessage2"))) //$NON-NLS-1$
- return;
-
- SystemTapErrorHandler.delete();
- }
- };
-
-
- }
public void createViewActions() {
//Set drawmode to tree view
- view_treeview = new Action(Messages.getString("CallgraphView.16")){ //$NON-NLS-1$
+ view_treeview = new Action(Messages.getString("CallgraphView.TreeView")){ //$NON-NLS-1$
public void run() {
- graph.draw(StapGraph.CONSTANT_DRAWMODE_TREE, graph.getAnimationMode(),
- graph.getRootVisibleNodeNumber());
- graph.scrollTo(graph.getNode(graph.getRootVisibleNodeNumber()).getLocation().x
- - graph.getBounds().width / 2, graph.getNode(
- graph.getRootVisibleNodeNumber()).getLocation().y);
+ g.draw(StapGraph.CONSTANT_DRAWMODE_TREE, g.getAnimationMode(),
+ g.getRootVisibleNodeNumber());
+ g.scrollTo(g.getNode(g.getRootVisibleNodeNumber()).getLocation().x
+ - g.getBounds().width / 2, g.getNode(
+ g.getRootVisibleNodeNumber()).getLocation().y);
+ if (play != null)
+ play.setEnabled(true);
}
};
- ImageDescriptor treeImage = ImageDescriptor.createFromImage(
- new Image(Display.getCurrent(), CallGraphConstants.PLUGIN_LOCATION + "icons/tree_view.gif")); //$NON-NLS-1$
+ ImageDescriptor treeImage = CallgraphPlugin.getImageDescriptor("icons/tree_view.gif"); //$NON-NLS-1$
view_treeview.setImageDescriptor(treeImage);
//Set drawmode to radial view
- view_radialview = new Action(Messages.getString("CallgraphView.17")){ //$NON-NLS-1$
+ view_radialview = new Action(Messages.getString("CallgraphView.RadialView")){ //$NON-NLS-1$
public void run(){
- graph.draw(StapGraph.CONSTANT_DRAWMODE_RADIAL, graph.getAnimationMode(),
- graph.getRootVisibleNodeNumber());
-
+ g.draw(StapGraph.CONSTANT_DRAWMODE_RADIAL, g.getAnimationMode(),
+ g.getRootVisibleNodeNumber());
+ if (play != null)
+ play.setEnabled(true);
}
};
- ImageDescriptor d = ImageDescriptor.createFromImage(
- new Image(Display.getCurrent(),
- CallGraphConstants.PLUGIN_LOCATION + "/icons/radial_view.gif")); //$NON-NLS-1$
+ ImageDescriptor d = CallgraphPlugin.getImageDescriptor("/icons/radial_view.gif"); //$NON-NLS-1$
view_radialview.setImageDescriptor(d);
-
//Set drawmode to aggregate view
- view_aggregateview = new Action(Messages.getString("CallgraphView.18")){ //$NON-NLS-1$
+ view_aggregateview = new Action(Messages.getString("CallgraphView.AggregateView")){ //$NON-NLS-1$
public void run(){
- graph.draw(StapGraph.CONSTANT_DRAWMODE_AGGREGATE, graph.getAnimationMode(),
- graph.getRootVisibleNodeNumber());
-
+ g.draw(StapGraph.CONSTANT_DRAWMODE_AGGREGATE, g.getAnimationMode(),
+ g.getRootVisibleNodeNumber());
+ if (play != null)
+ play.setEnabled(false);
}
};
- ImageDescriptor aggregateImage = ImageDescriptor.createFromImage(
- new Image(Display.getCurrent(),
- CallGraphConstants.PLUGIN_LOCATION + "/icons/view_aggregateview.gif")); //$NON-NLS-1$
+ ImageDescriptor aggregateImage = CallgraphPlugin.getImageDescriptor("/icons/view_aggregateview.gif"); //$NON-NLS-1$
view_aggregateview.setImageDescriptor(aggregateImage);
- //Set drawmode to box view
- view_boxview = new Action(Messages.getString("CallgraphView.19")){ //$NON-NLS-1$
+ //Set drawmode to level view
+ view_levelview = new Action(Messages.getString("CallgraphView.LevelView")){ //$NON-NLS-1$
public void run(){
- graph.draw(StapGraph.CONSTANT_DRAWMODE_BOX, graph.getAnimationMode(),
- graph.getRootVisibleNodeNumber());
+ g.draw(StapGraph.CONSTANT_DRAWMODE_LEVEL, g.getAnimationMode(),
+ g.getRootVisibleNodeNumber());
+ if (play != null)
+ play.setEnabled(true);
}
};
- ImageDescriptor boxImage = ImageDescriptor.createFromImage(
- new Image(Display.getCurrent(),
- CallGraphConstants.PLUGIN_LOCATION + "/icons/showchild_mode.gif")); //$NON-NLS-1$
- view_boxview.setImageDescriptor(boxImage);
+ ImageDescriptor levelImage = CallgraphPlugin.getImageDescriptor("/icons/showchild_mode.gif"); //$NON-NLS-1$
+ view_levelview.setImageDescriptor(levelImage);
setView_refresh(new Action(Messages.getString("CallgraphView.Reset")){ //$NON-NLS-1$
public void run(){
- graph.reset();
+ g.reset();
}
});
- ImageDescriptor refreshImage = ImageDescriptor.createFromImage(
- new Image(Display.getCurrent(),
- CallGraphConstants.PLUGIN_LOCATION + "/icons/nav_refresh.gif")); //$NON-NLS-1$
+ ImageDescriptor refreshImage = CallgraphPlugin.getImageDescriptor("/icons/nav_refresh.gif"); //$NON-NLS-1$
getView_refresh().setImageDescriptor(refreshImage);
@@ -826,9 +650,9 @@ public class CallgraphView extends ViewPart {
*/
public void createAnimateActions() {
//Set animation mode to slow
- animation_slow = new Action(Messages.getString("CallgraphView.20"), Action.AS_RADIO_BUTTON){ //$NON-NLS-1$
+ animation_slow = new Action(Messages.getString("CallgraphView.AnimationSlow"), Action.AS_RADIO_BUTTON){ //$NON-NLS-1$
public void run(){
- graph.setAnimationMode(StapGraph.CONSTANT_ANIMATION_SLOW);
+ g.setAnimationMode(StapGraph.CONSTANT_ANIMATION_SLOW);
this.setChecked(true);
animation_slow.setChecked(true);
animation_fast.setChecked(false);
@@ -838,31 +662,30 @@ public class CallgraphView extends ViewPart {
animation_slow.setChecked(true);
//Set animation mode to fast
- animation_fast = new Action(Messages.getString("CallgraphView.22"), Action.AS_RADIO_BUTTON){ //$NON-NLS-1$
+ animation_fast = new Action(Messages.getString("CallgraphView.AnimationFast"), Action.AS_RADIO_BUTTON){ //$NON-NLS-1$
public void run(){
- graph.setAnimationMode(StapGraph.CONSTANT_ANIMATION_FASTEST);
+ g.setAnimationMode(StapGraph.CONSTANT_ANIMATION_FASTEST);
animation_slow.setChecked(false);
animation_fast.setChecked(true);
}
};
//Toggle collapse mode
- mode_collapsednodes = new Action(Messages.getString("CallgraphView.24"), Action.AS_CHECK_BOX){ //$NON-NLS-1$
+ mode_collapsednodes = new Action(Messages.getString("CallgraphView.CollapsedMode"), Action.AS_CHECK_BOX){ //$NON-NLS-1$
public void run(){
- if (graph.isCollapseMode()) {
- graph.setCollapseMode(false);
- graph.draw(graph.getRootVisibleNodeNumber());
+ if (g.isCollapseMode()) {
+ g.setCollapseMode(false);
+ g.draw(g.getRootVisibleNodeNumber());
}
else {
- graph.setCollapseMode(true);
- graph.draw(graph.getRootVisibleNodeNumber());
+ g.setCollapseMode(true);
+ g.draw(g.getRootVisibleNodeNumber());
}
}
};
- ImageDescriptor newImage = ImageDescriptor.createFromImage(
- new Image(Display.getCurrent(), CallGraphConstants.PLUGIN_LOCATION + "icons/mode_collapsednodes.gif")); //$NON-NLS-1$
+ ImageDescriptor newImage = CallgraphPlugin.getImageDescriptor("icons/mode_collapsednodes.gif"); //$NON-NLS-1$
mode_collapsednodes.setImageDescriptor(newImage);
limits = new Action(Messages.getString("CallgraphView.SetLimits"), Action.AS_PUSH_BUTTON) { //$NON-NLS-1$
@@ -878,7 +701,7 @@ public class CallgraphView extends ViewPart {
limitLabel.setText(Messages.getString("CallgraphView.MaxNodes")); //$NON-NLS-1$
limit = new Spinner(sh, SWT.BORDER);
limit.setMaximum(5000);
- limit.setSelection(graph.getMaxNodes());
+ limit.setSelection(g.getMaxNodes());
limit.setLayoutData(new GridData(SWT.CENTER, SWT.DEFAULT, true, false));
Label bufferLabel = new Label(sh, SWT.NONE);
@@ -886,7 +709,7 @@ public class CallgraphView extends ViewPart {
bufferLabel.setText(Messages.getString("CallgraphView.MaxDepth")); //$NON-NLS-1$
buffer = new Spinner(sh, SWT.BORDER);
buffer.setMaximum(5000);
- buffer.setSelection(graph.getLevelBuffer());
+ buffer.setSelection(g.getLevelBuffer());
buffer.setLayoutData(new GridData(SWT.CENTER, SWT.DEFAULT, true, false));
Button set_limit = new Button(sh, SWT.PUSH);
@@ -895,17 +718,17 @@ public class CallgraphView extends ViewPart {
set_limit.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
boolean redraw = false;
- if (limit.getSelection() > 0 && buffer.getSelection() > 0) {
- graph.setMaxNodes(limit.getSelection());
- graph.setLevelBuffer(buffer.getSelection());
+ if (limit.getSelection() >= 0 && buffer.getSelection() >= 0) {
+ g.setMaxNodes(limit.getSelection());
+ g.setLevelBuffer(buffer.getSelection());
- if (graph.changeLevelLimits(graph.getLevelOfNode(graph.getRootVisibleNodeNumber()))) {
+ if (g.changeLevelLimits(g.getLevelOfNode(g.getRootVisibleNodeNumber()))) {
SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
Messages.getString("CallgraphView.BufferTooHigh"), Messages.getString("CallgraphView.BufferTooHigh"), //$NON-NLS-1$ //$NON-NLS-2$
Messages.getString("CallgraphView.BufferMessage1") + //$NON-NLS-1$
Messages.getString("CallgraphView.BufferMessage2") + //$NON-NLS-1$
Messages.getString("CallgraphView.BufferMessage3") + //$NON-NLS-1$
- Messages.getString("CallgraphView.BufferMessage4") + graph.getLevelBuffer() + //$NON-NLS-1$
+ Messages.getString("CallgraphView.BufferMessage4") + g.getLevelBuffer() + //$NON-NLS-1$
Messages.getString("CallgraphView.BufferMessage5") + PluginConstants.NEW_LINE + PluginConstants.NEW_LINE + //$NON-NLS-1$
Messages.getString("CallgraphView.BufferMessage6") + //$NON-NLS-1$
Messages.getString("CallgraphView.BufferMessage7")); //$NON-NLS-1$
@@ -917,30 +740,25 @@ public class CallgraphView extends ViewPart {
sh.dispose();
if (redraw)
- graph.draw();
+ g.draw();
}
});
- sh.open();
- }
+ sh.open(); }
};
}
/**
- * Creates actions by calling the relevant functions
+ * Convenience method for creating all the various actions
*/
public void createActions() {
- createFileActions();
- createHelpActions();
- createErrorActions();
createViewActions();
createAnimateActions();
createMarkerActions();
createMovementActions();
-// createButtonActions();
mode_collapsednodes.setChecked(true);
@@ -949,224 +767,311 @@ public class CallgraphView extends ViewPart {
public void createMovementActions() {
goto_next = new Action(Messages.getString("CallgraphView.Next")) { //$NON-NLS-1$
public void run() {
- if (graph.isCollapseMode()) {
- graph.setCollapseMode(false);
- }
- int toDraw = graph.getNextCalledNode(graph.getRootVisibleNodeNumber());
- if (toDraw != -1)
- graph.draw(toDraw);
+ g.drawNextNode();
}
};
goto_previous = new Action(Messages.getString("CallgraphView.Previous")) { //$NON-NLS-1$
public void run() {
- if (graph.isCollapseMode()) {
- graph.setCollapseMode(false);
+ if (g.isCollapseMode()) {
+ g.setCollapseMode(false);
}
- int toDraw = graph.getPreviousCalledNode(graph.getRootVisibleNodeNumber());
+ int toDraw = g.getPreviousCalledNode(g.getRootVisibleNodeNumber());
if (toDraw != -1)
- graph.draw(toDraw);
+ g.draw(toDraw);
}
};
goto_last = new Action(Messages.getString("CallgraphView.Last")) { //$NON-NLS-1$
public void run() {
- if (graph.isCollapseMode())
- graph.setCollapseMode(false);
- graph.draw(graph.getLastFunctionCalled());
+ if (g.isCollapseMode())
+ g.setCollapseMode(false);
+ g.draw(g.getLastFunctionCalled());
+ }
+ };
+
+ play = new Action(Messages.getString("CallgraphView.Play")) { //$NON-NLS-1$
+ public void run() {
+ if (g.getDrawMode() != StapGraph.CONSTANT_DRAWMODE_AGGREGATE) {
+ g.play();
+ togglePlayImage();
+ }
}
};
+ play.setImageDescriptor(playImage);
+ }
+
+ /**
+ * Toggles the play/pause image
+ * @param play
+ */
+ protected void togglePlayImage() {
+ if (play.getToolTipText() == Messages.getString("CallgraphView.Pause")) { //$NON-NLS-1$
+ play.setImageDescriptor(playImage);
+ play.setToolTipText(Messages.getString("CallgraphView.Play")); //$NON-NLS-1$
+ }
+ else {
+ play.setImageDescriptor(pauseImage);
+ play.setToolTipText(""); //$NON-NLS-1$
+ }
}
public void createMarkerActions() {
markers_next = new Action(Messages.getString("CallgraphView.nextMarker")) { //$NON-NLS-1$
public void run() {
- graph.draw(graph.getNextMarkedNode());
+ g.draw(g.getNextMarkedNode());
}
};
markers_previous = new Action(Messages.getString("CallgraphView.previousMarker")) { //$NON-NLS-1$
public void run() {
- graph.draw(graph.getPreviousMarkedNode());
+ g.draw(g.getPreviousMarkedNode());
}
};
}
+ @Override
+ protected boolean createOpenAction() {
+ //Opens from specified location
+ open_file = new Action(Messages.getString("CallgraphView.Open")){ //$NON-NLS-1$
+ public void run(){
+ try {
+ FileDialog dialog = new FileDialog(new Shell(), SWT.DEFAULT);
+ String filePath = dialog.open();
+ if (filePath != null){
+ StapGraphParser new_parser = new StapGraphParser();
+ new_parser.setSourcePath(filePath);
+ new_parser.setViewID(CallGraphConstants.viewID);
+ new_parser.schedule();
+ }
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ };
+ return true;
+ }
+
+
+ @Override
+ protected boolean createOpenDefaultAction() {
+ //Opens from the default location
+ open_default = new Action(Messages.getString("CallgraphView.OpenLastRun")){ //$NON-NLS-1$
+ public void run(){
+ try {
+ StapGraphParser new_parser = new StapGraphParser();
+ new_parser.setViewID(CallGraphConstants.viewID);
+ new_parser.schedule();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ };
+
+ return true;
+ }
- public static void disposeGraph() {
- if (graphComp != null && !graphComp.isDisposed())
- graphComp.dispose();
- if (treeComp != null && !treeComp.isDisposed())
- treeComp.dispose();
- if (viewer!= null && !viewer.isDisposed()) {
- String tmp = viewer.getText();
- StyleRange[] tempRange = viewer.getStyleRanges();
- viewer.dispose();
- createViewer(masterComposite);
- viewer.setText(tmp);
- viewer.setStyleRanges(tempRange);
+ @Override
+ public boolean setParser(SystemTapParser newParser) {
+ if (newParser instanceof StapGraphParser) {
+ parser = (StapGraphParser) newParser;
+ return true;
}
- CallgraphView.setGraphOptions(false);
- //Force a redraw (.redraw() .update() not working)
- CallgraphView.maximizeOrRefresh(false);
+ return false;
+
+ }
+
+ @Override
+ public void setViewID() {
+ viewID = "org.eclipse.linuxtools.callgraph.callgraphview"; //$NON-NLS-1$
}
- public static Action getAnimation_slow() {
+
+
+ public Action getAnimation_slow() {
return animation_slow;
}
- public static void setAnimation_slow(Action animation_slow) {
- CallgraphView.animation_slow = animation_slow;
+ public void setAnimation_slow(Action animation_slow) {
+ this.animation_slow = animation_slow;
}
- public static Action getAnimation_fast() {
+ public Action getAnimation_fast() {
return animation_fast;
}
- public static void setAnimation_fast(Action animation_fast) {
- CallgraphView.animation_fast = animation_fast;
+ public void setAnimation_fast(Action animation_fast) {
+ this.animation_fast = animation_fast;
}
- public static IMenuManager getAnimation() {
+ public IMenuManager getAnimation() {
return animation;
}
- public static void setAnimation(IMenuManager animation) {
- CallgraphView.animation = animation;
+ public void setAnimation(IMenuManager animation) {
+ this.animation = animation;
}
- public static Action getMode_collapsednodes() {
+ public Action getMode_collapsednodes() {
return mode_collapsednodes;
}
- public static void setMode_collapsednodes(Action mode_collapsednodes) {
- CallgraphView.mode_collapsednodes = mode_collapsednodes;
+ public void setMode_collapsednodes(Action mode_collapsednodes) {
+ this.mode_collapsednodes = mode_collapsednodes;
}
- public static void setView_refresh(Action view_refresh) {
- CallgraphView.view_refresh = view_refresh;
+ public void setView_refresh(Action view_refresh) {
+ this.view_refresh = view_refresh;
}
- public static Action getView_refresh() {
+ public Action getView_refresh() {
return view_refresh;
}
- public static Action getGoto_next() {
+ public Action getGoto_next() {
return goto_next;
}
- public static void setGoto_next(Action gotoNext) {
+ public void setGoto_next(Action gotoNext) {
goto_next = gotoNext;
}
- public static Action getGoto_previous() {
+ public Action getGoto_previous() {
return goto_previous;
}
- public static void setGoto_parent(Action gotoParent) {
+ public void setGoto_parent(Action gotoParent) {
goto_previous = gotoParent;
}
- public static Action getGoto_last() {
+ public Action getGoto_last() {
return goto_last;
}
- public static void setGoto_last(Action gotoLast) {
+ public void setGoto_last(Action gotoLast) {
goto_last = gotoLast;
}
- public static Action getOpen_callgraph() {
- return open_callgraph;
- }
-
- public static void setOpen_callgraph(Action openCallgraph) {
- open_callgraph = openCallgraph;
- }
-
- public static Action getSave_callgraph() {
- return save_callgraph;
- }
-
- public static void setSave_callgraph(Action saveCallgraph) {
- save_callgraph = saveCallgraph;
- }
-
- public static Action getError_errorLog() {
- return error_errorLog;
- }
-
- public static void setError_errorLog(Action errorErrorLog) {
- error_errorLog = errorErrorLog;
- }
-
- public static Action getError_deleteError() {
- return error_deleteError;
- }
-
- public static void setError_deleteError(Action errorDeleteError) {
- error_deleteError = errorDeleteError;
- }
-
- public static Action getView_treeview() {
+ public Action getView_treeview() {
return view_treeview;
}
- public static void setView_treeview(Action viewTreeview) {
+ public void setView_treeview(Action viewTreeview) {
view_treeview = viewTreeview;
}
- public static Action getView_radialview() {
+ public Action getView_radialview() {
return view_radialview;
}
- public static void setView_radialview(Action viewRadialview) {
+ public void setView_radialview(Action viewRadialview) {
view_radialview = viewRadialview;
}
- public static Action getView_aggregateview() {
+ public Action getView_aggregateview() {
return view_aggregateview;
}
- public static void setView_aggregateview(Action viewAggregateview) {
+ public void setView_aggregateview(Action viewAggregateview) {
view_aggregateview = viewAggregateview;
}
- public static Action getView_boxview() {
- return view_boxview;
+ public Action getView_levelview() {
+ return view_levelview;
}
- public static void setView_boxview(Action viewBoxview) {
- view_boxview = viewBoxview;
+ public void setView_levelview(Action viewlevelview) {
+ view_levelview = viewlevelview;
}
- public static Action getHelp_version() {
- return help_version;
+ public void setGoto_previous(Action gotoPrevious) {
+ goto_previous = gotoPrevious;
+ }
+
+ public Action getPlay() {
+ return play;
+ }
+
+ public StapGraph getGraph() {
+ return g;
+ }
+
+ @Override
+ public void setFocus() {
}
- public static void setHelp_version(Action helpVersion) {
- help_version = helpVersion;
+
+ @Override
+ public void updateMethod() {
+ IProgressMonitor m = new NullProgressMonitor();
+ m.beginTask("Updating callgraph", 4); //$NON-NLS-1$
+
+ loadData(m);
+ m.worked(1);
+ if (parser.totalTime > 0) {
+ finishLoad(m);
+ }
+ m.worked(1);
+
+ g.draw(StapGraph.CONSTANT_DRAWMODE_RADIAL, StapGraph.CONSTANT_ANIMATION_SLOW, g.getFirstUsefulNode());
}
- public static void setGoto_previous(Action gotoPrevious) {
- goto_previous = gotoPrevious;
+ @Override
+ public SystemTapParser getParser() {
+ return parser;
}
- public static StapGraph getGraph() {
- return graph;
+ private void writeToDot(boolean mode, Set<Integer> keySet) {
+ Shell sh = new Shell();
+ FileDialog dialog = new FileDialog(sh, SWT.SAVE);
+
+ String filePath = dialog.open();
+
+ if (filePath != null) {
+ File f = new File(filePath);
+ f.delete();
+ try {
+ f.createNewFile();
+ } catch (IOException e) {
+ return;
+ }
+
+ try {
+ BufferedWriter out = new BufferedWriter(new FileWriter(f));
+ StringBuilder build = new StringBuilder(""); //$NON-NLS-1$
+
+ out.write("digraph stapgraph {\n"); //$NON-NLS-1$
+ for (int i : keySet) {
+ if (i == 0)
+ continue;
+ StapData d = g.getNodeData(i);
+ if ( (d.isCollapsed != mode) && !d.isOnlyChildWithThisName())
+ continue;
+ build.append(i + " [label=\"" + d.name + " " ); //$NON-NLS-1$ //$NON-NLS-2$
+ build.append(StapNode.numberFormat.format((float) d.getTime()/g.getTotalTime() * 100) + "%\"]\n"); //$NON-NLS-1$
+ int j = d.parent;
+ if (mode)
+ j = d.collapsedParent;
+
+ if (!keySet.contains(j) || j == 0)
+ continue;
+
+ String called = mode ? " [label=\"" + g.getNodeData(i).timesCalled + "\"]\n" : "\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ build.append( j + "->" + i ); //$NON-NLS-1$
+ build.append( called );
+ out.write(build.toString());
+ build.setLength(0);
+ }
+ out.write("}"); //$NON-NLS-1$
+ out.flush();
+ out.close();
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
}
-}
-
-/**
- * The code graveyard: Where snippets go to die
- */
-//StyleRange[] existingRange = viewer.getStyleRanges();
-//
-//StyleRange[] s = new StyleRange[styles.size()];
-//StyleRange[] s2 = new StyleRange[styles.size() + existingRange.length];
-//styles.copyInto(s);
-//
-//for (int i = 0; i < existingRange.length; i++)
-// s2[i] = existingRange[i];
-//
-//for (int i = 0; i < styles.size(); i ++)
-// s2[i+existingRange.length] = s[i];
+
+
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/GraphUIJob.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/GraphUIJob.java
deleted file mode 100644
index 62b67e48ae..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/GraphUIJob.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.callgraph;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.draw2d.LightweightSystem;
-import org.eclipse.draw2d.parts.ScrollableThumbnail;
-import org.eclipse.linuxtools.callgraph.graphlisteners.AutoScrollSelectionListener;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Canvas;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.progress.UIJob;
-
-/**
- * Initializes and runs a StapGraph and TreeViewer within the SystemTap View
- *
- * @author chwang
- *
- */
-public class GraphUIJob extends UIJob{
- private StapGraph g;
- private StapGraphParser parser;
- private static int treeSize = 200;
-
-
- public StapGraph getGraph() {
- return g;
- }
-
- public GraphUIJob(String name, StapGraphParser parser) {
- super(name);
- //CREATE THE SHELL
- this.parser = parser;
- }
-
- @Override
- public IStatus runInUIThread(IProgressMonitor monitor) {
-
- Display disp = Display.getCurrent();
- if (disp == null)
- disp = Display.getDefault();
-
-
- //-------------Initialize shell, menu
- treeSize = 200;
-
-
- //OPEN UP THE SYSTEMTAPVIEW IF IT IS NOT ALREADY OPEN
- CallgraphView.forceDisplay();
-
- Composite treeComp = CallgraphView.makeTreeComp(treeSize);
- Composite graphComp = CallgraphView.makeGraphComp();
- graphComp.setBackgroundMode(SWT.INHERIT_FORCE);
-
-
- //Create papa canvas
- Canvas papaCanvas = new Canvas(graphComp, SWT.BORDER);
- GridLayout papaLayout = new GridLayout(1, true);
- papaLayout.horizontalSpacing=0;
- papaLayout.verticalSpacing=0;
- papaLayout.marginHeight=0;
- papaLayout.marginWidth=0;
- papaCanvas.setLayout(papaLayout);
- GridData papaGD = new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false);
- papaGD.widthHint=160;
- papaCanvas.setLayoutData(papaGD);
-
-
- //Add first button
- Image image = new Image(disp, CallGraphConstants.PLUGIN_LOCATION+"icons/up.gif"); //$NON-NLS-1$
- Button up = new Button(papaCanvas, SWT.PUSH);
- GridData buttonData = new GridData(SWT.CENTER, SWT.CENTER, true, false);
- buttonData.widthHint = 150;
- buttonData.heightHint = 20;
- up.setData(buttonData);
- up.setImage(image);
-
-
- //Add thumb canvas
- Canvas thumbCanvas = new Canvas(papaCanvas, SWT.NONE);
-
-
- //Add second button
- image = new Image(disp, CallGraphConstants.PLUGIN_LOCATION+"icons/down.gif"); //$NON-NLS-1$
- Button down = new Button(papaCanvas, SWT.PUSH);
- buttonData = new GridData(SWT.CENTER, SWT.CENTER, true, false);
- buttonData.widthHint = 150;
- buttonData.heightHint = 0;
- down.setData(buttonData);
- down.setImage(image);
-
-
- //Initialize graph
- g = new StapGraph(graphComp, SWT.BORDER, treeComp, papaCanvas);
- g.setLayoutData(new GridData(this.getDisplay().getPrimaryMonitor().getBounds().width - 200,this.getDisplay().getPrimaryMonitor().getBounds().height - 200));
-
- up.addSelectionListener(new AutoScrollSelectionListener(
- AutoScrollSelectionListener.AutoScroll_up, g));
- down.addSelectionListener(new AutoScrollSelectionListener(
- AutoScrollSelectionListener.AutoScroll_down, g));
-
-
- //Initialize thumbnail
- GridData thumbGD = new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false);
- thumbGD.widthHint=160;
- thumbCanvas.setLayoutData(thumbGD);
- LightweightSystem lws = new LightweightSystem(thumbCanvas);
- ScrollableThumbnail thumb = new ScrollableThumbnail(g.getViewport());
- thumb.setSource(g.getContents());
- lws.setContents(thumb);
-
- //-------------Load graph data
- g.loadData(SWT.NONE, 0, StapGraph.CONSTANT_TOP_NODE_NAME, 1, 1, -1, false, ""); //$NON-NLS-1$
- boolean marked = false;
- String msg = ""; //$NON-NLS-1$
-
-
- for (int id_parent : parser.serialMap.keySet()) {
- if (g.getData(id_parent) == null) {
- if (parser.markedMap.get(id_parent) != null) {
- marked = true;
- msg = parser.markedMap.get(id_parent);
- }
- g.loadData(SWT.NONE, id_parent, parser.serialMap.get(id_parent), parser.timeMap.get(id_parent),
- 1, 0, marked, msg);
- }
-
- for (int id_child : parser.outNeighbours.get(id_parent)) {
-
- if (monitor.isCanceled()) {
- return Status.CANCEL_STATUS;
- }
-
- marked = false;
- msg = ""; //$NON-NLS-1$
- if (parser.markedMap.get(id_child) != null) {
- marked = true;
- msg = parser.markedMap.get(id_child);
- }
- if (id_child != -1) {
- if (parser.timeMap.get(id_child) == null){
- g.loadData(SWT.NONE, id_child, parser.serialMap
- .get(id_child), parser.timeMap.get(0),
- 1, id_parent, marked,msg);
- }else{
- g.loadData(SWT.NONE, id_child, parser.serialMap
- .get(id_child), parser.timeMap.get(id_child),
- 1, id_parent, marked,msg);
- }
- }
- }
-
- }
-
-
- g.aggregateCount = parser.countMap;
- g.aggregateTime = parser.cumulativeTimeMap;
-
- //Set total time
- g.setTotalTime(parser.totalTime);
-
- //-------------Finish initializations
- //Generate data for collapsed nodes
- g.recursivelyCollapseAllChildrenOfNode(g.getTopNode());
- if (monitor.isCanceled()) {
- return Status.CANCEL_STATUS;
- }
- g.initializeTree();
- g.setLastFunctionCalled(parser.lastFunctionCalled);
-
-
- if (monitor.isCanceled()) {
- return Status.CANCEL_STATUS;
- }
- g.setFocus();
- g.setCallOrderList(parser.callOrderList);
-
- g.setProject(parser.project);
-
- CallgraphView.setValues(graphComp, treeComp, g, parser);
- CallgraphView.createPartControl();
- g.draw(StapGraph.CONSTANT_DRAWMODE_RADIAL, StapGraph.CONSTANT_ANIMATION_SLOW,
- g.getFirstUsefulNode());
-
- return Status.OK_STATUS;
- }
-
-
- /**
- * Returns number of StapData objects created
- * @return
- */
- public int getNumberOfDataNodes() {
- return g.getDataMapSize();
- }
-
-
- /**
- * For easier JUnit testing only. Allows public access to run method without scheduling an extra job.
- *
- * @param m
- * @return
- */
- public IStatus testRun(IProgressMonitor m) {
- return runInUIThread(m);
- }
-
-
-}
-
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapData.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapData.java
index 06e4df7075..0d711c051f 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapData.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapData.java
@@ -19,73 +19,58 @@ import java.util.TreeMap;
*
*/
public class StapData {
- public boolean expandable;
- public int id; //id of the StapNode
- public long time;
- public int called;
- public int caller;
- public int style;
+ public static final int NOT_PART_OF_COLLAPSED_NODE = -10;
+ public boolean hasCollapsedChildren, isCollapsed, marked;
+ public boolean onlyChildWithThisName; //Should show up as collapsed and uncollapsed
+ public int id;
+ public int timesCalled, parent, style;
public int levelOfRecursion;
- public String name;
- public boolean noCaller;
- public List<Integer> callees;
- public List<Integer> collapsedCallees;
- private StapGraph graph;
- public boolean hasCollapsedChildren;
- public boolean isCollapsed;
- public boolean onlyChildWithThisName;
- private boolean partOfCollapsedNode;
- public int collapsedCaller;
- private boolean marked;
- public String markedMessage;
-
- public boolean isPartOfCollapsedNode() {
- return partOfCollapsedNode;
- }
-
-
+ public int collapsedParent, uncollapsedPiece, partOfCollapsedNode;
+ private long time; //execution time of this node
+ public String markedMessage; //alt text for this node
+ public String name; //text to be displayed
+ public List<Integer> children, collapsedChildren;
+ private StapGraph graph; //Store a reference to the parent graph
/**
- * Initialize StapData object
+ * Initialize StapData object. This object is not intended to be called by users.
*
- * @param graphModel
- * @param style
- * @param txt
- * @param time
- * @param called
- * @param currentID
- * @param caller
+ * @param graphModel StapGraph containing the StapNode that matches this StapData
+ * @param style
+ * @param txt Text to be displayed when rendering the StapNode
+ * @param time Time taken for this particular node to execute
+ * @param called Number of times this particular node was called
+ * @param currentID The unique identifier for this node
+ * @param caller The parent of this node
* @param isMarked
- * @param message
*/
public StapData(StapGraph graphModel, int style, String txt,
- long time, int called, int currentID, int caller, boolean isMarked, String message) {
+ long time, int called, int currentID, int parent, boolean isMarked) {
this.time = time;
this.style = style;
- this.called = called;
- this.expandable = false;
- callees = new ArrayList<Integer>();
- collapsedCallees = new ArrayList<Integer>();
+ this.timesCalled = called;
+ children = new ArrayList<Integer>();
+ collapsedChildren = new ArrayList<Integer>();
this.id = currentID;
this.name = txt;
this.graph = graphModel;
this.hasCollapsedChildren = false;
this.isCollapsed = false;
this.onlyChildWithThisName = false;
- this.partOfCollapsedNode= false;
- this.collapsedCaller = -1;
- this.caller = caller;
+ this.partOfCollapsedNode= NOT_PART_OF_COLLAPSED_NODE;
+ this.collapsedParent = -1;
+ this.parent = parent;
this.levelOfRecursion = 0;
this.marked = isMarked;
- this.markedMessage = message;
+ this.uncollapsedPiece = -1;
//Add this data to the caller's list of IDs
- if (this.caller != -1) {
- if (graphModel.getData(this.caller) != null) {
- graphModel.getData(this.caller).addCallee(this.id, this.time);
- this.levelOfRecursion = graphModel.getData(this.caller).levelOfRecursion + 1;
+ if (this.parent != -1) {
+ if (graphModel.getNodeData(this.parent) != null) {
+ graphModel.getNodeData(this.parent).addCallee(this.id);
+ this.levelOfRecursion = graphModel.getNodeData(this.parent).levelOfRecursion + 1;
}
}
@@ -98,58 +83,19 @@ public class StapData {
//Keep track of the lowest level of recursion
if (levelOfRecursion > graphModel.getLowestLevelOfNodesAdded())
graphModel.setLowestLevelOfNodesAdded(levelOfRecursion);
-
-
- this.noCaller = (caller == -1) ? true : false;
}
/**
- * Add the given id to my list of children/callees. Sort based on time
+ * Add the given id to the list of children, at the end.
*
* @param id
* @return
*/
- public int addCallee(int id, long time) {
-
- //TODO: This is phenomenally inefficient. We should just add them all
- //then call a sort once instead of doing some crazy n! insertion :P
-
- //Insert id based on its time
- int size = callees.size();
-
- if (size ==0) {
- callees.add(id);
- return callees.size();
- }
- int position = search(time);
-
- if (position == -1) callees.add(id);
- else callees.add(position, id);
-
- return callees.size();
- }
-
-
- /**
- * Returns the proper position in callees list for the node with the given time.
- * Afterwards an insert at the return value will put the node in the right spot.
- * @param time
- * @return location in callees
- */
- private int search(long time) {
- if (time > graph.getData(callees.get(0)).time)
- return 0;
-
- for (int i = 1; i < callees.size(); i++) {
- if (time < graph.getData(callees.get(i -1)).time &&
- time > graph.getData(callees.get(i)).time)
- return i;
- }
-
- return -1;
+ public int addCallee(int id) {
+ children.add(id);
+ return id;
}
-
/**
* Creates a node in the given graphModel using this stapData
@@ -168,35 +114,37 @@ public class StapData {
TreeMap<Long,ArrayList<StapData>> tempList = new TreeMap<Long,ArrayList<StapData>>();
//INDEX ALL THE STAPDATA INTO AN ARRAY AT THE CALCULATED INDEX
//SCATTERED INDICES : 0,1,...,5,..,10
- for (int val : collapsedCallees){
- if (tempList.get(graph.getData(val).time) == null){
- tempList.put(graph.getData(val).time, new ArrayList<StapData>());
+ for (int val : collapsedChildren){
+ if (tempList.get(graph.getNodeData(val).time) == null){
+ tempList.put(graph.getNodeData(val).time, new ArrayList<StapData>());
}
- tempList.get(graph.getData(val).time).add(graph.getData(val));
+ tempList.get(graph.getNodeData(val).time).add(graph.getNodeData(val));
}
- collapsedCallees.clear();
+ collapsedChildren.clear();
int count = 0;
// ANOTHER PASS THROUGH TO INDEX CONTINUOUSLY 0,1,2,..
for (long i : tempList.descendingKeySet()) {
for (StapData j : tempList.get(i)){
- collapsedCallees.add(count, j.id);
+ collapsedChildren.add(count, j.id);
}
count++;
}
}
+
/**
* Indicate that this StapData is part of a collapsed node (will not be drawn in
* uncollapsed mode)
* @param partOfCollapsedNode
*/
- public void setPartOfCollapsedNode(boolean partOfCollapsedNode) {
+ public void setPartOfCollapsedNode(int partOfCollapsedNode) {
this.partOfCollapsedNode = partOfCollapsedNode;
}
+
/**
* Indicate that this StapData was marked by the user
*/
@@ -204,25 +152,103 @@ public class StapData {
marked = true;
}
+
/**
- * Check if this StapData is marked
+ * Check if this StapData is marked -- returns the result of
+ * marked || markedMessage.length() > 0 (in case marked was not set)
* @return
*/
public boolean isMarked() {
- return marked;
+ return marked || (markedMessage != null && markedMessage.length() > 0);
+ }
+
+
+ public boolean isOnlyChildWithThisName() {
+ return onlyChildWithThisName;
}
+ public void setOnlyChildWithThisName(boolean onlyChildWithThisName) {
+ this.onlyChildWithThisName = onlyChildWithThisName;
+ }
- public boolean isOnlyChildWithThisName() {
- return onlyChildWithThisName;
+ /**
+ * If the node has not yet terminated (i.e. the time is > 1200000000000000000l) this
+ * function will return graph.getEndTime() - time. In other words, getTime will assume
+ * that only the start time has been recorded if time is abnormally large, and will compensate
+ * by assuming that the node 'terminates' at the current endTime.
+ *
+ * @return long time
+ */
+ public long getTime() {
+ if (time > 1200000000000000000l) {
+ return graph.getEndTime() - time;
+ }
+ return time;
}
+ /**
+ * Sets the time
+ *
+ * @param time
+ */
+ public void setTime(long time) {
+ this.time = time;
+ }
+/**
+ * Sets the message for this data object to the given string,
+ * overwriting the current markedMessage. Sets marked to true.
+ *
+ * Returns this.
+ * @param message
+ * @return this
+ */
+ public StapData setMessage(String message) {
+ if (message == null || message.length() < 1)
+ return this;
+ this.markedMessage = message;
+ this.marked = true;
+ return this;
+ }
+
+
+ /**
+ * Inserts the message after the current message. No spaces or newlines are appended.
+ * @param message
+ * @return
+ */
+ public StapData insertMessage(String message) {
+ if (message == null || message.length() < 1)
+ return this;
+ String tmp = message;
+ if (this.markedMessage != null && this.markedMessage.length() > 0)
+ tmp = this.markedMessage + tmp;
+ this.markedMessage = tmp;
+ this.marked = true;
+ return this;
+ }
- public void setOnlyChildWithThisName(boolean onlyChildWithThisName) {
- this.onlyChildWithThisName = onlyChildWithThisName;
+ /**
+ * Return true if <code>partOfCollapseNode!= StapData.NOT_PART_OF_COLLAPSED_NODE</code
+ * @return
+ */
+ public boolean isPartOfCollapsedNode() {
+ return (partOfCollapsedNode != NOT_PART_OF_COLLAPSED_NODE);
}
+
+
+ /**
+ * Compare to StapData.NOT_PART_OF_COLLAPSED_NODE to verify, or check
+ * isPartOfCollapseNode first. May return a negative number if invalid.
+ *
+ * @return The collapsed node this node is a part of (if any)
+ */
+ public int getPartOfCollapsedNode() {
+ return partOfCollapsedNode;
+ }
+
+
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapGraph.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapGraph.java
index 1bd1151059..5fa2ac76e5 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapGraph.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapGraph.java
@@ -20,11 +20,14 @@ import java.util.TreeSet;
import java.util.Map.Entry;
import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.core.runtime.Status;
import org.eclipse.draw2d.Animation;
import org.eclipse.draw2d.Label;
import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.linuxtools.callgraph.core.MP;
+import org.eclipse.linuxtools.callgraph.graphlisteners.Projectionist;
import org.eclipse.linuxtools.callgraph.graphlisteners.StapGraphKeyListener;
import org.eclipse.linuxtools.callgraph.graphlisteners.StapGraphMouseListener;
import org.eclipse.linuxtools.callgraph.graphlisteners.StapGraphMouseWheelListener;
@@ -45,9 +48,9 @@ import org.eclipse.zest.layouts.LayoutStyles;
public class StapGraph extends Graph {
- public static final String CONSTANT_TOP_NODE_NAME = Messages.getString("StapGraph.0"); //$NON-NLS-1$
+ public static final String CONSTANT_TOP_NODE_NAME = Messages.getString("StapGraph.StartNode"); //$NON-NLS-1$
public static final int CONSTANT_HORIZONTAL_SPACING = 50;
- public static final int CONSTANT_DRAWMODE_BOX = 0;
+ public static final int CONSTANT_DRAWMODE_LEVEL = 0;
public static final int CONSTANT_DRAWMODE_RADIAL = 1;
public static final int CONSTANT_DRAWMODE_TREE = 2;
public static final int CONSTANT_DRAWMODE_AGGREGATE = 3;
@@ -57,7 +60,7 @@ public class StapGraph extends Graph {
public static final int CONSTANT_MAX_NUMBER_OF_SIBLINGS = 3;
public static final int CONSTANT_MAX_NUMBER_OF_RADIAL_SIBLINGS = 15;
public static final int CONSTANT_VERTICAL_INCREMENT = 50;
- public static final int CONSTANT_HORIZONTAL_SPACING_FOR_BOX = 150;
+ public static final int CONSTANT_HORIZONTAL_SPACING_FOR_LEVEL = 150;
public static final Color CONSTANT_HAS_PARENT = new Color(Display.getCurrent(), 240, 200,
200);
public static final Color CONSTANT_HAS_CHILDREN = new Color(Display.getCurrent(), 200,
@@ -70,6 +73,8 @@ public class StapGraph extends Graph {
private int topLevelOnScreen;
public static int levelBuffer = 30;
private static int maxNodes = 150;
+ private Projectionist proj;
+
private int lowestLevelOfNodesAdded;
@@ -78,8 +83,10 @@ public class StapGraph extends Graph {
//Node management
private int idOfLastNode;
- private HashMap<Integer, StapNode> nodeMap; // HashMap of current nodes
- private HashMap<Integer, StapData> nodeDataMap; // HashMap of all data
+ private int idOfLastCollapsedNode;
+ public HashMap<Integer, StapNode> nodeMap; // HashMap of current nodes
+ public HashMap<Integer, StapData> nodeDataMap; // HashMap of all data
+ //The negative side of nodeDataMap is collapsed, the positive side is uncollapsed
public List<GraphNode> aggregateNodes;
public HashMap<String, Long> aggregateTime;
@@ -95,6 +102,8 @@ public class StapGraph extends Graph {
//Time
private long totalTime;
+ private long endTime;
+ private long startTime;
//The current center/top of the nodes list
private int rootVisibleNodeNumber;
@@ -115,17 +124,18 @@ public class StapGraph extends Graph {
//Zooming factor
public double scale;
- private int counter; //All purpose counting variable
private ArrayList<Integer> callOrderList;
private int lastFunctionCalled;
+ private int treeLevelFromRoot;
private Canvas thumbCanvas;
+ private ICProject project;
+ private boolean threaded;
+ private int counter; //All purpose counting variable
- private ICProject project;
- private int treeLevelFromRoot;
public StapGraphMouseListener getMouseListener() {
return mListener;
}
@@ -148,7 +158,10 @@ public class StapGraph extends Graph {
private StapGraphMouseWheelListener mwListener;
private StapGraphKeyListener kListener;
- public StapGraph(Composite parent, int style, Composite treeComp, Canvas tCanvas) {
+ private CallgraphView callgraphView;
+
+ public StapGraph(Composite parent, int style, Composite treeComp, Canvas tCanvas,
+ CallgraphView callgraphView) {
super(parent, style);
//-------------Initialize variables
@@ -171,6 +184,8 @@ public class StapGraph extends Graph {
nextMarkedNode = -1;
scale = 1;
treeLevelFromRoot = 0;
+ idOfLastCollapsedNode = 0;
+ this.callgraphView = callgraphView;
this.treeComp = treeComp;
if (treeViewer == null || treeViewer.getControl().isDisposed()) {
@@ -179,6 +194,7 @@ public class StapGraph extends Graph {
StapTreeListener stl = new StapTreeListener(treeViewer.getTree().getHorizontalBar());
treeViewer.addTreeListener(stl);
}
+
//-------------Add listeners
mListener = new StapGraphMouseListener(this);
@@ -192,14 +208,22 @@ public class StapGraph extends Graph {
+
/**
- * Initialize the treeviewer with data from the graph
+ * Initialize the treeviewer with data from the graph. If the treeviewer
+ * has already been initialized (i.e. if it already has a content provider
+ * set), we merely call treeViewer.refresh();
*/
public void initializeTree() {
if (treeViewer.getContentProvider() == null) {
StapTreeContentProvider scp = new StapTreeContentProvider();
treeViewer.setContentProvider(scp);
- }
+ } else {
+ ((StapTreeContentProvider) treeViewer.getContentProvider())
+ .setGraph(this);
+ treeViewer.refresh();
+ return;
+ }
((StapTreeContentProvider) treeViewer.getContentProvider()).setGraph(this);
@@ -214,13 +238,15 @@ public class StapGraph extends Graph {
treeDoubleListener = new StapTreeDoubleClickListener(treeViewer, this);
treeViewer.addDoubleClickListener(treeDoubleListener);
- treeViewer.setInput(getData(getTopNode()));
+ treeViewer.setInput(getNodeData(getTopNode()));
treeViewer.refresh();
}
+
+
/**
- * Create a new StapData object with the given parameters
+ * Convenience method to loadData with a message preset.
*
* @param style
* @param id
@@ -245,9 +271,12 @@ public class StapGraph extends Graph {
}
//-------------Add node to appropriate map/list
- StapData n = new StapData(this, style, txt, time, called, id, caller, isMarked, message);
- if (isMarked)
+ StapData n = new StapData(this, style, txt, time, called,
+ id, caller, isMarked);
+ if (isMarked) {
+ n.setMessage(message);
markedNodes.add(id);
+ }
nodeDataMap.put(id, n);
// Make no assumptions about the order that data is input
@@ -255,6 +284,13 @@ public class StapGraph extends Graph {
idOfLastNode = id;
return id;
}
+
+ public void insertMessage(int id, String message) {
+ StapData temp = nodeDataMap.get(id);
+ if (temp == null) return;
+ temp.insertMessage(message);
+ nodeDataMap.put(id, temp);
+ }
/*
* Fully functional draw functions
@@ -269,22 +305,32 @@ public class StapGraph extends Graph {
* @param centerNode
*/
public void drawRadial(int centerNode) {
- int radius = Math.min(this.getBounds().width,
+ int radius = Math.max(CONSTANT_VERTICAL_INCREMENT,
+ Math.min(this.getBounds().width,
this.getBounds().height)
- / 2 - CONSTANT_VERTICAL_INCREMENT;
+ / 2 - 2*CONSTANT_VERTICAL_INCREMENT);
rootVisibleNodeNumber = centerNode;
+ StapData nodeData = getNodeData(centerNode);
+ int collapsed = nodeData.getPartOfCollapsedNode();
+ if (!nodeData.isCollapsed && collapsed != StapData.NOT_PART_OF_COLLAPSED_NODE) {
+ nodeData = getNodeData(collapsed);
+ }
+ treeViewer.expandToLevel(nodeData, 0);
+ treeViewer.setSelection(new StructuredSelection(nodeData));
+
if (nodeMap.get(centerNode) == null) {
nodeMap.put(centerNode, getNodeData(centerNode).makeNode(this));
}
+
// Draw node in center
StapNode n = nodeMap.get(centerNode);
int x = this.getBounds().width / 2 - n.getSize().width/2;
- int y = this.getBounds().height / 2 - n.getSize().height;
+ int y = this.getBounds().height / 2;
n.setLocation(x, y);
- if (getData(centerNode).isMarked())
+ if (getNodeData(centerNode).isMarked())
nodeMap.get(centerNode).setBackgroundColor(CONSTANT_MARKED);
radialHelper(centerNode, x, y, radius, 0);
}
@@ -323,7 +369,7 @@ public class StapGraph extends Graph {
public void radialHelper(int id, int x, int y, int radius, int startFromChild) {
//-------------Draw parent node
// Draw caller node right beside this one, in a different color
- int callerID = nodeDataMap.get(id).caller;
+ int callerID = nodeDataMap.get(id).parent;
if (callerID != -1) {
if (getNode(callerID) == null) {
nodeMap.put(callerID, getNodeData(callerID).makeNode(this));
@@ -331,10 +377,10 @@ public class StapGraph extends Graph {
getNode(callerID).setBackgroundColor(CONSTANT_HAS_PARENT);
getNode(callerID).setLocation(x + radius / 5, y - radius / 5);
if (getNode(id).connection == null) {
- getNode(id).makeConnection(SWT.NONE, getNode(callerID), getData(id).called);
+ getNode(id).makeConnection(SWT.NONE, getNode(callerID), getNodeData(id).timesCalled);
}
- if (getData(callerID).isMarked())
+ if (getNodeData(callerID).isMarked())
nodeMap.get(callerID).setBackgroundColor(CONSTANT_MARKED);
}
@@ -342,10 +388,10 @@ public class StapGraph extends Graph {
//-------------Draw children nodes
List<Integer> nodeList;
if (!collapse_mode) {
- nodeList = nodeDataMap.get(id).callees;
+ nodeList = nodeDataMap.get(id).children;
}
else {
- nodeList = nodeDataMap.get(id).collapsedCallees;
+ nodeList = nodeDataMap.get(id).collapsedChildren;
}
int numberOfNodes;
@@ -376,36 +422,33 @@ public class StapGraph extends Graph {
}
StapNode subN = nodeMap.get(subID);
+
if (radius != 0) {
- yOffset = (int) (radius * Math.cos(angle * i));
- xOffset = (int) (radius * Math.sin(angle * i) + StapNode.getNodeSize()*Math.sin(angle*i)*3);
+ yOffset = (int) (radius * Math.cos((float) angle * i));
+ xOffset = (int) (radius * Math.sin((float) angle * i)) - subN.getSize().width/2 + getNode(id).getSize().width/2;
}
-
if (hasChildren(subID))
subN.setBackgroundColor(CONSTANT_HAS_CHILDREN);
subN.setLocation(x + xOffset, y + yOffset);
if (subN.connection == null) {
subN.makeConnection(SWT.NONE, nodeMap.get(id), nodeDataMap
- .get(subID).called);
+ .get(subID).timesCalled);
}
- if (getData(subID).isMarked())
+ StapData d = getNodeData(subID);
+ if (d.isMarked())
subN.setBackgroundColor(CONSTANT_MARKED);
}
}
/**
- * THE AGGREGATE VIEW FROM VIEW -> AGGREGATE VIEW
+ * Draws nodes according to the name of the function (not accounting for call
+ * heirarchies). Uses colour to indicate the number of calls and size to indicate
+ * the percentage time spent.
*/
- public void drawAggregateView(){
-
- //TEMPORARY STORAGE OF THE ENTRIES
- //IMPLEMENTS A COMPARATOR TO STORE BY ORDER OF THE VALUE
- TreeSet<Entry<String, Long>> sortedValues = new TreeSet<Entry<String, Long>>(StapGraph.VALUE_ORDER);
- sortedValues.addAll(aggregateTime.entrySet());
-
+ private void drawAggregateView(){
if (aggregateNodes == null){
aggregateNodes = new ArrayList<GraphNode>();
@@ -433,19 +476,38 @@ public class StapGraph extends Graph {
}
}
- //-------------Draw nodes
- for (Entry<String, Long> ent : sortedValues) {
+
+ //TEMPORARY STORAGE OF THE ENTRIES
+ //IMPLEMENTS A COMPARATOR TO STORE BY ORDER OF THE VALUE
+ TreeSet<Entry<String, Long>> sortedValues = new TreeSet<Entry<String, Long>>(StapGraph.VALUE_ORDER);
+ HashMap<String, Long> tempMap = new HashMap<String, Long>();
+ tempMap.putAll(aggregateTime);
+
+ for (String key : tempMap.keySet()) {
+ long time = aggregateTime.get(key);
+ //This is a stupid way to get the times right, but it is almost always guaranteed to work.
+ while (time < 0)
+ time += endTime;
+ tempMap.put(key, time);
+ }
+
+ sortedValues.addAll(tempMap.entrySet());
+
+ //-------------Draw nodes
+ for (Entry<String, Long> ent: sortedValues) {
+ String key = ent.getKey();
GraphNode n = new GraphNode(this.getGraphModel(),SWT.NONE);
aggregateNodes.add(n);
- percentage_count = (float)aggregateCount.get(ent.getKey()) / (float)maxTimesCalled;
- percentage_time = ((float) ent.getValue() / this
+ percentage_count = (float)aggregateCount.get(key) / (float)maxTimesCalled;
+ percentage_time = ((float) ent.getValue()/ this
.getTotalTime() * 100);
- n.setText(ent.getKey() + "\n" //$NON-NLS-1$
+
+ n.setText(key + "\n" //$NON-NLS-1$
+ num.format((float)percentage_time) + "%" + "\n" //$NON-NLS-1$ //$NON-NLS-2$
- + aggregateCount.get(ent.getKey()) + "\n") ; //$NON-NLS-1$
- n.setData("AGGREGATE_NAME", ent.getKey()); //$NON-NLS-1$
+ + aggregateCount.get(key) + "\n") ; //$NON-NLS-1$
+ n.setData("AGGREGATE_NAME", key); //$NON-NLS-1$
primary = (int)(percentage_count * colorLevels * colorLevelDifference);
@@ -463,12 +525,13 @@ public class StapGraph extends Graph {
n.setHighlightColor(c);
n.setForegroundColor(new Color(this.getDisplay(),255,255,255));
n.setTooltip(new Label(
- Messages.getString("StapGraph.2")+ ent.getKey() + "\n" //$NON-NLS-1$ //$NON-NLS-2$
- + Messages.getString("StapGraph.3") + num.format((float)percentage_time) + "%" + "\n" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- + Messages.getString("StapGraph.1") + aggregateCount.get(ent.getKey()) //$NON-NLS-1$
+ Messages.getString("StapGraph.Func")+ key + "\n" //$NON-NLS-1$ //$NON-NLS-2$
+ + Messages.getString("StapGraph.Time") + num.format((float)percentage_time) + "%" + "\n" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ + Messages.getString("StapGraph.NumOfCalls") + aggregateCount.get(key) //$NON-NLS-1$
));
n.setBorderWidth(2);
}
+
//Set layout to gridlayout
this.setLayoutAlgorithm(new AggregateLayoutAlgorithm(LayoutStyles.NONE, sortedValues, this.getTotalTime(), this.getBounds().width), true);
@@ -482,12 +545,12 @@ public class StapGraph extends Graph {
* @param x
* @param y
*/
- public void drawTree(int id, int x, int y) {
+ private void drawTree(int id, int x, int y) {
//-------------Create node id
// Create and set
if (nodeMap.get(id) == null) {
- nodeMap.put(id, getData(id).makeNode(this));
+ nodeMap.put(id, getNodeData(id).makeNode(this));
}
StapNode n = getNode(id);
n.setLocation(x,y);
@@ -495,10 +558,10 @@ public class StapGraph extends Graph {
//This is the lowest level of nodes to draw, and it still has kids
if (getLevelOfNode(id) == bottomLevelToDraw &&
- getData(id).callees.size() > 0)
+ getNodeData(id).children.size() > 0)
n.setBackgroundColor(CONSTANT_HAS_CHILDREN);
- if (getData(id).isMarked())
+ if (getNodeData(id).isMarked())
n.setBackgroundColor(CONSTANT_MARKED);
@@ -508,9 +571,9 @@ public class StapGraph extends Graph {
// Determine which list of callees to use
if (!collapse_mode)
- callees = getData(id).callees;
+ callees = getNodeData(id).children;
else
- callees = getData(id).collapsedCallees;
+ callees = getNodeData(id).collapsedChildren;
if (callees == null)
return;
@@ -566,16 +629,16 @@ public class StapGraph extends Graph {
return;
- StapData data = getData(rootVisibleNodeNumber);
- if (data.callees != null) {
- if (data.callees.size() < 1) {
+ StapData data = getNodeData(rootVisibleNodeNumber);
+ if (data.children != null) {
+ if (data.children.size() < 1) {
return;
}
}
- List<Integer> list = data.callees;
+ List<Integer> list = data.children;
if (isCollapseMode())
- list = data.collapsedCallees;
+ list = data.collapsedChildren;
if (list.size() == 1) {
//Special case - only one child of the root node
@@ -619,6 +682,22 @@ public class StapGraph extends Graph {
treeLevelFromRoot--;
}
+
+ /**
+ * Draws the next node, unless the next node does not exist.
+ */
+ public void drawNextNode() {
+ if (isCollapseMode()) {
+ setCollapseMode(false);
+ }
+ int toDraw = getNextCalledNode(getRootVisibleNodeNumber());
+ if (toDraw != -1)
+ draw(toDraw);
+ else
+ proj.pause();
+ }
+
+
/**
* Moves all nodes to the point x,y
* @param x
@@ -630,13 +709,6 @@ public class StapGraph extends Graph {
}
}
- /*
- * Partially functional draw functions
- *
- * -Box (drawFromBottomToTop)
- * Breaks when switching modes??
- */
-
/**
* Draws a tree roughly starting from node id
@@ -657,13 +729,16 @@ public class StapGraph extends Graph {
int size = levels.get(i).size();
for (int j = 1; j < size; j++){
int val = levels.get(i).get(j);
- if (collapse_mode && nodeDataMap.get(val).isPartOfCollapsedNode()) {
- continue;
+ StapData data = nodeDataMap.get(val);
+ if (!data.isOnlyChildWithThisName()) {
+ if (collapse_mode && data.isPartOfCollapsedNode()) {
+ continue;
+ }
+ if (!collapse_mode && data.isCollapsed)
+ continue;
}
- if (!collapse_mode && nodeDataMap.get(val).isCollapsed)
- continue;
- currPixelWidth += nodeDataMap.get(val).name.length() * 10 + StapGraph.CONSTANT_HORIZONTAL_SPACING_FOR_BOX;
+ currPixelWidth += data.name.length() * 10 + StapGraph.CONSTANT_HORIZONTAL_SPACING_FOR_LEVEL;
if (MaxLevelPixelWidth < currPixelWidth) {
MaxLevelPixelWidth = currPixelWidth;
}
@@ -687,6 +762,7 @@ public class StapGraph extends Graph {
nodeMap.get(id).setLocation(150 + (MaxLevelPixelWidth/2),y);
}
+
public void drawFromBottomToTop(int level, int height,
int MaxLevelPixelWidth) {
@@ -703,11 +779,14 @@ public class StapGraph extends Graph {
for (int i = 0; i < levels.get(level).size(); i ++) {
int id = levels.get(level).get(i);
- if (collapse_mode && nodeDataMap.get(id).isPartOfCollapsedNode()) {
- continue;
+ StapData data = nodeDataMap.get(id);
+ if (!data.isOnlyChildWithThisName()) {
+ if (collapse_mode && data.isPartOfCollapsedNode() ) {
+ continue;
+ }
+ if (!collapse_mode && nodeDataMap.get(id).isCollapsed)
+ continue;
}
- if (!collapse_mode && nodeDataMap.get(id).isCollapsed)
- continue;
if (nodeMap.get(id) == null) {
nodeMap.put(id, getNodeData(id).makeNode(this));
@@ -735,27 +814,27 @@ public class StapGraph extends Graph {
}
//IF WE CANNOT DISPLAY ALL NODES COLOUR NODES ON BOTTOM THAT STILL HAVE CHILDREN
- if (level == bottomLevelToDraw && nodeDataMap.get(id).callees.size() != 0){
+ if (level == bottomLevelToDraw && nodeDataMap.get(id).children.size() != 0){
n.setBackgroundColor(CONSTANT_HAS_CHILDREN);
}
- if (getData(n.id).isMarked())
+ if (getNodeData(n.id).isMarked())
n.setBackgroundColor(CONSTANT_MARKED);
// FIND ALL THE NODES THAT THIS NODE CALLS AND MAKE CONNECTIONS
List<Integer> setOfCallees = null;
if (collapse_mode)
- setOfCallees = nodeDataMap.get(id).collapsedCallees;
+ setOfCallees = nodeDataMap.get(id).collapsedChildren;
else
- setOfCallees = nodeDataMap.get(id).callees;
+ setOfCallees = nodeDataMap.get(id).children;
for (int val : setOfCallees) {
if (nodeMap.get(val) != null)
nodeMap.get(val).makeConnection(SWT.NONE, n,
- nodeDataMap.get(val).called);
+ nodeDataMap.get(val).timesCalled);
}
count++;
@@ -807,7 +886,7 @@ public class StapGraph extends Graph {
//-------------Recreate exception
if (x != -1 && y != -1) {
- StapNode n =getData(exception).makeNode(this);
+ StapNode n =getNodeData(exception).makeNode(this);
n.setLocation(x,y);
n.highlight();
nodeMap.put(exception, n);
@@ -900,9 +979,9 @@ public class StapGraph extends Graph {
for (int level = lvl; level < maxLevel; level++) {
for (int id : levels.get(level)) {
if (isCollapseMode())
- list = getData(id).collapsedCallees;
+ list = getNodeData(id).collapsedChildren;
else
- list = getData(id).callees;
+ list = getNodeData(id).children;
numberOfNodes += list.size();
@@ -922,7 +1001,7 @@ public class StapGraph extends Graph {
* Convenience method to redraw everything.
*/
public void draw() {
- draw(getFirstUsefulNode());
+ draw(getRootVisibleNodeNumber());
}
/**
@@ -953,10 +1032,14 @@ public class StapGraph extends Graph {
public void draw(int drawMode, int animationMode, int id) {
setDrawMode(drawMode);
setAnimationMode(animationMode);
+ if (nodeDataMap.get(id) == null)
+ return;
this.clearSelection();
treeLevelFromRoot = 0;
currentPositionInLevel.clear();
+
+
this.setRedraw(false);
if (draw_mode == CONSTANT_DRAWMODE_RADIAL) {
//Remove thumbnail
@@ -964,7 +1047,7 @@ public class StapGraph extends Graph {
gd.exclude = true;
thumbCanvas.setLayoutData(gd);
thumbCanvas.setVisible(false);
- CallgraphView.layout();
+ callgraphView.layout();
//Add treeComp
@@ -972,8 +1055,8 @@ public class StapGraph extends Graph {
gd.exclude = false;
treeComp.setLayoutData(gd);
treeComp.setVisible(true);
- treeViewer.collapseToLevel(getData(id), 1);
- treeViewer.expandToLevel(getData(id), 1);
+ treeViewer.collapseToLevel(getNodeData(id), 1);
+ treeViewer.expandToLevel(getNodeData(id), 1);
} else if (draw_mode == CONSTANT_DRAWMODE_AGGREGATE){
@@ -983,7 +1066,7 @@ public class StapGraph extends Graph {
treeComp.setLayoutData(gd);
treeComp.setVisible(false);
- CallgraphView.layout();
+ callgraphView.layout();
//Remove thumbnail
gd = (GridData) thumbCanvas.getLayoutData();
gd.exclude = true;
@@ -997,7 +1080,7 @@ public class StapGraph extends Graph {
treeComp.setLayoutData(gd);
treeComp.setVisible(false);
- CallgraphView.layout();
+ callgraphView.layout();
//Add thumbnail
gd = (GridData) thumbCanvas.getLayoutData();
@@ -1008,7 +1091,7 @@ public class StapGraph extends Graph {
}
- //Remove treeComp
+ callgraphView.layout();
this.setRedraw(true);
@@ -1016,7 +1099,7 @@ public class StapGraph extends Graph {
if (draw_mode == CONSTANT_DRAWMODE_TREE) {
if (animation_mode == CONSTANT_ANIMATION_SLOW) {
if (nodeMap.get(id) == null)
- nodeMap.put(id, getData(id).makeNode(this));
+ nodeMap.put(id, getNodeData(id).makeNode(this));
int tempX = nodeMap.get(id).getLocation().x;
int tempY = nodeMap.get(id).getLocation().y;
Animation.markBegin();
@@ -1062,7 +1145,7 @@ public class StapGraph extends Graph {
this.getBounds().height / 2);
drawRadial(id);
Animation.run(ANIMATION_TIME);
- CallgraphView.maximizeOrRefresh(false);
+ callgraphView.maximizeOrRefresh(false);
}
else {
@@ -1071,12 +1154,12 @@ public class StapGraph extends Graph {
}
}
- //-------------Draw box
- else if (draw_mode == CONSTANT_DRAWMODE_BOX) {
+ //-------------Draw level
+ else if (draw_mode == CONSTANT_DRAWMODE_LEVEL) {
rootVisibleNodeNumber = id;
if (animation_mode == CONSTANT_ANIMATION_SLOW) {
if (nodeMap.get(id) == null)
- nodeMap.put(id, getData(id).makeNode(this));
+ nodeMap.put(id, getNodeData(id).makeNode(this));
Animation.markBegin();
moveAllNodesTo(nodeMap.get(id).getLocation().x, nodeMap.get(id).getLocation().y);
@@ -1088,7 +1171,7 @@ public class StapGraph extends Graph {
} else {
if (nodeMap.get(id) == null)
- nodeMap.put(id, getData(id).makeNode(this));
+ nodeMap.put(id, getNodeData(id).makeNode(this));
deleteAll(id);
drawBox(id, 0, 0);
@@ -1103,7 +1186,6 @@ public class StapGraph extends Graph {
drawAggregateView();
}
- //THIS CAUSED A NULL POINTER GOING INTO AGGREGATE VIEW
if (getNode(id) != null)
getNode(id).unhighlight();
clearSelection();
@@ -1156,9 +1238,9 @@ public class StapGraph extends Graph {
List<Integer> list = null;
if (collapse_mode)
- list = nodeDataMap.get(id).collapsedCallees;
+ list = nodeDataMap.get(id).collapsedChildren;
else
- list = nodeDataMap.get(id).callees;
+ list = nodeDataMap.get(id).children;
for (int i = 0; i < list.size(); i++) {
moveRecursive(list.get(i), xTarget, yTarget);
}
@@ -1199,8 +1281,7 @@ public class StapGraph extends Graph {
//If all nodes have been collapsed, don't do anything
setCollapseMode(true);
- if (nodeDataMap.get(id).hasCollapsedChildren
- || nodeDataMap.get(id).callees.size() == 0)
+ if (nodeDataMap.get(id).children.size() == 0)
return true;
nodeDataMap.get(id).hasCollapsedChildren = true;
@@ -1208,16 +1289,22 @@ public class StapGraph extends Graph {
// Name, id
HashMap<String, Integer> newNodeMap = new HashMap<String, Integer>();
+
+ for (int collapsedID : nodeDataMap.get(id).collapsedChildren) {
+ newNodeMap.put(getNodeData(collapsedID).name, collapsedID);
+ }
// id of 'collapsed' node, id of its uncollapsed twin
HashMap<Integer, Integer> collapsedNodesWithOnlyOneNodeInThem = new HashMap<Integer, Integer>();
- int size = nodeDataMap.get(id).callees.size();
+ int size = nodeDataMap.get(id).children.size();
//-------------Iterate
for (int i = 0; i < size; i++) {
- int childID = nodeDataMap.get(id).callees.get(i);
+ int childID = nodeDataMap.get(id).children.get(i);
+ if (getNodeData(childID).isPartOfCollapsedNode())
+ continue;
int childLevel = getLevelOfNode(childID);
if (collapsedLevelSize.get(childLevel) == null)
collapsedLevelSize.put(childLevel, 0);
@@ -1232,32 +1319,36 @@ public class StapGraph extends Graph {
if (collapsedNodesWithOnlyOneNodeInThem.get(aggregateID) != null) {
//-------------Aggregate nodes - second node to be found
- // We still think this is an only child - create a new
- // data node and aggregate
+ // We still think this is an only child, but now we know better.
+ // Create a new data node and aggregate
this.loadData(SWT.NONE, aggregateID, nodeName, nodeDataMap
- .get(childID).time, nodeDataMap.get(childID).called,
+ .get(childID).getTime(), nodeDataMap.get(childID).timesCalled,
id, nodeDataMap.get(childID).isMarked(), ""); //$NON-NLS-1$
- if (getData(aggregateID).isMarked()) {
+ if (getNodeData(aggregateID).isMarked()) {
markedCollapsedNodes.add(aggregateID);
markedNodes.remove((Integer) aggregateID);
}
- nodeDataMap.get(id).callees.remove((Integer) aggregateID);
- nodeDataMap.get(id).collapsedCallees.add(aggregateID);
+ nodeDataMap.get(id).children.remove((Integer) aggregateID);
+ nodeDataMap.get(id).collapsedChildren.add(aggregateID);
+ nodeDataMap.get(childID).setPartOfCollapsedNode(aggregateID);
- nodeDataMap.get(aggregateID).collapsedCaller = id;
+ nodeDataMap.get(aggregateID).collapsedParent = id;
- // Aggregate
+ // Aggregate the first node that we found, and set it
+ // as the uncollapsed piece of the aggregate node
int otherChildID = collapsedNodesWithOnlyOneNodeInThem
.get(aggregateID);
aggregateData(nodeDataMap.get(aggregateID), nodeDataMap
.get(otherChildID));
collapsedNodesWithOnlyOneNodeInThem.remove(aggregateID);
- nodeDataMap.get(aggregateID).callees.addAll(nodeDataMap
- .get(otherChildID).callees);
+ nodeDataMap.get(aggregateID).children.addAll(nodeDataMap
+ .get(otherChildID).children);
+ nodeDataMap.get(aggregateID).setPartOfCollapsedNode(StapData.NOT_PART_OF_COLLAPSED_NODE);
- nodeDataMap.get(otherChildID).setPartOfCollapsedNode(true);
+ nodeDataMap.get(otherChildID).setPartOfCollapsedNode(aggregateID);
+ nodeDataMap.get(aggregateID).uncollapsedPiece = otherChildID;
} else
//-------------Aggregate - third and additional nodes
@@ -1266,8 +1357,8 @@ public class StapGraph extends Graph {
//-------------Complete aggregation
- nodeDataMap.get(aggregateID).callees
- .addAll(nodeDataMap.get(childID).callees);
+ nodeDataMap.get(aggregateID).children
+ .addAll(nodeDataMap.get(childID).children);
nodeDataMap.get(aggregateID).isCollapsed = true;
if (nodeMap.get(childID) != null) {
@@ -1277,13 +1368,13 @@ public class StapGraph extends Graph {
nodeMap.get(id).getLocation().y);
}
- nodeDataMap.get(childID).setPartOfCollapsedNode(true);
+ nodeDataMap.get(childID).setPartOfCollapsedNode(aggregateID);
} else {
//-------------First child with this name
- idOfLastNode++;
- newNodeMap.put(nodeName, idOfLastNode);
- collapsedNodesWithOnlyOneNodeInThem.put(idOfLastNode, childID);
+ idOfLastCollapsedNode--;
+ newNodeMap.put(nodeName, idOfLastCollapsedNode);
+ collapsedNodesWithOnlyOneNodeInThem.put(idOfLastCollapsedNode, childID);
if (nodeMap.get(childID) != null) {
nodeMap.get(childID).setLocation(
nodeMap.get(id).getLocation().x,
@@ -1299,23 +1390,23 @@ public class StapGraph extends Graph {
for (int i : collapsedNodesWithOnlyOneNodeInThem.keySet()) {
int childID =collapsedNodesWithOnlyOneNodeInThem.get(i);
nodeDataMap.get(childID).onlyChildWithThisName = true;
- nodeDataMap.get(id).collapsedCallees.add(childID);
+ nodeDataMap.get(id).collapsedChildren.add(childID);
newNodeMap.remove(nodeDataMap.get(childID).name);
- nodeDataMap.get(childID).collapsedCaller = id;
+ nodeDataMap.get(childID).collapsedParent = id;
+ //This node is technically a part of itself
+ nodeDataMap.get(childID).setPartOfCollapsedNode(childID);
- if (getData(childID).isMarked())
+ if (getNodeData(childID).isMarked())
markedCollapsedNodes.add(childID);
}
//-------------Finish iterations
- for (int i : nodeDataMap.get(id).collapsedCallees) {
+ for (int i : nodeDataMap.get(id).collapsedChildren) {
recursivelyCollapseAllChildrenOfNode(i);
}
- nodeDataMap.get(id).sortByTime();
-
collapsedNodesWithOnlyOneNodeInThem.clear();
newNodeMap.clear();
@@ -1330,8 +1421,8 @@ public class StapGraph extends Graph {
* @param victim
*/
public void aggregateData(StapData target, StapData victim) {
- target.time += victim.time;
- target.called += victim.called;
+ target.setTime(target.getTime()+ victim.getTime());
+ target.timesCalled += victim.timesCalled;
if (victim.isMarked() || target.isMarked()) {
target.setMarked();
markedCollapsedNodes.add(target.id);
@@ -1381,19 +1472,22 @@ public class StapGraph extends Graph {
public int getTopNode() {
return levels.get(topLevelToDraw).get(0);
}
-
+
/**
* Recommend use of this function instead of getTopNode()
* @return First node that is not the dummy first node
*/
public int getFirstUsefulNode() {
+ if (threaded)
+ return 0;
int id = 0;
+
if (nodeDataMap.get(id).name == CONSTANT_TOP_NODE_NAME) {
id++;
}
// Get first node that is not TOP_NODE_NAME
- while (nodeDataMap.get(id) == null) {
+ while (nodeDataMap.get(id) == null && id < idOfLastNode) {
id++;
}
@@ -1423,7 +1517,7 @@ public class StapGraph extends Graph {
* @return
*/
public boolean hasChildren(int nodeID) {
- if (nodeDataMap.get(nodeID).callees.size() > 0)
+ if (nodeDataMap.get(nodeID).children.size() > 0)
return true;
return false;
}
@@ -1446,21 +1540,52 @@ public class StapGraph extends Graph {
public void setAnimationMode(int mode) {
animation_mode = mode;
if (mode == CONSTANT_ANIMATION_SLOW){
- CallgraphView.getAnimation_slow().setChecked(true);
- CallgraphView.getAnimation_fast().setChecked(false);
+ callgraphView.getAnimation_slow().setChecked(true);
+ callgraphView.getAnimation_fast().setChecked(false);
}else if (mode == CONSTANT_ANIMATION_FASTEST){
- CallgraphView.getAnimation_slow().setChecked(false);
- CallgraphView.getAnimation_fast().setChecked(true);
+ callgraphView.getAnimation_slow().setChecked(false);
+ callgraphView.getAnimation_fast().setChecked(true);
}
}
public void setCollapseMode(boolean value) {
+ if (collapse_mode == value ||
+ draw_mode == StapGraph.CONSTANT_DRAWMODE_AGGREGATE)
+ return;
+
+ if (draw_mode != StapGraph.CONSTANT_DRAWMODE_LEVEL) {
+ if (collapse_mode) {
+ //Collapsed to noncollapsed
+ if (!getRootData().isOnlyChildWithThisName()) {
+ //A collapsed node that isn't an only child must have an
+ //uncollapsed piece
+ rootVisibleNodeNumber = getRootData().uncollapsedPiece;
+ }
+
+ } else {
+ //Uncollapsed to collapsed -- set center node to collapsed node
+ if (!getRootData().isOnlyChildWithThisName()) {
+ int temp = getRootData().getPartOfCollapsedNode();
+ if (temp != StapData.NOT_PART_OF_COLLAPSED_NODE) {
+ rootVisibleNodeNumber = temp;
+ }
+ }
+ }
+ }
collapse_mode = value;
+ callgraphView.getMode_collapsednodes().setChecked(value);
nextMarkedNode = -1;
- CallgraphView.getMode_collapsednodes().setChecked(value);
}
/**
+ *
+ * @return getNodeData(getRootVisibleNodeNumber())
+ */
+ public StapData getRootData() {
+ return getNodeData(getRootVisibleNodeNumber());
+ }
+
+ /**
* Gets id of root visible node
* @return rootVisibleNode - ID of centre node
*/
@@ -1481,6 +1606,8 @@ public class StapGraph extends Graph {
* @return Time in milliseconds
*/
public long getTotalTime() {
+ if (totalTime == 0 || totalTime > 1200000000000000000l)
+ return endTime - startTime;
return totalTime;
}
@@ -1489,8 +1616,6 @@ public class StapGraph extends Graph {
* @param totalTime - Time in milliseconds
*/
public void setTotalTime(long val) {
- //Divide by 100 to save us the trouble of
- //multiplying by 100 to get percentages
this.totalTime = val;
}
@@ -1582,20 +1707,6 @@ public class StapGraph extends Graph {
}
-
- /**
- * Returns the StapData object with id == val.
- * @param val
- * @return
- */
- public StapData getData(int val) {
- if (val > -1)
- return nodeDataMap.get(val);
- else
- return null;
- }
-
-
public void setTreeViewer(TreeViewer treeview) {
StapGraph.treeViewer = treeview;
}
@@ -1612,7 +1723,7 @@ public class StapGraph extends Graph {
* @return
*/
public StapNode getParentNode(int id) {
- return nodeMap.get(nodeDataMap.get(id).caller);
+ return nodeMap.get(nodeDataMap.get(id).parent);
}
@@ -1622,7 +1733,7 @@ public class StapGraph extends Graph {
* @return
*/
public StapData getParentData(int id) {
- return nodeDataMap.get(nodeDataMap.get(id).caller);
+ return nodeDataMap.get(nodeDataMap.get(id).parent);
}
/**
@@ -1635,13 +1746,19 @@ public class StapGraph extends Graph {
public int getNextCalledNode(int id) {
int returnID = -1;
+ if (isCollapseMode()) {
+ setCollapseMode(false);
+ //Redraw the current graph in uncollapsed mode if currently collapsed
+ draw();
+ }
+
for (int count = callOrderList.indexOf((Integer)id) + 1;
count < callOrderList.size(); count++) {
- if (getData(id) == null)
+ int next = callOrderList.get(count);
+ if (getNodeData(id) == null)
continue;
- if (!getData(id).isCollapsed || getData(id).isOnlyChildWithThisName()) {
- returnID = callOrderList.get(count);
- return returnID;
+ if (!getNodeData(next).isCollapsed || getNodeData(next).isOnlyChildWithThisName()) {
+ return next;
}
}
@@ -1660,9 +1777,9 @@ public class StapGraph extends Graph {
for (int count = callOrderList.indexOf((Integer)id) - 1;
count > -1; count--) {
- if (getData(id) == null)
+ if (getNodeData(id) == null)
continue;
- if (!getData(id).isCollapsed || getData(id).isOnlyChildWithThisName()) {
+ if (!getNodeData(id).isCollapsed || getNodeData(id).isOnlyChildWithThisName()) {
returnID = callOrderList.get(count);
return returnID;
}
@@ -1719,6 +1836,16 @@ public class StapGraph extends Graph {
return list.get(nextMarkedNode);
}
+
+
+ public void play() {
+ if (proj == null || proj.getResult() == Status.OK_STATUS) {
+ proj = new Projectionist("Projectionist", this, 2000); //$NON-NLS-1$
+ proj.schedule();
+ } else {
+ proj.pause();
+ }
+ }
@@ -1757,7 +1884,7 @@ public class StapGraph extends Graph {
* Retruns the number of StapData objects placed in the nodeDataMap.
* @return
*/
- public int getDataMapSize() {
+ public int getNodeDataMapSize() {
return nodeDataMap.size();
}
@@ -1794,39 +1921,61 @@ public class StapGraph extends Graph {
maxNodes = val;
}
-
-
public ArrayList<Integer> getCallOrderList() {
return callOrderList;
}
-
-
public void setCallOrderList(ArrayList<Integer> callOrderList) {
this.callOrderList = callOrderList;
}
-
-
public int getLastFunctionCalled() {
return lastFunctionCalled;
}
-
-
public void setLastFunctionCalled(int lastFunctionCalled) {
this.lastFunctionCalled = lastFunctionCalled;
}
-
-
public ICProject getProject() {
return project;
}
-
+ public Projectionist getProjectionist() {
+ return proj;
+ }
public void setProject(ICProject myProject) {
this.project = myProject;
}
+
+ public CallgraphView getCallgraphView() {
+ return callgraphView;
+ }
+
+ public void setEndTime(long val) {
+ endTime = val;
+ }
+
+ public long getEndTime() {
+ return endTime;
+ }
+
+ public void setStartTime(long val) {
+ startTime = val;
+ }
+
+ public void setThreaded() {
+ threaded = true;
+ }
+
+ public boolean getCollapseMode() {
+ return collapse_mode;
+ }
+
+
+
+ public void addCalled(int idChild) {
+ getNodeData(idChild).timesCalled++;
+ }
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapGraphParser.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapGraphParser.java
index f233a0a1db..96912bd4bf 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapGraphParser.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapGraphParser.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.linuxtools.callgraph;
import java.io.BufferedReader;
-import java.io.File;
+import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
@@ -22,9 +22,9 @@ import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.linuxtools.callgraph.core.Helper;
import org.eclipse.linuxtools.callgraph.core.SystemTapParser;
import org.eclipse.linuxtools.callgraph.core.SystemTapUIErrorMessages;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
@@ -39,11 +39,10 @@ import org.eclipse.swt.widgets.Shell;
*/
public class StapGraphParser extends SystemTapParser {
- private static final String NEW_LINE = "\n";
public HashMap<Integer, Long> timeMap;
public TreeMap<Integer, String> serialMap;
- public HashMap<Integer, ArrayList<Integer>> outNeighbours;
- public HashMap<String, Long> cumulativeTimeMap;
+ public HashMap<Integer, HashMap<Integer, ArrayList<Integer>>> neighbourMaps;
+ public HashMap<String, Long> aggregateTimeMap;
public HashMap<String, Integer> countMap;
public ArrayList<Integer> callOrderList;
public HashMap<Integer, String> markedMap;
@@ -51,318 +50,520 @@ public class StapGraphParser extends SystemTapParser {
public int validator;
public Long endingTimeInNS;
public long totalTime;
- public int lastFunctionCalled;
+ public HashMap<Integer, Integer> lastFunctionMap;
public ICProject project;
-
+ private static final String DELIM = ",,"; //$NON-NLS-1$
+
+ private boolean encounteredMain = false;
+ private ArrayList<Integer> shouldGetEndingTimeForID = new ArrayList <Integer>();
+
+ private HashMap<Integer, ArrayList<String>> nameMaps;
+ private HashMap<Integer, ArrayList<Integer>> idMaps;
+ private boolean skippedDirectives = false;
+ private int firstNode = -1;
+
+ public long startTime = -1;
public String text;
@Override
protected void initialize() {
//INITIALIZE MAPS
- outNeighbours = new HashMap<Integer, ArrayList<Integer>>();
+ neighbourMaps = new HashMap<Integer, HashMap<Integer, ArrayList<Integer>>>();
timeMap = new HashMap<Integer, Long>();
serialMap = new TreeMap<Integer, String>();
- cumulativeTimeMap = new HashMap<String, Long>();
+ aggregateTimeMap = new HashMap<String, Long>();
countMap = new HashMap<String, Integer>();
endingTimeInNS = 0l;
callOrderList = new ArrayList<Integer>();
markedMap = new HashMap<Integer, String>();
- lastFunctionCalled = 0;
- project = null;
+ lastFunctionMap = new HashMap<Integer, Integer>();
+ nameMaps = new HashMap<Integer, ArrayList<String>>();
+ idMaps = new HashMap<Integer, ArrayList<Integer>>();
+ project = null;
+ startTime = -1;
}
-
- public IStatus executeParsing(){
+
+ public IStatus nonRealTimeParsing(){
//Clear maps (in case a previous execution left values hanging)
- outNeighbours.clear();
+ neighbourMaps.clear();
timeMap.clear();
serialMap.clear();
- cumulativeTimeMap.clear();
+ aggregateTimeMap.clear();
countMap.clear();
text = ""; //$NON-NLS-1$
callOrderList.clear();
+ shouldGetEndingTimeForID.clear();
+ nameMaps.clear();
+ idMaps.clear();
+ encounteredMain = false;
+ skippedDirectives = false;
+ firstNode = -1;
+ startTime = -1;
+ BufferedReader buff = null;
try {
- BufferedReader buff = new BufferedReader(new FileReader(filePath));
- String tmp;
- while ((tmp = buff.readLine()) != null) {
- if (monitor.isCanceled()) {
- return Status.CANCEL_STATUS;
- }
+ buff = new BufferedReader(new FileReader(sourcePath));
+ } catch (FileNotFoundException e1) {
+ Display.getDefault().asyncExec(new Runnable() {
- if (tmp.equals("PROBE_BEGIN")){ //$NON-NLS-1$
- tmp = buff.readLine();
-
- if (tmp != null && tmp.length() > 0) {
- project = CoreModel.getDefault().getCModel().getCProject(tmp);
- }
- else {
- launchFileDialogError();
- return Status.CANCEL_STATUS;
- }
+ @Override
+ public void run(){
+ MessageDialog.openError(new Shell(), Messages.getString("StapGraphParser.FileNotFound"), //$NON-NLS-1$
+ Messages.getString("StapGraphParser.CouldNotOpen") + sourcePath); //$NON-NLS-1$
- text = buff.readLine();
-
- tmp = buff.readLine();
- if (tmp != null && tmp.length() > 0)
- endingTimeInNS = Long.parseLong(tmp);
- else {
- launchFileDialogError();
- return Status.CANCEL_STATUS;
- }
-
- tmp = buff.readLine();
- if (tmp != null && tmp.length() > 0)
- totalTime = Long.parseLong(tmp);
- else {
- launchFileDialogError();
- return Status.CANCEL_STATUS;
- }
}
- }
- buff.close();
-
- } catch (IOException e) {
- launchFileDialogError();
+ });
return Status.CANCEL_STATUS;
}
+ internalData = buff;
+ return realTimeParsing();
+ }
+
+
+ private void parseEnd() {
+
+ //CHECK FOR EXIT() CALL
+ for (int key : idMaps.keySet()) {
+ ArrayList<Integer> idList = idMaps.get(key);
+ int lastFunctionCalled = lastFunctionMap.get(key);
+ if (idList.size() > 1) {
+ for (int val : idList){
+ String name = serialMap.get(val);
+ long time = endingTimeInNS - timeMap.get(val);
+ timeMap.put(val, time);
+ if (val == firstNode)
+ showTime(val, time);
+ if (shouldGetEndingTimeForID.contains(val)){
+ long cumulativeTime = aggregateTimeMap.get(name) + endingTimeInNS;
+ aggregateTimeMap.put(name, cumulativeTime);
+ }
+
+ lastFunctionCalled = val;
+ }
+ String tmp = markedMap.get(lastFunctionCalled);
+ if (tmp == null) tmp = ""; //$NON-NLS-1$
+ markedMap.put(lastFunctionCalled,
+ tmp + "\n" + Messages.getString("StapGraphParser.Term")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
- if (text.length() > 0) {
+ //timecheck is true if the total execution time is less than 10ms
+ //and the first function is more than 1% off from the total time.
+ boolean timeCheck = totalTime < 50000000 &&
+ (((float)timeMap.get(firstNode)/totalTime) > 1.01 ||
+ ((float)timeMap.get(firstNode)/totalTime) < 0.99);
+
+ /*
+ * Indicate whether or not we had to manipulate total time, and why
+ */
+ if (skippedDirectives || timeCheck) {
+ totalTime = timeMap.get(firstNode);
+ String markedMessage = ""; //$NON-NLS-1$
+ if (markedMap.containsKey(firstNode)) {
+ markedMessage = markedMap.get(firstNode) + "\n"; //$NON-NLS-1$
+ }
+ if (skippedDirectives)
+ markedMessage += Messages.getString("StapGraphParser.CDirectives"); //$NON-NLS-1$
+ if (timeCheck)
+ markedMessage += Messages.getString("StapGraphParser.TooFast"); //$NON-NLS-1$
- boolean encounteredMain = false;
+ markedMessage += Messages.getString("StapGraphParser.TimeForThisNode"); //$NON-NLS-1$
- ArrayList<Integer> shouldGetEndingTimeForID = new ArrayList <Integer>();
- String[] callsAndReturns = text.split(";"); //$NON-NLS-1$
- String[] args;
- ArrayList<String> nameList = new ArrayList<String>();
- ArrayList<Integer> idList = new ArrayList<Integer>();
- boolean skippedDirectives = false;
+ markedMap.put(firstNode, markedMessage);
+ }
+ }
+
+ private void parseMarked(String msg) {
+ /*
+ * Append message
+ */
+ String[] parsed = msg.split(",,", 2);
+
+ int key = Integer.parseInt(parsed[0]);
+
+ ArrayList<Integer> idList = idMaps.get(key);
+ if (idList == null || msg.length() < 1 || idList.size() < 1)
+ return;
+ int id = idList.get(idList.size() -1);
+ if (parsed[1].equals("<unknown>")) { //$NON-NLS-1$
+ parsed[1] = parsed[1] + Messages.getString("StapGraphParser.UnknownMarkers"); //$NON-NLS-1$
+ }
+ markedMap.put(id, (markedMap.get(id) == null ? "" : markedMap.get(id)) + parsed[1]); //$NON-NLS-1$
+ }
+
+ private IStatus parse(String s) {
+
+ try {
+ if (s.length() < 1)
+ return Status.OK_STATUS;
+ switch (s.charAt(0)) {
+ case '<' :
+ /*
+ *
+ * Open tag -- function call
+ *
+ *
+ */
+ String[] args = s.substring(1, s.length()).split(DELIM); //$NON-NLS-1$
+ // args[0] = name
+ // args[1] = id
+ // arsg[2] = time of event
+ int id = Integer.parseInt(args[1]);
+ long time = Long.parseLong(args[2]);
+ int tid = Integer.parseInt(args[3]);
+ String name = args[0];
+
+ //If we haven't encountered a main function yet and the name isn't clean,
+ //and the name contains "__", then this is probably a C directive
+ if (!encounteredMain && !isFunctionNameClean(name) && name.contains("__")) { //$NON-NLS-1$
+ skippedDirectives = true;
+ break;
+ }
+
+ ArrayList<String> nameList = nameMaps.get(tid);
+ if (nameList == null) {
+ nameList = new ArrayList<String>();
+ }
+
+ ArrayList<Integer> idList = idMaps.get(tid);
+ if (idList == null) {
+ idList = new ArrayList<Integer>();
+ }
+
+ HashMap<Integer, ArrayList<Integer>> outNeighbours = neighbourMaps.get(tid);
+ if (outNeighbours == null) {
+ outNeighbours = new HashMap<Integer, ArrayList<Integer>>();
+ }
+
+ if (startTime < 1) {
+ startTime = time;
+ }
+ endingTimeInNS=time;
+
+ name = cleanFunctionName(name);
+ if (name.equals("main")) //$NON-NLS-1$
+ encounteredMain = true;
+ if (firstNode == -1) {
+ firstNode = id;
+ }
+
+ serialMap.put(id, name);
+ timeMap.put(id, time);
+
+ if (aggregateTimeMap.get(name) == null){
+ aggregateTimeMap.put(name, (long) 0);
+ }
+
+ //IF THERE ARE PREVIOUS FUNCTIONS WITH THE SAME NAME
+ //WE ARE IN ONE OF THEM SO DO NOT ADD TO CUMULATIVE TIME
+
+
+ if (nameList.indexOf(name) == -1) {
+ long cumulativeTime = aggregateTimeMap.get(name) - time;
+ aggregateTimeMap.put(name, cumulativeTime);
+ shouldGetEndingTimeForID.add(id);
+ }
+
+
+ if (countMap.get(name) == null){
+ countMap.put(name, 0);
+ }
+ countMap.put(name, countMap.get(name) + 1);
+
+ nameList.add(name);
+ idList.add(id);
+
+
+ if (outNeighbours.get(id) == null){
+ outNeighbours.put(id, new ArrayList<Integer>());
+ }
+
+ if (idList.size() > 1) {
+ int parentID = idList.get(idList.size() - 2);
+ outNeighbours.get(parentID).add(id);
+ }
+
+
+ callOrderList.add(id);
+ lastFunctionMap.put(tid,id);
+
+ neighbourMaps.put(tid, outNeighbours);
+ nameMaps.put(tid, nameList);
+ idMaps.put(tid, idList);
+
+ break;
+ case '>' :
+
+ /*
+ *
+ * Close tag -- Function return
+ *
+ */
+
+ args = s.substring(1, s.length()).split(DELIM); //$NON-NLS-1$
+ //args[0] = name
+ //args[1] = time of event
+ name = args[0];
+ tid = Integer.parseInt(args[2]);
+
+ nameList = nameMaps.get(tid);
+ if (nameList == null) {
+ nameList = new ArrayList<String>();
+ }
+
+ idList = idMaps.get(tid);
+ if (idList == null) {
+ idList = new ArrayList<Integer>();
+ }
+
+
+ //If we haven't encountered a main function yet and the name isn't clean,
+ //and the name contains "__", then this is probably a C directive
+ if (!encounteredMain && !isFunctionNameClean(name) && name.contains("__")) { //$NON-NLS-1$
+ skippedDirectives = true;
+ break;
+ }
+
+ name = cleanFunctionName(name);
+ int lastOccurance = nameList.lastIndexOf(name);
+ if (lastOccurance < 0) {
+ parsingError(Messages.getString("StapGraphParser.RetMismatch") + name); //$NON-NLS-1$
+ return Status.CANCEL_STATUS;
+ }
+
+ nameList.remove(lastOccurance);
+ id = idList.remove(lastOccurance);
+
+
+ if (timeMap.get(id) == null) {
+ parsingError(Messages.getString("StapGraphParser.NoStartTime") + name); //$NON-NLS-1$
+ return Status.CANCEL_STATUS;
+ }
+ endingTimeInNS=Long.parseLong(args[1]);
+ time = endingTimeInNS - timeMap.get(id);
+ timeMap.put(id, time);
+ if (id == firstNode)
+ showTime(id, time);
+
+
+ //IF AN ID IS IN THIS ARRAY IT IS BECAUSE WE NEED THE ENDING TIME
+ // TO BE ADDED TO THE CUMULATIVE TIME FOR FUNCTIONS OF THIS NAME
+ if (shouldGetEndingTimeForID.contains(id)){
+ long cumulativeTime = aggregateTimeMap.get(name) + Long.parseLong(args[1]);
+ aggregateTimeMap.put(name, cumulativeTime);
+ }
+
+ nameMaps.put(tid, nameList);
+ idMaps.put(tid, idList);
+ break;
+ default :
+ /*
+ *
+ * Anything else -- error
+ *
+ */
+
+// parsingError(Messages.getString("StapGraphParser.14") + s.charAt(0) + //$NON-NLS-1$
+// Messages.getString("StapGraphParser.15") ); //$NON-NLS-1$
+ return Status.CANCEL_STATUS;
- String name;
- int id;
- long time;
- long cumulativeTime;
- int parentID;
- int firstNode = -1;
- try {
- for (String s : callsAndReturns) {
- switch (s.charAt(0)) {
- case '<' :
-
- args = s.substring(1, s.length()).split(",,"); //$NON-NLS-1$
- // args[0] = name
- // args[1] = id
- // arsg[2] = time of event
- id = Integer.parseInt(args[1]);
- time = Long.parseLong(args[2]);
- name = args[0];
-
- //If we haven't encountered a main function yet and the name isn't clean,
- //and the name contains "__", then this is probably a C directive
- if (!encounteredMain && !isFunctionNameClean(name) && name.contains("__")) { //$NON-NLS-1$
- skippedDirectives = true;
- break;
- }
- name = cleanFunctionName(name);
- if (name.equals("main")) //$NON-NLS-1$
- encounteredMain = true;
+ }
+ } catch (NumberFormatException e) {
+ SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages
+ (Messages.getString("StapGraphParser.BadSymbol"), //$NON-NLS-1$
+ Messages.getString("StapGraphParser.BadSymbol"), //$NON-NLS-1$
+ Messages.getString("StapGraphParser.BadSymbolMsg1") + //$NON-NLS-1$
+ Messages.getString("StapGraphParser.BadSymbolMsg2")); //$NON-NLS-1$
+ mess.schedule();
+
+ return Status.CANCEL_STATUS;
+ }
+ return Status.OK_STATUS;
+ }
+
+
+ private IStatus parseDotFile() {
+ if (!(internalData instanceof BufferedReader))
+ return Status.CANCEL_STATUS;
+
+ BufferedReader buff = (BufferedReader) internalData;
+
+ HashMap <Integer, ArrayList<Integer>> outNeighbours= new HashMap<Integer, ArrayList<Integer>>();
+ ArrayList<String> nameList = new ArrayList<String>();
+ ArrayList<Integer> idList = new ArrayList<Integer>();
+ endingTimeInNS =0l;
+ totalTime=10000l;
+ try {
+ String line;
+ while ((line = buff.readLine()) != null) {
+ if (line.equals("}")) //$NON-NLS-1$
+ break;
+ if (monitor.isCanceled())
+ return Status.CANCEL_STATUS;
+ if (line.length() < 1)
+ continue;
+
+ String[] args = new String[2];
+ args = line.split(" ", 2); //$NON-NLS-1$
+ if (args[0].contains("->")) { //$NON-NLS-1$
+ //connection
+ int[] ids = new int[2];
+ int called = 1;
+ try {
+ ids[0] = Integer.parseInt(args[0].split("->")[0]); //$NON-NLS-1$
+ ids[1] = Integer.parseInt(args[0].split("->")[1]); //$NON-NLS-1$
+ int index1 = args[1].indexOf("=\""); //$NON-NLS-1$
+ int index2 = args[1].indexOf("\"]"); //$NON-NLS-1$
+ called = Integer.parseInt(args[1].substring(index1 + 2,index2));
+ } catch (NumberFormatException e) {
+ SystemTapUIErrorMessages m = new SystemTapUIErrorMessages(
+ Messages.getString("StapGraphParser.idOrLabel"), Messages.getString("StapGraphParser.idOrLabel"), //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.getString("StapGraphParser.nonNumericLabel")); //$NON-NLS-1$
+ m.schedule();
+ return Status.CANCEL_STATUS;
+ }
+
+ //Set neighbour
+ ArrayList<Integer> tmpList = outNeighbours.get(ids[0]);
+ if (tmpList == null)
+ tmpList = new ArrayList<Integer>();
+
+ for (int i = 0; i < called; i++)
+ tmpList.add(ids[1]);
+
+ outNeighbours.put(ids[0], tmpList);
+ } else {
+ //node
+ try {
+ int id = Integer.parseInt(args[0]);
if (firstNode == -1) {
firstNode = id;
}
-
- serialMap.put(id, name);
+ int index = args[1].indexOf("=\""); //$NON-NLS-1$
+ String name = args[1].substring(index + 2, args[1].indexOf(" ", index)); //$NON-NLS-1$
+ double dtime = 0.0;
+ dtime = Double.parseDouble(args[1].substring(args[1].indexOf(" ") + 1, args[1].indexOf("%"))); //$NON-NLS-1$ //$NON-NLS-2$
+ long time = (long) (dtime*100);
+
+ nameList.add(name);
+ idList.add(id);
timeMap.put(id, time);
-
- if (cumulativeTimeMap.get(name) == null){
- cumulativeTimeMap.put(name, (long) 0);
- }
-
- //IF THERE ARE PREVIOUS FUNCTIONS WITH THE SAME NAME
- //WE ARE IN ONE OF THEM SO DO NOT ADD TO CUMULATIVE TIME
- if (nameList.indexOf(name) == -1) {
- cumulativeTime = cumulativeTimeMap.get(name) - time;
- cumulativeTimeMap.put(name, cumulativeTime);
- shouldGetEndingTimeForID.add(id);
- }
-
-
+ serialMap.put(id, name);
if (countMap.get(name) == null){
countMap.put(name, 0);
}
countMap.put(name, countMap.get(name) + 1);
- nameList.add(name);
- idList.add(id);
-
- if (outNeighbours.get(id) == null){
- outNeighbours.put(id, new ArrayList<Integer>());
- }
-
- if (idList.size() > 1) {
- parentID = idList.get(idList.size() - 2);
- outNeighbours.get(parentID).add(id);
- }
-
- callOrderList.add(id);
- lastFunctionCalled = id;
-
- break;
- case '>' :
- args = s.substring(1, s.length()).split(",,"); //$NON-NLS-1$
- //args[0] = name
- //args[1] = time of event
- name = args[0];
-
-
- //If we haven't encountered a main function yet and the name isn't clean,
- //and the name contains "__", then this is probably a C directive
- if (!encounteredMain && !isFunctionNameClean(name) && name.contains("__")) { //$NON-NLS-1$
- skippedDirectives = true;
- break;
- }
- name = cleanFunctionName(name);
- int lastOccurance = nameList.lastIndexOf(name);
- if (lastOccurance < 0) {
- parsingError(Messages.getString("StapGraphParser.12") + name); //$NON-NLS-1$
- return Status.CANCEL_STATUS;
- }
-
- nameList.remove(lastOccurance);
- id = idList.remove(lastOccurance);
-
-
- if (timeMap.get(id) == null) {
- parsingError(Messages.getString("StapGraphParser.13") + name); //$NON-NLS-1$
- return Status.CANCEL_STATUS;
- }
- time = Long.parseLong(args[1]) - timeMap.get(id);
- timeMap.put(id, time);
-
-
- //IF AN ID IS IN THIS ARRAY IT IS BECAUSE WE NEED THE ENDING TIME
- // TO BE ADDED TO THE CUMULATIVE TIME FOR FUNCTIONS OF THIS NAME
- if (shouldGetEndingTimeForID.contains(id)){
- cumulativeTime = cumulativeTimeMap.get(name) + Long.parseLong(args[1]);
- cumulativeTimeMap.put(name, cumulativeTime);
- }
-
-
- //Use + for end times
-// cumulativeTime = cumulativeTimeMap.get(name) + Long.parseLong(args[1]);
-// cumulativeTimeMap.put(name, cumulativeTime);
-
- break;
- default :
- parsingError(Messages.getString("StapGraphParser.14") + s.charAt(0) + //$NON-NLS-1$
- Messages.getString("StapGraphParser.15") ); //$NON-NLS-1$
+ long cumulativeTime = (aggregateTimeMap.get(name) != null ? aggregateTimeMap.get(name) : 0) + time;
+ aggregateTimeMap.put(name, cumulativeTime);
+ } catch (NumberFormatException e) {
+ SystemTapUIErrorMessages m = new SystemTapUIErrorMessages(
+ Messages.getString("StapGraphParser.idOrTime"), Messages.getString("StapGraphParser.idOrTime"), //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.getString("StapGraphParser.nonNumericTime")); //$NON-NLS-1$
+ m.schedule();
return Status.CANCEL_STATUS;
-
- }
-
- }
-
-
- //CHECK FOR EXIT() CALL
- if (idList.size() != 0){
- for (int val : idList){
- name = serialMap.get(val);
- time = endingTimeInNS - timeMap.get(val);
- timeMap.put(val, time);
- if (shouldGetEndingTimeForID.contains(val)){
- cumulativeTime = cumulativeTimeMap.get(name) + endingTimeInNS;
- cumulativeTimeMap.put(name, cumulativeTime);
}
-// if (name.equals("main")) {
-// totalTime = time;
-// }
- lastFunctionCalled = val;
}
- markedMap.put(lastFunctionCalled, Messages.getString("StapGraphParser.16")); //$NON-NLS-1$
- }
-
- //timecheck is true if the total execution time is less than 10ms
- //and the first function is more than 1% off from the total time.
- boolean timeCheck = totalTime < 50000000 &&
- (((float)timeMap.get(firstNode)/totalTime) > 1.01 ||
- ((float)timeMap.get(firstNode)/totalTime) < 0.99);
-
-
-
- if (skippedDirectives || timeCheck) {
- totalTime = timeMap.get(firstNode);
- String markedMessage = ""; //$NON-NLS-1$
- if (markedMap.containsKey(firstNode)) {
- markedMessage = markedMap.get(firstNode) + "\n"; //$NON-NLS-1$
- }
- if (skippedDirectives)
- markedMessage += Messages.getString("StapGraphParser.19"); //$NON-NLS-1$
- if (timeCheck)
- markedMessage += Messages.getString("StapGraphParser.20"); //$NON-NLS-1$
- markedMessage += Messages.getString("StapGraphParser.21"); //$NON-NLS-1$
- markedMap.put(firstNode, markedMessage);
}
-
-
- } catch (NumberFormatException e) {
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("StapGraphParser.22"), //$NON-NLS-1$
- Messages.getString("StapGraphParser.23"), Messages.getString("StapGraphParser.24") + //$NON-NLS-1$ //$NON-NLS-2$
- Messages.getString("StapGraphParser.25")); //$NON-NLS-1$
- mess.schedule();
-
- return Status.CANCEL_STATUS;
+ } catch (IOException e) {
+ e.printStackTrace();
+ } finally {
+ try {
+ buff.close();
+ } catch (IOException e) {
+ //Do nothing
}
- } else {
- parsingError(Messages.getString("StapGraphParser.26")); //$NON-NLS-1$
- return Status.CANCEL_STATUS;
}
-
- //Create a UIJob to handle the rest
- GraphUIJob uijob = new GraphUIJob(Messages.getString("StapGraphParser.5"), this); //$NON-NLS-1$
- uijob.schedule();
+ neighbourMaps.put(0, outNeighbours);
+ nameMaps.put(0, nameList);
+ idMaps.put(0, idList);
+ try {
+ view.update();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+
return Status.OK_STATUS;
-
}
-
@Override
- public void saveData(String filePath) {
- File file = new File(filePath);
- String content = Messages.getString("CallgraphView.25") //$NON-NLS-1$
- + project.getElementName()
- + NEW_LINE
- + text
- + NEW_LINE
- + endingTimeInNS
- + NEW_LINE
- + totalTime;
+ public IStatus realTimeParsing() {
+ if (!(internalData instanceof BufferedReader))
+ return Status.CANCEL_STATUS;
+
+ BufferedReader buff = (BufferedReader) internalData;
+
+ String line;
+ boolean draw = false;
+ boolean first = true;
try {
- // WAS THE FILE CREATED OR DOES IT ALREADY EXIST
- if (file.createNewFile()) {
- Helper.writeToFile(filePath, content);
- } else {
- if (MessageDialog
- .openConfirm(
- new Shell(),
- Messages
- .getString("CallgraphView.FileExistsTitle"), //$NON-NLS-1$
- Messages
- .getString("CallgraphView.FileExistsMessage"))) { //$NON-NLS-1$
- file.delete();
- file.createNewFile();
- Helper.writeToFile(filePath, content);
+ while ((line = buff.readLine()) != null) {
+ if (monitor.isCanceled())
+ return Status.CANCEL_STATUS;
+ if (line.length() < 1)
+ continue;
+ if (first && (line.contains(Messages.getString("StapGraphParser.17")))) { //$NON-NLS-1$
+ return parseDotFile();
+ }
+ first = false;
+
+ draw = true;
+ if (line.equals("PROBE_BEGIN")) { //$NON-NLS-1$
+ buff.mark(100);
+ String tmp = buff.readLine();
+
+ if (tmp != null && tmp.length() > 0) {
+ char tchar = tmp.charAt(0);
+ if (tchar != '-' && tchar != '+' && tchar != '?' && tchar != '>' && tchar != '<')
+ project = CoreModel.getDefault().getCModel().getCProject(tmp);
+ else
+ buff.reset();
+ }
+
+ } else if (line.charAt(0) == '-') {
+ endingTimeInNS = Long.parseLong(line.substring(1));
+ } else if (line.charAt(0) == '+') {
+ totalTime = Long.parseLong(line.substring(1));
+ //Total time should be the last line in the output
+ parseEnd();
+ } else if (line.charAt(0) == '?') {
+ if (line.length() > 1)
+ parseMarked(line.substring(1));
+ } else {
+ if (parse(line) == Status.CANCEL_STATUS)
+ break;
}
}
- } catch (IOException e1) {
- e1.printStackTrace();
- }
+ if (draw && view != null) {
+ view.update();
+ //Repeat until all lines are read
+ realTimeParsing();
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+
+ return Status.OK_STATUS;
}
+ /**
+ * Mark node id with a message giving its actual time.
+ */
+ private void showTime(int id, long time) {
+ String tmp = markedMap.get(id);
+ if (tmp == null) tmp = ""; //$NON-NLS-1$
+ markedMap.put(id, tmp +
+ Messages.getString("StapGraphParser.ActualTime") + time/1000000 //$NON-NLS-1$
+ + Messages.getString("StapGraphParser.TimeUnits")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
-
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapNode.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapNode.java
index 8648eb235b..327f903138 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapNode.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/StapNode.java
@@ -11,8 +11,6 @@
package org.eclipse.linuxtools.callgraph;
import java.text.NumberFormat;
-import java.util.ArrayList;
-import java.util.List;
import java.util.Locale;
import org.eclipse.draw2d.Label;
@@ -26,9 +24,7 @@ public class StapNode extends GraphNode{
private static int nodeSize = 20;
public int id;
public GraphConnection connection; //Each node should have only one connection (to its caller)
- private boolean hasButtons; //Has buttons already attached
- public List<Integer> buttons;
- private static NumberFormat numberFormat = NumberFormat.getInstance(Locale.CANADA);
+ static NumberFormat numberFormat = NumberFormat.getInstance(Locale.CANADA);
public StapNode(StapGraph graphModel, int style, StapData data) {
@@ -38,8 +34,6 @@ public class StapNode extends GraphNode{
if (Display.getCurrent().getPrimaryMonitor().getBounds().width < 1000)
nodeSize = 10;
-
-
if (data.name == StapGraph.CONSTANT_TOP_NODE_NAME)
this.setText(StapGraph.CONSTANT_TOP_NODE_NAME);
else {
@@ -47,18 +41,18 @@ public class StapNode extends GraphNode{
if (data.name.length() > nodeSize)
shortName = data.name.substring(0, nodeSize - 3) + "..."; //$NON-NLS-1$
this.setText(shortName + ": " + //$NON-NLS-1$
- numberFormat.format((float) data.time/graphModel.getTotalTime() * 100)
+ numberFormat.format((float) data.getTime()/graphModel.getTotalTime() * 100)
+ "%"); //$NON-NLS-1$
}
- if (data.markedMessage.length() != 0) {
+ if (data.markedMessage != null && data.markedMessage.length() != 0) {
Label tooltip = new Label(data.name + ": " + //$NON-NLS-1$
- numberFormat.format((float) data.time/graphModel.getTotalTime() * 100)
+ numberFormat.format((float) data.getTime()/graphModel.getTotalTime() * 100)
+ "%" + "\n " + data.markedMessage); //$NON-NLS-1$ //$NON-NLS-2$
this.setTooltip(tooltip);
} else if (data.name.length() > nodeSize) {
Label tooltip = new Label(data.name + ": " + //$NON-NLS-1$
- numberFormat.format((float) data.time/graphModel.getTotalTime() * 100)
+ numberFormat.format((float) data.getTime()/graphModel.getTotalTime() * 100)
+ "%"); //$NON-NLS-1$
this.setTooltip(tooltip);
}
@@ -66,32 +60,19 @@ public class StapNode extends GraphNode{
this.id = data.id;
this.connection = null;
- hasButtons = false;
- buttons = new ArrayList<Integer>();
- if (graphModel.getNode(data.caller) != null) {
+ if (graphModel.getNode(data.parent) != null) {
this.connection = new GraphConnection( graphModel, style,
- this, graphModel.getNode(data.caller));
+ this, graphModel.getNode(data.parent));
if (graphModel.isCollapseMode())
- connection.setText("" + data.called); //$NON-NLS-1$
- }
-
- if (graphModel.getNode(data.collapsedCaller) != null) {
+ connection.setText("" + data.timesCalled); //$NON-NLS-1$
+ } else if (graphModel.getNode(data.collapsedParent) != null) {
this.connection = new GraphConnection( graphModel, style,
- this, graphModel.getNode(data.collapsedCaller));
+ this, graphModel.getNode(data.collapsedParent));
if (graphModel.isCollapseMode())
- connection.setText("" + data.called); //$NON-NLS-1$
- }
- }
-
-
- public void setHasButtons(boolean value) {
- hasButtons = value;
- }
-
- public boolean getHasButtons() {
- return hasButtons;
+ connection.setText("" + data.timesCalled); //$NON-NLS-1$
+ } //else do not create any connections (this should usually never happen)
}
/**
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/SystemTapCommandParser.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/SystemTapCommandParser.java
deleted file mode 100644
index c20e85ee7e..0000000000
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/SystemTapCommandParser.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.callgraph;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-
-
-public class SystemTapCommandParser extends Job {
-
- private String filePath;
- private String returnText;
- private boolean printIsDone;
- public CallgraphView stapview;
- private String testOutput;
- public boolean useColours;
- private boolean graphingMode;
- private boolean processFinished;
-
-
- public boolean isProcessFinished() {
- return processFinished;
- }
-
-
- public void setProcessFinished(boolean processFinished) {
- this.processFinished = processFinished;
- }
-
-
- public SystemTapCommandParser(String name, String filePath, CallgraphView sview,
- boolean useColours,
- boolean scheduleGraph, String configName) {
- super(name);
- this.filePath = filePath;
- this.stapview = sview;
- this.useColours = useColours;
- this.graphingMode = scheduleGraph;
- this.processFinished=false;
- }
-
-
- public String getCommand() {
- return filePath;
- }
-
- /**
- * Convenience method to set this.filePath.
- * Currently not used.
- *
- * @param filePath - filePath to be set
- */
- public void setFilePath(String filePath) {
- this.filePath = filePath;
- }
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
-
- if (graphingMode) {
- //Delegate to graphing parser instead of this one
- StapGraphParser p = new StapGraphParser();
- p.setFile(filePath);
- p.schedule();
-
-// String text = Helper.getMainConsoleTextByName(configName);
-// returnText = " " + configName+"\n"; //$NON-NLS-1$ //$NON-NLS-2$
-// returnText += dashes() + "\n\n"; //$NON-NLS-1$
-// setText(text);
-//
-//
-// SystemTapUIJob uijob = new SystemTapUIJob("SystemTapUIJob", this, this.useColours); //$NON-NLS-1$
-// uijob.schedule();
-
- return Status.OK_STATUS;
- }
-
- return Status.OK_STATUS;
- }
-
- public synchronized void setText(String text) {
- returnText += text;
- }
-
- public synchronized String getText() {
- String tmp = returnText;
- returnText = ""; //$NON-NLS-1$
- return tmp;
- }
-
- public synchronized void setDone() {
- printIsDone = true;
- }
-
- public synchronized void clearDone() {
- printIsDone = false;
- }
-
- public synchronized boolean checkDone() {
- return printIsDone;
- }
-
- public String getTestOutput() {
- return testOutput;
- }
-
- public IStatus testRun(IProgressMonitor m) {
- return run(m);
- }
-
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/AutoScrollHelper.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/AutoScrollHelper.java
index 4ff91b0bdb..8e4d020b52 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/AutoScrollHelper.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/AutoScrollHelper.java
@@ -18,10 +18,10 @@ public class AutoScrollHelper {
public static void scrollUp(StapGraph graph) {
- if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_BOX) {
- int parent = graph.getNodeData(graph.getRootVisibleNodeNumber()).caller;
+ if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_LEVEL) {
+ int parent = graph.getNodeData(graph.getRootVisibleNodeNumber()).parent;
if (graph.isCollapseMode())
- parent = graph.getNodeData(graph.getRootVisibleNodeNumber()).collapsedCaller;
+ parent = graph.getNodeData(graph.getRootVisibleNodeNumber()).collapsedParent;
if (graph.getNodeData(parent) != null && graph.getNodeData(parent).levelOfRecursion > 0 ) {
int animMode = graph.getAnimationMode();
@@ -34,7 +34,7 @@ public class AutoScrollHelper {
}
public static void scrollDown(StapGraph graph) {
- if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_BOX) {
+ if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_LEVEL) {
if (graph.getTopLevel() + StapGraph.levelBuffer <
graph.getLowestLevelOfNodesAdded()) {
int newLevel = graph.getTopLevel() + 1;
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphKeyListener.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphKeyListener.java
index 46ed512a7a..023cf109e7 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphKeyListener.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphKeyListener.java
@@ -20,10 +20,10 @@ import org.eclipse.swt.events.KeyListener;
* StapGraph key listener
*/
public class StapGraphKeyListener implements KeyListener {
-// private StapGraph graph;
+ private CallgraphView callgraphView;
public StapGraphKeyListener(StapGraph g) {
-// graph = g;
+ callgraphView = g.getCallgraphView();
}
@Override
@@ -39,7 +39,7 @@ public class StapGraphKeyListener implements KeyListener {
//TODO: Use accelerator in menu actions instead of this hard-coded stuff
if (e.character == 'R') {
- CallgraphView.getView_refresh().run();
+ callgraphView.getView_refresh().run();
// }else if (e.character == '1') {
// graph.setAnimationMode(StapGraph.CONSTANT_ANIMATION_SLOW);
// }else if (e.character == '2') {
@@ -66,13 +66,16 @@ public class StapGraphKeyListener implements KeyListener {
// graph.getRootVisibleNode());
// graph.currentPositionInLevel.clear();
}else if (e.character == 'C') {
- CallgraphView.getMode_collapsednodes().run();
+ callgraphView.getMode_collapsednodes().run();
} else if (e.character == 'N') {
- CallgraphView.getGoto_next().run();
+ callgraphView.getGoto_next().run();
} else if (e.character == 'P') {
- CallgraphView.getGoto_previous().run();
+ callgraphView.getGoto_previous().run();
} else if (e.character == 'L') {
- CallgraphView.getGoto_last().run();
+ callgraphView.getGoto_last().run();
+ } else if (e.character == 'D') {
+ callgraphView.getPlay().run();
}
}
+
};
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphMouseListener.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphMouseListener.java
index a7ecf346c6..66699b7ef8 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphMouseListener.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphMouseListener.java
@@ -12,6 +12,7 @@ package org.eclipse.linuxtools.callgraph.graphlisteners;
import java.util.List;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.linuxtools.callgraph.StapGraph;
import org.eclipse.linuxtools.callgraph.StapNode;
@@ -19,6 +20,7 @@ import org.eclipse.linuxtools.callgraph.core.FileFinderOpener;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;
+import org.eclipse.ui.progress.UIJob;
import org.eclipse.zest.core.widgets.GraphNode;
@SuppressWarnings("unused")
@@ -41,6 +43,7 @@ public class StapGraphMouseListener implements MouseListener {
public void mouseDoubleClick(MouseEvent e) {
if (e.stateMask == SWT.CONTROL) {
controlDoubleClick();
+ return;
}
@@ -56,6 +59,7 @@ public class StapGraphMouseListener implements MouseListener {
int id = node.getData().id;
graph.scale = 1;
+// graph.setCollapseMode(true);
// Redraw in the current mode with the new id as the center
// The x,y parameters to draw() are irrelevant for radial mode
graph.draw(id);
@@ -63,7 +67,7 @@ public class StapGraphMouseListener implements MouseListener {
// Unhighlight the center node and give it a normal colour
node = graph.getNode(id);
node.unhighlight();
- if (graph.getData(id).isMarked())
+ if (graph.getNodeData(id).isMarked())
node.setBackgroundColor(StapGraph.CONSTANT_MARKED);
else
node.setBackgroundColor(graph.DEFAULT_NODE_COLOR);
@@ -76,8 +80,7 @@ public class StapGraphMouseListener implements MouseListener {
unhighlightall(node);
graph.setSelection(null);
- graph.getTreeViewer().expandToLevel(node.getData(), 0);
- graph.getTreeViewer().setSelection(new StructuredSelection(node.getData()));
+
// Draw in current modes with 'id' at the top
int id = node.getData().id;
graph.draw(id);
@@ -89,6 +92,9 @@ public class StapGraphMouseListener implements MouseListener {
@Override
public void mouseDown(MouseEvent e) {
+ if (graph.getProjectionist() != null) {
+ graph.getProjectionist().pause();
+ }
// MP.println("You clicked: " + e.x + ", " + e.y); //$NON-NLS-1$ //$NON-NLS-2$
// MP.println("Convert to control: " + graph.toControl(e.x, e.y).x + ", " //$NON-NLS-1$ //$NON-NLS-2$
// + graph.toControl(e.x, e.y).y);
@@ -109,9 +115,13 @@ public class StapGraphMouseListener implements MouseListener {
List<Integer> callees = null;
if (graph.isCollapseMode())
- callees = graph.getData(id).collapsedCallees;
+ callees = graph.getNodeData(id).collapsedChildren;
else
- callees = graph.getData(id).callees;
+ callees = graph.getNodeData(id).children;
+
+ if (callees == null)
+ return;
+
for (int subID : callees) {
if (graph.getNode(subID) != null)
graph.getNode(subID).unhighlight();
@@ -160,34 +170,34 @@ public class StapGraphMouseListener implements MouseListener {
return node;
}
- public String controlDoubleClick() {
- String output = null;
+ public void controlDoubleClick() {
if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_AGGREGATE) {
GraphNode node = getAggregateNodeFromSelection();
if (node == null)
- return null;
+ return;
String functionName = (String) node.getData("AGGREGATE_NAME"); //$NON-NLS-1$
- output= FileFinderOpener.findAndOpen(graph.getProject(), functionName);
+ FileFinderOpener.findAndOpen(graph.getProject(), functionName);
+ node.unhighlight();
} else {
StapNode node = getNodeFromSelection();
if (node == null)
- return null;
+ return;
- int caller = node.getData().caller;
+ int caller = node.getData().id;
if (caller < graph.getFirstUsefulNode()) {
// The only node that satisfies this condition should be
// main
caller = graph.getFirstUsefulNode();
}
- output = FileFinderOpener.findAndOpen(graph.getProject(), graph.getData(caller).name);
+ FileFinderOpener.findAndOpen(graph.getProject(), graph.getNodeData(caller).name);
+ node.unhighlight();
}
graph.setSelection(null);
- return output;
}
public void mouseDownEvent(int x, int y) {
@@ -232,7 +242,7 @@ public class StapGraphMouseListener implements MouseListener {
// ------------Highlighting
if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_TREE
- || graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_BOX) {
+ || graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_LEVEL) {
for (StapNode n : (List<StapNode>) graph.getNodes()) {
unhighlightall(n);
}
@@ -240,9 +250,9 @@ public class StapGraphMouseListener implements MouseListener {
List<Integer> callees = null;
if (graph.isCollapseMode())
- callees = graph.getData(id).collapsedCallees;
+ callees = graph.getNodeData(id).collapsedChildren;
else
- callees = graph.getData(id).callees;
+ callees = graph.getNodeData(id).children;
for (int subID : callees) {
if (graph.getNode(subID) != null)
@@ -272,7 +282,7 @@ public class StapGraphMouseListener implements MouseListener {
// unhighlightall(n);
// }
// }
-
+//
// graph.setSelection(null);
}
};
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphMouseWheelListener.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphMouseWheelListener.java
index a330913999..13c94670ea 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphMouseWheelListener.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/graphlisteners/StapGraphMouseWheelListener.java
@@ -45,7 +45,7 @@ public class StapGraphMouseWheelListener implements MouseWheelListener {
return;
}
- if (graph.getDrawMode() != StapGraph.CONSTANT_DRAWMODE_BOX &&
+ if (graph.getDrawMode() != StapGraph.CONSTANT_DRAWMODE_LEVEL &&
graph.getDrawMode() != StapGraph.CONSTANT_DRAWMODE_TREE)
return;
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/messages.properties b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/messages.properties
index f3ad1950bd..9ce8804291 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/messages.properties
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/messages.properties
@@ -8,47 +8,50 @@
# Contributors:
# Red Hat - initial API and implementation
###############################################################################
-StapGraph.0=Start of Program
-StapGraph.1=number of calls :
-StapGraph.2=function :
-StapGraph.3=time :
-StapGraphParser.12=Encountered return without matching call for function
-StapGraphParser.13=No start time could be found for function
-StapGraphParser.14=Unexpected symbol when parsing: '
-StapGraphParser.15=' encountered, while expecting < or >.
-StapGraphParser.16=:::Program terminated here
-StapGraphParser.19=\n:::SystemTap detected functions that appeared to be C directives.
-StapGraphParser.20=\n:::Program terminated in less than 50ms, SystemTap overhead may be significant.
-StapGraphParser.21=\n:::Total time for this run has been set to the total time taken by this node.
-StapGraphParser.22=Unexpected Number
-StapGraphParser.23=Unexpected symbol
-StapGraphParser.24=Unexpected symbol encountered while trying to
-StapGraphParser.25=process id/time values.
-StapGraphParser.26=Could not find data in target file. Ensure target file contains data and try again.
-StapGraphParser.5=GraphUIJob instance
+StapGraph.StartNode=Start of Program
+StapGraph.NumOfCalls=number of calls :
+StapGraph.Func=function :
+StapGraph.Time=time :
+StapGraphParser.17=digraph stapgraph {
+StapGraphParser.RetMismatch=Encountered return without matching call for function
+StapGraphParser.NoStartTime=No start time could be found for function
+StapGraphParser.Term=:::Program terminated here
+StapGraphParser.CDirectives=\n:::SystemTap detected functions that appeared to be C directives.
+StapGraphParser.TooFast=\n:::Program terminated in less than 50ms, SystemTap overhead may be significant.
+StapGraphParser.TimeForThisNode=\n:::Total time for this run has been set to the total time taken by this node.
+StapGraphParser.BadSymbol=Unexpected Symbol
+StapGraphParser.BadSymbolMsg1=Unexpected symbol encountered while trying to
+StapGraphParser.BadSymbolMsg2=process id/time values.
+StapGraphParser.ActualTime=\nActual time:
+StapGraphParser.CouldNotOpen=Could not open file
+StapGraphParser.FileNotFound=File not found
+StapGraphParser.idOrLabel=dot-file-id-or-label
+StapGraphParser.idOrTime=dot-file-id-or-time
+StapGraphParser.nonNumericLabel=Non-numeric symbol while parsing id or label for .dot file
+StapGraphParser.nonNumericTime=Non-numeric symbol while parsing id or time for .dot file
+StapGraphParser.TimeUnits=ms
+StapGraphParser.UnknownMarkers=\ -- User-space may have been paged out before stap could find it. Please try again.
StapNode.0=unnamed
-CallgraphView.0=File
-CallgraphView.1=View
-CallgraphView.11=Open Last Run
-CallgraphView.13=Version
-CallgraphView.15=SystemTap Error Log
-CallgraphView.16=Tree View
-CallgraphView.17=Radial View
-CallgraphView.18=Aggregate View
-CallgraphView.19=Box View
-CallgraphView.2=Animation
-CallgraphView.20=Slow
-CallgraphView.21=Error Log
-CallgraphView.22=Fast
-CallgraphView.24=Collapse mode (C)
-CallgraphView.25=PROBE_BEGIN\n
-CallgraphView.3=\n
-CallgraphView.4=About
-CallgraphView.5=Help
-CallgraphView.6=Markers
-CallgraphView.7=Open
-CallgraphView.8=Save
-CallgraphView.9=Go to
+CallgraphView.SaveViewAsDot=Save current view as .dot file
+CallgraphView.SaveAllUncollapsedAsDot=Save all uncollapsed as .dot file
+CallgraphView.SaveAllCollapsedAsDot=Save all collapsed as .dot file
+CallgraphView.SaveCollapsedAsASCII=Save collapsed as ASCII
+CallgraphView.SaveMenu=Save As
+CallgraphView.Play=Play (D)
+CallgraphView.ViewMenu=View
+CallgraphView.OpenLastRun=Open Last Run
+CallgraphView.TreeView=Tree View
+CallgraphView.RadialView=Radial View
+CallgraphView.AggregateView=Aggregate View
+CallgraphView.LevelView=Level View
+CallgraphView.AnimationMenu=Animation
+CallgraphView.AnimationSlow=Slow
+CallgraphView.AnimationFast=Fast
+CallgraphView.CollapsedMode=Collapse mode (C)
+CallgraphView.Pause=Pause (D)
+CallgraphView.Markers=Markers
+CallgraphView.Open=Open
+CallgraphView.GoTo=Go to
CallgraphView.BufferMessage1=Unfortunately the requested setting for level buffer
CallgraphView.BufferMessage2=could not be processed due to the maximum number of nodes.
CallgraphView.BufferMessage3=Setting levelBuffer to the maximum number of levels possible
@@ -57,26 +60,15 @@ CallgraphView.BufferMessage5=).
CallgraphView.BufferMessage6=If you really want to see more levels, increment max nodes.
CallgraphView.BufferMessage7=This may cause lag on some systems.
CallgraphView.BufferTooHigh=LevelBuffer too high
-CallgraphView.ClearLog=Clear log
-CallgraphView.DeleteLogsMessage=This will permanently clear the SystemTap Eclipse error
-CallgraphView.DeleteLogsMessage2=logs. Are you sure you want to continue?
-CallgraphView.DeleteLogsTitle=Delete logs?
-CallgraphView.ErrorMessageBody=Error log could not be read, most likely this is because
-CallgraphView.ErrorMessageBody2=\ the log file could not be found.
-CallgraphView.ErrorMessageName=ErrorLog reading error
-CallgraphView.ErrorMessageTitle=Error reading error log
-CallgraphView.Errors=Errors
-CallgraphView.FileExistsMessage=Overwrite existing file?
-CallgraphView.FileExistsTitle=File Already Exists
CallgraphView.Last=Last (L)
CallgraphView.MaxDepth=Max depth:
CallgraphView.MaxNodes=Max nodes:
CallgraphView.Next=Next (N)
CallgraphView.nextMarker=(n)ext
-CallgraphView.OpenLog=Open log
CallgraphView.Previous=Previous (P)
CallgraphView.previousMarker=(p)revious
CallgraphView.Reset=Reset (R)
CallgraphView.SetLimits=Set limits
CallgraphView.SetValues=Set values
-CallgraphView.SystemTapVersionBox=SystemTap Version
+CallgraphView.ThumbNailDown=More nodes below
+CallgraphView.ThumbNailUp=More nodes above
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeContentProvider.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeContentProvider.java
index 17b548c5e5..9eae8440c7 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeContentProvider.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeContentProvider.java
@@ -27,10 +27,10 @@ public class StapTreeContentProvider implements ITreeContentProvider{
List<StapData> EMPTY = new ArrayList<StapData>();
if (parentElement instanceof StapData) {
StapData parent = ((StapData) parentElement);
- List<Integer> childrenIDs = parent.collapsedCallees;
+ List<Integer> childrenIDs = parent.collapsedChildren;
for (int val : childrenIDs) {
- if (graph.getData(val) != null) {
- EMPTY.add(graph.getData(val));
+ if (graph.getNodeData(val) != null) {
+ EMPTY.add(graph.getNodeData(val));
}
}
}
@@ -40,7 +40,7 @@ public class StapTreeContentProvider implements ITreeContentProvider{
@Override
public Object getParent(Object element) {
if (element instanceof StapData) {
- return graph.getData(((StapData) element).collapsedCaller);
+ return graph.getNodeData(((StapData) element).collapsedParent);
}
return null;
}
@@ -49,7 +49,7 @@ public class StapTreeContentProvider implements ITreeContentProvider{
public boolean hasChildren(Object element) {
if (element instanceof StapData)
return element == null ? false :
- ((StapData) element).callees.size() > 0;
+ ((StapData) element).children.size() > 0;
return false;
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeDoubleClickListener.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeDoubleClickListener.java
index 05cdd24927..22518001ff 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeDoubleClickListener.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeDoubleClickListener.java
@@ -16,7 +16,6 @@ import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.linuxtools.callgraph.CallgraphView;
import org.eclipse.linuxtools.callgraph.StapData;
import org.eclipse.linuxtools.callgraph.StapGraph;
@@ -48,7 +47,6 @@ public class StapTreeDoubleClickListener implements IDoubleClickListener {
graph.getNode(data.id).unhighlight();
}
- CallgraphView.maximizeIfUnmaximized();
graph.setFocus();
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeLabelProvider.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeLabelProvider.java
index ee05d05f89..d22caac7a4 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeLabelProvider.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/callgraph/treeviewer/StapTreeLabelProvider.java
@@ -23,15 +23,15 @@ public class StapTreeLabelProvider implements ILabelProvider {
public Image getImage(Object element) {
Image im = null;
if ( ((StapData) element).isMarked())
- im = new Image(Display.getCurrent(), CallGraphConstants.PLUGIN_LOCATION + "/icons/public_co.gif"); //$NON-NLS-1$
+ im = new Image(Display.getCurrent(), CallGraphConstants.getPluginLocation() + "/icons/public_co.gif"); //$NON-NLS-1$
else
- im = new Image(Display.getCurrent(), CallGraphConstants.PLUGIN_LOCATION + "/icons/compare_method.gif"); //$NON-NLS-1$
+ im = new Image(Display.getCurrent(), CallGraphConstants.getPluginLocation() + "/icons/compare_method.gif"); //$NON-NLS-1$
return im;
}
@Override
public String getText(Object element) {
- return ((StapData) element).called + ": " + ((StapData) element).name; //$NON-NLS-1$
+ return ((StapData) element).timesCalled + ": " + ((StapData) element).name; //$NON-NLS-1$
}
@Override
diff --git a/systemtap/org.eclipse.linuxtools.systemtap-feature/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap-feature/ChangeLog
new file mode 100644
index 0000000000..28c7af2634
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap-feature/ChangeLog
@@ -0,0 +1,51 @@
+2010-05-18 Andrew Overholt <overholt@redhat.com>
+
+ * feature.properties: Fix provider name.
+
+2010-04-26 Andrew Overholt <overholt@redhat.com>
+
+ * feature.properties: Match consistent license text (bug #306627).
+ * license.html: New file. HTML version of SUA (bug #306627).
+ * build.properties: Include license.html.
+
+2010-04-14 Andrew Overholt <overholt@redhat.com>
+
+ * feature.xml: Add OS filter for Linux (won't work on other OSes).
+
+2010-04-12 Andrew Overholt <overholt@redhat.com>
+
+ * feature.properties: Match consistent license text (bug #306627).
+
+2010-02-08 Andrew Overholt <overholt@redhat.com>
+
+ * feature.properties: Capitalize feature name.
+
+2010-01-29 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * feature.xml: Add new dashboard plugins for SystemTap
+
+2009-08-06 Andrew Overholt <overholt@redhat.com>
+
+ * feature.properties: Remove trailing period.
+ Add copyright.
+ * feature.xml: Add copyright.
+
+2009-08-06 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * feature.properties: Change the description.
+ * feature.xml: Change the label.
+
+2009-08-06 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * feature.xml:renaming systemtap.ui to systemtap
+
+2009-08-05 Andrew Overholt <overholt@redhat.com>
+
+ * feature.xml: use feature.properties variables.
+ * feature.properties: Provider: Eclipse.org -> Eclipse
+
+2009-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * ChangeLog: Refactoring. Renaming all packages directories from *.systemtapgui.* to *.systemtap.ui.*
+ * .project:
+ * feature.xml: \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local-feature/build.properties b/systemtap/org.eclipse.linuxtools.systemtap-feature/build.properties
index 0c6ef87303..d96c3dc1b6 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.local-feature/build.properties
+++ b/systemtap/org.eclipse.linuxtools.systemtap-feature/build.properties
@@ -1,3 +1,5 @@
bin.includes = feature.xml,\
feature.properties,\
- epl-v10.html
+ epl-v10.html,\
+ license.html
+
diff --git a/systemtap/org.eclipse.linuxtools.systemtap-feature/feature.properties b/systemtap/org.eclipse.linuxtools.systemtap-feature/feature.properties
new file mode 100644
index 0000000000..264ffea1da
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap-feature/feature.properties
@@ -0,0 +1,141 @@
+#*******************************************************************************
+# Copyright (c) 2008 Red Hat, Inc.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+#********************************************************************************
+featureName=systemtapgui
+description=SystemTap IDE and Visualization Tools (Incubation)
+featureProvider=Eclipse Linux Tools
+copyright=\
+Copyright (c) 2009 IBM Corporation. All rights reserved.\n\
+\n\
+This program and the accompanying materials are made available under the terms\n\
+of the Eclipse Public License v1.0 which accompanies this distribution, and is\n\
+available at http://www.eclipse.org/legal/epl-v10.html\n
+licenseURL=license.html
+license=\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+ 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+ the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+ extending or updating the functionality of an Eclipse-based product.\n\
+ 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+ Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+ 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+ govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+ Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+ with the Specification. Such Installable Software Agreement must inform the user of the\n\
+ terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+ the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+ indication of agreement by the user, the provisioning Technology will complete installation\n\
+ of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
diff --git a/systemtap/org.eclipse.linuxtools.systemtap-feature/feature.xml b/systemtap/org.eclipse.linuxtools.systemtap-feature/feature.xml
new file mode 100644
index 0000000000..64513a22cc
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap-feature/feature.xml
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.linuxtools.systemtap"
+ label="%description"
+ version="0.3.0.qualifier"
+ provider-name="%provider"
+ os="linux">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <url>
+ <update label="Linux Tools Update Site" url="http://download.eclipse.org/technology/linuxtools/update"/>
+ </url>
+
+ <plugin
+ id="org.eclipse.linuxtools.systemtap.ui.consolelog"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.systemtap.ui.editor"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.systemtap.ui.graphingapi.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.systemtap.ui.logging"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.systemtap.ui.structures"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.systemtap.ui.graphing"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.systemtap.ui.systemtapgui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.systemtap.ui.ide"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.systemtap.ui.dashboardextension"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.systemtap.ui.graphicalrun"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap-feature/license.html b/systemtap/org.eclipse.linuxtools.systemtap-feature/license.html
new file mode 100644
index 0000000000..c184ca36a9
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap-feature/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 14, 2010</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+ repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ (&quot;Specification&quot;).</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
+ on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup-feature/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.backup-feature/ChangeLog
new file mode 100644
index 0000000000..539017cb05
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.backup-feature/ChangeLog
@@ -0,0 +1,52 @@
+2010-05-18 Andrew Overholt <overholt@redhat.com>
+
+ * feature.properties: Fix provider name.
+
+2010-04-26 Andrew Overholt <overholt@redhat.com>
+
+ * feature.properties: Match consistent license text (bug #306627).
+ * license.html: New file. HTML version of SUA (bug #306627).
+ * build.properties: Include license.html.
+
+2010-04-12 Andrew Overholt <overholt@redhat.com>
+
+ * feature.properties: Match consistent license text (bug #306627).
+
+2009-08-06 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * feature.xml:renaming to systemtap.backup
+
+2009-08-05 Andrew Overholt <overholt@redhat.com>
+
+ * feature.xml: Remove .feature from name.
+
+2009-07-08 Andrew Overholt <overholt@redhat.com>
+
+ * feature.xml: Temporarily revert change to included plugin.
+ * .project: Likewise.
+
+2009-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * .project:
+ * feature.xml:
+ * ChangeLog: Refactoring the code to systemtap.backup.ui*. This code
+ has been merged with org.eclipse.linuxtools.systemtap.ui.ide.editors.stp.*
+
+2009-05-19 Andrew Overholt <overholt@redhat.com>
+
+ * feature.properties: Change provider from Eclipse.org to Eclipse.
+
+2009-01-09 Phil Muldoon <pmuldoon@redhat.com>
+
+ * feature.xml: Add .qualifier to feature version.
+
+2009-01-06 Andrew Overholt <overholt@redhat.com>
+
+ * feature.xml: Add update site information. 1.0.0 -> 0.1.0.
+ * build.properties: Add feature.properties and epl-v10.html.
+
+2008-10-31 Andrew Overholt <overholt@redhat.com>
+
+ * epl-v10.html: New file.
+ * feature.properties: New file. Add more description feature.
+ * feature.xml: Use feature.properties for strings. \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup-feature/feature.properties b/systemtap/org.eclipse.linuxtools.systemtap.backup-feature/feature.properties
new file mode 100644
index 0000000000..48eb5e9bbf
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.backup-feature/feature.properties
@@ -0,0 +1,138 @@
+#*******************************************************************************
+# Copyright (c) 2008 Red Hat, Inc.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat, Inc. - initial API and implementation
+#********************************************************************************
+featureName=Systemtap script editor (Incubation)
+description=Plugins for maintaining and developing Systemtap scripts.
+provider=Eclipse Linux Tools
+copyright=Copyright 2008 Phillip Muldoon.
+licenseURL=license.html
+license=\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+ 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+ the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+ extending or updating the functionality of an Eclipse-based product.\n\
+ 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+ Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+ 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+ govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+ Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+ with the Specification. Such Installable Software Agreement must inform the user of the\n\
+ terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+ the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+ indication of agreement by the user, the provisioning Technology will complete installation\n\
+ of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup-feature/license.html b/systemtap/org.eclipse.linuxtools.systemtap.backup-feature/license.html
new file mode 100644
index 0000000000..c184ca36a9
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.backup-feature/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 14, 2010</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+ repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ (&quot;Specification&quot;).</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
+ on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/plugin.properties b/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/plugin.properties
new file mode 100644
index 0000000000..ecf34e8b40
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.backup.ui.editor/plugin.properties
@@ -0,0 +1,12 @@
+#################################################################################
+# Copyright (c) 2008 Red Hat, Inc.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat Incorporated - initial API and implementation
+#################################################################################
+bundleName=Systemtap Editor Plug-in (Incubation)
+provider=Eclipse Linux Tools \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local-feature/.project b/systemtap/org.eclipse.linuxtools.systemtap.local-feature/.project
deleted file mode 100644
index b3cfb4bf36..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.systemtap.local-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local-feature/epl-v10.html b/systemtap/org.eclipse.linuxtools.systemtap.local-feature/epl-v10.html
deleted file mode 100644
index 9321f4082e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">where such changes and/or additions to the Program
-originate from and are distributed by that particular Contributor. A
-Contribution 'originates' from a Contributor if it was added to the
-Program by such Contributor itself or anyone acting on such
-Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in
-conjunction with the Program under their own license agreement, and (ii)
-are not derivative works of the Program.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" mean patent claims licensable by a
-Contributor which are necessarily infringed by the use or sale of its
-Contribution alone or when combined with the Program.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to reproduce, prepare derivative works
-of, publicly display, publicly perform, distribute and sublicense the
-Contribution of such Contributor, if any, and such derivative works, in
-source code and object code form.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free patent license under Licensed Patents to make, use, sell,
-offer to sell, import and otherwise transfer the Contribution of such
-Contributor, if any, in source code and object code form. This patent
-license shall apply to the combination of the Contribution and the
-Program if, at the time the Contribution is added by the Contributor,
-such addition of the Contribution causes such combination to be covered
-by the Licensed Patents. The patent license shall not apply to any other
-combinations which include the Contribution. No hardware per se is
-licensed hereunder.</p>
-
-<p class="list">c) Recipient understands that although each Contributor
-grants the licenses to its Contributions set forth herein, no assurances
-are provided by any Contributor that the Program does not infringe the
-patent or other intellectual property rights of any other entity. Each
-Contributor disclaims any liability to Recipient for claims brought by
-any other entity based on infringement of intellectual property rights
-or otherwise. As a condition to exercising the rights and licenses
-granted hereunder, each Recipient hereby assumes sole responsibility to
-secure any other intellectual property rights needed, if any. For
-example, if a third party patent license is required to allow Recipient
-to distribute the Program, it is Recipient's responsibility to acquire
-that license before distributing the Program.</p>
-
-<p class="list">d) Each Contributor represents that to its knowledge it
-has sufficient copyright rights in its Contribution, if any, to grant
-the copyright license set forth in this Agreement.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">i) effectively disclaims on behalf of all Contributors
-all warranties and conditions, express and implied, including warranties
-or conditions of title and non-infringement, and implied warranties or
-conditions of merchantability and fitness for a particular purpose;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">iv) states that source code for the Program is available
-from such Contributor, and informs licensees how to obtain it in a
-reasonable manner on or through a medium customarily used for software
-exchange.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>Each Contributor must identify itself as the originator of its
-Contribution, if any, in a manner that reasonably allows subsequent
-Recipients to identify the originator of the Contribution.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>Commercial distributors of software may accept certain
-responsibilities with respect to end users, business partners and the
-like. While this license is intended to facilitate the commercial use of
-the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create
-potential liability for other Contributors. Therefore, if a Contributor
-includes the Program in a commercial product offering, such Contributor
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-arising from claims, lawsuits and other legal actions brought by a third
-party against the Indemnified Contributor to the extent caused by the
-acts or omissions of such Commercial Contributor in connection with its
-distribution of the Program in a commercial product offering. The
-obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In
-order to qualify, an Indemnified Contributor must: a) promptly notify
-the Commercial Contributor in writing of such claim, and b) allow the
-Commercial Contributor to control, and cooperate with the Commercial
-Contributor in, the defense and any related settlement negotiations. The
-Indemnified Contributor may participate in any such claim at its own
-expense.</p>
-
-<p>For example, a Contributor might include the Program in a commercial
-product offering, Product X. That Contributor is then a Commercial
-Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance
-claims and warranties are such Commercial Contributor's responsibility
-alone. Under this section, the Commercial Contributor would have to
-defend claims against the other Contributors related to those
-performance claims and warranties, and if a court requires any other
-Contributor to pay any damages as a result, the Commercial Contributor
-must pay those damages.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
-OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
-ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
-OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and
-distributing the Program and assumes all risks associated with its
-exercise of rights under this Agreement , including but not limited to
-the risks and costs of program errors, compliance with applicable laws,
-damage to or loss of data, programs or equipment, and unavailability or
-interruption of operations.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
-NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>If any provision of this Agreement is invalid or unenforceable under
-applicable law, it shall not affect the validity or enforceability of
-the remainder of the terms of this Agreement, and without further action
-by the parties hereto, such provision shall be reformed to the minimum
-extent necessary to make such provision valid and enforceable.</p>
-
-<p>If Recipient institutes patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging that the
-Program itself (excluding combinations of the Program with other
-software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the
-date such litigation is filed.</p>
-
-<p>All Recipient's rights under this Agreement shall terminate if it
-fails to comply with any of the material terms or conditions of this
-Agreement and does not cure such failure in a reasonable period of time
-after becoming aware of such noncompliance. If all Recipient's rights
-under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive.</p>
-
-<p>Everyone is permitted to copy and distribute copies of this
-Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The
-Agreement Steward reserves the right to publish new versions (including
-revisions) of this Agreement from time to time. No one other than the
-Agreement Steward has the right to modify this Agreement. The Eclipse
-Foundation is the initial Agreement Steward. The Eclipse Foundation may
-assign the responsibility to serve as the Agreement Steward to a
-suitable separate entity. Each new version of the Agreement will be
-given a distinguishing version number. The Program (including
-Contributions) may always be distributed subject to the version of the
-Agreement under which it was received. In addition, after a new version
-of the Agreement is published, Contributor may elect to distribute the
-Program (including its Contributions) under the new version. Except as
-expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
-rights or licenses to the intellectual property of any Contributor under
-this Agreement, whether expressly, by implication, estoppel or
-otherwise. All rights in the Program not expressly granted under this
-Agreement are reserved.</p>
-
-<p>This Agreement is governed by the laws of the State of New York and
-the intellectual property laws of the United States of America. No party
-to this Agreement will bring a legal action under this Agreement more
-than one year after the cause of action arose. Each party waives its
-rights to a jury trial in any resulting litigation.</p>
-
-</body></html> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local-feature/feature.properties b/systemtap/org.eclipse.linuxtools.systemtap.local-feature/feature.properties
deleted file mode 100644
index fc10012e06..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local-feature/feature.properties
+++ /dev/null
@@ -1,114 +0,0 @@
-#*******************************************************************************
-# Copyright (c) 2009 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Red Hat, Inc. - initial API and implementation
-#********************************************************************************
-featureName=SystemTap C/C++ Visualization Tool (Incubation)
-featureProvider=Eclipse
-description=Graphically displays the call hierarchy from executing a C/C++ binary, along with various other runtime statistics.
-copyright=Copyright (c) 2009 Red Hat, Inc.\n\
-All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local-feature/feature.xml b/systemtap/org.eclipse.linuxtools.systemtap.local-feature/feature.xml
deleted file mode 100644
index 90fcba52d8..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local-feature/feature.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.linuxtools.systemtap.local"
- label="%featureName"
- version="0.0.1.qualifier"
- provider-name="%featureProvider">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="http://www.eclipse.org/legal/epl-v10.html">
- %license
- </license>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.cdt.core"/>
- <import plugin="org.eclipse.cdt.debug.core"/>
- <import plugin="org.eclipse.cdt.launch"/>
- <import plugin="org.eclipse.cdt.ui"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.debug.core"/>
- <import plugin="org.eclipse.debug.ui"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.ui.console"/>
- <import plugin="org.eclipse.ui.editors"/>
- <import plugin="org.eclipse.draw2d"/>
- <import plugin="org.eclipse.zest.layouts"/>
- <import plugin="org.eclipse.zest.core"/>
- <import plugin="org.eclipse.core.filesystem"/>
- </requires>
-
- <plugin
- id="org.eclipse.linuxtools.profiling.launch"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.linuxtools.systemtap.local.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.linuxtools.systemtap.local.callgraph"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.linuxtools.systemtap.local.launch"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/.classpath b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/.classpath
deleted file mode 100644
index ad32c83a78..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/.project b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/.project
deleted file mode 100644
index 8bb007b39a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.systemtap.local.callgraph.tests</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.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/.settings/org.eclipse.jdt.core.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 5270881c3f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-#Mon Sep 21 12:34:05 EDT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index 939da5b7ae..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,18 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Tests
-Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.local.callgraph.tests; singleton:=true
-Bundle-Version: 0.0.1.qualifier
-Bundle-Activator: org.eclipse.linuxtools.systemtap.local.callgraph.tests.Activator
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.draw2d,
- org.eclipse.linuxtools.systemtap.local.callgraph;bundle-version="0.0.1",
- org.junit
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Import-Package: org.eclipse.cdt.core.model,
- org.eclipse.linuxtools.systemtap.local.core,
- org.eclipse.zest.core.widgets,
- org.eclipse.zest.layouts,
- org.eclipse.zest.layouts.algorithms
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/basic.graph b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/basic.graph
deleted file mode 100644
index f40f0cbc11..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/basic.graph
+++ /dev/null
@@ -1,6 +0,0 @@
-
-PROBE_BEGIN
-eag
-<main,,1,,1253642348832787256;<foo,,2,,1253642348832800639;>foo,,1253642348832807674;>main,,1253642348832811601;
-1253642348832817971
-30715 \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/catlan.graph b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/catlan.graph
deleted file mode 100644
index 3ab50c2871..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/catlan.graph
+++ /dev/null
@@ -1,6 +0,0 @@
-
-PROBE_BEGIN
-eag
-<main,,1,,1253642412717911933;<catlan,,2,,1253642412717925326;<catlan,,3,,1253642412717935566;<catlan,,4,,1253642412717944129;<catlan,,5,,1253642412717952833;<catlan,,6,,1253642412717961350;<catlan,,7,,1253642412717969909;>catlan,,1253642412717975575;<catlan,,8,,1253642412717982613;>catlan,,1253642412717988032;>catlan,,1253642412717991647;<catlan,,9,,1253642412717998252;>catlan,,1253642412718003749;<catlan,,10,,1253642412718010330;>catlan,,1253642412718015806;<catlan,,11,,1253642412718022399;<catlan,,12,,1253642412718030940;>catlan,,1253642412718036387;<catlan,,13,,1253642412718042961;>catlan,,1253642412718048489;>catlan,,1253642412718051966;>catlan,,1253642412718055421;<catlan,,14,,1253642412718061905;>catlan,,1253642412718067343;<catlan,,15,,1253642412718073881;<catlan,,16,,1253642412718082492;>catlan,,1253642412718087950;<catlan,,17,,1253642412718094603;>catlan,,1253642412718109066;>catlan,,1253642412718113093;<catlan,,18,,1253642412718119950;<catlan,,19,,1253642412718128522;>catlan,,1253642412718133938;<catlan,,20,,1253642412718140537;>catlan,,1253642412718145992;>catlan,,1253642412718149511;<catlan,,21,,1253642412718156100;>catlan,,1253642412718161475;<catlan,,22,,1253642412718168106;<catlan,,23,,1253642412718176633;<catlan,,24,,1253642412718185165;>catlan,,1253642412718190648;<catlan,,25,,1253642412718197291;>catlan,,1253642412718202828;>catlan,,1253642412718206326;<catlan,,26,,1253642412718212993;>catlan,,1253642412718218350;<catlan,,27,,1253642412718224942;>catlan,,1253642412718230292;<catlan,,28,,1253642412718236849;<catlan,,29,,1253642412718245432;>catlan,,1253642412718250903;<catlan,,30,,1253642412718257537;>catlan,,1253642412718262975;>catlan,,1253642412718266930;>catlan,,1253642412718287059;>catlan,,1253642412718290848;<catlan,,31,,1253642412718298051;>catlan,,1253642412718303690;<catlan,,32,,1253642412718310301;<catlan,,33,,1253642412718318860;<catlan,,34,,1253642412718327347;>catlan,,1253642412718332905;<catlan,,35,,1253642412718339525;>catlan,,1253642412718345019;>catlan,,1253642412718348511;<catlan,,36,,1253642412718355149;>catlan,,1253642412718360592;<catlan,,37,,1253642412718367227;>catlan,,1253642412718372682;<catlan,,38,,1253642412718379287;<catlan,,39,,1253642412718387804;>catlan,,1253642412718393293;<catlan,,40,,1253642412718399904;>catlan,,1253642412718405458;>catlan,,1253642412718408944;>catlan,,1253642412718412469;<catlan,,41,,1253642412718419058;<catlan,,42,,1253642412718427597;>catlan,,1253642412718433109;<catlan,,43,,1253642412718439666;>catlan,,1253642412718445127;>catlan,,1253642412718448679;<catlan,,44,,1253642412718455389;<catlan,,45,,1253642412718463888;>catlan,,1253642412718469419;<catlan,,46,,1253642412718475981;>catlan,,1253642412718481416;>catlan,,1253642412718484974;<catlan,,47,,1253642412718491578;<catlan,,48,,1253642412718500098;<catlan,,49,,1253642412718508607;>catlan,,1253642412718514038;<catlan,,50,,1253642412718520679;>catlan,,1253642412718526134;>catlan,,1253642412718529647;<catlan,,51,,1253642412718536221;>catlan,,1253642412718541734;<catlan,,52,,1253642412718548381;>catlan,,1253642412718553824;<catlan,,53,,1253642412718560435;<catlan,,54,,1253642412718568940;>catlan,,1253642412718574314;<catlan,,55,,1253642412718581036;>catlan,,1253642412718586507;>catlan,,1253642412718590044;>catlan,,1253642412718593511;<catlan,,56,,1253642412718600083;>catlan,,1253642412718605544;<catlan,,57,,1253642412718612194;<catlan,,58,,1253642412718620750;<catlan,,59,,1253642412718629316;<catlan,,60,,1253642412718637809;>catlan,,1253642412718643345;<catlan,,61,,1253642412718649980;>catlan,,1253642412718655511;>catlan,,1253642412718659003;<catlan,,62,,1253642412718665508;>catlan,,1253642412718671069;<catlan,,63,,1253642412718677589;>catlan,,1253642412718683126;<catlan,,64,,1253642412718689784;<catlan,,65,,1253642412718698362;>catlan,,1253642412718703832;<catlan,,66,,1253642412718710404;>catlan,,1253642412718715817;>catlan,,1253642412718719339;>catlan,,1253642412718722741;<catlan,,67,,1253642412718729369;>catlan,,1253642412718734816;<catlan,,68,,1253642412718741456;<catlan,,69,,1253642412718749967;>catlan,,1253642412718755555;<catlan,,70,,1253642412718762175;>catlan,,1253642412718767826;>catlan,,1253642412718771330;<catlan,,71,,1253642412718777868;<catlan,,72,,1253642412718786352;>catlan,,1253642412718791793;<catlan,,73,,1253642412718798445;>catlan,,1253642412718803892;>catlan,,1253642412718807330;<catlan,,74,,1253642412718813943;>catlan,,1253642412718819501;<catlan,,75,,1253642412718826063;<catlan,,76,,1253642412718834653;<catlan,,77,,1253642412718843149;>catlan,,1253642412718848559;<catlan,,78,,1253642412718855095;>catlan,,1253642412718860592;>catlan,,1253642412718864042;<catlan,,79,,1253642412718870682;>catlan,,1253642412718876063;<catlan,,80,,1253642412718882646;>catlan,,1253642412718888051;<catlan,,81,,1253642412718894634;<catlan,,82,,1253642412718903176;>catlan,,1253642412718908574;<catlan,,83,,1253642412718915167;>catlan,,1253642412718920601;>catlan,,1253642412718924045;>catlan,,1253642412718927600;>catlan,,1253642412718931022;>catlan,,1253642412718934475;<catlan,,84,,1253642412718941040;>catlan,,1253642412718946556;<catlan,,85,,1253642412718953079;<catlan,,86,,1253642412718961683;<catlan,,87,,1253642412718970074;<catlan,,88,,1253642412718978589;>catlan,,1253642412718984071;<catlan,,89,,1253642412718990739;>catlan,,1253642412718996153;>catlan,,1253642412718999602;<catlan,,90,,1253642412719006149;>catlan,,1253642412719011719;<catlan,,91,,1253642412719018390;>catlan,,1253642412719023836;<catlan,,92,,1253642412719030405;<catlan,,93,,1253642412719038922;>catlan,,1253642412719044378;<catlan,,94,,1253642412719051000;>catlan,,1253642412719056612;>catlan,,1253642412719060071;>catlan,,1253642412719063551;<catlan,,95,,1253642412719070140;>catlan,,1253642412719075650;<catlan,,96,,1253642412719082305;<catlan,,97,,1253642412719090669;>catlan,,1253642412719096167;<catlan,,98,,1253642412719107443;>catlan,,1253642412719113365;>catlan,,1253642412719116976;<catlan,,99,,1253642412719123605;<catlan,,100,,1253642412719132212;>catlan,,1253642412719137674;<catlan,,101,,1253642412719144456;>catlan,,1253642412719149966;>catlan,,1253642412719153545;<catlan,,102,,1253642412719160068;>catlan,,1253642412719165545;<catlan,,103,,1253642412719172152;<catlan,,104,,1253642412719180660;<catlan,,105,,1253642412719189196;>catlan,,1253642412719194603;<catlan,,106,,1253642412719201174;>catlan,,1253642412719206642;>catlan,,1253642412719210077;<catlan,,107,,1253642412719216624;>catlan,,1253642412719222070;<catlan,,108,,1253642412719229998;>catlan,,1253642412719235622;<catlan,,109,,1253642412719242230;<catlan,,110,,1253642412719250876;>catlan,,1253642412719256374;<catlan,,111,,1253642412719262918;>catlan,,1253642412719268314;>catlan,,1253642412719271754;>catlan,,1253642412719275171;>catlan,,1253642412719278587;<catlan,,112,,1253642412719285129;<catlan,,113,,1253642412719293787;>catlan,,1253642412719299219;<catlan,,114,,1253642412719305700;>catlan,,1253642412719311068;>catlan,,1253642412719314599;<catlan,,115,,1253642412719321141;<catlan,,116,,1253642412719329844;<catlan,,117,,1253642412719338338;>catlan,,1253642412719343826;<catlan,,118,,1253642412719350398;>catlan,,1253642412719355976;>catlan,,1253642412719359426;<catlan,,119,,1253642412719366003;>catlan,,1253642412719371453;<catlan,,120,,1253642412719378064;>catlan,,1253642412719383444;<catlan,,121,,1253642412719390051;<catlan,,122,,1253642412719398593;>catlan,,1253642412719404078;<catlan,,123,,1253642412719410662;>catlan,,1253642412719416193;>catlan,,1253642412719419633;>catlan,,1253642412719423116;<catlan,,124,,1253642412719429750;<catlan,,125,,1253642412719438361;<catlan,,126,,1253642412719446791;>catlan,,1253642412719452222;<catlan,,127,,1253642412719458749;>catlan,,1253642412719464202;>catlan,,1253642412719467690;<catlan,,128,,1253642412719474195;>catlan,,1253642412719479693;<catlan,,129,,1253642412719486283;>catlan,,1253642412719491693;<catlan,,130,,1253642412719498313;<catlan,,131,,1253642412719506860;>catlan,,1253642412719512348;<catlan,,132,,1253642412719518941;>catlan,,1253642412719524454;>catlan,,1253642412719527882;>catlan,,1253642412719531371;<catlan,,133,,1253642412719537876;<catlan,,134,,1253642412719546556;>catlan,,1253642412719552035;<catlan,,135,,1253642412719558736;>catlan,,1253642412719564180;>catlan,,1253642412719567692;<catlan,,136,,1253642412719574174;<catlan,,137,,1253642412719582793;<catlan,,138,,1253642412719591307;<catlan,,139,,1253642412719599792;>catlan,,1253642412719605226;<catlan,,140,,1253642412719611912;>catlan,,1253642412719617394;>catlan,,1253642412719620943;<catlan,,141,,1253642412719627500;>catlan,,1253642412719633045;<catlan,,142,,1253642412719639668;>catlan,,1253642412719645151;<catlan,,143,,1253642412719651764;<catlan,,144,,1253642412719660303;>catlan,,1253642412719665713;<catlan,,145,,1253642412719672290;>catlan,,1253642412719677752;>catlan,,1253642412719681223;>catlan,,1253642412719684651;<catlan,,146,,1253642412719691172;>catlan,,1253642412719696678;<catlan,,147,,1253642412719703400;<catlan,,148,,1253642412719712074;>catlan,,1253642412719717568;<catlan,,149,,1253642412719724134;>catlan,,1253642412719729550;>catlan,,1253642412719733069;<catlan,,150,,1253642412719739565;<catlan,,151,,1253642412719748290;>catlan,,1253642412719753704;<catlan,,152,,1253642412719760311;>catlan,,1253642412719765746;>catlan,,1253642412719769267;<catlan,,153,,1253642412719775791;>catlan,,1253642412719781361;<catlan,,154,,1253642412719787950;<catlan,,155,,1253642412719796633;<catlan,,156,,1253642412719805177;>catlan,,1253642412719810705;<catlan,,157,,1253642412719817372;>catlan,,1253642412719822915;>catlan,,1253642412719826431;<catlan,,158,,1253642412719833122;>catlan,,1253642412719838653;<catlan,,159,,1253642412719845348;>catlan,,1253642412719850879;<catlan,,160,,1253642412719857516;<catlan,,161,,1253642412719866058;>catlan,,1253642412719871574;<catlan,,162,,1253642412719878172;>catlan,,1253642412719883748;>catlan,,1253642412719887237;>catlan,,1253642412719890716;>catlan,,1253642412719894175;<catlan,,163,,1253642412719900906;>catlan,,1253642412719906427;<catlan,,164,,1253642412719913125;<catlan,,165,,1253642412719921672;<catlan,,166,,1253642412719930253;<catlan,,167,,1253642412719938704;<catlan,,168,,1253642412719947236;>catlan,,1253642412719952683;<catlan,,169,,1253642412719959326;>catlan,,1253642412719964749;>catlan,,1253642412719968237;<catlan,,170,,1253642412719974830;>catlan,,1253642412719980445;<catlan,,171,,1253642412719987034;>catlan,,1253642412719992499;<catlan,,172,,1253642412719999070;<catlan,,173,,1253642412720007633;>catlan,,1253642412720013070;<catlan,,174,,1253642412720019756;>catlan,,1253642412720025248;>catlan,,1253642412720028691;>catlan,,1253642412720032105;<catlan,,175,,1253642412720038793;>catlan,,1253642412720044234;<catlan,,176,,1253642412720050790;<catlan,,177,,1253642412720059287;>catlan,,1253642412720064884;<catlan,,178,,1253642412720071476;>catlan,,1253642412720076956;>catlan,,1253642412720080390;<catlan,,179,,1253642412720086889;<catlan,,180,,1253642412720095304;>catlan,,1253642412720100745;<catlan,,181,,1253642412720124363;>catlan,,1253642412720129875;>catlan,,1253642412720133316;<catlan,,182,,1253642412720139818;>catlan,,1253642412720145238;<catlan,,183,,1253642412720151752;<catlan,,184,,1253642412720160314;<catlan,,185,,1253642412720168798;>catlan,,1253642412720174350;<catlan,,186,,1253642412720180862;>catlan,,1253642412720186416;>catlan,,1253642412720189926;<catlan,,187,,1253642412720196609;>catlan,,1253642412720201995;<catlan,,188,,1253642412720208479;>catlan,,1253642412720213872;<catlan,,189,,1253642412720220431;<catlan,,190,,1253642412720230055;>catlan,,1253642412720235697;<catlan,,191,,1253642412720242365;>catlan,,1253642412720247842;>catlan,,1253642412720251324;>catlan,,1253642412720254885;>catlan,,1253642412720258317;<catlan,,192,,1253642412720265014;>catlan,,1253642412720270539;<catlan,,193,,1253642412720277123;<catlan,,194,,1253642412720285634;<catlan,,195,,1253642412720294148;>catlan,,1253642412720299534;<catlan,,196,,1253642412720306268;>catlan,,1253642412720311679;>catlan,,1253642412720315213;<catlan,,197,,1253642412720321742;>catlan,,1253642412720327291;<catlan,,198,,1253642412720333793;>catlan,,1253642412720339261;<catlan,,199,,1253642412720345799;<catlan,,200,,1253642412720354433;>catlan,,1253642412720359916;<catlan,,201,,1253642412720366479;>catlan,,1253642412720371886;>catlan,,1253642412720375387;>catlan,,1253642412720378788;<catlan,,202,,1253642412720385305;<catlan,,203,,1253642412720393892;>catlan,,1253642412720399438;<catlan,,204,,1253642412720406012;>catlan,,1253642412720411597;>catlan,,1253642412720415077;<catlan,,205,,1253642412720421657;<catlan,,206,,1253642412720430147;>catlan,,1253642412720435666;<catlan,,207,,1253642412720442204;>catlan,,1253642412720447687;>catlan,,1253642412720451137;<catlan,,208,,1253642412720457687;<catlan,,209,,1253642412720466279;<catlan,,210,,1253642412720474791;>catlan,,1253642412720480291;<catlan,,211,,1253642412720486875;>catlan,,1253642412720492348;>catlan,,1253642412720495798;<catlan,,212,,1253642412720502345;>catlan,,1253642412720507768;<catlan,,213,,1253642412720514436;>catlan,,1253642412720519966;<catlan,,214,,1253642412720526622;<catlan,,215,,1253642412720535175;>catlan,,1253642412720540571;<catlan,,216,,1253642412720547166;>catlan,,1253642412720552700;>catlan,,1253642412720556126;>catlan,,1253642412720559677;<catlan,,217,,1253642412720566231;>catlan,,1253642412720571797;<catlan,,218,,1253642412720578435;<catlan,,219,,1253642412720586901;<catlan,,220,,1253642412720595391;<catlan,,221,,1253642412720603903;>catlan,,1253642412720609352;<catlan,,222,,1253642412720615936;>catlan,,1253642412720621331;>catlan,,1253642412720624835;<catlan,,223,,1253642412720631397;>catlan,,1253642412720636802;<catlan,,224,,1253642412720643358;>catlan,,1253642412720648847;<catlan,,225,,1253642412720655358;<catlan,,226,,1253642412720663923;>catlan,,1253642412720669304;<catlan,,227,,1253642412720675980;>catlan,,1253642412720681457;>catlan,,1253642412720684982;>catlan,,1253642412720688452;<catlan,,228,,1253642412720695093;>catlan,,1253642412720700588;<catlan,,229,,1253642412720707267;<catlan,,230,,1253642412720715830;>catlan,,1253642412720721246;<catlan,,231,,1253642412720727845;>catlan,,1253642412720733418;>catlan,,1253642412720736861;<catlan,,232,,1253642412720743439;<catlan,,233,,1253642412720751929;>catlan,,1253642412720757390;<catlan,,234,,1253642412720763989;>catlan,,1253642412720769468;>catlan,,1253642412720772978;<catlan,,235,,1253642412720779592;>catlan,,1253642412720785083;<catlan,,236,,1253642412720791742;<catlan,,237,,1253642412720800196;<catlan,,238,,1253642412720808659;>catlan,,1253642412720814094;<catlan,,239,,1253642412720820644;>catlan,,1253642412720826124;>catlan,,1253642412720829739;<catlan,,240,,1253642412720836316;>catlan,,1253642412720841919;<catlan,,241,,1253642412720848530;>catlan,,1253642412720854006;<catlan,,242,,1253642412720860590;<catlan,,243,,1253642412720869197;>catlan,,1253642412720874593;<catlan,,244,,1253642412720881260;>catlan,,1253642412720886740;>catlan,,1253642412720890229;>catlan,,1253642412720893621;>catlan,,1253642412720896996;>catlan,,1253642412720900511;>catlan,,1253642412720903898;>main,,1253642412722440674;
-1253642412722448040
-4536107 \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/eag.graph b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/eag.graph
deleted file mode 100644
index 49135620bb..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/eag.graph
+++ /dev/null
@@ -1,6 +0,0 @@
-
-PROBE_BEGIN
-eag
-<main,,1,,1253642440673012134;<callThisOnce,,2,,1253642440673025906;>callThisOnce,,1253642440673033205;<callThisTwice,,3,,1253642440673041635;>callThisTwice,,1253642440673048612;<callThisTwice,,4,,1253642440673055457;>callThisTwice,,1253642440673060982;<callThisThirtyTimes,,5,,1253642440673069187;>callThisThirtyTimes,,1253642440673076110;<callThisThirtyTimes,,6,,1253642440673082940;>callThisThirtyTimes,,1253642440673088573;<callThisThirtyTimes,,7,,1253642440673095259;>callThisThirtyTimes,,1253642440673100820;<callThisThirtyTimes,,8,,1253642440673109301;>callThisThirtyTimes,,1253642440673114862;<callThisThirtyTimes,,9,,1253642440673121508;>callThisThirtyTimes,,1253642440673127051;<callThisThirtyTimes,,10,,1253642440673133797;>callThisThirtyTimes,,1253642440673139286;<callThisThirtyTimes,,11,,1253642440673146079;>callThisThirtyTimes,,1253642440673151713;<callThisThirtyTimes,,12,,1253642440673158392;>callThisThirtyTimes,,1253642440673163947;<callThisThirtyTimes,,13,,1253642440673170594;>callThisThirtyTimes,,1253642440673176013;<callThisThirtyTimes,,14,,1253642440673182789;>callThisThirtyTimes,,1253642440673188353;<callThisThirtyTimes,,15,,1253642440673194981;>callThisThirtyTimes,,1253642440673200593;<callThisThirtyTimes,,16,,1253642440673207387;>callThisThirtyTimes,,1253642440673212960;<callThisThirtyTimes,,17,,1253642440673219739;>callThisThirtyTimes,,1253642440673246186;<callThisThirtyTimes,,18,,1253642440673254258;>callThisThirtyTimes,,1253642440673259981;<callThisThirtyTimes,,19,,1253642440673266718;>callThisThirtyTimes,,1253642440673272231;<callThisThirtyTimes,,20,,1253642440673278916;>callThisThirtyTimes,,1253642440673284549;<callThisThirtyTimes,,21,,1253642440673291358;>callThisThirtyTimes,,1253642440673296919;<callThisThirtyTimes,,22,,1253642440673303641;>callThisThirtyTimes,,1253642440673309184;<callThisThirtyTimes,,23,,1253642440673315873;>callThisThirtyTimes,,1253642440673321340;<callThisThirtyTimes,,24,,1253642440673328065;>callThisThirtyTimes,,1253642440673333641;<callThisThirtyTimes,,25,,1253642440673340308;>callThisThirtyTimes,,1253642440673345815;<callThisThirtyTimes,,26,,1253642440673352624;>callThisThirtyTimes,,1253642440673358062;<callThisThirtyTimes,,27,,1253642440673364817;>callThisThirtyTimes,,1253642440673370393;<callThisThirtyTimes,,28,,1253642440673377102;>callThisThirtyTimes,,1253642440673382648;<callThisThirtyTimes,,29,,1253642440673389511;>callThisThirtyTimes,,1253642440673395060;<callThisThirtyTimes,,30,,1253642440673401806;>callThisThirtyTimes,,1253642440673407373;<callThisThirtyTimes,,31,,1253642440673414056;>callThisThirtyTimes,,1253642440673419634;<callThisThirtyTimes,,32,,1253642440673426449;>callThisThirtyTimes,,1253642440673431938;<callThisThirtyTimes,,33,,1253642440673438699;>callThisThirtyTimes,,1253642440673444230;<callThisThirtyTimes,,34,,1253642440673450964;>callThisThirtyTimes,,1253642440673456413;<hasOneChild,,35,,1253642440673464843;<callThisOnce,,36,,1253642440673504942;>callThisOnce,,1253642440673510584;>hasOneChild,,1253642440673514133;<hasTwoDifferentChildren,,37,,1253642440673522199;<hasOneChild,,38,,1253642440673563062;<callThisOnce,,39,,1253642440673602797;>callThisOnce,,1253642440673608244;>hasOneChild,,1253642440673611781;<callThisOnce,,40,,1253642440673618364;>callThisOnce,,1253642440673623856;>hasTwoDifferentChildren,,1253642440673627483;<chainOfFifty,,41,,1253642440673635645;<chainOfFifty,,42,,1253642440673645666;<chainOfFifty,,43,,1253642440673654285;<chainOfFifty,,44,,1253642440673662872;<chainOfFifty,,45,,1253642440673671488;<chainOfFifty,,46,,1253642440673680138;<chainOfFifty,,47,,1253642440673688854;<chainOfFifty,,48,,1253642440673697473;<chainOfFifty,,49,,1253642440673706144;<chainOfFifty,,50,,1253642440673714688;<chainOfFifty,,51,,1253642440673723281;<chainOfFifty,,52,,1253642440673731921;<chainOfFifty,,53,,1253642440673740883;<chainOfFifty,,54,,1253642440673749723;<chainOfFifty,,55,,1253642440673758505;<chainOfFifty,,56,,1253642440673767100;<chainOfFifty,,57,,1253642440673775810;<chainOfFifty,,58,,1253642440673784474;<chainOfFifty,,59,,1253642440673792997;<chainOfFifty,,60,,1253642440673801761;<chainOfFifty,,61,,1253642440673810321;<chainOfFifty,,62,,1253642440673818889;<chainOfFifty,,63,,1253642440673827491;<chainOfFifty,,64,,1253642440673835924;<chainOfFifty,,65,,1253642440673844609;<chainOfFifty,,66,,1253642440673853157;<chainOfFifty,,67,,1253642440673861899;<chainOfFifty,,68,,1253642440673870645;<chainOfFifty,,69,,1253642440673879168;<chainOfFifty,,70,,1253642440673887845;<chainOfFifty,,71,,1253642440673896284;<chainOfFifty,,72,,1253642440673904961;<chainOfFifty,,73,,1253642440673913463;<chainOfFifty,,74,,1253642440673921935;<chainOfFifty,,75,,1253642440673930404;<chainOfFifty,,76,,1253642440673938945;<chainOfFifty,,77,,1253642440673947553;<chainOfFifty,,78,,1253642440673956145;<chainOfFifty,,79,,1253642440673964768;<chainOfFifty,,80,,1253642440673973312;<chainOfFifty,,81,,1253642440673981929;<chainOfFifty,,82,,1253642440673990711;<chainOfFifty,,83,,1253642440673999390;<chainOfFifty,,84,,1253642440674007856;<chainOfFifty,,85,,1253642440674016398;<chainOfFifty,,86,,1253642440674024945;<chainOfFifty,,87,,1253642440674033495;<chainOfFifty,,88,,1253642440674042415;<chainOfFifty,,89,,1253642440674051125;<chainOfFifty,,90,,1253642440674059757;<chainOfFifty,,91,,1253642440674068271;>chainOfFifty,,1253642440674074072;>chainOfFifty,,1253642440674077874;>chainOfFifty,,1253642440674081537;>chainOfFifty,,1253642440674085200;>chainOfFifty,,1253642440674088927;>chainOfFifty,,1253642440674092605;>chainOfFifty,,1253642440674096250;>chainOfFifty,,1253642440674099889;>chainOfFifty,,1253642440674103736;>chainOfFifty,,1253642440674107405;>chainOfFifty,,1253642440674111095;>chainOfFifty,,1253642440674114695;>chainOfFifty,,1253642440674118283;>chainOfFifty,,1253642440674121910;>chainOfFifty,,1253642440674125618;>chainOfFifty,,1253642440674129215;>chainOfFifty,,1253642440674132806;>chainOfFifty,,1253642440674136439;>chainOfFifty,,1253642440674140117;>chainOfFifty,,1253642440674143846;>chainOfFifty,,1253642440674147425;>chainOfFifty,,1253642440674151098;>chainOfFifty,,1253642440674154824;>chainOfFifty,,1253642440674158454;>chainOfFifty,,1253642440674162078;>chainOfFifty,,1253642440674165678;>chainOfFifty,,1253642440674169305;>chainOfFifty,,1253642440674172890;>chainOfFifty,,1253642440674176484;>chainOfFifty,,1253642440674180159;>chainOfFifty,,1253642440674183924;>chainOfFifty,,1253642440674187557;>chainOfFifty,,1253642440674191239;>chainOfFifty,,1253642440674194842;>chainOfFifty,,1253642440674198559;>chainOfFifty,,1253642440674202204;>chainOfFifty,,1253642440674205897;>chainOfFifty,,1253642440674209476;>chainOfFifty,,1253642440674213133;>chainOfFifty,,1253642440674216826;>chainOfFifty,,1253642440674220457;>chainOfFifty,,1253642440674224162;>chainOfFifty,,1253642440674232376;>chainOfFifty,,1253642440674236178;>chainOfFifty,,1253642440674239775;>chainOfFifty,,1253642440674243465;>chainOfFifty,,1253642440674247176;>chainOfFifty,,1253642440674250797;>chainOfFifty,,1253642440674254469;>chainOfFifty,,1253642440674258088;>chainOfFifty,,1253642440674261820;<abcdefghijklmnopqrstuvwxyz,,92,,1253642440674270132;>abcdefghijklmnopqrstuvwxyz,,1253642440674277146;<finalCall,,93,,1253642440674285356;>finalCall,,1253642440674292127;>main,,1253642440674295760;
-1253642440674312367
-1300233 \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/icons/sample.gif b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/icons/sample.gif
deleted file mode 100644
index 34fb3c9d8c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/icons/sample.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/makefile b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/makefile
deleted file mode 100644
index a9983e7b40..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-CC=gcc
-CPLUS=g++
-CFLAGS=-g -c -Wall
-OFLAG=-o
-
-all: catlan basic eag
- make clean
-
-eag : eag.o
- $(CPLUS) $(OFLAG) eag eag.o
-
-catlan: catlan.o
- $(CC) $(OFLAG) catlan catlan.o
-
-basic: basic.o
- $(CC) $(OFLAG) basic basic.o
-
-
-eag.o : eag.c
- $(CPLUS) $(CFLAGS) eag.c
-
-catlan.o: catlan.c
- $(CC) $(CFLAGS) catlan.c
-
-basic.o: basic.c
- $(CC) $(CFLAGS) basic.c
-
-clean:
- rm catlan.o basic.o eag.o
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/parse_function_nomark.stp b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/parse_function_nomark.stp
deleted file mode 100644
index 34b01b6ca1..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/parse_function_nomark.stp
+++ /dev/null
@@ -1,43 +0,0 @@
-global serial
-global startTime
-global finalTime
-
-probe process(@1).function("*"){
- callFunction(probefunc())
-}
-
-probe process(@1).function("*").return{
- returnFunction(probefunc())
-}
-
-probe begin {
- printf("PROBE_BEGIN\n");
- printf("testing\n");
-}
-
-function callFunction(probefunc) {
- if (startTime == 0) {
- startTime = gettimeofday_ns()
- printf("<%s,,%d,,%d;", probefunc, serial, startTime)
- } else
- printf("<%s,,%d,,%d;", probefunc, serial, gettimeofday_ns())
- serial++
-}
-
-
-function returnFunction(probefunc) {
- finalTime = gettimeofday_ns()
- printf(">%s,,%d;", probefunc, finalTime)
-}
-
-probe syscall.exit {
- if (pid() == target()) {
- finalTime = gettimeofday_ns()
- }
-}
-
-probe end {
- printf("\n%d",finalTime);
- printf("\n%d",finalTime - startTime);
- exit()
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/Activator.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/Activator.java
deleted file mode 100644
index f1ccb45bf6..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/Activator.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package org.eclipse.linuxtools.systemtap.local.callgraph.tests;
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.linuxtools.systemtap.local.callgraph.tests";
- public static String PLUGIN_LOCATION = "NULL";
-
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- PLUGIN_LOCATION = getPluginLocation();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- public String getPluginLocation() {
- Bundle bundle = getBundle();
-
- URL locationUrl = FileLocator.find(bundle,new Path("/"), null); //$NON-NLS-1$
- URL fileUrl = null;
- try {
- fileUrl = FileLocator.toFileURL(locationUrl);
- } catch (IOException e) {
- e.printStackTrace();
- }
- return fileUrl.getFile();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/AllTests.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/AllTests.java
deleted file mode 100644
index c5133426e3..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/AllTests.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.local.callgraph.tests;
-
-import org.eclipse.linuxtools.systemtap.local.core.SystemTapUIErrorMessages;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
-
- public static Test suite() {
- SystemTapUIErrorMessages.setActive(false);
- TestSuite suite = new TestSuite(
- "Test for org.eclipse.linuxtools.systemtap.local.callgraph.tests");
- //$JUnit-BEGIN$
- suite.addTestSuite(StapGraphParserTest.class);
- suite.addTestSuite(SystemTapGraphViewTest.class);
- suite.addTestSuite(SystemTapGraphTest.class);
- //$JUnit-END$
- return suite;
- }
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/MouseListenerTest.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/MouseListenerTest.java
deleted file mode 100644
index c2657ad33f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/MouseListenerTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.callgraph.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.linuxtools.systemtap.local.callgraph.CallgraphView;
-import org.eclipse.linuxtools.systemtap.local.callgraph.GraphUIJob;
-import org.eclipse.linuxtools.systemtap.local.callgraph.StapGraph;
-import org.eclipse.linuxtools.systemtap.local.callgraph.StapGraphParser;
-import org.eclipse.linuxtools.systemtap.local.callgraph.graphlisteners.StapGraphKeyListener;
-import org.eclipse.linuxtools.systemtap.local.callgraph.graphlisteners.StapGraphMouseListener;
-import org.eclipse.linuxtools.systemtap.local.callgraph.graphlisteners.StapGraphMouseWheelListener;
-import org.eclipse.zest.core.widgets.GraphItem;
-
-
-public class MouseListenerTest extends TestCase{
-
- public void test() {
- StapGraphParser parse = new StapGraphParser();
- parse.setFile(Activator.PLUGIN_LOCATION + "eag.graph");
- parse.testRun(new NullProgressMonitor());
-
- CallgraphView.forceDisplay();
-
- GraphUIJob j = new GraphUIJob("Test Graph UI Job", parse);
- j.runInUIThread(new NullProgressMonitor());
-
-
- StapGraphMouseListener mListener = CallgraphView.getGraph().getMouseListener();
- StapGraphKeyListener kListener = CallgraphView.getGraph().getKeyListener();
- StapGraphMouseWheelListener mwListener = CallgraphView.getGraph().getMouseWheelListener();
-
- StapGraph g = (StapGraph) CallgraphView.getGraph();
- g.setProject(parse.project);
-
-
- GraphItem[] nodes = {g.getNode(g.getFirstUsefulNode())};
- g.setSelection(nodes);
-
-
- System.out.println(mListener.controlDoubleClick());
- mListener.mouseDownEvent(0, 0);
- g.draw(StapGraph.CONSTANT_DRAWMODE_TREE, StapGraph.CONSTANT_ANIMATION_FASTEST,
- g.getFirstUsefulNode());
- mListener.mouseUpEvent();
-
- System.out.println("TEST");
-
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/StapGraphParserTest.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/StapGraphParserTest.java
deleted file mode 100644
index 801c92998e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/StapGraphParserTest.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.callgraph.tests;
-
-import java.io.File;
-import java.util.ArrayList;
-import junit.framework.TestCase;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.linuxtools.systemtap.local.callgraph.StapGraphParser;
-
-public class StapGraphParserTest extends TestCase {
-
- //RENDER THE GRAPH
- public static StapGraphParser initializeGraph(String filePath){
- StapGraphParser grph = new StapGraphParser();
- grph.setFile(filePath);
- grph.testRun(new NullProgressMonitor());
- return grph;
- }
-
- public static void assertSanity(StapGraphParser grph){
- //SAME NUMBER OF NODES ENTRIES
- assertEquals(grph.serialMap.size(),grph.timeMap.size());
- assertEquals(grph.serialMap.size(),grph.outNeighbours.size());
- //ALL UNIQUE FUNCTIONS HAVE A TIME
- //ALL FUNCTIONS HAVE A CUMULATIVE TIME
- for (int val : grph.serialMap.keySet()){
- String fname = grph.serialMap.get(val);
- assertTrue(grph.timeMap.get(val) != null);
- assertTrue(grph.cumulativeTimeMap.get(fname) != null);
- }
- }
-
-
- public static void assertTimes(StapGraphParser grph){
- //NO FUNCTION HAS TIME/CUMULATIVE TIME LARGER THAN TOTAL
- for (int val : grph.serialMap.keySet()){
- String fname = grph.serialMap.get(val);
- assertTrue(grph.totalTime >= grph.timeMap.get(val));
- assertTrue(grph.totalTime >= grph.cumulativeTimeMap.get(fname));
- }
- }
-
-
- public static void assertConnectedness (StapGraphParser grph){
- boolean hasParent;
- //ALL NODES MUST HAVE A PARENT EXCEPT THE ROOT
- for (int key : grph.serialMap.keySet()){
- hasParent = false;
- for (ArrayList<Integer> list : grph.outNeighbours.values()){
- if (list.contains(key)){
- hasParent = true;
- break;
- }
- }
-
- if (!hasParent){
- for (int other : grph.serialMap.keySet()){
- if (key > other){
- fail(key + " " + grph.serialMap.get(key) + " had no parent");
- }
- }
- }
- }
-
- }
-
-
- File tmpfile = new File("");
- public final String currentPath = tmpfile.getAbsolutePath();
- public String graphDataPath= "";
-
- //FOR TESTING THE GRAPH PARSING
- public void executeGraphTests(){
- StapGraphParser grph = StapGraphParserTest.initializeGraph(graphDataPath);
- StapGraphParserTest.assertSanity(grph);
- StapGraphParserTest.assertTimes(grph);
- StapGraphParserTest.assertConnectedness(grph);
- }
-
-
- public void testCallGraphRunBasic(){
- graphDataPath = currentPath+"/basic.graph";
- executeGraphTests();
- }
-
- public void testCallGraphRunRecursive(){
- graphDataPath = currentPath+"/catlan.graph";
- executeGraphTests();
- }
-
- public void testManyFuncs(){
- graphDataPath = currentPath+"/eag.graph";
- executeGraphTests();
- }
-
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/SystemTapGraphTest.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/SystemTapGraphTest.java
deleted file mode 100644
index 4781660b2d..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/SystemTapGraphTest.java
+++ /dev/null
@@ -1,321 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.callgraph.tests;
-
-import java.io.File;
-import java.util.ArrayList;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.linuxtools.systemtap.local.callgraph.CallgraphView;
-import org.eclipse.linuxtools.systemtap.local.callgraph.GraphUIJob;
-import org.eclipse.linuxtools.systemtap.local.callgraph.StapGraphParser;
-import org.eclipse.linuxtools.systemtap.local.core.SystemTapUIErrorMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.ScrolledComposite;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-
-public class SystemTapGraphTest extends TestCase {
-
-
-/* public void testLaunch() {
- System.out.println("\n\nLaunching SystemTapGraphTest");
-
- LaunchStapGraph launch = new LaunchStapGraph();
- launch.launch(bin, mode);
- checkScript(launch);
- }*/
- private ArrayList<Button> list = new ArrayList<Button>();
- private boolean manual = false;
-
- private class ButtonSelectionListener implements SelectionListener {
- private Action action;
-
- public ButtonSelectionListener(Action action) {
- this.action = action;
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- action.run();
- }
-
- }
-
- public void testGraphLoading() throws InterruptedException {
-
- StapGraphParser parse = new StapGraphParser();
- parse.setFile(Activator.PLUGIN_LOCATION+"eag.graph");
-// parse.setTestMode(true);
- parse.testRun(new NullProgressMonitor());
-
- CallgraphView.forceDisplay();
-
- GraphUIJob j = new GraphUIJob("Test Graph UI Job", parse);
- j.runInUIThread(new NullProgressMonitor());
-
- if (!manual) {
- ArrayList<String> tasks = new ArrayList<String>();
-
-
- tasks.add("(Manually) Maximize CallgraphView");
- tasks.add("Refresh");
- tasks.add("Tree View");
- tasks.add("Aggregate View");
- tasks.add("Box View");
- tasks.add("Animation->Fast");
- tasks.add("Collapse");
- tasks.add("Uncollapse");
- tasks.add("Radial View");
- tasks.add("Collapse.");
- tasks.add("(Manually) Double-click node with no children in TreeViewer");
- tasks.add("(Manually) Expand an arrow in the TreeViewer");
- tasks.add("(Manually) Collapse an arrow in the TreeViewer");
- tasks.add("Save file");
- tasks.add("Reload file");
- tasks.add("Maximize");
-
-
- int taskNumber = 0;
- for (String task : tasks) {
- taskNumber++;
- System.out.println(task);
- Action act = null;
- switch (taskNumber) {
- case 1:
- break;
- case 2:
- act = CallgraphView.getView_refresh();
- break;
- case 3:
- act = CallgraphView.getView_treeview();
- break;
- case 4:
- act = CallgraphView.getView_aggregateview();
- break;
- case 5:
- act = CallgraphView.getView_boxview();
- break;
- case 6:
- act = CallgraphView.getAnimation_fast();
- break;
- case 7:
- case 8:
- act = CallgraphView.getMode_collapsednodes();
- break;
- case 9:
- act = CallgraphView.getView_radialview();
- break;
- case 10:
- act = CallgraphView.getMode_collapsednodes();
- break;
- case 14:
- String tempLocation = Activator.PLUGIN_LOCATION+"eag.graph2";
- File temp = new File(tempLocation);
- temp.delete();
- parse.saveData(tempLocation);
- temp.delete();
- break;
- case 15:
- StapGraphParser new_parser = new StapGraphParser();
- new_parser.setFile(Activator.PLUGIN_LOCATION+"eag.graph");
- new_parser.testRun(new NullProgressMonitor());
- break;
- case 16:
- CallgraphView.maximizeIfUnmaximized();
- break;
- default:
- break;
- }
- if (act != null) {
- act.run();
- }
- }
- return;
- }
-
- //TODO: Figure out how to make the graph display at the same time as the dialog
- SystemTapUIErrorMessages testRadial = new SystemTapUIErrorMessages("Test graph", "Opening graph",
- "Testing Graph. Press OK, then go through the list of tasks.");
- testRadial.schedule();
-
- testRadial.cancel();
-
- ArrayList<String> tasks = new ArrayList<String>();
-
-
- tasks.add("(Manually) Maximize CallgraphView");
- tasks.add("Refresh");
- tasks.add("Tree View");
- tasks.add("Aggregate View");
- tasks.add("Box View");
- tasks.add("Animation->Fast");
- tasks.add("Collapse");
- tasks.add("Uncollapse");
- tasks.add("Radial View");
- tasks.add("Collapse.");
- tasks.add("(Manually) Double-click node with no children in TreeViewer");
- tasks.add("(Manually) Expand an arrow in the TreeViewer");
- tasks.add("(Manually) Collapse an arrow in the TreeViewer");
- tasks.add("Save file");
- tasks.add("Reload file");
- tasks.add("Check Version");
-
-
- final Shell sh = new Shell(SWT.SHELL_TRIM);
- sh.setSize(450,tasks.size()*38);
- sh.setText("Tasklist - press Finished when finished.");
- sh.setLayout(new GridLayout(1, false));
- sh.setAlpha(150);
-
- ScrolledComposite testComp = new ScrolledComposite(sh, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
-
-
- Composite buttons = new Composite(testComp, SWT.NONE);
- testComp.setContent(buttons);
- buttons.setLayout(new GridLayout(1, false));
- testComp.setExpandHorizontal(true);
- testComp.setExpandVertical(true);
-
- int taskNumber = 0;
- for (String task : tasks) {
- taskNumber++;
-
-
- Button checkBox = new Button(buttons, SWT.CHECK);
- list.add(checkBox);
- checkBox.setText(task);
- Action act = null;
- switch (taskNumber) {
- case 1:
- break;
- case 2:
- act = CallgraphView.getView_refresh();
- break;
- case 3:
- act = CallgraphView.getView_treeview();
- break;
- case 4:
- act = CallgraphView.getView_aggregateview();
- break;
- case 5:
- act = CallgraphView.getView_boxview();
- break;
- case 6:
- act = CallgraphView.getAnimation_fast();
- break;
- case 7:
- case 8:
- act = CallgraphView.getMode_collapsednodes();
- break;
- case 9:
- act = CallgraphView.getView_radialview();
- break;
- case 10:
- act = CallgraphView.getMode_collapsednodes();
- break;
- case 14:
- act = CallgraphView.getSave_callgraph();
- break;
- case 15:
- act = CallgraphView.getOpen_callgraph();
- break;
- case 16:
- act = CallgraphView.getHelp_version();
- break;
- default:
- break;
- }
- if (act != null) {
- ButtonSelectionListener bl = new ButtonSelectionListener(act);
- checkBox.addSelectionListener(bl);
- }
-
-
- }
-
-// Button finish = new Button(buttons, SWT.PUSH);
-// finish.setText("Finish");
-// finish.addSelectionListener(new SelectionListener() {
-//
-// @Override
-// public void widgetSelected(SelectionEvent e) {
-//
-// }
-//
-// @Override
-// public void widgetDefaultSelected(SelectionEvent e) {
-// sh.dispose();
-// }
-// });
-//
-
- sh.open();
-
-
- boolean doneTasks =MessageDialog.openConfirm(new Shell(SWT.ON_TOP), "Check Graph",
- "Press OK if all "+ tasks.size() + " boxes in the checklist have been checked.\n" +
- "Hit Cancel if any test fails.");
- assertEquals(true, doneTasks);
-
- for (Button b : list) {
- if (!b.getSelection()) {
- fail("Task failed: " + b.getText());
- }
- assertEquals(true, b.getSelection());
- }
-
-
-
- //* To test:
- //*
- //* All transitions from (drawMode A, animMode A, collapseMode A, zoom A) to (drawMode B, animMode B, collapseMode B, zoom B)
-
- //Transition: (dRadial, aSlow, cTrue, zDefault)-->(dTree, same)
-// SystemTapUIErrorMessages testTree = new SystemTapUIErrorMessages("Test graph", "Opening graph",
-// "Now checking Tree View. Please press OK, then , press OK if correct.");
-// testTree.schedule();
-//
-// assertEquals(true, MessageDialog.openConfirm(new Shell(), "Check Graph",
-// "Select Tree View from the drop-down menu. Does the Tree View look correct? Press OK to continue."));
-//
-// //Transition: (dTree, aSlow, cTrue, zDefault)-->(dAgg, same)
-// SystemTapUIErrorMessages testAggregate = new SystemTapUIErrorMessages("Test graph", "Opening graph",
-// "Now checking Aggregate View. Please press OK, then select Aggregate View from the drop-down menu, press OK to continue.");
-// testAggregate.schedule();
-//
-// assertEquals(true, MessageDialog.openConfirm(new Shell(), "Check Graph",
-// "Press OK, then Select Aggregate View from the drop-down menu. Does the Aggregate View look correct? Press OK to continue."));
-//
-// //Transition: (dAgg, aSlow, cTrue, zDefault)-->(dBox, same)
-// SystemTapUIErrorMessages testBox = new SystemTapUIErrorMessages("Test graph", "Opening graph",
-// "Now checking Box View. Please press OK, then select Box View from the drop-down menu, press OK to continue.");
-// testBox.schedule();
-//
-// assertEquals(true, MessageDialog.openConfirm(new Shell(), "Check Graph",
-// "Press OK, then Select Box View from the drop-down menu. Does the Box View look correct? Press OK to continue."));
- }
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/SystemTapGraphViewTest.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/SystemTapGraphViewTest.java
deleted file mode 100644
index 7ace4c0919..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/src/org/eclipse/linuxtools/systemtap/local/callgraph/tests/SystemTapGraphViewTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.local.callgraph.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.linuxtools.systemtap.local.callgraph.CallgraphView;
-
-public class SystemTapGraphViewTest extends TestCase {
- private CallgraphView stapView = new CallgraphView();
- private String testText = "blah";
-
- public void test() {
- System.out.println("\n\nLaunching RunSystemTapActionTest\n");
-
- CallgraphView.forceDisplay();
-
- stapView.println(testText);
- assertEquals(stapView.getText(), testText);
-
- stapView.clearAll();
- assertEquals(stapView.getText(), "");
- }
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/test.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/test.xml
deleted file mode 100644
index 727941bc82..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/test.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="testsuite" default="run" basedir=".">
- <property name="classname" value="org.eclipse.linuxtools.systemtap.local.callgraph.tests.AllTests" />
- <property name="plugin-name" value="org.eclipse.linuxtools.systemtap.local.callgraph.tests" />
-
- <property name="library-file" value="${eclipse-home}/dropins/${subProjectName2}/plugins/org.eclipse.test/library.xml" />
-
- <!-- The property ${eclipse-home} should be passed into this script -->
- <!-- Set a meaningful default value for when it is not. -->
- <property name="eclipse-home" value="${basedir}/../.." />
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp />
- <delete>
- <fileset dir="${eclipse-home}" includes="org*.xml" />
- </delete>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="localcallgraph_suite">
- <property name="localcallgraph-folder" value="${eclipse-home}/localcallgraph_folder" />
- <delete dir="${localcallgraph-folder}" quiet="true" />
- <ant target="callgraph-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${localcallgraph-folder}" />
- <property name="plugin-name" value="${plugin-name}" />
- <property name="classname" value="${classname}" />
- </ant>
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- <mkdir dir="${results}/consolelogs" />
- <copy failonerror="false" file="${eclipse-home}/results/${classname}.txt" tofile="${results}/consolelogs/${classname}_${platform}.metadata.log.txt" />
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target name="run" depends="init,localcallgraph_suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml" />
- <property name="output-file" value="${plugin-name}.xml" />
- </ant>
- </target>
-
- <target name="all" depends="run" description="Dummy target to run all tests">
- </target>
-
-</project>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/.classpath b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/.classpath
deleted file mode 100644
index ad32c83a78..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/.project b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/.project
deleted file mode 100644
index e654493362..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.systemtap.local.callgraph</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.local.callgraph/.settings/org.eclipse.jdt.core.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 81816d5f6f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Mon Sep 21 12:35:29 EDT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/META-INF/MANIFEST.MF
deleted file mode 100644
index ea191f2fc1..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,21 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Graphing Plug-in
-Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.local.callgraph;singleton:=true
-Bundle-Version: 0.0.1.qualifier
-Bundle-Activator: org.eclipse.linuxtools.systemtap.local.callgraph.Activator
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.draw2d,
- org.eclipse.zest.layouts
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Export-Package: org.eclipse.linuxtools.systemtap.local.callgraph,
- org.eclipse.linuxtools.systemtap.local.callgraph.graphlisteners
-Import-Package: org.eclipse.cdt.core.model,
- org.eclipse.jface.text,
- org.eclipse.linuxtools.systemtap.local.core,
- org.eclipse.ui.texteditor,
- org.eclipse.zest.core.widgets,
- org.eclipse.zest.layouts,
- org.eclipse.zest.layouts.algorithms
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/build.properties
deleted file mode 100644
index 2fe877d1f8..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Red Hat - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- icons/
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/compare_method.gif b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/compare_method.gif
deleted file mode 100644
index a1b1748813..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/compare_method.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/down.gif b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/down.gif
deleted file mode 100644
index f1991391b5..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/down.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/genericregister_obj.gif b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/genericregister_obj.gif
deleted file mode 100644
index 7134210d0a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/genericregister_obj.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/mode_collapsednodes.gif b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/mode_collapsednodes.gif
deleted file mode 100644
index 0bae56c346..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/mode_collapsednodes.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/nav_refresh.gif b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/nav_refresh.gif
deleted file mode 100644
index 3ca04d06ff..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/nav_refresh.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/public_co.gif b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/public_co.gif
deleted file mode 100644
index a9af5d538d..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/public_co.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/radial_view.gif b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/radial_view.gif
deleted file mode 100644
index b962e1c776..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/radial_view.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/showchild_mode.gif b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/showchild_mode.gif
deleted file mode 100644
index 6514f7bb77..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/showchild_mode.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/tree_view.gif b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/tree_view.gif
deleted file mode 100644
index d89c06913c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/tree_view.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/up.gif b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/up.gif
deleted file mode 100644
index 57d1de72bb..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/up.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/view_aggregateview.gif b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/view_aggregateview.gif
deleted file mode 100644
index 5a69c01c87..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/icons/view_aggregateview.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/plugin.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/plugin.xml
deleted file mode 100644
index e2bd1ace8a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/plugin.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
-
-
- <extension
- point="org.eclipse.ui.views">
- <view
- category="org.eclipse.cdt.ui.views"
- class="org.eclipse.linuxtools.systemtap.local.callgraph.CallgraphView"
- icon="icons/genericregister_obj.gif"
- id="org.eclipse.linuxtools.systemtap.local.callgraph.callgraphview"
- name="Call Graph"
- restorable="true">
- </view>
- </extension>
-
- <extension
- point="org.eclipse.ui.perspectiveExtensions">
- <perspectiveExtension
- targetID="org.eclipse.cdt.ui.CPerspective">
- <view
- id="org.eclipse.linuxtools.systemtap.local.callgraph.callgraphview"
- minimized="false"
- relationship="stack">
- </view>
- </perspectiveExtension>
- </extension>
-
-
-
- <extension
- point="org.eclipse.ui.actionSets">
- <actionSet
- id="org.eclipse.linuxtools.systemtap.local.callgraph.actionSet"
- label="Systemtap Marker Action Set"
- visible="true">
- <action
- class="org.eclipse.linuxtools.systemtap.local.callgraph.actions.InsertMarkerAction"
- definitionId="org.eclipse.linuxtools.systemtap.local.callgraph.command3"
- id="org.eclipse.linuxtools.systemtap.local.callgraph.actions.StapAction"
- label="Insert stap marker function"
- tooltip="Insert systemtap marker">
- </action>
- <action
- class="org.eclipse.linuxtools.systemtap.local.callgraph.actions.RemoveMarkerAction"
- definitionId="org.eclipse.linuxtools.systemtap.local.callgraph.command4"
- id="org.eclipse.linuxtools.systemtap.local.callgraph.actions.StapRemoveAction"
- label="Remove stap marker function"
- tooltip="Remove systemtap marker">
- </action>
- </actionSet>
- </extension>
-
- <extension point="org.eclipse.ui.bindings">
- <key
- commandId="org.eclipse.linuxtools.systemtap.local.callgraph.command3"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Ctrl+5"/>
- <key
- commandId="org.eclipse.linuxtools.systemtap.local.callgraph.command4"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="Ctrl+6">
- </key>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- categoryId="org.eclipse.linuxtools.systemtap.local.callgraph.category2"
- id="org.eclipse.linuxtools.systemtap.local.callgraph.command3"
- name="Insert stap marker function">
- </command>
- <category
- id="org.eclipse.linuxtools.systemtap.local.callgraph.category2"
- name="SystemTap">
- </category>
- <command
- categoryId="org.eclipse.linuxtools.systemtap.local.callgraph.category2"
- id="org.eclipse.linuxtools.systemtap.local.callgraph.command4"
- name="Remove stap marker function">
- </command>
- </extension>
- <extension
- id="org.eclipse.linuxtools.systemtap.local.callgraph.graphparser"
- name="GraphParser"
- point="org.eclipse.linuxtools.systemtap.local.core.parser">
- <parser
- class="org.eclipse.linuxtools.systemtap.local.callgraph.StapGraphParser"
- realtime="false">
- </parser>
- </extension>
-</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/Activator.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/Activator.java
deleted file mode 100644
index 8eb6c92471..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/Activator.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.callgraph;
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.linuxtools.systemtap.local.callgraph"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
-
- //TODO: Is this too slow?
- CallGraphConstants.setPluginLocation(getPluginLocation());
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- public String getPluginLocation() {
- Bundle bundle = getBundle();
-
- URL locationUrl = FileLocator.find(bundle,new Path("/"), null); //$NON-NLS-1$
- URL fileUrl = null;
- try {
- fileUrl = FileLocator.toFileURL(locationUrl);
- } catch (IOException e) {
- e.printStackTrace();
- }
- return fileUrl.getFile();
-
- }
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/AggregateLayoutAlgorithm.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/AggregateLayoutAlgorithm.java
deleted file mode 100644
index fdb2bfba10..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/AggregateLayoutAlgorithm.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.callgraph;
-
-import java.util.ArrayList;
-import java.util.TreeSet;
-import java.util.Map.Entry;
-
-import org.eclipse.zest.layouts.algorithms.GridLayoutAlgorithm;
-import org.eclipse.zest.layouts.dataStructures.InternalNode;
-import org.eclipse.zest.layouts.dataStructures.InternalRelationship;
-
-/**
- * Calculates the size and location of a node when rendering the
- * Aggregate View. This avoids needing to design a Layout Algorithm
- * from scratch.
- */
-public class AggregateLayoutAlgorithm extends GridLayoutAlgorithm{
-
- protected ArrayList<Long> sortedAggregateTimes;
- protected Long totalTime;
- protected int graphWidth;
-
- public AggregateLayoutAlgorithm(int styles, TreeSet<Entry<String, Long>> entries, Long time, int width){
- super(styles);
-
- this.sortedAggregateTimes = new ArrayList<Long>();
- for (Entry<String,Long> val : entries){
- this.sortedAggregateTimes.add(val.getValue());
- }
-
- this.totalTime = time;
- this.graphWidth = width;
- }
-
- //THIS METHOD OVERRIDES THE PARENT'S IMPLEMENTATION (WHICH IS EMPTY ANYWAYS)
- protected void postLayoutAlgorithm(InternalNode[] entitiesToLayout, InternalRelationship[] relationshipsToConsider) {
- Long time;
- final int minimumSize = 40;
- double percent;
- double xcursor = 0.0;
- double ycursor = 0.0;
-
- for (InternalNode sn : entitiesToLayout) {
- time = sortedAggregateTimes.remove(0);
- percent = (double) time / (double) totalTime;
- double snWidth = (sn.getInternalWidth() * percent) + minimumSize;
- double snHeight = (sn.getInternalHeight() * percent) + minimumSize;
-
- sn.setSize(snWidth, snHeight);
- if (xcursor + snWidth > graphWidth) {
- //reaching the end of row, move to lower column
- ycursor += snHeight;
- xcursor = 0;
- sn.setLocation(xcursor, ycursor);
- } else {
- sn.setLocation(xcursor, ycursor);
- xcursor += snWidth;
- }
- }
-
- }
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/CallGraphConstants.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/CallGraphConstants.java
deleted file mode 100644
index 6dc1976525..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/CallGraphConstants.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.local.callgraph;
-
-public class CallGraphConstants {
-
- public static String PLUGIN_LOCATION = ""; //$NON-NLS-1$
-
- public static void setPluginLocation(String val) {
- PLUGIN_LOCATION = val;
- }
-
-
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/CallgraphView.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/CallgraphView.java
deleted file mode 100644
index 143ae2cede..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/CallgraphView.java
+++ /dev/null
@@ -1,1172 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.local.callgraph;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.Vector;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.linuxtools.systemtap.local.core.PluginConstants;
-import org.eclipse.linuxtools.systemtap.local.core.SystemTapErrorHandler;
-import org.eclipse.linuxtools.systemtap.local.core.SystemTapUIErrorMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Spinner;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-import org.eclipse.ui.part.ViewPart;
-
-/**
- * The SystemTap View for displaying output of the 'stap' command, and acts
- * as a container for any graph to be rendered. Any buttons/controls/actions
- * necessary to the smooth running of SystemTap could be placed here.
- */
-public class CallgraphView extends ViewPart {
- private static final String NEW_LINE = Messages.getString("CallgraphView.3"); //$NON-NLS-1$
- private static CallgraphView stapview;
- private static boolean isInitialized = false;
-
- private Display display;
- private static StyledText viewer;
- private int previousEnd;
-
-
- private static Action open_callgraph;
- private static Action save_callgraph;
- private static Action open_default;
- private static Action error_errorLog;
- private static Action error_deleteError;
- private static Action view_treeview;
- private static Action view_radialview;
- private static Action view_aggregateview;
- private static Action view_boxview;
- private static Action view_refresh;
- private static Action animation_slow;
- private static Action animation_fast;
- private static Action mode_collapsednodes;
- private static Action markers_next;
- private static Action markers_previous;
- private static Action limits;
- private static Action goto_next;
- private static Action goto_previous;
- private static Action goto_last;
-
- private static IMenuManager menu;
- private static IMenuManager gotoMenu;
- private static IMenuManager file;
- private static IMenuManager errors;
- private static IMenuManager view;
- private static IMenuManager animation;
- private static IMenuManager markers; //Unused
- private static IMenuManager help;
- @SuppressWarnings("unused")
- private static Action help_about;
- private static Action help_version;
- public static IToolBarManager mgr;
-
- public static Composite masterComposite;
- private static Composite graphComp;
- private static Composite treeComp;
-
- private static StapGraphParser parser;
- private static StapGraph graph;
-
-
- /**
- * The constructor.
- * @return
- */
- public CallgraphView() {
- isInitialized = true;
- }
-
- public static CallgraphView getSingleInstance(){
- if (isInitialized){
- return stapview;
- }
- return null;
- }
-
-
- public static void testFunction() {
- if (masterComposite != null && !masterComposite.isDisposed())
- masterComposite.dispose();
- }
-
- public static void setValues(Composite graphC, Composite treeC, StapGraph g, StapGraphParser p){
- treeComp = treeC;
- graphComp = graphC;
- graph = g;
- parser = p;
- }
-
-
- /**
- * Enable or Disable the graph options
- * @param visible
- */
- public static void setGraphOptions (boolean visible){
- save_callgraph.setEnabled(visible);
- view_treeview.setEnabled(visible);
- view_radialview.setEnabled(visible);
- view_aggregateview.setEnabled(visible);
- view_boxview.setEnabled(visible);
- view_refresh.setEnabled(visible);
- limits.setEnabled(visible);
-
- markers_next.setEnabled(visible);
- markers_previous.setEnabled(visible);
-
- animation_slow.setEnabled(visible);
- animation_fast.setEnabled(visible);
- mode_collapsednodes.setEnabled(visible);
-
- goto_next.setEnabled(visible);
- goto_previous.setEnabled(visible);
- goto_last.setEnabled(visible);
- }
-
-/**
- * @param doMaximize : true && view minimized will maximize the view,
- * otherwise it will just 'refresh'
- */
- public static void maximizeOrRefresh(boolean doMaximize){
- IWorkbenchPage page = CallgraphView
- .getSingleInstance().getViewSite().getWorkbenchWindow().getActivePage();
-
- if (doMaximize && page.getPartState(page.getActivePartReference()) != IWorkbenchPage.STATE_MAXIMIZED){
- IWorkbenchAction action = ActionFactory.MAXIMIZE.create(CallgraphView
- .getSingleInstance().getViewSite().getWorkbenchWindow());
- action.run();
- }else{
- CallgraphView.layout();
- }
- }
-
-
- public static void firstTimeRefresh(){
-
- graphComp.setSize(masterComposite.getSize().x ,masterComposite.getSize().y);
- }
-
-
- public static Composite makeTreeComp(int treeSize) {
- if (treeComp != null && !treeComp.isDisposed()) {
- return treeComp;
- }
-
- Composite treeComp = new Composite(CallgraphView.masterComposite, SWT.NONE);
- GridData treegd = new GridData(SWT.BEGINNING, SWT.FILL, false, true);
- treegd.widthHint = treeSize;
- treeComp.setLayout(new FillLayout());
- treeComp.setLayoutData(treegd);
- return treeComp;
- }
-
- public static Composite makeGraphComp() {
-// if (graphComp != null && !graphComp.isDisposed()) {
-// return graphComp;
-// }
- if (graphComp != null)
- graphComp.dispose();
- Composite graphComp = new Composite(CallgraphView.masterComposite, SWT.NONE);
- GridData graphgd = new GridData(SWT.FILL, SWT.FILL, true, true);
- GridLayout gl = new GridLayout(2, false);
- gl.horizontalSpacing=0;
- gl.verticalSpacing=0;
-
- graphComp.setLayout(gl);
- graphComp.setLayoutData(graphgd);
- return graphComp;
- }
-
- public static void layout() {
- masterComposite.layout();
- }
-
- /**
- * If view is not maximized it will be maximized
- */
- public static void maximizeIfUnmaximized() {
- IWorkbenchPage page = CallgraphView
- .getSingleInstance().getViewSite().getWorkbenchWindow().getActivePage();
-
- if (page.getPartState(page.getActivePartReference()) != IWorkbenchPage.STATE_MAXIMIZED){
- IWorkbenchAction action = ActionFactory.MAXIMIZE.create(CallgraphView
- .getSingleInstance().getViewSite().getWorkbenchWindow());
- action.run();
- }
-
- }
-
-
-//
-// public static void disposeAll() {
-// if (graphComp != null) {
-// graphComp.setVisible(false);
-// GridData gd = (GridData) graphComp.getLayoutData();
-// gd.exclude = true;
-// graphComp.setLayoutData(gd);
-// graphComp.dispose();
-// }
-// if (treeComp != null) {
-// treeComp.setVisible(false);
-// GridData gd = (GridData) treeComp.getLayoutData();
-// gd.exclude = true;
-// treeComp.setLayoutData(gd);
-// treeComp.dispose();
-// }
-// }
-
- /**
- * This must be executed before a Graph is displayed
- */
- public static void createPartControl(){
-
-
- setGraphOptions(true);
- String text = ""; //$NON-NLS-1$
- StyleRange[] sr = null;
-
-
- if (viewer != null && !viewer.isDisposed()) {
- text = viewer.getText();
- sr = viewer.getStyleRanges();
- viewer.dispose();
- }
-
-
- graphComp.setParent(masterComposite);
-
- if (treeComp != null)
- treeComp.setParent(masterComposite);
-
- if (graph == null) {
- createViewer(masterComposite);
- viewer.setText(text);
- viewer.setStyleRanges(sr);
- }
-
- //MAXIMIZE THE SYSTEMTAP VIEW WHEN RENDERING A GRAPH
- firstTimeRefresh();
- }
-
-
- public static void createViewer(Composite parent){
- viewer = new StyledText(parent, SWT.READ_ONLY | SWT.MULTI
- | SWT.V_SCROLL | SWT.WRAP);
-
- viewer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- Font font = new Font(parent.getDisplay(), "Monospace", 11, SWT.NORMAL); //$NON-NLS-1$
- viewer.setFont(font);
- }
-
- /**
- * This is a callback that will allow us to create the viewer and
- * initialize it.
- */
- public void createPartControl(Composite parent) {
- if (masterComposite != null)
- masterComposite.dispose();
- masterComposite = parent;
- this.display = parent.getDisplay();
- GridLayout layout = new GridLayout(2, false);
- layout.horizontalSpacing=0;
- GridData gd = new GridData(100, 100);
-
- parent.setLayout(layout);
- parent.setLayoutData(gd);
-
- //CREATE THE TEXT VIEWER
- if (graph == null)
- createViewer(parent);
-
- // LOAD ALL ACTIONS
- createActions();
-
- //MENU FOR SYSTEMTAP BUTTONS
- mgr = getViewSite().getActionBars().getToolBarManager();
-
-
- //MENU FOR SYSTEMTAP GRAPH OPTIONS
- menu = getViewSite().getActionBars().getMenuManager();
-
- // ADD OPTIONS TO THE GRAPH MENU
- file = new MenuManager(Messages.getString("CallgraphView.0")); //$NON-NLS-1$
- view = new MenuManager(Messages.getString("CallgraphView.1")); //$NON-NLS-1$
- errors = new MenuManager(Messages.getString("CallgraphView.Errors")); //$NON-NLS-1$
- animation = new MenuManager(Messages.getString("CallgraphView.2")); //$NON-NLS-1$
- help = new MenuManager(Messages.getString("CallgraphView.5")); //$NON-NLS-1$
- markers = new MenuManager(Messages.getString("CallgraphView.6")); //$NON-NLS-1$
- gotoMenu = new MenuManager(Messages.getString("CallgraphView.9")); //$NON-NLS-1$
-
-
-
- menu.add(file);
- menu.add(view);
-// menu.add(animation);
- menu.add(gotoMenu);
- menu.add(errors);
- menu.add(help);
-
-
- file.add(open_callgraph);
- file.add(open_default);
- file.add(save_callgraph);
-
-
- errors.add(error_errorLog);
- errors.add(error_deleteError);
-
-
- view.add(view_treeview);
- view.add(view_radialview);
- view.add(view_aggregateview);
- view.add(view_boxview);
- view.add(getView_refresh());
- view.add(mode_collapsednodes);
- view.add(limits);
-
-
- gotoMenu.add(goto_previous);
- gotoMenu.add(goto_next);
- gotoMenu.add(goto_last);
-
-
- mgr.add(view_radialview);
- mgr.add(view_treeview);
- mgr.add(view_boxview);
- mgr.add(view_aggregateview);
- mgr.add(getView_refresh());
- mgr.add(mode_collapsednodes);
-
-// help.add(help_about);
- help.add(help_version);
-
- markers.add(markers_next);
- markers.add(markers_previous);
-
- animation.add(animation_slow);
- animation.add(animation_fast);
-// menu.add(markers);
-
- setGraphOptions(false);
-
- // Colouring helper variable
- previousEnd = 0;
- stapview = this;
- }
-
- /**
- * Passing the focus request to the viewer's control.
- */
- public void setFocus() {
- if (viewer != null && !viewer.isDisposed())
- viewer.setFocus();
- }
-
- /**
- * Force the CallgraphView to initialize
- */
- public static void forceDisplay(){
- try {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- window.getActivePage().showView("org.eclipse.linuxtools.systemtap.local.callgraph.callgraphview").setFocus(); //$NON-NLS-1$
- } catch (PartInitException e2) {
- e2.printStackTrace();
- }
-
- }
-
- public void prettyPrintln(String text) {
- Vector<StyleRange> styles = new Vector<StyleRange>();
- String[] txt = text.split("\\n"); //$NON-NLS-1$
- int lineOffset = 0;
- int inLineOffset;
-
- //txt[] contains text, with one entry for each new line
- for (int i = 0; i < txt.length; i++) {
-
- //Skip blank strings
- if (txt[i].length() == 0) {
- viewer.append(NEW_LINE);
- continue;
- }
-
- //Search for colour codes, if none exist then continue
- String[] split_txt = txt[i].split("~\\("); //$NON-NLS-1$
- if (split_txt.length == 1) {
- viewer.append(split_txt[0]);
- viewer.append(NEW_LINE);
- continue;
- }
-
- inLineOffset = 0;
- for (int k = 0; k < split_txt.length; k++) {
- //Skip blank substrings
- if (split_txt[k].length() == 0)
- continue;
-
- //Split for the number codes
- String[] coloursAndText = split_txt[k].split("\\)~"); //$NON-NLS-1$
-
- //If the string is properly formatted, colours should be length 2
- //If it is not properly formatted, don't colour (just print)
- if (coloursAndText.length != 2) {
- for (int j = 0; j < coloursAndText.length; j++) {
- viewer.append(coloursAndText[j]);
- inLineOffset += coloursAndText[j].length();
- }
- continue;
- }
-
- //The first element in the array should contain the colours
- String[] colours = coloursAndText[0].split(","); //$NON-NLS-1$
- if (colours.length < 3) continue;
-
- //The second element in the array should contain the text
- viewer.append(coloursAndText[1]);
-
- //Create a colour based on the 3 integers (if there are any more integers, just ignore)
- int R = new Integer(colours[0].replaceAll(" ", "")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$
- int G = new Integer(colours[1].replaceAll(" ", "")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$
- int B = new Integer(colours[2].replaceAll(" ", "")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$
-
- if (R > 255) R = 255;
- if (G > 255) G = 255;
- if (B > 255) B = 255;
-
- if (R < 0 ) R = 0;
- if (G < 0 ) G = 0;
- if (B < 0 ) B = 0;
-
- Color newColor = new Color(display, R, G, B);
-
- //Find the offset of the current line
- lineOffset = viewer.getOffsetAtLine(viewer.getLineCount() - 1);
-
- //Create a new style that lasts no further than the length of the line
- StyleRange newStyle = new StyleRange(lineOffset + inLineOffset,
- coloursAndText[1].length(),
- newColor, null);
- styles.addElement(newStyle);
-
- inLineOffset+=coloursAndText[1].length();
- }
-
- viewer.append(NEW_LINE);
- }
-
- //Create a new style range
- StyleRange[] s = new StyleRange[styles.size()];
- styles.copyInto(s);
-
- int cnt = viewer.getCharCount();
-
- //Using replaceStyleRanges with previousEnd, etc, effectively adds
- //the StyleRange to the existing set of Style Ranges (so we don't
- //waste time fudging with old style ranges that haven't changed)
- viewer.replaceStyleRanges(previousEnd, cnt - previousEnd, s);
- previousEnd = cnt;
-
- //Change focus and update
- viewer.setTopIndex(viewer.getLineCount() - 1);
- viewer.update();
- }
-
- public void println(String text) {
- if (viewer != null && !viewer.isDisposed()) {
- viewer.append(text);
- viewer.setTopIndex(viewer.getLineCount() - 1);
- viewer.update();
- }
- }
-
- public void clearAll() {
- if (viewer != null && !viewer.isDisposed()) {
- previousEnd = 0;
- viewer.setText(""); //$NON-NLS-1$
- viewer.update();
- }
- }
-
- /**
- * Testing convenience method to see what was printed
- *
- * @return viewer text
- */
- public String getText() {
- return viewer.getText();
- }
-
-
- /**
- * Populates the file menu
- */
- public void createFileActions() {
- //Opens from some location in your program
- open_callgraph = new Action(Messages.getString("CallgraphView.7")){ //$NON-NLS-1$
- public void run(){
- FileDialog dialog = new FileDialog(new Shell(), SWT.DEFAULT);
- String filePath = dialog.open();
- if (filePath != null){
- StapGraphParser new_parser = new StapGraphParser();
- new_parser.setFile(filePath);
- new_parser.schedule();
- }
- }
- };
-
- //Opens from the default location
- open_default = new Action(Messages.getString("CallgraphView.11")){ //$NON-NLS-1$
- public void run(){
- StapGraphParser new_parser = new StapGraphParser();
- new_parser.schedule();
- }
- };
-
-
- //Save callgraph.out
- save_callgraph = new Action(Messages.getString("CallgraphView.8")){ //$NON-NLS-1$
- public void run(){
- Shell sh = new Shell();
- FileDialog dialog = new FileDialog(sh, SWT.SAVE);
- String filePath = dialog.open();
-
- if (filePath != null) {
- parser.saveData(filePath);
- }
- }
- };
-
- }
-
- public void createHelpActions() {
- help_version = new Action(Messages.getString("CallgraphView.13")) { //$NON-NLS-1$
- public void run() {
- Runtime rt = Runtime.getRuntime();
- try {
- Process pr = rt.exec("stap -V"); //$NON-NLS-1$
- BufferedReader buf = new BufferedReader(new InputStreamReader(pr
- .getErrorStream()));
- String line = ""; //$NON-NLS-1$
- String message = ""; //$NON-NLS-1$
-
- while ((line = buf.readLine()) != null) {
- message += line + NEW_LINE; //$NON-NLS-1$
- }
-
- try {
- pr.waitFor();
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
-
-
- Shell sh = new Shell();
-
- MessageDialog.openInformation(sh, Messages.getString("CallgraphView.SystemTapVersionBox"), message); //$NON-NLS-1$
-
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- };
-
- help_about = new Action(Messages.getString("CallgraphView.4")) { //$NON-NLS-1$
- public void run() {
- Display disp = Display.getCurrent();
- if (disp == null){
- disp = Display.getDefault();
- }
-
-
- Shell sh = new Shell(disp, SWT.MIN | SWT.MAX);
- sh.setSize(425, 540);
- GridLayout gl = new GridLayout(1, true);
- sh.setLayout(gl);
-
- sh.setText(""); //$NON-NLS-1$
-
- Image img = new Image(disp, PluginConstants.PLUGIN_LOCATION+"systemtap.png"); //$NON-NLS-1$
- Composite cmp = new Composite(sh, sh.getStyle());
- cmp.setLayout(gl);
- GridData data = new GridData(415,100);
- cmp.setLayoutData(data);
- cmp.setBackgroundImage(img);
-
- Composite c = new Composite(sh, sh.getStyle());
- c.setLayout(gl);
- GridData gd = new GridData(415,400);
- c.setLayoutData(gd);
- c.setLocation(0,300);
- StyledText viewer = new StyledText(c, SWT.READ_ONLY | SWT.MULTI
- | SWT.V_SCROLL | SWT.WRAP | SWT.BORDER);
-
- GridData viewerGD = new GridData(SWT.FILL, SWT.FILL, true, true);
- viewer.setLayoutData(viewerGD);
- Font font = new Font(sh.getDisplay(), "Monospace", 11, SWT.NORMAL); //$NON-NLS-1$
- viewer.setFont(font);
- viewer.setText(
- "" + //$NON-NLS-1$
- "" + //$NON-NLS-1$
- "" + //$NON-NLS-1$
- "" + //$NON-NLS-1$
- "" + //$NON-NLS-1$
- "" + //$NON-NLS-1$
-
- "" + //$NON-NLS-1$
-//
-// Messages.getString("LaunchAbout.9") + //$NON-NLS-1$
-// Messages.getString("LaunchAbout.10") + //$NON-NLS-1$
-
- "" + //$NON-NLS-1$
- "" + //$NON-NLS-1$
- "" + //$NON-NLS-1$
-
-// Messages.getString("LaunchAbout.14") + //$NON-NLS-1$
-// Messages.getString("LaunchAbout.15") + //$NON-NLS-1$
-// Messages.getString("LaunchAbout.16") + //$NON-NLS-1$
-
- "" + //$NON-NLS-1$
-
-// Messages.getString("LaunchAbout.18") + //$NON-NLS-1$
-// Messages.getString("LaunchAbout.19") + //$NON-NLS-1$
-
- "" + //$NON-NLS-1$
- "" //$NON-NLS-1$
- );
-
-
-
- sh.open();
- }
- };
- }
-
- /**
- * Populates the Errors menu
- */
- public void createErrorActions() {
-
- error_errorLog = new Action(Messages.getString("CallgraphView.OpenLog")) { //$NON-NLS-1$
- public void run() {
- boolean error = false;
- File log = new File(PluginConstants.DEFAULT_OUTPUT + "Error.log"); //$NON-NLS-1$
- BufferedReader buff;
- try {
- buff = new BufferedReader(new FileReader(log));
- String logText = ""; //$NON-NLS-1$
- String line;
-
- while ((line = buff.readLine()) != null) {
- logText+=line + PluginConstants.NEW_LINE;
- }
-
- Shell sh = new Shell(SWT.BORDER | SWT.TITLE);
-
- sh.setText(Messages.getString("CallgraphView.15")); //$NON-NLS-1$
- sh.setLayout(new FillLayout());
- sh.setSize(600,600);
-
- StyledText txt = new StyledText(sh, SWT.MULTI | SWT.V_SCROLL | SWT.WRAP | SWT.READ_ONLY);
-
- txt.setText(logText);
-
- sh.setText(Messages.getString("CallgraphView.21")); //$NON-NLS-1$
-
- sh.open();
- txt.setTopIndex(txt.getLineCount());
-
-
- } catch (FileNotFoundException e) {
- error = true;
- } catch (IOException e) {
- error = true;
- } finally {
- if (error) {
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
- Messages.getString("CallgraphView.ErrorMessageName"), //$NON-NLS-1$
- Messages.getString("CallgraphView.ErrorMessageTitle"), //$NON-NLS-1$
- Messages.getString("CallgraphView.ErrorMessageBody") + //$NON-NLS-1$
- Messages.getString("CallgraphView.ErrorMessageBody2")); //$NON-NLS-1$
- mess.schedule();
- }
- }
-
- }
- };
-
-
- error_deleteError = new Action(Messages.getString("CallgraphView.ClearLog")) { //$NON-NLS-1$
- public void run() {
- if (!MessageDialog.openConfirm(new Shell(), Messages.getString("CallgraphView.DeleteLogsTitle"), //$NON-NLS-1$
- Messages.getString("CallgraphView.DeleteLogsMessage") + //$NON-NLS-1$
- Messages.getString("CallgraphView.DeleteLogsMessage2"))) //$NON-NLS-1$
- return;
-
- SystemTapErrorHandler.delete();
- }
- };
-
-
- }
-
- public void createViewActions() {
- //Set drawmode to tree view
- view_treeview = new Action(Messages.getString("CallgraphView.16")){ //$NON-NLS-1$
- public void run() {
- graph.draw(StapGraph.CONSTANT_DRAWMODE_TREE, graph.getAnimationMode(),
- graph.getRootVisibleNodeNumber());
- graph.scrollTo(graph.getNode(graph.getRootVisibleNodeNumber()).getLocation().x
- - graph.getBounds().width / 2, graph.getNode(
- graph.getRootVisibleNodeNumber()).getLocation().y);
- }
- };
- ImageDescriptor treeImage = ImageDescriptor.createFromImage(
- new Image(Display.getCurrent(), CallGraphConstants.PLUGIN_LOCATION + "icons/tree_view.gif")); //$NON-NLS-1$
- view_treeview.setImageDescriptor(treeImage);
-
-
- //Set drawmode to radial view
- view_radialview = new Action(Messages.getString("CallgraphView.17")){ //$NON-NLS-1$
- public void run(){
- graph.draw(StapGraph.CONSTANT_DRAWMODE_RADIAL, graph.getAnimationMode(),
- graph.getRootVisibleNodeNumber());
-
- }
- };
- ImageDescriptor d = ImageDescriptor.createFromImage(
- new Image(Display.getCurrent(),
- CallGraphConstants.PLUGIN_LOCATION + "/icons/radial_view.gif")); //$NON-NLS-1$
- view_radialview.setImageDescriptor(d);
-
-
- //Set drawmode to aggregate view
- view_aggregateview = new Action(Messages.getString("CallgraphView.18")){ //$NON-NLS-1$
- public void run(){
- graph.draw(StapGraph.CONSTANT_DRAWMODE_AGGREGATE, graph.getAnimationMode(),
- graph.getRootVisibleNodeNumber());
-
- }
- };
- ImageDescriptor aggregateImage = ImageDescriptor.createFromImage(
- new Image(Display.getCurrent(),
- CallGraphConstants.PLUGIN_LOCATION + "/icons/view_aggregateview.gif")); //$NON-NLS-1$
- view_aggregateview.setImageDescriptor(aggregateImage);
-
-
- //Set drawmode to box view
- view_boxview = new Action(Messages.getString("CallgraphView.19")){ //$NON-NLS-1$
- public void run(){
- graph.draw(StapGraph.CONSTANT_DRAWMODE_BOX, graph.getAnimationMode(),
- graph.getRootVisibleNodeNumber());
- }
- };
- ImageDescriptor boxImage = ImageDescriptor.createFromImage(
- new Image(Display.getCurrent(),
- CallGraphConstants.PLUGIN_LOCATION + "/icons/showchild_mode.gif")); //$NON-NLS-1$
- view_boxview.setImageDescriptor(boxImage);
-
-
- setView_refresh(new Action(Messages.getString("CallgraphView.Reset")){ //$NON-NLS-1$
- public void run(){
- graph.reset();
- }
- });
- ImageDescriptor refreshImage = ImageDescriptor.createFromImage(
- new Image(Display.getCurrent(),
- CallGraphConstants.PLUGIN_LOCATION + "/icons/nav_refresh.gif")); //$NON-NLS-1$
- getView_refresh().setImageDescriptor(refreshImage);
-
-
- }
-
-
- /**
- * Populates Animate menu.
- */
- public void createAnimateActions() {
- //Set animation mode to slow
- animation_slow = new Action(Messages.getString("CallgraphView.20"), Action.AS_RADIO_BUTTON){ //$NON-NLS-1$
- public void run(){
- graph.setAnimationMode(StapGraph.CONSTANT_ANIMATION_SLOW);
- this.setChecked(true);
- animation_slow.setChecked(true);
- animation_fast.setChecked(false);
- }
- };
-
- animation_slow.setChecked(true);
-
- //Set animation mode to fast
- animation_fast = new Action(Messages.getString("CallgraphView.22"), Action.AS_RADIO_BUTTON){ //$NON-NLS-1$
- public void run(){
- graph.setAnimationMode(StapGraph.CONSTANT_ANIMATION_FASTEST);
- animation_slow.setChecked(false);
- animation_fast.setChecked(true);
- }
- };
-
- //Toggle collapse mode
- mode_collapsednodes = new Action(Messages.getString("CallgraphView.24"), Action.AS_CHECK_BOX){ //$NON-NLS-1$
- public void run(){
-
- if (graph.isCollapseMode()) {
- graph.setCollapseMode(false);
- graph.draw(graph.getRootVisibleNodeNumber());
- }
- else {
- graph.setCollapseMode(true);
- graph.draw(graph.getRootVisibleNodeNumber());
- }
- }
- };
-
- ImageDescriptor newImage = ImageDescriptor.createFromImage(
- new Image(Display.getCurrent(), CallGraphConstants.PLUGIN_LOCATION + "icons/mode_collapsednodes.gif")); //$NON-NLS-1$
- mode_collapsednodes.setImageDescriptor(newImage);
-
- limits = new Action(Messages.getString("CallgraphView.SetLimits"), Action.AS_PUSH_BUTTON) { //$NON-NLS-1$
- private Spinner limit;
- private Spinner buffer;
- private Shell sh;
- public void run() {
- sh = new Shell();
- sh.setLayout(new GridLayout());
- sh.setSize(150, 200);
- Label limitLabel = new Label(sh, SWT.NONE);
- limitLabel.setLayoutData(new GridData(SWT.CENTER, SWT.DEFAULT, true, false));
- limitLabel.setText(Messages.getString("CallgraphView.MaxNodes")); //$NON-NLS-1$
- limit = new Spinner(sh, SWT.BORDER);
- limit.setMaximum(5000);
- limit.setSelection(graph.getMaxNodes());
- limit.setLayoutData(new GridData(SWT.CENTER, SWT.DEFAULT, true, false));
-
- Label bufferLabel = new Label(sh, SWT.NONE);
- bufferLabel.setLayoutData(new GridData(SWT.CENTER, SWT.DEFAULT, true, false));
- bufferLabel.setText(Messages.getString("CallgraphView.MaxDepth")); //$NON-NLS-1$
- buffer = new Spinner(sh, SWT.BORDER);
- buffer.setMaximum(5000);
- buffer.setSelection(graph.getLevelBuffer());
- buffer.setLayoutData(new GridData(SWT.CENTER, SWT.DEFAULT, true, false));
-
- Button set_limit = new Button(sh, SWT.PUSH);
- set_limit.setText(Messages.getString("CallgraphView.SetValues")); //$NON-NLS-1$
- set_limit.setLayoutData(new GridData(SWT.CENTER, SWT.DEFAULT, true, false));
- set_limit.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- boolean redraw = false;
- if (limit.getSelection() > 0 && buffer.getSelection() > 0) {
- graph.setMaxNodes(limit.getSelection());
- graph.setLevelBuffer(buffer.getSelection());
-
- if (graph.changeLevelLimits(graph.getLevelOfNode(graph.getRootVisibleNodeNumber()))) {
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
- Messages.getString("CallgraphView.BufferTooHigh"), Messages.getString("CallgraphView.BufferTooHigh"), //$NON-NLS-1$ //$NON-NLS-2$
- Messages.getString("CallgraphView.BufferMessage1") + //$NON-NLS-1$
- Messages.getString("CallgraphView.BufferMessage2") + //$NON-NLS-1$
- Messages.getString("CallgraphView.BufferMessage3") + //$NON-NLS-1$
- Messages.getString("CallgraphView.BufferMessage4") + graph.getLevelBuffer() + //$NON-NLS-1$
- Messages.getString("CallgraphView.BufferMessage5") + PluginConstants.NEW_LINE + PluginConstants.NEW_LINE + //$NON-NLS-1$
- Messages.getString("CallgraphView.BufferMessage6") + //$NON-NLS-1$
- Messages.getString("CallgraphView.BufferMessage7")); //$NON-NLS-1$
- mess.schedule();
- }
-
- redraw = true;
- }
- sh.dispose();
-
- if (redraw)
- graph.draw();
- }
-
- });
-
-
- sh.open();
- }
- };
-
- }
-
-/**
- * Creates actions by calling the relevant functions
- */
- public void createActions() {
- createFileActions();
- createHelpActions();
- createErrorActions();
- createViewActions();
- createAnimateActions();
- createMarkerActions();
- createMovementActions();
-// createButtonActions();
-
- mode_collapsednodes.setChecked(true);
-
- }
-
- public void createMovementActions() {
- goto_next = new Action(Messages.getString("CallgraphView.Next")) { //$NON-NLS-1$
- public void run() {
- if (graph.isCollapseMode()) {
- graph.setCollapseMode(false);
- }
- int toDraw = graph.getNextCalledNode(graph.getRootVisibleNodeNumber());
- if (toDraw != -1)
- graph.draw(toDraw);
- }
- };
-
- goto_previous = new Action(Messages.getString("CallgraphView.Previous")) { //$NON-NLS-1$
- public void run() {
- if (graph.isCollapseMode()) {
- graph.setCollapseMode(false);
- }
- int toDraw = graph.getPreviousCalledNode(graph.getRootVisibleNodeNumber());
- if (toDraw != -1)
- graph.draw(toDraw);
- }
- };
-
- goto_last = new Action(Messages.getString("CallgraphView.Last")) { //$NON-NLS-1$
- public void run() {
- if (graph.isCollapseMode())
- graph.setCollapseMode(false);
- graph.draw(graph.getLastFunctionCalled());
- }
- };
- }
-
- public void createMarkerActions() {
- markers_next = new Action(Messages.getString("CallgraphView.nextMarker")) { //$NON-NLS-1$
- public void run() {
- graph.draw(graph.getNextMarkedNode());
- }
- };
-
- markers_previous = new Action(Messages.getString("CallgraphView.previousMarker")) { //$NON-NLS-1$
- public void run() {
- graph.draw(graph.getPreviousMarkedNode());
- }
- };
- }
-
-
- public static void disposeGraph() {
- if (graphComp != null && !graphComp.isDisposed())
- graphComp.dispose();
- if (treeComp != null && !treeComp.isDisposed())
- treeComp.dispose();
- if (viewer!= null && !viewer.isDisposed()) {
- String tmp = viewer.getText();
- StyleRange[] tempRange = viewer.getStyleRanges();
- viewer.dispose();
- createViewer(masterComposite);
- viewer.setText(tmp);
- viewer.setStyleRanges(tempRange);
- }
- CallgraphView.setGraphOptions(false);
- //Force a redraw (.redraw() .update() not working)
- CallgraphView.maximizeOrRefresh(false);
- }
-
- public static Action getAnimation_slow() {
- return animation_slow;
- }
-
- public static void setAnimation_slow(Action animation_slow) {
- CallgraphView.animation_slow = animation_slow;
- }
-
- public static Action getAnimation_fast() {
- return animation_fast;
- }
-
- public static void setAnimation_fast(Action animation_fast) {
- CallgraphView.animation_fast = animation_fast;
- }
-
- public static IMenuManager getAnimation() {
- return animation;
- }
-
- public static void setAnimation(IMenuManager animation) {
- CallgraphView.animation = animation;
- }
-
- public static Action getMode_collapsednodes() {
- return mode_collapsednodes;
- }
-
- public static void setMode_collapsednodes(Action mode_collapsednodes) {
- CallgraphView.mode_collapsednodes = mode_collapsednodes;
- }
-
- public static void setView_refresh(Action view_refresh) {
- CallgraphView.view_refresh = view_refresh;
- }
-
- public static Action getView_refresh() {
- return view_refresh;
- }
-
- public static Action getGoto_next() {
- return goto_next;
- }
-
- public static void setGoto_next(Action gotoNext) {
- goto_next = gotoNext;
- }
-
- public static Action getGoto_previous() {
- return goto_previous;
- }
-
- public static void setGoto_parent(Action gotoParent) {
- goto_previous = gotoParent;
- }
-
- public static Action getGoto_last() {
- return goto_last;
- }
-
- public static void setGoto_last(Action gotoLast) {
- goto_last = gotoLast;
- }
-
- public static Action getOpen_callgraph() {
- return open_callgraph;
- }
-
- public static void setOpen_callgraph(Action openCallgraph) {
- open_callgraph = openCallgraph;
- }
-
- public static Action getSave_callgraph() {
- return save_callgraph;
- }
-
- public static void setSave_callgraph(Action saveCallgraph) {
- save_callgraph = saveCallgraph;
- }
-
- public static Action getError_errorLog() {
- return error_errorLog;
- }
-
- public static void setError_errorLog(Action errorErrorLog) {
- error_errorLog = errorErrorLog;
- }
-
- public static Action getError_deleteError() {
- return error_deleteError;
- }
-
- public static void setError_deleteError(Action errorDeleteError) {
- error_deleteError = errorDeleteError;
- }
-
- public static Action getView_treeview() {
- return view_treeview;
- }
-
- public static void setView_treeview(Action viewTreeview) {
- view_treeview = viewTreeview;
- }
-
- public static Action getView_radialview() {
- return view_radialview;
- }
-
- public static void setView_radialview(Action viewRadialview) {
- view_radialview = viewRadialview;
- }
-
- public static Action getView_aggregateview() {
- return view_aggregateview;
- }
-
- public static void setView_aggregateview(Action viewAggregateview) {
- view_aggregateview = viewAggregateview;
- }
-
- public static Action getView_boxview() {
- return view_boxview;
- }
-
- public static void setView_boxview(Action viewBoxview) {
- view_boxview = viewBoxview;
- }
-
- public static Action getHelp_version() {
- return help_version;
- }
-
- public static void setHelp_version(Action helpVersion) {
- help_version = helpVersion;
- }
-
- public static void setGoto_previous(Action gotoPrevious) {
- goto_previous = gotoPrevious;
- }
-
- public static StapGraph getGraph() {
- return graph;
- }
-}
-
-/**
- * The code graveyard: Where snippets go to die
- */
-//StyleRange[] existingRange = viewer.getStyleRanges();
-//
-//StyleRange[] s = new StyleRange[styles.size()];
-//StyleRange[] s2 = new StyleRange[styles.size() + existingRange.length];
-//styles.copyInto(s);
-//
-//for (int i = 0; i < existingRange.length; i++)
-// s2[i] = existingRange[i];
-//
-//for (int i = 0; i < styles.size(); i ++)
-// s2[i+existingRange.length] = s[i];
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/GraphUIJob.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/GraphUIJob.java
deleted file mode 100644
index 41c6e0e495..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/GraphUIJob.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.local.callgraph;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.draw2d.LightweightSystem;
-import org.eclipse.draw2d.parts.ScrollableThumbnail;
-import org.eclipse.linuxtools.systemtap.local.callgraph.graphlisteners.AutoScrollSelectionListener;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Canvas;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.progress.UIJob;
-
-/**
- * Initializes and runs a StapGraph and TreeViewer within the SystemTap View
- *
- * @author chwang
- *
- */
-public class GraphUIJob extends UIJob{
- private StapGraph g;
- private StapGraphParser parser;
- private static int treeSize = 200;
-
-
- public StapGraph getGraph() {
- return g;
- }
-
- public GraphUIJob(String name, StapGraphParser parser) {
- super(name);
- //CREATE THE SHELL
- this.parser = parser;
- }
-
- @Override
- public IStatus runInUIThread(IProgressMonitor monitor) {
-
- Display disp = Display.getCurrent();
- if (disp == null)
- disp = Display.getDefault();
-
-
- //-------------Initialize shell, menu
- treeSize = 200;
-
-
- //OPEN UP THE SYSTEMTAPVIEW IF IT IS NOT ALREADY OPEN
- CallgraphView.forceDisplay();
-
- Composite treeComp = CallgraphView.makeTreeComp(treeSize);
- Composite graphComp = CallgraphView.makeGraphComp();
- graphComp.setBackgroundMode(SWT.INHERIT_FORCE);
-
-
- //Create papa canvas
- Canvas papaCanvas = new Canvas(graphComp, SWT.BORDER);
- GridLayout papaLayout = new GridLayout(1, true);
- papaLayout.horizontalSpacing=0;
- papaLayout.verticalSpacing=0;
- papaLayout.marginHeight=0;
- papaLayout.marginWidth=0;
- papaCanvas.setLayout(papaLayout);
- GridData papaGD = new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false);
- papaGD.widthHint=160;
- papaCanvas.setLayoutData(papaGD);
-
-
- //Add first button
- Image image = new Image(disp, CallGraphConstants.PLUGIN_LOCATION+"icons/up.gif"); //$NON-NLS-1$
- Button up = new Button(papaCanvas, SWT.PUSH);
- GridData buttonData = new GridData(SWT.CENTER, SWT.CENTER, true, false);
- buttonData.widthHint = 150;
- buttonData.heightHint = 20;
- up.setData(buttonData);
- up.setImage(image);
-
-
- //Add thumb canvas
- Canvas thumbCanvas = new Canvas(papaCanvas, SWT.NONE);
-
-
- //Add second button
- image = new Image(disp, CallGraphConstants.PLUGIN_LOCATION+"icons/down.gif"); //$NON-NLS-1$
- Button down = new Button(papaCanvas, SWT.PUSH);
- buttonData = new GridData(SWT.CENTER, SWT.CENTER, true, false);
- buttonData.widthHint = 150;
- buttonData.heightHint = 0;
- down.setData(buttonData);
- down.setImage(image);
-
-
- //Initialize graph
- g = new StapGraph(graphComp, SWT.BORDER, treeComp, papaCanvas);
- g.setLayoutData(new GridData(this.getDisplay().getPrimaryMonitor().getBounds().width - 200,this.getDisplay().getPrimaryMonitor().getBounds().height - 200));
-
- up.addSelectionListener(new AutoScrollSelectionListener(
- AutoScrollSelectionListener.AutoScroll_up, g));
- down.addSelectionListener(new AutoScrollSelectionListener(
- AutoScrollSelectionListener.AutoScroll_down, g));
-
-
- //Initialize thumbnail
- GridData thumbGD = new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false);
- thumbGD.widthHint=160;
- thumbCanvas.setLayoutData(thumbGD);
- LightweightSystem lws = new LightweightSystem(thumbCanvas);
- ScrollableThumbnail thumb = new ScrollableThumbnail(g.getViewport());
- thumb.setSource(g.getContents());
- lws.setContents(thumb);
-
- //-------------Load graph data
- g.loadData(SWT.NONE, 0, StapGraph.CONSTANT_TOP_NODE_NAME, 1, 1, -1, false, ""); //$NON-NLS-1$
- boolean marked = false;
- String msg = ""; //$NON-NLS-1$
-
-
- for (int id_parent : parser.serialMap.keySet()) {
- if (g.getData(id_parent) == null) {
- if (parser.markedMap.get(id_parent) != null) {
- marked = true;
- msg = parser.markedMap.get(id_parent);
- }
- g.loadData(SWT.NONE, id_parent, parser.serialMap.get(id_parent), parser.timeMap.get(id_parent),
- 1, 0, marked, msg);
- }
-
- for (int id_child : parser.outNeighbours.get(id_parent)) {
-
- if (monitor.isCanceled()) {
- return Status.CANCEL_STATUS;
- }
-
- marked = false;
- msg = ""; //$NON-NLS-1$
- if (parser.markedMap.get(id_child) != null) {
- marked = true;
- msg = parser.markedMap.get(id_child);
- }
- if (id_child != -1) {
- if (parser.timeMap.get(id_child) == null){
- g.loadData(SWT.NONE, id_child, parser.serialMap
- .get(id_child), parser.timeMap.get(0),
- 1, id_parent, marked,msg);
- }else{
- g.loadData(SWT.NONE, id_child, parser.serialMap
- .get(id_child), parser.timeMap.get(id_child),
- 1, id_parent, marked,msg);
- }
- }
- }
-
- }
-
-
- g.aggregateCount = parser.countMap;
- g.aggregateTime = parser.cumulativeTimeMap;
-
- //Set total time
- g.setTotalTime(parser.totalTime);
-
- //-------------Finish initializations
- //Generate data for collapsed nodes
- g.recursivelyCollapseAllChildrenOfNode(g.getTopNode());
- if (monitor.isCanceled()) {
- return Status.CANCEL_STATUS;
- }
- g.initializeTree();
- g.setLastFunctionCalled(parser.lastFunctionCalled);
-
-
- if (monitor.isCanceled()) {
- return Status.CANCEL_STATUS;
- }
- g.setFocus();
- g.setCallOrderList(parser.callOrderList);
-
- g.setProject(parser.project);
-
- CallgraphView.setValues(graphComp, treeComp, g, parser);
- CallgraphView.createPartControl();
- g.draw(StapGraph.CONSTANT_DRAWMODE_RADIAL, StapGraph.CONSTANT_ANIMATION_SLOW,
- g.getFirstUsefulNode());
-
- return Status.OK_STATUS;
- }
-
-
- /**
- * Returns number of StapData objects created
- * @return
- */
- public int getNumberOfDataNodes() {
- return g.getDataMapSize();
- }
-
-
- /**
- * For easier JUnit testing only. Allows public access to run method without scheduling an extra job.
- *
- * @param m
- * @return
- */
- public IStatus testRun(IProgressMonitor m) {
- return runInUIThread(m);
- }
-
-
-}
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/Messages.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/Messages.java
deleted file mode 100644
index cdadf95b69..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/Messages.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.callgraph;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Messages {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.systemtap.local.callgraph.messages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
- private Messages() {
- }
-
- 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.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapData.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapData.java
deleted file mode 100644
index 1657272e78..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapData.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.callgraph;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.TreeMap;
-
-/**
- * Contains information to populate StapNodes with
- *
- */
-public class StapData {
- public boolean expandable;
- public int id; //id of the StapNode
- public long time;
- public int called;
- public int caller;
- public int style;
- public int levelOfRecursion;
- public String name;
- public boolean noCaller;
- public List<Integer> callees;
- public List<Integer> collapsedCallees;
- private StapGraph graph;
- public boolean hasCollapsedChildren;
- public boolean isCollapsed;
- public boolean onlyChildWithThisName;
- private boolean partOfCollapsedNode;
- public int collapsedCaller;
- private boolean marked;
- public String markedMessage;
-
- public boolean isPartOfCollapsedNode() {
- return partOfCollapsedNode;
- }
-
-
-
-
- /**
- * Initialize StapData object
- *
- * @param graphModel
- * @param style
- * @param txt
- * @param time
- * @param called
- * @param currentID
- * @param caller
- * @param isMarked
- * @param message
- */
- public StapData(StapGraph graphModel, int style, String txt,
- long time, int called, int currentID, int caller, boolean isMarked, String message) {
- this.time = time;
- this.style = style;
- this.called = called;
- this.expandable = false;
- callees = new ArrayList<Integer>();
- collapsedCallees = new ArrayList<Integer>();
- this.id = currentID;
- this.name = txt;
- this.graph = graphModel;
- this.hasCollapsedChildren = false;
- this.isCollapsed = false;
- this.onlyChildWithThisName = false;
- this.partOfCollapsedNode= false;
- this.collapsedCaller = -1;
- this.caller = caller;
- this.levelOfRecursion = 0;
- this.marked = isMarked;
- this.markedMessage = message;
-
-
- //Add this data to the caller's list of IDs
- if (this.caller != -1) {
- if (graphModel.getData(this.caller) != null) {
- graphModel.getData(this.caller).addCallee(this.id, this.time);
- this.levelOfRecursion = graphModel.getData(this.caller).levelOfRecursion + 1;
- }
- }
-
- //---------------Recursion management
- //Insert new level if necessary
- if (graphModel.levels.get(levelOfRecursion) == null)
- graphModel.levels.put(levelOfRecursion, new ArrayList<Integer>());
- graphModel.levels.get(levelOfRecursion).add(this.id);
-
- //Keep track of the lowest level of recursion
- if (levelOfRecursion > graphModel.getLowestLevelOfNodesAdded())
- graphModel.setLowestLevelOfNodesAdded(levelOfRecursion);
-
-
- this.noCaller = (caller == -1) ? true : false;
- }
-
-
- /**
- * Add the given id to my list of children/callees. Sort based on time
- *
- * @param id
- * @return
- */
- public int addCallee(int id, long time) {
-
- //TODO: This is phenomenally inefficient. We should just add them all
- //then call a sort once instead of doing some crazy n! insertion :P
-
- //Insert id based on its time
- int size = callees.size();
-
- if (size ==0) {
- callees.add(id);
- return callees.size();
- }
- int position = search(time);
-
- if (position == -1) callees.add(id);
- else callees.add(position, id);
-
- return callees.size();
- }
-
-
- /**
- * Returns the proper position in callees list for the node with the given time.
- * Afterwards an insert at the return value will put the node in the right spot.
- * @param time
- * @return location in callees
- */
- private int search(long time) {
- if (time > graph.getData(callees.get(0)).time)
- return 0;
-
- for (int i = 1; i < callees.size(); i++) {
- if (time < graph.getData(callees.get(i -1)).time &&
- time > graph.getData(callees.get(i)).time)
- return i;
- }
-
- return -1;
- }
-
-
- /**
- * Creates a node in the given graphModel using this stapData
- * @param graphModel
- * @return the generated stapNode
- */
-
- public StapNode makeNode(StapGraph graphModel) {
- return new StapNode(graphModel, style, this);
- }
-
- /**
- * Sort the list of callees according to time
- */
- public void sortByTime(){
- TreeMap<Long,ArrayList<StapData>> tempList = new TreeMap<Long,ArrayList<StapData>>();
- //INDEX ALL THE STAPDATA INTO AN ARRAY AT THE CALCULATED INDEX
- //SCATTERED INDICES : 0,1,...,5,..,10
- for (int val : collapsedCallees){
- if (tempList.get(graph.getData(val).time) == null){
- tempList.put(graph.getData(val).time, new ArrayList<StapData>());
- }
-
- tempList.get(graph.getData(val).time).add(graph.getData(val));
- }
-
- collapsedCallees.clear();
- int count = 0;
- // ANOTHER PASS THROUGH TO INDEX CONTINUOUSLY 0,1,2,..
- for (long i : tempList.descendingKeySet()) {
- for (StapData j : tempList.get(i)){
- collapsedCallees.add(count, j.id);
- }
- count++;
- }
-
- }
-
- /**
- * Indicate that this StapData is part of a collapsed node (will not be drawn in
- * uncollapsed mode)
- * @param partOfCollapsedNode
- */
- public void setPartOfCollapsedNode(boolean partOfCollapsedNode) {
- this.partOfCollapsedNode = partOfCollapsedNode;
- }
-
- /**
- * Indicate that this StapData was marked by the user
- */
- public void setMarked() {
- marked = true;
- }
-
- /**
- * Check if this StapData is marked
- * @return
- */
- public boolean isMarked() {
- return marked;
- }
-
-
-
-
- public boolean isOnlyChildWithThisName() {
- return onlyChildWithThisName;
- }
-
-
-
-
- public void setOnlyChildWithThisName(boolean onlyChildWithThisName) {
- this.onlyChildWithThisName = onlyChildWithThisName;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapGraph.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapGraph.java
deleted file mode 100644
index c0bfe0cd16..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapGraph.java
+++ /dev/null
@@ -1,1832 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.callgraph;
-
-import java.text.NumberFormat;
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Locale;
-import java.util.TreeSet;
-import java.util.Map.Entry;
-
-import org.eclipse.cdt.core.model.ICProject;
-import org.eclipse.draw2d.Animation;
-import org.eclipse.draw2d.Label;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.linuxtools.systemtap.local.callgraph.graphlisteners.StapGraphKeyListener;
-import org.eclipse.linuxtools.systemtap.local.callgraph.graphlisteners.StapGraphMouseListener;
-import org.eclipse.linuxtools.systemtap.local.callgraph.graphlisteners.StapGraphMouseWheelListener;
-import org.eclipse.linuxtools.systemtap.local.callgraph.treeviewer.StapTreeContentProvider;
-import org.eclipse.linuxtools.systemtap.local.callgraph.treeviewer.StapTreeDoubleClickListener;
-import org.eclipse.linuxtools.systemtap.local.callgraph.treeviewer.StapTreeLabelProvider;
-import org.eclipse.linuxtools.systemtap.local.callgraph.treeviewer.StapTreeListener;
-import org.eclipse.linuxtools.systemtap.local.core.MP;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Canvas;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.zest.core.widgets.Graph;
-import org.eclipse.zest.core.widgets.GraphNode;
-import org.eclipse.zest.layouts.LayoutStyles;
-
-
-public class StapGraph extends Graph {
-
- public static final String CONSTANT_TOP_NODE_NAME = Messages.getString("StapGraph.0"); //$NON-NLS-1$
- public static final int CONSTANT_HORIZONTAL_SPACING = 50;
- public static final int CONSTANT_DRAWMODE_BOX = 0;
- public static final int CONSTANT_DRAWMODE_RADIAL = 1;
- public static final int CONSTANT_DRAWMODE_TREE = 2;
- public static final int CONSTANT_DRAWMODE_AGGREGATE = 3;
- public static final int CONSTANT_ANIMATION_SLOW = 1;
- public static final int CONSTANT_ANIMATION_FASTER = 2;
- public static final int CONSTANT_ANIMATION_FASTEST = 3;
- public static final int CONSTANT_MAX_NUMBER_OF_SIBLINGS = 3;
- public static final int CONSTANT_MAX_NUMBER_OF_RADIAL_SIBLINGS = 15;
- public static final int CONSTANT_VERTICAL_INCREMENT = 50;
- public static final int CONSTANT_HORIZONTAL_SPACING_FOR_BOX = 150;
- public static final Color CONSTANT_HAS_PARENT = new Color(Display.getCurrent(), 240, 200,
- 200);
- public static final Color CONSTANT_HAS_CHILDREN = new Color(Display.getCurrent(), 200,
- 250, 200);
- public static final Color CONSTANT_MARKED = new Color(Display.getCurrent(), 210, 112, 214);
- private int ANIMATION_TIME = 500;
- //Draw level management
- private int topLevelToDraw;
- private int bottomLevelToDraw;
- private int topLevelOnScreen;
- public static int levelBuffer = 30;
- private static int maxNodes = 150;
-
-
- private int lowestLevelOfNodesAdded;
- public HashMap<Integer, List<Integer>> levels; //Level number, list of node ids
-
-
- //Node management
- private int idOfLastNode;
- private HashMap<Integer, StapNode> nodeMap; // HashMap of current nodes
- private HashMap<Integer, StapData> nodeDataMap; // HashMap of all data
-
- public List<GraphNode> aggregateNodes;
- public HashMap<String, Long> aggregateTime;
- public HashMap<String, Integer> aggregateCount;
- private HashMap <Integer, Integer> collapsedLevelSize;
- public List<Integer> markedNodes;
- public List<Integer> markedCollapsedNodes;
-
- //Modes
- private boolean collapse_mode;
- private int draw_mode;
- private int animation_mode;
-
- //Time
- private long totalTime;
-
- //The current center/top of the nodes list
- private int rootVisibleNodeNumber;
-
- //Special cases
- private boolean killInvalidFunctions; //Toggle hiding of invalid functions
-
- //Tree viewer
- private static TreeViewer treeViewer;
- private Composite treeComp;
- private static IDoubleClickListener treeDoubleListener;
- public HashMap<Integer, Integer> currentPositionInLevel;
- //(level, next horizontal position to place a node)
-
- //For cycling through marked nodes
- private int nextMarkedNode;
-
- //Zooming factor
- public double scale;
-
- private int counter; //All purpose counting variable
-
-
- private ArrayList<Integer> callOrderList;
- private int lastFunctionCalled;
- private Canvas thumbCanvas;
-
-
- private ICProject project;
-
- private int treeLevelFromRoot;
- public StapGraphMouseListener getMouseListener() {
- return mListener;
- }
-
-
-
- public StapGraphMouseWheelListener getMouseWheelListener() {
- return mwListener;
- }
-
-
-
- public StapGraphKeyListener getKeyListener() {
- return kListener;
- }
-
-
-
- private StapGraphMouseListener mListener;
- private StapGraphMouseWheelListener mwListener;
- private StapGraphKeyListener kListener;
-
- public StapGraph(Composite parent, int style, Composite treeComp, Canvas tCanvas) {
- super(parent, style);
-
- //-------------Initialize variables
- thumbCanvas = tCanvas;
- nodeMap = new HashMap<Integer, StapNode>();
- levels = new HashMap<Integer, List<Integer>>();
- nodeDataMap = new HashMap<Integer, StapData>();
- aggregateTime = new HashMap<String, Long>();
- aggregateCount = new HashMap<String, Integer>();
- currentPositionInLevel = new HashMap<Integer, Integer>();
- collapsedLevelSize = new HashMap<Integer, Integer>();
- markedNodes = new ArrayList<Integer>();
- markedCollapsedNodes = new ArrayList<Integer>();
- animation_mode = 1;
- idOfLastNode = 0;
- rootVisibleNodeNumber=0;
- totalTime = 0;
- collapse_mode = false;
- killInvalidFunctions = true;
- nextMarkedNode = -1;
- scale = 1;
- treeLevelFromRoot = 0;
-
- this.treeComp = treeComp;
- if (treeViewer == null || treeViewer.getControl().isDisposed()) {
- //Only create once
- treeViewer = new TreeViewer(this.treeComp);
- StapTreeListener stl = new StapTreeListener(treeViewer.getTree().getHorizontalBar());
- treeViewer.addTreeListener(stl);
- }
-
- //-------------Add listeners
- mListener = new StapGraphMouseListener(this);
- kListener = new StapGraphKeyListener(this);
- mwListener = new StapGraphMouseWheelListener(this);
- this.addMouseListener(mListener);
- this.addKeyListener(kListener);
- this.addMouseWheelListener(mwListener);
-
- }
-
-
-
- /**
- * Initialize the treeviewer with data from the graph
- */
- public void initializeTree() {
- if (treeViewer.getContentProvider() == null) {
- StapTreeContentProvider scp = new StapTreeContentProvider();
- treeViewer.setContentProvider(scp);
- }
-
- ((StapTreeContentProvider) treeViewer.getContentProvider()).setGraph(this);
-
- if (treeViewer.getLabelProvider() != null)
- treeViewer.getLabelProvider().dispose();
- StapTreeLabelProvider prov = new StapTreeLabelProvider();
- treeViewer.setLabelProvider(prov);
-
- if (treeDoubleListener != null) {
- treeViewer.removeDoubleClickListener(treeDoubleListener);
- }
- treeDoubleListener = new StapTreeDoubleClickListener(treeViewer, this);
- treeViewer.addDoubleClickListener(treeDoubleListener);
-
- treeViewer.setInput(getData(getTopNode()));
- treeViewer.refresh();
- }
-
-
- /**
- * Create a new StapData object with the given parameters
- *
- * @param style
- * @param id
- * @param txt
- * @param time
- * @param called
- * @param caller
- * @return
- */
- public int loadData(int style, int id, String txt, long time, int called,
- int caller, boolean isMarked, String message) {
- //-------------Invalid function catching
- // Catches some random C/C++ directive functions
- if (id < 10 && killInvalidFunctions) {
- if (txt.contains(")")) { //$NON-NLS-1$
- return -1;
- } else if (txt.contains(".")) { //$NON-NLS-1$
- return -1;
- } else if (txt.contains("\"")) { //$NON-NLS-1$
- return -1;
- }
- }
-
- //-------------Add node to appropriate map/list
- StapData n = new StapData(this, style, txt, time, called, id, caller, isMarked, message);
- if (isMarked)
- markedNodes.add(id);
- nodeDataMap.put(id, n);
-
- // Make no assumptions about the order that data is input
- if (id > idOfLastNode)
- idOfLastNode = id;
- return id;
- }
-
- /*
- * Fully functional draw functions
- *
- * -Radial
- * -Tree
- */
-
- /**
- * Draws a 2-node-layer circle
- * Draws all nodes in place.
- * @param centerNode
- */
- public void drawRadial(int centerNode) {
- int radius = Math.min(this.getBounds().width,
- this.getBounds().height)
- / 2 - CONSTANT_VERTICAL_INCREMENT;
-
- rootVisibleNodeNumber = centerNode;
- if (nodeMap.get(centerNode) == null) {
- nodeMap.put(centerNode, getNodeData(centerNode).makeNode(this));
- }
-
- // Draw node in center
- StapNode n = nodeMap.get(centerNode);
- int x = this.getBounds().width / 2 - n.getSize().width/2;
- int y = this.getBounds().height / 2 - n.getSize().height;
- n.setLocation(x, y);
-
- if (getData(centerNode).isMarked())
- nodeMap.get(centerNode).setBackgroundColor(CONSTANT_MARKED);
- radialHelper(centerNode, x, y, radius, 0);
- }
-
- /**
- * Helps animation of radial draw. Can be replaced by a draw and moveAll.
- *
- * @param centerNode
- */
- public void preDrawRadial(int centerNode) {
- rootVisibleNodeNumber = centerNode;
-
- if (nodeMap.get(centerNode) == null) {
- nodeMap.put(centerNode, getNodeData(centerNode).makeNode(this));
- StapNode n = nodeMap.get(centerNode);
- n.setLocation(this.getBounds().width / 2, this.getShell()
- .getSize().y / 2);
- }
-
- //Pass coordinates of the node to radialHelper
- StapNode n = nodeMap.get(centerNode);
- int x = n.getLocation().x;
- int y = n.getLocation().y;
- radialHelper(centerNode, x, y, 0, 0);
- }
-
- /**
- * Completes radial-mode draws
- *
- * @param id
- * @param x
- * @param y
- * @param radius
- * @param startFromChild
- */
- public void radialHelper(int id, int x, int y, int radius, int startFromChild) {
- //-------------Draw parent node
- // Draw caller node right beside this one, in a different color
- int callerID = nodeDataMap.get(id).caller;
- if (callerID != -1) {
- if (getNode(callerID) == null) {
- nodeMap.put(callerID, getNodeData(callerID).makeNode(this));
- }
- getNode(callerID).setBackgroundColor(CONSTANT_HAS_PARENT);
- getNode(callerID).setLocation(x + radius / 5, y - radius / 5);
- if (getNode(id).connection == null) {
- getNode(id).makeConnection(SWT.NONE, getNode(callerID), getData(id).called);
- }
-
- if (getData(callerID).isMarked())
- nodeMap.get(callerID).setBackgroundColor(CONSTANT_MARKED);
- }
-
-
- //-------------Draw children nodes
- List<Integer> nodeList;
- if (!collapse_mode) {
- nodeList = nodeDataMap.get(id).callees;
- }
- else {
- nodeList = nodeDataMap.get(id).collapsedCallees;
- }
-
- int numberOfNodes;
-
- if (nodeList.size() >= CONSTANT_MAX_NUMBER_OF_RADIAL_SIBLINGS ) {
- numberOfNodes = CONSTANT_MAX_NUMBER_OF_RADIAL_SIBLINGS;
- }
- else
- numberOfNodes = nodeList.size();
-
-
- double angle;
- if (numberOfNodes > 5)
- angle = 2 * Math.PI / numberOfNodes;
- else
- angle = 2 * Math.PI / CONSTANT_MAX_NUMBER_OF_RADIAL_SIBLINGS;
-
- int i = 0;
-
- for (i = 0; i < numberOfNodes; i++) {
-
-
- int subID = nodeList.get(i);
- int yOffset = 0;
- int xOffset = 0;
- if (nodeMap.get(subID) == null) {
- nodeMap.put(subID, getNodeData(subID).makeNode(this));
- }
-
- StapNode subN = nodeMap.get(subID);
- if (radius != 0) {
- yOffset = (int) (radius * Math.cos(angle * i));
- xOffset = (int) (radius * Math.sin(angle * i) + StapNode.getNodeSize()*Math.sin(angle*i)*3);
- }
-
-
- if (hasChildren(subID))
- subN.setBackgroundColor(CONSTANT_HAS_CHILDREN);
- subN.setLocation(x + xOffset, y + yOffset);
- if (subN.connection == null) {
- subN.makeConnection(SWT.NONE, nodeMap.get(id), nodeDataMap
- .get(subID).called);
- }
-
- if (getData(subID).isMarked())
- subN.setBackgroundColor(CONSTANT_MARKED);
- }
- }
-
-
- /**
- * THE AGGREGATE VIEW FROM VIEW -> AGGREGATE VIEW
- */
- public void drawAggregateView(){
-
- //TEMPORARY STORAGE OF THE ENTRIES
- //IMPLEMENTS A COMPARATOR TO STORE BY ORDER OF THE VALUE
- TreeSet<Entry<String, Long>> sortedValues = new TreeSet<Entry<String, Long>>(StapGraph.VALUE_ORDER);
- sortedValues.addAll(aggregateTime.entrySet());
-
-
- if (aggregateNodes == null){
- aggregateNodes = new ArrayList<GraphNode>();
- }else{
- aggregateNodes.clear();
- }
-
- //-------------Format numbers
- float percentage_time;
- float percentage_count;
- int maxTimesCalled = 0;
- final int colorLevels = 15;
- final int colorLevelDifference = 12;
- int primary;
- int secondary;
-
- NumberFormat num = NumberFormat.getInstance(Locale.CANADA);
- num.setMinimumFractionDigits(2);
- num.setMaximumFractionDigits(2);
-
- //FIND THE MOST TIMES A FUNCTION IS CALLED
- for (int val : aggregateCount.values()){
- if ( val > maxTimesCalled){
- maxTimesCalled = val;
- }
- }
-
- //-------------Draw nodes
- for (Entry<String, Long> ent : sortedValues) {
-
- GraphNode n = new GraphNode(this.getGraphModel(),SWT.NONE);
- aggregateNodes.add(n);
-
- percentage_count = (float)aggregateCount.get(ent.getKey()) / (float)maxTimesCalled;
- percentage_time = ((float) ent.getValue() / this
- .getTotalTime() * 100);
- n.setText(ent.getKey() + "\n" //$NON-NLS-1$
- + num.format((float)percentage_time) + "%" + "\n" //$NON-NLS-1$ //$NON-NLS-2$
- + aggregateCount.get(ent.getKey()) + "\n") ; //$NON-NLS-1$
- n.setData("AGGREGATE_NAME", ent.getKey()); //$NON-NLS-1$
-
-
- primary = (int)(percentage_count * colorLevels * colorLevelDifference);
- secondary = (colorLevels * colorLevelDifference) - (int)(percentage_count * colorLevels * colorLevelDifference);
-
- primary = Math.max(0, primary);
- secondary = Math.max(0, secondary);
-
- primary = Math.min(primary, 255);
- secondary = Math.min(secondary, 255);
-
-
- Color c = new Color(this.getDisplay(),primary,0,secondary);
- n.setBackgroundColor(c);
- n.setHighlightColor(c);
- n.setForegroundColor(new Color(this.getDisplay(),255,255,255));
- n.setTooltip(new Label(
- Messages.getString("StapGraph.2")+ ent.getKey() + "\n" //$NON-NLS-1$ //$NON-NLS-2$
- + Messages.getString("StapGraph.3") + num.format((float)percentage_time) + "%" + "\n" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- + Messages.getString("StapGraph.1") + aggregateCount.get(ent.getKey()) //$NON-NLS-1$
- ));
- n.setBorderWidth(2);
- }
-
- //Set layout to gridlayout
- this.setLayoutAlgorithm(new AggregateLayoutAlgorithm(LayoutStyles.NONE, sortedValues, this.getTotalTime(), this.getBounds().width), true);
- }
-
-
-
- /**
- * Draws a tree starting with node id, putting node id at location x,y
- * @param id
- * @param x
- * @param y
- */
- public void drawTree(int id, int x, int y) {
-
- //-------------Create node id
- // Create and set
- if (nodeMap.get(id) == null) {
- nodeMap.put(id, getData(id).makeNode(this));
- }
- StapNode n = getNode(id);
- n.setLocation(x,y);
- n.setSize(n.getSize().width/scale, n.getSize().height/scale);
-
- //This is the lowest level of nodes to draw, and it still has kids
- if (getLevelOfNode(id) == bottomLevelToDraw &&
- getData(id).callees.size() > 0)
- n.setBackgroundColor(CONSTANT_HAS_CHILDREN);
-
- if (getData(id).isMarked())
- n.setBackgroundColor(CONSTANT_MARKED);
-
-
- //-------------Get appropriate list of children
- List<Integer> callees = null;
- int usefulSize = 0;
-
- // Determine which list of callees to use
- if (!collapse_mode)
- callees = getData(id).callees;
- else
- callees = getData(id).collapsedCallees;
- if (callees == null)
- return;
-
- int cLevel = getLevelOfNode(id) + 1;
-
- if (!collapse_mode) {
- if (levels.get(cLevel) != null) {
- usefulSize = levels.get(cLevel).size() - collapsedLevelSize.get(cLevel);
- }
- }
- else {
- if (collapsedLevelSize.get(cLevel) != null)
- usefulSize = collapsedLevelSize.get(cLevel);
- }
- //-------------Draw all children
- for (int i = 0; i < callees.size(); i++) {
- //Find the number of nodes on this level for spacing purposes
- int childID = callees.get(i);
- int childLevel = getLevelOfNode(childID);
-
-
- //Initialise the offset to roughly centre the nodes
- if (currentPositionInLevel.get(getLevelOfNode(childID)) == null) {
- int tmp = (int) (CONSTANT_HORIZONTAL_SPACING*(usefulSize-1) * -1/scale);
- currentPositionInLevel.put(childLevel, getNode(rootVisibleNodeNumber)
- .getLocation().x + tmp);
- }
-
- //Recursive iteration
- if (childLevel <= bottomLevelToDraw &&
- childLevel <= lowestLevelOfNodesAdded) {
- drawTree(callees.get(i), currentPositionInLevel.get(childLevel),
- y + (int)(CONSTANT_VERTICAL_INCREMENT/scale));
-
- //Do not scale newSize or nodes will no longer be adjacent
- int newSize = currentPositionInLevel.get(getLevelOfNode(childID))
- + getNode(childID).getSize().width;
-
- //Leave a small blank space between nodes for aesthetic purposes
- if (i == callees.size() - 1)
- newSize += CONSTANT_HORIZONTAL_SPACING/3;
- currentPositionInLevel.put(getLevelOfNode(childID), newSize);
- }
-
- }
- }
-
- /**
- * Extend the tree downwards
- */
- public void extendTree() {
- if (bottomLevelToDraw >= lowestLevelOfNodesAdded)
- return;
-
-
- StapData data = getData(rootVisibleNodeNumber);
- if (data.callees != null) {
- if (data.callees.size() < 1) {
- return;
- }
- }
-
- List<Integer> list = data.callees;
- if (isCollapseMode())
- list = data.collapsedCallees;
-
- if (list.size() == 1) {
- //Special case - only one child of the root node
- //Therefore change root node to this new root node
- int aMode = animation_mode;
- draw(CONSTANT_DRAWMODE_TREE, CONSTANT_ANIMATION_FASTEST, list.get(0));
- setAnimationMode(aMode);
- return;
- }
-
-
- List<Integer> bottomList = levels.get(bottomLevelToDraw);
- bottomLevelToDraw++;
-
- for (int i : bottomList) {
- if (getNode(i) != null) {
- getNode(i).setBackgroundColor(DEFAULT_NODE_COLOR);
- getParentNode(i).setBackgroundColor(DEFAULT_NODE_COLOR);
- drawTree(i, getNode(i).getLocation().x, getNode(i).getLocation().y);
- }
- }
-
- treeLevelFromRoot++;
- }
-
- /**
- * Removes nodes from the bottom of the tree
- */
- public void shrinkTree() {
- if (treeLevelFromRoot < 1)
- return;
-
-
- bottomLevelToDraw--;
- deleteAll(rootVisibleNodeNumber);
-
- int i = rootVisibleNodeNumber;
- currentPositionInLevel.clear();
- drawTree(i, getNode(i).getLocation().x, getNode(i).getLocation().y);
-
- treeLevelFromRoot--;
- }
-
- /**
- * Moves all nodes to the point x,y
- * @param x
- * @param y
- */
- public void moveAllNodesTo(int x, int y) {
- for (int i: nodeMap.keySet()) {
- nodeMap.get(i).setLocation(x,y);
- }
- }
-
- /*
- * Partially functional draw functions
- *
- * -Box (drawFromBottomToTop)
- * Breaks when switching modes??
- */
-
-
- /**
- * Draws a tree roughly starting from node id
- */
- public void drawBox(int id, int x, int y) {
- setLevelLimits(id);
- int MaxLevelPixelWidth = 1;
- int currPixelWidth = 1;
-
- // FIND THE LEVEL THAT WILL BE THE WIDEST
- // WILL BE A USEFUL VALUE LATER ON
- int count;
-
-
- for (int i = topLevelToDraw; i <= bottomLevelToDraw; i++) {
- count = 0;
- levels.get(i).add(0, count);
- int size = levels.get(i).size();
- for (int j = 1; j < size; j++){
- int val = levels.get(i).get(j);
- if (collapse_mode && nodeDataMap.get(val).isPartOfCollapsedNode()) {
- continue;
- }
- if (!collapse_mode && nodeDataMap.get(val).isCollapsed)
- continue;
-
- currPixelWidth += nodeDataMap.get(val).name.length() * 10 + StapGraph.CONSTANT_HORIZONTAL_SPACING_FOR_BOX;
- if (MaxLevelPixelWidth < currPixelWidth) {
- MaxLevelPixelWidth = currPixelWidth;
- }
- count++;
- levels.get(i).remove(0);
- levels.get(i).add(0, count);
- }
- currPixelWidth = 1;
- }
-
- MaxLevelPixelWidth = (int)(MaxLevelPixelWidth/scale);
- counter = 0;
- if (id == getFirstUsefulNode())
- nodeMap.get(id).setLocation(150 + (MaxLevelPixelWidth/2),y);
-
- drawFromBottomToTop(bottomLevelToDraw, y
- + ((bottomLevelToDraw - topLevelToDraw ) * 3 * (int)(CONSTANT_VERTICAL_INCREMENT/scale)),
- MaxLevelPixelWidth);
-
- if (id == getFirstUsefulNode())
- nodeMap.get(id).setLocation(150 + (MaxLevelPixelWidth/2),y);
- }
-
- public void drawFromBottomToTop(int level, int height,
- int MaxLevelPixelWidth) {
-
- // FINISHED DRAWING THE ROOT IN THE LAST RECURSIVE CALL
- if (level == 0 || level < topLevelToDraw ) {
- return;
- }
-
- // FIND ALL THE CHILDREN AT LEVEL 'level'
- int total = levels.get(level).remove(0);
- int count = 1;
-
- //CREATE THE NODES
- for (int i = 0; i < levels.get(level).size(); i ++) {
- int id = levels.get(level).get(i);
-
- if (collapse_mode && nodeDataMap.get(id).isPartOfCollapsedNode()) {
- continue;
- }
- if (!collapse_mode && nodeDataMap.get(id).isCollapsed)
- continue;
-
- if (nodeMap.get(id) == null) {
- nodeMap.put(id, getNodeData(id).makeNode(this));
- }
-
- StapNode n = nodeMap.get(id);
-
- n.setVisible(true);
- n.setSize(n.getSize().width/scale, n.getSize().height/scale);
- //Placement algorithm
- if (getAnimationMode() == CONSTANT_ANIMATION_SLOW){
-
- if (counter <= ANIMATION_TIME)
- Animation.markBegin();
- n.setLocation(150 + (nodeMap.get(getRootVisibleNodeNumber()).getLocation().x),nodeMap.get(getRootVisibleNodeNumber()).getLocation().y);
- n.setLocation(150 + (MaxLevelPixelWidth / (total + 1) * count),height);
-
- if (counter <= ANIMATION_TIME) {
- Animation.run(ANIMATION_TIME/nodeMap.size()/3);
- counter+=ANIMATION_TIME/nodeMap.size();
- }
-
- }else{
- n.setLocation(150 + (MaxLevelPixelWidth / (total + 1) * count),height);
- }
-
- //IF WE CANNOT DISPLAY ALL NODES COLOUR NODES ON BOTTOM THAT STILL HAVE CHILDREN
- if (level == bottomLevelToDraw && nodeDataMap.get(id).callees.size() != 0){
- n.setBackgroundColor(CONSTANT_HAS_CHILDREN);
- }
-
-
-
- if (getData(n.id).isMarked())
- n.setBackgroundColor(CONSTANT_MARKED);
-
-
- // FIND ALL THE NODES THAT THIS NODE CALLS AND MAKE CONNECTIONS
- List<Integer> setOfCallees = null;
- if (collapse_mode)
- setOfCallees = nodeDataMap.get(id).collapsedCallees;
- else
- setOfCallees = nodeDataMap.get(id).callees;
-
- for (int val : setOfCallees) {
- if (nodeMap.get(val) != null)
- nodeMap.get(val).makeConnection(SWT.NONE, n,
- nodeDataMap.get(val).called);
- }
-
- count++;
- }
- // DRAW THE NEXT LEVEL UP
- drawFromBottomToTop(level - 1, height - (3 * (int)(CONSTANT_VERTICAL_INCREMENT/scale)),
- MaxLevelPixelWidth);
- }
-
-
-
- /*
- * Level/node management
- */
-
- /**
- * Delete all nodes except for the node with the specified nodeID
- *
- * @param exception
- * - id of node NOT to delete (use -1 for 'no exceptions')
- */
- public void deleteAll(int exception) {
- //-------------Delete aggregate nodes
- if (aggregateNodes != null){
- for (GraphNode n : aggregateNodes){
- n.dispose();
- }
- aggregateNodes.clear();
- }
-
- //-------------Save exception node's location
- int x = -1;
- int y = -1;
- if (exception != -1 && nodeMap.get(exception) != null) {
- x = nodeMap.get(exception).getLocation().x;
- y = nodeMap.get(exception).getLocation().y;
- }
-
- //-------------Delete all nodes
- for (int i : nodeMap.keySet()) {
- StapNode node = nodeMap.get(i);
- if (node == null)
- continue;
-
- node.unhighlight();
- node.dispose();
- }
- nodeMap.clear();
-
- //-------------Recreate exception
- if (x != -1 && y != -1) {
- StapNode n =getData(exception).makeNode(this);
- n.setLocation(x,y);
- n.highlight();
- nodeMap.put(exception, n);
- }
- }
-
- /**
- * Delete a number of levels from the top of the graph
- *
- * @param numberOfLevelsToDelete
- */
- private void deleteLevelsFromTop(int numberOfLevelsToDelete) {
-
- if (numberOfLevelsToDelete <= 0)
- return;
-
- for (int i = 0; i < numberOfLevelsToDelete; i++) {
- List<Integer> level = levels.get(topLevelToDraw);
- for (int j = 0; j < level.size(); j++) {
- if (nodeMap.get(level.get(j)) != null)
- nodeMap.remove(level.get(j)).dispose();
- }
- topLevelToDraw++;
- }
- }
-
- /**
- * Delete a number of levels from the bottom of the graph
- *
- * @param numberOfLevelsToDelete
- */
- private void deleteLevelsFromBottom(int numberOfLevelsToDelete) {
-
- if (numberOfLevelsToDelete <= 0)
- return;
-
- for (int i = 0; i < numberOfLevelsToDelete; i++) {
- List<Integer> level = levels.get(getBottomLevelToDraw());
-
- for (int j = 0; j < level.size(); j++) {
- if (nodeMap.get(level.get(j)) != null)
- nodeMap.remove(level.get(j)).dispose();
- }
- bottomLevelToDraw--;
- }
- }
-
- /**
- * Sets top level limit to the level of id, bottom level limit to top level
- * limit + CONSTANT_LEVEL_BUFFER.
- * Deletes extraneous levels, changes topLevelToDraw, bottomLevelToDraw
- *
- * Convenience method: Calls setLevelLimitsToLevel(levelOfNode(id))
- *
- * @param id - node to recenter with
- */
- public void setLevelLimits(int id) {
- setTopLevelTo(getLevelOfNode(id));
- }
-
- /**
- * Sets top level limit to the given level, bottom level limit to top level
- * limit + CONSTANT_LEVEL_BUFFER.
- * Deletes extraneous levels, changes topLevelToDraw, bottomLevelToDraw
- *
- * @param id - node to recenter with
- */
-
- public void setTopLevelTo(int new_topLevelToDraw) {
- changeLevelLimits(new_topLevelToDraw);
-
- int new_bottomLevelToDraw = new_topLevelToDraw + levelBuffer;
- if (new_bottomLevelToDraw > lowestLevelOfNodesAdded)
- new_bottomLevelToDraw = lowestLevelOfNodesAdded;
-
- deleteLevelsFromTop(new_topLevelToDraw - topLevelToDraw);
- deleteLevelsFromBottom(getBottomLevelToDraw() - new_bottomLevelToDraw);
-
- topLevelToDraw = new_topLevelToDraw;
- bottomLevelToDraw = new_bottomLevelToDraw;
- }
-
-
- public boolean changeLevelLimits(int lvl) {
- int numberOfNodes = 0;
- List<Integer> list;
-
- int maxLevel = min(lvl + levelBuffer, lowestLevelOfNodesAdded);
-
- for (int level = lvl; level < maxLevel; level++) {
- for (int id : levels.get(level)) {
- if (isCollapseMode())
- list = getData(id).collapsedCallees;
- else
- list = getData(id).callees;
-
- numberOfNodes += list.size();
-
- if (numberOfNodes > maxNodes) {
- levelBuffer = max(0,level-1);
- return true;
- }
- }
- }
-
- return false;
-
-
- }
-
- /**
- * Convenience method to redraw everything.
- */
- public void draw() {
- draw(getFirstUsefulNode());
- }
-
- /**
- * Convenience method to draw with current draw parameters. Equivalent to
- * draw(graph.draw_mode, graph.animation_mode, id)
- * @param id
- */
- public void draw(int id) {
- draw(draw_mode, animation_mode, id);
- }
-
- /**
- * Convenience method to draw with current draw parameters. Equivalent to
- * draw(graph.draw_mode, animation, id)
- * @param id
- */
- public void draw(int animation, int id) {
- draw(draw_mode, animation, id);
- }
-
-
- /**
- * Draws with the given modes.
- * @param drawMode
- * @param animationMode
- * @param id
- */
- public void draw(int drawMode, int animationMode, int id) {
- setDrawMode(drawMode);
- setAnimationMode(animationMode);
- this.clearSelection();
- treeLevelFromRoot = 0;
- currentPositionInLevel.clear();
-
- this.setRedraw(false);
- if (draw_mode == CONSTANT_DRAWMODE_RADIAL) {
- //Remove thumbnail
- GridData gd = (GridData) thumbCanvas.getLayoutData();
- gd.exclude = true;
- thumbCanvas.setLayoutData(gd);
- thumbCanvas.setVisible(false);
- CallgraphView.layout();
-
-
- //Add treeComp
- gd = (GridData) treeComp.getLayoutData();
- gd.exclude = false;
- treeComp.setLayoutData(gd);
- treeComp.setVisible(true);
- treeViewer.collapseToLevel(getData(id), 1);
- treeViewer.expandToLevel(getData(id), 1);
-
-
- } else if (draw_mode == CONSTANT_DRAWMODE_AGGREGATE){
- //Remove treeComp
- GridData gd = (GridData) treeComp.getLayoutData();
- gd.exclude = true;
- treeComp.setLayoutData(gd);
- treeComp.setVisible(false);
-
- CallgraphView.layout();
- //Remove thumbnail
- gd = (GridData) thumbCanvas.getLayoutData();
- gd.exclude = true;
- thumbCanvas.setLayoutData(gd);
- thumbCanvas.setVisible(false);
- }
- else{
- //Remove treeComp
- GridData gd = (GridData) treeComp.getLayoutData();
- gd.exclude = true;
- treeComp.setLayoutData(gd);
- treeComp.setVisible(false);
-
- CallgraphView.layout();
-
- //Add thumbnail
- gd = (GridData) thumbCanvas.getLayoutData();
- gd.exclude = true;
- thumbCanvas.setLayoutData(gd);
- thumbCanvas.setVisible(true);
- thumbCanvas.setBackground(this.getBackground());
-
-
- }
- //Remove treeComp
- this.setRedraw(true);
-
-
- //-------------Draw tree
- if (draw_mode == CONSTANT_DRAWMODE_TREE) {
- if (animation_mode == CONSTANT_ANIMATION_SLOW) {
- if (nodeMap.get(id) == null)
- nodeMap.put(id, getData(id).makeNode(this));
- int tempX = nodeMap.get(id).getLocation().x;
- int tempY = nodeMap.get(id).getLocation().y;
- Animation.markBegin();
- moveAllNodesTo(tempX, tempY);
- Animation.run(ANIMATION_TIME);
-
- deleteAll(id);
- setLevelLimits(id);
- rootVisibleNodeNumber = id;
- drawTree(id, this.getBounds().width / 2, 20);
- currentPositionInLevel.clear();
-
- this.update();
- Animation.markBegin();
- drawTree(id, this.getBounds().width / 2, 20);
-
- Animation.run(ANIMATION_TIME);
- getNode(id).unhighlight();
- } else {
- deleteAll(id);
- setLevelLimits(id);
- rootVisibleNodeNumber = id;
- drawTree(id, this.getBounds().width / 2, 20);
- getNode(id).unhighlight();
- }
- }
-
-
- //-------------Draw radial
- else if (draw_mode == CONSTANT_DRAWMODE_RADIAL) {
-
- if (animation_mode == CONSTANT_ANIMATION_SLOW) {
- rootVisibleNodeNumber = id;
- deleteAll(id);
-
- preDrawRadial(id);
- this.redraw();
- this.getLightweightSystem().getUpdateManager()
- .performUpdate();
-
- Animation.markBegin();
- nodeMap.get(id).setLocation(this.getBounds().width / 2,
- this.getBounds().height / 2);
- drawRadial(id);
- Animation.run(ANIMATION_TIME);
- CallgraphView.maximizeOrRefresh(false);
- }
-
- else {
- deleteAll(id);
- drawRadial(id);
- }
- }
-
- //-------------Draw box
- else if (draw_mode == CONSTANT_DRAWMODE_BOX) {
- rootVisibleNodeNumber = id;
- if (animation_mode == CONSTANT_ANIMATION_SLOW) {
- if (nodeMap.get(id) == null)
- nodeMap.put(id, getData(id).makeNode(this));
-
- Animation.markBegin();
- moveAllNodesTo(nodeMap.get(id).getLocation().x, nodeMap.get(id).getLocation().y);
- Animation.run(ANIMATION_TIME);
-
- deleteAll(id);
-
- drawBox(id, 0, 0);
-
- } else {
- if (nodeMap.get(id) == null)
- nodeMap.put(id, getData(id).makeNode(this));
- deleteAll(id);
- drawBox(id, 0, 0);
-
- }
- }
-
-
- //-------------Draw aggregate
- else if (draw_mode == CONSTANT_DRAWMODE_AGGREGATE) {
- rootVisibleNodeNumber = getFirstUsefulNode();
- deleteAll(-1);
- drawAggregateView();
- }
-
- //THIS CAUSED A NULL POINTER GOING INTO AGGREGATE VIEW
- if (getNode(id) != null)
- getNode(id).unhighlight();
- clearSelection();
-
- //AFTER FIRST LOADING LET THE GRAPH EXPAND TO FILL THE VIEW
- this.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
- }
-
-
-
- @SuppressWarnings("unchecked")
- /**
- * Unhighlights all selected nodes and sets selection to null
- */
- public void clearSelection() {
- List<GraphNode> list = this.getSelection();
-
- for (GraphNode n : list) {
- if (n != null) n.unhighlight();
- }
- this.setSelection(null);
-
- }
-
- /*
- * THE FOLLOWING METHODS ARE NOT WELL TESTED
- *
- * Some are not thoroughly tested, and some just plain don't work. Use at your peril!
- */
-
- /**
- * Shift the given node to the given location, moving all children nodes
- * accordingly
- *
- *
- * @param id
- * @param x
- * @param y
- */
- public void moveRecursive(int id, int xTarget, int yTarget) {
- if (nodeMap.get(id) != null) {
- int x = nodeMap.get(id).getLocation().x;
- int y = nodeMap.get(id).getLocation().y;
- nodeMap.get(id).setLocation(x + xTarget, y + yTarget);
- }
- //If a node is null, then its children must be null
- else
- return;
-
- List<Integer> list = null;
-
- if (collapse_mode)
- list = nodeDataMap.get(id).collapsedCallees;
- else
- list = nodeDataMap.get(id).callees;
- for (int i = 0; i < list.size(); i++) {
- moveRecursive(list.get(i), xTarget, yTarget);
- }
- }
-
-
- /**
- * Moves all nodes by the given amount. Adds xDiff, yDiff to the current x,y coordinates.
- *
- * Currently unused.
- */
- public void moveAllNodesBy(int xDiff, int yDiff) {
- for (int id : nodeMap.keySet()) {
- if (nodeMap.get(id) == null) continue;
-
- int x = nodeMap.get(id).getLocation().x;
- int y = nodeMap.get(id).getLocation().y;
- getNode(id).setLocation(x + xDiff, y + yDiff);
- }
- }
-
-
-
- /**
- * Recursively collapses all children of node id, and puts them in the
- * collapsedCallees list of id.
- *
- * At the end of this run, each collapsed node will have a list of other
- * collapsed nodes AND a list of non-collapsed nodes. So will node #id.
- *
- * Uncollapsed nodes, however, will not have a list of collapsed nodes attached.
- *
- * @param ID of node to start from (use getFirstUsefulNode() to collapse everything
- * @return True if successful
- */
- public boolean recursivelyCollapseAllChildrenOfNode(int id) {
- //-------------Initialize
- //If all nodes have been collapsed, don't do anything
- setCollapseMode(true);
-
- if (nodeDataMap.get(id).hasCollapsedChildren
- || nodeDataMap.get(id).callees.size() == 0)
- return true;
- nodeDataMap.get(id).hasCollapsedChildren = true;
-
-
-
- // Name, id
- HashMap<String, Integer> newNodeMap = new HashMap<String, Integer>();
- // id of 'collapsed' node, id of its uncollapsed twin
- HashMap<Integer, Integer> collapsedNodesWithOnlyOneNodeInThem = new HashMap<Integer, Integer>();
- int size = nodeDataMap.get(id).callees.size();
-
-
-
- //-------------Iterate
- for (int i = 0; i < size; i++) {
-
- int childID = nodeDataMap.get(id).callees.get(i);
- int childLevel = getLevelOfNode(childID);
- if (collapsedLevelSize.get(childLevel) == null)
- collapsedLevelSize.put(childLevel, 0);
- String nodeName = nodeDataMap.get(childID).name;
-
- /*
- * Aggregate data for the given node
- */
- if (newNodeMap.get(nodeName) != null) {
- int aggregateID = newNodeMap.get(nodeName);
-
- if (collapsedNodesWithOnlyOneNodeInThem.get(aggregateID) != null) {
-
- //-------------Aggregate nodes - second node to be found
- // We still think this is an only child - create a new
- // data node and aggregate
- this.loadData(SWT.NONE, aggregateID, nodeName, nodeDataMap
- .get(childID).time, nodeDataMap.get(childID).called,
- id, nodeDataMap.get(childID).isMarked(), ""); //$NON-NLS-1$
-
- if (getData(aggregateID).isMarked()) {
- markedCollapsedNodes.add(aggregateID);
- markedNodes.remove((Integer) aggregateID);
- }
-
- nodeDataMap.get(id).callees.remove((Integer) aggregateID);
- nodeDataMap.get(id).collapsedCallees.add(aggregateID);
-
- nodeDataMap.get(aggregateID).collapsedCaller = id;
-
- // Aggregate
- int otherChildID = collapsedNodesWithOnlyOneNodeInThem
- .get(aggregateID);
- aggregateData(nodeDataMap.get(aggregateID), nodeDataMap
- .get(otherChildID));
- collapsedNodesWithOnlyOneNodeInThem.remove(aggregateID);
- nodeDataMap.get(aggregateID).callees.addAll(nodeDataMap
- .get(otherChildID).callees);
-
- nodeDataMap.get(otherChildID).setPartOfCollapsedNode(true);
-
- } else
- //-------------Aggregate - third and additional nodes
- aggregateData(nodeDataMap.get(aggregateID), nodeDataMap
- .get(childID));
-
-
- //-------------Complete aggregation
- nodeDataMap.get(aggregateID).callees
- .addAll(nodeDataMap.get(childID).callees);
- nodeDataMap.get(aggregateID).isCollapsed = true;
-
- if (nodeMap.get(childID) != null) {
- nodeMap.get(childID).setLocation(
- nodeMap.get(id).getLocation().x
- - nodeMap.get(id).getSize().width,
- nodeMap.get(id).getLocation().y);
- }
-
- nodeDataMap.get(childID).setPartOfCollapsedNode(true);
- } else {
- //-------------First child with this name
-
- idOfLastNode++;
- newNodeMap.put(nodeName, idOfLastNode);
- collapsedNodesWithOnlyOneNodeInThem.put(idOfLastNode, childID);
- if (nodeMap.get(childID) != null) {
- nodeMap.get(childID).setLocation(
- nodeMap.get(id).getLocation().x,
- nodeMap.get(id).getLocation().y);
- }
-
- int tmp = collapsedLevelSize.get(childLevel) + 1;
- collapsedLevelSize.put(childLevel, tmp);
- }
- }
-
- //-------------Handle nodes that only appeared once
- for (int i : collapsedNodesWithOnlyOneNodeInThem.keySet()) {
- int childID =collapsedNodesWithOnlyOneNodeInThem.get(i);
- nodeDataMap.get(childID).onlyChildWithThisName = true;
- nodeDataMap.get(id).collapsedCallees.add(childID);
- newNodeMap.remove(nodeDataMap.get(childID).name);
- nodeDataMap.get(childID).collapsedCaller = id;
-
- if (getData(childID).isMarked())
- markedCollapsedNodes.add(childID);
- }
-
-
-
- //-------------Finish iterations
- for (int i : nodeDataMap.get(id).collapsedCallees) {
- recursivelyCollapseAllChildrenOfNode(i);
- }
-
- nodeDataMap.get(id).sortByTime();
-
- collapsedNodesWithOnlyOneNodeInThem.clear();
- newNodeMap.clear();
-
- nodeDataMap.get(id).hasCollapsedChildren = true;
- return true;
- }
-
- /**
- * Add time, called values for the two given nodes, storing them inside
- * victim. Also adds marked collapsed nodes to markedCollapsedNodes list
- * @param target
- * @param victim
- */
- public void aggregateData(StapData target, StapData victim) {
- target.time += victim.time;
- target.called += victim.called;
- if (victim.isMarked() || target.isMarked()) {
- target.setMarked();
- markedCollapsedNodes.add(target.id);
- }
- }
-
- /*
- * Convenience methods
- */
-
- /**
- * Prints the name of every node on the given level
- * @param level
- */
- public void printContents(int level) {
- if (levels.get(level) != null)
- return;
- MP.println("Contents of level " + level + ":\n"); //$NON-NLS-1$ //$NON-NLS-2$
- for (int i = 0; i < levels.get(level).size(); i++) {
- MP.println(nodeDataMap.get(levels.get(level).get(i)).name);
- }
- MP.println("---------------------------"); //$NON-NLS-1$
- }
-
- /**
- *
- * @param id of node
- * @return StapNode
- */
- public StapNode getNode(int id) {
- return nodeMap.get(id);
- }
-
- /**
- *
- * @param id of node
- * @return StapData
- */
- public StapData getNodeData(int id) {
- return nodeDataMap.get(id);
- }
-
- /**
- * Recommend using getFirstUsefulNode instead.
- * @return First node in level 0
- */
- public int getTopNode() {
- return levels.get(topLevelToDraw).get(0);
- }
-
- /**
- * Recommend use of this function instead of getTopNode()
- * @return First node that is not the dummy first node
- */
- public int getFirstUsefulNode() {
- int id = 0;
- if (nodeDataMap.get(id).name == CONSTANT_TOP_NODE_NAME) {
- id++;
- }
-
- // Get first node that is not TOP_NODE_NAME
- while (nodeDataMap.get(id) == null) {
- id++;
- }
-
- return id;
- }
-
- /**
- *
- * @return Top level to draw - the level should be defined by draw algorithms
- */
- public int getTopLevel() {
- return topLevelToDraw;
- }
-
- /**
- * Returns the level of recursion associated with the given node.
- * @param nodeID
- * @return
- */
- public int getLevelOfNode(int nodeID) {
- return nodeDataMap.get(nodeID).levelOfRecursion;
- }
-
- /**
- * Returns true if the given node has any children.
- * @param nodeID
- * @return
- */
- public boolean hasChildren(int nodeID) {
- if (nodeDataMap.get(nodeID).callees.size() > 0)
- return true;
- return false;
- }
-
- /**
- * Attempts to set dimensions (not used)
- * @param width
- * @param height
- */
- public void setDimensions(int width, int height) {
- this.getBounds().width = width;
- this.getBounds().height = height;
- }
-
- /**
- * Sets animation mode - all available modes are named
- * StapGraph.CONSTANT_ANIMATION_*
- * @param mode
- */
- public void setAnimationMode(int mode) {
- animation_mode = mode;
- if (mode == CONSTANT_ANIMATION_SLOW){
- CallgraphView.getAnimation_slow().setChecked(true);
- CallgraphView.getAnimation_fast().setChecked(false);
- }else if (mode == CONSTANT_ANIMATION_FASTEST){
- CallgraphView.getAnimation_slow().setChecked(false);
- CallgraphView.getAnimation_fast().setChecked(true);
- }
- }
-
- public void setCollapseMode(boolean value) {
- collapse_mode = value;
- nextMarkedNode = -1;
- CallgraphView.getMode_collapsednodes().setChecked(value);
- }
-
- /**
- * Gets id of root visible node
- * @return rootVisibleNode - ID of centre node
- */
- public int getRootVisibleNodeNumber() {
- return rootVisibleNodeNumber;
- }
-
- /**
- * Sets id of root visible node
- * @param id - ID of centre node
- */
- public void setRootVisibleNodeNumber(int id) {
- this.rootVisibleNodeNumber = id;
- }
-
- /**
- * Gets to the total time spent running tapped program
- * @return Time in milliseconds
- */
- public long getTotalTime() {
- return totalTime;
- }
-
- /**
- * Sets total time spent running tapped program
- * @param totalTime - Time in milliseconds
- */
- public void setTotalTime(long val) {
- //Divide by 100 to save us the trouble of
- //multiplying by 100 to get percentages
- this.totalTime = val;
- }
-
- /**
- *
- * @return Number of the lowest level in which nodes exist
- */
- public int getLowestLevelOfNodesAdded() {
- return lowestLevelOfNodesAdded;
- }
-
- /**
- * Set lowest level to which nodes have been added
- *
- * WARNING: Do not set this without adding nodes to that level first, or there
- * may be null pointer exceptions.
- * @param lowestLevelOfNodesAdded
- */
- public void setLowestLevelOfNodesAdded(int lowestLevelOfNodesAdded) {
- this.lowestLevelOfNodesAdded = lowestLevelOfNodesAdded;
- }
-
-
- public int getDrawMode() {
- return draw_mode;
- }
-
- public void setDrawMode(int draw_mode) {
- this.draw_mode = draw_mode;
- }
-
- /**
- * Resets the tree and graph to center on the first useful node.
- * Does NOT change draw mode, animation mode or collapse mode.
- */
- public void reset() {
- setSelection(null);
-
- draw(draw_mode, animation_mode, getFirstUsefulNode());
- if (! (draw_mode == StapGraph.CONSTANT_DRAWMODE_AGGREGATE)){
- getNode(getFirstUsefulNode()).unhighlight();
- }
- if (treeViewer!=null) {
- treeViewer.collapseAll();
- treeViewer.expandToLevel(2);
- }
- scale = 1;
- nextMarkedNode = -1;
- }
-
-
- public boolean isCollapseMode() {
- return this.collapse_mode;
- }
-
-
- public void setBottomLevelToDraw(int bottomLevelToDraw) {
- this.bottomLevelToDraw = bottomLevelToDraw;
- }
-
-
- public int getBottomLevelToDraw() {
- return bottomLevelToDraw;
- }
-
-
- public void setTopLevelOnScreen(int topLevelOnScreen) {
- this.topLevelOnScreen = topLevelOnScreen;
- }
-
-
- public int getTopLevelOnScreen() {
- return topLevelOnScreen;
- }
-
-
- /**
- * Returns a list of all nodes at the given level.
- *
- * @param level
- * @return List of ID's of all nodes at the given level.
- */
- public List<Integer> getLevel(int level) {
- if (level < 0 || level > lowestLevelOfNodesAdded) {
- return null;
- }
-
- return levels.get(level);
- }
-
-
-
- /**
- * Returns the StapData object with id == val.
- * @param val
- * @return
- */
- public StapData getData(int val) {
- if (val > -1)
- return nodeDataMap.get(val);
- else
- return null;
- }
-
-
- public void setTreeViewer(TreeViewer treeview) {
- StapGraph.treeViewer = treeview;
- }
-
-
- public TreeViewer getTreeViewer() {
- return treeViewer;
- }
-
-
- /**
- * Returns the StapNode object for the parent of node id. May be null.
- * @param id
- * @return
- */
- public StapNode getParentNode(int id) {
- return nodeMap.get(nodeDataMap.get(id).caller);
- }
-
-
- /**
- * Returns a StapData object for the parent of node id. May be null.
- * @param id
- * @return
- */
- public StapData getParentData(int id) {
- return nodeDataMap.get(nodeDataMap.get(id).caller);
- }
-
- /**
- * Returns the id of the next node that was called. This is necessarily either a
- * child of the current root node or of one of its ancestors' children.
- *
- * @param id
- * @return Id of next node that was called.
- */
- public int getNextCalledNode(int id) {
- int returnID = -1;
-
- for (int count = callOrderList.indexOf((Integer)id) + 1;
- count < callOrderList.size(); count++) {
- if (getData(id) == null)
- continue;
- if (!getData(id).isCollapsed || getData(id).isOnlyChildWithThisName()) {
- returnID = callOrderList.get(count);
- return returnID;
- }
- }
-
-
- return returnID;
- }
-
- /**
- * Returns the id of the previous node that was called.
- *
- * @param id
- * @return Id of previous node that was called.
- */
- public int getPreviousCalledNode(int id) {
- int returnID = -1;
-
- for (int count = callOrderList.indexOf((Integer)id) - 1;
- count > -1; count--) {
- if (getData(id) == null)
- continue;
- if (!getData(id).isCollapsed || getData(id).isOnlyChildWithThisName()) {
- returnID = callOrderList.get(count);
- return returnID;
- }
- }
-
-
- return returnID;
- }
-
-
-
- /**
- * Returns the id of the next marked node in current collapse mode.
- * Wraps back to the first marked node.
- *
- * @return Node id of next marked node.
- */
- public int getNextMarkedNode() {
- List<Integer> list = markedNodes;
- if (collapse_mode)
- list = markedCollapsedNodes;
-
- if (list.size() == 0)
- return -1;
-
-
- nextMarkedNode++;
- if (nextMarkedNode >= list.size())
- nextMarkedNode = 0;
-
-
- return list.get(nextMarkedNode);
- }
-
-
- /**
- * Returns the id of the next marked node in current collapse mode.
- * Wraps back to the first marked node.
- *
- * @return Node id of next marked node.
- */
- public int getPreviousMarkedNode() {
- List<Integer> list = markedNodes;
- if (collapse_mode)
- list = markedCollapsedNodes;
-
- if (list.size() == 0)
- return -1;
-
- nextMarkedNode--;
- if (nextMarkedNode < 0)
- nextMarkedNode = list.size() - 1;
-
-
- return list.get(nextMarkedNode);
- }
-
-
-
- public static final Comparator<Entry<String, Long>> VALUE_ORDER = new Comparator<Entry<String, Long>>()
- {
- public int compare(Entry<String, Long> a, Entry<String, Long> b){
- return ((Long)a.getValue()).compareTo(((Long)b.getValue()));
- }
- };
-
-
- /**
- * Increments the scrollbars by x, y
- *
- * @param x
- * @param y
- */
- public void scrollBy(int x, int y) {
- this.scrollTo(this.getHorizontalBar().getSelection() + x,
- this.getVerticalBar().getSelection() + y);
- }
-
-
- /**
- * Smoothly increments the scrollbars by x, y
- *
- * @param x
- * @param y
- */
- public void scrollSmoothBy(int x, int y) {
- this.scrollSmoothTo(this.getHorizontalBar().getSelection() + x,
- this.getVerticalBar().getSelection() + y);
- }
-
- /**
- * Retruns the number of StapData objects placed in the nodeDataMap.
- * @return
- */
- public int getDataMapSize() {
- return nodeDataMap.size();
- }
-
-
- public int getAnimationMode() {
- return animation_mode;
- }
-
-
- public int getLevelBuffer() {
- return levelBuffer;
- }
-
-
- public void setLevelBuffer(int val) {
- levelBuffer = val;
- }
-
- public int min(int a, int b) {
- if (a < b) return a;
- return b;
- }
-
- public int max(int a, int b) {
- if (a > b) return a;
- return b;
- }
-
- public int getMaxNodes() {
- return maxNodes;
- }
-
- public void setMaxNodes(int val) {
- maxNodes = val;
- }
-
-
-
- public ArrayList<Integer> getCallOrderList() {
- return callOrderList;
- }
-
-
-
- public void setCallOrderList(ArrayList<Integer> callOrderList) {
- this.callOrderList = callOrderList;
- }
-
-
-
- public int getLastFunctionCalled() {
- return lastFunctionCalled;
- }
-
-
-
- public void setLastFunctionCalled(int lastFunctionCalled) {
- this.lastFunctionCalled = lastFunctionCalled;
- }
-
-
-
- public ICProject getProject() {
- return project;
- }
-
-
-
- public void setProject(ICProject myProject) {
- this.project = myProject;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapGraphParser.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapGraphParser.java
deleted file mode 100644
index 703e71f204..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapGraphParser.java
+++ /dev/null
@@ -1,368 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.callgraph;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.TreeMap;
-
-import org.eclipse.cdt.core.model.CoreModel;
-import org.eclipse.cdt.core.model.ICProject;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.linuxtools.systemtap.local.core.Helper;
-import org.eclipse.linuxtools.systemtap.local.core.SystemTapParser;
-import org.eclipse.linuxtools.systemtap.local.core.SystemTapUIErrorMessages;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * This class is used only in the case that we are rendering a graph
- * using GEF (specifically Zest).
- *
- * After a stap command is sent to be executed, and after data is stored
- * into some temporary file, the data must be parsed to be used. This class
- * handles all of the parsing. All data is stored into Maps and this class
- * also starts the job responsible for taking the parsed data and rendering it.
- */
-public class StapGraphParser extends SystemTapParser {
-
- private static final String NEW_LINE = "\n";
- public HashMap<Integer, Long> timeMap;
- public TreeMap<Integer, String> serialMap;
- public HashMap<Integer, ArrayList<Integer>> outNeighbours;
- public HashMap<String, Long> cumulativeTimeMap;
- public HashMap<String, Integer> countMap;
- public ArrayList<Integer> callOrderList;
- public HashMap<Integer, String> markedMap;
- public String markedNodes;
- public int validator;
- public Long endingTimeInNS;
- public long totalTime;
- public int lastFunctionCalled;
- public ICProject project;
-
-
- public String text;
-
- @Override
- protected void initialize() {
- //INITIALIZE MAPS
- outNeighbours = new HashMap<Integer, ArrayList<Integer>>();
- timeMap = new HashMap<Integer, Long>();
- serialMap = new TreeMap<Integer, String>();
- cumulativeTimeMap = new HashMap<String, Long>();
- countMap = new HashMap<String, Integer>();
- endingTimeInNS = 0l;
- callOrderList = new ArrayList<Integer>();
- markedMap = new HashMap<Integer, String>();
- lastFunctionCalled = 0;
- project = null;
- }
-
-
- public IStatus executeParsing(){
- //Clear maps (in case a previous execution left values hanging)
- outNeighbours.clear();
- timeMap.clear();
- serialMap.clear();
- cumulativeTimeMap.clear();
- countMap.clear();
- text = ""; //$NON-NLS-1$
- callOrderList.clear();
-
- try {
- BufferedReader buff = new BufferedReader(new FileReader(filePath));
- String tmp;
- while ((tmp = buff.readLine()) != null) {
- if (monitor.isCanceled()) {
- return Status.CANCEL_STATUS;
- }
-
- if (tmp.equals("PROBE_BEGIN")){ //$NON-NLS-1$
- tmp = buff.readLine();
-
- if (tmp != null && tmp.length() > 0) {
- project = CoreModel.getDefault().getCModel().getCProject(tmp);
- }
- else {
- launchFileDialogError();
- return Status.CANCEL_STATUS;
- }
-
- text = buff.readLine();
-
- tmp = buff.readLine();
- if (tmp != null && tmp.length() > 0)
- endingTimeInNS = Long.parseLong(tmp);
- else {
- launchFileDialogError();
- return Status.CANCEL_STATUS;
- }
-
- tmp = buff.readLine();
- if (tmp != null && tmp.length() > 0)
- totalTime = Long.parseLong(tmp);
- else {
- launchFileDialogError();
- return Status.CANCEL_STATUS;
- }
- }
- }
- buff.close();
-
- } catch (IOException e) {
- launchFileDialogError();
- return Status.CANCEL_STATUS;
- }
-
-
- if (text.length() > 0) {
-
- boolean encounteredMain = false;
-
- ArrayList<Integer> shouldGetEndingTimeForID = new ArrayList <Integer>();
- String[] callsAndReturns = text.split(";"); //$NON-NLS-1$
- String[] args;
- ArrayList<String> nameList = new ArrayList<String>();
- ArrayList<Integer> idList = new ArrayList<Integer>();
- boolean skippedDirectives = false;
-
- String name;
- int id;
- long time;
- long cumulativeTime;
- int parentID;
- int firstNode = -1;
- try {
- for (String s : callsAndReturns) {
- switch (s.charAt(0)) {
- case '<' :
-
- args = s.substring(1, s.length()).split(",,"); //$NON-NLS-1$
- // args[0] = name
- // args[1] = id
- // arsg[2] = time of event
- id = Integer.parseInt(args[1]);
- time = Long.parseLong(args[2]);
- name = args[0];
-
- //If we haven't encountered a main function yet and the name isn't clean,
- //and the name contains "__", then this is probably a C directive
- if (!encounteredMain && !isFunctionNameClean(name) && name.contains("__")) { //$NON-NLS-1$
- skippedDirectives = true;
- break;
- }
- name = cleanFunctionName(name);
- if (name.equals("main")) //$NON-NLS-1$
- encounteredMain = true;
- if (firstNode == -1) {
- firstNode = id;
- }
-
- serialMap.put(id, name);
- timeMap.put(id, time);
-
- if (cumulativeTimeMap.get(name) == null){
- cumulativeTimeMap.put(name, (long) 0);
- }
-
- //IF THERE ARE PREVIOUS FUNCTIONS WITH THE SAME NAME
- //WE ARE IN ONE OF THEM SO DO NOT ADD TO CUMULATIVE TIME
- if (nameList.indexOf(name) == -1) {
- cumulativeTime = cumulativeTimeMap.get(name) - time;
- cumulativeTimeMap.put(name, cumulativeTime);
- shouldGetEndingTimeForID.add(id);
- }
-
-
- if (countMap.get(name) == null){
- countMap.put(name, 0);
- }
- countMap.put(name, countMap.get(name) + 1);
-
- nameList.add(name);
- idList.add(id);
-
- if (outNeighbours.get(id) == null){
- outNeighbours.put(id, new ArrayList<Integer>());
- }
-
- if (idList.size() > 1) {
- parentID = idList.get(idList.size() - 2);
- outNeighbours.get(parentID).add(id);
- }
-
- callOrderList.add(id);
- lastFunctionCalled = id;
-
- break;
- case '>' :
- args = s.substring(1, s.length()).split(",,"); //$NON-NLS-1$
- //args[0] = name
- //args[1] = time of event
- name = args[0];
-
-
- //If we haven't encountered a main function yet and the name isn't clean,
- //and the name contains "__", then this is probably a C directive
- if (!encounteredMain && !isFunctionNameClean(name) && name.contains("__")) { //$NON-NLS-1$
- skippedDirectives = true;
- break;
- }
- name = cleanFunctionName(name);
- int lastOccurance = nameList.lastIndexOf(name);
- if (lastOccurance < 0) {
- parsingError(Messages.getString("StapGraphParser.12") + name); //$NON-NLS-1$
- return Status.CANCEL_STATUS;
- }
-
- nameList.remove(lastOccurance);
- id = idList.remove(lastOccurance);
-
-
- if (timeMap.get(id) == null) {
- parsingError(Messages.getString("StapGraphParser.13") + name); //$NON-NLS-1$
- return Status.CANCEL_STATUS;
- }
- time = Long.parseLong(args[1]) - timeMap.get(id);
- timeMap.put(id, time);
-
-
- //IF AN ID IS IN THIS ARRAY IT IS BECAUSE WE NEED THE ENDING TIME
- // TO BE ADDED TO THE CUMULATIVE TIME FOR FUNCTIONS OF THIS NAME
- if (shouldGetEndingTimeForID.contains(id)){
- cumulativeTime = cumulativeTimeMap.get(name) + Long.parseLong(args[1]);
- cumulativeTimeMap.put(name, cumulativeTime);
- }
-
-
- //Use + for end times
-// cumulativeTime = cumulativeTimeMap.get(name) + Long.parseLong(args[1]);
-// cumulativeTimeMap.put(name, cumulativeTime);
-
- break;
- default :
- parsingError(Messages.getString("StapGraphParser.14") + s.charAt(0) + //$NON-NLS-1$
- Messages.getString("StapGraphParser.15") ); //$NON-NLS-1$
- return Status.CANCEL_STATUS;
-
- }
-
- }
-
-
- //CHECK FOR EXIT() CALL
- if (idList.size() != 0){
- for (int val : idList){
- name = serialMap.get(val);
- time = endingTimeInNS - timeMap.get(val);
- timeMap.put(val, time);
- if (shouldGetEndingTimeForID.contains(val)){
- cumulativeTime = cumulativeTimeMap.get(name) + endingTimeInNS;
- cumulativeTimeMap.put(name, cumulativeTime);
- }
-
-// if (name.equals("main")) {
-// totalTime = time;
-// }
- lastFunctionCalled = val;
- }
- markedMap.put(lastFunctionCalled, Messages.getString("StapGraphParser.16")); //$NON-NLS-1$
- }
-
- //timecheck is true if the total execution time is less than 10ms
- //and the first function is more than 1% off from the total time.
- boolean timeCheck = totalTime < 50000000 &&
- (((float)timeMap.get(firstNode)/totalTime) > 1.01 ||
- ((float)timeMap.get(firstNode)/totalTime) < 0.99);
-
-
-
- if (skippedDirectives || timeCheck) {
- totalTime = timeMap.get(firstNode);
- String markedMessage = ""; //$NON-NLS-1$
- if (markedMap.containsKey(firstNode)) {
- markedMessage = markedMap.get(firstNode) + "\n"; //$NON-NLS-1$
- }
- if (skippedDirectives)
- markedMessage += Messages.getString("StapGraphParser.19"); //$NON-NLS-1$
- if (timeCheck)
- markedMessage += Messages.getString("StapGraphParser.20"); //$NON-NLS-1$
-
- markedMessage += Messages.getString("StapGraphParser.21"); //$NON-NLS-1$
-
- markedMap.put(firstNode, markedMessage);
- }
-
-
- } catch (NumberFormatException e) {
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("StapGraphParser.22"), //$NON-NLS-1$
- Messages.getString("StapGraphParser.23"), Messages.getString("StapGraphParser.24") + //$NON-NLS-1$ //$NON-NLS-2$
- Messages.getString("StapGraphParser.25")); //$NON-NLS-1$
- mess.schedule();
-
- return Status.CANCEL_STATUS;
- }
- } else {
- parsingError(Messages.getString("StapGraphParser.26")); //$NON-NLS-1$
- return Status.CANCEL_STATUS;
- }
-
- //Create a UIJob to handle the rest
- GraphUIJob uijob = new GraphUIJob(Messages.getString("StapGraphParser.5"), this); //$NON-NLS-1$
- uijob.schedule();
- return Status.OK_STATUS;
-
- }
-
-
- @Override
- public void saveData(String filePath) {
- File file = new File(filePath);
- String content = Messages.getString("CallgraphView.25") //$NON-NLS-1$
- + project.getElementName()
- + NEW_LINE
- + text
- + NEW_LINE
- + endingTimeInNS
- + NEW_LINE
- + totalTime;
- try {
- // WAS THE FILE CREATED OR DOES IT ALREADY EXIST
- if (file.createNewFile()) {
- Helper.writeToFile(filePath, content);
- } else {
- if (MessageDialog
- .openConfirm(
- new Shell(),
- Messages
- .getString("CallgraphView.FileExistsTitle"), //$NON-NLS-1$
- Messages
- .getString("CallgraphView.FileExistsMessage"))) { //$NON-NLS-1$
- file.delete();
- file.createNewFile();
- Helper.writeToFile(filePath, content);
- }
- }
- } catch (IOException e1) {
- e1.printStackTrace();
- }
- }
-
-
-
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapNode.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapNode.java
deleted file mode 100644
index 1534844624..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/StapNode.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.callgraph;
-
-import java.text.NumberFormat;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Locale;
-
-import org.eclipse.draw2d.Label;
-import org.eclipse.linuxtools.systemtap.local.core.MP;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.zest.core.widgets.GraphConnection;
-import org.eclipse.zest.core.widgets.GraphNode;
-
-public class StapNode extends GraphNode{
-
- private static int nodeSize = 20;
- public int id;
- public GraphConnection connection; //Each node should have only one connection (to its caller)
- private boolean hasButtons; //Has buttons already attached
- public List<Integer> buttons;
- private static NumberFormat numberFormat = NumberFormat.getInstance(Locale.CANADA);
-
- public StapNode(StapGraph graphModel, int style, StapData data) {
-
- super(graphModel, style, Messages.getString("StapNode.0")); //$NON-NLS-1$
- numberFormat.setMaximumFractionDigits(2);
- numberFormat.setMinimumFractionDigits(2);
- if (Display.getCurrent().getPrimaryMonitor().getBounds().width < 1000)
- nodeSize = 10;
-
-
-
- if (data.name == StapGraph.CONSTANT_TOP_NODE_NAME)
- this.setText(StapGraph.CONSTANT_TOP_NODE_NAME);
- else {
- String shortName = data.name;
- if (data.name.length() > nodeSize)
- shortName = data.name.substring(0, nodeSize - 3) + "..."; //$NON-NLS-1$
- this.setText(shortName + ": " + //$NON-NLS-1$
- numberFormat.format((float) data.time/graphModel.getTotalTime() * 100)
- + "%"); //$NON-NLS-1$
- }
-
- if (data.markedMessage.length() != 0) {
- Label tooltip = new Label(data.name + ": " + //$NON-NLS-1$
- numberFormat.format((float) data.time/graphModel.getTotalTime() * 100)
- + "%" + "\n " + data.markedMessage); //$NON-NLS-1$ //$NON-NLS-2$
- this.setTooltip(tooltip);
- } else if (data.name.length() > nodeSize) {
- Label tooltip = new Label(data.name + ": " + //$NON-NLS-1$
- numberFormat.format((float) data.time/graphModel.getTotalTime() * 100)
- + "%"); //$NON-NLS-1$
- this.setTooltip(tooltip);
- }
-
-
- this.id = data.id;
- this.connection = null;
- hasButtons = false;
- buttons = new ArrayList<Integer>();
-
-
- if (graphModel.getNode(data.caller) != null) {
- this.connection = new GraphConnection( graphModel, style,
- this, graphModel.getNode(data.caller));
- if (graphModel.isCollapseMode())
- connection.setText("" + data.called); //$NON-NLS-1$
- }
-
- if (graphModel.getNode(data.collapsedCaller) != null) {
- this.connection = new GraphConnection( graphModel, style,
- this, graphModel.getNode(data.collapsedCaller));
- if (graphModel.isCollapseMode())
- connection.setText("" + data.called); //$NON-NLS-1$
- }
- }
-
-
- public void setHasButtons(boolean value) {
- hasButtons = value;
- }
-
- public boolean getHasButtons() {
- return hasButtons;
- }
-
- /**
- * Returns the StapData object associated with this node.
- */
- public StapData getData() {
- return ((StapGraph) this.getGraphModel()).getNodeData(id);
- }
-
- /**
- * Creates a connection between this node and the
- * specified node. The connection will have the int called as its text.
- *
- * @param graphModel
- * @param style
- * @param n
- * @param called
- */
- public void makeConnection(int style, StapNode n, int called) {
- if (n == null) {
- MP.println("Error! Attempting to connect null node to " + this.getText()); //$NON-NLS-1$
- }
- this.connection = new GraphConnection(this.getGraphModel(), style, this, n);
- if (((StapGraph)this.getGraphModel()).isCollapseMode())
- connection.setText("" + called); //$NON-NLS-1$
- }
-
- /**
- * Returns this node's connection, or null if none exists.
- * @return
- */
- public GraphConnection getConnection() {
- return connection;
- }
-
-
- public static int getNodeSize() {
- return nodeSize;
- }
-
-
- public static void setNodeSize(int nodeSize) {
- StapNode.nodeSize = nodeSize;
- }
-
-
-
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/SystemTapCommandParser.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/SystemTapCommandParser.java
deleted file mode 100644
index 19d3c27e88..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/SystemTapCommandParser.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.local.callgraph;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-
-
-public class SystemTapCommandParser extends Job {
-
- private String filePath;
- private String returnText;
- private boolean printIsDone;
- public CallgraphView stapview;
- private String testOutput;
- public boolean useColours;
- private boolean graphingMode;
- private boolean processFinished;
-
-
- public boolean isProcessFinished() {
- return processFinished;
- }
-
-
- public void setProcessFinished(boolean processFinished) {
- this.processFinished = processFinished;
- }
-
-
- public SystemTapCommandParser(String name, String filePath, CallgraphView sview,
- boolean useColours,
- boolean scheduleGraph, String configName) {
- super(name);
- this.filePath = filePath;
- this.stapview = sview;
- this.useColours = useColours;
- this.graphingMode = scheduleGraph;
- this.processFinished=false;
- }
-
-
- public String getCommand() {
- return filePath;
- }
-
- /**
- * Convenience method to set this.filePath.
- * Currently not used.
- *
- * @param filePath - filePath to be set
- */
- public void setFilePath(String filePath) {
- this.filePath = filePath;
- }
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
-
- if (graphingMode) {
- //Delegate to graphing parser instead of this one
- StapGraphParser p = new StapGraphParser();
- p.setFile(filePath);
- p.schedule();
-
-// String text = Helper.getMainConsoleTextByName(configName);
-// returnText = " " + configName+"\n"; //$NON-NLS-1$ //$NON-NLS-2$
-// returnText += dashes() + "\n\n"; //$NON-NLS-1$
-// setText(text);
-//
-//
-// SystemTapUIJob uijob = new SystemTapUIJob("SystemTapUIJob", this, this.useColours); //$NON-NLS-1$
-// uijob.schedule();
-
- return Status.OK_STATUS;
- }
-
- return Status.OK_STATUS;
- }
-
- public synchronized void setText(String text) {
- returnText += text;
- }
-
- public synchronized String getText() {
- String tmp = returnText;
- returnText = ""; //$NON-NLS-1$
- return tmp;
- }
-
- public synchronized void setDone() {
- printIsDone = true;
- }
-
- public synchronized void clearDone() {
- printIsDone = false;
- }
-
- public synchronized boolean checkDone() {
- return printIsDone;
- }
-
- public String getTestOutput() {
- return testOutput;
- }
-
- public IStatus testRun(IProgressMonitor m) {
- return run(m);
- }
-
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/InsertMarkerAction.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/InsertMarkerAction.java
deleted file mode 100644
index 3ff14e9803..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/InsertMarkerAction.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.local.callgraph.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.ui.texteditor.AbstractTextEditor;
-import org.eclipse.ui.texteditor.IDocumentProvider;
-import org.eclipse.ui.texteditor.ITextEditor;
-
-/**
- * Our sample action implements workbench action delegate. The action proxy will
- * be created by the workbench and shown in the UI. When the user tries to use
- * the action, this delegate will be created and execution will be delegated to
- * it.
- *
- * @see IWorkbenchWindowActionDelegate
- */
-public class InsertMarkerAction implements IWorkbenchWindowActionDelegate {
- private IWorkbenchWindow window;
- private static final String SYSTEMTAP_MARKER_INSERTED =
- "//SYSTEMTAP marker function - this code should appear //STAPSTAPSTAP\n" +//$NON-NLS-1$
- "//once at the top of your program //STAPSTAPSTAP\n" //$NON-NLS-1$
- + "void ___STAP_MARKER___(const char*); //STAPSTAPSTAP\n " //$NON-NLS-1$
- + "void ___STAP_MARKER___(const char* i) { //STAPSTAPSTAP\n" //$NON-NLS-1$
- + "return; //STAPSTAPSTAP\n" //$NON-NLS-1$
- + "} //STAPSTAPSTAP\n"; //$NON-NLS-1$
-
- /**
- * The constructor.
- */
- public InsertMarkerAction() {
- }
-
- /**
- * The action has been activated. The argument of the method represents the
- * 'real' action sitting in the workbench UI.
- *
- * @see IWorkbenchWindowActionDelegate#run
- */
- public void run(IAction action) {
- IWorkbenchPage page = window.getActivePage();
- IEditorPart part = page.getActiveEditor();
- if (!(part instanceof AbstractTextEditor))
- return;
- ITextEditor editor = (ITextEditor) part;
- IDocumentProvider dp = editor.getDocumentProvider();
- IDocument doc = dp.getDocument(editor.getEditorInput());
-
- StyledText st = (StyledText) editor.getAdapter(Control.class);
-
- try {
- int offset = st.getCaretOffset();
- doc.replace(offset, 0, "if (true) { //STAPSTAPSTAP\n" + //$NON-NLS-1$
- "\tchar* stapMarker = new char[20]; //STAPSTAPSTAP\n" + //$NON-NLS-1$
- "\tsprintf(stapMarker, \"\"); //STAPSTAPSTAP\n" + //$NON-NLS-1$
- // "\tprintf(\"%s\\n\", stapMarker); //STAPSTAPSTAP\n"
- // +
- "\t___STAP_MARKER___(stapMarker); //STAPSTAPSTAP\n\t} //STAPSTAPSTAP\n"); //$NON-NLS-1$
- st.setCaretOffset(offset + 68);
- } catch (BadLocationException e1) {
- e1.printStackTrace();
- }
- // TODO: if this is too slow, fix
- if (!doc.get().contains(SYSTEMTAP_MARKER_INSERTED)) {
- try {
- int offset;
- offset = doc.getLineOffset(0);
- String output = SYSTEMTAP_MARKER_INSERTED;
-
- doc.replace(offset, 0, output);
- } catch (org.eclipse.jface.text.BadLocationException e) {
- e.printStackTrace();
- }
- }
- }
-
- /**
- * Selection in the workbench has been changed. We can change the state of
- * the 'real' action here if we want, but this can only happen after the
- * delegate has been created.
- *
- * @see IWorkbenchWindowActionDelegate#selectionChanged
- */
- public void selectionChanged(IAction action, ISelection selection) {
- }
-
- /**
- * We can use this method to dispose of any system resources we previously
- * allocated.
- *
- * @see IWorkbenchWindowActionDelegate#dispose
- */
- public void dispose() {
- }
-
- /**
- * We will cache window object in order to be able to provide parent shell
- * for the message dialog.
- *
- * @see IWorkbenchWindowActionDelegate#init
- */
- public void init(IWorkbenchWindow window) {
- this.window = window;
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/Messages.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/Messages.java
deleted file mode 100644
index 98ee40fd7d..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/Messages.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.callgraph.actions;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Messages {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.systemtap.local.callgraph.actions.messages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
- private Messages() {
- }
-
- 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.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/RemoveMarkerAction.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/RemoveMarkerAction.java
deleted file mode 100644
index de5ba330c7..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/RemoveMarkerAction.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.local.callgraph.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.ui.texteditor.AbstractTextEditor;
-import org.eclipse.ui.texteditor.IDocumentProvider;
-import org.eclipse.ui.texteditor.ITextEditor;
-
-/**
- * Our sample action implements workbench action delegate. The action proxy will
- * be created by the workbench and shown in the UI. When the user tries to use
- * the action, this delegate will be created and execution will be delegated to
- * it.
- *
- * @see IWorkbenchWindowActionDelegate
- */
-public class RemoveMarkerAction implements IWorkbenchWindowActionDelegate {
- private IWorkbenchWindow window;
- private String stapCommentMarker = "//STAPSTAPSTAP"; //$NON-NLS-1$
-
- /**
- * The constructor.
- */
- public RemoveMarkerAction() {
- }
-
- /**
- * The action has been activated. The argument of the method represents the
- * 'real' action sitting in the workbench UI.
- *
- * @see IWorkbenchWindowActionDelegate#run
- */
- public void run(IAction action) {
- IWorkbenchPage page = window.getActivePage();
- IEditorPart part = page.getActiveEditor();
- if (!(part instanceof AbstractTextEditor))
- return;
- ITextEditor editor = (ITextEditor) part;
- IDocumentProvider dp = editor.getDocumentProvider();
- IDocument doc = dp.getDocument(editor.getEditorInput());
-
- for (int i = 0; i < doc.getNumberOfLines(); i++) {
- try {
- int start = doc.getLineOffset(i);
- int length = doc.getLineLength(i);
- if (doc.get(start, length).contains(stapCommentMarker)) {
- doc.replace(start, length, ""); //$NON-NLS-1$
- }
- } catch (BadLocationException e) {
- e.printStackTrace();
- }
- }
-
- //TODO: Figure out why I need to do this 3 times to remove all STAPSTAPSTAP...
- for (int i = 0; i < doc.getNumberOfLines(); i++) {
- try {
- int start = doc.getLineOffset(i);
- int length = doc.getLineLength(i);
- if (doc.get(start, length).contains(stapCommentMarker)) {
- doc.replace(start, length, ""); //$NON-NLS-1$
- }
- } catch (BadLocationException e) {
- e.printStackTrace();
- }
- }
-
- for (int i = 0; i < doc.getNumberOfLines(); i++) {
- try {
- int start = doc.getLineOffset(i);
- int length = doc.getLineLength(i);
- if (doc.get(start, length).contains(stapCommentMarker)) { //$NON-NLS-1$
- doc.replace(start, length, ""); //$NON-NLS-1$
- }
- } catch (BadLocationException e) {
- e.printStackTrace();
- }
- }
- }
-
- /**
- * Selection in the workbench has been changed. We can change the state of
- * the 'real' action here if we want, but this can only happen after the
- * delegate has been created.
- *
- * @see IWorkbenchWindowActionDelegate#selectionChanged
- */
- public void selectionChanged(IAction action, ISelection selection) {
- }
-
- /**
- * We can use this method to dispose of any system resources we previously
- * allocated.
- *
- * @see IWorkbenchWindowActionDelegate#dispose
- */
- public void dispose() {
- }
-
- /**
- * We will cache window object in order to be able to provide parent shell
- * for the message dialog.
- *
- * @see IWorkbenchWindowActionDelegate#init
- */
- public void init(IWorkbenchWindow window) {
- this.window = window;
- }
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/messages.properties b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/messages.properties
deleted file mode 100644
index 14b6a7aae0..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/actions/messages.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Red Hat - initial API and implementation
-###############################################################################
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/AutoScrollHelper.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/AutoScrollHelper.java
deleted file mode 100644
index 71b1414b49..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/AutoScrollHelper.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.callgraph.graphlisteners;
-
-import org.eclipse.linuxtools.systemtap.local.callgraph.StapGraph;
-
-public class AutoScrollHelper {
-
-
-
- public static void scrollUp(StapGraph graph) {
-
- if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_BOX) {
- int parent = graph.getNodeData(graph.getRootVisibleNodeNumber()).caller;
- if (graph.isCollapseMode())
- parent = graph.getNodeData(graph.getRootVisibleNodeNumber()).collapsedCaller;
-
- if (graph.getNodeData(parent) != null && graph.getNodeData(parent).levelOfRecursion > 0 ) {
- int animMode = graph.getAnimationMode();
- graph.draw(graph.getDrawMode(), StapGraph.CONSTANT_ANIMATION_FASTEST, parent);
- graph.setAnimationMode(animMode);
- }
- } else if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_TREE) {
- graph.shrinkTree();
- }
- }
-
- public static void scrollDown(StapGraph graph) {
- if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_BOX) {
- if (graph.getTopLevel() + StapGraph.levelBuffer <
- graph.getLowestLevelOfNodesAdded()) {
- int newLevel = graph.getTopLevel() + 1;
- if (graph.levels.get(newLevel).get(0) == null)
- return;
-
- graph.setTopLevelTo(newLevel);
- int animMode = graph.getAnimationMode();
- graph.setAnimationMode(StapGraph.CONSTANT_ANIMATION_FASTEST);
- graph.draw(graph.getDrawMode(), StapGraph.CONSTANT_ANIMATION_FASTEST,
- graph.levels.get(newLevel).get(0));
- graph.setAnimationMode(animMode);
- }
- } else if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_TREE) {
- graph.extendTree();
- }
-
- }
-
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/AutoScrollSelectionListener.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/AutoScrollSelectionListener.java
deleted file mode 100644
index 00d77b3b46..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/AutoScrollSelectionListener.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.callgraph.graphlisteners;
-
-import org.eclipse.linuxtools.systemtap.local.callgraph.StapGraph;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-
-public class AutoScrollSelectionListener implements SelectionListener{
- public static final int AutoScroll_up = 0;
- public static final int AutoScroll_down = 1;
- public static final int AutoScroll_bar = 2;
- private final int type;
- private final StapGraph graph;
-
- public AutoScrollSelectionListener(int type, StapGraph g) {
- this.type = type;
- this.graph = g;
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
-
- }
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (type == AutoScroll_up)
- AutoScrollHelper.scrollUp(graph);
- if (type == AutoScroll_down)
- AutoScrollHelper.scrollDown(graph);
- }
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/Messages.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/Messages.java
deleted file mode 100644
index 0fffd02a63..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/Messages.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.eclipse.linuxtools.systemtap.local.callgraph.graphlisteners;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.systemtap.local.callgraph.graphlisteners.messages"; //$NON-NLS-1$
- public static String StapGraphMouseMoveListener_0;
- public static String StapGraphMouseMoveListener_1;
- public static String StapGraphMouseMoveListener_2;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphFocusListener.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphFocusListener.java
deleted file mode 100644
index 8321868323..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphFocusListener.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.callgraph.graphlisteners;
-
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.FocusListener;
-
-/**
- * Set mouseDown flag to false when focus is lost (prevents the graph from
- * sticking to the mouse cursor when focus is regained)
- *
- *
- */
-public class StapGraphFocusListener implements FocusListener{
- private StapGraphMouseMoveListener listener;
-
- public StapGraphFocusListener(StapGraphMouseMoveListener listener) {
- this.listener = listener;
- }
-
- @Override
- public void focusGained(FocusEvent e) {
- }
-
- @Override
- public void focusLost(FocusEvent e) {
- listener.setStop(true);
- }
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphKeyListener.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphKeyListener.java
deleted file mode 100644
index 4ae3d07dca..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphKeyListener.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.callgraph.graphlisteners;
-
-import org.eclipse.linuxtools.systemtap.local.callgraph.CallgraphView;
-import org.eclipse.linuxtools.systemtap.local.callgraph.StapGraph;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-
-/**
- * StapGraph key listener
- */
-public class StapGraphKeyListener implements KeyListener {
-// private StapGraph graph;
-
- public StapGraphKeyListener(StapGraph g) {
-// graph = g;
- }
-
- @Override
- public void keyPressed(KeyEvent e) {
-
- }
-
- @Override
- public void keyReleased(KeyEvent e) {
- if (e.stateMask != SWT.SHIFT) {
- return;
- }
-
- //TODO: Use accelerator in menu actions instead of this hard-coded stuff
- if (e.character == 'R') {
- CallgraphView.getView_refresh().run();
-// }else if (e.character == '1') {
-// graph.setAnimationMode(StapGraph.CONSTANT_ANIMATION_SLOW);
-// }else if (e.character == '2') {
-// graph.setAnimationMode(StapGraph.CONSTANT_ANIMATION_FASTER);
-// }else if (e.character == '3') {
-// graph.setAnimationMode(StapGraph.CONSTANT_ANIMATION_FASTEST);
-// }else if (e.character == 'k') {
-// Shell sh = graph.getShell();
-// graph.dispose();
-// sh.close();
-// }else if (e.character == 'n') {
-// int id = graph.getNextMarkedNode();
-// graph.draw(id, 0, 0);
-// graph.getTreeViewer().expandToLevel(graph.getData(id), 0);
-// }else if (e.character == 'p') {
-// int id = graph.getPreviousMarkedNode();
-// graph.draw(id, 0, 0);
-// graph.getTreeViewer().expandToLevel(graph.getData(id), 0);
-// }else if (e.character == 'd') {
-// graph.deleteAll(-1);
-// }else if (e.character == 'T') {
-// graph.deleteAll(graph.getRootVisibleNode());
-// graph.draw(StapGraph.CONSTANT_DRAWMODE_TREE, graph.getAnimationMode(),
-// graph.getRootVisibleNode());
-// graph.currentPositionInLevel.clear();
- }else if (e.character == 'C') {
- CallgraphView.getMode_collapsednodes().run();
- } else if (e.character == 'N') {
- CallgraphView.getGoto_next().run();
- } else if (e.character == 'P') {
- CallgraphView.getGoto_previous().run();
- } else if (e.character == 'L') {
- CallgraphView.getGoto_last().run();
- }
- }
-};
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseExitListener.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseExitListener.java
deleted file mode 100644
index 95066472f7..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseExitListener.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.callgraph.graphlisteners;
-
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-
-public class StapGraphMouseExitListener implements Listener{
- private StapGraphMouseMoveListener listener;
-
- public StapGraphMouseExitListener(StapGraphMouseMoveListener l) {
- this.listener = l;
- }
-
- @Override
- public void handleEvent(Event event) {
- listener.setStop(true);
- }
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseListener.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseListener.java
deleted file mode 100644
index c72d55230b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseListener.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.callgraph.graphlisteners;
-
-import java.util.List;
-
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.linuxtools.systemtap.local.core.FileFinderOpener;
-import org.eclipse.linuxtools.systemtap.local.callgraph.StapGraph;
-import org.eclipse.linuxtools.systemtap.local.callgraph.StapNode;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
-import org.eclipse.zest.core.widgets.GraphNode;
-
-@SuppressWarnings("unused")
-public class StapGraphMouseListener implements MouseListener {
- private int x;
- private int y;
- private StapGraph graph;
- private StapGraphMouseMoveListener listener;
- private StapGraphFocusListener focus;
- private StapGraphMouseExitListener exitListener;
-
- public StapGraphMouseListener(StapGraph g) {
- this.graph = g;
- listener = new StapGraphMouseMoveListener(graph);
- focus = new StapGraphFocusListener(listener);
- exitListener = new StapGraphMouseExitListener(listener);
- }
-
- @Override
- public void mouseDoubleClick(MouseEvent e) {
- if (e.stateMask == SWT.CONTROL) {
- controlDoubleClick();
- }
-
-
- if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_RADIAL) {
- StapNode node = getNodeFromSelection();
- if (node == null)
- return;
-
- graph.getTreeViewer().collapseToLevel(node.getData(), 0);
- graph.getTreeViewer().expandToLevel(node.getData(), 0);
- graph.getTreeViewer().setSelection(new StructuredSelection(node.getData()));
-
- int id = node.getData().id;
-
- graph.scale = 1;
- // Redraw in the current mode with the new id as the center
- // The x,y parameters to draw() are irrelevant for radial mode
- graph.draw(id);
-
- // Unhighlight the center node and give it a normal colour
- node = graph.getNode(id);
- node.unhighlight();
- if (graph.getData(id).isMarked())
- node.setBackgroundColor(StapGraph.CONSTANT_MARKED);
- else
- node.setBackgroundColor(graph.DEFAULT_NODE_COLOR);
- return;
- } else {
-
- StapNode node = getNodeFromSelection();
- if (node == null)
- return;
-
- unhighlightall(node);
- graph.setSelection(null);
- graph.getTreeViewer().expandToLevel(node.getData(), 0);
- graph.getTreeViewer().setSelection(new StructuredSelection(node.getData()));
- // Draw in current modes with 'id' at the top
- int id = node.getData().id;
- graph.draw(id);
- }
-
- graph.setSelection(null);
- }
-
-
- @Override
- public void mouseDown(MouseEvent e) {
-// MP.println("You clicked: " + e.x + ", " + e.y); //$NON-NLS-1$ //$NON-NLS-2$
-// MP.println("Convert to control: " + graph.toControl(e.x, e.y).x + ", " //$NON-NLS-1$ //$NON-NLS-2$
-// + graph.toControl(e.x, e.y).y);
-// MP.println("Convert to display: " + graph.toDisplay(e.x, e.y).x + ", " //$NON-NLS-1$ //$NON-NLS-2$
-// + graph.toDisplay(e.x, e.y).y);
-// MP.println("Bounds: " + graph.getBounds().width + ", " //$NON-NLS-1$ //$NON-NLS-2$
-// + graph.getBounds().height);
- mouseDownEvent(e.x, e.y);
- }
-
- @Override
- public void mouseUp(MouseEvent e) {
- mouseUpEvent();
- }
-
- private void unhighlightall(StapNode n) {
- int id = n.id;
- List<Integer> callees = null;
-
- if (graph.isCollapseMode())
- callees = graph.getData(id).collapsedCallees;
- else
- callees = graph.getData(id).callees;
- for (int subID : callees) {
- if (graph.getNode(subID) != null)
- graph.getNode(subID).unhighlight();
- }
-
- if (graph.getParentNode(id) != null) {
- graph.getParentNode(id).unhighlight();
- }
- n.unhighlight();
- }
-
-
- @SuppressWarnings("unchecked")
- private StapNode getNodeFromSelection() {
- List<GraphNode> stapNodeList = graph.getSelection();
- if (stapNodeList.isEmpty() || stapNodeList.size() != 1) {
- graph.setSelection(null);
- return null;
- }
-
- StapNode node = null;
- if (stapNodeList.get(0) instanceof StapNode) {
- node = (StapNode) stapNodeList.remove(0);
- } else {
- graph.setSelection(null);
- return null;
- }
- return node;
- }
-
- @SuppressWarnings("unchecked")
- private GraphNode getAggregateNodeFromSelection() {
- List<GraphNode> graphNodeList = graph.getSelection();
- if (graphNodeList.isEmpty() || graphNodeList.size() != 1) {
- graph.setSelection(null);
- return null;
- }
-
- GraphNode node = null;
- if (graphNodeList.get(0) instanceof GraphNode) {
- node = (GraphNode) graphNodeList.remove(0);
- } else {
- graph.setSelection(null);
- return null;
- }
- return node;
- }
-
- public String controlDoubleClick() {
- String output = null;
- if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_AGGREGATE) {
- GraphNode node = getAggregateNodeFromSelection();
-
- if (node == null)
- return null;
-
- String functionName = (String) node.getData("AGGREGATE_NAME"); //$NON-NLS-1$
- output= FileFinderOpener.findAndOpen(graph.getProject(), functionName);
- } else {
- StapNode node = getNodeFromSelection();
-
- if (node == null)
- return null;
-
- int caller = node.getData().caller;
-
- if (caller < graph.getFirstUsefulNode()) {
- // The only node that satisfies this condition should be
- // main
- caller = graph.getFirstUsefulNode();
- }
- output = FileFinderOpener.findAndOpen(graph.getProject(), graph.getData(caller).name);
- }
-
- graph.setSelection(null);
- return output;
- }
-
- public void mouseDownEvent(int x, int y) {
- List<?> list = graph.getSelection();
- if (list.size() < 1) {
- listener.setPoint(x, y);
- listener.setStop(false);
- graph.addMouseMoveListener(listener);
- graph.addListener(SWT.MouseExit, exitListener);
- }
- }
-
- @SuppressWarnings("unchecked")
- public void mouseUpEvent() {
-
- listener.setStop(true);
- graph.removeMouseMoveListener(listener);
- graph.removeListener(SWT.MouseExit, exitListener);
-
- List<StapNode> list = graph.getSelection();
-
- // ------------Debug information
- if (list.size() == 1) {
- int id;
- if (list.get(0) instanceof StapNode)
- id = list.get(0).id;
- else {
- graph.setSelection(null);
- return;
- }
- graph.setSelection(null);
-// MP.println("Clicked node " + graph.getData(id).name + " with id " //$NON-NLS-1$ //$NON-NLS-2$
-// + id);
-// MP.println(" level: " + graph.getData(id).levelOfRecursion); //$NON-NLS-1$
-// MP.println(" called: " + graph.getData(id).called); //$NON-NLS-1$
-// MP.println(" caller: " + graph.getData(id).caller); //$NON-NLS-1$
-// MP.println(" copllapsedCaller: " //$NON-NLS-1$
-// + graph.getData(id).collapsedCaller);
-// MP.println(" callees: " + graph.getData(id).callees.size()); //$NON-NLS-1$
-// MP.println(" position: " + graph.getNode(id).getLocation().x //$NON-NLS-1$
-// + ", " + graph.getNode(id).getLocation().y); //$NON-NLS-1$
-
- // ------------Highlighting
- if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_TREE
- || graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_BOX) {
- for (StapNode n : (List<StapNode>) graph.getNodes()) {
- unhighlightall(n);
- }
-
- List<Integer> callees = null;
-
- if (graph.isCollapseMode())
- callees = graph.getData(id).collapsedCallees;
- else
- callees = graph.getData(id).callees;
-
- for (int subID : callees) {
- if (graph.getNode(subID) != null)
- graph.getNode(subID).highlight();
- }
-
- if (graph.getParentNode(id) != null) {
- graph.getParentNode(id).highlight();
- }
-// graph.setSelection(null);
- graph.getNode(id).highlight();
-
- return;
- }
-
- }
-
- else if (list.size() == 0 && ! (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_AGGREGATE)) {
- for (StapNode n : (List<StapNode>) graph.getNodes()) {
- unhighlightall(n);
- }
-
- }
-
-// else {
-// for (StapNode n : list) {
-// unhighlightall(n);
-// }
-// }
-
-// graph.setSelection(null);
- }
-};
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseMoveListener.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseMoveListener.java
deleted file mode 100644
index cefeeab4b6..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseMoveListener.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.local.callgraph.graphlisteners;
-
-import org.eclipse.linuxtools.systemtap.local.callgraph.StapGraph;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseMoveListener;
-
-
-public class StapGraphMouseMoveListener implements MouseMoveListener {
- private StapGraph graph;
- private int prevX;
- private int prevY;
- private static final int INIT = -20000;
- private boolean stop;
- private boolean showMessage;
-
- public StapGraphMouseMoveListener(StapGraph graph) {
- this.graph = graph;
- prevX = INIT;
- prevY = INIT;
- showMessage = true;
- }
-
- public void setPoint(int x, int y) {
- prevX = x;
- prevY = y;
- }
-
- public void setStop(boolean val) {
- stop = val;
- }
-
- @Override
- public void mouseMove(MouseEvent e) {
- //-------------Panning
- //TODO: Implement panning at this zoom and mode
- //For some reason getting rid of some of the /scale's in drawTree
- //Will fix panning, but at the cost of making the drawTree zoom look weird
-
- if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_TREE) {
-// if (graph.scale < 0.63) {
- if (showMessage) {
-// SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
-// Messages.StapGraphMouseMoveListener_0, Messages.StapGraphMouseMoveListener_1,
-// Messages.StapGraphMouseMoveListener_2);
-// mess.schedule();
- showMessage = false;
- }
- return;
- }
-
- //Initialize
- if (prevX == INIT && prevY == INIT) {
- prevX = e.x;
- prevY = e.y;
- return;
- }
-
- if (!stop) {
- int yDiff, xDiff;
- xDiff = prevX - e.x;
- yDiff = prevY - e.y;
- if (graph.scale > 1)
- graph.scrollSmoothBy((int) (xDiff/graph.scale), (int) (yDiff/graph.scale));
- else
- graph.scrollSmoothBy((int) (xDiff), (int) (yDiff));
-
- prevX = e.x;
- prevY = e.y;
- }
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseWheelListener.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseWheelListener.java
deleted file mode 100644
index 98a94bdfd3..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/StapGraphMouseWheelListener.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.callgraph.graphlisteners;
-
-import org.eclipse.linuxtools.systemtap.local.callgraph.StapGraph;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseWheelListener;
-
-/**
- * Allows the user to zoom when CTRL + mouse wheel is used
- *
- */
-public class StapGraphMouseWheelListener implements MouseWheelListener {
-// private long snapshot;
- private StapGraph graph;
-
- public StapGraphMouseWheelListener(StapGraph g) {
- this.graph = g;
- }
-
-
-
- @Override
- public void mouseScrolled(MouseEvent e) {
-
-
- if (e.stateMask != SWT.CTRL) {
- // Scrolling
- if (e.count > 0) {
- AutoScrollHelper.scrollUp(graph);
- }
-
- else {
- AutoScrollHelper.scrollDown(graph);
- }
- return;
- }
-
- if (graph.getDrawMode() != StapGraph.CONSTANT_DRAWMODE_BOX &&
- graph.getDrawMode() != StapGraph.CONSTANT_DRAWMODE_TREE)
- return;
-
-
- if (e.count <= 0) {
- if (graph.scale < 2){
- graph.scale /= (10.0 / 11.0);
- }else{
- graph.scale = (int)graph.scale + 1;
- }
-
- }else {
- if (graph.scale <= 2){
- graph.scale *= (10.0 / 11.0);
- }else{
- graph.scale = (int) graph.scale - 1;
- }
- }
-
- int currentAnimationMode = graph.getAnimationMode();
- graph.draw(graph.getDrawMode(), StapGraph.CONSTANT_ANIMATION_FASTEST,
- graph.getRootVisibleNodeNumber());
- graph.setAnimationMode(currentAnimationMode);
-
- int realeX = 3 * (int)(e.x / graph.scale);
- int realeY = 3 * (int)(e.y / graph.scale);
- int xDiff = (realeX - graph.getSize().x);
- int yDiff = (realeY - graph.getSize().y);
-
- graph.scrollTo(realeX + xDiff, realeY - yDiff);
-// x = graph.getNode(graph.getRootVisibleNode()).getLocation().x - x;
-// y = graph.getNode(graph.getRootVisibleNode()).getLocation().y - y;
-// graph.scrollBy(x/3, y);
-// graph.moveAllNodesBy(graph.getBounds().width/2 - e.x, graph.getBounds().height/2 - e.y);
-// System.out.println("AFTER: " + graph.getNode(graph.getRootVisibleNode()).getLocation().x + ", " +graph.getNode(graph.getRootVisibleNode()).getLocation().y + "\n\n") ;
-
-// // Don't scroll for circle mode
-// if (graph.getDrawMode() == StapGraph.CONSTANT_DRAWMODE_CIRCLE)
-// return;
-//
-// // Scrolling
-// if (e.count > 0) {
-//
-// long tempSnapshot = System.currentTimeMillis();
-// if (tempSnapshot - snapshot < 100)
-// return;
-// snapshot = tempSnapshot;
-//
-// // Scrolling up
-// if (graph.getBottomLevelToDraw() < graph.getLowestLevelOfNodesAdded()
-// - StapGraph.CONSTANT_LEVEL_BUFFER / 2)
-// graph.addLevelToTop();
-//
-// graph.decreaseTopLevelOnScreen();
-// if (graph.getTopLevelOnScreen() < 0) {
-// graph.setTopLevelOnScreen(0);
-// }
-//
-// graph
-// .scrollToY(graph.getNode(
-// graph.getLevel(graph.getTopLevelOnScreen()).get(0))
-// .getLocation().y);
-// graph.update();
-//
-// }
-//
-// else {
-//
-// long tempSnapshot = System.currentTimeMillis();
-//
-// if (tempSnapshot - snapshot < 100)
-// return;
-// snapshot = tempSnapshot;
-//
-// // Don't delete levels yet
-// if (graph.getTopLevelOnScreen() > StapGraph.CONSTANT_LEVEL_BUFFER / 4)
-// graph.addLevelToBottom();
-//
-// graph.incrementTopLevelOnScreen();
-// if (graph.getTopLevelOnScreen() < 0) {
-// graph.setTopLevelOnScreen(0);
-// }
-//
-// graph
-// .scrollToY(graph.getNode(
-// graph.getLevel(graph.getTopLevelOnScreen()).get(0))
-// .getLocation().y);
-// graph.update();
-//
-// }
-
- }
-
-};
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/messages.properties b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/messages.properties
deleted file mode 100644
index 02024a9a57..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/graphlisteners/messages.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Red Hat - initial API and implementation
-###############################################################################
-StapGraphMouseMoveListener_0=PanError
-StapGraphMouseMoveListener_1=Panning disabled
-StapGraphMouseMoveListener_2=We're sorry, but panning is disabled in tree mode.
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/messages.properties b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/messages.properties
deleted file mode 100644
index f3ad1950bd..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/messages.properties
+++ /dev/null
@@ -1,82 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Red Hat - initial API and implementation
-###############################################################################
-StapGraph.0=Start of Program
-StapGraph.1=number of calls :
-StapGraph.2=function :
-StapGraph.3=time :
-StapGraphParser.12=Encountered return without matching call for function
-StapGraphParser.13=No start time could be found for function
-StapGraphParser.14=Unexpected symbol when parsing: '
-StapGraphParser.15=' encountered, while expecting < or >.
-StapGraphParser.16=:::Program terminated here
-StapGraphParser.19=\n:::SystemTap detected functions that appeared to be C directives.
-StapGraphParser.20=\n:::Program terminated in less than 50ms, SystemTap overhead may be significant.
-StapGraphParser.21=\n:::Total time for this run has been set to the total time taken by this node.
-StapGraphParser.22=Unexpected Number
-StapGraphParser.23=Unexpected symbol
-StapGraphParser.24=Unexpected symbol encountered while trying to
-StapGraphParser.25=process id/time values.
-StapGraphParser.26=Could not find data in target file. Ensure target file contains data and try again.
-StapGraphParser.5=GraphUIJob instance
-StapNode.0=unnamed
-CallgraphView.0=File
-CallgraphView.1=View
-CallgraphView.11=Open Last Run
-CallgraphView.13=Version
-CallgraphView.15=SystemTap Error Log
-CallgraphView.16=Tree View
-CallgraphView.17=Radial View
-CallgraphView.18=Aggregate View
-CallgraphView.19=Box View
-CallgraphView.2=Animation
-CallgraphView.20=Slow
-CallgraphView.21=Error Log
-CallgraphView.22=Fast
-CallgraphView.24=Collapse mode (C)
-CallgraphView.25=PROBE_BEGIN\n
-CallgraphView.3=\n
-CallgraphView.4=About
-CallgraphView.5=Help
-CallgraphView.6=Markers
-CallgraphView.7=Open
-CallgraphView.8=Save
-CallgraphView.9=Go to
-CallgraphView.BufferMessage1=Unfortunately the requested setting for level buffer
-CallgraphView.BufferMessage2=could not be processed due to the maximum number of nodes.
-CallgraphView.BufferMessage3=Setting levelBuffer to the maximum number of levels possible
-CallgraphView.BufferMessage4=without hitting the max nodes(
-CallgraphView.BufferMessage5=).
-CallgraphView.BufferMessage6=If you really want to see more levels, increment max nodes.
-CallgraphView.BufferMessage7=This may cause lag on some systems.
-CallgraphView.BufferTooHigh=LevelBuffer too high
-CallgraphView.ClearLog=Clear log
-CallgraphView.DeleteLogsMessage=This will permanently clear the SystemTap Eclipse error
-CallgraphView.DeleteLogsMessage2=logs. Are you sure you want to continue?
-CallgraphView.DeleteLogsTitle=Delete logs?
-CallgraphView.ErrorMessageBody=Error log could not be read, most likely this is because
-CallgraphView.ErrorMessageBody2=\ the log file could not be found.
-CallgraphView.ErrorMessageName=ErrorLog reading error
-CallgraphView.ErrorMessageTitle=Error reading error log
-CallgraphView.Errors=Errors
-CallgraphView.FileExistsMessage=Overwrite existing file?
-CallgraphView.FileExistsTitle=File Already Exists
-CallgraphView.Last=Last (L)
-CallgraphView.MaxDepth=Max depth:
-CallgraphView.MaxNodes=Max nodes:
-CallgraphView.Next=Next (N)
-CallgraphView.nextMarker=(n)ext
-CallgraphView.OpenLog=Open log
-CallgraphView.Previous=Previous (P)
-CallgraphView.previousMarker=(p)revious
-CallgraphView.Reset=Reset (R)
-CallgraphView.SetLimits=Set limits
-CallgraphView.SetValues=Set values
-CallgraphView.SystemTapVersionBox=SystemTap Version
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeContentProvider.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeContentProvider.java
deleted file mode 100644
index 99fb4aa63f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeContentProvider.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.callgraph.treeviewer;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.linuxtools.systemtap.local.callgraph.StapData;
-import org.eclipse.linuxtools.systemtap.local.callgraph.StapGraph;
-
-public class StapTreeContentProvider implements ITreeContentProvider{
-
- private StapGraph graph;
-
- @Override
- public Object[] getChildren(Object parentElement) {
- List<StapData> EMPTY = new ArrayList<StapData>();
- if (parentElement instanceof StapData) {
- StapData parent = ((StapData) parentElement);
- List<Integer> childrenIDs = parent.collapsedCallees;
- for (int val : childrenIDs) {
- if (graph.getData(val) != null) {
- EMPTY.add(graph.getData(val));
- }
- }
- }
- return EMPTY.toArray();
- }
-
- @Override
- public Object getParent(Object element) {
- if (element instanceof StapData) {
- return graph.getData(((StapData) element).collapsedCaller);
- }
- return null;
- }
-
- @Override
- public boolean hasChildren(Object element) {
- if (element instanceof StapData)
- return element == null ? false :
- ((StapData) element).callees.size() > 0;
- return false;
- }
-
- @Override
- public Object[] getElements(Object inputElement) {
- return getChildren(inputElement);
- }
-
- @Override
- public void dispose() {
-
- }
-
- @Override
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
- public void setGraph(StapGraph graph) {
- this.graph = graph;
- }
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeDoubleClickListener.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeDoubleClickListener.java
deleted file mode 100644
index cd20cb3d7f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeDoubleClickListener.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.callgraph.treeviewer;
-
-import java.util.Iterator;
-
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.linuxtools.systemtap.local.callgraph.CallgraphView;
-import org.eclipse.linuxtools.systemtap.local.callgraph.StapData;
-import org.eclipse.linuxtools.systemtap.local.callgraph.StapGraph;
-
-public class StapTreeDoubleClickListener implements IDoubleClickListener {
-
- private StapGraph graph;
- private TreeViewer viewer;
-
- public StapTreeDoubleClickListener(TreeViewer t , StapGraph g) {
- this.graph = g;
- this.viewer = t;
- }
-
- @Override
- public void doubleClick(DoubleClickEvent event) {
- if (!(event.getSelection() instanceof IStructuredSelection))
- return;
- IStructuredSelection selection = (IStructuredSelection) event.getSelection();
- if (selection.size() != 1) return;
-
-
- //Expand the current node in the tree viewer and on the graph
- for (Iterator<?> iterator = selection.iterator(); iterator.hasNext();) {
- StapData data = (StapData) iterator.next();
- viewer.collapseToLevel(data, 1);
- viewer.expandToLevel(data, 1);
- graph.setCollapseMode(true);
- graph.draw(data.id);
- graph.getNode(data.id).unhighlight();
- }
-
- CallgraphView.maximizeIfUnmaximized();
- graph.setFocus();
- }
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeLabelProvider.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeLabelProvider.java
deleted file mode 100644
index ae29eb0eea..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeLabelProvider.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.callgraph.treeviewer;
-
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.linuxtools.systemtap.local.callgraph.CallGraphConstants;
-import org.eclipse.linuxtools.systemtap.local.callgraph.StapData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-
-public class StapTreeLabelProvider implements ILabelProvider {
-
- @Override
- public Image getImage(Object element) {
- Image im = null;
- if ( ((StapData) element).isMarked())
- im = new Image(Display.getCurrent(), CallGraphConstants.PLUGIN_LOCATION + "/icons/public_co.gif"); //$NON-NLS-1$
- else
- im = new Image(Display.getCurrent(), CallGraphConstants.PLUGIN_LOCATION + "/icons/compare_method.gif"); //$NON-NLS-1$
- return im;
- }
-
- @Override
- public String getText(Object element) {
- return ((StapData) element).called + ": " + ((StapData) element).name; //$NON-NLS-1$
- }
-
- @Override
- public void addListener(ILabelProviderListener listener) {
- }
-
-
- @Override
- public void dispose() {
- }
-
- @Override
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- @Override
- public void removeListener(ILabelProviderListener listener) {
- }
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeListener.java b/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeListener.java
deleted file mode 100644
index 8337cfd10e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph/src/org/eclipse/linuxtools/systemtap/local/callgraph/treeviewer/StapTreeListener.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.callgraph.treeviewer;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import org.eclipse.jface.viewers.ITreeViewerListener;
-import org.eclipse.jface.viewers.TreeExpansionEvent;
-import org.eclipse.linuxtools.systemtap.local.callgraph.StapData;
-import org.eclipse.swt.widgets.ScrollBar;
-
-public class StapTreeListener implements ITreeViewerListener{
- private static final int INCREMENT = 15;
-
- private int highestLevelOfExpansion;
- private ScrollBar scrollbar;
- private HashMap<Integer, List<Integer>> highestLevelNodes;
- //Level of recursion, list of nodes at that level currently displayed in tree
-
-
- /**
- * Autoscroll the horizontal scrollbar when there is a collapse event.
- *
- */
- @Override
- public void treeCollapsed(TreeExpansionEvent event) {
- StapData data = (StapData) event.getElement();
- if (highestLevelNodes.get(highestLevelOfExpansion) != null) {
- if (highestLevelNodes.get(highestLevelOfExpansion).remove((Integer) data.id)) {
- scrollbar.setSelection(scrollbar.getSelection() - INCREMENT);
- // scrollbar.setMaximum(scrollbar.getMaximum() - scrollbar.getThumb() - INCREMENT);
- // if (highestLevelNodes.size() == 0) {
- highestLevelOfExpansion--;
- // }
- }
- }
-
- }
-
- /**
- * Autoscroll the horizontal scrollbar when there is an expand event.
- *
- */
- @Override
- public void treeExpanded(TreeExpansionEvent event) {
- StapData d = ((StapData) event.getElement());
- if (d.levelOfRecursion > highestLevelOfExpansion) {
- scrollbar.setSelection(scrollbar.getSelection() + INCREMENT);
- highestLevelOfExpansion = ((StapData) event.getElement()).levelOfRecursion;
- }
-
- int lvl = d.levelOfRecursion;
- if (highestLevelNodes.get(lvl) == null)
- highestLevelNodes.put(lvl, new ArrayList<Integer>());
- highestLevelNodes.get(lvl).add(d.id);
- }
-
- public StapTreeListener(ScrollBar bar) {
- this.highestLevelOfExpansion=0;
- this.scrollbar = bar;
- highestLevelNodes = new HashMap<Integer, List<Integer>>();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/.classpath b/systemtap/org.eclipse.linuxtools.systemtap.local.core/.classpath
deleted file mode 100644
index ad32c83a78..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.core/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/.project b/systemtap/org.eclipse.linuxtools.systemtap.local.core/.project
deleted file mode 100644
index 547f6de468..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.systemtap.local.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/.settings/org.eclipse.jdt.core.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 55f799a8d0..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Mon Sep 21 12:33:24 EDT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.local.core/META-INF/MANIFEST.MF
deleted file mode 100644
index e77da2de98..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,21 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: SystemTap Local Core Project
-Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.local.core;singleton:=true
-Bundle-Version: 0.0.1.qualifier
-Bundle-Activator: org.eclipse.linuxtools.systemtap.local.core.Activator
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Export-Package: org.eclipse.linuxtools.systemtap.local.core
-Import-Package: org.eclipse.cdt.core,
- org.eclipse.cdt.core.dom.ast,
- org.eclipse.cdt.core.index,
- org.eclipse.cdt.core.model,
- org.eclipse.core.filesystem,
- org.eclipse.jface.text,
- org.eclipse.ui,
- org.eclipse.ui.console,
- org.eclipse.ui.ide,
- org.eclipse.ui.texteditor
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.local.core/build.properties
deleted file mode 100644
index 1b9a74f53b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.core/build.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Red Hat - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- install.sh,\
- systemtap.png,\
- parse_function_mark_partial.stp,\
- parse_function_partial.stp,\
- bin/,\
- systemtapbanner.png,\
- plugin.xml
-
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/errors.prop b/systemtap/org.eclipse.linuxtools.systemtap.local.core/errors.prop
deleted file mode 100644
index 1991b8893f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.core/errors.prop
+++ /dev/null
@@ -1,13 +0,0 @@
-.*no match while resolving probe point.*=One or more of the functions you specified could not be found.
-.*debuginfo under.*=No debuginfo could be found. As root, try running debuginfo-install kernel.
-.*___STAP_MARKER___.*=No ___STAP_MARKER___ functions were found in the target binary. Please insert markers, or try again without marking mode.
-.*semantic error.*debuginfo.*=No debuginfo was found, try debuginfo-install kernel
-.*libdwfl failure.*=Some debug info could not be found. On Fedora, try 'yum install systemtap kernel-devel yum-utils' and 'debuginfo-install kernel', as root.
-.*MAXACTION exceeded.*=SystemTap attempted to execute too many actions, please change the MAXACTIONS directive in the options tab of SystemTap Profile Configurations.
-.*uprobes.*=Probes were not compiled on your system. Try 'make -C /usr/local/share/systemtap/runtime/uprobes' as root
-.*Unable to find full path for "stap".*=SystemTap is necessary for the running of this command. If it is installed please make sure it is on the standard path.
-.*parse error.*=There may be an error in the arguments you sent or in the stap script, consult the log for more details.
-.*MAXMAPENTRIES exceeded.*=The maximum number of entries for a map has been exceeded, please change the MAXMAPENTRIES directive in the options tap of SystemTap Profile Configurations.
-.*stapdev.*=Please add yourself to the 'stapdev' or 'stapusr' group in order to run stap. Also, as root, run 'debuginfo-install kernel' and 'make -C /usr/local/share/systemtap/runtime/uprobes' if you have not done so already.
-.*Error inserting module.*File exists=A previous run of systemtap did not finish execution properly. In commandline, try ps aux | grep stap, kill any running stap processes and try again.
-.*line 0: syntax error near unexpected token.*=Your workspace name may contain opening and closing brackets -- please switch to a workspace that does not use brackets and try again.
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/install.sh b/systemtap/org.eclipse.linuxtools.systemtap.local.core/install.sh
deleted file mode 100755
index 004fe90319..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.core/install.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-FILE=/etc/group
-USER=`whoami`
-num=1
-
-#CREATE A BACKUP FILE WITHOUT OVERWRITING ANYTHING
-while [ -e "${FILE}.bak${num}" ]; do
- num=`expr ${num} + 1`
-done
-
-USEREXISTS=`grep stapdev ${FILE}| grep ${USER}`
-
-if [ -z "${USEREXISTS}" ]; then
-
-echo -e "Creating backup of ${FILE} \nat : ${FILE}.bak${num}"
-
-
-#BACKUP THE FILE AND THEN WRITE THE CURRENT USER TO THE STAPDEV GROUP
-echo "Root password required to add your username to the stapdev group."
-su -c "cp ${FILE} ${FILE}.bak${num}; gpasswd -a `whoami` stapdev"
-
-fi
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/parse_function_mark_partial.stp b/systemtap/org.eclipse.linuxtools.systemtap.local.core/parse_function_mark_partial.stp
deleted file mode 100644
index 5145c21d1d..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.core/parse_function_mark_partial.stp
+++ /dev/null
@@ -1,122 +0,0 @@
-
-probe begin{
- printf("\nPROBE_BEGIN\n")
- printf("0<")
- funcName[0] = "init"
- serial++
- exitCalled = 0
- start[0] = gettimeofday_ns()
-}
-
-
-/*HANDLE CASE WHEN AN EXIT() IS MADE*/
-probe syscall.exit{
- if (target() == pid()){
- exitCalled = 1
- }
-}
-
-function callFunction(probefunc) {
-
- start[serial] = gettimeofday_ns()
-
- if (probefunc != "___STAP_MARKER___" && !(isinstr(probefunc,"(")) && !(isinstr(probefunc,")")) ) {
- currentLevel++
- currentlyIn[currentLevel] = serial
-
-
- /*RELATED TO MEASURING TOTAL TIME A FUNCTION TAKES */
- if (nested[probefunc] == 0){
- start_total[probefunc] = start_total[probefunc] - gettimeofday_ns()
- }
- nested[probefunc]++
-
-
- /*TRACK THE DEPTH OF A FUNCTION*/
- depth[serial] = val
- printf("%d<",serial)
-
-
- /*RECORD NAME OF THE FUNCTION*/
- funcName[serial] = probefunc
- /*TALLY NUMBER OF USES OF FUNCTION*/
-
- val++
- serial++
- }
-}
-
-function returnFunction(probefunc) {
- if (probefunc != "___STAP_MARKER___" && !(isinstr(probefunc,"(")) && !(isinstr(probefunc,")")) ) {
- val--
- currentLevel--
-
- /*IF WE ARE BACK TO THE DEPTH OF ANY FUNCTION WE HAVE RETURNED FROM IT*/
- foreach (ser in depth)
- if (depth[ser] == val){
- total[ser] = gettimeofday_ns() - start[ser]
- delete start[ser]
- }
- /*PREVENT CHANGING THE TIME OF THIS FUNCTION ONCE FOUND*/
- delete depth[ser]
-
- /*RELATED TO MEASURING TOTAL TIME A FUNCTION TAKES */
- if (nested[probefunc] == 1){
- start_total[probefunc] = start_total[probefunc] + ( gettimeofday_ns() )
- }
-
- printf(">")
-
- /*RELATED TO MEASURING TOTAL TIME A FUNCTION TAKES */
- nested[probefunc]--
- }
-}
-
-
-
-probe end{
- total[0] = gettimeofday_ns() - start[0]
- start_total["init"] = total[0]
-
- /*IF EXIT() WAS CALLED TALLY TIME FOR FUNCTIONS THAT DID NOT RETURN*/
- if (exitCalled == 1){
- foreach (fc in funcName){
- if (total[fc] == 0){
- total[fc] = gettimeofday_ns() - start[fc]
- }
- }
-
- foreach (fd in nested){
- if (start_total[fd] < 0){
- start_total[fd] = start_total[fd] + (nested[fd] * gettimeofday_ns())
- }
- }
- }
-
- printf(">")
-
- printf("\n")
-
- foreach (fa in funcName)
- printf("%d:%s;", fa, funcName[fa])
-
- printf("\n")
-
- foreach (ser in total)
- printf("%d:%d;", ser, total[ser])
-
- printf("\n")
-
- foreach (fn in start_total) {
- if (start_total[fn] > 0)
- printf("%s:%d;", fn, start_total[fn])
- }
-
- printf("\n")
-
- foreach (fc in markedFunctions) {
- printf("%d:%s;", markedFunctions[fc], markedMessages[fc])
- }
- printf("\n")
- exit()
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/parse_function_partial.stp b/systemtap/org.eclipse.linuxtools.systemtap.local.core/parse_function_partial.stp
deleted file mode 100644
index 06003ec96c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.core/parse_function_partial.stp
+++ /dev/null
@@ -1,21 +0,0 @@
-function callFunction(probefunc) {
- if (startTime == 0) {
- startTime = gettimeofday_ns()
- printf("<%s,,%d,,%d;", probefunc, serial, startTime)
- } else
- printf("<%s,,%d,,%d;", probefunc, serial, gettimeofday_ns())
- serial++
-}
-
-
-function returnFunction(probefunc) {
- finalTime = gettimeofday_ns()
- printf(">%s,,%d;", probefunc, finalTime)
-}
-
-
-probe end {
- printf("\n%d",finalTime);
- printf("\n%d",finalTime - startTime);
- exit()
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/plugin.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.core/plugin.xml
deleted file mode 100644
index 72c4438fc5..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.core/plugin.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension-point id="org.eclipse.linuxtools.systemtap.local.core.parser" name="SystemTapParserPoint" schema="schema/org.eclipse.linuxtools.systemtap.local.core.parser.exsd"/>
-
-</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/schema/org.eclipse.linuxtools.systemtap.local.core.parser.exsd b/systemtap/org.eclipse.linuxtools.systemtap.local.core/schema/org.eclipse.linuxtools.systemtap.local.core.parser.exsd
deleted file mode 100644
index 9df510c744..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.core/schema/org.eclipse.linuxtools.systemtap.local.core.parser.exsd
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.linuxtools.systemtap.local.core" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.linuxtools.systemtap.local.core" id="org.eclipse.linuxtools.systemtap.local.core.parser" name="StapParserPoint"/>
- </appinfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="parser"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="parser">
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.linuxtools.systemtap.local.core.ISystemTapParser"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="realtime" type="boolean" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiinfo"/>
- </appinfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="implementation"/>
- </appinfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
-
-</schema>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/schema/systemtapCommands.exsd b/systemtap/org.eclipse.linuxtools.systemtap.local.core/schema/systemtapCommands.exsd
deleted file mode 100644
index 52749626c9..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.core/schema/systemtapCommands.exsd
+++ /dev/null
@@ -1,84 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.linuxtools.systemtap.localgui.core" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.linuxtools.systemtap.localgui.core" id="systemtapCommands" name="SystemTapCommands"/>
- </appinfo>
- <documentation>
- Allows other programs to use the SystemTapCommands class.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiinfo"/>
- </appinfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="implementation"/>
- </appinfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
-
-</schema>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/Activator.java b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/Activator.java
deleted file mode 100644
index 5101b3330e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/Activator.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.local.core;
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-
-
-/**
- * Activator class behaves like standard Wizard-created activator,
- * except for the checkRun() function.
- *
- */
-public class Activator extends AbstractUIPlugin {
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- PluginConstants.setPluginLocation(getPluginLocation());
- PluginConstants.setWorkspaceLocation(getDefault().getStateLocation().toString()+"/"); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
-
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(LaunchConfigurationConstants.PLUGIN_ID, path);
- }
-
- public String getPluginLocation() {
- Bundle bundle = getBundle();
-
- URL locationUrl = FileLocator.find(bundle,new Path("/"), null); //$NON-NLS-1$
- URL fileUrl = null;
- try {
- fileUrl = FileLocator.toFileURL(locationUrl);
- } catch (IOException e) {
- e.printStackTrace();
- }
- return fileUrl.getFile();
-
- }
-
-
-
- /**
- * Check if install script has been executed. Install script MUST delete the FirstRun file,
- * or else this will execute every time!
- *
- * Opens an install script to prompt user to properly install the plugin.
- */
- //@SuppressWarnings("static-access")
-/* private void checkRun() {
-
- PluginConstants.setPluginLocation(getPluginLocation());
- File initFile = new File(PluginConstants.PLUGIN_LOCATION + "SystemTapPlugin.init");//$NON-NLS-1
- String line;
-
- try {
- BufferedReader br = new BufferedReader (new FileReader(initFile));
- while ( (line = br.readLine()) != null) {
- if (line.contains("First time")) {
- Shell sh = new Shell();
- //String command = "SystemTapPluginInstall/" + "install.sh"; //$NON-NLS-1$ $NON-NLS-2$
- MessageDialog.openInformation(sh, Messages.getString("Activator.0"), Messages.getString("Activator.1")); //$NON-NLS-1$ //$NON-NLS-2$
- BufferedWriter bw = new BufferedWriter(new FileWriter(initFile));
- bw.append("Easter egg");
- bw.close();
- }
- }
-
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- }*/
-
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/FileFinderOpener.java b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/FileFinderOpener.java
deleted file mode 100644
index e58ba1012d..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/FileFinderOpener.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.core;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashMap;
-
-import org.eclipse.cdt.core.CCorePlugin;
-import org.eclipse.cdt.core.dom.ast.IBinding;
-import org.eclipse.cdt.core.dom.ast.IFunction;
-import org.eclipse.cdt.core.index.IIndex;
-import org.eclipse.cdt.core.index.IIndexFile;
-import org.eclipse.cdt.core.index.IIndexFileLocation;
-import org.eclipse.cdt.core.index.IIndexManager;
-import org.eclipse.cdt.core.index.IIndexName;
-import org.eclipse.cdt.core.index.IndexFilter;
-import org.eclipse.cdt.core.model.ICProject;
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.linuxtools.systemtap.local.core.SystemTapUIErrorMessages;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.ElementListSelectionDialog;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.ui.texteditor.ITextEditor;
-/**
- * Helper class that finds and opens files. Finds based on function names,
- * opens based on path and in the current default editor.
- *
- */
-public class FileFinderOpener {
-
- private static HashMap<String, Integer> offset = new HashMap<String, Integer>();
- private static HashMap<String, Integer> length = new HashMap<String, Integer>();
-
-
- /**
- * @param project : C Project Type
- * @param functionName : name of a function
- * @return an ArrayList of String paths (relative to current workspace) of
- * files with specified function name
- */
- private static ArrayList<String> findFunctionsInProject(ICProject project,
- String functionName) {
- ArrayList<String> files = new ArrayList<String>() ;
-
- IIndexManager manager = CCorePlugin.getIndexManager();
- IIndex index = null;
- try {
- index = manager.getIndex(project);
- index.acquireReadLock();
- IBinding[] bindings = index.findBindings(functionName.toCharArray(), IndexFilter.ALL, null);
- for (IBinding bind : bindings) {
- if (bind instanceof IFunction) {
- IFunction ifunction = (IFunction) bind;
- IIndexName[] names = index.findNames(ifunction,
- IIndex.FIND_DEFINITIONS);
- for (IIndexName iname : names) {
- IIndexFile file = iname.getFile();
- if (file != null) {
- IIndexFileLocation filelocation = file.getLocation();
- String loc = filelocation.getURI().getPath();
- files.add(loc);
- offset.put(loc, iname.getNodeOffset());
- length.put(loc, iname.getNodeLength());
- }
- }
- }
- }
-
- } catch (CoreException e) {
- e.printStackTrace();
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
-
- index.releaseReadLock();
- return files;
- }
-
-
- public static String findAndOpen(ICProject project, String functionName) {
- offset.clear();
- length.clear();
-
- ArrayList<String> files = findFunctionsInProject(project, functionName);
-
- if (files == null || files.size() < 1)
- return null;
- StringBuilder output = new StringBuilder();
-
- if (files.size() == 1) {
- open(files.get(0), offset.get(files.get(0)), length.get(files.get(0)));
- } else {
- ElementListSelectionDialog d = new ElementListSelectionDialog(
- new Shell(), new LabelProvider());
- d.setTitle(Messages.getString("FileFinderOpener.MultipleFilesDialog")); //$NON-NLS-1$
- d.setMessage(Messages.getString("FileFinderOpener.MultFilesDialogM1") + functionName + Messages.getString("FileFinderOpener.MultFilesDialogM2") + //$NON-NLS-1$ //$NON-NLS-2$
- Messages.getString("FileFinderOpener.MultFilesDialogM3")); //$NON-NLS-1$
- d.setElements(files.toArray());
- d.open();
- for (Object o : d.getResult()) {
- if (o instanceof String) {
- String s = (String) o;
- output.append(open(s, offset.get(s), length.get(s)));
- }
- }
- }
-
- return output.toString();
- }
-
-
- public static String open(String path, int offset, int length) {
- if (path == null)
- return null;
- File fileToOpen = new File(path);
-
- if (fileToOpen.exists() && fileToOpen.isFile()) {
- IFileStore fileStore = EFS.getLocalFileSystem().getStore(fileToOpen.toURI());
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
-
- try {
- IEditorPart ed = IDE.openEditorOnFileStore( page, fileStore );
- if (ed instanceof ITextEditor && offset > 0) {
- ITextEditor text = (ITextEditor) ed;
- text.selectAndReveal(offset, length);
- return text.getTitle();
- }
- } catch ( PartInitException e ) {
- }
- } else {
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("FileFinderOpener.FileNotFound"), //$NON-NLS-1$
- Messages.getString("FileFinderOpener.FileNotFound1"), Messages.getString("FileFinderOpener.FileNotFound2") + path); //$NON-NLS-1$ //$NON-NLS-2$
- mess.schedule();
- }
- return null;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/Helper.java b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/Helper.java
deleted file mode 100644
index b07b9b7c5b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/Helper.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.core;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.ui.console.ConsolePlugin;
-import org.eclipse.ui.console.TextConsole;
-
-public class Helper {
-
- /**
- * @param name : A String that can be found in the console (BE AS SPECIFIC AS POSSIBLE)
- * @return The TextConsole having 'name' somewhere within it's name
- */
- public static TextConsole getConsoleByName(String name) {
- for (int i = 0; i < ConsolePlugin.getDefault().getConsoleManager()
- .getConsoles().length; i++) {
- if (ConsolePlugin.getDefault().getConsoleManager().
- getConsoles()[i].getName().contains(name)) {
- return (TextConsole)ConsolePlugin.getDefault().getConsoleManager().getConsoles()[i];
- }
- }
- return null;
- }
-
-
- /**
- * @param name : A String that can be found in the console (BE AS SPECIFIC AS POSSIBLE)
- * @return The text contained within that console
- */
- public static String getMainConsoleTextByName(String name){
- TextConsole proc = (TextConsole) getConsoleByName(name);
- return ((IDocument)proc.getDocument()).get();
- }
-
- public static IDocument getConsoleDocumentByName(String name) {
- return ((TextConsole)Helper.getConsoleByName(name)).getDocument();
- }
-
- /**
- * @param absoluteFilePath : the absolute path to the file
- * @param content : the text to be written
- */
- public static void writeToFile(String absoluteFilePath, String content){
- try {
- FileWriter fstream;
- fstream = new FileWriter(absoluteFilePath);
- BufferedWriter out = new BufferedWriter(fstream);
- out.write(content);
- out.close();
- } catch (Exception e) {
- SystemTapUIErrorMessages err = new SystemTapUIErrorMessages(Messages.getString("SystemTapView.31"), //$NON-NLS-1$
- Messages.getString("SystemTapView.32"), //$NON-NLS-1$
- Messages.getString("SystemTapView.33")); //$NON-NLS-1$
- err.schedule();
- e.printStackTrace();
- }
- }
-
-
- public static void appendToFile(String absoluteFilePath, String content) {
- try {
- FileWriter fstream;
- fstream = new FileWriter(absoluteFilePath, true);
- BufferedWriter out = new BufferedWriter(fstream);
- out.append(content);
- out.close();
- } catch (Exception e) {
- SystemTapUIErrorMessages err = new SystemTapUIErrorMessages(Messages.getString("SystemTapView.31"), //$NON-NLS-1$
- Messages.getString("SystemTapView.32"), //$NON-NLS-1$
- Messages.getString("SystemTapView.33")); //$NON-NLS-1$
- err.schedule();
- e.printStackTrace();
- }
- }
-
- public static String readFile(String absoluteFilePath) {
-
- try {
- String output = ""; //$NON-NLS-1$
- String tmp = ""; //$NON-NLS-1$
- BufferedReader bw = new BufferedReader(new FileReader(new File(absoluteFilePath)));
- while ((tmp = bw.readLine()) != null) {
- output+=tmp + "\n"; //$NON-NLS-1$
- }
- bw.close();
-
- return output;
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
- return null;
- }
-
- private static BufferedWriter bw;
-
- public void setBufferedWriter(String absoluteFilePath) {
- try {
- File f = new File(absoluteFilePath);
- f.delete();
- f.createNewFile();
- FileWriter fstream;
- fstream = new FileWriter(absoluteFilePath, true);
- bw = new BufferedWriter(fstream);
- } catch (Exception e) {
- SystemTapUIErrorMessages err = new SystemTapUIErrorMessages(Messages.getString("SystemTapView.31"), //$NON-NLS-1$
- Messages.getString("SystemTapView.32"), //$NON-NLS-1$
- Messages.getString("SystemTapView.33")); //$NON-NLS-1$
- err.schedule();
- e.printStackTrace();
- }
- }
-
- public void appendToExistingFile(String content) throws IOException {
- bw.append(content);
- }
-
- public void closeBufferedWriter() throws IOException {
- bw.close();
- }
-
-
-}
- \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/LaunchConfigurationConstants.java b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/LaunchConfigurationConstants.java
deleted file mode 100644
index d74000b78a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/LaunchConfigurationConstants.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.core;
-
-
-/**
- * Contains the name and default value of configuration variables, as well as
- * a few other plugin-specific constants.
- *
- */
-public final class LaunchConfigurationConstants {
-
-
- //Configuration type variables
- private static final String INVALID = ""; //$NON-NLS-1$
- public static final String PLUGIN_ID = "org.eclipse.linuxtools.systemtap.localgui.launch"; //$NON-NLS-1$
-
- public static final String COMMAND_VERBOSE = PLUGIN_ID + ".COMMAND_VERBOSE"; //$NON-NLS-1$
- public static final String COMMAND_PASS = PLUGIN_ID + ".PASS"; //$NON-NLS-1$
- public static final String COMMAND_KEEP_TEMPORARY = PLUGIN_ID + ".KEEP_TEMPORARY"; //$NON-NLS-1$
- public static final String COMMAND_GURU = PLUGIN_ID + ".GURU"; //$NON-NLS-1$
- public static final String COMMAND_PROLOGUE_SEARCH = PLUGIN_ID + ".PROLOGUE_SEARCH"; //$NON-NLS-1$
- public static final String COMMAND_NO_CODE_ELISION = PLUGIN_ID + ".NO_CODE_ELISION"; //$NON-NLS-1$
- public static final String COMMAND_DISABLE_WARNINGS = PLUGIN_ID + ".DISABLE_WARNINGS"; //$NON-NLS-1$
- public static final String COMMAND_BULK_MODE = PLUGIN_ID + ".BULK_MODE"; //$NON-NLS-1$
- public static final String COMMAND_TIMING_INFO = PLUGIN_ID + ".TIMING_INFO"; //$NON-NLS-1$
- public static final String COMMAND_SKIP_BADVARS = PLUGIN_ID + ".SKIP_BADVARS"; //$NON-NLS-1$
- public static final String COMMAND_IGNORE_DWARF = PLUGIN_ID + ".IGNORE_DWARF"; //$NON-NLS-1$
- public static final String COMMAND_TAPSET_COVERAGE = PLUGIN_ID + ".TAPSET_COVERAGE"; //$NON-NLS-1$
- public static final String BINARY_PATH = PLUGIN_ID + ".BINARY_PATH"; //$NON-NLS-1$
- public static final String SCRIPT_PATH = PLUGIN_ID + ".SCRIPT_PATH"; //$NON-NLS-1$
- public static final String COMMAND_LEAVE_RUNNING = PLUGIN_ID + ".LEAVE_RUNNING"; //$NON-NLS-1$
- public static final String COMMAND_C_DIRECTIVES = PLUGIN_ID + ".C_DIRECTIVES"; //$NON-NLS-1$
- public static final String COMMAND_BUFFER_BYTES = PLUGIN_ID + ".BUFFER_BYTES"; //$NON-NLS-1$
- public static final String COMMAND_TARGET_PID = PLUGIN_ID + ".TARGET_PID"; //$NON-NLS-1$
- public static final String ARGUMENTS = PLUGIN_ID + ".ARGUMENTS"; //$NON-NLS-1$
- public static final String NUMBER_OF_ARGUMENTS = PLUGIN_ID + ".NUMBER_OF_ARGUMENTS"; //$NON-NLS-1$
- public static final String OUTPUT_PATH = PLUGIN_ID + ".OUTPUT_PATH"; //$NON-NLS-1$
- public static final String OVERWRITE = PLUGIN_ID + ".OVERWRITE"; //$NON-NLS-1$
- public static final String BUILD_PROJECT = PLUGIN_ID + ".BUILD_PROJECT"; //$NON-NLS-1$
- public static final String COMMAND_LIST = PLUGIN_ID + ".COMMAND_LIST"; //$NON-NLS-1$
- public static final String BINARY_ARGUMENTS = PLUGIN_ID + ".BINARY_ARGUMENTS"; //$NON-NLS-1$
- public static final String PARSER_CLASS = PLUGIN_ID + ".PARSER_CLASS";
-
-
- public static final String GENERATED_SCRIPT = PLUGIN_ID + ".GENERATED_SCRIPT"; //$NON-NLS-1$
- public static final String NEED_TO_GENERATE = PLUGIN_ID + ".NEED_TO_GENERATE"; //$NON-NLS-1$
- public static final String USE_COLOUR = PLUGIN_ID + ".USE_COLOUR"; //$NON-NLS-1$
-
-
- //Defaults
- public static final boolean DEFAULT_COMMAND_VERBOSE = false;
- public static final int DEFAULT_COMMAND_PASS = 0;
- public static final boolean DEFAULT_COMMAND_KEEP_TEMPORARY = false;
- public static final boolean DEFAULT_COMMAND_GURU = false;
- public static final boolean DEFAULT_COMMAND_PROLOGUE_SEARCH = false;
- public static final boolean DEFAULT_COMMAND_NO_CODE_ELISION = false;
- public static final boolean DEFAULT_COMMAND_DISABLE_WARNINGS = false;
- public static final boolean DEFAULT_COMMAND_BULK_MODE = false;
- public static final boolean DEFAULT_COMMAND_TIMING_INFO = false;
- public static final boolean DEFAULT_COMMAND_SKIP_BADVARS = false;
- public static final boolean DEFAULT_COMMAND_IGNORE_DWARF = false;
- public static final boolean DEFAULT_COMMAND_TAPSET_COVERAGE = false;
- public static final String DEFAULT_BINARY_PATH = INVALID;
- public static final String DEFAULT_SCRIPT_PATH = INVALID;
- public static final boolean DEFAULT_COMMAND_LEAVE_RUNNING = false;
- public static final String DEFAULT_COMMAND_C_DIRECTIVES = INVALID;
- public static final int DEFAULT_COMMAND_BUFFER_BYTES = 0;
- public static final int DEFAULT_COMMAND_TARGET_PID = 0;
- public static final String DEFAULT_ARGUMENTS = INVALID;
- public static final String DEFAULT_OUTPUT_PATH = INVALID;
- public static final boolean DEFAULT_OVERWRITE = false;
- public static final int DEFAULT_NUMBER_OF_ARGUMENTS = 0;
- public static final boolean DEFAULT_BUILD_PROJECT = true;
- public static final String DEFAULT_COMMAND_LIST = INVALID;
- public static final String DEFAULT_BINARY_ARGUMENTS = INVALID;
-
- public static final String DEFAULT_GENERATED_SCRIPT = INVALID;
- public static final boolean DEFAULT_NEED_TO_GENERATE = false;
- public static final boolean DEFAULT_USE_COLOUR = false;
-
- public static final String DEFAULT_PARSER_CLASS = INVALID;
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/MP.java b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/MP.java
deleted file mode 100644
index f79a57c76b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/MP.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.core;
-
-/**
- * Helper class for easily muted prints
- *
- */
-public class MP {
- public static boolean mute = false;
-
- /**
- * Prints the given string. All calls to MP.println can be muted by changing the mute variable
- * in MP, either by going into the source code or calling MP.setMute(boolean)
- *
- * @param String to print
- */
- public static void println(String val) {
- if (!mute) System.out.println(val);
- }
-
- public static void print(String val){
- if (!mute) System.out.print(val);
- }
-
- public static void setMute(boolean val) {
- mute = val;
- }
-
- public static void mute() {
- mute = true;
- }
-
- public static void unmute() {
- mute = false;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/Messages.java b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/Messages.java
deleted file mode 100644
index 1edee958fc..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/Messages.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.core;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * Class generated by Eclipse to handle externalized strings.
- *
- */
-public class Messages {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.systemtap.local.core.messages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
- private Messages() {
- }
-
- 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.local.core/src/org/eclipse/linuxtools/systemtap/local/core/PluginConstants.java b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/PluginConstants.java
deleted file mode 100644
index 72ccb4183c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/PluginConstants.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.core;
-
-public final class PluginConstants {
-
- public static String DEFAULT_OUTPUT = ""; //$NON-NLS-1$
- public static final String CONFIGURATION_TYPE_ID = "org.eclipse.linuxtools.systemtap.localgui.launch.systemtapLaunch"; //$NON-NLS-1$
- public static final String PARSER_CLASS = "org.eclipse.linuxtools.systemtap.local.core.parser";
- public static final String PARSER_RESOURCE = "org.eclipse.linuxtools.systemtap.local.core";
- public static final String PARSER_NAME = "parser";
-
- public static final String NEW_LINE = "\n"; //$NON-NLS-1$
-
- public static final int MAX_ERRORS = 500; //Maximum number of errors to tolerate
-
- public static String PLUGIN_LOCATION = ""; //$NON-NLS-1$
- public static int SYSTEMTAP_OPTIONS_TAB_HORIZONTAL_SPACING = 30;
-
- public static final String STAP_PATH = "stap"; //$NON-NLS-1$
- public static String STAP_GRAPH_DEFAULT_IO_PATH = ""; //$NON-NLS-1$
-
- /**
- * Sets the absolute path of the Plugin folder and updates
- * the PLUGIN_LOCATION.
- *
- * @param loc
- */
- public static void setPluginLocation(String loc) {
- PLUGIN_LOCATION = loc;
- }
-
- public static String getPluginLocation() {
- return PLUGIN_LOCATION;
- }
-
- public static void setWorkspaceLocation(String loc){
- DEFAULT_OUTPUT = loc;
- STAP_GRAPH_DEFAULT_IO_PATH = DEFAULT_OUTPUT+"callgraph.out"; //$NON-NLS-1$
- }
-
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/ShellOpener.java b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/ShellOpener.java
deleted file mode 100644
index 16d64ec977..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/ShellOpener.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.local.core;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.progress.UIJob;
-
-public class ShellOpener extends UIJob{
- private Shell shell;
-
- public ShellOpener(String name, Shell sh) {
- super(name);
- shell = sh;
- }
-
- @Override
- public IStatus runInUIThread(IProgressMonitor monitor) {
- shell.open();
- return Status.OK_STATUS;
- }
-
- public boolean isDisposed() {
- if (shell.isDisposed())
- return true;
- return false;
- }
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapCommandGenerator.java b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapCommandGenerator.java
deleted file mode 100644
index 793494047b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapCommandGenerator.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.local.core;
-
-import java.util.ArrayList;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-
-
-/**
- * This <code>Action</code> is used to run a SystemTap script that is currently open in the editor.
- * @author Ryan Morse
- */
-public class SystemTapCommandGenerator extends Action implements IWorkbenchWindowActionDelegate {
-
- private boolean needsToSendCommand;
- private boolean needsArguments;
- protected String arguments;
- protected String scriptPath;
- protected String commands;
- protected boolean isGuru;
- private String binaryPath = null;
- protected IWorkbenchWindow actionWindow = null;
- private IAction act;
- private String executeCommand;
- private String binaryArguments;
-
-
- public SystemTapCommandGenerator() {
- super();
- }
-
- public void dispose() {
- actionWindow= null;
- }
-
- public void init(IWorkbenchWindow window) {
- actionWindow= window;
- }
-
- public void run(IAction action) {
- System.out.println("Not implemented"); //$NON-NLS-1$
- }
-
- public void run() {
- System.out.println("Calling run() without parameters not implemented"); //$NON-NLS-1$
- }
-
- public String generateCommand(String scrPath, String binPath, String cmds, boolean needBinary, boolean needsArgs, String arg, String binArguments) {
- needsToSendCommand = needBinary;
- needsArguments = needsArgs;
- binaryPath = binPath;
- scriptPath = scrPath;
- isGuru = false;
- arguments = arg;
- commands = cmds;
- binaryArguments = binArguments;
-
- String[] script = buildScript();
-
- String cmd = ""; //$NON-NLS-1$
- for (int i = 0; i < script.length-1; i++)
- cmd = cmd + script[i] + " "; //$NON-NLS-1$
- cmd = cmd + script[script.length-1];
-
- this.executeCommand = cmd;
- return cmd;
- }
-
-
- /**
- * Parses the data created from generateCommand
- * @return An array of strings to be joined and executed by the shell
- */
- protected String[] buildScript() {
- //TODO: 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 (commands.length() > 0){
- cmdList.add(commands);
- }
-
- //Execute a binary
- if (needsToSendCommand){
- if (binaryArguments.length() < 1){
- cmdList.add("-c '" + binaryPath + "'"); //$NON-NLS-1$ //$NON-NLS-2$
- }else{
- cmdList.add("-c '" + binaryPath + " " + binaryArguments +"'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
-
-
- if (needsArguments) {
- script = new String[cmdList.size() + 3];
- script[script.length-2] = scriptPath;
- script[script.length-1] = arguments;
- } else {
- script = new String[cmdList.size() + 2];
- script[script.length-1] = scriptPath;
- }
-
- script[0] = PluginConstants.STAP_PATH; //$NON-NLS-1$
-
- for(int i=0; i< cmdList.size(); i++) {
- if (cmdList.get(i) != null)
- script[i +1] = cmdList.get(i).toString();
- else script[i + 1] = ""; //$NON-NLS-1$
- }
- return script;
-
- }
-
-
- public void selectionChanged(IAction act, ISelection select) {
- this.act = act;
- setEnablement(false);
- //buildEnablementChecks();
- }
-
- private void setEnablement(boolean enabled) {
- act.setEnabled(enabled);
- }
-
- public String getExecuteCommand(){
- return this.executeCommand;
- }
-
-
- /**
- * Convenience method to return the current window
- */
- public IWorkbenchWindow getWindow() {
- return actionWindow;
- }
-
-}
-
-
-/**
- * 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 (ed == null) return true;
-// if(isValidFile(ed)){
-//
-// String ret = getFilePath();
-//
-// if(isValidDirectory(ret))
-// return true;
-// }
-// return true;
-//}
-
-//private boolean isValidFile(IEditorPart editor) {
-// if(null == editor) {
-// String msg = MessageFormat.format("No script file is selected", (Object[])null);
-// //LogManager.logInfo("Initializing", MessageDialog.class);
-// MessageDialog.openWarning(fWindow.getShell(), "Problem running SystemTap script - invalid script", msg);
-// //LogManager.logInfo("Disposing", MessageDialog.class);
-// return false;
-// }
-//
-// if(editor.isDirty())
-// editor.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;
-}*/
-
-//protected Subscription getSubscription()
-//{
-// return subscription;
-//}
-//
-
-//private void buildEnablementChecks() {
-//if(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor() instanceof STPEditor)
-// setEnablement(true);
-//}
-//
-
-//
-//protected String[] getEnvironmentVariables() {
-// return EnvironmentVariablesPreferencePage.getEnvironmentVariables();
-//}
-
-//
-//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;
-//}
-//
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapErrorHandler.java b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapErrorHandler.java
deleted file mode 100644
index 9fe92d2a77..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapErrorHandler.java
+++ /dev/null
@@ -1,323 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.local.core;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.TimeZone;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * Helper class parses the given string for recognizable error messages
- *
- */
-public class SystemTapErrorHandler {
-
- public static final String FILE_PROP = "errors.prop"; //$NON-NLS-1$
- public static final String FILE_ERROR_LOG = "Error.log"; //$NON-NLS-1$
- public static final int MAX_LOG_SIZE = 50000;
- private boolean errorRecognized;
- private String errorMessage = ""; //$NON-NLS-1$
- private StringBuilder logContents;
- private boolean mismatchedProbePoints;
- ArrayList<String> functions = new ArrayList<String>();
-
- /**
- * Delete the log file and create an empty one
- */
- public static void delete(){
- File log = new File(PluginConstants.DEFAULT_OUTPUT + FILE_ERROR_LOG); //$NON-NLS-1$
- log.delete();
- try {
- log.createNewFile();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
-
- public SystemTapErrorHandler() {
- mismatchedProbePoints = false;
- errorRecognized = false;
- if (errorMessage.length() < 1) {
- errorMessage =
- Messages.getString("SystemTapErrorHandler.ErrorMessage") + //$NON-NLS-1$
- Messages.getString("SystemTapErrorHandler.ErrorMessage1"); //$NON-NLS-1$
- }
-
- logContents = new StringBuilder(); //$NON-NLS-1$
- }
-
-
- /**
- * Search given string for recognizable error messages. Can append the contents of
- * the string to the error log if writeToLog() or finishHandling() are called.
- * A call to finishHandling() will also open a popup window with user-friendly messages
- * corresponding to the recognizable errors.
- *
- * @param doc
- */
- public void handle (IProgressMonitor m, String errors){
- String[] blah = errors.split("\n"); //$NON-NLS-1$
-
- //READ FROM THE PROP FILE AND DETERMINE TYPE OF ERROR
- File file = new File(PluginConstants.PLUGIN_LOCATION+FILE_PROP);
- try {
- BufferedReader buff = new BufferedReader (new FileReader(file));
- String line;
- int index;
-
- for (String message : blah) {
- boolean firstLine = true; //Keep the error about mismatched probe points first
- buff = new BufferedReader (new FileReader(file));
- while ((line = buff.readLine()) != null){
- if (m != null && m.isCanceled())
- return;
- index = line.indexOf('=');
- String matchString = line.substring(0, index);
- Pattern pat = Pattern.compile(matchString, Pattern.DOTALL);
- Matcher matcher = pat.matcher(message);
-
-
- if (matcher.matches()) {
- if (!isErrorRecognized()) {
- errorMessage+=Messages.getString("SystemTapErrorHandler.ErrorMessage2"); //$NON-NLS-1$
- setErrorRecognized(true);
- }
-
- errorMessage+=line.substring(index+1)
- + PluginConstants.NEW_LINE + PluginConstants.NEW_LINE;
-
- if (firstLine) {
- findFunctions(m, message, pat);
- mismatchedProbePoints = true;
- }
- break;
- }
- firstLine = false;
- }
- buff.close();
- }
-
- logContents.append(errors);
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- }
-
-
- public void handle (IProgressMonitor m, FileReader f) throws IOException {
- BufferedReader br = new BufferedReader (f);
-
- String line;
- StringBuilder builder = new StringBuilder();
- int counter = 0;
- while ( (line = br.readLine()) != null) {
- counter++;
- builder.append(line);
- builder.append("\n"); //$NON-NLS-1$
- if (m != null && m.isCanceled())
- return;
- if (counter == 300) {
- handle(m, builder.toString());
- builder = new StringBuilder();
- counter = 0;
- }
- }
- handle(m, builder.toString());
-
- }
-
- /**
- * Run this method when there are no more error messages to handle.
- * Creates the error pop-up message and writes to log.
- *
- */
- public void finishHandling(IProgressMonitor m, int numberOfErrors) {
- if (!isErrorRecognized()) {
- errorMessage+=Messages.getString("SystemTapErrorHandler.4") + //$NON-NLS-1$
- Messages.getString("SystemTapErrorHandler.5"); //$NON-NLS-1$
- }
-
- writeToLog();
-
- if (mismatchedProbePoints){
- if (numberOfErrors > PluginConstants.MAX_ERRORS) {
- errorMessage = PluginConstants.NEW_LINE + PluginConstants.NEW_LINE
- + Messages.getString("SystemTapErrorHandler.TooManyErrors1") + numberOfErrors +Messages.getString("SystemTapErrorHandler.TooManyErrors2") + //$NON-NLS-1$ //$NON-NLS-2$
- Messages.getString("SystemTapErrorHandler.TooManyErrors3") + //$NON-NLS-1$
- Messages.getString("SystemTapErrorHandler.TooManyErrors4"); //$NON-NLS-1$
- SystemTapUIErrorMessages mes = new SystemTapUIErrorMessages(
- Messages.getString("SystemTapErrorHandler.ErrorMessageName"), //$NON-NLS-1$
- Messages.getString("SystemTapErrorHandler.ErrorMessageTitle"), //$NON-NLS-1$
- errorMessage); //$NON-NLS-1$ //$NON-NLS-2$
- mes.schedule();
- m.setCanceled(true);
- return;
- }
-
-
- StringBuffer resultFileContent = new StringBuffer();
- String fileLocation = PluginConstants.DEFAULT_OUTPUT + "callgraphGen.stp"; //$NON-NLS-1$
- String line;
- boolean skip = false;
- File file = new File(fileLocation);
- try {
- BufferedReader buff = new BufferedReader(new FileReader(file));
- while ((line = buff.readLine()) != null){
- if (m != null && m.isCanceled())
- return;
- skip = false;
- for (String func : functions){
- if (line.contains("function(\"" + func + "\").call")){ //$NON-NLS-1$ //$NON-NLS-2$
- skip = true;
- break;
- }
- }
-
- if (!skip && !line.equals("\n")){ //$NON-NLS-1$
- resultFileContent.append(line);
- resultFileContent.append("\n"); //$NON-NLS-1$
- }
- }
-
- buff.close();
-
- BufferedWriter wbuff= new BufferedWriter(new FileWriter(file));
- wbuff.write(resultFileContent.toString());
- wbuff.close();
-
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- }else{
- SystemTapUIErrorMessages mes = new SystemTapUIErrorMessages(
- Messages.getString("SystemTapErrorHandler.ErrorMessageName"), //$NON-NLS-1$
- Messages.getString("SystemTapErrorHandler.ErrorMessageTitle"), //$NON-NLS-1$
- errorMessage); //$NON-NLS-1$ //$NON-NLS-2$
- mes.schedule();
- }
-
-
- }
-
-
- /**
- * Writes the contents of logContents to the error log, along with date and time.
- */
- public void writeToLog() {
- File errorLog = new File(PluginConstants.DEFAULT_OUTPUT + "Error.log"); //$NON-NLS-1$
-
- try {
- //CREATE THE ERROR LOG IF IT DOES NOT EXIST
- //CLEAR THE ERROR LOG AFTER A FIXED SIZE(BYTES)
- if (!errorLog.exists()
- || errorLog.length() > MAX_LOG_SIZE) {
- errorLog.delete();
- errorLog.createNewFile();
- }
-
- Calendar cal = Calendar.getInstance(TimeZone.getDefault());
- int year = cal.get(Calendar.YEAR);
- int month = cal.get(Calendar.MONTH);
- int day = cal.get(Calendar.DAY_OF_MONTH);
- int hour = cal.get(Calendar.HOUR_OF_DAY);
- int minute = cal.get(Calendar.MINUTE);
- int second = cal.get(Calendar.SECOND);
-
- //APPEND THE ERROR TO THE LOG
- Helper
- .appendToFile(errorLog.getAbsolutePath(),
- Messages.getString("SystemTapErrorHandler.ErrorLogDashes") //$NON-NLS-1$
- + PluginConstants.NEW_LINE
- + day + "/" + month //$NON-NLS-1$
- + "/" + year + " - " + hour + ":" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- + minute + ":" + second //$NON-NLS-1$
- + PluginConstants.NEW_LINE + logContents
- + PluginConstants.NEW_LINE + PluginConstants.NEW_LINE);
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- logContents = new StringBuilder(); //$NON-NLS-1$
- }
-
- /**
- * Returns true if an error matches one of the regex's in error.prop
- * @return
- */
- public boolean isErrorRecognized() {
- return errorRecognized;
- }
-
-
- /**
- * Convenience method to change the error recognition value.
- * @param errorsRecognized
- */
- private void setErrorRecognized(boolean errorsRecognized) {
- errorRecognized = errorsRecognized;
- }
-
-
- public boolean hasMismatchedProbePoints() {
- return mismatchedProbePoints;
- }
-
-
- public void setMismatchedProbePoints(boolean mismatchedProbePoints) {
- this.mismatchedProbePoints = mismatchedProbePoints;
- }
-
-
- public void findFunctions(IProgressMonitor m, String message, Pattern pat) {
- String[] list = message.split("\n"); //$NON-NLS-1$
- String result;
- for (String s : list) {
- if (m.isCanceled())
- return;
- if (pat.matcher(s).matches()) {
- int lastQuote = s.lastIndexOf('"');
- if (lastQuote < 0)
- return;
- int secondLastQuote = s.lastIndexOf('"', lastQuote - 1);
- if (secondLastQuote < 0)
- return;
- result = s.substring(secondLastQuote+1, lastQuote);
- if (!functions.contains(result))
- functions.add(result);
- }
- }
- }
-
-
- public ArrayList<String> getFunctions() {
- return functions;
- }
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapParser.java b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapParser.java
deleted file mode 100644
index 9d621cd964..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapParser.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.core;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.jobs.Job;
-
-public abstract class SystemTapParser extends Job {
- protected IProgressMonitor monitor;
- protected String filePath;
-
- public SystemTapParser() {
- super("New_Job");
- this.filePath = PluginConstants.STAP_GRAPH_DEFAULT_IO_PATH;
- initialize();
- }
-
- /**
- * Initialize will be called in the constructors for this class.
- * Use this method to initialize variables.
- */
- protected abstract void initialize();
-
-
- /**
- * Implement this method to execute parsing. The return from
- * executeParsing() will be the return value of the run command.
- *
- * SystemTapParser will call executeParsing() within its run method.
- * (i.e. will execute in a separate, non-UI thread)
- * @return
- */
- public abstract IStatus executeParsing();
-
- public abstract void saveData(String filePath);
-
-
- public SystemTapParser(String name, String filePath) {
- super(name);
- //BY DEFAULT READ/WRITE FROM HERE
- if (filePath != null)
- this.filePath = filePath;
- else
- this.filePath = PluginConstants.STAP_GRAPH_DEFAULT_IO_PATH;
- initialize();
- }
-
- /**
- * Cleans names of form 'name").return', returning just the name
- * @param name
- */
- protected String cleanFunctionName(String name) {
- return name.split("\"")[0]; //$NON-NLS-1$
- }
-
- /**
- * Checks for quotations and brackets in the function name
- * @param name
- */
- protected boolean isFunctionNameClean(String name) {
- if (name.contains("\"") || name.contains(")")) //$NON-NLS-1$ //$NON-NLS-2$
- return false;
- return true;
- }
-
- /**
- * Creates a popup error dialog in a separate UI thread.
- * Dialog title is 'Unexpected symbol,' name is 'ParseError' and body
- * is the specified message.
- * @param message
- */
- protected void parsingError(String message) {
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
- Messages.getString("SystemTapParser.0"), Messages.getString("SystemTapParser.1"), message); //$NON-NLS-1$ //$NON-NLS-2$
- mess.schedule();
- }
-
-
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- this.monitor = monitor;
- return executeParsing();
-
- }
-
- public void printArrayListMap(HashMap<Integer, ArrayList<Integer>> blah) {
- int amt = 0;
- for (int a : blah.keySet()) {
- amt++;
- MP.print(a + " ::> "); //$NON-NLS-1$
- for (int c : blah.get(a)) {
- System.out.print(c + " "); //$NON-NLS-1$
- }
- MP.println(""); //$NON-NLS-1$
- }
- }
-
- @SuppressWarnings("unchecked")
- public void printMap(Map blah) {
- int amt = 0;
- for (Object a : blah.keySet()) {
- amt++;
- MP.println(a + " ::> "+blah.get(a)); //$NON-NLS-1$
- }
- }
-
-
-
- /**
- * Returns the monitor
- * @return
- */
- public IProgressMonitor getMonitor() {
- return monitor;
- }
-
-
- /**
- * For easier JUnit testing only. Allows public access to run method without scheduling an extra job.
- *
- * @param m
- * @return
- */
- public IStatus testRun(IProgressMonitor m) {
- return run(m);
- }
-
-
- public void launchFileDialogError(){
- SystemTapUIErrorMessages err = new SystemTapUIErrorMessages(
- Messages.getString("SystemTapParser.2"), //$NON-NLS-1$
- Messages.getString("SystemTapParser.3"), //$NON-NLS-1$
- Messages.getString("SystemTapParser.4")+filePath+ //$NON-NLS-1$
- Messages.getString("SystemTapParser.5")); //$NON-NLS-1$
- err.schedule();
- }
-
- /**
- * Sets the file to read from
- * @param filePath
- */
- public void setFile(String filePath) {
- this.filePath = filePath;
- }
-
-
- /**
- * Gets the file to read from
- * @return
- */
- public String getFile() {
- return filePath;
- }
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapUIErrorMessages.java b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapUIErrorMessages.java
deleted file mode 100644
index 124820337b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/SystemTapUIErrorMessages.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.core;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.UIJob;
-
-/**
- * Convenience class for opening an error dialog from a non-UI job.
- *
- */
-public class SystemTapUIErrorMessages extends UIJob {
- private String title, message;
- private static boolean active = true;
-
- public SystemTapUIErrorMessages(String name, String title, String message) {
- super(name);
- this.title = title;
- this.message = message;
- }
-
- @Override
- public IStatus runInUIThread(IProgressMonitor monitor) {
- if (!active)
- return Status.CANCEL_STATUS;
- //Test that this job is running in the UI thread
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-
- if (window == null) {
- return Status.CANCEL_STATUS; //Something is wrong!
- }
-
- Shell sh = new Shell();
-
-
- MessageDialog.openError(sh, title, message);
- return Status.OK_STATUS;
- }
-
-
- public static boolean isActive() {
- return active;
- }
-
- public static void setActive(boolean val) {
- active = val;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/messages.properties b/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/messages.properties
deleted file mode 100644
index 45f129c881..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.core/src/org/eclipse/linuxtools/systemtap/local/core/messages.properties
+++ /dev/null
@@ -1,38 +0,0 @@
-FileFinderOpener.FileNotFound1=File not found
-FileFinderOpener.FileNotFound2=Could not find file to open:\n\n
-FileFinderOpener.MultFilesDialogM1=Multiple files found which define a function '
-FileFinderOpener.MultFilesDialogM2='.
-FileFinderOpener.MultFilesDialogM3=Please select a file or files to open
-FileFinderOpener.MultipleFilesDialog=Multiple files found
-###############################################################################
-# Copyright (c) 2009 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Red Hat - initial API and implementation
-###############################################################################
-FileFinderOpener.FileNotFound=File not found
-SystemTapErrorHandler.4=No recognizable errors detected.
-SystemTapErrorHandler.5=Please consult error log for more information.
-SystemTapErrorHandler.ErrorLogDashes=-----------------------
-SystemTapErrorHandler.ErrorMessage=One or more errors were encountered and logged.
-SystemTapErrorHandler.ErrorMessage1=(Errors -> Open log from the SystemTap View menu).
-SystemTapErrorHandler.ErrorMessage2=Possible causes: \n\n
-SystemTapErrorHandler.ErrorMessageName=Error
-SystemTapErrorHandler.ErrorMessageTitle=Error
-SystemTapErrorHandler.TooManyErrors1=***WARNING*** Cataclysmic failure. Detected
-SystemTapErrorHandler.TooManyErrors2=\ possible faulty probes. Not attempting relaunch.
-SystemTapErrorHandler.TooManyErrors3=Try probing all available files instead - this will also be faster
-SystemTapErrorHandler.TooManyErrors4=as it does not require Eclipse to search for functions.
-SystemTapParser.0=ParseError
-SystemTapParser.1=Unexpected symbol
-SystemTapParser.2=Invalid File Error
-SystemTapParser.3=File Specified Invalid
-SystemTapParser.4=The file :
-SystemTapParser.5=\ could not be rendered. Please make sure the file exists and is valid.
-SystemTapView.31=IO error
-SystemTapView.32=File access error
-SystemTapView.33=Could not access the selected file. This could be because due to a permissions error.
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/systemtap.png b/systemtap/org.eclipse.linuxtools.systemtap.local.core/systemtap.png
deleted file mode 100644
index d0dc4f5303..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.core/systemtap.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.core/systemtapbanner.png b/systemtap/org.eclipse.linuxtools.systemtap.local.core/systemtapbanner.png
deleted file mode 100644
index c48d634332..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.core/systemtapbanner.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/.classpath b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/.classpath
deleted file mode 100644
index ad32c83a78..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/.project b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/.project
deleted file mode 100644
index 2c4f7626ca..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.systemtap.local.launch.tests</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.local.launch.tests/.settings/org.eclipse.jdt.core.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index e49768af22..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Mon Sep 21 12:40:52 EDT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index 3d018ceb6f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,21 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Launch and Core Test
-Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.local.launch.tests
-Bundle-Version: 0.0.1.qualifier
-Bundle-Activator: org.eclipse.linuxtools.systemtap.local.launch.tests.Activator
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.debug.ui;bundle-version="3.4.1",
- org.junit;bundle-version="[0.0.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Import-Package: org.eclipse.cdt.core.model,
- org.eclipse.cdt.internal.core.model,
- org.eclipse.cdt.launch,
- org.eclipse.core.resources,
- org.eclipse.debug.core,
- org.eclipse.linuxtools.profiling.launch,
- org.eclipse.linuxtools.profiling.tests,
- org.eclipse.linuxtools.systemtap.local.core,
- org.eclipse.linuxtools.systemtap.local.launch
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/build.properties
deleted file mode 100644
index 7937021d7e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Red Hat - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- src/,\
- resources/
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.cproject b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.cproject
deleted file mode 100644
index c0cd73664f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.cproject
+++ /dev/null
@@ -1,936 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?fileVersion 4.0.0?>
-
-<cproject>
-<storageModule moduleId="org.eclipse.cdt.core.settings">
-<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.1770452088">
-<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.1770452088" moduleId="org.eclipse.cdt.core.settings" name="Debug">
-<externalSettings/>
-<extensions>
-<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
-<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-</extensions>
-</storageModule>
-<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-<configuration artifactName="eag" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.1770452088" name="Debug" parent="cdt.managedbuild.config.gnu.exe.debug">
-<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.1770452088." name="/" resourcePath="">
-<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.1442429891" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
-<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.535947733" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
-<builder buildPath="${workspace_loc:/eag/Debug}" id="cdt.managedbuild.target.gnu.builder.exe.debug.1661255968" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
-<tool id="cdt.managedbuild.tool.gnu.archiver.base.225690961" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
-<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.374528198" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
-<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.886738070" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
-<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.1663737825" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
-<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.28775023" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
-</tool>
-<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1832776764" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
-<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.534412024" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/>
-<option id="gnu.c.compiler.exe.debug.option.debugging.level.1449229527" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
-<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1481141764" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
-</tool>
-<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.739464353" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug"/>
-<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.843559057" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
-<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1416890963" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
-<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
-<additionalInput kind="additionalinput" paths="$(LIBS)"/>
-</inputType>
-</tool>
-<tool id="cdt.managedbuild.tool.gnu.assembler.exe.debug.1550114770" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug">
-<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1413052230" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
-</tool>
-</toolChain>
-</folderInfo>
-<sourceEntries>
-<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
-</sourceEntries>
-</configuration>
-</storageModule>
-<storageModule moduleId="scannerConfiguration">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.2027009676;cdt.managedbuild.config.gnu.exe.release.2027009676.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.832705582;cdt.managedbuild.tool.gnu.c.compiler.input.1127782331">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.2027009676;cdt.managedbuild.config.gnu.exe.release.2027009676.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1081690282;cdt.managedbuild.tool.gnu.cpp.compiler.input.1387572330">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1770452088;cdt.managedbuild.config.gnu.exe.debug.1770452088.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.374528198;cdt.managedbuild.tool.gnu.cpp.compiler.input.28775023">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1770452088;cdt.managedbuild.config.gnu.exe.debug.1770452088.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1832776764;cdt.managedbuild.tool.gnu.c.compiler.input.1481141764">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-</storageModule>
-<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
-<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
-</cconfiguration>
-<cconfiguration id="cdt.managedbuild.config.gnu.exe.release.2027009676">
-<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.release.2027009676" moduleId="org.eclipse.cdt.core.settings" name="Release">
-<externalSettings/>
-<extensions>
-<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
-<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-</extensions>
-</storageModule>
-<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-<configuration artifactName="eag" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.release.2027009676" name="Release" parent="cdt.managedbuild.config.gnu.exe.release">
-<folderInfo id="cdt.managedbuild.config.gnu.exe.release.2027009676." name="/" resourcePath="">
-<toolChain id="cdt.managedbuild.toolchain.gnu.exe.release.1386132769" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.release">
-<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.release.1801541583" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.release"/>
-<builder buildPath="${workspace_loc:/eag/Release}" id="cdt.managedbuild.target.gnu.builder.exe.release.1322398833" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.release"/>
-<tool id="cdt.managedbuild.tool.gnu.archiver.base.861618002" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
-<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1081690282" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release">
-<option id="gnu.cpp.compiler.exe.release.option.optimization.level.1242434100" name="Optimization Level" superClass="gnu.cpp.compiler.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
-<option id="gnu.cpp.compiler.exe.release.option.debugging.level.1288000062" name="Debug Level" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
-<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1387572330" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
-</tool>
-<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.832705582" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release">
-<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.1207253534" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" valueType="enumerated"/>
-<option id="gnu.c.compiler.exe.release.option.debugging.level.2131641039" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
-<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1127782331" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
-</tool>
-<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.release.1835444074" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.release"/>
-<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.release.1813279246" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.release">
-<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1312332519" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
-<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
-<additionalInput kind="additionalinput" paths="$(LIBS)"/>
-</inputType>
-</tool>
-<tool id="cdt.managedbuild.tool.gnu.assembler.exe.release.32275748" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.release">
-<inputType id="cdt.managedbuild.tool.gnu.assembler.input.2043969971" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
-</tool>
-</toolChain>
-</folderInfo>
-<sourceEntries>
-<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
-</sourceEntries>
-</configuration>
-</storageModule>
-<storageModule moduleId="scannerConfiguration">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.2027009676;cdt.managedbuild.config.gnu.exe.release.2027009676.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.832705582;cdt.managedbuild.tool.gnu.c.compiler.input.1127782331">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.2027009676;cdt.managedbuild.config.gnu.exe.release.2027009676.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1081690282;cdt.managedbuild.tool.gnu.cpp.compiler.input.1387572330">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1770452088;cdt.managedbuild.config.gnu.exe.debug.1770452088.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.374528198;cdt.managedbuild.tool.gnu.cpp.compiler.input.28775023">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1770452088;cdt.managedbuild.config.gnu.exe.debug.1770452088.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1832776764;cdt.managedbuild.tool.gnu.c.compiler.input.1481141764">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-</storageModule>
-<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
-<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
-</cconfiguration>
-</storageModule>
-<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-<project id="eag.cdt.managedbuild.target.gnu.exe.2013229658" name="Executable" projectType="cdt.managedbuild.target.gnu.exe"/>
-</storageModule>
-</cproject>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.lock b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.lock
deleted file mode 100644
index e69de29bb2..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.lock
+++ /dev/null
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.mylyn/repositories.xml.zip b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.mylyn/repositories.xml.zip
deleted file mode 100644
index 1da74ad5ac..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.mylyn/repositories.xml.zip
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.mylyn/tasks.xml.zip b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.mylyn/tasks.xml.zip
deleted file mode 100644
index b2e87053f0..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.mylyn/tasks.xml.zip
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.history/e4/0056fdb7b8a6001e143aec015f68a927 b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.history/e4/0056fdb7b8a6001e143aec015f68a927
deleted file mode 100644
index ddf0661f81..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.history/e4/0056fdb7b8a6001e143aec015f68a927
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>CallGraphDemo</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
- <triggers>clean,full,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>?name?</key>
- <value></value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.append_environment</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.autoBuildTarget</key>
- <value>all</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.buildArguments</key>
- <value></value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.buildCommand</key>
- <value>make</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.buildLocation</key>
- <value>${workspace_loc:/eag/Debug}</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
- <value>clean</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.contents</key>
- <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
- <value>false</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.enableFullBuild</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.fullBuildTarget</key>
- <value>all</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.stopOnError</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
- <value>true</value>
- </dictionary>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.cdt.core.ccnature</nature>
- <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
- <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
- <nature>org.eclipse.cdt.core.cnature</nature>
- </natures>
-</projectDescription>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.projects/CallGraphDemo/.indexes/history.index b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.projects/CallGraphDemo/.indexes/history.index
deleted file mode 100644
index 818380abdf..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.projects/CallGraphDemo/.indexes/history.index
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.projects/CallGraphDemo/1.tree b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.projects/CallGraphDemo/1.tree
deleted file mode 100644
index 3cb2667db3..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.projects/CallGraphDemo/1.tree
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version
deleted file mode 100644
index 25cb955ba2..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version
+++ /dev/null
@@ -1 +0,0 @@
- \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index
deleted file mode 100644
index 16ff9e9597..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version
deleted file mode 100644
index 6b2aaa7640..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version
+++ /dev/null
@@ -1 +0,0 @@
- \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/2.tree b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/2.tree
deleted file mode 100644
index e24fb8ce7a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.root/2.tree
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources
deleted file mode 100644
index ed1fdda75e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.collabnet.subversion.merge.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.collabnet.subversion.merge.prefs
deleted file mode 100644
index be423e0538..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.collabnet.subversion.merge.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Mon Sep 21 10:16:22 EDT 2009
-merge_provider_set=true
-eclipse.preferences.version=1
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 57db05de8b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Mon Sep 21 10:14:45 EDT 2009
-version=1
-eclipse.preferences.version=1
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 160c27dee9..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,15 +0,0 @@
-#Mon Sep 21 10:16:22 EDT 2009
-useQuickDiffPrefPage=true
-proposalOrderMigrated=true
-tabWidthPropagated=true
-content_assist_proposals_background=255,255,255
-org.eclipse.jdt.ui.javadoclocations.migrated=true
-useAnnotationsPrefPage=true
-spelling_locale=en_GB
-org.eclipse.jface.textfont=1|Monospace|10.0|0|GTK|1|;
-org.eclipse.jdt.ui.editor.tab.width=
-org.eclipse.jdt.ui.formatterprofiles.version=11
-spelling_locale_initialized=true
-eclipse.preferences.version=1
-content_assist_proposals_foreground=0,0,0
-fontPropagated=true
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.context.core.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.context.core.prefs
deleted file mode 100644
index 34bdce7947..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.context.core.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Mon Sep 21 10:11:19 EDT 2009
-eclipse.preferences.version=1
-mylyn.attention.migrated=true
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.cvs.ui.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.cvs.ui.prefs
deleted file mode 100644
index 78f0fac618..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.cvs.ui.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Mon Sep 21 10:16:22 EDT 2009
-pref_first_startup=false
-eclipse.preferences.version=1
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.ui.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.ui.prefs
deleted file mode 100644
index 0e56745009..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.ui.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Mon Sep 21 10:16:22 EDT 2009
-eclipse.preferences.version=1
-org.eclipse.team.ui.first_time=false
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs
deleted file mode 100644
index 1a6f4af78a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon Sep 21 10:16:22 EDT 2009
-eclipse.preferences.version=1
-tipsAndTricks=true
-platformState=1251740764806
-quickStart=true
-PROBLEMS_FILTERS_MIGRATE=true
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs
deleted file mode 100644
index 0640ec6132..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Mon Sep 21 10:11:19 EDT 2009
-eclipse.preferences.version=1
-showIntro=false
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs
deleted file mode 100644
index 0796a6bf17..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Mon Sep 21 10:11:20 EDT 2009
-eclipse.preferences.version=1
-ENABLED_DECORATORS=com.mountainminds.eclemma.ui.coverageDecorator\:false,org.eclipse.cdt.ui.indexedFiles\:false,org.eclipse.jdt.ui.override.decorator\:true,org.eclipse.jdt.ui.interface.decorator\:false,org.eclipse.jdt.ui.buildpath.decorator\:true,org.eclipse.mylyn.context.ui.decorator.interest\:true,org.eclipse.mylyn.tasks.ui.decorators.task\:true,org.eclipse.mylyn.team.ui.changeset.decorator\:true,org.eclipse.pde.ui.binaryProjectDecorator\:false,org.eclipse.team.cvs.ui.decorator\:true,org.eclipse.ui.LinkedResourceDecorator\:true,org.eclipse.ui.ContentTypeDecorator\:true,org.tigris.subversion.subclipse.ui.decorator\:true,
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.tigris.subversion.subclipse.ui.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.tigris.subversion.subclipse.ui.prefs
deleted file mode 100644
index 09afa30861..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.tigris.subversion.subclipse.ui.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Mon Sep 21 10:16:22 EDT 2009
-eclipse.preferences.version=1
-pref_merge_provider=CollabNet Desktop
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache
deleted file mode 100644
index 593f4708db..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat
deleted file mode 100644
index 46ba64d913..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml
deleted file mode 100644
index a4ee3cbc9a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<typeInfoHistroy/>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml
deleted file mode 100644
index 9e390f501d..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<qualifiedTypeNameHistroy/>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml
deleted file mode 100644
index f11bde40cd..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<section name="Workbench">
- <section name="org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart">
- <item value="true" key="group_libraries"/>
- <item value="false" key="linkWithEditor"/>
- <item value="2" key="layout"/>
- <item value="1" key="rootMode"/>
- <item value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#x0A;&lt;packageExplorer group_libraries=&quot;1&quot; layout=&quot;2&quot; linkWithEditor=&quot;0&quot; rootMode=&quot;1&quot; workingSetName=&quot;Aggregate for window 1253542278535&quot;&gt;&#x0A;&lt;customFilters userDefinedPatternsEnabled=&quot;false&quot;&gt;&#x0A;&lt;xmlDefinedFilters&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.LibraryFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.LocalTypesFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.StaticsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.pde.ui.ExternalPluginLibrariesFilter1&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ClosedProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonSharedProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonJavaElementFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ContainedLibraryFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.CuAndClassFileFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonJavaProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.EmptyInnerPackageFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.PackageDeclarationFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.EmptyPackageFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ImportDeclarationFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.FieldsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.HideInnerClassFilesFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonPublicFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer_patternFilterId_.*&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.EmptyLibraryContainerFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.pde.ui.BinaryProjectFilter1&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.SyntheticMembersFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.mylyn.java.ui.MembersFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;/xmlDefinedFilters&gt;&#x0A;&lt;/customFilters&gt;&#x0A;&lt;/packageExplorer&gt;" key="memento"/>
- </section>
-</section>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ltk.ui.refactoring/dialog_settings.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ltk.ui.refactoring/dialog_settings.xml
deleted file mode 100644
index 27eb4040f4..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ltk.ui.refactoring/dialog_settings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<section name="Workbench">
- <section name="RefactoringWizard.preview">
- <item value="400" key="height"/>
- <item value="600" key="width"/>
- </section>
-</section>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml
deleted file mode 100644
index eed015db7b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<section name="Workbench">
- <section name="ExternalProjectImportWizard">
- <item value="false" key="WizardProjectsImportPage.STORE_ARCHIVE_SELECTED"/>
- <item value="true" key="WizardProjectsImportPage.STORE_COPY_PROJECT_ID"/>
- </section>
-</section>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml
deleted file mode 100644
index 5b583c4bea..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<section name="Workbench">
- <section name="ImportExportAction">
- </section>
-</section>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml
deleted file mode 100644
index 7cc0f30290..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml
+++ /dev/null
@@ -1,235 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<workbench progressCount="22" version="2.0">
-<workbenchAdvisor/>
-<window height="768" width="1024" x="0" y="25">
-<fastViewData fastViewLocation="1024"/>
-<perspectiveBar>
-<itemSize x="160"/>
-</perspectiveBar>
-<coolbarLayout locked="0">
-<coolItem id="group.file" itemType="typeGroupMarker"/>
-<coolItem id="org.eclipse.ui.workbench.file" itemType="typeToolBarContribution" x="102" y="28"/>
-<coolItem id="additions" itemType="typeGroupMarker"/>
-<coolItem id="org.eclipse.debug.ui.launchActionSet" itemType="typeToolBarContribution" x="154" y="28"/>
-<coolItem id="org.eclipse.jdt.ui.JavaElementCreationActionSet" itemType="typeToolBarContribution" x="102" y="28"/>
-<coolItem id="org.eclipse.search.searchActionSet" itemType="typeToolBarContribution" x="102" y="28"/>
-<coolItem id="group.nav" itemType="typeGroupMarker"/>
-<coolItem id="org.eclipse.ui.workbench.navigate" itemType="typeToolBarContribution" x="182" y="28"/>
-<coolItem id="group.editor" itemType="typeGroupMarker"/>
-<coolItem id="group.help" itemType="typeGroupMarker"/>
-<coolItem id="org.eclipse.ui.workbench.help" itemType="typeToolBarContribution" x="-1" y="-1"/>
-</coolbarLayout>
-<page aggregateWorkingSetId="Aggregate for window 1253542278535" focus="true" label="Workspace - Java">
-<editors>
-<editorArea activeWorkbook="DefaultEditorWorkbook">
-<info part="DefaultEditorWorkbook">
-<folder appearance="1" expanded="2">
-<presentation id="org.eclipse.ui.presentations.WorkbenchPresentationFactory"/>
-</folder>
-</info>
-</editorArea>
-</editors>
-<views>
-<view id="org.eclipse.jdt.ui.TypeHierarchy" partName="Hierarchy"/>
-<view id="org.eclipse.ui.views.ProblemView" partName="Problems">
-<viewState PRIMARY_SORT_FIELD="org.eclipse.ui.ide.severityAndDescriptionField" categoryGroup="org.eclipse.ui.ide.severity" markerContentGenerator="org.eclipse.ui.ide.problemsGenerator" partName="Problems">
-<columnWidths org.eclipse.ui.ide.locationField="73" org.eclipse.ui.ide.markerType="108" org.eclipse.ui.ide.pathField="143" org.eclipse.ui.ide.resourceField="108" org.eclipse.ui.ide.severityAndDescriptionField="350"/>
-<visible IMemento.internal.id="org.eclipse.ui.ide.severityAndDescriptionField"/>
-<visible IMemento.internal.id="org.eclipse.ui.ide.resourceField"/>
-<visible IMemento.internal.id="org.eclipse.ui.ide.pathField"/>
-<visible IMemento.internal.id="org.eclipse.ui.ide.locationField"/>
-<visible IMemento.internal.id="org.eclipse.ui.ide.markerType"/>
-</viewState>
-</view>
-<view id="org.eclipse.jdt.ui.PackageExplorer" partName="Package Explorer">
-<viewState group_libraries="1" layout="2" linkWithEditor="0" rootMode="1" workingSetName="Aggregate for window 1253542278535">
-<customFilters userDefinedPatternsEnabled="false">
-<xmlDefinedFilters>
-<child filterId="org.eclipse.jdt.ui.PackageExplorer.LibraryFilter" isEnabled="false"/>
-<child filterId="org.eclipse.jdt.ui.PackageExplorer.LocalTypesFilter" isEnabled="false"/>
-<child filterId="org.eclipse.jdt.ui.PackageExplorer.StaticsFilter" isEnabled="false"/>
-<child filterId="org.eclipse.pde.ui.ExternalPluginLibrariesFilter1" isEnabled="true"/>
-<child filterId="org.eclipse.jdt.ui.PackageExplorer.ClosedProjectsFilter" isEnabled="false"/>
-<child filterId="org.eclipse.jdt.ui.PackageExplorer.NonSharedProjectsFilter" isEnabled="false"/>
-<child filterId="org.eclipse.jdt.ui.PackageExplorer.NonJavaElementFilter" isEnabled="false"/>
-<child filterId="org.eclipse.jdt.ui.PackageExplorer.ContainedLibraryFilter" isEnabled="false"/>
-<child filterId="org.eclipse.jdt.ui.PackageExplorer.CuAndClassFileFilter" isEnabled="false"/>
-<child filterId="org.eclipse.jdt.ui.PackageExplorer.NonJavaProjectsFilter" isEnabled="false"/>
-<child filterId="org.eclipse.jdt.internal.ui.PackageExplorer.EmptyInnerPackageFilter" isEnabled="true"/>
-<child filterId="org.eclipse.jdt.ui.PackageExplorer.PackageDeclarationFilter" isEnabled="true"/>
-<child filterId="org.eclipse.jdt.internal.ui.PackageExplorer.EmptyPackageFilter" isEnabled="false"/>
-<child filterId="org.eclipse.jdt.ui.PackageExplorer.ImportDeclarationFilter" isEnabled="true"/>
-<child filterId="org.eclipse.jdt.ui.PackageExplorer.FieldsFilter" isEnabled="false"/>
-<child filterId="org.eclipse.jdt.internal.ui.PackageExplorer.HideInnerClassFilesFilter" isEnabled="true"/>
-<child filterId="org.eclipse.jdt.ui.PackageExplorer.NonPublicFilter" isEnabled="false"/>
-<child filterId="org.eclipse.jdt.ui.PackageExplorer_patternFilterId_.*" isEnabled="true"/>
-<child filterId="org.eclipse.jdt.ui.PackageExplorer.EmptyLibraryContainerFilter" isEnabled="true"/>
-<child filterId="org.eclipse.pde.ui.BinaryProjectFilter1" isEnabled="false"/>
-<child filterId="org.eclipse.jdt.ui.PackageExplorer.SyntheticMembersFilter" isEnabled="true"/>
-<child filterId="org.eclipse.mylyn.java.ui.MembersFilter" isEnabled="false"/>
-</xmlDefinedFilters>
-</customFilters>
-</viewState>
-</view>
-<view id="org.eclipse.mylyn.tasks.ui.views.tasks" partName="Task List">
-<viewState linkWithEditor="true" presentation="org.eclipse.mylyn.tasks.ui.categorized">
-<sorter groupBy="CATEGORY_QUERY">
-<sorter>
-<sort0 sortDirection="1" sortKey="PRIORITY"/>
-<sort1 sortDirection="1" sortKey="DATE_CREATED"/>
-<sort2 sortDirection="1" sortKey="NONE"/>
-<sort3 sortDirection="1" sortKey="NONE"/>
-</sorter>
-</sorter>
-</viewState>
-</view>
-<view id="org.eclipse.ui.views.ContentOutline" partName="Outline">
-<viewState/>
-</view>
-<view id="org.eclipse.jdt.ui.SourceView" partName="Declaration"/>
-<view id="org.eclipse.jdt.ui.JavadocView" partName="Javadoc"/>
-</views>
-<perspectives activePart="org.eclipse.jdt.ui.PackageExplorer" activePerspective="org.eclipse.jdt.ui.JavaPerspective">
-<perspective editorAreaTrimState="2" editorAreaVisible="1" fixed="0" version="0.016">
-<descriptor class="org.eclipse.jdt.internal.ui.JavaPerspectiveFactory" id="org.eclipse.jdt.ui.JavaPerspective" label="Java"/>
-<alwaysOnActionSet id="org.eclipse.ui.cheatsheets.actionSet"/>
-<alwaysOnActionSet id="org.eclipse.search.searchActionSet"/>
-<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.annotationNavigation"/>
-<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.navigation"/>
-<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo"/>
-<alwaysOnActionSet id="org.eclipse.ui.externaltools.ExternalToolsSet"/>
-<alwaysOnActionSet id="org.eclipse.ui.actionSet.keyBindings"/>
-<alwaysOnActionSet id="org.eclipse.ui.actionSet.openFiles"/>
-<alwaysOnActionSet id="org.eclipse.mylyn.context.ui.actionSet"/>
-<alwaysOnActionSet id="org.eclipse.mylyn.doc.actionSet"/>
-<alwaysOnActionSet id="org.eclipse.mylyn.tasks.ui.navigation"/>
-<alwaysOnActionSet id="org.eclipse.debug.ui.launchActionSet"/>
-<alwaysOnActionSet id="org.eclipse.jdt.ui.JavaActionSet"/>
-<alwaysOnActionSet id="org.eclipse.jdt.ui.JavaElementCreationActionSet"/>
-<alwaysOnActionSet id="org.eclipse.ui.NavigateActionSet"/>
-<alwaysOnActionSet id="com.mountainminds.eclemma.ui.CoverageActionSet"/>
-<alwaysOnActionSet id="org.eclipse.debug.ui.breakpointActionSet"/>
-<alwaysOnActionSet id="org.eclipse.jdt.debug.ui.JDTDebugActionSet"/>
-<alwaysOnActionSet id="org.eclipse.jdt.junit.JUnitActionSet"/>
-<show_view_action id="org.eclipse.jdt.ui.PackageExplorer"/>
-<show_view_action id="org.eclipse.jdt.ui.TypeHierarchy"/>
-<show_view_action id="org.eclipse.jdt.ui.SourceView"/>
-<show_view_action id="org.eclipse.jdt.ui.JavadocView"/>
-<show_view_action id="org.eclipse.search.ui.views.SearchView"/>
-<show_view_action id="org.eclipse.ui.console.ConsoleView"/>
-<show_view_action id="org.eclipse.ui.views.ContentOutline"/>
-<show_view_action id="org.eclipse.ui.views.ProblemView"/>
-<show_view_action id="org.eclipse.ui.views.ResourceNavigator"/>
-<show_view_action id="org.eclipse.ui.views.TaskList"/>
-<show_view_action id="org.eclipse.ui.views.ProgressView"/>
-<show_view_action id="org.eclipse.ui.navigator.ProjectExplorer"/>
-<show_view_action id="org.eclipse.ui.texteditor.TemplatesView"/>
-<show_view_action id="org.eclipse.ant.ui.views.AntView"/>
-<show_view_action id="org.eclipse.pde.runtime.LogView"/>
-<show_view_action id="org.eclipse.mylyn.tasks.ui.views.tasks"/>
-<new_wizard_action id="org.eclipse.jdt.ui.wizards.JavaProjectWizard"/>
-<new_wizard_action id="org.eclipse.jdt.ui.wizards.NewPackageCreationWizard"/>
-<new_wizard_action id="org.eclipse.jdt.ui.wizards.NewClassCreationWizard"/>
-<new_wizard_action id="org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard"/>
-<new_wizard_action id="org.eclipse.jdt.ui.wizards.NewEnumCreationWizard"/>
-<new_wizard_action id="org.eclipse.jdt.ui.wizards.NewAnnotationCreationWizard"/>
-<new_wizard_action id="org.eclipse.jdt.ui.wizards.NewSourceFolderCreationWizard"/>
-<new_wizard_action id="org.eclipse.jdt.ui.wizards.NewSnippetFileCreationWizard"/>
-<new_wizard_action id="org.eclipse.jdt.ui.wizards.NewJavaWorkingSetWizard"/>
-<new_wizard_action id="org.eclipse.ui.wizards.new.folder"/>
-<new_wizard_action id="org.eclipse.ui.wizards.new.file"/>
-<new_wizard_action id="org.eclipse.ui.editors.wizards.UntitledTextFileWizard"/>
-<new_wizard_action id="org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizard"/>
-<new_wizard_action id="org.eclipse.mylyn.tasks.ui.wizards.new.repository.task"/>
-<perspective_action id="org.eclipse.debug.ui.DebugPerspective"/>
-<perspective_action id="org.eclipse.jdt.ui.JavaBrowsingPerspective"/>
-<hide_toolbar_item_id id="org.eclipse.ui.edit.text.toggleShowSelectedElementOnly"/>
-<view id="org.eclipse.jdt.ui.PackageExplorer"/>
-<view id="org.eclipse.jdt.ui.TypeHierarchy"/>
-<view id="org.eclipse.ui.views.ProblemView"/>
-<view id="org.eclipse.jdt.ui.JavadocView"/>
-<view id="org.eclipse.jdt.ui.SourceView"/>
-<view id="org.eclipse.ui.views.ContentOutline"/>
-<view id="org.eclipse.mylyn.tasks.ui.views.tasks"/>
-<fastViewBars/>
-<layout>
-<mainWindow>
-<info folder="true" part="left">
-<folder activePageID="org.eclipse.jdt.ui.PackageExplorer" appearance="2" expanded="2">
-<page content="org.eclipse.jdt.ui.PackageExplorer" label="Package Explorer"/>
-<page content="org.eclipse.jdt.ui.TypeHierarchy" label="Hierarchy"/>
-<page content="org.eclipse.ui.views.ResourceNavigator" label="LabelNotFound"/>
-<page content="org.eclipse.ui.navigator.ProjectExplorer" label="LabelNotFound"/>
-<page content="org.eclipse.jdt.junit.ResultView" label="LabelNotFound"/>
-<presentation id="org.eclipse.ui.presentations.WorkbenchPresentationFactory">
-<part id="0"/>
-<part id="1"/>
-</presentation>
-</folder>
-</info>
-<info folder="true" part="org.eclipse.ui.internal.ViewStack@498b5a73" ratio="0.7495049" ratioLeft="757" ratioRight="253" relationship="2" relative="left">
-<folder appearance="2" expanded="2">
-<page content="org.eclipse.help.ui.HelpView" label="LabelNotFound"/>
-<page content="org.eclipse.ui.internal.introview" label="LabelNotFound"/>
-<page content="org.eclipse.ui.cheatsheets.views.CheatSheetView" label="LabelNotFound"/>
-<presentation id="org.eclipse.ui.presentations.WorkbenchPresentationFactory"/>
-</folder>
-</info>
-<info part="org.eclipse.ui.editorss" ratio="0.24950495" ratioLeft="252" ratioRight="758" relationship="2" relative="left"/>
-<info folder="true" part="bottom" ratio="0.75" ratioLeft="480" ratioRight="160" relationship="4" relative="org.eclipse.ui.editorss">
-<folder activePageID="org.eclipse.ui.views.ProblemView" appearance="2" expanded="2">
-<page content="org.eclipse.ui.views.ProblemView" label="Problems"/>
-<page content="org.eclipse.jdt.ui.JavadocView" label="Javadoc"/>
-<page content="org.eclipse.jdt.ui.SourceView" label="Declaration"/>
-<page content="org.eclipse.search.ui.views.SearchView" label="LabelNotFound"/>
-<page content="org.eclipse.ui.console.ConsoleView" label="LabelNotFound"/>
-<page content="org.eclipse.ui.views.BookmarkView" label="LabelNotFound"/>
-<page content="org.eclipse.ui.views.ProgressView" label="LabelNotFound"/>
-<presentation id="org.eclipse.ui.presentations.WorkbenchPresentationFactory">
-<part id="0"/>
-<part id="1"/>
-<part id="2"/>
-</presentation>
-</folder>
-</info>
-<info folder="true" part="org.eclipse.ui.internal.ViewStack@6b482747" ratio="0.74934036" ratioLeft="568" ratioRight="190" relationship="2" relative="org.eclipse.ui.editorss">
-<folder activePageID="org.eclipse.mylyn.tasks.ui.views.tasks" appearance="2" expanded="2">
-<page content="org.eclipse.mylyn.tasks.ui.views.tasks" label="Task List"/>
-<presentation id="org.eclipse.ui.presentations.WorkbenchPresentationFactory">
-<part id="0"/>
-</presentation>
-</folder>
-</info>
-<info folder="true" part="right" ratio="0.5" ratioLeft="240" ratioRight="240" relationship="4" relative="org.eclipse.ui.internal.ViewStack@6b482747">
-<folder activePageID="org.eclipse.ui.views.ContentOutline" appearance="2" expanded="2">
-<page content="org.eclipse.ui.views.ContentOutline" label="Outline"/>
-<page content="org.eclipse.ui.texteditor.TemplatesView" label="LabelNotFound"/>
-<page content="org.eclipse.ant.ui.views.AntView" label="LabelNotFound"/>
-<presentation id="org.eclipse.ui.presentations.WorkbenchPresentationFactory">
-<part id="0"/>
-</presentation>
-</folder>
-</info>
-</mainWindow>
-</layout>
-</perspective>
-</perspectives>
-<workingSets/>
-<navigationHistory/>
-<input factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/" type="8"/>
-</page>
-<workbenchWindowAdvisor/>
-<actionBarAdvisor/>
-<trimLayout>
-<trimArea IMemento.internal.id="128">
-<trimItem IMemento.internal.id="org.eclipse.ui.internal.WorkbenchWindow.topBar"/>
-</trimArea>
-<trimArea IMemento.internal.id="1024">
-<trimItem IMemento.internal.id="org.eclise.ui.internal.FastViewBar"/>
-<trimItem IMemento.internal.id="org.eclipse.jface.action.StatusLineManager"/>
-<trimItem IMemento.internal.id="org.eclipse.ui.internal.progress.ProgressRegion"/>
-</trimArea>
-</trimLayout>
-</window>
-<mruList/>
-</workbench> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml
deleted file mode 100644
index eb836ca8bc..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<workingSetManager>
-<workingSet aggregate="true" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1253542278536_0" label="Window Working Set" name="Aggregate for window 1253542278535"/>
-</workingSetManager> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/version.ini b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/version.ini
deleted file mode 100644
index c51ff745b6..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.metadata/version.ini
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.core.runtime=1 \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.project b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.project
deleted file mode 100644
index ddf0661f81..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/.project
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>CallGraphDemo</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
- <triggers>clean,full,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>?name?</key>
- <value></value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.append_environment</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.autoBuildTarget</key>
- <value>all</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.buildArguments</key>
- <value></value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.buildCommand</key>
- <value>make</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.buildLocation</key>
- <value>${workspace_loc:/eag/Debug}</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
- <value>clean</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.contents</key>
- <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
- <value>false</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.enableFullBuild</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.fullBuildTarget</key>
- <value>all</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.stopOnError</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
- <value>true</value>
- </dictionary>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.cdt.core.ccnature</nature>
- <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
- <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
- <nature>org.eclipse.cdt.core.cnature</nature>
- </natures>
-</projectDescription>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/.cproject b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/.cproject
deleted file mode 100644
index c138c118e2..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/.cproject
+++ /dev/null
@@ -1,593 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?fileVersion 4.0.0?>
-
-<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
-<storageModule moduleId="org.eclipse.cdt.core.settings">
-<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.2135562020">
-<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.2135562020" moduleId="org.eclipse.cdt.core.settings" name="Debug">
-<externalSettings/>
-<extensions>
-<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
-<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-</extensions>
-</storageModule>
-<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-<configuration artifactName="basicTest" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.2135562020" name="Debug" parent="cdt.managedbuild.config.gnu.exe.debug">
-<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.2135562020." name="/" resourcePath="">
-<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.101516407" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
-<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.87652736" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
-<builder buildPath="${workspace_loc:/basicTest/Debug}" id="cdt.managedbuild.target.gnu.builder.exe.debug.711674383" managedBuildOn="true" name="Gnu Make Builder.Debug" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
-<tool id="cdt.managedbuild.tool.gnu.archiver.base.584252080" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
-<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.942952139" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
-<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.1710669157" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
-<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.943190718" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
-</tool>
-<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.2114875696" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
-<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.442592240" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/>
-<option id="gnu.c.compiler.exe.debug.option.debugging.level.1038207667" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
-<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1588134977" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
-</tool>
-<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.690432365" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug">
-<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.710576397" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
-<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
-<additionalInput kind="additionalinput" paths="$(LIBS)"/>
-</inputType>
-</tool>
-<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.1855294342" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug"/>
-<tool id="cdt.managedbuild.tool.gnu.assembler.exe.debug.404150272" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug">
-<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1440186503" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
-</tool>
-</toolChain>
-</folderInfo>
-</configuration>
-</storageModule>
-<storageModule moduleId="scannerConfiguration">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.2135562020;cdt.managedbuild.config.gnu.exe.debug.2135562020.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.2114875696;cdt.managedbuild.tool.gnu.c.compiler.input.1588134977">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.1817975882;cdt.managedbuild.config.gnu.exe.release.1817975882.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.444073320;cdt.managedbuild.tool.gnu.c.compiler.input.797024236">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-</storageModule>
-<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
-</cconfiguration>
-<cconfiguration id="cdt.managedbuild.config.gnu.exe.release.1817975882">
-<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.release.1817975882" moduleId="org.eclipse.cdt.core.settings" name="Release">
-<externalSettings/>
-<extensions>
-<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
-<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-</extensions>
-</storageModule>
-<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-<configuration artifactName="basicTest" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.release.1817975882" name="Release" parent="cdt.managedbuild.config.gnu.exe.release">
-<folderInfo id="cdt.managedbuild.config.gnu.exe.release.1817975882." name="/" resourcePath="">
-<toolChain id="cdt.managedbuild.toolchain.gnu.exe.release.638749964" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.release">
-<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.release.93931152" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.release"/>
-<builder buildPath="${workspace_loc:/basicTest/Release}" id="cdt.managedbuild.target.gnu.builder.exe.release.1459250839" managedBuildOn="true" name="Gnu Make Builder.Release" superClass="cdt.managedbuild.target.gnu.builder.exe.release"/>
-<tool id="cdt.managedbuild.tool.gnu.archiver.base.1811684256" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
-<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1303850239" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release">
-<option id="gnu.cpp.compiler.exe.release.option.optimization.level.2129950917" superClass="gnu.cpp.compiler.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
-<option id="gnu.cpp.compiler.exe.release.option.debugging.level.937916202" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
-</tool>
-<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.444073320" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release">
-<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.1535551833" superClass="gnu.c.compiler.exe.release.option.optimization.level" valueType="enumerated"/>
-<option id="gnu.c.compiler.exe.release.option.debugging.level.786094264" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
-<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.797024236" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
-</tool>
-<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.release.1554906730" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.release">
-<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.320125291" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
-<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
-<additionalInput kind="additionalinput" paths="$(LIBS)"/>
-</inputType>
-</tool>
-<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.release.1861740149" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.release"/>
-<tool id="cdt.managedbuild.tool.gnu.assembler.exe.release.800688609" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.release">
-<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1339981349" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
-</tool>
-</toolChain>
-</folderInfo>
-</configuration>
-</storageModule>
-<storageModule moduleId="scannerConfiguration">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.2135562020;cdt.managedbuild.config.gnu.exe.debug.2135562020.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.2114875696;cdt.managedbuild.tool.gnu.c.compiler.input.1588134977">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.1817975882;cdt.managedbuild.config.gnu.exe.release.1817975882.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.444073320;cdt.managedbuild.tool.gnu.c.compiler.input.797024236">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-</scannerConfigBuildInfo>
-</storageModule>
-</cconfiguration>
-</storageModule>
-<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-<project id="basicTest.cdt.managedbuild.target.gnu.exe.495188798" name="Executable" projectType="cdt.managedbuild.target.gnu.exe"/>
-</storageModule>
-</cproject>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/.project b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/.project
deleted file mode 100644
index 3ac0878e85..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/.project
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>basicTest</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
- <triggers>clean,full,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>?name?</key>
- <value></value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.append_environment</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.autoBuildTarget</key>
- <value>all</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.buildArguments</key>
- <value></value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.buildCommand</key>
- <value>make</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.buildLocation</key>
- <value>${workspace_loc:/basicTest/Debug}</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
- <value>clean</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.contents</key>
- <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
- <value>false</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.enableFullBuild</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.fullBuildTarget</key>
- <value>all</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.stopOnError</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
- <value>true</value>
- </dictionary>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.cdt.core.cnature</nature>
- <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
- <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
- </natures>
-</projectDescription>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/main.c b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/main.c
deleted file mode 100644
index c8fafdd2a9..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/main.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * main.c
- *
- * Created on: 2009-09-21
- * Author: chwang
- */
-#include <stdio.h>
-
-
-void calledOnce() {
- printf("Called\n");
-}
-
-void calledTwice() {
- printf("Double\n");
-}
-
-int main() {
- printf("Done\n");
- calledOnce();
- calledTwice();
- calledTwice();
- return 0;
-}
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/uncalled.c b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/uncalled.c
deleted file mode 100644
index e99430a11d..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/resources/basicTest/uncalled.c
+++ /dev/null
@@ -1,3 +0,0 @@
-void doNothing() {
- return;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/AbstractStapTest.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/AbstractStapTest.java
deleted file mode 100644
index 3672cb3588..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/AbstractStapTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.launch.tests;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.cdt.core.model.ICProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
-import org.eclipse.linuxtools.profiling.tests.AbstractTest;
-import org.eclipse.linuxtools.systemtap.local.core.PluginConstants;
-import org.eclipse.linuxtools.systemtap.local.launch.SystemTapOptionsTab;
-import org.osgi.framework.Bundle;
-
-public abstract class AbstractStapTest extends AbstractTest {
- protected ICProject proj;
-
- @Override
- protected ILaunchConfigurationType getLaunchConfigType() {
- return getLaunchManager().getLaunchConfigurationType(PluginConstants.CONFIGURATION_TYPE_ID);
- }
-
- @Override
- protected void setProfileAttributes(ILaunchConfigurationWorkingCopy wc)
- throws CoreException {
- ILaunchConfigurationTab tab = new SystemTapOptionsTab();
- tab.setDefaults(wc);
- }
-
-
- protected ICProject createProjectAndBuild(String projname) throws Exception {
- return createProjectAndBuild(getBundle(), projname);
- }
-
- protected abstract Bundle getBundle();
-
- private List<ILaunch> launches;
-
- @Override
- protected void setUp() throws Exception {
- launches = new ArrayList<ILaunch>();
-
- super.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception {
- if (launches.size() > 0) {
- DebugPlugin.getDefault().getLaunchManager().removeLaunches(launches.toArray(new ILaunch[launches.size()]));
- launches.clear();
- }
- super.tearDown();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/Activator.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/Activator.java
deleted file mode 100644
index b19f0a66f5..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/Activator.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.launch.tests;
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.linuxtools.systemtap.tests";
- public static String PLUGIN_LOCATION;
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- PLUGIN_LOCATION = getPluginLocation();
-
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-
- public String getPluginLocation() {
- Bundle bundle = getBundle();
-
- URL locationUrl = FileLocator.find(bundle,new Path("/"), null); //$NON-NLS-1$
- URL fileUrl = null;
- try {
- fileUrl = FileLocator.toFileURL(locationUrl);
- } catch (IOException e) {
- e.printStackTrace();
- }
- return fileUrl.getFile();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/AllTests.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/AllTests.java
deleted file mode 100644
index 7bf687edee..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/AllTests.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.launch.tests;
-
-//import org.eclipse.jface.dialogs.MessageDialog;
-//import org.eclipse.swt.widgets.Shell;
-
-import org.eclipse.linuxtools.systemtap.local.core.SystemTapUIErrorMessages;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
-
- public static Test suite() {
-
- SystemTapUIErrorMessages.setActive(false);
-
- TestSuite suite = new TestSuite(
- "Test for org.eclipse.linuxtools.systemtap.local.launch.tests");
- //$JUnit-BEGIN$
- suite.addTestSuite(SystemTapCommandTest.class);
- suite.addTestSuite(ConfigurationTest.class);
- suite.addTestSuite(SystemTapCommandGeneratorTest.class);
- if (TestConstants.canRunStap)
- suite.addTestSuite(SystemTapCommandLineTest.class);
- suite.addTestSuite(SystemTapTabTest.class);
- suite.addTestSuite(LaunchShortcutsTest.class);
- //$JUnit-END$
- return suite;
- }
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/ConfigurationTest.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/ConfigurationTest.java
deleted file mode 100644
index aa25639917..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/ConfigurationTest.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.launch.tests;
-
-import java.io.IOException;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.linuxtools.systemtap.local.core.LaunchConfigurationConstants;
-import org.eclipse.linuxtools.systemtap.local.launch.SystemTapLaunchConfigurationDelegate;
-import org.eclipse.linuxtools.systemtap.local.launch.SystemTapLaunchShortcut;
-
-public class ConfigurationTest extends TestCase{
-
-
- /**
- * This test checks if the commands sent by SystemTap match exactly the options
- * that are set. Uses the delegate.launch() function.
- *
- * Activates all options!
- */
- public void testConfig() {
-
- System.out.println("\n\nLaunching ConfigurationTest\n");
- SystemTapLaunchShortcut shortcut = new SystemTapLaunchShortcut();
-
- try {
- String testCDirectives = "-DRandomjunk -DMoreJunk";
- String testOutputPath = "/tmp/ThisFileDoesNothingDeleteIt";
- String testBinaryPath = "More random junk";
- String testScriptPath = "/tmp/NotAScriptFile.stp";
- String testArguments = "Nonexistent Arguments";
- int testPid = 413;
- int testBuffer = 100;
- int testPass = 10;
-
- ILaunchConfiguration config = shortcut.outsideGetLaunchConfigType().newInstance(null, "Temp name");
- ILaunchConfigurationWorkingCopy wc = config.copy("Testing configuration");
-
- wc.setAttribute(LaunchConfigurationConstants.COMMAND_VERBOSE, true);
- wc.setAttribute(LaunchConfigurationConstants.COMMAND_KEEP_TEMPORARY, true);
- wc.setAttribute(LaunchConfigurationConstants.COMMAND_GURU, true);
- wc.setAttribute(LaunchConfigurationConstants.COMMAND_PROLOGUE_SEARCH, true);
- wc.setAttribute(LaunchConfigurationConstants.COMMAND_NO_CODE_ELISION, true);
- wc.setAttribute(LaunchConfigurationConstants.COMMAND_DISABLE_WARNINGS, true);
- wc.setAttribute(LaunchConfigurationConstants.COMMAND_BULK_MODE, true);
- wc.setAttribute(LaunchConfigurationConstants.COMMAND_TIMING_INFO, true);
- wc.setAttribute(LaunchConfigurationConstants.COMMAND_SKIP_BADVARS, true);
- wc.setAttribute(LaunchConfigurationConstants.COMMAND_IGNORE_DWARF, true);
- wc.setAttribute(LaunchConfigurationConstants.COMMAND_TAPSET_COVERAGE, true);
- wc.setAttribute(LaunchConfigurationConstants.COMMAND_LEAVE_RUNNING, true);
- wc.setAttribute(LaunchConfigurationConstants.COMMAND_PASS,testPass);
- wc.setAttribute(LaunchConfigurationConstants.COMMAND_BUFFER_BYTES,testBuffer);
- wc.setAttribute(LaunchConfigurationConstants.COMMAND_TARGET_PID,testPid);
-
-
-
- wc.setAttribute(LaunchConfigurationConstants.COMMAND_C_DIRECTIVES, testCDirectives);
- wc.setAttribute(LaunchConfigurationConstants.BINARY_PATH, testBinaryPath);
- wc.setAttribute(LaunchConfigurationConstants.SCRIPT_PATH, testScriptPath);
- wc.setAttribute(LaunchConfigurationConstants.ARGUMENTS, testArguments);
- wc.setAttribute(LaunchConfigurationConstants.OUTPUT_PATH, testOutputPath);
-
- config = wc.doSave();
-
- SystemTapLaunchConfigurationDelegate del = new SystemTapLaunchConfigurationDelegate();
- del.launch(config, "profile", null, null);
-
- System.out.println(del.getCommand());
-
- assertEquals("stap -v -p" + testPass + " -k -g -P -u -w -b -t -s"
- + testBuffer + " -x" + testPid + " "
- + testCDirectives + " -F --skip-badvars --ignore-dwarf -q " + "-o "
- + testOutputPath + " -c '"
- + testBinaryPath + "' " + testScriptPath + " " + testArguments, del.getCommand());
- } catch (CoreException e) {
- e.printStackTrace();
- }
-
- killStap();
- }
-
- public void killStap() {
- Runtime run = Runtime.getRuntime();
- try {
- run.exec("kill stap");
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/LaunchShortcutsTest.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/LaunchShortcutsTest.java
deleted file mode 100644
index 381f111ac1..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/LaunchShortcutsTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.launch.tests;
-
-import org.eclipse.cdt.core.model.IBinary;
-import org.eclipse.linuxtools.systemtap.local.core.SystemTapUIErrorMessages;
-import org.eclipse.linuxtools.systemtap.local.launch.LaunchStapGraph;
-import org.osgi.framework.Bundle;
-
-
-
-
-public class LaunchShortcutsTest extends AbstractStapTest{
-
- /**
- * Checks that the scripts are correct/exist and that the expected
- * command is sent.
- */
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- proj = createProjectAndBuild("basicTest"); //$NON-NLS-1$
- }
-
- @Override
- protected void tearDown() throws Exception {
- deleteProject(proj);
- super.tearDown();
- }
-
-
- public void testLaunchCallGraph() {
- try {
- SystemTapUIErrorMessages.setActive(false);
-
- LaunchStapGraph launch = new LaunchStapGraph();
- launch.setTestMode(true);
-
- IBinary bin = proj.getBinaryContainer().getBinaries()[0];
- launch.launch(bin, "profile");
- String script = launch.getScript();
- System.out.println(script);
-
- assert(script.contains("probe process(@1).function(\"calledOnce\").call{ callFunction(probefunc()) } probe process(@1).function(\"calledOnce\").return{ returnFunction(probefunc()) }"));
- assert(script.contains("probe process(@1).function(\"calledTwice\").call{ callFunction(probefunc()) } probe process(@1).function(\"calledTwice\").return{ returnFunction(probefunc()) }"));
- assert(script.contains("probe process(@1).function(\"main\").call{ callFunction(probefunc()) } probe process(@1).function(\"main\").return{ returnFunction(probefunc()) }"));
-
-
-
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- @Override
- protected Bundle getBundle() {
- return Activator.getDefault().getBundle();
- }
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapCommandGeneratorTest.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapCommandGeneratorTest.java
deleted file mode 100644
index bf276df325..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapCommandGeneratorTest.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.launch.tests;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.eclipse.linuxtools.systemtap.local.core.SystemTapCommandGenerator;
-
-import junit.framework.TestCase;
-
-public class SystemTapCommandGeneratorTest extends TestCase{
-
- //HACK TO GET THE PATH TO THE TESTING PROJECT
- File file = new File("");
- private String location = file.getAbsolutePath() + "/";
- SystemTapCommandGenerator stapgen = new SystemTapCommandGenerator();
-
- public void testExecutionWithScriptAndBinaryAndArgument(){
-
- System.out.println("\n\nLaunching SystemTapCommandGeneratorTest\n");
- String binaryFilePath = location + "factorial";
- String scriptPath = location + "function_count.stp";
-
- //RUN
- stapgen
- .generateCommand(
- scriptPath,
- binaryFilePath,
- "",
- true,
- true,
- binaryFilePath, "");
-
- assertEquals(
- "stap -c '"+binaryFilePath+"' "+scriptPath+ " " +binaryFilePath,
- stapgen.getExecuteCommand());
- killStap();
- //END
- }
-
- public void testScriptExecution(){
-
- String scriptPath = location + "simple.stp";
-
- //RUN
- stapgen
- .generateCommand(
- scriptPath,
- "",
- "",
- false,
- false,
- "", "");
-
- assertEquals(
- "stap "+scriptPath,
- stapgen.getExecuteCommand());
- //END
- }
-
- public void testExecutionWithScriptAndBinary() {
-
- // RUN
- String binaryFilePath = location + "factorial";
- String scriptPath = location + "allsyscall.stp";
-
- stapgen.generateCommand(scriptPath, binaryFilePath, "", true, false, "", "");
-
- assertEquals("stap -c '" + binaryFilePath + "' " + scriptPath, stapgen
- .getExecuteCommand());
- // END
-
- killStap();
- }
-
-
- public void killStap() {
- Runtime run = Runtime.getRuntime();
- try {
- run.exec("kill stap");
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapCommandLineTest.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapCommandLineTest.java
deleted file mode 100644
index 7f6a741031..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapCommandLineTest.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.launch.tests;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.linuxtools.systemtap.local.core.LaunchConfigurationConstants;
-import org.eclipse.linuxtools.systemtap.local.launch.SystemTapLaunchShortcut;
-
-import junit.framework.TestCase;
-
-public class SystemTapCommandLineTest extends TestCase {
- File tmpfile = new File("");
- public final String currentPath = tmpfile.getAbsolutePath();
-
- public String stapCommand;
- public final String scriptPath = currentPath+"/stapscript";
- public String binaryPath = "";
- public final String graphDataPath = currentPath+"/graph_data_output.graph";
- public final String parseFunctionPath = currentPath+"/parse_function_nomark.stp";
-
-
-
-
- //FOR TESTING RAW STAP SCRIPT OUTPUT
- public String getCommandOutput(String command, boolean needsBinary){
- Runtime rt = Runtime.getRuntime();
- try {
- //CREATE/ACCESS A TEMPORARY FILE TO HOLD THE SCRIPT
- File file = new File(scriptPath);
- file.createNewFile();
-
- //WRITE THE COMMAND TO THE FILE
- BufferedWriter wbuff = new BufferedWriter(new FileWriter(file));
- wbuff.write(command);
- wbuff.close();
-
- //EXECUTE THE COMMAND
- Process pr = null;
- rt.exec("kill stap");
- if (needsBinary){
- pr = rt.exec("stap -c '"+binaryPath+ "' "+ scriptPath + " " + binaryPath);
- }else{
- pr = rt.exec("stap "+scriptPath);
- }
- pr.waitFor();
-
- InputStream inpstr = pr.getInputStream();
- BufferedReader rbuff = new BufferedReader (new InputStreamReader(inpstr));
- String line = "";
- String text = "";
-
- //READ THE STANDARD OUTPUT OF COMMAND
- while ((line = rbuff.readLine()) != null){
- text += line;
- }
-
- rbuff.close();
- return text;
-
- } catch (IOException e) {
- e.printStackTrace();
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- return null;
- }
-
-
- public void testBasicStapScript() {
- if (!TestConstants.canRunStap)
- return;
- final String expected = "probe_beginprobe_end";
-
- String command = "probe begin { " +
- "printf(\"probe_begin\")" +
- "exit()" +
- "}" +
- "probe end {" +
- "printf(\"probe_end\")" +
- "}";
- String actual = getCommandOutput(command, false);
-
- assertEquals(expected, actual);
- }
-
-
-
- public void testFunctionProbes(){
- binaryPath = currentPath+"/basic";
- final String expected = "mainfoo";
-
- String command = "probe process(@1).function(\"*\"){ printf(\"%s\",probefunc()) }";
- String actual = getCommandOutput(command, true);
-
- assertEquals(expected, actual);
-
- }
-
- public void testBasicOperations(){
- if (!TestConstants.canRunStap)
- return;
- final String expected = "01234";
-
- String command = "global map\n" +
- "global num\n" +
- "probe begin {" +
- "for (num=0; num<5; num++){"+
- "map[num]=num"+
- "}"+
- "exit()"+
- "}"+
- "probe end {" +
- "foreach (tmp in map){"+
- "printf(\"%d\",map[tmp])"+
- "}"+
- "}";
- String actual = getCommandOutput(command, false);
-
- assertEquals(expected, actual);
-
- }
-
- public void testFailure(){
- try {
- SystemTapLaunchShortcut shortcut = new SystemTapLaunchShortcut();
- ILaunchConfiguration config = shortcut.outsideGetLaunchConfigType().newInstance(null, "Temp Name");
- ILaunchConfigurationWorkingCopy wc = config.copy("Temp Name");
-
- wc.setAttribute(LaunchConfigurationConstants.BINARY_PATH,currentPath + "/basic");
- wc.setAttribute(LaunchConfigurationConstants.SCRIPT_PATH,scriptPath);
- wc.setAttribute(LaunchConfigurationConstants.ARGUMENTS,"-e'()'");
- wc.setAttribute(LaunchConfigurationConstants.OUTPUT_PATH,graphDataPath);
- config = wc.doSave();
- config.launch("profile", null);
-
- } catch (CoreException e) {
- e.printStackTrace();
- }
- }
-
-
- public void initializeFiles(){
- File scriptFile = new File(scriptPath);
- File graphDataFile = new File(graphDataPath);
-
- try {
- scriptFile.createNewFile();
- graphDataFile.createNewFile();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapCommandTest.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapCommandTest.java
deleted file mode 100644
index 173ec32bed..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapCommandTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.launch.tests;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.PrintStream;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-
-public class SystemTapCommandTest extends TestCase{
-
-
- /**
- * Tests if SystemTapCommand is properly obtaining output from the runtime process
- */
- public void testCommand() {
- System.out.println("\n\nLaunching SystemTapCommandTest\n");
-
-
- //Set up variables
- String testText = "CORRECT";
- String tempLocation = ResourcesPlugin.getWorkspace().getRoot().getLocation().toString()
- + "/DeleteThisScript.stp";
-
- //Create temporary file containing the test script
- File temporaryScript = new File(tempLocation);
-
- try {
- FileOutputStream output = new FileOutputStream(temporaryScript);
- new PrintStream(output).println("probe begin { printf(\"" + testText + "\") exit() }");
-
- } catch (FileNotFoundException e1) {
- e1.printStackTrace();
- }
-
-
-// //Execute and assert
-// SystemTapCommandParser cmd = new SystemTapCommandParser("CallgraphView", "stap "
-// + tempLocation, junk,false, false, "");
-// cmd.setTestingMode();
-// assertEquals(cmd.testRun(new NullProgressMonitor()), Status.OK_STATUS);
-// assertEquals(testText, cmd.getTestOutput());
-
- //Cleanup
- temporaryScript.delete();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapTabTest.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapTabTest.java
deleted file mode 100644
index 56a1878100..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/SystemTapTabTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.launch.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.linuxtools.systemtap.local.launch.SystemTapLaunchShortcut;
-import org.eclipse.linuxtools.systemtap.local.launch.SystemTapOptionsTab;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-
-public class SystemTapTabTest extends TestCase{
-
-
- public void testTabs(){
- Shell sh = new Shell();
- Composite cmp = new Composite(sh, SWT.NONE);
-
- SystemTapLaunchShortcut shortCut = new SystemTapLaunchShortcut();
- SystemTapOptionsTab stp = new SystemTapOptionsTab();
- stp.createControl(cmp);
- ILaunchConfiguration configuration;
- try {
- configuration = shortCut.outsideGetLaunchConfigType().
- newInstance(null, (DebugPlugin.getDefault().getLaunchManager()).
- generateUniqueLaunchConfigurationNameFrom("invalid"));
- ILaunchConfigurationWorkingCopy wc = configuration.getWorkingCopy();
- stp.setDefaults(wc);
- stp.performApply(wc);
- wc.doSave();
- stp.initializeFrom(configuration);
- } catch (CoreException e) {
- e.printStackTrace();
- }
- sh.open();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/TestConstants.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/TestConstants.java
deleted file mode 100644
index e6042341cd..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/src/org/eclipse/linuxtools/systemtap/local/launch/tests/TestConstants.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.launch.tests;
-
-public class TestConstants {
- public static boolean canRunStap = false;
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/test.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/test.xml
deleted file mode 100644
index 4559259865..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch.tests/test.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="testsuite" default="run" basedir=".">
- <property name="classname" value="org.eclipse.linuxtools.systemtap.local.launch.tests.AllTests" />
- <property name="plugin-name" value="org.eclipse.linuxtools.systemtap.local.launch.tests" />
-
- <property name="library-file" value="${eclipse-home}/dropins/${subProjectName2}/plugins/org.eclipse.test/library.xml" />
-
- <!-- The property ${eclipse-home} should be passed into this script -->
- <!-- Set a meaningful default value for when it is not. -->
- <property name="eclipse-home" value="${basedir}/../.." />
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp />
- <delete>
- <fileset dir="${eclipse-home}" includes="org*.xml" />
- </delete>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="locallaunch_suite">
- <property name="locallaunch-folder" value="${eclipse-home}/locallaunch_folder" />
- <delete dir="${localcallgraph-folder}" quiet="true" />
- <ant target="launch-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${locallaunch-folder}" />
- <property name="plugin-name" value="${plugin-name}" />
- <property name="classname" value="${classname}" />
- </ant>
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- <mkdir dir="${results}/consolelogs" />
- <copy failonerror="false" file="${eclipse-home}/results/${classname}.txt" tofile="${results}/consolelogs/${classname}_${platform}.metadata.log.txt" />
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target name="run" depends="init,locallaunch_suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml" />
- <property name="output-file" value="${plugin-name}.xml" />
- </ant>
- </target>
-
- <target name="all" depends="run" description="Dummy target to run all tests">
- </target>
-
-</project>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/.classpath b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/.classpath
deleted file mode 100644
index ad32c83a78..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/.project b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/.project
deleted file mode 100644
index 18815fe63a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.systemtap.local.launch</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/.settings/org.eclipse.jdt.core.prefs b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 8a7655522f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Mon Sep 21 12:33:12 EDT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/META-INF/MANIFEST.MF
deleted file mode 100644
index 0c01710dcd..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,30 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: SystemTap Local Launch
-Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.local.launch;singleton:=true
-Bundle-Version: 0.0.1.qualifier
-Bundle-Activator: org.eclipse.linuxtools.systemtap.local.launch.Activator
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.debug.ui,
- org.eclipse.draw2d,
- org.eclipse.cdt.core
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Import-Package: org.eclipse.cdt.core.model,
- org.eclipse.cdt.debug.core,
- org.eclipse.cdt.launch,
- org.eclipse.cdt.utils.pty,
- org.eclipse.cdt.utils.spawner,
- org.eclipse.core.resources,
- org.eclipse.debug.core,
- org.eclipse.debug.ui,
- org.eclipse.jface.text,
- org.eclipse.linuxtools.profiling.launch,
- org.eclipse.linuxtools.systemtap.local.core,
- org.eclipse.ui,
- org.eclipse.ui.console,
- org.eclipse.ui.model,
- org.eclipse.ui.views.navigator
-Bundle-Localization: plugin
-Export-Package: org.eclipse.linuxtools.systemtap.local.launch
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/build.properties
deleted file mode 100644
index bbba056b40..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Red Hat - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- plugin.properties,\
- .,\
- icons/,\
- bin/
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/icons/Wizard.gif b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/icons/Wizard.gif
deleted file mode 100644
index a10f66d312..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/icons/Wizard.gif
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/icons/bar_graph.png b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/icons/bar_graph.png
deleted file mode 100644
index 4a6e255790..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/icons/bar_graph.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/icons/question.png b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/icons/question.png
deleted file mode 100644
index 7e6554c9f5..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/icons/question.png
+++ /dev/null
Binary files differ
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/index.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/index.xml
deleted file mode 100644
index c6de5e59d7..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/index.xml
+++ /dev/null
@@ -1,5 +0,0 @@
- <index version="1.0">
- <entry keyword="Tree Selection">
- <topic href="tree.htm" />
- </entry>
- </index>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/plugin.properties b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/plugin.properties
deleted file mode 100644
index 06458bf8f8..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Red Hat - initial API and implementation
-###############################################################################
-launchConfigurationType.name.0 = Profile with SystemTap
-launchConfigurationTabGroup.description.0 = Launch a custom SystemTap Script \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/plugin.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/plugin.xml
deleted file mode 100644
index a6bfec58e3..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/plugin.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-
-<plugin>
- <!--<extension point="org.eclipse.help.toc">
- <toc file="toc.xml" primary="true"/>
- </extension>
- <extension point="org.eclipse.help.index">
- <index file="index.xml"/>
- </extension>-->
-
- <extension
- point="org.eclipse.debug.core.launchConfigurationTypes">
- <launchConfigurationType
- delegate="org.eclipse.linuxtools.systemtap.local.launch.SystemTapLaunchConfigurationDelegate"
- id="org.eclipse.linuxtools.systemtap.localgui.launch.systemtapLaunch"
- modes="profile"
- name="%launchConfigurationType.name.0"
- public="true"
- sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
- sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
- </launchConfigurationType>
- </extension>
-
-
-
- <extension
- point="org.eclipse.debug.ui.launchConfigurationTabGroups">
- name = "SystemTap Control Tab"
- <launchConfigurationTabGroup
- class="org.eclipse.linuxtools.systemtap.local.launch.SystemTapLaunchConfigurationTabGroup"
- description="%launchConfigurationTabGroup.description.0"
- id="org.eclipse.linuxtools.systemtap.localgui.launch.systemtapTabGroup"
- type="org.eclipse.linuxtools.systemtap.localgui.launch.systemtapLaunch">
- </launchConfigurationTabGroup>
- </extension>
-
-
- <extension
- point="org.eclipse.debug.ui.launchShortcuts">
- <shortcut
- class="org.eclipse.linuxtools.systemtap.local.launch.LaunchStapGraph"
- id="org.eclipse.linuxtools.systemtap.quicklaunchStapGraph1"
- icon="icons/bar_graph.png"
- label="Function callgraph"
- modes="profile">
- <contextualLaunch>
- <enablement>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate>
- <or>
- <instanceof
- value="org.eclipse.cdt.core.model.IBinary">
- </instanceof>
- <instanceof
- value="org.eclipse.cdt.core.model.ICProject">
- </instanceof>
- <test
- forcePluginActivation="true"
- property="org.eclipse.cdt.launch.isExecutable">
- </test>
- <test
- forcePluginActivation="true"
- property="org.eclipse.cdt.launch.isCProject">
- </test>
- <and>
- <instanceof
- value="org.eclipse.ui.IFileEditorInput">
- </instanceof>
- <adapt
- type="org.eclipse.core.resources.IResource">
- <adapt
- type="org.eclipse.cdt.core.model.ICElement">
- </adapt>
- </adapt>
- </and>
- </or>
- </iterate>
- </with>
- </enablement>
- </contextualLaunch>
- </shortcut>
- </extension>
-
-
-</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/ASTTranslationUnitVisitor.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/ASTTranslationUnitVisitor.java
deleted file mode 100644
index 195b43b1f5..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/ASTTranslationUnitVisitor.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.launch;
-
-import java.util.ArrayList;
-
-import org.eclipse.cdt.core.dom.ast.ASTVisitor;
-import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
-import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
-
-
-//TODO: Remove unused class?
-public class ASTTranslationUnitVisitor extends ASTVisitor{
-
- public ASTTranslationUnitVisitor () {
- super();
- shouldVisitStatements = true;
- shouldVisitDeclarations = true;
- funcs = new ArrayList<String>();
- }
-
-
- private String fileName;
-
- private ArrayList<String> funcs;
- public int visit(IASTDeclaration s) {
- if (!s.getParent().getContainingFilename().contains(fileName))
- return PROCESS_SKIP;
- if (s instanceof IASTFunctionDefinition) {
- String name =((IASTFunctionDefinition) s).getDeclarator().getName().toString();
- if (!name.substring(0, 2).equals("__")) { //$NON-NLS-1$
- funcs.add(name);
- }
- }
- return PROCESS_CONTINUE;
- }
-
-
- public ArrayList<String> getFunctions() {
- return funcs;
- }
-
- public void setFileName(String val) {
- fileName = val;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/Activator.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/Activator.java
deleted file mode 100644
index db0923f86c..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/Activator.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.launch;
-
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.linuxtools.systemtap.local.core.LaunchConfigurationConstants;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- *
- * This is more or less the default Eclipse plugin-wizard Activator.
- */
-public class Activator extends AbstractUIPlugin {
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
-
- }
-
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
-
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(LaunchConfigurationConstants.PLUGIN_ID, path);
- }
-
-
-}
-
-
-//public String getPluginLocation() {
-//Bundle bundle = getBundle();
-//
-//URL locationUrl = FileLocator.find(bundle,new Path("/"), null);
-//URL fileUrl = null;
-//try {
-// fileUrl = FileLocator.toFileURL(locationUrl);
-//} catch (IOException e) {
-// e.printStackTrace();
-//}
-//return fileUrl.getFile();
-//}
-
-//private void checkRun() {
-////Check if install script has been executed. Install script MUST delete the FirstRun file,
-////this will execute every time!
-//String firstRun = getPluginLocation() + "FirstRun";
-//File firstFile = new File(firstRun);
-//if (firstFile.exists()) {
-// Shell sh = new Shell();
-// String command = "./" + getPluginLocation() + "install.sh " + firstRun;
-// InputDialog id = new InputDialog(sh, "First time startup", "Hi there! Looks like this is your first time running the SystemTap Eclipse plugin. In order for this plugin to work, you will first need to install SystemTap. Then please open a terminal and execute the following command. ", command, null);
-// id.open();
-//}
-//}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/ConfigurationOptionsSetter.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/ConfigurationOptionsSetter.java
deleted file mode 100644
index 2254182f0a..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/ConfigurationOptionsSetter.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.launch;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.linuxtools.systemtap.local.core.LaunchConfigurationConstants;
-
-public class ConfigurationOptionsSetter {
-
- public static String setOptions(ILaunchConfiguration config) {
- String options = ""; //$NON-NLS-1$
- try {
- if (config.getAttribute(LaunchConfigurationConstants.COMMAND_VERBOSE,
- LaunchConfigurationConstants.DEFAULT_COMMAND_VERBOSE)) {
- options += "-v "; //$NON-NLS-1$
- }
-
-
- if (config.getAttribute(LaunchConfigurationConstants.COMMAND_PASS,
- LaunchConfigurationConstants.DEFAULT_COMMAND_PASS) > 0) {
- options += "-p" + config.getAttribute(LaunchConfigurationConstants.COMMAND_PASS, LaunchConfigurationConstants.DEFAULT_COMMAND_PASS) + " "; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_KEEP_TEMPORARY,
- LaunchConfigurationConstants.DEFAULT_COMMAND_KEEP_TEMPORARY)) {
- options += "-k "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(LaunchConfigurationConstants.COMMAND_GURU,
- LaunchConfigurationConstants.DEFAULT_COMMAND_GURU)) {
- options += "-g "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_PROLOGUE_SEARCH,
- LaunchConfigurationConstants.DEFAULT_COMMAND_PROLOGUE_SEARCH)) {
- options += "-P "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_NO_CODE_ELISION,
- LaunchConfigurationConstants.DEFAULT_COMMAND_NO_CODE_ELISION)) {
- options += "-u "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_DISABLE_WARNINGS,
- LaunchConfigurationConstants.DEFAULT_COMMAND_DISABLE_WARNINGS)) {
- options += "-w "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(LaunchConfigurationConstants.COMMAND_BULK_MODE,
- LaunchConfigurationConstants.DEFAULT_COMMAND_BULK_MODE)) {
- options += "-b "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_TIMING_INFO,
- LaunchConfigurationConstants.DEFAULT_COMMAND_TIMING_INFO)) {
- options += "-t "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_BUFFER_BYTES,
- LaunchConfigurationConstants.DEFAULT_COMMAND_BUFFER_BYTES) > 0) {
- options += "-s" + config.getAttribute(LaunchConfigurationConstants.COMMAND_BUFFER_BYTES, LaunchConfigurationConstants.DEFAULT_COMMAND_BUFFER_BYTES) + " "; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_TARGET_PID,
- LaunchConfigurationConstants.DEFAULT_COMMAND_TARGET_PID) > 0) {
- options += "-x" + config.getAttribute(LaunchConfigurationConstants.COMMAND_TARGET_PID, LaunchConfigurationConstants.DEFAULT_COMMAND_TARGET_PID) + " "; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_C_DIRECTIVES,
- LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES) != LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES) {
- options += config.getAttribute(
- LaunchConfigurationConstants.COMMAND_C_DIRECTIVES,
- LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES)
- + " "; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_LEAVE_RUNNING,
- LaunchConfigurationConstants.DEFAULT_COMMAND_LEAVE_RUNNING)) {
- options += "-F "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_SKIP_BADVARS,
- LaunchConfigurationConstants.DEFAULT_COMMAND_SKIP_BADVARS)) {
- options += "--skip-badvars "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_IGNORE_DWARF,
- LaunchConfigurationConstants.DEFAULT_COMMAND_IGNORE_DWARF)) {
- options += "--ignore-dwarf "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_TAPSET_COVERAGE,
- LaunchConfigurationConstants.DEFAULT_COMMAND_TAPSET_COVERAGE)) {
- options += "-q "; //$NON-NLS-1$
- }
- return options;
-
- } catch (CoreException e) {
- e.printStackTrace();
- }
-
- return null;
- }
-
- public static String setOptions(ILaunchConfigurationWorkingCopy config) {
- String options = ""; //$NON-NLS-1$
- try {
- if (config.getAttribute(LaunchConfigurationConstants.COMMAND_VERBOSE,
- LaunchConfigurationConstants.DEFAULT_COMMAND_VERBOSE)) {
- options += "-v "; //$NON-NLS-1$
- }
-
-
- if (config.getAttribute(LaunchConfigurationConstants.COMMAND_PASS,
- LaunchConfigurationConstants.DEFAULT_COMMAND_PASS) > 0) {
- options += "-p" + config.getAttribute(LaunchConfigurationConstants.COMMAND_PASS, LaunchConfigurationConstants.DEFAULT_COMMAND_PASS) + " "; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_KEEP_TEMPORARY,
- LaunchConfigurationConstants.DEFAULT_COMMAND_KEEP_TEMPORARY)) {
- options += "-k "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(LaunchConfigurationConstants.COMMAND_GURU,
- LaunchConfigurationConstants.DEFAULT_COMMAND_GURU)) {
- options += "-g "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_PROLOGUE_SEARCH,
- LaunchConfigurationConstants.DEFAULT_COMMAND_PROLOGUE_SEARCH)) {
- options += "-P "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_NO_CODE_ELISION,
- LaunchConfigurationConstants.DEFAULT_COMMAND_NO_CODE_ELISION)) {
- options += "-u "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_DISABLE_WARNINGS,
- LaunchConfigurationConstants.DEFAULT_COMMAND_DISABLE_WARNINGS)) {
- options += "-w "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(LaunchConfigurationConstants.COMMAND_BULK_MODE,
- LaunchConfigurationConstants.DEFAULT_COMMAND_BULK_MODE)) {
- options += "-b "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_TIMING_INFO,
- LaunchConfigurationConstants.DEFAULT_COMMAND_TIMING_INFO)) {
- options += "-t "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_BUFFER_BYTES,
- LaunchConfigurationConstants.DEFAULT_COMMAND_BUFFER_BYTES) > 0) {
- options += "-s" + config.getAttribute(LaunchConfigurationConstants.COMMAND_BUFFER_BYTES, LaunchConfigurationConstants.DEFAULT_COMMAND_BUFFER_BYTES) + " "; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_TARGET_PID,
- LaunchConfigurationConstants.DEFAULT_COMMAND_TARGET_PID) > 0) {
- options += "-x" + config.getAttribute(LaunchConfigurationConstants.COMMAND_TARGET_PID, LaunchConfigurationConstants.DEFAULT_COMMAND_TARGET_PID) + " "; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_C_DIRECTIVES,
- LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES) != LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES) {
- options += config.getAttribute(
- LaunchConfigurationConstants.COMMAND_C_DIRECTIVES,
- LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES)
- + " "; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_LEAVE_RUNNING,
- LaunchConfigurationConstants.DEFAULT_COMMAND_LEAVE_RUNNING)) {
- options += "-F "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_SKIP_BADVARS,
- LaunchConfigurationConstants.DEFAULT_COMMAND_SKIP_BADVARS)) {
- options += "--skip-badvars "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_IGNORE_DWARF,
- LaunchConfigurationConstants.DEFAULT_COMMAND_IGNORE_DWARF)) {
- options += "--ignore-dwarf "; //$NON-NLS-1$
- }
-
- if (config.getAttribute(
- LaunchConfigurationConstants.COMMAND_TAPSET_COVERAGE,
- LaunchConfigurationConstants.DEFAULT_COMMAND_TAPSET_COVERAGE)) {
- options += "-q "; //$NON-NLS-1$
- }
- return options;
-
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- return null;
-
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/LaunchStapGraph.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/LaunchStapGraph.java
deleted file mode 100644
index 157dbc2019..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/LaunchStapGraph.java
+++ /dev/null
@@ -1,301 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.local.launch;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.ArrayList;
-
-import org.eclipse.cdt.core.model.IBinary;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.linuxtools.systemtap.local.core.PluginConstants;
-import org.eclipse.linuxtools.systemtap.local.core.SystemTapUIErrorMessages;
-import org.eclipse.ui.IEditorPart;
-
-public class LaunchStapGraph extends SystemTapLaunchShortcut {
- /*
- * The following protected parameters are provided by
- * SystemTapLaunchShortcut:
- *
- * Optional customization parameters: protected String name; protected
- * String binaryPath; protected String arguments; protected String
- * outputPath; protected String dirPath; protected String generatedScript;
- * protected boolean needToGenerate; protected boolean overwrite;
- *
- * Mandatory: protected String scriptPath; protected ILaunchConfiguration
- * config;
- */
-
- /**
- * Launch method for a generated script that executes on a binary
- *
- * MUST specify (String) scriptPath and call config =
- * createConfiguration(bin)!
- *
- * Noteworthy defaults: name defaults to "", but please set it (for
- * usability) overwrite defaults to true - don't change it unless you really
- * have to.
- *
- * To create new launches: -Copy shortcut code in xml, changing class name
- * and label accordingly -Create a class that extends
- * SystemTapLaunchShortcut with a function launch(IBinary bin, String mode)
- * -Call super.Init() -Set name (this is shortcut-specific) -If a binary is
- * used, call binName = getName(bin) -Call createConfiguration(bin, name)
- *
- * -Specify whichever of the optional parameters you need -Set scriptPath
- * -Set an ILaunchConfiguration -Call finishLaunch or
- * finishLaunchWithoutBinary
- */
-
- private String partialScriptPath;
- private String funcs;
- private ArrayList<String> exclusions;
- private String projectName;
-
- public void setProjectName(String val) {
- projectName = val;
- }
-
- public LaunchStapGraph() {
- funcs = null;
- exclusions = new ArrayList<String>();
- projectName = null;
- }
-
-
-
- public void launch(IEditorPart ed, String mode) {
- resourceToSearchFor = ed.getTitle();
- searchForResource = true;
-
- //Note: This launch will eventually end up calling
- //launch(IBinary bin, String mode) below
- super.launch(ed, mode);
- }
-
- public void launch(IBinary bin, String mode) {
- super.Init();
- this.bin = bin;
- name = "SystemTapGraph"; //$NON-NLS-1$
- binName = getName(bin);
- partialScriptPath = PluginConstants.getPluginLocation()
- + "parse_function_partial.stp"; //$NON-NLS-1$
-
- scriptPath = PluginConstants.DEFAULT_OUTPUT
- + "callgraphGen.stp"; //$NON-NLS-1$
-
- parserID = "org.eclipse.linuxtools.systemtap.local.callgraph.graphparser";
-
-
-
- if (projectName == null || projectName.length() < 1)
- projectName = bin.getCProject().getElementName();
-
- try {
-
- config = createConfiguration(bin, name);
- binaryPath = bin.getResource().getLocation().toString();
- arguments = binaryPath;
- outputPath = PluginConstants.STAP_GRAPH_DEFAULT_IO_PATH;
-
- writeFunctionListToScript(resourceToSearchFor);
- if (funcs == null || funcs.length() < 0)
- return;
- generatedScript = generateScript();
- if (generatedScript == null || generatedScript.length() < 0)
- return;
-
- generatedScript+= "probe syscall.exit {\n" +
- "if (pid() == target()) {\n" +
- "finalTime = gettimeofday_ns()\n" +
- "}\n" +
- "}\n";
- needToGenerate = true;
-
- finishLaunch(name, mode);
-
- } catch (IOException e) {
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(
- "LaunchShortcutScriptGen", //$NON-NLS-1$
- Messages.getString("LaunchStapGraph.0"), //$NON-NLS-1$
- Messages.getString("LaunchStapGraph.6")); //$NON-NLS-1$
- mess.schedule();
- e.printStackTrace();
- } catch (CoreException e1) {
- e1.printStackTrace();
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- resourceToSearchFor = ""; //$NON-NLS-1$
- searchForResource = false;
- }
-
-
- }
-
- public void setFuncs(String val) {
- funcs = val;
- }
-
- /**
- * Generates the call and return function probes for the specified function
- * @param function
- * @return
- */
- private String generateProbe(String function) {
- String output = "probe process(@1).function(\"" + //$NON-NLS-1$
- function + "\").call{" + //$NON-NLS-1$
- "\tcallFunction(probefunc())\t" + //$NON-NLS-1$
- "}\t" + //$NON-NLS-1$
- "probe process(@1).function(\"" + //$NON-NLS-1$
- function + "\").return{\t" + //$NON-NLS-1$
- "\treturnFunction(probefunc())\t" + //$NON-NLS-1$
- "}\n"; //$NON-NLS-1$
- return output;
- }
-
- /**
- * Prompts the user for a list of functions to probe
- *
- * @param bw
- * @return
- * @throws IOException
- */
- public String writeFunctionListToScript(String resourceToSearchFor) throws IOException {
- String toWrite = getFunctionsFromBinary(bin, resourceToSearchFor);
-
- if (toWrite == null || toWrite.length() < 1) {
- return null;
- }
-
- StringBuffer output = new StringBuffer();
-
- for (String func : toWrite.split(" ")) { //$NON-NLS-1$
- if (func.length() > 0) {
- if (exclusions == null || exclusions.size() < 1 || exclusions.contains(func) ) {
- output.append(generateProbe(func));
- }
- }
- }
-
- funcs = output.toString();
- return funcs;
- }
-
- /**
- * Copies the contents of the specified partial script. You should call writeStapMarkers first
- * if you want StapMarkers to function properly.
- *
- * @param bw
- * @return
- * @throws IOException
- */
- private String writeFromPartialScript(String projectName) throws IOException {
- String toWrite = ""; //$NON-NLS-1$
- String temp = ""; //$NON-NLS-1$
- toWrite += "probe begin{\n" + //$NON-NLS-1$
- "printf(\"\\nPROBE_BEGIN\\n\")\n" + //$NON-NLS-1$
- "serial=1\n" + //$NON-NLS-1$
- "startTime = 0;\n" + //$NON-NLS-1$
- "printf(\"" + projectName + "\\n\")\n" + //$NON-NLS-1$ //$NON-NLS-2$
- "}"; //$NON-NLS-1$
- File partialScript = new File(partialScriptPath);
- BufferedReader scriptReader = new BufferedReader(new FileReader(
- partialScript));
- while ((temp = scriptReader.readLine()) != null) {
- toWrite += temp + "\n"; //$NON-NLS-1$
- }
- scriptReader.close();
-
- return toWrite;
- }
-
-
- public void setExclusions(ArrayList<String> e) {
- exclusions = e;
- }
-
-
- /**
- * Writes global variables for the StapGraph script to the BufferedWriter.
- * Should be called first.
- *
- * @param bw
- * @return
- * @throws IOException
- */
- private String writeGlobalVariables() throws IOException {
- String toWrite = "global serial\n" + //$NON-NLS-1$
- "global startTime\n " + //$NON-NLS-1$
- "global finalTime\n"; //$NON-NLS-1$
-
- return toWrite;
- }
-
- @Override
- public String generateScript() throws IOException {
-
- String scriptContents = ""; //$NON-NLS-1$
-
-
- scriptContents += writeGlobalVariables();
-// scriptContents += writeStapMarkers();
-
- scriptContents += funcs;
-
- scriptContents += writeFromPartialScript(projectName);
-
-// BufferedWriter bw = new BufferedWriter(new FileWriter(scriptFile));
-//// bw.write("probe begin { printf(\"HELLO\") }");
-// bw.write(scriptContents);
-// bw.close();
- return scriptContents;
- }
-
- public void setPartialScriptPath(String val) {
- partialScriptPath = val;
- }
-
-// /**
-// * Determines whether or not the user wants StapMarkers and inserts them. To
-// * disable StapMarkers, simply stop calling this function. This should be called
-// * before writeFromPartialScript.
-// *
-// * @param bw
-// * @return
-// * @throws IOException
-// */
-// private String writeStapMarkers() throws IOException {
-// String toWrite = Messages.getString("LaunchStapGraph.26"); //$NON-NLS-1$
-// if (MessageDialog.openQuestion(new Shell(),
-// Messages.getString("LaunchStapGraph.27"), //$NON-NLS-1$
-// Messages.getString("LaunchStapGraph.28") //$NON-NLS-1$
-// + Messages.getString("LaunchStapGraph.29"))) { //$NON-NLS-1$
-// toWrite = Messages.getString("LaunchStapGraph.30") //$NON-NLS-1$
-// + Messages.getString("LaunchStapGraph.31") //$NON-NLS-1$
-// + Messages.getString("LaunchStapGraph.32") //$NON-NLS-1$
-// + Messages.getString("LaunchStapGraph.33") //$NON-NLS-1$
-// + Messages.getString("LaunchStapGraph.34") //$NON-NLS-1$
-// + Messages.getString("LaunchStapGraph.35") //$NON-NLS-1$
-// + Messages.getString("LaunchStapGraph.36") //$NON-NLS-1$
-// + Messages.getString("LaunchStapGraph.37") //$NON-NLS-1$
-// + Messages.getString("LaunchStapGraph.38") //$NON-NLS-1$
-// + Messages.getString("LaunchStapGraph.39") + Messages.getString("LaunchStapGraph.40"); //$NON-NLS-1$ //$NON-NLS-2$
-// partialScriptPath = PluginConstants.getPluginLocation()
-// + Messages.getString("LaunchStapGraph.41"); //$NON-NLS-1$
-// }
-//
-// return toWrite;
-// }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/LaunchWizard.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/LaunchWizard.java
deleted file mode 100644
index 0d278fb4fb..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/LaunchWizard.java
+++ /dev/null
@@ -1,332 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.local.launch;
-
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.linuxtools.systemtap.local.core.PluginConstants;
-import org.eclipse.linuxtools.systemtap.local.core.ShellOpener;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.views.navigator.ResourceComparator;
-
-public class LaunchWizard extends SystemTapLaunchShortcut {
-
- private Text scriptLocation;
- private Text binaryLocation;
- private Text argumentsLocation;
- private String workspacePath;
- private String mode;
-
- private Shell sh;
- private Composite fileComp;
- private boolean completed;
-
- private static final int WIDTH = 670;
- private static final int HEIGHT = 630;
- /*
- * The following protected parameters are provided by SystemTapLaunchShortcut:
- *
- * Optional customization parameters:
- * protected String name;
- * protected String binaryPath;
- * protected String arguments;
- * protected String outputPath;
- * protected String dirPath;
- * protected String generatedScript;
- * protected boolean needToGenerate;
- * protected boolean overwrite;
- *
- * Mandatory:
- * protected String scriptPath;
- * protected ILaunchConfiguration config;
- */
-
-
- /**
- * Launch method for a generated script that executes on a binary
- *
- * MUST specify (String) scriptPath and call config = createConfiguration(bin)!
- *
- * Noteworthy defaults:
- * name defaults to "", but please set it (for usability)
- * overwrite defaults to true - don't change it unless you really have to.
- *
- * To create new launches:
- * -Copy shortcut code in xml, changing class name and label accordingly
- * -Create a class that extends SystemTapLaunchShortcut with a function
- * launch(IBinary bin, String mode)
- * -Call super.Init()
- * -Set name (this is shortcut-specific)
- * -If a binary is used, call binName = getName(bin)
- * -Call createConfiguration(bin, name)
- *
- * -Specify whichever of the optional parameters you need
- * -Set scriptPath
- * -Set an ILaunchConfiguration
- * -Call finishLaunch or finishLaunchWithoutBinary
- */
-
- @Override
- public void launch(IEditorPart ed, String mode) {
- super.Init();
- promptForInputs();
-
- this.mode = mode;
-
-// finishLaunch(scriptPath + ": " + binName, mode); //$NON-NLS-1$
- }
-
- @Override
- public void launch(ISelection selection, String mode) {
- super.Init();
- completed = false;
- promptForInputs();
-
- this.mode = mode;
-
-// finishLaunch(scriptPath + ": " + binName, mode); //$NON-NLS-1$
- }
-
-
- private void promptForInputs() {
- InputDialog id = new InputDialog(new Shell(), Messages.getString("LaunchWizard.0"), //$NON-NLS-1$
- Messages.getString("LaunchWizard.1") + //$NON-NLS-1$
- Messages.getString("LaunchWizard.2") + //$NON-NLS-1$
- Messages.getString("LaunchWizard.3"), //$NON-NLS-1$
- getLaunchManager().generateUniqueLaunchConfigurationNameFrom(
- Messages.getString("LaunchWizard.4")), null); //$NON-NLS-1$
- id.open();
-
- if (id.getReturnCode() == InputDialog.CANCEL){
- return;
- }
-
- name = id.getValue();
-
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- IWorkspaceRoot root = workspace.getRoot();
- IPath location = root.getLocation();
- workspacePath = location.toString();
-
- sh = new Shell();
- sh.setSize(WIDTH,HEIGHT);
- sh.setLayout(new GridLayout(1, false));
- sh.setText(name);
-
-
- Image img = new Image(sh.getDisplay(), PluginConstants.PLUGIN_LOCATION + "systemtapbanner.png"); //$NON-NLS-1$
- Composite imageCmp = new Composite(sh, SWT.BORDER);
- imageCmp.setLayout(new FillLayout());
- GridData imageData = new GridData(650, 157);
- imageData.horizontalAlignment = SWT.CENTER;
- imageCmp.setLayoutData(imageData);
- imageCmp.setBackgroundImage(img);
-
- fileComp = new Composite(sh, SWT.NONE);
- fileComp.setLayout(new GridLayout(2, false));
- fileComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-
- GridDataFactory labelData = GridDataFactory.fillDefaults().grab(true, false)
- .span(2,1);
-
- Label scriptLabel = new Label(fileComp, SWT.HORIZONTAL);
- scriptLabel.setText(Messages.getString("LaunchWizard.19")); //$NON-NLS-1$
- labelData.applyTo(scriptLabel);
-
- GridDataFactory textData = GridDataFactory.fillDefaults().grab( true, false )
- .hint(WIDTH, SWT.DEFAULT);
-
- scriptLocation = new Text(fileComp, SWT.SINGLE | SWT.BORDER);
- textData.applyTo(scriptLocation);
- Button scriptButton = new Button(fileComp, SWT.PUSH);
- scriptButton.setText(Messages.getString("SystemTapOptionsTab.BrowseFiles")); //$NON-NLS-1$
- scriptButton.setLayoutData(new GridData());
- scriptButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- String filePath = scriptLocation.getText();
- FileDialog dialog = new FileDialog(sh, SWT.SAVE);
- filePath = dialog.open();
- if (filePath != null) {
- scriptLocation.setText(filePath);
- }
- }
- });
-
-
- GridData gd2 = new GridData();
- gd2.horizontalSpan = 3;
- Label binaryLabel= new Label(fileComp, SWT.HORIZONTAL);
- binaryLabel.setText(Messages.getString("LaunchWizard.20")); //$NON-NLS-1$
- labelData.applyTo(binaryLabel);
-
- binaryLocation = new Text(fileComp, SWT.SINGLE | SWT.BORDER);
- textData.applyTo(binaryLocation);
- Button binaryButton = new Button(fileComp, SWT.PUSH);
- binaryButton.setText(Messages.getString("SystemTapOptionsTab.WorkspaceButton2")); //$NON-NLS-1$
- binaryButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(sh, new WorkbenchLabelProvider(), new WorkbenchContentProvider());
- dialog.setTitle(Messages.getString("SystemTapOptionsTab.SelectResource")); //$NON-NLS-1$
- dialog.setMessage(Messages.getString("SystemTapOptionsTab.SelectSuppressions")); //$NON-NLS-1$
- dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
- dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
- if (dialog.open() == IDialogConstants.OK_ID) {
- IResource resource = (IResource) dialog.getFirstResult();
- String arg = resource.getFullPath().toString();
- binaryLocation.setText(workspacePath + arg);
- }
- }
- });
-
- Composite argumentsComp = new Composite(sh, SWT.BORDER_DASH);
- argumentsComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- argumentsComp.setLayout(new GridLayout(2, false));
-
- Label argumentsLabel= new Label(argumentsComp, SWT.HORIZONTAL);
- argumentsLabel.setText(Messages.getString("LaunchWizard.21")); //$NON-NLS-1$
- labelData.applyTo(argumentsLabel);
-
- argumentsLocation = new Text(argumentsComp, SWT.MULTI | SWT.WRAP | SWT.BORDER);
- GridData gd3 = new GridData(GridData.FILL_HORIZONTAL);
- gd3.heightHint=200;
- argumentsLocation.setLayoutData(gd3);
- Button argumentsButton = new Button(argumentsComp, SWT.PUSH);
- argumentsButton.setText(Messages.getString("LaunchWizard.22")); //$NON-NLS-1$
- argumentsButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- argumentsLocation.setText(
- argumentsLocation.getText() + " process(\"" //$NON-NLS-1$
- + binaryLocation.getText() + "\").function(\"\")"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- });
-
-
- //TODO: Don't use blank labels to move button to the right column :P
- Label blankLabel2 = new Label(argumentsComp, SWT.HORIZONTAL);
- blankLabel2.setText(""); //$NON-NLS-1$
-
-
- Button launch = new Button(sh, SWT.PUSH);
- launch.setLayoutData(new GridData(GridData.CENTER, GridData.BEGINNING, false, false));
- launch.setText(Messages.getString("LaunchWizard.24")); //$NON-NLS-1$
- launch.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- scriptPath = scriptLocation.getText();
- binaryPath = binaryLocation.getText();
- arguments = argumentsLocation.getText();
- config = createConfiguration(null, name);
- try {
- finishLaunch(scriptPath + ": " + binName, mode);//$NON-NLS-1$
- } catch (Exception e1) {
- e1.printStackTrace();
- }
- completed = true;
- sh.dispose();
- }
-
- });
-
- ShellOpener so = new ShellOpener(Messages.getString("LaunchWizard.23"), sh); //$NON-NLS-1$
- so.schedule();
-
- completed = true;
-
- }
-
- public boolean isCompleted() {
- return completed;
- }
-
-}
-
-//
-// public void launch(IBinary bin, String mode) {
-// super.Init();
-// Shell sh = new Shell();
-// MessageDialog.openInformation(sh, "Welcome to SystemTap Wizard",
-// "The SystemTap Wizard will guide you through the process of \n" +
-// "launching a SystemTap script through Eclipse. First, select\n" +
-// "a script to run.");
-//
-//
-//
-// name = Messages.getString("LaunchWizard.WizardName"); //$NON-NLS-1$
-// promptForInputs();
-// binName = getName(bin);
-// binaryPath = dirPath + binName;
-// config = createConfiguration(bin);
-//
-//
-// System.out.println("LaunchCallGraph: launch(IBinary bin, String mode)"); //$NON-NLS-1$
-//
-// finishLaunch(scriptPath + ": " + binName, mode); //$NON-NLS-1$
-// }
-//
-//
-// private void promptForInputs() {
-//
-// Shell sh = new Shell();
-//
-// //Get script
-// MessageDialog.openInformation(sh, "Specify Script", //$NON-NLS-1$
-// "Please specify the location of the SystemTap script to run."); //$NON-NLS-1$
-// FileDialog fd = new FileDialog(sh);
-// scriptPath = fd.open();
-//
-// if (scriptPath == null){
-// scriptPath = ""; //$NON-NLS-1$
-// return;
-// }
-//
-// //Get arguments
-// InputDialog inputDialog = new InputDialog(
-// sh,
-// "Specify Arguments", //$NON-NLS-1$
-// "Specify Arguments separated by a space (eg. arg1 arg2 arg3) or CANCEL to specify no arguments.", //$NON-NLS-1$
-// "", null); //$NON-NLS-1$
-// inputDialog.open();
-// arguments = inputDialog.getValue();
-// inputDialog.close();
-//
-// if (arguments == null || arguments.equals("")){ //$NON-NLS-1$
-// arguments = ""; //$NON-NLS-1$
-// }
-//
-// sh.dispose();
-// }
-//
-//}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/ListTreeContentProvider.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/ListTreeContentProvider.java
deleted file mode 100644
index 31f25feeb6..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/ListTreeContentProvider.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.launch;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.cdt.core.model.CModelException;
-import org.eclipse.cdt.core.model.ICContainer;
-import org.eclipse.cdt.core.model.ICElement;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-
-public class ListTreeContentProvider implements ITreeContentProvider {
-
- @Override
- public Object[] getChildren(Object parentElement) {
-
- ArrayList<Object> output = new ArrayList<Object>();
-
- if (parentElement instanceof ICContainer) {
- try {
- Object[] list =((ICContainer) parentElement).getChildren();
- for (Object item : list) {
- if (item instanceof ICContainer) {
- if (checkForValidChildren((ICContainer) item))
- output.add(item);
- } else if (item instanceof ICElement) {
- ICElement el = (ICElement) item;
- if (el.getElementName().contains(".c")) //$NON-NLS-1$
- output.add(el);
- }
-
-
- }
-
- return output.toArray();
- } catch (CModelException e) {
- e.printStackTrace();
- }
- }
- return null;
- }
-
- /**
- * A container is valid if any of its children are valid c/cpp elements
- * or if it contains another container for which the above holds
- * @param cont
- * @return
- */
- private boolean checkForValidChildren(ICContainer cont) {
- try {
- for (ICElement child : cont.getChildren()) {
-
- if (child instanceof ICElement)
- if (child.getElementName().endsWith(".c")) //$NON-NLS-1$
- return true;
- if (child instanceof ICContainer) {
- if (checkForValidChildren((ICContainer) child))
- return true;
- }
- }
- } catch (CModelException e) {
- e.printStackTrace();
- }
-
- return false;
-
- }
-
- @Override
- public Object getParent(Object element) {
- if (element instanceof ICElement)
- return ((ICElement)element).getAncestor(ICElement.C_CCONTAINER);
- return null;
- }
-
- @Override
- public boolean hasChildren(Object element) {
- if (element instanceof ICContainer) {
- try {
- if (((ICContainer) element).getChildren().length > 0)
- return true;
- } catch (CModelException e) {
- e.printStackTrace();
- }
- }
- return false;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public Object[] getElements(Object inputElement) {
- if (inputElement instanceof List) {
- for (Object element : (List) inputElement)
- if (element instanceof ICContainer)
- try {
- ICElement[] array = ((ICContainer) element).getChildren();
- ArrayList<ICElement> output = new ArrayList<ICElement>();
-
- for (ICElement item : array) {
- if (item instanceof ICContainer) {
- if (checkForValidChildren((ICContainer) item))
- output.add(item);
- }
-
- if (item.getElementName().endsWith(".cpp") || //$NON-NLS-1$
- item.getElementName().endsWith(".c")) //$NON-NLS-1$
- output.add(item);
- }
- return output.toArray();
- } catch (CModelException e) {
- e.printStackTrace();
- }
- }
- return null;
- }
-
- @Override
- public void dispose() {
-
- }
-
- @Override
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
-
- @SuppressWarnings("unchecked")
- public Object[] findElements(Object inputElement) {
- ArrayList<Object> output = new ArrayList<Object>();
-
- if (inputElement instanceof List) {
- for (Object element : (List) inputElement) {
- Object[] list = (getChildren(element));
- for (Object o : list) {
- output.add(o);
- }
- }
- }
- return output.toArray();
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/Messages.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/Messages.java
deleted file mode 100644
index a848484454..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/Messages.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.launch;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Messages {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.systemtap.local.launch.messages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
- private Messages() {
- }
-
- 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.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/RuledTreeSelectionDialog.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/RuledTreeSelectionDialog.java
deleted file mode 100644
index 6621450284..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/RuledTreeSelectionDialog.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Sebastian Davids <sdavids@gmx.de> - Fix for bug 19346 - Dialog font should be
- * activated and used by other components.
- * Lubomir Marinov <lubomir.marinov@gmail.com> - Fix for bug 182122 -[Dialogs]
- * CheckedTreeSelectionDialog#createSelectionButtons(Composite) fails to
- * align the selection buttons to the right
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.launch;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.dialogs.CheckedTreeSelectionDialog;
-
-/**
- * A class to select elements out of a tree structure.
- *
- * @since 2.0
- */
-public class RuledTreeSelectionDialog extends CheckedTreeSelectionDialog {
-
- public RuledTreeSelectionDialog(Shell parent, ILabelProvider labelProvider,
- ITreeContentProvider contentProvider) {
- super(parent, labelProvider, contentProvider);
- // TODO Auto-generated constructor stub
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected Control createDialogArea(Composite parent) {
- Composite composite = (Composite) super.createDialogArea(parent);
-
- Label line = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL
- | SWT.BOLD);
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.horizontalSpan = 2;
- line.setLayoutData(gridData);
- GridLayout lay = (GridLayout) composite.getLayout();
- lay.marginHeight=0;
- composite.setLayout(lay);
-
- return composite;
- }
-
-
- /*
- * @see Dialog#createButtonBar(Composite)
- */
- @Override
- protected Control createButtonBar(Composite parent) {
- Font font = parent.getFont();
- Composite composite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
-
- layout.marginHeight = 0;
- layout.marginLeft = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.marginWidth = 0;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- composite.setFont(font);
-
- /*
- * Create the rest of the button bar, but tell it not to
- * create a help button (we've already created it).
- */
- boolean helpAvailable = isHelpAvailable();
- setHelpAvailable(false);
- Composite c = (Composite) super.createButtonBar(composite);
- GridLayout lay = (GridLayout) c.getLayout();
- lay.marginHeight=0;
- c.setLayout(lay);
- composite.setLayout(layout);
-
- setHelpAvailable(helpAvailable);
- return composite;
- }
-
- @Override
- protected Label createMessageArea(Composite composite) {
- Label label = new Label(composite, SWT.NONE);
- if (this.getMessage() != null) {
- label.setText(this.getMessage());
- }
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.verticalIndent=10;
- label.setLayoutData(gd);
-
- label.setFont(composite.getFont());
- return label;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLCTG.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLCTG.java
deleted file mode 100644
index 0445ec0f6b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLCTG.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.launch;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
-import org.eclipse.debug.ui.ILaunchConfigurationDialog;
-
-/**
- * Stripped down version of the Profiling LaunchConfigurationTabGroup
- *
- *
- */
-public abstract class SystemTapLCTG extends AbstractLaunchConfigurationTabGroup {
-
- public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
- ArrayList<AbstractLaunchConfigurationTab> tabs = new ArrayList<AbstractLaunchConfigurationTab>();
-
- tabs.addAll(Arrays.asList(getProfileTabs()));
-
-
- setTabs(tabs.toArray(new AbstractLaunchConfigurationTab[tabs.size()]));
- }
-
- public abstract AbstractLaunchConfigurationTab[] getProfileTabs();
-} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLaunchConfigurationDelegate.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLaunchConfigurationDelegate.java
deleted file mode 100644
index f0c7ce00ad..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLaunchConfigurationDelegate.java
+++ /dev/null
@@ -1,473 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.local.launch;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.ArrayList;
-
-import org.eclipse.cdt.launch.AbstractCLaunchDelegate;
-import org.eclipse.cdt.utils.pty.PTY;
-import org.eclipse.cdt.utils.spawner.ProcessFactory;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.IStreamListener;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.core.model.IStreamMonitor;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.linuxtools.systemtap.local.core.Helper;
-import org.eclipse.linuxtools.systemtap.local.core.LaunchConfigurationConstants;
-import org.eclipse.linuxtools.systemtap.local.core.PluginConstants;
-import org.eclipse.linuxtools.systemtap.local.core.SystemTapCommandGenerator;
-import org.eclipse.linuxtools.systemtap.local.core.SystemTapErrorHandler;
-import org.eclipse.linuxtools.systemtap.local.core.SystemTapParser;
-import org.eclipse.linuxtools.systemtap.local.core.SystemTapUIErrorMessages;
-import org.eclipse.ui.console.TextConsole;
-import org.eclipse.ui.progress.UIJob;
-
-
-/**
- * Delegate for Stap scripts. The Delegate generates part of the command string
- * and schedules a job to finish generation of the command and execute.
- *
- */
-public class SystemTapLaunchConfigurationDelegate extends
- AbstractCLaunchDelegate {
-
- private static final String TEMP_ERROR_OUTPUT =
- PluginConstants.PLUGIN_LOCATION + "stapTempError.error"; //$NON-NLS-1$
- private String cmd;
- private File temporaryScript = null;
- private String arguments = ""; //$NON-NLS-1$
- private String scriptPath = ""; //$NON-NLS-1$
- private String binaryPath = ""; //$NON-NLS-1$
- private String outputPath = ""; //$NON-NLS-1$
- private boolean needsBinary = false; // Set to false if we want to use SystemTap
- private boolean needsArguments = false;
- @SuppressWarnings("unused")
- private boolean useColour = false;
- private String binaryArguments = ""; //$NON-NLS-1$
-
-
- @Override
- protected String getPluginID() {
- return null;
- }
-
- @Override
- public void launch(ILaunchConfiguration config, String mode,
- ILaunch launch, IProgressMonitor m) throws CoreException {
-
- if (m == null) {
- m = new NullProgressMonitor();
- }
- SubMonitor monitor = SubMonitor.convert(m,
- "SystemTap runtime monitor", 5); //$NON-NLS-1$
-
- //System.out.println("SystemTapLaunchConfigurationDelegate: launch"); //$NON-NLS-1$
-
- // check for cancellation
- if (monitor.isCanceled()) {
- return;
- }
-
-
-
- String command = ConfigurationOptionsSetter.setOptions(config);
-
- if (config.getAttribute(LaunchConfigurationConstants.USE_COLOUR,
- LaunchConfigurationConstants.DEFAULT_USE_COLOUR))
- useColour = true;
-
- if (!config.getAttribute(LaunchConfigurationConstants.ARGUMENTS,
- LaunchConfigurationConstants.DEFAULT_ARGUMENTS).equals(
- LaunchConfigurationConstants.DEFAULT_ARGUMENTS)) {
- arguments = config.getAttribute(
- LaunchConfigurationConstants.ARGUMENTS,
- LaunchConfigurationConstants.DEFAULT_ARGUMENTS);
- needsArguments = true;
- }
-
-
- if (!config.getAttribute(LaunchConfigurationConstants.BINARY_PATH,
- LaunchConfigurationConstants.DEFAULT_BINARY_PATH).equals(
- LaunchConfigurationConstants.DEFAULT_BINARY_PATH)) {
- binaryPath = config.getAttribute(
- LaunchConfigurationConstants.BINARY_PATH,
- LaunchConfigurationConstants.DEFAULT_BINARY_PATH);
- needsBinary = true;
- }
-
- if (!config.getAttribute(LaunchConfigurationConstants.BINARY_ARGUMENTS,
- LaunchConfigurationConstants.DEFAULT_BINARY_ARGUMENTS).equals(
- LaunchConfigurationConstants.DEFAULT_BINARY_ARGUMENTS)) {
- binaryArguments = config.getAttribute(
- LaunchConfigurationConstants.BINARY_ARGUMENTS,
- LaunchConfigurationConstants.DEFAULT_BINARY_ARGUMENTS);
- }
-
-
-
- if (!config.getAttribute(LaunchConfigurationConstants.SCRIPT_PATH,
- LaunchConfigurationConstants.DEFAULT_SCRIPT_PATH).equals(
- LaunchConfigurationConstants.DEFAULT_SCRIPT_PATH)) {
- scriptPath = config.getAttribute(
- LaunchConfigurationConstants.SCRIPT_PATH,
- LaunchConfigurationConstants.DEFAULT_SCRIPT_PATH);
- }
-
- // Generate script if needed
- if (config.getAttribute(LaunchConfigurationConstants.NEED_TO_GENERATE,
- LaunchConfigurationConstants.DEFAULT_NEED_TO_GENERATE)) {
- temporaryScript = new File(scriptPath);
- temporaryScript.delete();
-
- try {
- temporaryScript.createNewFile();
- FileWriter fstream = new FileWriter(temporaryScript);
- BufferedWriter out = new BufferedWriter(fstream);
- out.write(config.getAttribute(
- LaunchConfigurationConstants.GENERATED_SCRIPT,
- LaunchConfigurationConstants.DEFAULT_GENERATED_SCRIPT));
- out.close();
- } catch (IOException e1) {
- e1.printStackTrace();
- }
- }
-
- outputPath = config.getAttribute(
- LaunchConfigurationConstants.OUTPUT_PATH,
- PluginConstants.DEFAULT_OUTPUT);
- command += "-o " + outputPath; //$NON-NLS-1$
- try {
- File tempFile = new File(outputPath);
- tempFile.createNewFile();
- //Make sure the output file exists
- } catch (IOException e1) {
- e1.printStackTrace();
- }
-
-
- // check for cancellation
- if (monitor.isCanceled()) {
- return;
- }
-
- finishLaunch(launch, config, command, m, true);
- }
-
- public String getCommand() {
- if (cmd.length() > 0)
- return cmd;
- else
- return Messages.getString("SystemTapLaunchConfigurationDelegate.0"); //$NON-NLS-1$
- }
-
- public Process execute(String[] commandArray, String[] env, File wd,
- boolean usePty) throws IOException {
- Process process = null;
- try {
- if (wd == null) {
- process = ProcessFactory.getFactory().exec(commandArray, env);
- } else {
- if (PTY.isSupported() && usePty) {
- process = ProcessFactory.getFactory().exec(commandArray,
- env, wd, new PTY());
- } else {
- process = ProcessFactory.getFactory().exec(commandArray,
- env, wd);
- }
- }
- } catch (IOException e) {
- if (process != null) {
- process.destroy();
- }
- return null;
- }
- return process;
- }
-
-
-
- protected IProcess createNewProcess(ILaunch launch, Process systemProcess,
- String programName) {
- return DebugPlugin.newProcess(launch, systemProcess,
- renderProcessLabel(programName));
- }
-
- public String getCommandLine(String[] args) {
- StringBuffer ret = new StringBuffer();
- for (String arg : args) {
- ret.append(arg + " "); //$NON-NLS-1$
- }
- return ret.toString().trim();
- }
-
-
- private class DocWriter extends UIJob {
- private TextConsole console;
- private String configName;
- private String binaryCommand;
-
- public DocWriter(String name, TextConsole console, String cName,
- String binaryCommand) {
- super(name);
- this.console = console;
- this.configName = cName;
- this.binaryCommand = binaryCommand;
- }
-
- @Override
- public IStatus runInUIThread(IProgressMonitor monitor) {
-
- if (console == null)
- return Status.CANCEL_STATUS;
-
- IDocument doc = console.getDocument();
-
- if (binaryCommand.length() > 0)
- try {
- doc.replace(doc.getLength(), 0,
- PluginConstants.NEW_LINE
- + PluginConstants.NEW_LINE +"-------------" //$NON-NLS-1$
- + PluginConstants.NEW_LINE
- + Messages.getString("SystemTapLaunchConfigurationDelegate.DocWriterMessage1")//$NON-NLS-1$
- + configName + PluginConstants.NEW_LINE +
- Messages.getString("SystemTapLaunchConfigurationDelegate.DocWriterMessage2")//$NON-NLS-1$
- + binaryCommand + PluginConstants.NEW_LINE +
- Messages.getString("SystemTapLaunchConfigurationDelegate.DocWriterMessage3") + //$NON-NLS-1$
- Messages.getString("SystemTapLaunchConfigurationDelegate.DocWriterMessage4") + //$NON-NLS-1$
- Messages.getString("SystemTapLaunchConfigurationDelegate.DocWriterMessage5")//$NON-NLS-1$
- );
- } catch (BadLocationException e) {
- e.printStackTrace();
- }
- else
- try {
- doc.replace(doc.getLength(), 0,
- PluginConstants.NEW_LINE +
- PluginConstants.NEW_LINE + "-------------" + //$NON-NLS-1$
- PluginConstants.NEW_LINE +
- Messages.getString("SystemTapLaunchConfigurationDelegate.DocWriterMessage1")//$NON-NLS-1$
- + configName + PluginConstants.NEW_LINE +
- Messages.getString("SystemTapLaunchConfigurationDelegate.DocWriterNoBinarySpecified") + //$NON-NLS-1$
- PluginConstants.NEW_LINE + PluginConstants.NEW_LINE);
- } catch (BadLocationException e) {
- e.printStackTrace();
- }
-
- return Status.OK_STATUS;
- }
-
- }
-
- private void finishLaunch(ILaunch launch, ILaunchConfiguration config, String command,
- IProgressMonitor monitor, boolean retry) {
- try {
- File workDir = getWorkingDirectory(config);
- if (workDir == null) {
- workDir = new File(System.getProperty("user.home", ".")); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
-
-
- // Generate the command
- SystemTapCommandGenerator cmdGenerator = new SystemTapCommandGenerator();
- cmd = cmdGenerator.generateCommand(scriptPath, binaryPath,
- command, needsBinary, needsArguments, arguments, binaryArguments);
-
-
-// MP.println(cmd);
- // Prepare cmd for execution - we need a command array of strings,
- // no string can contain a space character. (One of the process'
- // requirements)
- String tmp[] = cmd.split(" "); //$NON-NLS-1$
- ArrayList<String> cmdLine = new ArrayList<String>();
- for (String str : tmp) {
- cmdLine.add(str);
- }
- String[] commandArray = (String[]) cmdLine
- .toArray(new String[cmdLine.size()]);
-
- // Check for cancellation
- if (monitor.isCanceled()) {
- return;
- }
-
- monitor.worked(1);
-
- if (launch == null) {
- return;
- }
- // Not sure if this line is necessary
- // set the default source locator if required
- setDefaultSourceLocator(launch, config);
-
- String parserClass = config.getAttribute(LaunchConfigurationConstants.PARSER_CLASS,
- LaunchConfigurationConstants.DEFAULT_PARSER_CLASS);
- IExtensionRegistry reg = Platform.getExtensionRegistry();
- IConfigurationElement[] extensions = reg
- .getConfigurationElementsFor(PluginConstants.PARSER_RESOURCE,
- PluginConstants.PARSER_NAME,
- parserClass);
-
-
- if (extensions == null || extensions.length < 1) {
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages("Invalid parser", "invalid parser",
- "The selected parser is not valid. Please select a different parser. \n\n" +
- "Invalid id: " + parserClass);
- mess.schedule();
- return;
- }
-
- IConfigurationElement element = extensions[0];
-
- SystemTapParser parser =
- (SystemTapParser) element.createExecutableExtension("class");
-
-
- if (element.getAttribute("realtime") == "true") {
- parser.schedule();
- }
-
- monitor.worked(1);
-
-
- Process subProcess = execute(commandArray, getEnvironment(config),
- workDir, true);
-
- if (subProcess == null){
- //TODO: FIgure out what the console error message is so we can catch it in errorlog
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("SystemTapLaunchConfigurationDelegate.NullProcessErrorName"), Messages.getString("SystemTapLaunchConfigurationDelegate.NullProcessErrorTitle"), //$NON-NLS-1$ //$NON-NLS-2$
- Messages.getString("SystemTapLaunchConfigurationDelegate.NullProcessErrorMessage1") + //$NON-NLS-1$
- Messages.getString("SystemTapLaunchConfigurationDelegate.NullProcessErrorMessage2")); //$NON-NLS-1$
- mess.schedule();
- return;
- }
-
- IProcess process = createNewProcess(launch, subProcess,
- commandArray[0]);
- // set the command line used
- process.setAttribute(IProcess.ATTR_CMDLINE,
- cmd);
- monitor.worked(1);
- ((TextConsole)Helper.getConsoleByName(config.getName())).activate();
-
- StreamListener s = new StreamListener();
- process.getStreamsProxy().getErrorStreamMonitor().addListener(s);
-
-
-
- while (!process.isTerminated()) {
- Thread.sleep(100);
- if (monitor.isCanceled()) {
- Runtime run = Runtime.getRuntime();
- run.exec("kill stap"); //$NON-NLS-1$
- process.terminate();
- return;
- }
- }
- Thread.sleep(100);
- s.close();
-
- if (process.getExitValue() != 0) {
- //SystemTap terminated with errors, parse console to figure out which error
- IDocument doc = Helper.getConsoleDocumentByName(config.getName());
- //Sometimes the console has not been printed to yet, wait for a little while longer
- if (doc.get().length() < 1)
- Thread.sleep(300);
- SystemTapErrorHandler errorHandler = new SystemTapErrorHandler();
- errorHandler.handle(monitor, config.getName() + Messages.getString("SystemTapLaunchConfigurationDelegate.stap_command") //$NON-NLS-1$
- + PluginConstants.NEW_LINE + cmd
- + PluginConstants.NEW_LINE + PluginConstants.NEW_LINE);
- errorHandler.handle(monitor, new FileReader(TEMP_ERROR_OUTPUT)); //$NON-NLS-1$
- if (monitor != null && monitor.isCanceled())
- return;
-
-
- if (errorHandler.hasMismatchedProbePoints() && retry) {
- errorHandler.finishHandling(monitor, s.getNumberOfErrors());
- if (monitor != null && monitor.isCanceled())
- return;
- finishLaunch(launch, config, command, monitor, false);
- return;
- }
- errorHandler.finishHandling(monitor, s.getNumberOfErrors());
-
- return;
- }
-
- if (element.getAttribute("realtime") != "true") {
- parser.schedule();
- }
-
-
- monitor.worked(1);
-
- } catch (IOException e) {
- e.printStackTrace();
- } catch (InterruptedException e) {
- e.printStackTrace();
- } catch (CoreException e) {
- e.printStackTrace();
- } finally {
- DocWriter dw = new DocWriter(Messages.getString("SystemTapLaunchConfigurationDelegate.DocWriterName"), //$NON-NLS-1$
- ((TextConsole)Helper.getConsoleByName(config.getName())), config.getName(),
- binaryArguments);
- dw.schedule();
- monitor.done();
- }
- }
-
- private class StreamListener implements IStreamListener{
- private Helper h;
- private int counter;
- public StreamListener() throws IOException {
- h = new Helper();
- counter = 0;
- h.setBufferedWriter(TEMP_ERROR_OUTPUT); //$NON-NLS-1$
- }
- @Override
- public void streamAppended(String text, IStreamMonitor monitor) {
- try {
- counter++;
- if (counter < PluginConstants.MAX_ERRORS)
- h.appendToExistingFile(text);
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- }
-
- public void close() throws IOException {
- h.closeBufferedWriter();
- }
-
- public int getNumberOfErrors() {
- return counter;
- }
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLaunchConfigurationTabGroup.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLaunchConfigurationTabGroup.java
deleted file mode 100644
index 70212f7230..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLaunchConfigurationTabGroup.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.local.launch;
-
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
-
-/**
- * Expansion of the SystemTapLCTG, which was a stripped down version of the ProfileLaunchConfigurationTabGroup
- *
- * @author chwang
- *
- */
-public class SystemTapLaunchConfigurationTabGroup extends SystemTapLCTG{
-
- public AbstractLaunchConfigurationTab[] getProfileTabs() {
- return new AbstractLaunchConfigurationTab[] {
- new SystemTapOptionsTab()
- };
- }
-
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLaunchShortcut.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLaunchShortcut.java
deleted file mode 100644
index 0a7da93c0f..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapLaunchShortcut.java
+++ /dev/null
@@ -1,793 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.local.launch;
-
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.cdt.core.CCorePlugin;
-import org.eclipse.cdt.core.dom.ast.IFunction;
-import org.eclipse.cdt.core.index.IIndex;
-import org.eclipse.cdt.core.index.IIndexBinding;
-import org.eclipse.cdt.core.index.IIndexFile;
-import org.eclipse.cdt.core.index.IIndexManager;
-import org.eclipse.cdt.core.index.IIndexName;
-import org.eclipse.cdt.core.model.CModelException;
-import org.eclipse.cdt.core.model.IBinary;
-import org.eclipse.cdt.core.model.ICContainer;
-import org.eclipse.cdt.core.model.ICElement;
-import org.eclipse.cdt.core.model.ICProject;
-import org.eclipse.cdt.core.model.ITranslationUnit;
-import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.jface.window.Window;
-import org.eclipse.linuxtools.profiling.launch.ProfileLaunchShortcut;
-import org.eclipse.linuxtools.systemtap.local.core.LaunchConfigurationConstants;
-import org.eclipse.linuxtools.systemtap.local.core.PluginConstants;
-import org.eclipse.linuxtools.systemtap.local.core.SystemTapUIErrorMessages;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-
-public class SystemTapLaunchShortcut extends ProfileLaunchShortcut{
- protected IEditorPart editor;
- protected ILaunchConfiguration config;
-
- private static final String USER_SELECTED_ALL = "ALL"; //$NON-NLS-1$
-
- protected String name;
- protected String binaryPath;
- protected String scriptPath; //$NON-NLS-1$
- protected String arguments;
- protected String outputPath;
- protected String binName;
- protected String dirPath;
- protected String generatedScript;
- protected String parserID;
- protected boolean needToGenerate;
- protected boolean overwrite;
- protected boolean useColours;
- protected String resourceToSearchFor;
- protected boolean searchForResource;
- protected IBinary bin;
-
-
- private Button OKButton;
- private boolean testMode = false;
-
-
- /**
- * Provides access to the Profiling Frameworks' launch method
- *
- * @param editor
- * @param mode
- */
- public void reLaunch(IEditorPart editor, String mode) {
- launch(editor, mode);
- }
-
- public void Init() {
- name = ""; //$NON-NLS-1$
- dirPath = ResourcesPlugin.getWorkspace().getRoot().getLocation().toString();
- binaryPath = LaunchConfigurationConstants.DEFAULT_BINARY_PATH;
- arguments = LaunchConfigurationConstants.DEFAULT_ARGUMENTS;
- outputPath = PluginConstants.STAP_GRAPH_DEFAULT_IO_PATH;
- overwrite = true;
- scriptPath = null; //Every shortcut MUST declare its own script path.
- generatedScript = LaunchConfigurationConstants.DEFAULT_GENERATED_SCRIPT;
- needToGenerate = false;
- useColours = false;
- parserID = null;
- }
-
- @Override
- protected ILaunchConfigurationType getLaunchConfigType() {
- //System.out.println("SystemTapLaunchShortcut: getLaunchConfigType"); //$NON-NLS-1$
- return getLaunchManager().getLaunchConfigurationType(PluginConstants.CONFIGURATION_TYPE_ID);
- }
-
-
- @Override
- protected void setDefaultProfileAttributes(
- ILaunchConfigurationWorkingCopy wc) throws CoreException {
- SystemTapOptionsTab tab = new SystemTapOptionsTab();
- tab.setDefaults(wc);
- //System.out.println("SystemTapLaunchShortcut: setDefaultProfileAttributes"); //$NON-NLS-1$
- }
-
-
- protected ILaunchConfiguration checkForExistingConfiguration() {
- ILaunchConfigurationType configType = getLaunchConfigType();
- try {
- ILaunchConfiguration[] configs = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations(configType);
-
- for (int i = 0; i < configs.length; i++) {
- if (configs[i].exists() && configs[i]!=null && !config.equals(configs[i])) {
- if(checkIfAttributesAreEqual(config, configs[i])) {
- config.delete();
- config = configs[i];
- }
- }
- }
-
- } catch (CoreException e) {
- e.printStackTrace();
- }
-
- return config;
-
- }
-
-
- /**
- * Returns true if two configurations are exactly identical (i.e. all attributes are equal)
- *
- * @param first
- * @param second
- * @return True if two configurations are exactly identical (i.e. all attributes are equal)
- */
- private boolean checkIfAttributesAreEqual(ILaunchConfiguration first,ILaunchConfiguration second) {
- boolean isEqual = false;
-
- try {
- if (first.getAttributes().equals(second.getAttributes()))
- isEqual = true;
- } catch (CoreException e) {
- e.printStackTrace();
- }
-
- return isEqual;
- }
-
-/**
- * Helper function to complete launches. Uses protected parameters
- * (Strings) scriptPath, binaryPath, arguments, outputPath and (boolean)
- * overwrite. These must be set by the calling function (or else
- * nonsensical results will occur).
- *
- * ScriptPath MUST be set.
- *
- * @param name: Used to generate the name of the new configuration
- * @param bin: Affiliated executable
- * @param mode: Mode setting
- * @throws Exception
- */
- protected void finishLaunch(String name, String mode) throws Exception {
- if (parserID == null)
- throw new Exception();
-
- if (scriptPath.length() < 1) {
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("SystemTapLaunchShortcut.ErrorMessageName"), //$NON-NLS-1$
- Messages.getString("SystemTapLaunchShortcut.ErrorMessageTitle"), Messages.getString("SystemTapLaunchShortcut.ErrorMessage") + name); //$NON-NLS-1$ //$NON-NLS-2$
- mess.schedule();
- return;
- }
-
-
- ILaunchConfigurationWorkingCopy wc = null;
- if (config != null) {
- try {
- wc = config.getWorkingCopy(); //$NON-NLS-1$
- } catch (CoreException e1) {
- e1.printStackTrace();
- }
-
- wc.setAttribute(LaunchConfigurationConstants.SCRIPT_PATH, scriptPath);
- wc.setAttribute(LaunchConfigurationConstants.BINARY_PATH, binaryPath);
- wc.setAttribute(LaunchConfigurationConstants.OUTPUT_PATH, outputPath);
- wc.setAttribute(LaunchConfigurationConstants.ARGUMENTS, arguments);
- wc.setAttribute(LaunchConfigurationConstants.GENERATED_SCRIPT, generatedScript);
- wc.setAttribute(LaunchConfigurationConstants.NEED_TO_GENERATE, needToGenerate);
- wc.setAttribute(LaunchConfigurationConstants.OVERWRITE, overwrite);
- wc.setAttribute(LaunchConfigurationConstants.USE_COLOUR, useColours);
- wc.setAttribute(LaunchConfigurationConstants.PARSER_CLASS, parserID);
-
-
- try {
- config = wc.doSave();
- } catch (CoreException e) {
- e.printStackTrace();
- }
-
- checkForExistingConfiguration();
-
- if (!testMode)
- DebugUITools.launch(config, mode);
- }
-
- }
-
- //TODO: Should merge finishWith and Without binary - we only use
- //the IBinary to find the name, in any case.
- /**
- * This function is identical to the function above, except it does not
- * require a binary.
- *
- * Helper function to complete launches. Uses protected parameters
- * (Strings) scriptPath, arguments, outputPath and (boolean)
- * overwrite. These must be set by the calling function (or else
- * nonsensical results will occur).
- *
- * ScriptPath MUST be set.
- *
- * @param name: Used to generate the name of the new configuration
- * @param bin: Affiliated executable
- * @param mode: Mode setting
- */
-protected void finishLaunchWithoutBinary(String name, String mode) {
-
-
- if (scriptPath.length() < 1) {
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("SystemTapLaunchShortcut.ErrorMessagename"), //$NON-NLS-1$
- Messages.getString("SystemTapLaunchShortcut.ErrorMessageTitle"), Messages.getString("SystemTapLaunchShortcut.ErrorMessage") + name); //$NON-NLS-1$ //$NON-NLS-2$
- mess.schedule();
- return;
- }
-
- ILaunchConfigurationWorkingCopy wc = null;
- if (config != null) {
- try {
- wc = config.getWorkingCopy();
- } catch (CoreException e1) {
- e1.printStackTrace();
- }
-
- wc.setAttribute(LaunchConfigurationConstants.SCRIPT_PATH, scriptPath);
- wc.setAttribute(LaunchConfigurationConstants.OUTPUT_PATH, outputPath);
- wc.setAttribute(LaunchConfigurationConstants.ARGUMENTS, arguments);
- wc.setAttribute(LaunchConfigurationConstants.GENERATED_SCRIPT, generatedScript);
- wc.setAttribute(LaunchConfigurationConstants.NEED_TO_GENERATE, needToGenerate);
- wc.setAttribute(LaunchConfigurationConstants.OVERWRITE, overwrite);
- wc.setAttribute(LaunchConfigurationConstants.USE_COLOUR, useColours);
-
-
- try {
- config = wc.doSave();
- } catch (CoreException e) {
- e.printStackTrace();
- }
- checkForExistingConfiguration();
-
- if (!testMode)
- DebugUITools.launch(config, mode);
- }
- }
-
-
-/**
- * Returns bin.getPath().toString()
- *
- * @param bin
- * @return
- */
- public String getName(IBinary bin) {
- if (bin != null) {
- binName = bin.getPath().toString();
- } else {
- binName = ""; //$NON-NLS-1$
-// SystemTapUIErrorMessages error = new SystemTapUIErrorMessages(
-// "Null_Binary",
-// "Invalid executable",
-// "An error has occured: a binary/executable file was not given to the launch shortcut.");
-// error.schedule();
- }
- return binName;
- }
-
- /**
- * Creates a configuration for the given IBinary
- *
- */
- @Override
- protected ILaunchConfiguration createConfiguration(IBinary bin){
- if (bin != null){
- return super.createConfiguration(bin);
- }else{
- try {
- return getLaunchConfigType().newInstance(null, getLaunchManager().generateUniqueLaunchConfigurationNameFrom(Messages.getString("SystemTapLaunchShortcut.0"))); //$NON-NLS-1$
- } catch (CoreException e) {
- e.printStackTrace();
- }
- }
- return null;
- }
-
-
-
- /**
- * Creates a configuration with the given name - does not use a binary
- *
- * @param name
- * @return
- */
- protected ILaunchConfiguration createConfiguration(String name) {
- ILaunchConfiguration config = null;
- try {
- ILaunchConfigurationType configType = getLaunchConfigType();
- ILaunchConfigurationWorkingCopy wc = configType.newInstance(null, getLaunchManager().generateUniqueLaunchConfigurationNameFrom(name));
-
- setDefaultProfileAttributes(wc);
-
- config = wc.doSave();
- } catch (CoreException e) {
- e.printStackTrace();
- }
- return config;
- }
-
- /**
- * Allows null configurations to be launched. Any launch that uses a binary should
- * never call this configuration with a null parameter, and any launch that does not
- * use a binary should never call this function. The null handling is included for
- * ease of testing.
- *
- * @param bin
- * @param name - Customize the name based on the shortcut being launched
- * @return A launch configuration, or null
- */
- protected ILaunchConfiguration createConfiguration(IBinary bin, String name) {
- if (bin != null) {
- config = null;
- try {
- String projectName = bin.getResource().getProjectRelativePath().toString();
- ILaunchConfigurationType configType = getLaunchConfigType();
- ILaunchConfigurationWorkingCopy wc = configType.newInstance(null,
- getLaunchManager().generateUniqueLaunchConfigurationNameFrom(name + " - " + bin.getElementName())); //$NON-NLS-1$
-
- wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, projectName);
- wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, bin.getCProject().getElementName());
- wc.setMappedResources(new IResource[] {bin.getResource(), bin.getResource().getProject()});
- wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, (String) null);
-
- setDefaultProfileAttributes(wc);
-
- config = wc.doSave();
- } catch (CoreException e) {
- e.printStackTrace();
- }
- }
- else
- try {
- ILaunchConfigurationWorkingCopy wc = getLaunchConfigType().newInstance(null, getLaunchManager().generateUniqueLaunchConfigurationNameFrom(name)); //$NON-NLS-1$
- setDefaultProfileAttributes(wc);
- config = wc.doSave();
- } catch (CoreException e) {
- e.printStackTrace();
- return null;
- }
- return config;
- }
-
- /**
- * Creates an error message stating that the launch failed for the specified reason.
- *
- * @param reason
- */
- protected void failedToLaunch(String reason) {
- SystemTapUIErrorMessages mess = new SystemTapUIErrorMessages(Messages.getString("SystemTapLaunchShortcut.StapLaunchFailed"), //$NON-NLS-1$
- Messages.getString("SystemTapLaunchShortcut.StapLaunchFailedTitle"), Messages.getString("SystemTapLaunchShortcut.StapLaunchFailedMessage") + reason); //$NON-NLS-1$ //$NON-NLS-2$
- mess.schedule();
- }
-
-
- public void errorHandler() {
- };
-
-
- /**
- * The following are convenience methods for test programs, etc. to check
- * the value of certain protected parameters.
- *
- */
- public ILaunchConfigurationType outsideGetLaunchConfigType() {
- return getLaunchConfigType();
- }
-
- public ILaunchConfiguration getConfig() {
- return config;
- }
-
- public String getScriptPath() {
- return scriptPath;
- }
-
- public String getDirPath() {
- return dirPath;
- }
-
- public String getArguments() {
- return arguments;
- }
-
- public String getBinaryPath() {
- return binaryPath;
- }
-
- /**
- * Retrieves the names of all functions referenced by the binary. If searchForResource
- * is true, this function will return all function names belonging to an element with name
- * matching the String held by resourceToSearchFor. Otherwise it will create a dialog
- * prompting the user to select from a list of files to profile, or select the only
- * available file if only one file is available.
- *
- *
- * @param bin
- * @return
- */
- protected String getFunctionsFromBinary(IBinary bin, String targetResource) {
- String funcs = ""; //$NON-NLS-1$
- if (bin == null)
- return funcs;
- try {
- ArrayList<ICContainer> list = new ArrayList<ICContainer>();
- TranslationUnitVisitor v = new TranslationUnitVisitor();
-// ASTTranslationUnitVisitor v = new ASTTranslationUnitVisitor();
-
- for (ICElement b : bin.getCProject().getChildrenOfType(ICElement.C_CCONTAINER)) {
- ICContainer c = (ICContainer) b;
-
- for (ITranslationUnit tu : c .getTranslationUnits()) {
- if (searchForResource && tu.getElementName().contains(targetResource)) {
- tu.accept(v);
- funcs+=v.getFunctions();
- return funcs;
- } else {
- if (!list.contains(c))
- list.add(c);
- }
- }
-
- //Iterate down to all children, checking for more C_Containers
- while (c.getChildrenOfType(ICElement.C_CCONTAINER).size() > 0) {
- ICContainer e = null;
- for (ICElement d : c.getChildrenOfType(ICElement.C_CCONTAINER)) {
- e = (ICContainer) d;
- for (ITranslationUnit tu : e.getTranslationUnits()) {
- if (searchForResource && tu.getElementName().contains(targetResource)) {
- tu.accept(v);
- funcs+=(v.getFunctions());
- return funcs;
- } else {
- if (!list.contains(c))
- list.add(c);
- }
- }
- }
- c = e;
- }
- }
-
- int numberOfFiles = numberOfValidFiles(list.toArray());
- if (numberOfFiles == 1) {
- for (ICContainer c : list) {
- for (ITranslationUnit e : c.getTranslationUnits()) {
- if (e.getElementName().endsWith(".c") || //$NON-NLS-1$
- e.getElementName().endsWith(".cpp")) { //$NON-NLS-1$
- e.accept(v);
- funcs+=v.getFunctions();
- }
- }
- }
- } else {
-
- Object[] unitList = chooseUnit(list, numberOfFiles);
- if (unitList == null || unitList.length == 0) {
- return null; //$NON-NLS-1$
- } else if (unitList.length == 1 && unitList[0].toString().equals(USER_SELECTED_ALL)) {
- funcs = "*"; //$NON-NLS-1$
- return funcs;
- }
-
- StringBuffer tmpFunc = new StringBuffer();
- for (String item : getAllFunctions(bin.getCProject(), unitList)){
- tmpFunc.append(item);
- tmpFunc.append(" "); //$NON-NLS-1$
- }
- funcs = tmpFunc.toString();
-
- }
-
- return funcs;
-
- } catch (CModelException e) {
- e.printStackTrace();
- } catch (CoreException e) {
- e.printStackTrace();
- }
-
- return null;
- }
-
- /**
- * Creates a dialog that prompts the user to select from the given list
- * of ICElements
- *
- * @param list: list of ICElements
- * @return
- */
- protected Object[] chooseUnit(List<ICContainer> list, int numberOfValidFiles) {
- ListTreeContentProvider prov = new ListTreeContentProvider();
-
- RuledTreeSelectionDialog dialog = new RuledTreeSelectionDialog(getActiveWorkbenchShell(),
- new WorkbenchLabelProvider(), prov);
-
- dialog.setTitle(Messages.getString("SystemTapLaunchShortcut.8")); //$NON-NLS-1$
- dialog.setMessage(Messages.getString("SystemTapLaunchShortcut.9")); //$NON-NLS-1$
- dialog.setInput(list);
- dialog.setHelpAvailable(false);
- dialog.setStatusLineAboveButtons(false);
- dialog.setEmptyListMessage(Messages.getString("SystemTapLaunchShortcut.10")); //$NON-NLS-1$
- dialog.setContainerMode(true);
-
- Object[] topLevel = prov.findElements(list);
- dialog.setInitialSelections(topLevel);
- dialog.setSize(cap(topLevel.length*10, 30, 55),
- cap((int) (topLevel.length*1.5), 3, 13));
-
- dialog.create();
- OKButton = dialog.getOkButton();
-
- Object[] result = null;
-
-
- if (testMode) {
- OKButton.setSelection(true);
- result = list.toArray();
- ArrayList<Object> output = new ArrayList<Object>();
- try {
- for (Object obj : result) {
- if (obj instanceof ICContainer){
- ICElement[] array = ((ICContainer) obj).getChildren();
- for (ICElement c : array) {
- if (!(c.getElementName().endsWith(".c") || //$NON-NLS-1$
- c.getElementName().endsWith(".cpp"))) //$NON-NLS-1$
- continue;
- if (c.getElementName().contains("main") && !output.contains(c)) //$NON-NLS-1$
- output.add(c);
- }
- }
- }
-
- if ( output.size() >= numberOfValidFiles) {
- output.clear();
- output.add(USER_SELECTED_ALL);
- }
- } catch (CModelException e) {
- e.printStackTrace();
- }
-
- result = output.toArray();
- }
- else {
- if (dialog.open() == Window.CANCEL)
- return null;
- result = dialog.getResult();
- }
-
- if (result == null)
- return null;
-
- ArrayList<Object> output = new ArrayList<Object>();
- try {
- for (Object obj : result) {
- if (obj instanceof ICContainer){
- ICElement[] array = ((ICContainer) obj).getChildren();
- for (ICElement c : array) {
- if (!(c.getElementName().endsWith(".c") || //$NON-NLS-1$
- c.getElementName().endsWith(".cpp"))) //$NON-NLS-1$
- continue;
- if (!output.contains(c))
- output.add(c);
- }
- }
- else if (obj instanceof ICElement) {
- if (((ICElement) obj).getElementName().endsWith(".c") //$NON-NLS-1$
- || ((ICElement) obj).getElementName().endsWith(".cpp")) { //$NON-NLS-1$
- if (!output.contains(obj)) {
- output.add(obj);
- }
- }
- }
- }
-
- if ( output.size() >= numberOfValidFiles) {
- output.clear();
- output.add(USER_SELECTED_ALL);
- }
- } catch (CModelException e) {
- e.printStackTrace();
- }
-
- return output.toArray();
- }
-
-
- private int numberOfValidFiles(Object[] list) throws CModelException {
- int output = 0;
- for (Object parent : list) {
- if (parent instanceof ICContainer) {
- ICContainer cont = (ICContainer) parent;
- for (ICElement ele : cont.getChildren()) {
- if (ele instanceof ICContainer) {
- output += numberOfValidFiles(((ICContainer) ele).getChildren());
- }
- if (ele instanceof ICElement) {
- if (ele.getElementName().endsWith(".c") || //$NON-NLS-1$
- ele.getElementName().endsWith(".cpp")) //$NON-NLS-1$
- output++;
- }
- }
- } else if (parent instanceof ICElement) {
- if (((ICElement) parent).getElementName().endsWith(".c") || //$NON-NLS-1$
- ((ICElement) parent).getElementName().endsWith(".cpp")) //$NON-NLS-1$
- output++;
- }
- }
- return output;
- }
-
-
- /**
- * Convenience method for creating a new configuration
- * @return a new configuration
- * @throws CoreException
- */
- public ILaunchConfiguration getNewConfiguration() throws CoreException {
- ILaunchConfigurationType configType = getLaunchConfigType();
- ILaunchConfigurationWorkingCopy wc = configType.newInstance(null,
- getLaunchManager().generateUniqueLaunchConfigurationNameFrom("TestingConfiguration")); //$NON-NLS-1$
-
- return wc.doSave();
-
- }
-
-
- /**
- * @param project : C Project Type
- * @return A String list of all functions contained within the specified
- * C Project
- */
- public static ArrayList<String> getAllFunctions(ICProject project, Object [] listOfFiles){
- try {
- GetFunctionsJob j = new GetFunctionsJob(project.getHandleIdentifier(), project, listOfFiles);
- j.schedule();
- j.join();
- ArrayList<String> functionList = j.getFunctionList();
-
- return functionList;
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- return null;
- }
-
- private static boolean specialContains (Object [] list, String input){
- for (Object val : list){
- if (val instanceof ICElement) {
- ICElement el = (ICElement) val;
- if (el.getPath().toString().contains(input)){
- return true;
- }
- }
- }
- return false;
- }
-
-
-
- private int cap (int number, int low, int high) {
- if (number > high)
- return high;
- if (number < low)
- return low;
- return number;
- }
-
- /**
- * Function for generating scripts. Should be overriden by interested classes
- * @throws IOException
- */
- public String generateScript() throws IOException {
- return null;
- }
-
- public void setScriptPath(String val) {
- this.scriptPath = val;
- }
-
- public void setBinary(IBinary val) {
- this.bin = val;
- }
-
-
- private static class GetFunctionsJob extends Job {
- private ArrayList<String> functionList;
- private ICProject project;
- private Object[] listOfFiles;
-
- public GetFunctionsJob(String name, ICProject p, Object[] o) {
- super(name);
- functionList = new ArrayList<String>();
- listOfFiles = o;
- project = p;
- }
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- IIndexManager manager = CCorePlugin.getIndexManager();
- IIndex index = null;
-
- try {
- index = manager.getIndex(project);
- index.acquireReadLock();
-
- IIndexFile[] blah = index.getAllFiles();
- for (IIndexFile file : blah) {
- String fullFilePath = file.getLocation().getFullPath();
- if (fullFilePath == null || !specialContains(listOfFiles, fullFilePath)) {
- continue;
- }
-
- IIndexName[] indexNamesArray = file.findNames(0, Integer.MAX_VALUE);
- for (IIndexName name : indexNamesArray) {
- if (name.isDefinition() && specialContains(listOfFiles, name.getFile().getLocation().getFullPath())) {
- IIndexBinding binder = index.findBinding(name);
- if (binder instanceof IFunction && !functionList.contains(binder.getName())) {
- functionList.add(binder.getName());
- }
- }
- }
-
- }
-
- } catch (CoreException e) {
- e.printStackTrace();
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
-
- index.releaseReadLock();
- return Status.OK_STATUS;
- }
-
- public ArrayList<String> getFunctionList() {
- return functionList;
- }
- }
-
-
- public String getScript() {
- return generatedScript;
- }
-
- public Button getButton() {
- return OKButton;
- }
-
- public void setTestMode(boolean val) {
- testMode = val;
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapOptionsTab.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapOptionsTab.java
deleted file mode 100644
index 2c8c7bf0e2..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/SystemTapOptionsTab.java
+++ /dev/null
@@ -1,1011 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.systemtap.local.launch;
-
-import java.io.File;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.linuxtools.systemtap.local.core.LaunchConfigurationConstants;
-import org.eclipse.linuxtools.systemtap.local.core.PluginConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.ScrolledComposite;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.FocusListener;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Spinner;
-import org.eclipse.swt.widgets.TabFolder;
-import org.eclipse.swt.widgets.TabItem;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.dialogs.ElementListSelectionDialog;
-import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.views.navigator.ResourceComparator;
-
-/**
- * Options tab for SystemTap. Currently does NOT contain all possible options
- *
- */
-public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
-
- //Control creation objects
- protected Composite top;
- protected ScrolledComposite scrollTop;
- protected Combo toolsCombo;
-
- protected TabFolder fileFolder;
- protected TabFolder commandFolder;
- protected TabFolder argumentsFolder;
- protected TabFolder binaryArgumentsFolder;
- protected TabFolder parserFolder;
- protected TabFolder generatedScriptFolder;
-
- //Controls
- protected Text scriptFile;
- protected Text binaryFile;
- protected Text arguments;
- protected Text generatedScript;
- protected Text outputFile;
- protected Text button_D_text;
- protected Text binaryArguments;
- protected Text parser;
-// protected Text commandFile;
-
- protected Button fileBrowseButton;
- protected Button workspaceBrowseButton;
- protected Button parserButton;
-
- protected Button button_v;
- protected Button button_k;
- protected Button button_u;
- protected Button button_w;
- protected Button button_b;
- protected Button button_g;
- protected Button button_P;
- protected Button button_t;
- protected Button button_build;
- protected Button button_F;
- protected Button button_skip_badvars;
- protected Button button_ignore_dwarf;
- protected Button button_q;
- protected Button needsBinaryButton;
- protected Button needToGenerateScriptButton;
- protected Button button_graphicsMode;
-
-
- protected Spinner button_p_Spinner;
- protected Spinner button_s_Spinner;
- protected Spinner button_x_Spinner;
-
- private Button useColourButton;
-// private Button generateScriptButton;
-
- //Other variables
- protected String workspacePath;
- protected String[] tools;
- protected boolean output_file_has_changed = false;
- protected boolean needsOverwritePermission = false;
- protected boolean overwritePermission = false;
- private boolean changeOverwrite = false;
-
- /**
- * The code below is very long, but it boils down to this.
- *
- * The main function is createControl. This function prepares
- * some space for the various tabs and calls the other create*Option
- * functions to create buttons, text fields and spinners.
- *
- * The create*Option functions create their respective sub-tabs.
- *
- * Each of the controls (button, text, spinner) needs to have a listener
- * attached so Eclipse knows what to do with them.
- *
- * There are a bunch of functions to update/set defaults/initialize,
- * and a final
- */
-
- protected SelectionListener graphicsModeListener = new SelectionAdapter(){
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (scriptFile.isEnabled()){
- scriptFile.setEnabled(false);
- workspaceBrowseButton.setEnabled(false);
- fileBrowseButton.setEnabled(false);
- scriptFile.setText(PluginConstants.PLUGIN_LOCATION+"parse_function.stp"); //$NON-NLS-1$
- }else{
- scriptFile.setEnabled(true);
- workspaceBrowseButton.setEnabled(true);
- fileBrowseButton.setEnabled(true);
- }
- updateLaunchConfigurationDialog();
- }
- };
-
- protected SelectionListener selectListener = new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- updateLaunchConfigurationDialog();
- }
- };
-
- protected ModifyListener modifyListener = new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- updateLaunchConfigurationDialog();
- }
- };
-
- protected ModifyListener modifyListenerOutput = new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- updateLaunchConfigurationDialog();
- output_file_has_changed = true;
- }
- };
-
- protected FocusListener focusListener = new FocusListener() {
-
- @Override
- public void focusGained(FocusEvent e) {
- //Do nothing
- }
-
- @Override
- public void focusLost(FocusEvent e) {
- if (output_file_has_changed) {
- checkOverwrite();
- }
- output_file_has_changed = false;
-
- updateLaunchConfigurationDialog();
- }
- };
-
- /**
- * Convenience method to check if the overwrite permissions are consistent
- *
- * Helps ensure validity of configuration.
- */
- public void checkOverwrite() {
- File f = new File(outputFile.getText());
- changeOverwrite = true;
- if (f.exists()) {
- needsOverwritePermission = true;
- Shell sh = new Shell();
- if (MessageDialog.openConfirm(sh, Messages.getString("SystemTapOptionsTab.ConfirmOverwriteFileTitle"), //$NON-NLS-1$
- Messages.getString("SystemTapOptionsTab.ConfirmOverwriteFileMessage"))) { //$NON-NLS-1$
- overwritePermission = true;
- } else {
- overwritePermission = false;
- }
- }
- else
- needsOverwritePermission = false;
- }
-
- /**
- * This function prepares some space for the various
- * tabs and calls and sets the other create*Option
- * functions to create buttons, text fields and spinners.
- */
- @Override
- public void createControl(Composite parent) {
- scrollTop = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL);
- scrollTop.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- scrollTop.setExpandVertical(true);
- scrollTop.setExpandHorizontal(true);
-
- setControl(scrollTop);
-
- top = new Composite(scrollTop, SWT.NONE);
- top.setLayout(new GridLayout());
-
- scrollTop.setContent(top);
-
- /*
- * File folder - tab for selecting binary/stp file
- */
- fileFolder = new TabFolder(top, SWT.BORDER);
- fileFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- TabItem fileTab = new TabItem(fileFolder, SWT.NONE);
- fileTab.setText(Messages.getString("SystemTapOptionsTab.FilesTab")); //$NON-NLS-1$
-
- Composite fileTop = new Composite(fileFolder, SWT.NONE);
- fileTop.setLayout(new GridLayout());
- fileTop.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- createFileOption(fileTop);
- fileTab.setControl(fileTop);
-
-
- /*
- * Commands folder - tab for selecting SystemTap commands
- */
-
- commandFolder = new TabFolder(top, SWT.BORDER);
- commandFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- TabItem commandTab = new TabItem(fileFolder, SWT.NONE);
- commandTab.setText(Messages.getString("SystemTapOptionsTab.CommandsTab")); //$NON-NLS-1$
-
- Composite commandTop = new Composite(fileFolder, SWT.NONE);
- commandTop.setLayout(new GridLayout());
- commandTop.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- createCommandOption(commandTop);
- commandTab.setControl(commandTop);
-
- /*
- * Arguments folder - tab for selecting script arguments
- */
- argumentsFolder = new TabFolder(top, SWT.BORDER);
- argumentsFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- TabItem argumentsTab = new TabItem(fileFolder, SWT.NONE);
- argumentsTab.setText(Messages.getString("SystemTapOptionsTab.Arguments")); //$NON-NLS-1$
-
- Composite argumentsTop = new Composite(fileFolder, SWT.NONE);
- argumentsTop.setLayout(new GridLayout());
- argumentsTop.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- createArgumentsOption(argumentsTop);
- argumentsTab.setControl(argumentsTop);
-
-
- /*
- * Binary Argument folder - tab for supplying arguments for a binary
- */
- binaryArgumentsFolder = new TabFolder(top, SWT.BORDER);
- binaryArgumentsFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- TabItem binaryArgumentsTab = new TabItem(fileFolder, SWT.NONE);
- binaryArgumentsTab.setText(Messages.getString("SystemTapOptionsTab.44")); //$NON-NLS-1$
-
- Composite binaryArgumentsTop = new Composite(fileFolder, SWT.NONE);
- binaryArgumentsTop.setLayout(new GridLayout());
- binaryArgumentsTop.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- createBinaryArgumentsOption(binaryArgumentsTop);
- binaryArgumentsTab.setControl(binaryArgumentsTop);
-
-
- /*
- * Parser folder -- Tab for selecting a parser to use
- */
- parserFolder = new TabFolder(top, SWT.BORDER);
- parserFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- TabItem parserTab = new TabItem(fileFolder, SWT.NONE);
- parserTab.setText("Parser"); //$NON-NLS-1$
-
- Composite parserTop = new Composite(fileFolder, SWT.NONE);
- parserTop.setLayout(new GridLayout());
- parserTop.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- createParserOption(parserTop);
- parserTab.setControl(parserTop);
-
-// /*
-// * Generated Script folder - tab for selecting script generatedScript
-// */
-// generatedScriptFolder = new TabFolder(top, SWT.BORDER);
-// generatedScriptFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
-//
-// TabItem generatedScriptTab = new TabItem(fileFolder, SWT.NONE);
-// generatedScriptTab.setText(Messages.getString("SystemTapOptionsTab.GeneratedScriptsTab")); //$NON-NLS-1$
-//
-// Composite generatedScriptTop = new Composite(fileFolder, SWT.NONE);
-// generatedScriptTop.setLayout(new GridLayout());
-// generatedScriptTop.setLayoutData(new GridData(GridData.FILL_BOTH));
-//
-// createGeneratedScriptOption(generatedScriptTop);
-// generatedScriptTab.setControl(generatedScriptTop);
-
- /*
- * SystemTap help - contains the stap man page
- */
- }
-
-
- private void createBinaryArgumentsOption(Composite binaryArgumentsTop) {
- Composite browseTop = new Composite(binaryArgumentsTop, SWT.NONE);
- browseTop.setLayout(new GridLayout(1, false));
- GridData browseData = new GridData(GridData.FILL_HORIZONTAL);
- browseTop.setLayoutData(browseData);
-
- Label suppFileLabel = new Label(browseTop, SWT.NONE);
- suppFileLabel.setText(Messages.getString("SystemTapOptionsTab.45")); //$NON-NLS-1$
-
- binaryArguments = new Text(browseTop,SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.heightHint = 200;
- binaryArguments.setLayoutData(gd);
- binaryArguments.addModifyListener(modifyListener);
- }
-
- private void createParserOption(Composite parserTop) {
- Composite browseTop = new Composite(parserTop, SWT.NONE);
- browseTop.setLayout(new GridLayout(1, false));
- GridData browseData = new GridData(GridData.FILL_HORIZONTAL);
- browseTop.setLayoutData(browseData);
-
- Label suppFileLabel = new Label(browseTop, SWT.NONE);
- suppFileLabel.setText("Parser");
-
- parser = new Text(browseTop, SWT.BORDER);
- parser.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- parser.addModifyListener(modifyListener);
-
- parserButton = createPushButton(browseTop,
- "Find parsers", null); //$NON-NLS-1$
- parserButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(),
- new ListLabelProvider());
- dialog.setTitle("Select parser"); //$NON-NLS-1$
- dialog.setMessage("Select parser to use."); //$NON-NLS-1$
- IExtensionRegistry reg = Platform.getExtensionRegistry();
- IConfigurationElement[] extensions = reg
- .getConfigurationElementsFor(PluginConstants.PARSER_RESOURCE,
- PluginConstants.PARSER_NAME);
-
- dialog.setElements(extensions);
- if (dialog.open() == IDialogConstants.OK_ID) {
- String arg = getUsefulLabel(dialog.getFirstResult());
- parser.setText(arg);
- }
- }
- });
- }
-
- protected void createGeneratedScriptOption(Composite generatedScriptTop) {
- Composite browseTop = new Composite(generatedScriptTop, SWT.NONE);
- browseTop.setLayout(new GridLayout(1, false));
- GridData browseData = new GridData(GridData.FILL_HORIZONTAL);
- browseTop.setLayoutData(browseData);
-
-
- Label suppFileLabel = new Label(browseTop, SWT.NONE);
- suppFileLabel.setText(Messages.getString("SystemTapOptionsTab.GeneratedScriptsTitle")); //$NON-NLS-1$
-
- generatedScript = new Text(browseTop,SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL);
-
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.heightHint = 200;
- generatedScript.setLayoutData(gd);
- generatedScript.addModifyListener(modifyListener);
-
- needToGenerateScriptButton = new Button(browseTop, SWT.CHECK);
- needToGenerateScriptButton.setText(Messages.getString("SystemTapOptionsTab.GenerateScriptButton")); //$NON-NLS-1$
- needToGenerateScriptButton.addSelectionListener(selectListener);
- needToGenerateScriptButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-
- }
-
- protected void createArgumentsOption(Composite argumentsTop) {
- Composite browseTop = new Composite(argumentsTop, SWT.NONE);
- browseTop.setLayout(new GridLayout(1, false));
- GridData browseData = new GridData(GridData.FILL_HORIZONTAL);
- browseTop.setLayoutData(browseData);
-
-
- Label suppFileLabel = new Label(browseTop, SWT.NONE);
- suppFileLabel.setText(Messages.getString("SystemTapOptionsTab.SelectArguments")); //$NON-NLS-1$
-
- arguments = new Text(browseTop,SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL);
-
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.heightHint = 200;
- arguments.setLayoutData(gd);
- arguments.addModifyListener(modifyListener);
-
-
- Button probeFunctionButton = createPushButton(browseTop, Messages.getString("SystemTapOptionsTab.ProbeFunction"), null); //$NON-NLS-1$
- probeFunctionButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- arguments.setText(arguments.getText() + " process(\"" + binaryFile.getText() + "\").function(\"\")"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- });
- }
-
- protected void createFileOption(Composite top) {
- Composite browseTop = new Composite(top, SWT.NONE);
- browseTop.setLayout(new GridLayout(4, false));
- browseTop.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Label suppFileLabel = new Label(browseTop, SWT.NONE);
- suppFileLabel.setText(Messages.getString("SystemTapOptionsTab.ScriptSelector")); //$NON-NLS-1$
-
- scriptFile = new Text(browseTop, SWT.BORDER);
- scriptFile.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- scriptFile.addModifyListener(modifyListener);
-
- workspaceBrowseButton = createPushButton(browseTop, Messages.getString("SystemTapOptionsTab.WorkspaceButton"), null); //$NON-NLS-1$
- workspaceBrowseButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
- dialog.setTitle(Messages.getString("SystemTapOptionsTab.ResourceButton")); //$NON-NLS-1$
- dialog.setMessage(Messages.getString("SystemTapOptionsTab.SuppresionsFile")); //$NON-NLS-1$
- dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
- dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
- if (dialog.open() == IDialogConstants.OK_ID) {
- IResource resource = (IResource) dialog.getFirstResult();
- String arg = resource.getFullPath().toString();
- scriptFile.setText(workspacePath + arg);
- }
- }
- });
-
- fileBrowseButton = createPushButton(browseTop, Messages.getString("SystemTapOptionsTab.FileSystem"), null); //$NON-NLS-1$
- fileBrowseButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- String filePath = scriptFile.getText();
- FileDialog dialog = new FileDialog(getShell(), SWT.SAVE);
- filePath = dialog.open();
- if (filePath != null) {
- scriptFile.setText(filePath);
- }
- }
- });
-
-
- Label binaryFileLabel = new Label(browseTop, SWT.NONE);
- binaryFileLabel.setText(Messages.getString("SystemTapOptionsTab.SelectBinary")); //$NON-NLS-1$
-
- binaryFile = new Text(browseTop, SWT.BORDER);
- binaryFile.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- binaryFile.addModifyListener(modifyListener);
-
-
- Button workspaceBrowseButton2 = createPushButton(browseTop, Messages.getString("SystemTapOptionsTab.WorkspaceButton2"), null); //$NON-NLS-1$
- workspaceBrowseButton2.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
- dialog.setTitle(Messages.getString("SystemTapOptionsTab.SelectResource")); //$NON-NLS-1$
- dialog.setMessage(Messages.getString("SystemTapOptionsTab.SelectSuppressions")); //$NON-NLS-1$
- dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
- dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
- if (dialog.open() == IDialogConstants.OK_ID) {
- IResource resource = (IResource) dialog.getFirstResult();
- String arg = resource.getFullPath().toString();
- binaryFile.setText(workspacePath + arg);
- }
- }
- });
-
-
- Button fileBrowseButton2 = createPushButton(browseTop, Messages.getString("SystemTapOptionsTab.BrowseFiles"), null); //$NON-NLS-1$
- fileBrowseButton2.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- String filePath = binaryFile.getText();
- FileDialog dialog = new FileDialog(getShell(), SWT.SAVE);
- filePath = dialog.open();
- if (filePath != null) {
- File file = new File(filePath);
- if (file.exists()) binaryFile.setText(filePath);
- }
- }
- });
-
-
- Label outputFileLabel = new Label(browseTop, SWT.NONE);
- outputFileLabel.setText(Messages.getString("SystemTapOptionsTab.SelectOutput")); //$NON-NLS-1$
-
- outputFile = new Text(browseTop, SWT.BORDER);
- outputFile.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- outputFile.addModifyListener(modifyListenerOutput);
- outputFile.addFocusListener(focusListener);
-
- Button workspaceBrowseButton3 = createPushButton(browseTop, Messages.getString("SystemTapOptionsTab.WorkspaceButton2"), null); //$NON-NLS-1$
- workspaceBrowseButton3.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
- dialog.setTitle(Messages.getString("SystemTapOptionsTab.SelectResource")); //$NON-NLS-1$
- dialog.setMessage(Messages.getString("SystemTapOptionsTab.SelectSuppressions")); //$NON-NLS-1$
- dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
- dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
- if (dialog.open() == IDialogConstants.OK_ID) {
- IResource resource = (IResource) dialog.getFirstResult();
- String arg = resource.getFullPath().toString();
- outputFile.setText(workspacePath + arg);
- checkOverwrite();
- updateLaunchConfigurationDialog();
-
- }
- }
- });
-
- Button fileBrowseButton3 = createPushButton(browseTop, Messages.getString("SystemTapOptionsTab.BrowseFiles"), null); //$NON-NLS-1$
- fileBrowseButton3.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- String filePath = outputFile.getText();
- FileDialog dialog = new FileDialog(getShell(), SWT.SAVE);
- filePath = dialog.open();
- if (filePath != null) {
- outputFile.setText(filePath);
- checkOverwrite();
- updateLaunchConfigurationDialog();
- }
- }
- });
-
- useColourButton = new Button(browseTop, SWT.CHECK);
- useColourButton.setText(Messages.getString("SystemTapOptionsTab.ColourCodes")); //$NON-NLS-1$
- useColourButton.addSelectionListener(selectListener);
- useColourButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-// generateScriptButton = new Button(browseTop, SWT.PUSH);
-// generateScriptButton.setText("Command");
-// generateScriptButton.addSelectionListener(new SelectionListener() {
-//
-// @Override
-// public void widgetDefaultSelected(SelectionEvent e) {
-// }
-//
-// @Override
-// public void widgetSelected(SelectionEvent e) {
-// SystemTapCommandGenerator gen = new SystemTapCommandGenerator();
-// gen.generateCommand(scrPath, binPath, cmds, needBinary, needsArgs, arg, useColour)
-//
-// }
-//
-// });
-//
- }
-
-
-
- protected void createCommandOption(Composite top) {
- Composite browseTop = new Composite(top, SWT.NONE);
- browseTop.setLayout(new GridLayout(3, false));
- GridData browseData = new GridData(GridData.FILL_HORIZONTAL);
- browseTop.setLayoutData(browseData);
-
-// Label suppFileLabel = new Label(browseTop, SWT.NONE);
-// suppFileLabel.setText(Messages.getString("SystemTapOptionsTab.CommandsLabel1") + //$NON-NLS-1$
-// Messages.getString("SystemTapOptionsTab.CommandsLabel2")); //$NON-NLS-1$
-//
-// commandFile = new Text(browseTop, SWT.BORDER);
-// commandFile.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-// commandFile.addModifyListener(modifyListener);
-//
-
- Composite buttonsTop = new Composite(top, SWT.NONE);
- GridLayout gl = new GridLayout(2, false);
- gl.horizontalSpacing = PluginConstants.SYSTEMTAP_OPTIONS_TAB_HORIZONTAL_SPACING;
- buttonsTop.setLayout( gl );
- GridData buttonsData = new GridData(SWT.CENTER, SWT.BEGINNING, true, true);
- buttonsData.heightHint = 400;
- buttonsTop.setLayoutData(buttonsData);
-
-
- button_v = new Button(buttonsTop, SWT.CHECK);
- button_v.setText(Messages.getString("SystemTapOptionsTab.18")); //$NON-NLS-1$
- button_v.addSelectionListener(selectListener);
- button_v.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- button_v.setToolTipText(Messages.getString("SystemTapOptionsTab.2") + //$NON-NLS-1$
- Messages.getString("SystemTapOptionsTab.4")); //$NON-NLS-1$
-
- button_k = new Button(buttonsTop, SWT.CHECK);
- button_k.setText(Messages.getString("SystemTapOptionsTab.20")); //$NON-NLS-1$
- button_k.addSelectionListener(selectListener);
- button_k.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- button_k.setToolTipText(
- Messages.getString("SystemTapOptionsTab.5") + //$NON-NLS-1$
- Messages.getString("SystemTapOptionsTab.6") + //$NON-NLS-1$
- Messages.getString("SystemTapOptionsTab.7")); //$NON-NLS-1$
-
-
- button_g = new Button(buttonsTop, SWT.CHECK);
- button_g.setText(Messages.getString("SystemTapOptionsTab.21")); //$NON-NLS-1$
- button_g.addSelectionListener(selectListener);
- button_g.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- button_g.setToolTipText(
- Messages.getString("SystemTapOptionsTab.8") + //$NON-NLS-1$
- Messages.getString("SystemTapOptionsTab.9")); //$NON-NLS-1$
-
- button_P = new Button(buttonsTop, SWT.CHECK);
- button_P.setText(Messages.getString("SystemTapOptionsTab.22")); //$NON-NLS-1$
- button_P.addSelectionListener(selectListener);
- button_P.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- button_P.setToolTipText(
- Messages.getString("SystemTapOptionsTab.10") + //$NON-NLS-1$
- Messages.getString("SystemTapOptionsTab.11")); //$NON-NLS-1$
-
- button_u = new Button(buttonsTop, SWT.CHECK);
- button_u.setText(Messages.getString("SystemTapOptionsTab.23")); //$NON-NLS-1$
- button_u.addSelectionListener(selectListener);
- button_u.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- button_u.setToolTipText(
- Messages.getString("SystemTapOptionsTab.12")); //$NON-NLS-1$
-
- button_w = new Button(buttonsTop, SWT.CHECK);
- button_w.setText(Messages.getString("SystemTapOptionsTab.24")); //$NON-NLS-1$
- button_w.addSelectionListener(selectListener);
- button_w.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- button_w.setToolTipText(
- Messages.getString("SystemTapOptionsTab.13")+ //$NON-NLS-1$
- Messages.getString("SystemTapOptionsTab.14")); //$NON-NLS-1$
-
- button_b = new Button(buttonsTop, SWT.CHECK);
- button_b.setText(Messages.getString("SystemTapOptionsTab.25")); //$NON-NLS-1$
- button_b.addSelectionListener(selectListener);
- button_b.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- button_b.setToolTipText(
- Messages.getString("SystemTapOptionsTab.15")); //$NON-NLS-1$
-
- button_t = new Button(buttonsTop, SWT.CHECK);
- button_t.setText(Messages.getString("SystemTapOptionsTab.26")); //$NON-NLS-1$
- button_t.addSelectionListener(selectListener);
- button_t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- button_t.setToolTipText(
- Messages.getString("SystemTapOptionsTab.16") + //$NON-NLS-1$
- Messages.getString("SystemTapOptionsTab.17")); //$NON-NLS-1$
-
- button_F = new Button(buttonsTop, SWT.CHECK);
- button_F.setText(Messages.getString("SystemTapOptionsTab.LeaveProbesRunning")); //$NON-NLS-1$
- button_F.addSelectionListener(selectListener);
- button_F.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- button_F.setToolTipText(
- Messages.getString("SystemTapOptionsTab.27") + //$NON-NLS-1$
- Messages.getString("SystemTapOptionsTab.28") + //$NON-NLS-1$
- Messages.getString("SystemTapOptionsTab.29")); //$NON-NLS-1$
-
- button_skip_badvars = new Button(buttonsTop, SWT.CHECK);
- button_skip_badvars.setText(Messages.getString("SystemTapOptionsTab.IgnoreBadVars")); //$NON-NLS-1$
- button_skip_badvars.addSelectionListener(selectListener);
- button_skip_badvars.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- button_skip_badvars.setToolTipText(
- Messages.getString("SystemTapOptionsTab.30")); //$NON-NLS-1$
-
- button_ignore_dwarf = new Button(buttonsTop, SWT.CHECK);
- button_ignore_dwarf.setText(Messages.getString("SystemTapOptionsTab.ForTesting")); //$NON-NLS-1$
- button_ignore_dwarf.addSelectionListener(selectListener);
- button_ignore_dwarf.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- button_ignore_dwarf.setToolTipText(
- Messages.getString("SystemTapOptionsTab.31") + //$NON-NLS-1$
- Messages.getString("SystemTapOptionsTab.32")); //$NON-NLS-1$
-
- button_q = new Button(buttonsTop, SWT.CHECK);
- button_q.setText(Messages.getString("SystemTapOptionsTab.Button_qInfo")); //$NON-NLS-1$
- button_q.addSelectionListener(selectListener);
- button_q.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- button_q.setToolTipText(Messages.getString("SystemTapOptionsTab.33")); //$NON-NLS-1$
-
- Composite button_p_Spinner_Top = new Composite(buttonsTop, SWT.NONE);
- button_p_Spinner_Top.setLayout(new GridLayout(3, false));
- Label button_p_Spinner_Label = new Label(button_p_Spinner_Top, SWT.NONE);
- button_p_Spinner_Label.setText(Messages.getString("SystemTapOptionsTab.19")); //$NON-NLS-1$
- button_p_Spinner = new Spinner(button_p_Spinner_Top, SWT.BORDER);
- button_p_Spinner.setMaximum(Integer.MAX_VALUE);
- button_p_Spinner.addModifyListener(modifyListener);
- button_p_Spinner.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- button_p_Spinner_Label.setToolTipText(
- Messages.getString("SystemTapOptionsTab.34") + //$NON-NLS-1$
- Messages.getString("SystemTapOptionsTab.35") + //$NON-NLS-1$
- Messages.getString("SystemTapOptionsTab.36")); //$NON-NLS-1$
-
- Composite button_s_Spinner_Top = new Composite(buttonsTop, SWT.NONE);
- button_s_Spinner_Top.setLayout(new GridLayout(2, false));
- Label button_s_Spinner_Label = new Label(button_s_Spinner_Top, SWT.NONE);
- button_s_Spinner_Label.setText(Messages.getString("SystemTapOptionsTab.BufferWith")); //$NON-NLS-1$
- button_s_Spinner = new Spinner(button_s_Spinner_Top, SWT.BORDER);
- button_s_Spinner.setMaximum(Integer.MAX_VALUE);
- button_s_Spinner.addModifyListener(modifyListener);
- button_s_Spinner.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- button_s_Spinner_Label.setToolTipText(
- Messages.getString("SystemTapOptionsTab.37") + //$NON-NLS-1$
- Messages.getString("SystemTapOptionsTab.38")); //$NON-NLS-1$
-
- Composite button_x_Spinner_Top = new Composite(buttonsTop, SWT.NONE);
- button_x_Spinner_Top.setLayout(new GridLayout(2, false));
- Label button_x_Spinner_Label = new Label(button_x_Spinner_Top, SWT.NONE);
- button_x_Spinner_Label.setText(Messages.getString("SystemTapOptionsTab.TargetPID")); //$NON-NLS-1$
- button_x_Spinner = new Spinner(button_x_Spinner_Top, SWT.BORDER);
- button_x_Spinner.setMaximum(Integer.MAX_VALUE);
- button_x_Spinner.addModifyListener(modifyListener);
- button_x_Spinner.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- button_x_Spinner_Label.setToolTipText(
- Messages.getString("SystemTapOptionsTab.39") + //$NON-NLS-1$
- Messages.getString("SystemTapOptionsTab.40")); //$NON-NLS-1$
-
- button_graphicsMode = new Button(buttonsTop, SWT.CHECK);
- button_graphicsMode.setText(Messages.getString("SystemTapOptionsTab.3")); //$NON-NLS-1$
- button_graphicsMode.addSelectionListener(graphicsModeListener);
- button_graphicsMode.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- button_graphicsMode.setToolTipText(
- Messages.getString("SystemTapOptionsTab.41")); //$NON-NLS-1$
-
- Label button_D_label = new Label(buttonsTop, SWT.NONE);
- button_D_label.setText(Messages.getString("SystemTapOptionsTab.PreprocessorDirective")); //$NON-NLS-1$
- button_D_text = new Text(buttonsTop, SWT.BORDER);
- button_D_text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- button_D_text.addModifyListener(modifyListener);
- button_D_label.setToolTipText(
- Messages.getString("SystemTapOptionsTab.42") + //$NON-NLS-1$
- Messages.getString("SystemTapOptionsTab.43")); //$NON-NLS-1$
-
-
-
- }
-
-
- @Override
- public String getName() {
- return Messages.getString("SystemTapOptionsTab.MainTabName"); //$NON-NLS-1$
- }
-
- @Override
- public void initializeFrom(ILaunchConfiguration configuration) {
-
-
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- IWorkspaceRoot root = workspace.getRoot();
- IPath location = root.getLocation();
- workspacePath = location.toString();
-
- try {
- button_v.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_VERBOSE, LaunchConfigurationConstants.DEFAULT_COMMAND_VERBOSE));
- button_k.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_KEEP_TEMPORARY, LaunchConfigurationConstants.DEFAULT_COMMAND_KEEP_TEMPORARY));
- button_u.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_NO_CODE_ELISION, LaunchConfigurationConstants.DEFAULT_COMMAND_NO_CODE_ELISION));
- button_w.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_DISABLE_WARNINGS, LaunchConfigurationConstants.DEFAULT_COMMAND_DISABLE_WARNINGS));
- button_b.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_BULK_MODE, LaunchConfigurationConstants.DEFAULT_COMMAND_BULK_MODE));
- button_g.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_GURU, LaunchConfigurationConstants.DEFAULT_COMMAND_GURU));
- button_P.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_PROLOGUE_SEARCH, LaunchConfigurationConstants.DEFAULT_COMMAND_PROLOGUE_SEARCH));
- button_t.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_TIMING_INFO, LaunchConfigurationConstants.DEFAULT_COMMAND_TIMING_INFO));
- button_skip_badvars.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_SKIP_BADVARS, LaunchConfigurationConstants.DEFAULT_COMMAND_SKIP_BADVARS));
- button_ignore_dwarf.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_IGNORE_DWARF, LaunchConfigurationConstants.DEFAULT_COMMAND_IGNORE_DWARF));
- button_q.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_TAPSET_COVERAGE, LaunchConfigurationConstants.DEFAULT_COMMAND_TAPSET_COVERAGE));
- button_F.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_LEAVE_RUNNING, LaunchConfigurationConstants.DEFAULT_COMMAND_LEAVE_RUNNING));
- button_s_Spinner.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_BUFFER_BYTES, LaunchConfigurationConstants.DEFAULT_COMMAND_BUFFER_BYTES));
- button_x_Spinner.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_TARGET_PID, LaunchConfigurationConstants.DEFAULT_COMMAND_TARGET_PID));
- button_p_Spinner.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_PASS, LaunchConfigurationConstants.DEFAULT_COMMAND_PASS));
-
- button_D_text.setText(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_C_DIRECTIVES, LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES));
- binaryFile.setText(configuration.getAttribute(LaunchConfigurationConstants.BINARY_PATH, LaunchConfigurationConstants.DEFAULT_BINARY_PATH));
- scriptFile.setText(configuration.getAttribute(LaunchConfigurationConstants.SCRIPT_PATH, LaunchConfigurationConstants.DEFAULT_SCRIPT_PATH));
- outputFile.setText(configuration.getAttribute(LaunchConfigurationConstants.OUTPUT_PATH, LaunchConfigurationConstants.DEFAULT_OUTPUT_PATH));
- arguments.setText(configuration.getAttribute(LaunchConfigurationConstants.ARGUMENTS, LaunchConfigurationConstants.DEFAULT_ARGUMENTS));
- binaryArguments.setText(configuration.getAttribute(LaunchConfigurationConstants.BINARY_ARGUMENTS, LaunchConfigurationConstants.DEFAULT_BINARY_ARGUMENTS));
-
- parser.setText(configuration.getAttribute(LaunchConfigurationConstants.PARSER_CLASS, LaunchConfigurationConstants.DEFAULT_PARSER_CLASS));
-
- if (generatedScript != null){
- generatedScript.setText(configuration.getAttribute(LaunchConfigurationConstants.GENERATED_SCRIPT, LaunchConfigurationConstants.DEFAULT_GENERATED_SCRIPT));
- needToGenerateScriptButton.setSelection(configuration.getAttribute(LaunchConfigurationConstants.NEED_TO_GENERATE, LaunchConfigurationConstants.DEFAULT_NEED_TO_GENERATE));
- }
- useColourButton.setSelection(configuration.getAttribute(LaunchConfigurationConstants.USE_COLOUR, LaunchConfigurationConstants.DEFAULT_USE_COLOUR));
-
-// commandFile.setText(ConfigurationOptionsSetter.setOptions(configuration));
-
- } catch (CoreException e) {
- e.printStackTrace();
- }
-
-
- }
-
- @Override
- public void performApply(ILaunchConfigurationWorkingCopy configuration) {
-
- getControl().setRedraw(false);
-
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_VERBOSE, button_v.getSelection());
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_KEEP_TEMPORARY, button_k.getSelection());
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_GURU, button_g.getSelection());
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_PROLOGUE_SEARCH, button_P.getSelection());
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_NO_CODE_ELISION, button_u.getSelection());
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_DISABLE_WARNINGS, button_w.getSelection());
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_BULK_MODE, button_b.getSelection());
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_TIMING_INFO, button_t.getSelection());
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_SKIP_BADVARS, button_skip_badvars.getSelection());
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_IGNORE_DWARF, button_ignore_dwarf.getSelection());
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_TAPSET_COVERAGE, button_q.getSelection());
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_LEAVE_RUNNING, button_F.getSelection());
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_PASS, button_p_Spinner.getSelection());
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_BUFFER_BYTES, button_s_Spinner.getSelection());
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_TARGET_PID, button_x_Spinner.getSelection());
-
- configuration.setAttribute(LaunchConfigurationConstants.PARSER_CLASS, parser.getText());
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_C_DIRECTIVES, button_D_text.getText());
- configuration.setAttribute(LaunchConfigurationConstants.BINARY_PATH, binaryFile.getText());
- configuration.setAttribute(LaunchConfigurationConstants.SCRIPT_PATH, scriptFile.getText());
- configuration.setAttribute(LaunchConfigurationConstants.ARGUMENTS, arguments.getText());
- configuration.setAttribute(LaunchConfigurationConstants.BINARY_ARGUMENTS, binaryArguments.getText());
- configuration.setAttribute(LaunchConfigurationConstants.OUTPUT_PATH, outputFile.getText());
-// configuration.setAttribute(LaunchConfigurationConstants.COMMAND_LIST, commandFile.getText());
-
- if (generatedScript != null){
- configuration.setAttribute(LaunchConfigurationConstants.GENERATED_SCRIPT, generatedScript.getText());
- configuration.setAttribute(LaunchConfigurationConstants.NEED_TO_GENERATE, needToGenerateScriptButton.getSelection());
- }
-
- configuration.setAttribute(LaunchConfigurationConstants.USE_COLOUR, useColourButton.getSelection());
-
- if (button_graphicsMode.getSelection()){
- scriptFile.setEnabled(false);
- workspaceBrowseButton.setEnabled(false);
- fileBrowseButton.setEnabled(false);
-
- }else{
- scriptFile.setEnabled(true);
- workspaceBrowseButton.setEnabled(true);
- fileBrowseButton.setEnabled(true);
- }
-
- if (changeOverwrite) {
- if (needsOverwritePermission && overwritePermission || !needsOverwritePermission) {
- configuration.setAttribute(LaunchConfigurationConstants.OVERWRITE, true);
- }
- else {
- configuration.setAttribute(LaunchConfigurationConstants.OVERWRITE, false);
- }
- changeOverwrite = false;
- }
-
- getControl().setRedraw(true);
- }
-
- @Override
- public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_VERBOSE,LaunchConfigurationConstants.DEFAULT_COMMAND_VERBOSE);
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_KEEP_TEMPORARY,LaunchConfigurationConstants.DEFAULT_COMMAND_KEEP_TEMPORARY);
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_GURU,LaunchConfigurationConstants.DEFAULT_COMMAND_GURU);
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_PROLOGUE_SEARCH,LaunchConfigurationConstants.DEFAULT_COMMAND_PROLOGUE_SEARCH);
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_NO_CODE_ELISION,LaunchConfigurationConstants.DEFAULT_COMMAND_NO_CODE_ELISION);
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_DISABLE_WARNINGS,LaunchConfigurationConstants.DEFAULT_COMMAND_DISABLE_WARNINGS);
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_BULK_MODE,LaunchConfigurationConstants.DEFAULT_COMMAND_BULK_MODE);
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_TIMING_INFO,LaunchConfigurationConstants.DEFAULT_COMMAND_TIMING_INFO);
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_SKIP_BADVARS,LaunchConfigurationConstants.DEFAULT_COMMAND_SKIP_BADVARS);
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_IGNORE_DWARF,LaunchConfigurationConstants.DEFAULT_COMMAND_IGNORE_DWARF);
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_TAPSET_COVERAGE,LaunchConfigurationConstants.DEFAULT_COMMAND_TAPSET_COVERAGE);
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_LEAVE_RUNNING,LaunchConfigurationConstants.DEFAULT_COMMAND_LEAVE_RUNNING);
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_PASS,LaunchConfigurationConstants.DEFAULT_COMMAND_PASS);
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_BUFFER_BYTES,LaunchConfigurationConstants.DEFAULT_COMMAND_BUFFER_BYTES);
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_TARGET_PID,LaunchConfigurationConstants.DEFAULT_COMMAND_TARGET_PID);
-
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_C_DIRECTIVES,LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES);
- configuration.setAttribute(LaunchConfigurationConstants.BINARY_PATH,LaunchConfigurationConstants.DEFAULT_BINARY_PATH);
- configuration.setAttribute(LaunchConfigurationConstants.SCRIPT_PATH,LaunchConfigurationConstants.DEFAULT_SCRIPT_PATH);
- configuration.setAttribute(LaunchConfigurationConstants.OUTPUT_PATH,LaunchConfigurationConstants.DEFAULT_OUTPUT_PATH);
- configuration.setAttribute(LaunchConfigurationConstants.ARGUMENTS,LaunchConfigurationConstants.DEFAULT_ARGUMENTS);
- configuration.setAttribute(LaunchConfigurationConstants.BINARY_ARGUMENTS,LaunchConfigurationConstants.DEFAULT_BINARY_ARGUMENTS);
-
- configuration.setAttribute(LaunchConfigurationConstants.GENERATED_SCRIPT, LaunchConfigurationConstants.DEFAULT_GENERATED_SCRIPT);
- configuration.setAttribute(LaunchConfigurationConstants.NEED_TO_GENERATE, LaunchConfigurationConstants.DEFAULT_NEED_TO_GENERATE);
- configuration.setAttribute(LaunchConfigurationConstants.PARSER_CLASS, LaunchConfigurationConstants.DEFAULT_PARSER_CLASS);
-
-
- configuration.setAttribute(LaunchConfigurationConstants.USE_COLOUR, LaunchConfigurationConstants.DEFAULT_USE_COLOUR);
-
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_LIST, ConfigurationOptionsSetter.setOptions(configuration));
-
- }
-
-
- @Override
- public boolean isValid(ILaunchConfiguration launchConfig) {
- // Check that the major options are sane
- boolean valid = true;
-
-// try {
-// if (!launchConfig.getAttribute(LaunchConfigurationConstants.OVERWRITE, LaunchConfigurationConstants.DEFAULT_OVERWRITE)) {
-// valid = false;
-// }
-// } catch (CoreException e1) {
-// e1.printStackTrace();
-// }
-//
-//
- try {
- String sPath = launchConfig.getAttribute(
- LaunchConfigurationConstants.SCRIPT_PATH,
- LaunchConfigurationConstants.DEFAULT_SCRIPT_PATH);
-
- File script = new File(sPath);
-
- if (sPath.equals(LaunchConfigurationConstants.DEFAULT_SCRIPT_PATH) || !script.exists()) {
- //No script path specified or no such script exists
- valid = false;
- }
-
- } catch (CoreException e) {
- e.printStackTrace();
- }
-
- return valid;
- }
-
- private String getUsefulLabel(Object element) {
- if (element instanceof IConfigurationElement) {
- Object o = ((IConfigurationElement) element).getParent();
- if (o instanceof IExtension) {
- IExtension e = (IExtension) ((IConfigurationElement) element).getParent();
- return e.getUniqueIdentifier();
- }
- }
- return "Invalid";
-
- }
-
- private class ListLabelProvider implements ILabelProvider {
-
- @Override
- public Image getImage(Object element) {
- return null;
- }
-
- @Override
- public String getText(Object element) {
- if (element instanceof IConfigurationElement) {
- Object o = ((IConfigurationElement) element).getParent();
- if (o instanceof IExtension) {
- IExtension e = (IExtension) ((IConfigurationElement) element).getParent();
- return e.getLabel();
- }
- else if (o instanceof IConfigurationElement) {
- IConfigurationElement e = (IConfigurationElement) ((IConfigurationElement) element).getParent();
- return e.getName();
- }
-
- }
- return "No name -- set name attribute of extension"; }
-
- @Override
- public void addListener(ILabelProviderListener listener) {
-
- }
-
- @Override
- public void dispose() {
- }
-
- @Override
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- @Override
- public void removeListener(ILabelProviderListener listener) {
- }
-
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/TranslationUnitVisitor.java b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/TranslationUnitVisitor.java
deleted file mode 100644
index 1914439a4d..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/TranslationUnitVisitor.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat - initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.systemtap.local.launch;
-
-import org.eclipse.cdt.core.model.ICElement;
-import org.eclipse.cdt.core.model.ICElementVisitor;
-import org.eclipse.core.runtime.CoreException;
-
-public class TranslationUnitVisitor implements ICElementVisitor{
- private String functions;
-
- public TranslationUnitVisitor() {
- super();
- functions = ""; //$NON-NLS-1$
- }
- private long time;
- @Override
- public boolean visit(ICElement arg0) throws CoreException {
- if (arg0.getElementType() == ICElement.C_FUNCTION) {
- functions+=arg0.getElementName() + " "; //$NON-NLS-1$
- return false;
- }
- return true;
- }
-
-
- public String getFunctions() {
- return functions;
- }
-
- public int getNumberOfFunctions() {
- return (functions.split(" ").length); //$NON-NLS-1$
- }
-
-
- public double getTime() {
- return time;
- }
-
-}
-
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/messages.properties b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/messages.properties
deleted file mode 100644
index ad349f92f5..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/src/org/eclipse/linuxtools/systemtap/local/launch/messages.properties
+++ /dev/null
@@ -1,135 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Red Hat - initial API and implementation
-###############################################################################
-LaunchAbout.0=About SystemTap Eclipse plugin
-LaunchAbout.11=Function callgraph: Produces a graph of all function calls. You can also mark functions by
-LaunchAbout.12=\ pressing CTRL+4 while in the editor. (Warning: Marking functions currently annotates your code
-LaunchAbout.13=\ by adding calls to a ___STAP_MARKER___ function.)\n\n
-LaunchAbout.17=Launch Wizard: Helper for launching SystemTap scripts.\n\n
-LaunchAbout.2=-------------SystemTap Eclipse Plugin---------\n
-LaunchAbout.20=Thank you for trying the SystemTap Eclipse plugin - if you have any comments or
-LaunchAbout.21=suggestions, please feel free to direct them to the e-mails above\!
-LaunchAbout.3=/*********************************************\n
-LaunchAbout.4=* Comments and concerns:\n
-LaunchAbout.5=* Charley Wang (chwang@redhat.com)\t\t\n
-LaunchAbout.6=* Roland Grunberg (rgrunber@redhat.com) \n
-LaunchAbout.7=*********************************************/\n\n
-LaunchAbout.8=Available pre-bundled scripts:\n\n
-LaunchStapGraph.0=Error generating script
-LaunchStapGraph.6=The path to the temporary script could not be opened.
-LaunchWizard.0=Welcome to SystemTap Wizard
-LaunchWizard.1=The SystemTap Wizard will guide you through the process of launching a
-LaunchWizard.2=script through Eclipse. \n\nFirst, please name your new launch configuration.
-LaunchWizard.20=Binary file:
-LaunchWizard.21=Arguments:
-LaunchWizard.22=Function
-LaunchWizard.23=Wizard Opener
-LaunchWizard.24=Launch
-LaunchWizard.3=If the name already exists, a (1), (2), etc. will be appended to make the name unique.\n
-LaunchWizard.4=MyWizardLaunch
-LaunchWizard.19=Script:
-RunSystemTapAction.0=System Tap Command Executing...
-SystemTapLaunchConfigurationDelegate.0=SystemTapLaunchConfigurationDelegate does not have a command yet
-SystemTapLaunchConfigurationDelegate.DocWriterMessage1=Configuration name:
-SystemTapLaunchConfigurationDelegate.DocWriterMessage2=Binary arguments :
-SystemTapLaunchConfigurationDelegate.DocWriterMessage3=To change this command, check under the Binary
-SystemTapLaunchConfigurationDelegate.DocWriterMessage4=Arguments tab for this configuration in
-SystemTapLaunchConfigurationDelegate.DocWriterMessage5=Profile As --> Profile Configurations.
-SystemTapLaunchConfigurationDelegate.DocWriterName=DocWriter, Delegate
-SystemTapLaunchConfigurationDelegate.DocWriterNoBinarySpecified=No binary commands specified. To specify commands, check under the Binary Arguments tab for this configuration in Profile As --> Profile Configurations.
-SystemTapLaunchConfigurationDelegate.NullProcessErrorMessage1=SystemTap could not execute. This could be due to missing
-SystemTapLaunchConfigurationDelegate.NullProcessErrorMessage2=packages that are necessary to the running of SystemTap
-SystemTapLaunchConfigurationDelegate.NullProcessErrorName=Error
-SystemTapLaunchConfigurationDelegate.NullProcessErrorTitle=SystemTap Error
-SystemTapLaunchConfigurationDelegate.stap_command=\ stap command:
-SystemTapLaunchShortcut.0=invalid
-SystemTapLaunchShortcut.10=No files found.
-SystemTapLaunchShortcut.8=Select files to probe
-SystemTapLaunchShortcut.9=For faster probing, select all files.
-SystemTapLaunchShortcut.ErrorMessage=Error: Script path not given by :
-SystemTapLaunchShortcut.ErrorMessagename=Error
-SystemTapLaunchShortcut.ErrorMessageName=Error
-SystemTapLaunchShortcut.ErrorMessageTitle=Script not found
-SystemTapLaunchShortcut.StapLaunchFailed=FailedToLaunch
-SystemTapLaunchShortcut.StapLaunchFailedMessage=The launch failed. This could be because of :
-SystemTapLaunchShortcut.StapLaunchFailedTitle=Launch failed
-SystemTapOptionsTab.10=Prologue-searching mode. Activate heuristics to work around
-SystemTapOptionsTab.11=incorrect debugging information for $target variables.
-SystemTapOptionsTab.12=Unoptimized mode. Disable unused code elision during elaboration.
-SystemTapOptionsTab.13=Suppressed warnings mode. Disable warning messages for elided
-SystemTapOptionsTab.14=code in user script.
-SystemTapOptionsTab.15=\ Use bulk mode (percpu files) for kernel-to-user data transfer.
-SystemTapOptionsTab.16=Collect timing information on the number of times probe executes
-SystemTapOptionsTab.17=and average amount of time spent in each probe.
-SystemTapOptionsTab.18=-v: Enable verbose mode
-SystemTapOptionsTab.19=Stop after pass \#
-SystemTapOptionsTab.2=Increase verbosity for all passes. Produce a larger volume of
-SystemTapOptionsTab.20=-k: Keep temporary directories
-SystemTapOptionsTab.21=-g: Guru mode (Experts only!)
-SystemTapOptionsTab.22=-P: Enable prologue-search mode
-SystemTapOptionsTab.23=-u: Disable unused code elision
-SystemTapOptionsTab.24=-w: Disable warnings
-SystemTapOptionsTab.25=-b: Use bulk mode
-SystemTapOptionsTab.26=-t: Collect timing information
-SystemTapOptionsTab.27=Without -o option, load module and start probes, then detach
-SystemTapOptionsTab.28=from the module leaving the probes running. With -o option, run
-SystemTapOptionsTab.29=staprun in background as a daemon and show its pid.
-SystemTapOptionsTab.3=Enable Graphics Mode
-SystemTapOptionsTab.30=Ignore out of context variables and substitute with literal 0.
-SystemTapOptionsTab.31=For testing, act as though vmlinux and modules lack debugging
-SystemTapOptionsTab.32=information.
-SystemTapOptionsTab.33=Generate information on tapset coverage
-SystemTapOptionsTab.34=Stop after specified pass. The passes are numbered 1-5: parse, elaborate
-SystemTapOptionsTab.35=, translate,\t compile, run.\tSee the PROCESSING section for
-SystemTapOptionsTab.36=details.
-SystemTapOptionsTab.37=Use NUM megabyte buffers for kernel-to-user data transfer. On a
-SystemTapOptionsTab.38=multiprocessor in bulk mode, this is a per-processor amount.
-SystemTapOptionsTab.39=Sets target() to PID. This allows scripts\t to be\t written that
-SystemTapOptionsTab.4=\ informative (?) output each time option repeated.
-SystemTapOptionsTab.40=filter on a specific process.
-SystemTapOptionsTab.41=Graph the output. Enable only if using a generated StapGraph script.
-SystemTapOptionsTab.42=Add the given C preprocessor directive to the module Makefile.
-SystemTapOptionsTab.43=These can be used to override limit parameters.
-SystemTapOptionsTab.44=Binary Arguments
-SystemTapOptionsTab.45=Please input the desired arguments, separated by spaces to be given to your binary.
-SystemTapOptionsTab.5=Keep the temporary directory after all processing. This may be
-SystemTapOptionsTab.6=useful in order to examine the generated C code, or to reuse the
-SystemTapOptionsTab.7=compiled kernel object.
-SystemTapOptionsTab.8=Guru mode. Enable parsing of unsafe expert-level constructs
-SystemTapOptionsTab.9=like embedded C.
-SystemTapOptionsTab.IgnoreBadVars=--skip-badvars: Ignore out of context vars
-SystemTapOptionsTab.ForTesting=--ignore-dwarf: Ignore debug info
-SystemTapOptionsTab.Arguments=Arguments
-SystemTapOptionsTab.BrowseFiles=Browse File System
-SystemTapOptionsTab.BufferWith=Buffer with \# bytes:
-SystemTapOptionsTab.Button_qInfo=-q : tapset coverage info
-SystemTapOptionsTab.ColourCodes=Use colour-codes
-SystemTapOptionsTab.CommandsTab=SystemTap options
-SystemTapOptionsTab.ConfirmOverwriteFileMessage=Selected file exists - overwrite selected file during Profile?
-SystemTapOptionsTab.ConfirmOverwriteFileTitle=Overwrite File?
-SystemTapOptionsTab.FilesTab=Script and Output
-SystemTapOptionsTab.FileSystem=Browse File System
-SystemTapOptionsTab.GeneratedScriptsTitle=Script to be generated
-SystemTapOptionsTab.GenerateScriptButton=Generate script
-SystemTapOptionsTab.LeaveProbesRunning=-F: Leave probes running
-SystemTapOptionsTab.MainTabName=SystemTap Configurations
-SystemTapOptionsTab.PreprocessorDirective=Add C preprocessor directive
-SystemTapOptionsTab.ProbeFunction=Probe function
-SystemTapOptionsTab.ResourceButton=Select a Resource
-SystemTapOptionsTab.ScriptSelector=Select a SystemTap script
-SystemTapOptionsTab.SelectArguments=Enter arguments. Separate with spaces. "Probe Function" will insert a template for probing your program.
-SystemTapOptionsTab.SelectBinary=Select a binary\n(Optional)
-SystemTapOptionsTab.SelectOutput=Select output file\n(Optional)
-SystemTapOptionsTab.SelectResource=Select a Resource
-SystemTapOptionsTab.SelectSuppressions=Select a Suppressions File
-SystemTapOptionsTab.SuppresionsFile=Select a Suppressions File
-SystemTapOptionsTab.TargetPID=Target process pid:
-SystemTapOptionsTab.WorkspaceButton=Browse Workspace
-SystemTapOptionsTab.WorkspaceButton2=Browse Workspace
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/toc.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/toc.xml
deleted file mode 100644
index c96f3fdf48..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/toc.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.toc"?>
- <toc label="My Guide">
- <topic href="tree.htm" label="Tree Selection">
- </topic>
- </toc> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/tree.htm b/systemtap/org.eclipse.linuxtools.systemtap.local.launch/tree.htm
deleted file mode 100644
index 5ab2f8a432..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.launch/tree.htm
+++ /dev/null
@@ -1 +0,0 @@
-Hello \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/.project b/systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/.project
deleted file mode 100644
index 8a9084ce91..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.systemtap.local.tests-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/build.properties
deleted file mode 100644
index 64f93a9f0b..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/build.properties
+++ /dev/null
@@ -1 +0,0 @@
-bin.includes = feature.xml
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/epl-v10.html b/systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/epl-v10.html
deleted file mode 100644
index 9321f4082e..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/epl-v10.html
+++ /dev/null
@@ -1,256 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">where such changes and/or additions to the Program
-originate from and are distributed by that particular Contributor. A
-Contribution 'originates' from a Contributor if it was added to the
-Program by such Contributor itself or anyone acting on such
-Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in
-conjunction with the Program under their own license agreement, and (ii)
-are not derivative works of the Program.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" mean patent claims licensable by a
-Contributor which are necessarily infringed by the use or sale of its
-Contribution alone or when combined with the Program.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to reproduce, prepare derivative works
-of, publicly display, publicly perform, distribute and sublicense the
-Contribution of such Contributor, if any, and such derivative works, in
-source code and object code form.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free patent license under Licensed Patents to make, use, sell,
-offer to sell, import and otherwise transfer the Contribution of such
-Contributor, if any, in source code and object code form. This patent
-license shall apply to the combination of the Contribution and the
-Program if, at the time the Contribution is added by the Contributor,
-such addition of the Contribution causes such combination to be covered
-by the Licensed Patents. The patent license shall not apply to any other
-combinations which include the Contribution. No hardware per se is
-licensed hereunder.</p>
-
-<p class="list">c) Recipient understands that although each Contributor
-grants the licenses to its Contributions set forth herein, no assurances
-are provided by any Contributor that the Program does not infringe the
-patent or other intellectual property rights of any other entity. Each
-Contributor disclaims any liability to Recipient for claims brought by
-any other entity based on infringement of intellectual property rights
-or otherwise. As a condition to exercising the rights and licenses
-granted hereunder, each Recipient hereby assumes sole responsibility to
-secure any other intellectual property rights needed, if any. For
-example, if a third party patent license is required to allow Recipient
-to distribute the Program, it is Recipient's responsibility to acquire
-that license before distributing the Program.</p>
-
-<p class="list">d) Each Contributor represents that to its knowledge it
-has sufficient copyright rights in its Contribution, if any, to grant
-the copyright license set forth in this Agreement.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">i) effectively disclaims on behalf of all Contributors
-all warranties and conditions, express and implied, including warranties
-or conditions of title and non-infringement, and implied warranties or
-conditions of merchantability and fitness for a particular purpose;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">iv) states that source code for the Program is available
-from such Contributor, and informs licensees how to obtain it in a
-reasonable manner on or through a medium customarily used for software
-exchange.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>Each Contributor must identify itself as the originator of its
-Contribution, if any, in a manner that reasonably allows subsequent
-Recipients to identify the originator of the Contribution.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>Commercial distributors of software may accept certain
-responsibilities with respect to end users, business partners and the
-like. While this license is intended to facilitate the commercial use of
-the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create
-potential liability for other Contributors. Therefore, if a Contributor
-includes the Program in a commercial product offering, such Contributor
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-arising from claims, lawsuits and other legal actions brought by a third
-party against the Indemnified Contributor to the extent caused by the
-acts or omissions of such Commercial Contributor in connection with its
-distribution of the Program in a commercial product offering. The
-obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In
-order to qualify, an Indemnified Contributor must: a) promptly notify
-the Commercial Contributor in writing of such claim, and b) allow the
-Commercial Contributor to control, and cooperate with the Commercial
-Contributor in, the defense and any related settlement negotiations. The
-Indemnified Contributor may participate in any such claim at its own
-expense.</p>
-
-<p>For example, a Contributor might include the Program in a commercial
-product offering, Product X. That Contributor is then a Commercial
-Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance
-claims and warranties are such Commercial Contributor's responsibility
-alone. Under this section, the Commercial Contributor would have to
-defend claims against the other Contributors related to those
-performance claims and warranties, and if a court requires any other
-Contributor to pay any damages as a result, the Commercial Contributor
-must pay those damages.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
-OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
-ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
-OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and
-distributing the Program and assumes all risks associated with its
-exercise of rights under this Agreement , including but not limited to
-the risks and costs of program errors, compliance with applicable laws,
-damage to or loss of data, programs or equipment, and unavailability or
-interruption of operations.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
-NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>If any provision of this Agreement is invalid or unenforceable under
-applicable law, it shall not affect the validity or enforceability of
-the remainder of the terms of this Agreement, and without further action
-by the parties hereto, such provision shall be reformed to the minimum
-extent necessary to make such provision valid and enforceable.</p>
-
-<p>If Recipient institutes patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging that the
-Program itself (excluding combinations of the Program with other
-software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the
-date such litigation is filed.</p>
-
-<p>All Recipient's rights under this Agreement shall terminate if it
-fails to comply with any of the material terms or conditions of this
-Agreement and does not cure such failure in a reasonable period of time
-after becoming aware of such noncompliance. If all Recipient's rights
-under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive.</p>
-
-<p>Everyone is permitted to copy and distribute copies of this
-Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The
-Agreement Steward reserves the right to publish new versions (including
-revisions) of this Agreement from time to time. No one other than the
-Agreement Steward has the right to modify this Agreement. The Eclipse
-Foundation is the initial Agreement Steward. The Eclipse Foundation may
-assign the responsibility to serve as the Agreement Steward to a
-suitable separate entity. Each new version of the Agreement will be
-given a distinguishing version number. The Program (including
-Contributions) may always be distributed subject to the version of the
-Agreement under which it was received. In addition, after a new version
-of the Agreement is published, Contributor may elect to distribute the
-Program (including its Contributions) under the new version. Except as
-expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
-rights or licenses to the intellectual property of any Contributor under
-this Agreement, whether expressly, by implication, estoppel or
-otherwise. All rights in the Program not expressly granted under this
-Agreement are reserved.</p>
-
-<p>This Agreement is governed by the laws of the State of New York and
-the intellectual property laws of the United States of America. No party
-to this Agreement will bring a legal action under this Agreement more
-than one year after the cause of action arose. Each party waives its
-rights to a jury trial in any resulting litigation.</p>
-
-</body></html> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/feature.properties b/systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/feature.properties
deleted file mode 100644
index 00e7f1d7b5..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/feature.properties
+++ /dev/null
@@ -1,112 +0,0 @@
-#*******************************************************************************
-# Copyright (c) 2008 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Red Hat, Inc. - initial API and implementation
-#********************************************************************************
-featureName=Tests for local SystemTap on Eclipse
-description=Tests for local integration of SystemTap on Eclipse
-featureProvider=Eclipse
-copyright=Copyright 2009 Red Hat, Inc.
-licenseURL=epl-v10.html
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/feature.xml b/systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/feature.xml
deleted file mode 100644
index 681ce3f198..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.tests-feature/feature.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.linuxtools.systemtap.local.tests"
- label="%featureName"
- version="0.0.1.qualifier"
- provider-name="%featureProvider">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.linuxtools.systemtap.local.callgraph" version="0.0.1" match="greaterOrEqual"/>
- <import plugin="org.junit"/>
- <import plugin="org.eclipse.linuxtools.systemtap.local.core"/>
- <import plugin="org.eclipse.debug.ui" version="3.4.1" match="greaterOrEqual"/>
- <import plugin="org.eclipse.cdt.core"/>
- <import plugin="org.eclipse.cdt.launch"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.debug.core"/>
- <import plugin="org.eclipse.linuxtools.profiling.launch"/>
- <import plugin="org.eclipse.linuxtools.systemtap.local.launch" version="0.0.1" match="greaterOrEqual"/>
- <import plugin="org.junit" version="0.0.0"/>
- <import plugin="org.eclipse.linuxtools.profiling.tests"/>
- </requires>
-
- <plugin
- id="org.eclipse.linuxtools.systemtap.local.callgraph.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.linuxtools.systemtap.local.launch.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/ChangeLog
new file mode 100644
index 0000000000..1e7b0d2eac
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/ChangeLog
@@ -0,0 +1,74 @@
+2010-06-08 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * src/org/eclipse/linuxtools/systemtap/ui/consolelog/actions/StopScriptAction.java (selectionChanged):
+
+ Bug #315224
+
+2010-06-05 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ Bug #315843
+
+ * plugin.properties:
+
+2010-06-04 Andrew Overholt <overholt@redhat.com>
+
+ Bug #282039
+
+ * plugin.properties: Externalize bundle name and provider.
+ * plugin.xml: Likewise.
+
+2010-03-11 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * src/org/eclipse/linuxtools/systemtap/ui/consolelog/actions/ConsoleAction.java (buildEnablementChecks): Fix for BZ #304208
+
+2010-02-11 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/systemtap/ui/consolelog/actions/ConsoleAction.java: Fix for BZ #293207
+ * src/org/eclipse/linuxtools/systemtap/ui/consolelog/actions/StopScriptAction.java: Fix for BZ #293207
+ * src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/ScriptConsole.java: Fix for BZ #293207
+
+ Consoles within ConsoleManger are only guaranteed to implement IConsole, so to cast to
+ ScriptConsole requires a check first.
+
+2010-02-04 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * META-INF/MANIFEST.MF: removed version dependency for org.eclipse.ui bundle
+
+2010-01-29 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * src/org/eclipse/linuxtools/systemtap/ui/consolelog/LoggedCommand2.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/consolelog/ScpExec.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/ScriptConsole2.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/consolelog/actions/ConsoleAction.java (selectionChanged):
+ (.propertyChanged):
+ (isRunning):
+ (dispose):
+ (getActive):
+ (buildEnablementChecks):
+ * src/org/eclipse/linuxtools/systemtap/ui/consolelog/dialogs/SelectServerDialog.java (.widgetSelected):
+ (open):
+ * src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/ScriptConsole.java (run):
+ (ScriptConsole):
+ (createErrorDaemon):
+ (createConsoleDaemon):
+ (saveStream):
+ (isRunning):
+ (dispose):
+ (stop):
+ (getCommand):
+
+2009-11-16 Andrew Overholt <overholt@redhat.com>
+
+ * META-INF/MANIFEST.MF: Fix Bundle-Name.
+
+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-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * ChangeLog: Refactoring. Renaming all packages directories from *.systemtapgui.* to *.systemtap.ui.* \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..ea046f6b33
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/META-INF/MANIFEST.MF
@@ -0,0 +1,25 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %bundleName
+Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.consolelog;singleton:=true
+Bundle-Version: 0.3.0.qualifier
+Bundle-Activator: org.eclipse.linuxtools.systemtap.ui.consolelog.internal.ConsoleLogPlugin
+Bundle-Vendor: %bundleProvider
+Bundle-Localization: plugin
+Export-Package: org.eclipse.linuxtools.systemtap.ui.consolelog,
+ org.eclipse.linuxtools.systemtap.ui.consolelog.actions,
+ org.eclipse.linuxtools.systemtap.ui.consolelog.dialogs,
+ org.eclipse.linuxtools.systemtap.ui.consolelog.internal,
+ org.eclipse.linuxtools.systemtap.ui.consolelog.preferences,
+ org.eclipse.linuxtools.systemtap.ui.consolelog.structures,
+ org.eclipse.linuxtools.systemtap.ui.consolelog.views
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.ui.console;visibility:=reexport,
+ org.eclipse.ui.workbench.texteditor,
+ org.eclipse.linuxtools.systemtap.ui.editor,
+ org.eclipse.linuxtools.systemtap.ui.structures,
+ com.jcraft.jsch;bundle-version="0.1.37"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.eclipse.linuxtools.systemtap.ui.editor
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/about.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/about.html
new file mode 100644
index 0000000000..23506a4bae
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/about.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>About</title>
+</head><body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/build.properties
new file mode 100644
index 0000000000..886d967ba5
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/build.properties
@@ -0,0 +1,10 @@
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+ META-INF/,\
+ .,\
+ icons/,\
+ plugin.properties,\
+ about.html,\
+ .classpath
+src.includes = .classpath
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/plugin.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/plugin.properties
new file mode 100644
index 0000000000..bc64491b07
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/plugin.properties
@@ -0,0 +1,8 @@
+bundleName=SystemTap ConsoleLog Plug-in (Incubation)
+bundleProvider=Eclipse Linux Tools
+view.error.name=Error Log
+
+action.saveLog.name=Save &Log
+action.saveLog.desc=Save console log to file
+
+preference.consoleLog.name=Remote Server \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/plugin.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/plugin.xml
new file mode 100644
index 0000000000..b42f79411f
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/plugin.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.views">
+ <view
+ allowMultiple="false"
+ category="org.eclipse.linuxtools.systemtap.ui"
+ class="org.eclipse.linuxtools.systemtap.ui.consolelog.views.ErrorView"
+ icon="icons/views/error_obj.gif"
+ id="org.eclipse.linuxtools.systemtap.ui.consolelog.views.ErrorView"
+ name="%view.error.name"/>
+ </extension>
+
+
+ <extension
+ point="org.eclipse.ui.viewActions">
+ <viewContribution
+ id="org.eclipse.linuxtools.systemtap.ui.consolelog.consoleview.toolbar"
+ targetID="org.eclipse.ui.console.ConsoleView">
+ <action
+ id="org.eclipse.linuxtools.systemtap.ui.consolelog.actions.SaveLogAction"
+ label="%action.saveLog.name"
+ tooltip="%action.saveLog.desc"
+ class="org.eclipse.linuxtools.systemtap.ui.consolelog.actions.SaveLogAction"
+ icon="icons/actions/save_log.gif"
+ toolbarPath="launchGroup"
+ state="false"
+ style="push"/>
+
+ </viewContribution>
+ </extension>
+
+ <extension
+ point="org.eclipse.core.runtime.preferences">
+ <initializer class="org.eclipse.linuxtools.systemtap.ui.consolelog.preferences.PreferenceInitializer"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ name="%preference.consoleLog.name"
+ id="com.qualityeclipse.systemtap.prefs.consoleLog"
+ class="org.eclipse.linuxtools.systemtap.ui.consolelog.preferences.ConsoleLogPreferencePage"
+ category="com.qualityeclipse.systemtap.prefs.view"/>
+ </extension>
+</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/actions/StopScriptAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/actions/StopScriptAction.java
new file mode 100644
index 0000000000..9a8c59fbb0
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/actions/StopScriptAction.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * 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.consolelog.actions;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.ScriptConsole;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.console.ConsolePlugin;
+import org.eclipse.ui.console.IConsole;
+
+
+
+/**
+ * A class that handles stopping the <code>ScriptConsole</code>.
+ * @author Ryan Morse
+ */
+public class StopScriptAction extends ConsoleAction {
+ /**
+ * This is the main method of the class. It handles stopping the
+ * currently active <code>ScriptConsole</code>.
+ */
+ public void run() {
+ PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
+ boolean stop = false;
+ public void run() {
+ if(stop) return;
+ try {
+ ScriptConsole console = getActive();
+ if(null != console && console.isRunning())
+ console.stop();
+ } catch (Exception e) {
+ stop = true;
+ }
+ }
+ });
+ }
+
+ public void selectionChanged(IAction a, ISelection s) {
+ a.setEnabled(anyRunning());
+ }
+
+
+ /**
+ * This method will stop the i'th <code>ScriptConsole</code> if it is running.
+ * @param i The index value of the console that will be stopped.
+ */
+ public void run(int i) {
+ IConsole ic[] = ConsolePlugin.getDefault().getConsoleManager().getConsoles();
+ if (ic[i] instanceof ScriptConsole){
+ ScriptConsole console = (ScriptConsole)ic[i];
+
+ if(console.isRunning())
+ console.stop();
+ }
+ }
+
+ /**
+ * This method will stop all consoles that are running.
+ */
+ public void stopAll() {
+ IConsole ic[] = ConsolePlugin.getDefault().getConsoleManager().getConsoles();
+ ScriptConsole console;
+
+ for(int i=0; i<ic.length; i++) {
+ if (ic[i] instanceof ScriptConsole){
+ console = (ScriptConsole)ic[i];
+ if(console.isRunning())
+ console.stop();
+ }
+ }
+ }
+
+ /**
+ * This method will check to see if any scripts are currently running.
+ * @return - boolean indicating whether any scripts are running
+ */
+ public boolean anyRunning() {
+ IConsole ic[] = ConsolePlugin.getDefault().getConsoleManager().getConsoles();
+ ScriptConsole console;
+
+ for(int i=0; i<ic.length; i++) {
+ if (ic[i] instanceof ScriptConsole){
+ console = (ScriptConsole)ic[i];
+ if(console.isRunning())
+ return true;
+ }
+ }
+ return false;
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/ScriptConsole.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/ScriptConsole.java
new file mode 100644
index 0000000000..3270af12ba
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/ScriptConsole.java
@@ -0,0 +1,315 @@
+/*******************************************************************************
+ * 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.consolelog.structures;
+
+import java.io.File;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.linuxtools.systemtap.ui.consolelog.actions.StopScriptAction;
+import org.eclipse.linuxtools.systemtap.ui.consolelog.internal.Localization;
+import org.eclipse.linuxtools.systemtap.ui.consolelog.views.ErrorView;
+import org.eclipse.linuxtools.systemtap.ui.structures.IPasswordPrompt;
+import org.eclipse.linuxtools.systemtap.ui.consolelog.LoggedCommand2;
+import org.eclipse.linuxtools.systemtap.ui.consolelog.ScpExec;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.console.ConsolePlugin;
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.MessageConsole;
+
+
+
+/**
+ * This class serves as a pain in the ConsoleView. It is used to create a new Command that,
+ * through ConsoleDaemons will print all the output the the console. In order to stop the
+ * running Command <code>StopScriptAction</code> should be used to stop this console from
+ * running.
+ * @author Ryan Morse
+ */
+public class ScriptConsole extends MessageConsole {
+ /**
+ * This method is used to get a reference to a <code>ScriptConsole</code>. If there
+ * is already an console that has the same name as that provided it will be stopped,
+ * cleared and returned to the caller to use. If there is no console matching the
+ * provided name then a new <code>ScriptConsole</code> will be created for use.
+ * @param name The name of the console that should be returned if available.
+ * @return The console with the provided name, or a new instance if none exist.
+ */
+ public static ScriptConsole getInstance(String name) {
+ ScriptConsole console = null;
+ try {
+ IConsole ic[] = ConsolePlugin.getDefault().getConsoleManager().getConsoles();
+
+ //Prevent running the same script twice
+ if(null != ic) {
+ ScriptConsole activeConsole;
+ StopScriptAction ssa = new StopScriptAction();
+ ssa.init(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
+ for(int i=0; i<ic.length; i++) {
+ if (ic[i] instanceof ScriptConsole){
+ activeConsole = (ScriptConsole)ic[i];
+ if(activeConsole.getName().endsWith(name)) {
+ //Stop any script currently running
+ ssa.run(i);
+ //Remove output from last run
+ activeConsole.clearConsole();
+ activeConsole.setName(name);
+ console = activeConsole;
+ }
+ }
+ }
+ }
+
+ if(null == console) {
+ console = new ScriptConsole(name, null);
+ ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[] {console});
+ }
+ } catch(NullPointerException npe) {
+ console = null;
+ }
+ return console;
+ }
+
+ /*public static ScriptConsole getInstance(String name) {
+ ScriptConsole console = null;
+ try {
+ IConsole ic[] = ConsolePlugin.getDefault().getConsoleManager().getConsoles();
+
+ //Prevent running the same script twice
+ if(null != ic) {
+ ScriptConsole activeConsole;
+ StopScriptAction ssa = new StopScriptAction();
+ ssa.init(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
+ for(int i=0; i<ic.length; i++) {
+ if (ic[i] instanceof ScriptConsole) {
+ activeConsole = (ScriptConsole)ic[i];
+ if(activeConsole.getName().endsWith(name)) {
+ //Stop any script currently running
+ ssa.run(i);
+
+ //Remove output from last run
+ activeConsole.clearConsole();
+ activeConsole.setName(name);
+ console = activeConsole;
+ }
+ }
+ }
+ }
+
+ if(null == console) {
+ console = new ScriptConsole(name, null, sub);
+ ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[] {console});
+ }
+ } catch(NullPointerException npe) {
+ console = null;
+ }
+ return console;
+ }*/
+ private ScriptConsole(String name, ImageDescriptor imageDescriptor) {
+ super(name, imageDescriptor);
+ cmd = null;
+ }
+
+ /*private ScriptConsole(String name, ImageDescriptor imageDescriptor, Subscription sub) {
+ super(name, imageDescriptor);
+ this.subscription = sub;
+ cmd = null;
+ }*/
+
+ /**
+ * Creates the <code>ConsoleStreamDaemon</code> for passing data from the
+ * <code>LoggedCommand</code>'s InputStream to the Console.
+ */
+ protected void createConsoleDaemon() {
+ consoleDaemon = new ConsoleStreamDaemon(this);
+ }
+
+ /**
+ * Creates the <code>ErrorStreamDaemon</code> for passing data from the
+ * <code>LoggedCommand</code>'s ErrorStream to the Console and ErrorView.
+ */
+ protected void createErrorDaemon(IErrorParser parser) {
+ ErrorView errorView = null;
+ try {
+ IViewPart ivp = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(ErrorView.ID);
+ if(null != ivp && ivp instanceof ErrorView)
+ errorView = ((ErrorView)ivp);
+ } catch(Exception e) {e.printStackTrace();}
+ errorDaemon = new ErrorStreamDaemon(this, errorView, parser);
+ }
+
+ /**
+ * Runs the provied command in this ScriptConsole instance.
+ * @param command The command and arguments to run.
+ * @param envVars The environment variables to use while running
+ * @param prompt The prompt to get the users password if needed.
+ * @param errorParser The parser to handle error messages generated by the command
+ */
+ public void run(String[] command, String[] envVars, IPasswordPrompt prompt, IErrorParser errorParser) {
+ // if(subscription.init())
+ // {
+ createConsoleDaemon();
+ if (errorParser != null)
+ createErrorDaemon(errorParser);
+ cmd = new LoggedCommand2(command, envVars, prompt, 100,this.getName());
+ if (errorDaemon != null)
+ cmd.addErrorStreamListener(errorDaemon);
+ cmd.addInputStreamListener(consoleDaemon);
+ cmd.start();
+ activate();
+ ConsolePlugin.getDefault().getConsoleManager().showConsoleView(this);
+ // subscription.addErrorStreamListener(errorDaemon);
+ // subscription.addInputStreamListener(consoleDaemon);
+
+ // if (!subscription.isRunning())
+ // {
+ // subscription.start();
+ // }
+ // ConsolePlugin.getDefault().getConsoleManager().showConsoleView(this);
+ // }
+ // else
+ // {
+ // setName(Localization.getString("ScriptConsole.Terminated") + super.getName());
+ // subscription.interrupt();
+ //subscription.delSubscription();
+ //ConsolePlugin.getDefault().getConsoleManager().removeConsoles(new IConsole[] {this});
+ //}
+ }
+
+/* public void run() {
+ if(subscription.init())
+ {
+ createConsoleDaemon();
+ subscription.addInputStreamListener(consoleDaemon);
+ subscription.addErrorStreamListener(consoleDaemon);
+
+ if (!subscription.isRunning())
+ {
+ subscription.start();
+ }
+ ConsolePlugin.getDefault().getConsoleManager().showConsoleView(this);
+ //ConsolePlugin.getDefault().getConsoleManager().
+ //activate();
+ }
+ else
+ {
+ setName(Localization.getString("ScriptConsole.Terminated") + super.getName());
+ subscription.interrupt();
+ subscription.delSubscription();
+ ConsolePlugin.getDefault().getConsoleManager().removeConsoles(new IConsole[] {this});
+ }
+
+ } */
+
+ /**
+ * Check to see if the Command is still running
+ * @return boolean representing if the command is running
+ */
+ public boolean isRunning() {
+ return cmd.isRunning();
+ }
+
+ /**
+ * Check to see if this class has already been disposed.
+ * @return boolean represneting whether or not the class has been disposed.
+ */
+ public boolean isDisposed() {
+ return cmd.isDisposed();
+ }
+
+ /**
+ * Method to allow the user to save the Commands output to a file for use latter.
+ * @param file The new file to save the output to.
+ */
+ public void saveStream(File file) {
+ if(isRunning())
+ // if(!subscription.saveLog(file))
+ // MessageDialog.openWarning(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), Localization.getString("ScriptConsole.Problem"), Localization.getString("ScriptConsole.ErrorSavingLog"));
+ if(!cmd.saveLog(file))
+ MessageDialog.openWarning(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), Localization.getString("ScriptConsole.Problem"), Localization.getString("ScriptConsole.ErrorSavingLog"));
+
+ }
+
+ /**
+ * Gets the command that is running in this console, or null if there is no running command.
+ * @return The <code>LoggedCommand</code> that is running in this console.
+ */
+ public LoggedCommand2 getCommand() {
+ return cmd;
+ }
+
+ /*public String getOutput() {
+ return subscription.getOutput();
+ }*/
+
+ /**
+ * Stops the running command and the associated listeners.
+ */
+ public synchronized void stop() {
+ if(isRunning()) {
+ String command[] = new String[1];
+ String moduleName = this.getName();
+ moduleName = moduleName.substring(0,moduleName.indexOf('.'));
+ if (moduleName.indexOf('-') != -1)
+ moduleName = moduleName.substring(0, moduleName.indexOf('-'));
+
+ command[0] = "ps -ef | grep " + moduleName + " | grep stapio | awk '{print $2}' | xargs kill -SIGINT";
+ ScpExec stop = new ScpExec(command, moduleName);
+ stop.start();
+ cmd.stop();
+ cmd.removeErrorStreamListener(errorDaemon);
+ cmd.removeInputStreamListener(consoleDaemon);
+ setName(Localization.getString("ScriptConsole.Terminated") + super.getName());
+ ConsolePlugin.getDefault().getConsoleManager().removeConsoles(new IConsole[] {this});
+
+
+
+
+ }
+ }
+
+ /**
+ * Disposes of all internal references in the class. No method should be called after this.
+ */
+ public void dispose() {
+ if(!isDisposed()) {
+ if(null != cmd)
+ cmd.dispose();
+ cmd = null;
+ if(null != errorDaemon)
+ errorDaemon.dispose();
+ errorDaemon = null;
+ if(null != consoleDaemon)
+ consoleDaemon.dispose();
+ consoleDaemon = null;
+ }
+ }
+
+ /**
+ * Changes the name displayed on this console.
+ * @param name The new name to display on the console.
+ */
+ public void setName(String name) {
+ try {
+ super.setName(name);
+ if(null != ConsolePlugin.getDefault())
+ ConsolePlugin.getDefault().getConsoleManager().refresh(this);
+ } catch(Exception e) {}
+ }
+
+ private LoggedCommand2 cmd;
+
+ private ErrorStreamDaemon errorDaemon;
+ private ConsoleStreamDaemon consoleDaemon;
+// private Subscription subscription;
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/ChangeLog
new file mode 100644
index 0000000000..7ff8c967fa
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/ChangeLog
@@ -0,0 +1,151 @@
+2010-06-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * plugin.xml: Removing invalid Menu Extensions
+
+ Bug #315440
+
+
+2010-06-02 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardModuleLocator.java
+ (getModuleLocations): Fix BZ #314873
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardModuleTreeBuilder.java
+ (scanNextLevel): Fix BZ #314873
+
+2010-06-04 Andrew Overholt <overholt@redhat.com>
+
+ Bug #282039
+
+ * plugin.properties: Externalize bundle name and provider.
+ * plugin.xml: Likewise.
+
+2010-02-11 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/internal/DashboardCloseMonitor.java:
+ Fix NPE by proceeding only when the view exists.
+
+2010-01-29 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/actions/ImportModuleLocationAction.java:
+ (run):
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/internal/DashboardCloseMonitor.java:
+ (preShutdown):
+
+2010-01-29 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * .classpath: New file.
+ * .project: New file.
+ * bin: New file.
+ * build.properties: New file.
+ * documentation/html/concepts/activeModulesBrowser.html: New file.
+ * documentation/html/concepts/concepts.html: New file.
+ * documentation/html/concepts/modules.html: New file.
+ * documentation/html/concepts/modulesBrowser.html: New file.
+ * documentation/html/gettingstarted/dashboardTutorial.html: New file.
+ * documentation/html/gettingstarted/gettingStarted.html: New file.
+ * documentation/html/gettingstarted/images/activeModules.png: New file.
+ * documentation/html/gettingstarted/images/closeButton.png: New file.
+ * documentation/html/gettingstarted/images/expandButton.png: New file.
+ * documentation/html/gettingstarted/images/graphExpanded.png: New file.
+ * documentation/html/gettingstarted/images/moduleBrowser.png: New file.
+ * documentation/html/gettingstarted/images/multipleRunningModules.png: New file.
+ * documentation/html/gettingstarted/images/rightleft.png: New file.
+ * documentation/html/gettingstarted/images/runningDashboard.png: New file.
+ * documentation/html/gettingstarted/images/smallGraph.png: New file.
+ * documentation/html/reference/frequentlyAskedQuestions.html: New file.
+ * documentation/html/reference/images/menu/preferencesbox1.png: New file.
+ * documentation/html/reference/images/menu/viewbox1.png: New file.
+ * documentation/html/reference/images/toolbars/dash.png: New file.
+ * documentation/html/reference/images/toolbars/graphing.png: New file.
+ * documentation/html/reference/images/toolbars/ide.png: New file.
+ * documentation/html/reference/images/toolbars/import_wiz.gif: New file.
+ * documentation/html/reference/images/toolbars/mod_obj.gif: New file.
+ * documentation/html/reference/images/toolbars/pause_script.gif: New file.
+ * documentation/html/reference/images/toolbars/start_script.gif: New file.
+ * documentation/html/reference/images/toolbars/stop_obj.gif: New file.
+ * documentation/html/reference/menus.html: New file.
+ * documentation/html/reference/preferences.html: New file.
+ * documentation/html/reference/reference.html: New file.
+ * documentation/html/reference/toolbars.html: New file.
+ * documentation/html/tasks/creatingModules.html: New file.
+ * documentation/html/tasks/graphInteraction.html: New file.
+ * documentation/html/tasks/images/addedModule.png: New file.
+ * documentation/html/tasks/images/closeButton.png: New file.
+ * documentation/html/tasks/images/expandButton.png: New file.
+ * documentation/html/tasks/images/exportScript.png: New file.
+ * documentation/html/tasks/images/importDialogue.png: New file.
+ * documentation/html/tasks/images/rightleft.png: New file.
+ * documentation/html/tasks/images/script_details.gif: New file.
+ * documentation/html/tasks/images/zoom.png: New file.
+ * documentation/html/tasks/importModules.html: New file.
+ * documentation/html/tasks/runningModules.html: New file.
+ * documentation/html/tasks/tasks.html: New file.
+ * documentation/html/toc.html: New file.
+ * documentation/tocconcepts.xml: New file.
+ * documentation/tocgettingstarted.xml: New file.
+ * documentation/tocreference.xml: New file.
+ * documentation/toctasks.xml: New file.
+ * icons/actions/bomb.png: New file.
+ * icons/actions/graph/close.gif: New file.
+ * icons/actions/graph/collapse.gif: New file.
+ * icons/actions/graph/expand.gif: New file.
+ * icons/actions/graph/maximize.gif: New file.
+ * icons/actions/graph/restore.gif: New file.
+ * icons/actions/import_wiz.gif: New file.
+ * icons/actions/pause_script.gif: New file.
+ * icons/actions/start_script.gif: New file.
+ * icons/actions/stop_script.gif: New file.
+ * icons/misc/graph_act.gif: New file.
+ * icons/misc/graph_dis.gif: New file.
+ * icons/misc/module_obj.gif: New file.
+ * icons/perspective_obj.gif: New file.
+ * icons/views/active_mod_obj.gif: New file.
+ * icons/views/dashboard_obj.gif: New file.
+ * icons/views/mod_obj.gif: New file.
+ * META-INF/MANIFEST.MF: New file.
+ * modules/IO.Cumulative_IO_Activity.dash: New file.
+ * modules/IO.IO_Activity_by_Process.dash: New file.
+ * modules/Network.Processwise_Network_Traffic.dash: New file.
+ * modules/Process.Profile_Kernel_functions.dash: New file.
+ * modules/Profiling.Functions_profile.dash: New file.
+ * modules/Profiling.Unnecessary_Polling_Operations.dash: New file.
+ * plugin.properties: New file.
+ * plugin.xml: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/actions/ActivateGraphAction.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/actions/CustomAction.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/actions/hidden/GetSelectedModule.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/actions/ImportModuleLocationAction.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/actions/PauseModuleAction.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/actions/RunModuleAction.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/actions/StopGraphAction.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/actions/StopModuleAction.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/DashboardAdapter.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/DashboardComposite.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/DashboardPerspective.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/DashboardSessionSettings.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/internal/DashboardCloseMonitor.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/internal/DashboardPlugin.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/internal/Localization.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/internal/localization.properties: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/preferences/DashboardPreferenceConstants.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/preferences/DashboardPreferencePage.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/preferences/PreferenceInitializer.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/ActiveModuleData.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/ActiveModuleTreeNode.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardGraphData.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardGraphsLocator.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardGraphsTreeBuilder.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardMetaData.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardModule.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardModuleFileFilter.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardModuleLocator.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardModuleTreeBuilder.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/GraphTreeNode.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/ModuleTreeNode.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/views/ActiveModuleBrowserView.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/views/DashboardGraphsBrowserView.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/views/DashboardModuleBrowserView.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/views/DashboardView.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/views/GraphsView.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboard/views/ModuleView.java: New file.
+ * toc.xml: \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..e14dff3d8a
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/META-INF/MANIFEST.MF
@@ -0,0 +1,26 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.dashboard; singleton:=true
+Bundle-Version: 0.3.0.qualifier
+Bundle-Activator: org.eclipse.linuxtools.systemtap.ui.dashboard.internal.DashboardPlugin
+Bundle-Vendor: %bundleProvider
+Bundle-Localization: plugin
+Export-Package: org.eclipse.linuxtools.systemtap.ui.dashboard,
+ org.eclipse.linuxtools.systemtap.ui.dashboard.internal,
+ org.eclipse.linuxtools.systemtap.ui.dashboard.preferences,
+ org.eclipse.linuxtools.systemtap.ui.dashboard.structures,
+ org.eclipse.linuxtools.systemtap.ui.dashboard.views
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.linuxtools.systemtap.ui.structures,
+ org.eclipse.linuxtools.systemtap.ui.logging,
+ org.eclipse.linuxtools.systemtap.ui.graphingapi.ui,
+ org.eclipse.linuxtools.systemtap.ui.systemtapgui,
+ org.eclipse.linuxtools.systemtap.ui.consolelog
+Import-Package: org.eclipse.linuxtools.systemtap.ui.graphicalrun.structures,
+ org.eclipse.linuxtools.systemtap.ui.graphing,
+ org.eclipse.linuxtools.systemtap.ui.ide,
+ org.eclipse.linuxtools.systemtap.ui.ide.structures
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Name: %bundleName
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/about.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/about.html
new file mode 100644
index 0000000000..23506a4bae
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/about.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>About</title>
+</head><body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/build.properties
new file mode 100644
index 0000000000..791be512f3
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/build.properties
@@ -0,0 +1,11 @@
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+ META-INF/,\
+ .,\
+ icons/,\
+ documentation/,\
+ toc.xml,\
+ modules/,\
+ about.html,\
+ plugin.properties
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/plugin.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/plugin.properties
new file mode 100644
index 0000000000..eb41018a23
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/plugin.properties
@@ -0,0 +1,42 @@
+bundleName=SystemTap Dashboard (Incubation)
+bundleProvider=Eclipse Linux Tools
+
+perspective.dashboard.name=SystemTap Dashboard
+
+view.module.name=Modules
+view.graphs.name=Graphs
+view.activeModule.name=Active Modules
+view.dashboard.name=Dashboard
+
+command.stop.name=&Stop Module
+command.stop.desc=Stops the currently selected Dashboard Module
+command.pause.name=&Pause Module
+command.pause.desc=Pauses the currently selected Dashboard Module
+command.run.name=&Run Module
+command.run.desc=Starts the currently selected Dashboard Module
+command.new.name=&Create New Module
+command.new.desc=Creates a New Dashboard Module
+
+category.file.name=File
+category.file.desc=File
+category.run.name=Run
+category.run.desc=Run
+
+actionset.filename=File Action Set
+action.import.name=&Import Modules
+action.import.desc=Import Dashboard Module Directory
+action.new.name=&Create New Module
+action.new.desc=Creates a New Dashboard Module
+
+actionset.run.name=Run Action Set
+action.stop.name=&Stop Module
+action.stop.desc=Stops the currently selected Dashboard Module
+action.pause.name=&Pause Module
+action.pause.desc=Pauses the currently selected Dashboard Module
+action.run.name=&Run Module
+action.run.desc=Starts the currently selected Dashboard Module
+
+preference.dashboard.name=Dashboard
+
+action.activateGraph.name=Activate Graph
+action.stopGraph.name=Stop Graph \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/plugin.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/plugin.xml
new file mode 100644
index 0000000000..afb57f6195
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/plugin.xml
@@ -0,0 +1,295 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.perspectives">
+ <perspective
+ name="%perspective.dashboard.name"
+ class="org.eclipse.linuxtools.systemtap.ui.dashboard.DashboardPerspective"
+ icon="icons/perspective_obj.gif"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.DashboardPerspective"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.views">
+ <view
+ allowMultiple="false"
+ category="org.eclipse.linuxtools.systemtap.ui"
+ class="org.eclipse.linuxtools.systemtap.ui.dashboard.views.DashboardModuleBrowserView"
+ icon="icons/views/mod_obj.gif"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.views.DashboardModuleBrowserView"
+ name="%view.module.name">
+ </view>
+ <view
+ allowMultiple="false"
+ category="org.eclipse.linuxtools.systemtap.ui"
+ class="org.eclipse.linuxtools.systemtap.ui.dashboard.views.ActiveModuleBrowserView"
+ icon="icons/views/active_mod_obj.gif"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.views.ActiveModuleBrowserView"
+ name="%view.activeModule.name">
+ </view>
+ <view
+ allowMultiple="false"
+ category="org.eclipse.linuxtools.systemtap.ui"
+ class="org.eclipse.linuxtools.systemtap.ui.dashboard.views.DashboardView"
+ icon="icons/views/dashboard_obj.gif"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.views.DashboardView"
+ name="%view.dashboard.name">
+ </view>
+ <view
+ allowMultiple="false"
+ category="org.eclipse.linuxtools.systemtap.ui"
+ class="org.eclipse.linuxtools.systemtap.ui.dashboard.views.DashboardGraphsBrowserView"
+ icon="icons/misc/graph_act.gif"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.views.DashboardModuleGraphsView"
+ name="%view.graphs.name">
+ </view>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ name="%command.import.name"
+ description="%command.import.desc"
+ categoryId="org.eclipse.linuxtools.systemtap.ui.dashboard.category.file"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.commands.ImportModuleAction"/>
+ <command
+ name="%command.stop.name"
+ description="%command.stop.desc"
+ categoryId="org.eclipse.linuxtools.systemtap.ui.dashboard.category.run"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.commands.StopModuleAction"/>
+ <command
+ name="%command.pause.name"
+ description="%command.pause.desc"
+ categoryId="org.eclipse.linuxtools.systemtap.ui.dashboard.category.run"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.commands.PauseModuleAction"/>
+ <command
+ name="%command.run.name"
+ description="%command.run.desc"
+ categoryId="org.eclipse.linuxtools.systemtap.ui.dashboard.category.run"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.commands.RunModuleAction"/>
+ <!--command
+ name="%command.new.name"
+ description="%command.new.desc"
+ categoryId="org.eclipse.linuxtools.systemtap.ui.dashboard.category.file"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.commands.CreateModuleAction"/-->
+
+ <category
+ name="%category.file.name"
+ description="%category.file.desc"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.category.file"/>
+ <category
+ name="%category.run.name"
+ description="%category.run.desc"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.category.run"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.bindings">
+ <key
+ commandId="org.eclipse.linuxtools.systemtap.ui.dashboard.commands.ImportModuleAction"
+ contextId="org.eclipse.ui.contexts.window"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+I"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.actionSets">
+ <actionSet
+ label="%actionset.file.name"
+ visible="false"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.FileActionSet">
+ <action
+ label="%action.import.name"
+ tooltip="%action.import.desc"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.actions.ImportModuleAction"
+ icon="icons/actions/import_wiz.gif"
+ toolbarPath="org.eclipse.ui.workbench.file/open.ext"
+ class="org.eclipse.linuxtools.systemtap.ui.dashboard.actions.ImportModuleLocationAction"
+ definitionId="org.eclipse.linuxtools.systemtap.ui.dashboard.commands.ImportModuleAction"
+ style="push"
+ state="false"/>
+ <!--action
+ label="%action.new.name"
+ tooltip="%action.new.desc"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.actions.CreateModuleAction"
+ icon="icons/actions/import_wiz.gif"
+ toolbarPath="org.eclipse.ui.workbench.file/open.ext"
+ menubarPath="file2/new.ext"
+ class="org.eclipse.linuxtools.systemtap.ui.dashboard.actions.CreateModuleAction"
+ definitionId="org.eclipse.linuxtools.systemtap.ui.dashboard.commands.CreateModuleAction"
+ style="push"
+ state="true"/-->
+ </actionSet>
+ <actionSet
+ label="%actionset.run.name"
+ visible="false"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.RunActionSet">
+ <action
+ label="%action.stop.name"
+ tooltip="%action.stop.desc"
+ class="org.eclipse.linuxtools.systemtap.ui.dashboard.actions.StopModuleAction"
+ definitionId="org.eclipse.linuxtools.systemtap.ui.dashboard.commands.StopModuleAction"
+ icon="icons/actions/stop_script.gif"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.actions.StopModuleAction"
+ menubarPath="org.eclipse.ui.run/runGroup"
+ state="false"
+ style="push"
+ toolbarPath="org.eclipse.ui.workbench.file/build.group">
+ </action>
+ <action
+ label="%action.pause.name"
+ tooltip="%action.pause.desc"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.actions.PauseModuleAction"
+ icon="icons/actions/pause_script.gif"
+ toolbarPath="org.eclipse.ui.workbench.file/build.group"
+ class="org.eclipse.linuxtools.systemtap.ui.dashboard.actions.PauseModuleAction"
+ definitionId="org.eclipse.linuxtools.systemtap.ui.dashboard.commands.PauseModuleAction"
+ menubarPath="org.eclipse.ui.run/runGroup"
+ style="push"
+ state="false"/>
+ <action
+ label="%action.run.name"
+ tooltip="%action.run.desc"
+ class="org.eclipse.linuxtools.systemtap.ui.dashboard.actions.RunModuleAction"
+ definitionId="org.eclipse.linuxtools.systemtap.ui.dashboard.commands.RunModuleAction"
+ icon="icons/actions/start_script.gif"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.actions.RunModuleAction"
+ menubarPath="org.eclipse.ui.run/runGroup"
+ state="false"
+ style="push"
+ toolbarPath="org.eclipse.ui.workbench.file/build.group"/>
+ </actionSet>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ name="%preference.dashboard.name"
+ id="com.qualityeclipse.systemtap.prefs.dashboard"
+ class="org.eclipse.linuxtools.systemtap.ui.dashboard.preferences.DashboardPreferencePage"
+ category="com.qualityeclipse.systemtap.prefs.view"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.core.runtime.preferences">
+ <initializer class="org.eclipse.linuxtools.systemtap.ui.dashboard.preferences.PreferenceInitializer"/>
+ </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.popupMenus">
+ <objectContribution
+ adaptable="false"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.RunModuleMenu"
+ objectClass="org.eclipse.linuxtools.systemtap.ui.structures.TreeNode">
+ <action
+ label="%action.stop.name"
+ class="org.eclipse.linuxtools.systemtap.ui.dashboard.actions.StopModuleAction"
+ icon="icons/actions/stop_script.gif"
+ menubarPath="build.ext"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.StopModuleAction"
+ style="push"/>
+ <action
+ label="%action.pause.name"
+ class="org.eclipse.linuxtools.systemtap.ui.dashboard.actions.PauseModuleAction"
+ icon="icons/actions/pause_script.gif"
+ menubarPath="build.ext"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.PauseModuleAction"
+ style="push"/>
+ <action
+ label="%action.run.name"
+ class="org.eclipse.linuxtools.systemtap.ui.dashboard.actions.RunModuleAction"
+ icon="icons/actions/start_script.gif"
+ menubarPath="build.ext"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.RunModuleAction"
+ style="push"/>
+ </objectContribution>
+ </extension>-->
+
+ <extension
+ point="org.eclipse.ui.popupMenus">
+ <objectContribution
+ adaptable="false"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.ShowGraphMenu"
+ objectClass="org.eclipse.linuxtools.systemtap.ui.dashboard.structures.GraphTreeNode">
+ <action
+ label="%action.activateGraph.name"
+ class="org.eclipse.linuxtools.systemtap.ui.dashboard.actions.ActivateGraphAction"
+ icon="icons/misc/graph_act.gif"
+ menubarPath="build.ext"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.ActivateGraphAction"
+ style="push"/>
+ <action
+ label="%action.stopGraph.name"
+ class="org.eclipse.linuxtools.systemtap.ui.dashboard.actions.StopGraphAction"
+ icon="icons/misc/graph_dis.gif"
+ menubarPath="build.ext"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.StopGraphAction"
+ style="push"/>
+ </objectContribution>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.perspectiveExtensions">
+ <perspectiveExtension
+ targetID="org.eclipse.linuxtools.systemtap.ui.dashboard.DashboardPerspective">
+ <actionSet id="org.eclipse.linuxtools.systemtap.ui.dashboard.FileActionSet"/>
+ <actionSet id="org.eclipse.linuxtools.systemtap.ui.dashboard.RunActionSet"/>
+ <perspectiveShortcut id="org.eclipse.linuxtools.systemtap.ui.systemtapgui.Perspective"/>
+ </perspectiveExtension>
+ <perspectiveExtension
+ targetID="org.eclipse.linuxtools.systemtap.ui.systemtapgui.Perspective">
+ <perspectiveShortcut id="org.eclipse.linuxtools.systemtap.ui.dashboard.DashboardPerspective"/>
+ </perspectiveExtension>
+ <perspectiveExtension
+ targetID="org.eclipse.linuxtools.systemtap.ui.graphing.GraphingPerspective">
+ <perspectiveShortcut id="org.eclipse.linuxtools.systemtap.ui.dashboard.DashboardPerspective"/>
+ </perspectiveExtension>
+ <perspectiveExtension
+ targetID="org.eclipse.linuxtools.systemtap.ui.ide.IDEPerspective">
+ <perspectiveShortcut id="org.eclipse.linuxtools.systemtap.ui.dashboard.DashboardPerspective"/>
+ </perspectiveExtension>
+ </extension>
+ <!-- <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="toolbar:org.eclipse.ui.main.toolbar">
+ <toolbar
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.toolbar1">
+ <visibleWhen
+ checkEnabled="true">
+ </visibleWhen>
+ <command
+ commandId="org.eclipse.linuxtools.systemtap.ui.dashboard.commands.ImportModuleAction"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.commands.ImportModuleAction"
+ label="a">
+ <visibleWhen>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.systemtap.ui.dashboard.commands.StopModuleAction"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.commands.StopModuleAction"
+ label="b"/>
+ <command
+ commandId="org.eclipse.linuxtools.systemtap.ui.dashboard.commands.StopModuleAction"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.commands.PauseModuleAction"
+ label="c"/>
+ <command
+ commandId="org.eclipse.linuxtools.systemtap.ui.dashboard.commands.StopModuleAction"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboard.commands.RunModuleAction"
+ label="d"/>
+ </toolbar>
+ </menuContribution>
+ </extension> -->
+</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardModuleLocator.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardModuleLocator.java
new file mode 100644
index 0000000000..c7600b0eaf
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardModuleLocator.java
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * 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, Anithra P J
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.dashboard.structures;
+
+import java.io.File;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+
+import org.eclipse.linuxtools.systemtap.ui.structures.JarArchive;
+import org.eclipse.linuxtools.systemtap.ui.structures.TreeNode;
+import org.eclipse.linuxtools.systemtap.ui.dashboard.internal.DashboardPlugin;
+import org.eclipse.linuxtools.systemtap.ui.dashboard.preferences.DashboardPreferenceConstants;
+import org.eclipse.linuxtools.systemtap.ui.systemtapgui.SystemTapGUISettings;
+
+/**
+ * This class is used to generate the entire Dashboard module list. It
+ * gets the list of directories that the user has specified contain modules
+ * and then calls the TreeBuilder on each of them to build up the entire list.
+ * @author Ryan Morse
+ */
+public final class DashboardModuleLocator {
+ /**
+ * This is the main method for the class. It first gathers up all the directories
+ * that contain modules and then goes through each directory and adds the modules
+ * contained in that folder to the list. Once finished, it will return the entire
+ * list.
+ * @return The entire list of Dashboard Modules organized as a Tree
+ */
+ public static TreeNode getModules() {
+ TreeNode root = new TreeNode(null, "", false);
+
+ String[] locations = getModuleLocations();
+ DashboardModuleTreeBuilder dmtb = null;
+ if(null != locations) {
+ for(int i=0; i<locations.length; i++) {
+ dmtb = new DashboardModuleTreeBuilder(root);
+ dmtb.generateTree(new File(locations[i]));
+ }
+ root.sortTree();
+ }
+
+ return root;
+ }
+
+ /**
+ * This method gets all of the dashboard module directories from the user's
+ * preferences and adds the default directores, then returns the entire list.
+ * @return String array containing all of the directories with modules.
+ */
+ public static String[] getModuleLocations() {
+ IPreferenceStore store = DashboardPlugin.getDefault().getPreferenceStore();
+
+ String locations = store.getString(DashboardPreferenceConstants.P_MODULE_FOLDERS);
+
+ String[] folders = locations.split(File.pathSeparator);
+
+ String[] allFolders;
+ if(locations.length() > 0) {
+ allFolders = new String[folders.length + 2];
+ System.arraycopy(folders, 0, allFolders, 2, folders.length);
+ } else
+ allFolders = new String[2];
+
+ //This locates all the preexisting modules
+ if(new File(moduleStore).exists()) {
+ File f = new File(moduleLocation);
+ if(!f.exists()) {
+ f.mkdir();
+ JarArchive.unjarFiles(moduleStore, moduleLocation, "modules/");
+ }
+ allFolders[0] = moduleLocation;
+ } else {
+ allFolders[0] = System.getProperty("osgi.splashLocation");
+ int stapguiLoc = allFolders[0].indexOf("systemtapgui");
+ if (stapguiLoc != -1) {
+ allFolders[0] = allFolders[0].substring(0, stapguiLoc);
+ allFolders[0] += "dashboard/modules/";
+ }
+ }
+
+ allFolders[1] = SystemTapGUISettings.settingsFolder.getAbsolutePath();
+
+ return allFolders;
+ }
+
+ public static final String moduleLocation = SystemTapGUISettings.installDirectory + "/.modules/";
+ public static final String moduleStore = SystemTapGUISettings.installDirectory + "/plugins/org.eclipse.linuxtools.systemtap.ui.dashboard_1.0.0.jar";
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardModuleTreeBuilder.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardModuleTreeBuilder.java
new file mode 100644
index 0000000000..7f37d27435
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardModuleTreeBuilder.java
@@ -0,0 +1,140 @@
+/*******************************************************************************
+ * 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, Anithra P J, Anithra P J
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.dashboard.structures;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+
+import org.eclipse.linuxtools.systemtap.ui.structures.TreeNode;
+import org.eclipse.linuxtools.systemtap.ui.structures.ZipArchive;
+import org.eclipse.linuxtools.systemtap.ui.dashboard.views.DashboardView;
+import org.eclipse.linuxtools.systemtap.ui.systemtapgui.SystemTapGUISettings;
+
+/**
+ * This class is responsible for searching through the Dashboard module
+ * directory and building a tree with their modules.
+ */
+public class DashboardModuleTreeBuilder {
+ public DashboardModuleTreeBuilder() {
+ tree = new TreeNode("Root", "", true);
+ }
+
+ public DashboardModuleTreeBuilder(TreeNode t) {
+ tree = t;
+ }
+
+ /**
+ * Returns the tree containing all of the dashboard modules
+ * @return TreeNode with dashboard modules
+ */
+ public TreeNode getTree() {
+ return tree;
+ }
+
+ /**
+ * This method is used to generate the tree of dashboard modules for
+ * the provided folder.
+ * @param folder The directory to search for dashboard modules
+ */
+ public void generateTree(File folder) {
+ scanNextLevel(folder);
+ }
+
+ /**
+ * This is the main method for this class. It searches through the provided
+ * file/folder and builds the tree with any dashboard modules it finds.
+ * @param f The file/folder to scan for modules
+ */
+ private void scanNextLevel(File f) {
+ File[] fs = f.listFiles(new DashboardModuleFileFilter());
+ if (fs == null){
+ return;
+ }
+ DashboardMetaData dmd;
+ DashboardModule dm;
+
+ TreeNode location;
+ for(int i=0; i<fs.length; i++) {
+ if(fs[i].isDirectory())
+ scanNextLevel(fs[i]);
+ else {
+ try {
+ File folder = new File(SystemTapGUISettings.tempDirectory + "/bundles/");
+ if(!folder.exists())
+ folder.mkdirs();
+
+ File file = new File(folder + "/" + fs[i].getName() + ".tmp");
+ file.createNewFile();
+ ZipArchive.uncompressFile(file.getAbsolutePath(), fs[i].getAbsolutePath());
+ ZipArchive.unzipFiles(file.getAbsolutePath(), folder.getAbsolutePath());
+ dmd = new DashboardMetaData(folder.getAbsolutePath() + DashboardModule.metaFileName);
+ dm = dmd.getModule();
+ dm.archiveFile = fs[i];
+ int index = searchModuleNames(dm.category);
+ if (index == -1)
+ {
+ moduleNames.add(dm.category);
+ //
+ DashboardView.addmodulename(dm.category);
+ }
+ location = findInsertLocation(dm.category);
+ location.add(new ModuleTreeNode(dm, dm.display, true));
+
+ File[] files = folder.listFiles();
+ for(int j=0; j<files.length; j++)
+ files[j].delete();
+ folder.delete();
+ } catch(IOException ioe) {}
+ }
+ }
+ }
+
+ /**
+ * This method searches through the tree to find the correct location
+ * to add the new module. If the path does not exist yet, a new node will
+ * be created.
+ * @param path The category the module should be added to
+ * @return The tree node matching the provided path
+ */
+ private TreeNode findInsertLocation(String path) {
+ String[] folders = path.split("\\p{Punct}");
+ TreeNode level = tree;
+ //
+ for(int j,i=0; i<folders.length; i++) {
+ for(j=0; j<level.getChildCount(); j++) {
+ if(level.getChildAt(j).toString().equals(folders[i]))
+ break;
+ }
+ if(j >= level.getChildCount())
+ level.add(new TreeNode("", folders[i], true));
+ level = level.getChildAt(j);
+ }
+ return level;
+ }
+
+
+ private int searchModuleNames(String moduleName) {
+ //
+
+ if(moduleNames.size() > 0)
+ {
+ for (int i = 0; i<moduleNames.size();i++)
+ {
+ if (moduleName.equals(moduleNames.get(i))) return i;
+ }
+ }
+ return -1;
+ }
+ private TreeNode tree;
+ public static ArrayList<String> moduleNames = new ArrayList<String>();
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/ChangeLog
new file mode 100644
index 0000000000..b1297fee86
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/ChangeLog
@@ -0,0 +1,46 @@
+2010-06-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * plugin.xml: Removing invalid Menu Extensions
+
+ Bug #315440
+
+2010-06-04 Andrew Overholt <overholt@redhat.com>
+
+ Bug #282039
+
+ * plugin.properties: Externalize bundle name and provider.
+ * plugin.xml: Likewise.
+
+2010-02-04 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * META-INF/MANIFEST.MF: removed version dependency for org.eclipse.ui bundle
+
+2010-01-29 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboardextension/actions/ExportScriptAction.java:
+ (run):
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboardextension/dialogs/ExportScriptDialog.java:
+ (buttonPressed):
+
+2010-01-29 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * .classpath: New file.
+ * .project: New file.
+ * bin: New file.
+ * build.properties: New file.
+ * icons/actions/export_wiz.gif: New file.
+ * icons/actions/file_obj.gif: New file.
+ * icons/actions/mod_obj.gif: New file.
+ * META-INF/MANIFEST.MF: New file.
+ * plugin.properties: New file.
+ * plugin.xml: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboardextension/actions/AddScriptAction.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboardextension/actions/CreateModuleAction.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboardextension/actions/DeleteScriptAction.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboardextension/actions/ExportScriptAction.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboardextension/actions/ViewScriptAction.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboardextension/dialogs/ExportScriptDialog.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboardextension/dialogs/ScriptDetails.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboardextension/internal/DashboardExtensionPlugin.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboardextension/internal/Localization.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/dashboardextension/internal/localization.properties: \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..dc89497b93
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/META-INF/MANIFEST.MF
@@ -0,0 +1,23 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %bundleName
+Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.dashboardextension; singleton:=true
+Bundle-Version: 0.3.0.qualifier
+Bundle-Activator: org.eclipse.linuxtools.systemtap.ui.dashboardextension.internal.DashboardExtensionPlugin
+Bundle-Vendor: %bundleProvider
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.linuxtools.systemtap.ui.ide,
+ org.eclipse.linuxtools.systemtap.ui.editor,
+ org.eclipse.linuxtools.systemtap.ui.graphing,
+ org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui,
+ org.eclipse.linuxtools.systemtap.ui.logging,
+ org.eclipse.linuxtools.systemtap.ui.systemtapgui,
+ org.eclipse.linuxtools.systemtap.ui.structures,
+ org.eclipse.linuxtools.systemtap.ui.dashboard,
+ org.eclipse.linuxtools.systemtap.ui.graphingapi.ui
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.eclipse.linuxtools.systemtap.ui.editor
+
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/about.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/about.html
new file mode 100644
index 0000000000..23506a4bae
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/about.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>About</title>
+</head><body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/build.properties
new file mode 100644
index 0000000000..b418be782e
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+ META-INF/,\
+ .,\
+ icons/,\
+ about.html,\
+ plugin.properties
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/plugin.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/plugin.properties
new file mode 100644
index 0000000000..6011411d6d
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/plugin.properties
@@ -0,0 +1,21 @@
+bundleName=SystemTap Dashboard Extension Plug-in (Incubation)
+bundleProvider=Eclipse Linux Tools
+
+command.exportScript.name=&Export Script...
+command.exportScript.desc=Export Script to the Dashboard
+
+actionset.export.name=Export Action Set
+action.exportScript.name=&Export Script...
+action.exportScript.desc=Export Script to the Dashboard
+
+command.createModule.name=&Create Module...
+command.createModule.desc=Create new Dashboard Module
+
+actionset.createModule.name=Create Module Action Set
+action.createModule.name=&Create Module...
+action.createModule.desc=Create new Dashboard Module
+
+
+action.viewScript.name=View Script
+action.addScript.name=Add Script
+action.deleteScript.name=Delete Script \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/plugin.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/plugin.xml
new file mode 100644
index 0000000000..f95219e6c8
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/plugin.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.startup">
+ <!--startup class=""-->
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ name="%command.exportScript.name"
+ description="%command.exportScript.desc"
+ categoryId="org.eclipse.linuxtools.systemtap.ui.ide.category.file"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboardextension.commands.ExportScript"/>
+ <command
+ name="%command.createModule.name"
+ description="%command.createModule.desc"
+ categoryId="org.eclipse.linuxtools.systemtap.ui.dashboard.category.file"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboardextension.commands.CreateModuleAction"/>
+ </extension>
+ <extension
+ point="org.eclipse.ui.bindings">
+ <key
+ commandId="org.eclipse.linuxtools.systemtap.ui.dashboardextension.commands.ExportScript"
+ contextId="org.eclipse.ui.contexts.window"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+4"/>
+ <key
+ commandId="org.eclipse.linuxtools.systemtap.ui.dashboardextension.commands.CreateModuleAction"
+ contextId="org.eclipse.ui.contexts.window"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+5"/>
+ </extension>
+ <extension
+ point="org.eclipse.ui.actionSets">
+ <actionSet
+ label="%actionset.export.name"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboardextension.ExportScriptActionSet">
+ <action
+ label="%action.exportScript.name"
+ tooltip="%action.exportScript.desc"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboardextension.actions.ExportScript"
+ icon="icons/actions/export_wiz.gif"
+ toolbarPath="org.eclipse.ui.workbench.file/export.ext"
+ class="org.eclipse.linuxtools.systemtap.ui.dashboardextension.actions.ExportScriptAction"
+ definitionId="org.eclipse.linuxtools.systemtap.ui.dashboardextension.commands.ExportScript"
+ style="push"
+ state="false"/>
+ </actionSet>
+ </extension>
+ <extension
+ point="org.eclipse.ui.actionSets">
+ <actionSet
+ label="%actionset.createModule.name"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboardextension.CreateModuleActionSet">
+ <action
+ label="%action.createModule.name"
+ tooltip="%action.createModule.desc"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboardextension.actions.CreateModuleAction"
+ icon="icons/actions/mod_obj.gif"
+ toolbarPath="org.eclipse.ui.workbench.file/export.ext"
+ class="org.eclipse.linuxtools.systemtap.ui.dashboardextension.actions.CreateModuleAction"
+ definitionId="org.eclipse.linuxtools.systemtap.ui.dashboardextension.commands.CreateModuleAction"
+ style="push"
+ state="true"/>
+ </actionSet>
+ </extension>
+
+
+ <extension
+ point="org.eclipse.ui.popupMenus">
+ <objectContribution
+ adaptable="false"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboardextension.ViewScriptMenu"
+ objectClass="org.eclipse.linuxtools.systemtap.ui.dashboard.structures.ModuleTreeNode">
+ <action
+ label="%action.viewScript.name"
+ class="org.eclipse.linuxtools.systemtap.ui.dashboardextension.actions.ViewScriptAction"
+ icon="icons/actions/file_obj.gif"
+ menubarPath="file.ext"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboardextension.ViewScriptAction"
+ style="push"/>
+ <!--<action
+ class="org.eclipse.linuxtools.systemtap.ui.dashboardextension.actions.AddScriptAction"
+ icon="icons/actions/file_obj.gif"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboardextension.AddScriptAction"
+ label="%action.addScript.name"
+ menubarPath="file.ext"
+ style="push">
+ </action>-->
+ ,<!--<action
+ class="org.eclipse.linuxtools.systemtap.ui.dashboardextension.actions.DeleteScriptAction"
+ icon="icons/actions/file_obj.gif"
+ id="org.eclipse.linuxtools.systemtap.ui.dashboardextension.DeleteScriptAction"
+ label="%action.deleteScript.name"
+ menubarPath="file.ext"
+ style="push">
+ </action>-->
+ </objectContribution>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.perspectiveExtensions">
+ <perspectiveExtension
+ targetID="org.eclipse.linuxtools.systemtap.ui.ide.IDEPerspective">
+ <actionSet id="org.eclipse.linuxtools.systemtap.ui.dashboardextension.ExportScriptActionSet"/>
+ </perspectiveExtension>
+ <perspectiveExtension
+ targetID="org.eclipse.linuxtools.systemtap.ui.dashboard.DashboardPerspective">
+ <actionSet id="org.eclipse.linuxtools.systemtap.ui.dashboardextension.CreateModuleActionSet"/>
+ </perspectiveExtension>
+ </extension>
+</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/src/org/eclipse/linuxtools/systemtap/ui/dashboardextension/dialogs/ScriptDetails.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/src/org/eclipse/linuxtools/systemtap/ui/dashboardextension/dialogs/ScriptDetails.java
new file mode 100644
index 0000000000..397f2860ac
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/src/org/eclipse/linuxtools/systemtap/ui/dashboardextension/dialogs/ScriptDetails.java
@@ -0,0 +1,129 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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 - Anithra P J
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.systemtap.ui.dashboardextension.dialogs;
+
+
+
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Dialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.events.SelectionEvent;
+
+import org.eclipse.linuxtools.systemtap.ui.dashboard.internal.DashboardPlugin;
+import org.eclipse.linuxtools.systemtap.ui.dashboard.preferences.DashboardPreferenceConstants;
+
+public class ScriptDetails extends Dialog {
+ private Text dirText;
+ private Text scriptText;
+ private Button OKButton;
+ private Button cancelButton;
+ private boolean canceled = true;
+
+ public ScriptDetails(Shell parent) {
+ super(parent);
+ }
+
+ /**
+ * This allows outside classes to determine if the user clicked ok or cancel.
+ * @return boolean representing whether the cancel button was pressed or not
+ */
+ public boolean isCanceled() {
+ return canceled;
+ }
+
+ public void open() {
+
+ Shell parent = getParent();
+ final Shell shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
+ shell.setText("Enter Script details");
+ shell.setSize(350, 160);
+
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ layout.makeColumnsEqualWidth = false;
+ shell.setLayout(layout);
+
+ GridData data = new GridData();
+ data.grabExcessHorizontalSpace = false;
+ data.horizontalAlignment = SWT.LEFT;
+ Label dirLabel = new Label(shell, SWT.NONE);
+ dirLabel.setText("Examples Dir: ");
+ dirLabel.setLayoutData(data);
+
+ data = new GridData();
+ data.grabExcessHorizontalSpace = true;
+ data.horizontalAlignment = SWT.FILL;
+ dirText = new Text(shell, SWT.SINGLE | SWT.BORDER);
+ dirText.setLayoutData(data);
+ dirText.setText(DashboardPlugin.getDefault().getPluginPreferences().getString(DashboardPreferenceConstants.P_DASHBOARD_EXAMPLES_DIR));
+
+ data = new GridData();
+ data.grabExcessHorizontalSpace = false;
+ data.horizontalAlignment = SWT.LEFT;
+ Label scriptLabel = new Label(shell, SWT.NONE);
+ scriptLabel.setText("Script: ");
+ scriptLabel.setLayoutData(data);
+
+ data = new GridData();
+ data.grabExcessHorizontalSpace = true;
+ data.horizontalAlignment = SWT.FILL;
+ scriptText = new Text(shell, SWT.SINGLE | SWT.BORDER);
+ scriptText.setLayoutData(data);
+ //scriptText.setText(ConsoleLogPlugin.getDefault().getPluginPreferences().getString(ConsoleLogPreferenceConstants.SCP_PASSWORD));
+
+
+ data = new GridData();
+ data.horizontalAlignment = SWT.RIGHT;
+ cancelButton = new Button(shell, SWT.PUSH);
+ cancelButton.setLayoutData(data);
+ cancelButton.setSize(50, 100);
+ cancelButton.setText("Cancel");
+ cancelButton.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ shell.dispose();
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {}
+ });
+
+ data = new GridData();
+ data.horizontalAlignment = SWT.RIGHT;
+ OKButton = new Button(shell, SWT.PUSH);
+ OKButton.setLayoutData(data);
+ OKButton.setSize(50, 100);
+ OKButton.setText("OK");
+ OKButton.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ // FIXME: no error handling is done, should probably be
+ // pushed down to the connection level
+ // Set the preferences to this new info.
+ DashboardPlugin.getDefault().getPreferenceStore().setValue(DashboardPreferenceConstants.P_DASHBOARD_EXAMPLES_DIR, dirText.getText());
+ DashboardPlugin.getDefault().getPreferenceStore().setValue(DashboardPreferenceConstants.P_DASHBOARD_SCRIPT, scriptText.getText());
+ canceled = false;
+ shell.close();
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {}
+ });
+
+ shell.open();
+ Display display = parent.getDisplay();
+ while (!shell.isDisposed()) {
+ if (!display.readAndDispatch()) display.sleep();
+ }
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/ChangeLog
new file mode 100644
index 0000000000..174b7f48db
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/ChangeLog
@@ -0,0 +1,46 @@
+2010-06-04 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ bz 30629
+ * src/org/eclipse/linuxtools/systemtap/ui/editor/actions/file/OpenFileAction.java (run):
+
+2010-06-04 Andrew Overholt <overholt@redhat.com>
+
+ Bug #282039
+
+ * plugin.properties: Externalize bundle name and provider.
+ * plugin.xml: Likewise.
+
+2010-02-04 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * META-INF/MANIFEST.MF: removed version dependency for org.eclipse.ui bundle
+
+2010-01-29 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * src/org/eclipse/linuxtools/systemtap/ui/editor/actions/file/NewFileAction.java (queryFile):
+ * src/org/eclipse/linuxtools/systemtap/ui/editor/SimpleDocumentProvider.java (doSaveDocument):
+ (isReadOnly):
+ (setDocumentContent):
+ (isModifiable):
+
+2009-11-16 Andrew Overholt <overholt@redhat.com>
+
+ * META-INF/MANIFEST.MF: Fix Bundle-Name.
+
+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-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * src/org/eclipse/linuxtools/systemtap/ui/editor/ColorManager.java (dispose):
+ (getColor): Replacing with Phil's code
+ * src/org/eclipse/linuxtools/systemtap/ui/editor/SimpleEditor.java:
+
+
+2009-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * ChangeLog: Refactoring. Renaming all packages directories from *.systemtapgui.* to *.systemtap.ui.* \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..98a4c1b9b2
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %bundleName
+Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.editor;singleton:=true
+Bundle-Version: 0.3.0.qualifier
+Bundle-Activator: org.eclipse.linuxtools.systemtap.ui.editor.internal.EditorPlugin
+Bundle-Vendor: %bundleProvider
+Bundle-Localization: plugin
+Export-Package: org.eclipse.linuxtools.systemtap.ui.editor,
+ org.eclipse.linuxtools.systemtap.ui.editor.actions.file
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.jface.text;visibility:=reexport,
+ org.eclipse.ui.editors;visibility:=reexport,
+ org.eclipse.ui.workbench.texteditor;visibility:=reexport,
+ org.eclipse.ui
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/about.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/about.html
new file mode 100644
index 0000000000..23506a4bae
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/about.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>About</title>
+</head><body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/build.properties
new file mode 100644
index 0000000000..4a9177f64d
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+ META-INF/,\
+ icons/,\
+ .,\
+ about.html,\
+ plugin.properties
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/plugin.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/plugin.properties
new file mode 100644
index 0000000000..6f1c578522
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/plugin.properties
@@ -0,0 +1,19 @@
+bundleName=SystemTap Script Editor (Incubation)
+bundleProvider=Eclipse Linux Tools
+
+category.file.name=File
+category.file.desc=File
+
+menu.recentFiles.name=Recent Files
+menu.recentFiles.slot0.name=1 NA
+menu.recentFiles.slot1.name=2 NA
+menu.recentFiles.slot2.name=3 NA
+menu.recentFiles.slot3.name=4 NA
+
+actionset.file.name=File Action Set
+action.open.name=&Open File
+action.open.desc=Open a file
+action.new.name=&New File
+action.new.desc=Create a new file
+
+
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/actions/file/OpenFileAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/actions/file/OpenFileAction.java
new file mode 100644
index 0000000000..3be1d56e2c
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.editor/src/org/eclipse/linuxtools/systemtap/ui/editor/actions/file/OpenFileAction.java
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * 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.editor.actions.file;
+
+import java.io.File;
+import java.text.MessageFormat;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.linuxtools.systemtap.ui.editor.PathEditorInput;
+import org.eclipse.linuxtools.systemtap.ui.editor.SimpleEditor;
+import org.eclipse.linuxtools.systemtap.ui.editor.actions.EditorAction;
+import org.eclipse.linuxtools.systemtap.ui.editor.internal.Localization;
+import org.eclipse.linuxtools.systemtap.ui.editor.internal.RecentFileLog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.ui.IEditorDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorRegistry;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+
+
+
+public class OpenFileAction extends EditorAction {
+
+ private boolean successful;
+
+ public OpenFileAction() {
+ super();
+ setEnabled(true);
+ successful = false;
+ }
+
+ public void run(IAction act) {
+ run();
+ }
+
+ /**
+ * Opens the editor input.
+ */
+ public void run() {
+ successful = false;
+ if (window == null)
+ window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ File file = queryFile();
+ if (file != null) {
+ IEditorInput input= createEditorInput(file);
+ String editorId= getEditorId(file);
+ IWorkbenchPage page= window.getActivePage();
+ try {
+ page.openEditor(input, editorId);
+ RecentFileLog.updateRecentFiles(file);
+ successful = true;
+ } catch (PartInitException e) {}
+ } else if (file != null) {
+ String msg = MessageFormat.format(Localization.getString("OpenFileAction.FileIsNull"), (Object [])(new String[] {file.getName()}));
+ MessageDialog.openWarning(window.getShell(), Localization.getString("OpenFileAction.Problem"), msg);
+ }
+ }
+
+ /**
+ * Request the name and location of the file to the user.
+ * @return the File object associated to the selected file.
+ */
+ protected File queryFile() {
+ FileDialog dialog= new FileDialog(window.getShell(), SWT.OPEN);
+ dialog.setText(Localization.getString("OpenFileAction.OpenFile"));
+ String path= dialog.open();
+ if (path != null && path.length() > 0)
+ return new File(path);
+ return null;
+ }
+
+ /**
+ * Returns the editor ID associated with the specified file.
+ * @param file the file to examine
+ * @return the editor ID
+ */
+ protected String getEditorId(File file) {
+ IWorkbench workbench= window.getWorkbench();
+ IEditorRegistry editorRegistry= workbench.getEditorRegistry();
+ IEditorDescriptor descriptor= editorRegistry.getDefaultEditor(file.getName());
+ if (descriptor != null && descriptor.getId().startsWith("org.eclipse.linuxtools.systemtap.ui")) { //TODO: descriptor.getId().startsWith("org.eclipse.linuxtools.systemtap.ui") is a temparary fix until we find out why .txt files are opening with org.eclipse.ui.DefautTextEditor //$NON-NLS-1$
+ return descriptor.getId();
+ }
+ return SimpleEditor.ID;
+ }
+
+ /**
+ * Creates an editor input.
+ * @param file the file you wish the editor to point at
+ * @return the input created
+ */
+ protected IEditorInput createEditorInput(File file) {
+ IPath location= new Path(file.getAbsolutePath());
+ PathEditorInput input= new PathEditorInput(location);
+ return input;
+ }
+
+ public boolean isSuccessful() {
+ return successful;
+ }
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphicalrun/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphicalrun/ChangeLog
new file mode 100644
index 0000000000..199e567564
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphicalrun/ChangeLog
@@ -0,0 +1,39 @@
+2010-06-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * plugin.xml: Removing invalid Menu Extensions
+
+ Bug #315440
+
+
+2010-06-02 Roland Grunberg <rgrunber@redhat.com>
+
+ * plugin.xml: Switch "Modify Parsing Expression" to M1+M3+F6 [Ctrl+Shift+F6] to avoid
+ collision with printing.
+
+2010-06-04 Andrew Overholt <overholt@redhat.com>
+
+ Bug #282039
+
+ * plugin.properties: Externalize bundle name and provider.
+ * plugin.xml: Likewise.
+
+2010-01-29 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * META-INF/MANIFEST.MF: Changed Bundle-version
+
+
+2010-01-29 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * .classpath: New file.
+ * .project: New file.
+ * bin: New file.
+ * build.properties: New file.
+ * icons/actions/regEx.gif: New file.
+ * icons/actions/run_chart.gif: New file.
+ * META-INF/MANIFEST.MF: New file.
+ * plugin.properties: New file.
+ * plugin.xml: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/graphicalrun/actions/ModifyParsingAction.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/graphicalrun/actions/RunScriptChartAction.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/graphicalrun/internal/GraphicalRunPlugin.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/graphicalrun/structures/ChartStreamDaemon2.java: \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphicalrun/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphicalrun/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..3837dea252
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphicalrun/META-INF/MANIFEST.MF
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %bundleName
+Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.graphicalrun; singleton:=true
+Bundle-Version: 0.3.0.qualifier
+Bundle-Activator: org.eclipse.linuxtools.systemtap.ui.graphicalrun.internal.GraphicalRunPlugin
+Bundle-Vendor: %bundleProvider
+Bundle-Localization: plugin
+Export-Package: org.eclipse.linuxtools.systemtap.ui.graphicalrun.structures
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.linuxtools.systemtap.ui.consolelog,
+ org.eclipse.linuxtools.systemtap.ui.editor,
+ org.eclipse.linuxtools.systemtap.ui.logging,
+ org.eclipse.linuxtools.systemtap.ui.graphing,
+ org.eclipse.linuxtools.systemtap.ui.structures,
+ org.eclipse.linuxtools.systemtap.ui.ide,
+ org.eclipse.linuxtools.systemtap.ui.systemtapgui,
+ org.eclipse.linuxtools.systemtap.ui.graphingapi.ui,
+ org.eclipse.core.resources;bundle-version="3.4.1"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphicalrun/about.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphicalrun/about.html
new file mode 100644
index 0000000000..23506a4bae
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphicalrun/about.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>About</title>
+</head><body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphicalrun/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphicalrun/build.properties
new file mode 100644
index 0000000000..b418be782e
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphicalrun/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+ META-INF/,\
+ .,\
+ icons/,\
+ about.html,\
+ plugin.properties
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphicalrun/plugin.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphicalrun/plugin.properties
new file mode 100644
index 0000000000..22796f523e
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphicalrun/plugin.properties
@@ -0,0 +1,18 @@
+bundleName=GraphicalRun Plug-in (Incubation)
+bundleProvider=Eclipse Linux Tools
+
+command.runChart.name=Run w/C&hart
+command.runChart.desc=Run the Script w/Chart
+command.modifyParsing.name=Modify &Parsing Expression
+command.modifyParsing.desc=Modify Parsing Expression
+
+category.edit.name=Edit
+category.edit.desc=Edit
+
+actionset.graphicalRun.name=Graphical Run Action Set
+action.runChart.name=Run w/C&hart
+action.runChart.desc=Run the Script w/Chart
+
+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.graphicalrun/plugin.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphicalrun/plugin.xml
new file mode 100644
index 0000000000..703ecbcb9a
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphicalrun/plugin.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.startup">
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ name="%command.runChart.name"
+ description="%command.runChart.desc"
+ categoryId="org.eclipse.linuxtools.systemtap.ui.ide.category.run"
+ id="org.eclipse.linuxtools.systemtap.ui.graphicalrun.commands.RunScriptChart"/>
+ <command
+ name="%command.modifyParsing.name"
+ description="%command.modifyParsing.desc"
+ categoryId="org.eclipse.linuxtools.systemtap.ui.graphing.category.edit"
+ id="org.eclipse.linuxtools.systemtap.ui.graphicalrun.commands.ModifyParsing"/>
+
+ <category
+ name="%category.edit.name"
+ description="%category.edit.desc"
+ id="org.eclipse.linuxtools.systemtap.ui.graphing.category.edit"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.bindings">
+ <key
+ commandId="org.eclipse.linuxtools.systemtap.ui.graphicalrun.commands.RunScriptChart"
+ contextId="org.eclipse.ui.contexts.window"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+M3+F5"/>
+ <key
+ commandId="org.eclipse.linuxtools.systemtap.ui.graphicalrun.commands.ModifyParsing"
+ contextId="org.eclipse.ui.contexts.window"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+M3+F6"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.actionSets">
+ <actionSet
+ label="%actionset.graphicalRun.name"
+ visible="false"
+ id="org.eclipse.linuxtools.systemtap.ui.graphicalrun.GraphicalRunActionSet">
+ <action
+ label="%action.runChart.name"
+ tooltip="%action.runChart.desc"
+ id="org.eclipse.linuxtools.systemtap.ui.graphicalrun.actions.RunScriptChartAction"
+ icon="icons/actions/run_chart.gif"
+ toolbarPath="org.eclipse.ui.workbench.file/build.ext"
+ class="org.eclipse.linuxtools.systemtap.ui.graphicalrun.actions.RunScriptChartAction"
+ definitionId="org.eclipse.linuxtools.systemtap.ui.graphicalrun.commands.RunScriptChart"
+ style="push"
+ state="false"/>
+ </actionSet>
+ <actionSet
+ label="%actionset.modifyParsing.name"
+ visible="false"
+ id="org.eclipse.linuxtools.systemtap.ui.graphicalrun.ParsingActionSet">
+ <action
+ label="%action.modifyParsing.name"
+ tooltip="%action.modifyParsing.name"
+ id="org.eclipse.linuxtools.systemtap.ui.graphicalrun.actions.ModifyParsingAction"
+ icon="icons/actions/regEx.gif"
+ toolbarPath="org.eclipse.ui.workbench.file/build.ext"
+ menubarPath="edit/edit.ext"
+ class="org.eclipse.linuxtools.systemtap.ui.graphicalrun.actions.ModifyParsingAction"
+ definitionId="org.eclipse.linuxtools.systemtap.ui.graphicalrun.commands.ModifyParsing"
+ style="push"
+ state="false"/>
+ </actionSet>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.perspectiveExtensions">
+ <perspectiveExtension
+ targetID="org.eclipse.linuxtools.systemtap.ui.ide.IDEPerspective">
+ <actionSet id="org.eclipse.linuxtools.systemtap.ui.graphicalrun.GraphicalRunActionSet"/>
+ </perspectiveExtension>
+ <perspectiveExtension
+ targetID="org.eclipse.linuxtools.systemtap.ui.graphing.GraphingPerspective">
+ <actionSet id="org.eclipse.linuxtools.systemtap.ui.consolelog.StopActionSet"/>
+ <actionSet id="org.eclipse.linuxtools.systemtap.ui.graphicalrun.ParsingActionSet"/>
+ <view
+ ratio="0.60f"
+ 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>
+ </extension>
+</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/ChangeLog
new file mode 100644
index 0000000000..708363cae7
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/ChangeLog
@@ -0,0 +1,38 @@
+2010-06-02 Roland Grunberg <rgrunber@redhat.com>
+
+ * plugin.xml: Fix BZ #315223. Identical ActionSet in GraphicalRun
+
+2010-06-04 Andrew Overholt <overholt@redhat.com>
+
+ Bug #282039
+
+ * plugin.properties: Externalize bundle name and provider.
+ * plugin.xml: Likewise.
+
+2010-01-29 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * src/org/eclipse/linuxtools/systemtap/ui/graphing/actions/ModifyParsingAction.java: Removed.
+ * src/org/eclipse/linuxtools/systemtap/ui/graphing/actions/SaveGraphImageAction.java (getImage):
+ (run):
+ (getGraph):
+ * src/org/eclipse/linuxtools/systemtap/ui/graphing/structures/GraphDisplaySet.java (builders):
+ (.close):
+ (ButtonClickListener.widgetSelected):
+ (getActiveGraph):
+ (GraphDisplaySet):
+
+2009-11-16 Andrew Overholt <overholt@redhat.com>
+
+ * META-INF/MANIFEST.MF: Fix Bundle-Name.
+
+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-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * ChangeLog: Refactoring. Renaming all packages directories from *.systemtapgui.* to *.systemtap.ui.* \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..efe4b1b549
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/META-INF/MANIFEST.MF
@@ -0,0 +1,26 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %bundleName
+Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.graphing;singleton:=true
+Bundle-Version: 0.3.0.qualifier
+Bundle-Activator: org.eclipse.linuxtools.systemtap.ui.graphing.internal.GraphingPlugin
+Bundle-Vendor: %bundleProvider
+Bundle-Localization: plugin
+Export-Package: org.eclipse.linuxtools.systemtap.ui.graphing,
+ org.eclipse.linuxtools.systemtap.ui.graphing.structures,
+ org.eclipse.linuxtools.systemtap.ui.graphing.views
+Require-Bundle: org.eclipse.linuxtools.systemtap.ui.graphingapi.ui,
+ org.eclipse.linuxtools.systemtap.ui.structures,
+ org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.linuxtools.systemtap.ui.logging,
+ org.eclipse.ui.forms,
+ org.eclipse.linuxtools.systemtap.ui.systemtapgui,
+ org.eclipse.core.resources;bundle-version="3.4.1",
+ org.eclipse.ui.editors;bundle-version="3.4.0",
+ org.eclipse.ui.console;bundle-version="3.3.0"
+Bundle-ActivationPolicy: lazy
+Import-Package: org.eclipse.linuxtools.systemtap.ui.consolelog.actions,
+ org.eclipse.linuxtools.systemtap.ui.consolelog.structures,
+ org.eclipse.linuxtools.systemtap.ui.editor
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/about.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/about.html
new file mode 100644
index 0000000000..23506a4bae
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/about.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>About</title>
+</head><body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/build.properties
new file mode 100644
index 0000000000..d153f12289
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/build.properties
@@ -0,0 +1,10 @@
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+ META-INF/,\
+ .,\
+ icons/,\
+ documentation/,\
+ toc.xml,\
+ about.html,\
+ plugin.properties
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/plugin.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/plugin.properties
new file mode 100644
index 0000000000..d4ebcc5837
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/plugin.properties
@@ -0,0 +1,34 @@
+bundleName=SystemTap Graphing Plug-In (Incubation)
+bundleProvider=Eclipse Linux Tools
+
+perspective.graphing.name=SystemTap Graphing
+
+view.graphSelector.name=Graph Selector
+
+preference.graphing.name=SystemTap Graphing
+
+command.open.name=Open Script Output
+command.open.desc=Open script output file
+command.import.name=Import Data Set
+command.import.desc=Import data set from file
+command.export.name=Export Data Set
+command.export.desc=Export data set to file
+command.save.name=Save Graph
+command.save.desc=Save graph as image
+
+category.file.name=File2
+cateogry.file.desc=File2
+
+actionset.graph.name=Graph Display Action Set
+action.open.name=Open Script Output
+action.open.desc=Open script output file
+action.import.name=Import Data Set
+action.import.desc=Import data set from file
+action.export.name=Export Data Set
+action.export.desc=Export data set to file
+action.save.name=Save Graph
+action.save.desc=Save graph as image
+
+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.graphing/plugin.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/plugin.xml
new file mode 100644
index 0000000000..5f285ccd88
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/plugin.xml
@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.perspectives">
+ <perspective
+ name="%perspective.graphing.name"
+ class="org.eclipse.linuxtools.systemtap.ui.graphing.GraphingPerspective"
+ icon="icons/perspective_obj.gif"
+ id="org.eclipse.linuxtools.systemtap.ui.graphing.GraphingPerspective"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.views">
+ <view
+ allowMultiple="false"
+ category="org.eclipse.linuxtools.systemtap.ui"
+ class="org.eclipse.linuxtools.systemtap.ui.graphing.views.GraphSelectorView"
+ icon="icons/views/selector_obj.gif"
+ id="org.eclipse.linuxtools.systemtap.ui.graphing.views.GraphSelectorView"
+ name="%view.graphSelector.name">
+ </view>
+ </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.preferencePages">
+ <page
+ name="%preference.graphing.name"
+ id="com.qualityeclipse.systemtap.prefs.graphing"
+ class="org.eclipse.linuxtools.systemtap.ui.graphing.preferences.GraphingPreferencePage"
+ category="com.qualityeclipse.systemtap.prefs.view"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.core.runtime.preferences">
+ <initializer class="org.eclipse.linuxtools.systemtap.ui.graphing.preferences.PreferenceInitializer"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ name="%command.open.name"
+ description="%command.open.desc"
+ categoryId="org.eclipse.linuxtools.systemtap.ui.graphing.category.file"
+ id="org.eclipse.linuxtools.systemtap.ui.graphing.commands.OpenScriptOutput"/>
+ <command
+ name="%command.export.name"
+ description="%command.export.desc"
+ categoryId="org.eclipse.linuxtools.systemtap.ui.graphing.category.file"
+ id="org.eclipse.linuxtools.systemtap.ui.graphing.commands.ExportDataSet"/>
+ <command
+ name="%command.save.name"
+ description="%command.save.desc"
+ categoryId="org.eclipse.linuxtools.systemtap.ui.graphing.category.file"
+ id="org.eclipse.linuxtools.systemtap.ui.graphing.commands.SaveGraphImage"/>
+ <command
+ name="%command.import.name"
+ description="%command.import.desc"
+ categoryId="org.eclipse.linuxtools.systemtap.ui.graphing.category.file"
+ id="org.eclipse.linuxtools.systemtap.ui.graphing.commands.ImportDataSet"/>
+
+ <category
+ name="%category.file.name"
+ description="%category.file.desc"
+ id="org.eclipse.linuxtools.systemtap.ui.graphing.category.file"/>
+ <command
+ name="%command.modifyParsing.name"
+ description="%command.modifyParsing.desc"
+ categoryId="org.eclipse.linuxtools.systemtap.ui.graphing.category.edit"
+ id="org.eclipse.linuxtools.systemtap.ui.graphing.commands.ModifyParsing"/>
+
+ <category
+ name="%category.edit.name"
+ description="%category.edit.desc"
+ id="org.eclipse.linuxtools.systemtap.ui.graphing.category.edit"/>
+ </extension>
+
+
+ <extension
+ point="org.eclipse.ui.actionSets">
+ <actionSet
+ label="actionset.graph.name"
+ visible="false"
+ id="org.eclipse.linuxtools.systemtap.ui.graphing.GraphingActionSet">
+ <action
+ label="%action.save.name"
+ tooltip="%action.save.desc"
+ id="org.eclipse.linuxtools.systemtap.ui.graphing.actions.SaveGraphImage"
+ icon="icons/actions/save_wiz.gif"
+ toolbarPath="org.eclipse.ui.workbench.file/save.ext"
+ class="org.eclipse.linuxtools.systemtap.ui.graphing.actions.SaveGraphImageAction"
+ definitionId="org.eclipse.linuxtools.systemtap.ui.graphing.commands.SaveGraphImage"
+ style="push"
+ state="false"/>
+ <action
+ label="%action.export.name"
+ tooltip="%action.export.desc"
+ id="org.eclipse.linuxtools.systemtap.ui.graphing.actions.ExportDataSet"
+ icon="icons/actions/export_wiz.gif"
+ toolbarPath="org.eclipse.ui.workbench.file/export.ext"
+ class="org.eclipse.linuxtools.systemtap.ui.graphing.actions.ExportDataSetAction"
+ definitionId="org.eclipse.linuxtools.systemtap.ui.graphing.commands.ExportDataSet"
+ style="push"
+ state="false"/>
+ <action
+ label="%action.import.name"
+ tooltip="%action.import.desc"
+ id="org.eclipse.linuxtools.systemtap.ui.graphing.actions.ImportDataSet"
+ icon="icons/actions/import_wiz.gif"
+ toolbarPath="org.eclipse.ui.workbench.file/import.ext"
+ class="org.eclipse.linuxtools.systemtap.ui.graphing.actions.ImportDataSetAction"
+ definitionId="org.eclipse.linuxtools.systemtap.ui.graphing.commands.ImportDataSet"
+ style="push"
+ state="false"/>
+ <action
+ label="%action.open.name"
+ tooltip="%action.open.desc"
+ id="org.eclipse.linuxtools.systemtap.ui.graphing.actions.OpenScriptOutput"
+ icon="icons/actions/open_wiz.gif"
+ toolbarPath="org.eclipse.ui.workbench.file/new.ext"
+ class="org.eclipse.linuxtools.systemtap.ui.graphing.actions.OpenScriptOutputAction"
+ definitionId="org.eclipse.linuxtools.systemtap.ui.graphing.commands.OpenScriptOutput"
+ style="push"
+ state="false"/>
+ </actionSet>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.perspectiveExtensions">
+ <perspectiveExtension
+ targetID="org.eclipse.linuxtools.systemtap.ui.graphing.GraphingPerspective">
+ <actionSet id="org.eclipse.linuxtools.systemtap.ui.graphing.GraphingActionSet"/>
+ </perspectiveExtension>
+ <perspectiveExtension
+ targetID="org.eclipse.linuxtools.systemtap.ui.graphing.GraphingPerspective">
+
+ <view
+ ratio="0.60f"
+ relative="org.eclipse.linuxtools.systemtap.ui.graphing.views.GraphSelectorView"
+ relationship="top"
+ id="org.eclipse.linuxtools.systemtap.ui.graphing.views.GraphSelectorView"/>
+ <viewShortcut id="org.eclipse.linuxtools.systemtap.ui.graphing.views.GraphSelectorView"/>
+
+ </perspectiveExtension>
+ </extension>
+</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/ChangeLog
new file mode 100644
index 0000000000..7f290b0cd8
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/ChangeLog
@@ -0,0 +1,27 @@
+2010-06-04 Andrew Overholt <overholt@redhat.com>
+
+ Bug #282039
+
+ * plugin.properties: Externalize bundle name and provider.
+ * plugin.xml: Likewise.
+
+2010-01-29 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/structures/ChartStreamDaemon2.java: Removed.
+ * src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/IGraphColorConstants.java (COLORS):
+
+2009-11-16 Andrew Overholt <overholt@redhat.com>
+
+ * META-INF/MANIFEST.MF: Fix bundle name.
+
+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-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * ChangeLog: Refactoring. Renaming all packages directories from *.systemtapgui.* to *.systemtap.ui.* \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..7d31259d5f
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/META-INF/MANIFEST.MF
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %bundleName
+Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui;singleton:=true
+Bundle-Version: 0.3.0.qualifier
+Bundle-Activator: org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.internal.GraphingAPINonUIPlugin
+Bundle-Localization: plugin
+Bundle-Vendor: %bundleProvider
+Export-Package: org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui,
+ org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.adapters,
+ org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.aggregates,
+ org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets,
+ org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.row,
+ org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.table,
+ org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.filters,
+ org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.structures
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.linuxtools.systemtap.ui.structures
+Bundle-ActivationPolicy: lazy
+Import-Package: org.eclipse.linuxtools.systemtap.ui.consolelog.structures
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/about.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/about.html
new file mode 100644
index 0000000000..23506a4bae
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/about.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>About</title>
+</head><body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/build.properties
index c6baffa001..eaa54463cd 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.local.callgraph.tests/build.properties
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/build.properties
@@ -2,4 +2,6 @@ source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
- icons/
+ src/,\
+ about.html,\
+ plugin.properties
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/plugin.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/plugin.properties
new file mode 100644
index 0000000000..4afcbae30e
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/plugin.properties
@@ -0,0 +1,2 @@
+bundleName=SystemTap Graphing API (non-UI) (Incubation)
+bundleProvider=Eclipse Linux Tools \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/ChangeLog
new file mode 100644
index 0000000000..cf759baa80
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/ChangeLog
@@ -0,0 +1,55 @@
+2010-06-04 Andrew Overholt <overholt@redhat.com>
+
+ Bug #282039
+
+ * plugin.properties: Externalize bundle name and provider.
+ * plugin.xml: Likewise.
+
+2010-01-29 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/chart/widget/ChartCanvas.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/chart/widget/ChartWithToolTipCanvas.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/chart/widget/ICanvas.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/charts/AbstractChartBuilder.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/charts/AbstractChartWithAxisBuilder.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/charts/AbstractChartWithoutAxisBuilder.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/charts/AreaChartBuilder.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/charts/BarChartBuilder.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/charts/DialChartBuilder.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/charts/LineChartBuilder.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/charts/MeterChartBuilder.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/charts/PieChartBuilder.java: New file.
+ * src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/charts/ScatterChartBuilder.java: New file.
+ * META-INF/MANIFEST.MF:
+ * src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/graphs/IGraph.java:
+ * src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/internal/localization.properties:
+ * src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/preferences/PreferenceInitializer.java (initializeDefaultPreferences):
+ * src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphComposite.java (GraphComposite):
+ (configure):
+ (getCanvas):
+ (.widgetSelected):
+ (dispose):
+ * src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/dataset/ParsingWizardPage.java (createColumnSelector):
+ * src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/wizards/graph/GraphFactory.java (graphImages):
+ (graphIDs):
+ (getIndex):
+ (getAvailableGraphs):
+ (graphNames):
+ (createGraph):
+ (graphDescriptions):
+
+2009-11-16 Andrew Overholt <overholt@redhat.com>
+
+ * META-INF/MANIFEST.MF: Fix bundle name.
+
+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-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * ChangeLog: Refactoring. Renaming all packages directories from *.systemtapgui.* to *.systemtap.ui.* \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..fa48951fed
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,27 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %bundleName
+Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.graphingapi.ui;singleton:=true
+Bundle-Version: 0.3.0.qualifier
+Bundle-Activator: org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.internal.GraphingAPIUIPlugin
+Bundle-Vendor: %bundleProvider
+Bundle-Localization: plugin
+Export-Package:
+ org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.chart.widget,
+ org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.charts,
+ org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.datadisplay,
+ org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.graphs,
+ org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.preferences,
+ org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.widgets,
+ org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.dataset,
+ org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.filter,
+ org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.wizards.graph
+Require-Bundle: org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui;visibility:=reexport,
+ org.eclipse.linuxtools.systemtap.ui.structures,
+ org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.ui.forms,
+ org.eclipse.birt.chart.engine
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.eclipse.birt.chart.model.component
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/about.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/about.html
new file mode 100644
index 0000000000..23506a4bae
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/about.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>About</title>
+</head><body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/build.properties
new file mode 100644
index 0000000000..b418be782e
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+ META-INF/,\
+ .,\
+ icons/,\
+ about.html,\
+ plugin.properties
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/plugin.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/plugin.properties
new file mode 100644
index 0000000000..984a4b701f
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/plugin.properties
@@ -0,0 +1,6 @@
+bundleName=SystemTap Graphing API (UI) (Incubation)
+bundleProvider=Eclipse Linux Tools
+
+preference.graphing.name=GraphingAPI
+preference.dataTable.name=Data Table
+preference.graph.name=Graph
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/plugin.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/plugin.xml
new file mode 100644
index 0000000000..ae405e66c7
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/plugin.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ category="com.qualityeclipse.systemtap.prefs.view"
+ class="org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.preferences.GraphingAPIPreferencePage"
+ id="com.qualityeclipse.generic.prefs.graphingapi"
+ name="%preference.graphing.name"/>
+ <page
+ name="%preference.dataTable.name"
+ id="com.qualityeclipse.generic.prefs.graphing.datatable"
+ class="org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.preferences.DataTablePreferencePage"
+ category="com.qualityeclipse.generic.prefs.graphingapi"/>
+ <page
+ name="%preference.graph.name"
+ id="com.qualityeclipse.generic.prefs.graphing.graph"
+ class="org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.preferences.GraphPreferencePage"
+ category="com.qualityeclipse.generic.prefs.graphingapi"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.core.runtime.preferences">
+ <initializer class="org.eclipse.linuxtools.systemtap.ui.graphingapi.ui.preferences.PreferenceInitializer"/>
+ </extension>
+</plugin>
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..ace189b69b
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/ChangeLog
@@ -0,0 +1,124 @@
+2010-06-08 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptAction.java (getFilePath):
+ * src/org/eclipse/linuxtools/systemtap/ui/ide/views/BrowserView.java (ViewUpdater.handleUpdateEvent):
+
+ Bug #315988
+ Bug #304206
+
+2010-06-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * plugin.xml: Removing RunwithChart action
+
+ Bug #315225
+
+2010-06-05 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * src/org/eclipse/linuxtools/systemtap/ui/ide/internal/localization.properties:
+
+ Bug #315650
+
+2010-06-04 Andrew Overholt <overholt@redhat.com>
+
+ Bug #282039
+
+ * plugin.properties: Externalize bundle name and provider.
+ * plugin.xml: Likewise.
+
+2010-03-15 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptAction.java (getFilePath): Bz 304206
+
+2010-01-29 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptChartAction.java: Removed.
+ * src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/FunctionBrowserAction.java (run):
+ * src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/ProbeAliasAction.java (run):
+ * src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptAction.java (getImportedTapsets):
+ (isValidFile):
+ (buildStandardScript):
+ (isValid):
+ (run):
+ (getFilePath):
+ (createClientSession):
+ (isValidDirectory):
+ (finalizeScript):
+ (getImportedTapsets):
+ (isValidFile):
+ (buildStandardScript):
+ (isValidDirectory):
+ (finalizeScript):
+ * src/org/eclipse/linuxtools/systemtap/ui/ide/editors/c/CEditor.java (checkProbe):
+ * src/org/eclipse/linuxtools/systemtap/ui/ide/editors/stp/STPDocumentProvider.java:
+
+2009-11-16 Andrew Overholt <overholt@redhat.com>
+
+ * META-INF/MANIFEST.MF: Fix bundle name.
+
+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..a9026472a3
--- /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: %bundleName
+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: %bundleProvider
+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/about.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/about.html
new file mode 100644
index 0000000000..23506a4bae
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/about.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>About</title>
+</head><body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html> \ No newline at end of file
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..c5e3e730de
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/build.properties
@@ -0,0 +1,10 @@
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+ META-INF/,\
+ .,\
+ icons/,\
+ toc.xml,\
+ documentation/,\
+ about.html,\
+ plugin.properties
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..ed1b2f8250
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.properties
@@ -0,0 +1,72 @@
+bundleName=SystemTap IDE Plug-in (Incubation)
+bundleProvider=Eclipse Linux Tools
+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..e5c21a7a19
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.xml
@@ -0,0 +1,305 @@
+<?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
+ allowMultiple="true"
+ category="org.eclipse.linuxtools.systemtap.ui"
+ class="org.eclipse.linuxtools.systemtap.ui.ide.views.FunctionBrowserView"
+ icon="icons/views/func_obj.gif"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.views.FunctionBrowserView"
+ name="%view.function.name"/>
+ <view
+ allowMultiple="true"
+ category="org.eclipse.linuxtools.systemtap.ui"
+ class="org.eclipse.linuxtools.systemtap.ui.ide.views.KernelBrowserView"
+ icon="icons/views/kernel_obj.gif"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.views.KernelBrowserView"
+ name="%view.kernel.name"/>
+ <view
+ allowMultiple="true"
+ category="org.eclipse.linuxtools.systemtap.ui"
+ class="org.eclipse.linuxtools.systemtap.ui.ide.views.ProbeAliasBrowserView"
+ icon="icons/views/probe_obj.gif"
+ id="org.eclipse.linuxtools.systemtap.ui.ide.views.ProbeAliasBrowserView"
+ name="%view.probe.name"/>
+ </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.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.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/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..21044bb52f
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptAction.java
@@ -0,0 +1,342 @@
+/*******************************************************************************
+ * 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:
+ * Jeff Briggs, Henry Hughes, Ryan Morse, Roland Grunberg, Anithra P J
+ *******************************************************************************/
+
+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.text.MessageFormat;
+import java.util.ArrayList;
+
+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.ScpClient;
+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.StapErrorParser;
+import org.eclipse.linuxtools.systemtap.ui.ide.structures.TapsetLibrary;
+import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
+import org.eclipse.linuxtools.systemtap.ui.structures.PasswordPrompt;
+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.ide.ResourceUtil;
+
+
+
+/**
+ * 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(ConsoleLogPlugin.getDefault().getPluginPreferences().getBoolean(ConsoleLogPreferenceConstants.REMEMBER_SERVER)!=true)
+
+ {
+ new SelectServerDialog(fWindow.getShell()).open();
+ }
+ if(isValid()) {
+ try{
+
+ ScpClient scpclient = new ScpClient();
+ serverfileName = fileName.substring(fileName.lastIndexOf('/')+1);
+ tmpfileName="/tmp/"+ serverfileName;
+ scpclient.transfer(fileName,tmpfileName);
+ }catch(Exception e){e.printStackTrace();}
+
+ String[] script = buildScript();
+ String[] envVars = getEnvironmentVariables();
+ if(continueRun)
+ {
+
+
+ ScriptConsole console = ScriptConsole.getInstance(serverfileName);
+ console.run(script, envVars, new PasswordPrompt(IDESessionSettings.password), new StapErrorParser());
+ }
+ }
+
+ 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();
+ if(ed.getEditorInput() instanceof PathEditorInput)
+ return ((PathEditorInput)ed.getEditorInput()).getPath().toString();
+ else
+ return ResourceUtil.getFile(ed.getEditorInput()).getLocation().toString();
+
+ }
+
+ /**
+ * 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(isValidDirectory(((PathEditorInput)ed.getEditorInput()).getPath().toString()))
+ 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.
+ */
+ @SuppressWarnings("deprecation")
+ 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() + 4];
+ script[0] = "stap"; //$NON-NLS-1$
+
+ script[script.length-1] = tmpfileName;
+
+ for(int i=0; i< cmdList.size(); i++) {
+ script[i+1] = cmdList.get(i).toString();
+ }
+ script[script.length-3]="-m";
+
+ String modname = serverfileName.substring(0, serverfileName.indexOf('.'));
+ if (modname.indexOf('-') != -1)
+ modname = modname.substring(0, modname.indexOf('-'));
+ script[script.length-2]=modname;
+
+ 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;
+ protected String fileName = null;
+ protected String tmpfileName = null;
+ protected String serverfileName = 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/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..2970f2544a
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/hidden/FunctionBrowserAction.java
@@ -0,0 +1,145 @@
+/*******************************************************************************
+ * 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();
+ //action.init(page.getWorkbenchWindow());
+ action.run();
+ if (action.isSuccessful())
+ ed = page.getWorkbenchWindow().getActivePage().getActiveEditor();
+ else
+ return;
+ }
+ 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/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..45f557ec59
--- /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=
+
+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/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..e3c083a791
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/views/BrowserView.java
@@ -0,0 +1,172 @@
+/*******************************************************************************
+ * 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() {
+ try {
+ viewer.getControl().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ refresh();
+ }
+ });
+ }catch(Exception e)
+ {
+ //TO FIX: BUG 315988
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/ChangeLog
new file mode 100644
index 0000000000..10f0cd6622
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/ChangeLog
@@ -0,0 +1,23 @@
+2010-06-04 Andrew Overholt <overholt@redhat.com>
+
+ Bug #282039
+
+ * plugin.properties: Externalize bundle name and provider.
+ * plugin.xml: Likewise.
+
+2009-11-16 Andrew Overholt <overholt@redhat.com>
+
+ * META-INF/MANIFEST.MF: Fix bundle name.
+
+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-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * ChangeLog: Refactoring. Renaming all packages directories from *.systemtapgui.* to *.systemtap.ui.*
+ \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..3c3b79585d
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %bundleName
+Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.logging;singleton:=true
+Bundle-Version: 0.3.0.qualifier
+Bundle-Activator: org.eclipse.linuxtools.systemtap.ui.logging.internal.LoggingPlugin
+Bundle-Vendor: %bundleProvider
+Bundle-Localization: plugin
+Export-Package: org.eclipse.linuxtools.systemtap.ui.logging
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.linuxtools.systemtap.ui.structures
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/about.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/about.html
new file mode 100644
index 0000000000..23506a4bae
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/about.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>About</title>
+</head><body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/build.properties
new file mode 100644
index 0000000000..544a57867c
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/build.properties
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+ META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/plugin.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/plugin.properties
new file mode 100644
index 0000000000..7be2eeecc3
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/plugin.properties
@@ -0,0 +1,3 @@
+bundleName=SystemTap Logging Functionality (Incubation)
+bundleProvider=Eclipse Linux Tools
+preference.logging.name=Logging \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/plugin.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/plugin.xml
new file mode 100644
index 0000000000..9c6bef8dee
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.logging/plugin.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+ <extension
+ point="org.eclipse.core.runtime.preferences">
+ <initializer class="org.eclipse.linuxtools.systemtap.ui.logging.preferences.PreferenceInitializer"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ category="com.qualityeclipse.systemtap.prefs.view"
+ class="org.eclipse.linuxtools.systemtap.ui.logging.preferences.LoggingPreferencePage"
+ id="com.qualityeclipse.generic.prefs.logging"
+ name="%preference.logging.name"/>
+ </extension>
+</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/ChangeLog
new file mode 100644
index 0000000000..59f420102a
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/ChangeLog
@@ -0,0 +1,23 @@
+2010-06-04 Andrew Overholt <overholt@redhat.com>
+
+ Bug #282039
+
+ * plugin.properties: Externalize bundle name and provider.
+ * plugin.xml: Likewise.
+
+2009-11-16 Andrew Overholt <overholt@redhat.com>
+
+ * META-INF/MANIFEST.MF: Fix bundle name.
+
+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-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * ChangeLog: Refactoring. Renaming all packages directories from *.systemtapgui.* to *.systemtap.ui.*
+ \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..cb82e3c955
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %bundleName
+Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.structures;singleton:=true
+Bundle-Version: 0.3.0.qualifier
+Bundle-Activator: org.eclipse.linuxtools.systemtap.ui.structures.internal.StructuresPlugin
+Bundle-Vendor: %bundleProvider
+Bundle-ActivationPolicy: lazy
+Export-Package: 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
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Localization: plugin
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/about.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/about.html
new file mode 100644
index 0000000000..23506a4bae
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/about.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>About</title>
+</head><body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/build.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/build.properties
new file mode 100644
index 0000000000..3297579ee3
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ src/,\
+ plugin.xml,\
+ about.html,\
+ plugin.properties
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/plugin.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/plugin.properties
new file mode 100644
index 0000000000..83996413b8
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/plugin.properties
@@ -0,0 +1,3 @@
+bundleName=SystemTap Structures Plug-in (Incubation)
+bundleProvider=Eclipse Linux Tools
+category.name = SystemTap \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/plugin.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/plugin.xml
new file mode 100644
index 0000000000..eb2d302ff9
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/plugin.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.views">
+ <category
+ id="org.eclipse.linuxtools.systemtap.ui"
+ name="%category.name">
+ </category>
+ </extension>
+
+</plugin>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/StreamGobbler.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/StreamGobbler.java
new file mode 100644
index 0000000000..2776bb8df1
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures/src/org/eclipse/linuxtools/systemtap/ui/structures/runnable/StreamGobbler.java
@@ -0,0 +1,201 @@
+/*******************************************************************************
+ * 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.structures.runnable;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+
+import org.eclipse.linuxtools.systemtap.ui.structures.listeners.IGobblerListener;
+
+
+
+/**
+ * A separate thread to listen to an InputStream and pull all the data
+ * out of it. When data is found a new event is fired share the data with
+ * any <code>IDataListener</code> that is listening.
+ * @author Ryan Morse
+ */
+public class StreamGobbler implements Runnable {
+ public StreamGobbler(InputStream is) {
+ if(null != is) {
+ this.is = is;
+ line = new StringBuilder();
+ listeners = new ArrayList<IGobblerListener>();
+ }
+ locked = false;
+ }
+
+ /**
+ * Spawns the new thread that this class will run in. From the Runnable
+ * interface spawning the new thread automatically calls the run() method.
+ * This must be called by the implementing class in order to start the
+ * StreamGobbler.
+ */
+ //Make sure to call this method to start the StreamGobbler
+ public void start() {
+ t = new Thread(this, "StreamGobbler");
+ t.start();
+ }
+
+ /**
+ * Checks to see if the gobbler is still running.
+ * @return boolean representing whether or not it is sill running
+ */
+ public boolean isRunning() {
+ return (null != t);
+ }
+
+ /**
+ * The main method of this class. It monitors the provided thread to see
+ * when new data is available and then appends it to its current list of
+ * data. When a new line is read it will fire a DataEvent for listeners
+ * to get ahold of the data.
+ */
+ public void run() {
+ Thread thisThread = Thread.currentThread();
+ try {
+ int val=-1;
+
+ while(t == thisThread) {
+ while(0 < is.available()) {
+ if(-1 == (val = is.read()))
+ this.stop();
+ else
+ line.append((char)val);
+ if ('\n' == val)
+ this.fireNewDataEvent();
+
+ }
+ try {
+ Thread.sleep(10);
+ } catch(InterruptedException ie) {}
+ }
+ } catch (IOException ioe) {} //If stream closed before thread shuts down
+ }
+
+ /**
+ * Stops the gobbler from monitering the stream, and fires one last data event
+ * to make sure that listeners have the entire contents of what was read in
+ * from the stream.
+ */
+ public synchronized void stop() {
+ try { //Make sure we don't stop while there is still data in the stream
+ while(0 != is.available()) {
+ Thread.sleep(10);
+ }
+ } catch(Exception e) {}
+ t = null;
+ notify();
+ //Fire one last time to ensure listeners have gotten everything.
+ this.fireNewDataEvent();
+ }
+
+ /**
+ * Method for getting the most recently read line from the stream.
+ * @return String representing the current line being read from the
+ * <code>InputStream</code>
+ */
+ public String readLine() {
+ return line.toString();
+ }
+
+ /**
+ * Gets rid of all internal references to objects.
+ */
+ public void dispose() {
+ if(isRunning())
+ stop();
+ line = null;
+ t = null;
+ is = null;
+ }
+
+ /**
+ * Fires new events to everything that is monitering this stream. Then clears
+ * the current line of data.
+ */
+ private void fireNewDataEvent() {
+ //Implement our own lock since using synchronized causes a deadlock here
+ /* while(locked) {
+ try {
+ wait(10);
+ } catch(Exception e) {}
+ }
+ locked = true;*/
+ for(int i = 0; i < listeners.size(); i++)
+ {
+
+ ((IGobblerListener)(listeners.get(i))).handleDataEvent(line.toString());
+ }
+ line.delete(0, line.length());
+ locked = false;
+ }
+
+ public void fireNewDataEvent(String l) {
+ //Implement our own lock since using synchronized causes a deadlock here
+ /* while(locked) {
+ try {
+ wait(10);
+ } catch(Exception e) {}
+ }
+ locked = true;*/
+ for(int i = 0; i < listeners.size(); i++)
+ {
+ ((IGobblerListener)(listeners.get(i))).handleDataEvent(l);
+ }
+// line.delete(0, line.length());
+ locked = false;
+ }
+
+ /**
+ * Registers the provided listener to get data events.
+ * @param l A listener that needs to moniter the stream.
+ */
+ public void addDataListener(IGobblerListener l) {
+
+ if(l != null && !listeners.contains(l))
+ {
+
+ listeners.add(l);
+
+ }
+
+ }
+
+ /**
+ * Unregisters the provied listener from getting new data events.
+ * @param l A listener that is monitering the stream and should be removed
+ */
+ public void removeDataListener(IGobblerListener l) {
+
+ if(listeners.contains(l))
+ listeners.remove(l);
+ }
+
+ /**
+ * Returns a list of all of the <code>IGobblerListeners</code> that
+ * are lstening for data events.
+ * @return ArrayList of all of the listeners registered.
+ */
+ public ArrayList<IGobblerListener> getDataListeners() {
+ return listeners;
+ }
+
+ private ArrayList<IGobblerListener> listeners;
+ private StringBuilder line;
+ private Thread t;
+ private InputStream is;
+
+ @SuppressWarnings("unused")
+ private boolean locked;
+} \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/ChangeLog b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/ChangeLog
new file mode 100644
index 0000000000..0769791b78
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/ChangeLog
@@ -0,0 +1,30 @@
+2010-06-08 Roland Grunberg <rgrunber@redhat.com>
+
+ Bug #315303
+
+ * plugin.properties: Change format for plugin.properties
+ to avoid parsing issues.
+
+2010-06-04 Andrew Overholt <overholt@redhat.com>
+
+ Bug #282039
+
+ * plugin.properties: Externalize bundle name and provider.
+ * plugin.xml: Likewise.
+
+2009-11-16 Andrew Overholt <overholt@redhat.com>
+
+ * META-INF/MANIFEST.MF: Fix Bundle-Name.
+
+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-07-07 Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
+
+ * ChangeLog: Refactoring. Renaming all packages directories from *.systemtapgui.* to *.systemtap.ui.*
+ \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..327cb8cdb1
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/META-INF/MANIFEST.MF
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %bundleName
+Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.systemtapgui;singleton:=true
+Bundle-Version: 0.3.0.qualifier
+Bundle-Activator: org.eclipse.linuxtools.systemtap.ui.systemtapgui.internal.SystemTapGUIPlugin
+Bundle-Vendor: %bundleProvider
+Bundle-Localization: plugin
+Export-Package: org.eclipse.linuxtools.systemtap.ui.systemtapgui,
+ org.eclipse.linuxtools.systemtap.ui.systemtapgui.preferences
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.linuxtools.systemtap.ui.logging,
+ org.eclipse.help,
+ org.eclipse.help.appserver,
+ org.eclipse.help.base,
+ org.eclipse.help.ui,
+ org.eclipse.help.webapp
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/about.html b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/about.html
new file mode 100644
index 0000000000..c258ef55d8
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/plugin.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/plugin.properties
new file mode 100644
index 0000000000..b68e22c7ca
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.systemtapgui/plugin.properties
@@ -0,0 +1,10 @@
+bundleName=SystemTapGUI Plug-in (Incubation)
+bundleProvider=Eclipse Linux Tools
+about.text=System Tap GUI\n\n\
+Version 1.0.rc1\n\n\
+Build ID:\n\n\
+Copywrite: At some point we will\n\
+have a real copywrite info here.\n\n\
+Built on the Eclipse framework.
+preference.systemTap.name=SystemTap
+preference.envVars.name=Environment Variables \ No newline at end of file

Back to the top