Package org.apache.directory.studio.entryeditors

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


        {
            IEntry[] entries = BrowserSelectionUtils.getEntries( selection );
            ISearchResult[] searchResults = BrowserSelectionUtils.getSearchResults( selection );
            IBookmark[] bookmarks = BrowserSelectionUtils.getBookmarks( selection );
            ISearch[] searches = BrowserSelectionUtils.getSearches( selection );
            EntryEditorManager entryEditorManager = BrowserUIPlugin.getDefault().getEntryEditorManager();

            if ( entries.length + searchResults.length + bookmarks.length + searches.length == 1 )
            {
                if ( ( entries.length == 1 ) || ( searchResults.length == 1 ) || ( bookmarks.length == 1 ) )
                {
                    entryEditorManager.openEntryEditor( entries, searchResults, bookmarks );
                }
                else if ( searches.length == 1 )
                {
                    try
                    {
                        SearchResultEditorInput input = new SearchResultEditorInput( searches[0] );
                        view.getSite().getPage().openEditor( input, SearchResultEditor.getId(), false );
                    }
                    catch ( PartInitException e )
                    {
                    }
                }
            }
            // Checking if there's at least one entry editor open.
            // We need to blank it
            else if ( isOneOrMoreOpenSingleTabEntryEditors() )
            {
                entryEditorManager.openEntryEditor( new IEntry[0], new ISearchResult[0], new IBookmark[0] );
            }
        }
    }
View Full Code Here


    {
        try
        {
            String type = memento.getString( "TYPE" ); //$NON-NLS-1$
            String extensionId = memento.getString( "EXTENSION" ); //$NON-NLS-1$
            EntryEditorManager entryEditorManager = BrowserUIPlugin.getDefault().getEntryEditorManager();
            EntryEditorExtension entryEditorExtension = entryEditorManager.getEntryEditorExtension( extensionId );
            if ( "IEntry".equals( type ) ) //$NON-NLS-1$
            {
                IBrowserConnection connection = BrowserCorePlugin.getDefault().getConnectionManager()
                    .getBrowserConnectionById( memento.getString( "CONNECTION" ) ); //$NON-NLS-1$
                LdapDN dn = new LdapDN( memento.getString( "DN" ) ); //$NON-NLS-1$
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void run()
    {
        EntryEditorManager entryEditorManager = BrowserUIPlugin.getDefault().getEntryEditorManager();
        entryEditorManager.openEntryEditor( getSelectedEntries(), getSelectedSearchResults(), getSelectedBookmarks() );
    }
View Full Code Here

    {
        Action action = new Action( entryEditorExtension.getName(), entryEditorExtension.getIcon() )
        {
            public void run()
            {
                EntryEditorManager entryEditorManager = BrowserUIPlugin.getDefault().getEntryEditorManager();
                ISelection selection = selectionProvider.getSelection();
                IEntry[] selectedEntries = BrowserSelectionUtils.getEntries( selection );
                ISearchResult[] selectedSearchResults = BrowserSelectionUtils.getSearchResults( selection );
                IBookmark[] selectedBookMarks = BrowserSelectionUtils.getBookmarks( selection );
                entryEditorManager.openEntryEditor( entryEditorExtension, selectedEntries, selectedSearchResults,
                    selectedBookMarks );
            }
        };

        return action;
View Full Code Here

        {
            IEntry[] entries = BrowserSelectionUtils.getEntries( selection );
            ISearchResult[] searchResults = BrowserSelectionUtils.getSearchResults( selection );
            IBookmark[] bookmarks = BrowserSelectionUtils.getBookmarks( selection );
            ISearch[] searches = BrowserSelectionUtils.getSearches( selection );
            EntryEditorManager entryEditorManager = BrowserUIPlugin.getDefault().getEntryEditorManager();

            if ( entries.length + searchResults.length + bookmarks.length + searches.length == 1 )
            {
                if ( ( entries.length == 1 ) || ( searchResults.length == 1 ) || ( bookmarks.length == 1 ) )
                {
                    entryEditorManager.openEntryEditor( entries, searchResults, bookmarks );
                }
                else if ( searches.length == 1 )
                {
                    try
                    {
                        SearchResultEditorInput input = new SearchResultEditorInput( searches[0] );
                        view.getSite().getPage().openEditor( input, SearchResultEditor.getId(), false );
                    }
                    catch ( PartInitException e )
                    {
                    }
                }
            }
            // Checking if there's at least one entry editor open.
            // We need to blank it
            else if ( isOneOrMoreOpenSingleTabEntryEditors() )
            {
                entryEditorManager.openEntryEditor( new IEntry[0], new ISearchResult[0], new IBookmark[0] );
            }
        }
    }
View Full Code Here

    {
        super.start( context );

        if ( entryEditorManager == null )
        {
            entryEditorManager = new EntryEditorManager();
        }
    }
View Full Code Here

        {
            IEntry[] entries = BrowserSelectionUtils.getEntries( selection );
            ISearchResult[] searchResults = BrowserSelectionUtils.getSearchResults( selection );
            IBookmark[] bookmarks = BrowserSelectionUtils.getBookmarks( selection );
            ISearch[] searches = BrowserSelectionUtils.getSearches( selection );
            EntryEditorManager entryEditorManager = BrowserUIPlugin.getDefault().getEntryEditorManager();

            if ( entries.length + searchResults.length + bookmarks.length == 1 )
            {
                entryEditorManager.openEntryEditor( entries, searchResults, bookmarks );
                // atm it is not necessary to blank the search result editor, it blanks itself
            }
            else
            {
                // Checking if there's at least one entry editor open.
View Full Code Here

    {
        Action action = new Action( entryEditorExtension.getName(), entryEditorExtension.getIcon() )
        {
            public void run()
            {
                EntryEditorManager entryEditorManager = BrowserUIPlugin.getDefault().getEntryEditorManager();
                ISelection selection = selectionProvider.getSelection();
                IEntry[] selectedEntries = BrowserSelectionUtils.getEntries( selection );
                ISearchResult[] selectedSearchResults = BrowserSelectionUtils.getSearchResults( selection );
                IBookmark[] selectedBookMarks = BrowserSelectionUtils.getBookmarks( selection );
                entryEditorManager.openEntryEditor( entryEditorExtension, selectedEntries, selectedSearchResults,
                    selectedBookMarks );
            }
        };

        return action;
View Full Code Here

    {
        try
        {
            String type = memento.getString( "TYPE" ); //$NON-NLS-1$
            String extensionId = memento.getString( "EXTENSION" ); //$NON-NLS-1$
            EntryEditorManager entryEditorManager = BrowserUIPlugin.getDefault().getEntryEditorManager();
            EntryEditorExtension entryEditorExtension = entryEditorManager.getEntryEditorExtension( extensionId );
            if ( "IEntry".equals( type ) ) //$NON-NLS-1$
            {
                IBrowserConnection connection = BrowserCorePlugin.getDefault().getConnectionManager()
                    .getBrowserConnectionById( memento.getString( "CONNECTION" ) ); //$NON-NLS-1$
                Dn dn = new Dn( memento.getString( "Dn" ) ); //$NON-NLS-1$
View Full Code Here

        {
            IEntry[] entries = BrowserSelectionUtils.getEntries( selection );
            ISearchResult[] searchResults = BrowserSelectionUtils.getSearchResults( selection );
            IBookmark[] bookmarks = BrowserSelectionUtils.getBookmarks( selection );
            ISearch[] searches = BrowserSelectionUtils.getSearches( selection );
            EntryEditorManager entryEditorManager = BrowserUIPlugin.getDefault().getEntryEditorManager();

            if ( entries.length + searchResults.length + bookmarks.length == 1 )
            {
                entryEditorManager.openEntryEditor( entries, searchResults, bookmarks );
                // atm it is not necessary to blank the search result editor, it blanks itself
            }
            else
            {
                // Checking if there's at least one entry editor open.
View Full Code Here

TOP

Related Classes of org.apache.directory.studio.entryeditors.EntryEditorManager

Copyright © 2018 www.massapicom. 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.