use of org.talend.designer.maven.tools.MavenPomSynchronizer in project tdi-studio-se by Talend.
the class JavaProcessorUtilities method getTalendJavaProject.
/**
* A java project under folder .Java will be created if there is no existed.
*
* DOC ggu Comment method "getTalendJavaProject".
*
* @return
* @throws CoreException
*/
public static ITalendProcessJavaProject getTalendJavaProject() {
if (talendJavaProject == null) {
synchronized (JavaProcessorUtilities.class) {
if (talendJavaProject == null) {
try {
IProject project = TalendCodeProjectUtil.initCodeProject(new NullProgressMonitor());
if (project != null) {
IJavaProject javaProject = JavaCore.create(project);
talendJavaProject = new TalendProcessJavaProject(javaProject);
// synchronize templates
if (talendJavaProject != null) {
MavenPomSynchronizer pomSynchronizer = new MavenPomSynchronizer(talendJavaProject);
pomSynchronizer.syncTemplates(false);
}
}
} catch (Exception e) {
// create failure, only log it?
ExceptionHandler.process(e);
}
}
}
}
return talendJavaProject;
}
Aggregations