Package org.eclipse.core.commands.common

Examples of org.eclipse.core.commands.common.NotDefinedException


    if (scheme == null) {
      throw new NullPointerException("Cannot activate a null scheme"); //$NON-NLS-1$
    }

    if ((scheme == null) || (!scheme.isDefined())) {
      throw new NotDefinedException(
          "Cannot activate an undefined scheme. " //$NON-NLS-1$
              + scheme.getId());
    }

    if (Util.equals(activeScheme, scheme)) {
View Full Code Here


   */
  public IElementReference registerElementForCommand(
      ParameterizedCommand command, UIElement element)
      throws NotDefinedException {
    if (!command.getCommand().isDefined()) {
      throw new NotDefinedException(
          "Cannot define a callback for undefined command " //$NON-NLS-1$
              + command.getCommand().getId());
    }
    if (element == null) {
      throw new NotDefinedException("No callback defined for command " //$NON-NLS-1$
          + command.getCommand().getId());
    }

    ElementReference ref = new ElementReference(command.getId(), element,
        command.getParameterMap());
View Full Code Here

   */
  public final IElementReference registerElementForCommand(
      ParameterizedCommand command, UIElement element)
      throws NotDefinedException {
    if (!command.getCommand().isDefined()) {
      throw new NotDefinedException(
          "Cannot define a callback for undefined command " //$NON-NLS-1$
              + command.getCommand().getId());
    }
    if (element == null) {
      throw new NotDefinedException("No callback defined for command " //$NON-NLS-1$
          + command.getCommand().getId());
    }

    ElementReference ref = new ElementReference(command.getId(), element,
        command.getParameterMap());
View Full Code Here

     * @throws NotDefinedException
     *             if this instance is not defined.
     */
    public final String getParentId() throws NotDefinedException {
        if (!defined) {
            throw new NotDefinedException(
                    "Cannot get the parent identifier from an undefined context. " //$NON-NLS-1$
                +id);
        }

        return parentId;
View Full Code Here

   */
  public final String getHelpContextId(final Command command)
      throws NotDefinedException {
    // Check if the command is defined.
    if (!command.isDefined()) {
      throw new NotDefinedException("The command is not defined. " //$NON-NLS-1$
          + command.getId());
    }

    // Check the handler.
    final IHandler handler = command.getHandler();
View Full Code Here

                .getName())) {
      return handler.execute(event);
    }

    if (!isDefined()) {
      final NotDefinedException exception = new NotDefinedException(
          "Trying to execute a command that is not defined. " //$NON-NLS-1$
              + getId());
      if (shouldFireEvents) {
        fireNotDefined(exception);
      }
View Full Code Here

   * @throws NotDefinedException
   *             If the handle is not currently defined.
   */
  public final Category getCategory() throws NotDefinedException {
    if (!isDefined()) {
      throw new NotDefinedException(
          "Cannot get the category from an undefined command. " //$NON-NLS-1$
              + id);
    }

    return category;
View Full Code Here

   * @since 3.2
   */
  public final IParameter getParameter(final String parameterId)
      throws NotDefinedException {
    if (!isDefined()) {
      throw new NotDefinedException(
          "Cannot get a parameter from an undefined command. " //$NON-NLS-1$
              + id);
    }

    if (parameters == null) {
View Full Code Here

   * @throws NotDefinedException
   *             If the handle is not currently defined.
   */
  public final IParameter[] getParameters() throws NotDefinedException {
    if (!isDefined()) {
      throw new NotDefinedException(
          "Cannot get the parameters from an undefined command. " //$NON-NLS-1$
              + id);
    }

    if ((parameters == null) || (parameters.length == 0)) {
View Full Code Here

   *             If the handle is not currently defined.
   * @since 3.2
   */
  public final ParameterType getReturnType() throws NotDefinedException {
    if (!isDefined()) {
      throw new NotDefinedException(
          "Cannot get the return type of an undefined command. " //$NON-NLS-1$
              + id);
    }

    return returnType;
View Full Code Here

TOP

Related Classes of org.eclipse.core.commands.common.NotDefinedException

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.