From 28126cd08bfa972d019eb1754a479bcb521bb42a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Bispo?= Date: Thu, 2 Jan 2025 15:36:39 +0000 Subject: [PATCH] [WeaverGenerator] Changes new line to "\n", how it is called is now uniform (Utils.ln()) --- .../generator/java/helpers/GeneratorHelper.java | 16 +++++++++------- .../generator/java/utils/ConvertUtils.java | 8 +++++--- .../generator/java/utils/GeneratorUtils.java | 4 ++-- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/WeaverGenerator/src/org/lara/interpreter/weaver/generator/generator/java/helpers/GeneratorHelper.java b/WeaverGenerator/src/org/lara/interpreter/weaver/generator/generator/java/helpers/GeneratorHelper.java index b2b776a7a..af6f4af41 100644 --- a/WeaverGenerator/src/org/lara/interpreter/weaver/generator/generator/java/helpers/GeneratorHelper.java +++ b/WeaverGenerator/src/org/lara/interpreter/weaver/generator/generator/java/helpers/GeneratorHelper.java @@ -1,11 +1,11 @@ /** * Copyright 2015 SPeCS. - * + *

* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + *

* http://www.apache.org/licenses/LICENSE-2.0 - * + *

* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. under the License. @@ -14,9 +14,9 @@ package org.lara.interpreter.weaver.generator.generator.java.helpers; import org.lara.interpreter.weaver.generator.generator.java.JavaAbstractsGenerator; +import org.lara.interpreter.weaver.generator.generator.java.utils.ConvertUtils; import org.specs.generators.java.classtypes.JavaClass; - -import pt.up.fe.specs.util.SpecsIo; +import org.specs.generators.java.utils.Utils; public abstract class GeneratorHelper { @@ -28,7 +28,7 @@ protected GeneratorHelper(JavaAbstractsGenerator javaGenerator) { /** * Generate the base Join Point abstract class, containing the global attributes and actions - * + * * @param javaGenerator * @param sanitizedOutPackage * @param enums @@ -37,6 +37,8 @@ protected GeneratorHelper(JavaAbstractsGenerator javaGenerator) { public abstract JavaClass generate(); protected static String ln() { - return SpecsIo.getNewline(); + return Utils.ln(); + //return "\n"; + //return SpecsIo.getNewline(); } } diff --git a/WeaverGenerator/src/org/lara/interpreter/weaver/generator/generator/java/utils/ConvertUtils.java b/WeaverGenerator/src/org/lara/interpreter/weaver/generator/generator/java/utils/ConvertUtils.java index 217d33d6f..58186d2de 100644 --- a/WeaverGenerator/src/org/lara/interpreter/weaver/generator/generator/java/utils/ConvertUtils.java +++ b/WeaverGenerator/src/org/lara/interpreter/weaver/generator/generator/java/utils/ConvertUtils.java @@ -20,7 +20,7 @@ import org.specs.generators.java.types.JavaType; import org.specs.generators.java.types.JavaTypeFactory; import org.specs.generators.java.types.Primitive; -import pt.up.fe.specs.util.SpecsIo; +import org.specs.generators.java.utils.Utils; import tdrc.utils.Pair; import tdrc.utils.StringUtils; @@ -205,7 +205,9 @@ private static StringBuilder reportAvailableTypes(LanguageSpecification langSpec return message; } - private static String ln() { - return SpecsIo.getNewline(); + public static String ln() { + return Utils.ln(); + //return "\n"; + //return SpecsIo.getNewline(); } } diff --git a/WeaverGenerator/src/org/lara/interpreter/weaver/generator/generator/java/utils/GeneratorUtils.java b/WeaverGenerator/src/org/lara/interpreter/weaver/generator/generator/java/utils/GeneratorUtils.java index 8fec889dc..44d880d66 100644 --- a/WeaverGenerator/src/org/lara/interpreter/weaver/generator/generator/java/utils/GeneratorUtils.java +++ b/WeaverGenerator/src/org/lara/interpreter/weaver/generator/generator/java/utils/GeneratorUtils.java @@ -38,7 +38,6 @@ import org.specs.generators.java.types.JavaTypeFactory; import org.specs.generators.java.utils.Utils; import pt.up.fe.specs.util.SpecsCollections; -import pt.up.fe.specs.util.SpecsIo; import tdrc.utils.Pair; import tdrc.utils.StringUtils; @@ -48,7 +47,8 @@ public class GeneratorUtils { private static String ln() { - return SpecsIo.getNewline(); + return Utils.ln(); + //return SpecsIo.getNewline(); }