diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/extension/ITutorialUIProvider.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/extension/ITutorialUIProvider.java index c49969c14e669f677d8dbf911917add92eb80549..3afb58b6f6698ec485cc3df4d10e4b4e87ca470d 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/extension/ITutorialUIProvider.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/extension/ITutorialUIProvider.java @@ -17,6 +17,8 @@ $Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +--------------------------------------------------------------------------*/ package org.fortiss.tooling.kernel.ui.extension; +import org.fortiss.tooling.kernel.extension.data.TutorialStep; + /** * Interface UI parts of tutorial providers. * @@ -26,5 +28,14 @@ package org.fortiss.tooling.kernel.ui.extension; * @ConQAT.Rating RED Hash: */ public interface ITutorialUIProvider { + /** + * Returns the global whitelist provider. This method MUST never return <code>null</code>. + */ + public ITutorialUIWhitelistProvider getGlobalUIWhitelistProvider(); + /** + * Returns the local whitelist provider for the given step. This method MUST never return + * <code>null</code>. + */ + public ITutorialUIWhitelistProvider getLocalUIWhitelistProvider(TutorialStep step); } diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/extension/ITutorialUIWhitelistProvider.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/extension/ITutorialUIWhitelistProvider.java index bc588c5f296ecc145f6001eecf9e49e08f1a05a6..742dfe70e485d4652542a9cfbfb9cc2fa240cd32 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/extension/ITutorialUIWhitelistProvider.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/extension/ITutorialUIWhitelistProvider.java @@ -17,6 +17,10 @@ $Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +--------------------------------------------------------------------------*/ package org.fortiss.tooling.kernel.ui.extension; +import java.util.List; + +import org.eclipse.emf.ecore.EObject; + /** * Tutorial whitelist provider interface for the UI kernel services. * @@ -26,5 +30,17 @@ package org.fortiss.tooling.kernel.ui.extension; * @ConQAT.Rating RED Hash: */ public interface ITutorialUIWhitelistProvider { + // FIXME: not used yet + /** Returns whether the given element should be displayed in the navigator tree. */ + public boolean elementVisibleInNavigator(EObject element); + + /** Returns whether the global default actions are visible in the context menu. */ + public boolean globalDefaultActionsVisible(); + + /** Returns whether the given context menu contribution is visible. */ + public boolean contextMenuContributionVisible(EObject element, Object contribution); + /** Returns whether the given context menu contribution is visible. */ + public boolean contextMenuContributionVisible(List<EObject> element, Object contribution); + // TODO: define other methods } diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/extension/base/TutorialUIBlacklistAllProvider.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/extension/base/TutorialUIBlacklistAllProvider.java new file mode 100644 index 0000000000000000000000000000000000000000..5f1bc7dbff9886d50de4c229451a7f55383d8872 --- /dev/null +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/extension/base/TutorialUIBlacklistAllProvider.java @@ -0,0 +1,57 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2016 ForTISS GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.tooling.kernel.ui.extension.base; + +import java.util.List; + +import org.eclipse.emf.ecore.EObject; +import org.fortiss.tooling.kernel.ui.extension.ITutorialUIWhitelistProvider; + +/** + * An {@link ITutorialUIWhitelistProvider} that blacklists everything. + * + * @author hoelzl + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class TutorialUIBlacklistAllProvider implements ITutorialUIWhitelistProvider { + /** {@inheritDoc} */ + @Override + public boolean elementVisibleInNavigator(EObject element) { + return false; + } + + /** {@inheritDoc} */ + @Override + public boolean globalDefaultActionsVisible() { + return false; + } + + /** {@inheritDoc} */ + @Override + public boolean contextMenuContributionVisible(EObject element, Object contribution) { + return false; + } + + /** {@inheritDoc} */ + @Override + public boolean contextMenuContributionVisible(List<EObject> element, Object contribution) { + return false; + } +} diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/extension/base/TutorialUIWhitelistAllProvider.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/extension/base/TutorialUIWhitelistAllProvider.java new file mode 100644 index 0000000000000000000000000000000000000000..d8e937f48a78e342abd56d849cceb0c5ee6ff59e --- /dev/null +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/extension/base/TutorialUIWhitelistAllProvider.java @@ -0,0 +1,57 @@ +/*--------------------------------------------------------------------------+ +$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +| | +| Copyright 2016 ForTISS GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.tooling.kernel.ui.extension.base; + +import java.util.List; + +import org.eclipse.emf.ecore.EObject; +import org.fortiss.tooling.kernel.ui.extension.ITutorialUIWhitelistProvider; + +/** + * An {@link ITutorialUIWhitelistProvider} that whitelists everything. + * + * @author hoelzl + * @author $Author: hoelzl $ + * @version $Rev: 18709 $ + * @ConQAT.Rating RED Hash: + */ +public class TutorialUIWhitelistAllProvider implements ITutorialUIWhitelistProvider { + /** {@inheritDoc} */ + @Override + public boolean elementVisibleInNavigator(EObject element) { + return true; + } + + /** {@inheritDoc} */ + @Override + public boolean globalDefaultActionsVisible() { + return true; + } + + /** {@inheritDoc} */ + @Override + public boolean contextMenuContributionVisible(EObject element, Object contribution) { + return true; + } + + /** {@inheritDoc} */ + @Override + public boolean contextMenuContributionVisible(List<EObject> element, Object contribution) { + return true; + } +} diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/ContextMenuService.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/ContextMenuService.java index fbae3d7e19e16a3f0f1e8fa49df730d076716cde..0e4df280d98846dabd68fc67aee9db3e8a4be38b 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/ContextMenuService.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/ContextMenuService.java @@ -43,6 +43,7 @@ import org.fortiss.tooling.kernel.ui.extension.data.ContextMenuContextProvider; import org.fortiss.tooling.kernel.ui.internal.introspection.items.ContextMenuServiceIntrospectionDetailsItem; import org.fortiss.tooling.kernel.ui.service.IActionService; import org.fortiss.tooling.kernel.ui.service.IContextMenuService; +import org.fortiss.tooling.kernel.ui.service.ITutorialUIService; import org.fortiss.tooling.kernel.utils.ExtensionPointUtils; import org.fortiss.tooling.kernel.utils.LoggingUtils; import org.osgi.framework.Bundle; @@ -145,7 +146,7 @@ public class ContextMenuService implements IContextMenuService, IIntrospectiveKe addContributions(menu, contextProvider); if(!ITutorialService.INSTANCE.isTutorialActive() || - ITutorialService.INSTANCE.globalDefaultActionsVisible()) { + ITutorialUIService.INSTANCE.globalDefaultActionsVisible()) { IActionService.INSTANCE.addGlobalDefaultActionSectionToMenu(menu); } } @@ -181,8 +182,8 @@ public class ContextMenuService implements IContextMenuService, IIntrospectiveKe } // active tutorial may filter contributions - ITutorialService service = ITutorialService.INSTANCE; - if(service.isTutorialActive()) { + if(ITutorialService.INSTANCE.isTutorialActive()) { + ITutorialUIService service = ITutorialUIService.INSTANCE; items = items.stream() .filter(i -> service.contextMenuContributionVisible(selectionElem, @@ -219,8 +220,8 @@ public class ContextMenuService implements IContextMenuService, IIntrospectiveKe } // active tutorial may filter contributions - ITutorialService service = ITutorialService.INSTANCE; - if(service.isTutorialActive()) { + if(ITutorialService.INSTANCE.isTutorialActive()) { + ITutorialUIService service = ITutorialUIService.INSTANCE; items = items.stream() .filter(i -> service.contextMenuContributionVisible(selection, diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/TutorialUIService.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/TutorialUIService.java index 08c93d13cd49389dcd093e8e2458f588a9c5ac2e..7cefc2e21d350db9d9fa948844403dfa4c31a272 100644 --- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/TutorialUIService.java +++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/TutorialUIService.java @@ -17,7 +17,17 @@ $Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +--------------------------------------------------------------------------*/ package org.fortiss.tooling.kernel.ui.internal; +import static org.fortiss.tooling.kernel.utils.LoggingUtils.error; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.emf.ecore.EObject; import org.fortiss.tooling.kernel.extension.ITutorialProvider; +import org.fortiss.tooling.kernel.extension.data.TutorialStep; +import org.fortiss.tooling.kernel.service.ITutorialService; +import org.fortiss.tooling.kernel.ui.ToolingKernelUIActivator; import org.fortiss.tooling.kernel.ui.extension.ITutorialUIProvider; import org.fortiss.tooling.kernel.ui.service.ITutorialUIService; @@ -31,10 +41,85 @@ import org.fortiss.tooling.kernel.ui.service.ITutorialUIService; */ public final class TutorialUIService implements ITutorialUIService { + /** The map from tutorial providers to their UI counter-part. */ + private final Map<Class<? extends ITutorialProvider>, Class<? extends ITutorialUIProvider>> providerMap = + new HashMap<Class<? extends ITutorialProvider>, Class<? extends ITutorialUIProvider>>(); + /** The map of tutorial UI provider instances. */ + private final Map<Class<? extends ITutorialUIProvider>, ITutorialUIProvider> instanceMap = + new HashMap<Class<? extends ITutorialUIProvider>, ITutorialUIProvider>(); + /** {@inheritDoc} */ @Override public void registerTutorialProvider(Class<? extends ITutorialProvider> nonUIprovider, Class<? extends ITutorialUIProvider> uiProvider) { - // TODO Auto-generated method stub + if(!providerMap.containsKey(nonUIprovider)) { + try { + providerMap.put(nonUIprovider, uiProvider); + instanceMap.put(uiProvider, uiProvider.newInstance()); + } catch(Exception e) { + error(ToolingKernelUIActivator.getDefault(), + "Failed to instantiate tutorial UI provider " + uiProvider.getName() + "!", + e); + } + } else { + StringBuilder sb = new StringBuilder(); + sb.append("TutorialProvider ").append(nonUIprovider.getName()); + sb.append(" already mapped to ").append(uiProvider.getName()); + sb.append("!"); + error(ToolingKernelUIActivator.getDefault(), sb.toString()); + } + } + + /** Returns the current tutorial UI provider. */ + private ITutorialUIProvider getCurrentUIProvider() { + Class<? extends ITutorialProvider> nonUIClass = + ITutorialService.INSTANCE.getActiveTutorial().getClass(); + return instanceMap.get(providerMap.get(nonUIClass)); + } + + /** {@inheritDoc} */ + @Override + public boolean elementVisibleInNavigator(EObject element) { + ITutorialUIProvider p = getCurrentUIProvider(); + if(p.getGlobalUIWhitelistProvider().elementVisibleInNavigator(element)) { + return true; + } + TutorialStep step = ITutorialService.INSTANCE.getActiveTutorialStep(); + return p.getLocalUIWhitelistProvider(step).elementVisibleInNavigator(element); + } + + /** {@inheritDoc} */ + @Override + public boolean globalDefaultActionsVisible() { + ITutorialUIProvider p = getCurrentUIProvider(); + if(p.getGlobalUIWhitelistProvider().globalDefaultActionsVisible()) { + return true; + } + TutorialStep step = ITutorialService.INSTANCE.getActiveTutorialStep(); + return p.getLocalUIWhitelistProvider(step).globalDefaultActionsVisible(); + } + + /** {@inheritDoc} */ + @Override + public boolean contextMenuContributionVisible(EObject element, Object contribution) { + ITutorialUIProvider p = getCurrentUIProvider(); + if(p.getGlobalUIWhitelistProvider().contextMenuContributionVisible(element, contribution)) { + return true; + } + TutorialStep step = ITutorialService.INSTANCE.getActiveTutorialStep(); + return p.getLocalUIWhitelistProvider(step).contextMenuContributionVisible(element, + contribution); + } + + /** {@inheritDoc} */ + @Override + public boolean contextMenuContributionVisible(List<EObject> element, Object contribution) { + ITutorialUIProvider p = getCurrentUIProvider(); + if(p.getGlobalUIWhitelistProvider().contextMenuContributionVisible(element, contribution)) { + return true; + } + TutorialStep step = ITutorialService.INSTANCE.getActiveTutorialStep(); + return p.getLocalUIWhitelistProvider(step).contextMenuContributionVisible(element, + contribution); } } diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/extension/ITutorialWhitelistProvider.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/extension/ITutorialWhitelistProvider.java index 3f8b1c908deae09f9b29ecb30e586175952f497c..3bdd5e594e3aac27aa2301dcb8f3811e2c81b087 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/extension/ITutorialWhitelistProvider.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/extension/ITutorialWhitelistProvider.java @@ -17,8 +17,6 @@ $Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +--------------------------------------------------------------------------*/ package org.fortiss.tooling.kernel.extension; -import java.util.List; - import org.eclipse.emf.ecore.EObject; import org.fortiss.tooling.kernel.extension.data.Prototype; @@ -32,9 +30,6 @@ import org.fortiss.tooling.kernel.extension.data.Prototype; * @ConQAT.Rating RED Hash: */ public interface ITutorialWhitelistProvider { - // FIXME: not used yet - /** Returns whether the given element should be displayed in the navigator tree. */ - public boolean elementVisibleInNavigator(EObject element); /** * Returns whether the given prototype is active in this tutorial. Note that active @@ -42,14 +37,4 @@ public interface ITutorialWhitelistProvider { * {@link #contextMenuContributionVisible(EObject, Object)}. */ public boolean prototypeActive(Prototype prototype); - - /** Returns whether the global default actions are visible in the context menu. */ - public boolean globalDefaultActionsVisible(); - - /** Returns whether the given context menu contribution is visible. */ - public boolean contextMenuContributionVisible(EObject element, Object contribution); - - /** Returns whether the given context menu contribution is visible. */ - public boolean contextMenuContributionVisible(List<EObject> element, Object contribution); - // TODO: define other methods } diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/extension/base/TutorialBlacklistAllProvider.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/extension/base/TutorialBlacklistAllProvider.java index c235e369162304ec561cc71165626a79a8e40cdc..fffcce49e214f7391ac3751255f0785b6ed4888d 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/extension/base/TutorialBlacklistAllProvider.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/extension/base/TutorialBlacklistAllProvider.java @@ -17,9 +17,6 @@ $Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +--------------------------------------------------------------------------*/ package org.fortiss.tooling.kernel.extension.base; -import java.util.List; - -import org.eclipse.emf.ecore.EObject; import org.fortiss.tooling.kernel.extension.ITutorialWhitelistProvider; import org.fortiss.tooling.kernel.extension.data.Prototype; @@ -32,34 +29,9 @@ import org.fortiss.tooling.kernel.extension.data.Prototype; * @ConQAT.Rating RED Hash: */ public class TutorialBlacklistAllProvider implements ITutorialWhitelistProvider { - - /** {@inheritDoc} */ - @Override - public boolean elementVisibleInNavigator(EObject element) { - return false; - } - /** {@inheritDoc} */ @Override public boolean prototypeActive(Prototype prototype) { return false; } - - /** {@inheritDoc} */ - @Override - public boolean globalDefaultActionsVisible() { - return false; - } - - /** {@inheritDoc} */ - @Override - public boolean contextMenuContributionVisible(EObject element, Object contribution) { - return false; - } - - /** {@inheritDoc} */ - @Override - public boolean contextMenuContributionVisible(List<EObject> element, Object contribution) { - return false; - } } diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/extension/base/TutorialWhitelistAllProvider.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/extension/base/TutorialWhitelistAllProvider.java index c2d696c74d368c3c66f2e24afa8a793505eced8a..35c0c284df5834e38cea3b4d633ab6d89413b470 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/extension/base/TutorialWhitelistAllProvider.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/extension/base/TutorialWhitelistAllProvider.java @@ -17,9 +17,6 @@ $Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $ +--------------------------------------------------------------------------*/ package org.fortiss.tooling.kernel.extension.base; -import java.util.List; - -import org.eclipse.emf.ecore.EObject; import org.fortiss.tooling.kernel.extension.ITutorialWhitelistProvider; import org.fortiss.tooling.kernel.extension.data.Prototype; @@ -32,34 +29,9 @@ import org.fortiss.tooling.kernel.extension.data.Prototype; * @ConQAT.Rating RED Hash: */ public class TutorialWhitelistAllProvider implements ITutorialWhitelistProvider { - - /** {@inheritDoc} */ - @Override - public boolean elementVisibleInNavigator(EObject element) { - return true; - } - /** {@inheritDoc} */ @Override public boolean prototypeActive(Prototype prototype) { return true; } - - /** {@inheritDoc} */ - @Override - public boolean globalDefaultActionsVisible() { - return true; - } - - /** {@inheritDoc} */ - @Override - public boolean contextMenuContributionVisible(EObject element, Object contribution) { - return true; - } - - /** {@inheritDoc} */ - @Override - public boolean contextMenuContributionVisible(List<EObject> element, Object contribution) { - return true; - } } diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/TutorialService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/TutorialService.java index bfe483d18d19101bf34f7dc6945623285dd68794..483bb2fe17080b8426b35b8dbcb72cc920be0c71 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/TutorialService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/TutorialService.java @@ -20,7 +20,6 @@ package org.fortiss.tooling.kernel.internal; import java.util.Collection; import java.util.HashMap; import java.util.LinkedList; -import java.util.List; import java.util.Map; import org.conqat.lib.commons.collections.UnmodifiableMap; @@ -109,45 +108,6 @@ public final class TutorialService implements ITutorialService { activeTutorial = null; } - /** {@inheritDoc} */ - @Override - public boolean elementVisibleInNavigator(EObject element) { - return activeTutorial.getGlobalWhitelistProvider().elementVisibleInNavigator(element) || - activeStep.getWhitelistProvider().elementVisibleInNavigator(element); - } - - /** {@inheritDoc} */ - @Override - public boolean prototypeActive(Prototype prototype) { - return activeTutorial.getGlobalWhitelistProvider().prototypeActive(prototype) || - activeStep.getWhitelistProvider().prototypeActive(prototype); - } - - /** {@inheritDoc} */ - @Override - public boolean globalDefaultActionsVisible() { - return activeTutorial.getGlobalWhitelistProvider().globalDefaultActionsVisible() || - activeStep.getWhitelistProvider().globalDefaultActionsVisible(); - } - - /** {@inheritDoc} */ - @Override - public boolean contextMenuContributionVisible(EObject element, Object contribution) { - return activeTutorial.getGlobalWhitelistProvider().contextMenuContributionVisible(element, - contribution) || - activeStep.getWhitelistProvider().contextMenuContributionVisible(element, - contribution); - } - - /** {@inheritDoc} */ - @Override - public boolean contextMenuContributionVisible(List<EObject> element, Object contribution) { - return activeTutorial.getGlobalWhitelistProvider().contextMenuContributionVisible(element, - contribution) || - activeStep.getWhitelistProvider().contextMenuContributionVisible(element, - contribution); - } - /** {@inheritDoc} */ @Override public void addTutorialServiceListener(ITutorialServiceListener l) { @@ -161,4 +121,11 @@ public final class TutorialService implements ITutorialService { public void removeTutorialServiceListener(ITutorialServiceListener l) { listeners.remove(l); } + + /** {@inheritDoc} */ + @Override + public boolean prototypeActive(Prototype prototype) { + return activeTutorial.getGlobalWhitelistProvider().prototypeActive(prototype) || + activeStep.getWhitelistProvider().prototypeActive(prototype); + } }