Eclipse Platform
Release 3.7

org.eclipse.help.base
Class AbstractHelpScope

java.lang.Object
  extended by org.eclipse.help.base.AbstractHelpScope

public abstract class AbstractHelpScope
extends Object

Represents a scope which can be used to specify which topics are shown in the table of contents and which entries will show in the index. The inScope() functions are used by the help system to determine which elements to show. Both the table of contents and index are trees and the help system reads these trees starting with the root and working down through the children.

Since:
3.5

Constructor Summary
AbstractHelpScope()
           
 
Method Summary
abstract  String getName(Locale locale)
          a single information center instance can display content in multiple locales.
 boolean hasInScopeChildren(IUAElement element)
          Convenience method to make it easier to write subclasses In the case of an IIndexSee element this method tests to see if the target is in scope.
abstract  boolean inScope(IIndexEntry entry)
          Determine whether an index entry is in scope
 boolean inScope(IIndexSee see)
          In the default implementation of this method an IndexSee element is in scope if it's target is in scope.
abstract  boolean inScope(IToc toc)
          Determine whether a table of contents is in scope
abstract  boolean inScope(ITopic topic)
          Determine whether a topic is in scope
 boolean isHierarchicalScope()
          The help system can build the trees faster if it knows that an out of scope element cannot have child elements which are in scope.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractHelpScope

public AbstractHelpScope()
Method Detail

inScope

public abstract boolean inScope(IToc toc)
Determine whether a table of contents is in scope


inScope

public abstract boolean inScope(ITopic topic)
Determine whether a topic is in scope


inScope

public abstract boolean inScope(IIndexEntry entry)
Determine whether an index entry is in scope


getName

public abstract String getName(Locale locale)
a single information center instance can display content in multiple locales. This function exists to provide a name for a specific locale.

Parameters:
locale - a string representing the locale used for the UI
Returns:
a name for this scope appropriate for the locale which will be used in the scope selection dialog. It is recommended that the name be no more than 20 characters long.

inScope

public boolean inScope(IIndexSee see)
In the default implementation of this method an IndexSee element is in scope if it's target is in scope. May be overridden to exclude more IndexSee elements from the scope

Parameters:
see -
Returns:
true if the target is in scope

isHierarchicalScope

public boolean isHierarchicalScope()
The help system can build the trees faster if it knows that an out of scope element cannot have child elements which are in scope. This is called a hierarchical scope. If an out of scope element can have in scope children this function should be overridden and the help system will perform a deeper search.


hasInScopeChildren

public final boolean hasInScopeChildren(IUAElement element)
Convenience method to make it easier to write subclasses In the case of an IIndexSee element this method tests to see if the target is in scope. For all other elements it tests all children and if this is not a hierarchical scope all descendants are tested.

Parameters:
element - An element which may have children
Returns:
true if at least one child is in scope

Eclipse Platform
Release 3.7

Guidelines for using Eclipse APIs.

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