Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse GEF
3.3

org.eclipse.gef.tools
Class ToolUtilities

java.lang.Object
  extended by
org.eclipse.gef.tools.ToolUtilities

public class ToolUtilities
extends java.lang.Object

Utilities for Tools.


Constructor Summary
ToolUtilities ()
           
 
Method Summary
static void filterEditPartsUnderstanding (java.util.List list, Request request)
          Filters the given list of EditParts so that the list only contains the EditParts that understand the given request (i.e. return true from EditPart.understandsRequest(Request) when passed the given request).
static  EditPart findCommonAncestor ( EditPart ll, EditPart rr)
          Returns the common parent editpart for given pair of EditParts.
static java.util.List getSelectionWithoutDependants ( EditPartViewer viewer)
          Returns a list containing the top level selected edit parts based on the viewer's selection.
static java.util.List getSelectionWithoutDependants (java.util.List selectedParts)
          Returns a list containing the top level selected edit parts based on the passed in list of selection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToolUtilities

public ToolUtilities()
Method Detail

getSelectionWithoutDependants

public static java.util.List getSelectionWithoutDependants(
EditPartViewer viewer)
Returns a list containing the top level selected edit parts based on the viewer's selection.

Parameters:
viewer - the viewer
Returns:
the selection excluding dependants

getSelectionWithoutDependants

public static java.util.List getSelectionWithoutDependants(java.util.List selectedParts)
Returns a list containing the top level selected edit parts based on the passed in list of selection.

Parameters:
selectedParts - the complete selection
Returns:
the selection excluding dependants

filterEditPartsUnderstanding

public static void filterEditPartsUnderstanding(java.util.List list,
                                                
Request request)
Filters the given list of EditParts so that the list only contains the EditParts that understand the given request (i.e. return true from EditPart.understandsRequest(Request) when passed the given request).

Parameters:
list - the list of edit parts to filter
request - the request

findCommonAncestor

public static 
EditPart findCommonAncestor(
EditPart ll,
                                          
EditPart rr)
Returns the common parent editpart for given pair of EditParts. If the two parts are identical, the result is that part. If the two parts do not have a common ancestor, some form of RuntimeException will be thrown.

Parameters:
ll - the first editpart
rr - the second editpart
Returns:
the editpart which is the common ancestor.
Since:
3.1

Eclipse GEF
3.3

Copyright (c) IBM Corp. and others 2000, 2007. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire