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


Java ParametersList.addParamsGroup方法代码示例

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


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

示例1: paramsGroupSubGroups

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
@Test
public void paramsGroupSubGroups() {
  ParametersList params = new ParametersList();
  ParamsGroup group1 = params.addParamsGroup("id1");
  group1.addParameter("group1_param1");
  group1.addParameter("group1_param2");
  ParamsGroup group2 = params.addParamsGroup("id2");
  group2.addParameter("group2_param1");
  ParamsGroup group1_1 = group1.getParametersList().addParamsGroup("id1_1");
  group1_1.addParameter("group1_1_param1");
  ParamsGroup group1_2 = group1.getParametersList().addParamsGroup("id1_2");
  group1_2.addParameter("group1_2_param1");
  assertEquals(asList("group1_param1", "group1_param2", "group1_1_param1", "group1_2_param1", "group2_param1"), params.getList());
  assertEquals(asList("group1_param1", "group1_param2", "group1_1_param1", "group1_2_param1", "group2_param1"), params.getList());
  assertEquals("group1_param1 group1_param2 group1_1_param1 group1_2_param1 group2_param1", params.getParametersString().trim());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:ParametersListTest.java

示例2: paramsGroupAdd

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
@Test
public void paramsGroupAdd() {
  ParametersList params = new ParametersList();

  ParamsGroup group1 = params.addParamsGroup("id1");
  assertEquals("id1", group1.getId());
  assertEquals(1, params.getParamsGroupsCount());
  assertEquals(asList(group1), params.getParamsGroups());

  ParamsGroup group2 = params.addParamsGroup("id2");
  assertEquals("id2", group2.getId());
  assertEquals(2, params.getParamsGroupsCount());
  assertEquals(asList(group1, group2), params.getParamsGroups());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:ParametersListTest.java

示例3: paramsGroupAddAt

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
@Test
public void paramsGroupAddAt() {
  ParametersList params = new ParametersList();
  ParamsGroup group1 = params.addParamsGroup("id1");
  ParamsGroup group2 = params.addParamsGroup("id2");
  ParamsGroup group12 = params.addParamsGroupAt(1, "id12");
  ParamsGroup group01 = params.addParamsGroupAt(0, "id01");
  assertEquals(asList(group01, group1, group12, group2), params.getParamsGroups());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:ParametersListTest.java

示例4: paramsGroupRemove

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
@Test
public void paramsGroupRemove() {
  ParametersList params = new ParametersList();
  params.addParamsGroup("id1");
  ParamsGroup group2 = params.addParamsGroup("id2");
  ParamsGroup group3 = params.addParamsGroup("id3");
  ParamsGroup group4 = params.addParamsGroup("id4");
  params.removeParamsGroup(0);
  assertEquals(asList(group2, group3, group4), params.getParamsGroups());

  params.removeParamsGroup(1);
  assertEquals(asList(group2, group4), params.getParamsGroups());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:ParametersListTest.java

示例5: paramsGroupGroupParams

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
@Test
public void paramsGroupGroupParams() {
  ParametersList params = new ParametersList();
  params.add("param1");
  ParamsGroup group1 = params.addParamsGroup("id1");
  group1.addParameter("group1_param1");
  params.add("param2");
  group1.addParameter("group1_param2");
  ParamsGroup group2 = params.addParamsGroup("id2");
  group2.addParameter("group2_param1");
  params.add("param3");
  assertEquals(asList("param1", "param2", "param3"), params.getParameters());
  assertEquals(asList("param1", "param2", "param3", "group1_param1", "group1_param2", "group2_param1"), params.getList());
  assertArrayEquals(new String[]{"param1", "param2", "param3", "group1_param1", "group1_param2", "group2_param1"}, params.getArray());
  assertEquals("param1 param2 param3 group1_param1 group1_param2 group2_param1", params.getParametersString().trim());

  ParametersList group1_params = group1.getParametersList();
  assertEquals(asList("group1_param1", "group1_param2"), group1_params.getParameters());
  assertEquals(asList("group1_param1", "group1_param2"), group1_params.getList());
  assertArrayEquals(new String[]{"group1_param1", "group1_param2"}, group1_params.getArray());
  assertEquals("group1_param1 group1_param2", group1_params.getParametersString().trim());

  ParametersList group2_params = group2.getParametersList();
  assertEquals(asList("group2_param1"), group2_params.getParameters());
  assertEquals(asList("group2_param1"), group2_params.getList());
  assertArrayEquals(new String[]{"group2_param1"}, group2_params.getArray());
  assertEquals("group2_param1", group2_params.getParametersString().trim());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:ParametersListTest.java

示例6: paramsGroupClone

import com.intellij.execution.configurations.ParametersList; //导入方法依赖的package包/类
@Test
public void paramsGroupClone() {
  ParametersList params = new ParametersList();
  ParamsGroup group1 = params.addParamsGroup("id1");
  group1.addParameter("group1_param1");
  ParamsGroup group2 = params.addParamsGroup("id2");
  group2.addParameter("group2_param1");
  ParamsGroup group3 = params.addParamsGroup("id3");
  group3.addParameter("group3_param1");
  ParametersList params_clone = params.clone();
  params.removeParamsGroup(0);
  group2.addParameter("group2_param2");
  assertEquals("group2_param1 group2_param2 group3_param1", params.getParametersString().trim());
  assertEquals("group1_param1 group2_param1 group3_param1", params_clone.getParametersString().trim());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:ParametersListTest.java


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