当前位置: 首页>>代码示例>>Java>>正文


Java ConfigurationFactoryEx类代码示例

本文整理汇总了Java中com.intellij.execution.configuration.ConfigurationFactoryEx的典型用法代码示例。如果您正苦于以下问题:Java ConfigurationFactoryEx类的具体用法?Java ConfigurationFactoryEx怎么用?Java ConfigurationFactoryEx使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ConfigurationFactoryEx类属于com.intellij.execution.configuration包,在下文中一共展示了ConfigurationFactoryEx类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: JarApplicationConfigurationType

import com.intellij.execution.configuration.ConfigurationFactoryEx; //导入依赖的package包/类
public JarApplicationConfigurationType() {
  super("JarApplication", ExecutionBundle.message("jar.application.configuration.name"),
        ExecutionBundle.message("jar.application.configuration.description"), AllIcons.FileTypes.Archive);
  addFactory(new ConfigurationFactoryEx(this) {
    @Override
    public void onNewConfigurationCreated(@NotNull RunConfiguration configuration) {
      JarApplicationConfiguration jarApplicationConfiguration = (JarApplicationConfiguration)configuration;
      if (StringUtil.isEmpty(jarApplicationConfiguration.getWorkingDirectory())) {
        String baseDir = FileUtil.toSystemIndependentName(StringUtil.notNullize(configuration.getProject().getBasePath()));
        jarApplicationConfiguration.setWorkingDirectory(baseDir);
      }
    }

    public RunConfiguration createTemplateConfiguration(Project project) {
      return new JarApplicationConfiguration(project, this, "");
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:JarApplicationConfigurationType.java

示例2: createAndRunConfiguration

import com.intellij.execution.configuration.ConfigurationFactoryEx; //导入依赖的package包/类
@Override
public void createAndRunConfiguration(@NotNull ServerType<?> serverType, @Nullable RemoteServer<?> remoteServer) {
  DeployToServerConfigurationType configurationType = DeployToServerConfigurationTypesRegistrar.getDeployConfigurationType(serverType);
  RunManagerEx runManager = RunManagerEx.getInstanceEx(myProject);
  ConfigurationFactoryEx factory = configurationType.getFactory();
  RunnerAndConfigurationSettings settings = runManager.createRunConfiguration(configurationType.getDisplayName(), factory);
  factory.onNewConfigurationCreated(settings.getConfiguration());
  DeployToServerRunConfiguration<?, ?> runConfiguration = (DeployToServerRunConfiguration<?, ?>)settings.getConfiguration();
  if (remoteServer != null) {
    runConfiguration.setServerName(remoteServer.getName());
  }
  if (RunDialog.editConfiguration(myProject, settings, "Create Deployment Configuration",
                                  DefaultRunExecutor.getRunExecutorInstance())) {
    runManager.addConfiguration(settings, runManager.isConfigurationShared(settings), runManager.getBeforeRunTasks(runConfiguration),
                                false);
    runManager.setSelectedConfiguration(settings);
    ProgramRunnerUtil.executeConfiguration(myProject, settings, DefaultRunExecutor.getRunExecutorInstance());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:DeploymentConfigurationManagerImpl.java

示例3: actionPerformed

import com.intellij.execution.configuration.ConfigurationFactoryEx; //导入依赖的package包/类
@Override
public void actionPerformed(AnActionEvent e) {
  final SingleConfigurationConfigurable<RunConfiguration> configuration = getSelectedConfiguration();
  LOG.assertTrue(configuration != null);
  try {
    final DefaultMutableTreeNode typeNode = getSelectedConfigurationTypeNode();
    final RunnerAndConfigurationSettings settings = configuration.getSnapshot();
    final String copyName = createUniqueName(typeNode, configuration.getNameText(), CONFIGURATION, TEMPORARY_CONFIGURATION);
    settings.setName(copyName);
    final ConfigurationFactory factory = settings.getFactory();
    if (factory instanceof ConfigurationFactoryEx) {
      ((ConfigurationFactoryEx)factory).onConfigurationCopied(settings.getConfiguration());
    }
    final SingleConfigurationConfigurable<RunConfiguration> configurable = createNewConfiguration(settings, typeNode, getSelectedNode());
    IdeFocusManager.getInstance(myProject).requestFocus(configurable.getNameTextField(), true);
    configurable.getNameTextField().setSelectionStart(0);
    configurable.getNameTextField().setSelectionEnd(copyName.length());
  }
  catch (ConfigurationException e1) {
    Messages.showErrorDialog(myToolbarDecorator.getActionsPanel(), e1.getMessage(), e1.getTitle());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:RunConfigurable.java

示例4: actionPerformed

import com.intellij.execution.configuration.ConfigurationFactoryEx; //导入依赖的package包/类
@Override
public void actionPerformed(AnActionEvent e) {
  final SingleConfigurationConfigurable<RunConfiguration> configuration = getSelectedConfiguration();
  LOG.assertTrue(configuration != null);
  try {
    final DefaultMutableTreeNode typeNode = getSelectedConfigurationTypeNode();
    final RunnerAndConfigurationSettings settings = configuration.getSnapshot();
    final String copyName = createUniqueName(typeNode, configuration.getNameText(), CONFIGURATION, TEMPORARY_CONFIGURATION);
    settings.setName(copyName);
    final ConfigurationFactory factory = settings.getFactory();
    if (factory instanceof ConfigurationFactoryEx) {
      ((ConfigurationFactoryEx)factory).onConfigurationCopied(settings.getConfiguration());
    }
    final SingleConfigurationConfigurable<RunConfiguration> configurable = createNewConfiguration(settings, typeNode);
    IdeFocusManager.getInstance(myProject).requestFocus(configurable.getNameTextField(), true);
    configurable.getNameTextField().setSelectionStart(0);
    configurable.getNameTextField().setSelectionEnd(copyName.length());
  }
  catch (ConfigurationException e1) {
    Messages.showErrorDialog(myToolbarDecorator.getActionsPanel(), e1.getMessage(), e1.getTitle());
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:23,代码来源:RunConfigurable.java

示例5: TestNGConfigurationType

import com.intellij.execution.configuration.ConfigurationFactoryEx; //导入依赖的package包/类
public TestNGConfigurationType() {

        myFactory = new ConfigurationFactoryEx(this)
        {
            @Override
            public RunConfiguration createTemplateConfiguration(Project project) {
                LOGGER.info("Create TestNG Template Configuration");
                return new TestNGConfiguration("", project, this);
            }

          @Override
          public void onNewConfigurationCreated(@NotNull RunConfiguration configuration) {
            ((ModuleBasedConfiguration)configuration).onNewConfigurationCreated();
          }
        };
    }
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:17,代码来源:TestNGConfigurationType.java

示例6: showMavenToolWindow

import com.intellij.execution.configuration.ConfigurationFactoryEx; //导入依赖的package包/类
public void showMavenToolWindow() {
    ConfigurationType configurationType = new JUnitConfigurationType();
    ConfigurationFactory configurationFactory = new ConfigurationFactoryEx<JUnitConfiguration>(configurationType) {
        @NotNull
        @Override
        public RunConfiguration createTemplateConfiguration(@NotNull Project project) {
            return new JUnitConfiguration(project.getName(), project, this);
        }
    };
    JUnitConfiguration configuration = new JUnitConfiguration(project.getName(), project, configurationFactory);
    Executor executor = new DefaultRunExecutor();
    ProcessHandler processHandler = new NopProcessHandler();
    TestConsoleProperties consoleProperties = new MavenTestConsoleProperties(mavenProject, project, executor, configuration, processHandler);
    BaseTestsOutputConsoleView consoleView;
    try {
        consoleView = SMTestRunnerConnectionUtil.createAndAttachConsole(TOOL_WINDOW_ID, processHandler, consoleProperties);
    } catch (ExecutionException e) {
        throw new RuntimeException(e);
    }
    showInToolWindow(consoleView, mavenProject.getFinalName());
    processHandler.startNotify();
}
 
开发者ID:destin,项目名称:maven-test-support-plugin,代码行数:23,代码来源:MavenToolWindow.java

示例7: actionPerformed

import com.intellij.execution.configuration.ConfigurationFactoryEx; //导入依赖的package包/类
@RequiredDispatchThread
@Override
public void actionPerformed(AnActionEvent e) {
  final SingleConfigurationConfigurable<RunConfiguration> configuration = getSelectedConfiguration();
  LOG.assertTrue(configuration != null);
  try {
    final DefaultMutableTreeNode typeNode = getSelectedConfigurationTypeNode();
    final RunnerAndConfigurationSettings settings = configuration.getSnapshot();
    final String copyName = createUniqueName(typeNode, configuration.getNameText(), CONFIGURATION, TEMPORARY_CONFIGURATION);
    settings.setName(copyName);
    final ConfigurationFactory factory = settings.getFactory();
    if (factory instanceof ConfigurationFactoryEx) {
      ((ConfigurationFactoryEx)factory).onConfigurationCopied(settings.getConfiguration());
    }
    final SingleConfigurationConfigurable<RunConfiguration> configurable = createNewConfiguration(settings, typeNode);
    IdeFocusManager.getInstance(myProject).requestFocus(configurable.getNameTextField(), true);
    configurable.getNameTextField().setSelectionStart(0);
    configurable.getNameTextField().setSelectionEnd(copyName.length());
  }
  catch (ConfigurationException e1) {
    Messages.showErrorDialog(myToolbarDecorator.getActionsPanel(), e1.getMessage(), e1.getTitle());
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:24,代码来源:RunConfigurable.java

示例8: ApplicationConfigurationType

import com.intellij.execution.configuration.ConfigurationFactoryEx; //导入依赖的package包/类
public ApplicationConfigurationType() {
  myFactory = new ConfigurationFactoryEx(this) {
    @Override
    public RunConfiguration createTemplateConfiguration(Project project) {
      return new ApplicationConfiguration("", project, ApplicationConfigurationType.this);
    }

    @Override
    public void onNewConfigurationCreated(@NotNull RunConfiguration configuration) {
      ((ModuleBasedConfiguration)configuration).onNewConfigurationCreated();
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:ApplicationConfigurationType.java

示例9: AppletConfigurationType

import com.intellij.execution.configuration.ConfigurationFactoryEx; //导入依赖的package包/类
/**reflection*/
AppletConfigurationType() {
  myFactory = new ConfigurationFactoryEx(this) {
    @Override
    public RunConfiguration createTemplateConfiguration(Project project) {
      return new AppletConfiguration(project, this);
    }

    @Override
    public void onNewConfigurationCreated(@NotNull RunConfiguration configuration) {
      ((ModuleBasedConfiguration)configuration).onNewConfigurationCreated();
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:AppletConfigurationType.java

示例10: createNewConfiguration

import com.intellij.execution.configuration.ConfigurationFactoryEx; //导入依赖的package包/类
SingleConfigurationConfigurable<RunConfiguration> createNewConfiguration(final ConfigurationFactory factory) {
  DefaultMutableTreeNode node = null;
  DefaultMutableTreeNode selectedNode = null;
  TreePath selectionPath = myTree.getSelectionPath();
  if (selectionPath != null) {
    selectedNode = (DefaultMutableTreeNode)selectionPath.getLastPathComponent();
  }
  DefaultMutableTreeNode typeNode = getConfigurationTypeNode(factory.getType());
  if (typeNode == null) {
    typeNode = new DefaultMutableTreeNode(factory.getType());
    myRoot.add(typeNode);
    sortTopLevelBranches();
    ((DefaultTreeModel)myTree.getModel()).reload();
  }
  node = typeNode;
  if (selectedNode != null && typeNode.isNodeDescendant(selectedNode)) {
    node = selectedNode;
    if (getKind(node).isConfiguration()) {
      node = (DefaultMutableTreeNode)node.getParent();
    }
  }
  final RunnerAndConfigurationSettings settings = getRunManager().createConfiguration(createUniqueName(typeNode, null, CONFIGURATION, TEMPORARY_CONFIGURATION), factory);
  if (factory instanceof ConfigurationFactoryEx) {
    ((ConfigurationFactoryEx)factory).onNewConfigurationCreated(settings.getConfiguration());
  }
  return createNewConfiguration(settings, node, selectedNode);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:28,代码来源:RunConfigurable.java

示例11: TestNGTestDiscoveryConfigurationType

import com.intellij.execution.configuration.ConfigurationFactoryEx; //导入依赖的package包/类
public TestNGTestDiscoveryConfigurationType() {
    myFactory = new ConfigurationFactoryEx(this) {
        public RunConfiguration createTemplateConfiguration(Project project) {
            return new TestNGTestDiscoveryConfiguration("", project, this);
        }

        @Override
        public void onNewConfigurationCreated(@NotNull RunConfiguration configuration) {
            ((ModuleBasedConfiguration)configuration).onNewConfigurationCreated();
        }
    };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:TestNGTestDiscoveryConfigurationType.java

示例12: TestNGConfigurationType

import com.intellij.execution.configuration.ConfigurationFactoryEx; //导入依赖的package包/类
public TestNGConfigurationType() {

        myFactory = new ConfigurationFactoryEx(this)
        {
            @Override
            public RunConfiguration createTemplateConfiguration(Project project) {
                return new TestNGConfiguration("", project, this);
            }

          @Override
          public void onNewConfigurationCreated(@NotNull RunConfiguration configuration) {
            ((ModuleBasedConfiguration)configuration).onNewConfigurationCreated();
          }
        };
    }
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:TestNGConfigurationType.java

示例13: JUnitConfigurationType

import com.intellij.execution.configuration.ConfigurationFactoryEx; //导入依赖的package包/类
/**reflection*/
public JUnitConfigurationType() {
  myFactory = new ConfigurationFactoryEx(this) {
    public RunConfiguration createTemplateConfiguration(Project project) {
      return new JUnitConfiguration("", project, this);
    }

    @Override
    public void onNewConfigurationCreated(@NotNull RunConfiguration configuration) {
      ((ModuleBasedConfiguration)configuration).onNewConfigurationCreated();
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:JUnitConfigurationType.java

示例14: JUnitTestDiscoveryConfigurationType

import com.intellij.execution.configuration.ConfigurationFactoryEx; //导入依赖的package包/类
public JUnitTestDiscoveryConfigurationType() {
    myFactory = new ConfigurationFactoryEx(this) {
        public RunConfiguration createTemplateConfiguration(Project project) {
            return new JUnitTestDiscoveryConfiguration("", project, this);
        }

        @Override
        public void onNewConfigurationCreated(@NotNull RunConfiguration configuration) {
            ((ModuleBasedConfiguration)configuration).onNewConfigurationCreated();
        }
    };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:JUnitTestDiscoveryConfigurationType.java

示例15: PageObjectRunConfigType

import com.intellij.execution.configuration.ConfigurationFactoryEx; //导入依赖的package包/类
public PageObjectRunConfigType() {
    myConfigurationFactory = new ConfigurationFactoryEx(this) {
        @Override
        public RunConfiguration createTemplateConfiguration(Project project) {
            return new PageObjectRunConfig("", this, project);
        }
    };
}
 
开发者ID:bjorm,项目名称:PageObjectEvaluator,代码行数:9,代码来源:PageObjectRunConfigType.java


注:本文中的com.intellij.execution.configuration.ConfigurationFactoryEx类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。