Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/perf
diff options
context:
space:
mode:
authorDaniel Henrique Barboza2012-06-29 21:23:23 +0000
committerDaniel Henrique Barboza2012-06-29 21:23:23 +0000
commit2882e567c1cb2c595aaea52bad30b832f681ec10 (patch)
treee5426bd97ccd23ef89994edf820297ee237cc58a /perf
parent1c10397fc9dfb87d647f54a6afb64f8e8ead9af4 (diff)
downloadorg.eclipse.linuxtools-2882e567c1cb2c595aaea52bad30b832f681ec10.tar.gz
org.eclipse.linuxtools-2882e567c1cb2c595aaea52bad30b832f681ec10.tar.xz
org.eclipse.linuxtools-2882e567c1cb2c595aaea52bad30b832f681ec10.zip
Perf: removing all source code warnings.
Diffstat (limited to 'perf')
-rw-r--r--perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java12
-rw-r--r--perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfPlugin.java2
-rw-r--r--perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfEventsTab.java16
-rw-r--r--perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfLaunchConfigDelegate.java2
-rw-r--r--perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/remote/launch/PerfEventsTab.java21
5 files changed, 30 insertions, 23 deletions
diff --git a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java
index 2e8f7eb9ca..7ccc1105ba 100644
--- a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java
+++ b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java
@@ -11,7 +11,6 @@
package org.eclipse.linuxtools.internal.perf;
import java.io.BufferedReader;
-import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
@@ -243,12 +242,12 @@ public class PerfCore {
newCommand.add("-v");
if (config.getAttribute(PerfPlugin.ATTR_Multiplex, PerfPlugin.ATTR_Multiplex_default))
newCommand.add("-M");
- List<String> selE = config.getAttribute(PerfPlugin.ATTR_SelectedEvents, PerfPlugin.ATTR_SelectedEvents_default);
+ List<?> selE = config.getAttribute(PerfPlugin.ATTR_SelectedEvents, PerfPlugin.ATTR_SelectedEvents_default);
if (!config.getAttribute(PerfPlugin.ATTR_DefaultEvent, PerfPlugin.ATTR_DefaultEvent_default)
&& selE != null) {
- for(String e : selE) {
+ for(Object e : selE) {
newCommand.add("-e");
- newCommand.add(e);
+ newCommand.add((String)e);
}
}
} catch (CoreException e) { }
@@ -287,7 +286,7 @@ public class PerfCore {
}
} catch (CoreException e) { }
}
- return (String[])base.toArray( new String[base.size()] );
+ return base.toArray( new String[base.size()] );
}
public static String[] getAnnotateString(ILaunchConfiguration config, String dso, String symbol, String perfDataLoc, boolean OldPerfVersion) {
@@ -315,7 +314,7 @@ public class PerfCore {
//(Annotate string per symbol)
//if (PerfPlugin.DEBUG_ON) System.out.println(Arrays.toString( (String[])base.toArray( new String[base.size()] ) ));
- return (String[])base.toArray( new String[base.size()] );
+ return base.toArray( new String[base.size()] );
}
//Runs Perf Record on the given binary and records into perf.data before calling Report() to feed in the results.
public static void Record(ILaunchConfiguration config, String binaryPath) {
@@ -649,6 +648,7 @@ public class PerfCore {
public static void RefreshView()
{
Display.getDefault().syncExec(new Runnable() {
+ @Override
public void run() {
//Try to switch the active view to Perf.
try {
diff --git a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfPlugin.java b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfPlugin.java
index 2494278aae..93b1c48663 100644
--- a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfPlugin.java
+++ b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfPlugin.java
@@ -128,6 +128,7 @@ public class PerfPlugin extends AbstractUIPlugin {
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
+ @Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
@@ -137,6 +138,7 @@ public class PerfPlugin extends AbstractUIPlugin {
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
+ @Override
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
diff --git a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfEventsTab.java b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfEventsTab.java
index 902cdd510f..9f86665eb6 100644
--- a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfEventsTab.java
+++ b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfEventsTab.java
@@ -243,28 +243,28 @@ public class PerfEventsTab extends AbstractLaunchConfigurationTab {
refreshDefaultEnabled();
//restore custom hw breakpoints
- List<String> hwbps = config.getAttribute(PerfPlugin.ATTR_HwBreakpointEvents, PerfPlugin.ATTR_HwBreakpointEvents_default);
+ List<?> hwbps = config.getAttribute(PerfPlugin.ATTR_HwBreakpointEvents, PerfPlugin.ATTR_HwBreakpointEvents_default);
if (hwbps != null) {
for (int i = 0; i < _eventTabLists.length; i++) {
if (_eventTabItems[i].getText().equals(PerfPlugin.STRINGS_HWBREAKPOINTS)) {
_eventTabLists[i].removeAll();
- for (String e : hwbps) {
+ for (Object e : hwbps) {
TableItem x = new TableItem(_eventTabLists[i], SWT.NONE);
- x.setText(e);
+ x.setText((String)e);
}
}
}
}
//restore custom raw hw events
- List<String> rawhe = config.getAttribute(PerfPlugin.ATTR_RawHwEvents, PerfPlugin.ATTR_RawHwEvents_default);
+ List<?> rawhe = config.getAttribute(PerfPlugin.ATTR_RawHwEvents, PerfPlugin.ATTR_RawHwEvents_default);
if (rawhe != null) {
for (int i = 0; i < _eventTabLists.length; i++) {
if (_eventTabItems[i].getText().equals(PerfPlugin.STRINGS_RAWHWEvents)) {
_eventTabLists[i].removeAll();
- for (String e : rawhe) {
+ for (Object e : rawhe) {
TableItem x = new TableItem(_eventTabLists[i], SWT.NONE);
- x.setText(e);
+ x.setText((String)e);
}
}
}
@@ -272,9 +272,9 @@ public class PerfEventsTab extends AbstractLaunchConfigurationTab {
//tick all the boxes that are checked (the events i mean)
//This is a little inefficient, I guess. TODO Check more efficiently?
- List<String> selectedEvents = config.getAttribute(PerfPlugin.ATTR_SelectedEvents, PerfPlugin.ATTR_SelectedEvents_default);
+ List<?> selectedEvents = config.getAttribute(PerfPlugin.ATTR_SelectedEvents, PerfPlugin.ATTR_SelectedEvents_default);
if (selectedEvents != null) {
- for(String s : selectedEvents) {
+ for(Object s : selectedEvents) {
for (int i = 0; i < _eventTabLists.length; i++) {
for(TableItem x : _eventTabLists[i].getItems()) {
if (x.getText().equals(s))
diff --git a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfLaunchConfigDelegate.java b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfLaunchConfigDelegate.java
index 308c54bdfe..79de42e5fc 100644
--- a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfLaunchConfigDelegate.java
+++ b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfLaunchConfigDelegate.java
@@ -76,7 +76,7 @@ public class PerfLaunchConfigDelegate extends ProfileLaunchConfigurationDelegate
command.add( exePath.toOSString() ); // Add the path to the executable
//Compile string
command.addAll( Arrays.asList( arguments ) );
- String[] commandArray = (String[])command.toArray( new String[command.size()] );
+ String[] commandArray = command.toArray( new String[command.size()] );
boolean usePty = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_USE_TERMINAL, ICDTLaunchConfigurationConstants.USE_TERMINAL_DEFAULT);
Process process;
diff --git a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/remote/launch/PerfEventsTab.java b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/remote/launch/PerfEventsTab.java
index 6c9290ae59..2c4e4c9835 100644
--- a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/remote/launch/PerfEventsTab.java
+++ b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/remote/launch/PerfEventsTab.java
@@ -55,6 +55,7 @@ public class PerfEventsTab extends org.eclipse.linuxtools.internal.perf.launch.P
_chkDefaultEvent.setText("Default Event"); //$NON-NLS-1$
_chkDefaultEvent.setLayoutData(new GridData());
_chkDefaultEvent.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent se) {
refreshDefaultEnabled();
updateLaunchConfigurationDialog();
@@ -97,6 +98,7 @@ public class PerfEventsTab extends org.eclipse.linuxtools.internal.perf.launch.P
_eventTabLists[i] = eventList;
eventList.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
eventList.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent se) {
updateLaunchConfigurationDialog();
}
@@ -132,6 +134,7 @@ public class PerfEventsTab extends org.eclipse.linuxtools.internal.perf.launch.P
b.setText(" Add ");
b.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false));
b.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent se) {
int i = _tabFolder.getSelectionIndex();
if (rawTabIndex == i) {
@@ -161,6 +164,7 @@ public class PerfEventsTab extends org.eclipse.linuxtools.internal.perf.launch.P
b.setText("Remove Selected Events");
b.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, true, false,2,1));
b.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent se) {
_eventTabLists[_tabFolder.getSelectionIndex()].remove(_eventTabLists[_tabFolder.getSelectionIndex()].getSelectionIndices());
updateLaunchConfigurationDialog();
@@ -184,6 +188,7 @@ public class PerfEventsTab extends org.eclipse.linuxtools.internal.perf.launch.P
}
eventList.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent se) {
updateLaunchConfigurationDialog();
}
@@ -200,28 +205,28 @@ public class PerfEventsTab extends org.eclipse.linuxtools.internal.perf.launch.P
refreshDefaultEnabled();
//restore custom hw breakpoints
- List<String> hwbps = config.getAttribute(PerfPlugin.ATTR_HwBreakpointEvents, PerfPlugin.ATTR_HwBreakpointEvents_default);
+ List<?> hwbps = config.getAttribute(PerfPlugin.ATTR_HwBreakpointEvents, PerfPlugin.ATTR_HwBreakpointEvents_default);
if (hwbps != null) {
for (int i = 0; i < _eventTabLists.length; i++) {
if (_eventTabItems[i].getText().equals(PerfPlugin.STRINGS_HWBREAKPOINTS)) {
_eventTabLists[i].removeAll();
- for (String e : hwbps) {
+ for (Object e : hwbps) {
TableItem x = new TableItem(_eventTabLists[i], SWT.NONE);
- x.setText(e);
+ x.setText((String)e);
}
}
}
}
//restore custom raw hw events
- List<String> rawhe = config.getAttribute(PerfPlugin.ATTR_RawHwEvents, PerfPlugin.ATTR_RawHwEvents_default);
+ List<?> rawhe = config.getAttribute(PerfPlugin.ATTR_RawHwEvents, PerfPlugin.ATTR_RawHwEvents_default);
if (rawhe != null) {
for (int i = 0; i < _eventTabLists.length; i++) {
if (_eventTabItems[i].getText().equals(PerfPlugin.STRINGS_RAWHWEvents)) {
_eventTabLists[i].removeAll();
- for (String e : rawhe) {
+ for (Object e : rawhe) {
TableItem x = new TableItem(_eventTabLists[i], SWT.NONE);
- x.setText(e);
+ x.setText((String)e);
}
}
}
@@ -229,9 +234,9 @@ public class PerfEventsTab extends org.eclipse.linuxtools.internal.perf.launch.P
//tick all the boxes that are checked (the events i mean)
//This is a little inefficient, I guess. TODO Check more efficiently?
- List<String> selectedEvents = config.getAttribute(PerfPlugin.ATTR_SelectedEvents, PerfPlugin.ATTR_SelectedEvents_default);
+ List<?> selectedEvents = config.getAttribute(PerfPlugin.ATTR_SelectedEvents, PerfPlugin.ATTR_SelectedEvents_default);
if (selectedEvents != null) {
- for(String s : selectedEvents) {
+ for(Object s : selectedEvents) {
for (int i = 0; i < _eventTabLists.length; i++) {
for(TableItem x : _eventTabLists[i].getItems()) {
if (x.getText().equals(s))

Back to the top