diff options
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model')
13 files changed, 357 insertions, 355 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/build.properties index 4cd2b9b9a..4cd41f8af 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/build.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/build.properties @@ -1,15 +1,15 @@ -###############################################################################
-# Copyright (c) 2012 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.properties,\
- about.html
+############################################################################### +# Copyright (c) 2014 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 +############################################################################### +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.properties,\ + about.html diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/plugin.properties index 00a9787a1..576d34d4e 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/plugin.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/plugin.properties @@ -1,10 +1,12 @@ -################################################################################## -# Copyright (c) 2011, 2012 Wind River Systems, Inc. +############################################################################### +# Copyright (c) 2014 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 # -# The right to copy, distribute, modify, or otherwise make use -# of this software may be licensed only pursuant to the terms -# of an applicable Wind River license agreement. -################################################################################## +# Contributors: +# Wind River Systems - initial API and implementation +############################################################################### pluginName = Target Explorer, TCF Service Model, Core plug-in providerName = Eclipse.org - Target Explorer diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/activator/CoreBundleActivator.java index 98fb1ec7d..8903f2db5 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/activator/CoreBundleActivator.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/activator/CoreBundleActivator.java @@ -1,56 +1,56 @@ -/*******************************************************************************
- * Copyright (c) 2012 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.tcf.core.model.activator;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class CoreBundleActivator implements BundleActivator {
- // The bundle context
- private static BundleContext context;
-
- /**
- * Returns the bundle context
- *
- * @return the bundle context
- */
- public static BundleContext getContext() {
- return context;
- }
-
- /**
- * Convenience method which returns the unique identifier of this plugin.
- */
- public static String getUniqueIdentifier() {
- if (getContext() != null && getContext().getBundle() != null) {
- return getContext().getBundle().getSymbolicName();
- }
- return "org.eclipse.tcf.te.tcf.core.model"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext bundleContext) throws Exception {
- CoreBundleActivator.context = bundleContext;
- }
-
- /* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext bundleContext) throws Exception {
- CoreBundleActivator.context = null;
- }
-}
+/******************************************************************************* + * Copyright (c) 2014 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.tcf.core.model.activator; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class CoreBundleActivator implements BundleActivator { + // The bundle context + private static BundleContext context; + + /** + * Returns the bundle context + * + * @return the bundle context + */ + public static BundleContext getContext() { + return context; + } + + /** + * Convenience method which returns the unique identifier of this plugin. + */ + public static String getUniqueIdentifier() { + if (getContext() != null && getContext().getBundle() != null) { + return getContext().getBundle().getSymbolicName(); + } + return "org.eclipse.tcf.te.tcf.core.model"; //$NON-NLS-1$ + } + + /* (non-Javadoc) + * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) + */ + @Override + public void start(BundleContext bundleContext) throws Exception { + CoreBundleActivator.context = bundleContext; + } + + /* (non-Javadoc) + * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + @Override + public void stop(BundleContext bundleContext) throws Exception { + CoreBundleActivator.context = null; + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/interfaces/IModel.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/interfaces/IModel.java index 48ed6625c..ffbca132d 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/interfaces/IModel.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/interfaces/IModel.java @@ -1,58 +1,58 @@ -/*******************************************************************************
- * Copyright (c) 2012 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.tcf.core.model.interfaces;
-
-import org.eclipse.tcf.te.runtime.model.interfaces.IContainerModelNode;
-import org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactory;
-import org.eclipse.tcf.te.tcf.core.model.interfaces.services.IModelService;
-
-
-/**
- * Common interface to be implemented by models.
- */
-public interface IModel extends IContainerModelNode {
-
- /**
- * Dispose the model instance.
- */
- public void dispose();
-
- /**
- * Returns if or if not the model instance is disposed.
- *
- * @return <code>True</code> if the model instance is disposed, <code>false/code> otherwise.
- */
- public boolean isDisposed();
-
- /**
- * Returns the model service, implementing at least the specified service interface.
- *
- * @param serviceInterface The service interface class. Must not be <code>null</code>.
- * @return The service instance implementing the specified service interface, or <code>null</code>.
- */
- public <V extends IModelService> V getService(Class<V> serviceInterface);
-
- /**
- * Sets the model node factory instance to be used for creating model nodes. If set to
- * <code>null</code>, the next call to {@link #getFactory()} will return the default model node
- * factory.
- *
- * @param factory The factory instance or <code<null</code>.
- */
- public void setFactory(IFactory factory);
-
- /**
- * Returns the model node factory instance used for creating model nodes. If not set explicitly,
- * a default model node factory will be instantiated.
- *
- * @return The model node factory instance.
- */
- public IFactory getFactory();
-}
+/******************************************************************************* + * Copyright (c) 2014 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.tcf.core.model.interfaces; + +import org.eclipse.tcf.te.runtime.model.interfaces.IContainerModelNode; +import org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactory; +import org.eclipse.tcf.te.tcf.core.model.interfaces.services.IModelService; + + +/** + * Common interface to be implemented by models. + */ +public interface IModel extends IContainerModelNode { + + /** + * Dispose the model instance. + */ + public void dispose(); + + /** + * Returns if or if not the model instance is disposed. + * + * @return <code>True</code> if the model instance is disposed, <code>false/code> otherwise. + */ + public boolean isDisposed(); + + /** + * Returns the model service, implementing at least the specified service interface. + * + * @param serviceInterface The service interface class. Must not be <code>null</code>. + * @return The service instance implementing the specified service interface, or <code>null</code>. + */ + public <V extends IModelService> V getService(Class<V> serviceInterface); + + /** + * Sets the model node factory instance to be used for creating model nodes. If set to + * <code>null</code>, the next call to {@link #getFactory()} will return the default model node + * factory. + * + * @param factory The factory instance or <code<null</code>. + */ + public void setFactory(IFactory factory); + + /** + * Returns the model node factory instance used for creating model nodes. If not set explicitly, + * a default model node factory will be instantiated. + * + * @return The model node factory instance. + */ + public IFactory getFactory(); +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/interfaces/services/IModelChannelService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/interfaces/services/IModelChannelService.java index 0c70afe60..9fc3c086f 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/interfaces/services/IModelChannelService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/interfaces/services/IModelChannelService.java @@ -1,57 +1,57 @@ -/*******************************************************************************
- * Copyright (c) 2012 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.tcf.core.model.interfaces.services;
-
-import org.eclipse.tcf.protocol.IChannel;
-
-/**
- * Common interface to be implemented by a model channel service.
- */
-public interface IModelChannelService extends IModelService {
-
- /**
- * Returns the associated channel instance.
- *
- * @return The associated channel instance or <code>null</code>.
- */
- public IChannel getChannel();
-
- /**
- * Returns a fully open channel to the runtime model's associated peer.
- * <p>
- * If no channel has been associated yet, or the associated channel had been closed already, the
- * method will open a new channel to the remote peer being associated with the parent runtime
- * model.
- * <p>
- * If a channel had been associated already, and the channel is in open state, this method will
- * return the associated channel instead of opening a new one.
- *
- * @param done The callback to be invoked. Must not be <code>null</code>.
- */
- public void openChannel(DoneOpenChannel done);
-
- /**
- * Client call back interface for openChannel(...).
- */
- interface DoneOpenChannel {
- /**
- * Called when the channel fully opened or failed to open.
- *
- * @param error The error description if operation failed, <code>null</code> if succeeded.
- * @param channel The channel object or <code>null</code>.
- */
- void doneOpenChannel(Throwable error, IChannel channel);
- }
-
- /**
- * Close the associated channel.
- */
- public void closeChannel();
-}
+/******************************************************************************* + * Copyright (c) 2014 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.tcf.core.model.interfaces.services; + +import org.eclipse.tcf.protocol.IChannel; + +/** + * Common interface to be implemented by a model channel service. + */ +public interface IModelChannelService extends IModelService { + + /** + * Returns the associated channel instance. + * + * @return The associated channel instance or <code>null</code>. + */ + public IChannel getChannel(); + + /** + * Returns a fully open channel to the runtime model's associated peer. + * <p> + * If no channel has been associated yet, or the associated channel had been closed already, the + * method will open a new channel to the remote peer being associated with the parent runtime + * model. + * <p> + * If a channel had been associated already, and the channel is in open state, this method will + * return the associated channel instead of opening a new one. + * + * @param done The callback to be invoked. Must not be <code>null</code>. + */ + public void openChannel(DoneOpenChannel done); + + /** + * Client call back interface for openChannel(...). + */ + interface DoneOpenChannel { + /** + * Called when the channel fully opened or failed to open. + * + * @param error The error description if operation failed, <code>null</code> if succeeded. + * @param channel The channel object or <code>null</code>. + */ + void doneOpenChannel(Throwable error, IChannel channel); + } + + /** + * Close the associated channel. + */ + public void closeChannel(); +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/interfaces/services/IModelLookupService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/interfaces/services/IModelLookupService.java index aa0ae0e28..09e859838 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/interfaces/services/IModelLookupService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/interfaces/services/IModelLookupService.java @@ -1,44 +1,44 @@ -/*******************************************************************************
- * Copyright (c) 2012 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.tcf.core.model.interfaces.services;
-
-import java.util.UUID;
-
-import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
-
-/**
- * Common interface to be implemented by a model lookup service.
- */
-public interface IModelLookupService extends IModelService {
-
- /**
- * Search the associated model for a model node matching the given UUID.
- *
- * @param uuid The UUID. Must not be <code>null</code>.
- * @return The model node instance, or <code>null</code> if the node cannot be found.
- */
- public IModelNode lkupModelNodeByUUID(UUID uuid);
-
- /**
- * Search the associated model for model nodes matching the given id.
- *
- * @param id The id. Must not be <code>null</code>.
- * @return The model node instances, or an empty list.
- */
- public IModelNode[] lkupModelNodesById(String id);
-
- /**
- * Search the associated model for model nodes matching the given name.
- *
- * @param name The name. Must not be <code>null</code>.
- * @return The model node instances, or an empty list.
- */
- public IModelNode[] lkupModelNodesByName(String name);
-}
+/******************************************************************************* + * Copyright (c) 2014 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.tcf.core.model.interfaces.services; + +import java.util.UUID; + +import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode; + +/** + * Common interface to be implemented by a model lookup service. + */ +public interface IModelLookupService extends IModelService { + + /** + * Search the associated model for a model node matching the given UUID. + * + * @param uuid The UUID. Must not be <code>null</code>. + * @return The model node instance, or <code>null</code> if the node cannot be found. + */ + public IModelNode lkupModelNodeByUUID(UUID uuid); + + /** + * Search the associated model for model nodes matching the given id. + * + * @param id The id. Must not be <code>null</code>. + * @return The model node instances, or an empty list. + */ + public IModelNode[] lkupModelNodesById(String id); + + /** + * Search the associated model for model nodes matching the given name. + * + * @param name The name. Must not be <code>null</code>. + * @return The model node instances, or an empty list. + */ + public IModelNode[] lkupModelNodesByName(String name); +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/interfaces/services/IModelRefreshService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/interfaces/services/IModelRefreshService.java index 9e4833e32..07b1e040d 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/interfaces/services/IModelRefreshService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/interfaces/services/IModelRefreshService.java @@ -1,11 +1,11 @@ /******************************************************************************* - * Copyright (c) 2012, 2014 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2014 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 + * Wind River Systems - initial API and implementation *******************************************************************************/ package org.eclipse.tcf.te.tcf.core.model.interfaces.services; diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/interfaces/services/IModelService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/interfaces/services/IModelService.java index 4db5b6e32..fce5cd866 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/interfaces/services/IModelService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/interfaces/services/IModelService.java @@ -1,27 +1,27 @@ -/*******************************************************************************
- * Copyright (c) 2012 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.tcf.core.model.interfaces.services;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.tcf.te.tcf.core.model.interfaces.IModel;
-
-
-/**
- * Common interface to be implemented by all model services.
- */
-public interface IModelService extends IAdaptable {
-
- /**
- * Returns the parent model.
- *
- * @return The parent model.
- */
- public IModel getModel();
-}
+/******************************************************************************* + * Copyright (c) 2014 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.tcf.core.model.interfaces.services; + +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.tcf.te.tcf.core.model.interfaces.IModel; + + +/** + * Common interface to be implemented by all model services. + */ +public interface IModelService extends IAdaptable { + + /** + * Returns the parent model. + * + * @return The parent model. + */ + public IModel getModel(); +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/interfaces/services/IModelUpdateService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/interfaces/services/IModelUpdateService.java index e7c5f3a01..0d6cf2090 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/interfaces/services/IModelUpdateService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/interfaces/services/IModelUpdateService.java @@ -1,41 +1,41 @@ -/*******************************************************************************
- * Copyright (c) 2012 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.tcf.core.model.interfaces.services;
-
-import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
-
-/**
- * Common interface to be implemented by a model update service.
- */
-public interface IModelUpdateService extends IModelService {
-
- /**
- * Adds the given node to the model. A previous mapping to a node with the same id as the given
- * node is overwritten.
- *
- * @param node The node object. Must not be <code>null</code>.
- */
- public void add(IModelNode node);
-
- /**
- * Removes the given node from the model.
- *
- * @param node The node object. Must not be <code>null</code.
- */
- public void remove(IModelNode node);
-
- /**
- * Updates the destination model node properties from the source model node properties.
- *
- * @param dst The destination model node. Must not be <code>null</code>.
- * @param src The source model node. Must not be <code>null</code>.
- */
- public void update(IModelNode dst, IModelNode src);
-}
+/******************************************************************************* + * Copyright (c) 2014 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.tcf.core.model.interfaces.services; + +import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode; + +/** + * Common interface to be implemented by a model update service. + */ +public interface IModelUpdateService extends IModelService { + + /** + * Adds the given node to the model. A previous mapping to a node with the same id as the given + * node is overwritten. + * + * @param node The node object. Must not be <code>null</code>. + */ + public void add(IModelNode node); + + /** + * Removes the given node from the model. + * + * @param node The node object. Must not be <code>null</code. + */ + public void remove(IModelNode node); + + /** + * Updates the destination model node properties from the source model node properties. + * + * @param dst The destination model node. Must not be <code>null</code>. + * @param src The source model node. Must not be <code>null</code>. + */ + public void update(IModelNode dst, IModelNode src); +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/nls/Messages.java index 014647b0c..0f480504e 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/nls/Messages.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/nls/Messages.java @@ -1,11 +1,11 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2014 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 + * Wind River Systems - initial API and implementation *******************************************************************************/ package org.eclipse.tcf.te.tcf.core.model.nls; diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/nls/Messages.properties index dba721088..bfff5d4e8 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/nls/Messages.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/nls/Messages.properties @@ -1,9 +1,9 @@ ############################################################################### -# Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2014 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 +# Wind River Systems - initial API and implementation ############################################################################### diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/services/AbstractModelService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/services/AbstractModelService.java index 7aba44cae..f10fb929c 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/services/AbstractModelService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/services/AbstractModelService.java @@ -1,43 +1,43 @@ -/*******************************************************************************
- * Copyright (c) 2012 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.tcf.core.model.services;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.tcf.te.tcf.core.model.interfaces.IModel;
-import org.eclipse.tcf.te.tcf.core.model.interfaces.services.IModelService;
-
-/**
- * Abstract model service implementation.
- */
-public abstract class AbstractModelService<V extends IModel> extends PlatformObject implements IModelService {
- // Reference to the parent model
- private final V model;
-
- /**
- * Constructor.
- *
- * @param model The parent model. Must not be <code>null</code>.
- */
- public AbstractModelService(V model) {
- super();
- Assert.isNotNull(model);
- this.model = model;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.tcf.core.model.interfaces.services.IModelService#getModel()
- */
- @Override
- public final V getModel() {
- return model;
- }
-
-}
+/******************************************************************************* + * Copyright (c) 2014 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.tcf.core.model.services; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.core.runtime.PlatformObject; +import org.eclipse.tcf.te.tcf.core.model.interfaces.IModel; +import org.eclipse.tcf.te.tcf.core.model.interfaces.services.IModelService; + +/** + * Abstract model service implementation. + */ +public abstract class AbstractModelService<V extends IModel> extends PlatformObject implements IModelService { + // Reference to the parent model + private final V model; + + /** + * Constructor. + * + * @param model The parent model. Must not be <code>null</code>. + */ + public AbstractModelService(V model) { + super(); + Assert.isNotNull(model); + this.model = model; + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.tcf.core.model.interfaces.services.IModelService#getModel() + */ + @Override + public final V getModel() { + return model; + } + +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/services/PropertiesAccessService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/services/PropertiesAccessService.java index 0eb0ca06d..bce553a84 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/services/PropertiesAccessService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.model/src/org/eclipse/tcf/te/tcf/core/model/services/PropertiesAccessService.java @@ -1,11 +1,11 @@ /******************************************************************************* - * Copyright (c) 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2014 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 + * Wind River Systems - initial API and implementation *******************************************************************************/ package org.eclipse.tcf.te.tcf.core.model.services; |