diff options
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services')
3 files changed, 45 insertions, 6 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IAdapterService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IAdapterService.java index 5377b30b1..3fa436fdf 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IAdapterService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IAdapterService.java @@ -9,10 +9,16 @@ *******************************************************************************/ package org.eclipse.tcf.te.runtime.services.interfaces; +import org.eclipse.core.runtime.IAdaptable; + /** * Adapter service. * <p> * Allows to return specific adapter implementations for a given context. + * <p> + * An adapter is extending the given context object with the desired adapter class. + * The adapter service is an context specific extension to the core Eclipse adaptable + * mechanism. See {@link IAdaptable} for details on the core Eclipse adaptable mechanism. */ public interface IAdapterService extends IService { @@ -20,9 +26,9 @@ public interface IAdapterService extends IService { * Returns an adapter for the requested adapter class and context. * * @param context The context. Must not be <code>null</code>. - * @param adapter The adapter class. Must not be <code>null</code>. + * @param clazz The adapter class. Must not be <code>null</code>. * - * @return The adapter or <code>null</code>. + * @return The adapter instance or <code>null</code>. */ - public <V extends Object> V getAdapter(Object context, Class<? extends V> adapter); + public <V extends Object> V getAdapter(Object context, Class<? extends V> clazz); } diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IDelegateService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IDelegateService.java new file mode 100644 index 000000000..55636a4d4 --- /dev/null +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IDelegateService.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright (c) 2013 Wind River Systems, Inc. and others. All rights reserved. + * This program and the accompanying materials are made available under the terms + * of the Eclipse Public License v1.0 which accompanies this distribution, and is + * available at http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Wind River Systems - initial API and implementation + *******************************************************************************/ +package org.eclipse.tcf.te.runtime.services.interfaces; + +/** + * Delegate service. + * <p> + * Allows to return specific delegate implementations for a given context. + * <p> + * A delegate extends the implementation of a service or method to be context specific. + */ +public interface IDelegateService extends IService { + + /** + * Returns the delegate instance for the requested delegate class and context. + * + * @param context The context. Must not be <code>null</code>. + * @param clazz The delegate class. Must not be <code>null</code>. + * + * @return The delegate instance or <code>null</code>. + */ + public <V extends Object> V getDelegate(Object context, Class<? extends V> clazz); +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IUIService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IUIService.java index f1dcdc067..f13257ead 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IUIService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IUIService.java @@ -13,17 +13,20 @@ package org.eclipse.tcf.te.runtime.services.interfaces; * UI service. * <p> * Allows to provide customized implementations for UI related functionality which - * supports delegating parts of the logic to context specific delegates. + * supports delegating parts of the UI logic to context specific delegates. */ public interface IUIService extends IService { /** - * Returns the delegate for the requested delegate class and context. + * Returns the delegate instance for the requested UI delegate class and context. + * <p> + * <b>Note:</b> This method should be used for UI related delegates. For non-UI + * related delegates, consider to use the {@link IDelegateService} instead. * * @param context The context. Must not be <code>null</code>. * @param clazz The delegate class. Must not be <code>null</code>. * - * @return The delegate or <code>null</code>. + * @return The delegate instance or <code>null</code>. */ public <V extends Object> V getDelegate(Object context, Class<? extends V> clazz); } |