Package org.eclipse.jface.viewers

Examples of org.eclipse.jface.viewers.StructuredSelection


      parent = DynamicDAO.save(parent);

      /* Auto-Reload added BookMark */
      for (IMark mark : parent.getMarks()) {
        if (mark.equals(bookmark)) {
          new ReloadTypesAction(new StructuredSelection(mark), fShell).run();
          break;
        }
      }
    }
  }
View Full Code Here


              fViewer.setExpandedState(element, true);
            }

            /* Restore Selection */
            if (fSelectedElements != null)
              fViewer.setSelection(new StructuredSelection(fSelectedElements), true);

            /* Clear Fields */
            fExpandedElements = null;
            fSelectedElements = null;
          }
View Full Code Here

              if (addedFolder.getParent() != null)
                addedFolders.add(addedFolder);
            }

            if (!addedFolders.isEmpty())
              fViewer.setSelection(new StructuredSelection(addedFolders), true);
          }
        });
      }
    };
View Full Code Here

  @Override
  public void run() {
    JobRunner.runInBackgroundThread(new Runnable() {
      public void run() {
        Set<IFolder> rootFolders = Controller.getDefault().getCacheService().getRootFolders();
        new ReloadTypesAction(new StructuredSelection(rootFolders.toArray()), fShell).run();
      }
    });
  }
View Full Code Here

      public void entitiesAdded(Set<FolderEvent> events) {
        for (FolderEvent folderEvent : events) {
          IFolder folder = folderEvent.getEntity();
          if (folder.getParent() == null) {
            fViewer.add(folder);
            fViewer.setSelection(new StructuredSelection(folder));
          }
        }
      }
    };
View Full Code Here

    /* Pre-Select the current visible Set */
    Set<IFolder> rootFolders = fCacheService.getRootFolders();
    for (IFolder rootFolder : rootFolders) {
      if (rootFolder.equals(fSelectedSet)) {
        fViewer.setSelection(new StructuredSelection(rootFolder));
        break;
      }
    }

    /* Separator */
 
View Full Code Here

    fViewer.refresh();

    /* Select and Focus the added Set */
    Table table = fViewer.getTable();
    Object lastItem = table.getItem(table.getItemCount() - 1).getData();
    fViewer.setSelection(new StructuredSelection(lastItem));
    table.setFocus();
  }
View Full Code Here

    else if (parentOfMinSelected.getItemCount() > 0)
      data = parentOfMinSelected.getItem(parentOfMinSelected.getItemCount() - 1).getData();

    /* Set selection if clean-up is not enabled */
    if (data != null && !fNewsTableControl.getInputPreferences().getBoolean(DefaultPreferences.DEL_READ_NEWS_STATE))
      setSelection(new StructuredSelection(data));
  }
View Full Code Here

     * @see org.eclipse.jface.dialogs.Dialog#okPressed()
     */
    @Override
    protected void okPressed() {
      Object[] checkedObjects = fViewer.getCheckedElements();
      IStructuredSelection selection = new StructuredSelection(checkedObjects);

      List<IFolderChild> entities = ModelUtils.getFoldersAndBookMarks(selection);
      List<IEntity> entitiesTmp = new ArrayList<IEntity>(entities);

      /* Normalize */
 
View Full Code Here

        public void treeCollapsed(TreeExpansionEvent event) {}
      });

      /* Select and Show Selection */
      if (fSelectedElement != null) {
        fViewer.setSelection(new StructuredSelection(fSelectedElement));
        fViewer.getTree().showSelection();
      }

      /* Select All / Deselect All */
      Composite buttonContainer = new Composite(composite, SWT.NONE);
View Full Code Here

TOP

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

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.