summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorDmitry Kozlov2012-04-05 09:04:40 (EDT)
committer Roland Grunberg2012-04-12 17:01:32 (EDT)
commit4b18be09cc3b90a39cbd41c28b94a6113c59405e (patch)
tree5d81cedabbe54aea39bd5bec7e067e184ed6efb3
parent5c5907b7a73ca6664e6eaae85c706649b25ab8a7 (diff)
downloadorg.eclipse.linuxtools-4b18be09cc3b90a39cbd41c28b94a6113c59405e.zip
org.eclipse.linuxtools-4b18be09cc3b90a39cbd41c28b94a6113c59405e.tar.gz
org.eclipse.linuxtools-4b18be09cc3b90a39cbd41c28b94a6113c59405e.tar.bz2
Cleanup leading underscores from identifiers' names in org.eclipse.linuxtools.internal.oprofile.core.model.OpModelRoot,
org.eclipse.linuxtools.internal.oprofile.core.model.OpModelSample, org.eclipse.linuxtools.internal.oprofile.core.model.OpModelSession.
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelRoot.java31
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelSample.java30
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelSession.java42
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/SamplesProcessor.java6
4 files changed, 53 insertions, 56 deletions
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelRoot.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelRoot.java
index 01c4a6e..88a0d37 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelRoot.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelRoot.java
@@ -25,30 +25,27 @@ import org.eclipse.linuxtools.internal.oprofile.core.Oprofile;
public class OpModelRoot {
//single instance
- private static OpModelRoot _modelRoot = new OpModelRoot();
+ private static OpModelRoot modelRoot = new OpModelRoot();
- private OpModelEvent[] _events;
-// private String _printTabs = "\t"; //for nice output
+ private OpModelEvent[] events;
protected OpModelRoot() {
-// refreshModel();
- _events = null;
-// _modelRoot = this;
+ events = null;
}
public static OpModelRoot getDefault() {
- return _modelRoot;
+ return modelRoot;
}
public void refreshModel() {
//TODO-performance/interactivity: some persistence for events/sessions
// that dont change from run to run (non default sessions)
- _events = getNewEvents();
- if (_events != null) {
- for (int i = 0; i < _events.length; i++) {
- if (_events[i] != null)
- _events[i].refreshModel();
+ events = getNewEvents();
+ if (events != null) {
+ for (int i = 0; i < events.length; i++) {
+ if (events[i] != null)
+ events[i].refreshModel();
}
}
}
@@ -59,17 +56,17 @@ public class OpModelRoot {
}
public OpModelEvent[] getEvents() {
- return _events;
+ return events;
}
@Override
public String toString() {
String s = ""; //$NON-NLS-1$
- if (_events != null) {
- for (int i = 0; i < _events.length; i++) {
- if (_events[i] != null) {
+ if (events != null) {
+ for (int i = 0; i < events.length; i++) {
+ if (events[i] != null) {
s += "Event: "; //$NON-NLS-1$
- s += _events[i].toString("\t"); //$NON-NLS-1$
+ s += events[i].toString("\t"); //$NON-NLS-1$
}
}
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelSample.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelSample.java
index 6a8f9ce..11f9690 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelSample.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelSample.java
@@ -16,41 +16,41 @@ package org.eclipse.linuxtools.internal.oprofile.core.model;
* Represents an OProfile sample.
*/
public class OpModelSample {
- private int _count;
- private int _line;
- private String _file;
+ private int count;
+ private int line;
+ private String file;
public OpModelSample() {
- _count = 0;
- _line = 0;
+ count = 0;
+ line = 0;
}
- public void _setCount(int _count) {
- this._count = _count;
+ public void setCount(int count) {
+ this.count = count;
}
- public void _setLine(int _line) {
- this._line = _line;
+ public void setLine(int line) {
+ this.line = line;
}
- public void _setFilePath(String _file) {
- this._file = _file;
+ public void setFilePath(String file) {
+ this.file = file;
}
public int getCount() {
- return _count;
+ return count;
}
public int getLine() {
- return _line;
+ return line;
}
public String getFilePath() {
- return _file;
+ return file;
}
@Override
public String toString() {
- String s = "Line #: " + _line + ", Count: " + _count + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ String s = "Line #: " + line + ", Count: " + count + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
return s;
}
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelSession.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelSession.java
index fe6ef1e..bbf7eb5 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelSession.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelSession.java
@@ -21,63 +21,63 @@ import org.eclipse.linuxtools.internal.oprofile.core.Oprofile;
public class OpModelSession {
private static final String DEFAULT_SESSION_STRING = "current"; //$NON-NLS-1$
- private OpModelEvent _parentEvent;
- private OpModelImage _image;
- private String _name;
- private String _printTabs = ""; //for nice output //$NON-NLS-1$
+ private OpModelEvent parentEvent;
+ private OpModelImage image;
+ private String name;
+ private String printTabs = ""; //for nice output //$NON-NLS-1$
public OpModelSession(OpModelEvent event, String name) {
- _parentEvent = event;
- _name = name;
- _image = null;
+ parentEvent = event;
+ this.name = name;
+ image = null;
}
public OpModelImage getImage() {
- return _image;
+ return image;
}
public OpModelEvent getEvent() {
- return _parentEvent;
+ return parentEvent;
}
public String getName() {
- return _name;
+ return name;
}
public int getCount() {
- if (_image == null) {
+ if (image == null) {
return 0;
} else {
- return _image.getCount();
+ return image.getCount();
}
}
public boolean isDefaultSession() {
- return _name.equals(DEFAULT_SESSION_STRING);
+ return name.equals(DEFAULT_SESSION_STRING);
}
public void refreshModel() {
//populate this session with samples
- _image = getNewImage();
+ image = getNewImage();
}
protected OpModelImage getNewImage() {
- return Oprofile.getModelData(_parentEvent.getName(), _name);
+ return Oprofile.getModelData(parentEvent.getName(), name);
}
public String toString(String tabs) {
- _printTabs = tabs;
+ printTabs = tabs;
String s = toString();
- _printTabs = ""; //$NON-NLS-1$
+ printTabs = ""; //$NON-NLS-1$
return s;
}
@Override
public String toString() {
- String s = _name + "\n"; //$NON-NLS-1$
- if (_image != null) {
- s += _printTabs + "Image: "; //$NON-NLS-1$
- s += _image.toString(_printTabs + "\t"); //$NON-NLS-1$
+ String s = name + "\n"; //$NON-NLS-1$
+ if (image != null) {
+ s += printTabs + "Image: "; //$NON-NLS-1$
+ s += image.toString(printTabs + "\t"); //$NON-NLS-1$
}
return s;
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/SamplesProcessor.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/SamplesProcessor.java
index e333338..51a6f1e 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/SamplesProcessor.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/SamplesProcessor.java
@@ -45,11 +45,11 @@ public class SamplesProcessor extends XMLProcessor {
*/
public void endElement(String name, Object callData) {
if (name.equals(COUNT_TAG)) {
- _sample._setCount(Integer.parseInt(_characters));
+ _sample.setCount(Integer.parseInt(_characters));
} else if (name.equals(LINE_TAG)) {
- _sample._setLine(Integer.parseInt(_characters));
+ _sample.setLine(Integer.parseInt(_characters));
} else if (name.equals(FILE_TAG)) {
- _sample._setFilePath(_characters);
+ _sample.setFilePath(_characters);
} else if (name.equals(SAMPLE_TAG)) {
_sampleList.add(_sample);
_sample = new OpModelSample();