Closed eyip002 closed 2 years ago
Command line option is added to the EMF resource so that it can be accessed by the layout generator.
@eyip002 Just a suggestion for passing the command line option from to Layout generator, another option is to making use of: GeneratorContext
if you have problem with the current approach.
class BahnGeneratorContext extends GeneratorContext {
private String route;
// getter, setter
}
BahnGenerator
, can cast the IGeneratorContext context
parameter to BahnGeneratorContext
and use the route option directly without changing the EMF resource.@trinnguyen thanks for the hint! I current approach with the EMF resource works now, but your suggestion looks better. I will try and implement it.
Minor fix to support Eclipse. Eclipse RCP creates its own context using GeneratorContext
, so a check is needed to see if IGeneratorContext context
is of an instance of BahnGeneratorContext
.
For large railway layouts, the generation of all possible routes between pairs of signals takes too much memory and time. Add a command line option to generate
simple
routes between a source signal and an immediate destination signal, orextended
routes between any two signals (with possibly zero or more intermediate signals).-r <route> route generation mode (simple, extended)