本文整理汇总了Java中com.intellij.execution.configuration.EnvironmentVariablesComponent类的典型用法代码示例。如果您正苦于以下问题:Java EnvironmentVariablesComponent类的具体用法?Java EnvironmentVariablesComponent怎么用?Java EnvironmentVariablesComponent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EnvironmentVariablesComponent类属于com.intellij.execution.configuration包,在下文中一共展示了EnvironmentVariablesComponent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writeExternal
import com.intellij.execution.configuration.EnvironmentVariablesComponent; //导入依赖的package包/类
@Override
public void writeExternal(Element element) throws WriteExternalException {
super.writeExternal(element);
// common config
JDOMExternalizerUtil.writeField(element, "INTERPRETER_OPTIONS", interpreterOptions);
JDOMExternalizerUtil.writeField(element, "INTERPRETER_PATH", interpreterPath);
JDOMExternalizerUtil.writeField(element, "WORKING_DIRECTORY", workingDirectory);
JDOMExternalizerUtil.writeField(element, "PARENT_ENVS", Boolean.toString(passParentEnvs));
JDOMExternalizerUtil.writeField(element, "ALTERNATE_INTERPRETER", Boolean.toString(overrideSDK));
EnvironmentVariablesComponent.writeExternal(element, envs);
// ???
getConfigurationModule().writeExternal(element);
// run config
JDOMExternalizerUtil.writeField(element, "SCRIPT_NAME", scriptName);
JDOMExternalizerUtil.writeField(element, "PARAMETERS", scriptParameters);
}
示例2: readExternal
import com.intellij.execution.configuration.EnvironmentVariablesComponent; //导入依赖的package包/类
@Override
public void readExternal(Element element) throws InvalidDataException {
PathMacroManager.getInstance(getProject()).expandPaths(element);
super.readExternal(element);
DefaultJDOMExternalizer.readExternal(this, element);
readModule(element);
EnvironmentVariablesComponent.readExternal(element, getEnvs());
// common config
workingDirectory = JDOMExternalizerUtil.readField(element, "WORKING_DIRECTORY");
String parentEnvValue = JDOMExternalizerUtil.readField(element, "PARENT_ENVS");
if (parentEnvValue != null) {
setPassParentEnvs(Boolean.parseBoolean(parentEnvValue));
}
// run config
scriptName = JDOMExternalizerUtil.readField(element, "SCRIPT_NAME");
setProgramParameters(JDOMExternalizerUtil.readField(element, "PARAMETERS"));
}
示例3: writeExternal
import com.intellij.execution.configuration.EnvironmentVariablesComponent; //导入依赖的package包/类
@Override
public void writeExternal(Element element) throws WriteExternalException {
super.writeExternal(element);
// common config
JDOMExternalizerUtil.writeField(element, "WORKING_DIRECTORY", workingDirectory);
JDOMExternalizerUtil.writeField(element, "PARENT_ENVS", Boolean.toString(isPassParentEnvs()));
// run config
JDOMExternalizerUtil.writeField(element, "SCRIPT_NAME", scriptName);
JDOMExternalizerUtil.writeField(element, "PARAMETERS", getProgramParameters());
//JavaRunConfigurationExtensionManager.getInstance().writeExternal(this, element);
DefaultJDOMExternalizer.writeExternal(this, element);
writeModule(element);
EnvironmentVariablesComponent.writeExternal(element, getEnvs());
PathMacroManager.getInstance(getProject()).collapsePathsRecursively(element);
}
示例4: writeExternal
import com.intellij.execution.configuration.EnvironmentVariablesComponent; //导入依赖的package包/类
@Override
public void writeExternal(Element element) throws WriteExternalException
{
super.writeExternal(element);
// common config
JDOMExternalizerUtil.writeField(element, "INTERPRETER_OPTIONS", interpreterOptions);
JDOMExternalizerUtil.writeField(element, "INTERPRETER_PATH", interpreterPath);
JDOMExternalizerUtil.writeField(element, "WORKING_DIRECTORY", workingDirectory);
JDOMExternalizerUtil.writeField(element, "PARENT_ENVS", Boolean.toString(passParentEnvs));
JDOMExternalizerUtil.writeField(element, "ALTERNATE_INTERPRETER", Boolean.toString(overrideSDK));
EnvironmentVariablesComponent.writeExternal(element, envs);
// ???
getConfigurationModule().writeExternal(element);
// run config
JDOMExternalizerUtil.writeField(element, "SCRIPT_NAME", scriptName);
JDOMExternalizerUtil.writeField(element, "PARAMETERS", scriptParameters);
}
示例5: initComponents
import com.intellij.execution.configuration.EnvironmentVariablesComponent; //导入依赖的package包/类
protected void initComponents() {
myProgramParametersComponent = LabeledComponent.create(new RawCommandLineEditor(),
ExecutionBundle.message("run.configuration.program.parameters"));
FileChooserDescriptor fileChooserDescriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor();
//noinspection DialogTitleCapitalization
fileChooserDescriptor.setTitle(ExecutionBundle.message("select.working.directory.message"));
myWorkingDirectoryComboBox = new MacroComboBoxWithBrowseButton(fileChooserDescriptor, getProject());
myWorkingDirectoryComponent = LabeledComponent.create(myWorkingDirectoryComboBox, ExecutionBundle.message("run.configuration.working.directory.label"));
myEnvVariablesComponent = new EnvironmentVariablesComponent();
myEnvVariablesComponent.setLabelLocation(BorderLayout.WEST);
myProgramParametersComponent.setLabelLocation(BorderLayout.WEST);
myWorkingDirectoryComponent.setLabelLocation(BorderLayout.WEST);
addComponents();
setPreferredSize(new Dimension(10, 10));
copyDialogCaption(myProgramParametersComponent);
}
示例6: readExternal
import com.intellij.execution.configuration.EnvironmentVariablesComponent; //导入依赖的package包/类
@Override
public void readExternal(Element element) throws InvalidDataException {
super.readExternal(element);
// common config
interpreterOptions = JDOMExternalizerUtil.readField(element, "INTERPRETER_OPTIONS");
interpreterPath = JDOMExternalizerUtil.readField(element, "INTERPRETER_PATH");
if (getProject().getBasePath() != null)
workingDirectory = JDOMExternalizerUtil.readField(element, "WORKING_DIRECTORY", getProject().getBasePath());
String str = JDOMExternalizerUtil.readField(element, "PARENT_ENVS");
if (str != null) {
passParentEnvs = Boolean.parseBoolean(str);
}
str = JDOMExternalizerUtil.readField(element, "ALTERNATE_INTERPRETER");
if (str != null) {
overrideSDK = Boolean.parseBoolean(str);
}
EnvironmentVariablesComponent.readExternal(element, envs);
// ???
getConfigurationModule().readExternal(element);
// run config
scriptName = JDOMExternalizerUtil.readField(element, "SCRIPT_NAME");
scriptParameters = JDOMExternalizerUtil.readField(element, "PARAMETERS");
}
示例7: createUIComponents
import com.intellij.execution.configuration.EnvironmentVariablesComponent; //导入依赖的package包/类
private void createUIComponents() {
interpreterOptions = new RawCommandLineEditor();
interpreterOptions.setDialogCaption("Options");
customWorkingDirectory = new TextFieldWithBrowseButton();
customWorkingDirectory.addBrowseFolderListener(null, null, project, FileChooserDescriptorFactory.createSingleFolderDescriptor());
environmentVariables = new EnvironmentVariablesComponent();
interpreterOptionsLabel = new JBLabel(TesterBundle.message("runConfiguration.editor.cli.interpreterOptions"));
workingDirectoryLabel = new JBLabel(TesterBundle.message("runConfiguration.editor.cli.workingDirectory"));
}
示例8: readExternal
import com.intellij.execution.configuration.EnvironmentVariablesComponent; //导入依赖的package包/类
@Override
public void readExternal(Element element) throws InvalidDataException {
super.readExternal(element);
// Reads the conf file into this class
String locations = JDOMExternalizerUtil.readField(element, MODULES_FIELD);
if (locations != null) {
tomcatModules = (Modules) GSON.fromJson(locations, Modules.class);
}
this.tomcatInstallation = JDOMExternalizerUtil.readField(element, TOMCAT_PATH_FIELD);
this.vmArgs = JDOMExternalizerUtil.readField(element, VM_ARGS_FIELD);
String passParentEnvironmentVariablesValue = JDOMExternalizerUtil.readField(element, PASS_PARENT_ENV_VARS_FIELD);
this.passParentEnvironmentVariables = Boolean.valueOf(passParentEnvironmentVariablesValue);
EnvironmentVariablesComponent.readExternal(element, this.environmentVariables);
}
示例9: writeExternal
import com.intellij.execution.configuration.EnvironmentVariablesComponent; //导入依赖的package包/类
@Override
public void writeExternal(Element element) throws WriteExternalException {
super.writeExternal(element);
// Stores the values of this class into the parent
String modulesString = GSON.toJson(tomcatModules);
JDOMExternalizerUtil.writeField(element, MODULES_FIELD, modulesString);
JDOMExternalizerUtil.writeField(element, TOMCAT_PATH_FIELD, this.getTomcatInstallation());
JDOMExternalizerUtil.writeField(element, VM_ARGS_FIELD, this.getVmArgs());
JDOMExternalizerUtil.writeField(element, PASS_PARENT_ENV_VARS_FIELD, "" + this.isPassParentEnvironmentVariables());
if (this.environmentVariables != null && !this.environmentVariables.isEmpty()) {
EnvironmentVariablesComponent.writeExternal(element, this.getEnvironmentVariables());
}
}
示例10: readExternal
import com.intellij.execution.configuration.EnvironmentVariablesComponent; //导入依赖的package包/类
@Override
public void readExternal(Element element) throws InvalidDataException {
PathMacroManager.getInstance(getProject()).expandPaths(element);
super.readExternal(element);
JavaRunConfigurationExtensionManager.getInstance().readExternal(this, element);
XmlSerializer.deserializeInto(myBean, element);
EnvironmentVariablesComponent.readExternal(element, getEnvs());
myConfigurationModule.readExternal(element);
}
示例11: writeExternal
import com.intellij.execution.configuration.EnvironmentVariablesComponent; //导入依赖的package包/类
@Override
public void writeExternal(Element element) throws WriteExternalException {
super.writeExternal(element);
JavaRunConfigurationExtensionManager.getInstance().writeExternal(this, element);
XmlSerializer.serializeInto(myBean, element, SERIALIZATION_FILTERS);
EnvironmentVariablesComponent.writeExternal(element, getEnvs());
if (myConfigurationModule.getModule() != null) {
myConfigurationModule.writeExternal(element);
}
}
示例12: readExternal
import com.intellij.execution.configuration.EnvironmentVariablesComponent; //导入依赖的package包/类
@Override
public void readExternal(final Element element) throws InvalidDataException {
PathMacroManager.getInstance(getProject()).expandPaths(element);
super.readExternal(element);
JavaRunConfigurationExtensionManager.getInstance().readExternal(this, element);
DefaultJDOMExternalizer.readExternal(this, element);
readModule(element);
EnvironmentVariablesComponent.readExternal(element, getEnvs());
}
示例13: writeExternal
import com.intellij.execution.configuration.EnvironmentVariablesComponent; //导入依赖的package包/类
@Override
public void writeExternal(final Element element) throws WriteExternalException {
super.writeExternal(element);
JavaRunConfigurationExtensionManager.getInstance().writeExternal(this, element);
DefaultJDOMExternalizer.writeExternal(this, element);
writeModule(element);
EnvironmentVariablesComponent.writeExternal(element, getEnvs());
}
示例14: initComponents
import com.intellij.execution.configuration.EnvironmentVariablesComponent; //导入依赖的package包/类
protected void initComponents() {
myProgramParametersComponent = LabeledComponent.create(new RawCommandLineEditor(),
ExecutionBundle.message("run.configuration.program.parameters"));
FileChooserDescriptor fileChooserDescriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor();
//noinspection DialogTitleCapitalization
fileChooserDescriptor.setTitle(ExecutionBundle.message("select.working.directory.message"));
myWorkingDirectoryField = new TextFieldWithBrowseButton();
myWorkingDirectoryField.addBrowseFolderListener(new MacroAwareTextBrowseFolderListener(fileChooserDescriptor, getProject()) {
@Override
public void actionPerformed(ActionEvent e) {
myFileChooserDescriptor.putUserData(LangDataKeys.MODULE_CONTEXT, myModuleContext);
setProject(getProject());
super.actionPerformed(e);
}
});
myWorkingDirectoryComponent = LabeledComponent.create(createComponentWithMacroBrowse(myWorkingDirectoryField), ExecutionBundle.message("run.configuration.working.directory.label"));
myEnvVariablesComponent = new EnvironmentVariablesComponent();
myEnvVariablesComponent.setLabelLocation(BorderLayout.WEST);
myProgramParametersComponent.setLabelLocation(BorderLayout.WEST);
myWorkingDirectoryComponent.setLabelLocation(BorderLayout.WEST);
addComponents();
setPreferredSize(new Dimension(10, 10));
setAnchor(myEnvVariablesComponent.getLabel());
}
示例15: readEnvs
import com.intellij.execution.configuration.EnvironmentVariablesComponent; //导入依赖的package包/类
protected void readEnvs(Element element) {
final String parentEnvs = JDOMExternalizerUtil.readField(element, "PARENT_ENVS");
if (parentEnvs != null) {
setPassParentEnvs(Boolean.parseBoolean(parentEnvs));
}
EnvironmentVariablesComponent.readExternal(element, getEnvs());
}