}
}
private void doBuildKieProject() throws CoreException {
KieServices ks = KieServices.Factory.get();
KieFileSystem kfs = ks.newKieFileSystem();
Map<String, IResource> resourcesMap = new HashMap<String, IResource>();
for (IResource resource : resources) {
String resourcePath = resource.getProjectRelativePath().toString();
if ( ResourceType.determineResourceType( resource.getName() ) != null ) {
removeProblemsFor( resource );
kfs.write(resourcePath, ResourceFactory.newInputStreamResource( ((IFile) resource).getContents() ));
resourcesMap.put(resourcePath, resource);
} else if ( resourcePath.endsWith(KieModuleModelImpl.KMODULE_JAR_PATH) ) {
kfs.writeKModuleXML(new String( Util.getResourceContentsAsCharArray( (IFile)resource ) ));
}
}
KieBuilder kieBuilder = ks.newKieBuilder(kfs);
List<Message> messages = kieBuilder.buildAll().getResults().getMessages();