Package org.eclipse.emf.compare.ide.ui.internal.logical.resolver

## Class DiagnosticSupport

- java.lang.Object
- - org.eclipse.emf.compare.ide.ui.internal.logical.resolver.DiagnosticSupport

    public class DiagnosticSupport
    extends Object

Encapsulated a diagnostic to hide multi-threaded details.

### Constructor Summary

Constructors
`DiagnosticSupport()` Constructor, will instantiate a default diagnostic.
`DiagnosticSupport​(BasicDiagnostic diagnostic)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`protected BasicDiagnostic` `createDiagnostic()` Creates the BasicDiagnostic that will be used by this computation.
`BasicDiagnostic` `getDiagnostic()`
`void` `merge​(Diagnostic resourceDiagnostic)` Thread safely merge the given diagnostic to the `diagnostic` field.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DiagnosticSupport

    public DiagnosticSupport​(BasicDiagnostic diagnostic)

Constructor.

Parameters:
  `diagnostic` - The diagnostic to wrap, must not be `null`.

#### DiagnosticSupport

    public DiagnosticSupport()

Constructor, will instantiate a default diagnostic.

### Method Detail

#### getDiagnostic

    public BasicDiagnostic getDiagnostic()

#### createDiagnostic

    protected BasicDiagnostic createDiagnostic()

Creates the BasicDiagnostic that will be used by this computation. Can be overridden if necessary.

Returns:
  A new empty BasicDiagnostic.

#### merge

    public void merge​(Diagnostic resourceDiagnostic)

Thread safely merge the given diagnostic to the `diagnostic` field.

Parameters:
  `resourceDiagnostic` - the diagnostic to be added to the global diagnostic.