/** * Initializes a trace color repository from a given file. * * @param fileName * The name of the file to read from * @param projectContext * The project context to use. * @return The initialized trace color repository * * @throws IOException * If an I/O error occurs */ public static TraceColorRepository createFromFile(final String fileName, final IProjectContext projectContext) throws IOException { final Configuration configuration = new Configuration(); configuration.setProperty(CONFIG_PROPERTY_NAME_TRACE_COLOR_FILE_NAME, fileName); return new TraceColorRepository(configuration, TraceColorRepository.readDataFromFile(fileName), projectContext); }
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); }