Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.text
Class RewriteSessionEditProcessor

java.lang.Object
  extended by 

org.eclipse.text.edits.TextEditProcessor
      extended by 
org.eclipse.jface.text.RewriteSessionEditProcessor

public final class RewriteSessionEditProcessor
extends TextEditProcessor

A text edit processor that brackets the application of edits into a document rewrite session.

Since:
3.3

Constructor Summary
RewriteSessionEditProcessor ( IDocument document, TextEdit root, int style)
          Constructs a new edit processor for the given document.
 
Method Summary
static boolean isLargeEdit ( TextEdit edit)
          Returns true if the passed edit is considered large, false otherwise.
  UndoEdit performEdits ()
          Executes the text edits.
 
Methods inherited from class org.eclipse.text.edits. TextEditProcessor
canPerformEdits, considerEdit, getDocument, getRoot, getStyle
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RewriteSessionEditProcessor

public RewriteSessionEditProcessor(
IDocument document,
                                   
TextEdit root,
                                   int style)
Constructs a new edit processor for the given document.

Parameters:
document - the document to manipulate
root - the root of the text edit tree describing the modifications. By passing a text edit a a text edit processor the ownership of the edit is transfered to the text edit processors. Clients must not modify the edit (e.g adding new children) any longer.
style - TextEdit.NONE, TextEdit.CREATE_UNDO or TextEdit.UPDATE_REGIONS)
Method Detail

performEdits

public 
UndoEdit performEdits()
                      throws 
MalformedTreeException,
                             
BadLocationException
Description copied from class: TextEditProcessor
Executes the text edits.

Overrides:
performEdits in class TextEditProcessor
Returns:
an object representing the undo of the executed edits
Throws:
MalformedTreeException - is thrown if the edit tree isn't in a valid state. This exception is thrown before any edit is executed. So the document is still in its original state.
BadLocationException - is thrown if one of the edits in the tree can't be executed. The state of the document is undefined if this exception is thrown.

isLargeEdit

public static boolean isLargeEdit(
TextEdit edit)
Returns true if the passed edit is considered large, false otherwise.

Parameters:
edit - the edit to check
Returns:
true if edit is considered large, false otherwise
Since:
3.3

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire