Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSami Wagiaalla2013-04-09 20:54:01 +0000
committerCamilo Bernal2013-04-11 19:07:36 +0000
commit782e74805731d369f2da16dacd6fd001471b9e8d (patch)
tree7fb54449b22c7e95791a2578c2041645768b6d92
parent45d4f9f20196851d75ad7c484f0f7a9f30067a7b (diff)
downloadorg.eclipse.linuxtools-782e74805731d369f2da16dacd6fd001471b9e8d.tar.gz
org.eclipse.linuxtools-782e74805731d369f2da16dacd6fd001471b9e8d.tar.xz
org.eclipse.linuxtools-782e74805731d369f2da16dacd6fd001471b9e8d.zip
Fix Systemtap API errors
- Move files to internal bundles. - Delete unused methods and classes. - Add missing @since tags. Some automatic save actions: - Organize imports. - Add braces to single-line if statements. - remove trailing white space. Change-Id: Id00bf1b9538638f67fafd1cd14982bc7e3cd651f Reviewed-on: https://git.eclipse.org/r/11776 Tested-by: Hudson CI Reviewed-by: Camilo Bernal <cabernal@redhat.com> IP-Clean: Camilo Bernal <cabernal@redhat.com> Tested-by: Camilo Bernal <cabernal@redhat.com>
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/DashboardAdapter.java (renamed from systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/DashboardAdapter.java)4
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/DashboardComposite.java (renamed from systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/DashboardComposite.java)3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/actions/ActivateGraphAction.java2
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/actions/StopGraphAction.java17
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/actions/StopModuleAction.java8
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/structures/DashboardModuleLocator.java (renamed from systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardModuleLocator.java)5
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/structures/DashboardModuleTreeBuilder.java (renamed from systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardModuleTreeBuilder.java)27
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/views/DashboardView.java (renamed from systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/views/DashboardView.java)14
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/DashboardPerspective.java2
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardGraphData.java4
-rwxr-xr-xsystemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/views/DashboardModuleBrowserView.java2
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/META-INF/MANIFEST.MF3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/pom.xml2
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/actions/ExportDataSetAction.java36
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/actions/OpenScriptOutputAction.java5
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/actions/SaveGraphImageAction.java27
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/structures/GraphDisplaySet.java (renamed from systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/structures/GraphDisplaySet.java)33
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/views/GraphSelectorView.java47
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/META-INF/MANIFEST.MF1
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/IDEPlugin.java4
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/editors/stp/STPCompletionProcessor.java2
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/editors/stp/STPMetadataSingleton.java2
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/structures/TapsetLibrary.java (renamed from systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TapsetLibrary.java)15
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/views/FunctionBrowserView.java2
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/views/ProbeAliasBrowserView.java2
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptHandler.java19
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TreeSettings.java3
27 files changed, 161 insertions, 130 deletions
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/DashboardAdapter.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/DashboardAdapter.java
index 1dc0993837..4116ccdd48 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/DashboardAdapter.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/DashboardAdapter.java
@@ -9,9 +9,10 @@
* IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse, Anithra P J
*******************************************************************************/
-package org.eclipse.linuxtools.systemtap.ui.dashboard;
+package org.eclipse.linuxtools.internal.systemtap.ui.dashboard;
import org.eclipse.linuxtools.internal.systemtap.ui.dashboard.actions.StopGraphAction;
+import org.eclipse.linuxtools.internal.systemtap.ui.dashboard.views.DashboardView;
import org.eclipse.linuxtools.systemtap.graphingapi.core.datasets.IDataSet;
import org.eclipse.linuxtools.systemtap.graphingapi.core.structures.GraphData;
import org.eclipse.linuxtools.systemtap.graphingapi.ui.charts.AbstractChartBuilder;
@@ -21,7 +22,6 @@ import org.eclipse.linuxtools.systemtap.ui.dashboard.internal.DashboardPlugin;
import org.eclipse.linuxtools.systemtap.ui.dashboard.structures.DashboardGraphData;
import org.eclipse.linuxtools.systemtap.ui.dashboard.structures.GraphTreeNode;
import org.eclipse.linuxtools.systemtap.ui.dashboard.views.ActiveModuleBrowserView;
-import org.eclipse.linuxtools.systemtap.ui.dashboard.views.DashboardView;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.custom.CTabItem;
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/DashboardComposite.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/DashboardComposite.java
index afda0fff3f..d75e74d660 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/DashboardComposite.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/DashboardComposite.java
@@ -9,10 +9,11 @@
* IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse, Anithra P J
*******************************************************************************/
-package org.eclipse.linuxtools.systemtap.ui.dashboard;
+package org.eclipse.linuxtools.internal.systemtap.ui.dashboard;
import java.util.ArrayList;
+import org.eclipse.linuxtools.internal.systemtap.ui.dashboard.DashboardAdapter;
import org.eclipse.swt.SWT;
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.DragSourceAdapter;
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/actions/ActivateGraphAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/actions/ActivateGraphAction.java
index 3db5bf067a..6544be5ad7 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/actions/ActivateGraphAction.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/actions/ActivateGraphAction.java
@@ -15,10 +15,10 @@ import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.linuxtools.internal.systemtap.ui.dashboard.views.DashboardView;
import org.eclipse.linuxtools.systemtap.ui.dashboard.structures.DashboardGraphData;
import org.eclipse.linuxtools.systemtap.ui.dashboard.structures.GraphTreeNode;
import org.eclipse.linuxtools.systemtap.ui.dashboard.views.ActiveModuleBrowserView;
-import org.eclipse.linuxtools.systemtap.ui.dashboard.views.DashboardView;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IViewActionDelegate;
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/actions/StopGraphAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/actions/StopGraphAction.java
index 0ed8250818..531e3f7827 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/actions/StopGraphAction.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/actions/StopGraphAction.java
@@ -15,14 +15,13 @@ import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.PlatformUI;
-
+import org.eclipse.linuxtools.internal.systemtap.ui.dashboard.views.DashboardView;
import org.eclipse.linuxtools.systemtap.ui.dashboard.structures.DashboardGraphData;
import org.eclipse.linuxtools.systemtap.ui.dashboard.structures.GraphTreeNode;
import org.eclipse.linuxtools.systemtap.ui.dashboard.views.ActiveModuleBrowserView;
-import org.eclipse.linuxtools.systemtap.ui.dashboard.views.DashboardView;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.PlatformUI;
/**
* This action is responsible for stopping an active graph. This is used when a module
@@ -36,7 +35,7 @@ public class StopGraphAction extends Action implements IViewActionDelegate {
public void init(IViewPart view) {
selectedItem = null;
}
-
+
@Override
public void run(IAction act) {
run();
@@ -46,7 +45,7 @@ public class StopGraphAction extends Action implements IViewActionDelegate {
public void run() {
run(selectedItem);
}
-
+
/**
* This method retreives the graph information for the selected item and then
* disposes of the graph from the display.
@@ -63,7 +62,7 @@ public class StopGraphAction extends Action implements IViewActionDelegate {
ActiveModuleBrowserView ambv = (ActiveModuleBrowserView)ivp;
ambv.getViewer().refresh();
}
-
+
/**
* This method updates what item is currently selected.
* @param action The action that started this method.
@@ -85,6 +84,6 @@ public class StopGraphAction extends Action implements IViewActionDelegate {
}
action.setEnabled(true);
}
-
+
private GraphTreeNode selectedItem;
}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/actions/StopModuleAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/actions/StopModuleAction.java
index eed2d5bb69..d6773f5602 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/actions/StopModuleAction.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/actions/StopModuleAction.java
@@ -19,6 +19,7 @@ import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.linuxtools.internal.systemtap.ui.dashboard.views.DashboardView;
import org.eclipse.linuxtools.systemtap.structures.TreeNode;
import org.eclipse.linuxtools.systemtap.structures.listeners.IActionListener;
import org.eclipse.linuxtools.systemtap.ui.dashboard.structures.ActiveModuleData;
@@ -28,7 +29,6 @@ import org.eclipse.linuxtools.systemtap.ui.dashboard.structures.DashboardModule;
import org.eclipse.linuxtools.systemtap.ui.dashboard.structures.GraphTreeNode;
import org.eclipse.linuxtools.systemtap.ui.dashboard.views.ActiveModuleBrowserView;
import org.eclipse.linuxtools.systemtap.ui.dashboard.views.DashboardModuleBrowserView;
-import org.eclipse.linuxtools.systemtap.ui.dashboard.views.DashboardView;
import org.eclipse.ui.IViewActionDelegate;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchWindow;
@@ -104,8 +104,9 @@ public class StopModuleAction extends Action implements IViewActionDelegate, IWo
}
if (!amd.paused) {
- if (amd.cmd.isRunning())
+ if (amd.cmd.isRunning()) {
amd.cmd.stop();
+ }
amd.data = null;
}
dv.closeComposite(amd.module.category);
@@ -197,8 +198,9 @@ public class StopModuleAction extends Action implements IViewActionDelegate, IWo
* that is registered.
*/
private static void fireActionEvent() {
- for(int i=0; i<listeners.size(); i++)
+ for(int i=0; i<listeners.size(); i++) {
listeners.get(i).handleActionEvent();
+ }
}
/**
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardModuleLocator.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/structures/DashboardModuleLocator.java
index 213b633578..9fb7dd6ef6 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardModuleLocator.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/structures/DashboardModuleLocator.java
@@ -9,7 +9,7 @@
* IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse, Anithra P J
*******************************************************************************/
-package org.eclipse.linuxtools.systemtap.ui.dashboard.structures;
+package org.eclipse.linuxtools.internal.systemtap.ui.dashboard.structures;
import java.io.File;
@@ -66,8 +66,9 @@ public final class DashboardModuleLocator {
if(locations.length() > 0) {
allFolders = new String[folders.length + 2];
System.arraycopy(folders, 0, allFolders, 2, folders.length);
- } else
+ } else {
allFolders = new String[2];
+ }
//This locates all the preexisting modules
if(new File(moduleStore).exists()) {
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardModuleTreeBuilder.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/structures/DashboardModuleTreeBuilder.java
index 9fb22f2075..978cacc66a 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardModuleTreeBuilder.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/structures/DashboardModuleTreeBuilder.java
@@ -9,15 +9,19 @@
* IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse, Anithra P J, Anithra P J
*******************************************************************************/
-package org.eclipse.linuxtools.systemtap.ui.dashboard.structures;
+package org.eclipse.linuxtools.internal.systemtap.ui.dashboard.structures;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
+import org.eclipse.linuxtools.internal.systemtap.ui.dashboard.views.DashboardView;
import org.eclipse.linuxtools.systemtap.structures.TreeNode;
import org.eclipse.linuxtools.systemtap.structures.ZipArchive;
-import org.eclipse.linuxtools.systemtap.ui.dashboard.views.DashboardView;
+import org.eclipse.linuxtools.systemtap.ui.dashboard.structures.DashboardMetaData;
+import org.eclipse.linuxtools.systemtap.ui.dashboard.structures.DashboardModule;
+import org.eclipse.linuxtools.systemtap.ui.dashboard.structures.DashboardModuleFileFilter;
+import org.eclipse.linuxtools.systemtap.ui.dashboard.structures.ModuleTreeNode;
import org.eclipse.linuxtools.systemtap.ui.systemtapgui.SystemTapGUISettings;
/**
@@ -54,13 +58,14 @@ public class DashboardModuleTreeBuilder {
TreeNode location;
for(int i=0; i<fs.length; i++) {
- if(fs[i].isDirectory())
+ if(fs[i].isDirectory()) {
scanNextLevel(fs[i]);
- else {
+ } else {
try {
File folder = new File(SystemTapGUISettings.tempDirectory + "/bundles/"); //$NON-NLS-1$
- if(!folder.exists())
+ if(!folder.exists()) {
folder.mkdirs();
+ }
File file = new File(folder + "/" + fs[i].getName() + ".tmp"); //$NON-NLS-1$//$NON-NLS-2$
file.createNewFile();
@@ -80,8 +85,9 @@ public class DashboardModuleTreeBuilder {
location.add(new ModuleTreeNode(dm, dm.display, true));
File[] files = folder.listFiles();
- for(int j=0; j<files.length; j++)
+ for(int j=0; j<files.length; j++) {
files[j].delete();
+ }
folder.delete();
} catch(IOException ioe) {}
}
@@ -101,11 +107,14 @@ public class DashboardModuleTreeBuilder {
//
for(int j,i=0; i<folders.length; i++) {
for(j=0; j<level.getChildCount(); j++) {
- if(level.getChildAt(j).toString().equals(folders[i]))
+ if(level.getChildAt(j).toString().equals(folders[i])) {
break;
+ }
}
if(j >= level.getChildCount())
+ {
level.add(new TreeNode("", folders[i], true)); //$NON-NLS-1$
+ }
level = level.getChildAt(j);
}
return level;
@@ -119,7 +128,9 @@ public class DashboardModuleTreeBuilder {
{
for (int i = 0; i<moduleNames.size();i++)
{
- if (moduleName.equals(moduleNames.get(i))) return i;
+ if (moduleName.equals(moduleNames.get(i))) {
+ return i;
+ }
}
}
return -1;
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/views/DashboardView.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/views/DashboardView.java
index 9de7f26082..8c17c2c7a5 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/views/DashboardView.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboard/views/DashboardView.java
@@ -9,17 +9,17 @@
* IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse, Anithra P J
*******************************************************************************/
-package org.eclipse.linuxtools.systemtap.ui.dashboard.views;
+package org.eclipse.linuxtools.internal.systemtap.ui.dashboard.views;
import java.util.ArrayList;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.linuxtools.internal.systemtap.ui.dashboard.DashboardAdapter;
+import org.eclipse.linuxtools.internal.systemtap.ui.dashboard.DashboardComposite;
import org.eclipse.linuxtools.systemtap.graphingapi.core.datasets.IDataSet;
import org.eclipse.linuxtools.systemtap.graphingapi.core.structures.GraphData;
import org.eclipse.linuxtools.systemtap.structures.UpdateManager;
import org.eclipse.linuxtools.systemtap.structures.listeners.ITabListener;
-import org.eclipse.linuxtools.systemtap.ui.dashboard.DashboardAdapter;
-import org.eclipse.linuxtools.systemtap.ui.dashboard.DashboardComposite;
import org.eclipse.linuxtools.systemtap.ui.dashboard.internal.DashboardPlugin;
import org.eclipse.linuxtools.systemtap.ui.dashboard.preferences.DashboardPreferenceConstants;
import org.eclipse.swt.SWT;
@@ -188,14 +188,6 @@ public class DashboardView extends ViewPart {
}
}
- public void addTabListener(ITabListener listener) {
- tabListeners.add(listener);
- }
-
- public void removeTabListener(ITabListener listener) {
- tabListeners.remove(listener);
- }
-
private void fireTabCloseEvent() {
for(ITabListener tabListener:tabListeners) {
tabListener.tabClosed();
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/DashboardPerspective.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/DashboardPerspective.java
index 347abed70f..a11c68048c 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/DashboardPerspective.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/DashboardPerspective.java
@@ -12,9 +12,9 @@
package org.eclipse.linuxtools.systemtap.ui.dashboard;
+import org.eclipse.linuxtools.internal.systemtap.ui.dashboard.views.DashboardView;
import org.eclipse.linuxtools.systemtap.ui.dashboard.views.ActiveModuleBrowserView;
import org.eclipse.linuxtools.systemtap.ui.dashboard.views.DashboardModuleBrowserView;
-import org.eclipse.linuxtools.systemtap.ui.dashboard.views.DashboardView;
import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardGraphData.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardGraphData.java
index 0aec10271b..070d0fd72e 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardGraphData.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/DashboardGraphData.java
@@ -11,13 +11,13 @@
package org.eclipse.linuxtools.systemtap.ui.dashboard.structures;
+import org.eclipse.linuxtools.internal.systemtap.ui.dashboard.DashboardAdapter;
import org.eclipse.linuxtools.systemtap.graphingapi.core.datasets.IDataSet;
import org.eclipse.linuxtools.systemtap.graphingapi.core.filters.IDataSetFilter;
import org.eclipse.linuxtools.systemtap.graphingapi.core.structures.GraphData;
-import org.eclipse.linuxtools.systemtap.ui.dashboard.DashboardAdapter;
/**
- * This is a basic structure to contain all the important information for a
+ * This is a basic structure to contain all the important information for a
* a Dashboard graph.
* @author Ryan Morse
*/
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/views/DashboardModuleBrowserView.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/views/DashboardModuleBrowserView.java
index a41a1bcfbd..9290837fc3 100755
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/views/DashboardModuleBrowserView.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/views/DashboardModuleBrowserView.java
@@ -14,8 +14,8 @@ package org.eclipse.linuxtools.systemtap.ui.dashboard.views;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
+import org.eclipse.linuxtools.internal.systemtap.ui.dashboard.structures.DashboardModuleLocator;
import org.eclipse.linuxtools.systemtap.structures.TreeNode;
-import org.eclipse.linuxtools.systemtap.ui.dashboard.structures.DashboardModuleLocator;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.ui.IWorkbenchActionConstants;
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/META-INF/MANIFEST.MF
index 544f4ca293..1372b33297 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/META-INF/MANIFEST.MF
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/META-INF/MANIFEST.MF
@@ -2,12 +2,11 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %bundleName
Bundle-SymbolicName: org.eclipse.linuxtools.systemtap.ui.graphing;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 2.0.0.qualifier
Bundle-Activator: org.eclipse.linuxtools.internal.systemtap.ui.graphing.GraphingPlugin
Bundle-Vendor: %bundleProvider
Bundle-Localization: plugin
Export-Package: org.eclipse.linuxtools.systemtap.ui.graphing,
- org.eclipse.linuxtools.systemtap.ui.graphing.structures,
org.eclipse.linuxtools.systemtap.ui.graphing.views
Require-Bundle: org.eclipse.linuxtools.systemtap.graphingapi.ui,
org.eclipse.linuxtools.systemtap.structures,
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/pom.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/pom.xml
index e7219c9942..d429ff9a1d 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/pom.xml
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/pom.xml
@@ -18,7 +18,7 @@
</parent>
<artifactId>org.eclipse.linuxtools.systemtap.ui.graphing</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>2.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<name>Linux Tools SystemTap Graphing Plug-in</name>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/actions/ExportDataSetAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/actions/ExportDataSetAction.java
index aff8f72ca5..46f5ff0188 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/actions/ExportDataSetAction.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/actions/ExportDataSetAction.java
@@ -17,9 +17,9 @@ import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.linuxtools.internal.systemtap.ui.graphing.Localization;
+import org.eclipse.linuxtools.internal.systemtap.ui.graphing.structures.GraphDisplaySet;
import org.eclipse.linuxtools.systemtap.graphingapi.core.datasets.IDataSet;
import org.eclipse.linuxtools.systemtap.structures.listeners.ITabListener;
-import org.eclipse.linuxtools.systemtap.ui.graphing.structures.GraphDisplaySet;
import org.eclipse.linuxtools.systemtap.ui.graphing.views.GraphSelectorView;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.FileDialog;
@@ -49,13 +49,15 @@ public class ExportDataSetAction extends Action implements IWorkbenchWindowActio
File f = null;
IDataSet data = getDataSet();
- if(null != data)
+ if(null != data) {
f = getFile();
+ }
- if(f != null && data != null)
+ if(f != null && data != null) {
data.writeToFile(f);
+ }
}
-
+
/**
* This method retreives the active <code>DataSet</code> from the <code>GraphSelectorView</code>. If no
* DataSet is active it will return null.
@@ -65,13 +67,14 @@ public class ExportDataSetAction extends Action implements IWorkbenchWindowActio
IViewPart ivp = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(GraphSelectorView.ID);
IDataSet data = null;
GraphDisplaySet gds = ((GraphSelectorView)ivp).getActiveDisplaySet();
- if(null != gds)
+ if(null != gds) {
data = gds.getDataSet();
+ }
return data;
}
-
+
/**
- * This method will display a dialog box for the user to select a
+ * This method will display a dialog box for the user to select a
* location to save the graph image.
* @return The File selected to save the image to.
*/
@@ -81,22 +84,23 @@ public class ExportDataSetAction extends Action implements IWorkbenchWindowActio
dialog.setText(Localization.getString("ExportDataSetAction.NewFile")); //$NON-NLS-1$
path = dialog.open();
-
- if(null == path)
+
+ if(null == path) {
return null;
+ }
return new File(path);
}
-
+
@Override
public void selectionChanged(IAction a, ISelection s) {
action = a;
action.setEnabled(false);
buildEnablementChecks();
}
-
+
/**
- * This method is used to generate the checks to see it this button
+ * This method is used to generate the checks to see it this button
* should be enabled or not.
*/
private void buildEnablementChecks() {
@@ -109,18 +113,18 @@ public class ExportDataSetAction extends Action implements IWorkbenchWindowActio
public void tabClosed() {
action.setEnabled(null != gsv.getActiveDisplaySet());
}
-
+
@Override
public void tabOpened() {
action.setEnabled(true);
}
-
+
@Override
public void tabChanged() {}
});
}
}
-
+
/**
* Removes all internal references in this class. Nothing should make any references
* to anyting in this class after calling the dispose method.
@@ -130,7 +134,7 @@ public class ExportDataSetAction extends Action implements IWorkbenchWindowActio
fWindow = null;
action = null;
}
-
+
private IWorkbenchWindow fWindow;
private IAction action;
}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/actions/OpenScriptOutputAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/actions/OpenScriptOutputAction.java
index 09f9f11300..2b5a00fbc1 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/actions/OpenScriptOutputAction.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/actions/OpenScriptOutputAction.java
@@ -81,10 +81,11 @@ public class OpenScriptOutputAction extends Action implements IWorkbenchWindowAc
IDataEntry output;
while(true) {
output = parser.parse(sb);
- if(null != output)
+ if(null != output) {
dataSet.setData(output);
- else
+ } else {
break;
+ }
}
try {
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/actions/SaveGraphImageAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/actions/SaveGraphImageAction.java
index cd35f070cf..6fa36f4d77 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/actions/SaveGraphImageAction.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/actions/SaveGraphImageAction.java
@@ -16,10 +16,10 @@ import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.linuxtools.internal.systemtap.ui.graphing.Localization;
+import org.eclipse.linuxtools.internal.systemtap.ui.graphing.structures.GraphDisplaySet;
import org.eclipse.linuxtools.systemtap.graphingapi.ui.charts.AbstractChartBuilder;
import org.eclipse.linuxtools.systemtap.graphingapi.ui.widgets.ExceptionErrorDialog;
import org.eclipse.linuxtools.systemtap.structures.listeners.ITabListener;
-import org.eclipse.linuxtools.systemtap.ui.graphing.structures.GraphDisplaySet;
import org.eclipse.linuxtools.systemtap.ui.graphing.views.GraphSelectorView;
import org.eclipse.swt.SWT;
import org.eclipse.swt.SWTException;
@@ -71,8 +71,9 @@ public class SaveGraphImageAction extends Action implements IWorkbenchWindowActi
}
String path = getFile();
- if(null == path)
+ if(null == path) {
return;
+ }
save(image, path);
}
@@ -87,8 +88,9 @@ public class SaveGraphImageAction extends Action implements IWorkbenchWindowActi
AbstractChartBuilder g = null;
GraphDisplaySet gds = ((GraphSelectorView)ivp).getActiveDisplaySet();
- if(null != gds)
+ if(null != gds) {
g = gds.getActiveGraph();
+ }
return g;
}
@@ -162,8 +164,9 @@ public class SaveGraphImageAction extends Action implements IWorkbenchWindowActi
gsv.addTabListener(new ITabListener() {
@Override
public void tabClosed() {
- if(null == gsv.getActiveDisplaySet() || null == gsv.getActiveDisplaySet().getActiveGraph())
+ if(null == gsv.getActiveDisplaySet() || null == gsv.getActiveDisplaySet().getActiveGraph()) {
action.setEnabled(false);
+ }
}
@Override
@@ -171,32 +174,36 @@ public class SaveGraphImageAction extends Action implements IWorkbenchWindowActi
gsv.getActiveDisplaySet().addTabListener(new ITabListener() {
@Override
public void tabClosed() {
- if(null == gsv.getActiveDisplaySet().getActiveGraph())
+ if(null == gsv.getActiveDisplaySet().getActiveGraph()) {
action.setEnabled(false);
+ }
}
@Override
public void tabOpened() {
- if(null != gsv.getActiveDisplaySet().getActiveGraph())
+ if(null != gsv.getActiveDisplaySet().getActiveGraph()) {
action.setEnabled(true);
+ }
}
@Override
public void tabChanged() {
- if(null == gsv.getActiveDisplaySet() || null == gsv.getActiveDisplaySet().getActiveGraph())
+ if(null == gsv.getActiveDisplaySet() || null == gsv.getActiveDisplaySet().getActiveGraph()) {
action.setEnabled(false);
- else
+ } else {
action.setEnabled(true);
+ }
}
});
}
@Override
public void tabChanged() {
- if(null == gsv.getActiveDisplaySet() || null == gsv.getActiveDisplaySet().getActiveGraph())
+ if(null == gsv.getActiveDisplaySet() || null == gsv.getActiveDisplaySet().getActiveGraph()) {
action.setEnabled(false);
- else
+ } else {
action.setEnabled(true);
+ }
}
});
}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/structures/GraphDisplaySet.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/structures/GraphDisplaySet.java
index c118cf4641..fc6eabba9e 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/structures/GraphDisplaySet.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/structures/GraphDisplaySet.java
@@ -9,7 +9,7 @@
* IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
*******************************************************************************/
-package org.eclipse.linuxtools.systemtap.ui.graphing.structures;
+package org.eclipse.linuxtools.internal.systemtap.ui.graphing.structures;
import java.util.ArrayList;
@@ -53,6 +53,7 @@ import org.eclipse.ui.plugin.AbstractUIPlugin;
* @author Ryan Morse
*/
public class GraphDisplaySet {
+
public GraphDisplaySet(Composite parent, IDataSet data) {
IPreferenceStore p = GraphingPlugin.getDefault().getPreferenceStore();
int delay = p.getInt(GraphingPreferenceConstants.P_GRAPH_UPDATE_DELAY);
@@ -105,8 +106,9 @@ public class GraphDisplaySet {
@Override
public void close(CTabFolderEvent e) {
int selected = folder.indexOf((CTabItem)e.item)-2;
- if(null != updater)
+ if(null != updater) {
updater.removeUpdateListener(builders.get(selected));
+ }
builders.remove(selected);
fireTabCloseEvent();
}
@@ -128,8 +130,9 @@ public class GraphDisplaySet {
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
DataGrid table = DataSetFactory.getDataGrid(c, dataSet);
- if(null != updater)
+ if(null != updater) {
updater.addUpdateListener(table);
+ }
table.getControl().setLayoutData(gd);
item.setControl(c);
folder.setSelection(item);
@@ -145,8 +148,9 @@ public class GraphDisplaySet {
* @return The graph that is currently visible on the screen
*/
public AbstractChartBuilder getActiveGraph() {
- if(0 == builders.size() || folder.getSelectionIndex() < 2)
+ if(0 == builders.size() || folder.getSelectionIndex() < 2) {
return null;
+ }
return builders.get(folder.getSelectionIndex()-2);
}
@@ -154,11 +158,12 @@ public class GraphDisplaySet {
/**
* Removes all internal references in this class. Nothing should make any references
- * to anyting in this class after calling the dispose method.
+ * to anything in this class after calling the dispose method.
*/
public void dispose() {
- if(null != updater)
+ if(null != updater) {
updater.dispose();
+ }
updater = null;
dataSet = null;
@@ -202,8 +207,9 @@ public class GraphDisplaySet {
item.setControl(gc);
if(null != g) {
- if(null != updater)
+ if(null != updater) {
updater.addUpdateListener(g);
+ }
builders.add(g);
}
}
@@ -219,23 +225,22 @@ public class GraphDisplaySet {
tabListeners.add(listener);
}
- public void removeTabListener(ITabListener listener) {
- tabListeners.remove(listener);
- }
-
private void fireTabCloseEvent() {
- for(int i=0; i<tabListeners.size(); i++)
+ for(int i=0; i<tabListeners.size(); i++) {
(tabListeners.get(i)).tabClosed();
+ }
}
private void fireTabOpenEvent() {
- for(int i=0; i<tabListeners.size(); i++)
+ for(int i=0; i<tabListeners.size(); i++) {
(tabListeners.get(i)).tabOpened();
+ }
}
private void fireTabChangedEvent() {
- for(int i=0; i<tabListeners.size(); i++)
+ for(int i=0; i<tabListeners.size(); i++) {
(tabListeners.get(i)).tabChanged();
+ }
}
private int lastSelectedTab;
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/views/GraphSelectorView.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/views/GraphSelectorView.java
index c1946b93c2..99cec8aad8 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/views/GraphSelectorView.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/views/GraphSelectorView.java
@@ -13,9 +13,9 @@ package org.eclipse.linuxtools.systemtap.ui.graphing.views;
import java.util.ArrayList;
+import org.eclipse.linuxtools.internal.systemtap.ui.graphing.structures.GraphDisplaySet;
import org.eclipse.linuxtools.systemtap.graphingapi.core.datasets.IDataSet;
import org.eclipse.linuxtools.systemtap.structures.listeners.ITabListener;
-import org.eclipse.linuxtools.systemtap.ui.graphing.structures.GraphDisplaySet;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.custom.CTabFolder2Adapter;
@@ -44,14 +44,15 @@ public class GraphSelectorView extends ViewPart {
displaySets = new ArrayList<GraphDisplaySet>();
tabListeners = new ArrayList<ITabListener>();
}
-
+
/**
* This method will create a new script set for the provided dataSet
- * The new script set will be given a new tab item at the end of
+ * The new script set will be given a new tab item at the end of
* the list.
* @param title The name to be shown on the new tab
* @param dataSet The <code>IDataSet</code> for the new script set
* @param cmd The running command that this script set represents.
+ * @since 2.0
*/
public void createScriptSet(String title, IDataSet dataSet) {
CTabItem item;
@@ -66,7 +67,7 @@ public class GraphSelectorView extends ViewPart {
scriptFolder.setSelection(item);
fireTabOpenEvent();
}
-
+
/**
* This method creates the framework for what will be displayed by this dialog box.
* @param parent The composite that will contain all the elements from this dialog
@@ -80,7 +81,7 @@ public class GraphSelectorView extends ViewPart {
data2.bottom = new FormAttachment(100, 0);
Composite cmpGraph = new Composite(parent, SWT.NONE);
cmpGraph.setLayoutData(data2);
-
+
//This is for the tab view
cmpGraph.setLayout(new FormLayout());
@@ -98,7 +99,7 @@ public class GraphSelectorView extends ViewPart {
fireTabChangedEvent();
}
});
-
+
scriptFolder.addCTabFolder2Listener(new CTabFolder2Adapter() {
@Override
@@ -109,42 +110,50 @@ public class GraphSelectorView extends ViewPart {
});
}
-
+
/**
* Finds and returns the active component inside of the active script set
* @return The <code>GraphDisplaySet</code> that is currently active
+ * @since 2.0
*/
public GraphDisplaySet getActiveDisplaySet() {
int index = scriptFolder.getSelectionIndex();
- if(index >= 0 && index < displaySets.size())
+ if(index >= 0 && index < displaySets.size()) {
return displaySets.get(index);
- else
+ } else {
return null;
+ }
}
-
+
@Override
public void setFocus() {}
-
+
+ /**
+ * @since 2.0
+ */
public void addTabListener(ITabListener listener) {
tabListeners.add(listener);
}
-
+
+ /**
+ * @since 2.0
+ */
public void removeTabListener(ITabListener listener) {
tabListeners.remove(listener);
}
-
+
private void fireTabCloseEvent() {
for(ITabListener tabListener:tabListeners) {
tabListener.tabClosed();
}
}
-
+
private void fireTabOpenEvent() {
for(ITabListener tabListener:tabListeners) {
tabListener.tabOpened();
}
}
-
+
private void fireTabChangedEvent() {
for(ITabListener tabListener:tabListeners) {
tabListener.tabChanged();
@@ -159,14 +168,16 @@ public class GraphSelectorView extends ViewPart {
public void dispose() {
super.dispose();
- if(null != scriptFolder)
+ if(null != scriptFolder) {
scriptFolder.dispose();
+ }
scriptFolder = null;
- if(null != tabListeners)
+ if(null != tabListeners) {
tabListeners.removeAll(tabListeners);
+ }
tabListeners = null;
}
-
+
private CTabFolder scriptFolder;
private ArrayList<GraphDisplaySet> displaySets;
private ArrayList<ITabListener> tabListeners;
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/META-INF/MANIFEST.MF b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/META-INF/MANIFEST.MF
index df5ae19fbf..7e927465ed 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/META-INF/MANIFEST.MF
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/META-INF/MANIFEST.MF
@@ -13,7 +13,6 @@ Require-Bundle: org.junit;bundle-version="4.10.0",
org.eclipse.swtbot.eclipse.core,
org.apache.log4j,
org.eclipse.swtbot.go,
- org.eclipse.linuxtools.gcov.launch;bundle-version="1.0.0",
org.eclipse.cdt.managedbuilder.gnu.ui;bundle-version="8.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Fragment-Host: org.eclipse.linuxtools.systemtap.ui.ide
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/IDEPlugin.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/IDEPlugin.java
index c2986096da..242f70277a 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/IDEPlugin.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/IDEPlugin.java
@@ -16,10 +16,10 @@ import java.net.URISyntaxException;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.linuxtools.internal.systemtap.ui.ide.structures.TapsetLibrary;
import org.eclipse.linuxtools.systemtap.ui.consolelog.internal.ConsoleLogPlugin;
import org.eclipse.linuxtools.systemtap.ui.consolelog.preferences.ConsoleLogPreferenceConstants;
import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.ScriptConsole;
-import org.eclipse.linuxtools.systemtap.ui.ide.structures.TapsetLibrary;
import org.eclipse.ui.IWorkbenchListener;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -91,7 +91,9 @@ public class IDEPlugin extends AbstractUIPlugin {
String user = p.getString(ConsoleLogPreferenceConstants.SCP_USER);
String host = p.getString(ConsoleLogPreferenceConstants.HOST_NAME);
if (path == null)
+ {
path = ""; //$NON-NLS-1$
+ }
try {
URI uri = new URI("ssh", user, host, -1, path, null, null); //$NON-NLS-1$
return uri;
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/editors/stp/STPCompletionProcessor.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/editors/stp/STPCompletionProcessor.java
index 56b196c0ea..ec9e4f5581 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/editors/stp/STPCompletionProcessor.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/editors/stp/STPCompletionProcessor.java
@@ -26,7 +26,7 @@ import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.text.contentassist.IContextInformation;
import org.eclipse.jface.text.contentassist.IContextInformationValidator;
-import org.eclipse.linuxtools.systemtap.ui.ide.structures.TapsetLibrary;
+import org.eclipse.linuxtools.internal.systemtap.ui.ide.structures.TapsetLibrary;
public class STPCompletionProcessor implements IContentAssistProcessor, ITextHover {
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/editors/stp/STPMetadataSingleton.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/editors/stp/STPMetadataSingleton.java
index 56b595ea18..4f491808dc 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/editors/stp/STPMetadataSingleton.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/editors/stp/STPMetadataSingleton.java
@@ -15,8 +15,8 @@ package org.eclipse.linuxtools.internal.systemtap.ui.ide.editors.stp;
import java.util.ArrayList;
+import org.eclipse.linuxtools.internal.systemtap.ui.ide.structures.TapsetLibrary;
import org.eclipse.linuxtools.systemtap.structures.TreeNode;
-import org.eclipse.linuxtools.systemtap.ui.ide.structures.TapsetLibrary;
/**
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TapsetLibrary.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/structures/TapsetLibrary.java
index 37e54b4ca4..f6a73217f8 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TapsetLibrary.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/structures/TapsetLibrary.java
@@ -9,7 +9,7 @@
* IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
*******************************************************************************/
-package org.eclipse.linuxtools.systemtap.ui.ide.structures;
+package org.eclipse.linuxtools.internal.systemtap.ui.ide.structures;
import java.io.File;
import java.util.HashMap;
@@ -23,13 +23,11 @@ import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.linuxtools.internal.systemtap.ui.ide.IDEPlugin;
import org.eclipse.linuxtools.internal.systemtap.ui.ide.Localization;
import org.eclipse.linuxtools.internal.systemtap.ui.ide.preferences.IDEPreferenceConstants;
-import org.eclipse.linuxtools.internal.systemtap.ui.ide.structures.FunctionParser;
-import org.eclipse.linuxtools.internal.systemtap.ui.ide.structures.ProbeParser;
-import org.eclipse.linuxtools.internal.systemtap.ui.ide.structures.TapsetParser;
import org.eclipse.linuxtools.man.parser.ManPage;
import org.eclipse.linuxtools.systemtap.structures.TreeNode;
import org.eclipse.linuxtools.systemtap.structures.listeners.IUpdateListener;
import org.eclipse.linuxtools.systemtap.ui.ide.IDESessionSettings;
+import org.eclipse.linuxtools.systemtap.ui.ide.structures.TreeSettings;
import org.eclipse.linuxtools.systemtap.ui.systemtapgui.preferences.PreferenceConstants;
import org.eclipse.ui.PlatformUI;
@@ -253,15 +251,6 @@ public final class TapsetLibrary {
return true;
}
- /**
- * Removes the provided listener from the tapsetParser.
- * @param listener The listener to be removed from the tapsetParser
- */
- public static void removeUpdateListener(IUpdateListener listener) {
- functionParser.removeListener(listener);
- }
-
-
private static Job cacheFunctionManpages = new Job(Localization.getString("TapsetLibrary.0")){ //$NON-NLS-1$
private boolean cancelled;
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 a6a1c6a9b3..f783e865cf 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
@@ -12,8 +12,8 @@
package org.eclipse.linuxtools.internal.systemtap.ui.ide.views;
import org.eclipse.linuxtools.internal.systemtap.ui.ide.actions.FunctionBrowserAction;
+import org.eclipse.linuxtools.internal.systemtap.ui.ide.structures.TapsetLibrary;
import org.eclipse.linuxtools.systemtap.structures.TreeNode;
-import org.eclipse.linuxtools.systemtap.ui.ide.structures.TapsetLibrary;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Menu;
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/views/ProbeAliasBrowserView.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/views/ProbeAliasBrowserView.java
index a5a8700f3a..54a917c6a6 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/views/ProbeAliasBrowserView.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/views/ProbeAliasBrowserView.java
@@ -14,8 +14,8 @@ package org.eclipse.linuxtools.internal.systemtap.ui.ide.views;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.linuxtools.internal.systemtap.ui.ide.actions.ProbeAliasAction;
+import org.eclipse.linuxtools.internal.systemtap.ui.ide.structures.TapsetLibrary;
import org.eclipse.linuxtools.systemtap.structures.TreeNode;
-import org.eclipse.linuxtools.systemtap.ui.ide.structures.TapsetLibrary;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Menu;
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptHandler.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptHandler.java
index f688e41a7e..2ba0c06106 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptHandler.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/actions/RunScriptHandler.java
@@ -32,12 +32,12 @@ import org.eclipse.linuxtools.internal.systemtap.ui.ide.Localization;
import org.eclipse.linuxtools.internal.systemtap.ui.ide.editors.stp.STPEditor;
import org.eclipse.linuxtools.internal.systemtap.ui.ide.launcher.SystemTapScriptTester;
import org.eclipse.linuxtools.internal.systemtap.ui.ide.preferences.IDEPreferenceConstants;
+import org.eclipse.linuxtools.internal.systemtap.ui.ide.structures.TapsetLibrary;
import org.eclipse.linuxtools.systemtap.ui.consolelog.ScpClient;
import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.ScriptConsole;
import org.eclipse.linuxtools.systemtap.ui.editor.PathEditorInput;
import org.eclipse.linuxtools.systemtap.ui.ide.IDESessionSettings;
import org.eclipse.linuxtools.systemtap.ui.ide.structures.StapErrorParser;
-import org.eclipse.linuxtools.systemtap.ui.ide.structures.TapsetLibrary;
import org.eclipse.linuxtools.systemtap.ui.systemtapgui.preferences.EnvironmentVariablesPreferencePage;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Display;
@@ -182,8 +182,9 @@ public class RunScriptHandler extends AbstractHandler {
return false;
}
- if(ed.isDirty())
+ if(ed.isDirty()) {
ed.doSave(new ProgressMonitorPart(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), new FillLayout()));
+ }
return true;
}
@@ -231,7 +232,9 @@ public class RunScriptHandler extends AbstractHandler {
getImportedTapsets(cmdList);
if(isGuru())
+ {
cmdList.add("-g"); //$NON-NLS-1$
+ }
return finalizeScript(cmdList);
}
@@ -273,9 +276,9 @@ public class RunScriptHandler extends AbstractHandler {
boolean inLineComment = false;
boolean inBlockComment = false;
while(-1 != (curr = fr.read())) {
- if(!inLineComment && !inBlockComment && '%' == prev && '{' == curr)
+ if(!inLineComment && !inBlockComment && '%' == prev && '{' == curr) {
front = true;
- else if(!inLineComment && !inBlockComment && '%' == prev && '}' == curr && front) {
+ } else if(!inLineComment && !inBlockComment && '%' == prev && '}' == curr && front) {
imbedded = true;
break;
} else if(!inBlockComment && (('/' == prev && '/' == curr) || '#' == curr)) {
@@ -290,8 +293,9 @@ public class RunScriptHandler extends AbstractHandler {
prev = curr;
}
fr.close();
- if(imbedded)
+ if(imbedded) {
return true;
+ }
} catch (FileNotFoundException fnfe) {
fnfe.printStackTrace();
} catch (IOException ie) {
@@ -316,10 +320,11 @@ public class RunScriptHandler extends AbstractHandler {
script = new String[cmdList.size() + 4];
script[0] = "stap"; //$NON-NLS-1$
- if(getRunLocal() == false)
+ if(getRunLocal() == false) {
script[script.length-1] = tmpfileName;
- else
+ } else {
script[script.length-1] = fileName;
+ }
for(int i=0; i< cmdList.size(); i++) {
script[i+1] = cmdList.get(i).toString();
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TreeSettings.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TreeSettings.java
index 755f4f8d0b..ea78bd9819 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TreeSettings.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/systemtap/ui/ide/structures/TreeSettings.java
@@ -52,6 +52,7 @@ public final class TreeSettings {
* Allows access to the Tapset Function tree, which contains information about all
* functions stored in the tapset library.
* @return The <code>TreeNode</code> root of the Function tree.
+ * @since 2.0
*/
public static TreeNode getFunctionTree() {
if (!readData()) {
@@ -64,6 +65,7 @@ public final class TreeSettings {
* Allows access to the Tapset Probe Alias tree, which contains a list of all probe aliases
* in the tapset library.
* @return The <code>TreeNode</code> root of the Probe Alias tree.
+ * @since 2.0
*/
public static TreeNode getProbeTree() {
if (!readData()) {
@@ -77,6 +79,7 @@ public final class TreeSettings {
* @param func The Function tree to store in cache.
* @param probe The Probe Alias tree to store in cache.
* @return True if the caching is successful.
+ * @since 2.0
*/
public static boolean setTrees(TreeNode func, TreeNode probe) {
if (null == func || null == probe) {

Back to the top