1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-15 04:05:38 +02:00

[cleanup] Update Copyrights

This commit is contained in:
Martin Oberhuber 2007-06-05 11:16:14 +00:00
parent 30c91936d2
commit 262a370121
29 changed files with 585 additions and 557 deletions

View file

@ -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 # All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0 # are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at # which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html # http://www.eclipse.org/legal/epl-v10.html
# #
# Contributors: # Contributors:
# IBM Corporation - initial API and implementation # IBM Corporation - initial API and implementation
############################################################################### ###############################################################################

View file

@ -1,12 +1,13 @@
/* ******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the terms * All rights reserved. This program and the accompanying materials
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * are made available under the terms of the Eclipse Public License v1.0
* available at http://www.eclipse.org/legal/epl-v10.html * which accompanies this distribution, and is available at
* * http://www.eclipse.org/legal/epl-v10.html
*
* Contributors: * Contributors:
* David Dykstal (IBM) - initial contribution. * David Dykstal (IBM) - initial contribution.
* *******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.tests.framework; package org.eclipse.rse.internal.tests.framework;
import org.eclipse.rse.tests.framework.AbstractTestSuiteHolder; import org.eclipse.rse.tests.framework.AbstractTestSuiteHolder;
@ -39,4 +40,4 @@ public class BasicTestSuiteHolder extends AbstractTestSuiteHolder {
return testSuite; return testSuite;
} }
} }

View file

@ -1,12 +1,13 @@
/* ******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the terms * All rights reserved. This program and the accompanying materials
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * are made available under the terms of the Eclipse Public License v1.0
* available at http://www.eclipse.org/legal/epl-v10.html * which accompanies this distribution, and is available at
* * http://www.eclipse.org/legal/epl-v10.html
*
* Contributors: * Contributors:
* David Dykstal (IBM) - initial contribution. * David Dykstal (IBM) - initial contribution.
* *******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.tests.framework; package org.eclipse.rse.internal.tests.framework;
import junit.framework.TestSuite; import junit.framework.TestSuite;

View file

@ -1,12 +1,13 @@
/* ******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the terms * All rights reserved. This program and the accompanying materials
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * are made available under the terms of the Eclipse Public License v1.0
* available at http://www.eclipse.org/legal/epl-v10.html * which accompanies this distribution, and is available at
* * http://www.eclipse.org/legal/epl-v10.html
*
* Contributors: * Contributors:
* David Dykstal (IBM) - initial contribution. * David Dykstal (IBM) - initial contribution.
* *******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.tests.framework; package org.eclipse.rse.internal.tests.framework;
import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.IStatus;

View file

@ -1,12 +1,13 @@
/* ******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the terms * All rights reserved. This program and the accompanying materials
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * are made available under the terms of the Eclipse Public License v1.0
* available at http://www.eclipse.org/legal/epl-v10.html * which accompanies this distribution, and is available at
* * http://www.eclipse.org/legal/epl-v10.html
*
* Contributors: * Contributors:
* David Dykstal (IBM) - initial contribution. * David Dykstal (IBM) - initial contribution.
* *******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.tests.framework; package org.eclipse.rse.internal.tests.framework;
import junit.framework.TestSuite; import junit.framework.TestSuite;

View file

@ -1,12 +1,13 @@
/* ******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the terms * All rights reserved. This program and the accompanying materials
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * are made available under the terms of the Eclipse Public License v1.0
* available at http://www.eclipse.org/legal/epl-v10.html * which accompanies this distribution, and is available at
* * http://www.eclipse.org/legal/epl-v10.html
*
* Contributors: * Contributors:
* David Dykstal (IBM) - initial contribution. * David Dykstal (IBM) - initial contribution.
* *******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.tests.framework.actions; package org.eclipse.rse.internal.tests.framework.actions;
import java.util.Iterator; import java.util.Iterator;
@ -58,4 +59,4 @@ public class ResetHolderDelegate implements IObjectActionDelegate {
public void setActivePart(IAction action, IWorkbenchPart targetPart) { public void setActivePart(IAction action, IWorkbenchPart targetPart) {
} }
} }

View file

@ -1,12 +1,13 @@
/* ******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the terms * All rights reserved. This program and the accompanying materials
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * are made available under the terms of the Eclipse Public License v1.0
* available at http://www.eclipse.org/legal/epl-v10.html * which accompanies this distribution, and is available at
* * http://www.eclipse.org/legal/epl-v10.html
*
* Contributors: * Contributors:
* David Dykstal (IBM) - initial contribution. * David Dykstal (IBM) - initial contribution.
* *******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.tests.framework.actions; package org.eclipse.rse.internal.tests.framework.actions;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
@ -124,4 +125,4 @@ public class RunHolderDelegate implements IObjectActionDelegate {
return result; return result;
} }
} }

View file

@ -1,12 +1,13 @@
/* ******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the terms * All rights reserved. This program and the accompanying materials
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * are made available under the terms of the Eclipse Public License v1.0
* available at http://www.eclipse.org/legal/epl-v10.html * which accompanies this distribution, and is available at
* * http://www.eclipse.org/legal/epl-v10.html
*
* Contributors: * Contributors:
* David Dykstal (IBM) - initial contribution. * David Dykstal (IBM) - initial contribution.
* *******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.tests.framework.actions; package org.eclipse.rse.internal.tests.framework.actions;
import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.IAction;
@ -49,4 +50,4 @@ public class SelectAllHoldersDelegate implements IViewActionDelegate {
public void init(IViewPart view) { public void init(IViewPart view) {
this.view = view; this.view = view;
} }
} }

View file

@ -1,12 +1,13 @@
/* ******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the terms * All rights reserved. This program and the accompanying materials
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * are made available under the terms of the Eclipse Public License v1.0
* available at http://www.eclipse.org/legal/epl-v10.html * which accompanies this distribution, and is available at
* * http://www.eclipse.org/legal/epl-v10.html
*
* Contributors: * Contributors:
* David Dykstal (IBM) - initial contribution. * David Dykstal (IBM) - initial contribution.
* *******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.tests.framework.actions; package org.eclipse.rse.internal.tests.framework.actions;
import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.IAction;

View file

@ -1,12 +1,13 @@
/* ******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the terms * All rights reserved. This program and the accompanying materials
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * are made available under the terms of the Eclipse Public License v1.0
* available at http://www.eclipse.org/legal/epl-v10.html * which accompanies this distribution, and is available at
* * http://www.eclipse.org/legal/epl-v10.html
*
* Contributors: * Contributors:
* David Dykstal (IBM) - initial contribution. * David Dykstal (IBM) - initial contribution.
* *******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.tests.framework.scripting; package org.eclipse.rse.internal.tests.framework.scripting;
import java.io.PrintStream; import java.io.PrintStream;

View file

@ -1,12 +1,13 @@
/* ******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the terms * All rights reserved. This program and the accompanying materials
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * are made available under the terms of the Eclipse Public License v1.0
* available at http://www.eclipse.org/legal/epl-v10.html * which accompanies this distribution, and is available at
* * http://www.eclipse.org/legal/epl-v10.html
*
* Contributors: * Contributors:
* David Dykstal (IBM) - initial contribution. * David Dykstal (IBM) - initial contribution.
* *******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.tests.framework.scripting; package org.eclipse.rse.internal.tests.framework.scripting;
import java.net.URL; import java.net.URL;

View file

@ -1,49 +1,50 @@
/* ******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the terms * All rights reserved. This program and the accompanying materials
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * are made available under the terms of the Eclipse Public License v1.0
* available at http://www.eclipse.org/legal/epl-v10.html * which accompanies this distribution, and is available at
* * http://www.eclipse.org/legal/epl-v10.html
* Contributors: *
* David Dykstal (IBM) - initial contribution. * Contributors:
* *******************************************************************************/ * David Dykstal (IBM) - initial contribution.
package org.eclipse.rse.internal.tests.framework.scripting; *******************************************************************************/
package org.eclipse.rse.internal.tests.framework.scripting;
/**
* A Script is a collection of steps. /**
*/ * A Script is a collection of steps.
public class Script extends SyntaxNode { */
public class Script extends SyntaxNode {
private boolean failed = false;
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. * 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); public Script() {
} super(0);
}
/* (non-Javadoc)
* @see org.eclipse.rse.tests.framework.scripting.SyntaxNode#enter(org.eclipse.rse.tests.framework.scripting.ScriptContext) /* (non-Javadoc)
*/ * @see org.eclipse.rse.tests.framework.scripting.SyntaxNode#enter(org.eclipse.rse.tests.framework.scripting.ScriptContext)
public void enter(ScriptContext context) { */
} public void enter(ScriptContext context) {
}
/* (non-Javadoc)
* @see org.eclipse.rse.tests.framework.scripting.SyntaxNode#leave(org.eclipse.rse.tests.framework.scripting.ScriptContext) /* (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(); public void leave(ScriptContext context) {
} failed = context.getFailed();
}
/**
* @return the failure state of the script. /**
*/ * @return the failure state of the script.
public boolean hasFailed() { */
return failed; public boolean hasFailed() {
} return failed;
}
}
}

View file

@ -1,12 +1,13 @@
/* ******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the terms * All rights reserved. This program and the accompanying materials
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * are made available under the terms of the Eclipse Public License v1.0
* available at http://www.eclipse.org/legal/epl-v10.html * which accompanies this distribution, and is available at
* * http://www.eclipse.org/legal/epl-v10.html
*
* Contributors: * Contributors:
* David Dykstal (IBM) - initial contribution. * David Dykstal (IBM) - initial contribution.
* *******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.tests.framework.scripting; package org.eclipse.rse.internal.tests.framework.scripting;
import java.net.MalformedURLException; import java.net.MalformedURLException;

View file

@ -1,58 +1,59 @@
/* ******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the terms * All rights reserved. This program and the accompanying materials
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * are made available under the terms of the Eclipse Public License v1.0
* available at http://www.eclipse.org/legal/epl-v10.html * which accompanies this distribution, and is available at
* * http://www.eclipse.org/legal/epl-v10.html
* Contributors: *
* David Dykstal (IBM) - initial contribution. * Contributors:
* *******************************************************************************/ * David Dykstal (IBM) - initial contribution.
package org.eclipse.rse.internal.tests.framework.scripting; *******************************************************************************/
package org.eclipse.rse.internal.tests.framework.scripting;
import java.io.IOException;
import java.io.InputStream; import java.io.IOException;
import java.io.InputStream;
/**
* An interpreter runs a script in a particular context. /**
*/ * An interpreter runs a script in a particular context.
public class ScriptInterpreter extends SyntaxTreeVisitor { */
public class ScriptInterpreter extends SyntaxTreeVisitor {
private ScriptContext context;
private ScriptParserMessageList messageList = null; private ScriptContext context;
private ScriptParserMessageList messageList = null;
public ScriptInterpreter(ScriptContext context) {
this.context = context; public ScriptInterpreter(ScriptContext context) {
} this.context = context;
}
/**
* @param in the InputStream to be interpreted /**
* @return true if the parsing and interpretation concluded successfully. * @param in the InputStream to be interpreted
* @throws IOException * @return true if the parsing and interpretation concluded successfully.
*/ * @throws IOException
public boolean run(InputStream in) throws IOException { */
messageList = new ScriptParserMessageList(); public boolean run(InputStream in) throws IOException {
ScriptParser p = new ScriptParser(messageList); messageList = new ScriptParserMessageList();
Script script = p.parse(in); ScriptParser p = new ScriptParser(messageList);
boolean success = false; Script script = p.parse(in);
if (script != null) { boolean success = false;
script.accept(this); if (script != null) {
success = !script.hasFailed(); script.accept(this);
} success = !script.hasFailed();
return success; }
} return success;
}
/* (non-Javadoc)
* @see org.eclipse.rse.tests.framework.scripting.SyntaxTreeVisitor#enter(org.eclipse.rse.tests.framework.scripting.SyntaxNode) /* (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); 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) /* (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); public void leave(SyntaxNode node) {
} node.leave(context);
}
}
}

View file

@ -1,12 +1,13 @@
/* ******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the terms * All rights reserved. This program and the accompanying materials
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * are made available under the terms of the Eclipse Public License v1.0
* available at http://www.eclipse.org/legal/epl-v10.html * which accompanies this distribution, and is available at
* * http://www.eclipse.org/legal/epl-v10.html
*
* Contributors: * Contributors:
* David Dykstal (IBM) - initial contribution. * David Dykstal (IBM) - initial contribution.
* *******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.tests.framework.scripting; package org.eclipse.rse.internal.tests.framework.scripting;
import java.io.BufferedReader; import java.io.BufferedReader;
@ -129,4 +130,4 @@ public class ScriptParser {
} }
} }

View file

@ -1,12 +1,13 @@
/* ******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the terms * All rights reserved. This program and the accompanying materials
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * are made available under the terms of the Eclipse Public License v1.0
* available at http://www.eclipse.org/legal/epl-v10.html * which accompanies this distribution, and is available at
* * http://www.eclipse.org/legal/epl-v10.html
*
* Contributors: * Contributors:
* David Dykstal (IBM) - initial contribution. * David Dykstal (IBM) - initial contribution.
* *******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.tests.framework.scripting; package org.eclipse.rse.internal.tests.framework.scripting;
import java.text.MessageFormat; import java.text.MessageFormat;

View file

@ -1,48 +1,49 @@
/* ******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the terms * All rights reserved. This program and the accompanying materials
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * are made available under the terms of the Eclipse Public License v1.0
* available at http://www.eclipse.org/legal/epl-v10.html * which accompanies this distribution, and is available at
* * http://www.eclipse.org/legal/epl-v10.html
* Contributors: *
* David Dykstal (IBM) - initial contribution. * Contributors:
* *******************************************************************************/ * David Dykstal (IBM) - initial contribution.
package org.eclipse.rse.internal.tests.framework.scripting; *******************************************************************************/
package org.eclipse.rse.internal.tests.framework.scripting;
import java.util.List;
import java.util.Vector; 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. * A MessageList is a collection of messages. Its severity is the highest
*/ * severity of the messages it contains.
public class ScriptParserMessageList { */
public class ScriptParserMessageList {
private List messages = new Vector(10); // the initial size is arbitrary
private int severity = ScriptParserMessage.INFO; 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 /**
*/ * @param message the message to add to this MessageList
public void add(ScriptParserMessage message) { */
messages.add(message); public void add(ScriptParserMessage message) {
severity = Math.max(severity, message.getSeverity()); messages.add(message);
} severity = Math.max(severity, message.getSeverity());
}
/**
* @return the severity of this MessageList /**
*/ * @return the severity of this MessageList
public int getSeverity() { */
return severity; public int getSeverity() {
} return severity;
}
/**
* @return the messages in this message list /**
*/ * @return the messages in this message list
public ScriptParserMessage[] getMessages() { */
ScriptParserMessage[] result = new ScriptParserMessage[messages.size()]; public ScriptParserMessage[] getMessages() {
messages.toArray(result); ScriptParserMessage[] result = new ScriptParserMessage[messages.size()];
return result; messages.toArray(result);
} return result;
}
}
}

View file

@ -1,31 +1,32 @@
/* ******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the terms * All rights reserved. This program and the accompanying materials
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * are made available under the terms of the Eclipse Public License v1.0
* available at http://www.eclipse.org/legal/epl-v10.html * which accompanies this distribution, and is available at
* * http://www.eclipse.org/legal/epl-v10.html
* Contributors: *
* David Dykstal (IBM) - initial contribution. * Contributors:
* *******************************************************************************/ * David Dykstal (IBM) - initial contribution.
package org.eclipse.rse.internal.tests.framework.scripting; *******************************************************************************/
package org.eclipse.rse.internal.tests.framework.scripting;
/**
* A Pause step will stop and wait during interpretation /**
*/ * A Pause step will stop and wait during interpretation
public class ScriptPause extends ScriptStep { */
public class ScriptPause extends ScriptStep {
private String text;
private String text;
public ScriptPause(String text, int lineNumber) {
super(lineNumber); public ScriptPause(String text, int lineNumber) {
this.text = text; super(lineNumber);
} this.text = text;
}
/* (non-Javadoc)
* @see org.eclipse.rse.tests.framework.scripting.ScriptStep#run(org.eclipse.rse.tests.framework.scripting.ScriptContext) /* (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); public void run(ScriptContext context) {
} context.pause(text);
}
}
}

View file

@ -1,30 +1,31 @@
/* ******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the terms * All rights reserved. This program and the accompanying materials
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * are made available under the terms of the Eclipse Public License v1.0
* available at http://www.eclipse.org/legal/epl-v10.html * which accompanies this distribution, and is available at
* * http://www.eclipse.org/legal/epl-v10.html
* Contributors: *
* David Dykstal (IBM) - initial contribution. * Contributors:
* *******************************************************************************/ * David Dykstal (IBM) - initial contribution.
package org.eclipse.rse.internal.tests.framework.scripting; *******************************************************************************/
package org.eclipse.rse.internal.tests.framework.scripting;
/**
* The Show step shows an image on the current context when run. /**
*/ * The Show step shows an image on the current context when run.
public class ScriptShow extends ScriptStep { */
private String imageName; public class ScriptShow extends ScriptStep {
private String imageName;
public ScriptShow(String imageName, int lineNumber) {
super(lineNumber); public ScriptShow(String imageName, int lineNumber) {
this.imageName = imageName; super(lineNumber);
} this.imageName = imageName;
}
/* (non-Javadoc)
* @see org.eclipse.rse.tests.framework.scripting.ScriptStep#run(org.eclipse.rse.tests.framework.scripting.ScriptContext) /* (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); public void run(ScriptContext context) {
} context.show(imageName);
}
}
}

View file

@ -1,50 +1,51 @@
/* ******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the terms * All rights reserved. This program and the accompanying materials
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * are made available under the terms of the Eclipse Public License v1.0
* available at http://www.eclipse.org/legal/epl-v10.html * which accompanies this distribution, and is available at
* * http://www.eclipse.org/legal/epl-v10.html
* Contributors: *
* David Dykstal (IBM) - initial contribution. * Contributors:
* *******************************************************************************/ * David Dykstal (IBM) - initial contribution.
package org.eclipse.rse.internal.tests.framework.scripting; *******************************************************************************/
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. * A Step accomplishes a single action. If the context is in fail mode then steps
* show anImageName * are not executed.
* tell aTextString * show anImageName
* pause * tell aTextString
*/ * pause
abstract class ScriptStep extends SyntaxNode { */
abstract class ScriptStep extends SyntaxNode {
/**
* @param lineNumber The line number of this step. Used for diagnostics. /**
*/ * @param lineNumber The line number of this step. Used for diagnostics.
public ScriptStep(int lineNumber) { */
super(lineNumber); public ScriptStep(int lineNumber) {
} super(lineNumber);
}
/* (non-Javadoc)
* @see org.eclipse.rse.tests.framework.scripting.SyntaxNode#enter(org.eclipse.rse.tests.framework.scripting.ScriptContext) /* (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; public void enter(ScriptContext context) {
run(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. * 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); */
public abstract void run(ScriptContext context);
/* (non-Javadoc)
* @see org.eclipse.rse.tests.framework.scripting.SyntaxNode#leave(org.eclipse.rse.tests.framework.scripting.ScriptContext) /* (non-Javadoc)
*/ * @see org.eclipse.rse.tests.framework.scripting.SyntaxNode#leave(org.eclipse.rse.tests.framework.scripting.ScriptContext)
public final void leave(ScriptContext context) { */
} public final void leave(ScriptContext context) {
}
}
}

View file

@ -1,31 +1,32 @@
/* ******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the terms * All rights reserved. This program and the accompanying materials
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * are made available under the terms of the Eclipse Public License v1.0
* available at http://www.eclipse.org/legal/epl-v10.html * which accompanies this distribution, and is available at
* * http://www.eclipse.org/legal/epl-v10.html
* Contributors: *
* David Dykstal (IBM) - initial contribution. * Contributors:
* *******************************************************************************/ * David Dykstal (IBM) - initial contribution.
package org.eclipse.rse.internal.tests.framework.scripting; *******************************************************************************/
package org.eclipse.rse.internal.tests.framework.scripting;
/**
* The Tell step shows an image on the current context when run. /**
*/ * The Tell step shows an image on the current context when run.
public class ScriptTell extends ScriptStep { */
public class ScriptTell extends ScriptStep {
private String text;
private String text;
public ScriptTell(String text, int lineNumber) {
super(lineNumber); public ScriptTell(String text, int lineNumber) {
this.text = text; super(lineNumber);
} this.text = text;
}
/* (non-Javadoc)
* @see org.eclipse.rse.tests.framework.scripting.ScriptStep#run(org.eclipse.rse.tests.framework.scripting.ScriptContext) /* (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); public void run(ScriptContext context) {
} context.tell(text);
}
}
}

View file

@ -1,12 +1,13 @@
/* ******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the terms * All rights reserved. This program and the accompanying materials
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * are made available under the terms of the Eclipse Public License v1.0
* available at http://www.eclipse.org/legal/epl-v10.html * which accompanies this distribution, and is available at
* * http://www.eclipse.org/legal/epl-v10.html
*
* Contributors: * Contributors:
* David Dykstal (IBM) - initial contribution. * David Dykstal (IBM) - initial contribution.
* *******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.tests.framework.scripting; package org.eclipse.rse.internal.tests.framework.scripting;
import java.io.IOException; import java.io.IOException;

View file

@ -1,12 +1,13 @@
/* ******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the terms * All rights reserved. This program and the accompanying materials
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * are made available under the terms of the Eclipse Public License v1.0
* available at http://www.eclipse.org/legal/epl-v10.html * which accompanies this distribution, and is available at
* * http://www.eclipse.org/legal/epl-v10.html
*
* Contributors: * Contributors:
* David Dykstal (IBM) - initial contribution. * David Dykstal (IBM) - initial contribution.
* *******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.tests.framework.scripting; package org.eclipse.rse.internal.tests.framework.scripting;
import java.net.URL; import java.net.URL;

View file

@ -1,88 +1,89 @@
/* ******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the terms * All rights reserved. This program and the accompanying materials
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * are made available under the terms of the Eclipse Public License v1.0
* available at http://www.eclipse.org/legal/epl-v10.html * which accompanies this distribution, and is available at
* * http://www.eclipse.org/legal/epl-v10.html
* Contributors: *
* David Dykstal (IBM) - initial contribution. * Contributors:
* *******************************************************************************/ * David Dykstal (IBM) - initial contribution.
package org.eclipse.rse.internal.tests.framework.scripting; *******************************************************************************/
package org.eclipse.rse.internal.tests.framework.scripting;
import java.util.Iterator;
import java.util.List; import java.util.Iterator;
import java.util.Vector; import java.util.List;
import java.util.Vector;
/**
* A syntax tree node. These are typically created by parsing some sort of /**
* source document. * A syntax tree node. These are typically created by parsing some sort of
*/ * source document.
public abstract class SyntaxNode { */
public abstract class SyntaxNode {
private List children = new Vector(10); // the size is arbitrary
private int lineNumber; 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. * Constructs a syntax node for a particular line in the script. The line number
* @param lineNumber * is used for diagnostic purposes.
*/ * @param lineNumber
public SyntaxNode(int lineNumber) { */
this.lineNumber = 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. * 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); 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. * Accept a visitor to this node. The visitor is told to enter, each selected
* @param visitor * child told to accept the visitor and then the visitor is told to leave.
* @see SyntaxTreeVisitor#enter(SyntaxNode) * @param visitor
* @see SyntaxTreeVisitor#leave(SyntaxNode) * @see SyntaxTreeVisitor#enter(SyntaxNode)
* @see SyntaxNode#accept(SyntaxTreeVisitor) * @see SyntaxTreeVisitor#leave(SyntaxNode)
* @see SyntaxNode#getSelectedChildren() * @see SyntaxNode#accept(SyntaxTreeVisitor)
*/ * @see SyntaxNode#getSelectedChildren()
public void accept(SyntaxTreeVisitor visitor) { */
visitor.enter(this); public void accept(SyntaxTreeVisitor visitor) {
List selected = getSelectedChildren(); visitor.enter(this);
for (Iterator z = selected.iterator(); z.hasNext();) { List selected = getSelectedChildren();
SyntaxNode child = (SyntaxNode) z.next(); for (Iterator z = selected.iterator(); z.hasNext();) {
child.accept(visitor); SyntaxNode child = (SyntaxNode) z.next();
} child.accept(visitor);
visitor.leave(this); }
} 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) * Perform any actions required when the Node is entered. This could include
* @param context The context on which the action may be performed. * 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); */
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. * 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); */
public abstract void leave(ScriptContext context);
/**
* Returns the list of selected children. /**
* The default implementation is to select all children. * Returns the list of selected children.
* Subclasses can override if necessary. * The default implementation is to select all children.
* @return the List of selected children. * Subclasses can override if necessary.
*/ * @return the List of selected children.
protected List getSelectedChildren() { */
return children; protected List getSelectedChildren() {
} return children;
}
public final int getLineNumber() {
return lineNumber; public final int getLineNumber() {
} return lineNumber;
}
}
}

View file

@ -1,29 +1,30 @@
/* ******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the terms * All rights reserved. This program and the accompanying materials
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * are made available under the terms of the Eclipse Public License v1.0
* available at http://www.eclipse.org/legal/epl-v10.html * which accompanies this distribution, and is available at
* * http://www.eclipse.org/legal/epl-v10.html
* Contributors: *
* David Dykstal (IBM) - initial contribution. * Contributors:
* *******************************************************************************/ * David Dykstal (IBM) - initial contribution.
package org.eclipse.rse.internal.tests.framework.scripting; *******************************************************************************/
package org.eclipse.rse.internal.tests.framework.scripting;
/**
* A visitor visits a node in a syntax tree. /**
*/ * A visitor visits a node in a syntax tree.
public abstract class SyntaxTreeVisitor { */
public abstract class SyntaxTreeVisitor {
/**
* Inform the visitor that a node is being entered. /**
* @param node * Inform the visitor that a node is being entered.
*/ * @param node
public abstract void enter(SyntaxNode node); */
public abstract void enter(SyntaxNode node);
/**
* Inform the visitor that a node is being left. /**
* @param node * Inform the visitor that a node is being left.
*/ * @param node
public abstract void leave(SyntaxNode node); */
public abstract void leave(SyntaxNode node);
}
}

View file

@ -1,12 +1,13 @@
/* ******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the terms * All rights reserved. This program and the accompanying materials
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * are made available under the terms of the Eclipse Public License v1.0
* available at http://www.eclipse.org/legal/epl-v10.html * which accompanies this distribution, and is available at
* * http://www.eclipse.org/legal/epl-v10.html
*
* Contributors: * Contributors:
* David Dykstal (IBM) - initial contribution. * David Dykstal (IBM) - initial contribution.
* *******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.tests.framework.ui; package org.eclipse.rse.internal.tests.framework.ui;
import org.eclipse.ui.IPageLayout; import org.eclipse.ui.IPageLayout;

View file

@ -1,12 +1,13 @@
/* ******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the terms * All rights reserved. This program and the accompanying materials
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * are made available under the terms of the Eclipse Public License v1.0
* available at http://www.eclipse.org/legal/epl-v10.html * which accompanies this distribution, and is available at
* * http://www.eclipse.org/legal/epl-v10.html
*
* Contributors: * Contributors:
* David Dykstal (IBM) - initial contribution. * David Dykstal (IBM) - initial contribution.
* *******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.tests.framework.ui; package org.eclipse.rse.internal.tests.framework.ui;
import org.eclipse.swt.SWT; import org.eclipse.swt.SWT;
@ -59,4 +60,4 @@ public class TestSuiteConsoleView extends ViewPart {
} }
} }
} }

View file

@ -1,12 +1,13 @@
/* ******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the terms * All rights reserved. This program and the accompanying materials
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * are made available under the terms of the Eclipse Public License v1.0
* available at http://www.eclipse.org/legal/epl-v10.html * which accompanies this distribution, and is available at
* * http://www.eclipse.org/legal/epl-v10.html
*
* Contributors: * Contributors:
* David Dykstal (IBM) - initial contribution. * David Dykstal (IBM) - initial contribution.
* *******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.tests.framework.ui; package org.eclipse.rse.internal.tests.framework.ui;
import java.net.URL; import java.net.URL;
@ -433,4 +434,4 @@ public class TestSuiteHolderView extends ViewPart implements ITestSuiteHolderLis
holderViewer.setSelection(selection); holderViewer.setSelection(selection);
} }
} }
} }

View file

@ -1,12 +1,13 @@
/* ******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 IBM Corporation. All rights reserved. * Copyright (c) 2006, 2007 IBM Corporation and others.
* This program and the accompanying materials are made available under the terms * All rights reserved. This program and the accompanying materials
* of the Eclipse Public License v1.0 which accompanies this distribution, and is * are made available under the terms of the Eclipse Public License v1.0
* available at http://www.eclipse.org/legal/epl-v10.html * which accompanies this distribution, and is available at
* * http://www.eclipse.org/legal/epl-v10.html
*
* Contributors: * Contributors:
* David Dykstal (IBM) - initial contribution. * David Dykstal (IBM) - initial contribution.
* *******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.tests.framework.ui; package org.eclipse.rse.internal.tests.framework.ui;
import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.resource.ImageDescriptor;
@ -62,4 +63,4 @@ public class TestSuiteImageView extends ViewPart {
backgroundColor.dispose(); backgroundColor.dispose();
} }
} }