aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Kozlov2012-04-05 08:58:59 (EDT)
committerRoland Grunberg2012-04-12 17:01:32 (EDT)
commitef8bab8a736647e75bbf1520bacd7c01e087cd37 (patch)
tree6f8e192b203550adec809f5d3fe84f6366b0f1a4
parent0960bd3597eff9268912bfef380a9c4bc3fe88cb (diff)
downloadorg.eclipse.linuxtools-ef8bab8a736647e75bbf1520bacd7c01e087cd37.zip
org.eclipse.linuxtools-ef8bab8a736647e75bbf1520bacd7c01e087cd37.tar.gz
org.eclipse.linuxtools-ef8bab8a736647e75bbf1520bacd7c01e087cd37.tar.bz2
Cleanup leading underscores from identifiers' names in org.eclipse.linuxtools.internal.oprofile.core.model.OpModelEvent.
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelEvent.java36
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/sessions/SessionsProcessor.java2
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelRoot.java4
3 files changed, 21 insertions, 21 deletions
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelEvent.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelEvent.java
index 9306401..abafa4f 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelEvent.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelEvent.java
@@ -16,49 +16,49 @@ package org.eclipse.linuxtools.internal.oprofile.core.model;
* A class which represents the event collected in a given session.
*/
public class OpModelEvent {
- private String _eventName;
- private OpModelSession[] _sessions;
- private String _printTabs = ""; //for nice output //$NON-NLS-1$
+ private String eventName;
+ private OpModelSession[] sessions;
+ private String printTabs = ""; //for nice output //$NON-NLS-1$
public OpModelEvent(String name) {
- _eventName = name;
+ eventName = name;
}
public OpModelSession[] getSessions() {
- return _sessions;
+ return sessions;
}
- public void _setSessions(OpModelSession[] sessions) {
- _sessions = sessions;
+ public void setSessions(OpModelSession[] sessions) {
+ this.sessions = sessions;
}
public String getName() {
- return _eventName;
+ return eventName;
}
//populate all sessions
public void refreshModel() {
- if (_sessions != null) {
- for (int i = 0; i < _sessions.length; i++) {
- _sessions[i].refreshModel();
+ if (sessions != null) {
+ for (int i = 0; i < sessions.length; i++) {
+ sessions[i].refreshModel();
}
}
}
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 = _eventName + "\n"; //$NON-NLS-1$
- if (_sessions != null) {
- for (int i = 0; i < _sessions.length; i++) {
- s += _printTabs + "Session: "; //$NON-NLS-1$
- s += _sessions[i].toString(_printTabs + "\t"); //$NON-NLS-1$
+ String s = eventName + "\n"; //$NON-NLS-1$
+ if (sessions != null) {
+ for (int i = 0; i < sessions.length; i++) {
+ s += printTabs + "Session: "; //$NON-NLS-1$
+ s += sessions[i].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/sessions/SessionsProcessor.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/sessions/SessionsProcessor.java
index d16e0bf..648226b 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/sessions/SessionsProcessor.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/sessions/SessionsProcessor.java
@@ -77,7 +77,7 @@ public class SessionsProcessor extends XMLProcessor {
// save current event into call data
OpModelSession[] s = new OpModelSession[_sessionList.size()];
_sessionList.toArray(s);
- _currentEvent._setSessions(s);
+ _currentEvent.setSessions(s);
SessionInfo info = (SessionInfo) callData;
info.list.add(_currentEvent);
_currentEvent = null;
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelRoot.java b/oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelRoot.java
index 2ca9faf..5bf1ee7 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelRoot.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelRoot.java
@@ -27,8 +27,8 @@ public class TestingOpModelRoot extends OpModelRoot {
protected OpModelEvent[] getNewEvents() {
//fake running opxml and simply return hand-made events
OpModelEvent[] e = {new OpModelEvent(NAME_E1), new OpModelEvent(NAME_E2), null};
- e[0]._setSessions(new TestingOpModelSession[] {new TestingOpModelSession(e[0], NAME_E1_S1)});
- e[1]._setSessions(new OpModelSession[] {
+ e[0].setSessions(new TestingOpModelSession[] {new TestingOpModelSession(e[0], NAME_E1_S1)});
+ e[1].setSessions(new OpModelSession[] {
new TestingOpModelSession(e[1], NAME_E2_S1),
new TestingOpModelSession2(e[1], NAME_E2_S2),
new TestingOpModelSession3(e[1], NAME_E2_S3),