private void processFileSymbol(InputFile inputFile, SensorContext context) { File ioFile = inputFile.file(); File symbolFile = new File(ioFile.getParentFile(), ioFile.getName() + SYMBOL_EXTENSION); if (symbolFile.exists()) { LOG.debug("Processing " + symbolFile.getAbsolutePath()); try { List<String> lines = FileUtils.readLines(symbolFile, context.fileSystem().encoding().name()); int lineNumber = 0; NewSymbolTable symbolTable = context.newSymbolTable() .onFile(inputFile); for (String line : lines) { lineNumber++; if (StringUtils.isBlank(line) || line.startsWith("#")) { continue; } processLine(symbolFile, lineNumber, symbolTable, line); } symbolTable.save(); } catch (IOException e) { throw new IllegalStateException(e); } } }
private void processFileSymbol(InputFile inputFile, SensorContext context) { File ioFile = inputFile.file(); File symbolFile = new File(ioFile.getParentFile(), ioFile.getName() + SYMBOL_EXTENSION); if (symbolFile.exists()) { LOG.debug("Processing " + symbolFile.getAbsolutePath()); try { List<String> lines = FileUtils.readLines(symbolFile, context.fileSystem().encoding().name()); int lineNumber = 0; NewSymbolTable symbolTable = context.newSymbolTable() .onFile(inputFile); for (String line : lines) { lineNumber++; if (StringUtils.isBlank(line) || line.startsWith("#")) { continue; } processLine(symbolFile, lineNumber, symbolTable, line); } symbolTable.save(); } catch (IOException e) { throw new IllegalStateException(e); } } }
private void processFileSymbol(InputFile inputFile, SensorContext context) { File ioFile = inputFile.file(); File symbolFile = new File(ioFile.getParentFile(), ioFile.getName() + SYMBOL_EXTENSION); if (symbolFile.exists()) { LOG.debug("Processing " + symbolFile.getAbsolutePath()); try { List<String> lines = FileUtils.readLines(symbolFile, context.fileSystem().encoding().name()); int lineNumber = 0; Symbolizable symbolizable = perspectives.as(Symbolizable.class, inputFile); if (symbolizable != null) { Symbolizable.SymbolTableBuilder symbolTableBuilder = symbolizable.newSymbolTableBuilder(); for (String line : lines) { lineNumber++; if (StringUtils.isBlank(line) || line.startsWith("#")) { continue; } processLine(symbolFile, lineNumber, symbolTableBuilder, line); } symbolizable.setSymbolTable(symbolTableBuilder.build()); } } catch (IOException e) { throw new IllegalStateException(e); } } }