本文整理汇总了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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}