diff options
author | Uwe Stieber | 2013-10-31 09:18:11 +0000 |
---|---|---|
committer | Uwe Stieber | 2013-11-02 08:18:45 +0000 |
commit | fe4801d772c40bfe3684f487cc67dc41d601c2ef (patch) | |
tree | 7e98d488f759ddfb706a4cfe13029e86e7f661d2 /target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src | |
parent | 9e0db973ab4f294e5c99f9171670d1176a9b304b (diff) | |
download | org.eclipse.tcf-fe4801d772c40bfe3684f487cc67dc41d601c2ef.tar.gz org.eclipse.tcf-fe4801d772c40bfe3684f487cc67dc41d601c2ef.tar.xz org.eclipse.tcf-fe4801d772c40bfe3684f487cc67dc41d601c2ef.zip |
Target Explorer: Rework processes runtime model refresh services/RuntimeModelRefreshService.java
- Fix: Refreshed context properties and children not merged reliable into model
- Introduced runtime model refresh service delegates. Allows to refresh target specific properties.
- Separate non-UI delegates from UI delegates. Introduced IDelegateService for non-UI delegates.
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src')
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); } |