use of net.sourceforge.processdash.ProcessDashboard in project processdash by dtuma.
the class ShowGlobalGroupFilterSelector method getMainGroupFilterMenu.
private GroupFilterMenu getMainGroupFilterMenu() {
ProcessDashboard dash = (ProcessDashboard) getDashboardContext();
JMenuBar menuBar = dash.getConfigurationMenus();
for (int i = menuBar.getMenuCount(); i-- > 0; ) {
Object item = menuBar.getMenu(i);
if (item instanceof GroupFilterMenu)
return (GroupFilterMenu) item;
}
return null;
}
use of net.sourceforge.processdash.ProcessDashboard in project processdash by dtuma.
the class OpenDefectDialog method openNewDefectDialog.
private void openNewDefectDialog(DefectLogID defectLog, String path) {
ProcessDashboard dash = getDash();
PropertyKey task = dash.getHierarchy().findClosestKey(path);
DefectDialog dlg = new DefectDialog(dash, defectLog.filename, defectLog.path, task);
if (!defectLog.path.equals(dash.getCurrentPhase()))
dlg.setTitle(defectLog.path.path());
}
use of net.sourceforge.processdash.ProcessDashboard in project processdash by dtuma.
the class MigrationToolTeam method convertHierarchy.
private void convertHierarchy() throws HierarchyAlterationException {
ProcessDashboard dash = (ProcessDashboard) ctx;
HierarchyAlterer alt = new HierarchyAlterer(dash);
DashHierarchy hier = ctx.getHierarchy();
PropertyKey key = hier.findExistingKey(projectPath);
// delete the children of the team project root node.
for (int i = hier.getNumChildren(key); i-- > 0; ) {
PropertyKey child = hier.getChildKey(key, i);
alt.deleteNode(child.path());
}
// change the template ID of the root node.
alt.setTemplateId(projectPath, newRootTemplateID);
}
use of net.sourceforge.processdash.ProcessDashboard in project processdash by dtuma.
the class MigrationToolTeam method checkConversionPreconditions.
private void checkConversionPreconditions() throws MigrationException {
if (Settings.isReadOnly())
throw new MigrationException("isReadOnly");
ProcessDashboard dash = (ProcessDashboard) ctx;
if (dash.isHierarchyEditorOpen())
throw new MigrationException("hierarchyEditorOpen");
DataContext data = ctx.getData().getSubcontext(projectPath);
SimpleData sd = data.getSimpleValue("Master_Project_Path");
if (sd != null && sd.test())
throw new MigrationException("belongsToMasterProject");
sd = data.getSimpleValue("Team_Process_PID");
currentPID = (sd == null ? null : sd.format());
if (targetPID == null || targetPID.equals(currentPID))
throw new MigrationException("targetPIDIsNoChange").add("targetPID", targetPID);
newRootTemplateID = targetPID + TEAM_ROOT;
if (!DashController.getTemplates().containsKey(newRootTemplateID))
throw new MigrationException("targetTemplateNotInstalled").add("targetPID", targetPID);
sd = data.getSimpleValue("Team_Data_Directory");
if (sd == null || !sd.test())
throw new MigrationException("noTeamDataDir");
teamDataDirectory = new File(sd.format());
if (!teamDataDirectory.isDirectory())
throw new MigrationException("cannotFindTeamDataDir");
}
use of net.sourceforge.processdash.ProcessDashboard in project processdash by dtuma.
the class ArchiveMetricsFileExporter method writeFromDatasetTag.
private void writeFromDatasetTag(XmlSerializer xml) throws IOException {
xml.ignorableWhitespace(NEWLINE + INDENT + INDENT);
xml.startTag(null, FROM_DATASET_TAG);
xml.attribute(null, FROM_DATASET_ID_ATTR, DashController.getDatasetID());
if (ctx instanceof ProcessDashboard) {
ProcessDashboard dash = (ProcessDashboard) ctx;
String location = dash.getWorkingDirectory().getDescription();
xml.attribute(null, FROM_DATASET_LOCATION_ATTR, location);
}
xml.endTag(null, FROM_DATASET_TAG);
}
Aggregations