return new TraceColorRepositoryData(colorMap, defaultColor, collisionColor); } finally { if (reader != null) {
/** * Creates a new color repository with the given data. * * @param configuration * The configuration to use * @param colorData * The color data to use for this repository * @param projectContext * The project context to use for this repository. */ public TraceColorRepository(final Configuration configuration, final TraceColorRepositoryData colorData, final IProjectContext projectContext) { super(configuration, projectContext); this.colorMap = colorData.getColorMap(); this.defaultColor = colorData.getDefaultColor(); this.collisionColor = colorData.getCollisionColor(); }
private static TraceColorRepository prepareTraceColorRepository(final AnalysisController analysisController) { final ConcurrentMap<Long, Color> colorMap = new ConcurrentHashMap<Long, Color>(); colorMap.put(TRACE_ID_1, HIGHLIGHT_COLOR); colorMap.put(TRACE_ID_2, HIGHLIGHT_COLOR_2); final TraceColorRepositoryData repositoryData = new TraceColorRepositoryData(colorMap, DEFAULT_COLOR, COLLISION_COLOR); return new TraceColorRepository(new Configuration(), repositoryData, analysisController); }