Fix apex multifile tests

This commit is contained in:
Clément Fournier
2020-01-10 20:22:57 +01:00
parent 178fa28414
commit d6296bd85f
2 changed files with 8 additions and 1 deletions

View File

@ -4,6 +4,8 @@
package net.sourceforge.pmd.lang.apex.ast;
import net.sourceforge.pmd.lang.LanguageVersion;
import net.sourceforge.pmd.lang.LanguageVersionHandler;
import net.sourceforge.pmd.lang.apex.ApexLanguageModule;
import net.sourceforge.pmd.lang.ast.RootNode;
import net.sourceforge.pmd.lang.ast.test.BaseParsingHelper;
@ -22,4 +24,9 @@ public class ApexParsingHelper extends BaseParsingHelper<ApexParsingHelper, Root
return new ApexParsingHelper(params);
}
@Override
protected void postProcessing(LanguageVersionHandler handler, LanguageVersion lversion, RootNode rootNode) {
super.postProcessing(handler, lversion, rootNode);
handler.getMultifileFacade().start(rootNode);
}
}

View File

@ -128,7 +128,7 @@ abstract class BaseParsingHelper<Self : BaseParsingHelper<Self, T>, T : RootNode
/**
* Called only if [Params.doProcess] is true.
*/
protected open fun postProcessing(handler: LanguageVersionHandler, lversion: LanguageVersion, rootNode: T?) {
protected open fun postProcessing(handler: LanguageVersionHandler, lversion: LanguageVersion, rootNode: T) {
val astAnalysisContext = object : AstAnalysisContext {
override fun getTypeResolutionClassLoader(): ClassLoader = javaClass.classLoader