Class HelpActivitySupport

java.lang.Object
org.eclipse.help.ui.internal.HelpActivitySupport
All Implemented Interfaces:
org.eclipse.help.internal.base.IHelpActivitySupport

public class HelpActivitySupport extends Object implements org.eclipse.help.internal.base.IHelpActivitySupport
Wrapper for eclipse ui activity support
  • Constructor Details

    • HelpActivitySupport

      public HelpActivitySupport(IWorkbench workbench)
  • Method Details

    • isFilteringEnabled

      public boolean isFilteringEnabled()
      Specified by:
      isFilteringEnabled in interface org.eclipse.help.internal.base.IHelpActivitySupport
    • setFilteringEnabled

      public void setFilteringEnabled(boolean enabled)
      Specified by:
      setFilteringEnabled in interface org.eclipse.help.internal.base.IHelpActivitySupport
    • isUserCanToggleFiltering

      public boolean isUserCanToggleFiltering()
      Specified by:
      isUserCanToggleFiltering in interface org.eclipse.help.internal.base.IHelpActivitySupport
    • isEnabled

      public boolean isEnabled(String href)
      Description copied from interface: org.eclipse.help.internal.base.IHelpActivitySupport
      Checks if href matches an enabled activity. If it does not match any defined activites, it is assumed to be enabled. If Help role filtering is disabled, this method always returns true.
      Specified by:
      isEnabled in interface org.eclipse.help.internal.base.IHelpActivitySupport
    • isRoleEnabled

      public boolean isRoleEnabled(String href)
      Description copied from interface: org.eclipse.help.internal.base.IHelpActivitySupport
      Checks if href is matches an enabled activity. If it does not match any defined activites, it is assumed to be enabled.
      Specified by:
      isRoleEnabled in interface org.eclipse.help.internal.base.IHelpActivitySupport
      Parameters:
      href - the topic href
      Returns:
      true if role for this href is enabled, false otherwise.
    • isEnabledTopic

      public boolean isEnabledTopic(String href, String locale)
      Checks whether topic belongs to a TOC that mathes enabled activity. Enabled children TOCs are searched if linked by also enabled TOCs. Additionally topic may match description topic of a root TOC.
      Specified by:
      isEnabledTopic in interface org.eclipse.help.internal.base.IHelpActivitySupport
      Parameters:
      locale - locale for which TOCs are checked
      Returns:
      true if topic belongs to an enabled TOC
    • enableActivities

      public void enableActivities(String href)
      Description copied from interface: org.eclipse.help.internal.base.IHelpActivitySupport
      Enables activities with patterns matching the href
      Specified by:
      enableActivities in interface org.eclipse.help.internal.base.IHelpActivitySupport
    • getShowAllMessage

      public String getShowAllMessage()
      Description copied from interface: org.eclipse.help.internal.base.IHelpActivitySupport
      Returns the message to show in the warning dialog when filtering is toggled off.
      Specified by:
      getShowAllMessage in interface org.eclipse.help.internal.base.IHelpActivitySupport
      Returns:
      the message for the filtering warning dialog
    • getDocumentMessage

      public String getDocumentMessage(boolean embedded)
      Description copied from interface: org.eclipse.help.internal.base.IHelpActivitySupport
      Returns document message for disabled activities.
      Specified by:
      getDocumentMessage in interface org.eclipse.help.internal.base.IHelpActivitySupport
      Parameters:
      embedded - if true, the message will be added to a document in the workbench window. Otherwise, it will be shown in a separate Help window.
      Returns:
      the document message with Java script string substituted if found.
    • getDocumentMessageUsesLiveHelp

      public boolean getDocumentMessageUsesLiveHelp(boolean embedded)
      Specified by:
      getDocumentMessageUsesLiveHelp in interface org.eclipse.help.internal.base.IHelpActivitySupport
      Parameters:
      embedded - if true, the message will be added to a document in the workbench window. Otherwise, it will be shown in a separate Help window.
      Returns:
      true if the document message uses live help and requires live help Java script header, or false otherwise.