public static String getFormattedString(String key, Object[] args) { return MessageFormat.format(getString(key), args); } }
@Override void aboutToBeAdded(TextEdit parent) { throw new MalformedTreeException(parent, this, TextEditMessages.getString("UndoEdit.can_not_be_added")); //$NON-NLS-1$ }
@Override void internalAdd(TextEdit child) throws MalformedTreeException { throw new MalformedTreeException(null, this, TextEditMessages.getString("UndoEdit.no_children")); //$NON-NLS-1$ }
@Override void aboutToBeAdded(TextEdit parent) { throw new MalformedTreeException(parent, this, TextEditMessages.getString("UndoEdit.can_not_be_added")); //$NON-NLS-1$ }
@Override void internalAdd(TextEdit child) throws MalformedTreeException { throw new MalformedTreeException(null, this, TextEditMessages.getString("UndoEdit.no_children")); //$NON-NLS-1$ }
public static String getFormattedString(String key, Object[] args) { return MessageFormat.format(getString(key), args); } }
@Override void performConsistencyCheck(TextEditProcessor processor, IDocument document) throws MalformedTreeException { if (fTarget == null) throw new MalformedTreeException(getParent(), this, TextEditMessages.getString("MoveSourceEdit.no_target")); //$NON-NLS-1$ if (fTarget.getSourceEdit() != this) throw new MalformedTreeException(getParent(), this, TextEditMessages.getString("MoveSourceEdit.different_source")); //$NON-NLS-1$ /* Causes AST rewrite to fail if (getRoot() != fTarget.getRoot()) throw new MalformedTreeException(getParent(), this, TextEditMessages.getString("MoveSourceEdit.different_tree")); //$NON-NLS-1$ */ }
@Override void performConsistencyCheck(TextEditProcessor processor, IDocument document) throws MalformedTreeException { if (fTarget == null) throw new MalformedTreeException(getParent(), this, TextEditMessages.getString("CopySourceEdit.no_target")); //$NON-NLS-1$ if (fTarget.getSourceEdit() != this) throw new MalformedTreeException(getParent(), this, TextEditMessages.getString("CopySourceEdit.different_source")); //$NON-NLS-1$ /* causes ASTRewrite to fail if (getRoot() != fTarget.getRoot()) throw new MalformedTreeException(getParent(), this, TextEditMessages.getString("CopySourceEdit.different_tree")); //$NON-NLS-1$ */ }
@Override void performConsistencyCheck(TextEditProcessor processor, IDocument document) throws MalformedTreeException { if (fTarget == null) throw new MalformedTreeException(getParent(), this, TextEditMessages.getString("CopySourceEdit.no_target")); //$NON-NLS-1$ if (fTarget.getSourceEdit() != this) throw new MalformedTreeException(getParent(), this, TextEditMessages.getString("CopySourceEdit.different_source")); //$NON-NLS-1$ /* causes ASTRewrite to fail if (getRoot() != fTarget.getRoot()) throw new MalformedTreeException(getParent(), this, TextEditMessages.getString("CopySourceEdit.different_tree")); //$NON-NLS-1$ */ }
@Override void performConsistencyCheck(TextEditProcessor processor, IDocument document) throws MalformedTreeException { if (fSource == null) throw new MalformedTreeException(getParent(), this, TextEditMessages.getString("CopyTargetEdit.no_source")); //$NON-NLS-1$ if (fSource.getTargetEdit() != this) throw new MalformedTreeException(getParent(), this, TextEditMessages.getString("CopyTargetEdit.different_target")); //$NON-NLS-1$ }
@Override void performConsistencyCheck(TextEditProcessor processor, IDocument document) throws MalformedTreeException { if (fSource == null) throw new MalformedTreeException(getParent(), this, TextEditMessages.getString("MoveTargetEdit.no_source")); //$NON-NLS-1$ if (fSource.getTargetEdit() != this) throw new MalformedTreeException(getParent(), this, TextEditMessages.getString("MoveTargetEdit.different_target")); //$NON-NLS-1$ }
@Override void performConsistencyCheck(TextEditProcessor processor, IDocument document) throws MalformedTreeException { if (fSource == null) throw new MalformedTreeException(getParent(), this, TextEditMessages.getString("CopyTargetEdit.no_source")); //$NON-NLS-1$ if (fSource.getTargetEdit() != this) throw new MalformedTreeException(getParent(), this, TextEditMessages.getString("CopyTargetEdit.different_target")); //$NON-NLS-1$ }
@Override void performConsistencyCheck(TextEditProcessor processor, IDocument document) throws MalformedTreeException { if (fSource == null) throw new MalformedTreeException(getParent(), this, TextEditMessages.getString("MoveTargetEdit.no_source")); //$NON-NLS-1$ if (fSource.getTargetEdit() != this) throw new MalformedTreeException(getParent(), this, TextEditMessages.getString("MoveTargetEdit.different_target")); //$NON-NLS-1$ }
@Override void performConsistencyCheck(TextEditProcessor processor, IDocument document) throws MalformedTreeException { if (fTarget == null) throw new MalformedTreeException(getParent(), this, TextEditMessages.getString("MoveSourceEdit.no_target")); //$NON-NLS-1$ if (fTarget.getSourceEdit() != this) throw new MalformedTreeException(getParent(), this, TextEditMessages.getString("MoveSourceEdit.different_source")); //$NON-NLS-1$ /* Causes AST rewrite to fail if (getRoot() != fTarget.getRoot()) throw new MalformedTreeException(getParent(), this, TextEditMessages.getString("MoveSourceEdit.different_tree")); //$NON-NLS-1$ */ }
void internalAdd(TextEdit child) throws MalformedTreeException { child.aboutToBeAdded(this); if (child.isDeleted()) throw new MalformedTreeException(this, child, TextEditMessages.getString("TextEdit.deleted_edit")); //$NON-NLS-1$ if (!covers(child)) throw new MalformedTreeException(this, child, TextEditMessages.getString("TextEdit.range_outside")); //$NON-NLS-1$ if (fChildren == null) { fChildren= new ArrayList<>(2); } int index= computeInsertionIndex(child); fChildren.add(index, child); child.internalSetParent(this); }
void internalAdd(TextEdit child) throws MalformedTreeException { child.aboutToBeAdded(this); if (child.isDeleted()) throw new MalformedTreeException(this, child, TextEditMessages.getString("TextEdit.deleted_edit")); //$NON-NLS-1$ if (!covers(child)) throw new MalformedTreeException(this, child, TextEditMessages.getString("TextEdit.range_outside")); //$NON-NLS-1$ if (fChildren == null) { fChildren= new ArrayList<>(2); } int index= computeInsertionIndex(child); fChildren.add(index, child); child.internalSetParent(this); }
void checkIntegrityDo() throws MalformedTreeException { fSourceEdits= new ArrayList<>(); fRoot.traverseConsistencyCheck(this, fDocument, fSourceEdits); if (fRoot.getExclusiveEnd() > fDocument.getLength()) throw new MalformedTreeException(null, fRoot, TextEditMessages.getString("TextEditProcessor.invalid_length")); //$NON-NLS-1$ }
void checkIntegrityUndo() { if (fRoot.getExclusiveEnd() > fDocument.getLength()) throw new MalformedTreeException(null, fRoot, TextEditMessages.getString("TextEditProcessor.invalid_length")); //$NON-NLS-1$ }
void checkIntegrityDo() throws MalformedTreeException { fSourceEdits= new ArrayList<>(); fRoot.traverseConsistencyCheck(this, fDocument, fSourceEdits); if (fRoot.getExclusiveEnd() > fDocument.getLength()) throw new MalformedTreeException(null, fRoot, TextEditMessages.getString("TextEditProcessor.invalid_length")); //$NON-NLS-1$ }
void checkIntegrityUndo() { if (fRoot.getExclusiveEnd() > fDocument.getLength()) throw new MalformedTreeException(null, fRoot, TextEditMessages.getString("TextEditProcessor.invalid_length")); //$NON-NLS-1$ }