diff options
author | Uwe Stieber | 2014-04-25 15:35:54 +0000 |
---|---|---|
committer | Uwe Stieber | 2014-04-25 15:39:10 +0000 |
commit | 49824c0cd3060498f0dc7988ef865b4b2f48d3d3 (patch) | |
tree | b7a46714163e8301fdaab13ae87ee29a4daba6c7 | |
parent | 750fc538f67a55693b623621fbc8e37b189406f4 (diff) | |
download | org.eclipse.tcf-49824c0cd3060498f0dc7988ef865b4b2f48d3d3.tar.gz org.eclipse.tcf-49824c0cd3060498f0dc7988ef865b4b2f48d3d3.tar.xz org.eclipse.tcf-49824c0cd3060498f0dc7988ef865b4b2f48d3d3.zip |
Releng: Fix copyrights
374 files changed, 7174 insertions, 7165 deletions
diff --git a/features/org.eclipse.tcf.cdt.feature/build.properties b/features/org.eclipse.tcf.cdt.feature/build.properties index 1b25decf4..babc19bf5 100644 --- a/features/org.eclipse.tcf.cdt.feature/build.properties +++ b/features/org.eclipse.tcf.cdt.feature/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2010, 2011 Wind River Systems, Inc. and others. +# Copyright (c) 2010, 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 diff --git a/features/org.eclipse.tcf.cdt.sdk.feature/build.properties b/features/org.eclipse.tcf.cdt.sdk.feature/build.properties index bf84db6fd..d9e56c50b 100644 --- a/features/org.eclipse.tcf.cdt.sdk.feature/build.properties +++ b/features/org.eclipse.tcf.cdt.sdk.feature/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2012, 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 diff --git a/features/org.eclipse.tcf.core.feature/build.properties b/features/org.eclipse.tcf.core.feature/build.properties index 81d0c3d1a..babc19bf5 100644 --- a/features/org.eclipse.tcf.core.feature/build.properties +++ b/features/org.eclipse.tcf.core.feature/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2010, 2012 Wind River Systems, Inc. and others. +# Copyright (c) 2010, 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 diff --git a/features/org.eclipse.tcf.core.sdk.feature/build.properties b/features/org.eclipse.tcf.core.sdk.feature/build.properties index bf84db6fd..d9e56c50b 100644 --- a/features/org.eclipse.tcf.core.sdk.feature/build.properties +++ b/features/org.eclipse.tcf.core.sdk.feature/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2012, 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 diff --git a/features/org.eclipse.tcf.feature/build.properties b/features/org.eclipse.tcf.feature/build.properties index 1b25decf4..babc19bf5 100644 --- a/features/org.eclipse.tcf.feature/build.properties +++ b/features/org.eclipse.tcf.feature/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2010, 2011 Wind River Systems, Inc. and others. +# Copyright (c) 2010, 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 diff --git a/features/org.eclipse.tcf.sdk.feature/build.properties b/features/org.eclipse.tcf.sdk.feature/build.properties index bf84db6fd..d9e56c50b 100644 --- a/features/org.eclipse.tcf.sdk.feature/build.properties +++ b/features/org.eclipse.tcf.sdk.feature/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2012, 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 diff --git a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/RunControlProxy.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/RunControlProxy.java index b6318393a..e751712cd 100644 --- a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/RunControlProxy.java +++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/RunControlProxy.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2011 Wind River Systems, Inc. and others. + * Copyright (c) 2007, 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 diff --git a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IRunControl.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IRunControl.java index ee7d45055..f9bd63003 100644 --- a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IRunControl.java +++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IRunControl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2013 Wind River Systems, Inc. and others. + * Copyright (c) 2007, 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 diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/WizardLogPage.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/WizardLogPage.java index aae1dfbd5..4d5c7e45f 100644 --- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/WizardLogPage.java +++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/setup/WizardLogPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2013 Wind River Systems, Inc. and others. + * Copyright (c) 2009, 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 diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFAnnotationManager.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFAnnotationManager.java index 763eea0cb..a46003cb5 100644 --- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFAnnotationManager.java +++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFAnnotationManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2013 Wind River Systems, Inc. and others. + * Copyright (c) 2008, 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 diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeRegister.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeRegister.java index 2f02f5866..73c349b3a 100644 --- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeRegister.java +++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeRegister.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2013 Wind River Systems, Inc. and others. + * Copyright (c) 2007, 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 diff --git a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/ElfLoader.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/ElfLoader.java index 5d1ffd1fb..6ed2c8d60 100644 --- a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/ElfLoader.java +++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/ElfLoader.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013 Xilinx, Inc. and others. + * Copyright (c) 2013, 2014 Xilinx, 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 diff --git a/target_explorer/features/org.eclipse.tcf.te.feature/build.properties b/target_explorer/features/org.eclipse.tcf.te.feature/build.properties index bf84db6fd..d9e56c50b 100644 --- a/target_explorer/features/org.eclipse.tcf.te.feature/build.properties +++ b/target_explorer/features/org.eclipse.tcf.te.feature/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2012, 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 diff --git a/target_explorer/features/org.eclipse.tcf.te.sdk.feature/build.properties b/target_explorer/features/org.eclipse.tcf.te.sdk.feature/build.properties index bf84db6fd..d9e56c50b 100644 --- a/target_explorer/features/org.eclipse.tcf.te.sdk.feature/build.properties +++ b/target_explorer/features/org.eclipse.tcf.te.sdk.feature/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2012, 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 diff --git a/target_explorer/features/org.eclipse.tcf.te.tcf.core.feature/build.properties b/target_explorer/features/org.eclipse.tcf.te.tcf.core.feature/build.properties index 1fdbab450..1d47eae25 100644 --- a/target_explorer/features/org.eclipse.tcf.te.tcf.core.feature/build.properties +++ b/target_explorer/features/org.eclipse.tcf.te.tcf.core.feature/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2013 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2013, 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 diff --git a/target_explorer/features/org.eclipse.tcf.te.tcf.core.sdk.feature/build.properties b/target_explorer/features/org.eclipse.tcf.te.tcf.core.sdk.feature/build.properties index 1fdbab450..1d47eae25 100644 --- a/target_explorer/features/org.eclipse.tcf.te.tcf.core.sdk.feature/build.properties +++ b/target_explorer/features/org.eclipse.tcf.te.tcf.core.sdk.feature/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2013 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2013, 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 diff --git a/target_explorer/features/org.eclipse.tcf.te.tcf.feature/build.properties b/target_explorer/features/org.eclipse.tcf.te.tcf.feature/build.properties index bf84db6fd..d9e56c50b 100644 --- a/target_explorer/features/org.eclipse.tcf.te.tcf.feature/build.properties +++ b/target_explorer/features/org.eclipse.tcf.te.tcf.feature/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2012, 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 diff --git a/target_explorer/features/org.eclipse.tcf.te.tcf.launch.cdt.feature/build.properties b/target_explorer/features/org.eclipse.tcf.te.tcf.launch.cdt.feature/build.properties index bf84db6fd..d9e56c50b 100644 --- a/target_explorer/features/org.eclipse.tcf.te.tcf.launch.cdt.feature/build.properties +++ b/target_explorer/features/org.eclipse.tcf.te.tcf.launch.cdt.feature/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2012, 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 diff --git a/target_explorer/features/org.eclipse.tcf.te.tcf.launch.cdt.sdk.feature/build.properties b/target_explorer/features/org.eclipse.tcf.te.tcf.launch.cdt.sdk.feature/build.properties index bf84db6fd..d9e56c50b 100644 --- a/target_explorer/features/org.eclipse.tcf.te.tcf.launch.cdt.sdk.feature/build.properties +++ b/target_explorer/features/org.eclipse.tcf.te.tcf.launch.cdt.sdk.feature/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2012, 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 diff --git a/target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/build.properties b/target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/build.properties index bf84db6fd..d9e56c50b 100644 --- a/target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/build.properties +++ b/target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2012, 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 diff --git a/target_explorer/features/org.eclipse.tcf.te.terminals.feature/build.properties b/target_explorer/features/org.eclipse.tcf.te.terminals.feature/build.properties index bf84db6fd..d9e56c50b 100644 --- a/target_explorer/features/org.eclipse.tcf.te.terminals.feature/build.properties +++ b/target_explorer/features/org.eclipse.tcf.te.terminals.feature/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2012, 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 diff --git a/target_explorer/features/org.eclipse.tcf.te.terminals.sdk.feature/build.properties b/target_explorer/features/org.eclipse.tcf.te.terminals.sdk.feature/build.properties index bf84db6fd..d9e56c50b 100644 --- a/target_explorer/features/org.eclipse.tcf.te.terminals.sdk.feature/build.properties +++ b/target_explorer/features/org.eclipse.tcf.te.terminals.sdk.feature/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/build.properties index e8d9fa711..61fc214f5 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/build.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/build.properties @@ -1,17 +1,17 @@ -###############################################################################
-# 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,\
- plugin.xml,\
- about.html
-src.includes = schema/
+############################################################################### +# Copyright (c) 2012, 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,\ + plugin.xml,\ + about.html +src.includes = schema/ diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/plugin.properties index 6593a1b85..1339cb6aa 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/plugin.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/plugin.properties @@ -1,5 +1,5 @@ ################################################################################## -# Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/activator/CoreBundleActivator.java index 165ff93d7..2c46a2e8a 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/activator/CoreBundleActivator.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/activator/CoreBundleActivator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/adapters/internal/AdapterFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/adapters/internal/AdapterFactory.java index 10b41799f..a16d1b25f 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/adapters/internal/AdapterFactory.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/adapters/internal/AdapterFactory.java @@ -1,48 +1,48 @@ -/*******************************************************************************
- * 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.launch.core.adapters.internal;
-
-import org.eclipse.core.expressions.ICountable;
-import org.eclipse.core.expressions.IIterable;
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.tcf.te.launch.core.selection.interfaces.ISelectionContext;
-
-/**
- * Launch core framework adapter factory implementation.
- */
-public class AdapterFactory implements IAdapterFactory {
-
- private static final Class<?>[] CLASSES = new Class[] {
- IIterable.class,
- ICountable.class
- };
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- @Override
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- if (adaptableObject instanceof ISelectionContext) {
- if (IIterable.class.equals(adapterType) || ICountable.class.equals(adapterType)) {
- return new SelectionContextAdapter((ISelectionContext)adaptableObject);
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
- */
- @Override
- public Class[] getAdapterList() {
- return CLASSES;
- }
-
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.launch.core.adapters.internal; + +import org.eclipse.core.expressions.ICountable; +import org.eclipse.core.expressions.IIterable; +import org.eclipse.core.runtime.IAdapterFactory; +import org.eclipse.tcf.te.launch.core.selection.interfaces.ISelectionContext; + +/** + * Launch core framework adapter factory implementation. + */ +public class AdapterFactory implements IAdapterFactory { + + private static final Class<?>[] CLASSES = new Class[] { + IIterable.class, + ICountable.class + }; + + /* (non-Javadoc) + * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class) + */ + @Override + public Object getAdapter(Object adaptableObject, Class adapterType) { + if (adaptableObject instanceof ISelectionContext) { + if (IIterable.class.equals(adapterType) || ICountable.class.equals(adapterType)) { + return new SelectionContextAdapter((ISelectionContext)adaptableObject); + } + } + return null; + } + + /* (non-Javadoc) + * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList() + */ + @Override + public Class[] getAdapterList() { + return CLASSES; + } + +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/adapters/internal/SelectionContextAdapter.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/adapters/internal/SelectionContextAdapter.java index 177e26fec..724b92c53 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/adapters/internal/SelectionContextAdapter.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/adapters/internal/SelectionContextAdapter.java @@ -1,61 +1,61 @@ -/*******************************************************************************
- * 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.launch.core.adapters.internal;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Iterator;
-
-import org.eclipse.core.expressions.ICountable;
-import org.eclipse.core.expressions.IIterable;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.tcf.te.launch.core.selection.interfaces.ISelectionContext;
-
-/**
- * Selection context adapter implementation.
- */
-public class SelectionContextAdapter implements IIterable, ICountable {
- private final ISelectionContext context;
-
- /**
- * Constructor.
- *
- * @param context The selection context. Must not be <code>null</code>.
- */
- public SelectionContextAdapter(ISelectionContext context) {
- Assert.isNotNull(context);
- this.context = context;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.expressions.ICountable#count()
- */
- @Override
- public int count() {
- return context.getSelections() != null ? context.getSelections().length : 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.expressions.IIterable#iterator()
- */
- @Override
- public Iterator iterator() {
- Iterator<Object> iterator = null;
-
- if (context.getSelections() != null) {
- iterator = Arrays.asList(context.getSelections()).iterator();
- } else {
- iterator = Collections.emptyList().iterator();
- }
-
- return iterator;
- }
-
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.launch.core.adapters.internal; + +import java.util.Arrays; +import java.util.Collections; +import java.util.Iterator; + +import org.eclipse.core.expressions.ICountable; +import org.eclipse.core.expressions.IIterable; +import org.eclipse.core.runtime.Assert; +import org.eclipse.tcf.te.launch.core.selection.interfaces.ISelectionContext; + +/** + * Selection context adapter implementation. + */ +public class SelectionContextAdapter implements IIterable, ICountable { + private final ISelectionContext context; + + /** + * Constructor. + * + * @param context The selection context. Must not be <code>null</code>. + */ + public SelectionContextAdapter(ISelectionContext context) { + Assert.isNotNull(context); + this.context = context; + } + + /* (non-Javadoc) + * @see org.eclipse.core.expressions.ICountable#count() + */ + @Override + public int count() { + return context.getSelections() != null ? context.getSelections().length : 0; + } + + /* (non-Javadoc) + * @see org.eclipse.core.expressions.IIterable#iterator() + */ + @Override + public Iterator iterator() { + Iterator<Object> iterator = null; + + if (context.getSelections() != null) { + iterator = Arrays.asList(context.getSelections()).iterator(); + } else { + iterator = Collections.emptyList().iterator(); + } + + return iterator; + } + +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/LaunchConfigTypeBindingsManager.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/LaunchConfigTypeBindingsManager.java index 821ea588d..ce9e63c47 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/LaunchConfigTypeBindingsManager.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/LaunchConfigTypeBindingsManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/interfaces/ILaunchBinding.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/interfaces/ILaunchBinding.java index 4560467e3..19e1a32af 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/interfaces/ILaunchBinding.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/interfaces/ILaunchBinding.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/interfaces/IOverwritableLaunchBinding.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/interfaces/IOverwritableLaunchBinding.java index 4aed764b2..24ad6cb3a 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/interfaces/IOverwritableLaunchBinding.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/interfaces/IOverwritableLaunchBinding.java @@ -1,24 +1,24 @@ -/*******************************************************************************
- * 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.launch.core.bindings.interfaces;
-
-/**
- * Interface to be implemented by a overwritable launch configuration type binding element.
- */
-public interface IOverwritableLaunchBinding extends ILaunchBinding {
-
- /**
- * Returns if or if not this binding overwrites the given bindings id.
- *
- * @param id The id. Must not be <code>null</code>.
- * @return <code>True</code> if this binding overwrites the given bindings id, <code>false</code> if not.
- */
- public boolean overwrites(String id);
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.launch.core.bindings.interfaces; + +/** + * Interface to be implemented by a overwritable launch configuration type binding element. + */ +public interface IOverwritableLaunchBinding extends ILaunchBinding { + + /** + * Returns if or if not this binding overwrites the given bindings id. + * + * @param id The id. Must not be <code>null</code>. + * @return <code>True</code> if this binding overwrites the given bindings id, <code>false</code> if not. + */ + public boolean overwrites(String id); +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/LaunchBinding.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/LaunchBinding.java index 737d67dae..b25f0c082 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/LaunchBinding.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/LaunchBinding.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/LaunchConfigTypeBinding.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/LaunchConfigTypeBinding.java index dc291ae8e..003f57057 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/LaunchConfigTypeBinding.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/LaunchConfigTypeBinding.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/LaunchConfigTypeUnBinding.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/LaunchConfigTypeUnBinding.java index bf1b40c30..cb22b81ab 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/LaunchConfigTypeUnBinding.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/LaunchConfigTypeUnBinding.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/OverwritableLaunchBinding.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/OverwritableLaunchBinding.java index 21c73cdb1..ff17fdcdd 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/OverwritableLaunchBinding.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/OverwritableLaunchBinding.java @@ -1,71 +1,71 @@ -/*******************************************************************************
- * 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.launch.core.bindings.internal;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.tcf.te.launch.core.bindings.interfaces.IOverwritableLaunchBinding;
-
-/**
- * Overwritable launch configuration type binding element implementation.
- */
-public class OverwritableLaunchBinding extends LaunchBinding implements IOverwritableLaunchBinding {
-
- private String[] overwrites;
-
- /**
- * Constructor.
- *
- * @param id The launch binding id. Must not be <code>null</code>.
- * @param overwrites The overwritten launch binding id's or <code>null</code>.
- * @param modes The launch modes or <code>null</code>
- */
- public OverwritableLaunchBinding(String id, String overwrites, String modes) {
- super(id, modes);
-
- if (overwrites != null) {
- this.overwrites = overwrites.trim().split("( )*,( )*"); //$NON-NLS-1$
- }
- else {
- this.overwrites = new String[0];
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.core.bindings.interfaces.IOverwritableLaunchBinding#overwrites(java.lang.String)
- */
- @Override
- public boolean overwrites(String id) {
- Assert.isNotNull(id);
- for (String overwrite : overwrites) {
- if (id.equals(overwrite)) {
- return true;
- }
- }
- return overwrites.length == 0;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString() {
- StringBuffer toString = new StringBuffer();
-
- toString.append("OverwriteableLaunchBinding("); //$NON-NLS-1$
- toString.append(getId());
- toString.append(", launchModes"); //$NON-NLS-1$
- toString.append(toString(getModes()));
- toString.append(", overwrites"); //$NON-NLS-1$
- toString.append(toString(overwrites));
- toString.append(")"); //$NON-NLS-1$
-
- return toString.toString();
- }
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.launch.core.bindings.internal; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.tcf.te.launch.core.bindings.interfaces.IOverwritableLaunchBinding; + +/** + * Overwritable launch configuration type binding element implementation. + */ +public class OverwritableLaunchBinding extends LaunchBinding implements IOverwritableLaunchBinding { + + private String[] overwrites; + + /** + * Constructor. + * + * @param id The launch binding id. Must not be <code>null</code>. + * @param overwrites The overwritten launch binding id's or <code>null</code>. + * @param modes The launch modes or <code>null</code> + */ + public OverwritableLaunchBinding(String id, String overwrites, String modes) { + super(id, modes); + + if (overwrites != null) { + this.overwrites = overwrites.trim().split("( )*,( )*"); //$NON-NLS-1$ + } + else { + this.overwrites = new String[0]; + } + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.core.bindings.interfaces.IOverwritableLaunchBinding#overwrites(java.lang.String) + */ + @Override + public boolean overwrites(String id) { + Assert.isNotNull(id); + for (String overwrite : overwrites) { + if (id.equals(overwrite)) { + return true; + } + } + return overwrites.length == 0; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + StringBuffer toString = new StringBuffer(); + + toString.append("OverwriteableLaunchBinding("); //$NON-NLS-1$ + toString.append(getId()); + toString.append(", launchModes"); //$NON-NLS-1$ + toString.append(toString(getModes())); + toString.append(", overwrites"); //$NON-NLS-1$ + toString.append(toString(overwrites)); + toString.append(")"); //$NON-NLS-1$ + + return toString.toString(); + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/PropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/PropertyTester.java index 6b36311ac..c4153b910 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/PropertyTester.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/PropertyTester.java @@ -1,79 +1,79 @@ -/*******************************************************************************
- * 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.launch.core.bindings.internal;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.tcf.te.launch.core.bindings.LaunchConfigTypeBindingsManager;
-import org.eclipse.tcf.te.launch.core.selection.LaunchSelection;
-import org.eclipse.tcf.te.launch.core.selection.ProjectSelectionContext;
-import org.eclipse.tcf.te.launch.core.selection.RemoteSelectionContext;
-import org.eclipse.tcf.te.launch.core.selection.interfaces.ISelectionContext;
-import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
-import org.eclipse.tcf.te.runtime.model.interfaces.IModelNodeProvider;
-
-/**
- * Launch property tester.
- */
-public class PropertyTester extends org.eclipse.core.expressions.PropertyTester {
-
- /* (non-Javadoc)
- * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
- */
- @Override
- public boolean test(final Object receiver, String property, Object[] args, Object expectedValue) {
-
- if ("launchMode".equals(property) && expectedValue instanceof String) { //$NON-NLS-1$
- if (receiver instanceof ILaunch) {
- return ((ILaunch)receiver).getLaunchMode().equalsIgnoreCase((String)expectedValue);
- }
- }
- else if ("isValidLaunchConfigType".equals(property) && expectedValue instanceof String) { //$NON-NLS-1$
- ISelectionContext selContext = null;
- if (receiver instanceof IModelNodeProvider) {
- selContext = new RemoteSelectionContext(((IModelNodeProvider)receiver).getModelNode(), true);
- }
- else if (receiver instanceof IResource) {
- selContext = new ProjectSelectionContext(((IResource)receiver).getProject(), true);
- }
- else if (receiver instanceof IProject) {
- selContext = new ProjectSelectionContext((IProject)receiver, true);
- }
- else if (receiver instanceof IAdaptable) {
- IProject project = (IProject)((IAdaptable)receiver).getAdapter(IProject.class);
- if (project != null) {
- selContext = new ProjectSelectionContext(project, true);
- }
- else {
- IResource resource = (IResource)((IAdaptable)receiver).getAdapter(IResource.class);
- if (resource != null) {
- selContext = new ProjectSelectionContext(resource.getProject(), true);
- }
- else {
- IModelNode modelNode = (IModelNode)((IAdaptable)receiver).getAdapter(IModelNode.class);
- if (modelNode != null) {
- selContext = new RemoteSelectionContext(modelNode, true);
- }
- }
- }
- }
- if (selContext != null) {
- return LaunchConfigTypeBindingsManager.getInstance().isValidLaunchConfigType(
- (String)expectedValue,
- new LaunchSelection(
- (args != null && args.length > 0 ? args[0].toString() : null),
- selContext));
- }
- }
- return false;
- }
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.launch.core.bindings.internal; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.debug.core.ILaunch; +import org.eclipse.tcf.te.launch.core.bindings.LaunchConfigTypeBindingsManager; +import org.eclipse.tcf.te.launch.core.selection.LaunchSelection; +import org.eclipse.tcf.te.launch.core.selection.ProjectSelectionContext; +import org.eclipse.tcf.te.launch.core.selection.RemoteSelectionContext; +import org.eclipse.tcf.te.launch.core.selection.interfaces.ISelectionContext; +import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode; +import org.eclipse.tcf.te.runtime.model.interfaces.IModelNodeProvider; + +/** + * Launch property tester. + */ +public class PropertyTester extends org.eclipse.core.expressions.PropertyTester { + + /* (non-Javadoc) + * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object) + */ + @Override + public boolean test(final Object receiver, String property, Object[] args, Object expectedValue) { + + if ("launchMode".equals(property) && expectedValue instanceof String) { //$NON-NLS-1$ + if (receiver instanceof ILaunch) { + return ((ILaunch)receiver).getLaunchMode().equalsIgnoreCase((String)expectedValue); + } + } + else if ("isValidLaunchConfigType".equals(property) && expectedValue instanceof String) { //$NON-NLS-1$ + ISelectionContext selContext = null; + if (receiver instanceof IModelNodeProvider) { + selContext = new RemoteSelectionContext(((IModelNodeProvider)receiver).getModelNode(), true); + } + else if (receiver instanceof IResource) { + selContext = new ProjectSelectionContext(((IResource)receiver).getProject(), true); + } + else if (receiver instanceof IProject) { + selContext = new ProjectSelectionContext((IProject)receiver, true); + } + else if (receiver instanceof IAdaptable) { + IProject project = (IProject)((IAdaptable)receiver).getAdapter(IProject.class); + if (project != null) { + selContext = new ProjectSelectionContext(project, true); + } + else { + IResource resource = (IResource)((IAdaptable)receiver).getAdapter(IResource.class); + if (resource != null) { + selContext = new ProjectSelectionContext(resource.getProject(), true); + } + else { + IModelNode modelNode = (IModelNode)((IAdaptable)receiver).getAdapter(IModelNode.class); + if (modelNode != null) { + selContext = new RemoteSelectionContext(modelNode, true); + } + } + } + } + if (selContext != null) { + return LaunchConfigTypeBindingsManager.getInstance().isValidLaunchConfigType( + (String)expectedValue, + new LaunchSelection( + (args != null && args.length > 0 ? args[0].toString() : null), + selContext)); + } + } + return false; + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/computers/SourcePathComputerDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/computers/SourcePathComputerDelegate.java index 257435209..657796015 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/computers/SourcePathComputerDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/computers/SourcePathComputerDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/delegates/Launch.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/delegates/Launch.java index e44419c71..f5e383e06 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/delegates/Launch.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/delegates/Launch.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/exceptions/LaunchServiceException.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/exceptions/LaunchServiceException.java index fcf9f42e6..054527634 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/exceptions/LaunchServiceException.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/exceptions/LaunchServiceException.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/interfaces/IReferencedProjectItem.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/interfaces/IReferencedProjectItem.java index 8411aeeee..49bca8000 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/interfaces/IReferencedProjectItem.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/interfaces/IReferencedProjectItem.java @@ -1,32 +1,32 @@ -/*******************************************************************************
- * 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.launch.core.interfaces;
-
-import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
-
-/**
- * IFileTransferItem
- */
-public interface IReferencedProjectItem extends IPropertiesContainer {
-
- public static final String PROPERTY_ENABLED = "enabled"; //$NON-NLS-1$
- public static final String PROPERTY_PROJECT_NAME = "project_name"; //$NON-NLS-1$
-
- /**
- * Return <code>true</code> if the item is enabled.
- */
- public boolean isEnabled();
-
- /**
- * Return the project name.
- */
- public String getProjectName();
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.launch.core.interfaces; + +import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer; + +/** + * IFileTransferItem + */ +public interface IReferencedProjectItem extends IPropertiesContainer { + + public static final String PROPERTY_ENABLED = "enabled"; //$NON-NLS-1$ + public static final String PROPERTY_PROJECT_NAME = "project_name"; //$NON-NLS-1$ + + /** + * Return <code>true</code> if the item is enabled. + */ + public boolean isEnabled(); + + /** + * Return the project name. + */ + public String getProjectName(); +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/interfaces/tracing/ITraceIds.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/interfaces/tracing/ITraceIds.java index f33c10aad..088249338 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/interfaces/tracing/ITraceIds.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/interfaces/tracing/ITraceIds.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/internal/GsonFileTransferItemPersistenceDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/internal/GsonFileTransferItemPersistenceDelegate.java index 39daa2472..78e9e1bfa 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/internal/GsonFileTransferItemPersistenceDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/internal/GsonFileTransferItemPersistenceDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/internal/GsonLaunchConfigAttributesPersistenceDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/internal/GsonLaunchConfigAttributesPersistenceDelegate.java index 2fc1317b5..4504eb398 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/internal/GsonLaunchConfigAttributesPersistenceDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/internal/GsonLaunchConfigAttributesPersistenceDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/internal/GsonReferencedProjectItemPersistenceDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/internal/GsonReferencedProjectItemPersistenceDelegate.java index 7041eff0f..af6824629 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/internal/GsonReferencedProjectItemPersistenceDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/internal/GsonReferencedProjectItemPersistenceDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchAttribute.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchAttribute.java index f958cf0ff..4d98459e3 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchAttribute.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchAttribute.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchConfigHelper.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchConfigHelper.java index e8d471eab..1fe7c4741 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchConfigHelper.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchConfigHelper.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchConfigSorter.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchConfigSorter.java index 2be5b266c..c53a2a042 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchConfigSorter.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchConfigSorter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchManager.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchManager.java index 45022fd48..6fcc41ac0 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchManager.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchManager.java @@ -1,419 +1,419 @@ -/*******************************************************************************
- * 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.launch.core.lm;
-
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.tcf.te.launch.core.activator.CoreBundleActivator;
-import org.eclipse.tcf.te.launch.core.bindings.LaunchConfigTypeBindingsManager;
-import org.eclipse.tcf.te.launch.core.exceptions.LaunchServiceException;
-import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchAttribute;
-import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchManagerDelegate;
-import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification;
-import org.eclipse.tcf.te.launch.core.nls.Messages;
-
-/**
- * The Launch Manager is the management interface for the launch configuration storage layer.
- * Through the launch manager, launch configuration of the several types can be accessed, searched
- * and initialized. For every possible launch configuration type, a corresponding launch manager
- * delegate must be registered which is responsible for handling the corresponding attributes of the
- * specific launch configuration type. In the case the no launch manager delegate is registered for
- * a launch configuration type, the launch configuration will not be initialized and therefore will
- * not have any default attribute. If more than one launch manager delegates are contributed for the
- * same launch configuration type, the first registered launch manager delegates will be used and the
- * registration of any other delegate for this type will fail!
- */
-public class LaunchManager extends PlatformObject {
-
- /*
- * Thread save singleton instance creation.
- */
- private static class LazyInstanceHolder {
- public static LaunchManager instance = new LaunchManager();
- }
-
- /**
- * Returns the singleton instance for the manager.
- */
- public static LaunchManager getInstance() {
- return LazyInstanceHolder.instance;
- }
-
- /**
- * Constructor.
- */
- LaunchManager() {
- super();
- }
-
- /**
- * Returns the corresponding launch manager delegate instance responsible for the specified
- * launch configuration type. The method may return a default launch manager delegate if no
- * specific launch manager delegate is registered for the specified launch configuration type.
- *
- * @param launchConfigType The launch configuration type to get the launch manager delegate for.
- * Must not be <code>null</code>!
- * @param launchMode The launch mode to get the launch manager delegate for. Must not be
- * <code>null</code>.
- * @return The corresponding launch manager delegate instance.
- */
- public ILaunchManagerDelegate getLaunchManagerDelegate(ILaunchConfigurationType launchConfigType, String launchMode) {
- Assert.isNotNull(launchConfigType);
- Assert.isNotNull(launchMode);
- return LaunchConfigTypeBindingsManager.getInstance().getLaunchManagerDelegate(launchConfigType.getIdentifier(), launchMode);
- }
-
- /**
- * Returns the corresponding launch configuration type for the given launch configuration type
- * id and the given launch mode.
- *
- * @param launchConfigTypeId The unique id of the launch configuration type requested.
- * @param launchMode The launch mode the launch configuration type must support. See
- * <code>org.eclipse.debug.core.ILaunchManager</code> for details.
- * @return The corresponding launch configuration type instance or <code>null</code> if not
- * found or the specified mode is not supported.
- */
- public ILaunchConfigurationType getLaunchConfigType(String launchConfigTypeId, String launchMode) {
- ILaunchConfigurationType launchConfigType = DebugPlugin.getDefault().getLaunchManager()
- .getLaunchConfigurationType(launchConfigTypeId);
- if (launchConfigType != null && !launchConfigType.supportsMode(launchMode)) {
- launchConfigType = null;
- }
- return launchConfigType;
- }
-
- /**
- * Returns an fully initialized launch configuration. The launch configuration type and the
- * launch mode required to create or look up the launch configuration, are specified through the
- * given launch specification. Any launch configuration attribute of the certain type which is
- * not explicitly overwritten by an attribute specified through the given launch specification
- * will be initialized with default values.
- * <p>
- * If <code>forceNewConfig</code> is <code>false</code>, the method tries to find a matching
- * existing launch configuration. If no existing launch configuration can be found, a new
- * launch configuration will created instead.
- *
- * @param launchSpec A set of non default launch configuration attributes. Must not be
- * <code>null</code>, but the list of attributes may empty to get an launch
- * configuration with all attributes initialized to default values.
- * @param createNew If <code>true</code>, a new launch configuration will be created if no
- * available is found.
- * @return The launch configuration instance matching the given parameters.
- * @throws <code>LaunchServiceException</code> in case the launch configuration instance
- * cannot be created, found and/or modified. The exception message describes the failure
- * details.
- */
- public ILaunchConfiguration getLaunchConfiguration(ILaunchSpecification launchSpec, boolean createNew) throws LaunchServiceException {
- Assert.isNotNull(launchSpec);
-
- ILaunchConfiguration launchConfig = null;
- try {
- // get all launch configurations for launch configuration type id and launch mode
- String launchConfigTypeId = launchSpec.getLaunchConfigurationTypeId();
- String launchMode = launchSpec.getLaunchMode();
- ILaunchConfigurationType launchConfigType = getLaunchConfigType(launchConfigTypeId, launchMode);
- ILaunchConfiguration[] configs = DebugPlugin.getDefault().getLaunchManager()
- .getLaunchConfigurations(launchConfigType);
-
- // get list of fully and closest matching launch configurations
- ILaunchConfiguration[] matchingConfigs = getLaunchManagerDelegate(launchConfigType, launchMode)
- .getMatchingLaunchConfigurations(launchSpec, configs);
-
- // return best matching launch configuration
- if (matchingConfigs.length > 0) {
- launchConfig = matchingConfigs[0];
- }
- }
- catch (LaunchServiceException e) {
- if (e.getType() == LaunchServiceException.TYPE_MISSING_LAUNCH_SPEC_ATTR) {
- throw e;
- }
- }
- catch (CoreException e) {
- throw new LaunchServiceException(e.getMessage());
- }
- // return new launch configuration if no matching or best matching configuration is found
- if (createNew && launchConfig == null) {
- launchConfig = createOrUpdateLaunchConfiguration(null, launchSpec);
- }
- return launchConfig;
- }
-
- /**
- * Create a new or updates an existing launch configuration of the requested type and initialize
- * the configuration with the given launch specification. Attributes not listed by the given
- * launch specification will be initialized with default values.
- *
- * @param launchConfig A launch configuration to update or <code>null</code> if a new launch
- * configuration should be created.
- * @param launchSpec A set of non default launch configuration attributes.
- * @return The newly create launch configuration instance.
- *
- * @throws <code>LaunchServiceException</code> in case the launch configuration instance
- * cannot be created or mandatory attributes are missing in the launch specification.
- * The exception message describes the failure details.
- */
- public ILaunchConfiguration createOrUpdateLaunchConfiguration(ILaunchConfiguration launchConfig, ILaunchSpecification launchSpec) throws LaunchServiceException {
- return this.createOrUpdateLaunchConfiguration(launchConfig, launchSpec, true);
- }
-
- /**
- * Create a new or updates an existing launch configuration of the requested type and initialize
- * the configuration with the given launch specification. Attributes not listed by the given
- * launch specification will be initialized with default values.
- *
- * @param launchConfig A launch configuration to update or <code>null</code> if a new launch
- * configuration should be created.
- * @param launchSpec A set of non default launch configuration attributes.
- * @param validateSpec Validate the launch specification in the <code>launchSpec</code>
- * parameter. If <code>false</code>, it will attempt to create the launch
- * configuration even if some of the mandatory parameters are missing.
- * @return The newly create launch configuration instance.
- *
- * @throws <code>LaunchServiceException</code> in case the launch configuration instance
- * cannot be created or mandatory attributes are missing in the launch specification.
- * The exception message describes the failure details.
- *
- * @since 3.2
- */
- public ILaunchConfiguration createOrUpdateLaunchConfiguration(ILaunchConfiguration launchConfig, ILaunchSpecification launchSpec, boolean validateSpec) throws LaunchServiceException {
- Assert.isNotNull(launchSpec);
-
- String launchConfigTypeId = launchSpec.getLaunchConfigurationTypeId();
- String launchMode = launchSpec.getLaunchMode();
-
- ILaunchConfigurationType launchConfigType = getLaunchConfigType(launchConfigTypeId, launchMode);
- try {
- if (launchConfigType != null) {
- // get the launch manager delegate instance for the requested launch configuration
- // type
- ILaunchManagerDelegate delegate = getLaunchManagerDelegate(launchConfigType, launchMode);
- if (validateSpec) {
- delegate.validate(launchSpec);
- }
- ILaunchConfigurationWorkingCopy wc = null;
- if (launchConfig == null || !launchConfig.getType().getIdentifier()
- .equals(launchConfigTypeId)) {
- try {
- // create the launch configuration working copy instance
- wc = launchConfigType.newInstance(null, LaunchConfigHelper.getUniqueLaunchConfigName(launchSpec.getLaunchConfigName()));
- // initialize the launch configuration working copy
- delegate.initLaunchConfigAttributes(wc, launchSpec);
- // and save the launch configuration
- return wc.doSave();
- }
- catch (CoreException e) {
- throw new LaunchServiceException(Messages.LaunchManager_error_failedToCreateConfig);
- }
- }
- try {
- // get a launch configration working copy
- if (launchConfig instanceof ILaunchConfigurationWorkingCopy) {
- wc = (ILaunchConfigurationWorkingCopy) launchConfig;
- }
- else {
- wc = launchConfig.getWorkingCopy();
- }
- // update the launch configuration working copy
- delegate.updateLaunchConfigAttributes(wc, launchSpec);
- // and save the launch configuration
- return (wc.isDirty()) ? wc.doSave() : launchConfig;
- }
- catch (CoreException e) {
- throw new LaunchServiceException(NLS.bind(Messages.LaunchManager_error_failedToUpdateConfig, launchConfig.getName()));
- }
- }
- }
- catch (CoreException e) {
- // do nothing, because exception is thrown afterwards if this point is reached.
- }
- throw new LaunchServiceException(NLS.bind(Messages.LaunchManager_error_noLaunchConfigType, launchMode));
- }
-
- /**
- * Delete the specified launch configuration.
- * <p>
- * In case any error occurs during the delete, the exception is logged to the Eclipse error log.
- *
- * @param launchConfig The launch configuration to delete.
- */
- public void deleteLaunchConfiguration(ILaunchConfiguration launchConfig) {
- if (launchConfig != null) {
- try {
- launchConfig.delete();
- }
- catch (CoreException e) {
- IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(),
- Messages.LaunchManager_error_deleteLaunchConfig, e);
- Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(status);
- }
- }
- }
-
- /**
- * Creates an exact copy of the given launch specification.
- * <p>
- * <b>Note:</b> The method returns always an launch specification which has not locked out
- * modifications. The corresponding read-only flag from the original is not duplicated to the
- * copy!
- *
- * @param launchSpec The launch specification to duplication.
- * @return A new <code>ILaunchSpecification</code> instance containing the same data as the
- * original, or <code>null</code>.
- */
- public ILaunchSpecification duplicate(ILaunchSpecification launchSpec) {
- if (launchSpec != null) {
- ILaunchSpecification newLaunchSpec = new LaunchSpecification(launchSpec.getLaunchConfigurationTypeId(), launchSpec.getLaunchMode());
- if (!launchSpec.isEmpty()) {
- ILaunchAttribute[] attributes = launchSpec.getAllAttributes();
- for (ILaunchAttribute attribute : attributes) {
- newLaunchSpec.addAttribute(attribute.getKey(), attribute.getValue());
- }
- }
- return newLaunchSpec;
- }
- return null;
- }
-
- /**
- * Validates a launch configuration.
- *
- * @param launchConfig The launch configuration to validate.
- * @param launchMode The launch mode. Can be <code>null</code>, in this case the launch configuration
- * is valid when valid for all supported modes.
- * @return <code>true</code>, if the launch configuration is valid and can be executed (launched).
- */
- public boolean validate(ILaunchConfiguration launchConfig, String launchMode) {
- try {
- if (launchMode == null) {
- boolean valid = false;
- for (String mode : LaunchConfigHelper.getLaunchConfigTypeModes(launchConfig.getType(), false)) {
- if (launchConfig.supportsMode(mode) && validate(launchConfig, mode)) {
- valid = true;
- }
- }
- return valid;
- }
- ILaunchManagerDelegate delegate = getLaunchManagerDelegate(launchConfig.getType(), launchMode);
- try {
- delegate.validate(launchMode, launchConfig);
- }
- catch (LaunchServiceException e) {
- return false;
- }
-
- }
- catch (CoreException e) {
- }
- return true;
- }
-
- /**
- * Transform the specified launch configuration into a corresponding launch specification
- * object. If <code>withDefaultAttributes</code> is not set, the corresponding launch manager
- * delegate is called to determine if an attribute has a default value or not. If the attribute
- * has an default value, this attribute is not copied to the launch specification. If
- * <code>withDefaultAttributes</code> is set, all attributes are copied to the launch
- * specification object.
- *
- * @param launchConfig The launch configuration. Must not be <code>null</code>.
- * @param launchMode The launch mode the launch specification should be for. See
- * <code>ILaunchManager</code> for details.
- * @param withDefaultAttributes Set to <code>true</code> to copy attributes with default value
- * as well, <code>false</code> otherwise.
- *
- * @return The corresponding launch specification object or <code>null</code>.
- *
- * @throws <code>LaunchServiceException</code> in case the launch configuration could not be
- * transformed to a launch specification. The exception message describes the failure
- * details.
- */
- public ILaunchSpecification createSpecFromConfig(ILaunchConfiguration launchConfig, String launchMode, boolean withDefaultAttributes) throws LaunchServiceException {
- Assert.isNotNull(launchConfig);
-
- ILaunchSpecification spec = null;
- try {
- // extract the launch configuration type
- ILaunchConfigurationType type = launchConfig.getType();
- spec = new LaunchSpecification(type.getIdentifier(), launchMode);
- // get the launch manager delegate for the specific type
- ILaunchManagerDelegate delegate = getLaunchManagerDelegate(type, launchMode);
- // get all the launch configuration attributes
- Map<String, Object> attributes = launchConfig.getAttributes();
- // loop over all listed attributes and copy them to the specification
- Iterator<Entry<String, Object>> iterator = attributes.entrySet().iterator();
- while (iterator.hasNext()) {
- Entry<String, Object> entry = iterator.next();
- if (withDefaultAttributes) {
- // include the default attributes. So, just copy the stuff over.
- spec.addAttribute(entry.getKey(), entry.getValue());
- }
- else {
- // exclude the default attributes. We have to find out if the attribute is
- // set with default value.
- Object attributeValue = entry.getValue();
- if (!delegate.isDefaultAttribute(entry.getKey(), attributeValue, attributeValue, spec, launchConfig, launchMode)) {
- spec.addAttribute(entry.getKey(), attributeValue);
- }
- }
- }
- }
- catch (CoreException e) {
- spec = null;
- throw new LaunchServiceException(e);
- }
- return spec;
- }
-
- /**
- * Launch the specified launch configuration using the corresponding delegate for the specified
- * launch mode. If <code>buildBeforeLaunch</code> is set to <code>true</code>, the workspace
- * will be build before the launch.
- *
- * @param launchConfig The launch configuration to launch. Must not be <code>null</code>!
- * @param launchMode The launch mode (@see <code>org.eclipse.debug.core.ILaunchManager</code>.
- * Must not be <code>null</code>!
- * @param buildBeforeLaunch Specify <code>true</code> to build the workspace before launch,
- * <code>false</code> otherwise.
- *
- * @return The corresponding <code>ILaunch</code> object associated with this launch.
- *
- * @throws <code>LaunchServiceException</code> in case of any problem occurs during the launch sequence.
- */
- public ILaunch launch(ILaunchConfiguration launchConfig, String launchMode, boolean buildBeforeLaunch, IProgressMonitor monitor) throws LaunchServiceException {
- Assert.isNotNull(launchConfig);
- Assert.isNotNull(launchMode);
-
- try {
- ILaunchManagerDelegate delegate = getLaunchManagerDelegate(launchConfig.getType(), launchMode);
- delegate.validate(launchMode, launchConfig);
- return launchConfig.launch(launchMode, monitor, buildBeforeLaunch);
- }
- catch (CoreException e) {
- // re-pack into a launch service exception
- throw new LaunchServiceException(e);
- }
- }
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.launch.core.lm; + +import java.util.Iterator; +import java.util.Map; +import java.util.Map.Entry; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.PlatformObject; +import org.eclipse.core.runtime.Status; +import org.eclipse.debug.core.DebugPlugin; +import org.eclipse.debug.core.ILaunch; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationType; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.osgi.util.NLS; +import org.eclipse.tcf.te.launch.core.activator.CoreBundleActivator; +import org.eclipse.tcf.te.launch.core.bindings.LaunchConfigTypeBindingsManager; +import org.eclipse.tcf.te.launch.core.exceptions.LaunchServiceException; +import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchAttribute; +import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchManagerDelegate; +import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification; +import org.eclipse.tcf.te.launch.core.nls.Messages; + +/** + * The Launch Manager is the management interface for the launch configuration storage layer. + * Through the launch manager, launch configuration of the several types can be accessed, searched + * and initialized. For every possible launch configuration type, a corresponding launch manager + * delegate must be registered which is responsible for handling the corresponding attributes of the + * specific launch configuration type. In the case the no launch manager delegate is registered for + * a launch configuration type, the launch configuration will not be initialized and therefore will + * not have any default attribute. If more than one launch manager delegates are contributed for the + * same launch configuration type, the first registered launch manager delegates will be used and the + * registration of any other delegate for this type will fail! + */ +public class LaunchManager extends PlatformObject { + + /* + * Thread save singleton instance creation. + */ + private static class LazyInstanceHolder { + public static LaunchManager instance = new LaunchManager(); + } + + /** + * Returns the singleton instance for the manager. + */ + public static LaunchManager getInstance() { + return LazyInstanceHolder.instance; + } + + /** + * Constructor. + */ + LaunchManager() { + super(); + } + + /** + * Returns the corresponding launch manager delegate instance responsible for the specified + * launch configuration type. The method may return a default launch manager delegate if no + * specific launch manager delegate is registered for the specified launch configuration type. + * + * @param launchConfigType The launch configuration type to get the launch manager delegate for. + * Must not be <code>null</code>! + * @param launchMode The launch mode to get the launch manager delegate for. Must not be + * <code>null</code>. + * @return The corresponding launch manager delegate instance. + */ + public ILaunchManagerDelegate getLaunchManagerDelegate(ILaunchConfigurationType launchConfigType, String launchMode) { + Assert.isNotNull(launchConfigType); + Assert.isNotNull(launchMode); + return LaunchConfigTypeBindingsManager.getInstance().getLaunchManagerDelegate(launchConfigType.getIdentifier(), launchMode); + } + + /** + * Returns the corresponding launch configuration type for the given launch configuration type + * id and the given launch mode. + * + * @param launchConfigTypeId The unique id of the launch configuration type requested. + * @param launchMode The launch mode the launch configuration type must support. See + * <code>org.eclipse.debug.core.ILaunchManager</code> for details. + * @return The corresponding launch configuration type instance or <code>null</code> if not + * found or the specified mode is not supported. + */ + public ILaunchConfigurationType getLaunchConfigType(String launchConfigTypeId, String launchMode) { + ILaunchConfigurationType launchConfigType = DebugPlugin.getDefault().getLaunchManager() + .getLaunchConfigurationType(launchConfigTypeId); + if (launchConfigType != null && !launchConfigType.supportsMode(launchMode)) { + launchConfigType = null; + } + return launchConfigType; + } + + /** + * Returns an fully initialized launch configuration. The launch configuration type and the + * launch mode required to create or look up the launch configuration, are specified through the + * given launch specification. Any launch configuration attribute of the certain type which is + * not explicitly overwritten by an attribute specified through the given launch specification + * will be initialized with default values. + * <p> + * If <code>forceNewConfig</code> is <code>false</code>, the method tries to find a matching + * existing launch configuration. If no existing launch configuration can be found, a new + * launch configuration will created instead. + * + * @param launchSpec A set of non default launch configuration attributes. Must not be + * <code>null</code>, but the list of attributes may empty to get an launch + * configuration with all attributes initialized to default values. + * @param createNew If <code>true</code>, a new launch configuration will be created if no + * available is found. + * @return The launch configuration instance matching the given parameters. + * @throws <code>LaunchServiceException</code> in case the launch configuration instance + * cannot be created, found and/or modified. The exception message describes the failure + * details. + */ + public ILaunchConfiguration getLaunchConfiguration(ILaunchSpecification launchSpec, boolean createNew) throws LaunchServiceException { + Assert.isNotNull(launchSpec); + + ILaunchConfiguration launchConfig = null; + try { + // get all launch configurations for launch configuration type id and launch mode + String launchConfigTypeId = launchSpec.getLaunchConfigurationTypeId(); + String launchMode = launchSpec.getLaunchMode(); + ILaunchConfigurationType launchConfigType = getLaunchConfigType(launchConfigTypeId, launchMode); + ILaunchConfiguration[] configs = DebugPlugin.getDefault().getLaunchManager() + .getLaunchConfigurations(launchConfigType); + + // get list of fully and closest matching launch configurations + ILaunchConfiguration[] matchingConfigs = getLaunchManagerDelegate(launchConfigType, launchMode) + .getMatchingLaunchConfigurations(launchSpec, configs); + + // return best matching launch configuration + if (matchingConfigs.length > 0) { + launchConfig = matchingConfigs[0]; + } + } + catch (LaunchServiceException e) { + if (e.getType() == LaunchServiceException.TYPE_MISSING_LAUNCH_SPEC_ATTR) { + throw e; + } + } + catch (CoreException e) { + throw new LaunchServiceException(e.getMessage()); + } + // return new launch configuration if no matching or best matching configuration is found + if (createNew && launchConfig == null) { + launchConfig = createOrUpdateLaunchConfiguration(null, launchSpec); + } + return launchConfig; + } + + /** + * Create a new or updates an existing launch configuration of the requested type and initialize + * the configuration with the given launch specification. Attributes not listed by the given + * launch specification will be initialized with default values. + * + * @param launchConfig A launch configuration to update or <code>null</code> if a new launch + * configuration should be created. + * @param launchSpec A set of non default launch configuration attributes. + * @return The newly create launch configuration instance. + * + * @throws <code>LaunchServiceException</code> in case the launch configuration instance + * cannot be created or mandatory attributes are missing in the launch specification. + * The exception message describes the failure details. + */ + public ILaunchConfiguration createOrUpdateLaunchConfiguration(ILaunchConfiguration launchConfig, ILaunchSpecification launchSpec) throws LaunchServiceException { + return this.createOrUpdateLaunchConfiguration(launchConfig, launchSpec, true); + } + + /** + * Create a new or updates an existing launch configuration of the requested type and initialize + * the configuration with the given launch specification. Attributes not listed by the given + * launch specification will be initialized with default values. + * + * @param launchConfig A launch configuration to update or <code>null</code> if a new launch + * configuration should be created. + * @param launchSpec A set of non default launch configuration attributes. + * @param validateSpec Validate the launch specification in the <code>launchSpec</code> + * parameter. If <code>false</code>, it will attempt to create the launch + * configuration even if some of the mandatory parameters are missing. + * @return The newly create launch configuration instance. + * + * @throws <code>LaunchServiceException</code> in case the launch configuration instance + * cannot be created or mandatory attributes are missing in the launch specification. + * The exception message describes the failure details. + * + * @since 3.2 + */ + public ILaunchConfiguration createOrUpdateLaunchConfiguration(ILaunchConfiguration launchConfig, ILaunchSpecification launchSpec, boolean validateSpec) throws LaunchServiceException { + Assert.isNotNull(launchSpec); + + String launchConfigTypeId = launchSpec.getLaunchConfigurationTypeId(); + String launchMode = launchSpec.getLaunchMode(); + + ILaunchConfigurationType launchConfigType = getLaunchConfigType(launchConfigTypeId, launchMode); + try { + if (launchConfigType != null) { + // get the launch manager delegate instance for the requested launch configuration + // type + ILaunchManagerDelegate delegate = getLaunchManagerDelegate(launchConfigType, launchMode); + if (validateSpec) { + delegate.validate(launchSpec); + } + ILaunchConfigurationWorkingCopy wc = null; + if (launchConfig == null || !launchConfig.getType().getIdentifier() + .equals(launchConfigTypeId)) { + try { + // create the launch configuration working copy instance + wc = launchConfigType.newInstance(null, LaunchConfigHelper.getUniqueLaunchConfigName(launchSpec.getLaunchConfigName())); + // initialize the launch configuration working copy + delegate.initLaunchConfigAttributes(wc, launchSpec); + // and save the launch configuration + return wc.doSave(); + } + catch (CoreException e) { + throw new LaunchServiceException(Messages.LaunchManager_error_failedToCreateConfig); + } + } + try { + // get a launch configration working copy + if (launchConfig instanceof ILaunchConfigurationWorkingCopy) { + wc = (ILaunchConfigurationWorkingCopy) launchConfig; + } + else { + wc = launchConfig.getWorkingCopy(); + } + // update the launch configuration working copy + delegate.updateLaunchConfigAttributes(wc, launchSpec); + // and save the launch configuration + return (wc.isDirty()) ? wc.doSave() : launchConfig; + } + catch (CoreException e) { + throw new LaunchServiceException(NLS.bind(Messages.LaunchManager_error_failedToUpdateConfig, launchConfig.getName())); + } + } + } + catch (CoreException e) { + // do nothing, because exception is thrown afterwards if this point is reached. + } + throw new LaunchServiceException(NLS.bind(Messages.LaunchManager_error_noLaunchConfigType, launchMode)); + } + + /** + * Delete the specified launch configuration. + * <p> + * In case any error occurs during the delete, the exception is logged to the Eclipse error log. + * + * @param launchConfig The launch configuration to delete. + */ + public void deleteLaunchConfiguration(ILaunchConfiguration launchConfig) { + if (launchConfig != null) { + try { + launchConfig.delete(); + } + catch (CoreException e) { + IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(), + Messages.LaunchManager_error_deleteLaunchConfig, e); + Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(status); + } + } + } + + /** + * Creates an exact copy of the given launch specification. + * <p> + * <b>Note:</b> The method returns always an launch specification which has not locked out + * modifications. The corresponding read-only flag from the original is not duplicated to the + * copy! + * + * @param launchSpec The launch specification to duplication. + * @return A new <code>ILaunchSpecification</code> instance containing the same data as the + * original, or <code>null</code>. + */ + public ILaunchSpecification duplicate(ILaunchSpecification launchSpec) { + if (launchSpec != null) { + ILaunchSpecification newLaunchSpec = new LaunchSpecification(launchSpec.getLaunchConfigurationTypeId(), launchSpec.getLaunchMode()); + if (!launchSpec.isEmpty()) { + ILaunchAttribute[] attributes = launchSpec.getAllAttributes(); + for (ILaunchAttribute attribute : attributes) { + newLaunchSpec.addAttribute(attribute.getKey(), attribute.getValue()); + } + } + return newLaunchSpec; + } + return null; + } + + /** + * Validates a launch configuration. + * + * @param launchConfig The launch configuration to validate. + * @param launchMode The launch mode. Can be <code>null</code>, in this case the launch configuration + * is valid when valid for all supported modes. + * @return <code>true</code>, if the launch configuration is valid and can be executed (launched). + */ + public boolean validate(ILaunchConfiguration launchConfig, String launchMode) { + try { + if (launchMode == null) { + boolean valid = false; + for (String mode : LaunchConfigHelper.getLaunchConfigTypeModes(launchConfig.getType(), false)) { + if (launchConfig.supportsMode(mode) && validate(launchConfig, mode)) { + valid = true; + } + } + return valid; + } + ILaunchManagerDelegate delegate = getLaunchManagerDelegate(launchConfig.getType(), launchMode); + try { + delegate.validate(launchMode, launchConfig); + } + catch (LaunchServiceException e) { + return false; + } + + } + catch (CoreException e) { + } + return true; + } + + /** + * Transform the specified launch configuration into a corresponding launch specification + * object. If <code>withDefaultAttributes</code> is not set, the corresponding launch manager + * delegate is called to determine if an attribute has a default value or not. If the attribute + * has an default value, this attribute is not copied to the launch specification. If + * <code>withDefaultAttributes</code> is set, all attributes are copied to the launch + * specification object. + * + * @param launchConfig The launch configuration. Must not be <code>null</code>. + * @param launchMode The launch mode the launch specification should be for. See + * <code>ILaunchManager</code> for details. + * @param withDefaultAttributes Set to <code>true</code> to copy attributes with default value + * as well, <code>false</code> otherwise. + * + * @return The corresponding launch specification object or <code>null</code>. + * + * @throws <code>LaunchServiceException</code> in case the launch configuration could not be + * transformed to a launch specification. The exception message describes the failure + * details. + */ + public ILaunchSpecification createSpecFromConfig(ILaunchConfiguration launchConfig, String launchMode, boolean withDefaultAttributes) throws LaunchServiceException { + Assert.isNotNull(launchConfig); + + ILaunchSpecification spec = null; + try { + // extract the launch configuration type + ILaunchConfigurationType type = launchConfig.getType(); + spec = new LaunchSpecification(type.getIdentifier(), launchMode); + // get the launch manager delegate for the specific type + ILaunchManagerDelegate delegate = getLaunchManagerDelegate(type, launchMode); + // get all the launch configuration attributes + Map<String, Object> attributes = launchConfig.getAttributes(); + // loop over all listed attributes and copy them to the specification + Iterator<Entry<String, Object>> iterator = attributes.entrySet().iterator(); + while (iterator.hasNext()) { + Entry<String, Object> entry = iterator.next(); + if (withDefaultAttributes) { + // include the default attributes. So, just copy the stuff over. + spec.addAttribute(entry.getKey(), entry.getValue()); + } + else { + // exclude the default attributes. We have to find out if the attribute is + // set with default value. + Object attributeValue = entry.getValue(); + if (!delegate.isDefaultAttribute(entry.getKey(), attributeValue, attributeValue, spec, launchConfig, launchMode)) { + spec.addAttribute(entry.getKey(), attributeValue); + } + } + } + } + catch (CoreException e) { + spec = null; + throw new LaunchServiceException(e); + } + return spec; + } + + /** + * Launch the specified launch configuration using the corresponding delegate for the specified + * launch mode. If <code>buildBeforeLaunch</code> is set to <code>true</code>, the workspace + * will be build before the launch. + * + * @param launchConfig The launch configuration to launch. Must not be <code>null</code>! + * @param launchMode The launch mode (@see <code>org.eclipse.debug.core.ILaunchManager</code>. + * Must not be <code>null</code>! + * @param buildBeforeLaunch Specify <code>true</code> to build the workspace before launch, + * <code>false</code> otherwise. + * + * @return The corresponding <code>ILaunch</code> object associated with this launch. + * + * @throws <code>LaunchServiceException</code> in case of any problem occurs during the launch sequence. + */ + public ILaunch launch(ILaunchConfiguration launchConfig, String launchMode, boolean buildBeforeLaunch, IProgressMonitor monitor) throws LaunchServiceException { + Assert.isNotNull(launchConfig); + Assert.isNotNull(launchMode); + + try { + ILaunchManagerDelegate delegate = getLaunchManagerDelegate(launchConfig.getType(), launchMode); + delegate.validate(launchMode, launchConfig); + return launchConfig.launch(launchMode, monitor, buildBeforeLaunch); + } + catch (CoreException e) { + // re-pack into a launch service exception + throw new LaunchServiceException(e); + } + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchSpecification.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchSpecification.java index 114d0160a..c227eb95e 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchSpecification.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchSpecification.java @@ -1,266 +1,266 @@ -/*******************************************************************************
- * 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.launch.core.lm;
-
-import java.util.Hashtable;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchAttribute;
-import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification;
-import org.eclipse.tcf.te.launch.core.nls.Messages;
-
-/**
- * Default launch specification implementation.
- */
-public class LaunchSpecification extends PlatformObject implements ILaunchSpecification {
- private final Map<String, ILaunchAttribute> attributes = new Hashtable<String, ILaunchAttribute>();
- private final String typeId;
- private final String mode;
- private String launchConfigName;
- private String launchActionLabel;
- private boolean readOnly;
- private boolean valid = true;
- private String errorMessage = null;
-
- /**
- * Constructor.
- * <p>
- * Creates a new launch specification instance for the specified launch configuration type
- * id and the specified launch mode. The launch specification is not locked against modifications
- * by default!
- *
- * @param typeId The launch configuration type id of the described launch configuration.
- * @param mode The launch mode. @see <code>org.eclipse.debug.core.ILaunchManager</code>!
- */
- public LaunchSpecification(String typeId, String mode) {
- super();
- this.typeId = typeId;
- this.mode = mode;
- this.attributes.clear();
- setReadOnly(false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#getLaunchConfigurationTypeId()
- */
- @Override
- public String getLaunchConfigurationTypeId() {
- return typeId;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#getLaunchMode()
- */
- @Override
- public String getLaunchMode() {
- return mode;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#isReadOnly()
- */
- @Override
- public boolean isReadOnly() {
- return readOnly;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#setReadOnly(boolean)
- */
- @Override
- public void setReadOnly(boolean readOnly) {
- this.readOnly = readOnly;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#addAttribute(java.lang.String, java.lang.Object)
- */
- @Override
- public void addAttribute(String key, Object value) {
- addAttribute(key, value, false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#addAttribute(java.lang.String, java.lang.Object, boolean)
- */
- @Override
- public void addAttribute(String key, Object value, boolean createOnly) {
- Assert.isNotNull(key);
-
- if (isReadOnly()) {
- return;
- }
-
- // Attention: If the value == null -> remove the key from the map!!!
- if (value != null) {
- attributes.put(key, new LaunchAttribute(key, value, createOnly));
- }
- else {
- attributes.remove(key);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#hasAttribute(java.lang.String)
- */
- @Override
- public boolean hasAttribute(String key) {
- Assert.isNotNull(key);
- return attributes.containsKey(key);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#removeAttribute(java.lang.String)
- */
- @Override
- public Object removeAttribute(String key) {
- Assert.isNotNull(key);
- if (isReadOnly()) {
- return null;
- }
- return attributes.remove(key);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#isCreateOnlyAttribute(java.lang.String)
- */
- @Override
- public boolean isCreateOnlyAttribute(String key) {
- Assert.isNotNull(key);
- ILaunchAttribute attribute = getAttribute(key);
- return attribute != null && attribute.isCreateOnlyAttribute();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#getAttribute(java.lang.String, java.lang.Object)
- */
- @Override
- public Object getAttribute(String key, Object defaultValue) {
- Assert.isNotNull(key);
- ILaunchAttribute attribute = getAttribute(key);
- return (attribute != null && attribute.getValue() != null) ? attribute.getValue() : defaultValue;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#clear()
- */
- @Override
- public void clear() {
- if (isReadOnly()) {
- return;
- }
- attributes.clear();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#size()
- */
- @Override
- public int size() {
- return attributes.size();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#isEmpty()
- */
- @Override
- public boolean isEmpty() {
- return attributes.isEmpty();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#getAttribute(java.lang.String)
- */
- @Override
- public ILaunchAttribute getAttribute(String key) {
- Assert.isNotNull(key);
- return attributes.get(key);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#getAllAttributes()
- */
- @Override
- public ILaunchAttribute[] getAllAttributes() {
- return attributes.values().toArray(new ILaunchAttribute[attributes.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#getLaunchActionLabel()
- */
- @Override
- public String getLaunchActionLabel() {
- return launchActionLabel;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#getLaunchConfigName()
- */
- @Override
- public String getLaunchConfigName() {
- return launchConfigName != null ? launchConfigName : Messages.DefaultLaunchManagerDelegate_defaultLaunchName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#setLaunchActionLabel(java.lang.String)
- */
- @Override
- public void setLaunchActionLabel(String launchActionLabel) {
- this.launchActionLabel = launchActionLabel;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#setLaunchConfigName(java.lang.String)
- */
- @Override
- public void setLaunchConfigName(String launchConfigName) {
- this.launchConfigName = LaunchConfigHelper.getUniqueLaunchConfigName(launchConfigName);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#isValid()
- */
- @Override
- public boolean isValid() {
- return valid;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#setIsValid(boolean)
- */
- @Override
- public void setIsValid(boolean valid) {
- this.valid = valid;
- if (valid) {
- errorMessage = null;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#getErrorMessage()
- */
- @Override
- public String getErrorMessage() {
- if (!isValid()) {
- return errorMessage;
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#setErrorMessage(java.lang.String)
- */
- @Override
- public void setErrorMessage(String errorMessage) {
- this.errorMessage = errorMessage;
- }
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.launch.core.lm; + +import java.util.Hashtable; +import java.util.Map; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.core.runtime.PlatformObject; +import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchAttribute; +import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification; +import org.eclipse.tcf.te.launch.core.nls.Messages; + +/** + * Default launch specification implementation. + */ +public class LaunchSpecification extends PlatformObject implements ILaunchSpecification { + private final Map<String, ILaunchAttribute> attributes = new Hashtable<String, ILaunchAttribute>(); + private final String typeId; + private final String mode; + private String launchConfigName; + private String launchActionLabel; + private boolean readOnly; + private boolean valid = true; + private String errorMessage = null; + + /** + * Constructor. + * <p> + * Creates a new launch specification instance for the specified launch configuration type + * id and the specified launch mode. The launch specification is not locked against modifications + * by default! + * + * @param typeId The launch configuration type id of the described launch configuration. + * @param mode The launch mode. @see <code>org.eclipse.debug.core.ILaunchManager</code>! + */ + public LaunchSpecification(String typeId, String mode) { + super(); + this.typeId = typeId; + this.mode = mode; + this.attributes.clear(); + setReadOnly(false); + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#getLaunchConfigurationTypeId() + */ + @Override + public String getLaunchConfigurationTypeId() { + return typeId; + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#getLaunchMode() + */ + @Override + public String getLaunchMode() { + return mode; + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#isReadOnly() + */ + @Override + public boolean isReadOnly() { + return readOnly; + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#setReadOnly(boolean) + */ + @Override + public void setReadOnly(boolean readOnly) { + this.readOnly = readOnly; + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#addAttribute(java.lang.String, java.lang.Object) + */ + @Override + public void addAttribute(String key, Object value) { + addAttribute(key, value, false); + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#addAttribute(java.lang.String, java.lang.Object, boolean) + */ + @Override + public void addAttribute(String key, Object value, boolean createOnly) { + Assert.isNotNull(key); + + if (isReadOnly()) { + return; + } + + // Attention: If the value == null -> remove the key from the map!!! + if (value != null) { + attributes.put(key, new LaunchAttribute(key, value, createOnly)); + } + else { + attributes.remove(key); + } + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#hasAttribute(java.lang.String) + */ + @Override + public boolean hasAttribute(String key) { + Assert.isNotNull(key); + return attributes.containsKey(key); + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#removeAttribute(java.lang.String) + */ + @Override + public Object removeAttribute(String key) { + Assert.isNotNull(key); + if (isReadOnly()) { + return null; + } + return attributes.remove(key); + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#isCreateOnlyAttribute(java.lang.String) + */ + @Override + public boolean isCreateOnlyAttribute(String key) { + Assert.isNotNull(key); + ILaunchAttribute attribute = getAttribute(key); + return attribute != null && attribute.isCreateOnlyAttribute(); + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#getAttribute(java.lang.String, java.lang.Object) + */ + @Override + public Object getAttribute(String key, Object defaultValue) { + Assert.isNotNull(key); + ILaunchAttribute attribute = getAttribute(key); + return (attribute != null && attribute.getValue() != null) ? attribute.getValue() : defaultValue; + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#clear() + */ + @Override + public void clear() { + if (isReadOnly()) { + return; + } + attributes.clear(); + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#size() + */ + @Override + public int size() { + return attributes.size(); + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#isEmpty() + */ + @Override + public boolean isEmpty() { + return attributes.isEmpty(); + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#getAttribute(java.lang.String) + */ + @Override + public ILaunchAttribute getAttribute(String key) { + Assert.isNotNull(key); + return attributes.get(key); + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#getAllAttributes() + */ + @Override + public ILaunchAttribute[] getAllAttributes() { + return attributes.values().toArray(new ILaunchAttribute[attributes.size()]); + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#getLaunchActionLabel() + */ + @Override + public String getLaunchActionLabel() { + return launchActionLabel; + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#getLaunchConfigName() + */ + @Override + public String getLaunchConfigName() { + return launchConfigName != null ? launchConfigName : Messages.DefaultLaunchManagerDelegate_defaultLaunchName; + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#setLaunchActionLabel(java.lang.String) + */ + @Override + public void setLaunchActionLabel(String launchActionLabel) { + this.launchActionLabel = launchActionLabel; + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#setLaunchConfigName(java.lang.String) + */ + @Override + public void setLaunchConfigName(String launchConfigName) { + this.launchConfigName = LaunchConfigHelper.getUniqueLaunchConfigName(launchConfigName); + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#isValid() + */ + @Override + public boolean isValid() { + return valid; + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#setIsValid(boolean) + */ + @Override + public void setIsValid(boolean valid) { + this.valid = valid; + if (valid) { + errorMessage = null; + } + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#getErrorMessage() + */ + @Override + public String getErrorMessage() { + if (!isValid()) { + return errorMessage; + } + return null; + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification#setErrorMessage(java.lang.String) + */ + @Override + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/delegates/DefaultLaunchManagerDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/delegates/DefaultLaunchManagerDelegate.java index cf7146bda..1bb8118fc 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/delegates/DefaultLaunchManagerDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/delegates/DefaultLaunchManagerDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/ICommonLaunchAttributes.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/ICommonLaunchAttributes.java index ca67f2af2..e33e89915 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/ICommonLaunchAttributes.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/ICommonLaunchAttributes.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/IFileTransferLaunchAttributes.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/IFileTransferLaunchAttributes.java index f7e027152..bd81c6094 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/IFileTransferLaunchAttributes.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/IFileTransferLaunchAttributes.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/ILaunchAttribute.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/ILaunchAttribute.java index bbb7d9a30..8a1eda91e 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/ILaunchAttribute.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/ILaunchAttribute.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/ILaunchContextLaunchAttributes.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/ILaunchContextLaunchAttributes.java index 8eddee6ec..9bb6b7d23 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/ILaunchContextLaunchAttributes.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/ILaunchContextLaunchAttributes.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/ILaunchManagerDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/ILaunchManagerDelegate.java index 7a012a753..7992f341f 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/ILaunchManagerDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/ILaunchManagerDelegate.java @@ -1,178 +1,178 @@ -/*******************************************************************************
- * 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.launch.core.lm.interfaces;
-
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.tcf.te.launch.core.exceptions.LaunchServiceException;
-import org.eclipse.tcf.te.launch.core.selection.interfaces.ILaunchSelection;
-import org.eclipse.tcf.te.launch.core.selection.interfaces.ISelectionContext;
-import org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension;
-
-/**
- * Describes the interface used by the <code>LaunchManager</code> to create
- * and manage the different types of possible launch configurations in a generalized,
- * simple and abstract way. A <code>ILaunchManagerDelegate</code> is strictly bound
- * to one specific <code>ILaunchConfigurationType</code> and is capable and responsible
- * to initializing and handling launch configurations of this type. A launch manager
- * delegate is contribute through the <code>org.eclipse.tcf.te.launch.core.launchManagerDelegates</code>
- * extension point!
- */
-public interface ILaunchManagerDelegate extends IExecutableExtension {
-
- public static final int SITUATION_BEFORE_LAUNCH = 0;
- public static final int SITUATION_AFTER_LAUNCH_FAILED = 99;
-
- // Constants for signaling the type of found matches
-
- /**
- * Constant to signal to ignore this matching.
- */
- public final static int IGNORE = -1;
-
- /**
- * Constant to signal a no match (no attributes are matching).
- */
- public final static int NO_MATCH = 0;
-
- /**
- * Constant to signal a partial match (some attributes are matching).
- */
- public final static int PARTIAL_MATCH = 1;
-
- /**
- * Constant to signal a full match (all attributes are matching).
- */
- public final static int FULL_MATCH = 2;
-
- /**
- * Initialize the launch configuration attributes based on the specified launch specification. If an launch
- * configuration attribute is not listed within the specified launch specification, the corresponding attribute is
- * initialized with an default.
- *
- * @param wc The launch configuration working copy to initialize. Must not be <code>null</code>!
- * @param launchSpec The launch specification. Must not be <code>null</code>!
- */
- public void initLaunchConfigAttributes(ILaunchConfigurationWorkingCopy wc, ILaunchSpecification launchSpec);
-
- /**
- * Updates a found launch configuration based on the specified launch specification.
- *
- * @param wc The launch configuration working copy to initialize. Must not be <code>null</code>!
- * @param launchSpec The launch specification. Must not be <code>null</code>!
- */
- public void updateLaunchConfigAttributes(ILaunchConfigurationWorkingCopy wc, ILaunchSpecification launchSpec);
-
- /**
- * Updates a launch configuration with the given selection context.
- *
- * @param wc The launch configuration working copy.
- * @param selContext The selection context to use for the update.
- * @param replace <code>true</code> if existing attribute values should be replaced,
- * <code>false</code> if data from the selection context should be added to existing values.
- */
- public void updateLaunchConfig(ILaunchConfigurationWorkingCopy wc, ISelectionContext selContext, boolean replace);
-
- /**
- * Test the specified attribute if or if not the specified attribute value is an default value or not.
- *
- * @param attributeKey The attribute key/name. Must not be <code>null</code>.
- * @param specValue The launch specification value.
- * @param confValue The launch configuration value.
- * @param launchSpec The launch specification which is the source of the <code>specValue</code>. Must not be <code>null</code>.
- * @param launchConfig The launch configuration which is the source of the <code>confValue</code>. Must not be <code>null</code>.
- * @param launchMode The launch mode. Default values may differ for different launch modes. Must not be
- * <code>null</code>!
- * @return <code>true</code> if the specified attribute value is the default value, <code>false</code> otherwise.
- */
- public boolean isDefaultAttribute(String attributeKey, Object specValue, Object confValue, ILaunchSpecification launchSpec, ILaunchConfiguration launchConfig, String launchMode);
-
- /**
- * Returns a ranked list of launch configurations that best matches the given launch specification. In case of no
- * results or a given empty or null launch configuration list an empty list should be returned. If no launch specification
- * is given, the original list should be returned.
- *
- * @param launchSpec The launch specification the launch configurations should match.
- * @param launchConfigs A full list of launch configurations to check for best matching.
- * @return List of matching launch configurations starting with best match on first index.
- * @throws LaunchServiceException
- */
- public ILaunchConfiguration[] getMatchingLaunchConfigurations(ILaunchSpecification launchSpec, ILaunchConfiguration[] launchConfigs) throws LaunchServiceException;
-
- /**
- * Get the default launch configuration name.
- *
- * @param launchSpec The launch specification to create a default name for the launch config. Must not be <code>null</code>.
- * @return The default launch configuration name.
- */
- public String getDefaultLaunchName(ILaunchSpecification launchSpec);
-
- /**
- * Get the default launch configuration name.
- *
- * @param launchConfig The launch configuration to create a default name for the launch config. Must not be <code>null</code>.
- * @return The default launch configuration name.
- */
- public String getDefaultLaunchName(ILaunchConfiguration launchConfig);
-
- /**
- * Get a launch specification with all needed attributes for this delegate taken from the selection to find or create a new
- * launch configuration.
- *
- * @param launchConfigTypeId The launch configuration type id.
- * @param launchSelection The selected contexts.
- * @return Launch specification with attributes set from selected contexts.
- * @throws LaunchServiceException
- */
- public ILaunchSpecification getLaunchSpecification(String launchConfigTypeId, ILaunchSelection launchSelection);
-
- /**
- * Validates a launch specification.
- *
- * @param launchSpec The launch specification to validate.
- * @throws LaunchServiceException If validation fails with further information about the reason (e.q. missing
- * attributes)
- */
- public void validate(ILaunchSpecification launchSpec) throws LaunchServiceException;
-
- /**
- * Validates a launch configuration.
- *
- * @param launchConfig The launch configuration to validate.
- * @param launchMode The launch mode.
- * @throws LaunchServiceException If validation fails with further information about the reason (e.q. missing
- * attributes)
- */
- public void validate(String launchMode, ILaunchConfiguration launchConfig) throws LaunchServiceException;
-
- /**
- * Returns true, if the launch dialog should be shown before launch.
- * @param situation The situation (before launch, after launch, ..)
- */
- public boolean showLaunchDialog(int situation);
-
- /**
- * Return <code>true</code> if the two selection contexts are equal
- * for this launch configuration type.
- *
- * @param ctx1 The first launch selection context or <code>null</code>.
- * @param ctx2 The second launch selection context or <code>null</code>.
- *
- * @return <code>True</code> if the two selection contexts are equal for this launch configuration type, <code>false</code> otherwise.
- */
- public boolean equals(ISelectionContext ctx1, ISelectionContext ctx2);
-
- /**
- * Get a short description for the given launch configuration.
- * @param config The launch configuration.
- * @return The description.
- */
- public String getDescription(ILaunchConfiguration config);
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.launch.core.lm.interfaces; + +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.tcf.te.launch.core.exceptions.LaunchServiceException; +import org.eclipse.tcf.te.launch.core.selection.interfaces.ILaunchSelection; +import org.eclipse.tcf.te.launch.core.selection.interfaces.ISelectionContext; +import org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension; + +/** + * Describes the interface used by the <code>LaunchManager</code> to create + * and manage the different types of possible launch configurations in a generalized, + * simple and abstract way. A <code>ILaunchManagerDelegate</code> is strictly bound + * to one specific <code>ILaunchConfigurationType</code> and is capable and responsible + * to initializing and handling launch configurations of this type. A launch manager + * delegate is contribute through the <code>org.eclipse.tcf.te.launch.core.launchManagerDelegates</code> + * extension point! + */ +public interface ILaunchManagerDelegate extends IExecutableExtension { + + public static final int SITUATION_BEFORE_LAUNCH = 0; + public static final int SITUATION_AFTER_LAUNCH_FAILED = 99; + + // Constants for signaling the type of found matches + + /** + * Constant to signal to ignore this matching. + */ + public final static int IGNORE = -1; + + /** + * Constant to signal a no match (no attributes are matching). + */ + public final static int NO_MATCH = 0; + + /** + * Constant to signal a partial match (some attributes are matching). + */ + public final static int PARTIAL_MATCH = 1; + + /** + * Constant to signal a full match (all attributes are matching). + */ + public final static int FULL_MATCH = 2; + + /** + * Initialize the launch configuration attributes based on the specified launch specification. If an launch + * configuration attribute is not listed within the specified launch specification, the corresponding attribute is + * initialized with an default. + * + * @param wc The launch configuration working copy to initialize. Must not be <code>null</code>! + * @param launchSpec The launch specification. Must not be <code>null</code>! + */ + public void initLaunchConfigAttributes(ILaunchConfigurationWorkingCopy wc, ILaunchSpecification launchSpec); + + /** + * Updates a found launch configuration based on the specified launch specification. + * + * @param wc The launch configuration working copy to initialize. Must not be <code>null</code>! + * @param launchSpec The launch specification. Must not be <code>null</code>! + */ + public void updateLaunchConfigAttributes(ILaunchConfigurationWorkingCopy wc, ILaunchSpecification launchSpec); + + /** + * Updates a launch configuration with the given selection context. + * + * @param wc The launch configuration working copy. + * @param selContext The selection context to use for the update. + * @param replace <code>true</code> if existing attribute values should be replaced, + * <code>false</code> if data from the selection context should be added to existing values. + */ + public void updateLaunchConfig(ILaunchConfigurationWorkingCopy wc, ISelectionContext selContext, boolean replace); + + /** + * Test the specified attribute if or if not the specified attribute value is an default value or not. + * + * @param attributeKey The attribute key/name. Must not be <code>null</code>. + * @param specValue The launch specification value. + * @param confValue The launch configuration value. + * @param launchSpec The launch specification which is the source of the <code>specValue</code>. Must not be <code>null</code>. + * @param launchConfig The launch configuration which is the source of the <code>confValue</code>. Must not be <code>null</code>. + * @param launchMode The launch mode. Default values may differ for different launch modes. Must not be + * <code>null</code>! + * @return <code>true</code> if the specified attribute value is the default value, <code>false</code> otherwise. + */ + public boolean isDefaultAttribute(String attributeKey, Object specValue, Object confValue, ILaunchSpecification launchSpec, ILaunchConfiguration launchConfig, String launchMode); + + /** + * Returns a ranked list of launch configurations that best matches the given launch specification. In case of no + * results or a given empty or null launch configuration list an empty list should be returned. If no launch specification + * is given, the original list should be returned. + * + * @param launchSpec The launch specification the launch configurations should match. + * @param launchConfigs A full list of launch configurations to check for best matching. + * @return List of matching launch configurations starting with best match on first index. + * @throws LaunchServiceException + */ + public ILaunchConfiguration[] getMatchingLaunchConfigurations(ILaunchSpecification launchSpec, ILaunchConfiguration[] launchConfigs) throws LaunchServiceException; + + /** + * Get the default launch configuration name. + * + * @param launchSpec The launch specification to create a default name for the launch config. Must not be <code>null</code>. + * @return The default launch configuration name. + */ + public String getDefaultLaunchName(ILaunchSpecification launchSpec); + + /** + * Get the default launch configuration name. + * + * @param launchConfig The launch configuration to create a default name for the launch config. Must not be <code>null</code>. + * @return The default launch configuration name. + */ + public String getDefaultLaunchName(ILaunchConfiguration launchConfig); + + /** + * Get a launch specification with all needed attributes for this delegate taken from the selection to find or create a new + * launch configuration. + * + * @param launchConfigTypeId The launch configuration type id. + * @param launchSelection The selected contexts. + * @return Launch specification with attributes set from selected contexts. + * @throws LaunchServiceException + */ + public ILaunchSpecification getLaunchSpecification(String launchConfigTypeId, ILaunchSelection launchSelection); + + /** + * Validates a launch specification. + * + * @param launchSpec The launch specification to validate. + * @throws LaunchServiceException If validation fails with further information about the reason (e.q. missing + * attributes) + */ + public void validate(ILaunchSpecification launchSpec) throws LaunchServiceException; + + /** + * Validates a launch configuration. + * + * @param launchConfig The launch configuration to validate. + * @param launchMode The launch mode. + * @throws LaunchServiceException If validation fails with further information about the reason (e.q. missing + * attributes) + */ + public void validate(String launchMode, ILaunchConfiguration launchConfig) throws LaunchServiceException; + + /** + * Returns true, if the launch dialog should be shown before launch. + * @param situation The situation (before launch, after launch, ..) + */ + public boolean showLaunchDialog(int situation); + + /** + * Return <code>true</code> if the two selection contexts are equal + * for this launch configuration type. + * + * @param ctx1 The first launch selection context or <code>null</code>. + * @param ctx2 The second launch selection context or <code>null</code>. + * + * @return <code>True</code> if the two selection contexts are equal for this launch configuration type, <code>false</code> otherwise. + */ + public boolean equals(ISelectionContext ctx1, ISelectionContext ctx2); + + /** + * Get a short description for the given launch configuration. + * @param config The launch configuration. + * @return The description. + */ + public String getDescription(ILaunchConfiguration config); +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/ILaunchSpecification.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/ILaunchSpecification.java index bb497f719..2f8207f5e 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/ILaunchSpecification.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/ILaunchSpecification.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/IReferencedProjectLaunchAttributes.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/IReferencedProjectLaunchAttributes.java index 23b52749d..2d213cb37 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/IReferencedProjectLaunchAttributes.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/IReferencedProjectLaunchAttributes.java @@ -1,23 +1,23 @@ -/*******************************************************************************
- * 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.launch.core.lm.interfaces;
-
-/**
- * Defines the launch configuration attribute id's to access the launch step contexts.
- */
-public interface IReferencedProjectLaunchAttributes {
-
- /**
- * Launch configuration attribute: The referenced project items the launch is operating with. Use
- * {@link ReferencedProjectsPersistanceDelegate} to access
- * this attribute within a launch configuration.
- */
- public static final String ATTR_REFERENCED_PROJECTS = ICommonLaunchAttributes.ATTR_PREFIX + ".referencedProjects"; //$NON-NLS-1$
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.launch.core.lm.interfaces; + +/** + * Defines the launch configuration attribute id's to access the launch step contexts. + */ +public interface IReferencedProjectLaunchAttributes { + + /** + * Launch configuration attribute: The referenced project items the launch is operating with. Use + * {@link ReferencedProjectsPersistanceDelegate} to access + * this attribute within a launch configuration. + */ + public static final String ATTR_REFERENCED_PROJECTS = ICommonLaunchAttributes.ATTR_PREFIX + ".referencedProjects"; //$NON-NLS-1$ +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/internal/ExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/internal/ExtensionPointManager.java index c0f42f4c3..a0a3ba1b6 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/internal/ExtensionPointManager.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/internal/ExtensionPointManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/nls/Messages.java index bc9670183..e1b921a22 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/nls/Messages.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/nls/Messages.java @@ -1,49 +1,49 @@ -/*******************************************************************************
- * Copyright (c) 2011, 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.launch.core.nls;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Launch Core Plug-in externalized strings management.
- */
-public class Messages extends NLS {
-
- // The plug-in resource bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tcf.te.launch.core.nls.Messages"; //$NON-NLS-1$
-
- /**
- * Static constructor.
- */
- static {
- // Load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- // **** Declare externalized string id's down here *****
-
- public static String DefaultLaunchManagerDelegate_defaultLaunchName;
-
- public static String LaunchManager_error_invalidExtensionPoint;
- public static String LaunchManager_error_noLaunchConfigType;
- public static String LaunchManager_error_failedToCreateConfig;
- public static String LaunchManager_error_failedToUpdateConfig;
- public static String LaunchManager_error_deleteLaunchConfig;
-
- public static String LaunchConfigurationDelegate_error_failedToGetStepper;
- public static String LaunchConfigurationDelegate_error_failedToCloneStepper;
- public static String LaunchConfigurationDelegate_error_inaccessibleReferencedProject;
-
- public static String AbstractLaunchConfigurationDelegate_scoped_incremental_build;
-
- public static String ReferencedProjectItemValidator_missingProject;
- public static String ReferencedProjectItemValidator_notExistingProject;
- public static String ReferencedProjectItemValidator_closedProject;
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.launch.core.nls; + +import org.eclipse.osgi.util.NLS; + +/** + * Launch Core Plug-in externalized strings management. + */ +public class Messages extends NLS { + + // The plug-in resource bundle name + private static final String BUNDLE_NAME = "org.eclipse.tcf.te.launch.core.nls.Messages"; //$NON-NLS-1$ + + /** + * Static constructor. + */ + static { + // Load message values from bundle file + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + // **** Declare externalized string id's down here ***** + + public static String DefaultLaunchManagerDelegate_defaultLaunchName; + + public static String LaunchManager_error_invalidExtensionPoint; + public static String LaunchManager_error_noLaunchConfigType; + public static String LaunchManager_error_failedToCreateConfig; + public static String LaunchManager_error_failedToUpdateConfig; + public static String LaunchManager_error_deleteLaunchConfig; + + public static String LaunchConfigurationDelegate_error_failedToGetStepper; + public static String LaunchConfigurationDelegate_error_failedToCloneStepper; + public static String LaunchConfigurationDelegate_error_inaccessibleReferencedProject; + + public static String AbstractLaunchConfigurationDelegate_scoped_incremental_build; + + public static String ReferencedProjectItemValidator_missingProject; + public static String ReferencedProjectItemValidator_notExistingProject; + public static String ReferencedProjectItemValidator_closedProject; +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/nls/Messages.properties index bb3dcee10..ec06ab590 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/nls/Messages.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/nls/Messages.properties @@ -1,29 +1,29 @@ -###############################################################################
-# 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
-###############################################################################
-
-DefaultLaunchManagerDelegate_defaultLaunchName=New configuration
-
-LaunchManager_error_invalidExtensionPoint=Failed to instantiate the executable extension from extension point ''{0}''.
-LaunchManager_error_noLaunchConfigType=No launch configuration type (id = ) is available for launch mode ''{0}''.
-LaunchManager_error_failedToCreateConfig=Failed to create and initialize new launch configuration.
-LaunchManager_error_failedToUpdateConfig=Failed to update existing launch configuration ''{0}''.
-LaunchManager_error_deleteLaunchConfig=Failed to delete launch configuration.
-
-LaunchConfigurationDelegate_error_failedToGetStepper=Failed to access stepper for launch configuration type ''{0}'' \
-and launch mode ''{1}''.
-LaunchConfigurationDelegate_error_failedToCloneStepper=Failed to clone stepper for launch configuration type ''{0}'' \
-and launch mode ''{1}''.
-LaunchConfigurationDelegate_error_inaccessibleReferencedProject=Failed to access project ''{0}''. The project is either missing or closed.
-
-AbstractLaunchConfigurationDelegate_scoped_incremental_build=Scoped incremental build before launch...
-
-ReferencedProjectItemValidator_missingProject = Missing project
-ReferencedProjectItemValidator_notExistingProject = Project does not exist
-ReferencedProjectItemValidator_closedProject = Project is closed
+############################################################################### +# Copyright (c) 2012, 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 +############################################################################### + +DefaultLaunchManagerDelegate_defaultLaunchName=New configuration + +LaunchManager_error_invalidExtensionPoint=Failed to instantiate the executable extension from extension point ''{0}''. +LaunchManager_error_noLaunchConfigType=No launch configuration type (id = ) is available for launch mode ''{0}''. +LaunchManager_error_failedToCreateConfig=Failed to create and initialize new launch configuration. +LaunchManager_error_failedToUpdateConfig=Failed to update existing launch configuration ''{0}''. +LaunchManager_error_deleteLaunchConfig=Failed to delete launch configuration. + +LaunchConfigurationDelegate_error_failedToGetStepper=Failed to access stepper for launch configuration type ''{0}'' \ +and launch mode ''{1}''. +LaunchConfigurationDelegate_error_failedToCloneStepper=Failed to clone stepper for launch configuration type ''{0}'' \ +and launch mode ''{1}''. +LaunchConfigurationDelegate_error_inaccessibleReferencedProject=Failed to access project ''{0}''. The project is either missing or closed. + +AbstractLaunchConfigurationDelegate_scoped_incremental_build=Scoped incremental build before launch... + +ReferencedProjectItemValidator_missingProject = Missing project +ReferencedProjectItemValidator_notExistingProject = Project does not exist +ReferencedProjectItemValidator_closedProject = Project is closed diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/AbstractItemListXMLParser.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/AbstractItemListXMLParser.java index fe3b6dcc8..809233741 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/AbstractItemListXMLParser.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/AbstractItemListXMLParser.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/DefaultPersistenceDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/DefaultPersistenceDelegate.java index 97a529ddc..3194cfb46 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/DefaultPersistenceDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/DefaultPersistenceDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/LaunchConfigurationChangedEvent.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/LaunchConfigurationChangedEvent.java index d1430d222..edc373a0a 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/LaunchConfigurationChangedEvent.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/LaunchConfigurationChangedEvent.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/filetransfer/FileTransfersPersistenceDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/filetransfer/FileTransfersPersistenceDelegate.java index abf476913..f554a05de 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/filetransfer/FileTransfersPersistenceDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/filetransfer/FileTransfersPersistenceDelegate.java @@ -1,114 +1,114 @@ -/*******************************************************************************
- * 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.launch.core.persistence.filetransfer;
-
-import java.util.List;
-
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.tcf.te.launch.core.lm.interfaces.IFileTransferLaunchAttributes;
-import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification;
-import org.eclipse.tcf.te.launch.core.persistence.AbstractItemListPersistenceDelegate;
-import org.eclipse.tcf.te.launch.core.persistence.AbstractItemListXMLParser;
-import org.eclipse.tcf.te.runtime.services.interfaces.filetransfer.IFileTransferItem;
-
-/**
- * File transfer persistence delegate.
- */
-public class FileTransfersPersistenceDelegate {
-
- private static final String TAG_FILE_TRANSFER = "fileTransfer"; //$NON-NLS-1$
-
- private static final AbstractItemListPersistenceDelegate<IFileTransferItem> delegate =
- new AbstractItemListPersistenceDelegate<IFileTransferItem>(TAG_FILE_TRANSFER, IFileTransferLaunchAttributes.ATTR_FILE_TRANSFERS) {
- @Override
- protected AbstractItemListXMLParser<IFileTransferItem> getXMLParser() {
- return new AbstractItemListXMLParser<IFileTransferItem>(TAG_FILE_TRANSFER) {
- @Override
- protected Class<?> getReadClass() {
- return IFileTransferItem.class;
- }
- };
- }
- };
-
- /**
- * Saves the selected file transfer items to the specified launch configuration working copy. If the
- * selected file transfer items are <code>null</code> or empty, the attribute will be removed from
- * the specified launch configuration working copy.
- *
- * @param wc The launch configuration working copy. Must not be <code>null</code>.
- * @param items The file transfer items to save or <code>null</code>.
- */
- public final static void setFileTransfers(ILaunchConfigurationWorkingCopy wc, IFileTransferItem[] items) {
- delegate.setItems(wc, items);
- }
-
- /**
- * Saves the selected file transfer items to the specified launch specification. If the selected
- * file transfer items are <code>null</code> or empty, the attribute will be removed from the
- * specified launch specification.
- *
- * @param launchSpec The launch specification. Must not be <code>null</code>.
- * @param items The file transfer items to save or <code>null</code>.
- */
- public final static void setFileTransfers(ILaunchSpecification launchSpec, IFileTransferItem[] items) {
- delegate.setItems(launchSpec, items);
- }
-
- /**
- * Writes the given file transfer items into a string encoded in XML.
- *
- * @param items The file transfer items to encode. Must not be <code>null</code>.
- * @return The full XML representation of the given items or <code>null</code>.
- */
- public final static String encodeFileTransferItems(IFileTransferItem[] items) {
- return delegate.encodeItems(items);
- }
-
- /**
- * Reads the selected file transfer items from the given XML encoded string.
- *
- * @param encodedItems The selected file transfer items encoded as XML string. Must not be <code>null</code>.
- * @return The selected file transfer items or an empty array.
- */
- public final static IFileTransferItem[] decodeFileTransferItems(String encodedItems) {
- List<IFileTransferItem> list = delegate.decodeItems(encodedItems);
- return list.toArray(new IFileTransferItem[list.size()]);
- }
-
- /**
- * Returns the list of configured file transfer items from the given launch configuration.
- * <p>
- * If the given launch configuration is <code>null</code> and the method will return an empty
- * array.
- *
- * @param configuration The launch configuration or <code>null</code>.
- * @return The list of configured file transfer items or an empty array.
- */
- public static final IFileTransferItem[] getFileTransfers(ILaunchConfiguration configuration) {
- List<IFileTransferItem> list = delegate.getItems(configuration);
- return list.toArray(new IFileTransferItem[list.size()]);
- }
-
- /**
- * Returns the list of configured file transfer items from the given launch specification.
- * <p>
- * If the given launch specification is <code>null</code> and the method will return an empty
- * array.
- *
- * @param launchSpec The launch specification or <code>null</code>.
- * @return The list of configured file transfer items or an empty array.
- */
- public static final IFileTransferItem[] getFileTransfers(ILaunchSpecification launchSpec) {
- List<IFileTransferItem> list = delegate.getItems(launchSpec);
- return list.toArray(new IFileTransferItem[list.size()]);
- }
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.launch.core.persistence.filetransfer; + +import java.util.List; + +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.tcf.te.launch.core.lm.interfaces.IFileTransferLaunchAttributes; +import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification; +import org.eclipse.tcf.te.launch.core.persistence.AbstractItemListPersistenceDelegate; +import org.eclipse.tcf.te.launch.core.persistence.AbstractItemListXMLParser; +import org.eclipse.tcf.te.runtime.services.interfaces.filetransfer.IFileTransferItem; + +/** + * File transfer persistence delegate. + */ +public class FileTransfersPersistenceDelegate { + + private static final String TAG_FILE_TRANSFER = "fileTransfer"; //$NON-NLS-1$ + + private static final AbstractItemListPersistenceDelegate<IFileTransferItem> delegate = + new AbstractItemListPersistenceDelegate<IFileTransferItem>(TAG_FILE_TRANSFER, IFileTransferLaunchAttributes.ATTR_FILE_TRANSFERS) { + @Override + protected AbstractItemListXMLParser<IFileTransferItem> getXMLParser() { + return new AbstractItemListXMLParser<IFileTransferItem>(TAG_FILE_TRANSFER) { + @Override + protected Class<?> getReadClass() { + return IFileTransferItem.class; + } + }; + } + }; + + /** + * Saves the selected file transfer items to the specified launch configuration working copy. If the + * selected file transfer items are <code>null</code> or empty, the attribute will be removed from + * the specified launch configuration working copy. + * + * @param wc The launch configuration working copy. Must not be <code>null</code>. + * @param items The file transfer items to save or <code>null</code>. + */ + public final static void setFileTransfers(ILaunchConfigurationWorkingCopy wc, IFileTransferItem[] items) { + delegate.setItems(wc, items); + } + + /** + * Saves the selected file transfer items to the specified launch specification. If the selected + * file transfer items are <code>null</code> or empty, the attribute will be removed from the + * specified launch specification. + * + * @param launchSpec The launch specification. Must not be <code>null</code>. + * @param items The file transfer items to save or <code>null</code>. + */ + public final static void setFileTransfers(ILaunchSpecification launchSpec, IFileTransferItem[] items) { + delegate.setItems(launchSpec, items); + } + + /** + * Writes the given file transfer items into a string encoded in XML. + * + * @param items The file transfer items to encode. Must not be <code>null</code>. + * @return The full XML representation of the given items or <code>null</code>. + */ + public final static String encodeFileTransferItems(IFileTransferItem[] items) { + return delegate.encodeItems(items); + } + + /** + * Reads the selected file transfer items from the given XML encoded string. + * + * @param encodedItems The selected file transfer items encoded as XML string. Must not be <code>null</code>. + * @return The selected file transfer items or an empty array. + */ + public final static IFileTransferItem[] decodeFileTransferItems(String encodedItems) { + List<IFileTransferItem> list = delegate.decodeItems(encodedItems); + return list.toArray(new IFileTransferItem[list.size()]); + } + + /** + * Returns the list of configured file transfer items from the given launch configuration. + * <p> + * If the given launch configuration is <code>null</code> and the method will return an empty + * array. + * + * @param configuration The launch configuration or <code>null</code>. + * @return The list of configured file transfer items or an empty array. + */ + public static final IFileTransferItem[] getFileTransfers(ILaunchConfiguration configuration) { + List<IFileTransferItem> list = delegate.getItems(configuration); + return list.toArray(new IFileTransferItem[list.size()]); + } + + /** + * Returns the list of configured file transfer items from the given launch specification. + * <p> + * If the given launch specification is <code>null</code> and the method will return an empty + * array. + * + * @param launchSpec The launch specification or <code>null</code>. + * @return The list of configured file transfer items or an empty array. + */ + public static final IFileTransferItem[] getFileTransfers(ILaunchSpecification launchSpec) { + List<IFileTransferItem> list = delegate.getItems(launchSpec); + return list.toArray(new IFileTransferItem[list.size()]); + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/launchcontext/LaunchContextsPersistenceDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/launchcontext/LaunchContextsPersistenceDelegate.java index d8c644a87..5e45fe882 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/launchcontext/LaunchContextsPersistenceDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/launchcontext/LaunchContextsPersistenceDelegate.java @@ -1,257 +1,257 @@ -/*******************************************************************************
- * 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.launch.core.persistence.launchcontext;
-
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchContextLaunchAttributes;
-import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification;
-import org.eclipse.tcf.te.launch.core.persistence.AbstractItemListPersistenceDelegate;
-import org.eclipse.tcf.te.launch.core.persistence.AbstractItemListXMLParser;
-import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
-import org.eclipse.tcf.te.runtime.services.ServiceManager;
-import org.eclipse.tcf.te.runtime.services.interfaces.IPropertiesAccessService;
-
-/**
- * Context selector persistence delegate.
- */
-public class LaunchContextsPersistenceDelegate {
- // The read cache for step contexts. Avoid running time consuming
- // re-parsing of an already parsed step context description again and again.
- private final static Map<String, List<IModelNode>> readCache = new LinkedHashMap<String, List<IModelNode>>();
- // The write cache for target contexts. Avoids re-generating the XML again and again.
- private final static Map<String, String> writeCache = new LinkedHashMap<String, String>();
-
- // Limit the read cache to the last 10 read step contexts
- private final static int READ_CACHE_MAX_CAPACITY = 25;
- // Limit the write cache to the last 10 written step contexts
- private final static int WRITE_CACHE_MAX_CAPACITY = 25;
-
- private static final String TAG_LAUNCH_CONTEXT = "context"; //$NON-NLS-1$
-
- private static final AbstractItemListPersistenceDelegate<IModelNode> delegate =
- new AbstractItemListPersistenceDelegate<IModelNode>(TAG_LAUNCH_CONTEXT, ILaunchContextLaunchAttributes.ATTR_LAUNCH_CONTEXTS) {
- @Override
- protected AbstractItemListXMLParser<IModelNode> getXMLParser() {
- return new AbstractItemListXMLParser<IModelNode>(TAG_LAUNCH_CONTEXT) {
- @Override
- protected Class<?> getReadClass() {
- return IModelNode.class;
- }
- };
- }
- };
-
- /**
- * Saves the selected launch contexts to the specified launch configuration working copy. If the
- * selected launch contexts are <code>null</code> or empty, the attribute will be removed from
- * the specified launch configuration working copy.
- *
- * @param wc The launch configuration working copy. Must not be <code>null</code>.
- * @param contexts The launch contexts to save or <code>null</code>.
- */
- public final static void setLaunchContexts(ILaunchConfigurationWorkingCopy wc, IModelNode[] contexts) {
- delegate.setItems(wc, contexts);
- }
-
- /**
- * Saves the selected launch contexts to the specified launch specification. If the selected
- * launch contexts are <code>null</code> or empty, the attribute will be removed from the
- * specified launch specification.
- *
- * @param launchSpec The launch specification. Must not be <code>null</code>.
- * @param contexts The launch contexts to save or <code>null</code>.
- */
- public final static void setLaunchContexts(ILaunchSpecification launchSpec, IModelNode[] contexts) {
- delegate.setItems(launchSpec, contexts);
- }
-
- /**
- * Writes the given launch contexts into a string encoded in XML.
- *
- * @param contexts The launch contexts to encode. Must not be <code>null</code>.
- * @return The full XML representation of the given contexts or <code>null</code>.
- */
- public final static String encodeLaunchContexts(IModelNode[] contexts) {
- Assert.isNotNull(contexts);
-
- // The final result
- String result = null;
-
- // Generate the write cache key
- String writeCacheKey = makeWriteCacheKey(contexts);
-
- // Check if we have the contexts already generated before
- synchronized (writeCache) {
- if (writeCache.containsKey(writeCacheKey)) {
- result = writeCache.get(writeCacheKey);
- }
- }
-
- // If no cache hit, generate from scratch
- if (result == null) {
- result = delegate.encodeItems(contexts);
-
- synchronized (writeCache) {
- // Limit the write cache capacity
- checkCacheCapacity(writeCache, WRITE_CACHE_MAX_CAPACITY);
- // And put it into the write cache
- writeCache.put(writeCacheKey, result);
- }
- }
-
- return result;
- }
-
- /**
- * Generates a write cache key from the given contexts.
- *
- * @param contexts The contexts
- * @return The corresponding write key cache.
- */
- private static String makeWriteCacheKey(IModelNode[] contexts) {
- Assert.isNotNull(contexts);
-
- StringBuffer key = new StringBuffer();
- for (IModelNode context : contexts) {
- key.append(Integer.toHexString(context.hashCode()));
- key.append(':');
- }
- if (key.charAt(key.length() - 1) == ':') {
- key.setCharAt(key.length() - 1, ' ');
- }
- return key.toString().trim();
- }
-
- /**
- * Reads the selected launch contexts from the given XML encoded string.
- *
- * @param encodedContexts The selected launch contexts encoded as XML string. Must not be <code>null</code>.
- * @return The selected launch contexts or an empty array.
- */
- public final static IModelNode[] decodeLaunchContexts(String encodedContexts) {
- Assert.isNotNull(encodedContexts);
-
- List<IModelNode> contexts = null;
-
- if (!"".equals(encodedContexts.trim())) { //$NON-NLS-1$
- synchronized (readCache) {
- // Check if we have the contexts already parsed before
- if (readCache.containsKey(encodedContexts)) {
- // Take the result from the cache
- contexts = readCache.get(encodedContexts);
- // check sanity. If empty or we cannot find the step context,
- // drop the cache value and decode again.
- ListIterator<IModelNode> iterator = contexts.listIterator();
- while (iterator.hasNext()) {
- IModelNode node = iterator.next();
- IPropertiesAccessService service = ServiceManager.getInstance().getService(node, IPropertiesAccessService.class);
- boolean isGhost = false;
- if (service != null) {
- Object value = service.getProperty(node, IModelNode.PROPERTY_IS_GHOST);
- if (value instanceof Boolean) {
- isGhost = ((Boolean)value).booleanValue();
- }
- }
- if (isGhost) {
- contexts = null;
- readCache.remove(encodedContexts);
- break;
- }
- }
-
- if (contexts != null && contexts.isEmpty()) {
- readCache.remove(encodedContexts);
- contexts = null;
- }
- }
- }
-
- if (contexts == null || contexts.isEmpty()) {
- contexts = delegate.decodeItems(encodedContexts);
- if (!contexts.isEmpty()) {
- synchronized (readCache) {
- // Limit the read cache capacity
- checkCacheCapacity(readCache, READ_CACHE_MAX_CAPACITY);
- // Put the result into the read cache
- readCache.put(encodedContexts, contexts);
- }
- }
- }
- }
-
- return contexts != null ? contexts.toArray(new IModelNode[contexts.size()]) : new IModelNode[0];
- }
-
- /**
- * Internal helper method to ensure a maximum capacity of the caches.
- */
- private final static void checkCacheCapacity(Map<String, ?> cache, int maxCapacity) {
- if (cache.size() < maxCapacity) {
- return;
- }
- // Get all keys
- String[] keys = cache.keySet().toArray(new String[cache.keySet().size()]);
- // And remove all keys starting with the eldest till the
- // capacity is fine again.
- for (String key : keys) {
- cache.remove(key);
- if (cache.size() < maxCapacity / 2) {
- break;
- }
- }
- }
-
- /**
- * Returns the list of configured launch contexts from the given launch configuration.
- * <p>
- * If the given launch configuration is <code>null</code> and the method will return an empty
- * array.
- *
- * @param configuration The launch configuration or <code>null</code>.
- * @return The list of configured launch contexts or an empty array.
- */
- public static final IModelNode[] getLaunchContexts(ILaunchConfiguration configuration) {
- List<IModelNode> list = delegate.getItems(configuration);
- return list.toArray(new IModelNode[list.size()]);
- }
-
- /**
- * Returns the list of configured launch contexts from the given launch specification.
- * <p>
- * If the given launch specification is <code>null</code> and the method will return an empty
- * array.
- *
- * @param launchSpec The launch specification or <code>null</code>.
- * @return The list of configured launch contexts or an empty array.
- */
- public static final IModelNode[] getLaunchContexts(ILaunchSpecification launchSpec) {
- List<IModelNode> list = delegate.getItems(launchSpec);
- return list.toArray(new IModelNode[list.size()]);
- }
-
- /**
- * Returns the first configured launch context from the given launch configuration.
- *
- * @param configuration The launch configuration or <code>null</code>.
- * @return The first configured launch context or <code>null</code>.
- */
- public static final IModelNode getFirstLaunchContext(ILaunchConfiguration configuration) {
- List<IModelNode> list = delegate.getItems(configuration);
- return list != null && !list.isEmpty() ? list.get(0) : null;
- }
-
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.launch.core.persistence.launchcontext; + +import java.util.LinkedHashMap; +import java.util.List; +import java.util.ListIterator; +import java.util.Map; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchContextLaunchAttributes; +import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification; +import org.eclipse.tcf.te.launch.core.persistence.AbstractItemListPersistenceDelegate; +import org.eclipse.tcf.te.launch.core.persistence.AbstractItemListXMLParser; +import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode; +import org.eclipse.tcf.te.runtime.services.ServiceManager; +import org.eclipse.tcf.te.runtime.services.interfaces.IPropertiesAccessService; + +/** + * Context selector persistence delegate. + */ +public class LaunchContextsPersistenceDelegate { + // The read cache for step contexts. Avoid running time consuming + // re-parsing of an already parsed step context description again and again. + private final static Map<String, List<IModelNode>> readCache = new LinkedHashMap<String, List<IModelNode>>(); + // The write cache for target contexts. Avoids re-generating the XML again and again. + private final static Map<String, String> writeCache = new LinkedHashMap<String, String>(); + + // Limit the read cache to the last 10 read step contexts + private final static int READ_CACHE_MAX_CAPACITY = 25; + // Limit the write cache to the last 10 written step contexts + private final static int WRITE_CACHE_MAX_CAPACITY = 25; + + private static final String TAG_LAUNCH_CONTEXT = "context"; //$NON-NLS-1$ + + private static final AbstractItemListPersistenceDelegate<IModelNode> delegate = + new AbstractItemListPersistenceDelegate<IModelNode>(TAG_LAUNCH_CONTEXT, ILaunchContextLaunchAttributes.ATTR_LAUNCH_CONTEXTS) { + @Override + protected AbstractItemListXMLParser<IModelNode> getXMLParser() { + return new AbstractItemListXMLParser<IModelNode>(TAG_LAUNCH_CONTEXT) { + @Override + protected Class<?> getReadClass() { + return IModelNode.class; + } + }; + } + }; + + /** + * Saves the selected launch contexts to the specified launch configuration working copy. If the + * selected launch contexts are <code>null</code> or empty, the attribute will be removed from + * the specified launch configuration working copy. + * + * @param wc The launch configuration working copy. Must not be <code>null</code>. + * @param contexts The launch contexts to save or <code>null</code>. + */ + public final static void setLaunchContexts(ILaunchConfigurationWorkingCopy wc, IModelNode[] contexts) { + delegate.setItems(wc, contexts); + } + + /** + * Saves the selected launch contexts to the specified launch specification. If the selected + * launch contexts are <code>null</code> or empty, the attribute will be removed from the + * specified launch specification. + * + * @param launchSpec The launch specification. Must not be <code>null</code>. + * @param contexts The launch contexts to save or <code>null</code>. + */ + public final static void setLaunchContexts(ILaunchSpecification launchSpec, IModelNode[] contexts) { + delegate.setItems(launchSpec, contexts); + } + + /** + * Writes the given launch contexts into a string encoded in XML. + * + * @param contexts The launch contexts to encode. Must not be <code>null</code>. + * @return The full XML representation of the given contexts or <code>null</code>. + */ + public final static String encodeLaunchContexts(IModelNode[] contexts) { + Assert.isNotNull(contexts); + + // The final result + String result = null; + + // Generate the write cache key + String writeCacheKey = makeWriteCacheKey(contexts); + + // Check if we have the contexts already generated before + synchronized (writeCache) { + if (writeCache.containsKey(writeCacheKey)) { + result = writeCache.get(writeCacheKey); + } + } + + // If no cache hit, generate from scratch + if (result == null) { + result = delegate.encodeItems(contexts); + + synchronized (writeCache) { + // Limit the write cache capacity + checkCacheCapacity(writeCache, WRITE_CACHE_MAX_CAPACITY); + // And put it into the write cache + writeCache.put(writeCacheKey, result); + } + } + + return result; + } + + /** + * Generates a write cache key from the given contexts. + * + * @param contexts The contexts + * @return The corresponding write key cache. + */ + private static String makeWriteCacheKey(IModelNode[] contexts) { + Assert.isNotNull(contexts); + + StringBuffer key = new StringBuffer(); + for (IModelNode context : contexts) { + key.append(Integer.toHexString(context.hashCode())); + key.append(':'); + } + if (key.charAt(key.length() - 1) == ':') { + key.setCharAt(key.length() - 1, ' '); + } + return key.toString().trim(); + } + + /** + * Reads the selected launch contexts from the given XML encoded string. + * + * @param encodedContexts The selected launch contexts encoded as XML string. Must not be <code>null</code>. + * @return The selected launch contexts or an empty array. + */ + public final static IModelNode[] decodeLaunchContexts(String encodedContexts) { + Assert.isNotNull(encodedContexts); + + List<IModelNode> contexts = null; + + if (!"".equals(encodedContexts.trim())) { //$NON-NLS-1$ + synchronized (readCache) { + // Check if we have the contexts already parsed before + if (readCache.containsKey(encodedContexts)) { + // Take the result from the cache + contexts = readCache.get(encodedContexts); + // check sanity. If empty or we cannot find the step context, + // drop the cache value and decode again. + ListIterator<IModelNode> iterator = contexts.listIterator(); + while (iterator.hasNext()) { + IModelNode node = iterator.next(); + IPropertiesAccessService service = ServiceManager.getInstance().getService(node, IPropertiesAccessService.class); + boolean isGhost = false; + if (service != null) { + Object value = service.getProperty(node, IModelNode.PROPERTY_IS_GHOST); + if (value instanceof Boolean) { + isGhost = ((Boolean)value).booleanValue(); + } + } + if (isGhost) { + contexts = null; + readCache.remove(encodedContexts); + break; + } + } + + if (contexts != null && contexts.isEmpty()) { + readCache.remove(encodedContexts); + contexts = null; + } + } + } + + if (contexts == null || contexts.isEmpty()) { + contexts = delegate.decodeItems(encodedContexts); + if (!contexts.isEmpty()) { + synchronized (readCache) { + // Limit the read cache capacity + checkCacheCapacity(readCache, READ_CACHE_MAX_CAPACITY); + // Put the result into the read cache + readCache.put(encodedContexts, contexts); + } + } + } + } + + return contexts != null ? contexts.toArray(new IModelNode[contexts.size()]) : new IModelNode[0]; + } + + /** + * Internal helper method to ensure a maximum capacity of the caches. + */ + private final static void checkCacheCapacity(Map<String, ?> cache, int maxCapacity) { + if (cache.size() < maxCapacity) { + return; + } + // Get all keys + String[] keys = cache.keySet().toArray(new String[cache.keySet().size()]); + // And remove all keys starting with the eldest till the + // capacity is fine again. + for (String key : keys) { + cache.remove(key); + if (cache.size() < maxCapacity / 2) { + break; + } + } + } + + /** + * Returns the list of configured launch contexts from the given launch configuration. + * <p> + * If the given launch configuration is <code>null</code> and the method will return an empty + * array. + * + * @param configuration The launch configuration or <code>null</code>. + * @return The list of configured launch contexts or an empty array. + */ + public static final IModelNode[] getLaunchContexts(ILaunchConfiguration configuration) { + List<IModelNode> list = delegate.getItems(configuration); + return list.toArray(new IModelNode[list.size()]); + } + + /** + * Returns the list of configured launch contexts from the given launch specification. + * <p> + * If the given launch specification is <code>null</code> and the method will return an empty + * array. + * + * @param launchSpec The launch specification or <code>null</code>. + * @return The list of configured launch contexts or an empty array. + */ + public static final IModelNode[] getLaunchContexts(ILaunchSpecification launchSpec) { + List<IModelNode> list = delegate.getItems(launchSpec); + return list.toArray(new IModelNode[list.size()]); + } + + /** + * Returns the first configured launch context from the given launch configuration. + * + * @param configuration The launch configuration or <code>null</code>. + * @return The first configured launch context or <code>null</code>. + */ + public static final IModelNode getFirstLaunchContext(ILaunchConfiguration configuration) { + List<IModelNode> list = delegate.getItems(configuration); + return list != null && !list.isEmpty() ? list.get(0) : null; + } + +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/projects/ReferencedProjectItem.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/projects/ReferencedProjectItem.java index 0c5d8d0b3..d4a33ce48 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/projects/ReferencedProjectItem.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/projects/ReferencedProjectItem.java @@ -1,72 +1,72 @@ -/*******************************************************************************
- * 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.launch.core.persistence.projects;
-
-import org.eclipse.tcf.te.launch.core.interfaces.IReferencedProjectItem;
-import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
-
-/**
- * ReferencedProjectItem
- */
-public class ReferencedProjectItem extends PropertiesContainer implements IReferencedProjectItem {
-
- /**
- * Constructor.
- */
- public ReferencedProjectItem() {
- setProperty(PROPERTY_ENABLED, true);
- }
-
- public ReferencedProjectItem(String projectName) {
- this();
- setProperty(PROPERTY_PROJECT_NAME, projectName);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.core.interfaces.IReferencedProjectItem#isEnabled()
- */
- @Override
- public boolean isEnabled() {
- return getBooleanProperty(PROPERTY_ENABLED);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.core.interfaces.IReferencedProjectItem#getProjectName()
- */
- @Override
- public String getProjectName() {
- return getStringProperty(PROPERTY_PROJECT_NAME);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.properties.PropertiesContainer#hashCode()
- */
- @Override
- public int hashCode() {
- if (getProjectName() != null) {
- return getProjectName().hashCode();
- }
- return super.hashCode();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.properties.PropertiesContainer#equals(java.lang.Object)
- */
- @Override
- public boolean equals(Object obj) {
- if (obj instanceof IReferencedProjectItem) {
- String pn1 = getProjectName();
- String pn2 = ((IReferencedProjectItem)obj).getProjectName();
- return pn1 != null ? pn1.equals(pn2) : pn2 == null;
- }
- return super.equals(obj);
- }
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.launch.core.persistence.projects; + +import org.eclipse.tcf.te.launch.core.interfaces.IReferencedProjectItem; +import org.eclipse.tcf.te.runtime.properties.PropertiesContainer; + +/** + * ReferencedProjectItem + */ +public class ReferencedProjectItem extends PropertiesContainer implements IReferencedProjectItem { + + /** + * Constructor. + */ + public ReferencedProjectItem() { + setProperty(PROPERTY_ENABLED, true); + } + + public ReferencedProjectItem(String projectName) { + this(); + setProperty(PROPERTY_PROJECT_NAME, projectName); + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.core.interfaces.IReferencedProjectItem#isEnabled() + */ + @Override + public boolean isEnabled() { + return getBooleanProperty(PROPERTY_ENABLED); + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.core.interfaces.IReferencedProjectItem#getProjectName() + */ + @Override + public String getProjectName() { + return getStringProperty(PROPERTY_PROJECT_NAME); + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.properties.PropertiesContainer#hashCode() + */ + @Override + public int hashCode() { + if (getProjectName() != null) { + return getProjectName().hashCode(); + } + return super.hashCode(); + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.properties.PropertiesContainer#equals(java.lang.Object) + */ + @Override + public boolean equals(Object obj) { + if (obj instanceof IReferencedProjectItem) { + String pn1 = getProjectName(); + String pn2 = ((IReferencedProjectItem)obj).getProjectName(); + return pn1 != null ? pn1.equals(pn2) : pn2 == null; + } + return super.equals(obj); + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/projects/ReferencedProjectItemValidator.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/projects/ReferencedProjectItemValidator.java index 74b33d2ff..ffe47ec4e 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/projects/ReferencedProjectItemValidator.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/projects/ReferencedProjectItemValidator.java @@ -1,49 +1,49 @@ -/*******************************************************************************
- * 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.launch.core.persistence.projects;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.tcf.te.launch.core.interfaces.IReferencedProjectItem;
-import org.eclipse.tcf.te.launch.core.nls.Messages;
-
-/**
- * ReferencedProjectItemValidator
- */
-public class ReferencedProjectItemValidator {
-
- public static final Map<String,String> validate(IReferencedProjectItem item) {
- Assert.isNotNull(item);
-
- Map<String,String> invalid = new HashMap<String,String>();
-
- String projectName = item.getStringProperty(IReferencedProjectItem.PROPERTY_PROJECT_NAME);
-
- if (projectName == null || projectName.trim().length() == 0) {
- invalid.put(IReferencedProjectItem.PROPERTY_PROJECT_NAME, Messages.ReferencedProjectItemValidator_missingProject);
- }
- else {
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- if (project == null) {
- invalid.put(IReferencedProjectItem.PROPERTY_PROJECT_NAME, Messages.ReferencedProjectItemValidator_notExistingProject);
- }
- else if (!project.isOpen()) {
- invalid.put(IReferencedProjectItem.PROPERTY_PROJECT_NAME, Messages.ReferencedProjectItemValidator_closedProject);
- }
- }
-
- return invalid.isEmpty() ? null : invalid;
- }
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.launch.core.persistence.projects; + +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.Assert; +import org.eclipse.tcf.te.launch.core.interfaces.IReferencedProjectItem; +import org.eclipse.tcf.te.launch.core.nls.Messages; + +/** + * ReferencedProjectItemValidator + */ +public class ReferencedProjectItemValidator { + + public static final Map<String,String> validate(IReferencedProjectItem item) { + Assert.isNotNull(item); + + Map<String,String> invalid = new HashMap<String,String>(); + + String projectName = item.getStringProperty(IReferencedProjectItem.PROPERTY_PROJECT_NAME); + + if (projectName == null || projectName.trim().length() == 0) { + invalid.put(IReferencedProjectItem.PROPERTY_PROJECT_NAME, Messages.ReferencedProjectItemValidator_missingProject); + } + else { + IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName); + if (project == null) { + invalid.put(IReferencedProjectItem.PROPERTY_PROJECT_NAME, Messages.ReferencedProjectItemValidator_notExistingProject); + } + else if (!project.isOpen()) { + invalid.put(IReferencedProjectItem.PROPERTY_PROJECT_NAME, Messages.ReferencedProjectItemValidator_closedProject); + } + } + + return invalid.isEmpty() ? null : invalid; + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/projects/ReferencedProjectsPersistenceDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/projects/ReferencedProjectsPersistenceDelegate.java index 79be4e877..a98996d03 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/projects/ReferencedProjectsPersistenceDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/projects/ReferencedProjectsPersistenceDelegate.java @@ -1,114 +1,114 @@ -/*******************************************************************************
- * 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.launch.core.persistence.projects;
-
-import java.util.List;
-
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.tcf.te.launch.core.interfaces.IReferencedProjectItem;
-import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification;
-import org.eclipse.tcf.te.launch.core.lm.interfaces.IReferencedProjectLaunchAttributes;
-import org.eclipse.tcf.te.launch.core.persistence.AbstractItemListPersistenceDelegate;
-import org.eclipse.tcf.te.launch.core.persistence.AbstractItemListXMLParser;
-
-/**
- * Referenced projects persistence delegate.
- */
-public class ReferencedProjectsPersistenceDelegate {
-
- private static final String TAG_PROJECT = "referencedProject"; //$NON-NLS-1$
-
- private static final AbstractItemListPersistenceDelegate<IReferencedProjectItem> delegate =
- new AbstractItemListPersistenceDelegate<IReferencedProjectItem>(TAG_PROJECT, IReferencedProjectLaunchAttributes.ATTR_REFERENCED_PROJECTS) {
- @Override
- protected AbstractItemListXMLParser<IReferencedProjectItem> getXMLParser() {
- return new AbstractItemListXMLParser<IReferencedProjectItem>(TAG_PROJECT) {
- @Override
- protected Class<?> getReadClass() {
- return IReferencedProjectItem.class;
- }
- };
- }
- };
-
- /**
- * Saves the selected referenced project items to the specified launch configuration working copy. If the
- * selected referenced project items are <code>null</code> or empty, the attribute will be removed from
- * the specified launch configuration working copy.
- *
- * @param wc The launch configuration working copy. Must not be <code>null</code>.
- * @param items The referenced project items to save or <code>null</code>.
- */
- public final static void setReferencedProjects(ILaunchConfigurationWorkingCopy wc, IReferencedProjectItem[] items) {
- delegate.setItems(wc, items);
- }
-
- /**
- * Saves the selected referenced project items to the specified launch specification. If the selected
- * referenced project items are <code>null</code> or empty, the attribute will be removed from the
- * specified launch specification.
- *
- * @param launchSpec The launch specification. Must not be <code>null</code>.
- * @param items The referenced project items to save or <code>null</code>.
- */
- public final static void setReferencedProjects(ILaunchSpecification launchSpec, IReferencedProjectItem[] items) {
- delegate.setItems(launchSpec, items);
- }
-
- /**
- * Writes the given referenced project items into a string encoded in XML.
- *
- * @param items The referenced project items to encode. Must not be <code>null</code>.
- * @return The full XML representation of the given items or <code>null</code>.
- */
- public final static String encodeReferencedProjectItems(IReferencedProjectItem[] items) {
- return delegate.encodeItems(items);
- }
-
- /**
- * Reads the selected referenced project items from the given XML encoded string.
- *
- * @param encodedItems The selected referenced project items encoded as XML string. Must not be <code>null</code>.
- * @return The selected referenced project items or an empty array.
- */
- public final static IReferencedProjectItem[] decodeReferencedProjectItems(String encodedItems) {
- List<IReferencedProjectItem> list = delegate.decodeItems(encodedItems);
- return list.toArray(new IReferencedProjectItem[list.size()]);
- }
-
- /**
- * Returns the list of configured referenced project items from the given launch configuration.
- * <p>
- * If the given launch configuration is <code>null</code> and the method will return an empty
- * array.
- *
- * @param configuration The launch configuration or <code>null</code>.
- * @return The list of configured referenced project items or an empty array.
- */
- public static final IReferencedProjectItem[] getReferencedProjects(ILaunchConfiguration configuration) {
- List<IReferencedProjectItem> list = delegate.getItems(configuration);
- return list.toArray(new IReferencedProjectItem[list.size()]);
- }
-
- /**
- * Returns the list of configured referenced project items from the given launch specification.
- * <p>
- * If the given launch specification is <code>null</code> and the method will return an empty
- * array.
- *
- * @param launchSpec The launch specification or <code>null</code>.
- * @return The list of configured referenced project items or an empty array.
- */
- public static final IReferencedProjectItem[] getReferencedProjects(ILaunchSpecification launchSpec) {
- List<IReferencedProjectItem> list = delegate.getItems(launchSpec);
- return list.toArray(new IReferencedProjectItem[list.size()]);
- }
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.launch.core.persistence.projects; + +import java.util.List; + +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.tcf.te.launch.core.interfaces.IReferencedProjectItem; +import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification; +import org.eclipse.tcf.te.launch.core.lm.interfaces.IReferencedProjectLaunchAttributes; +import org.eclipse.tcf.te.launch.core.persistence.AbstractItemListPersistenceDelegate; +import org.eclipse.tcf.te.launch.core.persistence.AbstractItemListXMLParser; + +/** + * Referenced projects persistence delegate. + */ +public class ReferencedProjectsPersistenceDelegate { + + private static final String TAG_PROJECT = "referencedProject"; //$NON-NLS-1$ + + private static final AbstractItemListPersistenceDelegate<IReferencedProjectItem> delegate = + new AbstractItemListPersistenceDelegate<IReferencedProjectItem>(TAG_PROJECT, IReferencedProjectLaunchAttributes.ATTR_REFERENCED_PROJECTS) { + @Override + protected AbstractItemListXMLParser<IReferencedProjectItem> getXMLParser() { + return new AbstractItemListXMLParser<IReferencedProjectItem>(TAG_PROJECT) { + @Override + protected Class<?> getReadClass() { + return IReferencedProjectItem.class; + } + }; + } + }; + + /** + * Saves the selected referenced project items to the specified launch configuration working copy. If the + * selected referenced project items are <code>null</code> or empty, the attribute will be removed from + * the specified launch configuration working copy. + * + * @param wc The launch configuration working copy. Must not be <code>null</code>. + * @param items The referenced project items to save or <code>null</code>. + */ + public final static void setReferencedProjects(ILaunchConfigurationWorkingCopy wc, IReferencedProjectItem[] items) { + delegate.setItems(wc, items); + } + + /** + * Saves the selected referenced project items to the specified launch specification. If the selected + * referenced project items are <code>null</code> or empty, the attribute will be removed from the + * specified launch specification. + * + * @param launchSpec The launch specification. Must not be <code>null</code>. + * @param items The referenced project items to save or <code>null</code>. + */ + public final static void setReferencedProjects(ILaunchSpecification launchSpec, IReferencedProjectItem[] items) { + delegate.setItems(launchSpec, items); + } + + /** + * Writes the given referenced project items into a string encoded in XML. + * + * @param items The referenced project items to encode. Must not be <code>null</code>. + * @return The full XML representation of the given items or <code>null</code>. + */ + public final static String encodeReferencedProjectItems(IReferencedProjectItem[] items) { + return delegate.encodeItems(items); + } + + /** + * Reads the selected referenced project items from the given XML encoded string. + * + * @param encodedItems The selected referenced project items encoded as XML string. Must not be <code>null</code>. + * @return The selected referenced project items or an empty array. + */ + public final static IReferencedProjectItem[] decodeReferencedProjectItems(String encodedItems) { + List<IReferencedProjectItem> list = delegate.decodeItems(encodedItems); + return list.toArray(new IReferencedProjectItem[list.size()]); + } + + /** + * Returns the list of configured referenced project items from the given launch configuration. + * <p> + * If the given launch configuration is <code>null</code> and the method will return an empty + * array. + * + * @param configuration The launch configuration or <code>null</code>. + * @return The list of configured referenced project items or an empty array. + */ + public static final IReferencedProjectItem[] getReferencedProjects(ILaunchConfiguration configuration) { + List<IReferencedProjectItem> list = delegate.getItems(configuration); + return list.toArray(new IReferencedProjectItem[list.size()]); + } + + /** + * Returns the list of configured referenced project items from the given launch specification. + * <p> + * If the given launch specification is <code>null</code> and the method will return an empty + * array. + * + * @param launchSpec The launch specification or <code>null</code>. + * @return The list of configured referenced project items or an empty array. + */ + public static final IReferencedProjectItem[] getReferencedProjects(ILaunchSpecification launchSpec) { + List<IReferencedProjectItem> list = delegate.getItems(launchSpec); + return list.toArray(new IReferencedProjectItem[list.size()]); + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/preferences/IPreferenceKeys.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/preferences/IPreferenceKeys.java index 58c28de97..5c4b50ed3 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/preferences/IPreferenceKeys.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/preferences/IPreferenceKeys.java @@ -1,62 +1,62 @@ -/*******************************************************************************
- * Copyright (c) 2011, 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.launch.core.preferences;
-
-
-/**
- * The locator model bundle preference key identifiers.
- */
-public interface IPreferenceKeys {
- /**
- * Common prefix for all core preference keys
- */
- public final String PREFIX = "te.launch.core."; //$NON-NLS-1$
-
- /**
- * Launch configuration find/create mode: Always create new launch configurations.
- */
- public static final int MODE_ALWAYS_NEW = 0;
-
- /**
- * Launch configuration find/create mode: Re-use launch configuration if all attributes are matching.
- */
- public static final int MODE_FULL_MATCH_LAUNCH_CONFIG = 1;
-
- /**
- * Launch configuration find/create mode: Re-use launch configuration if the target ID matches.
- */
- public static final int MODE_FULL_MATCH_TARGET = 2;
-
- /**
- * Launch configuration find/create mode: Re-use first matching launch configuration.
- */
- public static final int MODE_FIRST_MATCHING = 3;
-
- /**
- * Launch configuration find/create mode. See the <code>MODE_*</code> constants.
- */
- public static final String PREF_LAUNCH_CONFIG_FIND_CREATE_MODE = PREFIX + "launchConfigFindCreateMode"; //$NON-NLS-1$
-
- /**
- * If set to <code>true</code>, project references will be added by default to newly created launch configurations.
- */
- public static final String PREF_ADD_PROJECT_TO_NEW_LAUNCH_CONFIG = PREFIX + "addProjectToNewLaunchConfig"; //$NON-NLS-1$
-
- /**
- * If set to <code>true</code>, launches are sorted by their last launched time stamp.
- */
- public static final String PREF_SORT_LAUNCHES_BY_LAST_LAUNCHED = PREFIX + ".sortLaunchesByLastLaunched"; //$NON-NLS-1$
-
- /**
- * Preference key to access the flag to hide favorite launches content extension.
- */
- public static final String PREF_HIDE_FAVORITE_LAUNCHES_EXTENSION = "org.eclipse.tcf.te.tcf.launch.ui.navigator.favorites.content.hide"; //$NON-NLS-1$
-
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.launch.core.preferences; + + +/** + * The locator model bundle preference key identifiers. + */ +public interface IPreferenceKeys { + /** + * Common prefix for all core preference keys + */ + public final String PREFIX = "te.launch.core."; //$NON-NLS-1$ + + /** + * Launch configuration find/create mode: Always create new launch configurations. + */ + public static final int MODE_ALWAYS_NEW = 0; + + /** + * Launch configuration find/create mode: Re-use launch configuration if all attributes are matching. + */ + public static final int MODE_FULL_MATCH_LAUNCH_CONFIG = 1; + + /** + * Launch configuration find/create mode: Re-use launch configuration if the target ID matches. + */ + public static final int MODE_FULL_MATCH_TARGET = 2; + + /** + * Launch configuration find/create mode: Re-use first matching launch configuration. + */ + public static final int MODE_FIRST_MATCHING = 3; + + /** + * Launch configuration find/create mode. See the <code>MODE_*</code> constants. + */ + public static final String PREF_LAUNCH_CONFIG_FIND_CREATE_MODE = PREFIX + "launchConfigFindCreateMode"; //$NON-NLS-1$ + + /** + * If set to <code>true</code>, project references will be added by default to newly created launch configurations. + */ + public static final String PREF_ADD_PROJECT_TO_NEW_LAUNCH_CONFIG = PREFIX + "addProjectToNewLaunchConfig"; //$NON-NLS-1$ + + /** + * If set to <code>true</code>, launches are sorted by their last launched time stamp. + */ + public static final String PREF_SORT_LAUNCHES_BY_LAST_LAUNCHED = PREFIX + ".sortLaunchesByLastLaunched"; //$NON-NLS-1$ + + /** + * Preference key to access the flag to hide favorite launches content extension. + */ + public static final String PREF_HIDE_FAVORITE_LAUNCHES_EXTENSION = "org.eclipse.tcf.te.tcf.launch.ui.navigator.favorites.content.hide"; //$NON-NLS-1$ + +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/preferences/PreferencesInitializer.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/preferences/PreferencesInitializer.java index 66ef5238e..254df84da 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/preferences/PreferencesInitializer.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/preferences/PreferencesInitializer.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.launch.core.preferences;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.tcf.te.launch.core.activator.CoreBundleActivator;
-import org.eclipse.tcf.te.runtime.preferences.ScopedEclipsePreferences;
-
-/**
- * Launch core framework preferences initializer implementation.
- */
-public class PreferencesInitializer extends AbstractPreferenceInitializer {
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
- @Override
- public void initializeDefaultPreferences() {
- // Get the preferences store
- ScopedEclipsePreferences store = CoreBundleActivator.getScopedPreferences();
-
- /**
- * Launch configuration find/create mode: default <code>MODE_FIRST_MATCHING</code>.
- */
- store.putDefaultInt(IPreferenceKeys.PREF_LAUNCH_CONFIG_FIND_CREATE_MODE, IPreferenceKeys.MODE_FIRST_MATCHING);
-
- /**
- * Add project references to newly created launch configurations: default <code>true</code>.
- */
- store.putDefaultBoolean(IPreferenceKeys.PREF_ADD_PROJECT_TO_NEW_LAUNCH_CONFIG, true);
-
- /**
- * Sort launches by their last launched time stamp: default <code>true</code>.
- */
- store.putDefaultBoolean(IPreferenceKeys.PREF_SORT_LAUNCHES_BY_LAST_LAUNCHED, true);
- }
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.launch.core.preferences; + +import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; +import org.eclipse.tcf.te.launch.core.activator.CoreBundleActivator; +import org.eclipse.tcf.te.runtime.preferences.ScopedEclipsePreferences; + +/** + * Launch core framework preferences initializer implementation. + */ +public class PreferencesInitializer extends AbstractPreferenceInitializer { + + /* (non-Javadoc) + * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences() + */ + @Override + public void initializeDefaultPreferences() { + // Get the preferences store + ScopedEclipsePreferences store = CoreBundleActivator.getScopedPreferences(); + + /** + * Launch configuration find/create mode: default <code>MODE_FIRST_MATCHING</code>. + */ + store.putDefaultInt(IPreferenceKeys.PREF_LAUNCH_CONFIG_FIND_CREATE_MODE, IPreferenceKeys.MODE_FIRST_MATCHING); + + /** + * Add project references to newly created launch configurations: default <code>true</code>. + */ + store.putDefaultBoolean(IPreferenceKeys.PREF_ADD_PROJECT_TO_NEW_LAUNCH_CONFIG, true); + + /** + * Sort launches by their last launched time stamp: default <code>true</code>. + */ + store.putDefaultBoolean(IPreferenceKeys.PREF_SORT_LAUNCHES_BY_LAST_LAUNCHED, true); + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/properties/PropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/properties/PropertyTester.java index 28e7ca609..bcc989554 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/properties/PropertyTester.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/properties/PropertyTester.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/AbstractSelectionContext.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/AbstractSelectionContext.java index 5b8bdc65b..032655874 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/AbstractSelectionContext.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/AbstractSelectionContext.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/LaunchSelection.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/LaunchSelection.java index 8b9515e40..5a87d76b8 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/LaunchSelection.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/LaunchSelection.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/ProjectSelectionContext.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/ProjectSelectionContext.java index 83e37ac6b..0ca37ecb3 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/ProjectSelectionContext.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/ProjectSelectionContext.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/RemoteSelectionContext.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/RemoteSelectionContext.java index 4065bb6b8..1f0e2e75e 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/RemoteSelectionContext.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/RemoteSelectionContext.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/interfaces/ILaunchSelection.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/interfaces/ILaunchSelection.java index 11c34cd19..b48de66e1 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/interfaces/ILaunchSelection.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/interfaces/ILaunchSelection.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/interfaces/IProjectSelectionContext.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/interfaces/IProjectSelectionContext.java index 558fb669f..6dc088bc9 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/interfaces/IProjectSelectionContext.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/interfaces/IProjectSelectionContext.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/interfaces/IRemoteSelectionContext.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/interfaces/IRemoteSelectionContext.java index df97305d9..3358cb86c 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/interfaces/IRemoteSelectionContext.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/interfaces/IRemoteSelectionContext.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/interfaces/ISelectionContext.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/interfaces/ISelectionContext.java index 959510901..83784f7eb 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/interfaces/ISelectionContext.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/selection/interfaces/ISelectionContext.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/steps/AbstractLaunchStep.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/steps/AbstractLaunchStep.java index 97cf1dfe0..70adfe5a1 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/steps/AbstractLaunchStep.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/steps/AbstractLaunchStep.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/steps/RemoveLaunchStep.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/steps/RemoveLaunchStep.java index 54564cb67..ad5a1e277 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/steps/RemoveLaunchStep.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/steps/RemoveLaunchStep.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/steps/iterators/AbstractLaunchStepGroupIterator.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/steps/iterators/AbstractLaunchStepGroupIterator.java index 4ca43c070..ba08a7ea6 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/steps/iterators/AbstractLaunchStepGroupIterator.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/steps/iterators/AbstractLaunchStepGroupIterator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/steps/iterators/LaunchContextIterator.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/steps/iterators/LaunchContextIterator.java index aca87d22f..d1f9ca6e4 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/steps/iterators/LaunchContextIterator.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/steps/iterators/LaunchContextIterator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/build.properties index 596bb0ca9..7f8965955 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/build.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/build.properties @@ -1,17 +1,17 @@ -###############################################################################
-# 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,\
- plugin.xml,\
- icons/,\
- about.html
+############################################################################### +# Copyright (c) 2012, 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,\ + plugin.xml,\ + icons/,\ + about.html diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.properties index ecddd56d3..b5ef7144e 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.properties @@ -1,5 +1,5 @@ ################################################################################## -# Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/activator/UIPlugin.java index fd92c8e1d..df80d5d2c 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/activator/UIPlugin.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/activator/UIPlugin.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/DeleteHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/DeleteHandler.java index 6e3029334..2b7c00f87 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/DeleteHandler.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/DeleteHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/LaunchDialogHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/LaunchDialogHandler.java index 2af388ab9..cf5259ba7 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/LaunchDialogHandler.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/LaunchDialogHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/LaunchHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/LaunchHandler.java index d476b4101..e3fe96617 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/LaunchHandler.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/LaunchHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/LaunchLaunchConfigurationContributionItem.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/LaunchLaunchConfigurationContributionItem.java index 66c487f66..0a9766bdc 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/LaunchLaunchConfigurationContributionItem.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/LaunchLaunchConfigurationContributionItem.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/LaunchShortcutHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/LaunchShortcutHandler.java index 2c3583a12..07cc61a16 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/LaunchShortcutHandler.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/LaunchShortcutHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/NewLaunchConfigurationContributionItem.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/NewLaunchConfigurationContributionItem.java index 00197f176..6b31d852d 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/NewLaunchConfigurationContributionItem.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/NewLaunchConfigurationContributionItem.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/OpenActionProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/OpenActionProvider.java index 088617357..83c3d39ae 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/OpenActionProvider.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/OpenActionProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/OpenLaunchConfigurationContributionItem.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/OpenLaunchConfigurationContributionItem.java index b6450ed39..ab92a5b09 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/OpenLaunchConfigurationContributionItem.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/OpenLaunchConfigurationContributionItem.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/RefreshHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/RefreshHandler.java index 133661b58..cada7d230 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/RefreshHandler.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/handler/RefreshHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/help/IContextHelpIds.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/help/IContextHelpIds.java index 44b819aeb..8ff6fbcaf 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/help/IContextHelpIds.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/help/IContextHelpIds.java @@ -1,28 +1,28 @@ -/*******************************************************************************
- * Copyright (c) 2011, 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.launch.ui.help;
-
-import org.eclipse.tcf.te.launch.ui.activator.UIPlugin;
-
-/**
- * Context help id definitions.
- */
-public interface IContextHelpIds {
-
- /**
- * UI plug-in common context help id prefix.
- */
- public final static String PREFIX = UIPlugin.getUniqueIdentifier() + "."; //$NON-NLS-1$
-
- /**
- * Launch editor page.
- */
- public final static String LAUNCH_EDITOR = PREFIX + "LaunchEditor"; //$NON-NLS-1$
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.launch.ui.help; + +import org.eclipse.tcf.te.launch.ui.activator.UIPlugin; + +/** + * Context help id definitions. + */ +public interface IContextHelpIds { + + /** + * UI plug-in common context help id prefix. + */ + public final static String PREFIX = UIPlugin.getUniqueIdentifier() + "."; //$NON-NLS-1$ + + /** + * Launch editor page. + */ + public final static String LAUNCH_EDITOR = PREFIX + "LaunchEditor"; //$NON-NLS-1$ +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/interfaces/ILaunchConfigurationTabFormPart.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/interfaces/ILaunchConfigurationTabFormPart.java index c5b4c25d8..b9bbaaef6 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/interfaces/ILaunchConfigurationTabFormPart.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/interfaces/ILaunchConfigurationTabFormPart.java @@ -1,49 +1,49 @@ -/*******************************************************************************
- * 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.launch.ui.interfaces;
-
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-
-/**
- * A form part which can be added to launch configuration tabs and participate at the launch
- * configuration tab life cycle.
- */
-public interface ILaunchConfigurationTabFormPart {
-
- /**
- * Initializes this form part controls with values from the given launch configuration. This
- * method is called when a configuration is selected to view or edit, after this form part's
- * control has been created.
- *
- * @param configuration The launch configuration. Must not be <code>null</code>.
- */
- public void initializeFrom(ILaunchConfiguration configuration);
-
- /**
- * Copies values from this form part into the given launch configuration.
- *
- * @param configuration The launch configuration. Must not be <code>null</code>.
- */
- public void performApply(ILaunchConfigurationWorkingCopy configuration);
-
- /**
- * Returns whether this form part is in a valid state in the context of the specified launch
- * configuration.
- * <p>
- * This information is typically used by the launch configuration dialog to decide when it is
- * okay to launch.
- * </p>
- *
- * @param configuration The launch configuration. Must not be <code>null</code>.
- * @return <code>True</code> if this form part is in a valid state.
- */
- public boolean isValid(ILaunchConfiguration configuration);
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.launch.ui.interfaces; + +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; + +/** + * A form part which can be added to launch configuration tabs and participate at the launch + * configuration tab life cycle. + */ +public interface ILaunchConfigurationTabFormPart { + + /** + * Initializes this form part controls with values from the given launch configuration. This + * method is called when a configuration is selected to view or edit, after this form part's + * control has been created. + * + * @param configuration The launch configuration. Must not be <code>null</code>. + */ + public void initializeFrom(ILaunchConfiguration configuration); + + /** + * Copies values from this form part into the given launch configuration. + * + * @param configuration The launch configuration. Must not be <code>null</code>. + */ + public void performApply(ILaunchConfigurationWorkingCopy configuration); + + /** + * Returns whether this form part is in a valid state in the context of the specified launch + * configuration. + * <p> + * This information is typically used by the launch configuration dialog to decide when it is + * okay to launch. + * </p> + * + * @param configuration The launch configuration. Must not be <code>null</code>. + * @return <code>True</code> if this form part is in a valid state. + */ + public boolean isValid(ILaunchConfiguration configuration); +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/ImageConsts.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/ImageConsts.java index cf1abc71b..673c4352e 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/ImageConsts.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/ImageConsts.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/PropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/PropertyTester.java index be40a7568..d4651b05d 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/PropertyTester.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/PropertyTester.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/adapters/AdapterFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/adapters/AdapterFactory.java index aa10eedd5..b99abd0fc 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/adapters/AdapterFactory.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/adapters/AdapterFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/adapters/CategorizableAdapter.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/adapters/CategorizableAdapter.java index d455122a3..7f107e64f 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/adapters/CategorizableAdapter.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/adapters/CategorizableAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/pages/LaunchExplorerEditorPage.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/pages/LaunchExplorerEditorPage.java index dbe0d9205..2904a56c6 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/pages/LaunchExplorerEditorPage.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/pages/LaunchExplorerEditorPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/preferences/PreferencesInitializer.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/preferences/PreferencesInitializer.java index 9af212341..4767343d3 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/preferences/PreferencesInitializer.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/preferences/PreferencesInitializer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/FileTransferFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/FileTransferFilter.java index 86250deb7..ac87247d0 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/FileTransferFilter.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/FileTransferFilter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/FileTransferPropertiesSection.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/FileTransferPropertiesSection.java index 88e90afd8..63c5c30d3 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/FileTransferPropertiesSection.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/FileTransferPropertiesSection.java @@ -1,147 +1,147 @@ -/*******************************************************************************
- * 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.launch.ui.internal.properties;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.tcf.te.launch.core.persistence.filetransfer.FileTransfersPersistenceDelegate;
-import org.eclipse.tcf.te.launch.ui.model.LaunchNode;
-import org.eclipse.tcf.te.launch.ui.nls.Messages;
-import org.eclipse.tcf.te.launch.ui.properties.BaseTitledSection;
-import org.eclipse.tcf.te.launch.ui.tabs.filetransfers.FileTransferContentProvider;
-import org.eclipse.tcf.te.runtime.services.interfaces.filetransfer.IFileTransferItem;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
-
-/**
- * The property section to display the file transfer property of a launch configuration.
- */
-public class FileTransferPropertiesSection extends BaseTitledSection {
-
- protected static class FileTransferLabelProvider extends LabelProvider implements ITableLabelProvider {
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
- */
- @Override
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
- */
- @Override
- public String getColumnText(Object element, int columnIndex) {
- switch (columnIndex) {
- case 0:
- return ((IFileTransferItem)element).getHostPath().toOSString();
- case 1:
- return (((IFileTransferItem)element).getDirection() == IFileTransferItem.TARGET_TO_HOST ?
- Messages.FileTransferSection_toHost_text : Messages.FileTransferSection_toTarget_text);
- case 2:
- return ((IFileTransferItem)element).getTargetPath().toPortableString();
- case 3:
- return ((IFileTransferItem)element).getOptions();
- }
- return ""; //$NON-NLS-1$
- }
- }
-
- private IFileTransferItem[] items;
- // The table control to display the properties.
- private TableViewer viewer;
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
- */
- @Override
- public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
- super.createControls(parent, aTabbedPropertySheetPage);
-
- Table table = getWidgetFactory().createTable(composite, SWT.FULL_SELECTION | SWT.MULTI | SWT.BORDER);
- FormData data = new FormData();
- data.left = new FormAttachment(0, 0);
- data.right = new FormAttachment(100, 0);
- data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE);
- data.bottom = new FormAttachment(100, -ITabbedPropertyConstants.VSPACE);
- table.setLayoutData(data);
- TableColumn column = new TableColumn(table, SWT.LEFT);
- column.setText(Messages.FileTransferSection_host_column);
- column.setWidth(200);
- column = new TableColumn(table, SWT.CENTER);
- column.setWidth(30);
- column = new TableColumn(table, SWT.LEFT);
- column.setText(Messages.FileTransferSection_target_column);
- column.setWidth(200);
- column = new TableColumn(table, SWT.LEFT);
- column.setText(Messages.FileTransferSection_options_column);
- column.setWidth(100);
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
- viewer = new TableViewer(table);
- viewer.setContentProvider(new FileTransferContentProvider());
- viewer.setLabelProvider(new FileTransferLabelProvider());
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
- */
- @Override
- public void setInput(IWorkbenchPart part, ISelection selection) {
- super.setInput(part, selection);
- Assert.isTrue(selection instanceof IStructuredSelection);
- Object input = ((IStructuredSelection) selection).getFirstElement();
- Assert.isTrue(input instanceof LaunchNode);
- ILaunchConfiguration node = ((LaunchNode)input).getLaunchConfiguration();
- List<IFileTransferItem> list = new ArrayList<IFileTransferItem>();
- for (IFileTransferItem item : Arrays.asList(FileTransfersPersistenceDelegate.getFileTransfers(node))) {
- if (item.isEnabled()) {
- list.add(item);
- }
- }
- items = list.toArray(new IFileTransferItem[list.size()]);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
- */
- @Override
- public void refresh() {
- if (viewer != null) viewer.setInput(items);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#getText()
- */
- @Override
- protected String getText() {
- return Messages.FileTransferSection_title;
- }
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.launch.ui.internal.properties; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.ITableLabelProvider; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.layout.FormAttachment; +import org.eclipse.swt.layout.FormData; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Table; +import org.eclipse.swt.widgets.TableColumn; +import org.eclipse.tcf.te.launch.core.persistence.filetransfer.FileTransfersPersistenceDelegate; +import org.eclipse.tcf.te.launch.ui.model.LaunchNode; +import org.eclipse.tcf.te.launch.ui.nls.Messages; +import org.eclipse.tcf.te.launch.ui.properties.BaseTitledSection; +import org.eclipse.tcf.te.launch.ui.tabs.filetransfers.FileTransferContentProvider; +import org.eclipse.tcf.te.runtime.services.interfaces.filetransfer.IFileTransferItem; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants; +import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; + +/** + * The property section to display the file transfer property of a launch configuration. + */ +public class FileTransferPropertiesSection extends BaseTitledSection { + + protected static class FileTransferLabelProvider extends LabelProvider implements ITableLabelProvider { + /* (non-Javadoc) + * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int) + */ + @Override + public Image getColumnImage(Object element, int columnIndex) { + return null; + } + + /* (non-Javadoc) + * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int) + */ + @Override + public String getColumnText(Object element, int columnIndex) { + switch (columnIndex) { + case 0: + return ((IFileTransferItem)element).getHostPath().toOSString(); + case 1: + return (((IFileTransferItem)element).getDirection() == IFileTransferItem.TARGET_TO_HOST ? + Messages.FileTransferSection_toHost_text : Messages.FileTransferSection_toTarget_text); + case 2: + return ((IFileTransferItem)element).getTargetPath().toPortableString(); + case 3: + return ((IFileTransferItem)element).getOptions(); + } + return ""; //$NON-NLS-1$ + } + } + + private IFileTransferItem[] items; + // The table control to display the properties. + private TableViewer viewer; + + /* + * (non-Javadoc) + * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage) + */ + @Override + public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) { + super.createControls(parent, aTabbedPropertySheetPage); + + Table table = getWidgetFactory().createTable(composite, SWT.FULL_SELECTION | SWT.MULTI | SWT.BORDER); + FormData data = new FormData(); + data.left = new FormAttachment(0, 0); + data.right = new FormAttachment(100, 0); + data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE); + data.bottom = new FormAttachment(100, -ITabbedPropertyConstants.VSPACE); + table.setLayoutData(data); + TableColumn column = new TableColumn(table, SWT.LEFT); + column.setText(Messages.FileTransferSection_host_column); + column.setWidth(200); + column = new TableColumn(table, SWT.CENTER); + column.setWidth(30); + column = new TableColumn(table, SWT.LEFT); + column.setText(Messages.FileTransferSection_target_column); + column.setWidth(200); + column = new TableColumn(table, SWT.LEFT); + column.setText(Messages.FileTransferSection_options_column); + column.setWidth(100); + table.setHeaderVisible(true); + table.setLinesVisible(true); + viewer = new TableViewer(table); + viewer.setContentProvider(new FileTransferContentProvider()); + viewer.setLabelProvider(new FileTransferLabelProvider()); + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection) + */ + @Override + public void setInput(IWorkbenchPart part, ISelection selection) { + super.setInput(part, selection); + Assert.isTrue(selection instanceof IStructuredSelection); + Object input = ((IStructuredSelection) selection).getFirstElement(); + Assert.isTrue(input instanceof LaunchNode); + ILaunchConfiguration node = ((LaunchNode)input).getLaunchConfiguration(); + List<IFileTransferItem> list = new ArrayList<IFileTransferItem>(); + for (IFileTransferItem item : Arrays.asList(FileTransfersPersistenceDelegate.getFileTransfers(node))) { + if (item.isEnabled()) { + list.add(item); + } + } + items = list.toArray(new IFileTransferItem[list.size()]); + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh() + */ + @Override + public void refresh() { + if (viewer != null) viewer.setInput(items); + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#getText() + */ + @Override + protected String getText() { + return Messages.FileTransferSection_title; + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/LaunchConfigTypeFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/LaunchConfigTypeFilter.java index 5e3f6c362..7cc194521 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/LaunchConfigTypeFilter.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/LaunchConfigTypeFilter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/LaunchConfigTypePropertiesSection.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/LaunchConfigTypePropertiesSection.java index 46047a538..a023fd80d 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/LaunchConfigTypePropertiesSection.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/LaunchConfigTypePropertiesSection.java @@ -1,74 +1,74 @@ -/*******************************************************************************
- * Copyright (c) 2011, 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.launch.ui.internal.properties;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.tcf.te.launch.ui.model.LaunchNode;
-import org.eclipse.tcf.te.launch.ui.nls.Messages;
-import org.eclipse.tcf.te.launch.ui.properties.BaseTitledSection;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
-
-/**
- * The property section to display the properties of a launch configuration.
- */
-public class LaunchConfigTypePropertiesSection extends BaseTitledSection {
- private String nameValue = ""; //$NON-NLS-1$
-
- private Text name;
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
- */
- @Override
- public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
- super.createControls(parent, aTabbedPropertySheetPage);
-
- name = createTextField(null, Messages.LaunchConfigType_label);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
- */
- @Override
- public void setInput(IWorkbenchPart part, ISelection selection) {
- super.setInput(part, selection);
- Assert.isTrue(selection instanceof IStructuredSelection);
- Object input = ((IStructuredSelection) selection).getFirstElement();
- Assert.isTrue(input instanceof LaunchNode);
- ILaunchConfigurationType node = ((LaunchNode)input).getLaunchConfigurationType();
-
- nameValue = node.getName();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
- */
- @Override
- public void refresh() {
- if (name != null) name.setText(nameValue);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#getText()
- */
- @Override
- protected String getText() {
- return Messages.LaunchConfigType_title;
- }
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.launch.ui.internal.properties; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.debug.core.ILaunchConfigurationType; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Text; +import org.eclipse.tcf.te.launch.ui.model.LaunchNode; +import org.eclipse.tcf.te.launch.ui.nls.Messages; +import org.eclipse.tcf.te.launch.ui.properties.BaseTitledSection; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; + +/** + * The property section to display the properties of a launch configuration. + */ +public class LaunchConfigTypePropertiesSection extends BaseTitledSection { + private String nameValue = ""; //$NON-NLS-1$ + + private Text name; + + /* + * (non-Javadoc) + * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage) + */ + @Override + public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) { + super.createControls(parent, aTabbedPropertySheetPage); + + name = createTextField(null, Messages.LaunchConfigType_label); + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection) + */ + @Override + public void setInput(IWorkbenchPart part, ISelection selection) { + super.setInput(part, selection); + Assert.isTrue(selection instanceof IStructuredSelection); + Object input = ((IStructuredSelection) selection).getFirstElement(); + Assert.isTrue(input instanceof LaunchNode); + ILaunchConfigurationType node = ((LaunchNode)input).getLaunchConfigurationType(); + + nameValue = node.getName(); + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh() + */ + @Override + public void refresh() { + if (name != null) name.setText(nameValue); + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#getText() + */ + @Override + protected String getText() { + return Messages.LaunchConfigType_title; + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/LaunchContextFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/LaunchContextFilter.java index 05c10fb0d..dce9a2a5c 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/LaunchContextFilter.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/LaunchContextFilter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/LaunchContextPropertiesSection.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/LaunchContextPropertiesSection.java index ec90e02d9..f733ae869 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/LaunchContextPropertiesSection.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/LaunchContextPropertiesSection.java @@ -1,91 +1,91 @@ -/*******************************************************************************
- * Copyright (c) 2011, 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.launch.ui.internal.properties;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.tcf.te.launch.core.persistence.launchcontext.LaunchContextsPersistenceDelegate;
-import org.eclipse.tcf.te.launch.ui.model.LaunchNode;
-import org.eclipse.tcf.te.launch.ui.nls.Messages;
-import org.eclipse.tcf.te.launch.ui.properties.BaseTitledSection;
-import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
-
-/**
- * The property section to display the properties of a launch configuration.
- */
-public class LaunchContextPropertiesSection extends BaseTitledSection {
- private String launchContextValue = ""; //$NON-NLS-1$
-
- private Text launchContext;
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
- */
- @Override
- public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
- super.createControls(parent, aTabbedPropertySheetPage);
-
- launchContext = createTextField(null, Messages.ContextSelectorSection_label);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
- */
- @Override
- public void setInput(IWorkbenchPart part, ISelection selection) {
- super.setInput(part, selection);
- Assert.isTrue(selection instanceof IStructuredSelection);
- Object input = ((IStructuredSelection) selection).getFirstElement();
- Assert.isTrue(input instanceof LaunchNode);
- ILaunchConfiguration node = ((LaunchNode)input).getLaunchConfiguration();
-
- IModelNode[] contexts = LaunchContextsPersistenceDelegate.getLaunchContexts(node);
- if (contexts != null && contexts.length > 0) {
- ILabelProvider labelProvider = (ILabelProvider)contexts[0].getAdapter(ILabelProvider.class);
- launchContextValue = labelProvider.getText(contexts[0]);
- if (labelProvider instanceof ILabelDecorator) {
- launchContextValue = ((ILabelDecorator)labelProvider).decorateText(launchContextValue, contexts[0]);
- }
- if (contexts.length > 1) {
- launchContextValue += ", ..."; //$NON-NLS-1$
- }
- }
- else {
- launchContextValue = ""; //$NON-NLS-1$
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
- */
- @Override
- public void refresh() {
- if (launchContext != null) launchContext.setText(launchContextValue);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#getText()
- */
- @Override
- protected String getText() {
- return Messages.ContextSelectorSection_title;
- }
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.launch.ui.internal.properties; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.jface.viewers.ILabelDecorator; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Text; +import org.eclipse.tcf.te.launch.core.persistence.launchcontext.LaunchContextsPersistenceDelegate; +import org.eclipse.tcf.te.launch.ui.model.LaunchNode; +import org.eclipse.tcf.te.launch.ui.nls.Messages; +import org.eclipse.tcf.te.launch.ui.properties.BaseTitledSection; +import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; + +/** + * The property section to display the properties of a launch configuration. + */ +public class LaunchContextPropertiesSection extends BaseTitledSection { + private String launchContextValue = ""; //$NON-NLS-1$ + + private Text launchContext; + + /* + * (non-Javadoc) + * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage) + */ + @Override + public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) { + super.createControls(parent, aTabbedPropertySheetPage); + + launchContext = createTextField(null, Messages.ContextSelectorSection_label); + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection) + */ + @Override + public void setInput(IWorkbenchPart part, ISelection selection) { + super.setInput(part, selection); + Assert.isTrue(selection instanceof IStructuredSelection); + Object input = ((IStructuredSelection) selection).getFirstElement(); + Assert.isTrue(input instanceof LaunchNode); + ILaunchConfiguration node = ((LaunchNode)input).getLaunchConfiguration(); + + IModelNode[] contexts = LaunchContextsPersistenceDelegate.getLaunchContexts(node); + if (contexts != null && contexts.length > 0) { + ILabelProvider labelProvider = (ILabelProvider)contexts[0].getAdapter(ILabelProvider.class); + launchContextValue = labelProvider.getText(contexts[0]); + if (labelProvider instanceof ILabelDecorator) { + launchContextValue = ((ILabelDecorator)labelProvider).decorateText(launchContextValue, contexts[0]); + } + if (contexts.length > 1) { + launchContextValue += ", ..."; //$NON-NLS-1$ + } + } + else { + launchContextValue = ""; //$NON-NLS-1$ + } + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh() + */ + @Override + public void refresh() { + if (launchContext != null) launchContext.setText(launchContextValue); + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#getText() + */ + @Override + protected String getText() { + return Messages.ContextSelectorSection_title; + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/RefProjectsFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/RefProjectsFilter.java index 47f36fc84..fc04832ea 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/RefProjectsFilter.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/RefProjectsFilter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/RefProjectsPropertiesSection.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/RefProjectsPropertiesSection.java index 5c0c07dad..ee5901311 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/RefProjectsPropertiesSection.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/properties/RefProjectsPropertiesSection.java @@ -1,132 +1,132 @@ -/*******************************************************************************
- * 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.launch.ui.internal.properties;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.tcf.te.launch.core.interfaces.IReferencedProjectItem;
-import org.eclipse.tcf.te.launch.core.persistence.projects.ReferencedProjectsPersistenceDelegate;
-import org.eclipse.tcf.te.launch.ui.model.LaunchNode;
-import org.eclipse.tcf.te.launch.ui.nls.Messages;
-import org.eclipse.tcf.te.launch.ui.properties.BaseTitledSection;
-import org.eclipse.tcf.te.launch.ui.tabs.refprojects.RefProjectsContentProvider;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
-
-/**
- * The property section to display the file transfer property of a launch configuration.
- */
-public class RefProjectsPropertiesSection extends BaseTitledSection {
-
- protected static class FileTransferLabelProvider extends LabelProvider implements ITableLabelProvider {
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
- */
- @Override
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
- */
- @Override
- public String getColumnText(Object element, int columnIndex) {
- switch (columnIndex) {
- case 0:
- return ((IReferencedProjectItem)element).getProjectName();
- }
- return ""; //$NON-NLS-1$
- }
- }
-
- private IReferencedProjectItem[] items;
- // The table control to display the properties.
- private TableViewer viewer;
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
- */
- @Override
- public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
- super.createControls(parent, aTabbedPropertySheetPage);
-
- Table table = getWidgetFactory().createTable(composite, SWT.FULL_SELECTION | SWT.MULTI | SWT.BORDER);
- FormData data = new FormData();
- data.left = new FormAttachment(0, 0);
- data.right = new FormAttachment(100, 0);
- data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE);
- data.bottom = new FormAttachment(100, -ITabbedPropertyConstants.VSPACE);
- table.setLayoutData(data);
- TableColumn column = new TableColumn(table, SWT.LEFT);
- column.setText(Messages.ReferencedProjectsSection_name_column);
- column.setWidth(200);
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
- viewer = new TableViewer(table);
- viewer.setContentProvider(new RefProjectsContentProvider());
- viewer.setLabelProvider(new FileTransferLabelProvider());
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
- */
- @Override
- public void setInput(IWorkbenchPart part, ISelection selection) {
- super.setInput(part, selection);
- Assert.isTrue(selection instanceof IStructuredSelection);
- Object input = ((IStructuredSelection) selection).getFirstElement();
- Assert.isTrue(input instanceof LaunchNode);
- ILaunchConfiguration node = ((LaunchNode)input).getLaunchConfiguration();
- List<IReferencedProjectItem> list = new ArrayList<IReferencedProjectItem>();
- for (IReferencedProjectItem item : Arrays.asList(ReferencedProjectsPersistenceDelegate.getReferencedProjects(node))) {
- if (item.isEnabled()) {
- list.add(item);
- }
- }
- items = list.toArray(new IReferencedProjectItem[list.size()]);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
- */
- @Override
- public void refresh() {
- if (viewer != null) viewer.setInput(items);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#getText()
- */
- @Override
- protected String getText() {
- return Messages.ReferencedProjectsSection_title;
- }
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.launch.ui.internal.properties; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.ITableLabelProvider; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.layout.FormAttachment; +import org.eclipse.swt.layout.FormData; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Table; +import org.eclipse.swt.widgets.TableColumn; +import org.eclipse.tcf.te.launch.core.interfaces.IReferencedProjectItem; +import org.eclipse.tcf.te.launch.core.persistence.projects.ReferencedProjectsPersistenceDelegate; +import org.eclipse.tcf.te.launch.ui.model.LaunchNode; +import org.eclipse.tcf.te.launch.ui.nls.Messages; +import org.eclipse.tcf.te.launch.ui.properties.BaseTitledSection; +import org.eclipse.tcf.te.launch.ui.tabs.refprojects.RefProjectsContentProvider; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants; +import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; + +/** + * The property section to display the file transfer property of a launch configuration. + */ +public class RefProjectsPropertiesSection extends BaseTitledSection { + + protected static class FileTransferLabelProvider extends LabelProvider implements ITableLabelProvider { + /* (non-Javadoc) + * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int) + */ + @Override + public Image getColumnImage(Object element, int columnIndex) { + return null; + } + + /* (non-Javadoc) + * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int) + */ + @Override + public String getColumnText(Object element, int columnIndex) { + switch (columnIndex) { + case 0: + return ((IReferencedProjectItem)element).getProjectName(); + } + return ""; //$NON-NLS-1$ + } + } + + private IReferencedProjectItem[] items; + // The table control to display the properties. + private TableViewer viewer; + + /* + * (non-Javadoc) + * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage) + */ + @Override + public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) { + super.createControls(parent, aTabbedPropertySheetPage); + + Table table = getWidgetFactory().createTable(composite, SWT.FULL_SELECTION | SWT.MULTI | SWT.BORDER); + FormData data = new FormData(); + data.left = new FormAttachment(0, 0); + data.right = new FormAttachment(100, 0); + data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE); + data.bottom = new FormAttachment(100, -ITabbedPropertyConstants.VSPACE); + table.setLayoutData(data); + TableColumn column = new TableColumn(table, SWT.LEFT); + column.setText(Messages.ReferencedProjectsSection_name_column); + column.setWidth(200); + table.setHeaderVisible(true); + table.setLinesVisible(true); + viewer = new TableViewer(table); + viewer.setContentProvider(new RefProjectsContentProvider()); + viewer.setLabelProvider(new FileTransferLabelProvider()); + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection) + */ + @Override + public void setInput(IWorkbenchPart part, ISelection selection) { + super.setInput(part, selection); + Assert.isTrue(selection instanceof IStructuredSelection); + Object input = ((IStructuredSelection) selection).getFirstElement(); + Assert.isTrue(input instanceof LaunchNode); + ILaunchConfiguration node = ((LaunchNode)input).getLaunchConfiguration(); + List<IReferencedProjectItem> list = new ArrayList<IReferencedProjectItem>(); + for (IReferencedProjectItem item : Arrays.asList(ReferencedProjectsPersistenceDelegate.getReferencedProjects(node))) { + if (item.isEnabled()) { + list.add(item); + } + } + items = list.toArray(new IReferencedProjectItem[list.size()]); + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh() + */ + @Override + public void refresh() { + if (viewer != null) viewer.setInput(items); + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection#getText() + */ + @Override + protected String getText() { + return Messages.ReferencedProjectsSection_title; + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/model/LaunchModel.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/model/LaunchModel.java index c3e1bd789..32bf37e96 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/model/LaunchModel.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/model/LaunchModel.java @@ -1,307 +1,307 @@ -/*******************************************************************************
- * 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.launch.ui.model;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.EventObject;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationListener;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.tcf.te.launch.core.bindings.LaunchConfigTypeBindingsManager;
-import org.eclipse.tcf.te.launch.core.interfaces.IReferencedProjectItem;
-import org.eclipse.tcf.te.launch.core.lm.interfaces.ICommonLaunchAttributes;
-import org.eclipse.tcf.te.launch.core.persistence.DefaultPersistenceDelegate;
-import org.eclipse.tcf.te.launch.core.persistence.launchcontext.LaunchContextsPersistenceDelegate;
-import org.eclipse.tcf.te.launch.core.persistence.projects.ReferencedProjectItem;
-import org.eclipse.tcf.te.launch.core.persistence.projects.ReferencedProjectsPersistenceDelegate;
-import org.eclipse.tcf.te.launch.core.selection.LaunchSelection;
-import org.eclipse.tcf.te.launch.core.selection.ProjectSelectionContext;
-import org.eclipse.tcf.te.launch.core.selection.RemoteSelectionContext;
-import org.eclipse.tcf.te.runtime.events.ChangeEvent;
-import org.eclipse.tcf.te.runtime.events.EventManager;
-import org.eclipse.tcf.te.runtime.interfaces.events.IEventListener;
-import org.eclipse.tcf.te.runtime.model.interfaces.IContainerModelNode;
-import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
-import org.eclipse.tcf.te.ui.views.Managers;
-import org.eclipse.tcf.te.ui.views.interfaces.ICategory;
-
-/**
- * LaunchModel
- */
-public final class LaunchModel implements IEventListener, ILaunchConfigurationListener {
-
- private static final Map<Object,LaunchModel> models = new HashMap<Object, LaunchModel>();
- private static final Map<String,String> nameToUUID = new HashMap<String, String>();
-
- /**
- * Get the launch model of the rootNode.
- * If it does not exist yet, create a new instance and store it.
- *
- * @param rootNode The rootNode of the model.
- * @return The launch model.
- */
- public static LaunchModel getLaunchModel(final Object modelRoot) {
- if (modelRoot instanceof ICategory || modelRoot instanceof IModelNode || modelRoot instanceof IProject) {
- LaunchModel model = models.get(modelRoot);
- if (model == null) {
- model = new LaunchModel(modelRoot);
- models.put(modelRoot, model);
- }
- return model;
- }
- return null;
- }
-
- private final LaunchNode rootNode;
- private final Object modelRoot;
-
- private String lastAddedUUID = null;
-
- /**
- * Constructor.
- */
- private LaunchModel(Object modelRoot) {
- Assert.isNotNull(modelRoot);
- this.modelRoot = modelRoot;
- rootNode = new LaunchNode(this);
- refresh();
- DebugPlugin.getDefault().getLaunchManager().addLaunchConfigurationListener(this);
-
- if (modelRoot instanceof ICategory) {
- EventManager.getInstance().addEventListener(this, ChangeEvent.class);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationRemoved(org.eclipse.debug.core.ILaunchConfiguration)
- */
- @Override
- public void launchConfigurationRemoved(ILaunchConfiguration configuration) {
- if (!configuration.isWorkingCopy()) {
- if (getModelRoot() instanceof ICategory) {
- if (!getCategoryId(configuration).equals(lastAddedUUID)) {
- Managers.getCategoryManager().remove(((ICategory)getModelRoot()).getId(), getCategoryId(configuration));
- }
- nameToUUID.remove(configuration.getName());
- lastAddedUUID = null;
- }
- if (refresh()) {
- EventManager.getInstance().fireEvent(new ChangeEvent(this, ChangeEvent.ID_REMOVED, null, null));
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationChanged(org.eclipse.debug.core.ILaunchConfiguration)
- */
- @Override
- public void launchConfigurationChanged(ILaunchConfiguration configuration) {
- if (!configuration.isWorkingCopy()) {
- refresh();
- EventManager.getInstance().fireEvent(new ChangeEvent(this, ChangeEvent.ID_CHANGED, null, null));
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationAdded(org.eclipse.debug.core.ILaunchConfiguration)
- */
- @Override
- public void launchConfigurationAdded(ILaunchConfiguration configuration) {
- if (!configuration.isWorkingCopy()) {
- if (getModelRoot() instanceof ICategory) {
- if (Managers.getCategoryManager().belongsTo(((ICategory)getModelRoot()).getId(), getCategoryId(configuration))) {
- lastAddedUUID = getCategoryId(configuration);
- }
- }
- if (refresh()) {
- EventManager.getInstance().fireEvent(new ChangeEvent(this, ChangeEvent.ID_ADDED, null, null));
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.interfaces.events.IEventListener#eventFired(java.util.EventObject)
- */
- @Override
- public void eventFired(EventObject event) {
- if (event instanceof ChangeEvent) {
- ChangeEvent e = (ChangeEvent)event;
- if (e.getSource() instanceof ICategory &&
- ((e.getNewValue() instanceof String && ((String)e.getNewValue()).startsWith(LaunchNode.class.getName())) ||
- (e.getOldValue() instanceof String && ((String)e.getOldValue()).startsWith(LaunchNode.class.getName())))) {
- if (refresh()) {
- EventManager.getInstance().fireEvent(new ChangeEvent(this, ((ChangeEvent)event).getEventId(), null, null));
- }
- }
- }
- }
-
- /**
- * Return the root node of the model tree.
- */
- public LaunchNode getRootNode() {
- return rootNode;
- }
-
- /**
- * Return the model root (IModelNode, IProject, ICategory).
- */
- public Object getModelRoot() {
- return modelRoot;
- }
-
- /**
- * Refresh the model.
- * @return <code>true</code> if the model has changed.
- */
- public boolean refresh() {
- boolean changed = false;
- Object parent = rootNode.getModel().getModelRoot();
- String[] typeIds = new String[0];
- if (parent instanceof ICategory) {
- List<String> ids = new ArrayList<String>();
- for (ILaunchConfigurationType type : DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationTypes()) {
- ids.add(type.getIdentifier());
- }
- typeIds = ids.toArray(new String[ids.size()]);
- }
- if (parent instanceof IProject) {
- typeIds = LaunchConfigTypeBindingsManager.getInstance().getValidLaunchConfigTypes(
- new LaunchSelection(null, new ProjectSelectionContext((IProject)parent, true)));
- }
- else if (parent instanceof IModelNode) {
- typeIds = LaunchConfigTypeBindingsManager.getInstance().getValidLaunchConfigTypes(
- new LaunchSelection(null, new RemoteSelectionContext((IModelNode)parent, true)));
- }
- List<IModelNode> typeNodes = new ArrayList<IModelNode>(Arrays.asList(rootNode.getChildren()));
- for (String typeId : typeIds) {
- ILaunchConfigurationType type = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationType(typeId);
- if (type.isPublic()) {
- IModelNode typeNode = find(type, typeNodes);
- if (typeNode != null) {
- typeNodes.remove(typeNode);
- }
- else {
- typeNode = new LaunchNode(type);
- rootNode.add(typeNode);
- changed = true;
- }
-
- ILaunchConfiguration[] configs;
- try {
- configs = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations(type);
- }
- catch (Exception e) {
- configs = new ILaunchConfiguration[0];
- }
-
- List<IModelNode> configNodes = new ArrayList<IModelNode>(Arrays.asList(((IContainerModelNode)typeNode).getChildren()));
- for (ILaunchConfiguration config : configs) {
- if (parent instanceof ICategory) {
- if (Managers.getCategoryManager().belongsTo(((ICategory)parent).getId(), getCategoryId(config))) {
- changed |= checkAndAdd(config, (IContainerModelNode)typeNode, configNodes);
- }
- }
- else if (parent instanceof IModelNode) {
- IModelNode[] contexts = LaunchContextsPersistenceDelegate.getLaunchContexts(config);
- if (contexts != null && Arrays.asList(contexts).contains(parent)) {
- changed |= checkAndAdd(config, (IContainerModelNode)typeNode, configNodes);
- }
- }
- else if (parent instanceof IProject) {
- IReferencedProjectItem[] projects = ReferencedProjectsPersistenceDelegate.getReferencedProjects(config);
- IReferencedProjectItem project = new ReferencedProjectItem();
- project.setProperty(IReferencedProjectItem.PROPERTY_PROJECT_NAME, ((IProject)parent).getName());
- if (projects != null && Arrays.asList(projects).contains(project)) {
- changed |= checkAndAdd(config, (IContainerModelNode)typeNode, configNodes);
- }
- }
- }
- for (IModelNode configToDelete : configNodes) {
- ((IContainerModelNode)typeNode).remove(configToDelete, true);
- changed = true;
- }
- if (parent instanceof ICategory && typeNode.isEmpty()) {
- typeNodes.add(typeNode);
- }
- }
- }
- for (IModelNode typeToDelete : typeNodes) {
- rootNode.remove(typeToDelete, true);
- changed = true;
- }
- return changed;
- }
-
- private boolean checkAndAdd(ILaunchConfiguration config, IContainerModelNode typeNode, List<IModelNode> configNodes) {
- IModelNode configNode = find(config, configNodes);
- if (configNode != null) {
- configNodes.remove(configNode);
- }
- else {
- configNode = new LaunchNode(config);
- typeNode.add(configNode);
- return true;
- }
- return false;
- }
-
- private IModelNode find(ILaunchConfiguration config, List<IModelNode> list) {
- for (IModelNode candidate : list) {
- if (candidate instanceof LaunchNode) {
- LaunchNode node = new LaunchNode(config);
- node.setProperty(LaunchNode.PROPERTY_MODEL, this);
- if (((LaunchNode)candidate).equals(node)) {
- return candidate;
- }
- }
- }
- return null;
- }
-
- private IModelNode find(ILaunchConfigurationType type, List<IModelNode> list) {
- for (IModelNode candidate : list) {
- if (candidate instanceof LaunchNode) {
- LaunchNode node = new LaunchNode(type);
- node.setProperty(LaunchNode.PROPERTY_MODEL, this);
- if (((LaunchNode)candidate).equals(node)) {
- return candidate;
- }
- }
- }
- return null;
- }
-
- /**
- * Get the unique category id for this launch config.
- * @param config The launch configuration.
- * @return The unique category id.
- */
- public static String getCategoryId(ILaunchConfiguration config) {
- String uuid = DefaultPersistenceDelegate.getAttribute(config, ICommonLaunchAttributes.ATTR_UUID, (String)null);
- if (uuid == null) {
- uuid = nameToUUID.get(config.getName());
- }
- if (uuid != null && !nameToUUID.containsKey(config.getName())) {
- nameToUUID.put(config.getName(), uuid);
- }
-
- return LaunchNode.class.getName() + "." + (uuid != null ? uuid : config.getName()); //$NON-NLS-1$
- }
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.launch.ui.model; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.EventObject; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.Assert; +import org.eclipse.debug.core.DebugPlugin; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationListener; +import org.eclipse.debug.core.ILaunchConfigurationType; +import org.eclipse.tcf.te.launch.core.bindings.LaunchConfigTypeBindingsManager; +import org.eclipse.tcf.te.launch.core.interfaces.IReferencedProjectItem; +import org.eclipse.tcf.te.launch.core.lm.interfaces.ICommonLaunchAttributes; +import org.eclipse.tcf.te.launch.core.persistence.DefaultPersistenceDelegate; +import org.eclipse.tcf.te.launch.core.persistence.launchcontext.LaunchContextsPersistenceDelegate; +import org.eclipse.tcf.te.launch.core.persistence.projects.ReferencedProjectItem; +import org.eclipse.tcf.te.launch.core.persistence.projects.ReferencedProjectsPersistenceDelegate; +import org.eclipse.tcf.te.launch.core.selection.LaunchSelection; +import org.eclipse.tcf.te.launch.core.selection.ProjectSelectionContext; +import org.eclipse.tcf.te.launch.core.selection.RemoteSelectionContext; +import org.eclipse.tcf.te.runtime.events.ChangeEvent; +import org.eclipse.tcf.te.runtime.events.EventManager; +import org.eclipse.tcf.te.runtime.interfaces.events.IEventListener; +import org.eclipse.tcf.te.runtime.model.interfaces.IContainerModelNode; +import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode; +import org.eclipse.tcf.te.ui.views.Managers; +import org.eclipse.tcf.te.ui.views.interfaces.ICategory; + +/** + * LaunchModel + */ +public final class LaunchModel implements IEventListener, ILaunchConfigurationListener { + + private static final Map<Object,LaunchModel> models = new HashMap<Object, LaunchModel>(); + private static final Map<String,String> nameToUUID = new HashMap<String, String>(); + + /** + * Get the launch model of the rootNode. + * If it does not exist yet, create a new instance and store it. + * + * @param rootNode The rootNode of the model. + * @return The launch model. + */ + public static LaunchModel getLaunchModel(final Object modelRoot) { + if (modelRoot instanceof ICategory || modelRoot instanceof IModelNode || modelRoot instanceof IProject) { + LaunchModel model = models.get(modelRoot); + if (model == null) { + model = new LaunchModel(modelRoot); + models.put(modelRoot, model); + } + return model; + } + return null; + } + + private final LaunchNode rootNode; + private final Object modelRoot; + + private String lastAddedUUID = null; + + /** + * Constructor. + */ + private LaunchModel(Object modelRoot) { + Assert.isNotNull(modelRoot); + this.modelRoot = modelRoot; + rootNode = new LaunchNode(this); + refresh(); + DebugPlugin.getDefault().getLaunchManager().addLaunchConfigurationListener(this); + + if (modelRoot instanceof ICategory) { + EventManager.getInstance().addEventListener(this, ChangeEvent.class); + } + } + + /* (non-Javadoc) + * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationRemoved(org.eclipse.debug.core.ILaunchConfiguration) + */ + @Override + public void launchConfigurationRemoved(ILaunchConfiguration configuration) { + if (!configuration.isWorkingCopy()) { + if (getModelRoot() instanceof ICategory) { + if (!getCategoryId(configuration).equals(lastAddedUUID)) { + Managers.getCategoryManager().remove(((ICategory)getModelRoot()).getId(), getCategoryId(configuration)); + } + nameToUUID.remove(configuration.getName()); + lastAddedUUID = null; + } + if (refresh()) { + EventManager.getInstance().fireEvent(new ChangeEvent(this, ChangeEvent.ID_REMOVED, null, null)); + } + } + } + + /* (non-Javadoc) + * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationChanged(org.eclipse.debug.core.ILaunchConfiguration) + */ + @Override + public void launchConfigurationChanged(ILaunchConfiguration configuration) { + if (!configuration.isWorkingCopy()) { + refresh(); + EventManager.getInstance().fireEvent(new ChangeEvent(this, ChangeEvent.ID_CHANGED, null, null)); + } + } + + /* (non-Javadoc) + * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationAdded(org.eclipse.debug.core.ILaunchConfiguration) + */ + @Override + public void launchConfigurationAdded(ILaunchConfiguration configuration) { + if (!configuration.isWorkingCopy()) { + if (getModelRoot() instanceof ICategory) { + if (Managers.getCategoryManager().belongsTo(((ICategory)getModelRoot()).getId(), getCategoryId(configuration))) { + lastAddedUUID = getCategoryId(configuration); + } + } + if (refresh()) { + EventManager.getInstance().fireEvent(new ChangeEvent(this, ChangeEvent.ID_ADDED, null, null)); + } + } + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.interfaces.events.IEventListener#eventFired(java.util.EventObject) + */ + @Override + public void eventFired(EventObject event) { + if (event instanceof ChangeEvent) { + ChangeEvent e = (ChangeEvent)event; + if (e.getSource() instanceof ICategory && + ((e.getNewValue() instanceof String && ((String)e.getNewValue()).startsWith(LaunchNode.class.getName())) || + (e.getOldValue() instanceof String && ((String)e.getOldValue()).startsWith(LaunchNode.class.getName())))) { + if (refresh()) { + EventManager.getInstance().fireEvent(new ChangeEvent(this, ((ChangeEvent)event).getEventId(), null, null)); + } + } + } + } + + /** + * Return the root node of the model tree. + */ + public LaunchNode getRootNode() { + return rootNode; + } + + /** + * Return the model root (IModelNode, IProject, ICategory). + */ + public Object getModelRoot() { + return modelRoot; + } + + /** + * Refresh the model. + * @return <code>true</code> if the model has changed. + */ + public boolean refresh() { + boolean changed = false; + Object parent = rootNode.getModel().getModelRoot(); + String[] typeIds = new String[0]; + if (parent instanceof ICategory) { + List<String> ids = new ArrayList<String>(); + for (ILaunchConfigurationType type : DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationTypes()) { + ids.add(type.getIdentifier()); + } + typeIds = ids.toArray(new String[ids.size()]); + } + if (parent instanceof IProject) { + typeIds = LaunchConfigTypeBindingsManager.getInstance().getValidLaunchConfigTypes( + new LaunchSelection(null, new ProjectSelectionContext((IProject)parent, true))); + } + else if (parent instanceof IModelNode) { + typeIds = LaunchConfigTypeBindingsManager.getInstance().getValidLaunchConfigTypes( + new LaunchSelection(null, new RemoteSelectionContext((IModelNode)parent, true))); + } + List<IModelNode> typeNodes = new ArrayList<IModelNode>(Arrays.asList(rootNode.getChildren())); + for (String typeId : typeIds) { + ILaunchConfigurationType type = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationType(typeId); + if (type.isPublic()) { + IModelNode typeNode = find(type, typeNodes); + if (typeNode != null) { + typeNodes.remove(typeNode); + } + else { + typeNode = new LaunchNode(type); + rootNode.add(typeNode); + changed = true; + } + + ILaunchConfiguration[] configs; + try { + configs = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations(type); + } + catch (Exception e) { + configs = new ILaunchConfiguration[0]; + } + + List<IModelNode> configNodes = new ArrayList<IModelNode>(Arrays.asList(((IContainerModelNode)typeNode).getChildren())); + for (ILaunchConfiguration config : configs) { + if (parent instanceof ICategory) { + if (Managers.getCategoryManager().belongsTo(((ICategory)parent).getId(), getCategoryId(config))) { + changed |= checkAndAdd(config, (IContainerModelNode)typeNode, configNodes); + } + } + else if (parent instanceof IModelNode) { + IModelNode[] contexts = LaunchContextsPersistenceDelegate.getLaunchContexts(config); + if (contexts != null && Arrays.asList(contexts).contains(parent)) { + changed |= checkAndAdd(config, (IContainerModelNode)typeNode, configNodes); + } + } + else if (parent instanceof IProject) { + IReferencedProjectItem[] projects = ReferencedProjectsPersistenceDelegate.getReferencedProjects(config); + IReferencedProjectItem project = new ReferencedProjectItem(); + project.setProperty(IReferencedProjectItem.PROPERTY_PROJECT_NAME, ((IProject)parent).getName()); + if (projects != null && Arrays.asList(projects).contains(project)) { + changed |= checkAndAdd(config, (IContainerModelNode)typeNode, configNodes); + } + } + } + for (IModelNode configToDelete : configNodes) { + ((IContainerModelNode)typeNode).remove(configToDelete, true); + changed = true; + } + if (parent instanceof ICategory && typeNode.isEmpty()) { + typeNodes.add(typeNode); + } + } + } + for (IModelNode typeToDelete : typeNodes) { + rootNode.remove(typeToDelete, true); + changed = true; + } + return changed; + } + + private boolean checkAndAdd(ILaunchConfiguration config, IContainerModelNode typeNode, List<IModelNode> configNodes) { + IModelNode configNode = find(config, configNodes); + if (configNode != null) { + configNodes.remove(configNode); + } + else { + configNode = new LaunchNode(config); + typeNode.add(configNode); + return true; + } + return false; + } + + private IModelNode find(ILaunchConfiguration config, List<IModelNode> list) { + for (IModelNode candidate : list) { + if (candidate instanceof LaunchNode) { + LaunchNode node = new LaunchNode(config); + node.setProperty(LaunchNode.PROPERTY_MODEL, this); + if (((LaunchNode)candidate).equals(node)) { + return candidate; + } + } + } + return null; + } + + private IModelNode find(ILaunchConfigurationType type, List<IModelNode> list) { + for (IModelNode candidate : list) { + if (candidate instanceof LaunchNode) { + LaunchNode node = new LaunchNode(type); + node.setProperty(LaunchNode.PROPERTY_MODEL, this); + if (((LaunchNode)candidate).equals(node)) { + return candidate; + } + } + } + return null; + } + + /** + * Get the unique category id for this launch config. + * @param config The launch configuration. + * @return The unique category id. + */ + public static String getCategoryId(ILaunchConfiguration config) { + String uuid = DefaultPersistenceDelegate.getAttribute(config, ICommonLaunchAttributes.ATTR_UUID, (String)null); + if (uuid == null) { + uuid = nameToUUID.get(config.getName()); + } + if (uuid != null && !nameToUUID.containsKey(config.getName())) { + nameToUUID.put(config.getName(), uuid); + } + + return LaunchNode.class.getName() + "." + (uuid != null ? uuid : config.getName()); //$NON-NLS-1$ + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/model/LaunchNode.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/model/LaunchNode.java index 64751e6da..11bd5e623 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/model/LaunchNode.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/model/LaunchNode.java @@ -1,187 +1,187 @@ -/*******************************************************************************
- * 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.launch.ui.model;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.tcf.te.launch.core.lm.LaunchConfigHelper;
-import org.eclipse.tcf.te.launch.core.lm.LaunchManager;
-import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchManagerDelegate;
-import org.eclipse.tcf.te.runtime.model.ContainerModelNode;
-import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
-
-/**
- * LaunchNode
- */
-public class LaunchNode extends ContainerModelNode {
-
- public static final String TYPE_ROOT = "root"; //$NON-NLS-1$
- public static final String TYPE_LAUNCH_CONFIG_TYPE = "launchConfigType"; //$NON-NLS-1$
- public static final String TYPE_LAUNCH_CONFIG = "launchConfig"; //$NON-NLS-1$
-
- protected static final String PROPERTY_LAUNCH_CONFIG_TYPE = TYPE_LAUNCH_CONFIG_TYPE;
- protected static final String PROPERTY_LAUNCH_CONFIG = TYPE_LAUNCH_CONFIG;
- protected static final String PROPERTY_MODEL = "model"; //$NON-NLS-1$
-
- private LaunchNode(String type) {
- super();
- setProperty(IModelNode.PROPERTY_TYPE, type);
- }
-
- public LaunchNode(LaunchModel model) {
- this(TYPE_ROOT);
- setProperty(PROPERTY_MODEL, model);
- }
-
- public LaunchNode(ILaunchConfiguration config) {
- this(TYPE_LAUNCH_CONFIG);
- setProperty(PROPERTY_LAUNCH_CONFIG, config);
- }
-
- public LaunchNode(ILaunchConfigurationType configType) {
- this(TYPE_LAUNCH_CONFIG_TYPE);
- setProperty(PROPERTY_LAUNCH_CONFIG_TYPE, configType);
- }
-
- public boolean isType(String type) {
- return type.equals(getStringProperty(IModelNode.PROPERTY_TYPE));
- }
-
- /**
- * Return the model for this node. Must not be <code>null</code>.
- */
- public LaunchModel getModel() {
- LaunchModel model = (LaunchModel)getProperty(PROPERTY_MODEL);
- IModelNode parent = getParent();
-
- while (model == null && parent != null) {
- model = (LaunchModel)parent.getProperty(PROPERTY_MODEL);
- parent = parent.getParent();
- }
-
- Assert.isNotNull(model);
- return model;
- }
-
- /**
- * Return the launch confuration for this node or <code>null</code>.
- */
- public ILaunchConfiguration getLaunchConfiguration() {
- return (ILaunchConfiguration)getProperty(PROPERTY_LAUNCH_CONFIG);
- }
-
- /**
- * Return the launch configuration type for this launch node or <code>null</code>.
- */
- public ILaunchConfigurationType getLaunchConfigurationType() {
- if (getLaunchConfiguration() != null) {
- try {
- return getLaunchConfiguration().getType();
- }
- catch (Exception e) {
- }
- }
- else if (isType(TYPE_LAUNCH_CONFIG)) {
- return ((LaunchNode)getParent()).getLaunchConfigurationType();
- }
- return (ILaunchConfigurationType)getProperty(PROPERTY_LAUNCH_CONFIG_TYPE);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.model.ModelNode#getName()
- */
- @Override
- public String getName() {
- if (isType(TYPE_ROOT)) {
- return "Launches"; //$NON-NLS-1$
- }
- else if (isType(TYPE_LAUNCH_CONFIG_TYPE)) {
- return getLaunchConfigurationType().getName();
- }
- else if (isType(TYPE_LAUNCH_CONFIG)) {
- return getLaunchConfiguration().getName();
- }
- return super.getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.properties.PropertiesContainer#hashCode()
- */
- @Override
- public int hashCode() {
- if (isType(TYPE_LAUNCH_CONFIG_TYPE) && getLaunchConfigurationType() != null) {
- return getLaunchConfigurationType().hashCode();
- }
- else if (isType(TYPE_LAUNCH_CONFIG) && getLaunchConfiguration() != null) {
- return getLaunchConfiguration().hashCode();
- }
- return super.hashCode();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.properties.PropertiesContainer#equals(java.lang.Object)
- */
- @Override
- public boolean equals(Object obj) {
- if (obj instanceof LaunchNode && isType(((LaunchNode)obj).getStringProperty(PROPERTY_TYPE))) {
- if (getModel().getModelRoot().equals(((LaunchNode)obj).getModel().getModelRoot())) {
- if (isType(TYPE_LAUNCH_CONFIG_TYPE)) {
- return getLaunchConfigurationType().equals(((LaunchNode)obj).getLaunchConfigurationType());
- }
- else if (isType(TYPE_LAUNCH_CONFIG)) {
- return getLaunchConfiguration().equals(((LaunchNode)obj).getLaunchConfiguration());
- }
- }
- }
- return super.equals(obj);
- }
-
- /**
- * Check if the launch config node is valid for the given launch mode.
- * @param mode The launch mode or <code>null</code> to check for all supported modes;
- * @return <code>true</code> if the node is valid for the the given launch mode (or all supported modes if mode is <code>null</code>).
- */
- public boolean isValidFor(String mode) {
- if (isType(TYPE_LAUNCH_CONFIG)) {
- if (getLaunchConfigurationType() == null) {
- return false;
- }
- List<String> modes;
- if (mode != null && mode.trim().length() > 0) {
- modes = new ArrayList<String>();
- modes.add(mode);
- }
- else {
- modes = Arrays.asList(LaunchConfigHelper.getLaunchConfigTypeModes(getLaunchConfigurationType(), false));
- }
- for (String m : modes) {
- if (!getLaunchConfigurationType().supportsMode(m)) {
- return false;
- }
- ILaunchManagerDelegate delegate = LaunchManager.getInstance().getLaunchManagerDelegate(getLaunchConfigurationType(), m);
- if (delegate != null) {
- try {
- delegate.validate(mode, getLaunchConfiguration());
- }
- catch (Exception e) {
- return false;
- }
- }
- }
- }
- return true;
- }
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.launch.ui.model; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationType; +import org.eclipse.tcf.te.launch.core.lm.LaunchConfigHelper; +import org.eclipse.tcf.te.launch.core.lm.LaunchManager; +import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchManagerDelegate; +import org.eclipse.tcf.te.runtime.model.ContainerModelNode; +import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode; + +/** + * LaunchNode + */ +public class LaunchNode extends ContainerModelNode { + + public static final String TYPE_ROOT = "root"; //$NON-NLS-1$ + public static final String TYPE_LAUNCH_CONFIG_TYPE = "launchConfigType"; //$NON-NLS-1$ + public static final String TYPE_LAUNCH_CONFIG = "launchConfig"; //$NON-NLS-1$ + + protected static final String PROPERTY_LAUNCH_CONFIG_TYPE = TYPE_LAUNCH_CONFIG_TYPE; + protected static final String PROPERTY_LAUNCH_CONFIG = TYPE_LAUNCH_CONFIG; + protected static final String PROPERTY_MODEL = "model"; //$NON-NLS-1$ + + private LaunchNode(String type) { + super(); + setProperty(IModelNode.PROPERTY_TYPE, type); + } + + public LaunchNode(LaunchModel model) { + this(TYPE_ROOT); + setProperty(PROPERTY_MODEL, model); + } + + public LaunchNode(ILaunchConfiguration config) { + this(TYPE_LAUNCH_CONFIG); + setProperty(PROPERTY_LAUNCH_CONFIG, config); + } + + public LaunchNode(ILaunchConfigurationType configType) { + this(TYPE_LAUNCH_CONFIG_TYPE); + setProperty(PROPERTY_LAUNCH_CONFIG_TYPE, configType); + } + + public boolean isType(String type) { + return type.equals(getStringProperty(IModelNode.PROPERTY_TYPE)); + } + + /** + * Return the model for this node. Must not be <code>null</code>. + */ + public LaunchModel getModel() { + LaunchModel model = (LaunchModel)getProperty(PROPERTY_MODEL); + IModelNode parent = getParent(); + + while (model == null && parent != null) { + model = (LaunchModel)parent.getProperty(PROPERTY_MODEL); + parent = parent.getParent(); + } + + Assert.isNotNull(model); + return model; + } + + /** + * Return the launch confuration for this node or <code>null</code>. + */ + public ILaunchConfiguration getLaunchConfiguration() { + return (ILaunchConfiguration)getProperty(PROPERTY_LAUNCH_CONFIG); + } + + /** + * Return the launch configuration type for this launch node or <code>null</code>. + */ + public ILaunchConfigurationType getLaunchConfigurationType() { + if (getLaunchConfiguration() != null) { + try { + return getLaunchConfiguration().getType(); + } + catch (Exception e) { + } + } + else if (isType(TYPE_LAUNCH_CONFIG)) { + return ((LaunchNode)getParent()).getLaunchConfigurationType(); + } + return (ILaunchConfigurationType)getProperty(PROPERTY_LAUNCH_CONFIG_TYPE); + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.model.ModelNode#getName() + */ + @Override + public String getName() { + if (isType(TYPE_ROOT)) { + return "Launches"; //$NON-NLS-1$ + } + else if (isType(TYPE_LAUNCH_CONFIG_TYPE)) { + return getLaunchConfigurationType().getName(); + } + else if (isType(TYPE_LAUNCH_CONFIG)) { + return getLaunchConfiguration().getName(); + } + return super.getName(); + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.properties.PropertiesContainer#hashCode() + */ + @Override + public int hashCode() { + if (isType(TYPE_LAUNCH_CONFIG_TYPE) && getLaunchConfigurationType() != null) { + return getLaunchConfigurationType().hashCode(); + } + else if (isType(TYPE_LAUNCH_CONFIG) && getLaunchConfiguration() != null) { + return getLaunchConfiguration().hashCode(); + } + return super.hashCode(); + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.properties.PropertiesContainer#equals(java.lang.Object) + */ + @Override + public boolean equals(Object obj) { + if (obj instanceof LaunchNode && isType(((LaunchNode)obj).getStringProperty(PROPERTY_TYPE))) { + if (getModel().getModelRoot().equals(((LaunchNode)obj).getModel().getModelRoot())) { + if (isType(TYPE_LAUNCH_CONFIG_TYPE)) { + return getLaunchConfigurationType().equals(((LaunchNode)obj).getLaunchConfigurationType()); + } + else if (isType(TYPE_LAUNCH_CONFIG)) { + return getLaunchConfiguration().equals(((LaunchNode)obj).getLaunchConfiguration()); + } + } + } + return super.equals(obj); + } + + /** + * Check if the launch config node is valid for the given launch mode. + * @param mode The launch mode or <code>null</code> to check for all supported modes; + * @return <code>true</code> if the node is valid for the the given launch mode (or all supported modes if mode is <code>null</code>). + */ + public boolean isValidFor(String mode) { + if (isType(TYPE_LAUNCH_CONFIG)) { + if (getLaunchConfigurationType() == null) { + return false; + } + List<String> modes; + if (mode != null && mode.trim().length() > 0) { + modes = new ArrayList<String>(); + modes.add(mode); + } + else { + modes = Arrays.asList(LaunchConfigHelper.getLaunchConfigTypeModes(getLaunchConfigurationType(), false)); + } + for (String m : modes) { + if (!getLaunchConfigurationType().supportsMode(m)) { + return false; + } + ILaunchManagerDelegate delegate = LaunchManager.getInstance().getLaunchManagerDelegate(getLaunchConfigurationType(), m); + if (delegate != null) { + try { + delegate.validate(mode, getLaunchConfiguration()); + } + catch (Exception e) { + return false; + } + } + } + } + return true; + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/nls/Messages.java index 74b7ac194..f27007c4b 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/nls/Messages.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/nls/Messages.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/nls/Messages.properties index 4b3b01f31..ac63caac9 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/nls/Messages.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/nls/Messages.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/properties/BaseTitledSection.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/properties/BaseTitledSection.java index cefc0bb97..83126c43c 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/properties/BaseTitledSection.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/properties/BaseTitledSection.java @@ -1,256 +1,256 @@ -/*******************************************************************************
- * Copyright (c) 2011, 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.launch.ui.properties;
-
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.tcf.te.core.interfaces.IPropertyChangeProvider;
-import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
-import org.eclipse.tcf.te.runtime.model.interfaces.IModelNodeProvider;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-import org.eclipse.ui.forms.widgets.Section;
-import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection;
-import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
-
-/**
- * The base section that displays a title in a title bar.
- */
-public abstract class BaseTitledSection extends AbstractPropertySection implements PropertyChangeListener {
-
- // The main composite used to create the section content.
- protected Composite composite;
-
- protected IPropertyChangeProvider viewerInput;
-
- // The input node.
- protected IModelNodeProvider provider;
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
- */
- @Override
- public void setInput(IWorkbenchPart part, ISelection selection) {
- super.setInput(part, selection);
- if (this.viewerInput != null) {
- this.viewerInput.removePropertyChangeListener(this);
- }
- Assert.isTrue(selection instanceof IStructuredSelection);
- Object input = ((IStructuredSelection) selection).getFirstElement();
- if (input instanceof IAdaptable) {
- this.viewerInput = (IPropertyChangeProvider)((IAdaptable)input).getAdapter(IPropertyChangeProvider.class);
- if (this.viewerInput != null) {
- this.viewerInput.addPropertyChangeListener(this);
- }
- }
- if (this.viewerInput == null && input instanceof IModelNodeProvider) {
- this.provider = (IModelNodeProvider) input;
- IModelNode modelNode = this.provider.getModelNode();
- this.viewerInput = (IPropertyChangeProvider)modelNode.getAdapter(IPropertyChangeProvider.class);
- if (this.viewerInput != null) {
- this.viewerInput.addPropertyChangeListener(this);
- }
- }
- else {
- this.provider = null;
- this.viewerInput = null;
- }
- updateInput(provider);
- }
-
- /**
- * Update the input node.
- *
- * @param input The input node.
- */
- protected void updateInput(IModelNodeProvider input) {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#aboutToBeHidden()
- */
- @Override
- public void aboutToBeHidden() {
- if(this.viewerInput != null) {
- this.viewerInput.removePropertyChangeListener(this);
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
- */
- @Override
- public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
- super.createControls(parent, aTabbedPropertySheetPage);
- parent.setLayout(new FormLayout());
-
- Section section = getWidgetFactory().createSection(parent, ExpandableComposite.TITLE_BAR);
- section.setText(getText());
- FormData data = new FormData();
- data.left = new FormAttachment(0, ITabbedPropertyConstants.HMARGIN);
- data.right = new FormAttachment(100, -ITabbedPropertyConstants.HMARGIN);
- data.top = new FormAttachment(0, 2 * ITabbedPropertyConstants.VMARGIN);
- section.setLayoutData(data);
-
- composite = getWidgetFactory().createComposite(parent);
- FormLayout layout = new FormLayout();
- layout.spacing = ITabbedPropertyConstants.HMARGIN;
- composite.setLayout(layout);
-
- data = new FormData();
- data.left = new FormAttachment(0, 2 * ITabbedPropertyConstants.HMARGIN);
- data.right = new FormAttachment(100, -2 * ITabbedPropertyConstants.HMARGIN);
- data.top = new FormAttachment(section, ITabbedPropertyConstants.VSPACE);
- data.bottom = new FormAttachment(100, 0);
- composite.setLayoutData(data);
- }
-
- /**
- * Create a label for the control using the specified text.
- *
- * @param control The control for which the label is created.
- * @param text The label text.
- */
- protected void createLabel(Control control, String text) {
- CLabel nameLabel = getWidgetFactory().createCLabel(composite, text);
- FormData data = new FormData();
- data.left = new FormAttachment(0, 0);
- data.right = new FormAttachment(control, -ITabbedPropertyConstants.HSPACE);
- data.top = new FormAttachment(control, 0, SWT.CENTER);
- nameLabel.setLayoutData(data);
- }
-
- /**
- * Create a text field and a label with the specified label
- * relative to the specified control.
- *
- * @param control The control relative to.
- * @param label The text of the label.
- * @return The new text created.
- */
- protected Text createTextField(Control control, String label) {
- Text text = createText(control);
- createLabel(text, label);
- return text;
- }
-
- /**
- * Create a wrap text field and a label with the specified label
- * relative to the specified control.
- *
- * @param control The control relative to.
- * @param label The text of the label.
- * @return The new wrap text created.
- */
- protected Text createWrapTextField(Control control, String label) {
- Text text = createWrapText(control);
- createLabel(text, label);
- return text;
- }
-
- /**
- * Create a text field relative to the specified control.
- *
- * @param control The control to layout the new text field.
- * @return The new text field created.
- */
- private Text createText(Control control) {
- Text text = getWidgetFactory().createText(composite, ""); //$NON-NLS-1$
- FormData data = new FormData();
- data.left = new FormAttachment(0, STANDARD_LABEL_WIDTH);
- data.right = new FormAttachment(100, 0);
- if (control == null) {
- data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE);
- }
- else {
- data.top = new FormAttachment(control, ITabbedPropertyConstants.VSPACE);
- }
- text.setLayoutData(data);
- text.setEditable(false);
- return text;
- }
-
- /**
- * Create a wrap text field relative to the specified control.
- *
- * @param control The control to layout the new wrap text field.
- * @return The new wrap text field created.
- */
- private Text createWrapText(Control control) {
- Text text = getWidgetFactory().createText(composite, "", SWT.WRAP); //$NON-NLS-1$
- FormData data = new FormData();
- data.left = new FormAttachment(0, STANDARD_LABEL_WIDTH);
- data.right = new FormAttachment(100, 0);
- if (control == null) {
- data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE);
- }
- else {
- data.top = new FormAttachment(control, ITabbedPropertyConstants.VSPACE);
- }
- data.width = 200;
- text.setLayoutData(data);
- text.setEditable(false);
- return text;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh()
- */
- @Override
- public void refresh() {
- if (composite != null) {
- composite.layout();
- }
- }
-
- /*
- * (non-Javadoc)
- * @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent)
- */
- @Override
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getSource() == provider) {
- updateInput(provider);
- Display display = getPart().getSite().getShell().getDisplay();
- display.asyncExec(new Runnable() {
- @Override
- public void run() {
- refresh();
- }
- });
- }
- }
-
- /**
- * Get the text which is used as the title in the title bar of the section.
- *
- * @return A text string representing the section.
- */
- protected abstract String getText();
+/******************************************************************************* + * Copyright (c) 2011, 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.launch.ui.properties; + +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.CLabel; +import org.eclipse.swt.layout.FormAttachment; +import org.eclipse.swt.layout.FormData; +import org.eclipse.swt.layout.FormLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Text; +import org.eclipse.tcf.te.core.interfaces.IPropertyChangeProvider; +import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode; +import org.eclipse.tcf.te.runtime.model.interfaces.IModelNodeProvider; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.forms.widgets.ExpandableComposite; +import org.eclipse.ui.forms.widgets.Section; +import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection; +import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants; +import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; + +/** + * The base section that displays a title in a title bar. + */ +public abstract class BaseTitledSection extends AbstractPropertySection implements PropertyChangeListener { + + // The main composite used to create the section content. + protected Composite composite; + + protected IPropertyChangeProvider viewerInput; + + // The input node. + protected IModelNodeProvider provider; + + /* + * (non-Javadoc) + * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection) + */ + @Override + public void setInput(IWorkbenchPart part, ISelection selection) { + super.setInput(part, selection); + if (this.viewerInput != null) { + this.viewerInput.removePropertyChangeListener(this); + } + Assert.isTrue(selection instanceof IStructuredSelection); + Object input = ((IStructuredSelection) selection).getFirstElement(); + if (input instanceof IAdaptable) { + this.viewerInput = (IPropertyChangeProvider)((IAdaptable)input).getAdapter(IPropertyChangeProvider.class); + if (this.viewerInput != null) { + this.viewerInput.addPropertyChangeListener(this); + } + } + if (this.viewerInput == null && input instanceof IModelNodeProvider) { + this.provider = (IModelNodeProvider) input; + IModelNode modelNode = this.provider.getModelNode(); + this.viewerInput = (IPropertyChangeProvider)modelNode.getAdapter(IPropertyChangeProvider.class); + if (this.viewerInput != null) { + this.viewerInput.addPropertyChangeListener(this); + } + } + else { + this.provider = null; + this.viewerInput = null; + } + updateInput(provider); + } + + /** + * Update the input node. + * + * @param input The input node. + */ + protected void updateInput(IModelNodeProvider input) { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#aboutToBeHidden() + */ + @Override + public void aboutToBeHidden() { + if(this.viewerInput != null) { + this.viewerInput.removePropertyChangeListener(this); + } + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls(org.eclipse.swt.widgets.Composite, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage) + */ + @Override + public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) { + super.createControls(parent, aTabbedPropertySheetPage); + parent.setLayout(new FormLayout()); + + Section section = getWidgetFactory().createSection(parent, ExpandableComposite.TITLE_BAR); + section.setText(getText()); + FormData data = new FormData(); + data.left = new FormAttachment(0, ITabbedPropertyConstants.HMARGIN); + data.right = new FormAttachment(100, -ITabbedPropertyConstants.HMARGIN); + data.top = new FormAttachment(0, 2 * ITabbedPropertyConstants.VMARGIN); + section.setLayoutData(data); + + composite = getWidgetFactory().createComposite(parent); + FormLayout layout = new FormLayout(); + layout.spacing = ITabbedPropertyConstants.HMARGIN; + composite.setLayout(layout); + + data = new FormData(); + data.left = new FormAttachment(0, 2 * ITabbedPropertyConstants.HMARGIN); + data.right = new FormAttachment(100, -2 * ITabbedPropertyConstants.HMARGIN); + data.top = new FormAttachment(section, ITabbedPropertyConstants.VSPACE); + data.bottom = new FormAttachment(100, 0); + composite.setLayoutData(data); + } + + /** + * Create a label for the control using the specified text. + * + * @param control The control for which the label is created. + * @param text The label text. + */ + protected void createLabel(Control control, String text) { + CLabel nameLabel = getWidgetFactory().createCLabel(composite, text); + FormData data = new FormData(); + data.left = new FormAttachment(0, 0); + data.right = new FormAttachment(control, -ITabbedPropertyConstants.HSPACE); + data.top = new FormAttachment(control, 0, SWT.CENTER); + nameLabel.setLayoutData(data); + } + + /** + * Create a text field and a label with the specified label + * relative to the specified control. + * + * @param control The control relative to. + * @param label The text of the label. + * @return The new text created. + */ + protected Text createTextField(Control control, String label) { + Text text = createText(control); + createLabel(text, label); + return text; + } + + /** + * Create a wrap text field and a label with the specified label + * relative to the specified control. + * + * @param control The control relative to. + * @param label The text of the label. + * @return The new wrap text created. + */ + protected Text createWrapTextField(Control control, String label) { + Text text = createWrapText(control); + createLabel(text, label); + return text; + } + + /** + * Create a text field relative to the specified control. + * + * @param control The control to layout the new text field. + * @return The new text field created. + */ + private Text createText(Control control) { + Text text = getWidgetFactory().createText(composite, ""); //$NON-NLS-1$ + FormData data = new FormData(); + data.left = new FormAttachment(0, STANDARD_LABEL_WIDTH); + data.right = new FormAttachment(100, 0); + if (control == null) { + data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE); + } + else { + data.top = new FormAttachment(control, ITabbedPropertyConstants.VSPACE); + } + text.setLayoutData(data); + text.setEditable(false); + return text; + } + + /** + * Create a wrap text field relative to the specified control. + * + * @param control The control to layout the new wrap text field. + * @return The new wrap text field created. + */ + private Text createWrapText(Control control) { + Text text = getWidgetFactory().createText(composite, "", SWT.WRAP); //$NON-NLS-1$ + FormData data = new FormData(); + data.left = new FormAttachment(0, STANDARD_LABEL_WIDTH); + data.right = new FormAttachment(100, 0); + if (control == null) { + data.top = new FormAttachment(0, ITabbedPropertyConstants.VSPACE); + } + else { + data.top = new FormAttachment(control, ITabbedPropertyConstants.VSPACE); + } + data.width = 200; + text.setLayoutData(data); + text.setEditable(false); + return text; + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#refresh() + */ + @Override + public void refresh() { + if (composite != null) { + composite.layout(); + } + } + + /* + * (non-Javadoc) + * @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent) + */ + @Override + public void propertyChange(PropertyChangeEvent event) { + if (event.getSource() == provider) { + updateInput(provider); + Display display = getPart().getSite().getShell().getDisplay(); + display.asyncExec(new Runnable() { + @Override + public void run() { + refresh(); + } + }); + } + } + + /** + * Get the text which is used as the title in the title bar of the section. + * + * @return A text string representing the section. + */ + protected abstract String getText(); }
\ No newline at end of file diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/selection/LaunchSelectionManager.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/selection/LaunchSelectionManager.java index b42996d03..0934676d9 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/selection/LaunchSelectionManager.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/selection/LaunchSelectionManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/services/UIService.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/services/UIService.java index e5a529d3f..9b3c9e578 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/services/UIService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/services/UIService.java @@ -2,7 +2,7 @@ * UIService.java * Created on Nov 15, 2012 * - * Copyright (c) 2012, 2013 Wind River Systems, Inc. + * Copyright (c) 2012, 2014 Wind River Systems, Inc. * * The right to copy, distribute, modify, or otherwise make use * of this software may be licensed only pursuant to the terms diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/AbstractFormsLaunchConfigurationTab.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/AbstractFormsLaunchConfigurationTab.java index 2ef66edf9..d5bc75b89 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/AbstractFormsLaunchConfigurationTab.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/AbstractFormsLaunchConfigurationTab.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/AbstractLaunchConfigurationTab.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/AbstractLaunchConfigurationTab.java index 509c38de9..162fe2cea 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/AbstractLaunchConfigurationTab.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/AbstractLaunchConfigurationTab.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/AbstractLaunchConfigurationTabGroup.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/AbstractLaunchConfigurationTabGroup.java index a6f1da8b4..0e2bddc63 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/AbstractLaunchConfigurationTabGroup.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/AbstractLaunchConfigurationTabGroup.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/filetransfers/AbstractFileTransferSection.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/filetransfers/AbstractFileTransferSection.java index 86841e5fb..1f74c70f0 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/filetransfers/AbstractFileTransferSection.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/filetransfers/AbstractFileTransferSection.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/filetransfers/AbstractFileTransferTab.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/filetransfers/AbstractFileTransferTab.java index 4130daf0c..ce38a70cb 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/filetransfers/AbstractFileTransferTab.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/filetransfers/AbstractFileTransferTab.java @@ -1,76 +1,76 @@ -/*******************************************************************************
- * 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.launch.ui.tabs.filetransfers;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tcf.te.launch.ui.nls.Messages;
-import org.eclipse.tcf.te.launch.ui.tabs.AbstractFormsLaunchConfigurationTab;
-import org.eclipse.tcf.te.ui.forms.CustomFormToolkit;
-import org.eclipse.ui.forms.IManagedForm;
-import org.eclipse.ui.forms.widgets.TableWrapData;
-import org.eclipse.ui.forms.widgets.TableWrapLayout;
-
-/**
- * File transfer launch configuration tab implementation.
- */
-public abstract class AbstractFileTransferTab extends AbstractFormsLaunchConfigurationTab {
- // References to the tab sub sections
- private AbstractFileTransferSection section;
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.ui.tabs.AbstractFormsLaunchConfigurationTab#dispose()
- */
- @Override
- public void dispose() {
- if (section != null) { section.dispose(); section = null; }
- super.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.ui.tabs.AbstractFormsLaunchConfigurationTab#doCreateFormContent(org.eclipse.swt.widgets.Composite, org.eclipse.tcf.te.ui.forms.CustomFormToolkit)
- */
- @Override
- protected void doCreateFormContent(Composite parent, CustomFormToolkit toolkit) {
- Assert.isNotNull(parent);
- Assert.isNotNull(toolkit);
-
- // Setup the main panel (using the table wrap layout)
- Composite panel = toolkit.getFormToolkit().createComposite(parent);
- TableWrapLayout layout = new TableWrapLayout();
- layout.makeColumnsEqualWidth = true;
- layout.numColumns = 1;
- panel.setLayout(layout);
- panel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- panel.setBackground(parent.getBackground());
-
- section = createFileTransferSection(getManagedForm(), panel);
- section.getSection().setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP));
- getManagedForm().addPart(section);
- }
-
- /**
- * Create the transfer section.
- * @param form
- * @param panel
- * @return
- */
- protected abstract AbstractFileTransferSection createFileTransferSection(IManagedForm form, Composite panel);
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
- */
- @Override
- public String getName() {
- return Messages.FileTransferTab_name;
- }
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.launch.ui.tabs.filetransfers; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.swt.SWT; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.tcf.te.launch.ui.nls.Messages; +import org.eclipse.tcf.te.launch.ui.tabs.AbstractFormsLaunchConfigurationTab; +import org.eclipse.tcf.te.ui.forms.CustomFormToolkit; +import org.eclipse.ui.forms.IManagedForm; +import org.eclipse.ui.forms.widgets.TableWrapData; +import org.eclipse.ui.forms.widgets.TableWrapLayout; + +/** + * File transfer launch configuration tab implementation. + */ +public abstract class AbstractFileTransferTab extends AbstractFormsLaunchConfigurationTab { + // References to the tab sub sections + private AbstractFileTransferSection section; + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.ui.tabs.AbstractFormsLaunchConfigurationTab#dispose() + */ + @Override + public void dispose() { + if (section != null) { section.dispose(); section = null; } + super.dispose(); + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.ui.tabs.AbstractFormsLaunchConfigurationTab#doCreateFormContent(org.eclipse.swt.widgets.Composite, org.eclipse.tcf.te.ui.forms.CustomFormToolkit) + */ + @Override + protected void doCreateFormContent(Composite parent, CustomFormToolkit toolkit) { + Assert.isNotNull(parent); + Assert.isNotNull(toolkit); + + // Setup the main panel (using the table wrap layout) + Composite panel = toolkit.getFormToolkit().createComposite(parent); + TableWrapLayout layout = new TableWrapLayout(); + layout.makeColumnsEqualWidth = true; + layout.numColumns = 1; + panel.setLayout(layout); + panel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + panel.setBackground(parent.getBackground()); + + section = createFileTransferSection(getManagedForm(), panel); + section.getSection().setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP)); + getManagedForm().addPart(section); + } + + /** + * Create the transfer section. + * @param form + * @param panel + * @return + */ + protected abstract AbstractFileTransferSection createFileTransferSection(IManagedForm form, Composite panel); + + /* (non-Javadoc) + * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName() + */ + @Override + public String getName() { + return Messages.FileTransferTab_name; + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/filetransfers/FileTransferCheckStateProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/filetransfers/FileTransferCheckStateProvider.java index 70e1a2aa4..58c359fbb 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/filetransfers/FileTransferCheckStateProvider.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/filetransfers/FileTransferCheckStateProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/filetransfers/FileTransferContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/filetransfers/FileTransferContentProvider.java index bd1aa5c9a..0a6acee00 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/filetransfers/FileTransferContentProvider.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/filetransfers/FileTransferContentProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/launchcontext/AbstractContextSelectorTab.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/launchcontext/AbstractContextSelectorTab.java index ac5f61ab4..a85eafcb9 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/launchcontext/AbstractContextSelectorTab.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/launchcontext/AbstractContextSelectorTab.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/refprojects/RefProjectsCheckStateProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/refprojects/RefProjectsCheckStateProvider.java index 16730eb6e..93ada03cf 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/refprojects/RefProjectsCheckStateProvider.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/refprojects/RefProjectsCheckStateProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/refprojects/RefProjectsContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/refprojects/RefProjectsContentProvider.java index 9240be8d9..75c81e620 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/refprojects/RefProjectsContentProvider.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/refprojects/RefProjectsContentProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/refprojects/RefProjectsSection.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/refprojects/RefProjectsSection.java index 7365ddd90..9afef7ccd 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/refprojects/RefProjectsSection.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/refprojects/RefProjectsSection.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/refprojects/RefProjetcsTab.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/refprojects/RefProjetcsTab.java index a71c5efc9..2c3bfebad 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/refprojects/RefProjetcsTab.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/tabs/refprojects/RefProjetcsTab.java @@ -1,78 +1,78 @@ -/*******************************************************************************
- * 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.launch.ui.tabs.refprojects;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tcf.te.launch.ui.nls.Messages;
-import org.eclipse.tcf.te.launch.ui.tabs.AbstractFormsLaunchConfigurationTab;
-import org.eclipse.tcf.te.ui.forms.CustomFormToolkit;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.forms.widgets.TableWrapData;
-import org.eclipse.ui.forms.widgets.TableWrapLayout;
-import org.eclipse.ui.ide.IDE;
-
-/**
- * Referenced projetcs launch configuration tab implementation.
- */
-public class RefProjetcsTab extends AbstractFormsLaunchConfigurationTab {
- // References to the tab sub sections
- private RefProjectsSection section;
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.ui.tabs.AbstractFormsLaunchConfigurationTab#dispose()
- */
- @Override
- public void dispose() {
- if (section != null) { section.dispose(); section = null; }
- super.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.launch.ui.tabs.AbstractFormsLaunchConfigurationTab#doCreateFormContent(org.eclipse.swt.widgets.Composite, org.eclipse.tcf.te.ui.forms.CustomFormToolkit)
- */
- @Override
- protected void doCreateFormContent(Composite parent, CustomFormToolkit toolkit) {
- Assert.isNotNull(parent);
- Assert.isNotNull(toolkit);
-
- // Setup the main panel (using the table wrap layout)
- Composite panel = toolkit.getFormToolkit().createComposite(parent);
- TableWrapLayout layout = new TableWrapLayout();
- layout.makeColumnsEqualWidth = true;
- layout.numColumns = 1;
- panel.setLayout(layout);
- panel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- panel.setBackground(parent.getBackground());
-
- section = new RefProjectsSection(getManagedForm(), panel);
- section.getSection().setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP));
- getManagedForm().addPart(section);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
- */
- @Override
- public String getName() {
- return Messages.ReferencedProjectsTab_name;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#getImage()
- */
- @Override
- public Image getImage() {
- return PlatformUI.getWorkbench().getSharedImages().getImage(IDE.SharedImages.IMG_OBJ_PROJECT);
- }
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.launch.ui.tabs.refprojects; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.tcf.te.launch.ui.nls.Messages; +import org.eclipse.tcf.te.launch.ui.tabs.AbstractFormsLaunchConfigurationTab; +import org.eclipse.tcf.te.ui.forms.CustomFormToolkit; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.forms.widgets.TableWrapData; +import org.eclipse.ui.forms.widgets.TableWrapLayout; +import org.eclipse.ui.ide.IDE; + +/** + * Referenced projetcs launch configuration tab implementation. + */ +public class RefProjetcsTab extends AbstractFormsLaunchConfigurationTab { + // References to the tab sub sections + private RefProjectsSection section; + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.ui.tabs.AbstractFormsLaunchConfigurationTab#dispose() + */ + @Override + public void dispose() { + if (section != null) { section.dispose(); section = null; } + super.dispose(); + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.launch.ui.tabs.AbstractFormsLaunchConfigurationTab#doCreateFormContent(org.eclipse.swt.widgets.Composite, org.eclipse.tcf.te.ui.forms.CustomFormToolkit) + */ + @Override + protected void doCreateFormContent(Composite parent, CustomFormToolkit toolkit) { + Assert.isNotNull(parent); + Assert.isNotNull(toolkit); + + // Setup the main panel (using the table wrap layout) + Composite panel = toolkit.getFormToolkit().createComposite(parent); + TableWrapLayout layout = new TableWrapLayout(); + layout.makeColumnsEqualWidth = true; + layout.numColumns = 1; + panel.setLayout(layout); + panel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + panel.setBackground(parent.getBackground()); + + section = new RefProjectsSection(getManagedForm(), panel); + section.getSection().setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.TOP)); + getManagedForm().addPart(section); + } + + /* (non-Javadoc) + * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName() + */ + @Override + public String getName() { + return Messages.ReferencedProjectsTab_name; + } + + /* (non-Javadoc) + * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#getImage() + */ + @Override + public Image getImage() { + return PlatformUI.getWorkbench().getSharedImages().getImage(IDE.SharedImages.IMG_OBJ_PROJECT); + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/DescriptionColumnLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/DescriptionColumnLabelProvider.java index 8820ab00b..4158860fe 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/DescriptionColumnLabelProvider.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/DescriptionColumnLabelProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/LastLaunchedColumnLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/LastLaunchedColumnLabelProvider.java index 6f426dce7..4e9ee06dd 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/LastLaunchedColumnLabelProvider.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/LastLaunchedColumnLabelProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/LaunchEditorContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/LaunchEditorContentProvider.java index f3e2ea2ce..ebda65ec2 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/LaunchEditorContentProvider.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/LaunchEditorContentProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/LaunchFavoritesContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/LaunchFavoritesContentProvider.java index eff005daf..088d3eb69 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/LaunchFavoritesContentProvider.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/LaunchFavoritesContentProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/LaunchNavigatorContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/LaunchNavigatorContentProvider.java index dcaa63d24..715a1a180 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/LaunchNavigatorContentProvider.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/LaunchNavigatorContentProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/LaunchNodeImageDescriptor.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/LaunchNodeImageDescriptor.java index 9af69167d..0d566cb42 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/LaunchNodeImageDescriptor.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/LaunchNodeImageDescriptor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/LaunchTreeLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/LaunchTreeLabelProvider.java index 85bc16861..5f9bfc061 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/LaunchTreeLabelProvider.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/LaunchTreeLabelProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/LaunchTreeViewerSorter.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/LaunchTreeViewerSorter.java index f3b936a2f..4a0f5629e 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/LaunchTreeViewerSorter.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/LaunchTreeViewerSorter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/dnd/CommonDnD.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/dnd/CommonDnD.java index c4c2285e1..d9cfe5505 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/dnd/CommonDnD.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/dnd/CommonDnD.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/dnd/DragAssistant.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/dnd/DragAssistant.java index d3078565e..f1c27ca21 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/dnd/DragAssistant.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/dnd/DragAssistant.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/dnd/DragSourceListener.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/dnd/DragSourceListener.java index 3bf0460cf..a50629cc4 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/dnd/DragSourceListener.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/dnd/DragSourceListener.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/dnd/DropAssistant.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/dnd/DropAssistant.java index 32c4cec0d..b84df5db7 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/dnd/DropAssistant.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/dnd/DropAssistant.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/dnd/DropTargetListener.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/dnd/DropTargetListener.java index 2e607782a..ab40e5c5c 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/dnd/DropTargetListener.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/viewer/dnd/DropTargetListener.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/build.properties index e8d9fa711..61fc214f5 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/build.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/build.properties @@ -1,17 +1,17 @@ -###############################################################################
-# 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,\
- plugin.xml,\
- about.html
-src.includes = schema/
+############################################################################### +# Copyright (c) 2012, 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,\ + plugin.xml,\ + about.html +src.includes = schema/ diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/plugin.properties index 457eac51d..9c18186cf 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/plugin.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/plugin.properties @@ -1,5 +1,5 @@ ################################################################################## -# Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/Executors.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/Executors.java index 2344035b1..297d54757 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/Executors.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/Executors.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/activator/CoreBundleActivator.java index 9d9e8717e..f296b6166 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/activator/CoreBundleActivator.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/activator/CoreBundleActivator.java @@ -1,71 +1,71 @@ -/*******************************************************************************
- * Copyright (c) 2011, 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.runtime.concurrent.activator;
-
-import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
-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;
- // The trace handler instance
- private static volatile TraceHandler traceHandler;
-
- /**
- * 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.runtime.concurrent"; //$NON-NLS-1$
- }
-
- /**
- * Returns the bundles trace handler.
- *
- * @return The bundles trace handler.
- */
- public static TraceHandler getTraceHandler() {
- if (traceHandler == null) {
- traceHandler = new TraceHandler(getUniqueIdentifier());
- }
- return traceHandler;
- }
-
- /* (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) 2011, 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.runtime.concurrent.activator; + +import org.eclipse.tcf.te.runtime.tracing.TraceHandler; +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; + // The trace handler instance + private static volatile TraceHandler traceHandler; + + /** + * 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.runtime.concurrent"; //$NON-NLS-1$ + } + + /** + * Returns the bundles trace handler. + * + * @return The bundles trace handler. + */ + public static TraceHandler getTraceHandler() { + if (traceHandler == null) { + traceHandler = new TraceHandler(getUniqueIdentifier()); + } + return traceHandler; + } + + /* (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.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/event/ExecutorThreadNotificationListener.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/event/ExecutorThreadNotificationListener.java index 74229359f..f63ac0fdc 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/event/ExecutorThreadNotificationListener.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/event/ExecutorThreadNotificationListener.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/executors/AbstractDelegatingExecutorService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/executors/AbstractDelegatingExecutorService.java index 334751e2b..91da22c84 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/executors/AbstractDelegatingExecutorService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/executors/AbstractDelegatingExecutorService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/executors/SingleThreadedExecutorService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/executors/SingleThreadedExecutorService.java index a2f21c3b5..24f2aed49 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/executors/SingleThreadedExecutorService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/executors/SingleThreadedExecutorService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/factories/SingleThreadThreadFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/factories/SingleThreadThreadFactory.java index 3cf533f25..73754c627 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/factories/SingleThreadThreadFactory.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/factories/SingleThreadThreadFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/interfaces/IExecutor.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/interfaces/IExecutor.java index 9311c5537..d66d21b72 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/interfaces/IExecutor.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/interfaces/IExecutor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/interfaces/IExecutorUtilDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/interfaces/IExecutorUtilDelegate.java index 7292f40da..8fab59907 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/interfaces/IExecutorUtilDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/interfaces/IExecutorUtilDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/interfaces/INestableExecutor.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/interfaces/INestableExecutor.java index af7171f9e..488551898 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/interfaces/INestableExecutor.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/interfaces/INestableExecutor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/interfaces/ISingleThreadedExecutor.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/interfaces/ISingleThreadedExecutor.java index 5ce6ab275..40da3b026 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/interfaces/ISingleThreadedExecutor.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/interfaces/ISingleThreadedExecutor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/nls/Messages.java index 652586645..d191699bd 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/nls/Messages.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/nls/Messages.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/nls/Messages.properties index dd52cf900..33d82bb11 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/nls/Messages.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/nls/Messages.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/util/ExecutorsUtil.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/util/ExecutorsUtil.java index 743d0bac3..27b28e4b3 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/util/ExecutorsUtil.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.concurrent/src/org/eclipse/tcf/te/runtime/concurrent/util/ExecutorsUtil.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/build.properties index e8d9fa711..61fc214f5 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/build.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/build.properties @@ -1,17 +1,17 @@ -###############################################################################
-# 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,\
- plugin.xml,\
- about.html
-src.includes = schema/
+############################################################################### +# Copyright (c) 2012, 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,\ + plugin.xml,\ + about.html +src.includes = schema/ diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/plugin.properties index f625985cf..5e9b83bc8 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/plugin.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/plugin.properties @@ -1,5 +1,5 @@ ################################################################################## -# Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/MessageModelNode.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/MessageModelNode.java index 764e3746b..6b2c243c9 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/MessageModelNode.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/MessageModelNode.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/PendingOperationModelNode.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/PendingOperationModelNode.java index 30381cf67..d65a666d2 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/PendingOperationModelNode.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/PendingOperationModelNode.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/activator/CoreBundleActivator.java index aac41888d..e41aa357f 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/activator/CoreBundleActivator.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/activator/CoreBundleActivator.java @@ -1,72 +1,72 @@ -/*******************************************************************************
- * Copyright (c) 2011, 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.runtime.model.activator;
-
-import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
-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;
- // The trace handler instance
- private static volatile TraceHandler traceHandler;
-
- /**
- * 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.runtime.model"; //$NON-NLS-1$
- }
-
- /**
- * Returns the bundles trace handler.
- *
- * @return The bundles trace handler.
- */
- public static TraceHandler getTraceHandler() {
- if (traceHandler == null) {
- traceHandler = new TraceHandler(getUniqueIdentifier());
- }
- return traceHandler;
- }
-
- /* (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) 2011, 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.runtime.model.activator; + +import org.eclipse.tcf.te.runtime.tracing.TraceHandler; +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; + // The trace handler instance + private static volatile TraceHandler traceHandler; + + /** + * 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.runtime.model"; //$NON-NLS-1$ + } + + /** + * Returns the bundles trace handler. + * + * @return The bundles trace handler. + */ + public static TraceHandler getTraceHandler() { + if (traceHandler == null) { + traceHandler = new TraceHandler(getUniqueIdentifier()); + } + return traceHandler; + } + + /* (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.runtime.model/src/org/eclipse/tcf/te/runtime/model/contexts/AsyncRefreshableCtxAdapter.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/contexts/AsyncRefreshableCtxAdapter.java index f82e41bf3..d62c801f9 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/contexts/AsyncRefreshableCtxAdapter.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/contexts/AsyncRefreshableCtxAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/factory/AbstractFactoryDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/factory/AbstractFactoryDelegate.java index f2dc3d5ff..3be24c768 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/factory/AbstractFactoryDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/factory/AbstractFactoryDelegate.java @@ -1,21 +1,21 @@ -/*******************************************************************************
- * Copyright (c) 2011 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.model.factory;
-
-import org.eclipse.tcf.te.runtime.extensions.ExecutableExtension;
-import org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactoryDelegate;
-
-
-/**
- * Abstract model node factory delegate implementation.
- */
-public abstract class AbstractFactoryDelegate extends ExecutableExtension implements IFactoryDelegate {
-
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.runtime.model.factory; + +import org.eclipse.tcf.te.runtime.extensions.ExecutableExtension; +import org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactoryDelegate; + + +/** + * Abstract model node factory delegate implementation. + */ +public abstract class AbstractFactoryDelegate extends ExecutableExtension implements IFactoryDelegate { + +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/factory/AbstractFactoryDelegate2.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/factory/AbstractFactoryDelegate2.java index f832d6df5..033a70514 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/factory/AbstractFactoryDelegate2.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/factory/AbstractFactoryDelegate2.java @@ -1,20 +1,20 @@ -/*******************************************************************************
- * Copyright (c) 2011, 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.runtime.model.factory;
-
-import org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactoryDelegate2;
-
-
-/**
- * Abstract model node factory delegate implementing {@link IFactoryDelegate2}.
- */
-public abstract class AbstractFactoryDelegate2 extends AbstractFactoryDelegate implements IFactoryDelegate2 {
-
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.runtime.model.factory; + +import org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactoryDelegate2; + + +/** + * Abstract model node factory delegate implementing {@link IFactoryDelegate2}. + */ +public abstract class AbstractFactoryDelegate2 extends AbstractFactoryDelegate implements IFactoryDelegate2 { + +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/factory/Factory.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/factory/Factory.java index 468a40828..3cef80b58 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/factory/Factory.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/factory/Factory.java @@ -1,72 +1,72 @@ -/*******************************************************************************
- * Copyright (c) 2011, 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.runtime.model.factory;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
-import org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactory;
-import org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactoryDelegate;
-import org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactoryDelegate2;
-import org.eclipse.tcf.te.runtime.model.internal.factory.FactoryDelegateManager;
-
-/**
- * Model node factory implementation.
- */
-public final class Factory extends PlatformObject implements IFactory {
- private final FactoryDelegateManager manager = new FactoryDelegateManager();
-
- /*
- * Thread save singleton instance creation.
- */
- private static class LazyInstance {
- public static Factory instance = new Factory();
- }
-
- /**
- * Returns the singleton instance of the service manager.
- */
- public static Factory getInstance() {
- return LazyInstance.instance;
- }
-
- /**
- * Constructor.
- */
- Factory() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactory#newInstance(java.lang.Class)
- */
- @Override
- public <V extends IModelNode> V newInstance(Class<V> nodeInterface) {
- Assert.isNotNull(nodeInterface);
-
- // Determine the model node factory delegate to use
- IFactoryDelegate delegate = manager.getFactoryDelegate(nodeInterface);
- // Return the model node instance
- return delegate != null ? (V) delegate.newInstance(nodeInterface) : null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactory#newInstance(java.lang.Class, java.lang.Object[])
- */
- @Override
- public <V extends IModelNode> V newInstance(Class<V> nodeInterface, Object[] args) {
- Assert.isNotNull(nodeInterface);
-
- // Determine the model node factory delegate to use
- IFactoryDelegate delegate = manager.getFactoryDelegate(nodeInterface);
- // Return the model node instance
- return delegate instanceof IFactoryDelegate2 ? (V) ((IFactoryDelegate2)delegate).newInstance(nodeInterface, args) : null;
- }
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.runtime.model.factory; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.core.runtime.PlatformObject; +import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode; +import org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactory; +import org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactoryDelegate; +import org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactoryDelegate2; +import org.eclipse.tcf.te.runtime.model.internal.factory.FactoryDelegateManager; + +/** + * Model node factory implementation. + */ +public final class Factory extends PlatformObject implements IFactory { + private final FactoryDelegateManager manager = new FactoryDelegateManager(); + + /* + * Thread save singleton instance creation. + */ + private static class LazyInstance { + public static Factory instance = new Factory(); + } + + /** + * Returns the singleton instance of the service manager. + */ + public static Factory getInstance() { + return LazyInstance.instance; + } + + /** + * Constructor. + */ + Factory() { + super(); + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactory#newInstance(java.lang.Class) + */ + @Override + public <V extends IModelNode> V newInstance(Class<V> nodeInterface) { + Assert.isNotNull(nodeInterface); + + // Determine the model node factory delegate to use + IFactoryDelegate delegate = manager.getFactoryDelegate(nodeInterface); + // Return the model node instance + return delegate != null ? (V) delegate.newInstance(nodeInterface) : null; + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactory#newInstance(java.lang.Class, java.lang.Object[]) + */ + @Override + public <V extends IModelNode> V newInstance(Class<V> nodeInterface, Object[] args) { + Assert.isNotNull(nodeInterface); + + // Determine the model node factory delegate to use + IFactoryDelegate delegate = manager.getFactoryDelegate(nodeInterface); + // Return the model node instance + return delegate instanceof IFactoryDelegate2 ? (V) ((IFactoryDelegate2)delegate).newInstance(nodeInterface, args) : null; + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/factory/ModelNodeFactoryDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/factory/ModelNodeFactoryDelegate.java index 1aa61fd36..2ea221ea6 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/factory/ModelNodeFactoryDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/factory/ModelNodeFactoryDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/IContainerModelNode.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/IContainerModelNode.java index 23f3fb9e7..36556ff56 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/IContainerModelNode.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/IContainerModelNode.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/IModelNodeProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/IModelNodeProvider.java index 2cae3d019..d53875da7 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/IModelNodeProvider.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/IModelNodeProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/contexts/IAsyncRefreshableCtx.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/contexts/IAsyncRefreshableCtx.java index 94535a7ac..2f0a51dd7 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/contexts/IAsyncRefreshableCtx.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/contexts/IAsyncRefreshableCtx.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/factory/IFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/factory/IFactory.java index 490de970d..f60cf8194 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/factory/IFactory.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/factory/IFactory.java @@ -1,44 +1,44 @@ -/*******************************************************************************
- * Copyright (c) 2011, 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.runtime.model.interfaces.factory;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
-
-/**
- * Interface to be implemented by model node factories.
- */
-public interface IFactory extends IAdaptable {
-
- /**
- * Creates an new instance of an node object implementing the specified node interface.
- *
- * @param nodeInterface The node interface to be implemented by the node object to be created.
- * Must not be <code>null</code>.
- * @return The node object implementing the specified node interface or <code>null</code>.
- */
- public <V extends IModelNode> V newInstance(Class<V> nodeInterface);
-
- /**
- * Creates an new instance of an node object implementing the specified node interface.
- * <p>
- * <b>Note:</b> Factory delegates must implement {@link IFactoryDelegate2} to be invoked by
- * this method.
- *
- * @param nodeInterface The node interface to be implemented by the node object to be created.
- * Must not be <code>null</code>.
- * @param args The arguments to be passed to a matching constructor, or <code>null</code>.
- *
- * @return The node object implementing the specified node interface or <code>null</code>.
- *
- * @see IFactoryDelegate2#newInstance(Class, Object[])
- */
- public <V extends IModelNode> V newInstance(Class<V> nodeInterface, Object[] args);
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.runtime.model.interfaces.factory; + +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode; + +/** + * Interface to be implemented by model node factories. + */ +public interface IFactory extends IAdaptable { + + /** + * Creates an new instance of an node object implementing the specified node interface. + * + * @param nodeInterface The node interface to be implemented by the node object to be created. + * Must not be <code>null</code>. + * @return The node object implementing the specified node interface or <code>null</code>. + */ + public <V extends IModelNode> V newInstance(Class<V> nodeInterface); + + /** + * Creates an new instance of an node object implementing the specified node interface. + * <p> + * <b>Note:</b> Factory delegates must implement {@link IFactoryDelegate2} to be invoked by + * this method. + * + * @param nodeInterface The node interface to be implemented by the node object to be created. + * Must not be <code>null</code>. + * @param args The arguments to be passed to a matching constructor, or <code>null</code>. + * + * @return The node object implementing the specified node interface or <code>null</code>. + * + * @see IFactoryDelegate2#newInstance(Class, Object[]) + */ + public <V extends IModelNode> V newInstance(Class<V> nodeInterface, Object[] args); +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/factory/IFactoryDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/factory/IFactoryDelegate.java index 18cead26f..f140aa82c 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/factory/IFactoryDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/factory/IFactoryDelegate.java @@ -1,28 +1,28 @@ -/*******************************************************************************
- * Copyright (c) 2011 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.model.interfaces.factory;
-
-import org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension;
-import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
-
-/**
- * Interface to be implemented by model node factory delegates.
- */
-public interface IFactoryDelegate extends IExecutableExtension {
-
- /**
- * Returns a new instance of an node object implementing the given node interface.
- *
- * @param nodeInterface The node interface to be implemented by the node object to be created.
- * Must not be <code>null</code>.
- * @return The node object implementing the specified node interface or <code>null</code>.
- */
- public <V extends IModelNode> V newInstance(Class<V> nodeInterface);
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.runtime.model.interfaces.factory; + +import org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension; +import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode; + +/** + * Interface to be implemented by model node factory delegates. + */ +public interface IFactoryDelegate extends IExecutableExtension { + + /** + * Returns a new instance of an node object implementing the given node interface. + * + * @param nodeInterface The node interface to be implemented by the node object to be created. + * Must not be <code>null</code>. + * @return The node object implementing the specified node interface or <code>null</code>. + */ + public <V extends IModelNode> V newInstance(Class<V> nodeInterface); +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/factory/IFactoryDelegate2.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/factory/IFactoryDelegate2.java index 6b3f6cc72..6c3297c32 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/factory/IFactoryDelegate2.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/interfaces/factory/IFactoryDelegate2.java @@ -1,37 +1,37 @@ -/*******************************************************************************
- * 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.runtime.model.interfaces.factory;
-
-import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
-
-/**
- * Interface to be implemented by model node factory delegates.
- */
-public interface IFactoryDelegate2 extends IFactoryDelegate {
-
- /**
- * Returns a new instance of an node object implementing the given node interface.
- * <p>
- * If <code>args</code> is <code>null</code>, the node object returned by this method
- * should be the same as by calling {@link #newInstance(Class)}.
- * <p>
- * If <code>args</code> is not <code>null</code>, the method is matching the argument
- * types with the argument types of the node object constructor(s) and call the matched
- * constructor. If no constructor is matching the argument types, the method does return
- * <code>null</code>.
- *
- * @param nodeInterface The node interface to be implemented by the node object to be created.
- * Must not be <code>null</code>.
- * @param args The arguments to be passed to a matching constructor, or <code>null</code>.
- *
- * @return The node object implementing the specified node interface or <code>null</code>.
- */
- public <V extends IModelNode> V newInstance(Class<V> nodeInterface, Object[] args);
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.runtime.model.interfaces.factory; + +import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode; + +/** + * Interface to be implemented by model node factory delegates. + */ +public interface IFactoryDelegate2 extends IFactoryDelegate { + + /** + * Returns a new instance of an node object implementing the given node interface. + * <p> + * If <code>args</code> is <code>null</code>, the node object returned by this method + * should be the same as by calling {@link #newInstance(Class)}. + * <p> + * If <code>args</code> is not <code>null</code>, the method is matching the argument + * types with the argument types of the node object constructor(s) and call the matched + * constructor. If no constructor is matching the argument types, the method does return + * <code>null</code>. + * + * @param nodeInterface The node interface to be implemented by the node object to be created. + * Must not be <code>null</code>. + * @param args The arguments to be passed to a matching constructor, or <code>null</code>. + * + * @return The node object implementing the specified node interface or <code>null</code>. + */ + public <V extends IModelNode> V newInstance(Class<V> nodeInterface, Object[] args); +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/internal/factory/FactoryDelegateManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/internal/factory/FactoryDelegateManager.java index 1e5e00354..a81c5384b 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/internal/factory/FactoryDelegateManager.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/internal/factory/FactoryDelegateManager.java @@ -1,78 +1,78 @@ -/*******************************************************************************
- * Copyright (c) 2011 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.model.internal.factory;
-
-import java.util.Collection;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
-import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
-import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
-import org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactoryDelegate;
-
-
-/**
- * Model node factory delegate extension point manager implementation.
- */
-public class FactoryDelegateManager extends AbstractExtensionPointManager<IFactoryDelegate> {
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
- */
- @Override
- protected String getExtensionPointId() {
- return "org.eclipse.tcf.te.runtime.model.factoryDelegates"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
- */
- @Override
- protected String getConfigurationElementName() {
- return "delegate"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#doCreateExtensionProxy(org.eclipse.core.runtime.IConfigurationElement)
- */
- @Override
- protected ExecutableExtensionProxy<IFactoryDelegate> doCreateExtensionProxy(IConfigurationElement element) throws CoreException {
- return new FactoryDelegateProxy(element);
- }
-
- /**
- * Returns the model node factory delegate for the given node type.
- * <p>
- * <b>Note:</b> The first factory delegate declaring the given node type
- * as supported will be returned.
- *
- * @param nodeType The node type. Must not be <code>null</code>.
- * @return The model node factory delegate or <code>null</code>.
- */
- public IFactoryDelegate getFactoryDelegate(Class<? extends IModelNode> nodeType) {
- Assert.isNotNull(nodeType);
-
- IFactoryDelegate delegate = null;
-
- Collection<ExecutableExtensionProxy<IFactoryDelegate>> delegates = getExtensions().values();
- for (ExecutableExtensionProxy<IFactoryDelegate> candidate : delegates) {
- if (!(candidate instanceof FactoryDelegateProxy)) continue;
- if (((FactoryDelegateProxy)candidate).getNodeTypes().contains(nodeType)) {
- delegate = candidate.getInstance();
- break;
- }
- }
-
- return delegate;
- }
-
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.runtime.model.internal.factory; + +import java.util.Collection; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager; +import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy; +import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode; +import org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactoryDelegate; + + +/** + * Model node factory delegate extension point manager implementation. + */ +public class FactoryDelegateManager extends AbstractExtensionPointManager<IFactoryDelegate> { + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId() + */ + @Override + protected String getExtensionPointId() { + return "org.eclipse.tcf.te.runtime.model.factoryDelegates"; //$NON-NLS-1$ + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName() + */ + @Override + protected String getConfigurationElementName() { + return "delegate"; //$NON-NLS-1$ + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#doCreateExtensionProxy(org.eclipse.core.runtime.IConfigurationElement) + */ + @Override + protected ExecutableExtensionProxy<IFactoryDelegate> doCreateExtensionProxy(IConfigurationElement element) throws CoreException { + return new FactoryDelegateProxy(element); + } + + /** + * Returns the model node factory delegate for the given node type. + * <p> + * <b>Note:</b> The first factory delegate declaring the given node type + * as supported will be returned. + * + * @param nodeType The node type. Must not be <code>null</code>. + * @return The model node factory delegate or <code>null</code>. + */ + public IFactoryDelegate getFactoryDelegate(Class<? extends IModelNode> nodeType) { + Assert.isNotNull(nodeType); + + IFactoryDelegate delegate = null; + + Collection<ExecutableExtensionProxy<IFactoryDelegate>> delegates = getExtensions().values(); + for (ExecutableExtensionProxy<IFactoryDelegate> candidate : delegates) { + if (!(candidate instanceof FactoryDelegateProxy)) continue; + if (((FactoryDelegateProxy)candidate).getNodeTypes().contains(nodeType)) { + delegate = candidate.getInstance(); + break; + } + } + + return delegate; + } + +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/internal/factory/FactoryDelegateProxy.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/internal/factory/FactoryDelegateProxy.java index 05af0cc82..998b7df8f 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/internal/factory/FactoryDelegateProxy.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/internal/factory/FactoryDelegateProxy.java @@ -1,107 +1,107 @@ -/*******************************************************************************
- * Copyright (c) 2011 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.model.internal.factory;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.tcf.te.runtime.activator.CoreBundleActivator;
-import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
-import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
-import org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactoryDelegate;
-import org.eclipse.tcf.te.runtime.model.nls.Messages;
-import org.osgi.framework.Bundle;
-
-/**
- * Model node factory delegate executable extension proxy implementation.
- */
-public class FactoryDelegateProxy extends ExecutableExtensionProxy<IFactoryDelegate> {
- // The list of node types supported by the model node factory delegate
- private final List<Class<? extends IModelNode>> nodeTypes = new ArrayList<Class<? extends IModelNode>>();
- // Flag to mark if the node types has been loaded
- private boolean nodeTypesLoaded = false;
-
- /**
- * Constructor.
- *
- * @param element The configuration element. Must not be <code>null</code>.
- * @throws CoreException In case the configuration element attribute <i>id</i> is <code>null</code> or empty.
- */
- public FactoryDelegateProxy(IConfigurationElement element) throws CoreException {
- super(element);
- }
-
- /**
- * Constructor.
- *
- * @param id The id for this instance.
- * @param instance The instance to add to proxy.
- */
- public FactoryDelegateProxy(String id, IFactoryDelegate instance) {
- super(id, instance);
- }
-
- /**
- * Returns the list of node types supported by the model node factory.
- *
- * @return The unmodifiable list of node types.
- */
- public List<Class<? extends IModelNode>> getNodeTypes() {
- if (!nodeTypesLoaded) loadNodeTypes();
- return Collections.unmodifiableList(nodeTypes);
- }
-
- /**
- * Load the node types.
- */
- protected void loadNodeTypes() {
- IConfigurationElement element = getConfigurationElement();
- Assert.isNotNull(element);
-
- nodeTypes.clear();
-
- IConfigurationElement[] nodeTypeElements = element.getChildren("nodeType"); //$NON-NLS-1$
- if (nodeTypeElements != null && nodeTypeElements.length > 0) {
- for (IConfigurationElement nodeTypeElement : nodeTypeElements) {
- try {
- String type = nodeTypeElement.getAttribute("class"); //$NON-NLS-1$
- String bundleId = nodeTypeElement.getAttribute("bundleId"); //$NON-NLS-1$
-
- // If a bundle id got specified, use the specified bundle to load the node type class
- Bundle bundle = bundleId != null ? bundle = Platform.getBundle(bundleId) : null;
- // If we don't have a bundle to load from yet, fallback to the declaring bundle
- if (bundle == null) bundle = Platform.getBundle(element.getDeclaringExtension().getNamespaceIdentifier());
- // And finally, use our own bundle to load the class.
- // This fallback is expected to never be used.
- if (bundle == null) bundle = CoreBundleActivator.getContext().getBundle();
-
- // Try to load the node type class now.
- Class<? extends IModelNode> typeClass = (Class<? extends IModelNode>)(bundle != null ? bundle.loadClass(type) : Class.forName(type));
- this.nodeTypes.add(typeClass);
- }
- catch (Exception e) {
- IStatus status = new Status(IStatus.WARNING, CoreBundleActivator.getUniqueIdentifier(),
- NLS.bind(Messages.FactoryDelegateProxy_warning_failedToLoadNodeType, nodeTypeElement.getAttribute("class"), element.getDeclaringExtension().getUniqueIdentifier()), e); //$NON-NLS-1$
- Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(status);
- }
- }
- }
-
- nodeTypesLoaded = true;
- }
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.runtime.model.internal.factory; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.Status; +import org.eclipse.osgi.util.NLS; +import org.eclipse.tcf.te.runtime.activator.CoreBundleActivator; +import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy; +import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode; +import org.eclipse.tcf.te.runtime.model.interfaces.factory.IFactoryDelegate; +import org.eclipse.tcf.te.runtime.model.nls.Messages; +import org.osgi.framework.Bundle; + +/** + * Model node factory delegate executable extension proxy implementation. + */ +public class FactoryDelegateProxy extends ExecutableExtensionProxy<IFactoryDelegate> { + // The list of node types supported by the model node factory delegate + private final List<Class<? extends IModelNode>> nodeTypes = new ArrayList<Class<? extends IModelNode>>(); + // Flag to mark if the node types has been loaded + private boolean nodeTypesLoaded = false; + + /** + * Constructor. + * + * @param element The configuration element. Must not be <code>null</code>. + * @throws CoreException In case the configuration element attribute <i>id</i> is <code>null</code> or empty. + */ + public FactoryDelegateProxy(IConfigurationElement element) throws CoreException { + super(element); + } + + /** + * Constructor. + * + * @param id The id for this instance. + * @param instance The instance to add to proxy. + */ + public FactoryDelegateProxy(String id, IFactoryDelegate instance) { + super(id, instance); + } + + /** + * Returns the list of node types supported by the model node factory. + * + * @return The unmodifiable list of node types. + */ + public List<Class<? extends IModelNode>> getNodeTypes() { + if (!nodeTypesLoaded) loadNodeTypes(); + return Collections.unmodifiableList(nodeTypes); + } + + /** + * Load the node types. + */ + protected void loadNodeTypes() { + IConfigurationElement element = getConfigurationElement(); + Assert.isNotNull(element); + + nodeTypes.clear(); + + IConfigurationElement[] nodeTypeElements = element.getChildren("nodeType"); //$NON-NLS-1$ + if (nodeTypeElements != null && nodeTypeElements.length > 0) { + for (IConfigurationElement nodeTypeElement : nodeTypeElements) { + try { + String type = nodeTypeElement.getAttribute("class"); //$NON-NLS-1$ + String bundleId = nodeTypeElement.getAttribute("bundleId"); //$NON-NLS-1$ + + // If a bundle id got specified, use the specified bundle to load the node type class + Bundle bundle = bundleId != null ? bundle = Platform.getBundle(bundleId) : null; + // If we don't have a bundle to load from yet, fallback to the declaring bundle + if (bundle == null) bundle = Platform.getBundle(element.getDeclaringExtension().getNamespaceIdentifier()); + // And finally, use our own bundle to load the class. + // This fallback is expected to never be used. + if (bundle == null) bundle = CoreBundleActivator.getContext().getBundle(); + + // Try to load the node type class now. + Class<? extends IModelNode> typeClass = (Class<? extends IModelNode>)(bundle != null ? bundle.loadClass(type) : Class.forName(type)); + this.nodeTypes.add(typeClass); + } + catch (Exception e) { + IStatus status = new Status(IStatus.WARNING, CoreBundleActivator.getUniqueIdentifier(), + NLS.bind(Messages.FactoryDelegateProxy_warning_failedToLoadNodeType, nodeTypeElement.getAttribute("class"), element.getDeclaringExtension().getUniqueIdentifier()), e); //$NON-NLS-1$ + Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(status); + } + } + } + + nodeTypesLoaded = true; + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/nls/Messages.java index b739d0ce9..eeed55238 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/nls/Messages.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/nls/Messages.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/nls/Messages.properties index f56e12470..5f410103a 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/nls/Messages.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.model/src/org/eclipse/tcf/te/runtime/model/nls/Messages.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/build.properties index e8d9fa711..61fc214f5 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/build.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/build.properties @@ -1,17 +1,17 @@ -###############################################################################
-# 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,\
- plugin.xml,\
- about.html
-src.includes = schema/
+############################################################################### +# Copyright (c) 2012, 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,\ + plugin.xml,\ + about.html +src.includes = schema/ diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/plugin.properties index c3cd6e076..6f7f12b40 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/plugin.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/plugin.properties @@ -1,5 +1,5 @@ ################################################################################## -# Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/PersistenceManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/PersistenceManager.java index 8dd39d08b..3487806b7 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/PersistenceManager.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/PersistenceManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/activator/CoreBundleActivator.java index 49ceaa24c..c50112883 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/activator/CoreBundleActivator.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/activator/CoreBundleActivator.java @@ -1,72 +1,72 @@ -/*******************************************************************************
- * Copyright (c) 2011, 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.runtime.persistence.activator;
-
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class CoreBundleActivator extends Plugin {
- // The bundle context
- private static BundleContext context;
- // The shared instance of this plug-in.
- private static CoreBundleActivator plugin;
-
- /**
- * Returns the bundle context
- *
- * @return the bundle context
- */
- public static BundleContext getContext() {
- return context;
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static CoreBundleActivator getDefault() {
- return plugin;
- }
-
- /**
- * 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.runtime.persistence"; //$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;
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext bundleContext) throws Exception {
- CoreBundleActivator.context = null;
- plugin = null;
- }
-
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.runtime.persistence.activator; + +import org.eclipse.core.runtime.Plugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class CoreBundleActivator extends Plugin { + // The bundle context + private static BundleContext context; + // The shared instance of this plug-in. + private static CoreBundleActivator plugin; + + /** + * Returns the bundle context + * + * @return the bundle context + */ + public static BundleContext getContext() { + return context; + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static CoreBundleActivator getDefault() { + return plugin; + } + + /** + * 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.runtime.persistence"; //$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; + plugin = this; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + @Override + public void stop(BundleContext bundleContext) throws Exception { + CoreBundleActivator.context = null; + plugin = null; + } + +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/delegates/AbstractPathVariableDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/delegates/AbstractPathVariableDelegate.java index 3ad6a2882..f7dc24429 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/delegates/AbstractPathVariableDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/delegates/AbstractPathVariableDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/delegates/AbstractVariableDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/delegates/AbstractVariableDelegate.java index bbfa675c1..539591afa 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/delegates/AbstractVariableDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/delegates/AbstractVariableDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/delegates/GsonMapPersistenceDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/delegates/GsonMapPersistenceDelegate.java index d9b673608..05e8acd71 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/delegates/GsonMapPersistenceDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/delegates/GsonMapPersistenceDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/delegates/PathVariableDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/delegates/PathVariableDelegate.java index 0879a8b2e..f68f2f0a6 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/delegates/PathVariableDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/delegates/PathVariableDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableNameProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableNameProvider.java index 2ab45f64d..974b921e2 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableNameProvider.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableNameProvider.java @@ -1,28 +1,28 @@ -/*******************************************************************************
- * Copyright (c) 2011 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.persistence.interfaces;
-
-/**
- * Interface to be implemented by persistable elements which requires a
- * custom persistence store naming schema.
- */
-public interface IPersistableNameProvider {
-
- /**
- * Returns the name to use to store the data object to the persistence storage.
- * <p>
- * <b>Note:</b> The name returned by this method is expected to be a valid name to the persistence
- * storage provider. The name will be passed on as returned.
- *
- * @param data The data object. Must not be <code>null</code>.
- * @return The persistable name for the given data object or <code<null</code>.
- */
- public String getName(Object data);
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.runtime.persistence.interfaces; + +/** + * Interface to be implemented by persistable elements which requires a + * custom persistence store naming schema. + */ +public interface IPersistableNameProvider { + + /** + * Returns the name to use to store the data object to the persistence storage. + * <p> + * <b>Note:</b> The name returned by this method is expected to be a valid name to the persistence + * storage provider. The name will be passed on as returned. + * + * @param data The data object. Must not be <code>null</code>. + * @return The persistable name for the given data object or <code<null</code>. + */ + public String getName(Object data); +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableNodeProperties.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableNodeProperties.java index cb5058d33..67c014f91 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableNodeProperties.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableNodeProperties.java @@ -1,26 +1,26 @@ -/*******************************************************************************
- * Copyright (c) 2011 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.persistence.interfaces;
-
-/**
- * Persistable node property constants.
- */
-public interface IPersistableNodeProperties {
-
- /**
- * The URI of the node in a persistence storage.
- * <p>
- * This property can be used by persistable implementations to store the URI to remember from
- * where a node got restored or written to.
- * <p>
- * The property itself is a transient property.
- */
- public static final String PROPERTY_URI = "URI.transient"; //$NON-NLS-1$
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.runtime.persistence.interfaces; + +/** + * Persistable node property constants. + */ +public interface IPersistableNodeProperties { + + /** + * The URI of the node in a persistence storage. + * <p> + * This property can be used by persistable implementations to store the URI to remember from + * where a node got restored or written to. + * <p> + * The property itself is a transient property. + */ + public static final String PROPERTY_URI = "URI.transient"; //$NON-NLS-1$ +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableURIProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableURIProvider.java index 10e2b8b15..d2fcaa578 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableURIProvider.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistableURIProvider.java @@ -1,32 +1,32 @@ -/*******************************************************************************
- * Copyright (c) 2011, 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.runtime.persistence.interfaces;
-
-import java.net.URI;
-
-/**
- * Interface to be implemented by persistable elements.
- */
-public interface IPersistableURIProvider {
-
- /**
- * Returns the URI reference to pass on to the associated persistence delegate to
- * denote the given context object.
- * <p>
- * The interpretation of the URI reference is up to the persistence delegate, but
- * the method is expected to return never <code>null</code>.
- *
- * @param context The context object. Must not be <code>null</code>.
- *
- * @return The URI.
- */
- public URI getURI(Object context);
-
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.runtime.persistence.interfaces; + +import java.net.URI; + +/** + * Interface to be implemented by persistable elements. + */ +public interface IPersistableURIProvider { + + /** + * Returns the URI reference to pass on to the associated persistence delegate to + * denote the given context object. + * <p> + * The interpretation of the URI reference is up to the persistence delegate, but + * the method is expected to return never <code>null</code>. + * + * @param context The context object. Must not be <code>null</code>. + * + * @return The URI. + */ + public URI getURI(Object context); + +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistenceDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistenceDelegate.java index b17d44114..4123ad109 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistenceDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IPersistenceDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IURIPersistenceService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IURIPersistenceService.java index 0a3e3cab9..8fafd43b6 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IURIPersistenceService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IURIPersistenceService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IVariableDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IVariableDelegate.java index 7817f54be..7fa47a3c6 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IVariableDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IVariableDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IVariableProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IVariableProvider.java index a13ca029b..221383722 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IVariableProvider.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/interfaces/IVariableProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/internal/PersistenceDelegateBinding.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/internal/PersistenceDelegateBinding.java index f1ab0b6e2..a3a271193 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/internal/PersistenceDelegateBinding.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/internal/PersistenceDelegateBinding.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/internal/PersistenceDelegateBindingExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/internal/PersistenceDelegateBindingExtensionPointManager.java index 8fb7be029..b0af9831d 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/internal/PersistenceDelegateBindingExtensionPointManager.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/internal/PersistenceDelegateBindingExtensionPointManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/internal/VariableDelegateExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/internal/VariableDelegateExtensionPointManager.java index ed00938fd..190fb6987 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/internal/VariableDelegateExtensionPointManager.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/internal/VariableDelegateExtensionPointManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/internal/VariableProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/internal/VariableProvider.java index bbf3b0861..3759aeb61 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/internal/VariableProvider.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/internal/VariableProvider.java @@ -2,7 +2,7 @@ * VariableProvider.java * Created on 22.10.2012 * - * Copyright (c) 2012 Wind River Systems, Inc. + * Copyright (c) 2012, 2014 Wind River Systems, Inc. * * The right to copy, distribute, modify, or otherwise make use * of this software may be licensed only pursuant to the terms diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/internal/VariableProviderExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/internal/VariableProviderExtensionPointManager.java index 452b3193d..d48cec6b1 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/internal/VariableProviderExtensionPointManager.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/internal/VariableProviderExtensionPointManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/services/URIPersistenceService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/services/URIPersistenceService.java index 91cb851bd..eba38a627 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/services/URIPersistenceService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/services/URIPersistenceService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/utils/DataHelper.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/utils/DataHelper.java index d1c4f418d..e8ad5d3c7 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/utils/DataHelper.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.persistence/src/org/eclipse/tcf/te/runtime/persistence/utils/DataHelper.java @@ -2,7 +2,7 @@ * DataHelper.java * Created on Aug 21, 2013 * - * Copyright (c) 2013 Wind River Systems, Inc. + * Copyright (c) 2013, 2014 Wind River Systems, Inc. * * The right to copy, distribute, modify, or otherwise make use * of this software may be licensed only pursuant to the terms diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/build.properties index e8d9fa711..61fc214f5 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/build.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/build.properties @@ -1,17 +1,17 @@ -###############################################################################
-# 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,\
- plugin.xml,\
- about.html
-src.includes = schema/
+############################################################################### +# Copyright (c) 2012, 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,\ + plugin.xml,\ + about.html +src.includes = schema/ diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/plugin.properties index aaf59901d..5cd2714ff 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/plugin.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/plugin.properties @@ -1,5 +1,5 @@ ################################################################################## -# Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/AbstractService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/AbstractService.java index 054c20f99..b20e5be1e 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/AbstractService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/AbstractService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/AbstractServiceManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/AbstractServiceManager.java index 84366fd40..32cac7d77 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/AbstractServiceManager.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/AbstractServiceManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/ServiceManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/ServiceManager.java index eda0acb4e..4e7ee8118 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/ServiceManager.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/ServiceManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/activator/CoreBundleActivator.java index 7ecf49737..2e996c83b 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/activator/CoreBundleActivator.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/activator/CoreBundleActivator.java @@ -1,71 +1,71 @@ -/*******************************************************************************
- * Copyright (c) 2011, 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.runtime.services.activator;
-
-import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
-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;
- // The trace handler instance
- private static volatile TraceHandler traceHandler;
-
- /**
- * 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.runtime.services"; //$NON-NLS-1$
- }
-
- /**
- * Returns the bundles trace handler.
- *
- * @return The bundles trace handler.
- */
- public static TraceHandler getTraceHandler() {
- if (traceHandler == null) {
- traceHandler = new TraceHandler(getUniqueIdentifier());
- }
- return traceHandler;
- }
-
- /* (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) 2011, 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.runtime.services.activator; + +import org.eclipse.tcf.te.runtime.tracing.TraceHandler; +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; + // The trace handler instance + private static volatile TraceHandler traceHandler; + + /** + * 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.runtime.services"; //$NON-NLS-1$ + } + + /** + * Returns the bundles trace handler. + * + * @return The bundles trace handler. + */ + public static TraceHandler getTraceHandler() { + if (traceHandler == null) { + traceHandler = new TraceHandler(getUniqueIdentifier()); + } + return traceHandler; + } + + /* (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.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 b3223513f..b61628176 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IDebugService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IDebugService.java index c11e2b942..37843b914 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IDebugService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IDebugService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 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 index 55636a4d4..0294775ac 100644 --- 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IMenuService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IMenuService.java index 6fd9479f4..301d1c569 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IMenuService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IMenuService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IService.java index 1250dd518..77ab78a98 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/IService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/ITerminalService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/ITerminalService.java index 087c7482c..1b77ff9a9 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/ITerminalService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/ITerminalService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 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 9e54d5d7a..bfab4b49d 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/constants/ILineSeparatorConstants.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/constants/ILineSeparatorConstants.java index 5aaa3f2ee..0528d431c 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/constants/ILineSeparatorConstants.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/constants/ILineSeparatorConstants.java @@ -1,34 +1,34 @@ -/*******************************************************************************
- * Copyright (c) 2011 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.constants;
-
-/**
- * Line separator constants.
- * <p>
- * Copied from <code>org.eclipse.tcf.internal.terminal.local.ILocalTerminalSettings</code>.
- */
-public interface ILineSeparatorConstants {
-
- /**
- * The line separator setting CR (carriage return only; for example, used by Mac OS 9).
- */
- public final static String LINE_SEPARATOR_CR = "\\r"; //$NON-NLS-1$
-
- /**
- * The line separator setting CRLF (carriage return and line feed; for example, used by
- * Windows).
- */
- public final static String LINE_SEPARATOR_CRLF = "\\r\\n"; //$NON-NLS-1$
-
- /**
- * The line separator setting LF (line feed only; used by all UNIX-based systems).
- */
- public final static String LINE_SEPARATOR_LF = "\\n"; //$NON-NLS-1$
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.runtime.services.interfaces.constants; + +/** + * Line separator constants. + * <p> + * Copied from <code>org.eclipse.tcf.internal.terminal.local.ILocalTerminalSettings</code>. + */ +public interface ILineSeparatorConstants { + + /** + * The line separator setting CR (carriage return only; for example, used by Mac OS 9). + */ + public final static String LINE_SEPARATOR_CR = "\\r"; //$NON-NLS-1$ + + /** + * The line separator setting CRLF (carriage return and line feed; for example, used by + * Windows). + */ + public final static String LINE_SEPARATOR_CRLF = "\\r\\n"; //$NON-NLS-1$ + + /** + * The line separator setting LF (line feed only; used by all UNIX-based systems). + */ + public final static String LINE_SEPARATOR_LF = "\\n"; //$NON-NLS-1$ +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/constants/ITerminalsConnectorConstants.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/constants/ITerminalsConnectorConstants.java index 2c4f41647..4c84e6089 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/constants/ITerminalsConnectorConstants.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/constants/ITerminalsConnectorConstants.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 @@ -18,32 +18,32 @@ public interface ITerminalsConnectorConstants { /** * Property: The unique id of the terminals view to open. */ - public static final String PROP_ID = "terminal.id"; //$NON-NLS-1$ + public static final String PROP_ID = "id"; //$NON-NLS-1$ /** * Property: The unique secondary id of the terminals view to open. */ - public static final String PROP_SECONDARY_ID = "terminal.secondaryId"; //$NON-NLS-1$ + public static final String PROP_SECONDARY_ID = "secondaryId"; //$NON-NLS-1$ /** * Property: The title of the terminal tab to open. */ - public static final String PROP_TITLE = "terminal.title"; //$NON-NLS-1$ + public static final String PROP_TITLE = ".title"; //$NON-NLS-1$ /** * Property: The encoding of the terminal tab to open. */ - public static final String PROP_ENCODING = "terminal.encoding"; //$NON-NLS-1$ + public static final String PROP_ENCODING = "encoding"; //$NON-NLS-1$ /** * Property: Custom data object to associate with the terminal tab. */ - public static final String PROP_DATA = "terminal.data"; //$NON-NLS-1$ + public static final String PROP_DATA = "data"; //$NON-NLS-1$ /** * Property: External selection to associate with the terminal tab. */ - public static final String PROP_SELECTION = "terminal.selection"; //$NON-NLS-1$ + public static final String PROP_SELECTION = "selection"; //$NON-NLS-1$ /** * Property: Flag to force a new terminal tab. @@ -53,24 +53,24 @@ public interface ITerminalsConnectorConstants { /** * Property: Flag to signal if the terminal tab shall have a disconnect button or not. */ - public static final String PROP_HAS_DISCONNECT_BUTTON = "terminal.hasDisconnectButton"; //$NON-NLS-1$ + public static final String PROP_HAS_DISCONNECT_BUTTON = "hasDisconnectButton"; //$NON-NLS-1$ /** * Property: Terminals launcher delegate id. */ - public static final String PROP_DELEGATE_ID = "terminal.delegateId"; //$NON-NLS-1$ + public static final String PROP_DELEGATE_ID = "delegateId"; //$NON-NLS-1$ /** * Property: Terminals connector type id. */ - public static final String PROP_CONNECTOR_TYPE_ID = "terminal.connector.type.id"; //$NON-NLS-1$ + public static final String PROP_CONNECTOR_TYPE_ID = "connector.type.id"; //$NON-NLS-1$ /** * Property: Specific terminal connector type id. Allows clients to * override the specifically used terminal connector * implementation for a given type. */ - public static final String PROP_TERMINAL_CONNECTOR_ID = "terminal.tm.terminal.connector.id"; //$NON-NLS-1$ + public static final String PROP_TERMINAL_CONNECTOR_ID = "tm.terminal.connector.id"; //$NON-NLS-1$ // ***** Generic terminals connector properties ***** @@ -79,13 +79,13 @@ public interface ITerminalsConnectorConstants { * connector implementation may interpret this value differently. If not * set, the terminal connector may use a default value. */ - public static final String PROP_TIMEOUT = "terminal.timeout"; //$NON-NLS-1$ + public static final String PROP_TIMEOUT = "timeout"; //$NON-NLS-1$ /** * Property: Flag to control if a local echo is needed from the terminal widget. * <p>Typical for process and streams terminals. */ - public static final String PROP_LOCAL_ECHO = "terminal.localEcho"; //$NON-NLS-1$ + public static final String PROP_LOCAL_ECHO = "localEcho"; //$NON-NLS-1$ /** * Property: Data flag to tell the terminal to not reconnect when hitting enter @@ -93,25 +93,25 @@ public interface ITerminalsConnectorConstants { * The flag can be set by adding an IPropertiesContainer with the set * flag as PROP_DATA. */ - public static final String PROP_DATA_NO_RECONNECT = "terminal.data.noReconnect"; //$NON-NLS-1$ + public static final String PROP_DATA_NO_RECONNECT = "data.noReconnect"; //$NON-NLS-1$ /** * Property: The line separator used by the terminal input. * <p>Typical for process and streams terminals. */ - public static final String PROP_LINE_SEPARATOR = "terminal.lineSeparator"; //$NON-NLS-1$ + public static final String PROP_LINE_SEPARATOR = "lineSeparator"; //$NON-NLS-1$ /** * Property: The list of stdout listeners to attach to the corresponding stream monitor. * <p>Typical for process and streams terminals. */ - public static final String PROP_STDOUT_LISTENERS = "terminal.stdoutListeners"; //$NON-NLS-1$ + public static final String PROP_STDOUT_LISTENERS = "stdoutListeners"; //$NON-NLS-1$ /** * Property: The list of stderr listeners to attach to the corresponding stream monitor. * <p>Typical for process and streams terminals. */ - public static final String PROP_STDERR_LISTENERS = "terminal.stderrListeners"; //$NON-NLS-1$ + public static final String PROP_STDERR_LISTENERS = "stderrListeners"; //$NON-NLS-1$ // ***** IP based terminals connector properties ***** @@ -119,19 +119,19 @@ public interface ITerminalsConnectorConstants { * Property: Host name or IP address the terminal server is running. * <p>Typical for telnet or ssh terminals. */ - public static final String PROP_IP_HOST = "terminal.ip.host"; //$NON-NLS-1$ + public static final String PROP_IP_HOST = "ip.host"; //$NON-NLS-1$ /** * Property: Port at which the terminal server is providing the console input and output. * <p>Typical for telnet or ssh terminals. */ - public static final String PROP_IP_PORT = "terminal.ip.port"; //$NON-NLS-1$ + public static final String PROP_IP_PORT = "ip.port"; //$NON-NLS-1$ /** * Property: An offset to add to the specified port number. * <p>Typical for telnet or ssh terminals. */ - public static final String PROP_IP_PORT_OFFSET = "terminal.ip.port.offset"; //$NON-NLS-1$ + public static final String PROP_IP_PORT_OFFSET = "ip.port.offset"; //$NON-NLS-1$ // ***** Process based terminals connector properties ***** @@ -139,43 +139,43 @@ public interface ITerminalsConnectorConstants { * Property: Process image path. * <p>Typical for process terminals. */ - public static final String PROP_PROCESS_PATH = "terminal.process.path"; //$NON-NLS-1$ + public static final String PROP_PROCESS_PATH = "process.path"; //$NON-NLS-1$ /** * Property: Process arguments. * <p>Typical for process terminals. */ - public static final String PROP_PROCESS_ARGS = "terminal.process.args"; //$NON-NLS-1$ + public static final String PROP_PROCESS_ARGS = "process.args"; //$NON-NLS-1$ /** * Property: Process arguments. * <p>Typical for process terminals. */ - public static final String PROP_PROCESS_WORKING_DIR = "terminal.process.working_dir"; //$NON-NLS-1$ + public static final String PROP_PROCESS_WORKING_DIR = "process.working_dir"; //$NON-NLS-1$ /** * Property: Process environment. * <p>Typical for process terminals. */ - public static final String PROP_PROCESS_ENVIRONMENT = "terminal.process.environment"; //$NON-NLS-1$ + public static final String PROP_PROCESS_ENVIRONMENT = "process.environment"; //$NON-NLS-1$ /** * Property: Flag to merge process environment with native environment. * <p>Typical for process terminals. */ - public static final String PROP_PROCESS_MERGE_ENVIRONMENT = "terminal.process.environment.merge"; //$NON-NLS-1$ + public static final String PROP_PROCESS_MERGE_ENVIRONMENT = "process.environment.merge"; //$NON-NLS-1$ /** * Property: Runtime process instance. * <p>Typical for process terminals. */ - public static final String PROP_PROCESS_OBJ = "terminal.process"; //$NON-NLS-1$ + public static final String PROP_PROCESS_OBJ = "process"; //$NON-NLS-1$ /** * Property: Runtime process PTY instance. * <p>Typical for process terminals. */ - public static final String PROP_PTY_OBJ = "terminal.pty"; //$NON-NLS-1$ + public static final String PROP_PTY_OBJ = "pty"; //$NON-NLS-1$ // ***** Streams based terminals connector properties ***** @@ -183,66 +183,66 @@ public interface ITerminalsConnectorConstants { * Property: Stdin streams instance. * <p>Typical for streams terminals. */ - public static final String PROP_STREAMS_STDIN = "terminal.streams.stdin"; //$NON-NLS-1$ + public static final String PROP_STREAMS_STDIN = "streams.stdin"; //$NON-NLS-1$ /** * Property: Stdout streams instance. * <p>Typical for streams terminals. */ - public static final String PROP_STREAMS_STDOUT = "terminal.streams.stdout"; //$NON-NLS-1$ + public static final String PROP_STREAMS_STDOUT = "streams.stdout"; //$NON-NLS-1$ /** * Property: Stderr streams instance. * <p>Typical for streams terminals. */ - public static final String PROP_STREAMS_STDERR = "terminal.streams.stderr"; //$NON-NLS-1$ + public static final String PROP_STREAMS_STDERR = "streams.stderr"; //$NON-NLS-1$ // ***** Ssh specific properties ***** /** * Property: ssh keep alive value. */ - public static final String PROP_SSH_KEEP_ALIVE = "terminal.ssh.keep_alive"; //$NON-NLS-1$ + public static final String PROP_SSH_KEEP_ALIVE = "ssh.keep_alive"; //$NON-NLS-1$ /** * Property: Ssh password. */ - public static final String PROP_SSH_PASSWORD = "terminal.ssh.password"; //$NON-NLS-1$ + public static final String PROP_SSH_PASSWORD = "ssh.password"; //$NON-NLS-1$ /** * Property: Ssh user. */ - public static final String PROP_SSH_USER = "terminal.ssh.user"; //$NON-NLS-1$ + public static final String PROP_SSH_USER = "ssh.user"; //$NON-NLS-1$ // ***** Serial specific properties ***** /** * The serial device name. */ - public static final String PROP_SERIAL_DEVICE = "terminal.serial.device"; //$NON-NLS-1$ + public static final String PROP_SERIAL_DEVICE = "serial.device"; //$NON-NLS-1$ /** * The baud rate. */ - public static final String PROP_SERIAL_BAUD_RATE = "terminal.serial.baudrate"; //$NON-NLS-1$ + public static final String PROP_SERIAL_BAUD_RATE = "serial.baudrate"; //$NON-NLS-1$ /** * The data bits */ - public static final String PROP_SERIAL_DATA_BITS = "terminal.serial.databits"; //$NON-NLS-1$ + public static final String PROP_SERIAL_DATA_BITS = "serial.databits"; //$NON-NLS-1$ /** * The parity */ - public static final String PROP_SERIAL_PARITY = "terminal.serial.parity"; //$NON-NLS-1$ + public static final String PROP_SERIAL_PARITY = "serial.parity"; //$NON-NLS-1$ /** * The stop bits */ - public static final String PROP_SERIAL_STOP_BITS = "terminal.serial.stopbits"; //$NON-NLS-1$ + public static final String PROP_SERIAL_STOP_BITS = "serial.stopbits"; //$NON-NLS-1$ /** * The flow control */ - public static final String PROP_SERIAL_FLOW_CONTROL = "terminal.serial.flowcontrol"; //$NON-NLS-1$ + public static final String PROP_SERIAL_FLOW_CONTROL = "serial.flowcontrol"; //$NON-NLS-1$ } diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/delegates/ILabelProviderDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/delegates/ILabelProviderDelegate.java index abe514250..bb3d4af32 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/delegates/ILabelProviderDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/delegates/ILabelProviderDelegate.java @@ -1,40 +1,40 @@ -/*******************************************************************************
- * 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.delegates;
-
-import org.eclipse.tcf.te.runtime.services.interfaces.IUIService;
-
-/**
- * Label provider delegate for {@link IUIService} to enable
- * label provider access in core.
- */
-public interface ILabelProviderDelegate {
-
- /**
- * Returns the text for the label of the given element.
- *
- * @param element the element for which to provide the label text
- * @return the text string used to label the element, or <code>null</code>
- * if there is no text label for the given object
- */
- public String getText(Object element);
-
- /**
- * Returns a text label that is based on the given text label,
- * but decorated with additional information relating to the state
- * of the provided element.
- *
- * @param text the input text label to decorate
- * @param element the element whose image is being decorated
- * @return the decorated text label, or <code>null</code> if no decoration is to be applied
- */
- public String decorateText(String text, Object element);
-}
+/******************************************************************************* + * Copyright (c) 2013, 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.runtime.services.interfaces.delegates; + +import org.eclipse.tcf.te.runtime.services.interfaces.IUIService; + +/** + * Label provider delegate for {@link IUIService} to enable + * label provider access in core. + */ +public interface ILabelProviderDelegate { + + /** + * Returns the text for the label of the given element. + * + * @param element the element for which to provide the label text + * @return the text string used to label the element, or <code>null</code> + * if there is no text label for the given object + */ + public String getText(Object element); + + /** + * Returns a text label that is based on the given text label, + * but decorated with additional information relating to the state + * of the provided element. + * + * @param text the input text label to decorate + * @param element the element whose image is being decorated + * @return the decorated text label, or <code>null</code> if no decoration is to be applied + */ + public String decorateText(String text, Object element); +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/filetransfer/IFileTransferItem.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/filetransfer/IFileTransferItem.java index 4dac74d72..57717935b 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/filetransfer/IFileTransferItem.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/filetransfer/IFileTransferItem.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.runtime.services.interfaces.filetransfer;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
-
-/**
- * IFileTransferItem
- */
-public interface IFileTransferItem extends IPropertiesContainer {
-
- public static final String PROPERTY_ENABLED = "enabled"; //$NON-NLS-1$
- public static final String PROPERTY_DIRECTION = "direction"; //$NON-NLS-1$
- public static final String PROPERTY_HOST = "host"; //$NON-NLS-1$
- public static final String PROPERTY_TARGET = "target"; //$NON-NLS-1$
- public static final String PROPERTY_OPTIONS = "options"; //$NON-NLS-1$
-
- public static final int HOST_TO_TARGET = 1;
- public static final int TARGET_TO_HOST = 2;
-
- /**
- * Return <code>true</code> if the item is enabled.
- */
- public boolean isEnabled();
-
- /**
- * Return the host path. Must not be <code>null</code>.
- * The host path needs to be a file for transfer from host to target.
- * For a transfer from target to host, the path can be a file or directory.
- */
- public IPath getHostPath();
-
- /**
- * Return the target (remote) path. Must not be <code>null</code>.
- * The target path needs to be a file for transfer from target to host.
- * For a transfer from host to target, the path can be a file or directory.
- */
- public IPath getTargetPath();
-
- /**
- * Return the transfer direction.
- */
- public int getDirection();
-
- /**
- * Return the option string for the transfer or <code>null</code>.
- */
- public String getOptions();
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.runtime.services.interfaces.filetransfer; + +import org.eclipse.core.runtime.IPath; +import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer; + +/** + * IFileTransferItem + */ +public interface IFileTransferItem extends IPropertiesContainer { + + public static final String PROPERTY_ENABLED = "enabled"; //$NON-NLS-1$ + public static final String PROPERTY_DIRECTION = "direction"; //$NON-NLS-1$ + public static final String PROPERTY_HOST = "host"; //$NON-NLS-1$ + public static final String PROPERTY_TARGET = "target"; //$NON-NLS-1$ + public static final String PROPERTY_OPTIONS = "options"; //$NON-NLS-1$ + + public static final int HOST_TO_TARGET = 1; + public static final int TARGET_TO_HOST = 2; + + /** + * Return <code>true</code> if the item is enabled. + */ + public boolean isEnabled(); + + /** + * Return the host path. Must not be <code>null</code>. + * The host path needs to be a file for transfer from host to target. + * For a transfer from target to host, the path can be a file or directory. + */ + public IPath getHostPath(); + + /** + * Return the target (remote) path. Must not be <code>null</code>. + * The target path needs to be a file for transfer from target to host. + * For a transfer from host to target, the path can be a file or directory. + */ + public IPath getTargetPath(); + + /** + * Return the transfer direction. + */ + public int getDirection(); + + /** + * Return the option string for the transfer or <code>null</code>. + */ + public String getOptions(); +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/internal/MenuServicePropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/internal/MenuServicePropertyTester.java index 67d412f03..0b81c1768 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/internal/MenuServicePropertyTester.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/internal/MenuServicePropertyTester.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/internal/PropertiesContainerPropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/internal/PropertiesContainerPropertyTester.java index 955d6e1de..f0de45e68 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/internal/PropertiesContainerPropertyTester.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/internal/PropertiesContainerPropertyTester.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/internal/PropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/internal/PropertyTester.java index 4343a565f..7166f76b5 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/internal/PropertyTester.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/internal/PropertyTester.java @@ -1,38 +1,38 @@ -/*******************************************************************************
- * Copyright (c) 2011 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.internal;
-
-import org.eclipse.tcf.te.runtime.services.ServiceManager;
-
-
-/**
- * Services plug-in property tester implementation.
- */
-public class PropertyTester extends org.eclipse.core.expressions.PropertyTester {
-
- /* (non-Javadoc)
- * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
- */
- @Override
- public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
-
- // "hasService": Checks if a given service type is available for the given receiver.
- if ("hasService".equals(property)) { //$NON-NLS-1$
- // The service type class name is within the expected value
- String serviceTypeName = expectedValue instanceof String ? (String)expectedValue : null;
- if (serviceTypeName != null) {
- return ServiceManager.getInstance().hasService(receiver, serviceTypeName);
- }
- }
-
- return false;
- }
-
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.runtime.services.internal; + +import org.eclipse.tcf.te.runtime.services.ServiceManager; + + +/** + * Services plug-in property tester implementation. + */ +public class PropertyTester extends org.eclipse.core.expressions.PropertyTester { + + /* (non-Javadoc) + * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object) + */ + @Override + public boolean test(Object receiver, String property, Object[] args, Object expectedValue) { + + // "hasService": Checks if a given service type is available for the given receiver. + if ("hasService".equals(property)) { //$NON-NLS-1$ + // The service type class name is within the expected value + String serviceTypeName = expectedValue instanceof String ? (String)expectedValue : null; + if (serviceTypeName != null) { + return ServiceManager.getInstance().hasService(receiver, serviceTypeName); + } + } + + return false; + } + +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/build.properties index e8d9fa711..61fc214f5 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/build.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/build.properties @@ -1,17 +1,17 @@ -###############################################################################
-# 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,\
- plugin.xml,\
- about.html
-src.includes = schema/
+############################################################################### +# Copyright (c) 2012, 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,\ + plugin.xml,\ + about.html +src.includes = schema/ diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/plugin.properties index 3f984224e..f65014cb5 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/plugin.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/plugin.properties @@ -1,5 +1,5 @@ ################################################################################## -# Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/AbstractStatusHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/AbstractStatusHandler.java index 1283fd4c8..0a7328060 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/AbstractStatusHandler.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/AbstractStatusHandler.java @@ -1,20 +1,20 @@ -/*******************************************************************************
- * Copyright (c) 2011 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.statushandler;
-
-import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandler;
-import org.eclipse.tcf.te.runtime.extensions.ExecutableExtension;
-
-/**
- * Abstract status handler implementation.
- */
-public abstract class AbstractStatusHandler extends ExecutableExtension implements IStatusHandler {
-
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.runtime.statushandler; + +import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandler; +import org.eclipse.tcf.te.runtime.extensions.ExecutableExtension; + +/** + * Abstract status handler implementation. + */ +public abstract class AbstractStatusHandler extends ExecutableExtension implements IStatusHandler { + +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/StatusHandlerManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/StatusHandlerManager.java index 89647f93d..38018f720 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/StatusHandlerManager.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/StatusHandlerManager.java @@ -1,135 +1,135 @@ -/*******************************************************************************
- * Copyright (c) 2011 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.statushandler;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandler;
-import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandlerConstants;
-import org.eclipse.tcf.te.runtime.statushandler.internal.StatusHandlerBinding;
-import org.eclipse.tcf.te.runtime.statushandler.internal.StatusHandlerBindingExtensionPointManager;
-import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
-import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
-
-/**
- * Status handler manager implementation.
- */
-public final class StatusHandlerManager extends AbstractExtensionPointManager<IStatusHandler> {
-
- /*
- * Thread save singleton instance creation.
- */
- private static class LazyInstance {
- public static StatusHandlerManager instance = new StatusHandlerManager();
- }
-
- /**
- * Constructor.
- */
- StatusHandlerManager() {
- super();
- }
-
- /**
- * Returns the singleton instance of the extension point manager.
- */
- public static StatusHandlerManager getInstance() {
- return LazyInstance.instance;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
- */
- @Override
- protected String getExtensionPointId() {
- return "org.eclipse.tcf.te.runtime.statushandler.handlers"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
- */
- @Override
- protected String getConfigurationElementName() {
- return "handler"; //$NON-NLS-1$
- }
-
- /**
- * Returns the list of all contributed status handler.
- *
- * @param unique If <code>true</code>, the method returns new instances for each
- * contributed status handler.
- *
- * @return The list of contributed status handler, or an empty array.
- */
- public IStatusHandler[] getHandlers(boolean unique) {
- List<IStatusHandler> contributions = new ArrayList<IStatusHandler>();
- Collection<ExecutableExtensionProxy<IStatusHandler>> statusHandlers = getExtensions().values();
- for (ExecutableExtensionProxy<IStatusHandler> statusHandler : statusHandlers) {
- IStatusHandler instance = unique ? statusHandler.newInstance() : statusHandler.getInstance();
- if (instance != null && !contributions.contains(instance)) {
- contributions.add(instance);
- }
- }
-
- return contributions.toArray(new IStatusHandler[contributions.size()]);
- }
-
- /**
- * Returns the status handler identified by its unique id. If no status
- * handler with the specified id is registered, <code>null</code> is returned.
- *
- * @param id The unique id of the status handler or <code>null</code>
- * @param unique If <code>true</code>, the method returns new instances of the status handler contribution.
- *
- * @return The status handler instance or <code>null</code>.
- */
- public IStatusHandler getHandler(String id, boolean unique) {
- IStatusHandler contribution = null;
- if (getExtensions().containsKey(id)) {
- ExecutableExtensionProxy<IStatusHandler> proxy = getExtensions().get(id);
- // Get the extension instance
- contribution = unique ? proxy.newInstance() : proxy.getInstance();
- }
-
- return contribution;
- }
-
- /**
- * Returns the status handler which are enabled for the given
- * handler context.
- *
- * @param context The handler context. Must not be <code>null</code>.
- * @return The list of status handler which are enabled or an empty array.
- */
- public IStatusHandler[] getHandler(Object context) {
- Assert.isNotNull(context);
-
- List<IStatusHandler> handlers = new ArrayList<IStatusHandler>();
-
- // Get the list of applicable bindings
- StatusHandlerBinding[] bindings = StatusHandlerBindingExtensionPointManager.getInstance().getApplicableBindings(context);
- for (StatusHandlerBinding binding : bindings) {
- IStatusHandler handler = getHandler(binding.getHandlerId(), false);
- if (handler != null && !handlers.contains(handler)) handlers.add(handler);
- }
-
- // If no applicable status handler is found, always return the default status handler
- if (handlers.isEmpty()) {
- IStatusHandler handler = getHandler(IStatusHandlerConstants.ID_DEFAUT_HANDLER, false);
- Assert.isNotNull(handler);
- handlers.add(handler);
- }
-
- return handlers.toArray(new IStatusHandler[handlers.size()]);
- }
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.runtime.statushandler; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandler; +import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandlerConstants; +import org.eclipse.tcf.te.runtime.statushandler.internal.StatusHandlerBinding; +import org.eclipse.tcf.te.runtime.statushandler.internal.StatusHandlerBindingExtensionPointManager; +import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager; +import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy; + +/** + * Status handler manager implementation. + */ +public final class StatusHandlerManager extends AbstractExtensionPointManager<IStatusHandler> { + + /* + * Thread save singleton instance creation. + */ + private static class LazyInstance { + public static StatusHandlerManager instance = new StatusHandlerManager(); + } + + /** + * Constructor. + */ + StatusHandlerManager() { + super(); + } + + /** + * Returns the singleton instance of the extension point manager. + */ + public static StatusHandlerManager getInstance() { + return LazyInstance.instance; + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId() + */ + @Override + protected String getExtensionPointId() { + return "org.eclipse.tcf.te.runtime.statushandler.handlers"; //$NON-NLS-1$ + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName() + */ + @Override + protected String getConfigurationElementName() { + return "handler"; //$NON-NLS-1$ + } + + /** + * Returns the list of all contributed status handler. + * + * @param unique If <code>true</code>, the method returns new instances for each + * contributed status handler. + * + * @return The list of contributed status handler, or an empty array. + */ + public IStatusHandler[] getHandlers(boolean unique) { + List<IStatusHandler> contributions = new ArrayList<IStatusHandler>(); + Collection<ExecutableExtensionProxy<IStatusHandler>> statusHandlers = getExtensions().values(); + for (ExecutableExtensionProxy<IStatusHandler> statusHandler : statusHandlers) { + IStatusHandler instance = unique ? statusHandler.newInstance() : statusHandler.getInstance(); + if (instance != null && !contributions.contains(instance)) { + contributions.add(instance); + } + } + + return contributions.toArray(new IStatusHandler[contributions.size()]); + } + + /** + * Returns the status handler identified by its unique id. If no status + * handler with the specified id is registered, <code>null</code> is returned. + * + * @param id The unique id of the status handler or <code>null</code> + * @param unique If <code>true</code>, the method returns new instances of the status handler contribution. + * + * @return The status handler instance or <code>null</code>. + */ + public IStatusHandler getHandler(String id, boolean unique) { + IStatusHandler contribution = null; + if (getExtensions().containsKey(id)) { + ExecutableExtensionProxy<IStatusHandler> proxy = getExtensions().get(id); + // Get the extension instance + contribution = unique ? proxy.newInstance() : proxy.getInstance(); + } + + return contribution; + } + + /** + * Returns the status handler which are enabled for the given + * handler context. + * + * @param context The handler context. Must not be <code>null</code>. + * @return The list of status handler which are enabled or an empty array. + */ + public IStatusHandler[] getHandler(Object context) { + Assert.isNotNull(context); + + List<IStatusHandler> handlers = new ArrayList<IStatusHandler>(); + + // Get the list of applicable bindings + StatusHandlerBinding[] bindings = StatusHandlerBindingExtensionPointManager.getInstance().getApplicableBindings(context); + for (StatusHandlerBinding binding : bindings) { + IStatusHandler handler = getHandler(binding.getHandlerId(), false); + if (handler != null && !handlers.contains(handler)) handlers.add(handler); + } + + // If no applicable status handler is found, always return the default status handler + if (handlers.isEmpty()) { + IStatusHandler handler = getHandler(IStatusHandlerConstants.ID_DEFAUT_HANDLER, false); + Assert.isNotNull(handler); + handlers.add(handler); + } + + return handlers.toArray(new IStatusHandler[handlers.size()]); + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/StatusHandlerUtil.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/StatusHandlerUtil.java index 80af56237..cc5bda8d4 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/StatusHandlerUtil.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/StatusHandlerUtil.java @@ -2,7 +2,7 @@ * StatusHandlerUtil.java * Created on May 21, 2012 * - * Copyright (c) 2012, 2013 Wind River Systems, Inc. + * Copyright (c) 2012, 2014 Wind River Systems, Inc. * * The right to copy, distribute, modify, or otherwise make use * of this software may be licensed only pursuant to the terms diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/activator/CoreBundleActivator.java index 41898ce77..9d1d5544a 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/activator/CoreBundleActivator.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/activator/CoreBundleActivator.java @@ -1,59 +1,59 @@ -/*******************************************************************************
- * Copyright (c) 2011, 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.runtime.statushandler.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.runtime.statushandler"; //$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) 2011, 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.runtime.statushandler.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.runtime.statushandler"; //$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.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/interfaces/IStatusHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/interfaces/IStatusHandler.java index dcf0a35b7..c0b7c4a92 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/interfaces/IStatusHandler.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/interfaces/IStatusHandler.java @@ -1,34 +1,34 @@ -/*******************************************************************************
- * Copyright (c) 2011, 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.runtime.statushandler.interfaces;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension;
-import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
-
-/**
- * Interface to be implemented by status handler contributions.
- */
-public interface IStatusHandler extends IExecutableExtension {
-
- /**
- * Handle the given status and invoke the callback if finished.
- * <p>
- * By design, the method behavior is asynchronous. It's up to the status handle contributor if
- * the implementation is asynchronous or synchronous. Synchronous implementations must invoke
- * the callback too if finished.
- *
- * @param status The status. Must not be <code>null</code>.
- * @param data The custom status data object, or <code>null</code> if none.
- * @param done The callback, or <code>null</code>.
- */
- public void handleStatus(IStatus status, IPropertiesContainer data, ICallback done);
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.runtime.statushandler.interfaces; + +import org.eclipse.core.runtime.IStatus; +import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback; +import org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension; +import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer; + +/** + * Interface to be implemented by status handler contributions. + */ +public interface IStatusHandler extends IExecutableExtension { + + /** + * Handle the given status and invoke the callback if finished. + * <p> + * By design, the method behavior is asynchronous. It's up to the status handle contributor if + * the implementation is asynchronous or synchronous. Synchronous implementations must invoke + * the callback too if finished. + * + * @param status The status. Must not be <code>null</code>. + * @param data The custom status data object, or <code>null</code> if none. + * @param done The callback, or <code>null</code>. + */ + public void handleStatus(IStatus status, IPropertiesContainer data, ICallback done); +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/interfaces/IStatusHandlerConstants.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/interfaces/IStatusHandlerConstants.java index ac92e91d1..b77a88973 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/interfaces/IStatusHandlerConstants.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/interfaces/IStatusHandlerConstants.java @@ -1,67 +1,67 @@ -/*******************************************************************************
- * Copyright (c) 2011 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.statushandler.interfaces;
-
-/**
- * Status handler constants.
- */
-public interface IStatusHandlerConstants {
-
- /**
- * The id of the default status handler.
- */
- public final static String ID_DEFAUT_HANDLER = "org.eclipse.tcf.te.statushandler.default"; //$NON-NLS-1$
-
- /**
- * The status to handle is a question (yes/no) (value 0x100).
- */
- public final static int QUESTION = 0x100;
-
- /**
- * The status to handle is a question (yes/no) with cancel (value 0x200).
- */
- public final static int YES_NO_CANCEL = 0x200;
-
- /**
- * Property: The title of the message dialog.
- * The value is expected to be a string.
- */
- public final static String PROPERTY_TITLE = "title"; //$NON-NLS-1$
-
- /**
- * Property: An string array listing the labels of the message dialog buttons.
- * If <code>null</code>, the default labeling, typically "OK"
- * for a single button message dialog, will be applied.
- */
- public final static String PROPERTY_BUTTON_LABEL = "buttonLabel"; //$NON-NLS-1$
-
- /**
- * Property: The context help id of the message dialog.
- * The value is expected to be a string.
- */
- public final static String PROPERTY_CONTEXT_HELP_ID = "contextHelpId"; //$NON-NLS-1$
-
- /**
- * Property: The preference slot id for the "don't ask again" checkbox.
- * The value is expected to be a string.
- */
- public final static String PROPERTY_DONT_ASK_AGAIN_ID = "dontAskAgainId"; //$NON-NLS-1$
-
- /**
- * Property: The caller of the status handler. The value is expected to
- * be the caller object or the callers class object.
- */
- public final static String PROPERTY_CALLER = "caller"; //$NON-NLS-1$
-
- /**
- * Property: The result of the status handling.
- */
- public final static String PROPERTY_RESULT = "result"; //$NON-NLS-1$
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.runtime.statushandler.interfaces; + +/** + * Status handler constants. + */ +public interface IStatusHandlerConstants { + + /** + * The id of the default status handler. + */ + public final static String ID_DEFAUT_HANDLER = "org.eclipse.tcf.te.statushandler.default"; //$NON-NLS-1$ + + /** + * The status to handle is a question (yes/no) (value 0x100). + */ + public final static int QUESTION = 0x100; + + /** + * The status to handle is a question (yes/no) with cancel (value 0x200). + */ + public final static int YES_NO_CANCEL = 0x200; + + /** + * Property: The title of the message dialog. + * The value is expected to be a string. + */ + public final static String PROPERTY_TITLE = "title"; //$NON-NLS-1$ + + /** + * Property: An string array listing the labels of the message dialog buttons. + * If <code>null</code>, the default labeling, typically "OK" + * for a single button message dialog, will be applied. + */ + public final static String PROPERTY_BUTTON_LABEL = "buttonLabel"; //$NON-NLS-1$ + + /** + * Property: The context help id of the message dialog. + * The value is expected to be a string. + */ + public final static String PROPERTY_CONTEXT_HELP_ID = "contextHelpId"; //$NON-NLS-1$ + + /** + * Property: The preference slot id for the "don't ask again" checkbox. + * The value is expected to be a string. + */ + public final static String PROPERTY_DONT_ASK_AGAIN_ID = "dontAskAgainId"; //$NON-NLS-1$ + + /** + * Property: The caller of the status handler. The value is expected to + * be the caller object or the callers class object. + */ + public final static String PROPERTY_CALLER = "caller"; //$NON-NLS-1$ + + /** + * Property: The result of the status handling. + */ + public final static String PROPERTY_RESULT = "result"; //$NON-NLS-1$ +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/internal/StatusHandlerBinding.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/internal/StatusHandlerBinding.java index 5ed6ea423..c8262cbac 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/internal/StatusHandlerBinding.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/internal/StatusHandlerBinding.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/internal/StatusHandlerBindingExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/internal/StatusHandlerBindingExtensionPointManager.java index 7acbf8954..f39ba7168 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/internal/StatusHandlerBindingExtensionPointManager.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/internal/StatusHandlerBindingExtensionPointManager.java @@ -1,157 +1,157 @@ -/*******************************************************************************
- * Copyright (c) 2011, 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.runtime.statushandler.internal;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.core.expressions.EvaluationContext;
-import org.eclipse.core.expressions.EvaluationResult;
-import org.eclipse.core.expressions.Expression;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
-import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
-import org.eclipse.tcf.te.runtime.statushandler.activator.CoreBundleActivator;
-
-
-/**
- * Status handler binding extension point manager implementation.
- */
-public class StatusHandlerBindingExtensionPointManager extends AbstractExtensionPointManager<StatusHandlerBinding> {
-
- /*
- * Thread save singleton instance creation.
- */
- private static class LazyInstance {
- public static StatusHandlerBindingExtensionPointManager instance = new StatusHandlerBindingExtensionPointManager();
- }
-
- /**
- * Constructor.
- */
- StatusHandlerBindingExtensionPointManager() {
- super();
- }
-
- /**
- * Returns the singleton instance of the extension point manager.
- */
- public static StatusHandlerBindingExtensionPointManager getInstance() {
- return LazyInstance.instance;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
- */
- @Override
- protected String getExtensionPointId() {
- return "org.eclipse.tcf.te.runtime.statushandler.bindings"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
- */
- @Override
- protected String getConfigurationElementName() {
- return "binding"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#doCreateExtensionProxy(org.eclipse.core.runtime.IConfigurationElement)
- */
- @Override
- protected ExecutableExtensionProxy<StatusHandlerBinding> doCreateExtensionProxy(IConfigurationElement element) throws CoreException {
- return new ExecutableExtensionProxy<StatusHandlerBinding>(element) {
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy#newInstance()
- */
- @Override
- public StatusHandlerBinding newInstance() {
- StatusHandlerBinding instance = new StatusHandlerBinding();
- try {
- instance.setInitializationData(getConfigurationElement(), null, null);
- } catch (CoreException e) {
- IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(),
- e.getLocalizedMessage(), e);
- Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(status);
- }
- return instance;
- }
- };
- }
-
- /**
- * Returns the applicable status handler bindings for the given handler context.
- *
- * @param context The handler context or <code>null</code>.
- * @return The list of applicable editor page bindings or an empty array.
- */
- public StatusHandlerBinding[] getApplicableBindings(Object context) {
- List<StatusHandlerBinding> applicable = new ArrayList<StatusHandlerBinding>();
-
- for (StatusHandlerBinding binding : getBindings()) {
- Expression enablement = binding.getEnablement();
-
- // The binding is applicable by default if no expression is specified.
- boolean isApplicable = enablement == null;
-
- if (enablement != null) {
- if (context != null) {
- // Set the default variable to the handler context.
- EvaluationContext evalContext = new EvaluationContext(null, context);
- evalContext.addVariable("context", context); //$NON-NLS-1$
- // Allow plugin activation
- evalContext.setAllowPluginActivation(true);
- // Evaluate the expression
- try {
- isApplicable = enablement.evaluate(evalContext).equals(EvaluationResult.TRUE);
- } catch (CoreException e) {
- IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(),
- e.getLocalizedMessage(), e);
- Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(status);
- }
- } else {
- // The enablement is false by definition if no handler context is given.
- isApplicable = false;
- }
- }
-
- // Add the binding if applicable
- if (isApplicable) {
- applicable.add(binding);
- }
- }
-
- return applicable.toArray(new StatusHandlerBinding[applicable.size()]);
- }
-
- /**
- * Returns the list of all contributed status handler bindings.
- *
- * @return The list of contributed status handler bindings, or an empty array.
- */
- public StatusHandlerBinding[] getBindings() {
- List<StatusHandlerBinding> contributions = new ArrayList<StatusHandlerBinding>();
- Collection<ExecutableExtensionProxy<StatusHandlerBinding>> statusHandlerBindings = getExtensions().values();
- for (ExecutableExtensionProxy<StatusHandlerBinding> statusHandlerBinding : statusHandlerBindings) {
- StatusHandlerBinding instance = statusHandlerBinding.getInstance();
- if (instance != null && !contributions.contains(instance)) {
- contributions.add(instance);
- }
- }
-
- return contributions.toArray(new StatusHandlerBinding[contributions.size()]);
- }
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.runtime.statushandler.internal; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import org.eclipse.core.expressions.EvaluationContext; +import org.eclipse.core.expressions.EvaluationResult; +import org.eclipse.core.expressions.Expression; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.Status; +import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager; +import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy; +import org.eclipse.tcf.te.runtime.statushandler.activator.CoreBundleActivator; + + +/** + * Status handler binding extension point manager implementation. + */ +public class StatusHandlerBindingExtensionPointManager extends AbstractExtensionPointManager<StatusHandlerBinding> { + + /* + * Thread save singleton instance creation. + */ + private static class LazyInstance { + public static StatusHandlerBindingExtensionPointManager instance = new StatusHandlerBindingExtensionPointManager(); + } + + /** + * Constructor. + */ + StatusHandlerBindingExtensionPointManager() { + super(); + } + + /** + * Returns the singleton instance of the extension point manager. + */ + public static StatusHandlerBindingExtensionPointManager getInstance() { + return LazyInstance.instance; + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId() + */ + @Override + protected String getExtensionPointId() { + return "org.eclipse.tcf.te.runtime.statushandler.bindings"; //$NON-NLS-1$ + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName() + */ + @Override + protected String getConfigurationElementName() { + return "binding"; //$NON-NLS-1$ + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#doCreateExtensionProxy(org.eclipse.core.runtime.IConfigurationElement) + */ + @Override + protected ExecutableExtensionProxy<StatusHandlerBinding> doCreateExtensionProxy(IConfigurationElement element) throws CoreException { + return new ExecutableExtensionProxy<StatusHandlerBinding>(element) { + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy#newInstance() + */ + @Override + public StatusHandlerBinding newInstance() { + StatusHandlerBinding instance = new StatusHandlerBinding(); + try { + instance.setInitializationData(getConfigurationElement(), null, null); + } catch (CoreException e) { + IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(), + e.getLocalizedMessage(), e); + Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(status); + } + return instance; + } + }; + } + + /** + * Returns the applicable status handler bindings for the given handler context. + * + * @param context The handler context or <code>null</code>. + * @return The list of applicable editor page bindings or an empty array. + */ + public StatusHandlerBinding[] getApplicableBindings(Object context) { + List<StatusHandlerBinding> applicable = new ArrayList<StatusHandlerBinding>(); + + for (StatusHandlerBinding binding : getBindings()) { + Expression enablement = binding.getEnablement(); + + // The binding is applicable by default if no expression is specified. + boolean isApplicable = enablement == null; + + if (enablement != null) { + if (context != null) { + // Set the default variable to the handler context. + EvaluationContext evalContext = new EvaluationContext(null, context); + evalContext.addVariable("context", context); //$NON-NLS-1$ + // Allow plugin activation + evalContext.setAllowPluginActivation(true); + // Evaluate the expression + try { + isApplicable = enablement.evaluate(evalContext).equals(EvaluationResult.TRUE); + } catch (CoreException e) { + IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(), + e.getLocalizedMessage(), e); + Platform.getLog(CoreBundleActivator.getContext().getBundle()).log(status); + } + } else { + // The enablement is false by definition if no handler context is given. + isApplicable = false; + } + } + + // Add the binding if applicable + if (isApplicable) { + applicable.add(binding); + } + } + + return applicable.toArray(new StatusHandlerBinding[applicable.size()]); + } + + /** + * Returns the list of all contributed status handler bindings. + * + * @return The list of contributed status handler bindings, or an empty array. + */ + public StatusHandlerBinding[] getBindings() { + List<StatusHandlerBinding> contributions = new ArrayList<StatusHandlerBinding>(); + Collection<ExecutableExtensionProxy<StatusHandlerBinding>> statusHandlerBindings = getExtensions().values(); + for (ExecutableExtensionProxy<StatusHandlerBinding> statusHandlerBinding : statusHandlerBindings) { + StatusHandlerBinding instance = statusHandlerBinding.getInstance(); + if (instance != null && !contributions.contains(instance)) { + contributions.add(instance); + } + } + + return contributions.toArray(new StatusHandlerBinding[contributions.size()]); + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/nls/Messages.java index 8715718ac..2471f84e9 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/nls/Messages.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/nls/Messages.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/nls/Messages.properties index dba721088..e9d2beb2d 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/nls/Messages.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/nls/Messages.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/status/QuestionStatus.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/status/QuestionStatus.java index 9bd1acd49..4fb305cad 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/status/QuestionStatus.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/status/QuestionStatus.java @@ -1,77 +1,77 @@ -/*******************************************************************************
- * 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.runtime.statushandler.status;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandlerConstants;
-
-/**
- * Special status implementation to handle questions.
- * <p>
- * <b>Note:</b>
- * <ul>
- * <li>{@link #getSeverity()} will always return {@link IStatusHandlerConstants#QUESTION}</li>
- * <li>{@link #setSeverity(int)} will be ignored</li>
- * </ul>
- */
-public class QuestionStatus extends Status {
-
- /**
- * Constructor.
- *
- * @param pluginId The unique plugin id.
- * @param message The message.
- */
- public QuestionStatus(String pluginId, String message) {
- super(IStatus.OK, pluginId, message);
-
- }
-
- /**
- * Constructor.
- *
- * @param pluginId The unique plugin id.
- * @param message The message.
- * @param exception The exception.
- */
- public QuestionStatus(String pluginId, String message, Throwable exception) {
- super(IStatus.OK, pluginId, message, exception);
-
- }
-
- /**
- * Constructor.
- *
- * @param pluginId The unique plugin id.
- * @param code The code.
- * @param message The message.
- * @param exception The exception.
- */
- public QuestionStatus(String pluginId, int code, String message, Throwable exception) {
- super(IStatus.OK, pluginId, code, message, exception);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.Status#getSeverity()
- */
- @Override
- public final int getSeverity() {
- return IStatusHandlerConstants.QUESTION;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.Status#setSeverity(int)
- */
- @Override
- protected final void setSeverity(int severity) {
- if (IStatus.OK == severity) super.setSeverity(severity);
- }
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.runtime.statushandler.status; + +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandlerConstants; + +/** + * Special status implementation to handle questions. + * <p> + * <b>Note:</b> + * <ul> + * <li>{@link #getSeverity()} will always return {@link IStatusHandlerConstants#QUESTION}</li> + * <li>{@link #setSeverity(int)} will be ignored</li> + * </ul> + */ +public class QuestionStatus extends Status { + + /** + * Constructor. + * + * @param pluginId The unique plugin id. + * @param message The message. + */ + public QuestionStatus(String pluginId, String message) { + super(IStatus.OK, pluginId, message); + + } + + /** + * Constructor. + * + * @param pluginId The unique plugin id. + * @param message The message. + * @param exception The exception. + */ + public QuestionStatus(String pluginId, String message, Throwable exception) { + super(IStatus.OK, pluginId, message, exception); + + } + + /** + * Constructor. + * + * @param pluginId The unique plugin id. + * @param code The code. + * @param message The message. + * @param exception The exception. + */ + public QuestionStatus(String pluginId, int code, String message, Throwable exception) { + super(IStatus.OK, pluginId, code, message, exception); + } + + /* (non-Javadoc) + * @see org.eclipse.core.runtime.Status#getSeverity() + */ + @Override + public final int getSeverity() { + return IStatusHandlerConstants.QUESTION; + } + + /* (non-Javadoc) + * @see org.eclipse.core.runtime.Status#setSeverity(int) + */ + @Override + protected final void setSeverity(int severity) { + if (IStatus.OK == severity) super.setSeverity(severity); + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/status/YesNoCancelStatus.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/status/YesNoCancelStatus.java index 56750620b..333fdfe85 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/status/YesNoCancelStatus.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler/src/org/eclipse/tcf/te/runtime/statushandler/status/YesNoCancelStatus.java @@ -1,76 +1,76 @@ -/*******************************************************************************
- * 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.runtime.statushandler.status;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandlerConstants;
-
-/**
- * Special status implementation to handle questions.
- * <p>
- * <b>Note:</b>
- * <ul>
- * <li>{@link #getSeverity()} will always return {@link IStatusHandlerConstants#YES_NO_CANCEL}</li>
- * <li>{@link #setSeverity(int)} will be ignored</li>
- * </ul>
- */
-public class YesNoCancelStatus extends Status {
-
- /**
- * Constructor.
- *
- * @param pluginId The unique plugin id.
- * @param message The message.
- */
- public YesNoCancelStatus(String pluginId, String message) {
- super(IStatus.OK, pluginId, message);
-
- }
-
- /**
- * Constructor.
- *
- * @param pluginId The unique plugin id.
- * @param message The message.
- * @param exception The exception.
- */
- public YesNoCancelStatus(String pluginId, String message, Throwable exception) {
- super(IStatus.OK, pluginId, message, exception);
-
- }
-
- /**
- * Constructor.
- *
- * @param pluginId The unique plugin id.
- * @param code The code.
- * @param message The message.
- * @param exception The exception.
- */
- public YesNoCancelStatus(String pluginId, int code, String message, Throwable exception) {
- super(IStatus.OK, pluginId, code, message, exception);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.Status#getSeverity()
- */
- @Override
- public final int getSeverity() {
- return IStatusHandlerConstants.YES_NO_CANCEL;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.Status#setSeverity(int)
- */
- @Override
- protected final void setSeverity(int severity) {
- }
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.runtime.statushandler.status; + +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.tcf.te.runtime.statushandler.interfaces.IStatusHandlerConstants; + +/** + * Special status implementation to handle questions. + * <p> + * <b>Note:</b> + * <ul> + * <li>{@link #getSeverity()} will always return {@link IStatusHandlerConstants#YES_NO_CANCEL}</li> + * <li>{@link #setSeverity(int)} will be ignored</li> + * </ul> + */ +public class YesNoCancelStatus extends Status { + + /** + * Constructor. + * + * @param pluginId The unique plugin id. + * @param message The message. + */ + public YesNoCancelStatus(String pluginId, String message) { + super(IStatus.OK, pluginId, message); + + } + + /** + * Constructor. + * + * @param pluginId The unique plugin id. + * @param message The message. + * @param exception The exception. + */ + public YesNoCancelStatus(String pluginId, String message, Throwable exception) { + super(IStatus.OK, pluginId, message, exception); + + } + + /** + * Constructor. + * + * @param pluginId The unique plugin id. + * @param code The code. + * @param message The message. + * @param exception The exception. + */ + public YesNoCancelStatus(String pluginId, int code, String message, Throwable exception) { + super(IStatus.OK, pluginId, code, message, exception); + } + + /* (non-Javadoc) + * @see org.eclipse.core.runtime.Status#getSeverity() + */ + @Override + public final int getSeverity() { + return IStatusHandlerConstants.YES_NO_CANCEL; + } + + /* (non-Javadoc) + * @see org.eclipse.core.runtime.Status#setSeverity(int) + */ + @Override + protected final void setSeverity(int severity) { + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/build.properties index e8d9fa711..61fc214f5 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/build.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/build.properties @@ -1,17 +1,17 @@ -###############################################################################
-# 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,\
- plugin.xml,\
- about.html
-src.includes = schema/
+############################################################################### +# Copyright (c) 2012, 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,\ + plugin.xml,\ + about.html +src.includes = schema/ diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/plugin.properties index 745419ca7..9d956a004 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/plugin.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/plugin.properties @@ -1,5 +1,5 @@ ################################################################################## -# Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/FullQualifiedId.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/FullQualifiedId.java index 7d660823d..a74d7eba7 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/FullQualifiedId.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/FullQualifiedId.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/StepperManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/StepperManager.java index bd23fa2b0..65ac0be2a 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/StepperManager.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/StepperManager.java @@ -1,62 +1,62 @@ -/*******************************************************************************
- * Copyright (c) 2011, 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.runtime.stepper;
-
-import org.eclipse.tcf.te.runtime.stepper.extensions.manager.StepExtensionPointManager;
-import org.eclipse.tcf.te.runtime.stepper.extensions.manager.StepGroupExtensionPointManager;
-
-/**
- * Central manager providing access to the stepper, steps and step groups
- * contributed via extension points.
- */
-public final class StepperManager {
- // References to the extension point managers
- private final StepExtensionPointManager stepExtManager = new StepExtensionPointManager();
- private final StepGroupExtensionPointManager stepGroupExtManager = new StepGroupExtensionPointManager();
-
- /*
- * Thread save singleton instance creation.
- */
- private static class LazyInstance {
- public static StepperManager instance = new StepperManager();
- }
-
- /**
- * Constructor.
- */
- StepperManager() {
- super();
- }
-
- /**
- * Returns the singleton instance of the manager.
- */
- public static StepperManager getInstance() {
- return LazyInstance.instance;
- }
-
- /**
- * Returns the step extension point manager instance.
- *
- * @return The step extension point manager instance.
- */
- public StepExtensionPointManager getStepExtManager() {
- return stepExtManager;
- }
-
- /**
- * Returns the step group extension point manager instance.
- *
- * @return The step group extension point manager instance.
- */
- public StepGroupExtensionPointManager getStepGroupExtManager() {
- return stepGroupExtManager;
- }
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.runtime.stepper; + +import org.eclipse.tcf.te.runtime.stepper.extensions.manager.StepExtensionPointManager; +import org.eclipse.tcf.te.runtime.stepper.extensions.manager.StepGroupExtensionPointManager; + +/** + * Central manager providing access to the stepper, steps and step groups + * contributed via extension points. + */ +public final class StepperManager { + // References to the extension point managers + private final StepExtensionPointManager stepExtManager = new StepExtensionPointManager(); + private final StepGroupExtensionPointManager stepGroupExtManager = new StepGroupExtensionPointManager(); + + /* + * Thread save singleton instance creation. + */ + private static class LazyInstance { + public static StepperManager instance = new StepperManager(); + } + + /** + * Constructor. + */ + StepperManager() { + super(); + } + + /** + * Returns the singleton instance of the manager. + */ + public static StepperManager getInstance() { + return LazyInstance.instance; + } + + /** + * Returns the step extension point manager instance. + * + * @return The step extension point manager instance. + */ + public StepExtensionPointManager getStepExtManager() { + return stepExtManager; + } + + /** + * Returns the step group extension point manager instance. + * + * @return The step group extension point manager instance. + */ + public StepGroupExtensionPointManager getStepGroupExtManager() { + return stepGroupExtManager; + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/activator/CoreBundleActivator.java index f40c2263d..3a14fed84 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/activator/CoreBundleActivator.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/activator/CoreBundleActivator.java @@ -1,72 +1,72 @@ -/*******************************************************************************
- * Copyright (c) 2011, 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.runtime.stepper.activator;
-
-import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
-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;
- // The trace handler instance
- private static volatile TraceHandler traceHandler;
-
- /**
- * 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.runtime.stepper"; //$NON-NLS-1$
- }
-
- /**
- * Returns the bundles trace handler.
- *
- * @return The bundles trace handler.
- */
- public static TraceHandler getTraceHandler() {
- if (traceHandler == null) {
- traceHandler = new TraceHandler(getUniqueIdentifier());
- }
- return traceHandler;
- }
-
- /* (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) 2011, 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.runtime.stepper.activator; + +import org.eclipse.tcf.te.runtime.tracing.TraceHandler; +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; + // The trace handler instance + private static volatile TraceHandler traceHandler; + + /** + * 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.runtime.stepper"; //$NON-NLS-1$ + } + + /** + * Returns the bundles trace handler. + * + * @return The bundles trace handler. + */ + public static TraceHandler getTraceHandler() { + if (traceHandler == null) { + traceHandler = new TraceHandler(getUniqueIdentifier()); + } + return traceHandler; + } + + /* (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.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/context/AbstractStepContext.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/context/AbstractStepContext.java index 701a19222..8e5df1742 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/context/AbstractStepContext.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/context/AbstractStepContext.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/StepGroup.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/StepGroup.java index c792adc74..e7dd524de 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/StepGroup.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/StepGroup.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/StepGroupable.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/StepGroupable.java index 349fc8f75..8ecf9f859 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/StepGroupable.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/StepGroupable.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepExtensionPointManager.java index 83e5aede7..dabc1ef5a 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepExtensionPointManager.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepExtensionPointManager.java @@ -1,83 +1,83 @@ -/*******************************************************************************
- * Copyright (c) 2011, 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.runtime.stepper.extensions.manager;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
-import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IStep;
-
-/**
- * Step extension point manager implementation.
- */
-public final class StepExtensionPointManager extends AbstractExtensionPointManager<IStep> {
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
- */
- @Override
- protected String getExtensionPointId() {
- return "org.eclipse.tcf.te.runtime.stepper.steps"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
- */
- @Override
- protected String getConfigurationElementName() {
- return "step"; //$NON-NLS-1$
- }
-
- /**
- * Returns the list of all contributed steps.
- *
- * @param unique If <code>true</code>, the method returns new instances for each
- * contributed step.
- *
- * @return The list of contributed steps, or an empty array.
- */
- public IStep[] getSteps(boolean unique) {
- List<IStep> contributions = new ArrayList<IStep>();
- Collection<ExecutableExtensionProxy<IStep>> delegates = getExtensions().values();
- for (ExecutableExtensionProxy<IStep> delegate : delegates) {
- IStep instance = unique ? delegate.newInstance() : delegate.getInstance();
- if (instance != null && !contributions.contains(instance)) {
- contributions.add(instance);
- }
- }
-
- return contributions.toArray(new IStep[contributions.size()]);
- }
-
- /**
- * Returns the step identified by its unique id. If no step with the specified id is registered,
- * <code>null</code> is returned.
- *
- * @param id The unique id of the step or <code>null</code>
- * @param unique If <code>true</code>, the method returns new instances of the step contribution.
- *
- * @return The step instance or <code>null</code>.
- */
- public IStep getStep(String id, boolean unique) {
- Assert.isNotNull(id);
- IStep contribution = null;
- if (getExtensions().containsKey(id)) {
- ExecutableExtensionProxy<IStep> proxy = getExtensions().get(id);
- // Get the extension instance
- contribution = unique ? proxy.newInstance() : proxy.getInstance();
- }
-
- return contribution;
- }
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.runtime.stepper.extensions.manager; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager; +import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy; +import org.eclipse.tcf.te.runtime.stepper.interfaces.IStep; + +/** + * Step extension point manager implementation. + */ +public final class StepExtensionPointManager extends AbstractExtensionPointManager<IStep> { + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId() + */ + @Override + protected String getExtensionPointId() { + return "org.eclipse.tcf.te.runtime.stepper.steps"; //$NON-NLS-1$ + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName() + */ + @Override + protected String getConfigurationElementName() { + return "step"; //$NON-NLS-1$ + } + + /** + * Returns the list of all contributed steps. + * + * @param unique If <code>true</code>, the method returns new instances for each + * contributed step. + * + * @return The list of contributed steps, or an empty array. + */ + public IStep[] getSteps(boolean unique) { + List<IStep> contributions = new ArrayList<IStep>(); + Collection<ExecutableExtensionProxy<IStep>> delegates = getExtensions().values(); + for (ExecutableExtensionProxy<IStep> delegate : delegates) { + IStep instance = unique ? delegate.newInstance() : delegate.getInstance(); + if (instance != null && !contributions.contains(instance)) { + contributions.add(instance); + } + } + + return contributions.toArray(new IStep[contributions.size()]); + } + + /** + * Returns the step identified by its unique id. If no step with the specified id is registered, + * <code>null</code> is returned. + * + * @param id The unique id of the step or <code>null</code> + * @param unique If <code>true</code>, the method returns new instances of the step contribution. + * + * @return The step instance or <code>null</code>. + */ + public IStep getStep(String id, boolean unique) { + Assert.isNotNull(id); + IStep contribution = null; + if (getExtensions().containsKey(id)) { + ExecutableExtensionProxy<IStep> proxy = getExtensions().get(id); + // Get the extension instance + contribution = unique ? proxy.newInstance() : proxy.getInstance(); + } + + return contribution; + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepGroupExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepGroupExtensionPointManager.java index 5b0474b34..eeb972b8f 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepGroupExtensionPointManager.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepGroupExtensionPointManager.java @@ -1,116 +1,116 @@ -/*******************************************************************************
- * Copyright (c) 2011, 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.runtime.stepper.extensions.manager;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
-import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepGroup;
-
-/**
- * Step group extension manager implementation.
- */
-public final class StepGroupExtensionPointManager extends AbstractExtensionPointManager<IStepGroup> {
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
- */
- @Override
- protected String getExtensionPointId() {
- return "org.eclipse.tcf.te.runtime.stepper.stepGroups"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
- */
- @Override
- protected String getConfigurationElementName() {
- return "stepGroup"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#doCreateExtensionProxy(org.eclipse.core.runtime.IConfigurationElement)
- */
- @Override
- protected ExecutableExtensionProxy<IStepGroup> doCreateExtensionProxy(IConfigurationElement element) throws CoreException {
- return new StepGroupExtensionProxy(element);
- }
-
- /**
- * Returns the list of all contributed step groups.
- *
- * @param unique If <code>true</code>, the method returns new instances for each
- * contributed step group.
- *
- * @return The list of contributed step groups, or an empty array.
- */
- public IStepGroup[] getStepGroups(boolean unique) {
- List<IStepGroup> contributions = new ArrayList<IStepGroup>();
- Collection<ExecutableExtensionProxy<IStepGroup>> delegates = getExtensions().values();
- for (ExecutableExtensionProxy<IStepGroup> delegate : delegates) {
- IStepGroup instance = unique ? delegate.newInstance() : delegate.getInstance();
- if (instance != null && !contributions.contains(instance)) {
- contributions.add(instance);
- }
- }
-
- return contributions.toArray(new IStepGroup[contributions.size()]);
- }
-
- /**
- * Returns the step group identified by its unique id. If no step group with the specified id is
- * registered, <code>null</code> is returned.
- *
- * @param id The step group unique id. Must not be <code>null</code>
- * @param unique If <code>true</code>, the method returns new instances of the step group contribution.
- *
- * @return The step group instance or <code>null</code>.
- */
- public IStepGroup getStepGroup(String id, boolean unique) {
- Assert.isNotNull(id);
- IStepGroup contribution = null;
- if (getExtensions().containsKey(id)) {
- ExecutableExtensionProxy<IStepGroup> proxy = getExtensions().get(id);
- // Get the extension instance
- contribution = unique ? proxy.newInstance() : proxy.getInstance();
- }
-
- return contribution;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#doStoreExtensionTo(java.util.Map, org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy, org.eclipse.core.runtime.IConfigurationElement)
- */
- @Override
- protected void doStoreExtensionTo(Map<String, ExecutableExtensionProxy<IStepGroup>> extensions, ExecutableExtensionProxy<IStepGroup> candidate, IConfigurationElement element) throws CoreException {
- Assert.isNotNull(extensions);
- Assert.isNotNull(candidate);
- Assert.isNotNull(element);
-
- // If no extension with this id had been registered before, register now.
- if (!extensions.containsKey(candidate.getId())) {
- extensions.put(candidate.getId(), candidate);
- }
- else if (extensions.get(candidate.getId()) instanceof StepGroupExtensionProxy) {
- StepGroupExtensionProxy proxy = (StepGroupExtensionProxy)extensions.get(candidate.getId());
- proxy.addGroupExtension(element);
- }
- else {
- super.doStoreExtensionTo(extensions, candidate, element);
- }
- }
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.runtime.stepper.extensions.manager; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Map; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager; +import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy; +import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepGroup; + +/** + * Step group extension manager implementation. + */ +public final class StepGroupExtensionPointManager extends AbstractExtensionPointManager<IStepGroup> { + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId() + */ + @Override + protected String getExtensionPointId() { + return "org.eclipse.tcf.te.runtime.stepper.stepGroups"; //$NON-NLS-1$ + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName() + */ + @Override + protected String getConfigurationElementName() { + return "stepGroup"; //$NON-NLS-1$ + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#doCreateExtensionProxy(org.eclipse.core.runtime.IConfigurationElement) + */ + @Override + protected ExecutableExtensionProxy<IStepGroup> doCreateExtensionProxy(IConfigurationElement element) throws CoreException { + return new StepGroupExtensionProxy(element); + } + + /** + * Returns the list of all contributed step groups. + * + * @param unique If <code>true</code>, the method returns new instances for each + * contributed step group. + * + * @return The list of contributed step groups, or an empty array. + */ + public IStepGroup[] getStepGroups(boolean unique) { + List<IStepGroup> contributions = new ArrayList<IStepGroup>(); + Collection<ExecutableExtensionProxy<IStepGroup>> delegates = getExtensions().values(); + for (ExecutableExtensionProxy<IStepGroup> delegate : delegates) { + IStepGroup instance = unique ? delegate.newInstance() : delegate.getInstance(); + if (instance != null && !contributions.contains(instance)) { + contributions.add(instance); + } + } + + return contributions.toArray(new IStepGroup[contributions.size()]); + } + + /** + * Returns the step group identified by its unique id. If no step group with the specified id is + * registered, <code>null</code> is returned. + * + * @param id The step group unique id. Must not be <code>null</code> + * @param unique If <code>true</code>, the method returns new instances of the step group contribution. + * + * @return The step group instance or <code>null</code>. + */ + public IStepGroup getStepGroup(String id, boolean unique) { + Assert.isNotNull(id); + IStepGroup contribution = null; + if (getExtensions().containsKey(id)) { + ExecutableExtensionProxy<IStepGroup> proxy = getExtensions().get(id); + // Get the extension instance + contribution = unique ? proxy.newInstance() : proxy.getInstance(); + } + + return contribution; + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#doStoreExtensionTo(java.util.Map, org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy, org.eclipse.core.runtime.IConfigurationElement) + */ + @Override + protected void doStoreExtensionTo(Map<String, ExecutableExtensionProxy<IStepGroup>> extensions, ExecutableExtensionProxy<IStepGroup> candidate, IConfigurationElement element) throws CoreException { + Assert.isNotNull(extensions); + Assert.isNotNull(candidate); + Assert.isNotNull(element); + + // If no extension with this id had been registered before, register now. + if (!extensions.containsKey(candidate.getId())) { + extensions.put(candidate.getId(), candidate); + } + else if (extensions.get(candidate.getId()) instanceof StepGroupExtensionProxy) { + StepGroupExtensionProxy proxy = (StepGroupExtensionProxy)extensions.get(candidate.getId()); + proxy.addGroupExtension(element); + } + else { + super.doStoreExtensionTo(extensions, candidate, element); + } + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepGroupExtensionProxy.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepGroupExtensionProxy.java index 8f1e9a3aa..012f67ccd 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepGroupExtensionProxy.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/manager/StepGroupExtensionProxy.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IFullQualifiedId.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IFullQualifiedId.java index 765f85e81..263f1242d 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IFullQualifiedId.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IFullQualifiedId.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStep.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStep.java index dd744e403..c8fe557e0 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStep.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStep.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepAttributes.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepAttributes.java index cfa2f8059..46fca017a 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepAttributes.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepAttributes.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepContext.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepContext.java index 3eaf0dea3..726b1c0db 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepContext.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepContext.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepExecutor.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepExecutor.java index 186eaf69d..55d3e1b28 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepExecutor.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepExecutor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepGroup.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepGroup.java index 62861b700..d9a55337b 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepGroup.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepGroup.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepGroupIterator.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepGroupIterator.java index 9200f5d46..b8e784bf0 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepGroupIterator.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepGroupIterator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepGroupable.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepGroupable.java index 664656eb8..b438fcd95 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepGroupable.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepGroupable.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepper.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepper.java index 66e2a93eb..d031b307b 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepper.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepper.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepperOperationService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepperOperationService.java index a563b8399..be59a6c92 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepperOperationService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepperOperationService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepperService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepperService.java index 421cbc714..eec359916 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepperService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/IStepperService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/tracing/ITraceIds.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/tracing/ITraceIds.java index 4f526483d..33a6fc1f2 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/tracing/ITraceIds.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/interfaces/tracing/ITraceIds.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/internal/PropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/internal/PropertyTester.java index db779a216..540314f45 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/internal/PropertyTester.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/internal/PropertyTester.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/iterators/AbstractStepGroupIterator.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/iterators/AbstractStepGroupIterator.java index bba60e012..aa2da8bf0 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/iterators/AbstractStepGroupIterator.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/iterators/AbstractStepGroupIterator.java @@ -1,129 +1,129 @@ -/*******************************************************************************
- * 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.stepper.iterators;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.tcf.te.runtime.extensions.ExecutableExtension;
-import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tcf.te.runtime.stepper.StepperAttributeUtil;
-import org.eclipse.tcf.te.runtime.stepper.activator.CoreBundleActivator;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepAttributes;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepGroupIterator;
-
-/**
- * Abstract step group iterator.
- */
-public abstract class AbstractStepGroupIterator extends ExecutableExtension implements IStepGroupIterator {
-
- private int iteration = -1;
- private int iterations = -1;
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IStepGroupIterator#initialize(org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor)
- */
- @Override
- public void initialize(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor) throws CoreException {
- iteration = 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IStepGroupIterator#hasNext(org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor)
- */
- @Override
- public final boolean hasNext(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor) throws CoreException {
- return iteration < iterations;
- }
-
- /**
- * Set the nuumber of iterations.
- * @param iterations The number of iterations.
- */
- protected final void setIterations(int iterations) throws CoreException {
- if (iteration > 0) {
- throw new CoreException(new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(), "cannot change iterations during run")); //$NON-NLS-1$
- }
- this.iterations = iterations;
- }
-
- /**
- * Return the current iteration index.
- * @return The iteration index.
- */
- protected final int getIteration() {
- return iteration;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IStepGroupIterator#next(org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor)
- */
- @Override
- public final void next(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor) throws CoreException {
- if (iterations < 0 || iteration < 0) {
- throw new CoreException(new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(), "iterator not initialized")); //$NON-NLS-1$
- }
- if (iteration >= iterations) {
- throw new CoreException(new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(), "no more iterations")); //$NON-NLS-1$
- }
-
- internalNext(context, data, fullQualifiedId, monitor);
-
- iteration++;
- }
-
- /**
- * Set the next iteration to the data using the full qualified id.
- *
- * @param context The context. Must not be <code>null</code>.
- * @param data The data. Must not be <code>null</code>.
- * @param fullQualifiedId The full qualified id for this step. Must not be <code>null</code>.
- * @param monitor The progress monitor. Must not be <code>null</code>.
- * @throws CoreException
- */
- public abstract void internalNext(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor) throws CoreException;
-
- /**
- * Set the active context.
- *
- * @param activeContext The new active context.
- * @param data The data giving object. Must not be <code>null</code>.
- * @param fullQualifiedId The full qualfied id for this step. Must not be <code>null</code>.
- */
- protected void setActiveContext(Object activeContext, IPropertiesContainer data, IFullQualifiedId fullQualifiedId) {
- Assert.isNotNull(data);
- Assert.isNotNull(fullQualifiedId);
- StepperAttributeUtil.setProperty(IStepAttributes.ATTR_ACTIVE_CONTEXT, fullQualifiedId, data, activeContext);
- }
-
- /**
- * Returns the active context that is currently used.
- *
- * @param context The step context. Must not be <code>null</code>.
- * @param data The data giving object. Must not be <code>null</code>.
- * @param fullQualifiedId The full qualfied id for this step. Must not be <code>null</code>.
- *
- * @return The active context or <code>null</code>.
- */
- protected Object getActiveContext(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId) {
- Assert.isNotNull(data);
- Assert.isNotNull(fullQualifiedId);
- Object activeContext = StepperAttributeUtil.getProperty(IStepAttributes.ATTR_ACTIVE_CONTEXT, fullQualifiedId, data);
- if (activeContext == null)
- activeContext = context.getContextObject();
-
- return activeContext;
- }
-}
+/******************************************************************************* + * Copyright (c) 2013, 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.runtime.stepper.iterators; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.tcf.te.runtime.extensions.ExecutableExtension; +import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer; +import org.eclipse.tcf.te.runtime.stepper.StepperAttributeUtil; +import org.eclipse.tcf.te.runtime.stepper.activator.CoreBundleActivator; +import org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId; +import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepAttributes; +import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext; +import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepGroupIterator; + +/** + * Abstract step group iterator. + */ +public abstract class AbstractStepGroupIterator extends ExecutableExtension implements IStepGroupIterator { + + private int iteration = -1; + private int iterations = -1; + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IStepGroupIterator#initialize(org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor) + */ + @Override + public void initialize(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor) throws CoreException { + iteration = 0; + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IStepGroupIterator#hasNext(org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor) + */ + @Override + public final boolean hasNext(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor) throws CoreException { + return iteration < iterations; + } + + /** + * Set the nuumber of iterations. + * @param iterations The number of iterations. + */ + protected final void setIterations(int iterations) throws CoreException { + if (iteration > 0) { + throw new CoreException(new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(), "cannot change iterations during run")); //$NON-NLS-1$ + } + this.iterations = iterations; + } + + /** + * Return the current iteration index. + * @return The iteration index. + */ + protected final int getIteration() { + return iteration; + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IStepGroupIterator#next(org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor) + */ + @Override + public final void next(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor) throws CoreException { + if (iterations < 0 || iteration < 0) { + throw new CoreException(new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(), "iterator not initialized")); //$NON-NLS-1$ + } + if (iteration >= iterations) { + throw new CoreException(new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(), "no more iterations")); //$NON-NLS-1$ + } + + internalNext(context, data, fullQualifiedId, monitor); + + iteration++; + } + + /** + * Set the next iteration to the data using the full qualified id. + * + * @param context The context. Must not be <code>null</code>. + * @param data The data. Must not be <code>null</code>. + * @param fullQualifiedId The full qualified id for this step. Must not be <code>null</code>. + * @param monitor The progress monitor. Must not be <code>null</code>. + * @throws CoreException + */ + public abstract void internalNext(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor) throws CoreException; + + /** + * Set the active context. + * + * @param activeContext The new active context. + * @param data The data giving object. Must not be <code>null</code>. + * @param fullQualifiedId The full qualfied id for this step. Must not be <code>null</code>. + */ + protected void setActiveContext(Object activeContext, IPropertiesContainer data, IFullQualifiedId fullQualifiedId) { + Assert.isNotNull(data); + Assert.isNotNull(fullQualifiedId); + StepperAttributeUtil.setProperty(IStepAttributes.ATTR_ACTIVE_CONTEXT, fullQualifiedId, data, activeContext); + } + + /** + * Returns the active context that is currently used. + * + * @param context The step context. Must not be <code>null</code>. + * @param data The data giving object. Must not be <code>null</code>. + * @param fullQualifiedId The full qualfied id for this step. Must not be <code>null</code>. + * + * @return The active context or <code>null</code>. + */ + protected Object getActiveContext(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId) { + Assert.isNotNull(data); + Assert.isNotNull(fullQualifiedId); + Object activeContext = StepperAttributeUtil.getProperty(IStepAttributes.ATTR_ACTIVE_CONTEXT, fullQualifiedId, data); + if (activeContext == null) + activeContext = context.getContextObject(); + + return activeContext; + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/job/AbstractStepperJobSchedulingRule.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/job/AbstractStepperJobSchedulingRule.java index 8e21b3d16..44dc15c8b 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/job/AbstractStepperJobSchedulingRule.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/job/AbstractStepperJobSchedulingRule.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/nls/Messages.java index f742234c5..77c22a876 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/nls/Messages.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/nls/Messages.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/services/AbstractStepperOperationService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/services/AbstractStepperOperationService.java index b6f53dee9..0b900cdb8 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/services/AbstractStepperOperationService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/services/AbstractStepperOperationService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/steps/AbstractStep.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/steps/AbstractStep.java index 919aac4ea..1de88770c 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/steps/AbstractStep.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/steps/AbstractStep.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/steps/CancelJobsStep.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/steps/CancelJobsStep.java index e7e54b60e..a199b4634 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/steps/CancelJobsStep.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/steps/CancelJobsStep.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime/build.properties index e8d9fa711..61fc214f5 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/build.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/build.properties @@ -1,17 +1,17 @@ -###############################################################################
-# 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,\
- plugin.xml,\
- about.html
-src.includes = schema/
+############################################################################### +# Copyright (c) 2012, 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,\ + plugin.xml,\ + about.html +src.includes = schema/ diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime/plugin.properties index 130c8d9d5..8947eb7c8 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/plugin.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/plugin.properties @@ -1,5 +1,5 @@ ################################################################################## -# Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/activator/CoreBundleActivator.java index 088fa5db1..30f1b0b7d 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/activator/CoreBundleActivator.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/activator/CoreBundleActivator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/callback/AsyncCallbackCollector.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/callback/AsyncCallbackCollector.java index 805950b58..0b58fd20a 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/callback/AsyncCallbackCollector.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/callback/AsyncCallbackCollector.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/callback/AsyncCallbackHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/callback/AsyncCallbackHandler.java index 82e00325f..6f63314c0 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/callback/AsyncCallbackHandler.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/callback/AsyncCallbackHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/callback/Callback.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/callback/Callback.java index f861cbf11..222869138 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/callback/Callback.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/callback/Callback.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/ChangeEvent.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/ChangeEvent.java index 246049c87..9a0db8942 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/ChangeEvent.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/ChangeEvent.java @@ -1,126 +1,126 @@ -/*******************************************************************************
- * Copyright (c) 2011, 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.runtime.events;
-
-import java.util.EventObject;
-
-import org.eclipse.tcf.te.runtime.activator.CoreBundleActivator;
-import org.eclipse.tcf.te.runtime.interfaces.tracing.ITraceIds;
-
-/**
- * Common change event implementation.
- */
-public class ChangeEvent extends EventObject {
- private static final long serialVersionUID = -7859159130977760588L;
-
- public static final String ID_ADDED = "added"; //$NON-NLS-1$
- public static final String ID_REMOVED = "removed"; //$NON-NLS-1$
- public static final String ID_CHANGED = "changed"; //$NON-NLS-1$
-
- private Object eventId;
- private Object oldValue;
- private Object newValue;
-
- /**
- * Constructor.
- *
- * @param source The source object. Must not be <code>null</code>.
- * @param eventId The event id. Must not be <code>null</code>.
- * @param oldValue The old value.
- * @param newValue The new value.
- *
- * @exception IllegalArgumentException if eventId == null.
- */
- public ChangeEvent(Object source, Object eventId, Object oldValue, Object newValue) {
- super(source);
-
- if (eventId == null) {
- throw new IllegalArgumentException("null eventId"); //$NON-NLS-1$
- }
-
- this.eventId = eventId;
- this.oldValue = oldValue;
- this.newValue = newValue;
- }
-
- /**
- * Returns the event id.
- *
- * @return The event id.
- */
- public final Object getEventId() {
- return eventId;
- }
-
- /**
- * Returns the old value.
- *
- * @return The old value or <code>null</code>.
- */
- public final Object getOldValue() {
- return oldValue;
- }
-
- /**
- * Returns the new value.
- *
- * @return The new value or <code>null</code>.
- */
- public final Object getNewValue() {
- return newValue;
- }
-
- /*
- * Formats a value due to its type.
- */
- private Object formatValue(Object value) {
- Object formattedValue = value;
- if (value != null && value.getClass().isArray()) {
- StringBuilder str = new StringBuilder();
- str.append("{"); //$NON-NLS-1$
- for (int i = 0; i < ((Object[]) value).length; i++) {
- if (i > 0) {
- str.append(","); //$NON-NLS-1$
- }
- str.append(formatValue(((Object[]) value)[i]));
- }
- str.append("}"); //$NON-NLS-1$
- formattedValue = str.toString();
- }
- return formattedValue;
- }
-
- /*
- * (non-Javadoc)
- * @see java.util.EventObject#toString()
- */
- @Override
- public String toString() {
- StringBuilder toString = new StringBuilder(getClass().getName());
-
- String prefix = ""; //$NON-NLS-1$
- // if tracing the event, formating them a little bit better readable.
- if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITraceIds.TRACE_EVENTS)) {
- prefix = "\n\t\t"; //$NON-NLS-1$
- }
-
- toString.append(prefix + "{eventId="); //$NON-NLS-1$
- toString.append(eventId);
- toString.append("," + prefix + "source="); //$NON-NLS-1$ //$NON-NLS-2$
- toString.append(source);
- toString.append("," + prefix + "oldValue="); //$NON-NLS-1$ //$NON-NLS-2$
- toString.append(formatValue(oldValue));
- toString.append("," + prefix + "newValue="); //$NON-NLS-1$ //$NON-NLS-2$
- toString.append(formatValue(newValue));
- toString.append("}"); //$NON-NLS-1$
-
- return toString.toString();
- }
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.runtime.events; + +import java.util.EventObject; + +import org.eclipse.tcf.te.runtime.activator.CoreBundleActivator; +import org.eclipse.tcf.te.runtime.interfaces.tracing.ITraceIds; + +/** + * Common change event implementation. + */ +public class ChangeEvent extends EventObject { + private static final long serialVersionUID = -7859159130977760588L; + + public static final String ID_ADDED = "added"; //$NON-NLS-1$ + public static final String ID_REMOVED = "removed"; //$NON-NLS-1$ + public static final String ID_CHANGED = "changed"; //$NON-NLS-1$ + + private Object eventId; + private Object oldValue; + private Object newValue; + + /** + * Constructor. + * + * @param source The source object. Must not be <code>null</code>. + * @param eventId The event id. Must not be <code>null</code>. + * @param oldValue The old value. + * @param newValue The new value. + * + * @exception IllegalArgumentException if eventId == null. + */ + public ChangeEvent(Object source, Object eventId, Object oldValue, Object newValue) { + super(source); + + if (eventId == null) { + throw new IllegalArgumentException("null eventId"); //$NON-NLS-1$ + } + + this.eventId = eventId; + this.oldValue = oldValue; + this.newValue = newValue; + } + + /** + * Returns the event id. + * + * @return The event id. + */ + public final Object getEventId() { + return eventId; + } + + /** + * Returns the old value. + * + * @return The old value or <code>null</code>. + */ + public final Object getOldValue() { + return oldValue; + } + + /** + * Returns the new value. + * + * @return The new value or <code>null</code>. + */ + public final Object getNewValue() { + return newValue; + } + + /* + * Formats a value due to its type. + */ + private Object formatValue(Object value) { + Object formattedValue = value; + if (value != null && value.getClass().isArray()) { + StringBuilder str = new StringBuilder(); + str.append("{"); //$NON-NLS-1$ + for (int i = 0; i < ((Object[]) value).length; i++) { + if (i > 0) { + str.append(","); //$NON-NLS-1$ + } + str.append(formatValue(((Object[]) value)[i])); + } + str.append("}"); //$NON-NLS-1$ + formattedValue = str.toString(); + } + return formattedValue; + } + + /* + * (non-Javadoc) + * @see java.util.EventObject#toString() + */ + @Override + public String toString() { + StringBuilder toString = new StringBuilder(getClass().getName()); + + String prefix = ""; //$NON-NLS-1$ + // if tracing the event, formating them a little bit better readable. + if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITraceIds.TRACE_EVENTS)) { + prefix = "\n\t\t"; //$NON-NLS-1$ + } + + toString.append(prefix + "{eventId="); //$NON-NLS-1$ + toString.append(eventId); + toString.append("," + prefix + "source="); //$NON-NLS-1$ //$NON-NLS-2$ + toString.append(source); + toString.append("," + prefix + "oldValue="); //$NON-NLS-1$ //$NON-NLS-2$ + toString.append(formatValue(oldValue)); + toString.append("," + prefix + "newValue="); //$NON-NLS-1$ //$NON-NLS-2$ + toString.append(formatValue(newValue)); + toString.append("}"); //$NON-NLS-1$ + + return toString.toString(); + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/DisposedEvent.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/DisposedEvent.java index 7b0df0619..d8f1ad85a 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/DisposedEvent.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/DisposedEvent.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/EventManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/EventManager.java index 1929a10c4..91f8c27aa 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/EventManager.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/EventManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/NotifyEvent.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/NotifyEvent.java index 30d860a9d..4d160b88f 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/NotifyEvent.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/NotifyEvent.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/TriggerCommandEvent.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/TriggerCommandEvent.java index 039560f5d..af1cbed31 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/TriggerCommandEvent.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/events/TriggerCommandEvent.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/AbstractExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/AbstractExtensionPointManager.java index 4d56d4473..1e07c83ce 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/AbstractExtensionPointManager.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/AbstractExtensionPointManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/ExecutableExtension.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/ExecutableExtension.java index b14795ce1..8fe5a17cb 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/ExecutableExtension.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/ExecutableExtension.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/ExecutableExtensionProxy.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/ExecutableExtensionProxy.java index ea5f556e6..5530d6b34 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/ExecutableExtensionProxy.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/ExecutableExtensionProxy.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/ExtensionPointComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/ExtensionPointComparator.java index 95d3f11f9..2607af56b 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/ExtensionPointComparator.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/extensions/ExtensionPointComparator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/IConditionTester.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/IConditionTester.java index 7edfc79dd..b26613b6e 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/IConditionTester.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/IConditionTester.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/IDisposable.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/IDisposable.java index dcb2a3b66..05ba98cfc 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/IDisposable.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/IDisposable.java @@ -1,21 +1,21 @@ -/*******************************************************************************
- * Copyright (c) 2011 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.interfaces;
-
-/**
- * A disposable artifact.
- */
-public interface IDisposable {
-
- /**
- * Dispose the artifact.
- */
- public void dispose();
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.runtime.interfaces; + +/** + * A disposable artifact. + */ +public interface IDisposable { + + /** + * Dispose the artifact. + */ + public void dispose(); +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/ISharedConstants.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/ISharedConstants.java index dba2d0842..409397666 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/ISharedConstants.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/ISharedConstants.java @@ -1,24 +1,24 @@ -/*******************************************************************************
- * Copyright (c) 2011 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.interfaces;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-
-/**
- * Shared constants.
- */
-public interface ISharedConstants {
-
- /**
- * Local time format presenting full time format including milliseconds.
- */
- public final static DateFormat TIME_FORMAT = new SimpleDateFormat("HH:mm:ss.SSS"); //$NON-NLS-1$
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.runtime.interfaces; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; + +/** + * Shared constants. + */ +public interface ISharedConstants { + + /** + * Local time format presenting full time format including milliseconds. + */ + public final static DateFormat TIME_FORMAT = new SimpleDateFormat("HH:mm:ss.SSS"); //$NON-NLS-1$ +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/callback/ICallback.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/callback/ICallback.java index 5514c31ef..ede4067e0 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/callback/ICallback.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/callback/ICallback.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/events/IEventFireDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/events/IEventFireDelegate.java index 6937b90df..0ca8cc443 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/events/IEventFireDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/events/IEventFireDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/events/IEventListener.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/events/IEventListener.java index 23ed2b413..4d359a1bb 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/events/IEventListener.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/events/IEventListener.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/extensions/IExecutableExtension.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/extensions/IExecutableExtension.java index 4b8de1540..e726584bc 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/extensions/IExecutableExtension.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/extensions/IExecutableExtension.java @@ -1,39 +1,39 @@ -/*******************************************************************************
- * Copyright (c) 2011 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.interfaces.extensions;
-
-
-/**
- * Executable extension public interface declaration.
- */
-public interface IExecutableExtension extends org.eclipse.core.runtime.IExecutableExtension {
-
- /**
- * Returns the unique id of the extension. The returned
- * id must be never <code>null</code> or an empty string.
- *
- * @return The unique id.
- */
- public String getId();
-
- /**
- * Returns the label or UI name of the extension.
- *
- * @return The label or UI name. An empty string if not set.
- */
- public String getLabel();
-
- /**
- * Returns the description of the extension.
- *
- * @return The description or an empty string.
- */
- public String getDescription();
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.runtime.interfaces.extensions; + + +/** + * Executable extension public interface declaration. + */ +public interface IExecutableExtension extends org.eclipse.core.runtime.IExecutableExtension { + + /** + * Returns the unique id of the extension. The returned + * id must be never <code>null</code> or an empty string. + * + * @return The unique id. + */ + public String getId(); + + /** + * Returns the label or UI name of the extension. + * + * @return The label or UI name. An empty string if not set. + */ + public String getLabel(); + + /** + * Returns the description of the extension. + * + * @return The description or an empty string. + */ + public String getDescription(); +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/tracing/ITraceIds.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/tracing/ITraceIds.java index f9fe03e7c..2f264b331 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/tracing/ITraceIds.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/interfaces/tracing/ITraceIds.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/internal/DebugEventListener.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/internal/DebugEventListener.java index ab56d02ee..226edac39 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/internal/DebugEventListener.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/internal/DebugEventListener.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/internal/PreferencesPropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/internal/PreferencesPropertyTester.java index 7b9f164a1..5a39c2ed6 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/internal/PreferencesPropertyTester.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/internal/PreferencesPropertyTester.java @@ -1,76 +1,76 @@ -/*******************************************************************************
- * Copyright (c) 2011 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.internal;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.tcf.te.runtime.activator.CoreBundleActivator;
-import org.eclipse.tcf.te.runtime.preferences.ScopedEclipsePreferences;
-
-/**
- * Preferences property tester implementation.
- */
-public class PreferencesPropertyTester extends PropertyTester {
-
- /* (non-Javadoc)
- * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
- */
- @Override
- public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
- // The preferences property tester is not extending a specific object type.
- // The tester ignores the given receiver object.
-
- if ("preference".equals(property)) { //$NON-NLS-1$
- String bundleId = CoreBundleActivator.getUniqueIdentifier();
- String key = null;
-
- // Search the args for bundle id, the preference type and the preference key
- for (Object candidate : args) {
- // We cannot handle arguments other than strings
- if (!(candidate instanceof String)) continue;
-
- String arg = (String)candidate;
-
- // bundleId=<id>
- if (arg.toLowerCase().startsWith("bundleid")) { //$NON-NLS-1$
- String[] tokens = arg.split("=", 2); //$NON-NLS-1$
- // Check if the given bundle id really resolves to an installed bundle
- if (tokens.length == 2 && tokens[1] != null && Platform.getBundle(tokens[1].trim()) != null) {
- bundleId = tokens[1].trim();
- }
- }
-
- // key=<preference key>
- if (arg.toLowerCase().startsWith("key")) { //$NON-NLS-1$
- String[] tokens = arg.split("=", 2); //$NON-NLS-1$
- // Check for the key not being empty or null
- if (tokens.length == 2 && tokens[1] != null && !"".equals(tokens[1].trim())) { //$NON-NLS-1$
- key = tokens[1].trim();
- }
- }
- }
-
- // Lookup the preference
- if (key != null) {
- // Check the preference within the instance and default scope
- ScopedEclipsePreferences preferences = new ScopedEclipsePreferences(bundleId);
- // If the expected value is not specified or "null", check if the preference
- // key is set or not. Return "true" if the key is not set.
- if (expectedValue == null || "null".equals(expectedValue)) return !preferences.containsKey(key); //$NON-NLS-1$
-
- // Always check against the string value
- return expectedValue.toString().equals(preferences.getString(key));
- }
- }
-
- return false;
- }
-
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.runtime.internal; + +import org.eclipse.core.expressions.PropertyTester; +import org.eclipse.core.runtime.Platform; +import org.eclipse.tcf.te.runtime.activator.CoreBundleActivator; +import org.eclipse.tcf.te.runtime.preferences.ScopedEclipsePreferences; + +/** + * Preferences property tester implementation. + */ +public class PreferencesPropertyTester extends PropertyTester { + + /* (non-Javadoc) + * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object) + */ + @Override + public boolean test(Object receiver, String property, Object[] args, Object expectedValue) { + // The preferences property tester is not extending a specific object type. + // The tester ignores the given receiver object. + + if ("preference".equals(property)) { //$NON-NLS-1$ + String bundleId = CoreBundleActivator.getUniqueIdentifier(); + String key = null; + + // Search the args for bundle id, the preference type and the preference key + for (Object candidate : args) { + // We cannot handle arguments other than strings + if (!(candidate instanceof String)) continue; + + String arg = (String)candidate; + + // bundleId=<id> + if (arg.toLowerCase().startsWith("bundleid")) { //$NON-NLS-1$ + String[] tokens = arg.split("=", 2); //$NON-NLS-1$ + // Check if the given bundle id really resolves to an installed bundle + if (tokens.length == 2 && tokens[1] != null && Platform.getBundle(tokens[1].trim()) != null) { + bundleId = tokens[1].trim(); + } + } + + // key=<preference key> + if (arg.toLowerCase().startsWith("key")) { //$NON-NLS-1$ + String[] tokens = arg.split("=", 2); //$NON-NLS-1$ + // Check for the key not being empty or null + if (tokens.length == 2 && tokens[1] != null && !"".equals(tokens[1].trim())) { //$NON-NLS-1$ + key = tokens[1].trim(); + } + } + } + + // Lookup the preference + if (key != null) { + // Check the preference within the instance and default scope + ScopedEclipsePreferences preferences = new ScopedEclipsePreferences(bundleId); + // If the expected value is not specified or "null", check if the preference + // key is set or not. Return "true" if the key is not set. + if (expectedValue == null || "null".equals(expectedValue)) return !preferences.containsKey(key); //$NON-NLS-1$ + + // Always check against the string value + return expectedValue.toString().equals(preferences.getString(key)); + } + } + + return false; + } + +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/nls/Messages.java index d4c94977d..1e0c8bf93 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/nls/Messages.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/nls/Messages.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/nls/Messages.properties index 159f30372..2cd1b79ae 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/nls/Messages.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/nls/Messages.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/preferences/ScopedEclipsePreferences.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/preferences/ScopedEclipsePreferences.java index cfb68e4fa..a5b6f4331 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/preferences/ScopedEclipsePreferences.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/preferences/ScopedEclipsePreferences.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/processes/ProcessKiller.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/processes/ProcessKiller.java index d03afa43e..22b10ef82 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/processes/ProcessKiller.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/processes/ProcessKiller.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/processes/ProcessLauncher.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/processes/ProcessLauncher.java index 273577403..eddae2085 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/processes/ProcessLauncher.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/processes/ProcessLauncher.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/processes/ProcessOutputReaderThread.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/processes/ProcessOutputReaderThread.java index 09ff5f98d..03e4fd3af 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/processes/ProcessOutputReaderThread.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/processes/ProcessOutputReaderThread.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/processes/ProcessWaiter.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/processes/ProcessWaiter.java index 53e4a6f2b..b75a84677 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/processes/ProcessWaiter.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/processes/ProcessWaiter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/tracing/TraceHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/tracing/TraceHandler.java index b84ecc073..437859b7a 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/tracing/TraceHandler.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/tracing/TraceHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/Host.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/Host.java index f2e942608..994306aa2 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/Host.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/Host.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/ProgressHelper.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/ProgressHelper.java index 7e7e6cc0c..4bec345af 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/ProgressHelper.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/ProgressHelper.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/StatusHelper.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/StatusHelper.java index cfe1bf8fd..a265bc001 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/StatusHelper.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/StatusHelper.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/build.properties index 6f25dad15..61fc214f5 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/build.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/plugin.properties index 4699fbc5f..3de543acd 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/plugin.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/plugin.properties @@ -1,5 +1,5 @@ ################################################################################## -# Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/Tcf.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/Tcf.java index 92a540f02..571a4eff9 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/Tcf.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/Tcf.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/activator/CoreBundleActivator.java index 06c1ea5ac..b1cd9823a 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/activator/CoreBundleActivator.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/activator/CoreBundleActivator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/async/CallbackInvocationDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/async/CallbackInvocationDelegate.java index b2337acef..1ef8a0258 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/async/CallbackInvocationDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/async/CallbackInvocationDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/concurrent/CallbackMonitor.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/concurrent/CallbackMonitor.java index 5e938729f..d59b11d75 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/concurrent/CallbackMonitor.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/concurrent/CallbackMonitor.java @@ -1,220 +1,220 @@ -/*******************************************************************************
- * Copyright (c) 2011, 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.concurrent;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Timer;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tcf.te.tcf.core.activator.CoreBundleActivator;
-import org.eclipse.tcf.te.tcf.core.nls.Messages;
-
-/**
- * A helper class used to synchronize multiple threads. It is used
- * to join multiple threads which collaborate to create the pre-condition
- * of the callback code.
- * <p>
- * A callback monitor maintains a map containing a set of locks.
- * The collaborating threads should unlock one of its own lock in
- * it and wake up the callback if all the locks in the map is opened.
- * <p>
- * The following is an example:
- * <pre>
- * class Thread1 extends Thread {
- * CallbackMonitor monitor;
- * public Thread1(CallbackMonitor monitor){
- * this.monitor = monitor;
- * }
- * public void run() {
- * // Do the work
- * ...
- * // Unlock this thread.
- * monitor.unlock(this)
- * }
- * }
- * class Thread2 extends Thread {
- * CallbackMonitor monitor;
- * public Thread2(CallbackMonitor monitor){
- * this.monitor = monitor;
- * }
- * public void run() {
- * // Do the work
- * ...
- * // Unlock this thread.
- * monitor.unlock(this)
- * }
- * }
- * ...
- * public void collaborate() {
- * Runnable callback = new Runnable() {
- * public void run() {
- * // Do something which must be done after all the threads end.
- * ...
- * }
- * };
- * CallbackMonitor monitor = new CallbackMonitor(callback);
- * Thread1 thread1 = new Thread1(monitor);
- * Thread2 thread2 = new Thread2(monitor);
- * ...
- * monitor.lock(thread1, thread2, ...);
- * thread1.start();
- * thread2.start();
- * ...
- * }
- * </pre>
- * <p>
- * The above creates multiple threads which lock on the monitor and
- * invoke unlock when they end. The keys they used can be anything which
- * are unique among the threads. Once all threads end, the callback defined
- * in the method will be invoked and do the thing which requires to be done
- * after the end of these threads.
- * <p>
- * <b>Note:</b><em>The threads which require collaboration on the callback
- * monitor should be started only after all the locks corresponding to them
- * are added. </em>
- * <p>
- * For example, the above threads are started after the monitor locks all the threads:
- * <pre>
- * monitor.lock(thread1, thread2, ...);
- * thread1.start();
- * thread2.start();
- * ...
- * </pre>
- */
-public class CallbackMonitor {
- // The default timeout value is one minute.
- private static final long DEFAULT_TIMEOUT = 60 * 1000L;
- // The callback which is invoked after all the locks are unlocked.
- private ICallback callback;
- // The lock map containing the keys and the corresponding running results.
- private Map<Object, IStatus> locks;
-
- /**
- * Create a callback monitor with the specified callback with a default timeout.
- *
- * @param callback The callback to be invoked after all the locks being unlocked.
- */
- public CallbackMonitor(ICallback callback) {
- this(callback, DEFAULT_TIMEOUT);
- }
-
- /**
- * Create a callback monitor with the specified callback with a timeout. If
- * the timeout is zero, then it will block forever until all locks are released.
- *
- * @param callback The callback to be invoked after all the locks being unlocked.
- * @param timeout The timeout value.
- */
- public CallbackMonitor(ICallback callback, long timeout) {
- Assert.isNotNull(callback);
- this.callback = callback;
- this.locks = Collections.synchronizedMap(new HashMap<Object, IStatus>());
- if (timeout > 0) {
- new Timer().schedule(new MonitorTask(callback, timeout), timeout, timeout);
- }
- }
-
- /**
- * Create a callback monitor with the specified callback and the keys with a default
- * timeout.
- *
- * @param callback The callback to be invoked after all the locks being unlocked.
- * @param keys The keys to lock and unlock the locks.
- * @param timeout The timeout value.
- */
- public CallbackMonitor(ICallback callback, Object...keys) {
- this(callback, DEFAULT_TIMEOUT, keys);
- }
-
- /**
- * Create a callback monitor with the specified callback and the keys and a timeout. If
- * the timeout is zero, then it will block forever until all locks are released.
- *
- * @param callback The callback to be invoked after all the locks being unlocked.
- * @param keys The keys to lock and unlock the locks.
- * @param timeout The timeout value.
- */
- public CallbackMonitor(ICallback callback, long timeout, Object... keys) {
- Assert.isNotNull(callback);
- this.callback = callback;
- this.locks = Collections.synchronizedMap(new HashMap<Object, IStatus>());
- lock(keys);
- if (timeout > 0) {
- new Timer().schedule(new MonitorTask(callback, timeout), timeout, timeout);
- }
- }
-
- /**
- * Add multiple locks with the specified keys.
- *
- * @param keys The keys whose locks are added.
- */
- public void lock(Object... keys) {
- for(Object key : keys) {
- Assert.isNotNull(key);
- this.locks.put(key, null);
- }
- }
-
- /**
- * Add a lock with the specified key.
- *
- * @param key The key whose lock is added.
- */
- public void lock(Object key) {
- Assert.isNotNull(key);
- this.locks.put(key, null);
- }
-
- /**
- * Unlock the lock with the specified key and status
- * check if all the locks have been unlocked. If all the
- * locks have been unlocked, then invoke the callback.
- *
- * @param key The key to unlock its lock.
- */
- public void unlock(Object key, IStatus status) {
- Assert.isNotNull(key);
- Assert.isNotNull(status);
- locks.put(key, status);
- IStatus current = getCurrentStatus();
- synchronized (callback) {
- if (current != null && !callback.isDone()) {
- callback.done(this, current);
- }
- }
- }
-
- /**
- * Check if all the locks are unlocked and return a running status.
- *
- * @return a MultiStatus object describing running result or null if not completed yet.
- */
- private synchronized IStatus getCurrentStatus() {
- List<IStatus> list = new ArrayList<IStatus>();
- synchronized (locks) {
- for (Entry<Object, IStatus> entry : locks.entrySet()) {
- IStatus status = entry.getValue();
- if (status == null) return null;
- list.add(status);
- }
- }
- IStatus[] children = list.toArray(new IStatus[list.size()]);
- return new MultiStatus(CoreBundleActivator.getUniqueIdentifier(), 0, children, Messages.CallbackMonitor_AllTasksFinished, null);
- }
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.concurrent; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Timer; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.MultiStatus; +import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback; +import org.eclipse.tcf.te.tcf.core.activator.CoreBundleActivator; +import org.eclipse.tcf.te.tcf.core.nls.Messages; + +/** + * A helper class used to synchronize multiple threads. It is used + * to join multiple threads which collaborate to create the pre-condition + * of the callback code. + * <p> + * A callback monitor maintains a map containing a set of locks. + * The collaborating threads should unlock one of its own lock in + * it and wake up the callback if all the locks in the map is opened. + * <p> + * The following is an example: + * <pre> + * class Thread1 extends Thread { + * CallbackMonitor monitor; + * public Thread1(CallbackMonitor monitor){ + * this.monitor = monitor; + * } + * public void run() { + * // Do the work + * ... + * // Unlock this thread. + * monitor.unlock(this) + * } + * } + * class Thread2 extends Thread { + * CallbackMonitor monitor; + * public Thread2(CallbackMonitor monitor){ + * this.monitor = monitor; + * } + * public void run() { + * // Do the work + * ... + * // Unlock this thread. + * monitor.unlock(this) + * } + * } + * ... + * public void collaborate() { + * Runnable callback = new Runnable() { + * public void run() { + * // Do something which must be done after all the threads end. + * ... + * } + * }; + * CallbackMonitor monitor = new CallbackMonitor(callback); + * Thread1 thread1 = new Thread1(monitor); + * Thread2 thread2 = new Thread2(monitor); + * ... + * monitor.lock(thread1, thread2, ...); + * thread1.start(); + * thread2.start(); + * ... + * } + * </pre> + * <p> + * The above creates multiple threads which lock on the monitor and + * invoke unlock when they end. The keys they used can be anything which + * are unique among the threads. Once all threads end, the callback defined + * in the method will be invoked and do the thing which requires to be done + * after the end of these threads. + * <p> + * <b>Note:</b><em>The threads which require collaboration on the callback + * monitor should be started only after all the locks corresponding to them + * are added. </em> + * <p> + * For example, the above threads are started after the monitor locks all the threads: + * <pre> + * monitor.lock(thread1, thread2, ...); + * thread1.start(); + * thread2.start(); + * ... + * </pre> + */ +public class CallbackMonitor { + // The default timeout value is one minute. + private static final long DEFAULT_TIMEOUT = 60 * 1000L; + // The callback which is invoked after all the locks are unlocked. + private ICallback callback; + // The lock map containing the keys and the corresponding running results. + private Map<Object, IStatus> locks; + + /** + * Create a callback monitor with the specified callback with a default timeout. + * + * @param callback The callback to be invoked after all the locks being unlocked. + */ + public CallbackMonitor(ICallback callback) { + this(callback, DEFAULT_TIMEOUT); + } + + /** + * Create a callback monitor with the specified callback with a timeout. If + * the timeout is zero, then it will block forever until all locks are released. + * + * @param callback The callback to be invoked after all the locks being unlocked. + * @param timeout The timeout value. + */ + public CallbackMonitor(ICallback callback, long timeout) { + Assert.isNotNull(callback); + this.callback = callback; + this.locks = Collections.synchronizedMap(new HashMap<Object, IStatus>()); + if (timeout > 0) { + new Timer().schedule(new MonitorTask(callback, timeout), timeout, timeout); + } + } + + /** + * Create a callback monitor with the specified callback and the keys with a default + * timeout. + * + * @param callback The callback to be invoked after all the locks being unlocked. + * @param keys The keys to lock and unlock the locks. + * @param timeout The timeout value. + */ + public CallbackMonitor(ICallback callback, Object...keys) { + this(callback, DEFAULT_TIMEOUT, keys); + } + + /** + * Create a callback monitor with the specified callback and the keys and a timeout. If + * the timeout is zero, then it will block forever until all locks are released. + * + * @param callback The callback to be invoked after all the locks being unlocked. + * @param keys The keys to lock and unlock the locks. + * @param timeout The timeout value. + */ + public CallbackMonitor(ICallback callback, long timeout, Object... keys) { + Assert.isNotNull(callback); + this.callback = callback; + this.locks = Collections.synchronizedMap(new HashMap<Object, IStatus>()); + lock(keys); + if (timeout > 0) { + new Timer().schedule(new MonitorTask(callback, timeout), timeout, timeout); + } + } + + /** + * Add multiple locks with the specified keys. + * + * @param keys The keys whose locks are added. + */ + public void lock(Object... keys) { + for(Object key : keys) { + Assert.isNotNull(key); + this.locks.put(key, null); + } + } + + /** + * Add a lock with the specified key. + * + * @param key The key whose lock is added. + */ + public void lock(Object key) { + Assert.isNotNull(key); + this.locks.put(key, null); + } + + /** + * Unlock the lock with the specified key and status + * check if all the locks have been unlocked. If all the + * locks have been unlocked, then invoke the callback. + * + * @param key The key to unlock its lock. + */ + public void unlock(Object key, IStatus status) { + Assert.isNotNull(key); + Assert.isNotNull(status); + locks.put(key, status); + IStatus current = getCurrentStatus(); + synchronized (callback) { + if (current != null && !callback.isDone()) { + callback.done(this, current); + } + } + } + + /** + * Check if all the locks are unlocked and return a running status. + * + * @return a MultiStatus object describing running result or null if not completed yet. + */ + private synchronized IStatus getCurrentStatus() { + List<IStatus> list = new ArrayList<IStatus>(); + synchronized (locks) { + for (Entry<Object, IStatus> entry : locks.entrySet()) { + IStatus status = entry.getValue(); + if (status == null) return null; + list.add(status); + } + } + IStatus[] children = list.toArray(new IStatus[list.size()]); + return new MultiStatus(CoreBundleActivator.getUniqueIdentifier(), 0, children, Messages.CallbackMonitor_AllTasksFinished, null); + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/concurrent/MonitorTask.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/concurrent/MonitorTask.java index c0f987702..fda08be0a 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/concurrent/MonitorTask.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/concurrent/MonitorTask.java @@ -1,62 +1,62 @@ -/*******************************************************************************
- * Copyright (c) 2011, 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.concurrent;
-
-import java.util.TimerTask;
-import java.util.concurrent.TimeoutException;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tcf.te.tcf.core.activator.CoreBundleActivator;
-import org.eclipse.tcf.te.tcf.core.nls.Messages;
-
-/**
- * A timer task used by CallbackMonitor to monitor timeout waiting.
- */
-class MonitorTask extends TimerTask {
- // The timeout
- private long timeout;
- // The initial time.
- private long startTime;
- // The callback which is invoked after timeout.
- private ICallback callback;
-
- /**
- * The constructor.
- *
- * @param callback
- * @param timeout
- */
- public MonitorTask(ICallback callback, long timeout) {
- this.callback = callback;
- this.timeout = timeout;
- this.startTime = System.currentTimeMillis();
- }
-
- /*
- * (non-Javadoc)
- * @see java.util.TimerTask#run()
- */
- @Override
- public void run() {
- synchronized (callback) {
- if (callback.isDone()) {
- cancel();
- }
- else if (System.currentTimeMillis() - startTime >= timeout) {
- cancel();
- IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(),
- Messages.MonitorTask_TimeoutError, new TimeoutException());
- callback.done(this, status);
- }
- }
- }
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.concurrent; + +import java.util.TimerTask; +import java.util.concurrent.TimeoutException; + +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback; +import org.eclipse.tcf.te.tcf.core.activator.CoreBundleActivator; +import org.eclipse.tcf.te.tcf.core.nls.Messages; + +/** + * A timer task used by CallbackMonitor to monitor timeout waiting. + */ +class MonitorTask extends TimerTask { + // The timeout + private long timeout; + // The initial time. + private long startTime; + // The callback which is invoked after timeout. + private ICallback callback; + + /** + * The constructor. + * + * @param callback + * @param timeout + */ + public MonitorTask(ICallback callback, long timeout) { + this.callback = callback; + this.timeout = timeout; + this.startTime = System.currentTimeMillis(); + } + + /* + * (non-Javadoc) + * @see java.util.TimerTask#run() + */ + @Override + public void run() { + synchronized (callback) { + if (callback.isDone()) { + cancel(); + } + else if (System.currentTimeMillis() - startTime >= timeout) { + cancel(); + IStatus status = new Status(IStatus.ERROR, CoreBundleActivator.getUniqueIdentifier(), + Messages.MonitorTask_TimeoutError, new TimeoutException()); + callback.done(this, status); + } + } + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/concurrent/Rendezvous.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/concurrent/Rendezvous.java index dc2c2b103..6f7981714 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/concurrent/Rendezvous.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/concurrent/Rendezvous.java @@ -1,109 +1,109 @@ -/*******************************************************************************
- * Copyright (c) 2011, 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:
- * William Chen (Wind River)- [345387]Open the remote files with a proper editor
- *******************************************************************************/
-package org.eclipse.tcf.te.tcf.core.concurrent;
-
-import java.util.concurrent.TimeoutException;
-
-/**
- * A helper class used to synchronize producer and consumer threads. It is used
- * to join a thread with its asynchronous call backs or listeners. Usually it is
- * used in a case in which the thread have to wait for the end of an
- * asynchronously called method.
- * <p>
- * The following is an example:
- * <p>
- *
- * <pre>
- * final Rendezvous rendezvous = new Rendezvous();
- * service.open(path, IFileSystem.TCF_O_READ, null, new DoneOpen() {
- * public void doneOpen(IToken token, FileSystemException error, IFileHandle hdl) {
- * ...
- * rendezvous.arrive();
- * }
- * });
- * try{
- * renderzvous.waiting(1000); //Waiting for 1 second.
- * }catch(InterruptedException e){
- * // Waiting has timed out.
- * ...
- * }
- * </pre>
- *
- * The call renderzvous.waiting(1000) won't return until renderzvous.arrive() is
- * called in the doneOpen(), or the waiting has timed out.
- * <p>
- * A rendezvous can be reused once it is reset:
- * <p>
- *
- * <pre>
- * renderzvous.reset();
- * service.open(path, IFileSystem.TCF_O_READ, null, new DoneOpen() {
- * public void doneOpen(IToken token, FileSystemException error, IFileHandle hdl) {
- * ...
- * rendezvous.arrive();
- * }
- * });
- * try{
- * renderzvous.waiting(2000); //Waiting for 2 seconds.
- * }catch(InterruptedException e){
- * // Waiting has timed out.
- * ...
- * }
- * </pre>
- *
- */
-public class Rendezvous {
- // Flag indicating if the other thread has arrived.
- private boolean arrived;
-
- /**
- * Called to unblock the thread that is waiting on this rendezvous.
- */
- public synchronized void arrive() {
- arrived = true;
- notifyAll();
- }
-
- /**
- * Called to block the current thread until it is woken up by
- * another thread or until it is timed out.
- *
- * @param timeout The timeout time.
- * @throws TimeoutException The waiting has timed out.
- */
- public synchronized void waiting(long timeout) throws TimeoutException {
- long now = System.currentTimeMillis();
- while (!arrived && (timeout <= 0 || System.currentTimeMillis() - now < timeout)) {
- try {
- wait(timeout);
- } catch (InterruptedException e) {
- }
- }
- if (!arrived)
- throw new TimeoutException();
- }
-
- /**
- * Called to block the current thread until it is woken up by another
- * thread.
- *
- * @throws InterruptedException The waiting has timed out.
- */
- public synchronized void waiting() throws TimeoutException {
- waiting(0);
- }
-
- /**
- * Reset the rendezvous so that it is reusable.
- */
- public synchronized void reset() {
- arrived = false;
- }
-}
+/******************************************************************************* + * Copyright (c) 2011, 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: + * William Chen (Wind River)- [345387]Open the remote files with a proper editor + *******************************************************************************/ +package org.eclipse.tcf.te.tcf.core.concurrent; + +import java.util.concurrent.TimeoutException; + +/** + * A helper class used to synchronize producer and consumer threads. It is used + * to join a thread with its asynchronous call backs or listeners. Usually it is + * used in a case in which the thread have to wait for the end of an + * asynchronously called method. + * <p> + * The following is an example: + * <p> + * + * <pre> + * final Rendezvous rendezvous = new Rendezvous(); + * service.open(path, IFileSystem.TCF_O_READ, null, new DoneOpen() { + * public void doneOpen(IToken token, FileSystemException error, IFileHandle hdl) { + * ... + * rendezvous.arrive(); + * } + * }); + * try{ + * renderzvous.waiting(1000); //Waiting for 1 second. + * }catch(InterruptedException e){ + * // Waiting has timed out. + * ... + * } + * </pre> + * + * The call renderzvous.waiting(1000) won't return until renderzvous.arrive() is + * called in the doneOpen(), or the waiting has timed out. + * <p> + * A rendezvous can be reused once it is reset: + * <p> + * + * <pre> + * renderzvous.reset(); + * service.open(path, IFileSystem.TCF_O_READ, null, new DoneOpen() { + * public void doneOpen(IToken token, FileSystemException error, IFileHandle hdl) { + * ... + * rendezvous.arrive(); + * } + * }); + * try{ + * renderzvous.waiting(2000); //Waiting for 2 seconds. + * }catch(InterruptedException e){ + * // Waiting has timed out. + * ... + * } + * </pre> + * + */ +public class Rendezvous { + // Flag indicating if the other thread has arrived. + private boolean arrived; + + /** + * Called to unblock the thread that is waiting on this rendezvous. + */ + public synchronized void arrive() { + arrived = true; + notifyAll(); + } + + /** + * Called to block the current thread until it is woken up by + * another thread or until it is timed out. + * + * @param timeout The timeout time. + * @throws TimeoutException The waiting has timed out. + */ + public synchronized void waiting(long timeout) throws TimeoutException { + long now = System.currentTimeMillis(); + while (!arrived && (timeout <= 0 || System.currentTimeMillis() - now < timeout)) { + try { + wait(timeout); + } catch (InterruptedException e) { + } + } + if (!arrived) + throw new TimeoutException(); + } + + /** + * Called to block the current thread until it is woken up by another + * thread. + * + * @throws InterruptedException The waiting has timed out. + */ + public synchronized void waiting() throws TimeoutException { + waiting(0); + } + + /** + * Reset the rendezvous so that it is reusable. + */ + public synchronized void reset() { + arrived = false; + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/help/IContextHelpIds.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/help/IContextHelpIds.java index e7c4d9766..c82765735 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/help/IContextHelpIds.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/help/IContextHelpIds.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IExportPersistenceService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IExportPersistenceService.java index ae68a10e9..1448ded99 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IExportPersistenceService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IExportPersistenceService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IImportPersistenceService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IImportPersistenceService.java index c52e08a8b..124fd96e8 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IImportPersistenceService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IImportPersistenceService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IPathMapGeneratorService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IPathMapGeneratorService.java index 3332bf478..d941376da 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IPathMapGeneratorService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IPathMapGeneratorService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IPeerType.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IPeerType.java index 8875d9476..25cf5c9c4 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IPeerType.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/IPeerType.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/ITransportTypes.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/ITransportTypes.java index cce98085a..3c333f6c7 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/ITransportTypes.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/ITransportTypes.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/steps/ITcfStepAttributes.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/steps/ITcfStepAttributes.java index 487a097cd..86a2ae520 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/steps/ITcfStepAttributes.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/steps/ITcfStepAttributes.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/tracing/ITraceIds.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/tracing/ITraceIds.java index b997b9448..e138b5593 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/tracing/ITraceIds.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/interfaces/tracing/ITraceIds.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/Startup.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/Startup.java index bffa18dcb..e23ec1fcf 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/Startup.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/Startup.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/utils/LogUtils.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/utils/LogUtils.java index fdea98cf8..4e76c012c 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/utils/LogUtils.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/utils/LogUtils.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/iterators/AbstractPeerStepGroupIterator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/iterators/AbstractPeerStepGroupIterator.java index 06571f79b..6890c1d33 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/iterators/AbstractPeerStepGroupIterator.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/iterators/AbstractPeerStepGroupIterator.java @@ -1,46 +1,46 @@ -/*******************************************************************************
- * 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.tcf.core.iterators;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.tcf.protocol.IPeer;
-import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext;
-import org.eclipse.tcf.te.runtime.stepper.iterators.AbstractStepGroupIterator;
-
-/**
- * Abstract TCF launch step group iterator.
- */
-public abstract class AbstractPeerStepGroupIterator extends AbstractStepGroupIterator {
-
- /**
- * Returns the active peer context that is currently used.
- *
- * @param context The step context. Must not be <code>null</code>.
- * @param data The data giving object. Must not be <code>null</code>.
- * @param fullQualifiedId The full qualfied id for this step. Must not be <code>null</code>.
- * @return The active peer context.
- */
- protected IPeer getActivePeerContext(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId) {
- Object activeContext = getActiveContext(context, data, fullQualifiedId);
- IPeer peer = null;
- if (activeContext instanceof IPeer)
- return (IPeer)activeContext;
- if (activeContext instanceof IAdaptable)
- peer = (IPeer)((IAdaptable)activeContext).getAdapter(IPeer.class);
- if (peer == null)
- peer = (IPeer)Platform.getAdapterManager().getAdapter(activeContext, IPeer.class);
-
- return peer;
- }
-}
+/******************************************************************************* + * Copyright (c) 2013, 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.iterators; + +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.Platform; +import org.eclipse.tcf.protocol.IPeer; +import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer; +import org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId; +import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext; +import org.eclipse.tcf.te.runtime.stepper.iterators.AbstractStepGroupIterator; + +/** + * Abstract TCF launch step group iterator. + */ +public abstract class AbstractPeerStepGroupIterator extends AbstractStepGroupIterator { + + /** + * Returns the active peer context that is currently used. + * + * @param context The step context. Must not be <code>null</code>. + * @param data The data giving object. Must not be <code>null</code>. + * @param fullQualifiedId The full qualfied id for this step. Must not be <code>null</code>. + * @return The active peer context. + */ + protected IPeer getActivePeerContext(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId) { + Object activeContext = getActiveContext(context, data, fullQualifiedId); + IPeer peer = null; + if (activeContext instanceof IPeer) + return (IPeer)activeContext; + if (activeContext instanceof IAdaptable) + peer = (IPeer)((IAdaptable)activeContext).getAdapter(IPeer.class); + if (peer == null) + peer = (IPeer)Platform.getAdapterManager().getAdapter(activeContext, IPeer.class); + + return peer; + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/jobs/AbstractJob.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/jobs/AbstractJob.java index 05159b375..3c1d1f59b 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/jobs/AbstractJob.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/jobs/AbstractJob.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/ChannelListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/ChannelListener.java index 251286920..0e2b58c27 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/ChannelListener.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/ChannelListener.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/ChannelOpenListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/ChannelOpenListener.java index f48c932b4..ba7cf13f5 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/ChannelOpenListener.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/ChannelOpenListener.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/interfaces/IChannelOpenListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/interfaces/IChannelOpenListener.java index 22e81a435..3ca1c0320 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/interfaces/IChannelOpenListener.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/interfaces/IChannelOpenListener.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/interfaces/IChannelStateChangeListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/interfaces/IChannelStateChangeListener.java index d54a4d2a9..08b8186fb 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/interfaces/IChannelStateChangeListener.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/interfaces/IChannelStateChangeListener.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/interfaces/IProtocolStateChangeListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/interfaces/IProtocolStateChangeListener.java index 29b354378..a966f9cff 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/interfaces/IProtocolStateChangeListener.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/listeners/interfaces/IProtocolStateChangeListener.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/peers/Peer.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/peers/Peer.java index 9312826d4..0f90944fc 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/peers/Peer.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/peers/Peer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/AbstractPeerStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/AbstractPeerStep.java index cd679dc5b..687ccc581 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/AbstractPeerStep.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/AbstractPeerStep.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2013, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/CloseChannelStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/CloseChannelStep.java index c6944b3db..0aa87b5cd 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/CloseChannelStep.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/CloseChannelStep.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/OpenChannelStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/OpenChannelStep.java index 8bd71fe39..bc90bcba7 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/OpenChannelStep.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/OpenChannelStep.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/ShutDownStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/ShutDownStep.java index d21f5b95e..03eaa4e1a 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/ShutDownStep.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/steps/ShutDownStep.java @@ -1,53 +1,53 @@ -/*******************************************************************************
- * 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.tcf.core.steps;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.tcf.protocol.Protocol;
-import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext;
-import org.eclipse.tcf.te.tcf.core.Tcf;
-
-/**
- * Shutdown step implementation.
- */
-public class ShutDownStep extends AbstractPeerStep {
-
- /**
- * Constructor.
- */
- public ShutDownStep() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IExtendedStep#validateExecute(org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor)
- */
- @Override
- public void validateExecute(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor) throws CoreException {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IStep#execute(org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
- */
- @Override
- public void execute(final IStepContext context, final IPropertiesContainer data, final IFullQualifiedId fullQualifiedId, IProgressMonitor monitor, ICallback callback) {
- Protocol.invokeAndWait(new Runnable() {
- @Override
- public void run() {
- Tcf.getChannelManager().shutdown(getActivePeerContext(context, data, fullQualifiedId));
- }
- });
- callback.done(this, Status.OK_STATUS);
- }
-}
+/******************************************************************************* + * Copyright (c) 2013, 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.steps; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.Status; +import org.eclipse.tcf.protocol.Protocol; +import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback; +import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer; +import org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId; +import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext; +import org.eclipse.tcf.te.tcf.core.Tcf; + +/** + * Shutdown step implementation. + */ +public class ShutDownStep extends AbstractPeerStep { + + /** + * Constructor. + */ + public ShutDownStep() { + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IExtendedStep#validateExecute(org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor) + */ + @Override + public void validateExecute(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor) throws CoreException { + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IStep#execute(org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback) + */ + @Override + public void execute(final IStepContext context, final IPropertiesContainer data, final IFullQualifiedId fullQualifiedId, IProgressMonitor monitor, ICallback callback) { + Protocol.invokeAndWait(new Runnable() { + @Override + public void run() { + Tcf.getChannelManager().shutdown(getActivePeerContext(context, data, fullQualifiedId)); + } + }); + callback.done(this, Status.OK_STATUS); + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/streams/StreamsDataProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/streams/StreamsDataProvider.java index 17adba4f5..b51819655 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/streams/StreamsDataProvider.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/streams/StreamsDataProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/streams/StreamsDataReceiver.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/streams/StreamsDataReceiver.java index c9e1ff0eb..744662866 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/streams/StreamsDataReceiver.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/streams/StreamsDataReceiver.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/util/ExceptionUtils.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/util/ExceptionUtils.java index 86783b66b..8973bdaf7 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/util/ExceptionUtils.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/util/ExceptionUtils.java @@ -1,43 +1,43 @@ -/*******************************************************************************
- * Copyright (c) 2011, 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.util;
-
-import java.util.concurrent.ExecutionException;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.tcf.util.TCFTask;
-
-/**
- * Exception utilities helper implementations.
- */
-public final class ExceptionUtils {
-
- /**
- * The {@link TCFTask} implementation is wrapping the error cause into an
- * {@link ExecutionException} with the default error message "TCF
- * task aborted". As this message is not very informative to the user,
- * unpack the given exception to reveal the real error cause to the clients.
- *
- * @param e The source exception. Must not be <code>null</code>.
- * returns Exception The real error cause.
- */
- public static Exception checkAndUnwrapException(Exception e) {
- Assert.isNotNull(e);
-
- // If the incoming exception is a ExecutionException and has set
- // the default error message text, get the embedded cause.
- if (e instanceof ExecutionException && "TCF task aborted".equals(e.getMessage())) { //$NON-NLS-1$
- // Get the cause
- if (e.getCause() instanceof Exception) return (Exception)e.getCause();
- }
-
- return e;
- }
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.util; + +import java.util.concurrent.ExecutionException; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.tcf.util.TCFTask; + +/** + * Exception utilities helper implementations. + */ +public final class ExceptionUtils { + + /** + * The {@link TCFTask} implementation is wrapping the error cause into an + * {@link ExecutionException} with the default error message "TCF + * task aborted". As this message is not very informative to the user, + * unpack the given exception to reveal the real error cause to the clients. + * + * @param e The source exception. Must not be <code>null</code>. + * returns Exception The real error cause. + */ + public static Exception checkAndUnwrapException(Exception e) { + Assert.isNotNull(e); + + // If the incoming exception is a ExecutionException and has set + // the default error message text, get the embedded cause. + if (e instanceof ExecutionException && "TCF task aborted".equals(e.getMessage())) { //$NON-NLS-1$ + // Get the cause + if (e.getCause() instanceof Exception) return (Exception)e.getCause(); + } + + return e; + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/util/JSONUtils.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/util/JSONUtils.java index d156c587a..6081684f0 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/util/JSONUtils.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/util/JSONUtils.java @@ -1,46 +1,46 @@ -/*******************************************************************************
- * Copyright (c) 2011, 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.util;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-
-/**
- * JSON utilities helper implementations.
- */
-public final class JSONUtils {
-
- /**
- * Decodes a string object from the given byte array.
- * <p>
- * Used if services sends plain strings instead of encoding them through JSON.
- *
- * @param data The byte array or <code>null</code>.
- * @return The decoded string or <code>null</code>.
- */
- public static String decodeStringFromByteArray(byte[] data) {
- String args = null;
- if (data != null) {
- StringBuilder builder = new StringBuilder();
- InputStreamReader reader = new InputStreamReader(new ByteArrayInputStream(data));
- try {
- int c = reader.read();
- while (c != -1) {
- builder.append(c != 0 ? Character.valueOf((char)c).charValue() : ' ');
- c = reader.read();
- }
- } catch (IOException ex) { /* ignored on purpose */ }
-
- if (builder.length() > 0) args = builder.toString().trim();
- }
- return args;
- }
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.util; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStreamReader; + +/** + * JSON utilities helper implementations. + */ +public final class JSONUtils { + + /** + * Decodes a string object from the given byte array. + * <p> + * Used if services sends plain strings instead of encoding them through JSON. + * + * @param data The byte array or <code>null</code>. + * @return The decoded string or <code>null</code>. + */ + public static String decodeStringFromByteArray(byte[] data) { + String args = null; + if (data != null) { + StringBuilder builder = new StringBuilder(); + InputStreamReader reader = new InputStreamReader(new ByteArrayInputStream(data)); + try { + int c = reader.read(); + while (c != -1) { + builder.append(c != 0 ? Character.valueOf((char)c).charValue() : ' '); + c = reader.read(); + } + } catch (IOException ex) { /* ignored on purpose */ } + + if (builder.length() > 0) args = builder.toString().trim(); + } + return args; + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/util/persistence/PersistableNameUtil.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/util/persistence/PersistableNameUtil.java index 8ce88fb45..93de0e114 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/util/persistence/PersistableNameUtil.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/util/persistence/PersistableNameUtil.java @@ -1,48 +1,48 @@ -/*******************************************************************************
- * Copyright (c) 2011, 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.util.persistence;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.tcf.te.runtime.utils.net.IPAddressUtil;
-
-/**
- * Persistable name utility method implementations.
- */
-public class PersistableNameUtil {
- /* default */ final static Pattern pattern = Pattern.compile("TCP:([0-9\\.]+):[0-9]+", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
-
- /**
- * Matches the given name against a set of patterns to isolate the IP address.
- * If the address could be isolated and the address is an local host address,
- * replace the address with the string "localhost".
- *
- * @param name
- * @return
- */
- public static String normalizeLocalhostAddress(String name) {
- Assert.isNotNull(name);
-
- // Let's see if the name matches the pattern
- Matcher matcher = pattern.matcher(name);
- if (matcher.matches()) {
- String ip = matcher.group(1);
- // If the IP address is for the local host, reconstruct the name
- // string to include "localhost" instead of the IP address
- if (IPAddressUtil.getInstance().isLocalHost(ip)) {
- name = name.replace(ip, "localhost"); //$NON-NLS-1$
- }
- }
-
- return name;
- }
-}
+/******************************************************************************* + * Copyright (c) 2011, 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.util.persistence; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.tcf.te.runtime.utils.net.IPAddressUtil; + +/** + * Persistable name utility method implementations. + */ +public class PersistableNameUtil { + /* default */ final static Pattern pattern = Pattern.compile("TCP:([0-9\\.]+):[0-9]+", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$ + + /** + * Matches the given name against a set of patterns to isolate the IP address. + * If the address could be isolated and the address is an local host address, + * replace the address with the string "localhost". + * + * @param name + * @return + */ + public static String normalizeLocalhostAddress(String name) { + Assert.isNotNull(name); + + // Let's see if the name matches the pattern + Matcher matcher = pattern.matcher(name); + if (matcher.matches()) { + String ip = matcher.group(1); + // If the IP address is for the local host, reconstruct the name + // string to include "localhost" instead of the IP address + if (IPAddressUtil.getInstance().isLocalHost(ip)) { + name = name.replace(ip, "localhost"); //$NON-NLS-1$ + } + } + + return name; + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/va/AbstractValueAdd.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/va/AbstractValueAdd.java index a8326f3b6..4c1c3f608 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/va/AbstractValueAdd.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/va/AbstractValueAdd.java @@ -1,61 +1,61 @@ -/*******************************************************************************
- * 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.va;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.tcf.te.runtime.extensions.ExecutableExtension;
-import org.eclipse.tcf.te.tcf.core.va.interfaces.IValueAdd;
-
-/**
- * Abstract value-add implementation.
- */
-public abstract class AbstractValueAdd extends ExecutableExtension implements IValueAdd {
- // Flag marking the value-add as optional
- private boolean optional = false;
- // For internal debugging purpose, a value-add can be redirected to an
- // manual launched value-add via "-DVA_<id>.peerId=<peerId>"
- private String debugPeerId = null;
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.ExecutableExtension#setInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
- */
- @Override
- public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
- super.setInitializationData(config, propertyName, data);
-
- String value = config.getAttribute("optional"); //$NON-NLS-1$
- if (value != null && !"".equals(value.trim())) { //$NON-NLS-1$
- optional = Boolean.valueOf(value.trim()).booleanValue();
- }
-
- value = System.getProperty("VA_" + getId() + ".peerId"); //$NON-NLS-1$1 //$NON-NLS-2$2
- if (value != null && !"".equals(value.trim())) { //$NON-NLS-1$
- debugPeerId = value.trim();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.tcf.core.va.interfaces.IValueAdd#isOptional()
- */
- @Override
- public final boolean isOptional() {
- return optional;
- }
-
- /**
- * Returns the peer id to use if set manually for debugging purpose.
- *
- * @return The peer id or <code>null</code>.
- */
- protected final String getDebugPeerId() {
- return debugPeerId;
- }
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.va; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.tcf.te.runtime.extensions.ExecutableExtension; +import org.eclipse.tcf.te.tcf.core.va.interfaces.IValueAdd; + +/** + * Abstract value-add implementation. + */ +public abstract class AbstractValueAdd extends ExecutableExtension implements IValueAdd { + // Flag marking the value-add as optional + private boolean optional = false; + // For internal debugging purpose, a value-add can be redirected to an + // manual launched value-add via "-DVA_<id>.peerId=<peerId>" + private String debugPeerId = null; + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.extensions.ExecutableExtension#setInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object) + */ + @Override + public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException { + super.setInitializationData(config, propertyName, data); + + String value = config.getAttribute("optional"); //$NON-NLS-1$ + if (value != null && !"".equals(value.trim())) { //$NON-NLS-1$ + optional = Boolean.valueOf(value.trim()).booleanValue(); + } + + value = System.getProperty("VA_" + getId() + ".peerId"); //$NON-NLS-1$1 //$NON-NLS-2$2 + if (value != null && !"".equals(value.trim())) { //$NON-NLS-1$ + debugPeerId = value.trim(); + } + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.tcf.core.va.interfaces.IValueAdd#isOptional() + */ + @Override + public final boolean isOptional() { + return optional; + } + + /** + * Returns the peer id to use if set manually for debugging purpose. + * + * @return The peer id or <code>null</code>. + */ + protected final String getDebugPeerId() { + return debugPeerId; + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/va/ValueAddManager.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/va/ValueAddManager.java index b0d864d7d..48ec160b7 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/va/ValueAddManager.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/va/ValueAddManager.java @@ -1,127 +1,127 @@ -/*******************************************************************************
- * 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.va;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.tcf.protocol.IPeer;
-import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
-import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
-import org.eclipse.tcf.te.tcf.core.va.interfaces.IValueAdd;
-import org.eclipse.tcf.te.tcf.core.va.internal.Binding;
-import org.eclipse.tcf.te.tcf.core.va.internal.BindingExtensionPointManager;
-
-/**
- * Value add manager implementation.
- */
-public class ValueAddManager extends AbstractExtensionPointManager<IValueAdd> {
- /*
- * Thread save singleton instance creation.
- */
- private static class LazyInstance {
- public static ValueAddManager instance = new ValueAddManager();
- }
-
- /**
- * Constructor.
- */
- ValueAddManager() {
- super();
- }
-
- /**
- * Returns the singleton instance of the extension point manager.
- */
- public static ValueAddManager getInstance() {
- return LazyInstance.instance;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
- */
- @Override
- protected String getExtensionPointId() {
- return "org.eclipse.tcf.te.tcf.core.valueadds"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
- */
- @Override
- protected String getConfigurationElementName() {
- return "valueadd"; //$NON-NLS-1$
- }
-
- /**
- * Returns the list of all contributed value adds.
- *
- * @param unique If <code>true</code>, the method returns new instances for each
- * contributed value add.
- *
- * @return The list of contributed value adds, or an empty array.
- */
- public IValueAdd[] getValueAdds(boolean unique) {
- List<IValueAdd> contributions = new ArrayList<IValueAdd>();
- Collection<ExecutableExtensionProxy<IValueAdd>> valueAdds = getExtensions().values();
- for (ExecutableExtensionProxy<IValueAdd> valueAdd : valueAdds) {
- IValueAdd instance = unique ? valueAdd.newInstance() : valueAdd.getInstance();
- if (instance != null && !contributions.contains(instance)) {
- contributions.add(instance);
- }
- }
-
- return contributions.toArray(new IValueAdd[contributions.size()]);
- }
-
- /**
- * Returns the value add identified by its unique id. If no value
- * add with the specified id is registered, <code>null</code> is returned.
- *
- * @param id The unique id of the value add or <code>null</code>
- * @param unique If <code>true</code>, the method returns new instances of the value add contribution.
- *
- * @return The value add instance or <code>null</code>.
- */
- public IValueAdd getValueAdd(String id, boolean unique) {
- IValueAdd contribution = null;
- if (getExtensions().containsKey(id)) {
- ExecutableExtensionProxy<IValueAdd> proxy = getExtensions().get(id);
- // Get the extension instance
- contribution = unique ? proxy.newInstance() : proxy.getInstance();
- }
-
- return contribution;
- }
-
- /**
- * Returns the value adds which are enabled for the given peer context.
- *
- * @param peer The peer context. Must not be <code>null</code>.
- * @return The list of value adds which are enabled or an empty array.
- */
- public IValueAdd[] getValueAdd(IPeer peer) {
- Assert.isNotNull(peer);
-
- List<IValueAdd> valueAdds = new ArrayList<IValueAdd>();
-
- // Get the list of applicable bindings
- Binding[] bindings = BindingExtensionPointManager.getInstance().getApplicableBindings(peer);
- for (Binding binding : bindings) {
- IValueAdd valueAdd = getValueAdd(binding.getValueAddId(), false);
- if (valueAdd != null && !valueAdds.contains(valueAdd)) valueAdds.add(valueAdd);
- }
-
- return valueAdds.toArray(new IValueAdd[valueAdds.size()]);
- }
-
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.va; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.tcf.protocol.IPeer; +import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager; +import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy; +import org.eclipse.tcf.te.tcf.core.va.interfaces.IValueAdd; +import org.eclipse.tcf.te.tcf.core.va.internal.Binding; +import org.eclipse.tcf.te.tcf.core.va.internal.BindingExtensionPointManager; + +/** + * Value add manager implementation. + */ +public class ValueAddManager extends AbstractExtensionPointManager<IValueAdd> { + /* + * Thread save singleton instance creation. + */ + private static class LazyInstance { + public static ValueAddManager instance = new ValueAddManager(); + } + + /** + * Constructor. + */ + ValueAddManager() { + super(); + } + + /** + * Returns the singleton instance of the extension point manager. + */ + public static ValueAddManager getInstance() { + return LazyInstance.instance; + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId() + */ + @Override + protected String getExtensionPointId() { + return "org.eclipse.tcf.te.tcf.core.valueadds"; //$NON-NLS-1$ + } + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName() + */ + @Override + protected String getConfigurationElementName() { + return "valueadd"; //$NON-NLS-1$ + } + + /** + * Returns the list of all contributed value adds. + * + * @param unique If <code>true</code>, the method returns new instances for each + * contributed value add. + * + * @return The list of contributed value adds, or an empty array. + */ + public IValueAdd[] getValueAdds(boolean unique) { + List<IValueAdd> contributions = new ArrayList<IValueAdd>(); + Collection<ExecutableExtensionProxy<IValueAdd>> valueAdds = getExtensions().values(); + for (ExecutableExtensionProxy<IValueAdd> valueAdd : valueAdds) { + IValueAdd instance = unique ? valueAdd.newInstance() : valueAdd.getInstance(); + if (instance != null && !contributions.contains(instance)) { + contributions.add(instance); + } + } + + return contributions.toArray(new IValueAdd[contributions.size()]); + } + + /** + * Returns the value add identified by its unique id. If no value + * add with the specified id is registered, <code>null</code> is returned. + * + * @param id The unique id of the value add or <code>null</code> + * @param unique If <code>true</code>, the method returns new instances of the value add contribution. + * + * @return The value add instance or <code>null</code>. + */ + public IValueAdd getValueAdd(String id, boolean unique) { + IValueAdd contribution = null; + if (getExtensions().containsKey(id)) { + ExecutableExtensionProxy<IValueAdd> proxy = getExtensions().get(id); + // Get the extension instance + contribution = unique ? proxy.newInstance() : proxy.getInstance(); + } + + return contribution; + } + + /** + * Returns the value adds which are enabled for the given peer context. + * + * @param peer The peer context. Must not be <code>null</code>. + * @return The list of value adds which are enabled or an empty array. + */ + public IValueAdd[] getValueAdd(IPeer peer) { + Assert.isNotNull(peer); + + List<IValueAdd> valueAdds = new ArrayList<IValueAdd>(); + + // Get the list of applicable bindings + Binding[] bindings = BindingExtensionPointManager.getInstance().getApplicableBindings(peer); + for (Binding binding : bindings) { + IValueAdd valueAdd = getValueAdd(binding.getValueAddId(), false); + if (valueAdd != null && !valueAdds.contains(valueAdd)) valueAdds.add(valueAdd); + } + + return valueAdds.toArray(new IValueAdd[valueAdds.size()]); + } + +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/va/interfaces/IValueAdd.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/va/interfaces/IValueAdd.java index fb7803b3e..13507d397 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/va/interfaces/IValueAdd.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/va/interfaces/IValueAdd.java @@ -1,71 +1,71 @@ -/*******************************************************************************
- * 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.va.interfaces;
-
-import org.eclipse.tcf.protocol.IPeer;
-import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension;
-
-/**
- * Interface to be implemented by value-add's.
- * <p>
- * <b>Note:</b> Asynchronous methods must be called from within of the TCF dispatch thread.
- */
-public interface IValueAdd extends IExecutableExtension {
-
- /**
- * Returns if or if not the value-add is optional.
- *
- * @return <code>True</code> if the value-add is optional, <code>false</code> otherwise.
- */
- public boolean isOptional();
-
- /**
- * Returns if or if not the value-add is alive for the given target peer.
- * <p>
- * In this context, alive typically means that the value-add process is
- * up, running and responsive.
- *
- * @param id The target peer id. Must not be <code>null</code>.
- * @param done The client callback. Must not be <code>null</code>.
- */
- public void isAlive(String id, ICallback done);
-
- /**
- * Launch the value-add for the given target peer.
- *
- * @param id The target peer id. Must not be <code>null</code>.
- * @param done The client callback. Must not be <code>null</code>.
- */
- public void launch(String id, ICallback done);
-
- /**
- * Shuts down the value-add for the given target peer.
- *
- * @param id The target peer id. Must not be <code>null</code>.
- * @param done The client callback. Must not be <code>null</code>.
- */
- public void shutdown(String id, ICallback done);
-
- /**
- * Shutdown the value-add's for all target peer's.
- *
- * @param done The client callback. Must not be <code>null</code>.
- */
- public void shutdownAll(ICallback done);
-
- /**
- * Returns the peer representing the value add for the given target peer.
- *
- * @param id The target peer id. Must not be <code>null</code>.
- * @return The value-add's peer.
- */
- public IPeer getPeer(String id);
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.va.interfaces; + +import org.eclipse.tcf.protocol.IPeer; +import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback; +import org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension; + +/** + * Interface to be implemented by value-add's. + * <p> + * <b>Note:</b> Asynchronous methods must be called from within of the TCF dispatch thread. + */ +public interface IValueAdd extends IExecutableExtension { + + /** + * Returns if or if not the value-add is optional. + * + * @return <code>True</code> if the value-add is optional, <code>false</code> otherwise. + */ + public boolean isOptional(); + + /** + * Returns if or if not the value-add is alive for the given target peer. + * <p> + * In this context, alive typically means that the value-add process is + * up, running and responsive. + * + * @param id The target peer id. Must not be <code>null</code>. + * @param done The client callback. Must not be <code>null</code>. + */ + public void isAlive(String id, ICallback done); + + /** + * Launch the value-add for the given target peer. + * + * @param id The target peer id. Must not be <code>null</code>. + * @param done The client callback. Must not be <code>null</code>. + */ + public void launch(String id, ICallback done); + + /** + * Shuts down the value-add for the given target peer. + * + * @param id The target peer id. Must not be <code>null</code>. + * @param done The client callback. Must not be <code>null</code>. + */ + public void shutdown(String id, ICallback done); + + /** + * Shutdown the value-add's for all target peer's. + * + * @param done The client callback. Must not be <code>null</code>. + */ + public void shutdownAll(ICallback done); + + /** + * Returns the peer representing the value add for the given target peer. + * + * @param id The target peer id. Must not be <code>null</code>. + * @return The value-add's peer. + */ + public IPeer getPeer(String id); +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/va/internal/Binding.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/va/internal/Binding.java index 02399e228..b361f664a 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/va/internal/Binding.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/va/internal/Binding.java @@ -1,66 +1,66 @@ -/*******************************************************************************
- * 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.va.internal;
-
-import org.eclipse.core.expressions.Expression;
-import org.eclipse.core.expressions.ExpressionConverter;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.tcf.te.runtime.extensions.ExecutableExtension;
-
-/**
- * Value-add binding implementation.
- */
-public class Binding extends ExecutableExtension {
- // The mandatory value-add identifier
- private String valueAddId;
- // The converted expression
- private Expression expression;
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.ExecutableExtension#doSetInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
- */
- @Override
- public void doSetInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
- super.doSetInitializationData(config, propertyName, data);
-
- // Initialize the value-add id field by reading the <valueadd> extension attribute.
- // Throws an exception if the id is empty or null.
- valueAddId = config != null ? config.getAttribute("valueAddId") : null; //$NON-NLS-1$
- if (valueAddId == null || "".equals(valueAddId.trim())) { //$NON-NLS-1$
- throw createMissingMandatoryAttributeException("valueAddId", config.getContributor().getName()); //$NON-NLS-1$
- }
-
- // Read the sub elements of the extension
- IConfigurationElement[] children = config != null ? config.getChildren() : null;
- // The "enablement" element is the only expected one
- if (children != null && children.length > 0) {
- expression = ExpressionConverter.getDefault().perform(children[0]);
- }
- }
-
- /**
- * Returns the value-add id which is associated with this binding.
- *
- * @return The value-add id.
- */
- public String getValueAddId() {
- return valueAddId;
- }
-
- /**
- * Returns the enablement expression which is associated with this binding.
- *
- * @return The enablement expression or <code>null</code>.
- */
- public Expression getEnablement() {
- return expression;
- }
-}
+/******************************************************************************* + * Copyright (c) 2012, 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.va.internal; + +import org.eclipse.core.expressions.Expression; +import org.eclipse.core.expressions.ExpressionConverter; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.tcf.te.runtime.extensions.ExecutableExtension; + +/** + * Value-add binding implementation. + */ +public class Binding extends ExecutableExtension { + // The mandatory value-add identifier + private String valueAddId; + // The converted expression + private Expression expression; + + /* (non-Javadoc) + * @see org.eclipse.tcf.te.runtime.extensions.ExecutableExtension#doSetInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object) + */ + @Override + public void doSetInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException { + super.doSetInitializationData(config, propertyName, data); + + // Initialize the value-add id field by reading the <valueadd> extension attribute. + // Throws an exception if the id is empty or null. + valueAddId = config != null ? config.getAttribute("valueAddId") : null; //$NON-NLS-1$ + if (valueAddId == null || "".equals(valueAddId.trim())) { //$NON-NLS-1$ + throw createMissingMandatoryAttributeException("valueAddId", config.getContributor().getName()); //$NON-NLS-1$ + } + + // Read the sub elements of the extension + IConfigurationElement[] children = config != null ? config.getChildren() : null; + // The "enablement" element is the only expected one + if (children != null && children.length > 0) { + expression = ExpressionConverter.getDefault().perform(children[0]); + } + } + + /** + * Returns the value-add id which is associated with this binding. + * + * @return The value-add id. + */ + public String getValueAddId() { + return valueAddId; + } + + /** + * Returns the enablement expression which is associated with this binding. + * + * @return The enablement expression or <code>null</code>. + */ + public Expression getEnablement() { + return expression; + } +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/va/internal/BindingExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/va/internal/BindingExtensionPointManager.java index aeb39bec3..2259bd01c 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/va/internal/BindingExtensionPointManager.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/va/internal/BindingExtensionPointManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/plugin.properties index 15a271aae..3b7f461be 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/plugin.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/plugin.properties @@ -1,5 +1,5 @@ ################################################################################## -# Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCreate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCreate.java index 9f855b939..ad9460869 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCreate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCreate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCreateFile.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCreateFile.java index 78d21f0ef..44d9bdc98 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCreateFile.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCreateFile.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCreateFolder.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCreateFolder.java index c04102c8e..f2ff3a59b 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCreateFolder.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCreateFolder.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpRefreshRoots.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpRefreshRoots.java index c561bc5f2..6470c6e12 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpRefreshRoots.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpRefreshRoots.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/url/TcfOutputStream.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/url/TcfOutputStream.java index 7073f2bff..6f1c7e202 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/url/TcfOutputStream.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/url/TcfOutputStream.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/services/FileTransferService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/services/FileTransferService.java index f7567ecde..ec5fcced8 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/services/FileTransferService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/services/FileTransferService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/activator/UIPlugin.java index 5a9f3ef2a..5584c7375 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/activator/UIPlugin.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/activator/UIPlugin.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/dialogs/FSFolderSelectionDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/dialogs/FSFolderSelectionDialog.java index 753e3bf31..cfd63137f 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/dialogs/FSFolderSelectionDialog.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/dialogs/FSFolderSelectionDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/ImageConsts.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/ImageConsts.java index ea2240380..e46b3eaec 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/ImageConsts.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/ImageConsts.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/properties/GeneralInformationPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/properties/GeneralInformationPage.java index 082963481..94624e244 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/properties/GeneralInformationPage.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/properties/GeneralInformationPage.java @@ -1,5 +1,5 @@ /********************************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/FolderValidator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/FolderValidator.java index dc011aa23..6ca8422bc 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/FolderValidator.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/FolderValidator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/nls/Messages.java index a445f9483..198ad1d14 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/nls/Messages.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/nls/Messages.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/nls/Messages.properties index 80ce61911..49b400004 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/nls/Messages.properties +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/nls/Messages.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. +# Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/filetransfer/AddEditFileTransferDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/filetransfer/AddEditFileTransferDialog.java index 0036644f4..d1792eabd 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/filetransfer/AddEditFileTransferDialog.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/filetransfer/AddEditFileTransferDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nls/Messages.java index dfa03ed64..0ee569779 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nls/Messages.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nls/Messages.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/utils/PeerDataHelper.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/utils/PeerDataHelper.java index 0be97110b..dc73b0305 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/utils/PeerDataHelper.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/utils/PeerDataHelper.java @@ -2,7 +2,7 @@ * PeerDataHelper.java * Created on Aug 21, 2013 * - * Copyright (c) 2013 Wind River Systems, Inc. + * Copyright (c) 2013, 2014 Wind River Systems, Inc. * * The right to copy, distribute, modify, or otherwise make use * of this software may be licensed only pursuant to the terms diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/interfaces/launcher/IProcessLauncher.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/interfaces/launcher/IProcessLauncher.java index f92ed4e6c..0465a3339 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/interfaces/launcher/IProcessLauncher.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/interfaces/launcher/IProcessLauncher.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/interfaces/launcher/ITerminalsLauncher.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/interfaces/launcher/ITerminalsLauncher.java index ab19a81eb..871a43af2 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/interfaces/launcher/ITerminalsLauncher.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/interfaces/launcher/ITerminalsLauncher.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/launcher/TerminalsLauncher.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/launcher/TerminalsLauncher.java index 22dd3de6e..02c99ccaa 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/launcher/TerminalsLauncher.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.terminals.core/src/org/eclipse/tcf/te/tcf/terminals/core/launcher/TerminalsLauncher.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/ActionHistoryToolbarContribution.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/ActionHistoryToolbarContribution.java index 5a838ea93..9600b5ecf 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/ActionHistoryToolbarContribution.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/ActionHistoryToolbarContribution.java @@ -1,3 +1,12 @@ +/******************************************************************************* + * 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.ui.handler; import java.util.ArrayList; diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/preferences/IPreferenceKeys.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/preferences/IPreferenceKeys.java index bfde01541..a3bbc9015 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/preferences/IPreferenceKeys.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/preferences/IPreferenceKeys.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/preferences/PreferencesInitializer.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/preferences/PreferencesInitializer.java index 376163549..914e34cb2 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/preferences/PreferencesInitializer.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/preferences/PreferencesInitializer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseDialogSelectionControl.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseDialogSelectionControl.java index ad21a2832..302e245e8 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseDialogSelectionControl.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseDialogSelectionControl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.serial/src/org/eclipse/tcf/te/ui/terminals/serial/launcher/SerialLauncherDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.serial/src/org/eclipse/tcf/te/ui/terminals/serial/launcher/SerialLauncherDelegate.java index bb42a3990..6636bad29 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.serial/src/org/eclipse/tcf/te/ui/terminals/serial/launcher/SerialLauncherDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.serial/src/org/eclipse/tcf/te/ui/terminals/serial/launcher/SerialLauncherDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2012, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/launcher/SshLauncherDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/launcher/SshLauncherDelegate.java index 5f7d09f60..aa82e06fe 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/launcher/SshLauncherDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.ssh/src/org/eclipse/tcf/te/ui/terminals/ssh/launcher/SshLauncherDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/launcher/TelnetLauncherDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/launcher/TelnetLauncherDelegate.java index 639534791..1123f358b 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/launcher/TelnetLauncherDelegate.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals.telnet/src/org/eclipse/tcf/te/ui/terminals/telnet/launcher/TelnetLauncherDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/PropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/PropertyTester.java index ea30847c5..b8384e230 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/PropertyTester.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/PropertyTester.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/services/TerminalService.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/services/TerminalService.java index 625cac78d..6a08bb5b6 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/services/TerminalService.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/services/TerminalService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabFolderManager.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabFolderManager.java index 78a6fe5c2..23730cbfd 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabFolderManager.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabFolderManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/EditorQuickFilterHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/EditorQuickFilterHandler.java index 0bfdee11b..4d8cbe0cb 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/EditorQuickFilterHandler.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/EditorQuickFilterHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/EditorQuickFilterResetHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/EditorQuickFilterResetHandler.java index 5a79f5873..5ae2cfac9 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/EditorQuickFilterResetHandler.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/EditorQuickFilterResetHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/EditorSearchHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/EditorSearchHandler.java index ede6339e8..67673216c 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/EditorSearchHandler.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/EditorSearchHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ViewQuickFilterHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ViewQuickFilterHandler.java index 0e177659d..489832a14 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ViewQuickFilterHandler.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ViewQuickFilterHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ViewQuickFilterResetHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ViewQuickFilterResetHandler.java index 1f4316ca5..2d433388d 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ViewQuickFilterResetHandler.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/ViewQuickFilterResetHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 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 |