Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EMF modeling language fixes #702

Merged
merged 9 commits into from
Sep 29, 2022
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ In the following, a list of all supported languages with their supported languag
| [Scala](https://www.scala-lang.org) | 2.13.8 | scala | beta | Scalameta |
| [Scheme](http://www.scheme-reports.org) | ? | scheme | unknown | JavaCC |
| [Swift](https://www.swift.org) | 5.4 | swift | beta | ANTLR 4 |
| [EMF Metamodel](https://www.eclipse.org/modeling/emf/) | 2.25.0 | emf-metamodel | alpha | EMF |
| [EMF Metamodel](https://www.eclipse.org/modeling/emf/) (dynamic) | 2.25.0 | emf-metamodel-dynamic | alpha | EMF |
| [EMF Metamodel](https://www.eclipse.org/modeling/emf/) | 2.25.0 | emf | alpha | EMF |
| Text (naive) | - | text | legacy | CoreNLP |

## Download and Installation
Expand Down Expand Up @@ -67,7 +66,7 @@ named arguments:
-h, --help show this help message and exit
-new NEW [NEW ...] Root-directory with submissions to check for plagiarism (same as the root directory)
-old OLD [OLD ...] Root-directory with prior submissions to compare against
-l {cpp,csharp,emf-metamodel,emf-metamodel-dynamic,go,java,kotlin,python3,rlang,scala,scheme,swift,text}
-l {cpp,csharp,emf,go,java,kotlin,python3,rlang,scala,scheme,swift,text}
Select the language to parse the submissions (default: java)
-bc BC Path of the directory containing the base code (common framework used in all
submissions)
Expand Down
5 changes: 0 additions & 5 deletions cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,6 @@
<artifactId>emf-metamodel</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>de.jplag</groupId>
<artifactId>emf-metamodel-dynamic</artifactId>
<version>${revision}</version>
</dependency>
<!-- CLI -->
<dependency>
<groupId>org.kohsuke.metainf-services</groupId>
Expand Down
2 changes: 1 addition & 1 deletion cli/src/test/java/de/jplag/cli/LanguageTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void testInvalidLanguage() throws Exception {
@Test
void testLoading() {
var languages = LanguageLoader.getAllAvailableLanguages();
Assertions.assertEquals(13, languages.size(), "Loaded Languages: " + languages.keySet());
Assertions.assertEquals(12, languages.size(), "Loaded Languages: " + languages.keySet());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@MetaInfServices(de.jplag.Language.class)
public class Language extends de.jplag.emf.Language {
private static final String NAME = "EMF metamodels (dynamically created token set)";
public static final String IDENTIFIER = "emf-metamodel-dynamic";
public static final String IDENTIFIER = "emf-dynamic";

private static final int DEFAULT_MIN_TOKEN_MATCH = 10;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class Language implements de.jplag.Language {
public static final String FILE_ENDING = "." + EcorePackage.eNAME;

private static final String NAME = "EMF metamodel";
public static final String IDENTIFIER = "emf-metamodel";
public static final String IDENTIFIER = "emf";
private static final int DEFAULT_MIN_TOKEN_MATCH = 6;

protected final EcoreParser parser;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public MetamodelToken convertToMetadataEnrichedTokenAndAdd(MetamodelToken token,
* @param suffix is the suffix of the file to be written.
*/
public void writeToFile(String suffix) {
File treeViewFile = new File(file, suffix);
File treeViewFile = new File(file + suffix);
try (BufferedWriter writer = new BufferedWriter(new FileWriter(treeViewFile));) {
if (!treeViewFile.createNewFile()) {
logger.warn("Overwriting tree view file: {}", treeViewFile);
Expand Down