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


Java ActionProvider.COMMAND_TEST属性代码示例

本文整理汇总了Java中org.netbeans.spi.project.ActionProvider.COMMAND_TEST属性的典型用法代码示例。如果您正苦于以下问题:Java ActionProvider.COMMAND_TEST属性的具体用法?Java ActionProvider.COMMAND_TEST怎么用?Java ActionProvider.COMMAND_TEST使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.netbeans.spi.project.ActionProvider的用法示例。


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

示例1: getActionNames

private String[] getActionNames(String[] targetNames) {
    String[] actions = new String[targetNames.length];
    for (int i = 0; i < targetNames.length; i++) {
        if (targetNames[i].equals("test-single")) {                      //NOI18N
            actions[i] = ActionProvider.COMMAND_TEST_SINGLE;
        } else if (targetNames[i].equals("debug-test")) {                //NOI18N
            actions[i] = ActionProvider.COMMAND_DEBUG_TEST_SINGLE;
        } else if (targetNames[i].equals("test-unit")) {                //NOI18N
            actions[i] = ActionProvider.COMMAND_TEST;
        } else if (targetNames[i].equals("test-method")) {                //NOI18N
            actions[i] = SingleMethod.COMMAND_RUN_SINGLE_METHOD;
        } else if (targetNames[i].equals("debug-test-single-nb")) {                //NOI18N
            String testMethods = properties.getProperty("test.methods");//NOI18N
            if (testMethods != null) {
                actions[i] = SingleMethod.COMMAND_DEBUG_SINGLE_METHOD;
            } else {
                actions[i] = ActionProvider.COMMAND_DEBUG_TEST_SINGLE;
            }
        } else {
            actions[i] = targetNames[i];
        }
    }
    return actions;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:24,代码来源:TestNGExecutionManager.java

示例2: testProject

public static Action testProject() {        
    Action a = new ProjectAction (
        ActionProvider.COMMAND_TEST,
        NbBundle.getMessage(Actions.class, "LBL_TestProjectAction_Name"),
        NbBundle.getMessage(Actions.class, "LBL_TestProjectAction_Name_popup"),
        null,
        null ); 
    a.putValue("iconBase","org/netbeans/modules/project/ui/resources/testProject.png"); //NOI18N
    a.putValue("noIconInMenu", Boolean.TRUE); //NOI18N
    return a;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:Actions.java

示例3: runAllTests

private void runAllTests(ActionEvent evt) {//GEN-FIRST:event_runAllTests
    Lookup lookup = project.getLookup();
    ActionProvider actionProvider = project.getLookup().lookup(ActionProvider.class);
    CoverageProvider coverageProvider = CoverageManagerImpl.getProvider(project);
    String action = ActionProvider.COMMAND_TEST;
    if (coverageProvider != null && coverageProvider.getTestAllAction() != null) {
        action = coverageProvider.getTestAllAction();
    }
    if (actionProvider != null) {
        if (actionProvider.isActionEnabled(ActionProvider.COMMAND_TEST, lookup)) {
            actionProvider.invokeAction(action, lookup);
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:CoverageReportTopComponent.java

示例4: getAllTestAction

private String getAllTestAction() {
    String action = ActionProvider.COMMAND_TEST;
    CoverageProvider provider = getProvider();
    if (provider != null && provider.getTestAllAction() != null) {
        action = provider.getTestAllAction();
    }
    return action;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:CoverageSideBar.java

示例5: createDefaultScriptAction

@NonNull
public ScriptAction createDefaultScriptAction(
        @NonNull final String command,
        final boolean javaModelSensitive,
        final boolean scanSensitive,
        final boolean enabledInCoS,
        @NonNull final Supplier<? extends String[]> targets,
        @NullAllowed final CustomFileExecutor customFileExecutor) {
    Parameters.notNull("command", command);         //NOI18N
    Parameters.notNull("targets", targets);         //NOI18N
    switch (command) {
        case ActionProvider.COMMAND_CLEAN:
            return createNonCosAction(command, false, javaModelSensitive, scanSensitive, enabledInCoS, targets, Collections.emptyMap());
        case ActionProvider.COMMAND_REBUILD:
            return createNonCosAction(command, true, javaModelSensitive, scanSensitive, enabledInCoS, targets, Collections.emptyMap());
        case ActionProvider.COMMAND_BUILD:
            return createBuildAction(javaModelSensitive, scanSensitive, enabledInCoS, targets, mfs);
        case ActionProvider.COMMAND_RUN:
        case ActionProvider.COMMAND_DEBUG:
        case ActionProvider.COMMAND_DEBUG_STEP_INTO:
        case ActionProvider.COMMAND_PROFILE:
            return createRunAction(command, javaModelSensitive, scanSensitive, enabledInCoS, targets, mfs, mainClassServices);
        case ActionProvider.COMMAND_TEST:
            return createNonCosAction(command, true, javaModelSensitive, scanSensitive, enabledInCoS, targets, Collections.singletonMap("ignore.failing.tests", "true"));  //NOI18N);
        case ActionProvider.COMMAND_COMPILE_SINGLE:
            return createCompileSingleAction(javaModelSensitive, scanSensitive, enabledInCoS, sourceRoots, testRoots, targets);
        case ActionProvider.COMMAND_RUN_SINGLE:
        case ActionProvider.COMMAND_DEBUG_SINGLE:
        case ActionProvider.COMMAND_PROFILE_SINGLE:
            return createRunSingleAction(
                    command, javaModelSensitive, scanSensitive, enabledInCoS,
                    sourceRoots, testRoots, targets, customFileExecutor);
        case ActionProvider.COMMAND_TEST_SINGLE:
            return createTestSingleAction(javaModelSensitive, scanSensitive, enabledInCoS, sourceRoots, testRoots, targets);
        case ActionProvider.COMMAND_DEBUG_TEST_SINGLE:
        case ActionProvider.COMMAND_PROFILE_TEST_SINGLE:
            return createDebugTestSingleAction(command, javaModelSensitive, scanSensitive, enabledInCoS, sourceRoots, testRoots, targets);
        case SingleMethod.COMMAND_RUN_SINGLE_METHOD:
        case SingleMethod.COMMAND_DEBUG_SINGLE_METHOD:
            return createRunSingleMethodAction(command, javaModelSensitive, scanSensitive, enabledInCoS, testRoots, targets);
        case JavaProjectConstants.COMMAND_DEBUG_FIX:
            return createDebugFixAction(command, javaModelSensitive, scanSensitive, enabledInCoS, sourceRoots, testRoots, targets);
        default:
            throw new UnsupportedOperationException(String.format("Unsupported command: %s", command)); //NOI18N
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:46,代码来源:JavaActionProvider.java


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