Skip to content

Commit cc5f184

Browse files
committed
EDIT: Cleaned project.
COMMENT: Added TODO comment. Fixed JDoc.
1 parent 6d63ee3 commit cc5f184

File tree

6 files changed

+14
-9
lines changed

6 files changed

+14
-9
lines changed

.classpath

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
<classpathentry kind="src" path="src/main/java"/>
66
<classpathentry kind="src" path="src/main/xtend-gen"/>
77
<classpathentry kind="output" path="bin"/>
8-
</classpath>
8+
</classpath>

.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@
3131
<nature>org.eclipse.jdt.core.javanature</nature>
3232
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
3333
</natures>
34-
</projectDescription>
34+
</projectDescription>

.settings/org.eclipse.jdt.core.prefs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
44
org.eclipse.jdt.core.compiler.compliance=1.8
55
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
66
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
7-
org.eclipse.jdt.core.compiler.source=1.8
7+
org.eclipse.jdt.core.compiler.source=1.8

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,4 +200,4 @@ This Agreement is governed by the laws of the State of New York and the
200200
intellectual property laws of the United States of America. No party to this
201201
Agreement will bring a legal action under this Agreement more than one year
202202
after the cause of action arose. Each party waives its rights to a jury trial in
203-
any resulting litigation.
203+
any resulting litigation.

src/main/java/jce/codegen/GenModelGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public GenModel generate(GeneratedEcoreMetamodel metamodel) {
6868
String modelName = information.getFileName();
6969
String modelPath = information.getFilePath();
7070
String projectPath = modelPath.substring(0, modelPath.lastIndexOf(SLASH, modelPath.lastIndexOf(SLASH) - 1));
71-
String projectName = projectPath.substring(projectPath.lastIndexOf(SLASH));
71+
String projectName = projectPath.substring(projectPath.lastIndexOf(SLASH)); // TODO (LOW) use Eclipse API.
7272
GenModel genModel = GenModelFactory.eINSTANCE.createGenModel();
7373
genModel.setModelDirectory(projectName + "/src");
7474
genModel.setModelPluginID(projectName.substring(1));

src/main/java/jce/manipulation/TypeVisitor.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,18 @@ public boolean visit(TypeDeclaration node) {
4040
return super.visit(node);
4141
}
4242

43-
void setSuperClass(TypeDeclaration typeDecl, String qualifiedName) {
43+
/**
44+
* Sets a qualified name as super class of a type declaration.
45+
* @param declaration is the type declaration.
46+
* @param qualifiedName is the qualified name.
47+
*/
48+
public void setSuperClass(TypeDeclaration declaration, String qualifiedName) {
4449
System.err.println(" try to set: " + qualifiedName);
45-
AST ast = typeDecl.getAST();
50+
AST ast = declaration.getAST();
4651
Name name = ast.newName(qualifiedName);
4752
Type type = ast.newSimpleType(name);
48-
typeDecl.setSuperclassType(type);
49-
System.err.println(" is: " + typeDecl.getSuperclassType());
53+
declaration.setSuperclassType(type);
54+
System.err.println(" is: " + declaration.getSuperclassType());
5055
ASTRewrite astRewriter = ASTRewrite.create(ast);
5156
try {
5257
TextEdit edits = astRewriter.rewriteAST(); // TODO CONTINUE HERE

0 commit comments

Comments
 (0)