Examples of ComponentLookupException


Examples of org.codehaus.plexus.component.repository.exception.ComponentLookupException

        {
            return locate( role, type, hint ).iterator().next().getValue();
        }
        catch ( final RuntimeException e )
        {
            throw new ComponentLookupException( e, null != type ? type.getName() : role, hint );
        }
    }
View Full Code Here

Examples of org.fest.swing.exception.ComponentLookupException

   */
  @RunsInEDT
  public @Nonnull JList dropDownList() {
    JList list = dropDownListFinder.findDropDownList();
    if (list == null) {
      throw new ComponentLookupException("Unable to find the pop-up list for the JComboBox");
    }
    return list;
  }
View Full Code Here

Examples of org.fest.swing.exception.ComponentLookupException

    condition = new ComponentFoundCondition("", finder, matcher, root);
  }

  @Test
  public void should_reset_matcher_when_match_not_found() {
    when(finder.find(root, matcher)).thenThrow(new ComponentLookupException("Thrown on purpose"));
    condition.test();
    verify(matcher).reset(false);
  }
View Full Code Here

Examples of org.fest.swing.exception.ComponentLookupException

  /**
   * @return the AWT {@code Component} hierarchy to be added to this condition's description in case of a lookup failure.
   */
  @Override
  protected @Nonnull String descriptionAddendum() {
    ComponentLookupException error = notFoundError.get();
    if (error == null) {
      return EMPTY_TEXT;
    }
    return concat(lineSeparator(), error.getMessage());
  }
View Full Code Here

Examples of org.fest.swing.exception.ComponentLookupException

  /**
   * @return all the AWT or Swing {@code Component}s that satisfied the search criteria specified by this condition's
   *         {@code ComponentMatcher}.
   */
  public Collection<? extends Component> duplicatesFound() {
    ComponentLookupException error = notFoundError.get();
    if (error == null) {
      return emptyList();
    }
    return error.found();
  }
View Full Code Here

Examples of org.fest.swing.exception.ComponentLookupException

      focusAndWaitForFocusGain(invoker);
    }
    click(invoker, location, RIGHT_BUTTON, 1);
    JPopupMenu popup = findActivePopupMenu();
    if (popup == null) {
      throw new ComponentLookupException(concat("Unable to show popup at ", location, " on ", inEdtFormat(invoker)));
    }
    long start = currentTimeMillis();
    while (!isWindowAncestorReadyForInput(popup) && currentTimeMillis() - start > POPUP_DELAY) {
      pause();
    }
View Full Code Here

Examples of org.fest.swing.exception.ComponentLookupException

    String message = concat("Unable to find component using matcher ", m, ".");
    if (includeHierarchyIfComponentNotFound()) {
      message = concat(message, lineSeparator(), lineSeparator(), "Component hierarchy:", lineSeparator(),
          formattedHierarchy(root(h)));
    }
    throw new ComponentLookupException(message);
  }
View Full Code Here

Examples of org.fest.swing.exception.ComponentLookupException

    message.append(String.format(format, m.toString()));
    appendComponents(message, found);
    if (!found.isEmpty()) {
      message.append(lineSeparator());
    }
    throw new ComponentLookupException(message.toString(), found);
  }
View Full Code Here

Examples of org.fest.swing.exception.ComponentLookupException

  private ComponentLookupException componentNotFound(ComponentHierarchy h, ComponentMatcher m) {
    String message = concat("Unable to find component using matcher ", m, ".");
    if (includeHierarchyIfComponentNotFound())
      message = concat(message,
          lineSeparator(), lineSeparator(), "Component hierarchy:", lineSeparator(), formattedHierarchy(root(h)));
    throw new ComponentLookupException(message);
  }
View Full Code Here

Examples of org.fest.swing.exception.ComponentLookupException

    message.append("Found more than one component using matcher ").append(m).append(".").append(lineSeparator())
           .append(lineSeparator())
           .append("Found:");
    appendComponents(message, found);
    if (!found.isEmpty()) message.append(lineSeparator());
    throw new ComponentLookupException(message.toString(), found);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.