Package org.eclipse.test.internal.performance.results.model

Examples of org.eclipse.test.internal.performance.results.model.ConfigResultsElement


*/
public void selectionChanged(SelectionChangedEvent event) {
  ResultsElement selectedElement = (ResultsElement) ((TreeSelection) event.getSelection()).getFirstElement();
  ComponentResultsElement componentElement = null;
  ScenarioResultsElement scenarioResultsElement = null;
  ConfigResultsElement configResultsElement = null;
  BuildResultsElement buildResultsElement = null;
  if (selectedElement instanceof ComponentResultsElement) {
    componentElement = (ComponentResultsElement) selectedElement;
  } else if (selectedElement instanceof ScenarioResultsElement) {
    scenarioResultsElement = (ScenarioResultsElement) selectedElement;
    componentElement = (ComponentResultsElement) scenarioResultsElement.getParent(null);
  } else if (selectedElement instanceof ConfigResultsElement) {
    configResultsElement = (ConfigResultsElement) selectedElement;
    scenarioResultsElement = (ScenarioResultsElement) configResultsElement.getParent(null);
    componentElement = (ComponentResultsElement) scenarioResultsElement.getParent(null);
  } else if (selectedElement instanceof BuildResultsElement) {
    buildResultsElement = (BuildResultsElement) selectedElement;
    configResultsElement = (ConfigResultsElement) buildResultsElement.getParent(null);
    scenarioResultsElement = (ScenarioResultsElement) configResultsElement.getParent(null);
    componentElement = (ComponentResultsElement) scenarioResultsElement.getParent(null);
  } else if (selectedElement instanceof DimResultsElement) {
    buildResultsElement = (BuildResultsElement) selectedElement.getParent(null);
    configResultsElement = (ConfigResultsElement) buildResultsElement.getParent(null);
    scenarioResultsElement = (ScenarioResultsElement) configResultsElement.getParent(null);
    componentElement = (ComponentResultsElement) scenarioResultsElement.getParent(null);
  }
  if (componentElement != this.componentResultsElement) {
    this.componentResultsElement = componentElement;
    if (componentElement == null || this.componentResultsElement.getChildren(null).length > 0) {
      resetTabFolders(true);
    }
  }
  if (configResultsElement != null) {
    ConfigTab configTab = this.tabs[this.tabFolder.getSelectionIndex()];
    if (!configResultsElement.getName().equals(configTab.configName)) {
      int length = this.tabs.length;
      for (int i=0; i<length; i++) {
        if (this.tabs[i].configName.equals(configResultsElement.getName())) {
          this.tabFolder.setSelection(i);
        }
      }
    }
    if (buildResultsElement != null) {
View Full Code Here


          }
        }

        // Add information in tooltip when history shows big variation
        if (deviations[col-1] < 0) {
          ConfigResultsElement configResultsElement = (ConfigResultsElement) scenarioResultsElement.getResultsElement(this.configName);
          double[] stats = configResultsElement.getStatistics();
          deviations[col-1] = stats[3];
        }
        if (deviations[col-1] > 20) {
          // deviation is over 20% over the entire history
          if (toolTipText == null) {
            toolTipText = "";
          } else {
            toolTipText += ", ";
          }
          toolTipText += "History shows erratic values";
          if (toolTipMessage == null) {
            toolTipMessage = "";
          } else {
            toolTipMessage += ".\n";
          }
          toolTipMessage += "The results history shows that the variation of its delta is over 20% ("+PERCENTAGE_FORMAT.format(deviations[col-1])+"), hence its result is surely not reliable";
          // set the text in italic
          item.setFont(col, italic2);
          toolTipStyle |= SWT.ICON_INFORMATION;
        } else if (deviations[col-1] > 10) { // moderate the status when the test
          // deviation is between 10% and 20% over the entire history
          if (toolTipText == null) {
            toolTipText = "";
          } else {
            toolTipText += ", ";
          }
          toolTipText += "History shows unstable values";
          if (toolTipMessage == null) {
            toolTipMessage = "";
          } else {
            toolTipMessage += ".\n";
          }
          toolTipMessage += "The results history shows that the variation of its delta is between 10% and 20% ("+PERCENTAGE_FORMAT.format(deviations[col-1])+"), hence its result may not be really reliable";
          // set the text in italic
          item.setFont(col, italic2);
          if (toolTipStyle == SWT.BALLOON && delta >= -0.1) {
            toolTipStyle |= SWT.ICON_INFORMATION;
          } else {
            // reduce icon severity from error to warning
            toolTipStyle |= SWT.ICON_WARNING;
          }
        }
      }

      // Set tooltip
      if (toolTipText != null) {
        createToolTip(toolTipText, toolTipMessage, toolTipStyle, new Point(col, row));
      }

      // Baseline name
      ConfigResultsElement configResultsElement = (ConfigResultsElement) scenarioResultsElement.getResultsElement(this.configName);
      if (configResultsElement != null) {
        String configBaselineName = configResultsElement.getBaselineBuildName(buildName);
        if (baselineName == null) {
          baselineName = configBaselineName;
        } else if (baselineName.indexOf(configBaselineName) < 0) {
          baselineName += ", " +configBaselineName;
        }
View Full Code Here

  this.expandedComponents.clear();

  // Set the tree selection
  ScenarioResultsElement scenarioResultsElement = (ScenarioResultsElement) componentResults.getResultsElement(scenarioName);
  if (scenarioResultsElement != null) {
    ConfigResultsElement configResultsElement = (ConfigResultsElement) scenarioResultsElement.getResultsElement(configName);
    if (configResultsElement != null) {
      BuildResultsElement buildResultsElement = (BuildResultsElement) configResultsElement.getResultsElement(buildName);
      if (buildResultsElement != null) {
        this.viewer.setSelection(new StructuredSelection(buildResultsElement), true);
        this.setFocus();
      }
    }
View Full Code Here

TOP

Related Classes of org.eclipse.test.internal.performance.results.model.ConfigResultsElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.