Examples of toFormattedString()


Examples of org.apache.directory.studio.ldifparser.model.container.LdifContentRecord.toFormattedString()

                    for ( int i = 0; i < attrValLines.length; i++ )
                    {
                        newRecord.addAttrVal( attrValLines[i] );
                    }
                    newRecord.finish( sepLine );
                    String s = newRecord.toFormattedString( Utils.getLdifFormatParameters() );

                    // String s = record.toFormattedString();
                    bufferedWriter.write( s );

                    count++;
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.container.LdifContentRecord.toFormattedString()

                            record.addAttrVal( LdifAttrValLine.create( attributeName, ( byte[] ) o ) );
                        }
                    }
                }
                record.finish( LdifSepLine.create() );
                formattedString = record.toFormattedString( LdifFormatParameters.DEFAULT );
            }
            else
            {
                formattedString = LdifFormatParameters.DEFAULT.getLineSeparator();
            }
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.container.LdifRecord.toFormattedString()

                IDocument document = editor.getDocumentProvider().getDocument( editor.getEditorInput() );
                String old = document.get();
                StringBuffer sb = new StringBuffer();
                sb.append( old.substring( 0, container.getOffset() ) );
                sb.append( record.toFormattedString( Utils.getLdifFormatParameters() ) );
                sb.append( old.substring( container.getOffset() + container.getLength(), old.length() ) );
                document.set( sb.toString() );
            }
            editor.activateGlobalActionHandlers();
        }
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.container.LdifRecord.toFormattedString()

                IDocument document = editor.getDocumentProvider().getDocument( editor.getEditorInput() );
                String old = document.get();
                StringBuffer sb = new StringBuffer();
                sb.append( old.substring( 0, container.getOffset() ) );
                sb.append( record.toFormattedString( Utils.getLdifFormatParameters() ) );
                sb.append( old.substring( container.getOffset() + container.getLength(), old.length() ) );
                document.set( sb.toString() );
            }
            editor.activateGlobalActionHandlers();
        }
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.lines.LdifAttrValLine.toFormattedString()

                        { // LdifContentRecord ||
                            // LdifChangeAddRecord
                            LdifAttrValLine newLine = LdifAttrValLine.create( newAttributeDescription, oldValue );
                            try
                            {
                                document.replace( line.getOffset(), line.getLength(), newLine.toFormattedString( Utils
                                    .getLdifFormatParameters() ) );
                            }
                            catch ( BadLocationException e )
                            {
                                e.printStackTrace();
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.lines.LdifCommentLine.toFormattedString()

                .write( LdifCommentLine
                    .create(
                        "#!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 )
        {
            monitor.reportError( BrowserCoreMessages.model__error_logging_modification, ioe );
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.lines.LdifCommentLine.toFormattedString()

            {
                String errorComment = "#!ERROR " + ex.getMessage(); //$NON-NLS-1$
                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( LdifFormatParameters.DEFAULT ) );
            }

            logger.log( Level.ALL, text );
        }
    }
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.lines.LdifCommentLine.toFormattedString()

            {
                String errorComment = "#!ERROR " + ex.getMessage(); //$NON-NLS-1$
                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( LdifFormatParameters.DEFAULT ) );
            }

            logger.log( Level.ALL, text );
        }
    }
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.lines.LdifCommentLine.toFormattedString()

                .write( LdifCommentLine
                    .create(
                        "#!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 )
        {
            monitor.reportError( BrowserCoreMessages.model__error_logging_modification, ioe );
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.lines.LdifCommentLine.toFormattedString()

            {
                String errorComment = "#!ERROR " + ex.getMessage(); //$NON-NLS-1$
                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( LdifFormatParameters.DEFAULT ) );
            }

            logger.log( Level.ALL, text );
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.