Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/views/FunctionBrowserView.java')
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/views/FunctionBrowserView.java174
1 files changed, 87 insertions, 87 deletions
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/views/FunctionBrowserView.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/views/FunctionBrowserView.java
index 2943bcd0de..fd7722247a 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/views/FunctionBrowserView.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/views/FunctionBrowserView.java
@@ -28,99 +28,99 @@ import org.eclipse.swt.widgets.Composite;
* @author Henry Hughes
*/
public class FunctionBrowserView extends BrowserView {
- public static final String ID = "org.eclipse.linuxtools.internal.systemtap.ui.ide.views.FunctionBrowserView"; //$NON-NLS-1$
- private FunctionBrowserAction doubleClickAction;
- private TreeNode functions;
- private TreeNode localFunctions;
+ public static final String ID = "org.eclipse.linuxtools.internal.systemtap.ui.ide.views.FunctionBrowserView"; //$NON-NLS-1$
+ private FunctionBrowserAction doubleClickAction;
+ private TreeNode functions;
+ private TreeNode localFunctions;
- /**
- * Creates the UI on the given <code>Composite</code>
- */
- @Override
- public void createPartControl(Composite parent) {
- super.createPartControl(parent);
- TapsetLibrary.init();
- TapsetLibrary.addFunctionListener(new ViewUpdater());
- refresh();
- makeActions();
- }
+ /**
+ * Creates the UI on the given <code>Composite</code>
+ */
+ @Override
+ public void createPartControl(Composite parent) {
+ super.createPartControl(parent);
+ TapsetLibrary.init();
+ TapsetLibrary.addFunctionListener(new ViewUpdater());
+ refresh();
+ makeActions();
+ }
- @Override
- protected Image getEntryImage(TreeNode treeObj) {
- if (!(treeObj.getData() instanceof ISingleTypedNode)) {
- return IDEPlugin.getImageDescriptor("icons/vars/var_unk.gif").createImage(); //$NON-NLS-1$
- }
- String type = ((ISingleTypedNode) treeObj.getData()).getType();
- if (type == null) {
- return IDEPlugin.getImageDescriptor("icons/vars/var_void.gif").createImage(); //$NON-NLS-1$
- } else if (type.equals("long")) {//$NON-NLS-1$
- return IDEPlugin.getImageDescriptor("icons/vars/var_long.gif").createImage(); //$NON-NLS-1$
- } else if (type.equals("string")) {//$NON-NLS-1$
- return IDEPlugin.getImageDescriptor("icons/vars/var_str.gif").createImage(); //$NON-NLS-1$
- } else {
- return IDEPlugin.getImageDescriptor("icons/vars/var_unk.gif").createImage(); //$NON-NLS-1$
- }
- }
+ @Override
+ protected Image getEntryImage(TreeNode treeObj) {
+ if (!(treeObj.getData() instanceof ISingleTypedNode)) {
+ return IDEPlugin.getImageDescriptor("icons/vars/var_unk.gif").createImage(); //$NON-NLS-1$
+ }
+ String type = ((ISingleTypedNode) treeObj.getData()).getType();
+ if (type == null) {
+ return IDEPlugin.getImageDescriptor("icons/vars/var_void.gif").createImage(); //$NON-NLS-1$
+ } else if (type.equals("long")) {//$NON-NLS-1$
+ return IDEPlugin.getImageDescriptor("icons/vars/var_long.gif").createImage(); //$NON-NLS-1$
+ } else if (type.equals("string")) {//$NON-NLS-1$
+ return IDEPlugin.getImageDescriptor("icons/vars/var_str.gif").createImage(); //$NON-NLS-1$
+ } else {
+ return IDEPlugin.getImageDescriptor("icons/vars/var_unk.gif").createImage(); //$NON-NLS-1$
+ }
+ }
- /**
- * Refreshes the list of functions in the viewer.
- */
- @Override
- public void refresh() {
- functions = TapsetLibrary.getFunctions();
- if (functions != null){
- addLocalFunctions(localFunctions);
- }
- }
+ /**
+ * Refreshes the list of functions in the viewer.
+ */
+ @Override
+ public void refresh() {
+ functions = TapsetLibrary.getFunctions();
+ if (functions != null){
+ addLocalFunctions(localFunctions);
+ }
+ }
- /**
- * Adds the local functions specified in the argument to the viewer.
- * @param localFunctionTree A tree of the local functions.
- */
- public void addLocalFunctions(TreeNode localFunctionTree) {
- if(functions.getChildCount() > 0) {
- TreeNode localFuncs = functions.getChildAt(0);
+ /**
+ * Adds the local functions specified in the argument to the viewer.
+ * @param localFunctionTree A tree of the local functions.
+ */
+ public void addLocalFunctions(TreeNode localFunctionTree) {
+ if(functions.getChildCount() > 0) {
+ TreeNode localFuncs = functions.getChildAt(0);
- if("<local>".equals(localFuncs.toString())) { //$NON-NLS-1$
- functions.remove(0);
- }
+ if("<local>".equals(localFuncs.toString())) { //$NON-NLS-1$
+ functions.remove(0);
+ }
- if(null != localFunctions) {
- localFunctions = localFunctionTree;
- localFunctions.setDisplay("<local>"); //$NON-NLS-1$
- functions.addAt(localFunctions, 0);
- }
- }
- viewer.setInput(functions);
- }
+ if(null != localFunctions) {
+ localFunctions = localFunctionTree;
+ localFunctions.setDisplay("<local>"); //$NON-NLS-1$
+ functions.addAt(localFunctions, 0);
+ }
+ }
+ viewer.setInput(functions);
+ }
- /**
- * Wires up all of the actions for this browser, such as double and right click handlers.
- */
- private void makeActions() {
- doubleClickAction = new FunctionBrowserAction(getSite().getWorkbenchWindow(), this);
- viewer.addDoubleClickListener(doubleClickAction);
- registerContextMenu("functionPopup"); //$NON-NLS-1$
- }
+ /**
+ * Wires up all of the actions for this browser, such as double and right click handlers.
+ */
+ private void makeActions() {
+ doubleClickAction = new FunctionBrowserAction(getSite().getWorkbenchWindow(), this);
+ viewer.addDoubleClickListener(doubleClickAction);
+ registerContextMenu("functionPopup"); //$NON-NLS-1$
+ }
- @Override
- public void dispose() {
- super.dispose();
- if(null != viewer) {
- viewer.removeDoubleClickListener(doubleClickAction);
- }
- if(null != doubleClickAction) {
- doubleClickAction.dispose();
- }
- doubleClickAction = null;
- if(null != localFunctions) {
- localFunctions.dispose();
- }
- localFunctions = null;
- if(null != functions) {
- functions.dispose();
- }
- functions = null;
- TapsetLibrary.stop();
- }
+ @Override
+ public void dispose() {
+ super.dispose();
+ if(null != viewer) {
+ viewer.removeDoubleClickListener(doubleClickAction);
+ }
+ if(null != doubleClickAction) {
+ doubleClickAction.dispose();
+ }
+ doubleClickAction = null;
+ if(null != localFunctions) {
+ localFunctions.dispose();
+ }
+ localFunctions = null;
+ if(null != functions) {
+ functions.dispose();
+ }
+ functions = null;
+ TapsetLibrary.stop();
+ }
}

Back to the top