• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ExecutionBundle类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: JarApplicationConfigurationType

import com.intellij.execution.ExecutionBundle; //导入依赖的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: checkConfiguration

import com.intellij.execution.ExecutionBundle; //导入依赖的package包/类
@Override
public void checkConfiguration() throws RuntimeConfigurationException {
  JavaParametersUtil.checkAlternativeJRE(this);
  final String className = MAIN_CLASS_NAME;
  if (className == null || className.length() == 0) {
    throw new RuntimeConfigurationError(ExecutionBundle.message("no.main.class.specified.error.text"));
  }
  if (SCRATCH_FILE_ID <= 0) {
    throw new RuntimeConfigurationError("No scratch file associated with configuration");
  }
  if (getScratchVirtualFile() == null) {
    throw new RuntimeConfigurationError("Associated scratch file not found");
  }
  ProgramParametersUtil.checkWorkingDirectoryExist(this, getProject(), getConfigurationModule().getModule());
  JavaRunConfigurationExtensionManager.checkConfigurationIsValid(this);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:JavaScratchConfiguration.java


示例3: createAppletClassBrowser

import com.intellij.execution.ExecutionBundle; //导入依赖的package包/类
public static ClassBrowser createAppletClassBrowser(final Project project,
                                                    final ConfigurationModuleSelector moduleSelector) {
  final String title = ExecutionBundle.message("choose.applet.class.dialog.title");
  return new MainClassBrowser(project, moduleSelector, title) {

    @Override
    protected TreeClassChooser createClassChooser(ClassFilter.ClassFilterWithScope classFilter) {
      final Module module = moduleSelector.getModule();
      final GlobalSearchScope scope =
        module == null ? GlobalSearchScope.allScope(myProject) : GlobalSearchScope.moduleWithDependenciesAndLibrariesScope(module);
      final PsiClass appletClass = JavaPsiFacade.getInstance(project).findClass("java.applet.Applet", scope);
      return TreeClassChooserFactory.getInstance(getProject())
        .createInheritanceClassChooser(title, classFilter.getScope(), appletClass, false, false,
                                       ConfigurationUtil.PUBLIC_INSTANTIATABLE_CLASS);
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:ClassBrowser.java


示例4: getProcessOutput

import com.intellij.execution.ExecutionBundle; //导入依赖的package包/类
public static String getProcessOutput(@NotNull final ProcessHandler processHandler,
                                      @NotNull final Condition<Key> outputTypeFilter,
                                      final long timeout)
  throws ExecutionException {
  LOG.assertTrue(!processHandler.isStartNotified());
  final StringBuilder outputBuilder = new StringBuilder();
  processHandler.addProcessListener(new ProcessAdapter() {
    @Override
    public void onTextAvailable(ProcessEvent event, Key outputType) {
      if (outputTypeFilter.value(outputType)) {
        final String text = event.getText();
        outputBuilder.append(text);
        LOG.debug(text);
      }
    }
  });
  processHandler.startNotify();
  if (!processHandler.waitFor(timeout)) {
    throw new ExecutionException(ExecutionBundle.message("script.execution.timeout", String.valueOf(timeout / 1000)));
  }
  return outputBuilder.toString();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:ScriptRunnerUtil.java


示例5: executeScriptInConsoleWithFullOutput

import com.intellij.execution.ExecutionBundle; //导入依赖的package包/类
public static ScriptOutput executeScriptInConsoleWithFullOutput(String exePathString,
                                                                @Nullable VirtualFile scriptFile,
                                                                @Nullable String workingDirectory,
                                                                long timeout,
                                                                Condition<Key> scriptOutputType,
                                                                @NonNls String... parameters) throws ExecutionException {
  final OSProcessHandler processHandler = execute(exePathString, workingDirectory, scriptFile, parameters);

  ScriptOutput output = new ScriptOutput(scriptOutputType);
  processHandler.addProcessListener(output);
  processHandler.startNotify();

  if (!processHandler.waitFor(timeout)) {
    LOG.warn("Process did not complete in " + timeout / 1000 + "s");
    throw new ExecutionException(ExecutionBundle.message("script.execution.timeout", String.valueOf(timeout / 1000)));
  }
  LOG.debug("script output: ", output.myFilteredOutput);
  return output;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:ScriptRunnerUtil.java


示例6: getFilter

import com.intellij.execution.ExecutionBundle; //导入依赖的package包/类
protected ClassFilter.ClassFilterWithScope getFilter() throws NoFilterException {
  final ConfigurationModuleSelector moduleSelector = getModuleSelector();
  final Module module = moduleSelector.getModule();
  if (module == null) {
    throw NoFilterException.moduleDoesntExist(moduleSelector);
  }
  final ClassFilter.ClassFilterWithScope classFilter;
  try {
    final JUnitConfiguration configurationCopy =
      new JUnitConfiguration(ExecutionBundle.message("default.junit.configuration.name"), getProject(),
                             JUnitConfigurationType.getInstance().getConfigurationFactories()[0]);
    applyEditorTo(configurationCopy);
    classFilter = TestClassFilter
      .create(configurationCopy.getTestObject().getSourceScope(), configurationCopy.getConfigurationModule().getModule());
  }
  catch (JUnitUtil.NoJUnitException e) {
    throw NoFilterException.noJUnitInModule(module);
  }
  return classFilter;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:JUnitConfigurable.java


示例7: customizeCellRenderer

import com.intellij.execution.ExecutionBundle; //导入依赖的package包/类
public void customizeCellRenderer(
    final JTree tree,
    final Object value,
    final boolean selected,
    final boolean expanded,
    final boolean leaf,
    final int row,
    final boolean hasFocus
    ) {
  final TestProxy testProxy = TestProxyClient.from(value);
  if (testProxy != null) {
    TestRenderer.renderTest(testProxy, this);
    setIcon(TestRenderer.getIconFor(testProxy, myProperties.isPaused()));
  } else {
    append(ExecutionBundle.message("junit.runing.info.loading.tree.node.text"), SimpleTextAttributes.REGULAR_ATTRIBUTES);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:TreeTestRenderer.java


示例8: actionPerformed

import com.intellij.execution.ExecutionBundle; //导入依赖的package包/类
@Override
public void actionPerformed(AnActionEvent e) {
  Project project = myEnvironment.getProject();
  try {
    MavenRunConfiguration runConfiguration = ((MavenRunConfiguration)myEnvironment.getRunProfile()).clone();

    List<String> goals = runConfiguration.getRunnerParameters().getGoals();

    if (goals.size() > 2 && "-rf".equals(goals.get(goals.size() - 2))) { // This runConfiguration was created by other MavenResumeAction.
      goals.set(goals.size() - 1, myResumeModuleId);
    }
    else {
      goals.add("-rf");
      goals.add(myResumeModuleId);
    }

    runConfiguration.getRunnerParameters().setGoals(goals);

    myRunner.execute(new ExecutionEnvironmentBuilder(myEnvironment).contentToReuse(null).runProfile(runConfiguration).build());
  }
  catch (RunCanceledByUserException ignore) {
  }
  catch (ExecutionException e1) {
    Messages.showErrorDialog(project, e1.getMessage(), ExecutionBundle.message("restart.error.message.title"));
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:MavenResumeAction.java


示例9: addLabel

import com.intellij.execution.ExecutionBundle; //导入依赖的package包/类
public static void addLabel(final TestFrameworkRunningModel model) {
  String label;
  int color;

  if (model.getRoot().isDefect()) {
    color = RED.getRGB();
    label = ExecutionBundle.message("junit.runing.info.tests.failed.label");
  }
  else {
    color = GREEN.getRGB();
    label = ExecutionBundle.message("junit.runing.info.tests.passed.label");
  }
  final TestConsoleProperties consoleProperties = model.getProperties();
  String name = label + " " + consoleProperties.getConfiguration().getName();

  Project project = consoleProperties.getProject();
  if (project.isDisposed()) return;

  LocalHistory.getInstance().putSystemLabel(project, name, color);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:LvcsHelper.java


示例10: validate

import com.intellij.execution.ExecutionBundle; //导入依赖的package包/类
@Nullable
public String validate() {
  if (getExportFormat() == ExportTestResultsConfiguration.ExportFormat.UserTemplate) {
    if (StringUtil.isEmpty(myCustomTemplateField.getText())) {
      return ExecutionBundle.message("export.test.results.custom.template.path.empty");
    }
    File file = new File(myCustomTemplateField.getText());
    if (!file.isFile()) {
      return ExecutionBundle.message("export.test.results.custom.template.not.found", file.getAbsolutePath());
    }
  }

  if (StringUtil.isEmpty(myFileNameField.getText())) {
    return ExecutionBundle.message("export.test.results.output.filename.empty");
  }
  if (StringUtil.isEmpty(myFolderField.getText())) {
    return ExecutionBundle.message("export.test.results.output.path.empty");
  }

  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:ExportTestResultsForm.java


示例11: updateName

import com.intellij.execution.ExecutionBundle; //导入依赖的package包/类
private void updateName() {
  if (!myIsVisible) return;
  final RootTestInfo myTestInfo = (RootTestInfo)getInfo();
  final String newName;
  final TestProgress progress = myModel.getProgress();
  if (myCompletionEvent == null) {
    newName = TESTS_IN_PROGRESS;
  }
  else if (myCompletionEvent.isNormalExit() && progress.getValue() == progress.getMaximum()) {
    newName = ALL_PASSED;
  }
  else {
    switch(myCompletionEvent.getType()) {
      case DONE:
        newName = ExecutionBundle.message("junit.runing.info.tests.in.progress.done.tree.node");
        break;
      default:
        newName = ExecutionBundle.message("junit.runing.info.tests.in.progress.terminated.tre.node");
    }
  }
  if (!newName.equals(myTestInfo.getName())) {
    myTestInfo.setName(newName);
    myBuilder.updateFromRoot();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:SpecialNode.java


示例12: MyEnvironmentVariablesDialog

import com.intellij.execution.ExecutionBundle; //导入依赖的package包/类
protected MyEnvironmentVariablesDialog() {
  super(EnvironmentVariablesTextFieldWithBrowseButton.this, true);
  myEnvVariablesTable = new EnvVariablesTable();
  myEnvVariablesTable.setValues(convertToVariables(myData.getEnvs(), false));

  myUseDefaultCb.setSelected(isPassParentEnvs());
  myWholePanel.add(myEnvVariablesTable.getComponent(), BorderLayout.CENTER);
  JPanel useDefaultPanel = new JPanel(new BorderLayout());
  useDefaultPanel.add(myUseDefaultCb, BorderLayout.CENTER);
  HyperlinkLabel showLink = new HyperlinkLabel(ExecutionBundle.message("env.vars.show.system"));
  useDefaultPanel.add(showLink, BorderLayout.EAST);
  showLink.addHyperlinkListener(new HyperlinkListener() {
    @Override
    public void hyperlinkUpdate(HyperlinkEvent e) {
      if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
        showParentEnvironmentDialog(MyEnvironmentVariablesDialog.this.getWindow());
      }
    }
  });

  myWholePanel.add(useDefaultPanel, BorderLayout.SOUTH);
  setTitle(ExecutionBundle.message("environment.variables.dialog.title"));
  init();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:EnvironmentVariablesTextFieldWithBrowseButton.java


示例13: createActions

import com.intellij.execution.ExecutionBundle; //导入依赖的package包/类
@Override
protected ArrayList<AnAction> createActions(final boolean fromPopup) {
  final ArrayList<AnAction> result = new ArrayList<AnAction>();
  result.add(new MyAddAction(fromPopup));
  result.add(new MyDeleteAction(forAll(new Condition<Object>() {
    @Override
    public boolean value(final Object o) {
      if (o instanceof MyNode) {
        final NamedConfigurable namedConfigurable = ((MyNode)o).getConfigurable();
        final Object editableObject = namedConfigurable != null ? namedConfigurable.getEditableObject() : null;
        return editableObject instanceof NamedScope;
      }
      return false;
    }
  })));
  result.add(new MyCopyAction());
  result.add(new MySaveAsAction());
  result.add(new MyMoveAction(ExecutionBundle.message("move.up.action.name"), IconUtil.getMoveUpIcon(), -1));
  result.add(new MyMoveAction(ExecutionBundle.message("move.down.action.name"), IconUtil.getMoveDownIcon(), 1));
  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:ScopeChooserConfigurable.java


示例14: getConfigurationEditor

import com.intellij.execution.ExecutionBundle; //导入依赖的package包/类
@NotNull
@Override
public final SettingsEditor<T> getConfigurationEditor() {
  final SettingsEditor<T> runConfigurationEditor = createConfigurationEditor();

  final SettingsEditorGroup<T> group = new SettingsEditorGroup<T>();

  // run configuration settings tab:
  group.addEditor(ExecutionBundle.message("run.configuration.configuration.tab.title"), runConfigurationEditor);

  // tabs provided by extensions:
  //noinspection unchecked
  PythonRunConfigurationExtensionsManager.getInstance().appendEditors(this, (SettingsEditorGroup)group);
  group.addEditor(ExecutionBundle.message("logs.tab.title"), new LogConfigurationPanel<T>());

  return group;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:AbstractPythonRunConfiguration.java


示例15: showDialog

import com.intellij.execution.ExecutionBundle; //导入依赖的package包/类
@Override
protected String showDialog() {
  Project project = getProject();
  final JavaPsiFacade facade = JavaPsiFacade.getInstance(project);
  Module module = myModuleSelector.getModule();
  if (module == null) {
    Messages.showErrorDialog(project, ExecutionBundle.message("module.not.specified.error.text"), CommonBundle.getErrorTitle());
    return null;
  }
  GlobalSearchScope scope =
    myIncludeLibraryClasses ? module.getModuleWithDependenciesAndLibrariesScope(true) : module.getModuleWithDependenciesScope();
  PsiClass initialSelection = facade.findClass(getText(), scope);
  TreeClassChooser chooser = createTreeClassChooser(project, scope, initialSelection, new ClassFilter() {
    @Override
    public boolean isAccepted(PsiClass aClass) {
      if (aClass.isInterface()) return false;
      final PsiModifierList modifierList = aClass.getModifierList();
      return modifierList == null || !modifierList.hasModifierProperty(PsiModifier.ABSTRACT);
    }
  });
  if (chooser == null) return null;
  chooser.showDialog();
  PsiClass selClass = chooser.getSelected();
  return selClass != null ? selClass.getQualifiedName() : null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:AndroidClassBrowserBase.java


示例16: showDialog

import com.intellij.execution.ExecutionBundle; //导入依赖的package包/类
@Override
protected String showDialog() {
  final String className = myClassComponent.getComponent().getText();
  if (className.trim().length() == 0) {
    Messages.showMessageDialog(getField(), ExecutionBundle.message("set.class.name.message"),
                               ExecutionBundle.message("cannot.browse.method.dialog.title"), Messages.getInformationIcon());
    return null;
  }
  final PsiClass testClass = myModuleSelector.findClass(className);
  if (testClass == null) {
    Messages.showMessageDialog(getField(), ExecutionBundle.message("class.does.not.exists.error.message", className),
                               ExecutionBundle.message("cannot.browse.method.dialog.title"), Messages.getInformationIcon());
    return null;
  }
  final MethodListDlg dialog = new MethodListDlg(testClass, new JUnitUtil.TestMethodFilter(testClass), getField());
  if (dialog.showAndGet()) {
    final PsiMethod method = dialog.getSelected();
    if (method != null) {
      return method.getName();
    }
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:TestRunParameters.java


示例17: customizeTestCase

import com.intellij.execution.ExecutionBundle; //导入依赖的package包/类
private void customizeTestCase(final TestProxy test) {
  final TestState state = test.getState();
  if (state.isInProgress()) {
    myCounters.append(ExecutionBundle.message("junit.runing.info.running.label"), RUNNING_COLOR);
  }
  else if (state.isPassed()) {
    myCounters
      .append(ExecutionBundle.message("junit.runing.info.passed.label"), new SimpleTextAttributes(SimpleTextAttributes.STYLE_BOLD, TestsUIUtil.PASSED_COLOR));
  }
  else if (state.getMagnitude() == PoolOfTestStates.ERROR_INDEX) {
    myCounters.append(ExecutionBundle.message("junit.runing.info.error.tree.node"), DEFECT_ATTRIBUTE);
  }
  else if (state.getMagnitude() == PoolOfTestStates.TERMINATED_INDEX) {
    myCounters.append(ExecutionBundle.message("junit.runing.info.terminated.label"), TERMINATED_ATTRIBUTE);
  }
  else if (state.getMagnitude() == PoolOfTestStates.IGNORED_INDEX) {
    myCounters.append(ExecutionBundle.message("junit.runing.info.ignored.label"), TERMINATED_ATTRIBUTE);
  }
  else {
    myCounters.append(ExecutionBundle.message("junit.runing.info.assertion.tree.node"), DEFECT_ATTRIBUTE);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:TestColumnInfo.java


示例18: onProcessStarted

import com.intellij.execution.ExecutionBundle; //导入依赖的package包/类
public void onProcessStarted(final ProcessHandler process) {
  if (myTestsBuilt) return;
  process.addProcessListener(new ProcessAdapter() {
    @Override
    public void processTerminated(ProcessEvent event) {
      process.removeProcessListener(this);
      ApplicationManager.getApplication().invokeLater(new Runnable() {
        @Override
        public void run() {
          myStateInfo.setTerminated(myState);
          if (!myTestsBuilt && myProgressBar.getValue() == 0) {
            setStatusColor(ColorProgressBar.RED);
            setFraction(1.0);
            myState.append(ExecutionBundle.message("junit.running.info.failed.to.start.error.message"));
          }
        }
      });
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:JUnitStatusLine.java


示例19: getConfigurationEditor

import com.intellij.execution.ExecutionBundle; //导入依赖的package包/类
@NotNull
@Override
public SettingsEditor<? extends RunConfiguration> getConfigurationEditor() {

    SettingsEditorGroup<RemoteRunConfiguration> settingsEditorGroup = new SettingsEditorGroup<>();
    settingsEditorGroup.addEditor(ExecutionBundle.message("run.configuration.configuration.tab.title"), new RunConfigurationEditor(getProject()));
    settingsEditorGroup.addEditor(ExecutionBundle.message("logs.tab.title"), new LogConfigurationPanel<>());
    return settingsEditorGroup;
}
 
开发者ID:testIT-LivingDoc,项目名称:livingdoc-intellij,代码行数:10,代码来源:RemoteRunConfiguration.java


示例20: getJdkPath

import com.intellij.execution.ExecutionBundle; //导入依赖的package包/类
public String getJdkPath() throws CantRunException {
  final Sdk jdk = getJdk();
  if (jdk == null) {
    throw new CantRunException(ExecutionBundle.message("no.jdk.specified..error.message"));
  }

  final String jdkHome = jdk.getHomeDirectory().getPresentableUrl();
  if (jdkHome.isEmpty()) {
    throw new CantRunException(ExecutionBundle.message("home.directory.not.specified.for.jdk.error.message"));
  }
  return jdkHome;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:JavaParameters.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java IFile类代码示例发布时间:2022-05-22
下一篇:
Java ServiceStatus类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap