directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r598395 [6/7] - in /directory/sandbox/felixk: studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/ studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/ studio-aciitemedito...
Date Mon, 26 Nov 2007 19:44:37 GMT
Modified: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/JNDIUtils.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/JNDIUtils.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/JNDIUtils.java (original)
+++ directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/JNDIUtils.java Mon Nov 26 11:44:28 2007
@@ -25,14 +25,10 @@
 import java.net.NoRouteToHostException;
 import java.net.SocketException;
 import java.net.UnknownHostException;
-import java.util.ArrayList;
 
-import javax.naming.Context;
 import javax.naming.NamingException;
-import javax.naming.ReferralException;
 
 import org.apache.directory.shared.ldap.name.LdapDN;
-import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.model.ConnectionException;
 import org.apache.directory.studio.ldapbrowser.core.model.SearchParameter;
@@ -97,6 +93,9 @@
      */
     public static ConnectionException createConnectionException( SearchParameter searchParameter, Throwable e )
     {
+    	// TODO: remove when improving error handling
+        e.printStackTrace();
+        
         ConnectionException connectionException = null;
         ConnectionException lastException = null;
 
@@ -104,11 +103,9 @@
         {
             String message = e.getMessage() != null ? e.getMessage() : e.getClass().getName();
             int ldapStatusCode = -1;
-            String[] referrals = null;
 
             // get LDAP status code
-            // [LDAP: error code 21 - telephoneNumber: value #0 invalid per
-            // syntax]
+            // [LDAP: error code 21 - telephoneNumber: value #0 invalid per syntax]
             if ( message != null && message.startsWith( "[LDAP: error code " ) ) { //$NON-NLS-1$
                 int begin = "[LDAP: error code ".length(); //$NON-NLS-1$
                 int end = begin + 2;
@@ -146,51 +143,8 @@
             {
                 message = e.getMessage() + " (" + e.getMessage() + ")";; //$NON-NLS-1$ //$NON-NLS-2$
             }
-            if ( e instanceof ReferralException )
-            {
-                message = "Referrals: "; //$NON-NLS-1$
-                ReferralException re;
-                ArrayList<Object> referralsList = new ArrayList<Object>();
-
-                re = ( ReferralException ) e;
-                message += BrowserCoreConstants.LINE_SEPARATOR + re.getReferralInfo();
-                referralsList.add( re.getReferralInfo() );
-
-                while ( re.skipReferral() )
-                {
-                    try
-                    {
-                        Context ctx = re.getReferralContext();
-                        ctx.list( "" ); //$NON-NLS-1$
-                    }
-                    catch ( NamingException e1 )
-                    {
-                        if ( e1 instanceof ReferralException )
-                        {
-                            re = ( ReferralException ) e1;
-                            message += BrowserCoreConstants.LINE_SEPARATOR + re.getReferralInfo();
-                            referralsList.add( re.getReferralInfo() );
-                        }
-                        else
-                        {
-                            break;
-                        }
-                    }
-                }
-
-                referrals = referralsList.toArray( new String[referralsList.size()] );
-            }
 
-            ConnectionException ce;
-            if ( referrals != null )
-            {
-                ce = new org.apache.directory.studio.ldapbrowser.core.model.ReferralException( searchParameter,
-                    referrals, ldapStatusCode, message, e );
-            }
-            else
-            {
-                ce = new ConnectionException( ldapStatusCode, message, e );
-            }
+            ConnectionException ce = new ConnectionException( ldapStatusCode, message, e );
             if ( lastException != null )
             {
                 lastException.initCause( ce );

Modified: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/ModelConverter.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/ModelConverter.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/ModelConverter.java (original)
+++ directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/ModelConverter.java Mon Nov 26 11:44:28 2007
@@ -27,6 +27,7 @@
 import javax.naming.InvalidNameException;
 
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
@@ -35,17 +36,18 @@
 import org.apache.directory.studio.ldapbrowser.core.model.impl.Attribute;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.DummyEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.Value;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifPart;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifChangeAddRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifChangeRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContentRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifAttrValLine;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifChangeTypeLine;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifCommentLine;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifControlLine;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifDnLine;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifSepLine;
+import org.apache.directory.studio.ldifparser.LdifUtils;
+import org.apache.directory.studio.ldifparser.model.LdifPart;
+import org.apache.directory.studio.ldifparser.model.container.LdifChangeAddRecord;
+import org.apache.directory.studio.ldifparser.model.container.LdifChangeRecord;
+import org.apache.directory.studio.ldifparser.model.container.LdifContentRecord;
+import org.apache.directory.studio.ldifparser.model.container.LdifRecord;
+import org.apache.directory.studio.ldifparser.model.lines.LdifAttrValLine;
+import org.apache.directory.studio.ldifparser.model.lines.LdifChangeTypeLine;
+import org.apache.directory.studio.ldifparser.model.lines.LdifCommentLine;
+import org.apache.directory.studio.ldifparser.model.lines.LdifControlLine;
+import org.apache.directory.studio.ldifparser.model.lines.LdifDnLine;
+import org.apache.directory.studio.ldifparser.model.lines.LdifSepLine;
 
 
 public class ModelConverter
@@ -293,4 +295,35 @@
         }
     }
 
+    /**
+     * Gets the string value from the given {@link IValue}. If the given
+     * {@link IValue} is binary is is encoded according to the regquested
+     * encoding type.
+     *
+     * @param value the value
+     * @param binaryEncoding the binary encoding type
+     *
+     * @return the string value
+     */
+    public static String getStringValue( IValue value, int binaryEncoding )
+    {
+        String s = value.getStringValue();
+        if ( value.isBinary() && LdifUtils.mustEncode( s ) )
+        {
+            byte[] binary = value.getBinaryValue();
+            if ( binaryEncoding == BrowserCoreConstants.BINARYENCODING_BASE64 )
+            {
+                s = LdifUtils.base64encode( binary );
+            }
+            else if ( binaryEncoding == BrowserCoreConstants.BINARYENCODING_HEX )
+            {
+                s = LdifUtils.hexEncode( binary );
+            }
+            else
+            {
+                s = BrowserCoreConstants.BINARY;
+            }
+        }
+        return s;
+    }
 }

Modified: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/Utils.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/Utils.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/Utils.java (original)
+++ directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/Utils.java Mon Nov 26 11:44:28 2007
@@ -30,10 +30,83 @@
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.directory.shared.ldap.name.AttributeTypeAndValue;
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.Rdn;
+import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
+import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
+import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
+import org.apache.directory.studio.ldifparser.LdifFormatParameters;
+import org.apache.directory.studio.ldifparser.LdifUtils;
+import org.eclipse.core.runtime.Preferences;
+
 
 public class Utils
 {
 
+
+    /**
+     * Transforms the given DN into a normalized String, usable by the schema cache.
+     * The following transformations are permformed:
+     * <ul>
+     *   <li>The attribute type is replaced by the OID
+     *   <li>The attribute value is trimmed and lowercased
+     * </ul> 
+     * Example: the surname=Bar will be transformed to
+     * 2.5.4.4=bar
+     * 
+     * 
+     * @param dn the DN
+     * @param schema the schema
+     * 
+     * @return the oid string
+     */
+    public static String getNormalizedOidString( LdapDN dn, Schema schema )
+    {
+        StringBuffer sb = new StringBuffer();
+
+        Iterator<Rdn> it = dn.getRdns().iterator();
+        while ( it.hasNext() )
+        {
+            Rdn rdn = it.next();
+            sb.append( getOidString( rdn, schema ) );
+            if ( it.hasNext() )
+            {
+                sb.append( ',' );
+            }
+        }
+
+        return sb.toString();
+    }
+
+
+    private static String getOidString( Rdn rdn, Schema schema )
+    {
+        StringBuffer sb = new StringBuffer();
+
+        Iterator<AttributeTypeAndValue> it = rdn.iterator();
+        while ( it.hasNext() )
+        {
+            AttributeTypeAndValue atav = it.next();
+            sb.append( getOidString( atav, schema ) );
+            if ( it.hasNext() )
+            {
+                sb.append( '+' );
+            }
+        }
+
+        return sb.toString();
+    }
+
+
+    private static String getOidString( AttributeTypeAndValue atav, Schema schema )
+    {
+        String oid = schema != null ? schema.getAttributeTypeDescription( atav.getNormType() ).getNumericOID() : atav
+            .getNormType();
+        return oid.trim().toLowerCase() + "=" + ( ( String ) atav.getUpValue() ).trim().toLowerCase(); //$NON-NLS-1$
+    }
+
+
     public static String[] stringToArray( String s )
     {
         if ( s == null )
@@ -203,32 +276,14 @@
     }
 
 
-    public static String shorten( String label, int maxLength )
+    public static LdifFormatParameters getLdifFormatParameters()
     {
-        if ( label == null )
-        {
-            return null;
-        }
-        if ( maxLength < 3 )
-        {
-            return "...";
-        }
-        if ( label.length() > maxLength )
-        {
-            label = label.substring( 0, maxLength / 2 ) + "..."
-                + label.substring( label.length() - maxLength / 2, label.length() );
-
-        }
-        StringBuffer sb = new StringBuffer( maxLength + 3 );
-        for ( int i = 0; i < label.length(); i++ )
-        {
-            char c = label.charAt( i );
-            if ( c > 31 && c < 127 )
-                sb.append( c );
-            else
-                sb.append( '.' );
-        }
-        return sb.toString();
+        Preferences store = BrowserCorePlugin.getDefault().getPluginPreferences();
+        boolean spaceAfterColon = store.getBoolean( BrowserCoreConstants.PREFERENCE_LDIF_SPACE_AFTER_COLON );
+        int lineWidth = store.getInt( BrowserCoreConstants.PREFERENCE_LDIF_LINE_WIDTH );
+        String lineSeparator = store.getString( BrowserCoreConstants.PREFERENCE_LDIF_LINE_SEPARATOR );
+        LdifFormatParameters ldifFormatParameters = new LdifFormatParameters( spaceAfterColon, lineWidth, lineSeparator );
+        return ldifFormatParameters;
     }
 
 }

Modified: directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsCsvAction.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsCsvAction.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsCsvAction.java (original)
+++ directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsCsvAction.java Mon Nov 26 11:44:28 2007
@@ -37,7 +37,7 @@
 import org.apache.directory.studio.ldapbrowser.core.model.ISearchResult;
 import org.apache.directory.studio.ldapbrowser.core.model.IValue;
 import org.apache.directory.studio.ldapbrowser.core.utils.AttributeComparator;
-import org.apache.directory.studio.ldapbrowser.core.utils.LdifUtils;
+import org.apache.directory.studio.ldapbrowser.core.utils.ModelConverter;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIConstants;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIPlugin;
 import org.eclipse.jface.resource.ImageDescriptor;
@@ -291,7 +291,7 @@
 
                             for ( int v = 0; v < values.length; v++ )
                             {
-                                String val = LdifUtils.getStringValue( values[v], binaryEncoding );
+                                String val = ModelConverter.getStringValue( values[v], binaryEncoding );
                                 valueSB.append( val );
                                 if ( v + 1 < values.length )
                                 {

Modified: directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsLdifAction.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsLdifAction.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsLdifAction.java (original)
+++ directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsLdifAction.java Mon Nov 26 11:44:28 2007
@@ -35,9 +35,9 @@
 import org.apache.directory.studio.ldapbrowser.core.model.IValue;
 import org.apache.directory.studio.ldapbrowser.core.utils.AttributeComparator;
 import org.apache.directory.studio.ldapbrowser.core.utils.ModelConverter;
+import org.apache.directory.studio.ldapbrowser.core.utils.Utils;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIConstants;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIPlugin;
-
 import org.eclipse.jface.resource.ImageDescriptor;
 
 
@@ -164,7 +164,7 @@
      */
     protected void serializeValue( IValue value, StringBuffer text )
     {
-        text.append( ModelConverter.valueToLdifAttrValLine( value ).toFormattedString() );
+        text.append( ModelConverter.valueToLdifAttrValLine( value ).toFormattedString( Utils.getLdifFormatParameters() ) );
     }
 
 
@@ -178,6 +178,6 @@
      */
     protected void serializeDn( LdapDN dn, StringBuffer text )
     {
-        text.append( ModelConverter.dnToLdifDnLine( dn ).toFormattedString() );
+        text.append( ModelConverter.dnToLdifDnLine( dn ).toFormattedString( Utils.getLdifFormatParameters() ) );
     }
 }

Modified: directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyValueAction.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyValueAction.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyValueAction.java (original)
+++ directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyValueAction.java Mon Nov 26 11:44:28 2007
@@ -32,11 +32,11 @@
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.IValue;
-import org.apache.directory.studio.ldapbrowser.core.utils.LdifUtils;
 import org.apache.directory.studio.ldapbrowser.core.utils.ModelConverter;
+import org.apache.directory.studio.ldapbrowser.core.utils.Utils;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIConstants;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIPlugin;
-
+import org.apache.directory.studio.ldifparser.LdifUtils;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.swt.dnd.TextTransfer;
 import org.eclipse.swt.dnd.Transfer;
@@ -193,7 +193,7 @@
                 }
                 else if ( mode == MODE_LDIF )
                 {
-                    text.append( ModelConverter.valueToLdifAttrValLine( value ).toFormattedString() );
+                    text.append( ModelConverter.valueToLdifAttrValLine( value ).toFormattedString( Utils.getLdifFormatParameters() ) );
                 }
 
             }
@@ -216,7 +216,7 @@
             }
             else if ( mode == MODE_LDIF )
             {
-                text.append( ModelConverter.dnToLdifDnLine( dn ).toFormattedString() );
+                text.append( ModelConverter.dnToLdifDnLine( dn ).toFormattedString( Utils.getLdifFormatParameters() ) );
             }
         }
 

Modified: directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/EncoderDecoderDialog.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/EncoderDecoderDialog.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/EncoderDecoderDialog.java (original)
+++ directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/EncoderDecoderDialog.java Mon Nov 26 11:44:28 2007
@@ -22,7 +22,7 @@
 
 
 import org.apache.directory.studio.ldapbrowser.common.widgets.BaseWidgetUtils;
-import org.apache.directory.studio.ldapbrowser.core.utils.LdifUtils;
+import org.apache.directory.studio.ldifparser.LdifUtils;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.swt.SWT;

Modified: directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/BookmarkPropertyPage.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/BookmarkPropertyPage.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/BookmarkPropertyPage.java (original)
+++ directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/BookmarkPropertyPage.java Mon Nov 26 11:44:28 2007
@@ -26,7 +26,7 @@
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyListener;
 import org.apache.directory.studio.ldapbrowser.common.widgets.search.EntryWidget;
 import org.apache.directory.studio.ldapbrowser.core.model.IBookmark;
-import org.apache.directory.studio.ldapbrowser.core.utils.Utils;
+import org.apache.directory.studio.connection.core.Utils;
 
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.swt.events.ModifyEvent;

Modified: directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/SearchPropertyPage.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/SearchPropertyPage.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/SearchPropertyPage.java (original)
+++ directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/SearchPropertyPage.java Mon Nov 26 11:44:28 2007
@@ -29,7 +29,7 @@
 import org.apache.directory.studio.ldapbrowser.core.events.SearchUpdateEvent;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.Search;
-import org.apache.directory.studio.ldapbrowser.core.utils.Utils;
+import org.apache.directory.studio.connection.core.Utils;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.ui.IWorkbenchPropertyPage;

Modified: directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/ValuePropertyPage.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/ValuePropertyPage.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/ValuePropertyPage.java (original)
+++ directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/ValuePropertyPage.java Mon Nov 26 11:44:28 2007
@@ -91,8 +91,8 @@
 
         if ( value != null )
         {
-
-            super.setMessage( "Value " + Utils.shorten( value.toString(), 30 ) );
+            super.setMessage( "Value "
+                + org.apache.directory.studio.connection.core.Utils.shorten( value.toString(), 30 ) );
 
             descriptionText.setText( value.getAttribute().getDescription() );
             // valueText.setText(LdifUtils.mustEncode(value.getBinaryValue())?"Binary":value.getStringValue());

Modified: directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditorOutlinePage.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditorOutlinePage.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditorOutlinePage.java (original)
+++ directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditorOutlinePage.java Mon Nov 26 11:44:28 2007
@@ -31,20 +31,20 @@
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.IValue;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifFile;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifChangeAddRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifChangeDeleteRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifChangeModDnRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifChangeModifyRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContentRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifModSpec;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifAttrValLine;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.parser.LdifParser;
 import org.apache.directory.studio.ldapbrowser.core.utils.Utils;
 import org.apache.directory.studio.ldapbrowser.ui.actions.CopyEntryAsLdifAction;
 import org.apache.directory.studio.ldifeditor.LdifEditorActivator;
 import org.apache.directory.studio.ldifeditor.LdifEditorConstants;
+import org.apache.directory.studio.ldifparser.model.LdifFile;
+import org.apache.directory.studio.ldifparser.model.container.LdifChangeAddRecord;
+import org.apache.directory.studio.ldifparser.model.container.LdifChangeDeleteRecord;
+import org.apache.directory.studio.ldifparser.model.container.LdifChangeModDnRecord;
+import org.apache.directory.studio.ldifparser.model.container.LdifChangeModifyRecord;
+import org.apache.directory.studio.ldifparser.model.container.LdifContentRecord;
+import org.apache.directory.studio.ldifparser.model.container.LdifModSpec;
+import org.apache.directory.studio.ldifparser.model.container.LdifRecord;
+import org.apache.directory.studio.ldifparser.model.lines.LdifAttrValLine;
+import org.apache.directory.studio.ldifparser.parser.LdifParser;
 import org.eclipse.jface.viewers.DoubleClickEvent;
 import org.eclipse.jface.viewers.IDoubleClickListener;
 import org.eclipse.jface.viewers.ISelectionChangedListener;

Modified: directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserViewUniversalListener.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserViewUniversalListener.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserViewUniversalListener.java (original)
+++ directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserViewUniversalListener.java Mon Nov 26 11:44:28 2007
@@ -38,6 +38,7 @@
 import org.apache.directory.studio.ldapbrowser.core.events.BookmarkUpdateListener;
 import org.apache.directory.studio.ldapbrowser.core.events.BulkModificationEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EntryAddedEvent;
+import org.apache.directory.studio.ldapbrowser.core.events.EntryDeletedEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EntryModificationEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EntryMovedEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EntryRenamedEvent;
@@ -109,8 +110,8 @@
                     Connection[] connections = BrowserSelectionUtils.getConnections( selection );
                     if ( connections.length == 1 )
                     {
-                        IBrowserConnection connection = BrowserCorePlugin.getDefault().getConnectionManager().getBrowserConnection(
-                            connections[0] );
+                        IBrowserConnection connection = BrowserCorePlugin.getDefault().getConnectionManager()
+                            .getBrowserConnection( connections[0] );
                         setInput( connection );
                     }
                     else
@@ -157,8 +158,7 @@
 
                 IContextService contextService = ( IContextService ) PlatformUI.getWorkbench().getAdapter(
                     IContextService.class );
-                contextActivation = contextService
-                    .activateContext( BrowserCommonConstants.CONTEXT_WINDOWS );
+                contextActivation = contextService.activateContext( BrowserCommonConstants.CONTEXT_WINDOWS );
                 // org.eclipse.ui.contexts.dialogAndWindow
                 // org.eclipse.ui.contexts.window
                 // org.eclipse.ui.text_editor_context
@@ -363,7 +363,8 @@
         {
 
             IBrowserConnection currentConnection = viewer.getInput() instanceof IBrowserConnection ? ( IBrowserConnection ) viewer
-                .getInput() : null;
+                .getInput()
+                : null;
 
             // save expanded elements and selection
             if ( currentConnection != null )
@@ -401,8 +402,8 @@
      */
     public void connectionOpened( Connection connection )
     {
-        IBrowserConnection browserConnection = BrowserCorePlugin.getDefault().getConnectionManager().getBrowserConnection(
-            connection );
+        IBrowserConnection browserConnection = BrowserCorePlugin.getDefault().getConnectionManager()
+            .getBrowserConnection( connection );
 
         // expand viewer
         viewer.refresh( browserConnection );
@@ -425,9 +426,9 @@
      */
     public void connectionClosed( Connection connection )
     {
-        IBrowserConnection browserConnection = BrowserCorePlugin.getDefault().getConnectionManager().getBrowserConnection(
-            connection );
-        
+        IBrowserConnection browserConnection = BrowserCorePlugin.getDefault().getConnectionManager()
+            .getBrowserConnection( connection );
+
         viewer.collapseAll();
         connectionToExpandedElementsMap.remove( browserConnection );
         connectionToSelectedElementMap.remove( browserConnection );
@@ -510,12 +511,28 @@
             viewer.refresh( eme.getNewEntry(), true );
             viewer.setSelection( new StructuredSelection( eme.getNewEntry() ), true );
         }
+        else if ( event instanceof EntryDeletedEvent )
+        {
+            EntryDeletedEvent ede = ( EntryDeletedEvent ) event;
+            if ( ede.getModifiedEntry().getParententry() != null )
+            {
+                viewer.refresh( ede.getModifiedEntry(), true );
+                viewer.refresh( ede.getModifiedEntry().getParententry(), true );
+                viewer.setSelection( new StructuredSelection( ede.getModifiedEntry().getParententry() ), true );
+            }
+            else
+            {
+                viewer.refresh();
+            }
+        }
         else if ( event instanceof BulkModificationEvent )
         {
             viewer.refresh();
         }
-
-        viewer.refresh( event.getModifiedEntry(), true );
+        else
+        {
+            viewer.refresh( event.getModifiedEntry(), true );
+        }
     }
 
 }

Modified: directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ClearAction.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ClearAction.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ClearAction.java (original)
+++ directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ClearAction.java Mon Nov 26 11:44:28 2007
@@ -27,6 +27,12 @@
 import org.eclipse.jface.resource.ImageDescriptor;
 
 
+/**
+ * Action to clear the log files.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class ClearAction extends BrowserAction
 {
 

Modified: directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewActionGroup.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewActionGroup.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewActionGroup.java (original)
+++ directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewActionGroup.java Mon Nov 26 11:44:28 2007
@@ -22,7 +22,6 @@
 
 
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.Map;
 
 import org.apache.directory.studio.ldapbrowser.common.actions.proxy.ActionHandlerManager;
@@ -86,20 +85,16 @@
 
 
     /**
-     * Disposes thes action group.
+     * Disposes this action group.
      */
     public void dispose()
     {
         if ( view != null )
         {
-            for ( Iterator it = modificationLogsViewActionMap.keySet().iterator(); it.hasNext(); )
+            for ( ModificationLogsViewActionProxy action : modificationLogsViewActionMap.values() )
             {
-                String key = ( String ) it.next();
-                ModificationLogsViewActionProxy action = ( ModificationLogsViewActionProxy ) modificationLogsViewActionMap
-                    .get( key );
                 action.dispose();
                 action = null;
-                it.remove();
             }
             modificationLogsViewActionMap.clear();
             modificationLogsViewActionMap = null;
@@ -140,9 +135,8 @@
      */
     public void setInput( ModificationLogsViewInput input )
     {
-        for ( Iterator it = modificationLogsViewActionMap.values().iterator(); it.hasNext(); )
+        for ( ModificationLogsViewActionProxy action : modificationLogsViewActionMap.values() )
         {
-            ModificationLogsViewActionProxy action = ( ModificationLogsViewActionProxy ) it.next();
             action.inputChanged( input );
         }
     }

Modified: directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewUniversalListener.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewUniversalListener.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewUniversalListener.java (original)
+++ directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/ModificationLogsViewUniversalListener.java Mon Nov 26 11:44:28 2007
@@ -26,6 +26,8 @@
 import java.io.FileWriter;
 
 import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
+import org.apache.directory.studio.connection.core.io.jndi.LdifModificationLogger;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
 import org.apache.directory.studio.ldapbrowser.common.actions.BrowserSelectionUtils;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
@@ -35,8 +37,8 @@
 import org.apache.directory.studio.ldapbrowser.core.events.EntryUpdateListener;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContainer;
 import org.apache.directory.studio.ldapbrowser.ui.views.connection.ConnectionView;
+import org.apache.directory.studio.ldifparser.model.container.LdifContainer;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.ui.INullSelectionListener;
 import org.eclipse.ui.IWorkbenchPart;
@@ -57,6 +59,9 @@
     /** The current input */
     private ModificationLogsViewInput input;
 
+    /** The last refresh timestamp. */
+    private long lastRefreshTimestamp;
+
     /** Listener that listens for selections of connections */
     private INullSelectionListener connectionSelectionListener = new INullSelectionListener()
     {
@@ -142,7 +147,8 @@
 
             // load file %u %g
             StringBuffer sb = new StringBuffer();
-            File[] files = input.getConnection().getModificationLogger().getFiles();
+            LdifModificationLogger modificationLogger = ConnectionCorePlugin.getDefault().getLdifModificationLogger();
+            File[] files = modificationLogger.getFiles( input.getConnection().getConnection() );
             int i = input.getIndex();
             if ( 0 <= i && i < files.length && files[i] != null && files[i].exists() && files[i].canRead() )
             {
@@ -175,10 +181,16 @@
      */
     public void entryUpdated( EntryModificationEvent event )
     {
-        if ( !( event instanceof AttributesInitializedEvent ) && !( event instanceof ChildrenInitializedEvent ) )
+        // performance optimization: refresh only once per second
+        long now = System.currentTimeMillis();
+        if ( lastRefreshTimestamp + 1000 < now )
         {
-            refreshInput();
-            scrollToNewest();
+            if ( !( event instanceof AttributesInitializedEvent ) && !( event instanceof ChildrenInitializedEvent ) )
+            {
+                refreshInput();
+                scrollToNewest();
+                lastRefreshTimestamp = now;
+            }
         }
     }
 
@@ -209,10 +221,10 @@
         catch ( Exception e )
         {
         }
-
     }
-    
-	/**
+
+
+    /**
      * Clears the input and deletes the logfiles for it
      * 
      */
@@ -220,8 +232,9 @@
     {
         StringBuffer sb = new StringBuffer( "" );
         FileWriter fw = null;
-        File[] files = input.getConnection().getModificationLogger().getFiles();
-        input.getConnection().getModificationLogger().dispose();
+        LdifModificationLogger modificationLogger = ConnectionCorePlugin.getDefault().getLdifModificationLogger();
+        File[] files = modificationLogger.getFiles( input.getConnection().getConnection() );
+        modificationLogger.dispose( input.getConnection().getConnection() );
         for ( int i = 0; i < files.length; i++ )
         {
             try

Modified: directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/OlderAction.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/OlderAction.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/OlderAction.java (original)
+++ directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/modificationlogs/OlderAction.java Mon Nov 26 11:44:28 2007
@@ -23,6 +23,8 @@
 
 import java.io.File;
 
+import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
+import org.apache.directory.studio.connection.core.io.jndi.LdifModificationLogger;
 import org.apache.directory.studio.ldapbrowser.common.actions.BrowserAction;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIConstants;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIPlugin;
@@ -110,7 +112,8 @@
         if ( getInput() != null && ( getInput() instanceof ModificationLogsViewInput ) )
         {
             ModificationLogsViewInput input = ( ModificationLogsViewInput ) getInput();
-            File[] files = input.getConnection().getModificationLogger().getFiles();
+            LdifModificationLogger modificationLogger = ConnectionCorePlugin.getDefault().getLdifModificationLogger();
+            File[] files = modificationLogger.getFiles( input.getConnection().getConnection() );
             int i = input.getIndex() + 1;
             if ( 0 <= i && i < files.length && files[i] != null && files[i].exists() && files[i].canRead() )
             {

Modified: directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationLdifWizardPage.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationLdifWizardPage.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationLdifWizardPage.java (original)
+++ directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationLdifWizardPage.java Mon Nov 26 11:44:28 2007
@@ -24,9 +24,9 @@
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyEvent;
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyListener;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifFile;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContainer;
 import org.apache.directory.studio.ldifeditor.widgets.LdifEditorWidget;
+import org.apache.directory.studio.ldifparser.model.LdifFile;
+import org.apache.directory.studio.ldifparser.model.container.LdifContainer;
 
 import org.eclipse.jface.wizard.WizardPage;
 import org.eclipse.swt.SWT;

Modified: directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationModifyWizardPage.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationModifyWizardPage.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationModifyWizardPage.java (original)
+++ directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationModifyWizardPage.java Mon Nov 26 11:44:28 2007
@@ -25,10 +25,10 @@
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyEvent;
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyListener;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifFile;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContainer;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.parser.LdifParser;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
+import org.apache.directory.studio.ldifparser.model.LdifFile;
+import org.apache.directory.studio.ldifparser.model.container.LdifContainer;
+import org.apache.directory.studio.ldifparser.parser.LdifParser;
 import org.eclipse.jface.wizard.WizardPage;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;

Modified: directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationWizard.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationWizard.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationWizard.java (original)
+++ directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationWizard.java Mon Nov 26 11:44:28 2007
@@ -328,7 +328,7 @@
                     ldif.append( ldifFragment );
                     ldif.append( BrowserCoreConstants.LINE_SEPARATOR );
                 }
-
+                
                 if ( finishPage.getExecutionMethod() == BatchOperationFinishWizardPage.EXECUTION_METHOD_LDIF )
                 {
 

Modified: directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryDnWizardPage.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryDnWizardPage.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryDnWizardPage.java (original)
+++ directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryDnWizardPage.java Mon Nov 26 11:44:28 2007
@@ -27,6 +27,7 @@
 import org.apache.directory.shared.ldap.name.AttributeTypeAndValue;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.Rdn;
+import org.apache.directory.studio.connection.core.DnUtils;
 import org.apache.directory.studio.ldapbrowser.common.jobs.RunnableContextJobAdapter;
 import org.apache.directory.studio.ldapbrowser.common.widgets.DnBuilderWidget;
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyEvent;
@@ -40,7 +41,6 @@
 import org.apache.directory.studio.ldapbrowser.core.model.impl.DummyEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.Value;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Subschema;
-import org.apache.directory.studio.ldapbrowser.core.utils.DnUtils;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIConstants;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIPlugin;
 import org.eclipse.jface.dialogs.MessageDialog;

Modified: directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryTypeWizardPage.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryTypeWizardPage.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryTypeWizardPage.java (original)
+++ directory/sandbox/felixk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryTypeWizardPage.java Mon Nov 26 11:44:28 2007
@@ -35,11 +35,11 @@
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.DummyConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.DummyEntry;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContentRecord;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.apache.directory.studio.ldapbrowser.core.utils.ModelConverter;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIConstants;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIPlugin;
+import org.apache.directory.studio.ldifparser.model.container.LdifContentRecord;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.wizard.IWizardPage;
 import org.eclipse.jface.wizard.WizardPage;

Modified: directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/LdifEntryEditorDialog.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/LdifEntryEditorDialog.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/LdifEntryEditorDialog.java (original)
+++ directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/LdifEntryEditorDialog.java Mon Nov 26 11:44:28 2007
@@ -32,13 +32,13 @@
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.DummyConnection;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifChangeAddRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContentRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifRecord;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
 import org.apache.directory.studio.ldapbrowser.core.utils.ModelConverter;
 import org.apache.directory.studio.ldifeditor.LdifEditorActivator;
 import org.apache.directory.studio.ldifeditor.LdifEditorConstants;
+import org.apache.directory.studio.ldifparser.model.container.LdifChangeAddRecord;
+import org.apache.directory.studio.ldifparser.model.container.LdifContentRecord;
+import org.apache.directory.studio.ldifparser.model.container.LdifRecord;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.swt.SWT;

Modified: directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/preferences/LdifEditorSyntaxColoringPreferencePage.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/preferences/LdifEditorSyntaxColoringPreferencePage.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/preferences/LdifEditorSyntaxColoringPreferencePage.java (original)
+++ directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/dialogs/preferences/LdifEditorSyntaxColoringPreferencePage.java Mon Nov 26 11:44:28 2007
@@ -24,11 +24,11 @@
 import org.apache.directory.studio.ldapbrowser.common.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifFile;
 import org.apache.directory.studio.ldifeditor.LdifEditorActivator;
 import org.apache.directory.studio.ldifeditor.LdifEditorConstants;
 import org.apache.directory.studio.ldifeditor.editor.ILdifEditor;
 import org.apache.directory.studio.ldifeditor.widgets.LdifEditorWidget;
+import org.apache.directory.studio.ldifparser.model.LdifFile;
 import org.eclipse.jface.preference.ColorSelector;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.preference.PreferenceConverter;

Modified: directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/ILdifEditor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/ILdifEditor.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/ILdifEditor.java (original)
+++ directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/ILdifEditor.java Mon Nov 26 11:44:28 2007
@@ -22,7 +22,7 @@
 
 
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifFile;
+import org.apache.directory.studio.ldifparser.model.LdifFile;
 
 import org.eclipse.core.runtime.IAdaptable;
 

Modified: directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifDocumentProvider.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifDocumentProvider.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifDocumentProvider.java (original)
+++ directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifDocumentProvider.java Mon Nov 26 11:44:28 2007
@@ -34,12 +34,12 @@
 import java.util.List;
 
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifFile;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContainer;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.parser.LdifParser;
 import org.apache.directory.studio.ldifeditor.LdifEditorActivator;
 import org.apache.directory.studio.ldifeditor.editor.text.LdifExternalAnnotationModel;
+import org.apache.directory.studio.ldifparser.model.LdifFile;
+import org.apache.directory.studio.ldifparser.model.container.LdifContainer;
+import org.apache.directory.studio.ldifparser.model.container.LdifRecord;
+import org.apache.directory.studio.ldifparser.parser.LdifParser;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;

Modified: directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifEditor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifEditor.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifEditor.java (original)
+++ directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifEditor.java Mon Nov 26 11:44:28 2007
@@ -37,7 +37,6 @@
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyListener;
 import org.apache.directory.studio.ldapbrowser.common.widgets.search.BrowserConnectionWidget;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifFile;
 import org.apache.directory.studio.ldifeditor.LdifEditorActivator;
 import org.apache.directory.studio.ldifeditor.LdifEditorConstants;
 import org.apache.directory.studio.ldifeditor.editor.actions.EditLdifAttributeAction;
@@ -48,6 +47,7 @@
 import org.apache.directory.studio.ldifeditor.editor.actions.OpenDefaultValueEditorAction;
 import org.apache.directory.studio.ldifeditor.editor.actions.OpenValueEditorAction;
 import org.apache.directory.studio.ldifeditor.editor.text.LdifPartitionScanner;
+import org.apache.directory.studio.ldifparser.model.LdifFile;
 import org.apache.directory.studio.valueeditors.AbstractDialogValueEditor;
 import org.apache.directory.studio.valueeditors.IValueEditor;
 import org.apache.directory.studio.valueeditors.ValueEditorManager;

Modified: directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifOutlinePage.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifOutlinePage.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifOutlinePage.java (original)
+++ directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifOutlinePage.java Mon Nov 26 11:44:28 2007
@@ -26,18 +26,18 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifFile;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifChangeAddRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifChangeDeleteRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifChangeModDnRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifChangeModifyRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContentRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifModSpec;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifAttrValLine;
 import org.apache.directory.studio.ldapbrowser.core.utils.Utils;
 import org.apache.directory.studio.ldifeditor.LdifEditorActivator;
 import org.apache.directory.studio.ldifeditor.LdifEditorConstants;
+import org.apache.directory.studio.ldifparser.model.LdifFile;
+import org.apache.directory.studio.ldifparser.model.container.LdifChangeAddRecord;
+import org.apache.directory.studio.ldifparser.model.container.LdifChangeDeleteRecord;
+import org.apache.directory.studio.ldifparser.model.container.LdifChangeModDnRecord;
+import org.apache.directory.studio.ldifparser.model.container.LdifChangeModifyRecord;
+import org.apache.directory.studio.ldifparser.model.container.LdifContentRecord;
+import org.apache.directory.studio.ldifparser.model.container.LdifModSpec;
+import org.apache.directory.studio.ldifparser.model.container.LdifRecord;
+import org.apache.directory.studio.ldifparser.model.lines.LdifAttrValLine;
 import org.eclipse.jface.viewers.DoubleClickEvent;
 import org.eclipse.jface.viewers.IDoubleClickListener;
 import org.eclipse.jface.viewers.ISelectionChangedListener;

Modified: directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/AbstractLdifAction.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/AbstractLdifAction.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/AbstractLdifAction.java (original)
+++ directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/AbstractLdifAction.java Mon Nov 26 11:44:28 2007
@@ -21,11 +21,11 @@
 package org.apache.directory.studio.ldifeditor.editor.actions;
 
 
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifFile;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifPart;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContainer;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifModSpec;
 import org.apache.directory.studio.ldifeditor.editor.LdifEditor;
+import org.apache.directory.studio.ldifparser.model.LdifFile;
+import org.apache.directory.studio.ldifparser.model.LdifPart;
+import org.apache.directory.studio.ldifparser.model.container.LdifContainer;
+import org.apache.directory.studio.ldifparser.model.container.LdifModSpec;
 
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.text.source.ISourceViewer;

Modified: directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/AbstractOpenValueEditorAction.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/AbstractOpenValueEditorAction.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/AbstractOpenValueEditorAction.java (original)
+++ directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/AbstractOpenValueEditorAction.java Mon Nov 26 11:44:28 2007
@@ -24,24 +24,24 @@
 import javax.naming.InvalidNameException;
 
 import org.apache.directory.shared.ldap.name.LdapDN;
-
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.Attribute;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.DummyConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.DummyEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.Value;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifPart;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContainer;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifAttrValLine;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifControlLine;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifDeloldrdnLine;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifDnLine;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifNewrdnLine;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifNewsuperiorLine;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifValueLineBase;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
+import org.apache.directory.studio.ldapbrowser.core.utils.Utils;
 import org.apache.directory.studio.ldifeditor.editor.LdifEditor;
+import org.apache.directory.studio.ldifparser.model.LdifPart;
+import org.apache.directory.studio.ldifparser.model.container.LdifContainer;
+import org.apache.directory.studio.ldifparser.model.container.LdifRecord;
+import org.apache.directory.studio.ldifparser.model.lines.LdifAttrValLine;
+import org.apache.directory.studio.ldifparser.model.lines.LdifControlLine;
+import org.apache.directory.studio.ldifparser.model.lines.LdifDeloldrdnLine;
+import org.apache.directory.studio.ldifparser.model.lines.LdifDnLine;
+import org.apache.directory.studio.ldifparser.model.lines.LdifNewrdnLine;
+import org.apache.directory.studio.ldifparser.model.lines.LdifNewsuperiorLine;
+import org.apache.directory.studio.ldifparser.model.lines.LdifValueLineBase;
 import org.apache.directory.studio.valueeditors.AbstractDialogValueEditor;
 import org.apache.directory.studio.valueeditors.IValueEditor;
 import org.apache.directory.studio.valueeditors.ValueEditorManager;
@@ -121,7 +121,8 @@
 
                     try
                     {
-                        document.replace( line.getOffset(), line.getLength(), newLine.toFormattedString() );
+                        document.replace( line.getOffset(), line.getLength(), newLine.toFormattedString( Utils
+                            .getLdifFormatParameters() ) );
                     }
                     catch ( BadLocationException e )
                     {

Modified: directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/EditLdifAttributeAction.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/EditLdifAttributeAction.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/EditLdifAttributeAction.java (original)
+++ directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/EditLdifAttributeAction.java Mon Nov 26 11:44:28 2007
@@ -30,19 +30,20 @@
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.DummyConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.DummyEntry;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifPart;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifChangeAddRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifChangeModifyRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContainer;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContentRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifModSpec;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifAttrValLine;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifModSpecSepLine;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifModSpecTypeLine;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifValueLineBase;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
 import org.apache.directory.studio.ldapbrowser.core.utils.ModelConverter;
+import org.apache.directory.studio.ldapbrowser.core.utils.Utils;
 import org.apache.directory.studio.ldifeditor.editor.LdifEditor;
+import org.apache.directory.studio.ldifparser.model.LdifPart;
+import org.apache.directory.studio.ldifparser.model.container.LdifChangeAddRecord;
+import org.apache.directory.studio.ldifparser.model.container.LdifChangeModifyRecord;
+import org.apache.directory.studio.ldifparser.model.container.LdifContainer;
+import org.apache.directory.studio.ldifparser.model.container.LdifContentRecord;
+import org.apache.directory.studio.ldifparser.model.container.LdifModSpec;
+import org.apache.directory.studio.ldifparser.model.lines.LdifAttrValLine;
+import org.apache.directory.studio.ldifparser.model.lines.LdifModSpecSepLine;
+import org.apache.directory.studio.ldifparser.model.lines.LdifModSpecTypeLine;
+import org.apache.directory.studio.ldifparser.model.lines.LdifValueLineBase;
 import org.apache.directory.studio.valueeditors.ValueEditorManager;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.text.BadLocationException;
@@ -171,12 +172,12 @@
 
                             LdifModSpecSepLine newSepLine = LdifModSpecSepLine.create();
 
-                            String text = newTypeLine.toFormattedString();
+                            String text = newTypeLine.toFormattedString( Utils.getLdifFormatParameters() );
                             for ( int j = 0; j < newAttrValLines.length; j++ )
                             {
-                                text += newAttrValLines[j].toFormattedString();
+                                text += newAttrValLines[j].toFormattedString( Utils.getLdifFormatParameters() );
                             }
-                            text += newSepLine.toFormattedString();
+                            text += newSepLine.toFormattedString( Utils.getLdifFormatParameters() );
                             try
                             {
                                 document.replace( modSpec.getOffset(), modSpec.getLength(), text );
@@ -193,7 +194,8 @@
                             LdifAttrValLine newLine = LdifAttrValLine.create( newAttributeDescription, oldValue );
                             try
                             {
-                                document.replace( line.getOffset(), line.getLength(), newLine.toFormattedString() );
+                                document.replace( line.getOffset(), line.getLength(), newLine
+                                    .toFormattedString( Utils.getLdifFormatParameters() ) );
                             }
                             catch ( BadLocationException e )
                             {

Modified: directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/EditLdifRecordAction.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/EditLdifRecordAction.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/EditLdifRecordAction.java (original)
+++ directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/EditLdifRecordAction.java Mon Nov 26 11:44:28 2007
@@ -21,13 +21,14 @@
 package org.apache.directory.studio.ldifeditor.editor.actions;
 
 
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifChangeAddRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContainer;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContentRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifRecord;
+import org.apache.directory.studio.ldapbrowser.core.utils.Utils;
 import org.apache.directory.studio.ldifeditor.LdifEditorConstants;
 import org.apache.directory.studio.ldifeditor.dialogs.LdifEntryEditorDialog;
 import org.apache.directory.studio.ldifeditor.editor.LdifEditor;
+import org.apache.directory.studio.ldifparser.model.container.LdifChangeAddRecord;
+import org.apache.directory.studio.ldifparser.model.container.LdifContainer;
+import org.apache.directory.studio.ldifparser.model.container.LdifContentRecord;
+import org.apache.directory.studio.ldifparser.model.container.LdifRecord;
 import org.eclipse.jface.text.IDocument;
 
 
@@ -72,7 +73,7 @@
                 String old = document.get();
                 StringBuffer sb = new StringBuffer();
                 sb.append( old.substring( 0, container.getOffset() ) );
-                sb.append( record.toFormattedString() );
+                sb.append( record.toFormattedString( Utils.getLdifFormatParameters() ) );
                 sb.append( old.substring( container.getOffset() + container.getLength(), old.length() ) );
                 document.set( sb.toString() );
             }

Modified: directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/FormatLdifDocumentAction.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/FormatLdifDocumentAction.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/FormatLdifDocumentAction.java (original)
+++ directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/FormatLdifDocumentAction.java Mon Nov 26 11:44:28 2007
@@ -21,6 +21,7 @@
 package org.apache.directory.studio.ldifeditor.editor.actions;
 
 
+import org.apache.directory.studio.ldapbrowser.core.utils.Utils;
 import org.apache.directory.studio.ldifeditor.editor.LdifEditor;
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.source.ISourceViewer;
@@ -40,7 +41,7 @@
         IDocument document = editor.getDocumentProvider().getDocument( editor.getEditorInput() );
         ISourceViewer sourceViewer = ( ISourceViewer ) editor.getAdapter( ISourceViewer.class );
         int topIndex = sourceViewer.getTopIndex();
-        document.set( super.getLdifModel().toFormattedString() );
+        document.set( super.getLdifModel().toFormattedString( Utils.getLdifFormatParameters() ) );
         sourceViewer.setTopIndex( topIndex );
     }
 

Modified: directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/FormatLdifRecordAction.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/FormatLdifRecordAction.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/FormatLdifRecordAction.java (original)
+++ directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/FormatLdifRecordAction.java Mon Nov 26 11:44:28 2007
@@ -21,10 +21,10 @@
 package org.apache.directory.studio.ldifeditor.editor.actions;
 
 
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContainer;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifRecord;
+import org.apache.directory.studio.ldapbrowser.core.utils.Utils;
 import org.apache.directory.studio.ldifeditor.editor.LdifEditor;
-
+import org.apache.directory.studio.ldifparser.model.container.LdifContainer;
+import org.apache.directory.studio.ldifparser.model.container.LdifRecord;
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.source.ISourceViewer;
 
@@ -52,7 +52,7 @@
             for ( int i = 0; i < containers.length; i++ )
             {
                 LdifContainer container = containers[i];
-                sb.append( container.toFormattedString() );
+                sb.append( container.toFormattedString( Utils.getLdifFormatParameters() ) );
             }
 
             sb.append( old.substring( containers[containers.length - 1].getOffset()

Modified: directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/reconciler/LdifAnnotationUpdater.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/reconciler/LdifAnnotationUpdater.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/reconciler/LdifAnnotationUpdater.java (original)
+++ directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/reconciler/LdifAnnotationUpdater.java Mon Nov 26 11:44:28 2007
@@ -24,10 +24,10 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifFile;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifPart;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContainer;
 import org.apache.directory.studio.ldifeditor.editor.ILdifEditor;
+import org.apache.directory.studio.ldifparser.model.LdifFile;
+import org.apache.directory.studio.ldifparser.model.LdifPart;
+import org.apache.directory.studio.ldifparser.model.container.LdifContainer;
 
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.Position;

Modified: directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/reconciler/LdifFoldingRegionUpdater.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/reconciler/LdifFoldingRegionUpdater.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/reconciler/LdifFoldingRegionUpdater.java (original)
+++ directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/reconciler/LdifFoldingRegionUpdater.java Mon Nov 26 11:44:28 2007
@@ -27,15 +27,15 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifFile;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifPart;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifCommentContainer;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContainer;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifNonEmptyLineBase;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifSepLine;
 import org.apache.directory.studio.ldifeditor.LdifEditorActivator;
 import org.apache.directory.studio.ldifeditor.LdifEditorConstants;
 import org.apache.directory.studio.ldifeditor.editor.ILdifEditor;
+import org.apache.directory.studio.ldifparser.model.LdifFile;
+import org.apache.directory.studio.ldifparser.model.LdifPart;
+import org.apache.directory.studio.ldifparser.model.container.LdifCommentContainer;
+import org.apache.directory.studio.ldifparser.model.container.LdifContainer;
+import org.apache.directory.studio.ldifparser.model.lines.LdifNonEmptyLineBase;
+import org.apache.directory.studio.ldifparser.model.lines.LdifSepLine;
 
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.IDocument;

Modified: directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifAnnotationHover.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifAnnotationHover.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifAnnotationHover.java (original)
+++ directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifAnnotationHover.java Mon Nov 26 11:44:28 2007
@@ -21,10 +21,10 @@
 package org.apache.directory.studio.ldifeditor.editor.text;
 
 
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifFile;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifPart;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContainer;
 import org.apache.directory.studio.ldifeditor.editor.ILdifEditor;
+import org.apache.directory.studio.ldifparser.model.LdifFile;
+import org.apache.directory.studio.ldifparser.model.LdifPart;
+import org.apache.directory.studio.ldifparser.model.container.LdifContainer;
 
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.source.IAnnotationHover;

Modified: directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifAutoEditStrategy.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifAutoEditStrategy.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifAutoEditStrategy.java (original)
+++ directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifAutoEditStrategy.java Mon Nov 26 11:44:28 2007
@@ -21,16 +21,16 @@
 package org.apache.directory.studio.ldifeditor.editor.text;
 
 
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifFile;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifPart;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifChangeModifyRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContainer;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifModSpec;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifAttrValLine;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifModSpecTypeLine;
 import org.apache.directory.studio.ldifeditor.LdifEditorActivator;
 import org.apache.directory.studio.ldifeditor.LdifEditorConstants;
 import org.apache.directory.studio.ldifeditor.editor.ILdifEditor;
+import org.apache.directory.studio.ldifparser.model.LdifFile;
+import org.apache.directory.studio.ldifparser.model.LdifPart;
+import org.apache.directory.studio.ldifparser.model.container.LdifChangeModifyRecord;
+import org.apache.directory.studio.ldifparser.model.container.LdifContainer;
+import org.apache.directory.studio.ldifparser.model.container.LdifModSpec;
+import org.apache.directory.studio.ldifparser.model.lines.LdifAttrValLine;
+import org.apache.directory.studio.ldifparser.model.lines.LdifModSpecTypeLine;
 
 import org.eclipse.jface.text.DocumentCommand;
 import org.eclipse.jface.text.IAutoEditStrategy;

Modified: directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifCompletionProcessor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifCompletionProcessor.java?rev=598395&r1=598394&r2=598395&view=diff
==============================================================================
--- directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifCompletionProcessor.java (original)
+++ directory/sandbox/felixk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifCompletionProcessor.java Mon Nov 26 11:44:28 2007
@@ -26,25 +26,25 @@
 import java.util.List;
 
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifFile;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifInvalidPart;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifPart;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifChangeAddRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifChangeModDnRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifChangeModifyRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContainer;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContentRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifInvalidContainer;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifModSpec;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifRecord;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifSepContainer;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifAttrValLine;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifChangeTypeLine;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifSepLine;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
 import org.apache.directory.studio.ldifeditor.LdifEditorActivator;
 import org.apache.directory.studio.ldifeditor.LdifEditorConstants;
 import org.apache.directory.studio.ldifeditor.editor.ILdifEditor;
+import org.apache.directory.studio.ldifparser.model.LdifFile;
+import org.apache.directory.studio.ldifparser.model.LdifInvalidPart;
+import org.apache.directory.studio.ldifparser.model.LdifPart;
+import org.apache.directory.studio.ldifparser.model.container.LdifChangeAddRecord;
+import org.apache.directory.studio.ldifparser.model.container.LdifChangeModDnRecord;
+import org.apache.directory.studio.ldifparser.model.container.LdifChangeModifyRecord;
+import org.apache.directory.studio.ldifparser.model.container.LdifContainer;
+import org.apache.directory.studio.ldifparser.model.container.LdifContentRecord;
+import org.apache.directory.studio.ldifparser.model.container.LdifInvalidContainer;
+import org.apache.directory.studio.ldifparser.model.container.LdifModSpec;
+import org.apache.directory.studio.ldifparser.model.container.LdifRecord;
+import org.apache.directory.studio.ldifparser.model.container.LdifSepContainer;
+import org.apache.directory.studio.ldifparser.model.lines.LdifAttrValLine;
+import org.apache.directory.studio.ldifparser.model.lines.LdifChangeTypeLine;
+import org.apache.directory.studio.ldifparser.model.lines.LdifSepLine;
 
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.text.BadLocationException;



Mime
View raw message