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

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

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui
Interface IActionFilter

All Known Subinterfaces:
IMarkerActionFilter, IProjectActionFilter, IResourceActionFilter

public interface IActionFilter

An adapter which performs action filtering.

Within the workbench a plugin may extend the actions which appear in the context menu for any object. The visibility of each action extension is controlled by action filtering. By default, the workbench will filter each action extension using the objectClass and optional nameFilter attributes defined in xml. If the action extension passes this test the action will be added to the context menu for the object.

In some situations the object class and name are not enough to describe the intended target action. In those situations an action extension may define one or more filter sub-elements. Each one of these elements describes one attribute of the action target using a name value pair. The attributes for an object are type specific and beyond the domain of the workbench itself, so the workbench will delegate filtering at this level to an IActionFilter. This is a filtering strategy which is provided by the selection itself and may perform type specific filtering.

The workbench will retrieve the filter from the selected object by testing to see if it implements IActionFilter. If that fails, the workbench will ask for a filter through through the IAdaptable mechanism. If a filter is found the workbench will pass each name value pair to the filter to determine if it matches the state of the selected object. If so, or there is no filter, the action will be added to the context menu for the object.

Clients that implement this filter mechanism are strongly encouraged to extend this interface to provide a list of attribute names and possible values that are considered public for other clients to reference.

See Also:
IAdaptable

Method Summary
 boolean testAttribute ( Object target, String name, String value)
          Returns whether the specific attribute matches the state of the target object.
 

Method Detail

testAttribute

boolean testAttribute(
Object target,
                      
String name,
                      
String value)
Returns whether the specific attribute matches the state of the target object.

Parameters:
target - the target object
name - the attribute name
value - the attribute value
Returns:
true if the attribute matches; false otherwise

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


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