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


Java ActionProvider.COMMAND_DEBUG属性代码示例

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


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

示例1: isProtectedWait

private boolean isProtectedWait(Project proj, RunConfig config) {
    String action = config.getActionName();
    if(action == null || proj == null || !RunUtils.isCompileOnSaveEnabled(proj)) {
        return false;
    }
    switch(action) {
        case ActionProvider.COMMAND_RUN: 
        case ActionProvider.COMMAND_RUN_SINGLE:
        case ActionProvider.COMMAND_DEBUG:
        case ActionProvider.COMMAND_DEBUG_SINGLE:
        case ActionProviderImpl.DEBUG_MAIN:
        case ActionProviderImpl.RUN_MAIN:
            return true;
        default:
            return false;
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:17,代码来源:AbstractOutputHandler.java

示例2: createConcealedProperties

@NonNull
@Override
@SuppressWarnings("fallthrough")
public Set<String> createConcealedProperties(@NonNull final String command, @NonNull final Lookup context) {
    Parameters.notNull("command", command); //NOI18N
    Parameters.notNull("context", context); //NOI18N
    switch (command) {
        case ActionProvider.COMMAND_RUN:
        case ActionProvider.COMMAND_DEBUG:
        case ActionProvider.COMMAND_PROFILE:
            final RemotePlatform rp = Utilities.getRemotePlatform(prj);
            if (rp != null) {
            final ConnectionMethod.Authentification.Kind kind = rp.getConnectionMethod().getAuthentification().getKind();
                switch (kind) {
                    case PASSWORD:
                        return Collections.singleton(PROP_PASSWD);
                    case KEY:
                        return Collections.singleton(PROP_PASSPHRASE);
                    default:
                        throw new IllegalStateException(kind.name());
                }
            }
        default:
            return Collections.<String>emptySet();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:26,代码来源:RemoteBuildPropertiesProvider.java

示例3: 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

示例4: createAdditionalProperties

@NonNull
@Override
@SuppressWarnings("fallthrough")
public Map<String, String> createAdditionalProperties(
        @NonNull final String command,
        @NonNull final Lookup context) {
    Parameters.notNull("command", command); //NOI18N
    Parameters.notNull("context", context); //NOI18N
    switch (command) {
        case ActionProvider.COMMAND_RUN:
        case ActionProvider.COMMAND_DEBUG:            
        case ActionProvider.COMMAND_PROFILE:
            final RemotePlatform rp = Utilities.getRemotePlatform(prj);
            if (rp != null) {
                final ConnectionMethod.Authentification auth = rp.getConnectionMethod().getAuthentification();                    
                Map<String,String> res = new HashMap<>();
                String target = Utilities.getTargetOSForRP(
                    rp.getSystemProperties().get("os.name"),    //NOI18N
                    rp.getSystemProperties().get("os.arch"),    //NOI18N
                    rp.getSystemProperties().get("sun.arch.abi"),   //NOI18N
                    rp.getSystemProperties().get(("java.vm.name"))); //NOI18N
                res.put(PROP_JAVA_SPEC_VER, rp.getSystemProperties().get("java.specification.version").replace(".","")); //NOI18N
                res.put(PROP_OS_ARCH_RP, target);
                res.put(PROP_FILENAME_RP, target.replace("-", "").replace("15","")); //NOI18N
                switch (auth.getKind()) {
                    case PASSWORD:
                        res.put(
                            PROP_PASSWD,
                            ((ConnectionMethod.Authentification.Password)auth).getPassword());
                        break;
                    case KEY:
                        res.put(
                            PROP_PASSPHRASE,
                            ((ConnectionMethod.Authentification.Key)auth).getPassPhrase());
                        break;
                    default:
                        throw new IllegalStateException(auth.getKind().name());
                }
                return Collections.unmodifiableMap(res);
            }
        default:
            return Collections.<String,String>emptyMap();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:44,代码来源:RemoteBuildPropertiesProvider.java


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