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
Constructor
Description
`DiagnosticSupport()`
Constructor, will instantiate a default diagnostic.
`DiagnosticSupport(BasicDiagnostic diagnostic)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`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 Details

### 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 Details

### 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.