|
TPTP 4.4.0 Testing Tools Project Internal API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.hyades.test.tools.core.internal.common.codegen.Helper
| Nested Class Summary | |
|---|---|
static class |
Helper.LineIterator
|
static class |
Helper.StringIterator
String iterator that iterates character by character through a string. |
| Field Summary | |
|---|---|
static java.lang.String |
EXCEPTION_CLASS_NAME
|
static java.lang.String |
HYADES_DEFAULT_TEST_ARBITER_CLASS_NAME
|
static java.lang.String |
HYADES_JUNIT_RUNNER
|
static java.lang.String |
HYADES_TEST_CASE_CLASS_NAME
|
static java.lang.String |
HYADES_TEST_SUITE_CLASS_NAME
|
static java.lang.String |
JUNIT_TEST_CASE_CLASS_NAME
|
static java.lang.String |
JUNIT_TEST_CLASS_NAME
|
static java.lang.String |
JUNIT_TEST_METHOD_PREFIX
|
static java.lang.String |
JUNIT_TEST_SUITE_CLASS_NAME
|
| Constructor Summary | |
|---|---|
Helper()
|
|
| Method Summary | |
|---|---|
void |
addImport(java.lang.String qualifiedName)
|
static boolean |
compareJavaComments(java.lang.CharSequence comment1,
java.lang.String comment2)
Compares two strings appearing within a java comment/javadoc comment and return true if they contain the same strings, ignoring differences such as line breaks, tabs and space indentation. |
java.lang.String |
computeTestMethodName(org.eclipse.hyades.models.common.facades.behavioral.ITestCase testCase,
boolean strictJUnitConventions)
Computes a valid unique name for a test method that would implement the specified test case. |
void |
dispose()
|
void |
emitSortedImports()
|
void |
emitSortedImports(org.eclipse.jdt.core.dom.CompilationUnit cu)
|
void |
emitSortedImports(org.eclipse.jdt.core.ICompilationUnit cu)
Update the specified compilation unit with the list of imports that were recorded by the helper using addImport. |
static java.lang.String |
formatContent(java.lang.String content)
|
static java.lang.String |
formatContent(java.lang.String content,
int offset)
|
java.lang.String |
getFilePath(java.lang.Object object)
|
java.lang.String |
getImportedName(java.lang.String qualifiedName)
|
protected ImportManager |
getImportManager()
|
java.lang.String |
getLabel(java.lang.Object object)
Deprecated. |
org.eclipse.ltk.core.refactoring.Change |
getMethodNamesChange()
|
java.lang.String |
getPackageName(java.lang.Object object)
|
java.lang.String |
getSuperclassName()
|
static java.lang.String |
getTestMethodName(org.eclipse.hyades.models.common.facades.behavioral.ITestCase testCase)
|
java.lang.String |
getTestMethodName(org.eclipse.hyades.models.common.facades.behavioral.ITestCase testCase,
boolean directModelAccess)
Returns the test method name that implements the specified testCase in the JUnit source code, if this value was set. |
protected java.lang.String |
getUniqueName(java.lang.String namespace,
java.lang.Object object)
Returns a created unique name for a given object derived from the the base name argument. |
static boolean |
isDestructiveChange(org.eclipse.ltk.core.refactoring.Change change)
|
java.lang.String |
lowerCaseIdentifier(java.lang.String identifier)
Returns a modified identifier with first letter lower case. |
void |
markImportLocation(java.lang.StringBuffer stringBuffer)
|
java.lang.String |
retrieveClassName(org.eclipse.hyades.models.common.facades.behavioral.INamedElement namedElement)
|
java.lang.String |
retrieveIdentifierName(org.eclipse.hyades.models.common.facades.behavioral.INamedElement namedElement,
java.lang.Object namespace)
|
protected java.lang.String |
retrieveUniqueName(java.lang.String namespace,
java.lang.Object object,
java.lang.String baseName,
boolean caseSensitive)
Returns a unique name for a given object derived from the the base name argument. |
void |
setImportManager(ImportManager importManager)
|
void |
setSuperclassName(java.lang.String name)
|
static void |
setTestMethodName(org.eclipse.hyades.models.common.facades.behavioral.ITestCase testCase,
java.lang.String name)
|
void |
setTestMethodName(org.eclipse.hyades.models.common.facades.behavioral.ITestCase testCase,
java.lang.String name,
boolean directModelAccess)
Records the name of the test method associated to a testCase. |
java.lang.String |
upperCaseIdentifier(java.lang.String identifier)
Returns a modified identifier with first letter lower case. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String JUNIT_TEST_CLASS_NAME
public static final java.lang.String JUNIT_TEST_CASE_CLASS_NAME
public static final java.lang.String JUNIT_TEST_SUITE_CLASS_NAME
public static final java.lang.String HYADES_TEST_CASE_CLASS_NAME
public static final java.lang.String HYADES_TEST_SUITE_CLASS_NAME
public static final java.lang.String HYADES_DEFAULT_TEST_ARBITER_CLASS_NAME
public static final java.lang.String HYADES_JUNIT_RUNNER
public static final java.lang.String EXCEPTION_CLASS_NAME
public static final java.lang.String JUNIT_TEST_METHOD_PREFIX
| Constructor Detail |
public Helper()
| Method Detail |
public static java.lang.String formatContent(java.lang.String content)
public static java.lang.String formatContent(java.lang.String content,
int offset)
public void dispose()
IDisposable.dispose()public java.lang.String getPackageName(java.lang.Object object)
public java.lang.String getLabel(java.lang.Object object)
TestUIUtil instead since this is a UI utility.
object -
public java.lang.String getFilePath(java.lang.Object object)
public java.lang.String retrieveClassName(org.eclipse.hyades.models.common.facades.behavioral.INamedElement namedElement)
public java.lang.String lowerCaseIdentifier(java.lang.String identifier)
identifier - An identifier. null is allowed.
null if
identifier was null.public java.lang.String upperCaseIdentifier(java.lang.String identifier)
identifier - An identifier. null is allowed.
null if
identifier was null.
public java.lang.String retrieveIdentifierName(org.eclipse.hyades.models.common.facades.behavioral.INamedElement namedElement,
java.lang.Object namespace)
protected java.lang.String retrieveUniqueName(java.lang.String namespace,
java.lang.Object object,
java.lang.String baseName,
boolean caseSensitive)
null then a default namespace is default.
If a name has been already created for a given object in the same namespace this name is returned.
namespace - object -
null String
protected java.lang.String getUniqueName(java.lang.String namespace,
java.lang.Object object)
null then a default namespace is default.
namespace - object -
public void markImportLocation(java.lang.StringBuffer stringBuffer)
public void emitSortedImports()
public void emitSortedImports(org.eclipse.jdt.core.ICompilationUnit cu)
throws org.eclipse.jdt.core.JavaModelException
org.eclipse.jdt.core.JavaModelExceptionpublic void emitSortedImports(org.eclipse.jdt.core.dom.CompilationUnit cu)
public java.lang.String getImportedName(java.lang.String qualifiedName)
public void addImport(java.lang.String qualifiedName)
protected ImportManager getImportManager()
public void setImportManager(ImportManager importManager)
public java.lang.String computeTestMethodName(org.eclipse.hyades.models.common.facades.behavioral.ITestCase testCase,
boolean strictJUnitConventions)
testCase - strictJUnitConventions -
public java.lang.String getTestMethodName(org.eclipse.hyades.models.common.facades.behavioral.ITestCase testCase,
boolean directModelAccess)
testCase -
null if this value was not
set.computeTestMethodName(ITestCase, boolean)public static java.lang.String getTestMethodName(org.eclipse.hyades.models.common.facades.behavioral.ITestCase testCase)
public void setTestMethodName(org.eclipse.hyades.models.common.facades.behavioral.ITestCase testCase,
java.lang.String name,
boolean directModelAccess)
testCase - name - computeTestMethodName(ITestCase, boolean),
getTestMethodName(ITestCase, boolean)
public static void setTestMethodName(org.eclipse.hyades.models.common.facades.behavioral.ITestCase testCase,
java.lang.String name)
public org.eclipse.ltk.core.refactoring.Change getMethodNamesChange()
public void setSuperclassName(java.lang.String name)
public java.lang.String getSuperclassName()
public static boolean compareJavaComments(java.lang.CharSequence comment1,
java.lang.String comment2)
comment1 - comment2 -
public static boolean isDestructiveChange(org.eclipse.ltk.core.refactoring.Change change)
|
TPTP 4.4.0 Testing Tools Project Internal API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||