Java Code Examples for org.eclipse.emf.common.util.BasicDiagnostic#merge()
The following examples show how to use
org.eclipse.emf.common.util.BasicDiagnostic#merge() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ChartEditor.java From neoscada with Eclipse Public License 1.0 | 6 votes |
/** * Returns a diagnostic describing the errors and warnings listed in the * resource * and the specified exception (if any). * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ public Diagnostic analyzeResourceProblems ( final Resource resource, final Exception exception ) { if ( !resource.getErrors ().isEmpty () || !resource.getWarnings ().isEmpty () ) { final BasicDiagnostic basicDiagnostic = new BasicDiagnostic ( Diagnostic.ERROR, "org.eclipse.scada.ui.chart.model.editor", //$NON-NLS-1$ 0, getString ( "_UI_CreateModelError_message", resource.getURI () ), //$NON-NLS-1$ new Object[] { exception == null ? (Object)resource : exception } ); basicDiagnostic.merge ( EcoreUtil.computeDiagnostic ( resource, true ) ); return basicDiagnostic; } else if ( exception != null ) { return new BasicDiagnostic ( Diagnostic.ERROR, "org.eclipse.scada.ui.chart.model.editor", //$NON-NLS-1$ 0, getString ( "_UI_CreateModelError_message", resource.getURI () ), //$NON-NLS-1$ new Object[] { exception } ); } else { return Diagnostic.OK_INSTANCE; } }
Example 2
Source File: GenconfEditor.java From M2Doc with Eclipse Public License 1.0 | 6 votes |
/** * Returns a diagnostic describing the errors and warnings listed in the resource * and the specified exception (if any). * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) { boolean hasErrors = !resource.getErrors().isEmpty(); if (hasErrors || !resource.getWarnings().isEmpty()) { BasicDiagnostic basicDiagnostic = new BasicDiagnostic(hasErrors ? Diagnostic.ERROR : Diagnostic.WARNING, "org.obeonetwork.m2doc.genconf.editor", 0, getString("_UI_CreateModelError_message", resource.getURI()), new Object[] {exception == null ? (Object) resource : exception}); basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true)); return basicDiagnostic; } else if (exception != null) { return new BasicDiagnostic(Diagnostic.ERROR, "org.obeonetwork.m2doc.genconf.editor", 0, getString("_UI_CreateModelError_message", resource.getURI()), new Object[] {exception}); } else { return Diagnostic.OK_INSTANCE; } }
Example 3
Source File: ConfigurationEditor.java From neoscada with Eclipse Public License 1.0 | 6 votes |
/** * Returns a diagnostic describing the errors and warnings listed in the resource * and the specified exception (if any). * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Diagnostic analyzeResourceProblems ( Resource resource, Exception exception ) { if ( !resource.getErrors ().isEmpty () || !resource.getWarnings ().isEmpty () ) { BasicDiagnostic basicDiagnostic = new BasicDiagnostic ( Diagnostic.ERROR, "org.eclipse.scada.da.server.exec.editor", //$NON-NLS-1$ 0, getString ( "_UI_CreateModelError_message", resource.getURI () ), //$NON-NLS-1$ new Object[] { exception == null ? (Object)resource : exception } ); basicDiagnostic.merge ( EcoreUtil.computeDiagnostic ( resource, true ) ); return basicDiagnostic; } else if ( exception != null ) { return new BasicDiagnostic ( Diagnostic.ERROR, "org.eclipse.scada.da.server.exec.editor", //$NON-NLS-1$ 0, getString ( "_UI_CreateModelError_message", resource.getURI () ), //$NON-NLS-1$ new Object[] { exception } ); } else { return Diagnostic.OK_INSTANCE; } }
Example 4
Source File: ItemEditor.java From neoscada with Eclipse Public License 1.0 | 6 votes |
/** * Returns a diagnostic describing the errors and warnings listed in the resource * and the specified exception (if any). * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Diagnostic analyzeResourceProblems ( Resource resource, Exception exception ) { if ( !resource.getErrors ().isEmpty () || !resource.getWarnings ().isEmpty () ) { BasicDiagnostic basicDiagnostic = new BasicDiagnostic ( Diagnostic.ERROR, "org.eclipse.scada.configuration.item.editor", //$NON-NLS-1$ 0, getString ( "_UI_CreateModelError_message", resource.getURI () ), //$NON-NLS-1$ new Object[] { exception == null ? (Object)resource : exception } ); basicDiagnostic.merge ( EcoreUtil.computeDiagnostic ( resource, true ) ); return basicDiagnostic; } else if ( exception != null ) { return new BasicDiagnostic ( Diagnostic.ERROR, "org.eclipse.scada.configuration.item.editor", //$NON-NLS-1$ 0, getString ( "_UI_CreateModelError_message", resource.getURI () ), //$NON-NLS-1$ new Object[] { exception } ); } else { return Diagnostic.OK_INSTANCE; } }
Example 5
Source File: ComponentEditor.java From neoscada with Eclipse Public License 1.0 | 6 votes |
/** * Returns a diagnostic describing the errors and warnings listed in the resource * and the specified exception (if any). * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Diagnostic analyzeResourceProblems ( Resource resource, Exception exception ) { boolean hasErrors = !resource.getErrors ().isEmpty (); if ( hasErrors || !resource.getWarnings ().isEmpty () ) { BasicDiagnostic basicDiagnostic = new BasicDiagnostic ( hasErrors ? Diagnostic.ERROR : Diagnostic.WARNING, "org.eclipse.scada.configuration.component.editor", //$NON-NLS-1$ 0, getString ( "_UI_CreateModelError_message", resource.getURI () ), //$NON-NLS-1$ new Object[] { exception == null ? (Object)resource : exception } ); basicDiagnostic.merge ( EcoreUtil.computeDiagnostic ( resource, true ) ); return basicDiagnostic; } else if ( exception != null ) { return new BasicDiagnostic ( Diagnostic.ERROR, "org.eclipse.scada.configuration.component.editor", //$NON-NLS-1$ 0, getString ( "_UI_CreateModelError_message", resource.getURI () ), //$NON-NLS-1$ new Object[] { exception } ); } else { return Diagnostic.OK_INSTANCE; } }
Example 6
Source File: GlobalizeEditor.java From neoscada with Eclipse Public License 1.0 | 6 votes |
/** * Returns a diagnostic describing the errors and warnings listed in the resource * and the specified exception (if any). * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Diagnostic analyzeResourceProblems ( Resource resource, Exception exception ) { boolean hasErrors = !resource.getErrors ().isEmpty (); if ( hasErrors || !resource.getWarnings ().isEmpty () ) { BasicDiagnostic basicDiagnostic = new BasicDiagnostic ( hasErrors ? Diagnostic.ERROR : Diagnostic.WARNING, "org.eclipse.scada.configuration.globalization.editor", //$NON-NLS-1$ 0, getString ( "_UI_CreateModelError_message", resource.getURI () ), //$NON-NLS-1$ new Object[] { exception == null ? (Object)resource : exception } ); basicDiagnostic.merge ( EcoreUtil.computeDiagnostic ( resource, true ) ); return basicDiagnostic; } else if ( exception != null ) { return new BasicDiagnostic ( Diagnostic.ERROR, "org.eclipse.scada.configuration.globalization.editor", //$NON-NLS-1$ 0, getString ( "_UI_CreateModelError_message", resource.getURI () ), //$NON-NLS-1$ new Object[] { exception } ); } else { return Diagnostic.OK_INSTANCE; } }
Example 7
Source File: SecurityEditor.java From neoscada with Eclipse Public License 1.0 | 6 votes |
/** * Returns a diagnostic describing the errors and warnings listed in the resource * and the specified exception (if any). * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Diagnostic analyzeResourceProblems ( Resource resource, Exception exception ) { if ( !resource.getErrors ().isEmpty () || !resource.getWarnings ().isEmpty () ) { BasicDiagnostic basicDiagnostic = new BasicDiagnostic ( Diagnostic.ERROR, "org.eclipse.scada.configuration.security.editor", //$NON-NLS-1$ 0, getString ( "_UI_CreateModelError_message", resource.getURI () ), //$NON-NLS-1$ new Object[] { exception == null ? (Object)resource : exception } ); basicDiagnostic.merge ( EcoreUtil.computeDiagnostic ( resource, true ) ); return basicDiagnostic; } else if ( exception != null ) { return new BasicDiagnostic ( Diagnostic.ERROR, "org.eclipse.scada.configuration.security.editor", //$NON-NLS-1$ 0, getString ( "_UI_CreateModelError_message", resource.getURI () ), //$NON-NLS-1$ new Object[] { exception } ); } else { return Diagnostic.OK_INSTANCE; } }
Example 8
Source File: InfrastructureEditor.java From neoscada with Eclipse Public License 1.0 | 6 votes |
/** * Returns a diagnostic describing the errors and warnings listed in the resource * and the specified exception (if any). * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Diagnostic analyzeResourceProblems ( Resource resource, Exception exception ) { boolean hasErrors = !resource.getErrors ().isEmpty (); if ( hasErrors || !resource.getWarnings ().isEmpty () ) { BasicDiagnostic basicDiagnostic = new BasicDiagnostic ( hasErrors ? Diagnostic.ERROR : Diagnostic.WARNING, "org.eclipse.scada.configuration.infrastructure.editor", //$NON-NLS-1$ 0, getString ( "_UI_CreateModelError_message", resource.getURI () ), //$NON-NLS-1$ new Object[] { exception == null ? (Object)resource : exception } ); basicDiagnostic.merge ( EcoreUtil.computeDiagnostic ( resource, true ) ); return basicDiagnostic; } else if ( exception != null ) { return new BasicDiagnostic ( Diagnostic.ERROR, "org.eclipse.scada.configuration.infrastructure.editor", //$NON-NLS-1$ 0, getString ( "_UI_CreateModelError_message", resource.getURI () ), //$NON-NLS-1$ new Object[] { exception } ); } else { return Diagnostic.OK_INSTANCE; } }
Example 9
Source File: CoreEditor.java From ifml-editor with MIT License | 6 votes |
/** * Returns a diagnostic describing the errors and warnings listed in the resource * and the specified exception (if any). * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) { if (!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty()) { BasicDiagnostic basicDiagnostic = new BasicDiagnostic (Diagnostic.ERROR, "IFMLEditor.editor", 0, getString("_UI_CreateModelError_message", resource.getURI()), new Object [] { exception == null ? (Object)resource : exception }); basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true)); return basicDiagnostic; } else if (exception != null) { return new BasicDiagnostic (Diagnostic.ERROR, "IFMLEditor.editor", 0, getString("_UI_CreateModelError_message", resource.getURI()), new Object[] { exception }); } else { return Diagnostic.OK_INSTANCE; } }
Example 10
Source File: MemoryEditor.java From neoscada with Eclipse Public License 1.0 | 6 votes |
/** * Returns a diagnostic describing the errors and warnings listed in the resource * and the specified exception (if any). * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Diagnostic analyzeResourceProblems ( Resource resource, Exception exception ) { boolean hasErrors = !resource.getErrors ().isEmpty (); if ( hasErrors || !resource.getWarnings ().isEmpty () ) { BasicDiagnostic basicDiagnostic = new BasicDiagnostic ( hasErrors ? Diagnostic.ERROR : Diagnostic.WARNING, "org.eclipse.scada.configuration.memory.editor", 0, getString ( "_UI_CreateModelError_message", resource.getURI () ), new Object[] { exception == null ? (Object)resource : exception } ); basicDiagnostic.merge ( EcoreUtil.computeDiagnostic ( resource, true ) ); return basicDiagnostic; } else if ( exception != null ) { return new BasicDiagnostic ( Diagnostic.ERROR, "org.eclipse.scada.configuration.memory.editor", 0, getString ( "_UI_CreateModelError_message", resource.getURI () ), new Object[] { exception } ); } else { return Diagnostic.OK_INSTANCE; } }
Example 11
Source File: ExtensionsEditor.java From ifml-editor with MIT License | 6 votes |
/** * Returns a diagnostic describing the errors and warnings listed in the resource * and the specified exception (if any). * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) { if (!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty()) { BasicDiagnostic basicDiagnostic = new BasicDiagnostic (Diagnostic.ERROR, "IFMLEditor.editor", 0, getString("_UI_CreateModelError_message", resource.getURI()), new Object [] { exception == null ? (Object)resource : exception }); basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true)); return basicDiagnostic; } else if (exception != null) { return new BasicDiagnostic (Diagnostic.ERROR, "IFMLEditor.editor", 0, getString("_UI_CreateModelError_message", resource.getURI()), new Object[] { exception }); } else { return Diagnostic.OK_INSTANCE; } }
Example 12
Source File: OsgiEditor.java From neoscada with Eclipse Public License 1.0 | 6 votes |
/** * Returns a diagnostic describing the errors and warnings listed in the resource * and the specified exception (if any). * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Diagnostic analyzeResourceProblems ( Resource resource, Exception exception ) { boolean hasErrors = !resource.getErrors ().isEmpty (); if ( hasErrors || !resource.getWarnings ().isEmpty () ) { BasicDiagnostic basicDiagnostic = new BasicDiagnostic ( hasErrors ? Diagnostic.ERROR : Diagnostic.WARNING, "org.eclipse.scada.configuration.world.editor", //$NON-NLS-1$ 0, getString ( "_UI_CreateModelError_message", resource.getURI () ), //$NON-NLS-1$ new Object[] { exception == null ? (Object)resource : exception } ); basicDiagnostic.merge ( EcoreUtil.computeDiagnostic ( resource, true ) ); return basicDiagnostic; } else if ( exception != null ) { return new BasicDiagnostic ( Diagnostic.ERROR, "org.eclipse.scada.configuration.world.editor", //$NON-NLS-1$ 0, getString ( "_UI_CreateModelError_message", resource.getURI () ), //$NON-NLS-1$ new Object[] { exception } ); } else { return Diagnostic.OK_INSTANCE; } }
Example 13
Source File: ProfileEditor.java From neoscada with Eclipse Public License 1.0 | 6 votes |
/** * Returns a diagnostic describing the errors and warnings listed in the resource * and the specified exception (if any). * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Diagnostic analyzeResourceProblems ( Resource resource, Exception exception ) { boolean hasErrors = !resource.getErrors ().isEmpty (); if ( hasErrors || !resource.getWarnings ().isEmpty () ) { BasicDiagnostic basicDiagnostic = new BasicDiagnostic ( hasErrors ? Diagnostic.ERROR : Diagnostic.WARNING, "org.eclipse.scada.configuration.world.editor", //$NON-NLS-1$ 0, getString ( "_UI_CreateModelError_message", resource.getURI () ), //$NON-NLS-1$ new Object[] { exception == null ? (Object)resource : exception } ); basicDiagnostic.merge ( EcoreUtil.computeDiagnostic ( resource, true ) ); return basicDiagnostic; } else if ( exception != null ) { return new BasicDiagnostic ( Diagnostic.ERROR, "org.eclipse.scada.configuration.world.editor", //$NON-NLS-1$ 0, getString ( "_UI_CreateModelError_message", resource.getURI () ), //$NON-NLS-1$ new Object[] { exception } ); } else { return Diagnostic.OK_INSTANCE; } }
Example 14
Source File: EipEditor.java From eip-designer with Apache License 2.0 | 6 votes |
/** * Returns a diagnostic describing the errors and warnings listed in the resource * and the specified exception (if any). * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) { if (!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty()) { BasicDiagnostic basicDiagnostic = new BasicDiagnostic (Diagnostic.ERROR, "com.github.lbroudoux.dsl.eip.editor", 0, getString("_UI_CreateModelError_message", resource.getURI()), new Object [] { exception == null ? (Object)resource : exception }); basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true)); return basicDiagnostic; } else if (exception != null) { return new BasicDiagnostic (Diagnostic.ERROR, "com.github.lbroudoux.dsl.eip.editor", 0, getString("_UI_CreateModelError_message", resource.getURI()), new Object[] { exception }); } else { return Diagnostic.OK_INSTANCE; } }
Example 15
Source File: DeploymentEditor.java From neoscada with Eclipse Public License 1.0 | 6 votes |
/** * Returns a diagnostic describing the errors and warnings listed in the resource * and the specified exception (if any). * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Diagnostic analyzeResourceProblems ( Resource resource, Exception exception ) { boolean hasErrors = !resource.getErrors ().isEmpty (); if ( hasErrors || !resource.getWarnings ().isEmpty () ) { BasicDiagnostic basicDiagnostic = new BasicDiagnostic ( hasErrors ? Diagnostic.ERROR : Diagnostic.WARNING, "org.eclipse.scada.configuration.world.editor", //$NON-NLS-1$ 0, getString ( "_UI_CreateModelError_message", resource.getURI () ), //$NON-NLS-1$ new Object[] { exception == null ? (Object)resource : exception } ); basicDiagnostic.merge ( EcoreUtil.computeDiagnostic ( resource, true ) ); return basicDiagnostic; } else if ( exception != null ) { return new BasicDiagnostic ( Diagnostic.ERROR, "org.eclipse.scada.configuration.world.editor", //$NON-NLS-1$ 0, getString ( "_UI_CreateModelError_message", resource.getURI () ), //$NON-NLS-1$ new Object[] { exception } ); } else { return Diagnostic.OK_INSTANCE; } }
Example 16
Source File: VisualInterfaceEditor.java From neoscada with Eclipse Public License 1.0 | 6 votes |
/** * Returns a diagnostic describing the errors and warnings listed in the resource * and the specified exception (if any). * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Diagnostic analyzeResourceProblems ( Resource resource, Exception exception ) { boolean hasErrors = !resource.getErrors ().isEmpty (); if ( hasErrors || !resource.getWarnings ().isEmpty () ) { BasicDiagnostic basicDiagnostic = new BasicDiagnostic ( hasErrors ? Diagnostic.ERROR : Diagnostic.WARNING, "org.eclipse.scada.vi.model.editor", //$NON-NLS-1$ 0, getString ( "_UI_CreateModelError_message", resource.getURI () ), //$NON-NLS-1$ new Object[] { exception == null ? (Object)resource : exception } ); basicDiagnostic.merge ( EcoreUtil.computeDiagnostic ( resource, true ) ); return basicDiagnostic; } else if ( exception != null ) { return new BasicDiagnostic ( Diagnostic.ERROR, "org.eclipse.scada.vi.model.editor", //$NON-NLS-1$ 0, getString ( "_UI_CreateModelError_message", resource.getURI () ), //$NON-NLS-1$ new Object[] { exception } ); } else { return Diagnostic.OK_INSTANCE; } }
Example 17
Source File: DetailViewEditor.java From neoscada with Eclipse Public License 1.0 | 6 votes |
/** * Returns a diagnostic describing the errors and warnings listed in the resource * and the specified exception (if any). * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Diagnostic analyzeResourceProblems ( Resource resource, Exception exception ) { if ( !resource.getErrors ().isEmpty () || !resource.getWarnings ().isEmpty () ) { BasicDiagnostic basicDiagnostic = new BasicDiagnostic ( Diagnostic.ERROR, "org.eclipse.scada.vi.details.model.editor", //$NON-NLS-1$ 0, getString ( "_UI_CreateModelError_message", resource.getURI () ), //$NON-NLS-1$ new Object[] { exception == null ? (Object)resource : exception } ); basicDiagnostic.merge ( EcoreUtil.computeDiagnostic ( resource, true ) ); return basicDiagnostic; } else if ( exception != null ) { return new BasicDiagnostic ( Diagnostic.ERROR, "org.eclipse.scada.vi.details.model.editor", //$NON-NLS-1$ 0, getString ( "_UI_CreateModelError_message", resource.getURI () ), //$NON-NLS-1$ new Object[] { exception } ); } else { return Diagnostic.OK_INSTANCE; } }
Example 18
Source File: ProtocolEditor.java From neoscada with Eclipse Public License 1.0 | 6 votes |
/** * Returns a diagnostic describing the errors and warnings listed in the resource * and the specified exception (if any). * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Diagnostic analyzeResourceProblems ( Resource resource, Exception exception ) { if ( !resource.getErrors ().isEmpty () || !resource.getWarnings ().isEmpty () ) { BasicDiagnostic basicDiagnostic = new BasicDiagnostic ( Diagnostic.ERROR, "org.eclipse.scada.protocol.ngp.model.editor", //$NON-NLS-1$ 0, getString ( "_UI_CreateModelError_message", resource.getURI () ), //$NON-NLS-1$ new Object[] { exception == null ? (Object)resource : exception } ); basicDiagnostic.merge ( EcoreUtil.computeDiagnostic ( resource, true ) ); return basicDiagnostic; } else if ( exception != null ) { return new BasicDiagnostic ( Diagnostic.ERROR, "org.eclipse.scada.protocol.ngp.model.editor", //$NON-NLS-1$ 0, getString ( "_UI_CreateModelError_message", resource.getURI () ), //$NON-NLS-1$ new Object[] { exception } ); } else { return Diagnostic.OK_INSTANCE; } }
Example 19
Source File: CrossflowEditor.java From scava with Eclipse Public License 2.0 | 5 votes |
/** * Returns a diagnostic describing the errors and warnings listed in the resource * and the specified exception (if any). * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) { boolean hasErrors = !resource.getErrors().isEmpty(); if (hasErrors || !resource.getWarnings().isEmpty()) { BasicDiagnostic basicDiagnostic = new BasicDiagnostic (hasErrors ? Diagnostic.ERROR : Diagnostic.WARNING, "org.eclipse.scava.crossflow.language.editor", 0, getString("_UI_CreateModelError_message", resource.getURI()), new Object [] { exception == null ? (Object)resource : exception }); basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true)); return basicDiagnostic; } else if (exception != null) { return new BasicDiagnostic (Diagnostic.ERROR, "org.eclipse.scava.crossflow.language.editor", 0, getString("_UI_CreateModelError_message", resource.getURI()), new Object[] { exception }); } else { return Diagnostic.OK_INSTANCE; } }
Example 20
Source File: BeansEditor.java From hybris-commerce-eclipse-plugin with Apache License 2.0 | 5 votes |
/** * Returns a diagnostic describing the errors and warnings listed in the resource * and the specified exception (if any). * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) { boolean hasErrors = !resource.getErrors().isEmpty(); if (hasErrors || !resource.getWarnings().isEmpty()) { BasicDiagnostic basicDiagnostic = new BasicDiagnostic (hasErrors ? Diagnostic.ERROR : Diagnostic.WARNING, "com.hybris.hyeclipse.emf.beans.editor", 0, getString("_UI_CreateModelError_message", resource.getURI()), new Object [] { exception == null ? (Object)resource : exception }); basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true)); return basicDiagnostic; } else if (exception != null) { return new BasicDiagnostic (Diagnostic.ERROR, "com.hybris.hyeclipse.emf.beans.editor", 0, getString("_UI_CreateModelError_message", resource.getURI()), new Object[] { exception }); } else { return Diagnostic.OK_INSTANCE; } }