Package org.eclipse.e4.xwt

Examples of org.eclipse.e4.xwt.XWTException


    if (parameters != null && parameters.length > 0) {
      try {
        updateContainment(parameters[0], object);
        initialize(object);
      } catch (Exception e) {
        throw new XWTException(e);
      }
    }
    return object;
  }
View Full Code Here


            }
            builder.append(property.getName());
            count++;
          }
        }
        throw new XWTException(
            "Class has more containment properties: ");
      }

      if (count == 0) {
        for (IProperty property : properties) {
View Full Code Here

      if (swtObject == null) {
        if (defaultConstructor == null) {
          try {
            swtObject = getType().newInstance();
          } catch (Exception e) {
            throw new XWTException("Constructor "
                + getType().getName() + " no found.");
          }
        }
        else {
          swtObject = defaultConstructor.newInstance();
        }
      }
      return swtObject;
    } catch (SecurityException e) {
      throw new XWTException(e);
    } catch (IllegalArgumentException e) {
      throw new XWTException(e);
    } catch (InstantiationException e) {
      throw new XWTException(e);
    } catch (IllegalAccessException e) {
      throw new XWTException(e);
    } catch (InvocationTargetException e) {
      throw new XWTException(e);
    }
  }
View Full Code Here

  public Object getObjectInstance() {
    if (objectInstance == null && objectType != null) {
      try {
        objectInstance = objectType.newInstance();
      } catch (Exception e) {
        throw new XWTException(e);
      }
    }
    return objectInstance;
  }
View Full Code Here

    while (stk.hasMoreTokens()) {
      String nextToken = stk.nextToken();
      try {
        result.add(Integer.parseInt(nextToken.trim()));
      } catch (NumberFormatException e) {
        throw new XWTException(source + " is not integer array");
      }
    }
    int[] intArray = new int[result.size()];
    for (int i = 0; i < result.size(); i++) {
      intArray[i] = result.get(i);
View Full Code Here

            return true;
          }
        }
      }
    } catch (Exception e) {
      throw new XWTException(e);
    }
    IMetaclass mateclass = XWT.getMetaclass(type);
    IProperty property = mateclass.findProperty(propertyName);
    if (property instanceof EventProperty) {
      return true;
View Full Code Here

            .observeText(control);
        if (observableValue != null) {
          return observableValue;
        }
      } catch (IllegalArgumentException e) {
        throw new XWTException(e);
      }
    } else {
      if (propertyName == null) {
        return null;
      }
      String getterName = "observe"
          + propertyName.substring(0, 1).toUpperCase()
          + propertyName.substring(1);
      Method method;
      try {
        method = SWTObservables.class.getMethod(getterName,
            CONTROL_ARGUMENT_TYPES);
        if (method == null) {
          for (Method element : SWTObservables.class.getMethods()) {
            if (element.getParameterTypes().length != 0) {
              continue;
            }
            if (element.getName().equalsIgnoreCase(getterName)) {
              method = element;
              break;
            }
          }
        }
        if (method != null) {
          IObservableValue observableValue = (IObservableValue) method
              .invoke(null, control);
          if (observableValue != null) {
            return observableValue;
          }
        }
      } catch (Exception e) {
        throw new XWTException(e);
      }
    }
    IMetaclass mateclass = XWT.getMetaclass(control);
    IProperty property = mateclass.findProperty(propertyName);
    if (property instanceof EventProperty) {
View Full Code Here

            return true;
          }
        }
      }
    } catch (Exception e) {
      throw new XWTException(e);
    }
    return false;
  }
View Full Code Here

        if (observableValue != null) {
          return observableValue;
        }
      }
    } catch (Exception e) {
      throw new XWTException(e);
    }
    return null;
  }
View Full Code Here

    if (element instanceof BeginStoryboard) {
      BeginStoryboard beginStoryboard = (BeginStoryboard) element;
      storyboard = beginStoryboard.getStoryboard();
    }
    else {
      throw new XWTException("NeginStoryboardName " + beginStoryboardName + " is not found.");
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.e4.xwt.XWTException

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.