本文整理匯總了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");
}