Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/ChangeLogContainerSelectionGroup.java13
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/InsertChangeLogKeyHandler.java18
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/formatters/GNUFormat.java24
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/internal/gcov/dialog/OpenGCDialog.java13
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/internal/gcov/parser/CovManager.java8
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/internal/gcov/parser/GcnoRecordsParser.java4
-rw-r--r--gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/internal/gprof/parser/CallGraphDecoder.java7
-rw-r--r--gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/internal/gprof/parser/HistogramDecoder.java37
-rw-r--r--gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/internal/gprof/view/GmonView.java12
-rw-r--r--gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/internal/gprof/view/fields/CallsProfField.java18
-rw-r--r--gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/internal/gprof/view/fields/SampleProfField.java8
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/TestLaunching.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/TestManualLaunching.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/OprofileLaunchPlugin.java16
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/AbstractEventConfigTab.java2
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileCounter.java32
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewLogReaderAction.java5
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSession.java3
-rw-r--r--perf/org.eclipse.linuxtools.perf/META-INF/MANIFEST.MF1
-rw-r--r--perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java18
-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/launch/PerfOpenData.java4
-rw-r--r--perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/remote/launch/PerfLaunchConfigDelegate.java2
-rw-r--r--perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/remote/launch/PerfLaunchConfigurationTabGroup.java1
-rw-r--r--perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/remote/launch/PerfOptionsTab.java11
-rw-r--r--perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/ui/ReportComparisonView.java3
-rwxr-xr-xprofiling/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/internal/dataviewers/charts/dialogs/ChartDialog.java29
-rw-r--r--profiling/org.eclipse.linuxtools.ssh.proxy/src/org/eclipse/linuxtools/internal/ssh/proxy/SSHCommandLauncher.java6
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/ImportRPMsPage.java56
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/MetadataPage.java3
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoPreferencePage.java15
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/wizard/CreaterepoNewWizardPageTwo.java3
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/PerlMakefileParser.java6
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/PythonEggParser.java9
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/RubyGemParser.java3
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/internal/callgraph/core/SystemTapTextView.java6
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/StapGraph.java18
37 files changed, 153 insertions, 287 deletions
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/ChangeLogContainerSelectionGroup.java b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/ChangeLogContainerSelectionGroup.java
index ad914b66ca..ab419ed6c2 100644
--- a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/ChangeLogContainerSelectionGroup.java
+++ b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/ChangeLogContainerSelectionGroup.java
@@ -35,9 +35,7 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.model.WorkbenchLabelProvider;
import org.eclipse.ui.part.DrillDownComposite;
@@ -46,8 +44,6 @@ import org.eclipse.ui.part.DrillDownComposite;
* Workbench-level composite for choosing a container.
*/
public class ChangeLogContainerSelectionGroup extends Composite {
- // The listener to notify of events
- private Listener listener;
// Enable user to type in new container name
private boolean allowNewContainerName = true;
@@ -148,14 +144,6 @@ public class ChangeLogContainerSelectionGroup extends Composite {
containerNameField.setToolTipText(text);
}
}
-
- // fire an event so the parent can update its controls
- if (listener != null) {
- Event changeEvent = new Event();
- changeEvent.type = SWT.Selection;
- changeEvent.widget = this;
- listener.handleEvent(changeEvent);
- }
}
/**
@@ -190,7 +178,6 @@ public class ChangeLogContainerSelectionGroup extends Composite {
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.widthHint = widthHint;
containerNameField.setLayoutData(gd);
- containerNameField.addListener(SWT.Modify, listener);
containerNameField.setFont(this.getFont());
} else {
// filler...
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/InsertChangeLogKeyHandler.java b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/InsertChangeLogKeyHandler.java
index 0ade53ef82..e418780057 100644
--- a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/InsertChangeLogKeyHandler.java
+++ b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/InsertChangeLogKeyHandler.java
@@ -37,24 +37,26 @@ public class InsertChangeLogKeyHandler extends ChangeLogAction implements
private IEditorPart currentEditor;
private String getEditorName() {
- if (currentEditor != null)
+ if (currentEditor != null) {
return returnQualifedEditor(currentEditor.getClass());
- else
+ } else {
return "";
+ }
}
private String getEntryFilePath() {
- if (currentEditor != null)
+ if (currentEditor != null) {
return getDocumentLocation(currentEditor, false);
- else
+ } else {
return "";
+ }
}
- private String returnQualifedEditor(Class<?> ClassName) {
- return ClassName.toString().substring(
- ClassName.getPackage().toString().length() - 1,
- ClassName.toString().length());
+ private String returnQualifedEditor(Class<?> className) {
+ return className.toString().substring(
+ className.getPackage().toString().length() - 1,
+ className.toString().length());
}
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/formatters/GNUFormat.java b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/formatters/GNUFormat.java
index 8ed9be02c8..dd8c22f580 100644
--- a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/formatters/GNUFormat.java
+++ b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/formatters/GNUFormat.java
@@ -233,16 +233,16 @@ public class GNUFormat implements IFormatterChangeLogContrib {
* <code>offset</code> pointing to the last '\n'. This string would be
* changed to: "(main): Removed.\n\n".
*
- * @param changelog_doc
+ * @param changelogDoc
* @param offset
* @return The new offset.
*/
- private int removeWhitespaceOnlyLines(IDocument changelog_doc, int offset) {
+ private int removeWhitespaceOnlyLines(IDocument changelogDoc, int offset) {
int initialOffset = offset;
int backedUpOffset = offset;
char charAtOffset;
try {
- charAtOffset = changelog_doc.get(offset, 1).charAt(0);
+ charAtOffset = changelogDoc.get(offset, 1).charAt(0);
} catch (BadLocationException e) {
e.printStackTrace();
return offset;
@@ -250,7 +250,7 @@ public class GNUFormat implements IFormatterChangeLogContrib {
while( backedUpOffset > 0 && (charAtOffset == '\n' || charAtOffset == '\t' || charAtOffset == ' ') ) {
backedUpOffset--;
try {
- charAtOffset = changelog_doc.get(backedUpOffset, 1).charAt(0);
+ charAtOffset = changelogDoc.get(backedUpOffset, 1).charAt(0);
} catch (BadLocationException e) {
e.printStackTrace();
break;
@@ -259,7 +259,7 @@ public class GNUFormat implements IFormatterChangeLogContrib {
if ( (initialOffset - backedUpOffset) > 2 ) {
try {
int replaceLength = (initialOffset - backedUpOffset - 2);
- changelog_doc.replace(backedUpOffset + 2, replaceLength, "");
+ changelogDoc.replace(backedUpOffset + 2, replaceLength, "");
// change offset accordingly
offset -= replaceLength;
} catch (BadLocationException e) {
@@ -313,17 +313,17 @@ public class GNUFormat implements IFormatterChangeLogContrib {
return reversePathb;
}
- private int findChangeLogPattern(IDocument changelog_doc, int startOffset) {
+ private int findChangeLogPattern(IDocument changelogDoc, int startOffset) {
// find the "pattern" of a changelog entry. Not a specific one,
// but one that "looks" like an entry
int nextEntry = startOffset;
int line_length = 0;
String entry = ""; // $NON-NLS-1$
- while (nextEntry < changelog_doc.getLength()) {
+ while (nextEntry < changelogDoc.getLength()) {
try {
// Get the line of interest in the changelog document
- line_length = changelog_doc.getLineOfOffset(nextEntry);
- entry = changelog_doc.get(nextEntry, changelog_doc
+ line_length = changelogDoc.getLineOfOffset(nextEntry);
+ entry = changelogDoc.get(nextEntry, changelogDoc
.getLineLength(line_length));
// Attempt to find date pattern on line
if (matchDatePattern(entry)) {
@@ -331,7 +331,7 @@ public class GNUFormat implements IFormatterChangeLogContrib {
break;
}
// If no date matches, move to the next line
- nextEntry += changelog_doc.getLineLength(line_length);
+ nextEntry += changelogDoc.getLineLength(line_length);
} catch (BadLocationException e) {
ChangelogPlugin.getDefault().getLog().log(
new Status(IStatus.ERROR, ChangelogPlugin.PLUGIN_ID, IStatus.ERROR, e
@@ -362,9 +362,9 @@ public class GNUFormat implements IFormatterChangeLogContrib {
return false;
}
- private int findChangeLogEntry(IDocument changelog_doc, String entry) {
+ private int findChangeLogEntry(IDocument changelogDoc, String entry) {
FindReplaceDocumentAdapter findDocumentAptd = new FindReplaceDocumentAdapter(
- changelog_doc);
+ changelogDoc);
IRegion region = null;
try {
region = findDocumentAptd.find(0, entry, true, false,/*whole world */ false, true);
diff --git a/gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/internal/gcov/dialog/OpenGCDialog.java b/gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/internal/gcov/dialog/OpenGCDialog.java
index f9af6ba0e6..ca0f52feb4 100644
--- a/gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/internal/gcov/dialog/OpenGCDialog.java
+++ b/gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/internal/gcov/dialog/OpenGCDialog.java
@@ -63,8 +63,6 @@ public class OpenGCDialog extends Dialog {
private Text binText;
private String binValue;
- private Button openThisFileOnlyButton;
- private Button openCoverageSummaryButton;
private boolean openCoverageSummary = true;
/* error label */
@@ -73,9 +71,6 @@ public class OpenGCDialog extends Dialog {
/* validation boolean */
private boolean binaryValid;
- /* internal listener */
- private final BinaryModifyListener binModifyListener = new BinaryModifyListener();
-
private final String defaultValue;
private final IPath gcFile;
@@ -139,7 +134,7 @@ public class OpenGCDialog extends Dialog {
data = new GridData(GridData.FILL_HORIZONTAL);
data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
binText.setLayoutData(data);
- binText.addModifyListener(binModifyListener);
+ binText.addModifyListener(new BinaryModifyListener());
Composite cbBin = new Composite(c, SWT.NONE);
data = new GridData(GridData.HORIZONTAL_ALIGN_END);
@@ -168,9 +163,9 @@ public class OpenGCDialog extends Dialog {
GridData covModeData = new GridData(GridData.FILL_BOTH);
covMode.setLayoutData(covModeData);
covMode.setLayout(new GridLayout());
- openThisFileOnlyButton = new Button(covMode, SWT.RADIO);
+ Button openThisFileOnlyButton = new Button(covMode, SWT.RADIO);
openThisFileOnlyButton.setLayoutData(new GridData());
- openCoverageSummaryButton = new Button(covMode, SWT.RADIO);
+ final Button openCoverageSummaryButton = new Button(covMode, SWT.RADIO);
openCoverageSummaryButton.setLayoutData(new GridData());
String cFile = gcFile.removeFileExtension().lastSegment() + ".c"; //$NON-NLS-1$
@@ -224,7 +219,7 @@ public class OpenGCDialog extends Dialog {
} else {
binaryValid = false;
getButton(IDialogConstants.OK_ID).setEnabled(false);
- if (!binValue.equals("")) { //$NON-NLS-1$
+ if (!binValue.isEmpty()) {
errorLabel.setText(NLS.bind(Messages.OpenGCDialog_bin_dne_error_label, binText.getText()));
} else {
errorLabel.setText(Messages.OpenGCDialog_no_bin_error_label);
diff --git a/gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/internal/gcov/parser/CovManager.java b/gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/internal/gcov/parser/CovManager.java
index 4a59f8cc2c..42894f6802 100644
--- a/gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/internal/gcov/parser/CovManager.java
+++ b/gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/internal/gcov/parser/CovManager.java
@@ -120,7 +120,7 @@ public class CovManager implements Serializable {
for (String gcdaPath : covFilesPaths) {
String gcnoPath = gcdaPath.replace(".gcda", ".gcno"); //$NON-NLS-1$ //$NON-NLS-2$
// parse GCNO file
- traceFile = OpenTraceFileStream(gcnoPath, ".gcno", sourcePath); //$NON-NLS-1$
+ traceFile = openTraceFileStream(gcnoPath, ".gcno", sourcePath); //$NON-NLS-1$
if (traceFile == null) {
return;
}
@@ -138,7 +138,7 @@ public class CovManager implements Serializable {
}
// parse GCDA file
- traceFile = OpenTraceFileStream(gcdaPath, ".gcda", sourcePath); //$NON-NLS-1$
+ traceFile = openTraceFileStream(gcdaPath, ".gcda", sourcePath); //$NON-NLS-1$
if (traceFile == null)
return;
if (noRcrd.getFnctns().isEmpty()) {
@@ -250,7 +250,7 @@ public class CovManager implements Serializable {
}
// transform String path to stream
- private DataInput OpenTraceFileStream(String filePath, String extension, Map<File, File> sourcePath)
+ private DataInput openTraceFileStream(String filePath, String extension, Map<File, File> sourcePath)
throws FileNotFoundException {
File f = new File(filePath).getAbsoluteFile();
String filename = f.getName();
@@ -278,7 +278,7 @@ public class CovManager implements Serializable {
if (dir != null) {
f = new File(dir, postfix);
if (f.isFile() && f.canRead()) {
- return OpenTraceFileStream(f.getAbsolutePath(), extension, sourcePath);
+ return openTraceFileStream(f.getAbsolutePath(), extension, sourcePath);
}
}
diff --git a/gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/internal/gcov/parser/GcnoRecordsParser.java b/gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/internal/gcov/parser/GcnoRecordsParser.java
index 3c1a894db5..9c3ba7d122 100644
--- a/gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/internal/gcov/parser/GcnoRecordsParser.java
+++ b/gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/internal/gcov/parser/GcnoRecordsParser.java
@@ -40,9 +40,9 @@ public class GcnoRecordsParser {
private final ArrayList<SourceFile> currentAllSrcs;
private final HashMap<String, SourceFile> sourceMap;
- public GcnoRecordsParser(HashMap<String, SourceFile> sourceMap, ArrayList<SourceFile> AllSrcs) {
+ public GcnoRecordsParser(HashMap<String, SourceFile> sourceMap, ArrayList<SourceFile> allSrcs) {
this.sourceMap = sourceMap;
- this.currentAllSrcs = AllSrcs;
+ this.currentAllSrcs = allSrcs;
}
private SourceFile findOrAdd(String fileName) {
diff --git a/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/internal/gprof/parser/CallGraphDecoder.java b/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/internal/gprof/parser/CallGraphDecoder.java
index b32a8051dc..39b36be6f8 100644
--- a/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/internal/gprof/parser/CallGraphDecoder.java
+++ b/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/internal/gprof/parser/CallGraphDecoder.java
@@ -49,10 +49,10 @@ public class CallGraphDecoder {
* @param stream
* @throws IOException
*/
- public void decodeCallGraphRecord(DataInput stream, boolean BSDFormat) throws IOException {
+ public void decodeCallGraphRecord(DataInput stream, boolean bsdFormat) throws IOException {
long from_pc = readAddress(stream);
long self_pc = readAddress(stream);
- int count = BSDFormat?(int)readAddress(stream):stream.readInt();
+ int count = bsdFormat?(int)readAddress(stream):stream.readInt();
IBinaryObject program = decoder.getProgram();
IAddressFactory addressFactory = program.getAddressFactory();
IAddress parentAddress = addressFactory.createAddress(Long.toString(from_pc));
@@ -67,8 +67,7 @@ public class CallGraphDecoder {
protected long readAddress(DataInput stream) throws IOException {
- long ret = stream.readInt() & 0xFFFFFFFFL;
- return ret;
+ return stream.readInt() & 0xFFFFFFFFL;
}
diff --git a/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/internal/gprof/parser/HistogramDecoder.java b/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/internal/gprof/parser/HistogramDecoder.java
index fdb4be810d..62f62af484 100644
--- a/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/internal/gprof/parser/HistogramDecoder.java
+++ b/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/internal/gprof/parser/HistogramDecoder.java
@@ -67,8 +67,7 @@ public class HistogramDecoder {
}
protected long readAddress(DataInput stream) throws IOException {
- long ret = stream.readInt() & 0xFFFFFFFFL;
- return ret;
+ return stream.readInt() & 0xFFFFFFFFL;
}
public boolean hasValues() {
@@ -108,47 +107,47 @@ public class HistogramDecoder {
* @throws IOException if an IO error occurs
*/
public void decodeOldHeader(DataInput stream) throws IOException {
- long low_pc = readAddress(stream);
- long high_pc = readAddress(stream);
+ long lowPC = readAddress(stream);
+ long highPC = readAddress(stream);
int ncnt = stream.readInt();
int version = stream.readInt();
- int header_size;
+ int headerSize;
int profrate = 0;
if (version == GmonDecoder.GMONVERSION)
{
profrate = stream.readInt();
stream.skipBytes(GMON_HDRSIZE_BSD44);
if (decoder._32_bit_platform) {
- header_size = GMON_HDRSIZE_BSD44_32;
+ headerSize = GMON_HDRSIZE_BSD44_32;
} else {
- header_size = GMON_HDRSIZE_BSD44_64;
+ headerSize = GMON_HDRSIZE_BSD44_64;
}
} else {
/* Old style BSD format. */
if (decoder._32_bit_platform) {
- header_size = GMON_HDRSIZE_OLDBSD_32;
+ headerSize = GMON_HDRSIZE_OLDBSD_32;
} else {
- header_size = GMON_HDRSIZE_OLDBSD_64;
+ headerSize = GMON_HDRSIZE_OLDBSD_64;
}
}
- int samp_bytes = ncnt - header_size;
- int hist_num_bins = samp_bytes / 2;
+ int sampBytes = ncnt - headerSize;
+ int histNumBins = sampBytes / 2;
- if (!isCompatible(low_pc, high_pc, profrate, hist_num_bins))
+ if (!isCompatible(lowPC, highPC, profrate, histNumBins))
{
// TODO exception to normalize
throw new RuntimeException(Messages.HistogramDecoder_INCOMPATIBLE_HIST_HEADER_ERROR_MSG);
}
- this.lowpc = low_pc;
- this.highpc = high_pc;
+ this.lowpc = lowPC;
+ this.highpc = highPC;
this.profRate = profrate;
- hist_sample = new int[hist_num_bins]; // Impl note: JVM sets all integers to 0
+ hist_sample = new int[histNumBins]; // Impl note: JVM sets all integers to 0
dimenAbbrev = 's';
long temp = highpc - lowpc;
- bucketSize = Math.round(temp/(double)hist_num_bins);
+ bucketSize = Math.round(temp/(double)histNumBins);
}
@@ -157,16 +156,16 @@ public class HistogramDecoder {
* @param lowpc
* @param highpc
* @param profrate
- * @param sample_count
+ * @param sampleCount
* @return whether the gmon file currently parsed is compatible with the previous one (if any).
*/
- private boolean isCompatible(long lowpc, long highpc, int profrate, int sample_count) {
+ private boolean isCompatible(long lowpc, long highpc, int profrate, int sampleCount) {
if (!initialized) return true;
return (
(this.lowpc == lowpc) &&
(this.highpc == highpc) &&
(this.profRate == profrate) &&
- (this.hist_sample.length == sample_count)
+ (this.hist_sample.length == sampleCount)
);
}
diff --git a/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/internal/gprof/view/GmonView.java b/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/internal/gprof/view/GmonView.java
index b7144684c1..24171b918d 100644
--- a/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/internal/gprof/view/GmonView.java
+++ b/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/internal/gprof/view/GmonView.java
@@ -262,18 +262,18 @@ public class GmonView extends AbstractSTDataView {
* Display gmon results in the GProf View. NOTE: this method has to be called from within the UI thread.
*
* @param decoder
- * @param secondary_id_usually_path_to_gmon_file
+ * @param id Secondary id, usually path to gmon file.
*/
- public static GmonView displayGprofView(GmonDecoder decoder, String secondary_id_usually_path_to_gmon_file) {
+ public static GmonView displayGprofView(GmonDecoder decoder, String id) {
GmonView gmonview = null;
try {
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
IWorkbenchPage page = window.getActivePage();
- if (secondary_id_usually_path_to_gmon_file != null) {
- secondary_id_usually_path_to_gmon_file = secondary_id_usually_path_to_gmon_file.replace('.', '_');
- secondary_id_usually_path_to_gmon_file = secondary_id_usually_path_to_gmon_file.replace(':', '_');
+ if (id != null) {
+ id = id.replace('.', '_');
+ id = id.replace(':', '_');
}
- gmonview = (GmonView) page.showView(ID, secondary_id_usually_path_to_gmon_file,
+ gmonview = (GmonView) page.showView(ID, id,
IWorkbenchPage.VIEW_ACTIVATE);
if (decoder.getHistogramDecoder().getProfRate() == 0) {
gmonview.switchSampleTime.setToolTipText("Unable to display time, because profiling rate is null"); //$NON-NLS-1$
diff --git a/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/internal/gprof/view/fields/CallsProfField.java b/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/internal/gprof/view/fields/CallsProfField.java
index 513bad3df3..916f545969 100644
--- a/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/internal/gprof/view/fields/CallsProfField.java
+++ b/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/internal/gprof/view/fields/CallsProfField.java
@@ -53,29 +53,24 @@ public class CallsProfField extends AbstractSTDataViewersField implements IChart
return Messages.CallsProfField_TOTAL_NUMBER_OF_FUNCTION_CALLS;
} else if (element instanceof HistFunction) {
String format = Messages.CallsProfField_INVOCATION_NUMBER;
- String s = String.format(format, ((HistFunction) element).getName());
- return s;
+ return String.format(format, ((HistFunction) element).getName());
} else if (element instanceof CGCategory) {
CGCategory cat = (CGCategory) element;
if (CGCategory.CHILDREN.equals(cat.getName())) {
String format = Messages.CallsProfField_TOTAL_CALL_NUMBER_BY_FUNCTION;
- String s = String.format(format, cat.getParent().getName());
- return s;
+ return String.format(format, cat.getParent().getName());
} else {
String format = Messages.CallsProfField_INVOCATION_NUMBER;
- String s = String.format(format, cat.getParent().getName());
- return s;
+ return String.format(format, cat.getParent().getName());
}
} else if (element instanceof CGArc) {
CGArc cgarc = (CGArc) element;
if (CGCategory.CHILDREN.equals(cgarc.getParent().getName())) {
String format = Messages.CallsProfField_FUNCTION_CALL_NUMBER_BY_FUNCTION;
- String s = String.format(format, cgarc.getParent().getParent().getName(), cgarc.getFunctionName());
- return s;
+ return String.format(format, cgarc.getParent().getParent().getName(), cgarc.getFunctionName());
} else {
String format = Messages.CallsProfField_FUNCTION_CALL_NUMBER_BY_FUNCTION;
- String s = String.format(format, cgarc.getFunctionName(), cgarc.getParent().getParent().getName());
- return s;
+ return String.format(format, cgarc.getFunctionName(), cgarc.getParent().getParent().getName());
}
}
return null;
@@ -85,8 +80,9 @@ public class CallsProfField extends AbstractSTDataViewersField implements IChart
public String getValue(Object obj) {
TreeElement e = (TreeElement) obj;
int i = e.getCalls();
- if (i == -1)
+ if (i == -1) {
return ""; //$NON-NLS-1$
+ }
String ret = String.valueOf(i);
return ret;
}
diff --git a/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/internal/gprof/view/fields/SampleProfField.java b/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/internal/gprof/view/fields/SampleProfField.java
index 0005d897a6..fe7dacd70a 100644
--- a/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/internal/gprof/view/fields/SampleProfField.java
+++ b/gprof/org.eclipse.linuxtools.gprof/src/org/eclipse/linuxtools/internal/gprof/view/fields/SampleProfField.java
@@ -66,10 +66,6 @@ public class SampleProfField extends AbstractSTDataViewersField implements IChar
return null;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.dataviewers.abstractviewers.ISTDataViewersField#getValue(java.lang.Object)
- */
@Override
public String getValue(Object obj) {
TreeElement e = (TreeElement) obj;
@@ -94,9 +90,9 @@ public class SampleProfField extends AbstractSTDataViewersField implements IChar
* @param profRate profiling frequency
* @return time value with the best adapted time unit
*/
- public static String getValue(double i, double prof_rate)
+ public static String getValue(double i, double profRate)
{
- long timeInNs = (long) (i/prof_rate);
+ long timeInNs = (long) (i/profRate);
long ns = timeInNs%1000;
long timeInUs = timeInNs/1000;
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/TestLaunching.java b/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/TestLaunching.java
index 893ead25b2..e2aa47b8ff 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/TestLaunching.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/TestLaunching.java
@@ -90,12 +90,12 @@ public class TestLaunching extends AbstractTest {
ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
wc.setAttribute(OprofileLaunchPlugin.ATTR_USE_DEFAULT_EVENT, false);
- wc.setAttribute(OprofileLaunchPlugin.ATTR_COUNTER_ENABLED(0), true);
- wc.setAttribute(OprofileLaunchPlugin.ATTR_COUNTER_COUNT(0), 100000);
- wc.setAttribute(OprofileLaunchPlugin.ATTR_COUNTER_EVENT(0, 0), "FAKE_EVENT"); //$NON-NLS-1$
- wc.setAttribute(OprofileLaunchPlugin.ATTR_COUNTER_PROFILE_KERNEL(0), true);
- wc.setAttribute(OprofileLaunchPlugin.ATTR_COUNTER_PROFILE_USER(0), true);
- wc.setAttribute(OprofileLaunchPlugin.ATTR_COUNTER_UNIT_MASK(0), 0);
+ wc.setAttribute(OprofileLaunchPlugin.attrConterEnabled(0), true);
+ wc.setAttribute(OprofileLaunchPlugin.attrCounterCount(0), 100000);
+ wc.setAttribute(OprofileLaunchPlugin.attrConterEvent(0, 0), "FAKE_EVENT"); //$NON-NLS-1$
+ wc.setAttribute(OprofileLaunchPlugin.attrCounterProfileKernel(0), true);
+ wc.setAttribute(OprofileLaunchPlugin.attrCounterProfileUser(0), true);
+ wc.setAttribute(OprofileLaunchPlugin.attrCounterUnitMask(0), 0);
wc.doSave();
LaunchTestingOptions options = new LaunchTestingOptions();
options.setOprofileProject(proj.getProject());
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/TestManualLaunching.java b/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/TestManualLaunching.java
index e69b93a6fa..3bac80cc09 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/TestManualLaunching.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/TestManualLaunching.java
@@ -90,12 +90,12 @@ public class TestManualLaunching extends AbstractTest {
ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
wc.setAttribute(OprofileLaunchPlugin.ATTR_USE_DEFAULT_EVENT, false);
- wc.setAttribute(OprofileLaunchPlugin.ATTR_COUNTER_ENABLED(0), true);
- wc.setAttribute(OprofileLaunchPlugin.ATTR_COUNTER_COUNT(0), 100000);
- wc.setAttribute(OprofileLaunchPlugin.ATTR_COUNTER_EVENT(0, 0), "FAKE_EVENT"); //$NON-NLS-1$
- wc.setAttribute(OprofileLaunchPlugin.ATTR_COUNTER_PROFILE_KERNEL(0), true);
- wc.setAttribute(OprofileLaunchPlugin.ATTR_COUNTER_PROFILE_USER(0), true);
- wc.setAttribute(OprofileLaunchPlugin.ATTR_COUNTER_UNIT_MASK(0), 0);
+ wc.setAttribute(OprofileLaunchPlugin.attrConterEnabled(0), true);
+ wc.setAttribute(OprofileLaunchPlugin.attrCounterCount(0), 100000);
+ wc.setAttribute(OprofileLaunchPlugin.attrConterEvent(0, 0), "FAKE_EVENT"); //$NON-NLS-1$
+ wc.setAttribute(OprofileLaunchPlugin.attrCounterProfileKernel(0), true);
+ wc.setAttribute(OprofileLaunchPlugin.attrCounterProfileUser(0), true);
+ wc.setAttribute(OprofileLaunchPlugin.attrCounterUnitMask(0), 0);
wc.doSave();
LaunchTestingOptions options = new LaunchTestingOptions();
options.setOprofileProject(proj.getProject());
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/OprofileLaunchPlugin.java b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/OprofileLaunchPlugin.java
index 2a54030ffd..3758806f63 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/OprofileLaunchPlugin.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/OprofileLaunchPlugin.java
@@ -50,14 +50,14 @@ public class OprofileLaunchPlugin extends AbstractUIPlugin {
public static final String ATTR_MANUAL_PROFILE = ID_LAUNCH_PROFILE + ".MANUAL_PROFILE"; //$NON-NLS-1$
// Counter Attributes \\
- private static final String ATTR_COUNTER(int nr) { return ID_LAUNCH_PROFILE + ".COUNTER_" + nr; } //$NON-NLS-1$
- public static final String ATTR_COUNTER_ENABLED(int nr) { return ATTR_COUNTER(nr) + ".ENABLED"; } //$NON-NLS-1$
- public static final String ATTR_COUNTER_EVENT(int nr, int ev) { return ATTR_COUNTER(nr) + ".EVENT " + ev; } //$NON-NLS-1$
- public static final String ATTR_COUNTER_PROFILE_KERNEL(int nr) { return ATTR_COUNTER(nr) + ".PROFILE_KERNEL"; } //$NON-NLS-1$
- public static final String ATTR_COUNTER_PROFILE_USER(int nr) { return ATTR_COUNTER(nr) + ".PROFILE_USER"; } //$NON-NLS-1$
- public static final String ATTR_COUNTER_COUNT(int nr) { return ATTR_COUNTER(nr) + ".COUNT"; } //$NON-NLS-1$
- public static final String ATTR_COUNTER_UNIT_MASK(int nr) { return ATTR_COUNTER(nr) + ".UNIT_MASK"; } //$NON-NLS-1$
- public static final String ATTR_NUMBER_OF_EVENTS(int nr) { return ATTR_COUNTER(nr) + ".EVENTS"; } //$NON-NLS-1$
+ private static final String attrCounter(int nr) { return ID_LAUNCH_PROFILE + ".COUNTER_" + nr; } //$NON-NLS-1$
+ public static final String attrConterEnabled(int nr) { return attrCounter(nr) + ".ENABLED"; } //$NON-NLS-1$
+ public static final String attrConterEvent(int nr, int ev) { return attrCounter(nr) + ".EVENT " + ev; } //$NON-NLS-1$
+ public static final String attrCounterProfileKernel(int nr) { return attrCounter(nr) + ".PROFILE_KERNEL"; } //$NON-NLS-1$
+ public static final String attrCounterProfileUser(int nr) { return attrCounter(nr) + ".PROFILE_USER"; } //$NON-NLS-1$
+ public static final String attrCounterCount(int nr) { return attrCounter(nr) + ".COUNT"; } //$NON-NLS-1$
+ public static final String attrCounterUnitMask(int nr) { return attrCounter(nr) + ".UNIT_MASK"; } //$NON-NLS-1$
+ public static final String attrNumberOfEvents(int nr) { return attrCounter(nr) + ".EVENTS"; } //$NON-NLS-1$
public static final String ICON_PATH = "icons/"; //$NON-NLS-1$
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/AbstractEventConfigTab.java b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/AbstractEventConfigTab.java
index 69efd4e6b6..fcbbca4d8e 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/AbstractEventConfigTab.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/AbstractEventConfigTab.java
@@ -241,7 +241,7 @@ AbstractLaunchConfigurationTab {
for (CounterSubTab counterSubTab : counterSubTabs){
int nr = counterSubTab.counter.getNumber();
- if(counterSubTab.enabledCheck.getSelection() && config.getAttribute(OprofileLaunchPlugin.ATTR_NUMBER_OF_EVENTS(nr), 0) == 0){
+ if(counterSubTab.enabledCheck.getSelection() && config.getAttribute(OprofileLaunchPlugin.attrNumberOfEvents(nr), 0) == 0){
valid = false;
}
// if target list is empty valid is false
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileCounter.java b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileCounter.java
index c41d23b4ba..2a781e5c5d 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileCounter.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileCounter.java
@@ -147,17 +147,17 @@ public class OprofileCounter {
* @param config the launch configuration
*/
public void saveConfiguration(ILaunchConfigurationWorkingCopy config) {
- config.setAttribute(OprofileLaunchPlugin.ATTR_COUNTER_ENABLED(number), _enabled);
- config.setAttribute(OprofileLaunchPlugin.ATTR_NUMBER_OF_EVENTS(number), daemonEvent.length);
+ config.setAttribute(OprofileLaunchPlugin.attrConterEnabled(number), _enabled);
+ config.setAttribute(OprofileLaunchPlugin.attrNumberOfEvents(number), daemonEvent.length);
for (int i = 0; i < daemonEvent.length; i++) {
if (daemonEvent[i].getEvent() != null) {
- config.setAttribute(OprofileLaunchPlugin.ATTR_COUNTER_EVENT(number, i), daemonEvent[i].getEvent().getText());
- config.setAttribute(OprofileLaunchPlugin.ATTR_COUNTER_UNIT_MASK(number), daemonEvent[i].getEvent().getUnitMask().getMaskValue());
+ config.setAttribute(OprofileLaunchPlugin.attrConterEvent(number, i), daemonEvent[i].getEvent().getText());
+ config.setAttribute(OprofileLaunchPlugin.attrCounterUnitMask(number), daemonEvent[i].getEvent().getUnitMask().getMaskValue());
}
- config.setAttribute(OprofileLaunchPlugin.ATTR_COUNTER_PROFILE_KERNEL(number), daemonEvent[i].getProfileKernel());
- config.setAttribute(OprofileLaunchPlugin.ATTR_COUNTER_PROFILE_USER(number), daemonEvent[i].getProfileUser());
- config.setAttribute(OprofileLaunchPlugin.ATTR_COUNTER_COUNT(number), daemonEvent[i].getResetCount());
+ config.setAttribute(OprofileLaunchPlugin.attrCounterProfileKernel(number), daemonEvent[i].getProfileKernel());
+ config.setAttribute(OprofileLaunchPlugin.attrCounterProfileUser(number), daemonEvent[i].getProfileUser());
+ config.setAttribute(OprofileLaunchPlugin.attrCounterCount(number), daemonEvent[i].getResetCount());
}
}
@@ -167,26 +167,26 @@ public class OprofileCounter {
*/
public void loadConfiguration(ILaunchConfiguration config) {
try {
- _enabled = config.getAttribute(OprofileLaunchPlugin.ATTR_COUNTER_ENABLED(number), false);
- int numEvents = config.getAttribute(OprofileLaunchPlugin.ATTR_NUMBER_OF_EVENTS(number), 1);
+ _enabled = config.getAttribute(OprofileLaunchPlugin.attrConterEnabled(number), false);
+ int numEvents = config.getAttribute(OprofileLaunchPlugin.attrNumberOfEvents(number), 1);
daemonEvent = new OprofileDaemonEvent[numEvents];
for (int i = 0; i < numEvents; i++) {
- String str = config.getAttribute(OprofileLaunchPlugin.ATTR_COUNTER_EVENT(number, i), ""); //$NON-NLS-1$
- int maskValue = config.getAttribute(OprofileLaunchPlugin.ATTR_COUNTER_UNIT_MASK(number), OpUnitMask.SET_DEFAULT_MASK);
+ String str = config.getAttribute(OprofileLaunchPlugin.attrConterEvent(number, i), ""); //$NON-NLS-1$
+ int maskValue = config.getAttribute(OprofileLaunchPlugin.attrCounterUnitMask(number), OpUnitMask.SET_DEFAULT_MASK);
daemonEvent[i] = new OprofileDaemonEvent();
- daemonEvent[i].setEvent(_eventFromString(str));
+ daemonEvent[i].setEvent(eventFromString(str));
if (daemonEvent[i].getEvent() == null) {
continue;
}
daemonEvent[i].getEvent().getUnitMask().setMaskValue(maskValue);
- daemonEvent[i].setProfileKernel(config.getAttribute(OprofileLaunchPlugin.ATTR_COUNTER_PROFILE_KERNEL(number), false));
- daemonEvent[i].setProfileUser(config.getAttribute(OprofileLaunchPlugin.ATTR_COUNTER_PROFILE_USER(number), false));
+ daemonEvent[i].setProfileKernel(config.getAttribute(OprofileLaunchPlugin.attrCounterProfileKernel(number), false));
+ daemonEvent[i].setProfileUser(config.getAttribute(OprofileLaunchPlugin.attrCounterProfileUser(number), false));
- daemonEvent[i].setResetCount(config.getAttribute(OprofileLaunchPlugin.ATTR_COUNTER_COUNT(number), OprofileDaemonEvent.COUNT_UNINITIALIZED));
+ daemonEvent[i].setResetCount(config.getAttribute(OprofileLaunchPlugin.attrCounterCount(number), OprofileDaemonEvent.COUNT_UNINITIALIZED));
}
} catch (CoreException ce) {
@@ -282,7 +282,7 @@ public class OprofileCounter {
}
// Returns the event with the same label as the parameter STR
- private OpEvent _eventFromString(String str) {
+ private OpEvent eventFromString(String str) {
for (int i = 0; i < eventList.length; i++) {
if (eventList[i].getText().equals(str))
return eventList[i];
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewLogReaderAction.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewLogReaderAction.java
index 93c5d48c95..396f570185 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewLogReaderAction.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewLogReaderAction.java
@@ -75,12 +75,11 @@ public class OprofileViewLogReaderAction extends Action {
class LogReader implements Runnable, IRunnableWithProgress {
private static long lastModified = -1;
private static String contents = null;
- private IRemoteFileProxy proxy;
@Override
public void run() {
try {
- proxy = RemoteProxyManager.getInstance().getFileProxy(
+ IRemoteFileProxy proxy = RemoteProxyManager.getInstance().getFileProxy(
Oprofile.OprofileProject.getProject());
IFileStore fileStore = proxy.getResource(Oprofile.getLogFile());
if (fileStore.fetchInfo().exists()) {
@@ -133,7 +132,7 @@ class LogReader implements Runnable, IRunnableWithProgress {
*/
class OprofiledLogDialog extends MessageDialog {
//string to contain the log file
- String textContent = null;
+ private String textContent = null;
public static final int GRID_WIDTH = 350;
public static final int GRID_HEIGHT = 400;
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSession.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSession.java
index 6a19f481d4..30c12eaef4 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSession.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSession.java
@@ -26,7 +26,6 @@ import org.eclipse.swt.graphics.Image;
* @since 1.1
*/
public class UiModelSession implements IUiModelElement {
- private IUiModelElement parent; //parent element
private OpModelSession session; //the node in the data model
private UiModelEvent events[];
@@ -109,7 +108,7 @@ public class UiModelSession implements IUiModelElement {
*/
@Override
public IUiModelElement getParent() {
- return parent;
+ return null;
}
/**
diff --git a/perf/org.eclipse.linuxtools.perf/META-INF/MANIFEST.MF b/perf/org.eclipse.linuxtools.perf/META-INF/MANIFEST.MF
index 0b733f54f9..1d3a36222c 100644
--- a/perf/org.eclipse.linuxtools.perf/META-INF/MANIFEST.MF
+++ b/perf/org.eclipse.linuxtools.perf/META-INF/MANIFEST.MF
@@ -27,4 +27,5 @@ Import-Package: org.eclipse.compare,
org.eclipse.core.expressions,
org.eclipse.core.filesystem,
org.eclipse.linuxtools.tools.launch.core.factory
+Export-Package: org.eclipse.linuxtools.internal.perf.launch
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 1ca141cb54..35fa60247b 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
@@ -311,9 +311,9 @@ public class PerfCore {
return base.toArray( new String[base.size()] );
}
- public static String[] getAnnotateString(ILaunchConfiguration config, String dso, String symbol, String perfDataLoc, boolean OldPerfVersion) {
+ public static String[] getAnnotateString(ILaunchConfiguration config, String dso, String symbol, String perfDataLoc, boolean oldPerfVersion) {
ArrayList<String> base = new ArrayList<>();
- if (OldPerfVersion) {
+ if (oldPerfVersion) {
base.addAll( Arrays.asList( new String[]{PerfPlugin.PERF_COMMAND, "annotate", "-s", symbol, "-l", "-P"} ) ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
} else {
base.addAll( Arrays.asList( new String[]{PerfPlugin.PERF_COMMAND, "annotate", "-d", dso, "-s", symbol, "-l", "-P"} ) ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
@@ -342,7 +342,7 @@ public class PerfCore {
// Runs assuming perf.data has already been recorded, environ and workingDir can be set to null to use default
//perfDataLoc is optional - it is used to provide a pre-existing data file instead of something recorded from
//whatever project is being profiled. It is only used for junit tests atm.
- public static void Report(ILaunchConfiguration config, String[] environ, IPath workingDir, IProgressMonitor monitor, String perfDataLoc, PrintStream print) {
+ public static void report(ILaunchConfiguration config, String[] environ, IPath workingDir, IProgressMonitor monitor, String perfDataLoc, PrintStream print) {
IProject project = getProject(config);
TreeParent invisibleRoot = PerfPlugin.getDefault().clearModelRoot();
@@ -394,22 +394,22 @@ public class PerfCore {
* @param perfDataLoc location of perf data file
* @param print print stream
* @param invisibleRoot root of the model
- * @param OldPerfVersion boolean old perf version flag
+ * @param oldPerfVersion boolean old perf version flag
* @param input input stream from perf data file report
* @param error output stream to where all standard error is written to
*/
public static void parseReport(ILaunchConfiguration config,
IPath workingDir, IProgressMonitor monitor, String perfDataLoc,
PrintStream print, TreeParent invisibleRoot,
- boolean OldPerfVersion, BufferedReader input, BufferedReader error) {
+ boolean oldPerfVersion, BufferedReader input, BufferedReader error) {
PerfCore.parseRemoteReport(config, workingDir, monitor, perfDataLoc, print,
- invisibleRoot, OldPerfVersion, input, error, null);
+ invisibleRoot, oldPerfVersion, input, error, null);
}
private static void parseRemoteReport(ILaunchConfiguration config,
IPath workingDir, IProgressMonitor monitor, String perfDataLoc,
PrintStream print, TreeParent invisibleRoot,
- boolean OldPerfVersion, BufferedReader input, BufferedReader error, IProject project) {
+ boolean oldPerfVersion, BufferedReader input, BufferedReader error, IProject project) {
if (monitor != null && monitor.isCanceled()) {
return;
@@ -531,10 +531,10 @@ public class PerfCore {
currentSym = (PMSymbol)s;
String[] annotateCmd;
if (workingDir == null) {
- annotateCmd = getAnnotateString(config, currentDso.getName(), currentSym.getName().substring(4), perfDataLoc, OldPerfVersion);
+ annotateCmd = getAnnotateString(config, currentDso.getName(), currentSym.getName().substring(4), perfDataLoc, oldPerfVersion);
} else {
String perfDefaultDataLoc = workingDir + "/" + PerfPlugin.PERF_DEFAULT_DATA;
- annotateCmd = getAnnotateString(config, currentDso.getName(), currentSym.getName().substring(4), perfDefaultDataLoc, OldPerfVersion);
+ annotateCmd = getAnnotateString(config, currentDso.getName(), currentSym.getName().substring(4), perfDefaultDataLoc, oldPerfVersion);
}
try {
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 4c7fb8e9c9..a350c56450 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
@@ -152,7 +152,7 @@ public class PerfLaunchConfigDelegate extends AbstractCLaunchDelegate {
}
}
- PerfCore.Report(config, getEnvironment(config), workingDir, monitor, null, print);
+ PerfCore.report(config, getEnvironment(config), workingDir, monitor, null, print);
PerfPlugin.getDefault().getPerfProfileData().toFile().setReadOnly();
PerfCore.refreshView(renderProcessLabel(exePath.toOSString()));
diff --git a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfOpenData.java b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfOpenData.java
index 16f1d40fe8..b9dd2bc5ee 100644
--- a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfOpenData.java
+++ b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/launch/PerfOpenData.java
@@ -53,7 +53,7 @@ public class PerfOpenData extends ProfileLaunchShortcut implements
projectName = project.getName();
URI fileURI = ((IFile)element).getLocationURI();
ILaunchConfiguration config = createDefaultConfiguration(projectName);
- PerfCore.Report(config, null, null, null, fileURI.getPath(), null);
+ PerfCore.report(config, null, null, null, fileURI.getPath(), null);
String timestamp = DateFormat.getInstance().format(new Date(eFile.getLocalTimeStamp()));
PerfCore.refreshView(fileURI.toString() + " (" + timestamp + ")"); //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -61,7 +61,7 @@ public class PerfOpenData extends ProfileLaunchShortcut implements
} else {
projectName = location.getProject().getName();
ILaunchConfiguration config = createDefaultConfiguration(projectName);
- PerfCore.Report(config, null, null, null, file.toOSString(), null);
+ PerfCore.report(config, null, null, null, file.toOSString(), null);
String timestamp = DateFormat.getInstance().format(new Date(location.getLocalTimeStamp()));
PerfCore.refreshView(file.toOSString() + " (" + timestamp + ")"); //$NON-NLS-1$ //$NON-NLS-2$
}
diff --git a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/remote/launch/PerfLaunchConfigDelegate.java b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/remote/launch/PerfLaunchConfigDelegate.java
index b9613e10f6..7c6071f392 100644
--- a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/remote/launch/PerfLaunchConfigDelegate.java
+++ b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/remote/launch/PerfLaunchConfigDelegate.java
@@ -213,7 +213,7 @@ public class PerfLaunchConfigDelegate extends AbstractCLaunchDelegate {
print.println("Analysing recorded perf.data, please wait..."); //$NON-NLS-1$
//Possibly should pass this (the console reference) on to PerfCore.Report if theres anything we ever want to spit out to user.
}
- PerfCore.Report(config, getEnvironment(config), Path.fromOSString(configWorkingDir), monitor, null, print);
+ PerfCore.report(config, getEnvironment(config), Path.fromOSString(configWorkingDir), monitor, null, print);
URI perfDataURI = null;
IRemoteFileProxy proxy = null;
diff --git a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/remote/launch/PerfLaunchConfigurationTabGroup.java b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/remote/launch/PerfLaunchConfigurationTabGroup.java
index 652b428215..e28d157927 100644
--- a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/remote/launch/PerfLaunchConfigurationTabGroup.java
+++ b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/remote/launch/PerfLaunchConfigurationTabGroup.java
@@ -15,6 +15,7 @@ package org.eclipse.linuxtools.internal.perf.remote.launch;
import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
import org.eclipse.linuxtools.internal.perf.launch.PerfEventsTab;
+import org.eclipse.linuxtools.internal.perf.launch.PerfOptionsTab;
import org.eclipse.linuxtools.profiling.launch.RemoteProxyProfileLaunchConfigurationTabGroup;
public class PerfLaunchConfigurationTabGroup extends RemoteProxyProfileLaunchConfigurationTabGroup {
diff --git a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/remote/launch/PerfOptionsTab.java b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/remote/launch/PerfOptionsTab.java
index 2feaf95df5..176ea06bc7 100644
--- a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/remote/launch/PerfOptionsTab.java
+++ b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/remote/launch/PerfOptionsTab.java
@@ -14,18 +14,7 @@
*******************************************************************************/
package org.eclipse.linuxtools.internal.perf.remote.launch;
-import org.eclipse.debug.core.ILaunchConfiguration;
public class PerfOptionsTab extends org.eclipse.linuxtools.internal.perf.launch.PerfOptionsTab {
- private Exception ex;
-
- @Override
- public boolean isValid (ILaunchConfiguration config) {
- if (ex != null) {
- setErrorMessage(ex.getLocalizedMessage());
- return false;
- }
- return super.isValid(config);
- }
}
diff --git a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/ui/ReportComparisonView.java b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/ui/ReportComparisonView.java
index e2c06e77a9..46a007191b 100644
--- a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/ui/ReportComparisonView.java
+++ b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/ui/ReportComparisonView.java
@@ -55,7 +55,6 @@ import org.eclipse.ui.PlatformUI;
public class ReportComparisonView extends Viewer {
// Color values constants
- private static final Color BLACK = new Color(Display.getDefault(), 0, 0, 0);
private static final Color RED = new Color(Display.getDefault(), 150, 0, 0);
private static final Color GREEN = new Color(Display.getDefault(), 0, 50, 0);
private static final Color LIGHT_GREEN = new Color(Display.getDefault(), 0, 105, 0);
@@ -130,7 +129,7 @@ public class ReportComparisonView extends Viewer {
float baseline = Float.parseFloat(m.group(1).trim());
float delta = Float.parseFloat(m.group(3).trim());
if (baseline > 1 && Math.abs(delta) > 1) {
- StyleRange curStyleRange = new StyleRange(ptr, line.length(), BLACK, null);
+ StyleRange curStyleRange;
if (delta < 0 ) {
curStyleRange = delta < -5 ? new StyleRange(ptr, line.length(), LIGHT_GREEN, null) :
new StyleRange(ptr, line.length(), GREEN, null);
diff --git a/profiling/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/internal/dataviewers/charts/dialogs/ChartDialog.java b/profiling/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/internal/dataviewers/charts/dialogs/ChartDialog.java
index 1d299ea631..6a25dd8703 100755
--- a/profiling/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/internal/dataviewers/charts/dialogs/ChartDialog.java
+++ b/profiling/org.eclipse.linuxtools.dataviewers.charts/src/org/eclipse/linuxtools/internal/dataviewers/charts/dialogs/ChartDialog.java
@@ -93,7 +93,7 @@ public class ChartDialog extends Dialog {
private void restoreState() {
IDialogSettings settings = stViewer.getViewerSettings().getSection(TAG_SECTION_CHARTS_STATE);
if (settings == null) {
- settings = stViewer.getViewerSettings().addNewSection(TAG_SECTION_CHARTS_STATE);
+ stViewer.getViewerSettings().addNewSection(TAG_SECTION_CHARTS_STATE);
return;
}
@@ -117,7 +117,7 @@ public class ChartDialog extends Dialog {
private void saveState() {
IDialogSettings settings = stViewer.getViewerSettings().getSection(TAG_SECTION_CHARTS_STATE);
if (settings == null) {
- settings = stViewer.getViewerSettings().addNewSection(TAG_SECTION_CHARTS_STATE);
+ stViewer.getViewerSettings().addNewSection(TAG_SECTION_CHARTS_STATE);
}
for (int i = 0; i < columnButtons.size(); i++) {
@@ -132,22 +132,12 @@ public class ChartDialog extends Dialog {
settings.put(TAG_VERTICAL_BARS_BUTTON, vBars);
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
- */
@Override
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
newShell.setText(Messages.ChartConstants_CREATE_NEW_CHART_FROM_SELECTION);
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int)
- */
@Override
protected void buttonPressed(int buttonId) {
if (buttonId == IDialogConstants.OK_ID) {
@@ -159,11 +149,6 @@ public class ChartDialog extends Dialog {
super.buttonPressed(buttonId);
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
- */
@Override
protected void createButtonsForButtonBar(Composite parent) {
// create OK and Cancel buttons by default
@@ -171,11 +156,6 @@ public class ChartDialog extends Dialog {
createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.dialogs.Dialog#createContents(org.eclipse.swt.widgets.Composite)
- */
@Override
protected Control createContents(Composite parent) {
Control c = super.createContents(parent);
@@ -183,11 +163,6 @@ public class ChartDialog extends Dialog {
return c;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
@Override
protected Control createDialogArea(Composite parent) {
Composite composite = (Composite) super.createDialogArea(parent);
diff --git a/profiling/org.eclipse.linuxtools.ssh.proxy/src/org/eclipse/linuxtools/internal/ssh/proxy/SSHCommandLauncher.java b/profiling/org.eclipse.linuxtools.ssh.proxy/src/org/eclipse/linuxtools/internal/ssh/proxy/SSHCommandLauncher.java
index 746d0f4ee0..aa537359f7 100644
--- a/profiling/org.eclipse.linuxtools.ssh.proxy/src/org/eclipse/linuxtools/internal/ssh/proxy/SSHCommandLauncher.java
+++ b/profiling/org.eclipse.linuxtools.ssh.proxy/src/org/eclipse/linuxtools/internal/ssh/proxy/SSHCommandLauncher.java
@@ -28,7 +28,6 @@ import com.jcraft.jsch.JSchException;
* @noextend This class is not intended to be subclassed by clients.
*/
public class SSHCommandLauncher extends SSHBase implements IRemoteCommandLauncher {
- private String errorMessage;
private SSHProcess fProcess;
/**
@@ -92,12 +91,9 @@ public class SSHCommandLauncher extends SSHBase implements IRemoteCommandLaunche
return fProcess.waitAndRead(output, err, monitor);
}
- /* (non-Javadoc)
- * @see org.eclipse.cdt.core.ICommandLauncher#getErrorMessage()
- */
@Override
public String getErrorMessage() {
- return errorMessage;
+ return null;
}
@Override
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/ImportRPMsPage.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/ImportRPMsPage.java
index 915644fb96..fceb243ff7 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/ImportRPMsPage.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/ImportRPMsPage.java
@@ -71,10 +71,6 @@ public class ImportRPMsPage extends FormPage implements IResourceChangeListener
private CreaterepoProject project;
- private FormToolkit toolkit;
- private ScrolledForm form;
-
- private Composite buttonList;
private Tree tree;
private static final String MENU_URI = "toolbar:formsToolbar"; //$NON-NLS-1$
@@ -91,10 +87,6 @@ public class ImportRPMsPage extends FormPage implements IResourceChangeListener
this.project = project;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.forms.editor.FormPage#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)
- */
@Override
public void init(IEditorSite site, IEditorInput input) {
super.init(site, input);
@@ -102,10 +94,6 @@ public class ImportRPMsPage extends FormPage implements IResourceChangeListener
ResourcesPlugin.getWorkspace().addResourceChangeListener(this);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.forms.editor.FormPage#dispose()
- */
@Override
public void dispose() {
// remove the resource change listener
@@ -113,18 +101,13 @@ public class ImportRPMsPage extends FormPage implements IResourceChangeListener
super.dispose();
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
- */
@Override
protected void createFormContent(IManagedForm managedForm) {
// setting up the form page
super.createFormContent(managedForm);
GridLayout layout = new GridLayout();
- GridData data = new GridData();
- toolkit = managedForm.getToolkit();
- form = managedForm.getForm();
+ FormToolkit toolkit = managedForm.getToolkit();
+ ScrolledForm form = managedForm.getForm();
form.setText(Messages.ImportRPMsPage_formHeaderText);
form.setImage(Activator.getImageDescriptor(HEADER_ICON).createImage());
ToolBarManager toolbarManager = (ToolBarManager) form.getToolBarManager();
@@ -159,9 +142,9 @@ public class ImportRPMsPage extends FormPage implements IResourceChangeListener
tree = viewer.getTree();
tree.setLayoutData(expandComposite());
- buttonList = toolkit.createComposite(sectionClient);
+ Composite buttonList = toolkit.createComposite(sectionClient);
layout = new GridLayout();
- data = new GridData(SWT.BEGINNING, SWT.FILL, false, true);
+ GridData data = new GridData(SWT.BEGINNING, SWT.FILL, false, true);
layout.marginWidth = 0; layout.marginHeight = 0;
buttonList.setLayout(layout);
buttonList.setLayoutData(data);
@@ -170,7 +153,7 @@ public class ImportRPMsPage extends FormPage implements IResourceChangeListener
toolkit).addSelectionListener(new ImportButtonListener());
createPushButton(buttonList, Messages.ImportRPMsPage_buttonRemoveRPMs,
toolkit).addSelectionListener(new RemoveButtonListener());
- createSpace();
+ new Label(buttonList, SWT.NONE).setLayoutData(new GridData(0,0));
createPushButton(buttonList, Messages.ImportRPMsPage_buttonCreateRepo,
toolkit).addSelectionListener(new CreaterepoButtonListener());
@@ -213,15 +196,6 @@ public class ImportRPMsPage extends FormPage implements IResourceChangeListener
}
/**
- * Create space between composites, such as buttons within a button list.
- *
- * @param parent The composite to attach a space to.
- */
- private void createSpace() {
- new Label(buttonList, SWT.NONE).setLayoutData(new GridData(0,0));
- }
-
- /**
* On creating the form content the tree will be populated with
* RPMs found in the root of the current project.
*
@@ -273,10 +247,6 @@ public class ImportRPMsPage extends FormPage implements IResourceChangeListener
public class ImportButtonListener extends SelectionAdapter {
private final String[] EXTENSION_FILTERS = {"*." + ICreaterepoConstants.RPM_FILE_EXTENSION}; //$NON-NLS-1$
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
@Override
public void widgetSelected(SelectionEvent e) {
IWorkbench workbench = PlatformUI.getWorkbench();
@@ -305,10 +275,6 @@ public class ImportRPMsPage extends FormPage implements IResourceChangeListener
* Handle the remove button execution on the Import RPMs page.
*/
public class RemoveButtonListener extends SelectionAdapter {
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
@Override
public void widgetSelected(SelectionEvent e) {
TreeItem[] selection = tree.getSelection();
@@ -345,10 +311,6 @@ public class ImportRPMsPage extends FormPage implements IResourceChangeListener
* Handle the createrepo button execution on the Import RPMs page.
*/
public class CreaterepoButtonListener extends SelectionAdapter {
- /*
- * (non-Javadoc)
- * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
@Override
public void widgetSelected(SelectionEvent e) {
Job executeCreaterepo = new Job(Messages.Createrepo_jobName) {
@@ -372,10 +334,6 @@ public class ImportRPMsPage extends FormPage implements IResourceChangeListener
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
- */
@Override
public void resourceChanged(IResourceChangeEvent event) {
// might have to place the delete/close events to RepoMetadataFormEditor to
@@ -401,10 +359,6 @@ public class ImportRPMsPage extends FormPage implements IResourceChangeListener
* Class to control what to do if something happens in the workspace.
*/
class CreaterepoDeltaVisitor implements IResourceDeltaVisitor {
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.resources.IResourceDeltaVisitor#visit(org.eclipse.core.resources.IResourceDelta)
- */
@Override
public boolean visit(IResourceDelta delta) {
// exit if the project is being removed or closed
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/MetadataPage.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/MetadataPage.java
index ad552ac42c..681246d980 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/MetadataPage.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/form/MetadataPage.java
@@ -86,7 +86,6 @@ public class MetadataPage extends FormPage {
// setting up the form page
super.createFormContent(managedForm);
GridLayout layout = new GridLayout();
- GridData data = new GridData();
toolkit = managedForm.getToolkit();
form = managedForm.getForm();
form.setText(Messages.MetadataPage_formHeaderText);
@@ -108,7 +107,7 @@ public class MetadataPage extends FormPage {
Section revSection = toolkit.createSection(form.getBody(), Section.DESCRIPTION
| ExpandableComposite.TITLE_BAR);
layout = new GridLayout();
- data = new GridData();
+ GridData data = new GridData();
data.verticalAlignment = GridData.FILL;
data.horizontalAlignment = GridData.FILL;
data.grabExcessHorizontalSpace = true;
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoPreferencePage.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoPreferencePage.java
index 2d4432f501..a3cdec5a6b 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoPreferencePage.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/preference/CreaterepoPreferencePage.java
@@ -44,20 +44,12 @@ public class CreaterepoPreferencePage extends FieldEditorPreferencePage implemen
super(GRID);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
- */
@Override
public void init(IWorkbench workbench) {
setPreferenceStore(new ScopedPreferenceStore(InstanceScope.INSTANCE, Activator.PLUGIN_ID));
setDescription(Messages.CreaterepoPreferencePage_description);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
@Override
public void propertyChange(PropertyChangeEvent event) {
if (event.getProperty().equals(FieldEditor.VALUE)) {
@@ -65,14 +57,9 @@ public class CreaterepoPreferencePage extends FieldEditorPreferencePage implemen
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
- */
@Override
protected void createFieldEditors() {
Composite parent = getFieldEditorParent();
- GridData data = new GridData();
// general group
Group generalGroup = new Group(parent, SWT.SHADOW_ETCHED_IN);
generalGroup.setText(Messages.CreaterepoPreferencePage_generalGroupLabel);
@@ -130,7 +117,7 @@ public class CreaterepoPreferencePage extends FieldEditorPreferencePage implemen
// note of caution
Label lblCheckTs = new Label(updatesGroup, SWT.WRAP);
lblCheckTs.setText(Messages.CreaterepoPreferencePage_checkTSNote);
- data = new GridData();
+ GridData data = new GridData();
data.widthHint = 130;
data.horizontalAlignment = SWT.FILL;
data.grabExcessHorizontalSpace = true;
diff --git a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/wizard/CreaterepoNewWizardPageTwo.java b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/wizard/CreaterepoNewWizardPageTwo.java
index 65fd8c6434..9dd85569c7 100644
--- a/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/wizard/CreaterepoNewWizardPageTwo.java
+++ b/rpm/org.eclipse.linuxtools.rpm.createrepo/src/org/eclipse/linuxtools/internal/rpm/createrepo/wizard/CreaterepoNewWizardPageTwo.java
@@ -104,11 +104,10 @@ public class CreaterepoNewWizardPageTwo extends WizardPage {
* @return The newly created text field.
*/
protected Text createTextFieldWithLabel(Composite parent, String labelName, String tooltip) {
- GridData layoutData = new GridData();
// create the label
Label respositoryBaseURLLbl = new Label(parent, SWT.NONE);
respositoryBaseURLLbl.setText(labelName);
- layoutData = new GridData();
+ GridData layoutData = new GridData();
layoutData.horizontalAlignment = GridData.BEGINNING;
layoutData.verticalAlignment = GridData.CENTER;
respositoryBaseURLLbl.setToolTipText(tooltip);
diff --git a/rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/PerlMakefileParser.java b/rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/PerlMakefileParser.java
index c2e028554e..8a7de9db42 100644
--- a/rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/PerlMakefileParser.java
+++ b/rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/PerlMakefileParser.java
@@ -186,10 +186,9 @@ public class PerlMakefileParser {
public List<String> getValueList(String key) {
List<String> rc = new ArrayList<>();
String var = "";
- String[] tmp = {};
if (mMakefileDefinitions.containsKey(key)) {
var = mMakefileDefinitions.get(key);
- tmp = var.split(",");
+ String[] tmp = var.split(",");
for (String str : tmp) {
str = cleanUpString(str);
rc.add(str);
@@ -368,11 +367,10 @@ public class PerlMakefileParser {
*/
public static Map<String, String> extractKeyValueAssociation(String line) {
Map<String, String> rc = new HashMap<>();
- String[] keyValue = {};
String key = "";
String value = "";
if (matchesAssociativeAssignment(line)) {
- keyValue = line.split("=>");
+ String[] keyValue = line.split("=>");
key = cleanUpString(keyValue[0].toLowerCase());
value = cleanUpString(keyValue[1]);
rc.put(key, value);
diff --git a/rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/PythonEggParser.java b/rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/PythonEggParser.java
index 2134a81272..9a53854106 100644
--- a/rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/PythonEggParser.java
+++ b/rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/PythonEggParser.java
@@ -61,7 +61,6 @@ public class PythonEggParser {
String line = "";
String setupLine = "";
List<String> vars = new ArrayList<>();
- List<String> list = new ArrayList<>();
int offset = 0;
try {
RandomAccessFile raf = new RandomAccessFile(file.getRawLocation().makeAbsolute().toFile(), "r");
@@ -104,7 +103,7 @@ public class PythonEggParser {
}
}
- list = prepareSetupOptions(setupLine);
+ List<String> list = prepareSetupOptions(setupLine);
for (String str : vars) {
variables.putAll(parseLine(str));
@@ -172,12 +171,11 @@ public class PythonEggParser {
public List<String> getValueList(String key) {
List<String> rc = new ArrayList<>();
Pattern pattern = Pattern.compile("^\\[(.*)\\]");
- String[] temp = {};
if (setupOptions.containsKey(key)) {
Matcher variableMatcher = pattern.matcher(setupOptions.get(key).trim());
if (variableMatcher.find()) {
- temp = variableMatcher.group(1).replaceAll("('|\")", "").split(",");
+ String[] temp = variableMatcher.group(1).replaceAll("('|\")", "").split(",");
for (String str : temp) {
if (!str.isEmpty() && !str.trim().startsWith("#")) {
rc.add(str.trim());
@@ -197,7 +195,6 @@ public class PythonEggParser {
*/
private static List<String> prepareSetupOptions(String setupLine) {
List<String> rc = new ArrayList<>();
- String[] tempList = {};
// match the setup(...) pattern
Pattern pattern = Pattern.compile("\\bsetup\\b(\\s+)?\\((.*)\\)");
Matcher variableMatcher = pattern.matcher(setupLine);
@@ -206,7 +203,7 @@ public class PythonEggParser {
setupLine = variableMatcher.group(2);
}
- tempList = setupLine.split("(?=,)");
+ String[] tempList = setupLine.split("(?=,)");
for (String str : tempList) {
if (isOptionLineKeyValuePair(str) && !str.trim().startsWith("#")) {
diff --git a/rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/RubyGemParser.java b/rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/RubyGemParser.java
index c94f1a9428..30dff65b5d 100644
--- a/rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/RubyGemParser.java
+++ b/rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/parser/RubyGemParser.java
@@ -68,7 +68,6 @@ public class RubyGemParser {
*/
public void parse() {
List<String> rawSetupDefinitions = new ArrayList<>();
- List<String> lSetupDefinitions = new ArrayList<>();
String line = "";
long startPos;
long endPos;
@@ -83,7 +82,7 @@ public class RubyGemParser {
rawSetupDefinitions.add(line);
}
- lSetupDefinitions = prepareOptions(rawSetupDefinitions);
+ List<String> lSetupDefinitions = prepareOptions(rawSetupDefinitions);
for (String str : lSetupDefinitions) {
parseLine(str);
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/internal/callgraph/core/SystemTapTextView.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/internal/callgraph/core/SystemTapTextView.java
index e5aa28bd49..52f9bb5e96 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/internal/callgraph/core/SystemTapTextView.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/internal/callgraph/core/SystemTapTextView.java
@@ -113,9 +113,9 @@ public class SystemTapTextView extends SystemTapView {
// 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$
+ int R = Integer.valueOf(colours[0].replaceAll(" ", "")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$
+ int G = Integer.valueOf(colours[1].replaceAll(" ", "")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$
+ int B = Integer.valueOf(colours[2].replaceAll(" ", "")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$
if (R > 255) R = 255;
if (G > 255) G = 255;
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/StapGraph.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/StapGraph.java
index 0fa53d6bd9..feaf58c917 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/StapGraph.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/StapGraph.java
@@ -751,7 +751,7 @@ public class StapGraph extends Graph {
}
private void drawFromBottomToTop(int level, int height,
- int MaxLevelPixelWidth) {
+ int maxLevelPixelWidth) {
// FINISHED DRAWING THE ROOT IN THE LAST RECURSIVE CALL
if (level == 0 || level < topLevelToDraw) {
@@ -793,7 +793,7 @@ public class StapGraph extends Graph {
n.setLocation(150 + (nodeMap.get(getRootVisibleNodeNumber())
.getLocation().x),
nodeMap.get(getRootVisibleNodeNumber()).getLocation().y);
- n.setLocation(150 + (MaxLevelPixelWidth / (total + 1) * count),
+ n.setLocation(150 + (maxLevelPixelWidth / (total + 1) * count),
height);
if (counter <= ANIMATION_TIME) {
@@ -802,7 +802,7 @@ public class StapGraph extends Graph {
}
} else {
- n.setLocation(150 + (MaxLevelPixelWidth / (total + 1) * count),
+ n.setLocation(150 + (maxLevelPixelWidth / (total + 1) * count),
height);
}
@@ -837,7 +837,7 @@ public class StapGraph extends Graph {
// DRAW THE NEXT LEVEL UP
drawFromBottomToTop(level - 1, height
- (3 * (int) (CONSTANT_VERTICAL_INCREMENT / scale)),
- MaxLevelPixelWidth);
+ maxLevelPixelWidth);
}
/*
@@ -956,18 +956,18 @@ public class StapGraph extends Graph {
* - node to recenter with
*/
- public void setTopLevelTo(int new_topLevelToDraw) {
- changeLevelLimits(new_topLevelToDraw);
+ public void setTopLevelTo(int newTopLevelToDraw) {
+ changeLevelLimits(newTopLevelToDraw);
- int new_bottomLevelToDraw = new_topLevelToDraw + levelBuffer;
+ int new_bottomLevelToDraw = newTopLevelToDraw + levelBuffer;
if (new_bottomLevelToDraw > lowestLevelOfNodesAdded) {
new_bottomLevelToDraw = lowestLevelOfNodesAdded;
}
- deleteLevelsFromTop(new_topLevelToDraw - topLevelToDraw);
+ deleteLevelsFromTop(newTopLevelToDraw - topLevelToDraw);
deleteLevelsFromBottom(bottomLevelToDraw - new_bottomLevelToDraw);
- topLevelToDraw = new_topLevelToDraw;
+ topLevelToDraw = newTopLevelToDraw;
bottomLevelToDraw = new_bottomLevelToDraw;
}

Back to the top