Examples of LdifPart


Examples of org.apache.directory.ldapstudio.browser.core.model.ldif.LdifPart

        int offset = region.getOffset();

        LdifFile model = editor.getLdifModel();
        LdifContainer container = LdifFile.getContainer( model, offset );
        LdifContainer innerContainer = container != null ? LdifFile.getInnerContainer( container, offset ) : null;
        LdifPart part = container != null ? LdifFile.getContainerContent( container, offset ) : null;
        int documentLine = -1;
        int documentLineOffset = -1;
        String prefix = "";
        try
        {
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.core.model.ldif.LdifPart

    {

        LdifFile model = editor.getLdifModel();
        LdifContainer container = LdifFile.getContainer( model, c.offset );
        LdifContainer innerContainer = container != null ? LdifFile.getInnerContainer( container, c.offset ) : null;
        LdifPart part = container != null ? LdifFile.getContainerContent( container, c.offset ) : null;

        boolean smartInsertAttributeInModSpec = LdifEditorActivator.getDefault().getPreferenceStore().getBoolean(
            LdifEditorConstants.PREFERENCE_LDIFEDITOR_CONTENTASSIST_SMARTINSERTATTRIBUTEINMODSPEC );
        if ( smartInsertAttributeInModSpec )
        {
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifPart

        if ( !super.isAbstractValid() )
        {
            return false;
        }

        LdifPart lastPart = getLastPart();
        return this.getDnLine().isValid() && ( lastPart instanceof LdifSepLine || lastPart instanceof LdifEOFPart )
            && lastPart.isValid();
    }
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifPart

    }


    public final int getLength()
    {
        LdifPart lastPart = this.getLastPart();
        return lastPart.getOffset() + lastPart.getLength() - getOffset();
    }
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifPart

    public final void adjustOffset( int adjust )
    {
        for ( Iterator it = this.parts.iterator(); it.hasNext(); )
        {
            LdifPart part = ( LdifPart ) it.next();
            part.adjustOffset( adjust );
        }
    }
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifPart

                int offset = sourceViewer.getDocument().getLineOffset( lineNumber );
                LdifContainer container = LdifFile.getContainer( this.editor.getLdifModel(), offset );
                if ( container != null )
                {
                    LdifPart part = LdifFile.getContainerContent( container, offset );
                    if ( part != null )
                    {
                        // return container.getClass().getName() + " - " +
                        // part.getClass().getName();
                        return container.getInvalidString() + " - " + part.getInvalidString();
                    }
                }
            }
        }
        catch ( BadLocationException e )
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifPart

        {

            LdifContainer container = LdifFile.getContainer( this.editor.getLdifModel(), hoverRegion.getOffset() );
            if ( container != null )
            {
                LdifPart part = LdifFile.getContainerContent( container, hoverRegion.getOffset() );
                if ( part != null )
                {
                    if ( part instanceof LdifValueLineBase )
                    {
                        LdifValueLineBase line = ( LdifValueLineBase ) part;
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifPart

                StringBuffer errorText = null;

                LdifPart[] parts = container.getParts();
                for ( int k = 0; k < parts.length; k++ )
                {
                    LdifPart part = parts[k];
                    if ( !part.isValid() )
                    {
                        if ( errorOffset == -1 )
                        {
                            // errorPart = part;
                            errorOffset = part.getOffset();
                            errorLength = part.getLength();
                            errorText = new StringBuffer();
                            errorText.append( part.toRawString() );
                        }
                        else
                        {
                            errorLength += part.getLength();
                            errorText.append( part.toRawString() );
                        }
                    }
                }

                if ( errorOffset == -1 && !container.isValid() )
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifPart

            for ( int ii = 0; ii < values.length; ii++ )
            {
                IValue value = values[ii];
                if ( value.getRawValue() instanceof LdifPart )
                {
                    LdifPart part = ( LdifPart ) value.getRawValue();
                    if ( part instanceof LdifChangeTypeLine )
                    {
                        record.setChangeType( ( LdifChangeTypeLine ) part );
                    }
                    else if ( part instanceof LdifCommentLine )
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifPart

            for ( int ii = 0; ii < values.length; ii++ )
            {
                IValue value = values[ii];
                if ( value.getRawValue() instanceof LdifPart )
                {
                    LdifPart part = ( LdifPart ) value.getRawValue();
                    if ( part instanceof LdifCommentLine )
                    {
                        record.addComment( ( LdifCommentLine ) part );
                    }
                }
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.