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

Java ParametersListUtil类代码示例

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

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



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

示例1: CompilerUIConfigurable

import com.intellij.util.execution.ParametersListUtil; //导入依赖的package包/类
public CompilerUIConfigurable(@NotNull final Project project) {
  myProject = project;

  myPatternLegendLabel.setText(XmlStringUtil.wrapInHtml(
                                 "Use <b>;</b> to separate patterns and <b>!</b> to negate a pattern. " +
                                 "Accepted wildcards: <b>?</b> &mdash; exactly one symbol; <b>*</b> &mdash; zero or more symbols; " +
                                 "<b>/</b> &mdash; path separator; <b>/**/</b> &mdash; any number of directories; " +
                                 "<i>&lt;dir_name&gt;</i>:<i>&lt;pattern&gt;</i> &mdash; restrict to source roots with the specified name"
  ));
  myPatternLegendLabel.setForeground(new JBColor(Gray._50, Gray._130));
  tweakControls(project);
  myVMOptionsField.getDocument().addDocumentListener(new DocumentAdapter() {
    protected void textChanged(DocumentEvent e) {
      mySharedVMOptionsField.setEnabled(e.getDocument().getLength() == 0);
      myHeapSizeField.setEnabled(ContainerUtil.find(ParametersListUtil.parse(myVMOptionsField.getText()), new Condition<String>() {
        @Override
        public boolean value(String s) {
          return StringUtil.startsWithIgnoreCase(s, "-Xmx");
        }
      }) == null);
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:CompilerUIConfigurable.java


示例2: getAdditionalParameters

import com.intellij.util.execution.ParametersListUtil; //导入依赖的package包/类
@NotNull
@Override
public List<String> getAdditionalParameters() {
  if (myCommandLineOptions == null) {
    if (myUseCustomProfile && myUserDataDirectoryPath != null) {
      return Collections.singletonList(USER_DATA_DIR_ARG + FileUtilRt.toSystemDependentName(myUserDataDirectoryPath));
    }
    else {
      return Collections.emptyList();
    }
  }

  List<String> cliOptions = ParametersListUtil.parse(myCommandLineOptions);
  if (myUseCustomProfile && myUserDataDirectoryPath != null) {
    cliOptions.add(USER_DATA_DIR_ARG + FileUtilRt.toSystemDependentName(myUserDataDirectoryPath));
  }
  return cliOptions;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:ChromeSettings.java


示例3: getMavenOptsProperties

import com.intellij.util.execution.ParametersListUtil; //导入依赖的package包/类
@NotNull
private static Map<String, String> getMavenOptsProperties() {
  Map<String, String> res = ourPropertiesFromMvnOpts;
  if (res == null) {
    String mavenOpts = System.getenv("MAVEN_OPTS");
    if (mavenOpts != null) {
      res = new HashMap<String, String>();
      final String[] split = ParametersListUtil.parseToArray(mavenOpts);
      for (String parameter : split) {
        final Matcher matcher = PROPERTY_PATTERN.matcher(parameter);
        if (matcher.matches()) {
          res.put(matcher.group(1), matcher.group(2));
        }
      }
    }
    else {
      res = Collections.emptyMap();
    }

    ourPropertiesFromMvnOpts = res;
  }

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


示例4: setData

import com.intellij.util.execution.ParametersListUtil; //导入依赖的package包/类
protected void setData(final MavenRunnerParameters data) {
  data.setWorkingDirPath(workingDirComponent.getComponent().getText());
  data.setGoals(ParametersListUtil.parse(goalsComponent.getComponent().getText()));
  data.setResolveToWorkspace(myResolveToWorkspaceCheckBox.isSelected());

  Map<String, Boolean> profilesMap = new LinkedHashMap<String, Boolean>();

  List<String> profiles = ParametersListUtil.parse(profilesComponent.getComponent().getText());

  for (String profile : profiles) {
    Boolean isEnabled = true;
    if (profile.startsWith("-") || profile.startsWith("!")) {
      profile = profile.substring(1);
      if (profile.isEmpty()) continue;

      isEnabled = false;
    }

    profilesMap.put(profile, isEnabled);
  }
  data.setProfilesMap(profilesMap);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:MavenRunnerParametersPanel.java


示例5: createUIComponents

import com.intellij.util.execution.ParametersListUtil; //导入依赖的package包/类
private void createUIComponents() {
  myProtectedBranchesButton = new TextFieldWithBrowseButton.NoPathCompletion(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
      Messages.showTextAreaDialog(myProtectedBranchesButton.getTextField(), "Protected Branches", "Git.Force.Push.Protected.Branches",
                                  ParametersListUtil.COLON_LINE_PARSER, ParametersListUtil.COLON_LINE_JOINER);
    }
  });
  myProtectedBranchesButton.setButtonIcon(AllIcons.Actions.ShowViewer);
  myUpdateMethodComboBox = new ComboBox(new EnumComboBoxModel<UpdateMethod>(UpdateMethod.class));
  myUpdateMethodComboBox.setRenderer(new ListCellRendererWrapper<UpdateMethod>() {
    @Override
    public void customize(JList list, UpdateMethod value, int index, boolean selected, boolean hasFocus) {
      setText(StringUtil.capitalize(StringUtil.toLowerCase(value.name().replace('_', ' '))));
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:GitVcsPanel.java


示例6: calculateCommand

import com.intellij.util.execution.ParametersListUtil; //导入依赖的package包/类
@NotNull
private static List<String> calculateCommand(@NotNull final String interpreterPath,
                                             @NotNull final TheRRunConfiguration runConfiguration) {
  final List<String> command = new ArrayList<String>();

  command.add(FileUtil.toSystemDependentName(interpreterPath));
  command.addAll(TheRInterpreterConstants.DEFAULT_PARAMETERS);

  final String scriptArgs = runConfiguration.getScriptArgs();

  if (!StringUtil.isEmptyOrSpaces(scriptArgs)) {
    command.add(TheRInterpreterConstants.ARGS_PARAMETER);
    command.addAll(ParametersListUtil.parse(scriptArgs));
  }

  return command;
}
 
开发者ID:ktisha,项目名称:TheRPlugin,代码行数:18,代码来源:TheRCommandLineCalculator.java


示例7: execute

import com.intellij.util.execution.ParametersListUtil; //导入依赖的package包/类
@Nonnull
private static Process execute(@Nonnull String exePath, @Nonnull String parametersTemplate, @Nonnull Map<String, String> patterns)
        throws ExecutionException {
  List<String> parameters = ParametersListUtil.parse(parametersTemplate, true);

  List<String> from = new ArrayList<>();
  List<String> to = new ArrayList<>();
  for (Map.Entry<String, String> entry : patterns.entrySet()) {
    from.add(entry.getKey());
    to.add(entry.getValue());
  }

  List<String> args = new ArrayList<>();
  for (String parameter : parameters) {
    String arg = StringUtil.replace(parameter, from, to);
    if (!StringUtil.isEmptyOrSpaces(arg)) args.add(arg);
  }

  GeneralCommandLine commandLine = new GeneralCommandLine();
  commandLine.setExePath(exePath);
  commandLine.addParameters(args);
  return commandLine.createProcess();
}
 
开发者ID:consulo,项目名称:consulo,代码行数:24,代码来源:ExternalDiffToolUtil.java


示例8: getAdditionalParameters

import com.intellij.util.execution.ParametersListUtil; //导入依赖的package包/类
@Nonnull
@Override
public List<String> getAdditionalParameters() {
  if (myCommandLineOptions == null) {
    if (myUseCustomProfile && myUserDataDirectoryPath != null) {
      return Collections.singletonList(USER_DATA_DIR_ARG + FileUtilRt.toSystemDependentName(myUserDataDirectoryPath));
    }
    else {
      return Collections.emptyList();
    }
  }

  List<String> cliOptions = ParametersListUtil.parse(myCommandLineOptions);
  if (myUseCustomProfile && myUserDataDirectoryPath != null) {
    cliOptions.add(USER_DATA_DIR_ARG + FileUtilRt.toSystemDependentName(myUserDataDirectoryPath));
  }
  return cliOptions;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:19,代码来源:ChromeSettings.java


示例9: checkTokenizer

import com.intellij.util.execution.ParametersListUtil; //导入依赖的package包/类
private static void checkTokenizer(String paramString, String... expected) {
  ParametersList params = new ParametersList();
  params.addParametersString(paramString);
  assertEquals(asList(expected), params.getList());

  List<String> lines = ParametersListUtil.parse(paramString, true);
  assertEquals(paramString, StringUtil.join(lines, " "));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:ParametersListTest.java


示例10: getBrokenPluginVersions

import com.intellij.util.execution.ParametersListUtil; //导入依赖的package包/类
@NotNull
private static MultiMap<String, String> getBrokenPluginVersions() {
  if (ourBrokenPluginVersions == null) {
    ourBrokenPluginVersions = MultiMap.createSet();

    if (System.getProperty("idea.ignore.disabled.plugins") == null && !isUnitTestMode()) {
      BufferedReader br = new BufferedReader(new InputStreamReader(PluginManagerCore.class.getResourceAsStream("/brokenPlugins.txt")));
      try {
        String s;
        while ((s = br.readLine()) != null) {
          s = s.trim();
          if (s.startsWith("//")) continue;

          List<String> tokens = ParametersListUtil.parse(s);
          if (tokens.isEmpty()) continue;

          if (tokens.size() == 1) {
            throw new RuntimeException("brokenPlugins.txt is broken. The line contains plugin name, but does not contains version: " + s);
          }

          String pluginId = tokens.get(0);
          List<String> versions = tokens.subList(1, tokens.size());

          ourBrokenPluginVersions.putValues(pluginId, versions);
        }
      }
      catch (IOException e) {
        throw new RuntimeException("Failed to read /brokenPlugins.txt", e);
      }
      finally {
        StreamUtil.closeStream(br);
      }
    }
  }
  return ourBrokenPluginVersions;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:37,代码来源:PluginManagerCore.java


示例11: load

import com.intellij.util.execution.ParametersListUtil; //导入依赖的package包/类
/**
 * Load settings into the configuration panel
 *
 * @param settings the settings to load
 */
public void load(@NotNull GitVcsSettings settings, @NotNull GitSharedSettings sharedSettings) {
  myGitField.setText(settings.getAppSettings().getPathToGit());
  mySSHExecutableComboBox.setSelectedItem(settings.isIdeaSsh() ? IDEA_SSH : NATIVE_SSH);
  myAutoUpdateIfPushRejected.setSelected(settings.autoUpdateIfPushRejected());
  mySyncControl.setSelected(settings.getSyncSetting() == DvcsSyncSettings.Value.SYNC);
  myAutoCommitOnCherryPick.setSelected(settings.isAutoCommitOnCherryPick());
  myWarnAboutCrlf.setSelected(settings.warnAboutCrlf());
  myWarnAboutDetachedHead.setSelected(settings.warnAboutDetachedHead());
  myEnableForcePush.setSelected(settings.isForcePushAllowed());
  myUpdateMethodComboBox.setSelectedItem(settings.getUpdateType());
  myProtectedBranchesButton.setText(ParametersListUtil.COLON_LINE_JOINER.fun(sharedSettings.getForcePushProhibitedPatterns()));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:GitVcsPanel.java


示例12: createCommandLine

import com.intellij.util.execution.ParametersListUtil; //导入依赖的package包/类
private static List<String> createCommandLine(CompileContext context,
                                              ModuleChunk chunk,
                                              List<File> srcFiles,
                                              String mainOutputDir, @Nullable ProcessorConfigProfile profile, GreclipseSettings settings) {
  final List<String> args = new ArrayList<String>();

  args.add("-cp");
  args.add(getClasspathString(chunk));

  JavaBuilder.addCompilationOptions(args, context, chunk, profile);

  args.add("-d");
  args.add(mainOutputDir);

  //todo AjCompilerSettings exact duplicate, JavaBuilder.loadCommonJavacOptions inexact duplicate 
  List<String> params = ParametersListUtil.parse(settings.cmdLineParams);
  for (Iterator<String> iterator = params.iterator(); iterator.hasNext(); ) {
    String option = iterator.next();
    if ("-target".equals(option)) {
      iterator.next();
      continue;
    }
    else if (option.isEmpty() || "-g".equals(option) || "-verbose".equals(option)) {
      continue;
    }
    args.add(option);
  }

  if (settings.debugInfo) {
    args.add("-g");
  }

  for (File file : srcFiles) {
    args.add(file.getPath());
  }

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


示例13: getBashCommandsToRunScript

import com.intellij.util.execution.ParametersListUtil; //导入依赖的package包/类
/** Appends '--script_path' to blaze flags, then runs 'bash -c blaze build ... && run_script' */
private static List<String> getBashCommandsToRunScript(BlazeCommand.Builder blazeCommand) {
  File scriptFile = createTempOutputFile();
  blazeCommand.addBlazeFlags("--script_path=" + scriptFile.getPath());
  String blaze = ParametersListUtil.join(blazeCommand.build().toList());
  return ImmutableList.of("/bin/bash", "-c", blaze + " && " + scriptFile.getPath());
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:8,代码来源:BlazeJavaRunProfileState.java


示例14: getScriptParams

import com.intellij.util.execution.ParametersListUtil; //导入依赖的package包/类
private static String getScriptParams(BlazeCommandRunConfigurationCommonState state) {
  List<String> params = Lists.newArrayList(state.getExeFlagsState().getExpandedFlags());
  String filterFlag = state.getTestFilterFlag();
  if (filterFlag != null) {
    params.add(filterFlag.substring((BlazeFlags.TEST_FILTER + "=").length()));
  }
  return ParametersListUtil.join(params);
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:9,代码来源:BlazePyRunConfigurationRunner.java


示例15: getModifierForCommandLine

import com.intellij.util.execution.ParametersListUtil; //导入依赖的package包/类
@NotNull
@Override
public NotNullPairFunction<DotNetConfigurationWithCoverage, GeneralCommandLine, GeneralCommandLine> getModifierForCommandLine()
{
	return new NotNullPairFunction<DotNetConfigurationWithCoverage, GeneralCommandLine, GeneralCommandLine>()
	{
		@NotNull
		@Override
		public GeneralCommandLine fun(DotNetConfigurationWithCoverage t, GeneralCommandLine v)
		{
			CoverageEnabledConfiguration coverageEnabledConfiguration = DotNetCoverageEnabledConfiguration.get(t);

			File openCoverConsoleExecutable = getOpenCoverConsoleExecutable();

			GeneralCommandLine newCommandLine = new GeneralCommandLine();
			newCommandLine.setExePath(openCoverConsoleExecutable.getPath());
			newCommandLine.addParameter("-register:user");
			newCommandLine.addParameter("-target:" + v.getExePath());
			newCommandLine.addParameter("-filter:+[*]*");
			newCommandLine.addParameter("-output:" + coverageEnabledConfiguration.getCoverageFilePath());

			String parametersAsString = ParametersListUtil.join(v.getParametersList().getParameters());
			if(!StringUtil.isEmpty(parametersAsString))
			{
				newCommandLine.addParameter("-targetargs:" + parametersAsString + "");
			}
			return newCommandLine;
		}
	};
}
 
开发者ID:consulo,项目名称:consulo-dotnet,代码行数:31,代码来源:OpenCoverCoverageRunner.java


示例16: executeTask

import com.intellij.util.execution.ParametersListUtil; //导入依赖的package包/类
@Override
public boolean executeTask(DataContext dataContext, RunConfiguration runConfiguration, ExecutionEnvironment executionEnvironment, MuleBeforeRunTask muleBeforeRunTask)
{
    final Semaphore targetDone = new Semaphore();
    final List<Boolean> results = new ArrayList<>();

    final Project project = executionEnvironment.getProject();

    MuleConfiguration muleConfiguration = (MuleConfiguration) runConfiguration;

    Module[] modules = muleConfiguration.getModules();

    for (Module nextModule : modules) {
        //final MavenProject mavenProject = getMavenProject(runConfiguration, project);
        final MavenProject mavenProject = getMavenProject(nextModule);
        try {
            ApplicationManager.getApplication().invokeAndWait(new Runnable() {
                public void run() {
                    if (!project.isDisposed() && mavenProject != null) {
                        FileDocumentManager.getInstance().saveAllDocuments();
                        final MavenExplicitProfiles explicitProfiles = MavenProjectsManager.getInstance(project).getExplicitProfiles();
                        final MavenRunner mavenRunner = MavenRunner.getInstance(project);
                        targetDone.down();
                        (new Task.Backgroundable(project, TasksBundle.message("maven.tasks.executing"), true) {
                            public void run(@NotNull ProgressIndicator indicator) {
                                try {
                                    MavenRunnerParameters params =
                                            new MavenRunnerParameters(true, mavenProject.getDirectory(), ParametersListUtil.parse("package"), explicitProfiles.getEnabledProfiles(),
                                                    explicitProfiles.getDisabledProfiles());
                                    boolean result = mavenRunner.runBatch(Collections.singletonList(params), null, null, TasksBundle.message("maven.tasks.executing"), indicator);
                                    results.add(result);
                                } finally {
                                    targetDone.up();
                                }
                            }

                            public boolean shouldStartInBackground() {
                                return MavenRunner.getInstance(project).getSettings().isRunMavenInBackground();
                            }

                            public void processSentToBackground() {
                                MavenRunner.getInstance(project).getSettings().setRunMavenInBackground(true);
                            }
                        }).queue();
                    }
                }
            }, ModalityState.NON_MODAL);
        } catch (Exception exeception) {
            return false;
        }
        targetDone.waitFor();
    }

    boolean endResult = true;

    for (Boolean nextResult : results) {
        endResult = endResult && nextResult;
    }

    return endResult;
}
 
开发者ID:machaval,项目名称:mule-intellij-plugins,代码行数:62,代码来源:MuleBeforeRunTasksProvider.java


示例17: createUIComponents

import com.intellij.util.execution.ParametersListUtil; //导入依赖的package包/类
private void createUIComponents() {
  myResourcePatternsField = new RawCommandLineEditor(ParametersListUtil.COLON_LINE_PARSER, ParametersListUtil.COLON_LINE_JOINER);
  myResourcePatternsField.setDialogCaption("Resource patterns");
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:CompilerUIConfigurable.java


示例18: showTextAreaDialog

import com.intellij.util.execution.ParametersListUtil; //导入依赖的package包/类
public static void showTextAreaDialog(final JTextField textField, final @Nls(capitalization = Nls.Capitalization.Title) String title, @NonNls final String dimensionServiceKey) {
  showTextAreaDialog(textField, title, dimensionServiceKey, ParametersListUtil.DEFAULT_LINE_PARSER, ParametersListUtil.DEFAULT_LINE_JOINER);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:Messages.java


示例19: join

import com.intellij.util.execution.ParametersListUtil; //导入依赖的package包/类
/**
 * @see ParametersListUtil#join(java.util.List)
 */
@NotNull
public static String join(@NotNull final List<String> parameters) {
  return ParametersListUtil.join(parameters);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:ParametersList.java


示例20: parse

import com.intellij.util.execution.ParametersListUtil; //导入依赖的package包/类
/**
 * @see ParametersListUtil#parseToArray(String)
 */
@NotNull
public static String[] parse(@NotNull final String string) {
  return ParametersListUtil.parseToArray(string);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:ParametersList.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java OnGetPoiSearchResultListener类代码示例发布时间:2022-05-22
下一篇:
Java Rendition类代码示例发布时间: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