/** * Creates a new description repository using the given configuration. * * @param configuration * The configuration to use * @param projectContext * The project context for this plugin. * * @throws IOException * If an I/O error occurs during initialization */ public TraceColorRepository(final Configuration configuration, final IProjectContext projectContext) throws IOException { this(configuration, TraceColorRepository.readDataFromFile(configuration.getStringProperty(CONFIG_PROPERTY_NAME_TRACE_COLOR_FILE_NAME)), projectContext); }
/** * 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); }