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


Java ParametersList.parse方法代码示例

本文整理汇总了Java中com.intellij.execution.configurations.ParametersList.parse方法的典型用法代码示例。如果您正苦于以下问题:Java ParametersList.parse方法的具体用法?Java ParametersList.parse怎么用?Java ParametersList.parse使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.execution.configurations.ParametersList的用法示例。


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

示例1: getCommand

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
MvcCommand getCommand() {
  String cmd;

  if (myCreateAddon.isSelected()) {
    cmd = "create-addon";
  }
  else if (myCreateApp.isSelected()) {
    cmd = "create-app";
  }
  else if (myCreateArchetype.isSelected()) {
    cmd = "create-archetype";
  }
  else if (myCreatePlugin.isSelected()) {
    cmd = "create-plugin";
  }
  else {
    throw new AssertionError("No selection");
  }

  String text = myOptionField.getText();
  if (text == null) text = "";

  return new MvcCommand(cmd, ParametersList.parse(text));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:GriffonCreateProjectDialog.java

示例2: getParameters

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
private static String[] getParameters(String[] parameters, String programParameters)
{
	List<String> result = new ArrayList<>();
	for(String parameter : parameters)
	{
		if(parameter != null && (parameter.trim().length() > 0))
		{
			result.add(parameter.trim());
		}
	}
	if(programParameters != null && (programParameters.trim().length() > 0))
	{
		String[] programParametersArray = ParametersList.parse(programParameters);
		for(String s : programParametersArray)
		{
			if(s != null && s.trim().length() > 0)
			{
				result.add(s.trim());
			}
		}

	}
	return ArrayUtil.toStringArray(result);
}
 
开发者ID:consulo,项目名称:consulo-javaee,代码行数:25,代码来源:ColoredCommandLineExecutableObject.java

示例3: getParameters

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
private static String[] getParameters(String[] parameters, String programParameters) {
  List<String> result = new ArrayList<>();
  for (String parameter : parameters) {
    if (parameter != null && (parameter.trim().length() > 0)) {
      result.add(parameter.trim());
    }
  }
  if (programParameters != null && (programParameters.trim().length() > 0)) {
    String[] programParametersArray = ParametersList.parse(programParameters);
    for (String s : programParametersArray) {
      if (s != null && s.trim().length() > 0) {
        result.add(s.trim());
      }
    }

  }
  return ArrayUtil.toStringArray(result);
}
 
开发者ID:consulo,项目名称:consulo-javaee,代码行数:19,代码来源:CommandLineExecutableObject.java

示例4: parse

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
@NotNull
public static MvcCommand parse(@NotNull String cmd) {
  String[] args = ParametersList.parse(cmd);

  MvcCommand res = new MvcCommand();

  int i = 0;

  while (res.myCommand == null && i < args.length) {
    String s = args[i];

    if (s.startsWith("-D")) {
      res.myProperties.add(s);
    }
    else if (res.myEnv == null && ourEnvironments.contains(s)) {
      res.myEnv = s;
    }
    else {
      res.myCommand = s;
    }

    i++;
  }

  res.myArgs.addAll(Arrays.asList(args).subList(i, args.length));

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

示例5: getAdditionalParameters

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
@NotNull
@Override
public String[] getAdditionalParameters() {
  String[] cliOptions = ParametersList.parse(myCommandLineOptions);
  if (myUseCustomProfile && myUserDataDirectoryPath != null) {
    return ArrayUtil.mergeArrays(cliOptions, USER_DATA_DIR_ARG + FileUtil.toSystemDependentName(myUserDataDirectoryPath));
  }
  else {
    return cliOptions;
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:12,代码来源:ChromeSettings.java

示例6: launchEmulator

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
public void launchEmulator(@Nullable String avdName, @NotNull String commands) {
  File sdkLocation = null;
  if (Projects.isGradleProject(getModule().getProject()) && isAndroidStudio()) {
    sdkLocation = IdeSdks.getAndroidSdkPath();
  }
  else {
    AndroidPlatform platform = getConfiguration().getAndroidPlatform();
    if (platform != null) {
      sdkLocation = platform.getSdkData().getLocation();
    }
  }

  if (sdkLocation != null) {
    File emulatorPath = new File(sdkLocation, toolPath(FN_EMULATOR));
    GeneralCommandLine commandLine = new GeneralCommandLine();
    commandLine.setExePath(emulatorPath.getPath());
    if (avdName != null) {
      commandLine.addParameter("-avd");
      commandLine.addParameter(avdName);
    }
    String[] params = ParametersList.parse(commands);
    for (String s : params) {
      if (!s.isEmpty()) {
        commandLine.addParameter(s);
      }
    }
    AvdManager manager = getAvdManagerSilently();
    AvdInfo info = manager == null ? null : manager.getAvd(avdName, true);
    final EmulatorRunner runner = new EmulatorRunner(getModule().getProject(), "AVD: " + avdName, commandLine, info);

    ApplicationManager.getApplication().executeOnPooledThread(new Runnable() {
      @Override
      public void run() {
        try {
          runner.start();
        }
        catch (ExecutionException e) {
          Logger.getInstance(this.getClass()).error("Unexpected error while launching AVD", e);
        }
      }
    });
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:44,代码来源:AndroidFacet.java


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