directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r596116 - in /directory/studio/trunk: ./ studio-jars/META-INF/ studio-ldapbrowser-common/ studio-ldapbrowser-common/META-INF/ studio-ldapbrowser-core/ studio-ldapbrowser-core/META-INF/ studio-ldapbrowser-core/src/main/java/org/apache/direct...
Date Sun, 18 Nov 2007 19:22:36 GMT
Author: seelmann
Date: Sun Nov 18 11:22:33 2007
New Revision: 596116

URL: http://svn.apache.org/viewvc?rev=596116&view=rev
Log:
Moved LDIF parser sources from studio-ldapbrowser-core to studio-ldif-parser.

Removed:
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ldif/LdifEOFPart.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ldif/LdifEnumeration.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ldif/LdifFile.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ldif/LdifInvalidPart.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ldif/LdifPart.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ldif/container/
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ldif/lines/
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ldif/parser/
Modified:
    directory/studio/trunk/build.xml
    directory/studio/trunk/studio-jars/META-INF/MANIFEST.MF
    directory/studio/trunk/studio-ldapbrowser-common/META-INF/MANIFEST.MF
    directory/studio/trunk/studio-ldapbrowser-common/build.xml
    directory/studio/trunk/studio-ldapbrowser-core/META-INF/MANIFEST.MF
    directory/studio/trunk/studio-ldapbrowser-core/build.xml
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportCsvJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportLdifJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportXlsJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemasJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/ModificationLogger.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/LdifUtils.java
    directory/studio/trunk/studio-ldapbrowser-ui/META-INF/MANIFEST.MF
    directory/studio/trunk/studio-ldapbrowser-ui/build.xml
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsLdifAction.java
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyValueAction.java
    directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationWizard.java
    directory/studio/trunk/studio-ldifeditor/META-INF/MANIFEST.MF
    directory/studio/trunk/studio-ldifeditor/build.xml
    directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/AbstractOpenValueEditorAction.java
    directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/EditLdifAttributeAction.java
    directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/EditLdifRecordAction.java
    directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/FormatLdifDocumentAction.java
    directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/FormatLdifRecordAction.java

Modified: directory/studio/trunk/build.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/build.xml?rev=596116&r1=596115&r2=596116&view=diff
==============================================================================
--- directory/studio/trunk/build.xml (original)
+++ directory/studio/trunk/build.xml Sun Nov 18 11:22:33 2007
@@ -217,7 +217,7 @@
             </fileset>
         </copy>
 
-	    <!-- Creation of the Jars Plugin -->
+        <!-- Creation of the Jars Plugin -->
         <ant dir="studio-jars" inheritAll="no" />
         <!-- Copy of the Jars Plugin in the "plugins" folder of the RCP app -->
         <copy todir="${application.plugins}">
@@ -226,6 +226,15 @@
             </fileset>
         </copy>
 
+        <!-- Creation of the LDIF Parser Plugin -->
+        <ant dir="studio-ldif-parser" inheritAll="no" />
+        <!-- Copy of the LDIF Parser Plugin in the "plugins" folder of the RCP app -->
+        <copy todir="${application.plugins}">
+            <fileset dir="studio-ldif-parser/target">
+                <include name="*.jar" />
+            </fileset>
+        </copy>
+
         <!-- Creation of the Apache DS Configuration Plugin -->
         <ant dir="studio-apacheds-configuration" inheritAll="no" />
         <!-- Copy of the Jars Plugin in the "plugins" folder of the RCP app -->
@@ -434,6 +443,7 @@
         <ant dir="studio-connection-core" inheritAll="no" target="retrieve-dependencies" />
         <ant dir="studio-connection-ui" inheritAll="no" target="retrieve-dependencies" />
         <ant dir="studio-dsml-parser" inheritAll="no" target="retrieve-dependencies" />
+        <ant dir="studio-ldif-parser" inheritAll="no" target="retrieve-dependencies" />
         <ant dir="studio-jars" inheritAll="no" target="retrieve-dependencies" />
         <ant dir="studio-ldapbrowser-common" inheritAll="no" target="retrieve-dependencies" />
         <ant dir="studio-ldapbrowser-core" inheritAll="no" target="retrieve-dependencies" />
@@ -462,6 +472,7 @@
         <ant dir="studio-connection-core" inheritAll="no" target="clean" />
         <ant dir="studio-connection-ui" inheritAll="no" target="clean" />
         <ant dir="studio-dsml-parser" inheritAll="no" target="clean" />
+        <ant dir="studio-ldif-parser" inheritAll="no" target="clean" />
         <ant dir="studio-jars" inheritAll="no" target="clean" />
         <ant dir="studio-ldapbrowser-common" inheritAll="no" target="clean" />
         <ant dir="studio-ldapbrowser-core" inheritAll="no" target="clean" />

Modified: directory/studio/trunk/studio-jars/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-jars/META-INF/MANIFEST.MF?rev=596116&r1=596115&r2=596116&view=diff
==============================================================================
--- directory/studio/trunk/studio-jars/META-INF/MANIFEST.MF (original)
+++ directory/studio/trunk/studio-jars/META-INF/MANIFEST.MF Sun Nov 18 11:22:33 2007
@@ -28,8 +28,6 @@
  antlr.debug.misc,
  antlr.preprocessor,
  javax.xml.namespace,
- org,
- org.apache,
  org.apache.commons.collections,
  org.apache.commons.collections.bag,
  org.apache.commons.collections.bidimap,
@@ -42,8 +40,6 @@
  org.apache.commons.collections.list,
  org.apache.commons.collections.map,
  org.apache.commons.collections.set,
- org.apache.directory,
- org.apache.directory.shared,
  org.apache.directory.shared.asn1,
  org.apache.directory.shared.asn1.ber,
  org.apache.directory.shared.asn1.ber.grammar,

Modified: directory/studio/trunk/studio-ldapbrowser-common/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/META-INF/MANIFEST.MF?rev=596116&r1=596115&r2=596116&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/META-INF/MANIFEST.MF (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/META-INF/MANIFEST.MF Sun Nov 18 11:22:33 2007
@@ -12,6 +12,7 @@
  org.eclipse.ui.workbench.texteditor,
  org.eclipse.ui.editors,
  org.apache.directory.studio.jars,
+ org.apache.directory.studio.ldifparser,
  org.apache.directory.studio.connection.core,
  org.apache.directory.studio.connection.ui,
  org.apache.directory.studio.ldapbrowser.core

Modified: directory/studio/trunk/studio-ldapbrowser-common/build.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/build.xml?rev=596116&r1=596115&r2=596116&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/build.xml (original)
+++ directory/studio/trunk/studio-ldapbrowser-common/build.xml Sun Nov 18 11:22:33 2007
@@ -31,6 +31,7 @@
 		<ant dir="../studio-connection-core" target="compile" inheritall="false" />
 		<ant dir="../studio-connection-ui" target="compile" inheritall="false" />
 		<ant dir="../studio-ldapbrowser-core" target="compile" inheritall="false" />
+		<ant dir="../studio-ldif-parser" target="compile" inheritall="false" />
 	</target>
 	
 	
@@ -49,6 +50,7 @@
 			<pathelement location="../studio-connection-core/target/classes"/>
 			<pathelement location="../studio-connection-ui/target/classes"/>
 			<pathelement location="../studio-ldapbrowser-core/target/classes"/>
+			<pathelement location="../studio-ldif-parser/target/classes"/>
 		</path>
 	</target>
 	

Modified: directory/studio/trunk/studio-ldapbrowser-core/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/META-INF/MANIFEST.MF?rev=596116&r1=596115&r2=596116&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/META-INF/MANIFEST.MF (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/META-INF/MANIFEST.MF Sun Nov 18 11:22:33 2007
@@ -9,6 +9,7 @@
 Require-Bundle: org.eclipse.core.runtime,
  org.eclipse.search,
  org.apache.directory.studio.jars,
+ org.apache.directory.studio.ldifparser,
  org.apache.directory.studio.connection.core
 Eclipse-LazyStart: true
 Export-Package: org.apache.directory.studio.ldapbrowser.core,
@@ -19,10 +20,6 @@
  org.apache.directory.studio.ldapbrowser.core.model.filter,
  org.apache.directory.studio.ldapbrowser.core.model.filter.parser,
  org.apache.directory.studio.ldapbrowser.core.model.impl,
- org.apache.directory.studio.ldapbrowser.core.model.ldif,
- org.apache.directory.studio.ldapbrowser.core.model.ldif.container,
- org.apache.directory.studio.ldapbrowser.core.model.ldif.lines,
- org.apache.directory.studio.ldapbrowser.core.model.ldif.parser,
  org.apache.directory.studio.ldapbrowser.core.model.schema,
  org.apache.directory.studio.ldapbrowser.core.model.schema.parser,
  org.apache.directory.studio.ldapbrowser.core.propertypageproviders,

Modified: directory/studio/trunk/studio-ldapbrowser-core/build.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/build.xml?rev=596116&r1=596115&r2=596116&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/build.xml (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/build.xml Sun Nov 18 11:22:33 2007
@@ -29,6 +29,7 @@
         <!-- COMPILE-DEPENDENCIES TASK -->
         <target name="compile-dependencies" description="Compiles the dependencies of the project" >
                 <ant dir="../studio-connection-core" target="compile" inheritall="false" />
+                <ant dir="../studio-ldif-parser" target="compile" inheritall="false" />
         </target>
 	
 	
@@ -45,6 +46,7 @@
 			<!-- Plugin dependencies -->
 			<fileset dir="../studio-jars/lib/" />
 			<pathelement location="../studio-connection-core/target/classes"/>
+			<pathelement location="../studio-ldif-parser/target/classes"/>
 		</path>
 	</target>
 	

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesJob.java?rev=596116&r1=596115&r2=596116&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesJob.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesJob.java Sun Nov 18 11:22:33 2007
@@ -179,6 +179,7 @@
      */
     private int copyEntryRecursive( IEntry entryToCopy, IEntry parent, SearchScope scope, int num, StudioProgressMonitor monitor )
     {
+        // TODO: use paged search
         try
         {
             // TODO: use JNDI here!!!

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportCsvJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportCsvJob.java?rev=596116&r1=596115&r2=596116&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportCsvJob.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportCsvJob.java Sun Nov 18 11:22:33 2007
@@ -35,11 +35,11 @@
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
+import org.apache.directory.studio.ldapbrowser.core.jobs.ExportLdifJob.JndiLdifEnumeration;
 import org.apache.directory.studio.ldapbrowser.core.model.AttributeDescription;
 import org.apache.directory.studio.ldapbrowser.core.model.ConnectionException;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.SearchParameter;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifEnumeration;
 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.lines.LdifAttrValLine;
@@ -195,10 +195,10 @@
     {
         try
         {
-            LdifEnumeration enumeration = ExportLdifJob.search( browserConnection, searchParameter, monitor );
-            while ( !monitor.isCanceled() && enumeration.hasNext( monitor ) )
+            JndiLdifEnumeration enumeration = ExportLdifJob.search( browserConnection, searchParameter, monitor );
+            while ( !monitor.isCanceled() && enumeration.hasNext() )
             {
-                LdifContainer container = enumeration.next( monitor );
+                LdifContainer container = enumeration.next();
 
                 if ( container instanceof LdifContentRecord )
                 {

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportLdifJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportLdifJob.java?rev=596116&r1=596115&r2=596116&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportLdifJob.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportLdifJob.java Sun Nov 18 11:22:33 2007
@@ -49,6 +49,7 @@
 import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifSepLine;
 import org.apache.directory.studio.ldapbrowser.core.utils.AttributeComparator;
 import org.apache.directory.studio.ldapbrowser.core.utils.JNDIUtils;
+import org.apache.directory.studio.ldapbrowser.core.utils.LdifUtils;
 
 
 /**
@@ -146,11 +147,11 @@
         try
         {
             AttributeComparator comparator = new AttributeComparator( browserConnection );
-            LdifEnumeration enumeration = search( browserConnection, searchParameter, monitor );
+            JndiLdifEnumeration enumeration = search( browserConnection, searchParameter, monitor );
             
-            while ( !monitor.isCanceled() && enumeration.hasNext( monitor ) )
+            while ( !monitor.isCanceled() && enumeration.hasNext() )
             {
-                LdifContainer container = enumeration.next( monitor );
+                LdifContainer container = enumeration.next();
 
                 if ( container instanceof LdifContentRecord )
                 {
@@ -167,7 +168,7 @@
                         newRecord.addAttrVal( attrValLines[i] );
                     }
                     newRecord.finish( sepLine );
-                    String s = newRecord.toFormattedString();
+                    String s = newRecord.toFormattedString( LdifUtils.getLdifFormatParameters() );
 
                     // String s = record.toFormattedString();
                     bufferedWriter.write( s );
@@ -201,7 +202,7 @@
     }
 
     
-    static LdifEnumeration search( IBrowserConnection browserConnection, SearchParameter parameter, StudioProgressMonitor monitor )
+    static JndiLdifEnumeration search( IBrowserConnection browserConnection, SearchParameter parameter, StudioProgressMonitor monitor )
         throws ConnectionException
     {
         NamingEnumeration<SearchResult> result = SearchJob.search( browserConnection, parameter, monitor );
@@ -228,7 +229,7 @@
         }
 
 
-        public boolean hasNext( StudioProgressMonitor monitor ) throws ConnectionException
+        public boolean hasNext() throws ConnectionException
         {
             try
             {
@@ -241,7 +242,7 @@
         }
 
 
-        public LdifContainer next( StudioProgressMonitor monitor ) throws ConnectionException
+        public LdifContainer next() throws ConnectionException
         {
             try
             {

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportXlsJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportXlsJob.java?rev=596116&r1=596115&r2=596116&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportXlsJob.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportXlsJob.java Sun Nov 18 11:22:33 2007
@@ -32,10 +32,10 @@
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
+import org.apache.directory.studio.ldapbrowser.core.jobs.ExportLdifJob.JndiLdifEnumeration;
 import org.apache.directory.studio.ldapbrowser.core.model.ConnectionException;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.SearchParameter;
-import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifEnumeration;
 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.poi.hssf.usermodel.HSSFCell;
@@ -220,10 +220,10 @@
     {
         try
         {
-            LdifEnumeration enumeration = ExportLdifJob.search( browserConnection, searchParameter, monitor );
-            while ( !monitor.isCanceled() && enumeration.hasNext( monitor ) )
+            JndiLdifEnumeration enumeration = ExportLdifJob.search( browserConnection, searchParameter, monitor );
+            while ( !monitor.isCanceled() && enumeration.hasNext() )
             {
-                LdifContainer container = enumeration.next( monitor );
+                LdifContainer container = enumeration.next();
 
                 if ( container instanceof LdifContentRecord )
                 {

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifJob.java?rev=596116&r1=596115&r2=596116&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifJob.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifJob.java Sun Nov 18 11:22:33 2007
@@ -57,6 +57,7 @@
 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.ldif.LdifEnumeration;
+import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifFormatParameters;
 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;
@@ -72,6 +73,7 @@
 import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifModSpecTypeLine;
 import org.apache.directory.studio.ldapbrowser.core.model.ldif.parser.LdifParser;
 import org.apache.directory.studio.ldapbrowser.core.utils.DnUtils;
+import org.apache.directory.studio.ldapbrowser.core.utils.LdifUtils;
 
 
 /**
@@ -235,9 +237,9 @@
         int errorCount = 0;
         try
         {
-            while ( !monitor.isCanceled() && enumeration.hasNext( monitor ) )
+            while ( !monitor.isCanceled() && enumeration.hasNext() )
             {
-                LdifContainer container = enumeration.next( monitor );
+                LdifContainer container = enumeration.next();
 
                 if ( container instanceof LdifRecord )
                 {
@@ -515,6 +517,7 @@
     {
         try
         {
+            LdifFormatParameters ldifFormatParameters = LdifUtils.getLdifFormatParameters();
             DateFormat df = new SimpleDateFormat( BrowserCoreConstants.DATEFORMAT );
 
             String errorComment = "#!ERROR " + exception.getMessage(); //$NON-NLS-1$
@@ -522,14 +525,16 @@
             errorComment = errorComment.replaceAll( "\n", " " ); //$NON-NLS-1$ //$NON-NLS-2$
             LdifCommentLine errorCommentLine = LdifCommentLine.create( errorComment );
 
-            logWriter.write( LdifCommentLine.create( "#!RESULT ERROR" ).toFormattedString() ); //$NON-NLS-1$
+            logWriter.write( LdifCommentLine.create( "#!RESULT ERROR" )
+                .toFormattedString( LdifFormatParameters.DEFAULT ) ); //$NON-NL LdifFormatParameters.DEFAULTS-1$
             logWriter
                 .write( LdifCommentLine
                     .create(
-                        "#!CONNECTION ldap://" + browserConnection.getConnection().getHost() + ":" + browserConnection.getConnection().getPort() ).toFormattedString() ); //$NON-NLS-1$ //$NON-NLS-2$
-            logWriter.write( LdifCommentLine.create( "#!DATE " + df.format( new Date() ) ).toFormattedString() ); //$NON-NLS-1$
-            logWriter.write( errorCommentLine.toFormattedString() );
-            logWriter.write( record.toFormattedString() );
+                        "#!CONNECTION ldap://" + browserConnection.getConnection().getHost() + ":" + browserConnection.getConnection().getPort() ).toFormattedString( LdifFormatParameters.DEFAULT ) ); //$NON-NLS-1$ //$NON-NLS-2$
+            logWriter.write( LdifCommentLine
+                .create( "#!DATE " + df.format( new Date() ) ).toFormattedString( LdifFormatParameters.DEFAULT ) ); //$NON-NLS-1$
+            logWriter.write( errorCommentLine.toFormattedString( LdifFormatParameters.DEFAULT ) );
+            logWriter.write( record.toFormattedString( ldifFormatParameters ) );
         }
         catch ( IOException ioe )
         {
@@ -551,14 +556,16 @@
     {
         try
         {
+            LdifFormatParameters ldifFormatParameters = LdifUtils.getLdifFormatParameters();
             DateFormat df = new SimpleDateFormat( BrowserCoreConstants.DATEFORMAT );
-            logWriter.write( LdifCommentLine.create( "#!RESULT OK" ).toFormattedString() ); //$NON-NLS-1$
+            logWriter.write( LdifCommentLine.create( "#!RESULT OK" ).toFormattedString( ldifFormatParameters ) ); //$NON-NLS-1$
             logWriter
                 .write( LdifCommentLine
                     .create(
-                        "#!CONNECTION ldap://" + browserConnection.getConnection().getHost() + ":" + browserConnection.getConnection().getPort() ).toFormattedString() ); //$NON-NLS-1$ //$NON-NLS-2$
-            logWriter.write( LdifCommentLine.create( "#!DATE " + df.format( new Date() ) ).toFormattedString() ); //$NON-NLS-1$
-            logWriter.write( record.toFormattedString() );
+                        "#!CONNECTION ldap://" + browserConnection.getConnection().getHost() + ":" + browserConnection.getConnection().getPort() ).toFormattedString( ldifFormatParameters ) ); //$NON-NLS-1$ //$NON-NLS-2$
+            logWriter.write( LdifCommentLine
+                .create( "#!DATE " + df.format( new Date() ) ).toFormattedString( ldifFormatParameters ) ); //$NON-NLS-1$
+            logWriter.write( record.toFormattedString( ldifFormatParameters ) );
         }
         catch ( IOException ioe )
         {

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemasJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemasJob.java?rev=596116&r1=596115&r2=596116&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemasJob.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemasJob.java Sun Nov 18 11:22:33 2007
@@ -152,9 +152,9 @@
                         IAttribute.OPERATIONAL_ATTRIBUTE_MODIFY_TIMESTAMP, } );
                 
                 LdifEnumeration le = ExportLdifJob.search( browserConnection, sp, monitor );
-                if ( le.hasNext( monitor ) )
+                if ( le.hasNext() )
                 {
-                    LdifContentRecord schemaRecord = ( LdifContentRecord ) le.next( monitor );
+                    LdifContentRecord schemaRecord = ( LdifContentRecord ) le.next();
                     Schema schema = new Schema();
                     schema.loadFromRecord( schemaRecord );
                     browserConnection.setSchema( schema );

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/ModificationLogger.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/ModificationLogger.java?rev=596116&r1=596115&r2=596116&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/ModificationLogger.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/ModificationLogger.java Sun Nov 18 11:22:33 2007
@@ -48,6 +48,7 @@
 import org.apache.directory.studio.connection.core.IModificationLogger;
 import org.apache.directory.studio.ldapbrowser.core.BrowserConnectionManager;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
+import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifFormatParameters;
 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;
@@ -84,7 +85,7 @@
 
     /** The logger. */
     private Logger logger;
-
+    
 
     /**
      * Creates a new instance of ModificationLogger.
@@ -169,11 +170,13 @@
 
             if ( ex != null )
             {
-                logger.log( Level.ALL, LdifCommentLine.create( "#!RESULT ERROR" ).toFormattedString() ); //$NON-NLS-1$
+                logger.log( Level.ALL, LdifCommentLine
+                    .create( "#!RESULT ERROR" ).toFormattedString( LdifFormatParameters.DEFAULT ) ); //$NON-NLS-1$
             }
             else
             {
-                logger.log( Level.ALL, LdifCommentLine.create( "#!RESULT OK" ).toFormattedString() ); //$NON-NLS-1$
+                logger.log( Level.ALL, LdifCommentLine
+                    .create( "#!RESULT OK" ).toFormattedString( LdifFormatParameters.DEFAULT ) ); //$NON-NLS-1$
             }
 
             logger
@@ -181,8 +184,9 @@
                     Level.ALL,
                     LdifCommentLine
                         .create(
-                            "#!CONNECTION ldap://" + browserConnection.getConnection().getHost() + ":" + browserConnection.getConnection().getPort() ).toFormattedString() ); //$NON-NLS-1$ //$NON-NLS-2$
-            logger.log( Level.ALL, LdifCommentLine.create( "#!DATE " + df.format( new Date() ) ).toFormattedString() ); //$NON-NLS-1$
+                            "#!CONNECTION ldap://" + browserConnection.getConnection().getHost() + ":" + browserConnection.getConnection().getPort() ).toFormattedString( LdifFormatParameters.DEFAULT ) ); //$NON-NLS-1$ //$NON-NLS-2$
+            logger.log( Level.ALL, LdifCommentLine
+                .create( "#!DATE " + df.format( new Date() ) ).toFormattedString( LdifFormatParameters.DEFAULT ) ); //$NON-NLS-1$
 
             if ( ex != null )
             {
@@ -190,7 +194,7 @@
                 errorComment = errorComment.replaceAll( "\r", " " ); //$NON-NLS-1$ //$NON-NLS-2$
                 errorComment = errorComment.replaceAll( "\n", " " ); //$NON-NLS-1$ //$NON-NLS-2$
                 LdifCommentLine errorCommentLine = LdifCommentLine.create( errorComment );
-                logger.log( Level.ALL, errorCommentLine.toFormattedString() );
+                logger.log( Level.ALL, errorCommentLine.toFormattedString( LdifFormatParameters.DEFAULT ) );
             }
 
             logger.log( Level.ALL, text );
@@ -229,7 +233,7 @@
             }
             record.finish( LdifSepLine.create() );
 
-            String formattedString = record.toFormattedString();
+            String formattedString = record.toFormattedString( LdifFormatParameters.DEFAULT );
             log( formattedString, ex );
         }
         catch ( NamingException e )
@@ -247,7 +251,7 @@
         //record.addControl( controlLine );
         record.finish( LdifSepLine.create() );
 
-        String formattedString = record.toFormattedString();
+        String formattedString = record.toFormattedString( LdifFormatParameters.DEFAULT );
         log( formattedString, ex );
     }
 
@@ -300,7 +304,7 @@
             }
             record.finish( LdifSepLine.create() );
 
-            String formattedString = record.toFormattedString();
+            String formattedString = record.toFormattedString( LdifFormatParameters.DEFAULT );
             log( formattedString, ex );
         }
         catch ( NamingException e )
@@ -328,7 +332,7 @@
             record.setNewsuperior( LdifNewsuperiorLine.create( newsuperior.getUpName() ) );
             record.finish( LdifSepLine.create() );
 
-            String formattedString = record.toFormattedString();
+            String formattedString = record.toFormattedString( LdifFormatParameters.DEFAULT );
             log( formattedString, ex );
         }
         catch ( InvalidNameException e )

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java?rev=596116&r1=596115&r2=596116&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java Sun Nov 18 11:22:33 2007
@@ -41,6 +41,7 @@
 import org.apache.directory.studio.ldapbrowser.core.model.AttributeDescription;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifEnumeration;
+import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifFormatParameters;
 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.lines.LdifAttrValLine;
@@ -152,9 +153,9 @@
         {
             LdifParser parser = new LdifParser();
             LdifEnumeration enumeration = parser.parse( reader );
-            if ( enumeration.hasNext( null ) )
+            if ( enumeration.hasNext() )
             {
-                LdifContainer container = enumeration.next( null );
+                LdifContainer container = enumeration.next();
                 if ( container instanceof LdifContentRecord )
                 {
                     LdifContentRecord schemaRecord = ( LdifContentRecord ) container;
@@ -191,7 +192,7 @@
     {
         try
         {
-            writer.write( this.getSchemaRecord().toFormattedString() );
+            writer.write( this.getSchemaRecord().toFormattedString( LdifFormatParameters.DEFAULT ) );
         }
         catch ( Exception e )
         {

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/LdifUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/LdifUtils.java?rev=596116&r1=596115&r2=596116&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/LdifUtils.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/LdifUtils.java Sun Nov 18 11:22:33 2007
@@ -27,7 +27,10 @@
 import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.codec.binary.Hex;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
+import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
 import org.apache.directory.studio.ldapbrowser.core.model.IValue;
+import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifFormatParameters;
+import org.eclipse.core.runtime.Preferences;
 
 
 /**
@@ -239,4 +242,15 @@
         return s;
     }
 
+    public static LdifFormatParameters getLdifFormatParameters()
+    {
+        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/studio/trunk/studio-ldapbrowser-ui/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/META-INF/MANIFEST.MF?rev=596116&r1=596115&r2=596116&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/META-INF/MANIFEST.MF (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/META-INF/MANIFEST.MF Sun Nov 18 11:22:33 2007
@@ -16,6 +16,7 @@
  org.eclipse.ui.forms,
  org.eclipse.jface.text,
  org.apache.directory.studio.jars,
+ org.apache.directory.studio.ldifparser,
  org.apache.directory.studio.connection.core,
  org.apache.directory.studio.connection.ui,
  org.apache.directory.studio.ldapbrowser.core,

Modified: directory/studio/trunk/studio-ldapbrowser-ui/build.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/build.xml?rev=596116&r1=596115&r2=596116&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/build.xml (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/build.xml Sun Nov 18 11:22:33 2007
@@ -32,6 +32,7 @@
 		<ant dir="../studio-connection-ui" target="compile" inheritall="false" />
 		<ant dir="../studio-ldapbrowser-core" target="compile" inheritall="false" />
 		<ant dir="../studio-ldapbrowser-common" target="compile" inheritall="false" />
+		<ant dir="../studio-ldif-parser" target="compile" inheritall="false" />
 		<ant dir="../studio-ldifeditor" target="compile" inheritall="false" />
 	</target>
 	
@@ -53,6 +54,7 @@
 			<pathelement location="../studio-ldapbrowser-core/target/classes"/>
 			<pathelement location="../studio-ldapbrowser-common/target/classes"/>
 			<pathelement location="../studio-ldifeditor/target/classes"/>
+			<pathelement location="../studio-ldif-parser/target/classes"/>
 		</path>
 	</target>
 	

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsLdifAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsLdifAction.java?rev=596116&r1=596115&r2=596116&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsLdifAction.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsLdifAction.java Sun Nov 18 11:22:33 2007
@@ -34,6 +34,7 @@
 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.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;
@@ -164,7 +165,7 @@
      */
     protected void serializeValue( IValue value, StringBuffer text )
     {
-        text.append( ModelConverter.valueToLdifAttrValLine( value ).toFormattedString() );
+        text.append( ModelConverter.valueToLdifAttrValLine( value ).toFormattedString( LdifUtils.getLdifFormatParameters() ) );
     }
 
 
@@ -178,6 +179,6 @@
      */
     protected void serializeDn( LdapDN dn, StringBuffer text )
     {
-        text.append( ModelConverter.dnToLdifDnLine( dn ).toFormattedString() );
+        text.append( ModelConverter.dnToLdifDnLine( dn ).toFormattedString( LdifUtils.getLdifFormatParameters() ) );
     }
 }

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyValueAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyValueAction.java?rev=596116&r1=596115&r2=596116&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyValueAction.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyValueAction.java Sun Nov 18 11:22:33 2007
@@ -193,7 +193,7 @@
                 }
                 else if ( mode == MODE_LDIF )
                 {
-                    text.append( ModelConverter.valueToLdifAttrValLine( value ).toFormattedString() );
+                    text.append( ModelConverter.valueToLdifAttrValLine( value ).toFormattedString( LdifUtils.getLdifFormatParameters() ) );
                 }
 
             }
@@ -216,7 +216,7 @@
             }
             else if ( mode == MODE_LDIF )
             {
-                text.append( ModelConverter.dnToLdifDnLine( dn ).toFormattedString() );
+                text.append( ModelConverter.dnToLdifDnLine( dn ).toFormattedString( LdifUtils.getLdifFormatParameters() ) );
             }
         }
 

Modified: directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationWizard.java?rev=596116&r1=596115&r2=596116&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationWizard.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationWizard.java Sun Nov 18 11:22:33 2007
@@ -329,6 +329,25 @@
                     ldif.append( BrowserCoreConstants.LINE_SEPARATOR );
                 }
 
+                // TODO: remove
+                ldif = new StringBuffer();
+                for(int i=1; i<=1000; i++)
+                {
+                    ldif.append("dn:cn=test"+i+",ou=test,dc=example,dc=com");
+                    ldif.append( BrowserCoreConstants.LINE_SEPARATOR );
+                    ldif.append("objectClass:top");
+                    ldif.append( BrowserCoreConstants.LINE_SEPARATOR );
+                    ldif.append("objectClass:person");
+                    ldif.append( BrowserCoreConstants.LINE_SEPARATOR );
+                    ldif.append("cn:test"+i);
+                    ldif.append( BrowserCoreConstants.LINE_SEPARATOR );
+                    ldif.append("sn:test"+i);
+                    ldif.append( BrowserCoreConstants.LINE_SEPARATOR );
+                    ldif.append( BrowserCoreConstants.LINE_SEPARATOR );
+                }
+                
+                
+                
                 if ( finishPage.getExecutionMethod() == BatchOperationFinishWizardPage.EXECUTION_METHOD_LDIF )
                 {
 

Modified: directory/studio/trunk/studio-ldifeditor/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldifeditor/META-INF/MANIFEST.MF?rev=596116&r1=596115&r2=596116&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldifeditor/META-INF/MANIFEST.MF (original)
+++ directory/studio/trunk/studio-ldifeditor/META-INF/MANIFEST.MF Sun Nov 18 11:22:33 2007
@@ -16,6 +16,7 @@
  org.eclipse.ui.forms,
  org.eclipse.jface.text,
  org.apache.directory.studio.jars,
+ org.apache.directory.studio.ldifparser,
  org.apache.directory.studio.connection.core,
  org.apache.directory.studio.connection.ui,
  org.apache.directory.studio.ldapbrowser.core,

Modified: directory/studio/trunk/studio-ldifeditor/build.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldifeditor/build.xml?rev=596116&r1=596115&r2=596116&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldifeditor/build.xml (original)
+++ directory/studio/trunk/studio-ldifeditor/build.xml Sun Nov 18 11:22:33 2007
@@ -32,6 +32,7 @@
 		<ant dir="../studio-connection-ui" target="compile" inheritall="false" />
 		<ant dir="../studio-ldapbrowser-core" target="compile" inheritall="false" />
 		<ant dir="../studio-ldapbrowser-common" target="compile" inheritall="false" />
+		<ant dir="../studio-ldif-parser" target="compile" inheritall="false" />
 	</target>
 	
 	
@@ -51,6 +52,7 @@
 			<pathelement location="../studio-connection-ui/target/classes"/>
 			<pathelement location="../studio-ldapbrowser-core/target/classes"/>
 			<pathelement location="../studio-ldapbrowser-common/target/classes"/>
+			<pathelement location="../studio-ldif-parser/target/classes"/>
 		</path>
 	</target>
 	

Modified: directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/AbstractOpenValueEditorAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/AbstractOpenValueEditorAction.java?rev=596116&r1=596115&r2=596116&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/AbstractOpenValueEditorAction.java (original)
+++ directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/AbstractOpenValueEditorAction.java Sun Nov 18 11:22:33 2007
@@ -41,6 +41,7 @@
 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.LdifUtils;
 import org.apache.directory.studio.ldifeditor.editor.LdifEditor;
 import org.apache.directory.studio.valueeditors.AbstractDialogValueEditor;
 import org.apache.directory.studio.valueeditors.IValueEditor;
@@ -121,7 +122,8 @@
 
                     try
                     {
-                        document.replace( line.getOffset(), line.getLength(), newLine.toFormattedString() );
+                        document.replace( line.getOffset(), line.getLength(), newLine.toFormattedString( LdifUtils
+                            .getLdifFormatParameters() ) );
                     }
                     catch ( BadLocationException e )
                     {

Modified: directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/EditLdifAttributeAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/EditLdifAttributeAction.java?rev=596116&r1=596115&r2=596116&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/EditLdifAttributeAction.java (original)
+++ directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/EditLdifAttributeAction.java Sun Nov 18 11:22:33 2007
@@ -41,6 +41,7 @@
 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.LdifUtils;
 import org.apache.directory.studio.ldapbrowser.core.utils.ModelConverter;
 import org.apache.directory.studio.ldifeditor.editor.LdifEditor;
 import org.apache.directory.studio.valueeditors.ValueEditorManager;
@@ -171,12 +172,12 @@
 
                             LdifModSpecSepLine newSepLine = LdifModSpecSepLine.create();
 
-                            String text = newTypeLine.toFormattedString();
+                            String text = newTypeLine.toFormattedString( LdifUtils.getLdifFormatParameters() );
                             for ( int j = 0; j < newAttrValLines.length; j++ )
                             {
-                                text += newAttrValLines[j].toFormattedString();
+                                text += newAttrValLines[j].toFormattedString( LdifUtils.getLdifFormatParameters() );
                             }
-                            text += newSepLine.toFormattedString();
+                            text += newSepLine.toFormattedString( LdifUtils.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( LdifUtils.getLdifFormatParameters() ) );
                             }
                             catch ( BadLocationException e )
                             {

Modified: directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/EditLdifRecordAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/EditLdifRecordAction.java?rev=596116&r1=596115&r2=596116&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/EditLdifRecordAction.java (original)
+++ directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/EditLdifRecordAction.java Sun Nov 18 11:22:33 2007
@@ -25,6 +25,7 @@
 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.LdifUtils;
 import org.apache.directory.studio.ldifeditor.LdifEditorConstants;
 import org.apache.directory.studio.ldifeditor.dialogs.LdifEntryEditorDialog;
 import org.apache.directory.studio.ldifeditor.editor.LdifEditor;
@@ -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( LdifUtils.getLdifFormatParameters() ) );
                 sb.append( old.substring( container.getOffset() + container.getLength(), old.length() ) );
                 document.set( sb.toString() );
             }

Modified: directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/FormatLdifDocumentAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/FormatLdifDocumentAction.java?rev=596116&r1=596115&r2=596116&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/FormatLdifDocumentAction.java (original)
+++ directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/FormatLdifDocumentAction.java Sun Nov 18 11:22:33 2007
@@ -21,6 +21,7 @@
 package org.apache.directory.studio.ldifeditor.editor.actions;
 
 
+import org.apache.directory.studio.ldapbrowser.core.utils.LdifUtils;
 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( LdifUtils.getLdifFormatParameters() ) );
         sourceViewer.setTopIndex( topIndex );
     }
 

Modified: directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/FormatLdifRecordAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/FormatLdifRecordAction.java?rev=596116&r1=596115&r2=596116&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/FormatLdifRecordAction.java (original)
+++ directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/actions/FormatLdifRecordAction.java Sun Nov 18 11:22:33 2007
@@ -23,6 +23,7 @@
 
 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.LdifUtils;
 import org.apache.directory.studio.ldifeditor.editor.LdifEditor;
 
 import org.eclipse.jface.text.IDocument;
@@ -52,7 +53,7 @@
             for ( int i = 0; i < containers.length; i++ )
             {
                 LdifContainer container = containers[i];
-                sb.append( container.toFormattedString() );
+                sb.append( container.toFormattedString( LdifUtils.getLdifFormatParameters() ) );
             }
 
             sb.append( old.substring( containers[containers.length - 1].getOffset()



Mime
View raw message