summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorDmitry Kozlov2012-04-05 10:42:01 (EDT)
committer Roland Grunberg2012-04-12 17:01:36 (EDT)
commitf63dd019121d73cd3cfc08ed53157a205e7c680e (patch)
treebcd2e66c817a7c14e94bb2cdb44da95e5c54ddf8
parent02dd417a7c62de33e6ae01b751ee8f909647d0c5 (diff)
downloadorg.eclipse.linuxtools-f63dd019121d73cd3cfc08ed53157a205e7c680e.zip
org.eclipse.linuxtools-f63dd019121d73cd3cfc08ed53157a205e7c680e.tar.gz
org.eclipse.linuxtools-f63dd019121d73cd3cfc08ed53157a205e7c680e.tar.bz2
Cleanup leading underscores from identifiers' names in org.eclipse.linuxtools.internal.oprofile.ui.model.UiModelRoot,
org.eclipse.linuxtools.internal.oprofile.ui.model.UiModelSample, org.eclipse.linuxtools.internal.oprofile.ui.model.UiModelSession.
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/model/UiModelRoot.java30
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/model/UiModelSample.java24
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/model/UiModelSession.java38
3 files changed, 45 insertions, 47 deletions
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/model/UiModelRoot.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/model/UiModelRoot.java
index 47d9e18..82f68d9 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/model/UiModelRoot.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/model/UiModelRoot.java
@@ -19,16 +19,14 @@ import org.eclipse.swt.graphics.Image;
* via a single point of access.
*/
public class UiModelRoot implements IUiModelElement {
- private static UiModelRoot _uiModelRoot = new UiModelRoot(); //singleton
- private UiModelEvent[] _events; //this node's children
- private UiModelError _rootError;
+ private static UiModelRoot uiModelRoot = new UiModelRoot(); //singleton
+ private UiModelEvent[] events; //this node's children
+ private UiModelError rootError;
/** constructor, private for singleton use **/
protected UiModelRoot() {
-// refreshModel();
- _events = null;
- _rootError = null;
-// _uiModelRoot = this;
+ events = null;
+ rootError = null;
}
/**
@@ -36,7 +34,7 @@ public class UiModelRoot implements IUiModelElement {
* @return the ui model root object
*/
public static UiModelRoot getDefault() {
- return _uiModelRoot;
+ return uiModelRoot;
}
/**
@@ -47,15 +45,15 @@ public class UiModelRoot implements IUiModelElement {
public void refreshModel() {
OpModelEvent dataModelEvents[] = getModelDataEvents();
- _rootError = null;
- _events = null;
+ rootError = null;
+ events = null;
if (dataModelEvents == null || dataModelEvents.length == 0) {
- _rootError = UiModelError.NO_SAMPLES_ERROR;
+ rootError = UiModelError.NO_SAMPLES_ERROR;
} else {
- _events = new UiModelEvent[dataModelEvents.length];
+ events = new UiModelEvent[dataModelEvents.length];
for (int i = 0; i < dataModelEvents.length; i++) {
- _events[i] = new UiModelEvent(dataModelEvents[i]);
+ events[i] = new UiModelEvent(dataModelEvents[i]);
}
}
}
@@ -71,10 +69,10 @@ public class UiModelRoot implements IUiModelElement {
}
public IUiModelElement[] getChildren() {
- if (_events != null)
- return _events;
+ if (events != null)
+ return events;
else
- return new IUiModelElement[] { _rootError };
+ return new IUiModelElement[] { rootError };
}
public boolean hasChildren() {
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/model/UiModelSample.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/model/UiModelSample.java
index 3380d2a..b255772 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/model/UiModelSample.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/model/UiModelSample.java
@@ -16,34 +16,34 @@ import org.eclipse.linuxtools.internal.oprofile.ui.OprofileUiPlugin;
import org.eclipse.swt.graphics.Image;
public class UiModelSample implements IUiModelElement {
- private IUiModelElement _parent; //parent element
- private OpModelSample _sample; //the node in the data model
- private int _totalCount; //total sample count for the parent session
+ private IUiModelElement parent; //parent element
+ private OpModelSample sample; //the node in the data model
+ private int totalCount; //total sample count for the parent session
public UiModelSample(IUiModelElement parent, OpModelSample sample, int totalCount) {
- _parent = parent;
- _sample = sample;
- _totalCount = totalCount;
+ this.parent = parent;
+ this.sample = sample;
+ this.totalCount = totalCount;
}
@Override
public String toString() {
- double countPercentage = (double)_sample.getCount() / (double)_totalCount;
+ double countPercentage = (double)sample.getCount() / (double)totalCount;
String percentage = OprofileUiPlugin.getPercentageString(countPercentage);
- return percentage + " " + OprofileUiMessages.getString("uimodel.sample.on.line") + Integer.toString(_sample.getLine()); //$NON-NLS-1$ //$NON-NLS-2$
+ return percentage + " " + OprofileUiMessages.getString("uimodel.sample.on.line") + Integer.toString(sample.getLine()); //$NON-NLS-1$ //$NON-NLS-2$
}
public int getLine() {
- return _sample.getLine();
+ return sample.getLine();
}
public String getFile(){
- return _sample.getFilePath();
+ return sample.getFilePath();
}
public double getCountPercentage() {
- return (double)_sample.getCount() / (double)_totalCount;
+ return (double)sample.getCount() / (double)totalCount;
}
/** IUiModelElement functions **/
@@ -60,7 +60,7 @@ public class UiModelSample implements IUiModelElement {
}
public IUiModelElement getParent() {
- return _parent;
+ return parent;
}
public Image getLabelImage() {
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/model/UiModelSession.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/model/UiModelSession.java
index e3dd254..97a6141 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/model/UiModelSession.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/model/UiModelSession.java
@@ -23,64 +23,64 @@ import org.eclipse.swt.graphics.Image;
* displayed as children of the session in the view.
*/
public class UiModelSession implements IUiModelElement {
- private IUiModelElement _parent; //parent element
- private OpModelSession _session; //the node in the data model
- private UiModelImage _image; //this node's child
- private UiModelDependent _dependent; //dependent images of the OpModelImage
+ private IUiModelElement parent; //parent element
+ private OpModelSession session; //the node in the data model
+ private UiModelImage image; //this node's child
+ private UiModelDependent dependent; //dependent images of the OpModelImage
//OProfile's default session name
private static final String DEFAULT_SESSION_NAME = "current"; //$NON-NLS-1$
public UiModelSession(IUiModelElement parent, OpModelSession session) {
- _parent = parent;
- _session = session;
- _image = null;
- _dependent = null;
+ this.parent = parent;
+ this.session = session;
+ this.image = null;
+ this.dependent = null;
refreshModel();
}
private void refreshModel() {
- OpModelImage dataModelImage = _session.getImage();
+ OpModelImage dataModelImage = session.getImage();
if (dataModelImage != null) {
- _image = new UiModelImage(this, dataModelImage, dataModelImage.getCount(), dataModelImage.getDepCount());
+ image = new UiModelImage(this, dataModelImage, dataModelImage.getCount(), dataModelImage.getDepCount());
if (dataModelImage.hasDependents()) {
- _dependent = new UiModelDependent(this, dataModelImage.getDependents(), dataModelImage.getCount(), dataModelImage.getDepCount());
+ dependent = new UiModelDependent(this, dataModelImage.getDependents(), dataModelImage.getCount(), dataModelImage.getDepCount());
}
}
}
@Override
public String toString() {
- return _session.getName();
+ return session.getName();
}
public boolean isDefaultSession() {
- return _session.getName().equalsIgnoreCase(DEFAULT_SESSION_NAME);
+ return session.getName().equalsIgnoreCase(DEFAULT_SESSION_NAME);
}
/** IUiModelElement functions **/
public String getLabelText() {
- if (_session.getName().equals(DEFAULT_SESSION_NAME)){
+ if (session.getName().equals(DEFAULT_SESSION_NAME)){
return OprofileUiMessages.getString("UiModelSession_current"); //$NON-NLS-1$
}
return toString();
}
public IUiModelElement[] getChildren() {
- if (_dependent != null) {
- return new IUiModelElement[] {_image, _dependent};
+ if (dependent != null) {
+ return new IUiModelElement[] {image, dependent};
} else {
- return new IUiModelElement[] {_image};
+ return new IUiModelElement[] {image};
}
}
public boolean hasChildren() {
- return (_image != null);
+ return (image != null);
}
public IUiModelElement getParent() {
- return _parent;
+ return parent;
}
public Image getLabelImage() {