1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Code streamlining.

This commit is contained in:
Sergey Prigogin 2011-02-05 02:47:10 +00:00
parent 97b21f3397
commit a5c4ac9c10
13 changed files with 86 additions and 170 deletions

View file

@ -1,33 +0,0 @@
/*******************************************************************************
* Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik
* Rapperswil, University of applied sciences 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:
* Institute for Software - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.ui.tests.refactoring;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
public class Messages {
private static final String BUNDLE_NAME = "org.eclipse.cdt.ui.tests.refactoring.messages"; //$NON-NLS-1$
private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
.getBundle(BUNDLE_NAME);
private Messages() {
}
public static String getString(String key) {
try {
return RESOURCE_BUNDLE.getString(key);
} catch (MissingResourceException e) {
return '!' + key + '!';
}
}
}

View file

@ -13,9 +13,9 @@ package org.eclipse.cdt.ui.tests.refactoring;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.util.Collection;
import java.util.Map; import java.util.Map;
import java.util.TreeMap; import java.util.TreeMap;
import java.util.Vector;
import org.eclipse.cdt.core.tests.BaseTestFramework; import org.eclipse.cdt.core.tests.BaseTestFramework;
import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFile;
@ -27,7 +27,6 @@ import org.eclipse.jface.text.TextSelection;
/** /**
* @author Guido Zgraggen IFS * @author Guido Zgraggen IFS
*
*/ */
public abstract class RefactoringBaseTest extends BaseTestFramework implements ILogListener{ public abstract class RefactoringBaseTest extends BaseTestFramework implements ILogListener{
protected static final NullProgressMonitor NULL_PROGRESS_MONITOR = new NullProgressMonitor(); protected static final NullProgressMonitor NULL_PROGRESS_MONITOR = new NullProgressMonitor();
@ -40,7 +39,7 @@ public abstract class RefactoringBaseTest extends BaseTestFramework implements I
super(name); super(name);
} }
public RefactoringBaseTest(String name, Vector<TestSourceFile> files) { public RefactoringBaseTest(String name, Collection<TestSourceFile> files) {
super(name); super(name);
for (TestSourceFile file : files) { for (TestSourceFile file : files) {
fileMap.put(file.getName(), file); fileMap.put(file.getName(), file);

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2009, 2010 Institute for Software, HSR Hochschule fuer Technik * Copyright (c) 2009, 2011 Institute for Software, HSR Hochschule fuer Technik
* Rapperswil, University of applied sciences and others. * Rapperswil, University of applied sciences 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
@ -13,8 +13,8 @@ package org.eclipse.cdt.ui.tests.refactoring;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.net.URI; import java.net.URI;
import java.util.Collection;
import java.util.Properties; import java.util.Properties;
import java.util.Vector;
import org.eclipse.core.filesystem.URIUtil; import org.eclipse.core.filesystem.URIUtil;
import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor;
@ -29,15 +29,11 @@ import org.eclipse.cdt.internal.ui.refactoring.CRefactoring;
/** /**
* @author Emanuel Graf IFS * @author Emanuel Graf IFS
*
*/ */
public class RefactoringHistoryTest extends public class RefactoringHistoryTest extends ExtractFunctionRefactoringTest {
ExtractFunctionRefactoringTest {
private TestSourceFile scriptFile; private TestSourceFile scriptFile;
public RefactoringHistoryTest(String name, public RefactoringHistoryTest(String name, Collection<TestSourceFile> files) {
Vector<TestSourceFile> files) {
super(name, files); super(name, files);
} }

View file

@ -14,8 +14,8 @@ package org.eclipse.cdt.ui.tests.refactoring;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.IOException; import java.io.IOException;
import java.util.Collection;
import java.util.Properties; import java.util.Properties;
import java.util.Vector;
import org.eclipse.ltk.core.refactoring.RefactoringStatus; import org.eclipse.ltk.core.refactoring.RefactoringStatus;
import org.eclipse.ltk.core.refactoring.RefactoringStatusEntry; import org.eclipse.ltk.core.refactoring.RefactoringStatusEntry;
@ -36,12 +36,9 @@ public abstract class RefactoringTest extends RefactoringBaseTest {
protected String fileName; protected String fileName;
protected RefactoringASTCache astCache; protected RefactoringASTCache astCache;
public RefactoringTest(String name, Vector<TestSourceFile> files) { public RefactoringTest(String name, Collection<TestSourceFile> files) {
super(name, files); super(name, files);
initializeConfiguration(files); initializeConfiguration(files);
for (TestSourceFile file : files) {
fileMap.put(file.getName(), file);
}
} }
protected abstract void configureRefactoring(Properties refactoringProperties); protected abstract void configureRefactoring(Properties refactoringProperties);
@ -63,7 +60,7 @@ public abstract class RefactoringTest extends RefactoringBaseTest {
super.tearDown(); super.tearDown();
} }
private void initializeConfiguration(Vector<TestSourceFile> files) { private void initializeConfiguration(Collection<TestSourceFile> files) {
TestSourceFile configFile = null; TestSourceFile configFile = null;
for (TestSourceFile currentFile : files) { for (TestSourceFile currentFile : files) {

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik * Copyright (c) 2008, 2011 Institute for Software, HSR Hochschule fuer Technik
* Rapperswil, University of applied sciences and others * Rapperswil, University of applied sciences 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
@ -15,10 +15,9 @@ import java.io.BufferedReader;
import java.io.FileReader; import java.io.FileReader;
import java.io.IOException; import java.io.IOException;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator; import java.util.Iterator;
import java.util.Vector;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
@ -34,10 +33,8 @@ import org.eclipse.cdt.ui.testplugin.CTestPlugin;
/** /**
* @author Emanuel Graf * @author Emanuel Graf
*
*/ */
public class RefactoringTester extends TestSuite{ public class RefactoringTester extends TestSuite{
enum MatcherState{skip, inTest, inSource, inExpectedResult} enum MatcherState{skip, inTest, inSource, inExpectedResult}
private static final String classRegexp = "//#(.*)\\s*(\\w*)*$"; //$NON-NLS-1$ private static final String classRegexp = "//#(.*)\\s*(\\w*)*$"; //$NON-NLS-1$
@ -61,9 +58,8 @@ public class RefactoringTester extends TestSuite{
} }
private static ArrayList<RefactoringBaseTest> createTests(BufferedReader inputReader) throws Exception { private static ArrayList<RefactoringBaseTest> createTests(BufferedReader inputReader) throws Exception {
String line; String line;
Vector<TestSourceFile> files = new Vector<TestSourceFile>(); Collection<TestSourceFile> files = new ArrayList<TestSourceFile>();
TestSourceFile actFile = null; TestSourceFile actFile = null;
MatcherState matcherState = MatcherState.skip; MatcherState matcherState = MatcherState.skip;
ArrayList<RefactoringBaseTest> testCases = new ArrayList<RefactoringBaseTest>(); ArrayList<RefactoringBaseTest> testCases = new ArrayList<RefactoringBaseTest>();
@ -72,12 +68,11 @@ public class RefactoringTester extends TestSuite{
boolean bevorFirstTest = true; boolean bevorFirstTest = true;
while ((line = inputReader.readLine()) != null) { while ((line = inputReader.readLine()) != null) {
if (lineMatchesBeginOfTest(line)) { if (lineMatchesBeginOfTest(line)) {
if (!bevorFirstTest) { if (!bevorFirstTest) {
RefactoringBaseTest test = createTestClass(className, testName, files); RefactoringBaseTest test = createTestClass(className, testName, files);
testCases.add(test); testCases.add(test);
files = new Vector<TestSourceFile>(); files = new ArrayList<TestSourceFile>();
className = null; className = null;
testName = null; testName = null;
} }
@ -118,21 +113,22 @@ public class RefactoringTester extends TestSuite{
return testCases; return testCases;
} }
private static RefactoringBaseTest createTestClass(String className, String testName, Collection<TestSourceFile> files) throws Exception {
private static RefactoringBaseTest createTestClass(String className, String testName, Vector<TestSourceFile> files) throws Exception {
try { try {
Class<?> refClass = Class.forName(className); Class<?> refClass = Class.forName(className);
Class<?> paratypes[] = new Class[2]; if (testName == null) {
paratypes[0] = testName.getClass(); testName = refClass.getSimpleName();
paratypes[1] = files.getClass(); }
Constructor<?> ct = refClass.getConstructor(paratypes); Constructor<?>[] constructors = refClass.getConstructors();
Object arglist[] = new Object[2]; for (Constructor<?> ctor : constructors) {
arglist[0] = testName; Object arglist[] = new Object[] { testName, files };
arglist[1] = files; if (ctor.getParameterTypes().length == arglist.length) {
RefactoringBaseTest test = (RefactoringBaseTest) ct.newInstance(arglist); RefactoringBaseTest test = null;
try {
test = (RefactoringBaseTest) ctor.newInstance(arglist);
} catch (IllegalArgumentException e) {
continue;
}
for (TestSourceFile file : files) { for (TestSourceFile file : files) {
TextSelection sel = file.getSelection(); TextSelection sel = file.getSelection();
if (sel != null) { if (sel != null) {
@ -142,20 +138,13 @@ public class RefactoringTester extends TestSuite{
} }
} }
return test; return test;
}
}
throw new Exception(className + " class does not provide required constructor"); //$NON-NLS-1$
} catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) {
throw new Exception(Messages.getString("RefactoringTester.UnknownTestClass")); //$NON-NLS-1$ throw new Exception("Unknown test class " + className); //$NON-NLS-1$
} catch (SecurityException e) { } catch (Exception e) {
throw new Exception(Messages.getString("RefactoringTester.SecurityException"), e); //$NON-NLS-1$ throw new Exception(e.getClass().getSimpleName() + " diring creation of test " + className, e); //$NON-NLS-1$
} catch (NoSuchMethodException e) {
throw new Exception(Messages.getString("RefactoringTester.ConstructorError")); //$NON-NLS-1$
} catch (IllegalArgumentException e) {
throw new Exception(Messages.getString("RefactoringTester.IllegalArgument"), e); //$NON-NLS-1$
} catch (InstantiationException e) {
throw new Exception(Messages.getString("RefactoringTester.InstantiationException"), e); //$NON-NLS-1$
} catch (IllegalAccessException e) {
throw new Exception(Messages.getString("RefactoringTester.IllegalAccessException"), e); //$NON-NLS-1$
} catch (InvocationTargetException e) {
throw new Exception(Messages.getString("RefactoringTester.InvocationTargetException"), e); //$NON-NLS-1$
} }
} }
@ -195,8 +184,7 @@ public class RefactoringTester extends TestSuite{
Matcher matcherBeginOfTest = createMatcherFromString(testRegexp, line); Matcher matcherBeginOfTest = createMatcherFromString(testRegexp, line);
if (matcherBeginOfTest.find()) if (matcherBeginOfTest.find())
return matcherBeginOfTest.group(1); return matcherBeginOfTest.group(1);
else return null;
return Messages.getString("RefactoringTester.NotNamed"); //$NON-NLS-1$
} }
private static boolean lineMatchesBeginOfResult(String line) { private static boolean lineMatchesBeginOfResult(String line) {

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2008, 2009 Institute for Software, HSR Hochschule fuer Technik * Copyright (c) 2008, 2011 Institute for Software, HSR Hochschule fuer Technik
* Rapperswil, University of applied sciences and others * Rapperswil, University of applied sciences 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
@ -11,8 +11,8 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.ui.tests.refactoring.extractconstant; package org.eclipse.cdt.ui.tests.refactoring.extractconstant;
import java.util.Collection;
import java.util.Properties; import java.util.Properties;
import java.util.Vector;
import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFile;
import org.eclipse.ltk.core.refactoring.Change; import org.eclipse.ltk.core.refactoring.Change;
@ -30,11 +30,9 @@ import org.eclipse.cdt.internal.ui.refactoring.utils.VisibilityEnum;
* @author Emanuel Graf * @author Emanuel Graf
*/ */
public class ExtractConstantRefactoringTest extends RefactoringTest { public class ExtractConstantRefactoringTest extends RefactoringTest {
protected VisibilityEnum visibility; protected VisibilityEnum visibility;
public ExtractConstantRefactoringTest(String name, Vector<TestSourceFile> files) { public ExtractConstantRefactoringTest(String name, Collection<TestSourceFile> files) {
super(name, files); super(name, files);
} }
@ -57,7 +55,5 @@ public class ExtractConstantRefactoringTest extends RefactoringTest {
@Override @Override
protected void configureRefactoring(Properties refactoringProperties) { protected void configureRefactoring(Properties refactoringProperties) {
visibility = VisibilityEnum.getEnumForStringRepresentation(refactoringProperties.getProperty("visibility", VisibilityEnum.v_public.toString())); //$NON-NLS-1$ visibility = VisibilityEnum.getEnumForStringRepresentation(refactoringProperties.getProperty("visibility", VisibilityEnum.v_public.toString())); //$NON-NLS-1$
} }
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2008, 2009 Institute for Software, HSR Hochschule fuer Technik * Copyright (c) 2008, 2011 Institute for Software, HSR Hochschule fuer Technik
* Rapperswil, University of applied sciences and others * Rapperswil, University of applied sciences 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
@ -11,8 +11,8 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.ui.tests.refactoring.extractfunction; package org.eclipse.cdt.ui.tests.refactoring.extractfunction;
import java.util.Collection;
import java.util.Properties; import java.util.Properties;
import java.util.Vector;
import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
@ -30,10 +30,8 @@ import org.eclipse.cdt.internal.ui.refactoring.utils.VisibilityEnum;
/** /**
* @author Emanuel Graf * @author Emanuel Graf
*
*/ */
public class ExtractFunctionRefactoringTest extends RefactoringTest { public class ExtractFunctionRefactoringTest extends RefactoringTest {
protected String methodName; protected String methodName;
protected boolean replaceDuplicates; protected boolean replaceDuplicates;
protected boolean returnValue; protected boolean returnValue;
@ -47,7 +45,7 @@ public class ExtractFunctionRefactoringTest extends RefactoringTest {
* @param name * @param name
* @param files * @param files
*/ */
public ExtractFunctionRefactoringTest(String name, Vector<TestSourceFile> files) { public ExtractFunctionRefactoringTest(String name, Collection<TestSourceFile> files) {
super(name, files); super(name, files);
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2008, 2009 Institute for Software, HSR Hochschule fuer Technik * Copyright (c) 2008, 2011 Institute for Software, HSR Hochschule fuer Technik
* Rapperswil, University of applied sciences and others * Rapperswil, University of applied sciences 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
@ -11,8 +11,8 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.ui.tests.refactoring.extractlocalvariable; package org.eclipse.cdt.ui.tests.refactoring.extractlocalvariable;
import java.util.Collection;
import java.util.Properties; import java.util.Properties;
import java.util.Vector;
import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFile;
import org.eclipse.ltk.core.refactoring.Change; import org.eclipse.ltk.core.refactoring.Change;
@ -34,7 +34,7 @@ public class ExtractLocalVariableRefactoringTest extends RefactoringTest {
protected String variableName; protected String variableName;
protected boolean fatalError; protected boolean fatalError;
public ExtractLocalVariableRefactoringTest(String name, Vector<TestSourceFile> files) { public ExtractLocalVariableRefactoringTest(String name, Collection<TestSourceFile> files) {
super(name, files); super(name, files);
} }

View file

@ -14,9 +14,9 @@
package org.eclipse.cdt.ui.tests.refactoring.gettersandsetters; package org.eclipse.cdt.ui.tests.refactoring.gettersandsetters;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Properties; import java.util.Properties;
import java.util.Vector;
import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
@ -48,7 +48,7 @@ public class GenerateGettersAndSettersTest extends RefactoringTest {
* @param name * @param name
* @param files * @param files
*/ */
public GenerateGettersAndSettersTest(String name, Vector<TestSourceFile> files) { public GenerateGettersAndSettersTest(String name, Collection<TestSourceFile> files) {
super(name, files); super(name, files);
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2008, 2009 Institute for Software, HSR Hochschule fuer Technik * Copyright (c) 2008, 2011 Institute for Software, HSR Hochschule fuer Technik
* Rapperswil, University of applied sciences and others * Rapperswil, University of applied sciences 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
@ -11,8 +11,8 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.ui.tests.refactoring.hidemethod; package org.eclipse.cdt.ui.tests.refactoring.hidemethod;
import java.util.Collection;
import java.util.Properties; import java.util.Properties;
import java.util.Vector;
import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFile;
import org.eclipse.ltk.core.refactoring.Change; import org.eclipse.ltk.core.refactoring.Change;
@ -32,7 +32,7 @@ public class HideMethodRefactoringTest extends RefactoringTest {
private int errors; private int errors;
private int fatalerrors; private int fatalerrors;
public HideMethodRefactoringTest(String name, Vector<TestSourceFile> files) { public HideMethodRefactoringTest(String name, Collection<TestSourceFile> files) {
super(name, files); super(name, files);
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2008, 2009 Institute for Software, HSR Hochschule fuer Technik * Copyright (c) 2008, 2011 Institute for Software, HSR Hochschule fuer Technik
* Rapperswil, University of applied sciences and others * Rapperswil, University of applied sciences 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
@ -11,8 +11,8 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.ui.tests.refactoring.implementmethod; package org.eclipse.cdt.ui.tests.refactoring.implementmethod;
import java.util.Collection;
import java.util.Properties; import java.util.Properties;
import java.util.Vector;
import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFile;
import org.eclipse.ltk.core.refactoring.Change; import org.eclipse.ltk.core.refactoring.Change;
@ -26,22 +26,18 @@ import org.eclipse.cdt.internal.ui.refactoring.implementmethod.ImplementMethodRe
/** /**
* @author Mirko Stocker * @author Mirko Stocker
*
*/ */
public class ImplementMethodRefactoringTest extends RefactoringTest { public class ImplementMethodRefactoringTest extends RefactoringTest {
protected int finalWarnings; protected int finalWarnings;
private int initialWarnings; private int initialWarnings;
public ImplementMethodRefactoringTest(String name,Vector<TestSourceFile> files) { public ImplementMethodRefactoringTest(String name, Collection<TestSourceFile> files) {
super(name, files); super(name, files);
} }
@Override @Override
protected void runTest() throws Throwable { protected void runTest() throws Throwable {
IFile refFile = project.getFile(fileName); IFile refFile = project.getFile(fileName);
CRefactoring refactoring = new ImplementMethodRefactoring(refFile, selection, null, cproject); CRefactoring refactoring = new ImplementMethodRefactoring(refFile, selection, null, cproject);
try { try {
@ -65,8 +61,7 @@ public class ImplementMethodRefactoringTest extends RefactoringTest {
assertConditionsWarning(finalConditions, finalWarnings); assertConditionsWarning(finalConditions, finalWarnings);
} }
compareFiles(fileMap); compareFiles(fileMap);
} } finally {
finally {
refactoring.unlockIndex(); refactoring.unlockIndex();
} }
} }

View file

@ -1,18 +0,0 @@
###############################################################################
# Copyright (c) 2008 Wind River Systems and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# Wind River Systems - initial API and implementation
###############################################################################
RefactoringTester.UnknownTestClass=Unknown TestClass. Make sure the test's sourcefile specifies a valid test class.
RefactoringTester.SecurityException=Security Exception during Test creation
RefactoringTester.ConstructorError=Test class does not provied required constructor.
RefactoringTester.IllegalArgument=IllegalArgumentException during Test creation
RefactoringTester.InstantiationException=InstantiationException during Test creation
RefactoringTester.IllegalAccessException=IllegalAccessException during Test creation
RefactoringTester.InvocationTargetException=InvocationTargetException during Test creation
RefactoringTester.NotNamed=Not Named

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2008, 2010 Institute for Software, HSR Hochschule fuer Technik * Copyright (c) 2008, 2011 Institute for Software, HSR Hochschule fuer Technik
* Rapperswil, University of applied sciences and others * Rapperswil, University of applied sciences 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
@ -11,8 +11,8 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.ui.tests.refactoring.utils; package org.eclipse.cdt.ui.tests.refactoring.utils;
import java.util.Collection;
import java.util.Properties; import java.util.Properties;
import java.util.Vector;
import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFile;
@ -25,13 +25,11 @@ import org.eclipse.cdt.internal.ui.refactoring.utils.TranslationUnitHelper;
/** /**
* @author Mirko Stocker * @author Mirko Stocker
*
*/ */
public class TranslationUnitHelperTest extends RefactoringTest { public class TranslationUnitHelperTest extends RefactoringTest {
private int offset; private int offset;
public TranslationUnitHelperTest(String name,Vector<TestSourceFile> files) { public TranslationUnitHelperTest(String name, Collection<TestSourceFile> files) {
super(name, files); super(name, files);
} }