Examples of EntryEditorInput


Examples of org.apache.directory.ldapstudio.browser.ui.editors.entry.EntryEditorInput

            {
                EntryEditor editor = ( EntryEditor ) part;
                IEditorInput input = editor.getEditorInput();
                if ( input != null && input instanceof EntryEditorInput )
                {
                    EntryEditorInput eei = ( EntryEditorInput ) input;
                    IEntry entry = eei.getResolvedEntry();
                    if ( entry != null )
                    {
                        objectToSelect = entry.getConnection();
                    }
                }
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.ui.editors.entry.EntryEditorInput

            {
                EntryEditor editor = ( EntryEditor ) part;
                IEditorInput input = editor.getEditorInput();
                if ( input != null && input instanceof EntryEditorInput )
                {
                    EntryEditorInput eei = ( EntryEditorInput ) input;
                    objectToSelect = eei.getInput();
                }
            }
            else if ( part instanceof SearchResultEditor )
            {
                SearchResultEditor editor = ( SearchResultEditor ) part;
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.ui.editors.entry.EntryEditorInput

            {
                if ( entries.length == 1 )
                {
                    try
                    {
                        EntryEditorInput input = new EntryEditorInput( entries[0] );
                        view.getSite().getPage().openEditor( input, EntryEditor.getId(), false );
                    }
                    catch ( PartInitException e )
                    {
                    }
                }
                else if ( searchResults.length == 1 )
                {
                    try
                    {
                        EntryEditorInput input = new EntryEditorInput( searchResults[0] );
                        view.getSite().getPage().openEditor( input, EntryEditor.getId(), false );
                    }
                    catch ( PartInitException e )
                    {
                    }
                }
                else if ( bookmarks.length == 1 )
                {
                    try
                    {
                        EntryEditorInput input = new EntryEditorInput( bookmarks[0] );
                        view.getSite().getPage().openEditor( input, EntryEditor.getId(), false );
                    }
                    catch ( PartInitException e )
                    {
                    }
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.ui.editors.entry.EntryEditorInput

            {
                if ( entries.length == 1 )
                {
                    try
                    {
                        EntryEditorInput input = new EntryEditorInput( entries[0] );
                        view.getSite().getPage().openEditor( input, EntryEditor.getId(), false );
                    }
                    catch ( PartInitException e )
                    {
                    }
                }
                else if ( searchResults.length == 1 )
                {
                    try
                    {
                        EntryEditorInput input = new EntryEditorInput( searchResults[0] );
                        view.getSite().getPage().openEditor( input, EntryEditor.getId(), false );
                    }
                    catch ( PartInitException e )
                    {
                    }
                }
                else if ( bookmarks.length == 1 )
                {
                    try
                    {
                        EntryEditorInput input = new EntryEditorInput( bookmarks[0] );
                        view.getSite().getPage().openEditor( input, EntryEditor.getId(), false );
                    }
                    catch ( PartInitException e )
                    {
                    }
View Full Code Here

Examples of org.apache.directory.studio.entryeditors.EntryEditorInput

            {
                IEditorPart editor = ( IEditorPart ) part;
                IEditorInput input = editor.getEditorInput();
                if ( input != null && input instanceof EntryEditorInput )
                {
                    EntryEditorInput eei = ( EntryEditorInput ) input;
                    IEntry entry = eei.getResolvedEntry();
                    if ( entry != null )
                    {
                        objectToSelect = entry.getBrowserConnection().getConnection();
                    }
                }
View Full Code Here

Examples of org.apache.directory.studio.entryeditors.EntryEditorInput

            {
                IEditorPart editor = ( IEditorPart ) part;
                IEditorInput input = editor.getEditorInput();
                if ( input != null && input instanceof EntryEditorInput )
                {
                    EntryEditorInput eei = ( EntryEditorInput ) input;
                    objectToSelect = eei.getInput();
                }
                else if ( input != null && input instanceof SearchResultEditorInput )
                {
                    SearchResultEditorInput srei = ( SearchResultEditorInput ) input;
                    objectToSelect = srei.getSearch();
View Full Code Here

Examples of org.apache.directory.studio.entryeditors.EntryEditorInput

                throw new CoreException( new Status( IStatus.ERROR, BrowserUIConstants.PLUGIN_ID, NLS.bind( Messages
                    .getString( "LdifEntryEditorDocumentProvider.InvalidLdif" ), cont.getInvalidString() ) ) ); //$NON-NLS-1$
            }
        }

        EntryEditorInput input = getEntryEditorInput( element );
        try
        {
            LdapDN newDN = new LdapDN( records[0].getDnLine().getValueAsString() );
            if ( !newDN.equals( input.getResolvedEntry().getDn() ) )
            {
                throw new CoreException( new Status( IStatus.ERROR, BrowserUIConstants.PLUGIN_ID, NLS.bind( Messages
                    .getString( "LdifEntryEditorDocumentProvider.ModDnNotSupported" ), records[0].getInvalidString() ) ) ); //$NON-NLS-1$
            }
        }
        catch ( InvalidNameException e )
        {
            throw new CoreException( new Status( IStatus.ERROR, BrowserUIConstants.PLUGIN_ID, Messages
                .getString( "LdifEntryEditorDocumentProvider.InvalidDN" ) ) ); //$NON-NLS-1$
        }

        IStatus status = input.saveSharedWorkingCopy( false, editor );
        if ( status != null && !status.isOK() )
        {
            BrowserUIPlugin.getDefault().getLog().log( status );
            throw new CoreException( status );
        }
View Full Code Here

Examples of org.apache.directory.studio.entryeditors.EntryEditorInput

    public IDocument getDocument( Object element )
    {
        if ( element instanceof EntryEditorInput )
        {
            EntryEditorInput input = ( EntryEditorInput ) element;
            if ( input.getExtension() == null )
            {
                // this is a performance optimization
                return null;
            }
        }
View Full Code Here

Examples of org.apache.directory.studio.entryeditors.EntryEditorInput

    private EntryEditorInput getEntryEditorInput( Object element ) throws CoreException
    {
        if ( element instanceof EntryEditorInput )
        {
            EntryEditorInput input = ( EntryEditorInput ) element;
            return input;
        }
        else
        {
            throw new CoreException( new Status( IStatus.ERROR, BrowserUIConstants.PLUGIN_ID,
View Full Code Here

Examples of org.apache.directory.studio.entryeditors.EntryEditorInput

    @Override
    public boolean isModifiable( Object element )
    {
        if ( element instanceof EntryEditorInput )
        {
            EntryEditorInput editorInput = ( EntryEditorInput ) element;
            IEntry entry = editorInput.getSharedWorkingCopy( editor );
            return ( entry != null );
        }

        return false;
    }
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.