code: Diagnostic createDiagnostic( Instance instance ) {
  
  		Diagnostic result = new Diagnostic( InstanceHelpers.computeInstancePath( instance ));
  		for( Map.Entry<String,Boolean> entry : ComponentHelpers.findComponentDependenciesFor( instance.getComponent()).entrySet()) {
  
  			String facetOrComponentName = entry.getKey();
  			Collection<Import> imports = instance.getImports().get( facetOrComponentName );
  			boolean resolved = imports != null && ! imports.isEmpty();
  			boolean optional = entry.getValue();
  
  			result.getDependenciesInformation().add( new DependencyInformation( facetOrComponentName, optional, resolved ));
  		}
  
  		return result;
  	}
docs: Creates a diagnostic for an instance.
  @param instance a non-null instance
  @return a non-null diagnostic