use of net.praqma.jenkins.memorymap.graph.MemoryMapGraphConfiguration in project memory-map-plugin by Praqma.
the class MemoryMapParserDslContext method graph.
public void graph(Runnable closure) {
MemoryMapGraphDslContext context = new MemoryMapGraphDslContext();
executeInContext(closure, context);
graphConfigurations.add(new MemoryMapGraphConfiguration(context.graphData, context.graphCaption));
}
use of net.praqma.jenkins.memorymap.graph.MemoryMapGraphConfiguration in project memory-map-plugin by Praqma.
the class MemoryMapParserDelegateTest method findFilePatternWorks_test.
@Test
public void findFilePatternWorks_test() throws IOException {
MemoryMapMapParserDelegate delegate = new MemoryMapMapParserDelegate();
MemoryMapGraphConfiguration gc = new MemoryMapGraphConfiguration(null, null);
gc.setGraphDataList("CODE,DATA,CONST");
gc.setGraphCaption("Config Memory Graph");
List<MemoryMapGraphConfiguration> graphConfig = Collections.singletonList(gc);
AbstractMemoryMapParser parser = new TexasInstrumentsMemoryMapParser("TI", "TexasInstrumentsMapFile.txt", "28069_RAM_lnk.cmd", 16, graphConfig, Boolean.TRUE);
List<AbstractMemoryMapParser> parsers = Collections.singletonList(parser);
delegate.setParsers(parsers);
assertNotNull(delegate.getParsers());
assertNotNull(parser.getMapFile());
File test = new File(file.getAbsolutePath().substring(0, file.getAbsolutePath().lastIndexOf(File.separator)));
assertTrue(test.isDirectory());
try {
delegate.findFile(test, "*.map");
} catch (Exception ex) {
fail("Parser did not find the file" + ex);
}
}
use of net.praqma.jenkins.memorymap.graph.MemoryMapGraphConfiguration in project memory-map-plugin by Praqma.
the class MemoryMapProjectAction method getAssociatedMemoryAreas.
public String getAssociatedMemoryAreas(String graphTitle, String id) {
String result = null;
List<AbstractMemoryMapParser> parsers = parsersChosen();
for (AbstractMemoryMapParser parser : parsers) {
if (parser.getParserUniqueName().equals(id)) {
for (MemoryMapGraphConfiguration conf : parser.getGraphConfiguration()) {
if (conf.getGraphCaption().equals(graphTitle)) {
result = conf.getGraphDataList();
}
}
}
}
return result;
}
use of net.praqma.jenkins.memorymap.graph.MemoryMapGraphConfiguration in project memory-map-plugin by Praqma.
the class MemoryMapProjectAction method getGraphTitles.
public List<String> getGraphTitles() {
ArrayList<String> titles = new ArrayList<>();
List<AbstractMemoryMapParser> parsers = parsersChosen();
for (AbstractMemoryMapParser parser : parsers) {
List<MemoryMapGraphConfiguration> graphConfigurations = parser.getGraphConfiguration();
for (MemoryMapGraphConfiguration gc : graphConfigurations) {
titles.add(gc.getGraphCaption());
}
}
return titles;
}
use of net.praqma.jenkins.memorymap.graph.MemoryMapGraphConfiguration in project memory-map-plugin by Praqma.
the class MemoryMapProjectAction method getGraphTitles.
public List<String> getGraphTitles(String parserId) {
List<String> graphTitles = new ArrayList<>();
List<AbstractMemoryMapParser> parsers = parsersChosen();
for (AbstractMemoryMapParser parser : parsers) {
if (parser.getParserUniqueName().equals(parserId)) {
for (MemoryMapGraphConfiguration conf : parser.getGraphConfiguration()) {
graphTitles.add(conf.getGraphCaption());
}
}
}
return graphTitles;
}
Aggregations