Package org.eclipse.ecf.sync

Examples of org.eclipse.ecf.sync.ModelUpdateException


  public void applyToModel(Object model) throws ModelUpdateException {
    try {
      apply();
    } catch (CoreException e) {
      throw new ModelUpdateException(e, this, model);
    }
  }
View Full Code Here


  BatchModelChange(IModelChangeMessage[] messages) {
    this.messages = messages;
  }

  public void applyToModel(Object model) throws ModelUpdateException {
    throw new ModelUpdateException(
        "Batch changes are applied individually", this, model);
  }
View Full Code Here

  /* (non-Javadoc)
   * @see org.eclipse.ecf.sync.IModelChange#applyToModel(java.lang.Object)
   */
  public void applyToModel(Object model) throws ModelUpdateException {
    if (model == null) throw new ModelUpdateException("Model cannot be null",this,null);
    if (model instanceof IDocument) {
      try {
        ((IDocument) model).replace(getOffset(), getLengthOfReplacedText(), getText());
      } catch (BadLocationException e) {
        throw new ModelUpdateException("Exception applying change to document",this,model);
      }
    } else throw new ModelUpdateException("Incorrect type of model to apply change",this,model);
  }
View Full Code Here

  public void applyToModel(Object model) throws ModelUpdateException {
    try {
      apply();
    } catch (CoreException e) {
      throw new ModelUpdateException(e, this, model);
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.sync.ModelUpdateException

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.