Logo Search packages:      
Sourcecode: eclipse-cdt version File versions  Download package

void org::eclipse::cdt::internal::corext::textmanipulation::TextBuffer::replace ( int  offset,
int  length,
String  text 
) throws CoreException [inline]

Subsitutes the given text for the specified text position

offset the starting offset of the text to be replaced
length the length of the text to be replaced
text the substitution text
CoreException if the text position [offset, length] is invalid.

Definition at line 271 of file TextBuffer.java.

            try {
                  fDocument.replace(offset, length, text);
            } catch (BadLocationException e) {
                  IStatus s= new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID, CStatusConstants.INTERNAL_ERROR, 
                              "TextBuffer.wrongRange",  //$NON-NLS-1$
                              new Object[] {new Integer(offset), new Integer(length) } ), e);
                  throw new CoreException(s);

Generated by  Doxygen 1.6.0   Back to index