From 35a241ef447231b6b43aed4a5f3c5e883161aeed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20L=C3=BCpges?= Date: Mon, 16 Sep 2024 19:24:43 +0200 Subject: [PATCH] Migrate to new generated PrettyPrinters for printType --- src/main/java/de/monticore/od2cd/CompositionPrinter.java | 3 --- src/main/java/de/monticore/od2cd/OD2CDObjectVisitor.java | 4 +--- .../monticore/odbasis/_cocos/object/ValidObjectTypeCoco.java | 5 +---- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/main/java/de/monticore/od2cd/CompositionPrinter.java b/src/main/java/de/monticore/od2cd/CompositionPrinter.java index 4f75d0a1..3855998b 100644 --- a/src/main/java/de/monticore/od2cd/CompositionPrinter.java +++ b/src/main/java/de/monticore/od2cd/CompositionPrinter.java @@ -4,10 +4,7 @@ import de.monticore.od4development.OD4DevelopmentMill; import de.monticore.od4development._symboltable.IOD4DevelopmentArtifactScope; import de.monticore.od4development._symboltable.IOD4DevelopmentGlobalScope; -import de.monticore.od4development._symboltable.IOD4DevelopmentScope; -import de.monticore.prettyprint.IndentPrinter; import de.monticore.types.mcbasictypes._ast.ASTMCType; -import de.monticore.types.prettyprint.MCArrayTypesFullPrettyPrinter; import java.util.List; diff --git a/src/main/java/de/monticore/od2cd/OD2CDObjectVisitor.java b/src/main/java/de/monticore/od2cd/OD2CDObjectVisitor.java index 78d645e0..fc3bcd62 100644 --- a/src/main/java/de/monticore/od2cd/OD2CDObjectVisitor.java +++ b/src/main/java/de/monticore/od2cd/OD2CDObjectVisitor.java @@ -20,8 +20,6 @@ import de.monticore.symbols.basicsymbols._symboltable.TypeSymbol; import de.monticore.symbols.oosymbols._symboltable.FieldSymbol; import de.monticore.types.mcbasictypes._ast.ASTMCImportStatement; -import de.monticore.types.prettyprint.MCArrayTypesFullPrettyPrinter; -import de.monticore.types.prettyprint.MCBasicTypesFullPrettyPrinter; import java.util.*; import java.util.stream.Collectors; @@ -146,7 +144,7 @@ public void createChecker(ASTODNamedObject odElement) { .stream() .map(a -> new OD4DataFullPrettyPrinter(new IndentPrinter()).prettyprint(a.getODValue())) .collect(Collectors.toList()), - odElement.getMCObjectType().printType(new MCBasicTypesFullPrettyPrinter(new IndentPrinter()))); + odElement.getMCObjectType().printType()); } public void handleLinks(ASTODLink odLink) { diff --git a/src/main/java/de/monticore/odbasis/_cocos/object/ValidObjectTypeCoco.java b/src/main/java/de/monticore/odbasis/_cocos/object/ValidObjectTypeCoco.java index fd651b12..2f09aa0a 100644 --- a/src/main/java/de/monticore/odbasis/_cocos/object/ValidObjectTypeCoco.java +++ b/src/main/java/de/monticore/odbasis/_cocos/object/ValidObjectTypeCoco.java @@ -8,11 +8,9 @@ import de.monticore.odbasis._cocos.ODBasisASTODObjectCoCo; import de.monticore.odbasis._cocos.ODBasisCoCoChecker; import de.monticore.odbasis.utils.FullQualifiedNameCalculator; -import de.monticore.prettyprint.IndentPrinter; import de.monticore.symbols.basicsymbols._symboltable.TypeSymbol; import de.monticore.types.mcbasictypes._ast.ASTMCImportStatement; import de.monticore.types.mcbasictypes._ast.ASTMCPackageDeclaration; -import de.monticore.types.prettyprint.MCBasicTypesFullPrettyPrinter; import de.se_rwth.commons.logging.Log; import java.util.HashSet; @@ -41,8 +39,7 @@ public void check(ASTODArtifact node) { ODBasisASTODObjectCoCo odBasisASTODObjectCoCo = new ODBasisASTODObjectCoCo() { @Override public void check(ASTODObject node) { - this.resolveOOTypeSymbol(node, node.getMCObjectType() - .printType(new MCBasicTypesFullPrettyPrinter(new IndentPrinter()))); + this.resolveOOTypeSymbol(node, node.getMCObjectType().printType()); } private void resolveOOTypeSymbol(ASTODObject node, String typeName) {