Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Overholt2011-02-28 03:50:37 +0000
committerAndrew Overholt2011-02-28 03:50:37 +0000
commit1503d4738ec76f5f93c301a421c2236dfee7a42a (patch)
treebb7c8866a298fa07e35f60e5e83c050f4e10d19c
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
-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 {
}
}