Package org.eclipse.jface.viewers

Examples of org.eclipse.jface.viewers.ISelection



    private void prepareCurrentSelection()
    {

        ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService()
            .getSelection();
        ISearch[] searches = BrowserSelectionUtils.getSearches( selection );
        IEntry[] entries = BrowserSelectionUtils.getEntries( selection );
        ISearchResult[] searchResults = BrowserSelectionUtils.getSearchResults( selection );
        IBookmark[] bookmarks = BrowserSelectionUtils.getBookmarks( selection );
View Full Code Here


     *
     * @param obj the object to select
     */
    public void select( Object obj )
    {
        ISelection newSelection = new StructuredSelection( obj );
        ISelection oldSelection = this.viewer.getSelection();

        if ( !newSelection.equals( oldSelection ) )
        {
            inChange = true;
            this.viewer.setSelection( newSelection, true );
View Full Code Here

        this.createDetail( this.detailForm.getBody() );
        viewer.addSelectionChangedListener( new ISelectionChangedListener()
        {
            public void selectionChanged( SelectionChangedEvent event )
            {
                ISelection selection = event.getSelection();
                if ( selection.isEmpty() )
                {
                    detailsPage.setInput( null );
                }
                else
                {
View Full Code Here


    public void addPages()
    {

        ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService()
            .getSelection();
        Connection[] connections = BrowserSelectionUtils.getConnections( selection );
        ISearch[] searches = BrowserSelectionUtils.getSearches( selection );
        IEntry[] entries = BrowserSelectionUtils.getEntries( selection );
        ISearchResult[] searchResults = BrowserSelectionUtils.getSearchResults( selection );
View Full Code Here

     */
    public void selectionChanged( SelectionChangedEvent event )
    {
        if ( !isDisposed() )
        {
            ISelection selection = event.getSelection();
            action.setSelectedConnections( SelectionUtils.getConnections( selection ) );
            action.setSelectedConnectionFolders( SelectionUtils.getConnectionFolders( selection ) );
            updateAction();
        }
    }
View Full Code Here

     */
    public void workingCopyModified( Object source )
    {
        if ( mainWidget != null && !mainWidget.getViewer().isCellEditorActive() )
        {
            ISelection selection = mainWidget.getViewer().getSelection();
            mainWidget.getViewer().refresh();
            mainWidget.getViewer().setSelection( selection );
        }

        if ( !isAutoSave() )
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 );
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public boolean isVisible()
    {
        ISelection selection = selectionProvider.getSelection();

        IBookmark[] selectedBookMarks = BrowserSelectionUtils.getBookmarks( selection );
        IEntry[] selectedEntries = BrowserSelectionUtils.getEntries( selection );
        ISearchResult[] selectedSearchResults = BrowserSelectionUtils.getSearchResults( selection );

View Full Code Here

        {
            return new IShowInSource()
            {
                public ShowInContext getShowInContext()
                {
                    ISelection selection = getConfiguration().getCursor( getMainWidget().getViewer() ).getSelection();
                    return new ShowInContext( getMainWidget().getViewer().getInput(), selection );
                }
            };
        }
View Full Code Here

        // Listeners
        table.addFocusListener(new FocusAdapter() {
            @Override
            public void focusGained(FocusEvent e) {
                ISelection selection = viewer.getSelection();
                if (!selection.isEmpty())
                    managedForm.fireSelectionChanged(PkgPatternsListPart.this, selection);
            }
        });
        viewer.addSelectionChangedListener(new ISelectionChangedListener() {
            @Override
View Full Code Here

TOP

Related Classes of org.eclipse.jface.viewers.ISelection

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.