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

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


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;
View Full Code Here


  Object[] elements = this.results.getBuilds();
  int length = elements.length;
  String[] buildsToUpdate = new String[length];
  int count = 0;
  for (int i=0; i<length; i++) {
    BuildResultsElement element = (BuildResultsElement) elements[i];
    if (element.getStatus() == 0) {
          buildsToUpdate[count++] = element.getName();
    }
  }
  if (count == 0) return null;
  if (count < length) {
    System.arraycopy(buildsToUpdate, 0, buildsToUpdate = new String[count], 0, count);
View Full Code Here

  WorkbenchLabelProvider labelProvider = new WorkbenchLabelProvider() {

    protected String decorateText(String input, Object element) {
      String text = super.decorateText(input, element);
      if (element instanceof BuildResultsElement) {
        BuildResultsElement buildElement = (BuildResultsElement) element;
        if (buildElement.isMilestone()) {
          text = Util.getMilestoneName(buildElement.getName()) + " - "+text;
        }
      }
      return text;
    }

    // When all scenarios are displayed, then set fingerprints one in bold.
    public Font getFont(Object element) {
      Font font = super.getFont(element);
      if (element instanceof ScenarioResultsElement) {
//        Action fingerprints = ComponentsView.this.filterNonFingerprints;
//        if (fingerprints != null && !fingerprints.isChecked()) {
        boolean fingerprints = ComponentsView.this.preferences.getBoolean(IPerformancesConstants.PRE_FILTER_ADVANCED_SCENARIOS, IPerformancesConstants.DEFAULT_FILTER_ADVANCED_SCENARIOS);
        if (!fingerprints) {
          ScenarioResultsElement scenarioElement = (ScenarioResultsElement) element;
          if (scenarioElement.hasSummary()) {
            return getBoldFont(font);
          }
        }
      }
      if (element instanceof BuildResultsElement) {
        BuildResultsElement buildElement = (BuildResultsElement) element;
        if (Util.isMilestone(buildElement.getName())) {
          return getBoldFont(font);
        }
      }
      return font;
    }
View Full Code Here

  // 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.BuildResultsElement

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.