*/
private Diagnostic analyzeResourceProblems( Resource resource, Exception exception ) {
if ( !resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty() ) {
BasicDiagnostic basicDiagnostic = new BasicDiagnostic( Diagnostic.ERROR, JavaFXUIPlugin.PLUGIN_ID, 0, "_UI_CreateModelError_message",
new Object[] { exception == null ? (Object) resource : exception } );
basicDiagnostic.merge( EcoreUtil.computeDiagnostic( resource, true ) );
return basicDiagnostic;
}
else if ( exception != null ) {
return new BasicDiagnostic( Diagnostic.ERROR, JavaFXUIPlugin.PLUGIN_ID, 0, "_UI_CreateModelError_message", new Object[] { exception } );
}