aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Kozlov2012-04-05 10:47:07 (EDT)
committerRoland Grunberg2012-04-12 17:01:36 (EDT)
commit8c2d46f096d598e22e05dc1f76b945883fd3ff3e (patch)
tree305824c7972670c2a9739f170f1456312d557f75
parentc3771121f7899e2f845616935baf8efef3207d2a (diff)
downloadorg.eclipse.linuxtools-8c2d46f096d598e22e05dc1f76b945883fd3ff3e.zip
org.eclipse.linuxtools-8c2d46f096d598e22e05dc1f76b945883fd3ff3e.tar.gz
org.eclipse.linuxtools-8c2d46f096d598e22e05dc1f76b945883fd3ff3e.tar.bz2
Cleanup leading underscores from identifiers' names in org.eclipse.linuxtools.internal.oprofile.ui.view.
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileView.java21
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewLogReaderAction.java20
2 files changed, 20 insertions, 21 deletions
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileView.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileView.java
index 70d1b4a..2a6529f 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileView.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileView.java
@@ -56,24 +56,24 @@ import org.eclipse.ui.part.ViewPart;
* ui model parsing in a separate thread.
*/
public class OprofileView extends ViewPart {
- private TreeViewer _viewer;
+ private TreeViewer viewer;
@Override
public void createPartControl(Composite parent) {
- _createTreeViewer(parent);
- _createActionMenu();
+ createTreeViewer(parent);
+ createActionMenu();
OprofileUiPlugin.getDefault().setOprofileView(this);
}
- private void _createTreeViewer(Composite parent) {
- _viewer = new TreeViewer(parent, SWT.SINGLE);
- _viewer.setContentProvider(new OprofileViewContentProvider());
- _viewer.setLabelProvider(new OprofileViewLabelProvider());
- _viewer.addDoubleClickListener(new OprofileViewDoubleClickListener());
+ private void createTreeViewer(Composite parent) {
+ viewer = new TreeViewer(parent, SWT.SINGLE);
+ viewer.setContentProvider(new OprofileViewContentProvider());
+ viewer.setLabelProvider(new OprofileViewLabelProvider());
+ viewer.addDoubleClickListener(new OprofileViewDoubleClickListener());
}
- private void _createActionMenu() {
+ private void createActionMenu() {
IMenuManager manager = getViewSite().getActionBars().getMenuManager();
manager.add(new OprofileViewLogReaderAction());
@@ -83,7 +83,7 @@ public class OprofileView extends ViewPart {
}
private TreeViewer getTreeViewer() {
- return _viewer;
+ return viewer;
}
/**
@@ -104,7 +104,6 @@ public class OprofileView extends ViewPart {
OpModelRoot dataModelRoot = OpModelRoot.getDefault();
dataModelRoot.refreshModel();
-// System.out.println(dataModelRoot); //debugging
monitor.worked(1);
final UiModelRoot UiRoot = UiModelRoot.getDefault();
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 a698d4f..6a42a48 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
@@ -69,38 +69,38 @@ public class OprofileViewLogReaderAction extends Action {
* A Runnable to read oprofiled's logfile
*/
class LogReader implements Runnable, IRunnableWithProgress {
- private static long _lastModified = -1;
- private static String _contents = null;
+ private static long lastModified = -1;
+ private static String contents = null;
public void run() {
File logFile = new File(Oprofile.getLogFile());
long modified = logFile.lastModified();
//only reread it if it has been modified since the last run
- if (modified != _lastModified) {
- _lastModified = modified;
- _contents = "";
+ if (modified != lastModified) {
+ lastModified = modified;
+ contents = "";
try {
BufferedReader reader = new BufferedReader(new FileReader(logFile));
String line;
while ((line = reader.readLine()) != null) {
- _contents += line + "\n"; //$NON-NLS-1$
+ contents += line + "\n"; //$NON-NLS-1$
}
reader.close();
} catch (FileNotFoundException e) {
// The file doesn't exist or was erased. Try again next time.
- _contents = OprofileUiMessages.getString("oprofiled.logreader.error.fileNotFound"); //$NON-NLS-1$
+ contents = OprofileUiMessages.getString("oprofiled.logreader.error.fileNotFound"); //$NON-NLS-1$
} catch (IOException e) {
// Error reading log. Try again next time.
- _lastModified = 0;
- _contents = OprofileUiMessages.getString("oprofiled.logreader.error.io"); //$NON-NLS-1$
+ lastModified = 0;
+ contents = OprofileUiMessages.getString("oprofiled.logreader.error.io"); //$NON-NLS-1$
}
}
}
public String getLogContents() {
- return _contents;
+ return contents;
}