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


Java ProjectHelper类代码示例

本文整理汇总了Java中org.netbeans.jcode.core.util.ProjectHelper的典型用法代码示例。如果您正苦于以下问题:Java ProjectHelper类的具体用法?Java ProjectHelper怎么用?Java ProjectHelper使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: execute

import org.netbeans.jcode.core.util.ProjectHelper; //导入依赖的package包/类
@Override
public void execute() throws IOException {
    if (!appConfigData.isCompleteApplication()) {
        return;
    }
    if(appConfigData.isGateway() || appConfigData.isMonolith()){
        return;
    }
    project = appConfigData.isGateway() ? appConfigData.getGatewayProject() : appConfigData.getTargetProject();

    FileObject configRoot = ProjectHelper.getResourceDirectory(project);

    NG2ApplicationConfig applicationConfig = new NG2ApplicationConfig(
            new POMManager(project, true).getArtifactId(), "maven");
    applicationConfig.setEnableSocialSignIn(false);
    applicationConfig.setLanguages(i18NConfig.getOtherLanguagesKeyword());

    EJSParser parser = new EJSParser();
    parser.addContext(applicationConfig);

    Function<String, String> pathResolver = (templatePath) -> {
        String simpleFileName = getSimpleFileName(templatePath);
        String lang = simpleFileName.substring("_messages_".length());
        if (!applicationConfig.getLanguages().contains(lang.replace("_", "-"))) {
            return null;
        }
        return String.format("i18n/messages_%s.properties", lang);
    };
    copyDynamicResource(parser.getParserManager(), TEMPLATE + "rest-resources-i18n.zip", configRoot, pathResolver, handler);
}
 
开发者ID:jeddict,项目名称:hipee,代码行数:31,代码来源:I18NGenerator.java

示例2: createTestDD

import org.netbeans.jcode.core.util.ProjectHelper; //导入依赖的package包/类
public static FileObject createTestDD(Project project, String ddTemplatePath, Map<String, Object> params) {
    FileObject fileObject = null;
    try {
        FileObject testResourceRoot = ProjectHelper.getTestResourceDirectory(project);
        fileObject = expandTemplate(ddTemplatePath, testResourceRoot, DD_NAME, params);
    } catch (IOException ex) {
        Exceptions.printStackTrace(ex);
    }
    return fileObject;
}
 
开发者ID:jeddict,项目名称:jCode,代码行数:11,代码来源:WebDDUtil.java

示例3: isSupportedProject

import org.netbeans.jcode.core.util.ProjectHelper; //导入依赖的package包/类
private boolean isSupportedProject(ProjectInfo projectInfo) {
    ProjectType projectType = projectInfo.getProject() != null ? ProjectHelper.getProjectType(projectInfo.getProject()) : null;
    return projectType != null && projectType == ProjectType.WEB
            && projectInfo.getProject().getClass().getName().contains("Maven");
}
 
开发者ID:jeddict,项目名称:jeddict,代码行数:6,代码来源:GenerateCodeDialog.java


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