Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2013-05-08 06:09:04 +0000
committerUwe Stieber2013-05-08 06:09:04 +0000
commitf6acc4fd025879e7e2d677349f5a41f4fa1581bd (patch)
treef126e41f09184dbddea7a48d67f342cb82ae6639 /target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper
parent5b935f55bdb10f6b42971e0c4d780c956767314b (diff)
downloadorg.eclipse.tcf-f6acc4fd025879e7e2d677349f5a41f4fa1581bd.tar.gz
org.eclipse.tcf-f6acc4fd025879e7e2d677349f5a41f4fa1581bd.tar.xz
org.eclipse.tcf-f6acc4fd025879e7e2d677349f5a41f4fa1581bd.zip
Target Explorer: Rework simulator payload boot time handling
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/plugin.xml48
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/steps/WaitStep.java92
2 files changed, 20 insertions, 120 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/plugin.xml
index ba35e8363..18f4c1b32 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/plugin.xml
@@ -1,28 +1,20 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
-<!-- Extension Points -->
- <extension-point id="steps" name="%Extension.Steps.name" schema="schema/steps.exsd"/>
- <extension-point id="stepGroups" name="%Extension.StepGroups.name" schema="schema/stepGroups.exsd"/>
-
-<!-- Property tester contributions -->
- <extension point="org.eclipse.core.expressions.propertyTesters">
- <propertyTester
- class="org.eclipse.tcf.te.runtime.stepper.internal.PropertyTester"
- id="org.eclipse.tcf.te.runtime.services.PropertyTester"
- namespace="org.eclipse.tcf.te.runtime.stepper"
- properties="isEnabled,isRunning,isRunningOrCanceled"
- type="java.lang.Object">
- </propertyTester>
- </extension>
-
-<!-- Launch Step contributions -->
- <extension point="org.eclipse.tcf.te.runtime.stepper.steps">
- <step
- id="org.eclipse.tcf.te.runtime.stepper.waitStep"
- class="org.eclipse.tcf.te.runtime.stepper.steps.WaitStep"
- label="%WaitStep.name"/>
- </extension>
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<!-- Extension Points -->
+ <extension-point id="steps" name="%Extension.Steps.name" schema="schema/steps.exsd"/>
+ <extension-point id="stepGroups" name="%Extension.StepGroups.name" schema="schema/stepGroups.exsd"/>
+
+<!-- Property tester contributions -->
+ <extension point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ class="org.eclipse.tcf.te.runtime.stepper.internal.PropertyTester"
+ id="org.eclipse.tcf.te.runtime.services.PropertyTester"
+ namespace="org.eclipse.tcf.te.runtime.stepper"
+ properties="isEnabled,isRunning,isRunningOrCanceled"
+ type="java.lang.Object">
+ </propertyTester>
+ </extension>
+
+</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/steps/WaitStep.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/steps/WaitStep.java
deleted file mode 100644
index b438816a6..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper/src/org/eclipse/tcf/te/runtime/stepper/steps/WaitStep.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * 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.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.concurrent.util.ExecutorsUtil;
-import org.eclipse.tcf.te.runtime.interfaces.IConditionTester;
-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;
-
-/**
- * Step to wait some time.
- * The timeout is 1000ms per default.
- * A specific timeout can be set through parameter "timeout" for a step group reference.
- */
-public class WaitStep extends AbstractStep {
-
- /**
- * Constructor.
- */
- public WaitStep() {
- }
-
- /* (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, final IProgressMonitor monitor, ICallback callback) {
- int timeout = 1000;
- if (getParameters() != null) {
- String value = getParameters().get("timeout"); //$NON-NLS-1$
- if (value != null) {
- try {
- timeout = Integer.parseInt(value);
- }
- catch (Exception e) {
- }
- }
- }
-
- ExecutorsUtil.waitAndExecute(timeout, new IConditionTester() {
- @Override
- public boolean isConditionFulfilled() {
- return monitor.isCanceled();
- }
-
- @Override
- public void cleanup() {
- }
- });
- callback.done(this, monitor.isCanceled() ? Status.CANCEL_STATUS : Status.OK_STATUS);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.stepper.steps.AbstractStep#getCancelTimeout()
- */
- @Override
- public int getCancelTimeout() {
- int timeout = 1000;
- if (getParameters() != null) {
- String value = getParameters().get("timeout"); //$NON-NLS-1$
- if (value != null) {
- try {
- timeout = Integer.parseInt(value);
- }
- catch (Exception e) {
- }
- }
- }
-
- return Math.max(super.getCancelTimeout(), timeout + 10000);
- }
-
- /* (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 {
- }
-}

Back to the top