&& ( containers[0] instanceof LdifContentRecord || containers[0] instanceof LdifChangeAddRecord ) )
{
LdifContainer container = containers[0];
LdifEntryEditorDialog dialog = null;
if ( container instanceof LdifContentRecord )
{
dialog = new LdifEntryEditorDialog( editor.getEditorSite().getShell(), editor.getConnection(),
( LdifContentRecord ) container );
}
else
{
dialog = new LdifEntryEditorDialog( editor.getEditorSite().getShell(), editor.getConnection(),
( LdifChangeAddRecord ) container );
}
editor.deactivateGlobalActionHandlers();
if ( dialog.open() == LdifEntryEditorDialog.OK )
{
LdifRecord record = dialog.getLdifRecord();
IDocument document = editor.getDocumentProvider().getDocument( editor.getEditorInput() );
String old = document.get();
StringBuffer sb = new StringBuffer();
sb.append( old.substring( 0, container.getOffset() ) );