diff options
author | Dmitry Kozlov | 2012-04-05 14:38:32 +0000 |
---|---|---|
committer | Roland Grunberg | 2012-04-12 21:01:35 +0000 |
commit | 02dd417a7c62de33e6ae01b751ee8f909647d0c5 (patch) | |
tree | 7f20c20da292151eb79f1d4ae0b576a7f9ea5c41 /oprofile | |
parent | 3736ce1cd62615e20a3373f1089b8abc75fb8254 (diff) | |
download | org.eclipse.linuxtools-02dd417a7c62de33e6ae01b751ee8f909647d0c5.tar.gz org.eclipse.linuxtools-02dd417a7c62de33e6ae01b751ee8f909647d0c5.tar.xz org.eclipse.linuxtools-02dd417a7c62de33e6ae01b751ee8f909647d0c5.zip |
Cleanup leading underscores from identifiers' names in org.eclipse.linuxtools.internal.oprofile.ui.model.UiModelDependent,
org.eclipse.linuxtools.internal.oprofile.ui.model.UiModelEvent,
org.eclipse.linuxtools.internal.oprofile.ui.model.UiModelImage.
Diffstat (limited to 'oprofile')
3 files changed, 49 insertions, 49 deletions
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/model/UiModelDependent.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/model/UiModelDependent.java index 6ced5b91b6..71d75ae0a5 100644 --- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/model/UiModelDependent.java +++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/model/UiModelDependent.java @@ -16,32 +16,32 @@ import org.eclipse.linuxtools.internal.oprofile.ui.OprofileUiPlugin; import org.eclipse.swt.graphics.Image; public class UiModelDependent implements IUiModelElement { - private IUiModelElement _parent; - private OpModelImage _dataModelDependents[]; - private UiModelImage _dependents[]; - private int _totalCount; - private int _depCount; + private IUiModelElement parent; + private OpModelImage dataModelDependents[]; + private UiModelImage dependents[]; + private int totalCount; + private int depCount; public UiModelDependent(IUiModelElement parent, OpModelImage dependents[], int totalCount, int depCount) { - _parent = parent; - _dataModelDependents = dependents; - _dependents = null; - _totalCount = totalCount; - _depCount = depCount; + this.parent = parent; + this.dataModelDependents = dependents; + this.dependents = null; + this.totalCount = totalCount; + this.depCount = depCount; refreshModel(); } private void refreshModel() { - _dependents = new UiModelImage[_dataModelDependents.length]; + dependents = new UiModelImage[dataModelDependents.length]; - for (int i = 0; i < _dataModelDependents.length; i++) { - _dependents[i] = new UiModelImage(this, _dataModelDependents[i], _totalCount, 0); + for (int i = 0; i < dataModelDependents.length; i++) { + dependents[i] = new UiModelImage(this, dataModelDependents[i], totalCount, 0); } } @Override public String toString() { - double countPercentage = (double)_depCount / (double)_totalCount; + double countPercentage = (double)depCount / (double)totalCount; String percentage = OprofileUiPlugin.getPercentageString(countPercentage); return percentage + " " + OprofileUiMessages.getString("uimodel.percentage.in") + OprofileUiMessages.getString("uimodel.dependent.dependent.images"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ @@ -53,7 +53,7 @@ public class UiModelDependent implements IUiModelElement { } public IUiModelElement[] getChildren() { - return _dependents; + return dependents; } public boolean hasChildren() { @@ -61,7 +61,7 @@ public class UiModelDependent 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/UiModelEvent.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/model/UiModelEvent.java index d717889fb3..b5297e76f3 100644 --- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/model/UiModelEvent.java +++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/model/UiModelEvent.java @@ -20,13 +20,13 @@ import org.eclipse.swt.graphics.Image; * has profiled. Must have children sessions. */ public class UiModelEvent implements IUiModelElement { - private IUiModelElement _parent = null; //parent node -- necessary? - private OpModelEvent _event; //the node in the data model - private UiModelSession _sessions[]; //this node's children + private IUiModelElement parent = null; //parent node -- necessary? + private OpModelEvent event; //the node in the data model + private UiModelSession sessions[]; //this node's children public UiModelEvent(OpModelEvent event) { if (event != null) { - _event = event; + this.event = event; refreshModel(); } } @@ -35,17 +35,17 @@ public class UiModelEvent implements IUiModelElement { * Create the ui sessions from the data model. */ private void refreshModel() { - OpModelSession dataModelSessions[] = _event.getSessions(); - _sessions = new UiModelSession[dataModelSessions.length]; + OpModelSession dataModelSessions[] = event.getSessions(); + sessions = new UiModelSession[dataModelSessions.length]; for (int i = 0; i < dataModelSessions.length; i++) { - _sessions[i] = new UiModelSession(this, dataModelSessions[i]); + sessions[i] = new UiModelSession(this, dataModelSessions[i]); } } @Override public String toString() { - return (_event == null ? "" : _event.getName()); //$NON-NLS-1$ + return (event == null ? "" : event.getName()); //$NON-NLS-1$ } /** IUiModelElement functions **/ @@ -54,15 +54,15 @@ public class UiModelEvent implements IUiModelElement { } public IUiModelElement[] getChildren() { - return _sessions; + return sessions; } public boolean hasChildren() { - return (_sessions == null || _sessions.length == 0 ? false : true); + return (sessions == null || sessions.length == 0 ? false : true); } 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/UiModelImage.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/model/UiModelImage.java index f5d19dfab4..196219d24c 100644 --- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/model/UiModelImage.java +++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/model/UiModelImage.java @@ -23,43 +23,43 @@ import org.eclipse.swt.graphics.Image; * sake they are children of the parent session in the tree. */ public class UiModelImage implements IUiModelElement { - private IUiModelElement _parent; //parent element, may be UiModelSession or UiModelDependent - private OpModelImage _image; //the node in the data model - private UiModelSymbol _symbols[]; //this node's child (symbols) - private int _totalCount; //total number of samples - private int _depCount; //number of samples from dependent images + private IUiModelElement parent; //parent element, may be UiModelSession or UiModelDependent + private OpModelImage image; //the node in the data model + private UiModelSymbol symbols[]; //this node's child (symbols) + private int totalCount; //total number of samples + private int depCount; //number of samples from dependent images public UiModelImage(IUiModelElement parent, OpModelImage image, int totalCount, int depCount) { - _parent = parent; - _image = image; - _symbols = null; - _totalCount = totalCount; - _depCount = depCount; + this.parent = parent; + this.image = image; + this.symbols = null; + this.totalCount = totalCount; + this.depCount = depCount; refreshModel(); } private void refreshModel() { - OpModelSymbol[] dataModelSymbols = _image.getSymbols(); + OpModelSymbol[] dataModelSymbols = image.getSymbols(); //dependent images may not have symbols if (dataModelSymbols != null) { - _symbols = new UiModelSymbol[dataModelSymbols.length]; + symbols = new UiModelSymbol[dataModelSymbols.length]; for (int i = 0; i < dataModelSymbols.length; i++) { - _symbols[i] = new UiModelSymbol(this, dataModelSymbols[i], _totalCount); + symbols[i] = new UiModelSymbol(this, dataModelSymbols[i], totalCount); } } } @Override public String toString() { - if (_image.getCount() == OpModelImage.IMAGE_PARSE_ERROR) { + if (image.getCount() == OpModelImage.IMAGE_PARSE_ERROR) { return OprofileUiMessages.getString("opxmlParse.error.multipleImages"); //$NON-NLS-1$ } else { - double countPercentage = (double)(_image.getCount() - _depCount) / (double)_totalCount; + double countPercentage = (double)(image.getCount() - depCount) / (double)totalCount; String percentage = OprofileUiPlugin.getPercentageString(countPercentage); - return percentage + " " + OprofileUiMessages.getString("uimodel.percentage.in") + _image.getName(); //$NON-NLS-1$ //$NON-NLS-2$ + return percentage + " " + OprofileUiMessages.getString("uimodel.percentage.in") + image.getName(); //$NON-NLS-1$ //$NON-NLS-2$ } } @@ -71,11 +71,11 @@ public class UiModelImage implements IUiModelElement { public IUiModelElement[] getChildren() { IUiModelElement children[] = null; - if (_symbols != null) { - children = new IUiModelElement[_symbols.length]; + if (symbols != null) { + children = new IUiModelElement[symbols.length]; - for (int i = 0; i < _symbols.length; i++) { - children[i] = _symbols[i]; + for (int i = 0; i < symbols.length; i++) { + children[i] = symbols[i]; } } @@ -83,11 +83,11 @@ public class UiModelImage implements IUiModelElement { } public boolean hasChildren() { - return (_symbols == null || _symbols.length == 0 ? false : true); + return (symbols == null || symbols.length == 0 ? false : true); } public IUiModelElement getParent() { - return _parent; + return parent; } public Image getLabelImage() { |