Package org.eclipse.jface.viewers

Examples of org.eclipse.jface.viewers.TreeSelection.toArray()


    selectedBean = null;
    selectedFile = null;

    if (selection instanceof TreeSelection) {
      TreeSelection treeSelection = (TreeSelection) selection;
      Object[] objects = treeSelection.toArray();
      if (objects != null && objects.length == 1) {
        if (objects[0] instanceof IBean) {
          IBean bean = (IBean) objects[0];
          IResource resource = bean.getElementResource();
          if (resource instanceof IFile) {
View Full Code Here


  }

  public void selectionChanged(IAction action, ISelection selection) {
    if (selection instanceof TreeSelection) {
      TreeSelection treeSelection = (TreeSelection) selection;
      Object[] objects = treeSelection.toArray();
      if (objects != null && objects.length == 1) {
        if (objects[0] instanceof IFile) {
          selectedFile = (IFile) objects[0];
          return;
        }
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.