Skip to content

Commit

Permalink
Migrate to new generated PrettyPrinters for printType
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterErwin committed Sep 16, 2024
1 parent c7f8aa2 commit 35a241e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
3 changes: 0 additions & 3 deletions src/main/java/de/monticore/od2cd/CompositionPrinter.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 1 addition & 3 deletions src/main/java/de/monticore/od2cd/OD2CDObjectVisitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 35a241e

Please sign in to comment.