Search in sources :

Example 6 with ProcessDashboard

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;
}
Also used : ProcessDashboard(net.sourceforge.processdash.ProcessDashboard) JMenuBar(javax.swing.JMenuBar)

Example 7 with ProcessDashboard

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());
}
Also used : ProcessDashboard(net.sourceforge.processdash.ProcessDashboard) PropertyKey(net.sourceforge.processdash.hier.PropertyKey)

Example 8 with ProcessDashboard

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);
}
Also used : HierarchyAlterer(net.sourceforge.processdash.hier.HierarchyAlterer) DashHierarchy(net.sourceforge.processdash.hier.DashHierarchy) ProcessDashboard(net.sourceforge.processdash.ProcessDashboard) PropertyKey(net.sourceforge.processdash.hier.PropertyKey)

Example 9 with ProcessDashboard

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");
}
Also used : DataContext(net.sourceforge.processdash.data.DataContext) ProcessDashboard(net.sourceforge.processdash.ProcessDashboard) SimpleData(net.sourceforge.processdash.data.SimpleData) File(java.io.File)

Example 10 with ProcessDashboard

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);
}
Also used : ProcessDashboard(net.sourceforge.processdash.ProcessDashboard)

Aggregations

ProcessDashboard (net.sourceforge.processdash.ProcessDashboard)14 PropertyKey (net.sourceforge.processdash.hier.PropertyKey)4 DashHierarchy (net.sourceforge.processdash.hier.DashHierarchy)3 File (java.io.File)2 DataContext (net.sourceforge.processdash.data.DataContext)2 WorkingDirectory (net.sourceforge.processdash.tool.bridge.client.WorkingDirectory)2 Dimension (java.awt.Dimension)1 Robot (java.awt.Robot)1 Window (java.awt.Window)1 FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1 URL (java.net.URL)1 Date (java.util.Date)1 Iterator (java.util.Iterator)1 Random (java.util.Random)1 Box (javax.swing.Box)1 ButtonGroup (javax.swing.ButtonGroup)1 JFileChooser (javax.swing.JFileChooser)1 JMenuBar (javax.swing.JMenuBar)1 JScrollPane (javax.swing.JScrollPane)1