Package org.eclipse.core.commands

Examples of org.eclipse.core.commands.ParameterValueConversionException


    if (parameterValueConverter == null) {
      try {
        parameterValueConverter = (AbstractParameterValueConverter) converterConfigurationElement
            .createExecutableExtension(IWorkbenchRegistryConstants.ATT_CONVERTER);
      } catch (final CoreException e) {
        throw new ParameterValueConversionException(
            "Problem creating parameter value converter", e); //$NON-NLS-1$
      } catch (final ClassCastException e) {
        throw new ParameterValueConversionException(
            "Parameter value converter was not a subclass of AbstractParameterValueConverter", e); //$NON-NLS-1$
      }
    }
    return parameterValueConverter;
  }
View Full Code Here


    try {
      int i = Integer.parseInt(parameterValue);
      return new Integer(i);
    } catch (NumberFormatException ex) {
      throw new ParameterValueConversionException(
          "error converting to integer: " + parameterValue); //$NON-NLS-1$
    }
  }
View Full Code Here

  public String convertToString(Object parameterValue)
      throws ParameterValueConversionException {

    if (!(parameterValue instanceof Integer)) {
      throw new ParameterValueConversionException(
          "value for conversion must be an Integer"); //$NON-NLS-1$
    }

    Integer i = (Integer) parameterValue;
    return Integer.toString(i.intValue());
View Full Code Here

TOP

Related Classes of org.eclipse.core.commands.ParameterValueConversionException

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.