diff --git a/rse/tests/org.eclipse.rse.tests.framework/build.properties b/rse/tests/org.eclipse.rse.tests.framework/build.properties index 2dc8f17a418..5eb7416d35d 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/build.properties +++ b/rse/tests/org.eclipse.rse.tests.framework/build.properties @@ -1,10 +1,10 @@ ############################################################################### -# Copyright (c) 2006 IBM Corporation and others. +# Copyright (c) 2006, 2007 IBM Corporation and others. # All rights reserved. This program and the accompanying materials # are made available under the 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: # IBM Corporation - initial API and implementation ############################################################################### diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/BasicTestSuiteHolder.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/BasicTestSuiteHolder.java index a77d124c4ae..ad7f3191479 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/BasicTestSuiteHolder.java +++ b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/BasicTestSuiteHolder.java @@ -1,12 +1,13 @@ -/* ******************************************************************************* - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * +/******************************************************************************* + * Copyright (c) 2006, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the 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: * David Dykstal (IBM) - initial contribution. - * *******************************************************************************/ + *******************************************************************************/ package org.eclipse.rse.internal.tests.framework; import org.eclipse.rse.tests.framework.AbstractTestSuiteHolder; @@ -39,4 +40,4 @@ public class BasicTestSuiteHolder extends AbstractTestSuiteHolder { return testSuite; } -} \ No newline at end of file +} diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/StandardTestSuiteHolder.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/StandardTestSuiteHolder.java index b20d5ff89f1..c3b0755a7e3 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/StandardTestSuiteHolder.java +++ b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/StandardTestSuiteHolder.java @@ -1,12 +1,13 @@ -/* ******************************************************************************* - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * +/******************************************************************************* + * Copyright (c) 2006, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the 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: * David Dykstal (IBM) - initial contribution. - * *******************************************************************************/ + *******************************************************************************/ package org.eclipse.rse.internal.tests.framework; import junit.framework.TestSuite; diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/TestFrameworkPlugin.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/TestFrameworkPlugin.java index d5c54fe69c1..543447f413e 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/TestFrameworkPlugin.java +++ b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/TestFrameworkPlugin.java @@ -1,12 +1,13 @@ -/* ******************************************************************************* - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * +/******************************************************************************* + * Copyright (c) 2006, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the 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: * David Dykstal (IBM) - initial contribution. - * *******************************************************************************/ + *******************************************************************************/ package org.eclipse.rse.internal.tests.framework; import org.eclipse.core.runtime.IStatus; diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/TestSuiteGeneratorHolder.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/TestSuiteGeneratorHolder.java index 1ff01c75f73..fc5a4cf7cd9 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/TestSuiteGeneratorHolder.java +++ b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/TestSuiteGeneratorHolder.java @@ -1,12 +1,13 @@ -/* ******************************************************************************* - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * +/******************************************************************************* + * Copyright (c) 2006, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the 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: * David Dykstal (IBM) - initial contribution. - * *******************************************************************************/ + *******************************************************************************/ package org.eclipse.rse.internal.tests.framework; import junit.framework.TestSuite; diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/ResetHolderDelegate.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/ResetHolderDelegate.java index f8db0a9e812..747a22d03fb 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/ResetHolderDelegate.java +++ b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/ResetHolderDelegate.java @@ -1,12 +1,13 @@ -/* ******************************************************************************* - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * +/******************************************************************************* + * Copyright (c) 2006, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the 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: * David Dykstal (IBM) - initial contribution. - * *******************************************************************************/ + *******************************************************************************/ package org.eclipse.rse.internal.tests.framework.actions; import java.util.Iterator; @@ -58,4 +59,4 @@ public class ResetHolderDelegate implements IObjectActionDelegate { public void setActivePart(IAction action, IWorkbenchPart targetPart) { } -} \ No newline at end of file +} diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/RunHolderDelegate.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/RunHolderDelegate.java index 2147e42029c..cd9c0451383 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/RunHolderDelegate.java +++ b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/RunHolderDelegate.java @@ -1,12 +1,13 @@ -/* ******************************************************************************* - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * +/******************************************************************************* + * Copyright (c) 2006, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the 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: * David Dykstal (IBM) - initial contribution. - * *******************************************************************************/ + *******************************************************************************/ package org.eclipse.rse.internal.tests.framework.actions; import java.lang.reflect.InvocationTargetException; @@ -124,4 +125,4 @@ public class RunHolderDelegate implements IObjectActionDelegate { return result; } -} \ No newline at end of file +} diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/SelectAllHoldersDelegate.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/SelectAllHoldersDelegate.java index 3d7156f4b32..dee007f2501 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/SelectAllHoldersDelegate.java +++ b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/SelectAllHoldersDelegate.java @@ -1,12 +1,13 @@ -/* ******************************************************************************* - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * +/******************************************************************************* + * Copyright (c) 2006, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the 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: * David Dykstal (IBM) - initial contribution. - * *******************************************************************************/ + *******************************************************************************/ package org.eclipse.rse.internal.tests.framework.actions; import org.eclipse.jface.action.IAction; @@ -49,4 +50,4 @@ public class SelectAllHoldersDelegate implements IViewActionDelegate { public void init(IViewPart view) { this.view = view; } -} \ No newline at end of file +} diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/ToggleRunInBackgroundDelegate.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/ToggleRunInBackgroundDelegate.java index 566d10585e5..140d8f2f705 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/ToggleRunInBackgroundDelegate.java +++ b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/actions/ToggleRunInBackgroundDelegate.java @@ -1,12 +1,13 @@ -/* ******************************************************************************* - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * +/******************************************************************************* + * Copyright (c) 2006, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the 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: * David Dykstal (IBM) - initial contribution. - * *******************************************************************************/ + *******************************************************************************/ package org.eclipse.rse.internal.tests.framework.actions; import org.eclipse.jface.action.IAction; diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ConsoleContext.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ConsoleContext.java index f5ba2eb4d5b..92bbf34a8ac 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ConsoleContext.java +++ b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ConsoleContext.java @@ -1,12 +1,13 @@ -/* ******************************************************************************* - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * +/******************************************************************************* + * Copyright (c) 2006, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the 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: * David Dykstal (IBM) - initial contribution. - * *******************************************************************************/ + *******************************************************************************/ package org.eclipse.rse.internal.tests.framework.scripting; import java.io.PrintStream; diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/PerspectiveContext.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/PerspectiveContext.java index cecaf152974..76160196669 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/PerspectiveContext.java +++ b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/PerspectiveContext.java @@ -1,12 +1,13 @@ -/* ******************************************************************************* - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * +/******************************************************************************* + * Copyright (c) 2006, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the 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: * David Dykstal (IBM) - initial contribution. - * *******************************************************************************/ + *******************************************************************************/ package org.eclipse.rse.internal.tests.framework.scripting; import java.net.URL; diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/Script.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/Script.java index 3010055040d..ee5be414870 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/Script.java +++ b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/Script.java @@ -1,49 +1,50 @@ -/* ******************************************************************************* - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the 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: - * David Dykstal (IBM) - initial contribution. - * *******************************************************************************/ -package org.eclipse.rse.internal.tests.framework.scripting; - -/** - * A Script is a collection of steps. - */ -public class Script extends SyntaxNode { - - private boolean failed = false; - - /** - * Creates a new script node. This is the base of the syntax tree for - * scripts. These always have a line number of zero. - */ - public Script() { - super(0); - } - - /* (non-Javadoc) - * @see org.eclipse.rse.tests.framework.scripting.SyntaxNode#enter(org.eclipse.rse.tests.framework.scripting.ScriptContext) - */ - public void enter(ScriptContext context) { - } - - /* (non-Javadoc) - * @see org.eclipse.rse.tests.framework.scripting.SyntaxNode#leave(org.eclipse.rse.tests.framework.scripting.ScriptContext) - */ - public void leave(ScriptContext context) { - failed = context.getFailed(); - } - - /** - * @return the failure state of the script. - */ - public boolean hasFailed() { - return failed; - } - -} - - +/******************************************************************************* + * Copyright (c) 2006, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the 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: + * David Dykstal (IBM) - initial contribution. + *******************************************************************************/ +package org.eclipse.rse.internal.tests.framework.scripting; + +/** + * A Script is a collection of steps. + */ +public class Script extends SyntaxNode { + + private boolean failed = false; + + /** + * Creates a new script node. This is the base of the syntax tree for + * scripts. These always have a line number of zero. + */ + public Script() { + super(0); + } + + /* (non-Javadoc) + * @see org.eclipse.rse.tests.framework.scripting.SyntaxNode#enter(org.eclipse.rse.tests.framework.scripting.ScriptContext) + */ + public void enter(ScriptContext context) { + } + + /* (non-Javadoc) + * @see org.eclipse.rse.tests.framework.scripting.SyntaxNode#leave(org.eclipse.rse.tests.framework.scripting.ScriptContext) + */ + public void leave(ScriptContext context) { + failed = context.getFailed(); + } + + /** + * @return the failure state of the script. + */ + public boolean hasFailed() { + return failed; + } + +} + + diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptContext.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptContext.java index a12116dce17..a283bb43ae8 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptContext.java +++ b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptContext.java @@ -1,12 +1,13 @@ -/* ******************************************************************************* - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * +/******************************************************************************* + * Copyright (c) 2006, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the 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: * David Dykstal (IBM) - initial contribution. - * *******************************************************************************/ + *******************************************************************************/ package org.eclipse.rse.internal.tests.framework.scripting; import java.net.MalformedURLException; diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptInterpreter.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptInterpreter.java index 37d0a3ea6f9..4fccefb802e 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptInterpreter.java +++ b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptInterpreter.java @@ -1,58 +1,59 @@ -/* ******************************************************************************* - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the 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: - * David Dykstal (IBM) - initial contribution. - * *******************************************************************************/ -package org.eclipse.rse.internal.tests.framework.scripting; - -import java.io.IOException; -import java.io.InputStream; - -/** - * An interpreter runs a script in a particular context. - */ -public class ScriptInterpreter extends SyntaxTreeVisitor { - - private ScriptContext context; - private ScriptParserMessageList messageList = null; - - public ScriptInterpreter(ScriptContext context) { - this.context = context; - } - - /** - * @param in the InputStream to be interpreted - * @return true if the parsing and interpretation concluded successfully. - * @throws IOException - */ - public boolean run(InputStream in) throws IOException { - messageList = new ScriptParserMessageList(); - ScriptParser p = new ScriptParser(messageList); - Script script = p.parse(in); - boolean success = false; - if (script != null) { - script.accept(this); - success = !script.hasFailed(); - } - return success; - } - - /* (non-Javadoc) - * @see org.eclipse.rse.tests.framework.scripting.SyntaxTreeVisitor#enter(org.eclipse.rse.tests.framework.scripting.SyntaxNode) - */ - public void enter(SyntaxNode node) { - node.enter(context); - } - - /* (non-Javadoc) - * @see org.eclipse.rse.tests.framework.scripting.SyntaxTreeVisitor#leave(org.eclipse.rse.tests.framework.scripting.SyntaxNode) - */ - public void leave(SyntaxNode node) { - node.leave(context); - } - -} +/******************************************************************************* + * Copyright (c) 2006, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the 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: + * David Dykstal (IBM) - initial contribution. + *******************************************************************************/ +package org.eclipse.rse.internal.tests.framework.scripting; + +import java.io.IOException; +import java.io.InputStream; + +/** + * An interpreter runs a script in a particular context. + */ +public class ScriptInterpreter extends SyntaxTreeVisitor { + + private ScriptContext context; + private ScriptParserMessageList messageList = null; + + public ScriptInterpreter(ScriptContext context) { + this.context = context; + } + + /** + * @param in the InputStream to be interpreted + * @return true if the parsing and interpretation concluded successfully. + * @throws IOException + */ + public boolean run(InputStream in) throws IOException { + messageList = new ScriptParserMessageList(); + ScriptParser p = new ScriptParser(messageList); + Script script = p.parse(in); + boolean success = false; + if (script != null) { + script.accept(this); + success = !script.hasFailed(); + } + return success; + } + + /* (non-Javadoc) + * @see org.eclipse.rse.tests.framework.scripting.SyntaxTreeVisitor#enter(org.eclipse.rse.tests.framework.scripting.SyntaxNode) + */ + public void enter(SyntaxNode node) { + node.enter(context); + } + + /* (non-Javadoc) + * @see org.eclipse.rse.tests.framework.scripting.SyntaxTreeVisitor#leave(org.eclipse.rse.tests.framework.scripting.SyntaxNode) + */ + public void leave(SyntaxNode node) { + node.leave(context); + } + +} diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptParser.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptParser.java index 83b3827b167..cdb021766c7 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptParser.java +++ b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptParser.java @@ -1,12 +1,13 @@ -/* ******************************************************************************* - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * +/******************************************************************************* + * Copyright (c) 2006, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the 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: * David Dykstal (IBM) - initial contribution. - * *******************************************************************************/ + *******************************************************************************/ package org.eclipse.rse.internal.tests.framework.scripting; import java.io.BufferedReader; @@ -129,4 +130,4 @@ public class ScriptParser { } -} \ No newline at end of file +} diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptParserMessage.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptParserMessage.java index 9b01c827d3f..29c93ba5ff2 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptParserMessage.java +++ b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptParserMessage.java @@ -1,12 +1,13 @@ -/* ******************************************************************************* - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * +/******************************************************************************* + * Copyright (c) 2006, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the 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: * David Dykstal (IBM) - initial contribution. - * *******************************************************************************/ + *******************************************************************************/ package org.eclipse.rse.internal.tests.framework.scripting; import java.text.MessageFormat; diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptParserMessageList.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptParserMessageList.java index 9d7b06b83dc..192e537dcd0 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptParserMessageList.java +++ b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptParserMessageList.java @@ -1,48 +1,49 @@ -/* ******************************************************************************* - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the 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: - * David Dykstal (IBM) - initial contribution. - * *******************************************************************************/ -package org.eclipse.rse.internal.tests.framework.scripting; - -import java.util.List; -import java.util.Vector; - -/** - * A MessageList is a collection of messages. Its severity is the highest - * severity of the messages it contains. - */ -public class ScriptParserMessageList { - - private List messages = new Vector(10); // the initial size is arbitrary - private int severity = ScriptParserMessage.INFO; - - /** - * @param message the message to add to this MessageList - */ - public void add(ScriptParserMessage message) { - messages.add(message); - severity = Math.max(severity, message.getSeverity()); - } - - /** - * @return the severity of this MessageList - */ - public int getSeverity() { - return severity; - } - - /** - * @return the messages in this message list - */ - public ScriptParserMessage[] getMessages() { - ScriptParserMessage[] result = new ScriptParserMessage[messages.size()]; - messages.toArray(result); - return result; - } - -} +/******************************************************************************* + * Copyright (c) 2006, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the 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: + * David Dykstal (IBM) - initial contribution. + *******************************************************************************/ +package org.eclipse.rse.internal.tests.framework.scripting; + +import java.util.List; +import java.util.Vector; + +/** + * A MessageList is a collection of messages. Its severity is the highest + * severity of the messages it contains. + */ +public class ScriptParserMessageList { + + private List messages = new Vector(10); // the initial size is arbitrary + private int severity = ScriptParserMessage.INFO; + + /** + * @param message the message to add to this MessageList + */ + public void add(ScriptParserMessage message) { + messages.add(message); + severity = Math.max(severity, message.getSeverity()); + } + + /** + * @return the severity of this MessageList + */ + public int getSeverity() { + return severity; + } + + /** + * @return the messages in this message list + */ + public ScriptParserMessage[] getMessages() { + ScriptParserMessage[] result = new ScriptParserMessage[messages.size()]; + messages.toArray(result); + return result; + } + +} diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptPause.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptPause.java index e6077889374..91a406388b1 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptPause.java +++ b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptPause.java @@ -1,31 +1,32 @@ -/* ******************************************************************************* - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the 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: - * David Dykstal (IBM) - initial contribution. - * *******************************************************************************/ -package org.eclipse.rse.internal.tests.framework.scripting; - -/** - * A Pause step will stop and wait during interpretation - */ -public class ScriptPause extends ScriptStep { - - private String text; - - public ScriptPause(String text, int lineNumber) { - super(lineNumber); - this.text = text; - } - - /* (non-Javadoc) - * @see org.eclipse.rse.tests.framework.scripting.ScriptStep#run(org.eclipse.rse.tests.framework.scripting.ScriptContext) - */ - public void run(ScriptContext context) { - context.pause(text); - } - -} +/******************************************************************************* + * Copyright (c) 2006, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the 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: + * David Dykstal (IBM) - initial contribution. + *******************************************************************************/ +package org.eclipse.rse.internal.tests.framework.scripting; + +/** + * A Pause step will stop and wait during interpretation + */ +public class ScriptPause extends ScriptStep { + + private String text; + + public ScriptPause(String text, int lineNumber) { + super(lineNumber); + this.text = text; + } + + /* (non-Javadoc) + * @see org.eclipse.rse.tests.framework.scripting.ScriptStep#run(org.eclipse.rse.tests.framework.scripting.ScriptContext) + */ + public void run(ScriptContext context) { + context.pause(text); + } + +} diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptShow.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptShow.java index 8a7284955a3..657202bdee1 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptShow.java +++ b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptShow.java @@ -1,30 +1,31 @@ -/* ******************************************************************************* - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the 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: - * David Dykstal (IBM) - initial contribution. - * *******************************************************************************/ -package org.eclipse.rse.internal.tests.framework.scripting; - -/** - * The Show step shows an image on the current context when run. - */ -public class ScriptShow extends ScriptStep { - private String imageName; - - public ScriptShow(String imageName, int lineNumber) { - super(lineNumber); - this.imageName = imageName; - } - - /* (non-Javadoc) - * @see org.eclipse.rse.tests.framework.scripting.ScriptStep#run(org.eclipse.rse.tests.framework.scripting.ScriptContext) - */ - public void run(ScriptContext context) { - context.show(imageName); - } - -} \ No newline at end of file +/******************************************************************************* + * Copyright (c) 2006, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the 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: + * David Dykstal (IBM) - initial contribution. + *******************************************************************************/ +package org.eclipse.rse.internal.tests.framework.scripting; + +/** + * The Show step shows an image on the current context when run. + */ +public class ScriptShow extends ScriptStep { + private String imageName; + + public ScriptShow(String imageName, int lineNumber) { + super(lineNumber); + this.imageName = imageName; + } + + /* (non-Javadoc) + * @see org.eclipse.rse.tests.framework.scripting.ScriptStep#run(org.eclipse.rse.tests.framework.scripting.ScriptContext) + */ + public void run(ScriptContext context) { + context.show(imageName); + } + +} diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptStep.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptStep.java index f43e8e327c1..d59d37fcd26 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptStep.java +++ b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptStep.java @@ -1,50 +1,51 @@ -/* ******************************************************************************* - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the 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: - * David Dykstal (IBM) - initial contribution. - * *******************************************************************************/ -package org.eclipse.rse.internal.tests.framework.scripting; - -/** - * A Step accomplishes a single action. If the context is in fail mode then steps - * are not executed. - * show anImageName - * tell aTextString - * pause - */ -abstract class ScriptStep extends SyntaxNode { - - /** - * @param lineNumber The line number of this step. Used for diagnostics. - */ - public ScriptStep(int lineNumber) { - super(lineNumber); - } - - /* (non-Javadoc) - * @see org.eclipse.rse.tests.framework.scripting.SyntaxNode#enter(org.eclipse.rse.tests.framework.scripting.ScriptContext) - */ - public void enter(ScriptContext context) { - if (context.getFailed()) return; - run(context); - } - - /** - * Perform the action to be done by this step. - * @param context the Context on which to perform the action. - */ - public abstract void run(ScriptContext context); - - /* (non-Javadoc) - * @see org.eclipse.rse.tests.framework.scripting.SyntaxNode#leave(org.eclipse.rse.tests.framework.scripting.ScriptContext) - */ - public final void leave(ScriptContext context) { - } - -} - - +/******************************************************************************* + * Copyright (c) 2006, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the 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: + * David Dykstal (IBM) - initial contribution. + *******************************************************************************/ +package org.eclipse.rse.internal.tests.framework.scripting; + +/** + * A Step accomplishes a single action. If the context is in fail mode then steps + * are not executed. + * show anImageName + * tell aTextString + * pause + */ +abstract class ScriptStep extends SyntaxNode { + + /** + * @param lineNumber The line number of this step. Used for diagnostics. + */ + public ScriptStep(int lineNumber) { + super(lineNumber); + } + + /* (non-Javadoc) + * @see org.eclipse.rse.tests.framework.scripting.SyntaxNode#enter(org.eclipse.rse.tests.framework.scripting.ScriptContext) + */ + public void enter(ScriptContext context) { + if (context.getFailed()) return; + run(context); + } + + /** + * Perform the action to be done by this step. + * @param context the Context on which to perform the action. + */ + public abstract void run(ScriptContext context); + + /* (non-Javadoc) + * @see org.eclipse.rse.tests.framework.scripting.SyntaxNode#leave(org.eclipse.rse.tests.framework.scripting.ScriptContext) + */ + public final void leave(ScriptContext context) { + } + +} + + diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptTell.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptTell.java index 316c806dae2..9ecbd5f1f47 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptTell.java +++ b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptTell.java @@ -1,31 +1,32 @@ -/* ******************************************************************************* - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the 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: - * David Dykstal (IBM) - initial contribution. - * *******************************************************************************/ -package org.eclipse.rse.internal.tests.framework.scripting; - -/** - * The Tell step shows an image on the current context when run. - */ -public class ScriptTell extends ScriptStep { - - private String text; - - public ScriptTell(String text, int lineNumber) { - super(lineNumber); - this.text = text; - } - - /* (non-Javadoc) - * @see org.eclipse.rse.tests.framework.scripting.ScriptStep#run(org.eclipse.rse.tests.framework.scripting.ScriptContext) - */ - public void run(ScriptContext context) { - context.tell(text); - } - -} \ No newline at end of file +/******************************************************************************* + * Copyright (c) 2006, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the 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: + * David Dykstal (IBM) - initial contribution. + *******************************************************************************/ +package org.eclipse.rse.internal.tests.framework.scripting; + +/** + * The Tell step shows an image on the current context when run. + */ +public class ScriptTell extends ScriptStep { + + private String text; + + public ScriptTell(String text, int lineNumber) { + super(lineNumber); + this.text = text; + } + + /* (non-Javadoc) + * @see org.eclipse.rse.tests.framework.scripting.ScriptStep#run(org.eclipse.rse.tests.framework.scripting.ScriptContext) + */ + public void run(ScriptContext context) { + context.tell(text); + } + +} diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptTestCase.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptTestCase.java index 1f6c0b820f3..03aa23dd044 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptTestCase.java +++ b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptTestCase.java @@ -1,12 +1,13 @@ -/* ******************************************************************************* - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * +/******************************************************************************* + * Copyright (c) 2006, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the 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: * David Dykstal (IBM) - initial contribution. - * *******************************************************************************/ + *******************************************************************************/ package org.eclipse.rse.internal.tests.framework.scripting; import java.io.IOException; diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptTestSuiteHolder.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptTestSuiteHolder.java index f5c98192b4c..38185ce8bfb 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptTestSuiteHolder.java +++ b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/ScriptTestSuiteHolder.java @@ -1,12 +1,13 @@ -/* ******************************************************************************* - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * +/******************************************************************************* + * Copyright (c) 2006, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the 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: * David Dykstal (IBM) - initial contribution. - * *******************************************************************************/ + *******************************************************************************/ package org.eclipse.rse.internal.tests.framework.scripting; import java.net.URL; diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/SyntaxNode.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/SyntaxNode.java index d40b9e69dbb..1f34fe8b753 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/SyntaxNode.java +++ b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/SyntaxNode.java @@ -1,88 +1,89 @@ -/* ******************************************************************************* - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the 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: - * David Dykstal (IBM) - initial contribution. - * *******************************************************************************/ -package org.eclipse.rse.internal.tests.framework.scripting; - -import java.util.Iterator; -import java.util.List; -import java.util.Vector; - -/** - * A syntax tree node. These are typically created by parsing some sort of - * source document. - */ -public abstract class SyntaxNode { - - private List children = new Vector(10); // the size is arbitrary - private int lineNumber; - - /** - * Constructs a syntax node for a particular line in the script. The line number - * is used for diagnostic purposes. - * @param lineNumber - */ - public SyntaxNode(int lineNumber) { - this.lineNumber = lineNumber; - } - - /** - * Adds a child to the list of children maintained by this node. - * @param child the child node to add. - */ - public void add(SyntaxNode child) { - children.add(child); - } - - /** - * Accept a visitor to this node. The visitor is told to enter, each selected - * child told to accept the visitor and then the visitor is told to leave. - * @param visitor - * @see SyntaxTreeVisitor#enter(SyntaxNode) - * @see SyntaxTreeVisitor#leave(SyntaxNode) - * @see SyntaxNode#accept(SyntaxTreeVisitor) - * @see SyntaxNode#getSelectedChildren() - */ - public void accept(SyntaxTreeVisitor visitor) { - visitor.enter(this); - List selected = getSelectedChildren(); - for (Iterator z = selected.iterator(); z.hasNext();) { - SyntaxNode child = (SyntaxNode) z.next(); - child.accept(visitor); - } - visitor.leave(this); - } - - /** - * Perform any actions required when the Node is entered. This could include - * setting any criteria for selection of children later on. (hint, hint) - * @param context The context on which the action may be performed. - */ - public abstract void enter(ScriptContext context); - - /** - * Perform any actions required when the Node is left. - * @param context The context on which the action may be performed. - */ - public abstract void leave(ScriptContext context); - - /** - * Returns the list of selected children. - * The default implementation is to select all children. - * Subclasses can override if necessary. - * @return the List of selected children. - */ - protected List getSelectedChildren() { - return children; - } - - public final int getLineNumber() { - return lineNumber; - } - -} +/******************************************************************************* + * Copyright (c) 2006, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the 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: + * David Dykstal (IBM) - initial contribution. + *******************************************************************************/ +package org.eclipse.rse.internal.tests.framework.scripting; + +import java.util.Iterator; +import java.util.List; +import java.util.Vector; + +/** + * A syntax tree node. These are typically created by parsing some sort of + * source document. + */ +public abstract class SyntaxNode { + + private List children = new Vector(10); // the size is arbitrary + private int lineNumber; + + /** + * Constructs a syntax node for a particular line in the script. The line number + * is used for diagnostic purposes. + * @param lineNumber + */ + public SyntaxNode(int lineNumber) { + this.lineNumber = lineNumber; + } + + /** + * Adds a child to the list of children maintained by this node. + * @param child the child node to add. + */ + public void add(SyntaxNode child) { + children.add(child); + } + + /** + * Accept a visitor to this node. The visitor is told to enter, each selected + * child told to accept the visitor and then the visitor is told to leave. + * @param visitor + * @see SyntaxTreeVisitor#enter(SyntaxNode) + * @see SyntaxTreeVisitor#leave(SyntaxNode) + * @see SyntaxNode#accept(SyntaxTreeVisitor) + * @see SyntaxNode#getSelectedChildren() + */ + public void accept(SyntaxTreeVisitor visitor) { + visitor.enter(this); + List selected = getSelectedChildren(); + for (Iterator z = selected.iterator(); z.hasNext();) { + SyntaxNode child = (SyntaxNode) z.next(); + child.accept(visitor); + } + visitor.leave(this); + } + + /** + * Perform any actions required when the Node is entered. This could include + * setting any criteria for selection of children later on. (hint, hint) + * @param context The context on which the action may be performed. + */ + public abstract void enter(ScriptContext context); + + /** + * Perform any actions required when the Node is left. + * @param context The context on which the action may be performed. + */ + public abstract void leave(ScriptContext context); + + /** + * Returns the list of selected children. + * The default implementation is to select all children. + * Subclasses can override if necessary. + * @return the List of selected children. + */ + protected List getSelectedChildren() { + return children; + } + + public final int getLineNumber() { + return lineNumber; + } + +} diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/SyntaxTreeVisitor.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/SyntaxTreeVisitor.java index bab302a4d3e..c4f38f969cc 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/SyntaxTreeVisitor.java +++ b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/scripting/SyntaxTreeVisitor.java @@ -1,29 +1,30 @@ -/* ******************************************************************************* - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the 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: - * David Dykstal (IBM) - initial contribution. - * *******************************************************************************/ -package org.eclipse.rse.internal.tests.framework.scripting; - -/** - * A visitor visits a node in a syntax tree. - */ -public abstract class SyntaxTreeVisitor { - - /** - * Inform the visitor that a node is being entered. - * @param node - */ - public abstract void enter(SyntaxNode node); - - /** - * Inform the visitor that a node is being left. - * @param node - */ - public abstract void leave(SyntaxNode node); - -} +/******************************************************************************* + * Copyright (c) 2006, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the 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: + * David Dykstal (IBM) - initial contribution. + *******************************************************************************/ +package org.eclipse.rse.internal.tests.framework.scripting; + +/** + * A visitor visits a node in a syntax tree. + */ +public abstract class SyntaxTreeVisitor { + + /** + * Inform the visitor that a node is being entered. + * @param node + */ + public abstract void enter(SyntaxNode node); + + /** + * Inform the visitor that a node is being left. + * @param node + */ + public abstract void leave(SyntaxNode node); + +} diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestPerspectiveFactory.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestPerspectiveFactory.java index c36aa07d677..d4d17cfddc5 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestPerspectiveFactory.java +++ b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestPerspectiveFactory.java @@ -1,12 +1,13 @@ -/* ******************************************************************************* - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * +/******************************************************************************* + * Copyright (c) 2006, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the 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: * David Dykstal (IBM) - initial contribution. - * *******************************************************************************/ + *******************************************************************************/ package org.eclipse.rse.internal.tests.framework.ui; import org.eclipse.ui.IPageLayout; diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestSuiteConsoleView.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestSuiteConsoleView.java index 181fdee5168..92337f978e1 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestSuiteConsoleView.java +++ b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestSuiteConsoleView.java @@ -1,12 +1,13 @@ -/* ******************************************************************************* - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * +/******************************************************************************* + * Copyright (c) 2006, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the 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: * David Dykstal (IBM) - initial contribution. - * *******************************************************************************/ + *******************************************************************************/ package org.eclipse.rse.internal.tests.framework.ui; import org.eclipse.swt.SWT; @@ -59,4 +60,4 @@ public class TestSuiteConsoleView extends ViewPart { } } -} \ No newline at end of file +} diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestSuiteHolderView.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestSuiteHolderView.java index 9c88b9985ac..d406cd0a6b5 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestSuiteHolderView.java +++ b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestSuiteHolderView.java @@ -1,12 +1,13 @@ -/* ******************************************************************************* - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * +/******************************************************************************* + * Copyright (c) 2006, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the 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: * David Dykstal (IBM) - initial contribution. - * *******************************************************************************/ + *******************************************************************************/ package org.eclipse.rse.internal.tests.framework.ui; import java.net.URL; @@ -433,4 +434,4 @@ public class TestSuiteHolderView extends ViewPart implements ITestSuiteHolderLis holderViewer.setSelection(selection); } } -} \ No newline at end of file +} diff --git a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestSuiteImageView.java b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestSuiteImageView.java index f0b4e0a3a5e..d5f3ca8dd66 100644 --- a/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestSuiteImageView.java +++ b/rse/tests/org.eclipse.rse.tests.framework/src/org/eclipse/rse/internal/tests/framework/ui/TestSuiteImageView.java @@ -1,12 +1,13 @@ -/* ******************************************************************************* - * Copyright (c) 2006 IBM Corporation. All rights reserved. - * This program and the accompanying materials are made available under the terms - * of the Eclipse Public License v1.0 which accompanies this distribution, and is - * available at http://www.eclipse.org/legal/epl-v10.html - * +/******************************************************************************* + * Copyright (c) 2006, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the 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: * David Dykstal (IBM) - initial contribution. - * *******************************************************************************/ + *******************************************************************************/ package org.eclipse.rse.internal.tests.framework.ui; import org.eclipse.jface.resource.ImageDescriptor; @@ -62,4 +63,4 @@ public class TestSuiteImageView extends ViewPart { backgroundColor.dispose(); } -} \ No newline at end of file +}