/** * Return whether or not any examples are in the current install. * * @return True if there exists a full examples wizard category. */ private boolean hasExamples() { IWizardRegistry newRegistry = PlatformUI.getWorkbench().getNewWizardRegistry(); IWizardCategory category = newRegistry.findCategory(FULL_EXAMPLES_WIZARD_CATEGORY); return category != null; }
/** * Returns whether the new wizards registry has a non-empty category with * the given identifier. * * @param categoryId * the identifier for the category * @return <code>true</code> if there is a non-empty category with the * given identifier, <code>false</code> otherwise */ protected boolean registryHasCategory(String categoryId) { return WorkbenchPlugin.getDefault().getNewWizardRegistry() .findCategory(categoryId) != null; }
/** * Return whether or not any examples are in the current install. * * @return boolean */ private boolean hasExamples() { boolean hasCategory = registryHasCategory(WizardsRegistryReader.FULL_EXAMPLES_WIZARD_CATEGORY); if (hasCategory) { IWizardCategory exampleCategory = WorkbenchPlugin .getDefault() .getNewWizardRegistry() .findCategory( WizardsRegistryReader.FULL_EXAMPLES_WIZARD_CATEGORY); return hasWizards(exampleCategory); } return false; }