Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into dev
  • Loading branch information
N-Jansen committed Oct 9, 2024
2 parents 9b223a7 + 1898898 commit afee1da
Show file tree
Hide file tree
Showing 11 changed files with 1,278 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
import de.monticore.generating.templateengine.TemplateHookPoint;
import de.monticore.generating.templateengine.freemarker.FreeMarkerTemplateEngine;
import de.monticore.generating.templateengine.freemarker.MontiCoreTemplateLoader;
import de.monticore.generating.templateengine.reporting.Reporting;
import de.monticore.generating.templateengine.reporting.ReportingFix;
import de.monticore.grammar.MCGrammarSymbolTableHelper;
import de.monticore.grammar.cocos.GrammarCoCos;
import de.monticore.grammar.grammar._ast.ASTMCGrammar;
Expand Down Expand Up @@ -378,9 +378,9 @@ public ASTMCGrammar createSymbolsFromAST(IGrammar_WithConceptsGlobalScope global
MCGrammarSymbol symbol = result.getSymbol();
for(MCGrammarSymbol it: MCGrammarSymbolTableHelper.getAllSuperGrammars(symbol)) {
if(!it.getFullName().equals(symbol.getFullName())) {
Reporting.reportOpenInputFile(Optional.empty(),
ReportingFix.reportOpenInputFile(Optional.empty(),
Paths.get(it.getFullName().replaceAll("\\.", "/").concat(".mc4")));
Reporting.reportOpenInputFile(Optional.empty(),
ReportingFix.reportOpenInputFile(Optional.empty(),
Paths.get(it.getFullName().replaceAll("\\.", "/").concat(".cd")));

}
Expand Down Expand Up @@ -1400,7 +1400,7 @@ public GlobalExtensionManagement initGlex(MontiCoreConfiguration mcConfig) {
// initialize glex
GlobalExtensionManagement glex = new GlobalExtensionManagement();
glex.addAfterTemplate("cd2java.Imports", new TemplateHookPoint("mc.Imports"));
if(Reporting.isInitialized()) {
if(ReportingFix.isInitialized()) {
if(mcConfig.getConfigTemplate().isPresent()) {
String configTemplate = mcConfig.getConfigTemplate().get();
if (configTemplate.endsWith(".ftl")) { // remove file ending
Expand Down Expand Up @@ -1440,14 +1440,13 @@ public static class Runner extends GroovyRunnerBase {
"de.monticore.io.paths",
"de.monticore.languages.grammar",
"de.se_rwth.commons.logging",
"de.monticore.generating.templateengine.reporting",
"de.monticore.generating.templateengine.reporting.fix", // TODO: Remove .fix after 7.7.0 release
"de.se_rwth.commons",
"de.monticore.generating.templateengine.reporting.reporter",
"de.monticore.incremental"};

public static final String[] DEFAULT_STATIC_IMPORTS = {
"de.se_rwth.commons.logging.Log",
"de.monticore.generating.templateengine.reporting.Reporting",
"de.monticore.generating.templateengine.reporting.fix.Reporting", // TODO: Remove .fix after 7.7.0 release
"de.se_rwth.commons.Names"};


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import de.monticore.MontiCoreScript;
import de.monticore.StatisticsHandlerFix;
import de.monticore.cli.updateChecker.UpdateCheckerRunnable;
import de.monticore.generating.templateengine.reporting.Reporting;
import de.monticore.generating.templateengine.reporting.ReportingFix;
import de.monticore.grammar.grammar_withconcepts.Grammar_WithConceptsMill;
import de.se_rwth.commons.logging.Log;
import de.se_rwth.commons.logging.Slf4jLog;
Expand Down Expand Up @@ -175,7 +175,7 @@ else if (cmd.hasOption("d")) {
// Case 3: Use custom log file logging if configured and present
else if (cmd.hasOption("cl")) {
File userLogFile = new File(cmd.getOptionValue("cl", StringUtils.EMPTY));
Reporting.reportFileExistenceChecking(Lists.newArrayList(),
ReportingFix.reportFileExistenceChecking(Lists.newArrayList(),
userLogFile.toPath().toAbsolutePath());

if (userLogFile.exists() && userLogFile.isFile()) {
Expand Down Expand Up @@ -249,7 +249,7 @@ protected String loadScript(CommandLine cmd) {
// available and load its content
if (cmd.hasOption(SCRIPT)) {
File f = new File(cmd.getOptionValue(SCRIPT, StringUtils.EMPTY));
Reporting.reportFileExistenceChecking(Lists.newArrayList(),
ReportingFix.reportFileExistenceChecking(Lists.newArrayList(),
f.toPath().toAbsolutePath());

if (f.exists() && f.isFile()) {
Expand Down
Loading

0 comments on commit afee1da

Please sign in to comment.