本文整理汇总了Java中org.jetbrains.idea.maven.execution.MavenRunConfiguration类的典型用法代码示例。如果您正苦于以下问题:Java MavenRunConfiguration类的具体用法?Java MavenRunConfiguration怎么用?Java MavenRunConfiguration使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MavenRunConfiguration类属于org.jetbrains.idea.maven.execution包,在下文中一共展示了MavenRunConfiguration类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: applyEditorTo
import org.jetbrains.idea.maven.execution.MavenRunConfiguration; //导入依赖的package包/类
@Override
protected void applyEditorTo(MavenRunConfiguration s) throws ConfigurationException {
if (myUseProjectSettings.isSelected()) {
s.setGeneralSettings(null);
}
else {
MavenGeneralSettings state = s.getGeneralSettings();
if (state != null) {
myPanel.setData(state);
}
else {
MavenGeneralSettings settings = MavenProjectsManager.getInstance(myProject).getGeneralSettings().clone();
myPanel.setData(settings);
s.setGeneralSettings(settings);
}
}
}
示例2: configurationPatchIfNecessary
import org.jetbrains.idea.maven.execution.MavenRunConfiguration; //导入依赖的package包/类
/**
* Aplikování patche na budoucí konfigurace
*
* @param project aktuální projekt
* @param jre cesta k JVM
*/
private void configurationPatchIfNecessary( final @NotNull Project project, final @NotNull String jre )
{
// Template configuration.
RunManager runManager = RunManagerImpl.getInstance(project) ;
//Modifikace akutální konfigurací
for ( RunConfiguration configuration : runManager.getAllConfigurationsList() )
{
if (configuration instanceof ApplicationConfiguration)
{
patchConfiguration((ApplicationConfiguration) configuration, jre);
}
else if (configuration instanceof MavenRunConfiguration )
{
patchConfiguration((MavenRunConfiguration) configuration, jre);
}
}
}
示例3: patchConfiguration
import org.jetbrains.idea.maven.execution.MavenRunConfiguration; //导入依赖的package包/类
/**
* Nastavení použití Hotswap agenta
*
* @param configuration aktuální konfigurace
*/
private void patchConfiguration( MavenRunConfiguration configuration, String jre )
{
MavenRunnerSettings settings = MavenRunner.getInstance(configuration.getProject()).getSettings() ;
if ( settings != null )
{
settings.setVmOptions( patchVmParameters( settings.getVmOptions(), jre ) ) ;
}
if ( configuration.getRunnerSettings() == null )
{
configuration.setRunnerSettings(new MavenRunnerSettings());
}
configuration.getRunnerSettings().setVmOptions( patchVmParameters( configuration.getRunnerSettings().getVmOptions(), jre ) ) ;
}
示例4: resetEditorFrom
import org.jetbrains.idea.maven.execution.MavenRunConfiguration; //导入依赖的package包/类
@Override
protected void resetEditorFrom(MavenRunConfiguration s) {
myUseProjectSettings.setSelected(s.getGeneralSettings() == null);
if (s.getGeneralSettings() == null) {
MavenGeneralSettings settings = MavenProjectsManager.getInstance(myProject).getGeneralSettings();
myPanel.getData(settings);
}
else {
myPanel.getData(s.getGeneralSettings());
}
}
示例5: updateRunConfigurations
import org.jetbrains.idea.maven.execution.MavenRunConfiguration; //导入依赖的package包/类
public void updateRunConfigurations(MavenProject mavenProject) {
boolean childChanged = false;
Set<RunnerAndConfigurationSettings> settings = new THashSet<RunnerAndConfigurationSettings>(
RunManager.getInstance(myProject).getConfigurationSettingsList(MavenRunConfigurationType.getInstance()));
for (Iterator<RunConfigurationNode> itr = myChildren.iterator(); itr.hasNext(); ) {
RunConfigurationNode node = itr.next();
if (settings.remove(node.getSettings())) {
node.updateRunConfiguration();
}
else {
itr.remove();
childChanged = true;
}
}
String directory = PathUtil.getCanonicalPath(mavenProject.getDirectory());
int oldSize = myChildren.size();
for (RunnerAndConfigurationSettings cfg : settings) {
MavenRunConfiguration mavenRunConfiguration = (MavenRunConfiguration)cfg.getConfiguration();
if (directory.equals(PathUtil.getCanonicalPath(mavenRunConfiguration.getRunnerParameters().getWorkingDirPath()))) {
myChildren.add(new RunConfigurationNode(this, cfg));
}
}
if (oldSize != myChildren.size()) {
childChanged = true;
sort(myChildren);
}
if (childChanged) {
childrenChanged();
}
}
示例6: patchTemplateConfiguration
import org.jetbrains.idea.maven.execution.MavenRunConfiguration; //导入依赖的package包/类
/**
* Nastavení použití Hotswap agenta
*
* @param configuration aktuální konfigurace
*/
private void patchTemplateConfiguration( RunConfiguration configuration, String jre )
{
if ( configuration instanceof ApplicationConfiguration )
{
patchConfiguration((ApplicationConfiguration) configuration, jre) ;
}
else if ( configuration instanceof MavenRunConfiguration )
{
patchConfiguration( (MavenRunConfiguration)configuration, jre ) ;
}
}
示例7: addRunConfigurations
import org.jetbrains.idea.maven.execution.MavenRunConfiguration; //导入依赖的package包/类
private void addRunConfigurations(List<AnAction> result, Project project, final MavenProject mavenProject) {
final RunnerAndConfigurationSettings[] configurationSettings = RunManager.getInstance(project).getConfigurationSettings(
MavenRunConfigurationType.getInstance());
String directory = PathUtil.getCanonicalPath(mavenProject.getDirectory());
for (RunnerAndConfigurationSettings cfg : configurationSettings) {
MavenRunConfiguration mavenRunConfiguration = (MavenRunConfiguration) cfg.getConfiguration();
if (directory.equals(PathUtil.getCanonicalPath(mavenRunConfiguration.getRunnerParameters().getWorkingDirPath()))) {
result.add(getRunConfigurationAction(project, cfg));
}
}
}
示例8: doUpdate
import org.jetbrains.idea.maven.execution.MavenRunConfiguration; //导入依赖的package包/类
@Override
protected void doUpdate() {
setNameAndTooltip(getName(),
null,
StringUtil.join(((MavenRunConfiguration)mySettings.getConfiguration()).getRunnerParameters().getGoals(), " "));
}
示例9: addForkMode
import org.jetbrains.idea.maven.execution.MavenRunConfiguration; //导入依赖的package包/类
private void addForkMode(RunnerAndConfigurationSettings configSettings) {
MavenRunConfiguration mavenRunConfiguration = (MavenRunConfiguration) configSettings.getConfiguration();
mavenRunConfiguration.getRunnerParameters().getGoals().addAll(Debug.DEBUG_FORK_MODE);
}