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