Package jetbrains.mps.persistence
Class ModelNameCalculator
- java.lang.Object
 - 
- jetbrains.mps.persistence.ModelNameCalculator
 
 
- 
public final class ModelNameCalculator extends Object
In the case when we have some models on the disk (under a source root) and try to collect them by traversing a file system tree we need to be able to construct model name from the path to the model file. Created by apyshkin on 12/20/16. 
- 
- 
Constructor Summary
Constructors Constructor Description ModelNameCalculator(ModelRoot modelRoot, SourceRoot sourceRoot, IFile modelFile) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcalcModelFqName()For example sometimes the path to the model file is 'models/org/my/package/a.mps' with 'models' as a source root. 
 - 
 
- 
- 
Method Detail
- 
calcModelFqName
@NotNull public String calcModelFqName()
For example sometimes the path to the model file is 'models/org/my/package/a.mps' with 'models' as a source root. Then the model fq name is 'org.my.package.a'. Sometimes the path (per-root) is 'models/org.my.package.a/.model' with 'models' as a source root In this case the model fq name is 'org.my.package.a' as well. 
 - 
 
 -