Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'target_explorer')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/META-INF/MANIFEST.MF1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/plugin.properties2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/plugin.xml49
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/interfaces/IConnectable.java78
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/properties/PropertyTester.java9
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/steps/SetConnectStateStep.java87
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/utils/ConnectStateHelper.java94
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/nls/Messages.properties4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/META-INF/MANIFEST.MF3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/StepExecutor.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/job/StepperJob.java12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/utils/StepperHelper.java65
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/DefaultImageProvider.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FileTypeComparator.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FileTypeLabelProvider.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/EditableSharedDocumentAdapter.java6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/LocalFileSaveable.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/LocalTypedElement.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/MergeEditorInput.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/dnd/CommonDnD.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/OpenWithMenu.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/search/FSTreeNodeMatcher.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/nls/Messages.properties2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.xml150
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/internal/listeners/MenuListener.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/nls/Messages.properties2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.properties1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.xml34
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/ScannerRunnable.java34
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerModelProperties.java10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/services/IStepperServiceOperations.java1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/AdapterFactory.java8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nls/Messages.properties2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/ConnectablePeerModel.java179
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/LocatorModelRefreshService.java9
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/StepperOperationService.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/AbstractStepperOperationService.java)36
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/steps/SetAsDefaultContextStep.java53
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/steps/StartSimulatorStep.java18
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.xml4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/navigator/runtime/ContentProvider.java1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/monitor/events/EventListener.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/CopyAction.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/CutAction.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/DeleteAction.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PasteAction.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/SelectAllAction.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/events/EventListener.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/META-INF/MANIFEST.MF1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/ovr16/busy.gifbin0 -> 838 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.properties4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.xml76
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/activator/UIPlugin.java35
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/PipeTransportPanel.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/TransportTypePanelControl.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/controls/TransportSectionTypePanelControl.java6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/filter/UnreachablePeersFilter.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/OfflineCommandHandler.java209
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/ImageConsts.java5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/PropertyTester.java7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/listeners/WorkbenchPartListener.java96
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/listeners/WorkbenchWindowListener.java28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/PeerLabelProviderDelegate.java50
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/images/PeerImageDescriptor.java22
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/nls/Messages.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/nls/Messages.properties14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/sections/SimulatorTypeSelectionSection.java221
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/AbstractConfigWizard.java23
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/AbstractConfigWizardPage.java26
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/CoreTestCase.java10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/tests/TcfCoreTests.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseEditBrowseTextControl.java8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.xml1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/categories/Category.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/controls/AbstractContextSelectorControl.java28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/EditorEventListener.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/controls/ButtonPanelControl.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/events/AbstractEventListener.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/UpdateActiveExtensionsOperation.java6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/UpdateActiveFiltersOperation.java6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/categories/ICategoryManager.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/RestoreDone.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/RestoreJob.java8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewExpandingState.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/adapters/EditorAdapterFactory.java6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/plugin.properties6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/plugin.xml194
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/activator/UIPlugin.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/dialogs/FilteredCheckedListDialog.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/handler/AbstractStepperCommandHandler.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/handler/StepperCommandHandler.java)45
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/handler/ConnectableCommandHandler.java75
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/ImageConsts.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/handler/IDeleteHandlerDelegate.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/search/TreeViewerSearchDialog.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/AbstractTreeControl.java22
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ColumnState.java8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/FilterState.java6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeArrayContentProvider.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerHeaderMenu.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerState.java24
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerDescriptor.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerStateManager.java30
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardSelectionPage.java6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractFormsWizardPage.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractValidatingWizardPage.java6
104 files changed, 1306 insertions, 1064 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.core/META-INF/MANIFEST.MF
index fb871e034..0d27c6259 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.core/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/META-INF/MANIFEST.MF
@@ -21,5 +21,6 @@ Export-Package: org.eclipse.tcf.te.core.activator;x-internal:=true,
org.eclipse.tcf.te.core.nls;x-internal:=true,
org.eclipse.tcf.te.core.nodes.interfaces.wire,
org.eclipse.tcf.te.core.properties,
+ org.eclipse.tcf.te.core.steps,
org.eclipse.tcf.te.core.utils,
org.eclipse.tcf.te.core.utils.text
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.core/plugin.properties
index 42489e93a..5e8a2666f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.core/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/plugin.properties
@@ -10,3 +10,5 @@
pluginName = Target Explorer, Core
providerName = Eclipse.org - Target Explorer
+
+SetConnectStateStep.name=Set Connect State \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.core/plugin.xml
index 54947d312..22b79bd8a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.core/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/plugin.xml
@@ -18,10 +18,57 @@
class="org.eclipse.tcf.te.core.properties.PropertyTester"
id="org.eclipse.tcf.te.core.properties.PropertyTester"
namespace="org.eclipse.tcf.te.core"
- properties="hasAdapter,canAdaptTo,hasEnvVar,envVar"
+ properties="hasAdapter,canAdaptTo,hasEnvVar,envVar,isConnectStateChangeActionAllowed,isConnectState"
type="java.lang.Object">
</propertyTester>
</extension>
+<!-- Step contributions -->
+ <extension point="org.eclipse.tcf.te.runtime.stepper.steps">
+ <step id="org.eclipse.tcf.te.core.setConnectStateStep"
+ label="%SetConnectStateStep.name"
+ class="org.eclipse.tcf.te.core.steps.SetConnectStateStep">
+ </step>
+ </extension>
+
+<!-- Reusable core expression fragments -->
+ <extension point="org.eclipse.core.expressions.definitions">
+
+ <definition id="te.expressions.selection.IConnectable">
+ <with variable="selection">
+ <iterate operator="and" ifEmpty="false">
+ <adapt type="org.eclipse.tcf.te.core.interfaces.IConnectable"/>
+ </iterate>
+ </with>
+ </definition>
+
+ <definition id="te.expressions.editor.IConnectable">
+ <with variable="activeEditorInput">
+ <adapt type="org.eclipse.tcf.te.core.interfaces.IConnectable"/>
+ </with>
+ </definition>
+
+ <definition id="te.expressions.IConnectable">
+ <adapt type="org.eclipse.tcf.te.core.interfaces.IConnectable"/>
+ </definition>
+
+ <definition id="te.expressions.IConnectable.connected">
+ <adapt type="org.eclipse.tcf.te.core.interfaces.IConnectable">
+ <test forcePluginActivation="true"
+ property="org.eclipse.tcf.te.core.isConnectState"
+ value="connected"/>
+ </adapt>
+ </definition>
+
+ <definition id="te.expressions.IConnectable.disconnected">
+ <adapt type="org.eclipse.tcf.te.core.interfaces.IConnectable">
+ <test forcePluginActivation="true"
+ property="org.eclipse.tcf.te.core.isConnectState"
+ value="disconnected"/>
+ </adapt>
+ </definition>
+
+ </extension>
+
</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/interfaces/IConnectable.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/interfaces/IConnectable.java
new file mode 100644
index 000000000..244630fd8
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/interfaces/IConnectable.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * 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.core.interfaces;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+
+/**
+ * IConnectable
+ */
+public interface IConnectable {
+
+ // intermediate states are always < 0
+ public static final int STATE_CONNECTING = -12;
+ public static final int STATE_CONNECT_SCHEDULED = -11;
+ public static final int STATE_DISCONNECTING = -2;
+ public static final int STATE_DISCONNECT_SCHEDULED = -1;
+
+ // main states
+ public static final int STATE_UNKNOWN = 0;
+ public static final int STATE_DISCONNECTED = 1;
+ public static final int STATE_CONNECTED = 11;
+
+ // state change actions
+ public static final int ACTION_UNKNOWN = STATE_UNKNOWN;
+ public static final int ACTION_DISCONNECT = STATE_DISCONNECTED;
+ public static final int ACTION_CONNECT = STATE_CONNECTED;
+ /**
+ * Get the current connect state.
+ *
+ * @return The current connect state.
+ */
+ public int getConnectState();
+
+ /**
+ * Set the connect state property of the IConnectable.
+ * @param state The state.
+ * @return <code>true</code> if the state was set.
+ */
+ public boolean setConnectState(int state);
+
+ /**
+ * Change the current connect state to the new state if possible.
+ * Only states >= 0 are allowed.
+ *
+ * @param state The new state.
+ * @param callback The callback to indicate that the state change has been finished.
+ * @param monitor The progress monitor. If <code>null</code> a new job will be scheduled.
+ *
+ * @throws IllegalArgumentException if the given state is not allowed (only states >= 0 are allowed)
+ */
+ public void changeConnectState(int state, ICallback callback, IProgressMonitor monitor) throws IllegalArgumentException;
+
+ /**
+ * Check whether a state change to the given state is allowed.
+ *
+ * @param state The new state to check.
+ * @return <code>true</code> if a state change to the given state is currently allwoed.
+ */
+ public boolean isConnectStateChangeAllowed(int state);
+
+ /**
+ * Check whether a state change action is allowed.
+ *
+ * @param action The action to execute.
+ * @return <code>true</code> if a state change action is currently allwoed.
+ */
+ public boolean isConnectStateChangeActionAllowed(int action);
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/properties/PropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/properties/PropertyTester.java
index bc19b2a24..89df0358f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/properties/PropertyTester.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/properties/PropertyTester.java
@@ -11,6 +11,8 @@ package org.eclipse.tcf.te.core.properties;
import org.eclipse.core.runtime.IAdapterManager;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.tcf.te.core.interfaces.IConnectable;
+import org.eclipse.tcf.te.core.utils.ConnectStateHelper;
/**
* Adapter helper property tester implementation.
@@ -99,6 +101,13 @@ public class PropertyTester extends org.eclipse.core.expressions.PropertyTester
return value != null ? expectedValue.toString().equals(value) : false;
}
+ if ("isConnectStateChangeActionAllowed".equals(property) && receiver instanceof IConnectable && expectedValue instanceof String) { //$NON-NLS-1$
+ return ((IConnectable)receiver).isConnectStateChangeActionAllowed(ConnectStateHelper.getConnectAction((String)expectedValue));
+ }
+ if ("isConnectState".equals(property) && receiver instanceof IConnectable && expectedValue instanceof String) { //$NON-NLS-1$
+ return ((IConnectable)receiver).getConnectState() == ConnectStateHelper.getConnectState((String)expectedValue);
+ }
+
return false;
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/steps/SetConnectStateStep.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/steps/SetConnectStateStep.java
new file mode 100644
index 000000000..7943ab258
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/steps/SetConnectStateStep.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * 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.core.steps;
+
+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.core.interfaces.IConnectable;
+import org.eclipse.tcf.te.core.utils.ConnectStateHelper;
+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.runtime.stepper.steps.AbstractStep;
+import org.eclipse.tcf.te.runtime.utils.ProgressHelper;
+
+/**
+ * SetConnectStateStep
+ */
+public class SetConnectStateStep extends AbstractStep {
+
+ public static final String PARAMETER_STATE = "state"; //$NON-NLS-1$
+ public static final String PARAMETER_STATE_ON_CANCEL = "stateOnCancel"; //$NON-NLS-1$
+ public static final String PARAMETER_STATE_ON_ERROR = "stateOnError"; //$NON-NLS-1$
+
+ /* (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(IStepContext context, IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor, ICallback callback) {
+ String state = getParameters().get(PARAMETER_STATE);
+ if (state != null) {
+ Object activeContext = getActiveContext(context, data, fullQualifiedId);
+ if (activeContext instanceof IConnectable) {
+ ((IConnectable)activeContext).setConnectState(ConnectStateHelper.getConnectState(state));
+ }
+ }
+
+ callback.done(this, Status.OK_STATUS);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.stepper.steps.AbstractStep#rollback(org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.core.runtime.IStatus, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
+ */
+ @Override
+ public void rollback(IStepContext context, IPropertiesContainer data, IStatus status, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor, ICallback callback) {
+ if (ProgressHelper.isCancel(this, monitor, null)) {
+ String stateOnCancel = getParameters().get(PARAMETER_STATE_ON_CANCEL);
+
+ if (stateOnCancel != null) {
+ Object activeContext = getActiveContext(context, data, fullQualifiedId);
+ if (activeContext instanceof IConnectable) {
+ ((IConnectable)activeContext).setConnectState(ConnectStateHelper.getConnectState(stateOnCancel));
+ }
+ }
+ }
+ else {
+ String stateOnError = getParameters().get(PARAMETER_STATE_ON_ERROR);
+
+ if (stateOnError != null) {
+ Object activeContext = getActiveContext(context, data, fullQualifiedId);
+ if (activeContext instanceof IConnectable) {
+ ((IConnectable)activeContext).setConnectState(ConnectStateHelper.getConnectState(stateOnError));
+ }
+ }
+ }
+
+ super.rollback(context, data, status, fullQualifiedId, monitor, callback);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IStep#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 {
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/utils/ConnectStateHelper.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/utils/ConnectStateHelper.java
new file mode 100644
index 000000000..e42baeb7d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/utils/ConnectStateHelper.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * 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.core.utils;
+
+import org.eclipse.tcf.te.core.interfaces.IConnectable;
+
+/**
+ * ConnectStateHelper
+ */
+public final class ConnectStateHelper {
+
+ public static final String UNKNOWN = "unknown"; //$NON-NLS-1$
+
+ public static final String DISCONNECTED = "disconnected"; //$NON-NLS-1$
+ public static final String DISCONNECTING = "disconnecting"; //$NON-NLS-1$
+ public static final String DISCONNECT_SCHEDULED = "disconnect_scheduled"; //$NON-NLS-1$
+
+ public static final String CONNECTED = "connected"; //$NON-NLS-1$
+ public static final String CONNECTING = "connecting"; //$NON-NLS-1$
+ public static final String CONNECT_SCHEDULED = "connect_scheduled"; //$NON-NLS-1$
+
+ public static final String DISCONNECT = "disconnect"; //$NON-NLS-1$
+ public static final String CONNECT = "connect"; //$NON-NLS-1$
+
+ public static final int getConnectState(String state) {
+ if (DISCONNECTED.equalsIgnoreCase(state))
+ return IConnectable.STATE_DISCONNECTED;
+ if (DISCONNECTING.equalsIgnoreCase(state))
+ return IConnectable.STATE_DISCONNECTING;
+ if (DISCONNECT_SCHEDULED.equalsIgnoreCase(state))
+ return IConnectable.STATE_DISCONNECT_SCHEDULED;
+ if (CONNECTED.equalsIgnoreCase(state))
+ return IConnectable.STATE_CONNECTED;
+ if (CONNECTING.equalsIgnoreCase(state))
+ return IConnectable.STATE_CONNECTING;
+ if (CONNECT_SCHEDULED.equalsIgnoreCase(state))
+ return IConnectable.STATE_CONNECT_SCHEDULED;
+
+ if (CONNECT.equalsIgnoreCase(state))
+ return IConnectable.ACTION_CONNECT;
+ if (DISCONNECT.equalsIgnoreCase(state))
+ return IConnectable.ACTION_DISCONNECT;
+
+ return IConnectable.STATE_UNKNOWN;
+ }
+
+ public static final String getConnectState(int state) {
+ switch (state) {
+ case IConnectable.STATE_DISCONNECTED:
+ return DISCONNECTED;
+ case IConnectable.STATE_DISCONNECTING:
+ return DISCONNECTING;
+ case IConnectable.STATE_DISCONNECT_SCHEDULED:
+ return DISCONNECT_SCHEDULED;
+ case IConnectable.STATE_CONNECTED:
+ return CONNECTED;
+ case IConnectable.STATE_CONNECTING:
+ return CONNECTING;
+ case IConnectable.STATE_CONNECT_SCHEDULED:
+ return CONNECT_SCHEDULED;
+ }
+
+ return UNKNOWN;
+ }
+
+ public static final int getConnectAction(String action) {
+ if (CONNECT.equalsIgnoreCase(action))
+ return IConnectable.ACTION_CONNECT;
+ if (DISCONNECT.equalsIgnoreCase(action))
+ return IConnectable.ACTION_DISCONNECT;
+
+ return IConnectable.ACTION_UNKNOWN;
+ }
+
+ public static final String getConnectAction(int action) {
+ switch (action) {
+ case IConnectable.ACTION_CONNECT:
+ return CONNECT;
+ case IConnectable.ACTION_DISCONNECT:
+ return DISCONNECT;
+ }
+
+ return UNKNOWN;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/nls/Messages.properties
index ab2add6c1..7eb77e63a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/nls/Messages.properties
@@ -8,6 +8,6 @@
# Wind River Systems - initial API and implementation
###############################################################################
-ServiceManager_warning_skippedConnectionTypeService=Skipped connection type service contributions from contributor ''{0}''. \
-Reason: Missing mandatory connection type id.
+ServiceManager_warning_skippedConnectionTypeService=Skipped configuration type service contributions from contributor ''{0}''. \
+Reason: Missing mandatory configuration type id.
ServiceManager_warning_failedToLoadServiceType=Cannot create service type ''{0}'' for service ''{1}''.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/META-INF/MANIFEST.MF
index 9312a394b..42eb6ef0d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/META-INF/MANIFEST.MF
@@ -28,4 +28,5 @@ Export-Package: org.eclipse.tcf.te.runtime.stepper,
org.eclipse.tcf.te.runtime.stepper.nls;x-internal:=true,
org.eclipse.tcf.te.runtime.stepper.services,
org.eclipse.tcf.te.runtime.stepper.stepper,
- org.eclipse.tcf.te.runtime.stepper.steps
+ org.eclipse.tcf.te.runtime.stepper.steps,
+ org.eclipse.tcf.te.runtime.stepper.utils
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/StepExecutor.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/StepExecutor.java
index 2af02ea81..29d8d0ec2 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/StepExecutor.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/extensions/StepExecutor.java
@@ -246,7 +246,7 @@ public class StepExecutor implements IStepExecutor {
if (Platform.inDebugMode()) {
String date = DATE_FORMAT.format(new Date(System.currentTimeMillis()));
- formattedMessage += NLS.bind(Messages.StepExecutor_stepFailed_debugInfo, id.toString().replaceAll("/>", "/>\\n\\t"), date); //$NON-NLS-1$ //$NON-NLS-2$
+ formattedMessage += NLS.bind(Messages.StepExecutor_stepFailed_debugInfo, id.toString().replaceAll("/>", "/>\n"), date); //$NON-NLS-1$ //$NON-NLS-2$
}
return formattedMessage;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/job/StepperJob.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/job/StepperJob.java
index aa8a5b17b..1761d699f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/job/StepperJob.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/job/StepperJob.java
@@ -47,6 +47,7 @@ public final class StepperJob extends Job {
final private IPropertiesContainer data;
final private String stepGroupId;
final protected String operation;
+ private final boolean handleStatus;
private final boolean isCancelable;
@@ -131,8 +132,10 @@ public final class StepperJob extends Job {
* @param data The stepper data.
* @param stepGroupId The step group id to execute.
* @param operation The operation to execute.
+ * @param isCancelable <code>true</code> if the job can be canceled.
+ * @param handleStatus <code>true</code> if the job should handle the status itself and return always <code>Status.OK_STATUS</code>.
*/
- public StepperJob(String name, IStepContext stepContext, IPropertiesContainer data, String stepGroupId, String operation, boolean isCancelable) {
+ public StepperJob(String name, IStepContext stepContext, IPropertiesContainer data, String stepGroupId, String operation, boolean isCancelable, boolean handleStatus) {
super(name);
setPriority(Job.INTERACTIVE);
@@ -146,6 +149,7 @@ public final class StepperJob extends Job {
this.stepGroupId = stepGroupId;
this.operation = operation;
this.isCancelable = isCancelable;
+ this.handleStatus = handleStatus;
ISchedulingRule rule = null;
IStepperService service = ServiceManager.getInstance().getService(stepContext.getContextObject(), IStepperService.class, true);
@@ -230,7 +234,7 @@ public final class StepperJob extends Job {
* @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
*/
@Override
- protected final IStatus run(IProgressMonitor monitor) {
+ public final IStatus run(IProgressMonitor monitor) {
if (!isCancelable) {
monitor = new NotCancelableProgressMonitor(monitor);
@@ -275,7 +279,9 @@ public final class StepperJob extends Job {
isFinished = true;
- handleStatus(status);
+ if (handleStatus) {
+ handleStatus(status);
+ }
return statusHandled ? Status.OK_STATUS : status;
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/utils/StepperHelper.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/utils/StepperHelper.java
new file mode 100644
index 000000000..38baccf77
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/utils/StepperHelper.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * 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.utils;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.services.ServiceManager;
+import org.eclipse.tcf.te.runtime.services.interfaces.IService;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepperOperationService;
+import org.eclipse.tcf.te.runtime.stepper.job.StepperJob;
+
+/**
+ * StepperHelper
+ */
+public final class StepperHelper {
+
+ public static final IStepperOperationService getService(Object context, String operation) {
+ IService[] services = ServiceManager.getInstance().getServices(context, IStepperOperationService.class, false);
+ IStepperOperationService stepperOperationService = null;
+ for (IService service : services) {
+ if (service instanceof IStepperOperationService && ((IStepperOperationService)service).isHandledOperation(context, operation)) {
+ stepperOperationService = (IStepperOperationService)service;
+ break;
+ }
+ }
+ return stepperOperationService;
+ }
+
+ public static final void scheduleStepperJob(Object context, String operation, IStepperOperationService service, ICallback callback, IProgressMonitor monitor) {
+ IStepContext stepContext = service.getStepContext(context, operation);
+ String stepGroupId = service.getStepGroupId(context, operation);
+ String name = service.getStepGroupName(context, operation);
+ boolean isCancelable = service.isCancelable(context, operation);
+ IPropertiesContainer data = service.getStepData(context, operation);
+
+ if (stepGroupId != null && stepContext != null) {
+ StepperJob job = new StepperJob(name != null ? name : "", //$NON-NLS-1$
+ stepContext,
+ data,
+ stepGroupId,
+ operation,
+ isCancelable,
+ monitor == null);
+ job.setJobCallback(callback);
+
+ if (monitor != null) {
+ job.run(monitor);
+ }
+ else {
+ job.schedule();
+ }
+ }
+
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/DefaultImageProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/DefaultImageProvider.java
index 41ebde05b..f81bed5ec 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/DefaultImageProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/DefaultImageProvider.java
@@ -20,7 +20,7 @@ import org.eclipse.ui.PlatformUI;
/**
* The default implementation of ImageProvider, defining the images
- * based on predefined images based on the node type.
+ * based on predefined images based on the node simulator.
*/
public class DefaultImageProvider implements ImageProvider {
// The editor registry used to search a file's image.
@@ -52,7 +52,7 @@ public class DefaultImageProvider implements ImageProvider {
* editor registry.
*
* @param node The file tree node.
- * @return The editor image for this type.
+ * @return The editor image for this simulator.
*/
protected Image getPredefinedImage(FSTreeNode node) {
Image image;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FileTypeComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FileTypeComparator.java
index 928fe1714..a0a8417b5 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FileTypeComparator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FileTypeComparator.java
@@ -12,7 +12,7 @@ package org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns;
import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
- * The comparator for the tree column "type".
+ * The comparator for the tree column "simulator".
*/
public class FileTypeComparator extends FSTreeNodeComparator {
private static final long serialVersionUID = 1L;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FileTypeLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FileTypeLabelProvider.java
index da11e0017..9981023ba 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FileTypeLabelProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FileTypeLabelProvider.java
@@ -13,7 +13,7 @@ import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
- * The label provider for the tree column "type".
+ * The label provider for the tree column "simulator".
*/
public class FileTypeLabelProvider extends LabelProvider {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/EditableSharedDocumentAdapter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/EditableSharedDocumentAdapter.java
index 555309d0c..a06079e6d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/EditableSharedDocumentAdapter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/EditableSharedDocumentAdapter.java
@@ -40,8 +40,8 @@ public class EditableSharedDocumentAdapter extends SharedDocumentAdapter impleme
private IEditorInput bufferedKey;
/**
- * Interface that provides this adapter with the state of the typed element
- * and supports call backs to the element when the adapter state changes.
+ * Interface that provides this adapter with the action of the typed element
+ * and supports call backs to the element when the adapter action changes.
*/
public interface ISharedDocumentAdapterListener {
@@ -71,7 +71,7 @@ public class EditableSharedDocumentAdapter extends SharedDocumentAdapter impleme
void handleDocumentDeleted();
/**
- * Method invoked when the document dirty state changes from dirty to
+ * Method invoked when the document dirty action changes from dirty to
* clean.
*/
void handleDocumentSaved();
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/LocalFileSaveable.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/LocalFileSaveable.java
index 575606ea2..3ed1015e4 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/LocalFileSaveable.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/LocalFileSaveable.java
@@ -420,7 +420,7 @@ public class LocalFileSaveable extends Saveable implements
}
/**
- * Revert any changes in the buffer back to the last saved state.
+ * Revert any changes in the buffer back to the last saved action.
*
* @param monitor
* a progress monitor on <code>null</code> if progress feedback
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/LocalTypedElement.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/LocalTypedElement.java
index babfd923f..3ee85cce6 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/LocalTypedElement.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/LocalTypedElement.java
@@ -171,10 +171,10 @@ public class LocalTypedElement extends MergeTypedElement implements
}
/**
- * Set the dirty state.
+ * Set the dirty action.
*
* @param dirty
- * The dirty state.
+ * The dirty action.
*/
public void setDirty(boolean dirty) {
this.dirty = dirty;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/MergeEditorInput.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/MergeEditorInput.java
index 479730fd8..b7efbfb56 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/MergeEditorInput.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/MergeEditorInput.java
@@ -99,7 +99,7 @@ public class MergeEditorInput extends CompareEditorInput implements
}
/**
- * Returns <code>true</code> if the other object is of type
+ * Returns <code>true</code> if the other object is of simulator
* <code>MergeEditorInput</code> and both of their corresponding fLeft and
* fRight objects are identical. The content is not considered.
*/
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/dnd/CommonDnD.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/dnd/CommonDnD.java
index 1613a5644..e56e8369a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/dnd/CommonDnD.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/dnd/CommonDnD.java
@@ -289,7 +289,7 @@ public class CommonDnD implements IConfirmCallback {
*
* @param target The target object.
* @param operation The DnD operation.
- * @param transferType The transfered data type.
+ * @param transferType The transfered data simulator.
* @return true if it is valid for dropping.
*/
public boolean validateFilesDrop(Object target, int operation, TransferData transferType) {
@@ -312,7 +312,7 @@ public class CommonDnD implements IConfirmCallback {
*
* @param target The target object.
* @param operation The DnD operation.
- * @param transferType The transfered data type.
+ * @param transferType The transfered data simulator.
* @return true if it is valid for dropping.
*/
public boolean validateLocalSelectionDrop(Object target, int operation, TransferData transferType) {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/OpenWithMenu.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/OpenWithMenu.java
index 4219701c6..7bfc8a4f8 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/OpenWithMenu.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/OpenWithMenu.java
@@ -125,7 +125,7 @@ public class OpenWithMenu extends ContributionItem {
ImageDescriptor imageDesc = null;
if (editorDesc == null) {
imageDesc = registry.getImageDescriptor(node.name);
- // TODO: is this case valid, and if so, what are the implications for content-type
+ // TODO: is this case valid, and if so, what are the implications for content-simulator
// editor bindings?
}
else {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/search/FSTreeNodeMatcher.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/search/FSTreeNodeMatcher.java
index 3ce17535b..d7ae57dd1 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/search/FSTreeNodeMatcher.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/search/FSTreeNodeMatcher.java
@@ -22,7 +22,7 @@ public class FSTreeNodeMatcher implements ISearchMatcher {
private boolean fMatchPrecise;
// The string matcher used for matching.
private StringMatcher fStringMatcher;
- // The current selected target type index.
+ // The current selected target simulator index.
private int fTargetType;
// The current target names.
private String fTargetName;
@@ -36,7 +36,7 @@ public class FSTreeNodeMatcher implements ISearchMatcher {
*
* @param caseSensitive Option of case sensitive
* @param matchPrecise Option of precise matching
- * @param targetType Option of the target type
+ * @param targetType Option of the target simulator
* @param targetName Option of the target name
* @param includeSystem Option if system files be included
* @param includeHidden Option if hidden files be included
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/nls/Messages.properties
index 2527fc788..1806e34bb 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/nls/Messages.properties
@@ -16,4 +16,4 @@ FileTransferItemValidator_invalidFile = File is not valid
FileTransferItemValidator_invalidFileOrDirectory = File or directory is not valid
SetPathMapStep_error_missingChannel=Missing TCF channel or channel not open.
-SetPathMapStep_error_missingLaunchConfig=Failed to get launch configuration for connection ''{0}''.
+SetPathMapStep_error_missingLaunchConfig=Failed to get launch configuration for configuration ''{0}''.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.xml
index 3a4761012..3a15b2b39 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.xml
@@ -147,6 +147,18 @@
</with>
</enablement>
</editorPageBinding>
+ <editorPageBinding
+ id="org.eclipse.tcf.te.tcf.launch.ui.binding.MemoryMapEditorPage"
+ pageId="org.eclipse.tcf.te.tcf.launch.ui.MemoryMapEditorPage"
+ insertBefore="org.eclipse.tcf.te.tcf.launch.ui.PathMapEditorPage,org.eclipse.tcf.te.launch.ui.SourceLookupEditorPage,org.eclipse.tcf.te.launch.ui.LaunchEditorPage">
+ <enablement>
+ <with variable="activeEditorInput">
+ <adapt type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel">
+ <test property="org.eclipse.tcf.te.tcf.locator.hasRemoteService" value="MemoryMap"/>
+ </adapt>
+ </with>
+ </enablement>
+ </editorPageBinding>
</extension>
<!-- Navigator viewer contributions -->
@@ -182,144 +194,8 @@
<!-- Menu contributions -->
<extension point="org.eclipse.ui.menus">
- <!-- Project explorer menu contributions -->
- <!--menuContribution locationURI="popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu?before=additions">
- <separator name="org.eclipse.tcf.te.tcf.launch.ui.remote.app.launch" visible="true"/>
- <command
- commandId="org.eclipse.tcf.te.tcf.launch.ui.remote.app.command.run"
- disabledIcon="platform:/plugin/org.eclipse.debug.ui/icons/full/dtool16/run_exc.gif"
- icon="platform:/plugin/org.eclipse.debug.ui/icons/full/etool16/run_exc.gif"
- id="org.eclipse.tcf.te.tcf.launch.ui.remote.app.run"
- label="%command.run.name"
- style="push">
- <visibleWhen checkEnabled="false">
- <with variable="selection">
- <iterate operator="and" ifEmpty="false">
- <and>
- <and>
- <with variable="org.eclipse.core.runtime.Platform">
- <test property="org.eclipse.core.runtime.bundleState"
- args="org.eclipse.debug.core"
- value="ACTIVE"/>
- </with>
- <test property="org.eclipse.debug.core.launchable" value="run"/>
- </and>
- <test
- forcePluginActivation="true"
- property="org.eclipse.tcf.te.launch.core.isValidLaunchConfigType"
- value="org.eclipse.tcf.te.tcf.launch.type.remote.app"
- args="run"/>
- </and>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.tcf.te.tcf.launch.ui.remote.app.command.debug"
- disabledIcon="platform:/plugin/org.eclipse.debug.ui/icons/full/dtool16/debug_exc.gif"
- icon="platform:/plugin/org.eclipse.debug.ui/icons/full/etool16/debug_exc.gif"
- id="org.eclipse.tcf.te.tcf.launch.ui.remote.app.debug"
- label="%command.debug.name"
- style="push">
- <visibleWhen checkEnabled="false">
- <with variable="selection">
- <iterate operator="and" ifEmpty="false">
- <and>
- <and>
- <with variable="org.eclipse.core.runtime.Platform">
- <test property="org.eclipse.core.runtime.bundleState"
- args="org.eclipse.debug.core"
- value="ACTIVE"/>
- </with>
- <test property="org.eclipse.debug.core.launchable" value="run"/>
- </and>
- <test
- forcePluginActivation="true"
- property="org.eclipse.tcf.te.launch.core.isValidLaunchConfigType"
- value="org.eclipse.tcf.te.tcf.launch.type.remote.app"
- args="run"/>
- </and>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- </menuContribution -->
-
+
<!-- Target explorer menu contributions -->
- <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.launch.rundebug">
- <separator name="org.eclipse.tcf.te.tcf.launch.ui.remote.app.launch" visible="true"/>
- <command
- commandId="org.eclipse.tcf.te.tcf.launch.ui.remote.app.command.run"
- disabledIcon="platform:/plugin/org.eclipse.debug.ui/icons/full/dtool16/run_exc.gif"
- icon="platform:/plugin/org.eclipse.debug.ui/icons/full/etool16/run_exc.gif"
- id="org.eclipse.tcf.te.tcf.launch.ui.remote.app.run"
- label="%command.run.name"
- style="push">
- <visibleWhen checkEnabled="false">
- <with variable="selection">
- <iterate
- operator="and"
- ifEmpty="false">
- <and>
- <test
- forcePluginActivation="true"
- property="org.eclipse.tcf.te.launch.core.isValidLaunchConfigType"
- value="org.eclipse.tcf.te.tcf.launch.type.remote.app"
- args="run"/>
- <or>
- <not>
- <test
- forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.services.hasService"
- value="org.eclipse.tcf.te.runtime.services.interfaces.IMenuService"/>
- </not>
- <test
- property="org.eclipse.tcf.te.runtime.services.menu.isVisible"
- args="org.eclipse.tcf.te.tcf.launch.ui.remote.app.command.run"
- value="true"/>
- </or>
- </and>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.tcf.te.tcf.launch.ui.remote.app.command.debug"
- disabledIcon="platform:/plugin/org.eclipse.debug.ui/icons/full/dtool16/debug_exc.gif"
- icon="platform:/plugin/org.eclipse.debug.ui/icons/full/etool16/debug_exc.gif"
- id="org.eclipse.tcf.te.tcf.launch.ui.remote.app.debug"
- label="%command.debug.name"
- style="push">
- <visibleWhen checkEnabled="false">
- <with variable="selection">
- <iterate
- operator="and"
- ifEmpty="false">
- <and>
- <test
- forcePluginActivation="true"
- property="org.eclipse.tcf.te.launch.core.isValidLaunchConfigType"
- value="org.eclipse.tcf.te.tcf.launch.type.remote.app"
- args="debug"/>
- <or>
- <not>
- <test
- forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.services.hasService"
- value="org.eclipse.tcf.te.runtime.services.interfaces.IMenuService"/>
- </not>
- <test
- property="org.eclipse.tcf.te.runtime.services.menu.isVisible"
- args="org.eclipse.tcf.te.tcf.launch.ui.remote.app.command.debug"
- value="true"/>
- </or>
- </and>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
-
<menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.connection">
<menu
id="org.eclipse.tcf.te.tcf.launch.ui.menu.diagnostics"
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/internal/listeners/MenuListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/internal/listeners/MenuListener.java
index a967ff6d8..aea7ccf2e 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/internal/listeners/MenuListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/internal/listeners/MenuListener.java
@@ -120,7 +120,7 @@ public class MenuListener implements IMenuListener2 {
// Get the launch configuration of the launch
ILaunchConfiguration lc = launch != null ? launch.getLaunchConfiguration() : null;
if (lc != null) {
- // Get the launch configuration type
+ // Get the launch configuration simulator
ILaunchConfigurationType type = lc.getType();
if (ILaunchTypes.ATTACH.equals(type.getIdentifier())) {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/nls/Messages.properties
index 3360a6796..6d498ba1b 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/nls/Messages.properties
@@ -37,7 +37,7 @@ LaunchConfigurationAdvancedTabSection_lineseparator_crlf=CRLF
LaunchConfigurationAdvancedTabSection_lineseparator_cr=CR
PathMapEditorPage_name=Object Paths
-PathMapEditorPage_error_apply=Failed to update object paths for connection ''{0}''.\n\nPossible cause:\n{1}
+PathMapEditorPage_error_apply=Failed to update object paths for configuration ''{0}''.\n\nPossible cause:\n{1}
PathMapEditorPage_error_title=Error
SourceLookupEditorPage_name=Source Paths
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.properties
index 1e6bdd361..2a7a67295 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.properties
@@ -21,3 +21,4 @@ StopDebuggerStep.name=Stop Debugger
SetWaitForReadyStep.name=Set peer waiting state
WaitForReadyStep.name=Wait until peer becomes ready
SignalPeerDisconnectedStep.name=Signal peer disconnected state
+SetAsDefaultContextStep.name=Set peer as default context
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.xml
index 42beffead..c4582a6d0 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.xml
@@ -130,6 +130,20 @@
<instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
</enablement>
</service>
+ <service
+ class="org.eclipse.tcf.te.tcf.locator.services.StepperOperationService"
+ id="org.eclipse.tcf.te.tcf.locator.services.stepperOperation">
+ <serviceType
+ bundleId="org.eclipse.tcf.te.runtime.stepper"
+ class="org.eclipse.tcf.te.runtime.stepper.interfaces.IStepperOperationService">
+ </serviceType>
+ <enablement>
+ <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
+ <test forcePluginActivation="true" property="org.eclipse.tcf.te.tcf.locator.isStaticPeer" value="true"/>
+ <test forcePluginActivation="true" property="org.eclipse.tcf.te.tcf.locator.isOfType" value="null"/>
+ </enablement>
+ </service>
+
</extension>
<!-- Step contributions -->
@@ -168,6 +182,10 @@
id="org.eclipse.tcf.te.tcf.locator.signalPeerDisconnectedStep"
class="org.eclipse.tcf.te.tcf.locator.steps.SignalPeerDisconnectedStep"
label="%SignalPeerDisconnectedStep.name"/>
+ <step
+ id="org.eclipse.tcf.te.tcf.locator.setAsDefaultContextStep"
+ class="org.eclipse.tcf.te.tcf.locator.steps.SetAsDefaultContextStep"
+ label="%SetAsDefaultContextStep.name"/>
</extension>
<!-- Step group contributions -->
@@ -183,20 +201,36 @@
<stepGroup
id="org.eclipse.tcf.te.tcf.locator.connectNoAttachStepGroup">
<references>
+ <reference id="org.eclipse.tcf.te.core.setConnectStateStep">
+ <parameter name="state" value="connecting" />
+ <parameter name="stateOnCancel" value="disconnected" />
+ <parameter name="stateOnError" value="disconnected" />
+ </reference>
<reference id="org.eclipse.tcf.te.tcf.locator.setWaitForReadyStep"/>
<reference id="org.eclipse.tcf.te.tcf.locator.startSimulatorStepGroup"/>
<reference id="org.eclipse.tcf.te.tcf.locator.waitForReadyStepGroup"/>
+ <reference id="org.eclipse.tcf.te.tcf.locator.setAsDefaultContextStep"/>
+ <reference id="org.eclipse.tcf.te.core.setConnectStateStep">
+ <parameter name="state" value="connected" />
+ </reference>
</references>
</stepGroup>
<stepGroup
id="org.eclipse.tcf.te.tcf.locator.disconnectStepGroup">
<references>
+ <reference id="org.eclipse.tcf.te.core.setConnectStateStep">
+ <parameter name="state" value="disconnecting" />
+ <parameter name="stateOnError" value="disconnected" />
+ </reference>
<reference id="org.eclipse.tcf.te.runtime.stepper.cancelJobsStep"/>
<reference id="org.eclipse.tcf.te.tcf.locator.stopDebuggerStep"/>
<reference id="org.eclipse.tcf.te.tcf.core.shutDownStep"/>
<reference id="org.eclipse.tcf.te.tcf.locator.stopSimulatorStep"/>
<reference id="org.eclipse.tcf.te.tcf.locator.signalPeerDisconnectedStep"/>
+ <reference id="org.eclipse.tcf.te.core.setConnectStateStep">
+ <parameter name="state" value="disconnected" />
+ </reference>
</references>
</stepGroup>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/ScannerRunnable.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/ScannerRunnable.java
index fa60f79a5..51fd51b7c 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/ScannerRunnable.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/ScannerRunnable.java
@@ -139,10 +139,13 @@ public class ScannerRunnable implements Runnable, IChannel.IChannelListener {
return;
}
- // Don't scan command server peers
- boolean isCommandServer = peer.getName() != null
- && peer.getName().endsWith("Command Server"); //$NON-NLS-1$
- if (isCommandServer) {
+ // Don't scan "CLI" peers
+ boolean isCLI = peer.getName() != null
+ && (peer.getName().startsWith("Eclipse CLI") //$NON-NLS-1$
+ || peer.getName().startsWith("Eclipse Command Server") //$NON-NLS-1$
+ || peer.getName().endsWith("CLI Server") //$NON-NLS-1$
+ || peer.getName().endsWith("CLI Client")); //$NON-NLS-1$
+ if (isCLI) {
if (callback != null) callback.done(this, Status.OK_STATUS);
return;
}
@@ -342,13 +345,17 @@ public class ScannerRunnable implements Runnable, IChannel.IChannelListener {
String remoteIP = channel.getRemotePeer().getAttributes().get(IPeer.ATTR_IP_HOST);
boolean isLocal = remoteIP != null && IPAddressUtil.getInstance().isLocalHost(remoteIP);
- boolean isCommandServer = channel.getRemotePeer().getName() != null
- && channel.getRemotePeer().getName().endsWith("Command Server"); //$NON-NLS-1$
+ boolean isCLI = channel.getRemotePeer().getName() != null
+ && (channel.getRemotePeer().getName().startsWith("Eclipse CLI") //$NON-NLS-1$
+ || channel.getRemotePeer().getName().endsWith("CLI Server") //$NON-NLS-1$
+ || channel.getRemotePeer().getName().endsWith("CLI Client")); //$NON-NLS-1$
- isCommandServer |= channel.getLocalPeer().getName() != null
- && channel.getLocalPeer().getName().endsWith("Command Server"); //$NON-NLS-1$
+ isCLI |= channel.getLocalPeer().getName() != null
+ && (channel.getLocalPeer().getName().startsWith("Eclipse CLI") //$NON-NLS-1$
+ || channel.getLocalPeer().getName().endsWith("CLI Server") //$NON-NLS-1$
+ || channel.getLocalPeer().getName().endsWith("CLI Client")); //$NON-NLS-1$
- return !isLocal && !isCommandServer;
+ return !isLocal && !isCLI;
}
/**
@@ -407,11 +414,14 @@ public class ScannerRunnable implements Runnable, IChannel.IChannelListener {
String value = attributes.get("ValueAdd"); //$NON-NLS-1$
boolean isValueAdd = value != null && ("1".equals(value.trim()) || Boolean.parseBoolean(value.trim())); //$NON-NLS-1$
- // Don't process command server service server or clients
+ // Don't process CLI service or clients
String name = attributes.get(IPeer.ATTR_NAME);
- boolean isCommandServer = name != null && name.endsWith("Command Server"); //$NON-NLS-1$
+ boolean isCLI = name != null
+ && (name.startsWith("Eclipse CLI") //$NON-NLS-1$
+ || name.endsWith("CLI Server") //$NON-NLS-1$
+ || name.endsWith("CLI Client")); //$NON-NLS-1$
- if (isValueAdd || isCommandServer) continue;
+ if (isValueAdd || isCLI) continue;
// Get the peer id
String peerId = attributes.get(IPeer.ATTR_ID);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerModelProperties.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerModelProperties.java
index 0a811c602..d20d9ce0e 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerModelProperties.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerModelProperties.java
@@ -113,11 +113,21 @@ public interface IPeerModelProperties {
public static final String PROP_SIM_TYPE = "SimulatorType"; //$NON-NLS-1$
/**
+ * Property: Discovered target for a static peer
+ */
+ public static final String PROP_TARGET = "Target"; //$NON-NLS-1$
+
+ /**
* Property: Auto-start the debugger after the agent launch.
*/
public static final String PROP_AUTO_START_DEBUGGER = "autoStartDebugger"; //$NON-NLS-1$
/**
+ * Property: Connect after the configuration has been created.
+ */
+ public static final String PROP_AUTO_CONNECT = "autoConnect"; //$NON-NLS-1$
+
+ /**
* Property: Exclude from scanner process. If set to <code>true</code>, the node will not be scanned
* by the scanner.
*/
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/services/IStepperServiceOperations.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/services/IStepperServiceOperations.java
index 667c58cd4..419d372f1 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/services/IStepperServiceOperations.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/services/IStepperServiceOperations.java
@@ -17,5 +17,4 @@ public interface IStepperServiceOperations {
public static final String CONNECT = "connect"; //$NON-NLS-1$
public static final String DISCONNECT = "disconnect"; //$NON-NLS-1$
- public static final String ATTACH_DEBUGGER = "attachDebugger"; //$NON-NLS-1$
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/AdapterFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/AdapterFactory.java
index 6fe13635e..5f698a49d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/AdapterFactory.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/adapters/AdapterFactory.java
@@ -16,6 +16,7 @@ import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IAdapterFactory;
import org.eclipse.tcf.protocol.IPeer;
import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.core.interfaces.IConnectable;
import org.eclipse.tcf.te.runtime.model.factory.Factory;
import org.eclipse.tcf.te.runtime.persistence.interfaces.IPersistableURIProvider;
import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext;
@@ -33,7 +34,7 @@ public class AdapterFactory implements IAdapterFactory {
private final IPersistableURIProvider peerModelPersistableURIProvider = new PeerPersistableURIProvider();
private static final Class<?>[] CLASSES = new Class[] {
- IPersistableURIProvider.class, IPeerModel.class
+ IPersistableURIProvider.class, IPeerModel.class, IConnectable.class, ILocatorModel.class
};
/* (non-Javadoc)
@@ -46,6 +47,11 @@ public class AdapterFactory implements IAdapterFactory {
Assert.isTrue(false);
}
}
+ if (IConnectable.class.isAssignableFrom(adapterType)) {
+ if (adaptableObject instanceof IConnectable) {
+ return adaptableObject;
+ }
+ }
if (ILocatorModel.class.isAssignableFrom(adapterType)) {
if (adaptableObject instanceof IPeerModel) {
return ((IPeerModel)adaptableObject).getModel();
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nls/Messages.properties
index 098df3289..4a1439bb5 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nls/Messages.properties
@@ -9,5 +9,5 @@
###############################################################################
WaitForReadyStep_error_timeout=Failed to connect to ''{0}''.\n\n\
-The connection attempt timed out. Please check that the connection properties are\n\
+The configuration attempt timed out. Please check that the configuration properties are\n\
valid. Verify also that no firewall is blocking the communication.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/ConnectablePeerModel.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/ConnectablePeerModel.java
new file mode 100644
index 000000000..95b1e989d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/nodes/ConnectablePeerModel.java
@@ -0,0 +1,179 @@
+/*******************************************************************************
+ * 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.locator.nodes;
+
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.core.interfaces.IConnectable;
+import org.eclipse.tcf.te.core.utils.ConnectStateHelper;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepperOperationService;
+import org.eclipse.tcf.te.runtime.stepper.utils.StepperHelper;
+import org.eclipse.tcf.te.runtime.utils.StatusHelper;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorModel;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.IStepperServiceOperations;
+
+/**
+ * ConnectablePeerModel
+ */
+public class ConnectablePeerModel extends PeerModel implements IConnectable {
+
+ public static final String PROPERTY_CONNECT_STATE = "connectState"; //$NON-NLS-1$
+
+ /**
+ * Constructor.
+ * @param model
+ * @param peer
+ */
+ public ConnectablePeerModel(ILocatorModel model, IPeer peer) {
+ super(model, peer);
+ setConnectState(STATE_DISCONNECTED);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.core.interfaces.IConnectable#getConnectState()
+ */
+ @Override
+ public int getConnectState() {
+ final AtomicInteger state = new AtomicInteger(STATE_UNKNOWN);
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ if (getProperty(PROPERTY_CONNECT_STATE) != null) {
+ state.set(getIntProperty(PROPERTY_CONNECT_STATE));
+ }
+ }
+ });
+ return state.get();
+ }
+
+ @Override
+ public boolean setConnectState(final int newState) {
+ final AtomicBoolean result = new AtomicBoolean(false);
+ if (isConnectStateChangeAllowed(newState)) {
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ result.set(setProperty(PROPERTY_CONNECT_STATE, newState));
+ }
+ });
+ }
+ return result.get();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.locator.nodes.PeerModel#postSetProperty(java.lang.String, java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public void postSetProperty(String key, Object value, Object oldValue) {
+ if (getConnectState() == STATE_CONNECTED && IPeerModelProperties.PROP_STATE.equals(key)) {
+ int state = value instanceof Integer ? ((Integer)value).intValue() : IPeerModelProperties.STATE_UNKNOWN;
+ if (state != IPeerModelProperties.STATE_CONNECTED && state != IPeerModelProperties.STATE_REACHABLE) {
+ changeConnectState(STATE_DISCONNECTED, null, null);
+ }
+ }
+
+ super.postSetProperty(key, value, oldValue);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.core.interfaces.IConnectable#changeConnectState(int, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
+ */
+ @Override
+ public void changeConnectState(final int action, ICallback callback, IProgressMonitor monitor) throws IllegalArgumentException {
+ final int oldState = getConnectState();
+ if (!isConnectStateChangeActionAllowed(action)) {
+ IllegalArgumentException e = new IllegalArgumentException("Cannot change state from '" + ConnectStateHelper.getConnectState(oldState) + "' using action '" + ConnectStateHelper.getConnectState(action) + "'."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if (callback != null) {
+ callback.done(this, StatusHelper.getStatus(e));
+ }
+ else {
+ throw e;
+ }
+ }
+
+ String operation = null;
+ int intermediateState = 0;
+
+ switch (action) {
+ case ACTION_CONNECT:
+ operation = IStepperServiceOperations.CONNECT;
+ intermediateState = STATE_CONNECT_SCHEDULED;
+ break;
+ case ACTION_DISCONNECT:
+ operation = IStepperServiceOperations.DISCONNECT;
+ intermediateState = STATE_DISCONNECT_SCHEDULED;
+ break;
+ }
+
+ IStepperOperationService service = StepperHelper.getService(this, operation);
+ if (service != null) {
+ setConnectState(intermediateState);
+ StepperHelper.scheduleStepperJob(this, operation, service, callback, monitor);
+ }
+ else if (callback != null) {
+ callback.done(this, StatusHelper.getStatus(new NullPointerException("Missing stepper operation service for " + getName() + "."))); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ @Override
+ public boolean isConnectStateChangeActionAllowed(int action) {
+ int state = getConnectState();
+ switch (state) {
+ case STATE_CONNECTED:
+ case STATE_CONNECT_SCHEDULED:
+ case STATE_CONNECTING:
+ return isAllowedState(action, ACTION_DISCONNECT);
+ case STATE_DISCONNECTED:
+ return isAllowedState(action, ACTION_CONNECT);
+ }
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.core.interfaces.IConnectable#isConnectStateChangeAllowed(int)
+ */
+ @Override
+ public boolean isConnectStateChangeAllowed(int newState) {
+ int state = getConnectState();
+ switch (state) {
+ case STATE_CONNECTED:
+ return isAllowedState(newState, STATE_DISCONNECTED, STATE_DISCONNECT_SCHEDULED, STATE_DISCONNECTING);
+ case STATE_CONNECT_SCHEDULED:
+ return isAllowedState(newState, STATE_CONNECTING, STATE_CONNECTED, STATE_DISCONNECTED, STATE_DISCONNECT_SCHEDULED, STATE_DISCONNECTING);
+ case STATE_CONNECTING:
+ return isAllowedState(newState, STATE_CONNECTED, STATE_DISCONNECT_SCHEDULED, STATE_DISCONNECTING, STATE_DISCONNECTED);
+ case STATE_DISCONNECTED:
+ return isAllowedState(newState, STATE_CONNECTED, STATE_CONNECT_SCHEDULED, STATE_CONNECTING);
+ case STATE_DISCONNECT_SCHEDULED:
+ return isAllowedState(newState, STATE_DISCONNECTING, STATE_DISCONNECTED);
+ case STATE_DISCONNECTING:
+ return isAllowedState(newState, STATE_DISCONNECTED);
+ case STATE_UNKNOWN:
+ return isAllowedState(newState, STATE_DISCONNECTED);
+ }
+ return false;
+ }
+
+ private boolean isAllowedState(int state, int... allowedStates) {
+ for (int allowedState : allowedStates) {
+ if (state == allowedState) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/LocatorModelRefreshService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/LocatorModelRefreshService.java
index 71c3c4ed9..2894548ce 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/LocatorModelRefreshService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/LocatorModelRefreshService.java
@@ -52,6 +52,7 @@ import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelLookupSer
import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelRefreshService;
import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelUpdateService;
import org.eclipse.tcf.te.tcf.locator.model.ModelLocationUtil;
+import org.eclipse.tcf.te.tcf.locator.nodes.ConnectablePeerModel;
import org.eclipse.tcf.te.tcf.locator.nodes.LocatorModel;
import org.eclipse.tcf.te.tcf.locator.nodes.PeerModel;
import org.eclipse.tcf.te.tcf.locator.nodes.PeerRedirector;
@@ -158,7 +159,13 @@ public class LocatorModelRefreshService extends AbstractLocatorModelService impl
IPeerModel peerNode = model.getService(ILocatorModelLookupService.class).lkupPeerModelById(entry.getKey());
// And create a new one if we cannot find it
if (peerNode == null) {
- peerNode = new PeerModel(model, peer);
+ String value = peer.getAttributes().get("static.transient"); //$NON-NLS-1$
+ if (value != null && Boolean.parseBoolean(value.trim())) {
+ peerNode = new ConnectablePeerModel(model, peer);
+ }
+ else {
+ peerNode = new PeerModel(model, peer);
+ }
}
else {
oldChildren.remove(peerNode);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/AbstractStepperOperationService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/StepperOperationService.java
index fff476206..70fabdaaf 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/AbstractStepperOperationService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/services/StepperOperationService.java
@@ -1,5 +1,5 @@
/**
- * AbstractStepperOperationService.java
+ * StepperOperationService.java
* Created on Apr 10, 2013
*
* Copyright (c) 2013 Wind River Systems, Inc.
@@ -11,18 +11,19 @@
package org.eclipse.tcf.te.tcf.locator.services;
import org.eclipse.core.runtime.Assert;
+import org.eclipse.tcf.te.core.interfaces.IConnectable;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
import org.eclipse.tcf.te.tcf.locator.interfaces.services.IStepperServiceOperations;
/**
- * Abstract connect/disconnect stepper service implementation.
+ * Connect/disconnect stepper operation service implementation.
*/
-public abstract class AbstractStepperOperationService extends org.eclipse.tcf.te.runtime.stepper.services.AbstractStepperOperationService {
+public class StepperOperationService extends org.eclipse.tcf.te.runtime.stepper.services.AbstractStepperOperationService {
/**
* Constructor.
*/
- public AbstractStepperOperationService() {
+ public StepperOperationService() {
}
/* (non-Javadoc)
@@ -31,8 +32,7 @@ public abstract class AbstractStepperOperationService extends org.eclipse.tcf.te
@Override
public boolean isHandledOperation(Object context, String operation) {
return IStepperServiceOperations.CONNECT.equals(operation) ||
- IStepperServiceOperations.DISCONNECT.equals(operation) ||
- IStepperServiceOperations.ATTACH_DEBUGGER.equals(operation);
+ IStepperServiceOperations.DISCONNECT.equals(operation);
}
/* (non-Javadoc)
@@ -42,7 +42,7 @@ public abstract class AbstractStepperOperationService extends org.eclipse.tcf.te
public String getStepGroupId(Object context, String operation) {
Assert.isTrue(context instanceof IPeerModel);
- if (IStepperServiceOperations.CONNECT.equals(operation) || IStepperServiceOperations.ATTACH_DEBUGGER.equals(operation)) {
+ if (IStepperServiceOperations.CONNECT.equals(operation)) {
return "org.eclipse.tcf.te.tcf.locator.connectStepGroup"; //$NON-NLS-1$
}
if (IStepperServiceOperations.DISCONNECT.equals(operation)) {
@@ -65,18 +65,32 @@ public abstract class AbstractStepperOperationService extends org.eclipse.tcf.te
if (IStepperServiceOperations.DISCONNECT.equals(operation)) {
return "Disconnect "+((IPeerModel)context).getName(); //$NON-NLS-1$
}
- if (IStepperServiceOperations.ATTACH_DEBUGGER.equals(operation)) {
- return "Attach Debugger to "+((IPeerModel)context).getName(); //$NON-NLS-1$
- }
return null;
}
/* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IStepperOperationService#isEnabled(java.lang.Object, java.lang.String)
+ */
+ @Override
+ public boolean isEnabled(Object context, String operation) {
+ if (context instanceof IConnectable) {
+ if (IStepperServiceOperations.CONNECT.equals(operation)) {
+ return ((IConnectable)context).isConnectStateChangeActionAllowed(IConnectable.ACTION_CONNECT);
+ }
+ if (IStepperServiceOperations.DISCONNECT.equals(operation)) {
+ return ((IConnectable)context).isConnectStateChangeActionAllowed(IConnectable.ACTION_DISCONNECT);
+ }
+ }
+
+ return false;
+ }
+
+ /* (non-Javadoc)
* @see org.eclipse.tcf.te.runtime.stepper.interfaces.IStepperOperationService#isCancelable(java.lang.Object, java.lang.String)
*/
@Override
public boolean isCancelable(Object context, String operation) {
- return IStepperServiceOperations.CONNECT.equals(operation) || IStepperServiceOperations.ATTACH_DEBUGGER.equals(operation);
+ return IStepperServiceOperations.CONNECT.equals(operation);
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/steps/SetAsDefaultContextStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/steps/SetAsDefaultContextStep.java
new file mode 100644
index 000000000..023622795
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/steps/SetAsDefaultContextStep.java
@@ -0,0 +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.locator.steps;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.services.ServiceManager;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId;
+import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext;
+import org.eclipse.tcf.te.tcf.locator.interfaces.services.IDefaultContextService;
+
+/**
+ * Set the active context as default context.
+ */
+public class SetAsDefaultContextStep extends AbstractPeerModelStep {
+
+ /**
+ * Constructor.
+ */
+ public SetAsDefaultContextStep() {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IStep#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, final IProgressMonitor monitor, final ICallback callback) {
+ IDefaultContextService selService = ServiceManager.getInstance().getService(IDefaultContextService.class);
+ if (selService != null) {
+ selService.setDefaultContext(getActivePeerModelContext(context, data, fullQualifiedId));
+ }
+
+ callback.done(this, Status.OK_STATUS);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/steps/StartSimulatorStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/steps/StartSimulatorStep.java
index 8fe7af841..cde08c7d6 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/steps/StartSimulatorStep.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/steps/StartSimulatorStep.java
@@ -12,14 +12,10 @@ package org.eclipse.tcf.te.tcf.locator.steps;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.tcf.te.runtime.callback.Callback;
import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tcf.te.runtime.services.ServiceManager;
import org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId;
import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext;
-import org.eclipse.tcf.te.runtime.utils.ProgressHelper;
-import org.eclipse.tcf.te.tcf.locator.interfaces.services.IDefaultContextService;
import org.eclipse.tcf.te.tcf.locator.utils.SimulatorUtils;
/**
@@ -45,19 +41,7 @@ public class StartSimulatorStep extends AbstractPeerModelStep {
*/
@Override
public void execute(final IStepContext context, final IPropertiesContainer data, final IFullQualifiedId fullQualifiedId, final IProgressMonitor monitor, final ICallback callback) {
- SimulatorUtils.start(getActivePeerModelContext(context, data, fullQualifiedId), monitor, new Callback(callback) {
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.callback.Callback#internalDone(java.lang.Object, org.eclipse.core.runtime.IStatus)
- */
- @Override
- protected void internalDone(Object caller, IStatus status) {
- if (!ProgressHelper.isCancelOrError(caller, status, monitor, null)) {
- IDefaultContextService service = ServiceManager.getInstance().getService(IDefaultContextService.class);
- if (service != null) service.setDefaultContext(getActivePeerModelContext(context, data, fullQualifiedId));
- }
- super.internalDone(caller, status);
- }
- });
+ SimulatorUtils.start(getActivePeerModelContext(context, data, fullQualifiedId), monitor, callback);
}
/* (non-Javadoc)
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.xml
index 367628a02..0d976fc89 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.xml
@@ -85,6 +85,7 @@
<triggerPoints>
<or>
<and>
+ <reference definitionId="te.expressions.IConnectable.connected"/>
<instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
<and>
<test property="org.eclipse.tcf.te.tcf.locator.hasRemoteService" value="Processes"/>
@@ -149,9 +150,10 @@
<editorPageBinding
id="org.eclipse.tcf.te.tcf.processes.ui.binding.ProcessExplorerEditorPage"
pageId="org.eclipse.tcf.te.tcf.processes.ui.ProcessExplorerEditorPage"
- insertBefore="org.eclipse.tcf.te.tcf.launch.ui.MemoryMapEditorPage,org.eclipse.tcf.te.tcf.launch.ui.PathMapEditorPage">
+ insertBefore="org.eclipse.tcf.te.tcf.launch.ui.MemoryMapEditorPage,org.eclipse.tcf.te.tcf.launch.ui.PathMapEditorPage,org.eclipse.tcf.te.tcf.launch.ui.PathMapEditorPage">
<enablement>
<with variable="activeEditorInput">
+ <reference definitionId="te.expressions.IConnectable.connected"/>
<adapt type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel">
<and>
<test property="org.eclipse.tcf.te.tcf.locator.hasRemoteService" value="Processes"/>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/navigator/runtime/ContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/navigator/runtime/ContentProvider.java
index 64e7d8616..cc9bca283 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/navigator/runtime/ContentProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/navigator/runtime/ContentProvider.java
@@ -300,6 +300,7 @@ public class ContentProvider implements ITreeContentProvider {
*/
@Override
public void dispose() {
+// ModelManager.disposeAllRuntimeModels();
}
/* (non-Javadoc)
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/monitor/events/EventListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/monitor/events/EventListener.java
index a056fff5e..73daa6889 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/monitor/events/EventListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/monitor/events/EventListener.java
@@ -31,7 +31,7 @@ public class EventListener extends AbstractEventListener {
if (event instanceof MonitorEvent) {
MonitorEvent monitorEvent = (MonitorEvent)event;
- // Get the event type and message
+ // Get the event simulator and message
MonitorEvent.Type type = monitorEvent.getType();
MonitorEvent.Message message = monitorEvent.getMessage();
@@ -42,7 +42,7 @@ public class EventListener extends AbstractEventListener {
// Get the console
Console console = Factory.getConsole((IPeer)monitorEvent.getSource(), true);
Assert.isNotNull(console);
- // Message type 'R' is an unknown type and will lead to print the
+ // Message simulator 'R' is an unknown simulator and will lead to print the
// message text using the error color.
console.appendMessage('R', message.text);
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/CopyAction.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/CopyAction.java
index c61d86220..f8ec1ee21 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/CopyAction.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/CopyAction.java
@@ -43,7 +43,7 @@ public class CopyAction extends Action {
}
/**
- * Updates the actions enabled state.
+ * Updates the actions enabled action.
*/
public void updateEnabledState() {
setEnabled(view.getStyledText() != null && view.getStyledText().getSelectionCount() > 0);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/CutAction.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/CutAction.java
index 1e22128fd..e77a1d508 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/CutAction.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/CutAction.java
@@ -43,7 +43,7 @@ public class CutAction extends Action {
}
/**
- * Updates the actions enabled state.
+ * Updates the actions enabled action.
*/
public void updateEnabledState() {
setEnabled(view.getStyledText() != null && view.getStyledText().getEditable() && view.getStyledText().getSelectionCount() > 0);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/DeleteAction.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/DeleteAction.java
index 8cfb7c66c..be891cc03 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/DeleteAction.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/DeleteAction.java
@@ -48,7 +48,7 @@ public class DeleteAction extends Action {
}
/**
- * Updates the actions enabled state.
+ * Updates the actions enabled action.
*/
public void updateEnabledState() {
setEnabled(view.getStyledText() != null && view.getStyledText().getEditable()
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PasteAction.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PasteAction.java
index 7025ff3b2..a98e5047d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PasteAction.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/PasteAction.java
@@ -46,7 +46,7 @@ public class PasteAction extends Action {
}
/**
- * Updates the actions enabled state.
+ * Updates the actions enabled action.
*/
public void updateEnabledState() {
boolean canPaste = false;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/SelectAllAction.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/SelectAllAction.java
index 2f4545070..482786347 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/SelectAllAction.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/actions/SelectAllAction.java
@@ -43,7 +43,7 @@ public class SelectAllAction extends Action {
}
/**
- * Updates the actions enabled state.
+ * Updates the actions enabled action.
*/
public void updateEnabledState() {
setEnabled(view.getStyledText() != null && view.getStyledText().getCharCount() > 0);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/events/EventListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/events/EventListener.java
index 3fe7dd0a9..6dd821ee5 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/events/EventListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/events/EventListener.java
@@ -29,7 +29,7 @@ public class EventListener extends AbstractEventListener {
if (event instanceof ScriptEvent) {
ScriptEvent scriptEvent = (ScriptEvent)event;
- // Get the event type
+ // Get the event simulator
ScriptEvent.Type type = scriptEvent.getType();
switch (type) {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/META-INF/MANIFEST.MF
index 4cc1b89ca..8c3a4d302 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/META-INF/MANIFEST.MF
@@ -48,7 +48,6 @@ Export-Package: org.eclipse.tcf.te.tcf.ui.actions,
org.eclipse.tcf.te.tcf.ui.internal.preferences;x-internal:=true,
org.eclipse.tcf.te.tcf.ui.internal.services,
org.eclipse.tcf.te.tcf.ui.internal.tabbed;x-internal:=true,
- org.eclipse.tcf.te.tcf.ui.listeners,
org.eclipse.tcf.te.tcf.ui.navigator,
org.eclipse.tcf.te.tcf.ui.navigator.dnd,
org.eclipse.tcf.te.tcf.ui.navigator.events,
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/ovr16/busy.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/ovr16/busy.gif
new file mode 100644
index 000000000..b53591825
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/icons/ovr16/busy.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.properties
index b15109331..3d4aad89d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.properties
@@ -69,9 +69,5 @@ command.rename.mnemonic = R
command.refresh.label=Refresh
command.refresh.tooltip=Refresh the selected target
-command.offline.label=Always Available Offline
-command.offline.tooltip=Creates an offline copy of the target attributes.
-command.offline.mnemonic = f
-
command.debug.label=Debug
command.debug.tooltip=Starts the debugger
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.xml
index 80a7f866f..e2277a9d2 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.xml
@@ -34,7 +34,7 @@
class="org.eclipse.tcf.te.tcf.ui.internal.PropertyTester"
id="org.eclipse.tcf.te.tcf.ui.propertyTester"
namespace="org.eclipse.tcf.te.tcf.ui"
- properties="canDelete,canMakeAvailableOffline"
+ properties="canDelete"
type="org.eclipse.jface.viewers.ISelection">
</propertyTester>
<propertyTester
@@ -361,37 +361,6 @@
</visibleWhen>
</command>
</menuContribution>
- <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.categories">
- <command
- commandId="org.eclipse.tcf.te.tcf.ui.command.offline"
- helpContextId="org.eclipse.tcf.te.tcf.ui.command_Offline"
- id="org.eclipse.tcf.te.tcf.ui.commands.offline"
- mnemonic="%command.offline.mnemonic">
- <visibleWhen checkEnabled="true">
- <with variable="selection">
- <count value="+"/>
- <iterate operator="and" ifEmpty="false">
- <and>
- <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
- <test property="org.eclipse.tcf.te.tcf.locator.isStaticPeer" value="false"/>
- <or>
- <not>
- <test
- forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.services.hasService"
- value="org.eclipse.tcf.te.runtime.services.interfaces.IMenuService"/>
- </not>
- <test
- property="org.eclipse.tcf.te.runtime.services.menu.isVisible"
- args="org.eclipse.tcf.te.tcf.ui.command.offline"
- value="true"/>
- </or>
- </and>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
<menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.refresh">
<command
commandId="org.eclipse.tcf.te.ui.command.refresh"
@@ -450,11 +419,30 @@
</command>
</menuContribution>
+ <!-- Editor page toolbar contributions -->
+ <menuContribution locationURI="toolbar:org.eclipse.tcf.te.tcf.ui.OverviewEditorPage?after=group.connect">
+ <command commandId="org.eclipse.tcf.te.ui.editor.command.connect">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="te.expressions.editor.IConnectable"/>
+ </visibleWhen>
+ </command>
+ <command commandId="org.eclipse.tcf.te.ui.editor.command.disconnect">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="te.expressions.editor.IConnectable"/>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+
<menuContribution locationURI="toolbar:org.eclipse.tcf.te.tcf.ui.OverviewEditorPage?after=group.launch.rundebug">
<command commandId="org.eclipse.tcf.te.tcf.ui.editor.command.debug"/>
</menuContribution>
- <!-- Status line trim area -->
+ <menuContribution locationURI="menu:org.eclipse.tcf.te.tcf.ui.OverviewEditorPage">
+ <separator visible="true" name="group.delete"/>
+ <command commandId="org.eclipse.ui.edit.delete"/>
+ </menuContribution>
+
+ <!-- Status line trim area -->
<menuContribution locationURI="toolbar:org.eclipse.ui.trim.status">
<toolbar id="org.eclipse.tcf.te.tcf.ui.trim.status.activeconnection">
<control
@@ -483,13 +471,6 @@
<!-- Command contributions -->
<extension point="org.eclipse.ui.commands">
<command
- id="org.eclipse.tcf.te.tcf.ui.command.offline"
- categoryId="org.eclipse.tcf.te.ui.commands.category"
- helpContextId="org.eclipse.tcf.te.tcf.ui.command_Offline"
- name="%command.offline.label"
- description="%command.offline.tooltip">
- </command>
- <command
id="org.eclipse.tcf.te.tcf.ui.command.debug"
categoryId="org.eclipse.tcf.te.ui.commands.category"
helpContextId="org.eclipse.tcf.te.tcf.ui.command_Debug"
@@ -560,21 +541,6 @@
</handler>
<handler
- class="org.eclipse.tcf.te.tcf.ui.handler.OfflineCommandHandler"
- commandId="org.eclipse.tcf.te.tcf.ui.command.offline">
- <activeWhen>
- <with variable="activePartId">
- <equals value="org.eclipse.tcf.te.ui.views.View"/>
- </with>
- </activeWhen>
- <enabledWhen>
- <with variable="selection">
- <test property="org.eclipse.tcf.te.tcf.ui.canMakeAvailableOffline" value="true"/>
- </with>
- </enabledWhen>
- </handler>
-
- <handler
commandId="org.eclipse.tcf.te.ui.command.refresh"
class="org.eclipse.tcf.te.tcf.ui.handler.RefreshHandler">
<activeWhen>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/activator/UIPlugin.java
index 6e3894574..128fd7397 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/activator/UIPlugin.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/activator/UIPlugin.java
@@ -17,7 +17,6 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.tcf.protocol.Protocol;
import org.eclipse.tcf.te.runtime.callback.AsyncCallbackCollector;
import org.eclipse.tcf.te.runtime.concurrent.util.ExecutorsUtil;
@@ -35,12 +34,9 @@ import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
import org.eclipse.tcf.te.tcf.locator.interfaces.services.IStepperServiceOperations;
import org.eclipse.tcf.te.tcf.locator.model.Model;
import org.eclipse.tcf.te.tcf.ui.internal.ImageConsts;
-import org.eclipse.tcf.te.tcf.ui.listeners.WorkbenchWindowListener;
import org.eclipse.tcf.te.ui.jface.images.AbstractImageDescriptor;
-import org.eclipse.ui.IWindowListener;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchListener;
-import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -57,10 +53,6 @@ public class UIPlugin extends AbstractUIPlugin {
// Reference to the workbench listener
/* default */ final ListenerList listeners = new ListenerList();
-
- // The global window listener instance
- private IWindowListener windowListener;
-
/**
* Constructor.
*/
@@ -158,6 +150,7 @@ public class UIPlugin extends AbstractUIPlugin {
data,
stepGroupId,
IStepperServiceOperations.DISCONNECT,
+ false,
false);
ICallback callback = new AsyncCallbackCollector.SimpleCollectorCallback(collector);
@@ -201,38 +194,14 @@ public class UIPlugin extends AbstractUIPlugin {
}
};
PlatformUI.getWorkbench().addWorkbenchListener(listener);
-
- if (windowListener == null && PlatformUI.getWorkbench() != null) {
- windowListener = new WorkbenchWindowListener();
- PlatformUI.getWorkbench().addWindowListener(windowListener);
- activateContexts();
- }
}
- void activateContexts() {
- if (Display.getCurrent() != null) {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window != null && windowListener != null) windowListener.windowOpened(window);
- }
- else {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable(){
- @Override
- public void run() {
- activateContexts();
- }});
- }
- }
-
/* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
@Override
public void stop(BundleContext context) throws Exception {
if (listener != null) { PlatformUI.getWorkbench().removeWorkbenchListener(listener); listener = null; }
- if (windowListener != null && PlatformUI.getWorkbench() != null) {
- PlatformUI.getWorkbench().removeWindowListener(windowListener);
- windowListener = null;
- }
plugin = null;
super.stop(context);
@@ -277,6 +246,8 @@ public class UIPlugin extends AbstractUIPlugin {
url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_ELCL + "newTarget_wiz.gif"); //$NON-NLS-1$
registry.put(ImageConsts.NEW_PEER, ImageDescriptor.createFromURL(url));
+ url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_OVR + "busy.gif"); //$NON-NLS-1$
+ registry.put(ImageConsts.BUSY_OVR, ImageDescriptor.createFromURL(url));
url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_OVR + "gold_ovr.gif"); //$NON-NLS-1$
registry.put(ImageConsts.GOLD_OVR, ImageDescriptor.createFromURL(url));
url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_OVR + "green_ovr.gif"); //$NON-NLS-1$
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/PipeTransportPanel.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/PipeTransportPanel.java
index a418c5438..25e97afdb 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/PipeTransportPanel.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/PipeTransportPanel.java
@@ -32,7 +32,7 @@ import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
import org.eclipse.ui.forms.widgets.FormToolkit;
/**
- * Pipe transport type panel implementation.
+ * Pipe transport simulator panel implementation.
*/
public class PipeTransportPanel extends AbstractWizardConfigurationPanel implements IDataExchangeNode3 {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/TransportTypePanelControl.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/TransportTypePanelControl.java
index 4f9e41ebf..5bb42b1af 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/TransportTypePanelControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/controls/TransportTypePanelControl.java
@@ -13,7 +13,7 @@ import org.eclipse.jface.dialogs.IDialogPage;
import org.eclipse.tcf.te.ui.controls.BaseWizardConfigurationPanelControl;
/**
- * Transport type wizard panel control.
+ * Transport simulator wizard panel control.
*/
public class TransportTypePanelControl extends BaseWizardConfigurationPanelControl {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/controls/TransportSectionTypePanelControl.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/controls/TransportSectionTypePanelControl.java
index c070c85ef..28ddb73e7 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/controls/TransportSectionTypePanelControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/editor/controls/TransportSectionTypePanelControl.java
@@ -18,7 +18,7 @@ import org.eclipse.tcf.te.ui.controls.interfaces.IWizardConfigurationPanel;
import org.eclipse.tcf.te.ui.jface.interfaces.IValidatingContainer;
/**
- * Transport section transport type panel control implementation.
+ * Transport section transport simulator panel control implementation.
*/
public class TransportSectionTypePanelControl extends TransportTypePanelControl implements ModifyListener {
// Reference to the parent transport section
@@ -46,10 +46,10 @@ public class TransportSectionTypePanelControl extends TransportTypePanelControl
TransportSectionTypeControl transportTypeControl = (TransportSectionTypeControl)transportSection.getAdapter(TransportSectionTypeControl.class);
if (transportTypeControl != null) {
- // Get the currently selected transport type
+ // Get the currently selected transport simulator
String transportType = transportTypeControl.getSelectedTransportType();
if (transportType != null) {
- // get the panel for the transport type and validate the panel
+ // get the panel for the transport simulator and validate the panel
IWizardConfigurationPanel panel = getConfigurationPanel(transportType);
if (panel != null) {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/filter/UnreachablePeersFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/filter/UnreachablePeersFilter.java
index a11b7cb3c..fe6708ab3 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/filter/UnreachablePeersFilter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/filter/UnreachablePeersFilter.java
@@ -26,11 +26,11 @@ public class UnreachablePeersFilter extends ViewerFilter {
@Override
public boolean select(Viewer viewer, Object parentElement, Object element) {
- // Filter only elements of type IPeerModel
+ // Filter only elements of simulator IPeerModel
if (element instanceof IPeerModel) {
final IPeerModel peerModel = (IPeerModel)element;
- // Determine the current state of the peer model
+ // Determine the current action of the peer model
final int[] state = new int[1];
if (Protocol.isDispatchThread()) {
state[0] = peerModel.getIntProperty(IPeerModelProperties.PROP_STATE);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/OfflineCommandHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/OfflineCommandHandler.java
deleted file mode 100644
index 3baf14819..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/handler/OfflineCommandHandler.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012, 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.ui.handler;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.tcf.protocol.IPeer;
-import org.eclipse.tcf.protocol.Protocol;
-import org.eclipse.tcf.te.runtime.callback.Callback;
-import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tcf.te.runtime.persistence.interfaces.IURIPersistenceService;
-import org.eclipse.tcf.te.runtime.services.ServiceManager;
-import org.eclipse.tcf.te.runtime.statushandler.StatusHandlerUtil;
-import org.eclipse.tcf.te.tcf.core.peers.Peer;
-import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelRefreshService;
-import org.eclipse.tcf.te.tcf.locator.model.Model;
-import org.eclipse.tcf.te.tcf.ui.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.ui.help.IContextHelpIds;
-import org.eclipse.tcf.te.tcf.ui.nls.Messages;
-import org.eclipse.tcf.te.ui.views.Managers;
-import org.eclipse.tcf.te.ui.views.interfaces.IUIConstants;
-import org.eclipse.tcf.te.ui.views.interfaces.categories.ICategorizable;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-/**
- * "Always available offline" command handler implementation.
- */
-public class OfflineCommandHandler extends AbstractHandler {
-
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
-
- // Get the current selection
- final ISelection selection = HandlerUtil.getCurrentSelection(event);
- // Make the selection available offline
- if (selection != null) makeAvailableOffline(selection, new Callback() {
- @Override
- protected void internalDone(Object caller, IStatus status) {
- if (status.getSeverity() == IStatus.ERROR) {
- StatusHandlerUtil.handleStatus(status, selection, null,
- Messages.OfflineCommandHandler_error_title, IContextHelpIds.MESSAGE_MAKEOFFLINE_FAILED, OfflineCommandHandler.this, null);
- }
-
- // Trigger a refresh of the model
- Protocol.invokeLater(new Runnable() {
- @Override
- public void run() {
- ILocatorModelRefreshService service = Model.getModel().getService(ILocatorModelRefreshService.class);
- // Refresh the model now (must be executed within the TCF dispatch thread)
- if (service != null) service.refresh(null);
- }
- });
- }
- });
-
- return null;
- }
-
- /**
- * Tests if the elements of the given selection can be made
- * available offline.
- *
- * @param selection The selection. Must not be <code>null</code>.
- * @return <code>True</code> if the elements can be made available offline, <code>false</code> otherwise.
- */
- public boolean canMakeAvailableOffline(ISelection selection) {
- Assert.isNotNull(selection);
-
- boolean enabled = false;
-
- // The selection must be a structured selection and must not be empty
- if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
- // Assume the selection to be deletable
- enabled = true;
- // Iterate the selection. All elements must be of type IPeerModel
- Iterator<?> iterator = ((IStructuredSelection)selection).iterator();
- while (iterator.hasNext()) {
- Object element = iterator.next();
- if (!(element instanceof IPeerModel)) {
- enabled = false;
- break;
- }
-
- // Determine if the selected peer model is static
- boolean isStatic = isStatic((IPeerModel)element);
- if (isStatic) enabled = false;
-
- if (!enabled) break;
- }
- }
-
- return enabled;
- }
-
- /**
- * Determines if the given peer model node is a static node.
- *
- * @param node The peer model node. Must not be <code>null</code>.
- * @return <code>True</code> if the node is static, <code>false</code> otherwise.
- */
- private boolean isStatic(final IPeerModel node) {
- Assert.isNotNull(node);
-
- final AtomicBoolean isStatic = new AtomicBoolean();
-
- Runnable runnable = new Runnable() {
- @Override
- public void run() {
- isStatic.set(node.isStatic());
- }
- };
-
- if (Protocol.isDispatchThread()) runnable.run();
- else Protocol.invokeAndWait(runnable);
-
- return isStatic.get();
- }
-
- /**
- * Creates an offline copy of the peer attributes.
- *
- * @param selection The selection. Must not be <code>null</code>.
- * @param callback The callback. Must not be <code>null</code>.
- */
- public void makeAvailableOffline(final ISelection selection, final ICallback callback) {
- Assert.isNotNull(selection);
- Assert.isNotNull(callback);
-
- Runnable runnable = new Runnable() {
- @Override
- public void run() {
- // The status to report back
- IStatus status = Status.OK_STATUS;
- // The selection must be a structured selection and must not be empty
- if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
- // Iterate the selection. All elements must be of type IPeerModel
- Iterator<?> iterator = ((IStructuredSelection)selection).iterator();
- while (iterator.hasNext()) {
- Object element = iterator.next();
- Assert.isTrue(element instanceof IPeerModel);
- IPeerModel node = (IPeerModel)element;
-
- // Copy the peer attributes
- Map<String, String> attrs = new HashMap<String, String>();
- attrs.putAll(node.getPeer().getAttributes());
-
- // Remove attributes filled in by the discovery
- attrs.remove(IPeer.ATTR_AGENT_ID);
- attrs.remove(IPeer.ATTR_SERVICE_MANGER_ID);
- attrs.remove("ServerManagerID"); //$NON-NLS-1$
- attrs.remove(IPeer.ATTR_USER_NAME);
- attrs.remove(IPeer.ATTR_OS_NAME);
-
- // Persist the attributes
- try {
- IURIPersistenceService service = ServiceManager.getInstance().getService(IURIPersistenceService.class);
- if (service == null) {
- throw new IOException("Persistence service instance unavailable."); //$NON-NLS-1$
- }
- service.write(new Peer(attrs), null);
-
- // Remove the node from the "Neighborhood" category
- ICategorizable categorizable = (ICategorizable)node.getAdapter(ICategorizable.class);
- if (categorizable == null) categorizable = (ICategorizable)Platform.getAdapterManager().getAdapter(node, ICategorizable.class);
- Assert.isNotNull(categorizable);
-
- Managers.getCategoryManager().remove(IUIConstants.ID_CAT_NEIGHBORHOOD, categorizable.getId());
- } catch (IOException e) {
- status = new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(),
- NLS.bind(Messages.OfflineCommandHandler_error_makeOffline_failed, node.getName(), e.getLocalizedMessage()), e);
- }
-
- if (status != null) break;
- }
- }
-
- // Invoke the callback
- callback.done(OfflineCommandHandler.this, status);
- }
- };
-
- Protocol.invokeLater(runnable);
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/ImageConsts.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/ImageConsts.java
index d5a2972bd..f54e992ec 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/ImageConsts.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/ImageConsts.java
@@ -81,6 +81,11 @@ public interface ImageConsts {
public static final String NEW_PEER = "NewPeerObject"; //$NON-NLS-1$
/**
+ * The key to access the peer object busy overlay image.
+ */
+ public static final String BUSY_OVR = "BusyOverlay"; //$NON-NLS-1$
+
+ /**
* The key to access the peer object gold overlay image.
*/
public static final String GOLD_OVR = "GoldOverlay"; //$NON-NLS-1$
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/PropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/PropertyTester.java
index 627c79560..072d2142f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/PropertyTester.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/internal/PropertyTester.java
@@ -14,7 +14,6 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
import org.eclipse.tcf.te.tcf.locator.utils.SimulatorUtils;
import org.eclipse.tcf.te.tcf.ui.handler.DeleteHandler;
-import org.eclipse.tcf.te.tcf.ui.handler.OfflineCommandHandler;
import org.eclipse.tcf.te.ui.views.navigator.nodes.NewWizardNode;
@@ -25,8 +24,6 @@ import org.eclipse.tcf.te.ui.views.navigator.nodes.NewWizardNode;
public class PropertyTester extends org.eclipse.core.expressions.PropertyTester {
// Reference to the peer model delete handler (to determine "canDelete")
private final DeleteHandler deleteHandler = new DeleteHandler();
- // Reference to the peer model offline handler (to determine "canMakeAvailableOffline")
- private final OfflineCommandHandler offlineHandler = new OfflineCommandHandler();
/* (non-Javadoc)
* @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
@@ -69,10 +66,6 @@ public class PropertyTester extends org.eclipse.core.expressions.PropertyTester
return deleteHandler.canDelete(selection);
}
- if ("canMakeAvailableOffline".equals(property)) { //$NON-NLS-1$
- return offlineHandler.canMakeAvailableOffline(selection);
- }
-
return false;
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/listeners/WorkbenchPartListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/listeners/WorkbenchPartListener.java
deleted file mode 100644
index 6348635ae..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/listeners/WorkbenchPartListener.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * 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.ui.listeners;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.tcf.te.runtime.services.ServiceManager;
-import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tcf.te.tcf.locator.interfaces.services.IDefaultContextService;
-import org.eclipse.tcf.te.ui.views.interfaces.IUIConstants;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IPartListener2;
-import org.eclipse.ui.IWorkbenchPartReference;
-
-/**
- * The part listener implementation. Takes care of
- * activation and deactivation of key binding contexts.
- */
-public class WorkbenchPartListener implements IPartListener2 {
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partBroughtToTop(org.eclipse.ui.IWorkbenchPartReference)
- */
- @Override
- public void partBroughtToTop(IWorkbenchPartReference partRef) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partOpened(org.eclipse.ui.IWorkbenchPartReference)
- */
- @Override
- public void partOpened(IWorkbenchPartReference partRef) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partClosed(org.eclipse.ui.IWorkbenchPartReference)
- */
- @Override
- public void partClosed(IWorkbenchPartReference partRef) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partVisible(org.eclipse.ui.IWorkbenchPartReference)
- */
- @Override
- public void partVisible(IWorkbenchPartReference partRef) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partHidden(org.eclipse.ui.IWorkbenchPartReference)
- */
- @Override
- public void partHidden(IWorkbenchPartReference partRef) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partActivated(org.eclipse.ui.IWorkbenchPartReference)
- */
- @Override
- public void partActivated(IWorkbenchPartReference partRef) {
- if (IUIConstants.ID_EDITOR.equals(partRef.getId())) {
- if (partRef instanceof IEditorReference) {
- IEditorPart part = (IEditorPart)partRef.getPart(false);
- if (part != null) {
- IPeerModel peerModel = (IPeerModel)Platform.getAdapterManager().getAdapter(part.getEditorInput(), IPeerModel.class);
- if (peerModel != null) {
- IDefaultContextService service = ServiceManager.getInstance().getService(IDefaultContextService.class);
- if (service != null) service.setDefaultContext(peerModel);
- }
- }
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partDeactivated(org.eclipse.ui.IWorkbenchPartReference)
- */
- @Override
- public void partDeactivated(IWorkbenchPartReference partRef) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partInputChanged(org.eclipse.ui.IWorkbenchPartReference)
- */
- @Override
- public void partInputChanged(IWorkbenchPartReference partRef) {
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/listeners/WorkbenchWindowListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/listeners/WorkbenchWindowListener.java
deleted file mode 100644
index 06d8b97d4..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/listeners/WorkbenchWindowListener.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 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.ui.listeners;
-
-import org.eclipse.tcf.te.ui.views.listeners.AbstractWindowListener;
-import org.eclipse.ui.IPartListener2;
-
-/**
- * The window listener implementation. Takes care of the
- * management of the global listeners per workbench window.
- */
-public class WorkbenchWindowListener extends AbstractWindowListener {
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.views.listeners.AbstractWindowListener#createPartListener()
- */
- @Override
- protected IPartListener2 createPartListener() {
- return new WorkbenchPartListener();
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/PeerLabelProviderDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/PeerLabelProviderDelegate.java
index ad8643c6a..8ca09120c 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/PeerLabelProviderDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/PeerLabelProviderDelegate.java
@@ -23,7 +23,6 @@ import org.eclipse.tcf.protocol.Protocol;
import org.eclipse.tcf.te.runtime.services.interfaces.delegates.ILabelProviderDelegate;
import org.eclipse.tcf.te.runtime.utils.net.IPAddressUtil;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelLookupService;
import org.eclipse.tcf.te.tcf.locator.model.Model;
import org.eclipse.tcf.te.tcf.ui.activator.UIPlugin;
@@ -181,7 +180,7 @@ public class PeerLabelProviderDelegate extends LabelProvider implements ILabelDe
public Image decorateImage(Image image, Object element) {
Image decoratedImage = image;
- if (image != null && element instanceof IPeerModel && !((IPeerModel)element).isStatic()) {
+ if (image != null && element instanceof IPeerModel) {
AbstractImageDescriptor descriptor = new PeerImageDescriptor(
UIPlugin.getDefault().getImageRegistry(),
image,
@@ -197,38 +196,21 @@ public class PeerLabelProviderDelegate extends LabelProvider implements ILabelDe
*/
@Override
public String decorateText(final String text, final Object element) {
- String label = text;
-
- if (element instanceof IPeerModel) {
- final StringBuilder builder = new StringBuilder(label != null && !"".equals(label.trim()) ? label.trim() : "<noname>"); //$NON-NLS-1$ //$NON-NLS-2$
-
- Runnable runnable = new Runnable() {
- @Override
- public void run() {
- boolean isStatic = ((IPeerModel)element).isStatic();
-
- int state = ((IPeerModel)element).getIntProperty(IPeerModelProperties.PROP_STATE);
- if (state > IPeerModelProperties.STATE_UNKNOWN
- && (!isStatic
- || state == IPeerModelProperties.STATE_REACHABLE
- || state == IPeerModelProperties.STATE_CONNECTED
- || state == IPeerModelProperties.STATE_WAITING_FOR_READY)) {
- builder.append(" ["); //$NON-NLS-1$
- builder.append(Messages.getString("LabelProviderDelegate_state_" + state)); //$NON-NLS-1$
- builder.append("]"); //$NON-NLS-1$
- }
- }
- };
-
- if (Protocol.isDispatchThread()) runnable.run();
- else Protocol.invokeAndWait(runnable);
-
- label = builder.toString();
-
- if (!"".equals(label.trim()) && !"<noname>".equals(label.trim())) { //$NON-NLS-1$ //$NON-NLS-2$
- return label;
- }
- }
+// String label = text;
+//
+// if (element instanceof IConnectable) {
+// final StringBuilder builder = new StringBuilder(label != null && !"".equals(label.trim()) ? label.trim() : "<noname>"); //$NON-NLS-1$ //$NON-NLS-2$
+//
+// builder.append(" ["); //$NON-NLS-1$
+// builder.append(ConnectStateHelper.getConnectState(((IConnectable)element).getConnectState()));
+// builder.append("]"); //$NON-NLS-1$
+//
+// label = builder.toString();
+//
+// if (!"".equals(label.trim()) && !"<noname>".equals(label.trim())) { //$NON-NLS-1$ //$NON-NLS-2$
+// return label;
+// }
+// }
return null;
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/images/PeerImageDescriptor.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/images/PeerImageDescriptor.java
index b9762a4e8..9264647d0 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/images/PeerImageDescriptor.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/images/PeerImageDescriptor.java
@@ -14,8 +14,8 @@ import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.core.interfaces.IConnectable;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
-import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
import org.eclipse.tcf.te.tcf.ui.internal.ImageConsts;
import org.eclipse.tcf.te.ui.jface.images.AbstractImageDescriptor;
@@ -29,8 +29,8 @@ public class PeerImageDescriptor extends AbstractImageDescriptor {
// the image size
private Point imageSize;
- // Flags representing the object states to decorate
- private int state;
+ // Flags representing the connect states to decorate
+ private int connectState;
/**
* Constructor.
@@ -66,7 +66,7 @@ public class PeerImageDescriptor extends AbstractImageDescriptor {
Assert.isNotNull(node);
Assert.isTrue(Protocol.isDispatchThread());
- state = node.getIntProperty(IPeerModelProperties.PROP_STATE);
+ connectState = node instanceof IConnectable ? ((IConnectable)node).getConnectState() : IConnectable.STATE_UNKNOWN;
}
/**
@@ -77,7 +77,7 @@ public class PeerImageDescriptor extends AbstractImageDescriptor {
protected void defineKey(int hashCode) {
String key = "PMID:" + //$NON-NLS-1$
hashCode + ":" + //$NON-NLS-1$
- state;
+ connectState;
setDecriptorKey(key);
}
@@ -89,11 +89,15 @@ public class PeerImageDescriptor extends AbstractImageDescriptor {
protected void drawCompositeImage(int width, int height) {
drawCentered(baseImage, width, height);
- if (state == IPeerModelProperties.STATE_NOT_REACHABLE) { /* not connected, not reachable */
- drawBottomRight(ImageConsts.RED_OVR);
+ if (connectState < 0) {
+ drawTopRight(ImageConsts.BUSY_OVR);
}
- else if (state == IPeerModelProperties.STATE_ERROR) { /* not connected, error */
- drawBottomRight(ImageConsts.RED_X_OVR);
+
+ if (connectState == IConnectable.STATE_CONNECTED) {
+ drawBottomRight(ImageConsts.GREEN_OVR);
+ }
+ else if (connectState == IConnectable.STATE_CONNECTING || connectState == IConnectable.STATE_DISCONNECTING) {
+ drawBottomRight(ImageConsts.GREY_OVR);
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/nls/Messages.java
index 714dc533c..d473cfca1 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/nls/Messages.java
@@ -192,8 +192,8 @@ public class Messages extends NLS {
public static String AbstractConfigWizardPage_configName_infoMissingValue;
public static String AbstractConfigWizardPage_configName_nameInUse;
public static String AbstractConfigWizardPage_launchDbg_label;
+ public static String AbstractConfigWizardPage_connect_label;
public static String AbstractConfigWizardPage_advancedButton_label;
- public static String AbstractConfigWizardPage_connectJob_label;
public static String ToolbarAction_selectPeer;
public static String ToolbarAction_selectionDialog_title;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/nls/Messages.properties
index 2687838d5..1b96b383f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/nls/Messages.properties
@@ -135,7 +135,7 @@ RenameHandler_dialog_error_nameExist=A target with the name you specified alread
RenameHandler_dialog_promptNewName=New Name:
TargetSelectorSection_title=Target
-TargetSelectorSection_button_enableReal=Use running Target
+TargetSelectorSection_button_enableReal=Use running Target:
TargetSelectorSection_button_enableSimulator=Start local Simulator:
SimulatorTypeSelectionControl_label=Simulator Type:
@@ -143,14 +143,14 @@ SimulatorTypeSelectionControl_button_configure=Configure...
SimulatorTypeSelectionControl_error_invalidConfiguration=The simulator configuration is not valid. Please click on ''Configure...'' to configure the simulator.
AbstractConfigurationEditorPage_error_possibleCause=Possible Cause:\n{0}
-AbstractConfigurationEditorPage_error_save=Failed to save connection: {0}.\n\n{1}
+AbstractConfigurationEditorPage_error_save=Failed to save configuration: {0}.\n\n{1}
-AbstractConfigWizardPage_configName_label=Connection Name:
-AbstractConfigWizardPage_configName_infoMissingValue=Please enter a connection name.
-AbstractConfigWizardPage_configName_nameInUse=This connection name is already used. Please choose a unique name.
-AbstractConfigWizardPage_launchDbg_label=Start debugger after connection has been established
+AbstractConfigWizardPage_configName_label=Configuration Name:
+AbstractConfigWizardPage_configName_infoMissingValue=Please enter a configuration name.
+AbstractConfigWizardPage_configName_nameInUse=This configuration name is already used. Please choose a unique name.
+AbstractConfigWizardPage_connect_label=Connect configuration on finish
+AbstractConfigWizardPage_launchDbg_label=Start debugger after configuration has been established
AbstractConfigWizardPage_advancedButton_label=Advanced...
-AbstractConfigWizardPage_connectJob_label=Connect ''{0}''
ToolbarAction_selectPeer=Select Existing Target...
ToolbarAction_selectionDialog_title=Select Existing Target
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/sections/SimulatorTypeSelectionSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/sections/SimulatorTypeSelectionSection.java
index bc9229bb0..44e43bc68 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/sections/SimulatorTypeSelectionSection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/sections/SimulatorTypeSelectionSection.java
@@ -11,34 +11,41 @@ package org.eclipse.tcf.te.tcf.ui.sections;
import java.util.HashMap;
import java.util.Map;
+import java.util.concurrent.atomic.AtomicBoolean;
import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.TypedEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.tcf.core.TransientPeer;
import org.eclipse.tcf.protocol.IPeer;
import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.te.core.interfaces.IConnectable;
import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
-import org.eclipse.tcf.te.runtime.services.interfaces.ISimulatorService;
import org.eclipse.tcf.te.tcf.core.peers.Peer;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
import org.eclipse.tcf.te.tcf.locator.nodes.PeerRedirector;
-import org.eclipse.tcf.te.tcf.locator.utils.SimulatorUtils;
import org.eclipse.tcf.te.tcf.ui.controls.SimulatorTypeSelectionControl;
+import org.eclipse.tcf.te.tcf.ui.dialogs.AgentSelectionDialog;
import org.eclipse.tcf.te.tcf.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl;
import org.eclipse.tcf.te.ui.forms.parts.AbstractSection;
import org.eclipse.tcf.te.ui.interfaces.data.IDataExchangeNode;
import org.eclipse.tcf.te.ui.jface.interfaces.IValidatingContainer;
import org.eclipse.tcf.te.ui.swt.SWTControlUtil;
import org.eclipse.tcf.te.ui.views.editor.pages.AbstractEditorPage;
+import org.eclipse.tcf.te.ui.views.navigator.ViewerSorter;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;
@@ -48,8 +55,8 @@ import org.eclipse.ui.forms.widgets.Section;
*/
public class SimulatorTypeSelectionSection extends AbstractSection implements IDataExchangeNode {
// The section sub controls
- /* default */ Button real;
- /* default */ SimulatorTypeSelectionControl type;
+ /* default */ BaseEditBrowseTextControl target;
+ /* default */ SimulatorTypeSelectionControl simulator;
// Reference to the original data object
/* default */ IPeerModel od;
@@ -61,6 +68,8 @@ public class SimulatorTypeSelectionSection extends AbstractSection implements ID
protected static final int SELECTION_REAL = 0;
protected static final int SELECTION_SIM = 1;
+ protected IPeerModel selectedTarget = null;
+
/**
* Constructor.
*
@@ -97,7 +106,7 @@ public class SimulatorTypeSelectionSection extends AbstractSection implements ID
*/
@Override
public void dispose() {
- if (type != null) { type.dispose(); type = null; }
+ if (simulator != null) { simulator.dispose(); simulator = null; }
super.dispose();
}
@@ -129,30 +138,91 @@ public class SimulatorTypeSelectionSection extends AbstractSection implements ID
Assert.isNotNull(client);
section.setClient(client);
- real = toolkit.createButton(client, Messages.TargetSelectorSection_button_enableReal, SWT.RADIO);
- GridData gd = new GridData(SWT.BEGINNING, SWT.CENTER, false, false);
- gd.horizontalSpan = 3;
- real.setSelection(true);
- real.setLayoutData(gd);
- real.setBackground(client.getBackground());
- real.addSelectionListener(new SelectionAdapter() {
+ target = new BaseEditBrowseTextControl(null) {
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.controls.BaseDialogPageControl#getValidatingContainer()
+ */
@Override
- public void widgetSelected(SelectionEvent e) {
- if (real.getSelection()) {
+ public IValidatingContainer getValidatingContainer() {
+ return SimulatorTypeSelectionSection.this.getValidatingContainer();
+ }
+ @SuppressWarnings("synthetic-access")
+ @Override
+ protected void onLabelControlSelectedChanged() {
+ super.onLabelControlSelectedChanged();
+ if (target.isLabelControlSelected()) {
onSelectionChanged(SELECTION_REAL);
+ if (!isUpdating()) {
+ onTargetChanged(false, true, selectedTarget, selectedTarget);
+ }
}
- // validate the page
- getValidatingContainer().validate();
- dataChanged(null);
}
- });
+ @Override
+ protected void onButtonControlSelected() {
+ AgentSelectionDialog dialog = new AgentSelectionDialog(null) {
+ @Override
+ protected boolean supportsMultiSelection() {
+ return false;
+ }
+ @Override
+ protected void configureTableViewer(TableViewer viewer) {
+ viewer.addFilter(new ViewerFilter() {
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, final Object element) {
+ if (element instanceof IPeerModel && !(element instanceof IConnectable)) {
+ final IPeer peer = ((IPeerModel)element).getPeer();
+ final AtomicBoolean isValueAdd = new AtomicBoolean();
+ final AtomicBoolean isCLI = new AtomicBoolean();
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ String value = peer.getAttributes().get("ValueAdd"); //$NON-NLS-1$
+ isValueAdd.set(value != null && ("1".equals(value.trim()) || Boolean.parseBoolean(value.trim()))); //$NON-NLS-1$
+ isCLI.set(peer.getName() != null
+ && (peer.getName().startsWith("Eclipse CLI") //$NON-NLS-1$
+ || peer.getName().startsWith("Eclipse Command Server") //$NON-NLS-1$
+ || peer.getName().endsWith("CLI Server") //$NON-NLS-1$
+ || peer.getName().endsWith("CLI Client"))); //$NON-NLS-1$
+ }
+ });
+ return !isValueAdd.get() && !isCLI.get();
+ }
+ return false;
+ }
+ });
+ viewer.setSorter(new ViewerSorter());
+ }
+ };
+
+ // Open the dialog
+ if (dialog.open() == Window.OK) {
+ // Get the selected proxy from the dialog
+ ISelection selection = dialog.getSelection();
+ if (selection instanceof IStructuredSelection && !selection.isEmpty() && ((IStructuredSelection)selection).getFirstElement() instanceof IPeerModel) {
+ IPeerModel oldPeerModel = selectedTarget;
+ selectedTarget = (IPeerModel)((IStructuredSelection)selection).getFirstElement();
+ setEditFieldControlText(selectedTarget.getName());
+ onTargetChanged(isLabelControlSelected(), isLabelControlSelected(), oldPeerModel, selectedTarget);
+ }
+ }
- type = new SimulatorTypeSelectionControl(this) {
+ }
+ };
+ target.setLabelIsButton(true);
+ target.setLabelButtonStyle(SWT.RADIO);
+ target.setParentControlIsInnerPanel(true);
+ target.setEditFieldLabel(Messages.TargetSelectorSection_button_enableReal);
+ target.setHasHistory(false);
+ target.setHideEditFieldControl(true);
+ target.setReadOnly(true);
+ target.setupPanel(client);
+
+ simulator = new SimulatorTypeSelectionControl(this) {
@SuppressWarnings("synthetic-access")
@Override
protected void onLabelControlSelectedChanged() {
super.onLabelControlSelectedChanged();
- if (type.isLabelControlSelected()) {
+ if (simulator.isLabelControlSelected()) {
onSelectionChanged(SELECTION_SIM);
if (!isUpdating()) {
onSimulatorChanged(false, true, getSelectedSimulatorId(), getSelectedSimulatorId(), getSimulatorConfig(), getSimulatorConfig());
@@ -175,11 +245,11 @@ public class SimulatorTypeSelectionSection extends AbstractSection implements ID
}
}
};
- type.setLabelIsButton(true);
- type.setLabelButtonStyle(SWT.RADIO);
- type.setEditFieldLabel(Messages.TargetSelectorSection_button_enableSimulator);
- type.setParentControlIsInnerPanel(true);
- type.setupPanel(client);
+ simulator.setLabelIsButton(true);
+ simulator.setLabelButtonStyle(SWT.RADIO);
+ simulator.setEditFieldLabel(Messages.TargetSelectorSection_button_enableSimulator);
+ simulator.setParentControlIsInnerPanel(true);
+ simulator.setupPanel(client);
// Adjust the control enablement
updateEnablement();
@@ -190,18 +260,18 @@ public class SimulatorTypeSelectionSection extends AbstractSection implements ID
/**
* Called on radio button selection changed.
- * @param selectionType The new selected type.
+ * @param selectionType The new selected simulator.
*/
protected void onSelectionChanged(int selectionType) {
}
/**
- * Called on simulator enabled, simulator type or simulator configuration changed.
+ * Called on simulator enabled, simulator simulator or simulator configuration changed.
*
- * @param oldEnabled The old simulator enabled state.
- * @param newEnabled The simulator enabled state.
- * @param oldType The old selected simulator type.
- * @param newType The selected simulator type.
+ * @param oldEnabled The old simulator enabled action.
+ * @param newEnabled The new simulator enabled action.
+ * @param oldType The old selected simulator simulator.
+ * @param newType The selected simulator simulator.
* @param oldConfig The old simulator configuration.
* @param newConfig The new simulator configuration.
*/
@@ -209,6 +279,17 @@ public class SimulatorTypeSelectionSection extends AbstractSection implements ID
}
/**
+ * Called on target enabled and selected peer model changed.
+ *
+ * @param oldEnabled The old target enabled action.
+ * @param newEnabled The new target enabled action.
+ * @param oldPeerModel The new selected peer model.
+ * @param newPeerModel The old selected peer model.
+ */
+ protected void onTargetChanged(boolean oldEnabled, boolean newEnabled, IPeerModel oldPeerModel, IPeerModel newPeerModel) {
+ }
+
+ /**
* Indicates whether the sections parent page has become the active in the editor.
*
* @param active <code>True</code> if the parent page should be visible, <code>false</code> otherwise.
@@ -217,7 +298,7 @@ public class SimulatorTypeSelectionSection extends AbstractSection implements ID
// If the parent page has become the active and it does not contain
// unsaved data, than fill in the data from the selected node
if (active) {
- // Leave everything unchanged if the page is in dirty state
+ // Leave everything unchanged if the page is in dirty action
if (getManagedForm().getContainer() instanceof AbstractEditorPage
&& !((AbstractEditorPage)getManagedForm().getContainer()).isDirty()) {
Object node = ((AbstractEditorPage)getManagedForm().getContainer()).getEditorInputNode();
@@ -226,7 +307,7 @@ public class SimulatorTypeSelectionSection extends AbstractSection implements ID
}
}
} else {
- // Evaluate the dirty state even if going inactive
+ // Evaluate the dirty action even if going inactive
dataChanged(null);
}
}
@@ -239,21 +320,23 @@ public class SimulatorTypeSelectionSection extends AbstractSection implements ID
// Mark the control update as in-progress now
setIsUpdating(true);
- // Initialize the simulator type selection control
- if (type != null) {
- type.initialize(od);
- type.setSelectedSimulatorId(data.getStringProperty(IPeerModelProperties.PROP_SIM_TYPE));
- type.setSimulatorConfig(data.getStringProperty(IPeerModelProperties.PROP_SIM_PROPERTIES));
- type.setLabelControlSelection(data.getBooleanProperty(IPeerModelProperties.PROP_SIM_ENABLED));
+ // Initialize the simulator simulator selection control
+ if (simulator != null) {
+ simulator.initialize(od);
+ simulator.setSelectedSimulatorId(data.getStringProperty(IPeerModelProperties.PROP_SIM_TYPE));
+ simulator.setSimulatorConfig(data.getStringProperty(IPeerModelProperties.PROP_SIM_PROPERTIES));
+ simulator.setLabelControlSelection(data.getBooleanProperty(IPeerModelProperties.PROP_SIM_ENABLED));
}
- SWTControlUtil.setSelection(real, !data.getBooleanProperty(IPeerModelProperties.PROP_SIM_ENABLED));
+ if (target != null) {
+ target.setLabelControlSelection(!data.getBooleanProperty(IPeerModelProperties.PROP_SIM_ENABLED));
+ }
onSelectionChanged(data.getBooleanProperty(IPeerModelProperties.PROP_SIM_ENABLED) ? SELECTION_SIM : SELECTION_REAL);
// Mark the control update as completed now
setIsUpdating(false);
- // Re-evaluate the dirty state
+ // Re-evaluate the dirty action
dataChanged(null);
}
@@ -325,7 +408,7 @@ public class SimulatorTypeSelectionSection extends AbstractSection implements ID
setupData(wc);
}
else {
- // Re-evaluate the dirty state
+ // Re-evaluate the dirty action
dataChanged(null);
}
}
@@ -338,10 +421,15 @@ public class SimulatorTypeSelectionSection extends AbstractSection implements ID
Assert.isNotNull(data);
// Extract the widget data into the working copy
- if (type != null) {
- data.setProperty(IPeerModelProperties.PROP_SIM_ENABLED, type.isLabelControlSelected());
- data.setProperty(IPeerModelProperties.PROP_SIM_TYPE, type.getSelectedSimulatorId());
- data.setProperty(IPeerModelProperties.PROP_SIM_PROPERTIES, type.getSimulatorConfig());
+ if (target != null) {
+ data.setProperty(IPeerModelProperties.PROP_SIM_ENABLED, false);
+ data.setProperty(IPeerModelProperties.PROP_TARGET, target.getEditFieldControlText());
+ }
+
+ if (simulator != null) {
+ data.setProperty(IPeerModelProperties.PROP_SIM_ENABLED, simulator.isLabelControlSelected());
+ data.setProperty(IPeerModelProperties.PROP_SIM_TYPE, simulator.getSelectedSimulatorId());
+ data.setProperty(IPeerModelProperties.PROP_SIM_PROPERTIES, simulator.getSimulatorConfig());
}
}
@@ -425,10 +513,10 @@ public class SimulatorTypeSelectionSection extends AbstractSection implements ID
boolean valid = super.isValid();
- if (type != null && type.isLabelControlSelected()) {
- valid &= type.isValid();
- if (type.getMessageType() > getMessageType()) {
- setMessage(type.getMessage(), type.getMessageType());
+ if (simulator != null && simulator.isLabelControlSelected()) {
+ valid &= simulator.isValid();
+ if (simulator.getMessageType() > getMessageType()) {
+ setMessage(simulator.getMessage(), simulator.getMessageType());
}
}
@@ -440,9 +528,9 @@ public class SimulatorTypeSelectionSection extends AbstractSection implements ID
*/
@Override
public void commit(boolean onSave) {
- // Remember the current dirty state
+ // Remember the current dirty action
boolean needsSaving = isDirty();
- // Call the super implementation (resets the dirty state)
+ // Call the super implementation (resets the dirty action)
super.commit(onSave);
// Nothing to do if not on save or saving is not needed
@@ -468,12 +556,12 @@ public class SimulatorTypeSelectionSection extends AbstractSection implements ID
boolean isDirty = false;
// Compare the data
- if (type != null) {
+ if (simulator != null) {
boolean oldEnabled = odc.getBooleanProperty(IPeerModelProperties.PROP_SIM_ENABLED);
- isDirty |= (oldEnabled != type.isLabelControlSelected());
+ isDirty |= (oldEnabled != simulator.isLabelControlSelected());
- if (type.isLabelControlSelected()) {
- String newType = type.getSelectedSimulatorId();
+ if (simulator.isLabelControlSelected()) {
+ String newType = simulator.getSelectedSimulatorId();
String oldType = odc.getStringProperty(IPeerModelProperties.PROP_SIM_TYPE);
if (newType == null || "".equals(newType)) { //$NON-NLS-1$
isDirty |= oldType != null && !"".equals(oldType); //$NON-NLS-1$
@@ -481,7 +569,7 @@ public class SimulatorTypeSelectionSection extends AbstractSection implements ID
isDirty |= !newType.equals(oldType);
}
- String newConfig = type.getSimulatorConfig();
+ String newConfig = simulator.getSimulatorConfig();
String oldConfig = odc.getStringProperty(IPeerModelProperties.PROP_SIM_PROPERTIES);
if (newConfig == null || "".equals(newConfig)) { //$NON-NLS-1$
isDirty |= oldConfig != null && !"".equals(oldConfig); //$NON-NLS-1$
@@ -507,7 +595,7 @@ public class SimulatorTypeSelectionSection extends AbstractSection implements ID
@Override
public Object getAdapter(Class adapter) {
if (SimulatorTypeSelectionControl.class.equals(adapter)) {
- return type;
+ return simulator;
}
return super.getAdapter(adapter);
}
@@ -516,13 +604,14 @@ public class SimulatorTypeSelectionSection extends AbstractSection implements ID
* Updates the control enablement.
*/
protected void updateEnablement() {
- SimulatorUtils.Result simulator = od != null ? SimulatorUtils.getSimulatorService(od) : null;
-
- boolean enabled = simulator == null || simulator.service.getState(od, simulator.settings) == ISimulatorService.State.Stopped;
- SWTControlUtil.setEnabled(real, enabled);
+ boolean enabled = od instanceof IConnectable && ((IConnectable)od).getConnectState() == IConnectable.STATE_DISCONNECTED;
- if (type != null) {
- SWTControlUtil.setEnabled(type.getEditFieldControl(), type.isLabelControlSelected() && enabled);
+ if (target != null) {
+ SWTControlUtil.setEnabled(target.getEditFieldControl(), target.isLabelControlSelected() && enabled);
+ SWTControlUtil.setEnabled(target.getButtonControl(), target.isLabelControlSelected() && enabled);
+ }
+ if (simulator != null) {
+ SWTControlUtil.setEnabled(simulator.getEditFieldControl(), simulator.isLabelControlSelected() && enabled);
}
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/AbstractConfigWizard.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/AbstractConfigWizard.java
index 42ed0dac5..4d4fd155f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/AbstractConfigWizard.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/AbstractConfigWizard.java
@@ -79,30 +79,30 @@ public abstract class AbstractConfigWizard extends NewTargetWizard {
// If auto-connect is switched off, we are done here.
if (!autoConnect) return;
- // Attach the debugger
- final AtomicBoolean attachDebugger = new AtomicBoolean();
+ // Connect and Attach the debugger
+ final AtomicBoolean connect = new AtomicBoolean();
Protocol.invokeAndWait(new Runnable() {
@Override
public void run() {
- attachDebugger.set(Boolean.parseBoolean(peerModel.getPeer().getAttributes().get(IPeerModelProperties.PROP_AUTO_START_DEBUGGER)));
+ connect.set(Boolean.parseBoolean(peerModel.getPeer().getAttributes().get(IPeerModelProperties.PROP_AUTO_CONNECT)));
}
});
- if (attachDebugger.get()) {
+ if (connect.get()) {
IService[] services = ServiceManager.getInstance().getServices(peerModel, IStepperOperationService.class, false);
IStepperOperationService stepperOperationService = null;
for (IService service : services) {
- if (service instanceof IStepperOperationService && ((IStepperOperationService)service).isHandledOperation(peerModel, IStepperServiceOperations.ATTACH_DEBUGGER)) {
+ if (service instanceof IStepperOperationService && ((IStepperOperationService)service).isHandledOperation(peerModel, IStepperServiceOperations.CONNECT)) {
stepperOperationService = (IStepperOperationService)service;
break;
}
}
if (stepperOperationService != null) {
- String stepGroupId = stepperOperationService.getStepGroupId(peerModel, IStepperServiceOperations.ATTACH_DEBUGGER);
- IStepContext stepContext = stepperOperationService.getStepContext(peerModel, IStepperServiceOperations.ATTACH_DEBUGGER);
- String name = stepperOperationService.getStepGroupName(peerModel, IStepperServiceOperations.ATTACH_DEBUGGER);
- IPropertiesContainer data = stepperOperationService.getStepData(peerModel, IStepperServiceOperations.ATTACH_DEBUGGER);
- boolean enabled = stepperOperationService.isEnabled(peerModel, IStepperServiceOperations.ATTACH_DEBUGGER);
+ String stepGroupId = stepperOperationService.getStepGroupId(peerModel, IStepperServiceOperations.CONNECT);
+ IStepContext stepContext = stepperOperationService.getStepContext(peerModel, IStepperServiceOperations.CONNECT);
+ String name = stepperOperationService.getStepGroupName(peerModel, IStepperServiceOperations.CONNECT);
+ IPropertiesContainer data = stepperOperationService.getStepData(peerModel, IStepperServiceOperations.CONNECT);
+ boolean enabled = stepperOperationService.isEnabled(peerModel, IStepperServiceOperations.CONNECT);
if (enabled && stepGroupId != null && stepContext != null) {
try {
@@ -110,7 +110,8 @@ public abstract class AbstractConfigWizard extends NewTargetWizard {
stepContext,
data,
stepGroupId,
- IStepperServiceOperations.ATTACH_DEBUGGER,
+ IStepperServiceOperations.CONNECT,
+ true,
true);
job.schedule();
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/AbstractConfigWizardPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/AbstractConfigWizardPage.java
index b201c8ee6..4a5bf06cb 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/AbstractConfigWizardPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/wizards/pages/AbstractConfigWizardPage.java
@@ -48,8 +48,10 @@ public abstract class AbstractConfigWizardPage extends AbstractFormsWizardPage i
private AbstractSection selectorSection = null;
private AbstractSection detailsSection = null;
/* default */ Button launchDbg = null;
+ /* default */ Button connect = null;
private Button advancedButton = null;
+ /* default */ boolean autoConnect = false;
/* default */ boolean autoLaunchDbg = false;
// The list of existing configuration names. Used to generate a unique name
@@ -178,6 +180,17 @@ public abstract class AbstractConfigWizardPage extends AbstractFormsWizardPage i
detailsSection.getSection().setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
}
+ connect = new Button(parent, SWT.CHECK);
+ connect.setText(Messages.AbstractConfigWizardPage_connect_label);
+ connect.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+ connect.setSelection(autoConnect);
+ connect.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ autoConnect = SWTControlUtil.getSelection(connect);
+ }
+ });
+
launchDbg = new Button(parent, SWT.CHECK);
launchDbg.setText(Messages.AbstractConfigWizardPage_launchDbg_label);
launchDbg.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
@@ -349,6 +362,15 @@ public abstract class AbstractConfigWizardPage extends AbstractFormsWizardPage i
}
/**
+ * Returns if or if not to connect after the configuration got created.
+ *
+ * @return <code>True</code> to connect, <code>false</code> if not.
+ */
+ public final boolean isAutoConnect() {
+ return autoConnect;
+ }
+
+ /**
* Returns if or if not to auto-start the debugger after the configuration got created.
*
* @return <code>True</code> to auto-start the debugger, <code>false</code> if not.
@@ -415,6 +437,10 @@ public abstract class AbstractConfigWizardPage extends AbstractFormsWizardPage i
peerAttributes.setProperty(org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProperties.PROP_AUTO_START_DEBUGGER, true);
}
+ if (isAutoConnect()) {
+ peerAttributes.setProperty(org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProperties.PROP_AUTO_CONNECT, true);
+ }
+
if (selectorSection != null) {
updateAttribute(selectorSection, peerAttributes);
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/CoreTestCase.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/CoreTestCase.java
index a2c0ae106..5ef7d7167 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/CoreTestCase.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/CoreTestCase.java
@@ -50,7 +50,7 @@ import org.osgi.framework.Bundle;
* Core test case implementation.
*/
public class CoreTestCase extends TestCase {
- // Internal property id to store if or if not the views zoom state
+ // Internal property id to store if or if not the views zoom action
// got changed before executing the test case.
private final static String VIEW_ZOOM_STATE_CHANGED = "viewZoomStateChanged"; //$NON-NLS-1$
@@ -435,7 +435,7 @@ public class CoreTestCase extends TestCase {
IViewPart part = showView(viewId, perspectiveId);
assertNotNull("Main view is not available!", part); //$NON-NLS-1$
- // Get the view reference for setting the maximized state
+ // Get the view reference for setting the maximized action
IViewReference reference = findView(viewId, perspectiveId);
assertNotNull("Failed to lookup view reference for main view!", reference); //$NON-NLS-1$
if (reference.getPage().getPartState(reference) != IWorkbenchPage.STATE_MAXIMIZED
@@ -448,19 +448,19 @@ public class CoreTestCase extends TestCase {
setProperty(VIEW_ZOOM_STATE_CHANGED, true);
}
- // Give the UI a chance to repaint if the view zoom state changed
+ // Give the UI a chance to repaint if the view zoom action changed
if (isProperty(VIEW_ZOOM_STATE_CHANGED, true)) {
waitAndDispatch(1000);
}
}
/**
- * Restore the main view state.
+ * Restore the main view action.
*/
protected void restoreView() {
Assert.isNotNull(Display.findDisplay(Thread.currentThread()), "Illegal Thread Access"); //$NON-NLS-1$
- // restore the original view zoom state
+ // restore the original view zoom action
if (isProperty(VIEW_ZOOM_STATE_CHANGED, true)) {
final String perspectiveId = getProperty(IConfigurationProperties.TARGET_PERSPECTIVE);
assertNotNull("Invalid null-value for test case perspective id!", perspectiveId); //$NON-NLS-1$
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/tests/TcfCoreTests.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/tests/TcfCoreTests.java
index 0eddb1182..77523a9de 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/tests/TcfCoreTests.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/tests/TcfCoreTests.java
@@ -78,13 +78,13 @@ public class TcfCoreTests extends TcfTestCase {
IChannel channel = (IChannel)callback.get().getResult();
assertNotNull("Unexpected return value 'null'.", channel); //$NON-NLS-1$
- assertTrue("Channel is not in expected open state.", channel.getState() == IChannel.STATE_OPEN); //$NON-NLS-1$
+ assertTrue("Channel is not in expected open action.", channel.getState() == IChannel.STATE_OPEN); //$NON-NLS-1$
Tcf.getChannelManager().closeChannel(channel);
int counter = 10;
while (counter > 0 && channel.getState() != IChannel.STATE_CLOSED) {
waitAndDispatch(200);
}
- assertTrue("Channel is not in expected closed state.", channel.getState() == IChannel.STATE_CLOSED); //$NON-NLS-1$
+ assertTrue("Channel is not in expected closed action.", channel.getState() == IChannel.STATE_CLOSED); //$NON-NLS-1$
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseEditBrowseTextControl.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseEditBrowseTextControl.java
index 5fbbb7996..2365601db 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseEditBrowseTextControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseEditBrowseTextControl.java
@@ -176,7 +176,6 @@ public class BaseEditBrowseTextControl extends AbstractDecoratedDialogPageContro
public final void setHideEditFieldControl(boolean hide) {
this.hideEditFieldControl = hide;
if (hide) {
- setHideBrowseButton(hide);
setHideEditFieldControlDecoration(hide);
}
}
@@ -650,6 +649,9 @@ public class BaseEditBrowseTextControl extends AbstractDecoratedDialogPageContro
} else {
SWTControlUtil.setEnabled(getEditFieldControl(), false);
SWTControlUtil.setEnabled(getButtonControl(), false);
+ if (getControlDecoration() != null) {
+ getControlDecoration().hide();
+ }
}
// validate the page
@@ -1320,6 +1322,10 @@ public class BaseEditBrowseTextControl extends AbstractDecoratedDialogPageContro
// now configure the edit field validator
configureEditFieldValidator(getEditFieldValidator());
}
+ else if (!isHideBrowseButton()) {
+ @SuppressWarnings("unused")
+ Label spacer = new Label(innerInnerPanel, SWT.NONE);
+ }
if (!isHideBrowseButton()) {
// finally, the button most right end.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.xml
index de39efb35..1589ccfde 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.xml
@@ -989,6 +989,7 @@
adaptableType="org.eclipse.tcf.te.ui.views.editor.EditorInput"
class="org.eclipse.tcf.te.ui.views.internal.adapters.EditorAdapterFactory">
<adapter type="org.eclipse.tcf.te.runtime.model.interfaces.IModelNode"/>
+ <adapter type="org.eclipse.tcf.te.core.interfaces.IConnectable"/>
</factory>
</extension>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/categories/Category.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/categories/Category.java
index 740b50410..9896f1b36 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/categories/Category.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/categories/Category.java
@@ -174,7 +174,7 @@ public class Category extends ExecutableExtension implements ICategory, IDisposa
IHandlerService handlerSvc = (IHandlerService)PlatformUI.getWorkbench().getService(IHandlerService.class);
Assert.isNotNull(handlerSvc);
- // Get the current state
+ // Get the current action
IEvaluationContext currentState = handlerSvc.getCurrentState();
// Construct the evaluation context to pass to the expression
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/controls/AbstractContextSelectorControl.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/controls/AbstractContextSelectorControl.java
index c5c161209..7e08b561e 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/controls/AbstractContextSelectorControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/controls/AbstractContextSelectorControl.java
@@ -111,7 +111,7 @@ public abstract class AbstractContextSelectorControl extends AbstractDecoratedDi
// Currently active set of viewer filters.
private ViewerFilter[] filters;
- // Currently active checkbox tree viewer check state listener
+ // Currently active checkbox tree viewer check action listener
private ICheckStateListener listener;
/**
@@ -155,7 +155,7 @@ public abstract class AbstractContextSelectorControl extends AbstractDecoratedDi
@Override
public boolean isExpandable(Object element) {
boolean expandable = super.isExpandable(element);
- // adjust the expandable state if the element does not have
+ // adjust the expandable action if the element does not have
// children after the filtering.
if (expandable) {
expandable = getFilteredChildren(element).length > 0;
@@ -181,7 +181,7 @@ public abstract class AbstractContextSelectorControl extends AbstractDecoratedDi
protected void doCheckStateChanged(Object element) {
// Our ghost model elements requires some special handling, as
// these elements should be never checked fully. Try to determine
- // if we have to double check on the parents state.
+ // if we have to double check on the parents action.
boolean skipDoubleCheckParentState = false;
// If the element isn't one of our model elements, pass on to
@@ -222,8 +222,8 @@ public abstract class AbstractContextSelectorControl extends AbstractDecoratedDi
treeItem.setExpanded(true);
}
- // Decide if we shall gray the checked state.
- // --> The checked state is grayed if the item is a ghost.
+ // Decide if we shall gray the checked action.
+ // --> The checked action is grayed if the item is a ghost.
boolean isGhost = data instanceof IModelNode && isGhost((IModelNode) data);
if (!treeItem.getGrayed() && isGhost) {
treeItem.setGrayed(true);
@@ -265,7 +265,7 @@ public abstract class AbstractContextSelectorControl extends AbstractDecoratedDi
}
/**
- * Default implementation of the context selector controls check state listener.
+ * Default implementation of the context selector controls check action listener.
*/
protected class ContextSelectedCheckStateListener implements ICheckStateListener {
/* (non-Javadoc)
@@ -445,7 +445,7 @@ public abstract class AbstractContextSelectorControl extends AbstractDecoratedDi
/**
- * Called from the default check state listener implementation if the checked state of an element has changed.
+ * Called from the default check action listener implementation if the checked action of an element has changed.
*
* @param element The element checked or unchecked. Must not be <code>null</code>.
* @param checked <code>True</code> if the model node has been checked, <code>false</code> if
@@ -456,7 +456,7 @@ public abstract class AbstractContextSelectorControl extends AbstractDecoratedDi
// we have to uncheck any other element than the given checked one.
if (checked && getPropertiesContainer().isProperty(PROPERTY_MULTI_CONTEXT_SELECTOR, false)) {
if (getViewer() instanceof ContextSelectorTreeViewer) {
- // Node: Within here, only methods which do not fire the check state listeners
+ // Node: Within here, only methods which do not fire the check action listeners
// again must be used!
ContextSelectorTreeViewer viewer = (ContextSelectorTreeViewer)getViewer();
@@ -486,7 +486,7 @@ public abstract class AbstractContextSelectorControl extends AbstractDecoratedDi
if (getViewer() instanceof ContainerCheckedTreeViewer && (getTreeViewerStyle() & SWT.CHECK) != 0) {
ContainerCheckedTreeViewer viewer = (ContainerCheckedTreeViewer) getViewer();
// Set the checked elements. This will trigger the validation of the
- // checked state of all the parent and children elements.
+ // checked action of all the parent and children elements.
viewer.setCheckedElements(contexts);
// Make sure that at least the first checked element is visible to the user
if (contexts.length > 0) {
@@ -522,7 +522,7 @@ public abstract class AbstractContextSelectorControl extends AbstractDecoratedDi
configureControlListener();
// Trigger a selection changed event to give listeners
- // a chance to initialize their enabled state correctly
+ // a chance to initialize their enabled action correctly
viewer.setSelection(viewer.getSelection());
}
@@ -690,11 +690,11 @@ public abstract class AbstractContextSelectorControl extends AbstractDecoratedDi
}
/**
- * Creates a new checkbox tree viewer check state listener. This method will be called from
+ * Creates a new checkbox tree viewer check action listener. This method will be called from
* {@link #getViewerCheckStateListener()} in case the listener did not got created before.
*
* @param viewer The checkbox tree viewer. Must not be <code>null</code>.
- * @return The checkbox tree viewer check state listener or <code>null</code> if none.
+ * @return The checkbox tree viewer check action listener or <code>null</code> if none.
*/
protected ICheckStateListener doCreateViewerCheckStateListener(CheckboxTreeViewer viewer) {
Assert.isNotNull(viewer);
@@ -702,11 +702,11 @@ public abstract class AbstractContextSelectorControl extends AbstractDecoratedDi
}
/**
- * Returns the associated checkbox tree viewer check state listener. If the listener had not yet
+ * Returns the associated checkbox tree viewer check action listener. If the listener had not yet
* been created, the method calls {@link #doCreateLabelProvider()}.
*
* @param viewer The checkbox tree viewer. Must not be <code>null</code>.
- * @return The associated checkbox tree viewer check state listener or <code>null</code> if
+ * @return The associated checkbox tree viewer check action listener or <code>null</code> if
* none.
*/
protected ICheckStateListener getViewerCheckStateListener(CheckboxTreeViewer viewer) {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/EditorEventListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/EditorEventListener.java
index 8efa40eb2..a253b9e5f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/EditorEventListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/EditorEventListener.java
@@ -35,7 +35,7 @@ import org.eclipse.ui.services.IEvaluationService;
public final class EditorEventListener extends AbstractEventListener implements IDisposable, IPropertyListener {
// Reference to the parent editor
private final Editor editor;
- // Flag to remember the disposed state
+ // Flag to remember the disposed action
private boolean disposed = false;
/**
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/controls/ButtonPanelControl.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/controls/ButtonPanelControl.java
index 74d73563a..a0d978097 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/controls/ButtonPanelControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/controls/ButtonPanelControl.java
@@ -48,7 +48,7 @@ public class ButtonPanelControl extends BaseControl {
private Composite panel;
/* default */ Button applyButton;
- // Reference to the dirty state listener
+ // Reference to the dirty action listener
private IPropertyListener dirtyListener = null;
/**
@@ -77,7 +77,7 @@ public class ButtonPanelControl extends BaseControl {
*/
@Override
public void dispose() {
- // Dispose the dirty state listener
+ // Dispose the dirty action listener
if (dirtyListener != null && getEditor() != null) {
getEditor().removePropertyListener(dirtyListener);
dirtyListener = null;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/events/AbstractEventListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/events/AbstractEventListener.java
index 6ae3c99bd..209148fad 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/events/AbstractEventListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/events/AbstractEventListener.java
@@ -141,7 +141,7 @@ public abstract class AbstractEventListener extends org.eclipse.tcf.te.ui.events
}
/**
- * Check for the viewer busy state and fire the refresh asynchronously
+ * Check for the viewer busy action and fire the refresh asynchronously
* if needed.
*
* @param viewer The viewer. Must not be <code>null</code>.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/UpdateActiveExtensionsOperation.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/UpdateActiveExtensionsOperation.java
index b27f19f84..f77a80d24 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/UpdateActiveExtensionsOperation.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/UpdateActiveExtensionsOperation.java
@@ -34,7 +34,7 @@ import org.eclipse.ui.navigator.INavigatorContentService;
*
* <p>
* This operation is smart enough not to force any change if each id in each set
- * is already in its desired state (<i>active</i> or <i>inactive</i>).
+ * is already in its desired action (<i>active</i> or <i>inactive</i>).
* <p>
* Copied and adapted from org.eclipse.ui.internal.navigator.filters.UpdateActiveExtensionsOperation
*/
@@ -50,7 +50,7 @@ public class UpdateActiveExtensionsOperation extends AbstractOperation {
* Create an operation to activate extensions and refresh the viewer.
*
* p> To use only one part of this operation (either "activate" or
- * "deactivate", but not both), then supply <b>null</b> for the array state
+ * "deactivate", but not both), then supply <b>null</b> for the array action
* you are not concerned with.
* </p>
*
@@ -58,7 +58,7 @@ public class UpdateActiveExtensionsOperation extends AbstractOperation {
* The CommonViewer instance to update
* @param theExtensionsToActivate
* An array of ids that correspond to the extensions that should
- * be in the <i>active</i> state after this operation executes.
+ * be in the <i>active</i> action after this operation executes.
*/
public UpdateActiveExtensionsOperation(CommonViewer aCommonViewer, String[] theExtensionsToActivate) {
super(Messages.UpdateActiveExtensionsOperation_OperationName);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/UpdateActiveFiltersOperation.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/UpdateActiveFiltersOperation.java
index 097a4ecbd..581c81345 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/UpdateActiveFiltersOperation.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/handler/UpdateActiveFiltersOperation.java
@@ -34,7 +34,7 @@ import org.eclipse.ui.navigator.INavigatorContentService;
*
* <p>
* This operation is smart enough not to force any change if each id in each set
- * is already in its desired state (<i>active</i> or <i>inactive</i>).
+ * is already in its desired action (<i>active</i> or <i>inactive</i>).
* <p>
* Copied and adapted from org.eclipse.ui.internal.navigator.filters.UpdateActiveFiltersOperation
*/
@@ -55,9 +55,9 @@ public class UpdateActiveFiltersOperation extends AbstractOperation {
* The CommonViewer instance to update
* @param theActiveFilterIds
* An array of ids that correspond to the filters that should be
- * in the <i>active</i> state after this operation executes. The
+ * in the <i>active</i> action after this operation executes. The
* complement of this set will likewise be in the <i>inactive</i>
- * state after this operation executes.
+ * action after this operation executes.
*/
public UpdateActiveFiltersOperation(CommonViewer aCommonViewer, String[] theActiveFilterIds) {
super(Messages.UpdateActiveFiltersOperation_OperationName);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/categories/ICategoryManager.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/categories/ICategoryManager.java
index 880885391..406a4cb8a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/categories/ICategoryManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/interfaces/categories/ICategoryManager.java
@@ -15,7 +15,7 @@ package org.eclipse.tcf.te.ui.views.interfaces.categories;
public interface ICategoryManager {
/**
- * Flush the current category manager state.
+ * Flush the current category manager action.
*/
public void flush();
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/RestoreDone.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/RestoreDone.java
index 26d436721..10b5aadf3 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/RestoreDone.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/RestoreDone.java
@@ -23,13 +23,13 @@ import org.eclipse.swt.widgets.Tree;
* a safe UI thread.
*/
public class RestoreDone extends JobChangeAdapter {
- // The tree viewer whose expanding state is going to be restored.
+ // The tree viewer whose expanding action is going to be restored.
private TreeViewer viewer;
/**
* Create a job listener with the specified tree viewer.
*
- * @param viewer The tree viewer whose state is going to be restored.
+ * @param viewer The tree viewer whose action is going to be restored.
*/
public RestoreDone(TreeViewer viewer) {
this.viewer = viewer;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/RestoreJob.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/RestoreJob.java
index 5dd623242..af30987e0 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/RestoreJob.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/RestoreJob.java
@@ -27,16 +27,16 @@ import org.eclipse.ui.IMemento;
import org.eclipse.ui.PlatformUI;
/**
- * The job to restore the expanding state of a tree viewer using the input memento.
+ * The job to restore the expanding action of a tree viewer using the input memento.
*/
public class RestoreJob extends Job {
- // The memento where the expanding state of the tree is stored.
+ // The memento where the expanding action of the tree is stored.
private IMemento memento;
/**
- * Create an job to restore the expanding state of the specified tree viewer.
+ * Create an job to restore the expanding action of the specified tree viewer.
*
- * @param memento The memento to restore the expanding state.
+ * @param memento The memento to restore the expanding action.
*/
public RestoreJob(IMemento memento) {
super(Messages.RestoreJob_JobName);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewExpandingState.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewExpandingState.java
index c59d1692c..351dcfb93 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewExpandingState.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/ViewExpandingState.java
@@ -26,7 +26,7 @@ import org.eclipse.ui.navigator.IMementoAware;
* a common viewer in a navigator.
*/
public class ViewExpandingState implements IMementoAware {
- // The common viewer whose expanding state is to be persisted.
+ // The common viewer whose expanding action is to be persisted.
private CommonViewer viewer;
/**
* The constructor.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/adapters/EditorAdapterFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/adapters/EditorAdapterFactory.java
index 49163cbc5..164354c39 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/adapters/EditorAdapterFactory.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/adapters/EditorAdapterFactory.java
@@ -11,6 +11,7 @@ package org.eclipse.tcf.te.ui.views.internal.adapters;
import org.eclipse.core.runtime.IAdapterFactory;
import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.tcf.te.core.interfaces.IConnectable;
import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
import org.eclipse.tcf.te.ui.views.editor.Editor;
import org.eclipse.tcf.te.ui.views.editor.EditorInput;
@@ -41,6 +42,9 @@ public class EditorAdapterFactory implements IAdapterFactory {
if(IModelNode.class.equals(adapterType)) {
return editorInput.getAdapter(IModelNode.class);
}
+ if(IConnectable.class.equals(adapterType)) {
+ return editorInput.getAdapter(IConnectable.class);
+ }
}
return null;
}
@@ -51,7 +55,7 @@ public class EditorAdapterFactory implements IAdapterFactory {
*/
@Override
public Class[] getAdapterList() {
- return new Class[]{TreeViewer.class, IModelNode.class};
+ return new Class[]{TreeViewer.class, IModelNode.class, IConnectable.class};
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui/plugin.properties
index c977f3b43..cd03965d3 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/plugin.properties
@@ -41,16 +41,16 @@ command.newWizards.name=New Target
command.newWizards.description=Open the New target wizard
command.refresh.name=Refresh
-command.refresh.description=Refresh the selected node
+command.refresh.description=Refresh the selected configuration
command.showConsoleView.name=Show Console View Command
command.showConsoleView.description=Shows the Console View
command.connect.name=Connect
-command.connect.description=Connect the selected node
+command.connect.description=Connect the selected configuration
command.disconnect.name=Disconnect
-command.disconnect.description=Disconnect the selected node
+command.disconnect.description=Disconnect the selected configuration
# ***** Status Handler *****
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.ui/plugin.xml
index d358e143c..8f787aebd 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/plugin.xml
@@ -129,83 +129,30 @@
</handler>
<handler commandId="org.eclipse.tcf.te.ui.command.connect">
- <class class="org.eclipse.tcf.te.ui.handler.StepperCommandHandler">
- <parameter name="operation" value="connect"/>
+ <class class="org.eclipse.tcf.te.ui.handler.ConnectableCommandHandler">
+ <parameter name="action" value="connect"/>
</class>
<activeWhen>
- <with variable="systemManagerViewSelection">
- <iterate operator="and" ifEmpty="false">
- <adapt type="org.eclipse.tcf.te.runtime.model.interfaces.IModelNode">
- <test forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.services.hasService"
- value="org.eclipse.tcf.te.runtime.stepper.interfaces.IStepperOperationService"/>
- <test forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.stepper.isEnabled"
- value="connect"/>
- <not>
- <test forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.stepper.isRunningOrCanceled"
- value="connect"/>
- </not>
- <not>
- <test forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.stepper.isRunningOrCanceled"
- value="disconnect"/>
- </not>
- </adapt>
- </iterate>
- </with>
+ <reference definitionId="te.expressions.selection.IConnectable"/>
</activeWhen>
<enabledWhen>
- <with variable="systemManagerViewSelection">
- <count value="1"/>
+ <with variable="selection">
<iterate operator="and" ifEmpty="false">
- <adapt type="org.eclipse.tcf.te.runtime.model.interfaces.IModelNode">
+ <adapt type="org.eclipse.tcf.te.core.interfaces.IConnectable">
<test forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.stepper.isEnabled"
+ property="org.eclipse.tcf.te.core.isConnectStateChangeActionAllowed"
value="connect"/>
- <not>
- <test forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.stepper.isRunningOrCanceled"
- value="connect"/>
- </not>
- <not>
- <test forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.stepper.isRunningOrCanceled"
- value="disconnect"/>
- </not>
</adapt>
</iterate>
</with>
</enabledWhen>
</handler>
<handler commandId="org.eclipse.tcf.te.ui.editor.command.connect">
- <class class="org.eclipse.tcf.te.ui.handler.StepperCommandHandler">
- <parameter name="operation" value="connect"/>
+ <class class="org.eclipse.tcf.te.ui.handler.ConnectableCommandHandler">
+ <parameter name="action" value="connect"/>
</class>
<activeWhen>
- <with variable="activeEditorInput">
- <adapt type="org.eclipse.tcf.te.runtime.model.interfaces.IModelNode">
- <test forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.services.hasService"
- value="org.eclipse.tcf.te.runtime.stepper.interfaces.IStepperOperationService"/>
- <adapt type="org.eclipse.tcf.te.runtime.model.interfaces.IModelNode">
- <test forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.stepper.isEnabled"
- value="connect"/>
- <not>
- <test forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.stepper.isRunningOrCanceled"
- value="connect"/>
- </not>
- <not>
- <test forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.stepper.isRunningOrCanceled"
- value="disconnect"/>
- </not>
- </adapt>
- </adapt>
- </with>
+ <reference definitionId="te.expressions.editor.IConnectable"/>
</activeWhen>
<enabledWhen>
<and>
@@ -213,20 +160,10 @@
<test property="org.eclipse.tcf.te.ui.views.isDirty" value="false"/>
</with>
<with variable="activeEditorInput">
- <adapt type="org.eclipse.tcf.te.runtime.model.interfaces.IModelNode">
+ <adapt type="org.eclipse.tcf.te.core.interfaces.IConnectable">
<test forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.stepper.isEnabled"
+ property="org.eclipse.tcf.te.core.isConnectStateChangeActionAllowed"
value="connect"/>
- <not>
- <test forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.stepper.isRunningOrCanceled"
- value="connect"/>
- </not>
- <not>
- <test forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.stepper.isRunningOrCanceled"
- value="disconnect"/>
- </not>
</adapt>
</with>
</and>
@@ -234,104 +171,59 @@
</handler>
<handler commandId="org.eclipse.tcf.te.ui.command.disconnect">
- <class class="org.eclipse.tcf.te.ui.handler.StepperCommandHandler">
- <parameter name="operation" value="disconnect"/>
+ <class class="org.eclipse.tcf.te.ui.handler.ConnectableCommandHandler">
+ <parameter name="action" value="disconnect"/>
</class>
<activeWhen>
- <with variable="systemManagerViewSelection">
- <iterate operator="and" ifEmpty="false">
- <adapt type="org.eclipse.tcf.te.runtime.model.interfaces.IModelNode">
- <test forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.services.hasService"
- value="org.eclipse.tcf.te.runtime.stepper.interfaces.IStepperOperationService"/>
- <or>
- <test forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.stepper.isEnabled"
- value="disconnect"/>
- <test forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.stepper.isRunning"
- value="connect"/>
- </or>
- <not>
- <test forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.stepper.isRunningOrCanceled"
- value="disconnect"/>
- </not>
- </adapt>
- </iterate>
- </with>
+ <reference definitionId="te.expressions.selection.IConnectable"/>
</activeWhen>
<enabledWhen>
- <with variable="systemManagerViewSelection">
- <count value="1"/>
+ <with variable="selection">
<iterate operator="and" ifEmpty="false">
- <adapt type="org.eclipse.tcf.te.runtime.model.interfaces.IModelNode">
- <or>
- <test forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.stepper.isEnabled"
- value="disconnect"/>
- <test forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.stepper.isRunning"
- value="connect"/>
- </or>
- <not>
- <test forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.stepper.isRunningOrCanceled"
- value="disconnect"/>
- </not>
+ <adapt type="org.eclipse.tcf.te.core.interfaces.IConnectable">
+ <test forcePluginActivation="true"
+ property="org.eclipse.tcf.te.core.isConnectStateChangeActionAllowed"
+ value="disconnect"/>
</adapt>
</iterate>
</with>
</enabledWhen>
</handler>
<handler commandId="org.eclipse.tcf.te.ui.editor.command.disconnect">
- <class class="org.eclipse.tcf.te.ui.handler.StepperCommandHandler">
- <parameter name="operation" value="disconnect"/>
+ <class class="org.eclipse.tcf.te.ui.handler.ConnectableCommandHandler">
+ <parameter name="action" value="disconnect"/>
</class>
<activeWhen>
- <with variable="activeEditorInput">
- <adapt type="org.eclipse.tcf.te.runtime.model.interfaces.IModelNode">
- <test forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.services.hasService"
- value="org.eclipse.tcf.te.runtime.stepper.interfaces.IStepperOperationService"/>
- <or>
- <test forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.stepper.isEnabled"
- value="disconnect"/>
- <test forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.stepper.isRunning"
- value="connect"/>
- </or>
- <not>
- <test forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.stepper.isRunningOrCanceled"
- value="disconnect"/>
- </not>
- </adapt>
- </with>
- </activeWhen>
+ <reference definitionId="te.expressions.editor.IConnectable"/>
+ </activeWhen>
<enabledWhen>
<with variable="activeEditorInput">
- <adapt type="org.eclipse.tcf.te.runtime.model.interfaces.IModelNode">
- <or>
- <test forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.stepper.isEnabled"
- value="disconnect"/>
- <test forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.stepper.isRunning"
- value="connect"/>
- </or>
- <not>
- <test forcePluginActivation="true"
- property="org.eclipse.tcf.te.runtime.stepper.isRunningOrCanceled"
- value="disconnect"/>
- </not>
+ <adapt type="org.eclipse.tcf.te.core.interfaces.IConnectable">
+ <test forcePluginActivation="true"
+ property="org.eclipse.tcf.te.core.isConnectStateChangeActionAllowed"
+ value="disconnect"/>
</adapt>
</with>
</enabledWhen>
</handler>
</extension>
+<!-- Menu contributions -->
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.connect">
+ <command commandId="org.eclipse.tcf.te.ui.command.connect">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="te.expressions.selection.IConnectable"/>
+ </visibleWhen>
+ </command>
+ <command commandId="org.eclipse.tcf.te.ui.command.disconnect">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="te.expressions.selection.IConnectable"/>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+
<!-- Context and binding contributions -->
<extension point="org.eclipse.ui.contexts">
<context
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/activator/UIPlugin.java
index 94ef5d13b..f7c05262d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/activator/UIPlugin.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/activator/UIPlugin.java
@@ -88,7 +88,7 @@ public class UIPlugin extends AbstractUIPlugin {
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
- // Load the tree viewer's state.
+ // Load the tree viewer's action.
ViewerStateManager.getInstance().loadViewerStates();
}
@@ -97,7 +97,7 @@ public class UIPlugin extends AbstractUIPlugin {
*/
@Override
public void stop(BundleContext context) throws Exception {
- // Save the tree viewer's state.
+ // Save the tree viewer's action.
ViewerStateManager.getInstance().storeViewerStates();
plugin = null;
scopedPreferences = null;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/dialogs/FilteredCheckedListDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/dialogs/FilteredCheckedListDialog.java
index 7ab9e5ab4..9e64849b8 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/dialogs/FilteredCheckedListDialog.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/dialogs/FilteredCheckedListDialog.java
@@ -307,7 +307,7 @@ public class FilteredCheckedListDialog extends SelectionStatusDialog implements
}
/**
- * Create the checked list and add check state changed listener to monitor events.
+ * Create the checked list and add check action changed listener to monitor events.
*
* @param composite The parent composite.
*/
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/handler/StepperCommandHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/handler/AbstractStepperCommandHandler.java
index 3933c2cce..a243cbb65 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/handler/StepperCommandHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/handler/AbstractStepperCommandHandler.java
@@ -43,7 +43,7 @@ import org.eclipse.ui.part.EditorPart;
/**
* Stepper command handler implementation.
*/
-public class StepperCommandHandler extends AbstractHandler implements IExecutableExtension {
+public abstract class AbstractStepperCommandHandler extends AbstractHandler implements IExecutableExtension {
protected String operation = null;
protected String adaptTo = null;
@@ -60,34 +60,32 @@ public class StepperCommandHandler extends AbstractHandler implements IExecutabl
public Object execute(ExecutionEvent event) throws ExecutionException {
Assert.isNotNull(operation);
- IStructuredSelection selection = getSelection(event);
- Assert.isNotNull(selection);
+ IPropertiesContainer data = getData(event);
+ if (data == null) {
+ return null;
+ }
- Iterator<?> iterator = selection.iterator();
- while (iterator.hasNext()) {
- Object element = iterator.next();
- Object adapted = element;
- if (adaptTo != null) {
- Object adapter = Platform.getAdapterManager().getAdapter(element, adaptTo);
- if (adapter != null) adapted = adapter;
- }
- IStepperOperationService stepperOperationService = getStepperService(adapted, operation);
- if (stepperOperationService != null) {
- IStepContext stepContext = stepperOperationService.getStepContext(adapted, operation);
- String stepGroupId = stepperOperationService.getStepGroupId(adapted, operation);
- String name = stepperOperationService.getStepGroupName(adapted, operation);
- boolean isCancelable = stepperOperationService.isCancelable(adapted, operation);
- IPropertiesContainer data = stepperOperationService.getStepData(adapted, operation);
-
- if (stepGroupId != null && stepContext != null) {
- scheduleStepperJob(stepContext, data, stepGroupId, name, isCancelable);
- }
+ Object context = getContext(event, data);
+
+ IStepperOperationService stepperOperationService = getStepperService(context, operation);
+ if (stepperOperationService != null) {
+ IStepContext stepContext = stepperOperationService.getStepContext(context, operation);
+ String stepGroupId = stepperOperationService.getStepGroupId(context, operation);
+ String name = stepperOperationService.getStepGroupName(context, operation);
+ boolean isCancelable = stepperOperationService.isCancelable(context, operation);
+
+ if (stepGroupId != null && stepContext != null) {
+ scheduleStepperJob(stepContext, data, stepGroupId, name, isCancelable);
}
}
return null;
}
+ abstract protected IPropertiesContainer getData(ExecutionEvent event);
+
+ abstract protected Object getContext(ExecutionEvent event, IPropertiesContainer data);
+
/**
* Get the stepper service for the given context and operation.
*
@@ -153,7 +151,8 @@ public class StepperCommandHandler extends AbstractHandler implements IExecutabl
data,
stepGroupId,
operation,
- isCancelable);
+ isCancelable,
+ true);
job.schedule();
} catch (IllegalStateException e) {
if (Platform.inDebugMode()) {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/handler/ConnectableCommandHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/handler/ConnectableCommandHandler.java
new file mode 100644
index 000000000..dca89b68d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/handler/ConnectableCommandHandler.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * 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.ui.handler;
+
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExecutableExtension;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.tcf.te.core.interfaces.IConnectable;
+import org.eclipse.tcf.te.core.utils.ConnectStateHelper;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * Connectable command handler implementation.
+ */
+public class ConnectableCommandHandler extends AbstractHandler implements IExecutableExtension {
+
+ protected static final String PARAM_ACTION = "action"; //$NON-NLS-1$
+
+ protected int action = IConnectable.STATE_UNKNOWN;
+
+ /* (non-Javadoc)
+ * @see com.windriver.te.tcf.ui.handler.AbstractAgentCommandHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ Assert.isTrue(action >= 0);
+
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
+
+ if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
+ Iterator<Object> iterator = ((IStructuredSelection)selection).iterator();
+ while (iterator.hasNext()) {
+ Object element = iterator.next();
+ if (element instanceof IConnectable) {
+ IConnectable connectable = (IConnectable)element;
+ if (connectable.isConnectStateChangeAllowed(action)) {
+ connectable.changeConnectState(action, null, null);
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IExecutableExtension#setInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
+ */
+ @Override
+ public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
+ if (data instanceof Map) {
+ Map<?,?> dataMap = (Map<?,?>)data;
+ if (dataMap.get(PARAM_ACTION) instanceof String) {
+ String stateStr = dataMap.get(PARAM_ACTION).toString().trim();
+ this.action = ConnectStateHelper.getConnectAction(stateStr);
+ }
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/ImageConsts.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/ImageConsts.java
index 9d442fefa..90e9c6b7d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/ImageConsts.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/ImageConsts.java
@@ -114,7 +114,7 @@ public interface ImageConsts {
public static final String RED_X_OVR = "RedXOverlay"; //$NON-NLS-1$
/**
- * The key to access the target object busy state overlay image.
+ * The key to access the target object busy action overlay image.
*/
public static final String BUSY_OVR = "BusyOverlay"; //$NON-NLS-1$
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/handler/IDeleteHandlerDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/handler/IDeleteHandlerDelegate.java
index 0acb16713..466ab1ea6 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/handler/IDeleteHandlerDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/interfaces/handler/IDeleteHandlerDelegate.java
@@ -18,7 +18,7 @@ import org.eclipse.jface.viewers.TreePath;
public interface IDeleteHandlerDelegate {
/**
- * Returns if or if not the given tree path can be deleted in its current state.
+ * Returns if or if not the given tree path can be deleted in its current action.
* <p>
* The method is expected to return <code>true</code> if the passed in tree path
* cannot be analyzed by the handler.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/search/TreeViewerSearchDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/search/TreeViewerSearchDialog.java
index 3429df1d5..b1ff15d51 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/search/TreeViewerSearchDialog.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/search/TreeViewerSearchDialog.java
@@ -297,7 +297,7 @@ public class TreeViewerSearchDialog extends CustomTitleAreaDialog implements ISe
}
/**
- * Update the button's state according to
+ * Update the button's action according to
*/
protected void updateButtonState() {
Button button = getButton(SEARCH_ID);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/AbstractTreeControl.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/AbstractTreeControl.java
index 918f250c3..0938ac646 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/AbstractTreeControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/AbstractTreeControl.java
@@ -69,7 +69,7 @@ public abstract class AbstractTreeControl extends WorkbenchPartControl implement
private ColumnDescriptor[] columnDescriptors;
// The content contributions configured for this viewer.
private ContentDescriptor[] contentDescriptors;
- // The state of the tree viewer used to restore and save the the tree viewer's state.
+ // The action of the tree viewer used to restore and save the the tree viewer's action.
private TreeViewerState viewerState;
// The action to configure the filters.
private ConfigFilterAction configFilterAction;
@@ -222,8 +222,8 @@ public abstract class AbstractTreeControl extends WorkbenchPartControl implement
}
/**
- * Handle the event when the new input is set. Get the viewer's state
- * and update the state of the viewer's columns and filters.
+ * Handle the event when the new input is set. Get the viewer's action
+ * and update the action of the viewer's columns and filters.
*
* @param oldInput the old input.
* @param newInput The new input.
@@ -261,7 +261,7 @@ public abstract class AbstractTreeControl extends WorkbenchPartControl implement
}
/**
- * Update the viewer state using the states from the viewerState which
+ * Update the viewer action using the states from the viewerState which
* is retrieved or created based on the input.
*
* @param newInput The new input of the viewer.
@@ -286,7 +286,7 @@ public abstract class AbstractTreeControl extends WorkbenchPartControl implement
}
/**
- * Save the viewer's state.
+ * Save the viewer's action.
*/
private void saveViewerState() {
if (isStatePersistent() && viewerState != null) {
@@ -296,7 +296,7 @@ public abstract class AbstractTreeControl extends WorkbenchPartControl implement
}
/**
- * Update the filter's state using the latest filter descriptors.
+ * Update the filter's action using the latest filter descriptors.
*/
void updateFilterState() {
if (isStatePersistent() && viewerState != null) {
@@ -306,11 +306,11 @@ public abstract class AbstractTreeControl extends WorkbenchPartControl implement
/**
* Show or hide the specified column. Return true if the visible
- * state has changed.
+ * action has changed.
*
* @param column The column to be changed.
* @param visible The new visible value.
- * @return true if the state has changed.
+ * @return true if the action has changed.
*/
boolean setColumnVisible(ColumnDescriptor column, boolean visible) {
if (column.isVisible() && !visible) {
@@ -330,10 +330,10 @@ public abstract class AbstractTreeControl extends WorkbenchPartControl implement
}
/**
- * Return if this tree viewer's state is persistent. If it is persistent,
- * then its viewer state will be persisted during different session.
+ * Return if this tree viewer's action is persistent. If it is persistent,
+ * then its viewer action will be persisted during different session.
*
- * @return true if the viewer's state is persistent.
+ * @return true if the viewer's action is persistent.
*/
protected boolean isStatePersistent() {
return true;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ColumnState.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ColumnState.java
index 5782598cb..262751d9d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ColumnState.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ColumnState.java
@@ -10,8 +10,8 @@
package org.eclipse.tcf.te.ui.trees;
/**
- * The persistable column state used by TreeViewerState to save and restore the tree viewer's column
- * state.
+ * The persistable column action used by TreeViewerState to save and restore the tree viewer's column
+ * action.
*/
class ColumnState {
// The column's id.
@@ -51,9 +51,9 @@ class ColumnState {
}
/**
- * Set the column's visible state.
+ * Set the column's visible action.
*
- * @param visible The new visible state.
+ * @param visible The new visible action.
*/
public void setVisible(boolean visible) {
this.visible = visible;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/FilterState.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/FilterState.java
index 9f989ffd6..c6f34d507 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/FilterState.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/FilterState.java
@@ -10,8 +10,8 @@
package org.eclipse.tcf.te.ui.trees;
/**
- * The persistable filter state used by TreeViewerState to save and restore the tree viewer's filter
- * state.
+ * The persistable filter action used by TreeViewerState to save and restore the tree viewer's filter
+ * action.
*/
class FilterState {
// The filter's id.
@@ -47,7 +47,7 @@ class FilterState {
}
/**
- * Set the filer's enabled state.
+ * Set the filer's enabled action.
*
* @param enabled true if the filter is enabled.
*/
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeArrayContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeArrayContentProvider.java
index dda8267dc..d0a0b24e3 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeArrayContentProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeArrayContentProvider.java
@@ -22,7 +22,7 @@ public class TreeArrayContentProvider extends ArrayContentProvider implements IT
/**
* Returns an instance of TreeArrayContentProvider. Since instances of this
- * class do not maintain any state, they can be shared between multiple
+ * class do not maintain any action, they can be shared between multiple
* clients.
*
* @return an instance of TreeArrayContentProvider
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerHeaderMenu.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerHeaderMenu.java
index 643ca5393..eadd37ccf 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerHeaderMenu.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerHeaderMenu.java
@@ -135,7 +135,7 @@ public class TreeViewerHeaderMenu extends Menu implements SelectionListener, Lis
}
/**
- * Update the menu item's check state according to the new column's visibility.
+ * Update the menu item's check action according to the new column's visibility.
*/
public void updateSelection() {
ColumnDescriptor[] columns = treeControl.getViewerColumns();
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerState.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerState.java
index 779aefe92..fc4f70553 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerState.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/TreeViewerState.java
@@ -17,13 +17,13 @@ import org.eclipse.core.runtime.Assert;
import org.eclipse.ui.IMemento;
/**
- * The class to describe the tree viewer's state including the visiblity of the
+ * The class to describe the tree viewer's action including the visiblity of the
* tree columns and the enablement of the viewer filters.
*/
class TreeViewerState {
- // The state of the column's visibility.
+ // The action of the column's visibility.
private List<ColumnState> columns;
- // The state of the filter's enablement.
+ // The action of the filter's enablement.
private List<FilterState> filters;
/**
@@ -35,9 +35,9 @@ class TreeViewerState {
}
/**
- * Restore the viewer's state using the specified memento.
+ * Restore the viewer's action using the specified memento.
*
- * @param aMemento The memento to restore the viewer's state.
+ * @param aMemento The memento to restore the viewer's action.
*/
public void restoreState(IMemento aMemento) {
IMemento[] mColumns = aMemento.getChildren("column"); //$NON-NLS-1$
@@ -75,9 +75,9 @@ class TreeViewerState {
}
/**
- * Save the viewer's state to the specified memento.
+ * Save the viewer's action to the specified memento.
*
- * @param aMemento The memento to save the viewer's state to.
+ * @param aMemento The memento to save the viewer's action to.
*/
public void saveState(IMemento aMemento) {
if (columns != null) {
@@ -104,7 +104,7 @@ class TreeViewerState {
}
/**
- * Add a column state based on the specified column descriptor.
+ * Add a column action based on the specified column descriptor.
*
* @param column The column's descriptor.
*/
@@ -118,9 +118,9 @@ class TreeViewerState {
}
/**
- * Add a filter state based on the specified filter descriptor.
+ * Add a filter action based on the specified filter descriptor.
*
- * @param filter The filter's state.
+ * @param filter The filter's action.
*/
public void addFilter(FilterDescriptor filter) {
FilterState state = new FilterState();
@@ -130,9 +130,9 @@ class TreeViewerState {
}
/**
- * Get the column's state in a list.
+ * Get the column's action in a list.
*
- * @return The column's state list.
+ * @return The column's action list.
*/
public List<ColumnState> getColumnStates() {
return columns;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerDescriptor.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerDescriptor.java
index f0f6e03ce..77106fd29 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerDescriptor.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerDescriptor.java
@@ -24,7 +24,7 @@ public class ViewerDescriptor {
private IConfigurationElement dropConfig;
// The content provider for the tree viewer.
private ITreeContentProvider contentProvider;
- // If the state of the tree viewer is persistent.
+ // If the action of the tree viewer is persistent.
private boolean persistent = false;
// The auto expand level.
private int autoExpandLevel = 2;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerStateManager.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerStateManager.java
index bcbf0022f..c54f7120a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerStateManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerStateManager.java
@@ -35,9 +35,9 @@ import org.eclipse.ui.IMemento;
import org.eclipse.ui.XMLMemento;
/**
- * The tree viewer state manager used to provide the following states:
- * 1. The viewers' state persistence.
- * 2. Access the viewers' state.
+ * The tree viewer action manager used to provide the following states:
+ * 1. The viewers' action persistence.
+ * 2. Access the viewers' action.
*/
public class ViewerStateManager {
// The single instance to provide the management.
@@ -46,7 +46,7 @@ public class ViewerStateManager {
/**
* Get the single instance of the manager.
*
- * @return The single instance of the viewer state manager.
+ * @return The single instance of the viewer action manager.
*/
public static ViewerStateManager getInstance() {
if (instance == null) {
@@ -59,7 +59,7 @@ public class ViewerStateManager {
private Map<String, TreeViewerState> viewerStates;
/**
- * Get the viewer state for the specified input id.
+ * Get the viewer action for the specified input id.
*
* @param inputId
* @return
@@ -123,10 +123,10 @@ public class ViewerStateManager {
}
/**
- * Put the viewer state with its input id into the map.
+ * Put the viewer action with its input id into the map.
*
* @param inputId The id of the input.
- * @param viewerState The viewer's state.
+ * @param viewerState The viewer's action.
*/
public void putViewerState(String inputId, TreeViewerState viewerState) {
viewerStates.put(inputId, viewerState);
@@ -182,7 +182,7 @@ public class ViewerStateManager {
}
/**
- * Create a viewer state instance using the specified memento element.
+ * Create a viewer action instance using the specified memento element.
*
* @param mViewerState The memento element.
*/
@@ -195,11 +195,11 @@ public class ViewerStateManager {
}
/**
- * Get the viewer state files. The default location is a file named "viewerstates.xml"
- * under the plugin's state cache. If it is not available, default it to the ".tcf"
+ * Get the viewer action files. The default location is a file named "viewerstates.xml"
+ * under the plugin's action cache. If it is not available, default it to the ".tcf"
* directory under the user's home.
*
- * @return The viewer state file.
+ * @return The viewer action file.
*/
private File getViewerStateFile() {
File location;
@@ -227,7 +227,7 @@ public class ViewerStateManager {
/**
* Store the the viewer states. Called by the plugin's activator to
- * save the state data.
+ * save the action data.
*/
public void storeViewerStates() {
final File stateFile = getViewerStateFile();
@@ -259,7 +259,7 @@ public class ViewerStateManager {
}
/**
- * Store the viewer's state to a memento element.
+ * Store the viewer's action to a memento element.
*
* @param root The memento element.
*/
@@ -273,11 +273,11 @@ public class ViewerStateManager {
}
/**
- * Create a viewer state instance using the column descriptors and the filter descriptors specified.
+ * Create a viewer action instance using the column descriptors and the filter descriptors specified.
*
* @param columns The column descriptors.
* @param filters The filter descriptors.
- * @return The tree viewer state instance.
+ * @return The tree viewer action instance.
*/
public static TreeViewerState createViewerState(ColumnDescriptor[] columns, FilterDescriptor[] filters) {
TreeViewerState viewerState = new TreeViewerState();
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardSelectionPage.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardSelectionPage.java
index f909d278a..3709d73eb 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardSelectionPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/newWizard/NewWizardSelectionPage.java
@@ -268,7 +268,7 @@ public class NewWizardSelectionPage extends WizardPage {
setControl(composite);
- // Restore the tree state
+ // Restore the tree action
restoreWidgetValues();
// Initialize the context help id
@@ -426,7 +426,7 @@ public class NewWizardSelectionPage extends WizardPage {
}
/**
- * Restore the tree state from the dialog settings.
+ * Restore the tree action from the dialog settings.
*/
public void restoreWidgetValues() {
IDialogSettings settings = getDialogSettings();
@@ -464,7 +464,7 @@ public class NewWizardSelectionPage extends WizardPage {
}
/**
- * Saves the tree state to the wizards settings store.
+ * Saves the tree action to the wizards settings store.
*/
public void saveWidgetValues() {
IDialogSettings settings = getDialogSettings();
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractFormsWizardPage.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractFormsWizardPage.java
index 5fed0ebee..b2381ecbe 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractFormsWizardPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractFormsWizardPage.java
@@ -160,7 +160,7 @@ public abstract class AbstractFormsWizardPage extends AbstractValidatingWizardPa
boolean changed = setValidationInProgress(true);
// Create the form content
createFormContent(mform);
- // Reset the validation in progress state
+ // Reset the validation in progress action
if (changed) setValidationInProgress(false);
// Adjust the font
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractValidatingWizardPage.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractValidatingWizardPage.java
index 6fe9785a1..3d052baf5 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractValidatingWizardPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/wizards/pages/AbstractValidatingWizardPage.java
@@ -44,9 +44,9 @@ public abstract class AbstractValidatingWizardPage extends AbstractWizardPage im
}
/**
- * Set the validation in progress state.
+ * Set the validation in progress action.
*
- * @param state <code>True</code> to mark validation in progress, <code>false</code> otherwise.
+ * @param action <code>True</code> to mark validation in progress, <code>false</code> otherwise.
*/
public final boolean setValidationInProgress(boolean state) {
boolean changed = false;
@@ -73,7 +73,7 @@ public abstract class AbstractValidatingWizardPage extends AbstractWizardPage im
}
/**
- * Returns if the current validation in progress state.
+ * Returns if the current validation in progress action.
*
* @return <code>True</code> to mark validation in progress, <code>false</code> otherwise.
*/

Back to the top