public abstract class JavaTestFrameworkRunnableState<T extends ModuleBasedConfiguration<JavaRunConfigurationModule,Element> & CommonJavaRunConfigurationParameters & ConfigurationWithCommandLineShortener & SMRunnerConsolePropertiesProvider> extends JavaCommandLineState implements RemoteConnectionCreator
Modifier and Type | Field and Description |
---|---|
protected java.net.ServerSocket |
myServerSocket |
protected java.io.File |
myTempFile |
protected java.io.File |
myWorkingDirsFile |
Constructor and Description |
---|
JavaTestFrameworkRunnableState(ExecutionEnvironment environment) |
Modifier and Type | Method and Description |
---|---|
void |
appendForkInfo(Executor executor) |
void |
appendRepeatMode() |
protected void |
collectListeners(JavaParameters javaParameters,
java.lang.StringBuilder buf,
java.lang.String epName,
java.lang.String delimiter) |
protected void |
collectPackagesToOpen(java.util.List<java.lang.String> options) |
protected static void |
collectSubPackages(java.util.List<java.lang.String> options,
PsiPackage aPackage,
GlobalSearchScope globalSearchScope)
called on EDT
|
protected boolean |
configureByModule(Module module) |
protected void |
configureClasspath(JavaParameters javaParameters) |
protected abstract void |
configureRTClasspath(JavaParameters javaParameters,
Module module) |
protected OSProcessHandler |
createHandler(Executor executor) |
protected JavaParameters |
createJavaParameters() |
RemoteConnection |
createRemoteConnection(ExecutionEnvironment environment) |
SearchForTestsTask |
createSearchingForTestsTask() |
protected void |
createServerSocket(JavaParameters javaParameters) |
protected TargetedCommandLineBuilder |
createTargetedCommandLine(TargetEnvironmentRequest request,
TargetEnvironmentConfiguration configuration) |
protected void |
createTempFiles(JavaParameters javaParameters) |
protected void |
deleteTempFiles() |
ExecutionResult |
execute(Executor executor,
ProgramRunner<?> runner)
Starts the process.
|
protected static PsiJavaModule |
findJavaModule(Module module,
boolean inTests) |
protected boolean |
forkPerModule()
Configuration based on a package spanning multiple modules.
|
protected abstract T |
getConfiguration() |
protected abstract java.lang.String |
getForkMode() |
java.net.ServerSocket |
getForkSocket() |
protected abstract java.lang.String |
getFrameworkId() |
protected abstract java.lang.String |
getFrameworkName() |
protected Sdk |
getJdk() |
static ParamsGroup |
getJigsawOptions(JavaParameters parameters) |
protected java.util.List<java.lang.String> |
getNamedParams(java.lang.String parameters) |
protected abstract TestSearchScope |
getScope() |
protected boolean |
isIdBasedTestTree() |
boolean |
isPollConnection() |
protected abstract void |
passForkMode(java.lang.String forkMode,
java.io.File tempFile,
JavaParameters parameters) |
protected abstract void |
passTempFile(ParametersList parametersList,
java.lang.String tempFilePath) |
protected static void |
putDependenciesOnModulePath(PathsList modulePath,
PathsList classPath,
PsiJavaModule prodModule) |
void |
setRemoteConnectionCreator(RemoteConnectionCreator remoteConnectionCreator) |
protected boolean |
spansMultipleModules(java.lang.String qualifiedName) |
protected boolean |
useModulePath() |
protected void |
writeClassesPerModule(java.lang.String packageName,
JavaParameters javaParameters,
java.util.Map<Module,java.util.List<java.lang.String>> perModule,
java.lang.String filters) |
ansiColoringEnabled, clear, createCommandLine, getJavaParameters, shouldAddJavaProgramRunnerActions, startProcess
addConsoleFilters, createActions, createActions, createConsole, getConsoleBuilder, getEnvironment, getExecutionTarget, getRunnerSettings, setConsoleBuilder
protected java.net.ServerSocket myServerSocket
protected java.io.File myTempFile
protected java.io.File myWorkingDirsFile
public JavaTestFrameworkRunnableState(ExecutionEnvironment environment)
public static ParamsGroup getJigsawOptions(JavaParameters parameters)
public void setRemoteConnectionCreator(RemoteConnectionCreator remoteConnectionCreator)
public RemoteConnection createRemoteConnection(ExecutionEnvironment environment)
createRemoteConnection
in interface RemoteConnectionCreator
public boolean isPollConnection()
isPollConnection
in interface RemoteConnectionCreator
protected abstract java.lang.String getFrameworkName()
protected abstract java.lang.String getFrameworkId()
protected abstract void passTempFile(ParametersList parametersList, java.lang.String tempFilePath)
protected abstract T getConfiguration()
protected abstract TestSearchScope getScope()
protected abstract java.lang.String getForkMode()
protected OSProcessHandler createHandler(Executor executor) throws ExecutionException
ExecutionException
public SearchForTestsTask createSearchingForTestsTask() throws ExecutionException
ExecutionException
protected boolean configureByModule(Module module)
protected boolean isIdBasedTestTree()
protected TargetedCommandLineBuilder createTargetedCommandLine(TargetEnvironmentRequest request, TargetEnvironmentConfiguration configuration) throws ExecutionException
createTargetedCommandLine
in class JavaCommandLineState
ExecutionException
public ExecutionResult execute(Executor executor, ProgramRunner<?> runner) throws ExecutionException
RunProfileState
execute
in interface RunProfileState
execute
in class CommandLineState
executor
- the executor used to start up the process.runner
- the program runner used to start up the process.DefaultExecutionResult
), containing a process handler
and a console attached to it.ExecutionException
- if the execution has failed.protected abstract void configureRTClasspath(JavaParameters javaParameters, Module module) throws CantRunException
CantRunException
protected Sdk getJdk()
protected JavaParameters createJavaParameters() throws ExecutionException
createJavaParameters
in class JavaCommandLineState
ExecutionException
protected java.util.List<java.lang.String> getNamedParams(java.lang.String parameters)
public java.net.ServerSocket getForkSocket()
public void appendForkInfo(Executor executor) throws ExecutionException
ExecutionException
protected abstract void passForkMode(java.lang.String forkMode, java.io.File tempFile, JavaParameters parameters) throws ExecutionException
ExecutionException
protected void collectListeners(JavaParameters javaParameters, java.lang.StringBuilder buf, java.lang.String epName, java.lang.String delimiter)
protected void configureClasspath(JavaParameters javaParameters) throws CantRunException
CantRunException
protected static PsiJavaModule findJavaModule(Module module, boolean inTests)
protected void collectPackagesToOpen(java.util.List<java.lang.String> options)
protected static void collectSubPackages(java.util.List<java.lang.String> options, PsiPackage aPackage, GlobalSearchScope globalSearchScope)
protected static void putDependenciesOnModulePath(PathsList modulePath, PathsList classPath, PsiJavaModule prodModule)
protected void createServerSocket(JavaParameters javaParameters)
protected boolean spansMultipleModules(java.lang.String qualifiedName)
protected boolean forkPerModule()
protected void createTempFiles(JavaParameters javaParameters)
protected void writeClassesPerModule(java.lang.String packageName, JavaParameters javaParameters, java.util.Map<Module,java.util.List<java.lang.String>> perModule, java.lang.String filters) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException
java.io.FileNotFoundException
java.io.UnsupportedEncodingException
protected void deleteTempFiles()
public void appendRepeatMode() throws ExecutionException
ExecutionException
protected boolean useModulePath()