This class is used to record information about one hpcviewer window. More...
Public Member Functions | |
IWorkbenchWindow | getWinObj () |
void | setWinObj (IWorkbenchWindow window) |
int | getNextDbNum () |
Get the next database number to be used in this window. | |
Database | getDb (String dbPath) |
int | getOpenDatabases () |
Returns the number of open databases in this window. | |
int | addDatabase (Database database) |
Adds a new database to to the array of open databases in this window. | |
int | removeDatabase (String databasePath) |
Removes a database from the list of open databases in this window. | |
int | getDbNum (Experiment experiment) |
void | dispose () |
Database[] | getDatabases () |
Experiment[] | getExperiments () |
String[] | getDatabasePaths () |
get the path names for each database currently opened in this window. | |
String | getDatabasePath (File file) |
String | getDatabasePath (String filename) |
void | checkService () |
int | reserveDatabaseNumber () |
boolean | showCCTLabel () |
check if we are in debug mode (showing CCT label) or not | |
boolean | showFlatLabel () |
check if we are in debug mode (showing Flat label) or not | |
Static Public Attributes | |
static int | maxDbNum = 5 |
The maximum number of performance databases that can be opened in one window. | |
Package Attributes | |
ArrayList< Database > | dbObj = new ArrayList<Database>(maxDbNum) |
An array of performance databases (indexed by database number) that have been opened in this window. | |
Private Member Functions | |
void | filterAllDatabases (boolean filter) |
boolean | isDebugMode (Command command) |
check if we are in debug mode for a given command | |
Private Attributes | |
IWorkbenchWindow | winObj |
The workbench window with which this class is associated. | |
Command | cmdDebugCCT |
Command | cmdDebugFlat |
AtomicInteger | numAggregateDatabase = new AtomicInteger(1) |
number of databases (whether has been closed or not) this number is useful to make sure the view is always unique |
This class is used to record information about one hpcviewer window.
It contains information about each of the databases that have been opened in this window and an instance of the workbench window with which it is associated.
Each database opened within a window creates a Database object which is kept in dbObj array. The index into this array will be used as a database number. This number plus 1 (to avoid showing a 0) will be displayed in the view titles for all metrics views created when the database is opened. The view titles will also contain the experiment name (which was moved from the window title to the view titles). This allows the user to see which database was the source for the data in each metric view.
Definition at line 37 of file ViewerWindow.java.
int edu.rice.cs.hpc.viewer.window.ViewerWindow.addDatabase | ( | Database | database | ) |
Adds a new database to to the array of open databases in this window.
database |
Definition at line 154 of file ViewerWindow.java.
References edu.rice.cs.hpc.viewer.window.ViewerWindow.checkService(), and edu.rice.cs.hpc.viewer.window.ViewerWindow.dbObj.
Referenced by edu.rice.cs.hpc.viewer.experiment.ExperimentView.generateView().
void edu.rice.cs.hpc.viewer.window.ViewerWindow.checkService | ( | ) |
Definition at line 271 of file ViewerWindow.java.
References edu.rice.cs.hpc.viewer.provider.DatabaseState.toogleEnabled(), and edu.rice.cs.hpc.viewer.window.ViewerWindow.winObj.
Referenced by edu.rice.cs.hpc.viewer.window.ViewerWindow.addDatabase(), edu.rice.cs.hpc.viewer.framework.ApplicationWorkbenchAdvisor.postStartup(), and edu.rice.cs.hpc.viewer.window.ViewerWindow.removeDatabase().
void edu.rice.cs.hpc.viewer.window.ViewerWindow.dispose | ( | ) |
Definition at line 198 of file ViewerWindow.java.
References edu.rice.cs.hpc.viewer.window.ViewerWindow.dbObj.
Referenced by edu.rice.cs.hpc.viewer.window.ViewerWindowManager.removeWindow().
void edu.rice.cs.hpc.viewer.window.ViewerWindow.filterAllDatabases | ( | boolean | filter | ) | [private] |
Definition at line 90 of file ViewerWindow.java.
References edu.rice.cs.hpc.viewer.window.ViewerWindow.getExperiments(), edu.rice.cs.hpc.viewer.provider.DatabaseState.refreshDatabase(), and edu.rice.cs.hpc.viewer.window.ViewerWindow.winObj.
Referenced by edu.rice.cs.hpc.viewer.window.ViewerWindow.setWinObj().
String edu.rice.cs.hpc.viewer.window.ViewerWindow.getDatabasePath | ( | String | filename | ) |
Definition at line 259 of file ViewerWindow.java.
String edu.rice.cs.hpc.viewer.window.ViewerWindow.getDatabasePath | ( | File | file | ) |
Definition at line 252 of file ViewerWindow.java.
Referenced by edu.rice.cs.hpc.viewer.window.ViewerWindow.getDatabasePaths(), and edu.rice.cs.hpc.viewer.experiment.ExperimentManager.openFileExperimentFromFiles().
String [] edu.rice.cs.hpc.viewer.window.ViewerWindow.getDatabasePaths | ( | ) |
get the path names for each database currently opened in this window.
window |
Definition at line 237 of file ViewerWindow.java.
References edu.rice.cs.hpc.viewer.window.ViewerWindow.dbObj, edu.rice.cs.hpc.viewer.window.ViewerWindow.getDatabasePath(), edu.rice.cs.hpc.viewer.window.ViewerWindow.getOpenDatabases(), and edu.rice.cs.hpc.data.experiment.BaseExperiment.getXMLExperimentFile().
Referenced by edu.rice.cs.hpc.viewer.actions.CloseDatabase.execute().
Database [] edu.rice.cs.hpc.viewer.window.ViewerWindow.getDatabases | ( | ) |
Definition at line 206 of file ViewerWindow.java.
References edu.rice.cs.hpc.viewer.window.ViewerWindow.dbObj.
Referenced by edu.rice.cs.hpc.viewer.actions.ShowView.execute(), and edu.rice.cs.hpc.viewer.util.Utilities.resetAllViews().
Database edu.rice.cs.hpc.viewer.window.ViewerWindow.getDb | ( | String | dbPath | ) |
Definition at line 127 of file ViewerWindow.java.
References edu.rice.cs.hpc.viewer.window.ViewerWindow.dbObj, edu.rice.cs.hpc.data.experiment.BaseExperiment.getDefaultDirectory(), and edu.rice.cs.hpc.viewer.window.Database.getExperiment().
Referenced by edu.rice.cs.hpc.viewer.scope.ScopeViewActions.addExtNewMetric(), edu.rice.cs.hpc.viewer.experiment.ExperimentManager.openFileExperimentFromFiles(), edu.rice.cs.hpc.viewer.window.ViewerWindow.removeDatabase(), and edu.rice.cs.hpc.viewer.scope.ScopeViewActionsGUI.updateContent().
int edu.rice.cs.hpc.viewer.window.ViewerWindow.getDbNum | ( | Experiment | experiment | ) |
Definition at line 179 of file ViewerWindow.java.
References edu.rice.cs.hpc.viewer.window.ViewerWindow.dbObj.
Referenced by edu.rice.cs.hpc.viewer.scope.ScopeViewActions.addExtNewMetric(), edu.rice.cs.hpc.viewer.util.BaseWindowTitle.setEditorTitle(), and edu.rice.cs.hpc.viewer.util.BaseWindowTitle.setTitle().
Experiment [] edu.rice.cs.hpc.viewer.window.ViewerWindow.getExperiments | ( | ) |
Definition at line 216 of file ViewerWindow.java.
References edu.rice.cs.hpc.viewer.window.ViewerWindow.dbObj, and edu.rice.cs.hpc.viewer.window.ViewerWindow.getOpenDatabases().
Referenced by edu.rice.cs.hpc.viewer.actions.MergeDatabase.execute(), edu.rice.cs.hpc.viewer.window.ViewerWindow.filterAllDatabases(), edu.rice.cs.hpc.viewer.util.Utilities.getActiveExperiment(), edu.rice.cs.hpc.viewer.util.BaseWindowTitle.getWindowTitle(), edu.rice.cs.hpc.viewer.metric.MetricPropertyDialog.initTableViewer(), and edu.rice.cs.hpc.viewer.metric.MetricPropertyDialog.updateContent().
int edu.rice.cs.hpc.viewer.window.ViewerWindow.getNextDbNum | ( | ) |
Get the next database number to be used in this window.
Definition at line 122 of file ViewerWindow.java.
References edu.rice.cs.hpc.viewer.window.ViewerWindow.dbObj.
int edu.rice.cs.hpc.viewer.window.ViewerWindow.getOpenDatabases | ( | ) |
Returns the number of open databases in this window.
Definition at line 144 of file ViewerWindow.java.
References edu.rice.cs.hpc.viewer.window.ViewerWindow.dbObj.
Referenced by edu.rice.cs.hpc.viewer.util.Utilities.getActiveExperiment(), edu.rice.cs.hpc.viewer.window.ViewerWindow.getDatabasePaths(), edu.rice.cs.hpc.viewer.window.ViewerWindow.getExperiments(), edu.rice.cs.hpc.viewer.window.ViewerWindowManager.getNumberOfDatabases(), edu.rice.cs.hpc.viewer.metric.MetricPropertyDialog.initTableViewer(), and edu.rice.cs.hpc.viewer.provider.DatabaseState.toogleEnabled().
IWorkbenchWindow edu.rice.cs.hpc.viewer.window.ViewerWindow.getWinObj | ( | ) |
Definition at line 60 of file ViewerWindow.java.
References edu.rice.cs.hpc.viewer.window.ViewerWindow.winObj.
Referenced by edu.rice.cs.hpc.viewer.window.ViewerWindowManager.removeWindow(), and edu.rice.cs.hpc.viewer.util.Utilities.setFontMetric().
boolean edu.rice.cs.hpc.viewer.window.ViewerWindow.isDebugMode | ( | Command | command | ) | [private] |
check if we are in debug mode for a given command
command |
Definition at line 324 of file ViewerWindow.java.
Referenced by edu.rice.cs.hpc.viewer.window.ViewerWindow.showCCTLabel(), and edu.rice.cs.hpc.viewer.window.ViewerWindow.showFlatLabel().
int edu.rice.cs.hpc.viewer.window.ViewerWindow.removeDatabase | ( | String | databasePath | ) |
Removes a database from the list of open databases in this window.
databasePath |
Definition at line 167 of file ViewerWindow.java.
References edu.rice.cs.hpc.viewer.window.ViewerWindow.checkService(), edu.rice.cs.hpc.viewer.window.ViewerWindow.dbObj, edu.rice.cs.hpc.viewer.window.Database.dispose(), and edu.rice.cs.hpc.viewer.window.ViewerWindow.getDb().
Referenced by edu.rice.cs.hpc.viewer.actions.CloseDatabase.execute().
int edu.rice.cs.hpc.viewer.window.ViewerWindow.reserveDatabaseNumber | ( | ) |
Definition at line 292 of file ViewerWindow.java.
References edu.rice.cs.hpc.viewer.window.ViewerWindow.numAggregateDatabase.
Referenced by edu.rice.cs.hpc.viewer.experiment.ExperimentView.generateView().
void edu.rice.cs.hpc.viewer.window.ViewerWindow.setWinObj | ( | IWorkbenchWindow | window | ) |
Definition at line 64 of file ViewerWindow.java.
References edu.rice.cs.hpc.viewer.window.ViewerWindow.cmdDebugCCT, edu.rice.cs.hpc.viewer.window.ViewerWindow.cmdDebugFlat, edu.rice.cs.hpc.viewer.window.ViewerWindow.filterAllDatabases(), and edu.rice.cs.hpc.viewer.window.ViewerWindow.winObj.
Referenced by edu.rice.cs.hpc.viewer.window.ViewerWindowManager.addNewWindow().
boolean edu.rice.cs.hpc.viewer.window.ViewerWindow.showCCTLabel | ( | ) |
check if we are in debug mode (showing CCT label) or not
Definition at line 304 of file ViewerWindow.java.
References edu.rice.cs.hpc.viewer.window.ViewerWindow.cmdDebugCCT, and edu.rice.cs.hpc.viewer.window.ViewerWindow.isDebugMode().
Referenced by edu.rice.cs.hpc.viewer.scope.StyledScopeLabelProvider.getText().
boolean edu.rice.cs.hpc.viewer.window.ViewerWindow.showFlatLabel | ( | ) |
check if we are in debug mode (showing Flat label) or not
Definition at line 313 of file ViewerWindow.java.
References edu.rice.cs.hpc.viewer.window.ViewerWindow.cmdDebugFlat, and edu.rice.cs.hpc.viewer.window.ViewerWindow.isDebugMode().
Referenced by edu.rice.cs.hpc.viewer.scope.StyledScopeLabelProvider.getText().
Command edu.rice.cs.hpc.viewer.window.ViewerWindow.cmdDebugCCT [private] |
Definition at line 53 of file ViewerWindow.java.
Referenced by edu.rice.cs.hpc.viewer.window.ViewerWindow.setWinObj(), and edu.rice.cs.hpc.viewer.window.ViewerWindow.showCCTLabel().
Command edu.rice.cs.hpc.viewer.window.ViewerWindow.cmdDebugFlat [private] |
Definition at line 54 of file ViewerWindow.java.
Referenced by edu.rice.cs.hpc.viewer.window.ViewerWindow.setWinObj(), and edu.rice.cs.hpc.viewer.window.ViewerWindow.showFlatLabel().
ArrayList<Database> edu.rice.cs.hpc.viewer.window.ViewerWindow.dbObj = new ArrayList<Database>(maxDbNum) [package] |
An array of performance databases (indexed by database number) that have been opened in this window.
Definition at line 51 of file ViewerWindow.java.
Referenced by edu.rice.cs.hpc.viewer.window.ViewerWindow.addDatabase(), edu.rice.cs.hpc.viewer.window.ViewerWindow.dispose(), edu.rice.cs.hpc.viewer.window.ViewerWindow.getDatabasePaths(), edu.rice.cs.hpc.viewer.window.ViewerWindow.getDatabases(), edu.rice.cs.hpc.viewer.window.ViewerWindow.getDb(), edu.rice.cs.hpc.viewer.window.ViewerWindow.getDbNum(), edu.rice.cs.hpc.viewer.window.ViewerWindow.getExperiments(), edu.rice.cs.hpc.viewer.window.ViewerWindow.getNextDbNum(), edu.rice.cs.hpc.viewer.window.ViewerWindow.getOpenDatabases(), and edu.rice.cs.hpc.viewer.window.ViewerWindow.removeDatabase().
int edu.rice.cs.hpc.viewer.window.ViewerWindow.maxDbNum = 5 [static] |
The maximum number of performance databases that can be opened in one window.
Definition at line 42 of file ViewerWindow.java.
AtomicInteger edu.rice.cs.hpc.viewer.window.ViewerWindow.numAggregateDatabase = new AtomicInteger(1) [private] |
number of databases (whether has been closed or not) this number is useful to make sure the view is always unique
Definition at line 58 of file ViewerWindow.java.
Referenced by edu.rice.cs.hpc.viewer.window.ViewerWindow.reserveDatabaseNumber().
IWorkbenchWindow edu.rice.cs.hpc.viewer.window.ViewerWindow.winObj [private] |
The workbench window with which this class is associated.
Definition at line 46 of file ViewerWindow.java.
Referenced by edu.rice.cs.hpc.viewer.window.ViewerWindow.checkService(), edu.rice.cs.hpc.viewer.window.ViewerWindow.filterAllDatabases(), edu.rice.cs.hpc.viewer.window.ViewerWindow.getWinObj(), and edu.rice.cs.hpc.viewer.window.ViewerWindow.setWinObj().