當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。