From 8c2d46f096d598e22e05dc1f76b945883fd3ff3e Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Thu, 5 Apr 2012 18:47:07 +0400 Subject: Cleanup leading underscores from identifiers' names in org.eclipse.linuxtools.internal.oprofile.ui.view. --- .../internal/oprofile/ui/view/OprofileView.java | 21 ++++++++++----------- .../ui/view/OprofileViewLogReaderAction.java | 20 ++++++++++---------- 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 70d1b4aa60..2a6529f9f8 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 a698d4fbca..6a42a48c8c 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; } -- cgit v1.2.3