Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Schwarz2015-02-05 09:05:26 +0000
committerTobias Schwarz2015-02-05 09:05:26 +0000
commitd5c06e6b3874031e4d19580f211f21efd2eff879 (patch)
tree1d2d849d97c3a6f0f42ce6b2b71a184736ffda01
parent6fcbd5abe4f853b210b8f4d6cb723e495c47b033 (diff)
downloadorg.eclipse.tcf-d5c06e6b3874031e4d19580f211f21efd2eff879.tar.gz
org.eclipse.tcf-d5c06e6b3874031e4d19580f211f21efd2eff879.tar.xz
org.eclipse.tcf-d5c06e6b3874031e4d19580f211f21efd2eff879.zip
SM: further error checks on startup, better logging, new toolbar group
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/ISimulatorService.java1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/ChainPeerStep.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/plugin.xml6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerNodeProperties.java5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/PeerModelPropertyTester.java7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/steps/WaitForReadyStep.java13
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/plugin.xml1
7 files changed, 24 insertions, 13 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/ISimulatorService.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/ISimulatorService.java
index 47c9ee9d1..62deb9d27 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/ISimulatorService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/interfaces/ISimulatorService.java
@@ -27,7 +27,6 @@ public interface ISimulatorService extends IService {
* Property: The associated simulator instance.
*/
public static final String PROP_SIM_INSTANCE = ISimulatorService.class.getName() + ".simInstance"; //$NON-NLS-1$
- public static final String PROP_EXIT_ERROR = ISimulatorService.class.getName() + ".exitError"; //$NON-NLS-1$
/**
* The constants for the simulator state.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/ChainPeerStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/ChainPeerStep.java
index 56356d01f..5999c6fb1 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/ChainPeerStep.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/ChainPeerStep.java
@@ -84,7 +84,9 @@ public class ChainPeerStep extends AbstractPeerStep {
ChannelEvent event = new ChannelEvent(ChainPeerStep.this, c, ChannelEvent.TYPE_OPENING, eventData);
EventManager.getInstance().fireEvent(event);
} else {
- String message = c.getRemotePeer().getID() + " --> " + peer.getID(); //$NON-NLS-1$
+ String id = peer.getAttributes().get(IPeer.ATTR_TRANSPORT_NAME) + ":" + peer.getAttributes().get(IPeer.ATTR_IP_HOST) + ":" + peer.getAttributes().get(IPeer.ATTR_IP_PORT); //$NON-NLS-1$ //$NON-NLS-2$
+ id = id.equalsIgnoreCase(peer.getID()) ? peer.getID() : (id + " (" + peer.getID() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
+ String message = c.getRemotePeer().getID() + " --> " + id; //$NON-NLS-1$
IPropertiesContainer eventData = new PropertiesContainer();
eventData.setProperty(ChannelEvent.PROP_MESSAGE, message);
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 44808abf9..6d4b05f6a 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
@@ -49,7 +49,7 @@
class="org.eclipse.tcf.te.tcf.locator.internal.PeerModelPropertyTester"
id="org.eclipse.tcf.te.tcf.locator.LocatorModelPropertyTester"
namespace="org.eclipse.tcf.te.tcf.locator"
- properties="name,nameRegex,osName,osNameRegex,hasLocalService,hasRemoteService,hasOfflineService,hasAttribute,isAttribute,isProxy,isValid,isValueAdd,isOfType,isRemotePeer,containsPlatform"
+ properties="name,nameRegex,osName,osNameRegex,hasLocalService,hasRemoteService,hasOfflineService,hasAttribute,isAttribute,isProxy,isValid,isValueAdd,isOfType,isOfSubType,isRemotePeer,containsPlatform"
type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode">
</propertyTester>
@@ -57,7 +57,7 @@
class="org.eclipse.tcf.te.tcf.locator.internal.PeerModelPropertyTester"
id="org.eclipse.tcf.te.tcf.locator.LocatorModelPropertyTester2"
namespace="org.eclipse.tcf.te.tcf.locator"
- properties="name,nameRegex,osName,osNameRegex,hasLocalService,hasRemoteService,hasOfflineService,hasAttribute,isAttribute,isProxy,isValueAdd,isOfType,isRemotePeer,containsPlatform"
+ properties="name,nameRegex,osName,osNameRegex,hasLocalService,hasRemoteService,hasOfflineService,hasAttribute,isAttribute,isProxy,isValueAdd,isOfType,isOfSubType,isRemotePeer,containsPlatform"
type="org.eclipse.tcf.protocol.IPeer">
</propertyTester>
@@ -65,7 +65,7 @@
class="org.eclipse.tcf.te.tcf.locator.internal.PeerModelPropertyTester"
id="org.eclipse.tcf.te.tcf.locator.LocatorModelPropertyTester2"
namespace="org.eclipse.tcf.te.tcf.locator"
- properties="name,nameRegex,osName,osNameRegex,hasLocalService,hasRemoteService,hasOfflineService,hasAttribute,isAttribute,isProxy,isValueAdd,isOfType,isRemotePeer,containsPlatform"
+ properties="name,nameRegex,osName,osNameRegex,hasLocalService,hasRemoteService,hasOfflineService,hasAttribute,isAttribute,isProxy,isValueAdd,isOfType,isOfSubType,isRemotePeer,containsPlatform"
type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.ILocatorNode">
</propertyTester>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerNodeProperties.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerNodeProperties.java
index fa6780b14..62cc5848a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerNodeProperties.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/interfaces/nodes/IPeerNodeProperties.java
@@ -56,4 +56,9 @@ public interface IPeerNodeProperties {
* Property: Container for warnings (Map<String,String)
*/
public static final String PROPERTY_WARNINGS = "Warnings"; //$NON-NLS-1$
+
+ /**
+ * Property: Exit error if any simulator or other started process died during connect.
+ */
+ public static final String PROP_EXIT_ERROR = "ExitError"; //$NON-NLS-1$
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/PeerModelPropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/PeerModelPropertyTester.java
index 53412c6ca..a96974212 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/PeerModelPropertyTester.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/internal/PeerModelPropertyTester.java
@@ -129,6 +129,13 @@ public class PeerModelPropertyTester extends PropertyTester {
}
}
+ if ("isOfSubType".equals(property)) { //$NON-NLS-1$
+ String value = peer.getAttributes().get(IPeerProperties.PROP_SUBTYPE);
+ if (expectedValue instanceof String) {
+ return value != null ? ((String)expectedValue).equals(value) : ((String)expectedValue).equalsIgnoreCase("null"); //$NON-NLS-1$
+ }
+ }
+
if ("containsPlatform".equals(property)) { //$NON-NLS-1$
String value = peer.getAttributes().get(IPeerProperties.PROP_PLATFORMS);
if (value != null) {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/steps/WaitForReadyStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/steps/WaitForReadyStep.java
index 76c9f2f50..e760d5882 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/steps/WaitForReadyStep.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/steps/WaitForReadyStep.java
@@ -26,7 +26,6 @@ import org.eclipse.tcf.protocol.IPeer;
import org.eclipse.tcf.protocol.Protocol;
import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tcf.te.runtime.services.interfaces.ISimulatorService;
import org.eclipse.tcf.te.runtime.stepper.StepperAttributeUtil;
import org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId;
import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext;
@@ -37,6 +36,7 @@ import org.eclipse.tcf.te.tcf.core.channelmanager.OpenChannelException;
import org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager;
import org.eclipse.tcf.te.tcf.core.interfaces.steps.ITcfStepAttributes;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNode;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerNodeProperties;
import org.eclipse.tcf.te.tcf.locator.interfaces.services.IPeerModelUpdateService;
import org.eclipse.tcf.te.tcf.locator.nls.Messages;
import org.eclipse.tcf.te.tcf.locator.utils.SimulatorUtils;
@@ -113,13 +113,10 @@ public class WaitForReadyStep extends AbstractPeerNodeStep {
return;
}
- if (isSimulatorRunning) {
- Object simInstance = peerNode.getProperty(ISimulatorService.PROP_SIM_INSTANCE);
- Object exitError = peerNode.getProperty(ISimulatorService.PROP_EXIT_ERROR);
- if (simInstance == null && exitError instanceof Throwable) {
- callback(data, fullQualifiedId, callback, StatusHelper.getStatus((Throwable)exitError), null);
- return;
- }
+ Object exitError = peerNode.getProperty(IPeerNodeProperties.PROP_EXIT_ERROR);
+ if (exitError instanceof Throwable) {
+ callback(data, fullQualifiedId, callback, StatusHelper.getStatus((Throwable)exitError), null);
+ return;
}
IStatus status = null;
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 1c179d9e7..c20293225 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
@@ -596,6 +596,7 @@
<separator name="group.connect" visible="false"/>
<separator name="group.actions" visible="true"/>
<separator name="group.additions" visible="false"/>
+ <separator name="group.global" visible="true"/>
</toolbar>
</menuContribution>

Back to the top