public class ApplicationConfiguration extends ModuleBasedConfiguration<JavaRunConfigurationModule,Element> implements CommonJavaRunConfigurationParameters, ConfigurationWithCommandLineShortener, SingleClassConfiguration, RefactoringListenerProvider, InputRedirectAware, TargetEnvironmentAwareRunProfile
Modifier and Type | Class and Description |
---|---|
static class |
ApplicationConfiguration.JavaApplicationCommandLineState<T extends ApplicationConfiguration> |
InputRedirectAware.InputRedirectOptions, InputRedirectAware.InputRedirectOptionsImpl
RunConfiguration.RestartSingletonResult
Modifier and Type | Field and Description |
---|---|
java.lang.String |
ALTERNATIVE_JRE_PATH
Deprecated.
|
boolean |
ALTERNATIVE_JRE_PATH_ENABLED
Deprecated.
|
java.lang.String |
MAIN_CLASS_NAME
Deprecated.
|
java.lang.String |
PROGRAM_PARAMETERS
Deprecated.
|
java.lang.String |
WORKING_DIRECTORY
Deprecated.
|
TO_CLONE_ELEMENT_NAME
TYPES_WITH_REDIRECT_AWARE_UI
DATA_KEY
Modifier | Constructor and Description |
---|---|
|
ApplicationConfiguration(java.lang.String name,
Project project) |
|
ApplicationConfiguration(java.lang.String name,
Project project,
ApplicationConfigurationType configurationType) |
protected |
ApplicationConfiguration(java.lang.String name,
Project project,
ConfigurationFactory factory) |
Modifier and Type | Method and Description |
---|---|
boolean |
canRunOn(TargetEnvironmentConfiguration target)
Checks if this configuration supports running on the provided target (see
ExecutionTarget for details). |
void |
checkConfiguration()
Checks whether the run configuration settings are valid.
|
java.lang.String |
getActionName()
Returns the text of the context menu action to start this run configuration.
|
java.lang.String |
getAlternativeJrePath() |
SettingsEditor<? extends RunConfiguration> |
getConfigurationEditor()
Returns the UI control for editing the run configuration settings.
|
<any> |
getDefaultLanguageRuntimeType()
Returns language runtime type that should be configured for
TargetEnvironmentConfiguration if it's
created for this particular run configuration. |
protected java.lang.Class<? extends JvmMainMethodRunConfigurationOptions> |
getDefaultOptionsClass()
Do not override this method, it is intended to support old (not migrated to options class) run configurations.
|
java.lang.String |
getDefaultTargetName() |
java.util.Map<java.lang.String,java.lang.String> |
getEnvs() |
InputRedirectAware.InputRedirectOptions |
getInputRedirectOptions() |
PsiClass |
getMainClass() |
java.lang.String |
getMainClassName() |
protected JvmMainMethodRunConfigurationOptions |
getOptions()
Because we have to keep backward compatibility, never use `getOptions()` to get or set values - use only designated getters/setters.
|
java.lang.String |
getPackage() |
java.lang.String |
getProgramParameters() |
RefactoringElementListener |
getRefactoringElementListener(PsiElement element)
Returns a listener to handle a rename or move refactoring of the specified PSI element.
|
java.lang.String |
getRunClass() |
ShortenCommandLine |
getShortenCommandLine() |
RunProfileState |
getState(Executor executor,
ExecutionEnvironment env)
Prepares for executing a specific instance of the run configuration.
|
java.util.Collection<Module> |
getValidModules() |
java.lang.String |
getVMParameters() |
java.lang.String |
getWorkingDirectory() |
boolean |
isAlternativeJrePathEnabled() |
boolean |
isPassParentEnvs() |
boolean |
isProvidedScopeIncluded() |
boolean |
isSwingInspectorEnabled() |
static void |
onAlternativeJreChanged(boolean changed,
Project project) |
void |
readExternal(Element element) |
void |
setAlternativeJrePath(java.lang.String path) |
void |
setAlternativeJrePathEnabled(boolean enabled) |
void |
setDefaultTargetName(java.lang.String targetName) |
void |
setEnvs(java.util.Map<java.lang.String,java.lang.String> envs) |
void |
setIncludeProvidedScope(boolean value) |
void |
setMainClass(PsiClass psiClass) |
void |
setMainClassName(java.lang.String qualifiedName) |
void |
setOptionsFromConfigurationFile(BaseState state) |
void |
setPassParentEnvs(boolean value) |
void |
setProgramParameters(java.lang.String value) |
void |
setShortenCommandLine(ShortenCommandLine mode)
Called from UI, when user explicitly selects method to be used to shorten the command line or from the deserialization
|
void |
setSwingInspectorEnabled(boolean value) |
void |
setVMParameters(java.lang.String value) |
void |
setWorkingDirectory(java.lang.String value) |
java.lang.String |
suggestedName()
Returns the default name for the run configuration based on its settings (such as the name of class or file to run).
|
void |
writeExternal(Element element) |
canRestoreOriginalModule, clone, createInstance, getAllModules, getConfigurationModule, getModules, getState, isModuleDirMacroSupported, loadState, onNewConfigurationCreated, readModule, restoreOriginalModule, setModule, setModuleName, syncModuleName, writeModule
isGeneratedName, setGeneratedName, setNameChangedByUser
addLogFile, addLogFile, addPredefinedLogFile, checkRunnerSettings, checkSettingsBeforeRun, collectOutputFromProcessHandler, createAdditionalTabComponents, customizeLogConsole, equals, excludeCompileBeforeLaunchOption, getAllLogFiles, getBeforeRunTasks, getFactory, getIcon, getLogFiles, getName, getOptionsClass, getOptionsForPredefinedLogFile, getOutputFilePath, getPredefinedLogFiles, getProject, hashCode, isAllowRunningInParallel, isNewSerializationUsed, isSaveOutputToFile, isShowConsoleOnStdErr, isShowConsoleOnStdOut, onConfigurationCopied, removeAllLogFiles, removeAllPredefinedLogFiles, setAllowRunningInParallel, setBeforeRunTasks, setFileOutputPath, setName, setSaveOutputToFile, setShowConsoleOnStdErr, setShowConsoleOnStdOut, toString
changeUserMap, clearUserData, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMap
finalize, getClass, notify, notifyAll, wait, wait, wait
getProject
getProject
getInputFile, getInputRedirectOptions
clone, createRunnerSettings, getBeforeRunTasks, getFactory, getId, getPresentableType, getProject, getRunnerSettingsEditor, getType, getUniqueID, hideDisabledExecutorButtons, isAllowRunningInParallel, restartSingleton, setAllowRunningInParallel, setBeforeRunTasks, setName
getIcon, getName
getSearchScope
isBuildBeforeLaunchAddedByDefault, isBuildProjectOnEmptyModuleList, isExcludeCompileBeforeLaunchOption
@Deprecated public java.lang.String MAIN_CLASS_NAME
@Deprecated public java.lang.String PROGRAM_PARAMETERS
@Deprecated public java.lang.String WORKING_DIRECTORY
@Deprecated public boolean ALTERNATIVE_JRE_PATH_ENABLED
@Deprecated public java.lang.String ALTERNATIVE_JRE_PATH
public ApplicationConfiguration(java.lang.String name, Project project, ApplicationConfigurationType configurationType)
public ApplicationConfiguration(java.lang.String name, Project project)
protected ApplicationConfiguration(java.lang.String name, Project project, ConfigurationFactory factory)
protected final java.lang.Class<? extends JvmMainMethodRunConfigurationOptions> getDefaultOptionsClass()
RunConfigurationBase
getDefaultOptionsClass
in class ModuleBasedConfiguration<JavaRunConfigurationModule,Element>
protected JvmMainMethodRunConfigurationOptions getOptions()
getOptions
in class ModuleBasedConfiguration<JavaRunConfigurationModule,Element>
public void setMainClass(PsiClass psiClass)
setMainClass
in interface SingleClassConfiguration
public RunProfileState getState(Executor executor, ExecutionEnvironment env) throws ExecutionException
RunProfile
getState
in interface RunProfile
executor
- the execution mode selected by the user (run, debug, profile etc.)env
- the environment object containing additional settings for executing the configuration.ExecutionException
public SettingsEditor<? extends RunConfiguration> getConfigurationEditor()
RunConfiguration
CheckableRunConfigurationEditor
. The returned object
can also implement SettingsEditorGroup
if the settings it provides need to be displayed in
multiple tabs.getConfigurationEditor
in interface RunConfiguration
public RefactoringElementListener getRefactoringElementListener(PsiElement element)
RefactoringListenerProvider
getRefactoringElementListener
in interface RefactoringListenerProvider
element
- the element on which a refactoring was invoked.public PsiClass getMainClass()
getMainClass
in interface SingleClassConfiguration
public java.lang.String getMainClassName()
public java.lang.String suggestedName()
LocatableConfiguration
suggestedName
in interface LocatableConfiguration
public java.lang.String getActionName()
LocatableConfigurationBase
getActionName
in class LocatableConfigurationBase<Element>
public void setMainClassName(java.lang.String qualifiedName)
setMainClassName
in interface SingleClassConfiguration
public void checkConfiguration() throws RuntimeConfigurationException
RunConfiguration
checkConfiguration
in interface RunConfiguration
RuntimeConfigurationException
- if the configuration settings contain a non-fatal problem which the user should be warned about
but the execution should still be allowed.RuntimeConfigurationError
- if the configuration settings contain a fatal problem which makes it impossible
to execute the run configuration.public void setVMParameters(java.lang.String value)
setVMParameters
in interface CommonJavaRunConfigurationParameters
public java.lang.String getVMParameters()
getVMParameters
in interface CommonJavaRunConfigurationParameters
public void setProgramParameters(java.lang.String value)
setProgramParameters
in interface CommonProgramRunConfigurationParameters
public java.lang.String getProgramParameters()
getProgramParameters
in interface CommonProgramRunConfigurationParameters
public void setWorkingDirectory(java.lang.String value)
setWorkingDirectory
in interface CommonProgramRunConfigurationParameters
public java.lang.String getWorkingDirectory()
getWorkingDirectory
in interface CommonProgramRunConfigurationParameters
public void setPassParentEnvs(boolean value)
setPassParentEnvs
in interface CommonProgramRunConfigurationParameters
public java.util.Map<java.lang.String,java.lang.String> getEnvs()
getEnvs
in interface CommonProgramRunConfigurationParameters
public void setEnvs(java.util.Map<java.lang.String,java.lang.String> envs)
setEnvs
in interface CommonProgramRunConfigurationParameters
public boolean isPassParentEnvs()
isPassParentEnvs
in interface CommonProgramRunConfigurationParameters
public java.lang.String getRunClass()
getRunClass
in interface CommonJavaRunConfigurationParameters
public java.lang.String getPackage()
getPackage
in interface CommonJavaRunConfigurationParameters
public boolean isAlternativeJrePathEnabled()
isAlternativeJrePathEnabled
in interface CommonJavaRunConfigurationParameters
isAlternativeJrePathEnabled
in interface ConfigurationWithAlternativeJre
public void setAlternativeJrePathEnabled(boolean enabled)
setAlternativeJrePathEnabled
in interface CommonJavaRunConfigurationParameters
public java.lang.String getAlternativeJrePath()
getAlternativeJrePath
in interface CommonJavaRunConfigurationParameters
getAlternativeJrePath
in interface ConfigurationWithAlternativeJre
public void setAlternativeJrePath(java.lang.String path)
setAlternativeJrePath
in interface CommonJavaRunConfigurationParameters
public boolean canRunOn(TargetEnvironmentConfiguration target)
TargetAwareRunProfile
ExecutionTarget
for details).canRunOn
in interface TargetAwareRunProfile
canRunOn
in interface TargetEnvironmentAwareRunProfile
canRunOn
in class RunConfigurationBase<Element>
target
- target provided by ExecutionTargetProvider
public <any> getDefaultLanguageRuntimeType()
TargetEnvironmentAwareRunProfile
TargetEnvironmentConfiguration
if it's
created for this particular run configuration.
That language runtime type will be used while creating TargetEnvironmentConfiguration
using
wizard from RunOnTargetComboBox
getDefaultLanguageRuntimeType
in interface TargetEnvironmentAwareRunProfile
TargetEnvironmentType#createStepsForNewWizard
public java.lang.String getDefaultTargetName()
getDefaultTargetName
in interface TargetEnvironmentAwareRunProfile
TargetEnvironmentConfiguration#getDisplayName()
public void setDefaultTargetName(java.lang.String targetName)
setDefaultTargetName
in interface TargetEnvironmentAwareRunProfile
public static void onAlternativeJreChanged(boolean changed, Project project)
public boolean isProvidedScopeIncluded()
public void setIncludeProvidedScope(boolean value)
public java.util.Collection<Module> getValidModules()
getValidModules
in class ModuleBasedConfiguration<JavaRunConfigurationModule,Element>
public void readExternal(Element element)
readExternal
in interface RunConfiguration
readExternal
in class ModuleBasedConfiguration<JavaRunConfigurationModule,Element>
public void setOptionsFromConfigurationFile(BaseState state)
setOptionsFromConfigurationFile
in class RunConfigurationBase<Element>
public void writeExternal(Element element)
writeExternal
in interface RunConfiguration
writeExternal
in class ModuleBasedConfiguration<JavaRunConfigurationModule,Element>
public ShortenCommandLine getShortenCommandLine()
getShortenCommandLine
in interface ConfigurationWithCommandLineShortener
public void setShortenCommandLine(ShortenCommandLine mode)
ConfigurationWithCommandLineShortener
setShortenCommandLine
in interface ConfigurationWithCommandLineShortener
public InputRedirectAware.InputRedirectOptions getInputRedirectOptions()
getInputRedirectOptions
in interface InputRedirectAware
public boolean isSwingInspectorEnabled()
public void setSwingInspectorEnabled(boolean value)