diff --git a/.gitignore b/.gitignore index 6ca923f..385cbde 100644 --- a/.gitignore +++ b/.gitignore @@ -89,4 +89,8 @@ gradle-app.setting # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* # Binary -/bin \ No newline at end of file +/bin + +.java-version +*.bak + diff --git a/build.gradle b/build.gradle index 4492982..b369ab8 100644 --- a/build.gradle +++ b/build.gradle @@ -99,5 +99,6 @@ nativeImage { add '--initialize-at-run-time=org.codehaus.groovy.control.XStreamUtils,groovy.grape.GrapeIvy' add '--report-unsupported-elements-at-runtime' add '--allow-incomplete-classpath' + add '-H:IncludeResources=org.eclipse.jdt.internal.compiler.*' } } diff --git a/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/AnalysisCLI.java b/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/AnalysisCLI.java index f2fbcb2..a735f59 100644 --- a/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/AnalysisCLI.java +++ b/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/AnalysisCLI.java @@ -8,6 +8,7 @@ import edu.kit.kastel.dsis.mosim.refactorlizar.analysiscli.commands.FeatureScatterCommand; import edu.kit.kastel.dsis.mosim.refactorlizar.analysiscli.commands.ImproperLayerCommand; import edu.kit.kastel.dsis.mosim.refactorlizar.analysiscli.commands.LanguageBlobCommand; +import edu.kit.kastel.dsis.mosim.refactorlizar.analysiscli.commands.LanguageStructureApplianceCommand; import picocli.CommandLine; import picocli.CommandLine.Command; @@ -21,7 +22,8 @@ EcoreTypeExtractionCommand.class, FeatureScatterCommand.class, ImproperLayerCommand.class, - LanguageBlobCommand.class + LanguageBlobCommand.class, + LanguageStructureApplianceCommand.class }, mixinStandardHelpOptions = true, version = "0.0.1", diff --git a/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/commands/DependencyCycleCommand.java b/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/commands/DependencyCycleCommand.java index 0aca0d5..67fecba 100644 --- a/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/commands/DependencyCycleCommand.java +++ b/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/commands/DependencyCycleCommand.java @@ -28,7 +28,7 @@ public class DependencyCycleCommand implements Runnable { String level = "component"; @Option( - names = {"-l", "--language"}, + names = {"-m", "--modular-language"}, required = true, description = "Path to the language") String language; @@ -39,6 +39,13 @@ public class DependencyCycleCommand implements Runnable { description = "Path to the simulator code") String code; + @Option( + names = {"-p", "--path-structure"}, + description = + "Is optional. If the language is part of the code use \"LinC\", if the code is part of the language use \"CinL\", if none of these apply, don't use the flag.", + defaultValue = "none") + String language_location; + @Override public void run() { switch (level) { diff --git a/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/commands/DependencyDirectionCommand.java b/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/commands/DependencyDirectionCommand.java index 05f71ed..7f22259 100644 --- a/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/commands/DependencyDirectionCommand.java +++ b/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/commands/DependencyDirectionCommand.java @@ -29,7 +29,7 @@ public class DependencyDirectionCommand implements Runnable { String level = "component"; @Option( - names = {"-m", "--language-model"}, + names = {"-m", "--modular-language"}, required = true, description = "Path to the language") String language; @@ -46,6 +46,13 @@ public class DependencyDirectionCommand implements Runnable { description = "Layer information") String layer; + @Option( + names = {"-p", "--path-structure"}, + description = + "Is optional. If the language is part of the code use \"LinC\", if the code is part of the language use \"CinL\", if none of these apply, don't use the flag.", + defaultValue = "none") + String language_location; + @Override public void run() { switch (level) { diff --git a/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/commands/EcoreTypeExtractionCommand.java b/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/commands/EcoreTypeExtractionCommand.java index de6db85..caafd61 100644 --- a/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/commands/EcoreTypeExtractionCommand.java +++ b/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/commands/EcoreTypeExtractionCommand.java @@ -37,7 +37,7 @@ public class EcoreTypeExtractionCommand implements Runnable { private final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @Option( - names = {"-l", "--language-root"}, + names = {"-m", "--modular-language"}, required = true, description = "Path to the root of a language/metamodel (*.ecore)") String rootPath; diff --git a/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/commands/FeatureScatterCommand.java b/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/commands/FeatureScatterCommand.java index 932e968..3c2cc48 100644 --- a/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/commands/FeatureScatterCommand.java +++ b/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/commands/FeatureScatterCommand.java @@ -29,7 +29,7 @@ public class FeatureScatterCommand implements Runnable { String level = "component"; @Option( - names = {"-m", "--language-model"}, + names = {"-m", "--modular-language"}, required = true, description = "Path to the language") String language; @@ -40,6 +40,13 @@ public class FeatureScatterCommand implements Runnable { description = "Path to the simulator code") String code; + @Option( + names = {"-p", "--path-structure"}, + description = + "Is optional. If the language is part of the code use \"LinC\", if the code is part of the language use \"CinL\", if none of these apply, don't use the flag.", + defaultValue = "none") + String language_location; + @Override public void run() { switch (level) { diff --git a/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/commands/ImproperLayerCommand.java b/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/commands/ImproperLayerCommand.java index 2b7686d..1586248 100644 --- a/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/commands/ImproperLayerCommand.java +++ b/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/commands/ImproperLayerCommand.java @@ -28,7 +28,7 @@ public class ImproperLayerCommand implements Runnable { String level = "component"; @Option( - names = {"-m", "--language-model"}, + names = {"-m", "--modular-language"}, required = true, description = "Path to the language") String language; @@ -39,6 +39,13 @@ public class ImproperLayerCommand implements Runnable { description = "Path to the simulator code") String code; + @Option( + names = {"-p", "--path-structure"}, + description = + "Is optional. If the language is part of the code use \"LinC\", if the code is part of the language use \"CinL\", if none of these apply, don't use the flag.", + defaultValue = "none") + String language_location; + @Override public void run() { switch (level) { diff --git a/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/commands/LanguageBlobCommand.java b/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/commands/LanguageBlobCommand.java index 7629ef7..26afe3c 100644 --- a/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/commands/LanguageBlobCommand.java +++ b/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/commands/LanguageBlobCommand.java @@ -34,7 +34,7 @@ public class LanguageBlobCommand implements Runnable { String level = "component"; @Option( - names = {"-m", "--language-model"}, + names = {"-m", "--modular-language"}, required = true, description = "Path to the language") String language; @@ -51,6 +51,13 @@ public class LanguageBlobCommand implements Runnable { defaultValue = "none") String simulatorType = "none"; + @Option( + names = {"-p", "--path-structure"}, + description = + "Is optional. If the language is part of the code use \"LinC\", if the code is part of the language use \"CinL\", if none of these apply, don't use the flag.", + defaultValue = "none") + String language_location; + @Override public void run() { switch (level) { diff --git a/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/commands/LanguageStructureApplianceCommand.java b/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/commands/LanguageStructureApplianceCommand.java index 91bff9e..9438de2 100644 --- a/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/commands/LanguageStructureApplianceCommand.java +++ b/src/main/java/edu/kit/kastel/dsis/mosim/refactorlizar/analysiscli/commands/LanguageStructureApplianceCommand.java @@ -1,6 +1,34 @@ package edu.kit.kastel.dsis.mosim.refactorlizar.analysiscli.commands; -public class LanguageStructureApplianceCommand { +import com.google.common.flogger.FluentLogger; +import picocli.CommandLine.Command; +import picocli.CommandLine.Option; - public void applyLanguageStructureToCode(String language, String code) {} +@Command(name = "applyLanguageStructureToCode", description = "Not implemented yet.", mixinStandardHelpOptions = true) +public class LanguageStructureApplianceCommand implements Runnable { + public static final FluentLogger LOGGER = FluentLogger.forEnclosingClass(); + + @Option( + names = {"-m", "--language-model"}, + required = true, + description = "Path to the language") + String language; + + @Option( + names = {"-s", "--simulator-code"}, + required = true, + description = "Path to the simulator code") + String code; + + @Option( + names = {"-p", "--path-structure"}, + description = + "Is optional. If the language is part of the code use \"LinC\", if the code is part of the language use \"CinL\", if none of these apply, don't use the flag.", + defaultValue = "none") + String language_location; + + @Override + public void run() { + LOGGER.atWarning().log("Command is not implemented yet!"); + } }