|
@@ -48,7 +48,7 @@ public class JavaCompiler {
|
48
|
48
|
context.addModule(module.module, target);
|
49
|
49
|
|
50
|
50
|
for (HighLevelDefinition definition : module.definitions.getAll()) {
|
51
|
|
- final String className = getFilename(definition);
|
|
51
|
+ final String className = getClassName(getFilename(definition));
|
52
|
52
|
String filename = className + "_" + (definition.name == null ? "generated" : definition.name) + "_" + expansionCounter++;
|
53
|
53
|
JavaPrepareDefinitionVisitor definitionPreparer = new JavaPrepareDefinitionVisitor(context, target, filename, null, className);
|
54
|
54
|
definition.accept(definitionPreparer);
|
|
@@ -120,10 +120,11 @@ public class JavaCompiler {
|
120
|
120
|
private String getFilename(HighLevelDefinition definition) {
|
121
|
121
|
SourceFile source = definition.position.file;
|
122
|
122
|
if (source != null) {
|
123
|
|
- int slash = Math.max(source.getFilename().lastIndexOf('/'), source.getFilename().lastIndexOf('\\'));
|
124
|
|
- String filename = source.getFilename().substring(slash < 0 ? 0 : slash + 1);
|
125
|
|
- filename = filename.substring(0, filename.lastIndexOf('.'));
|
126
|
|
- return filename;
|
|
123
|
+ //int slash = Math.max(source.getFilename().lastIndexOf('/'), source.getFilename().lastIndexOf('\\'));
|
|
124
|
+ //String filename = source.getFilename().substring(slash < 0 ? 0 : slash + 1);
|
|
125
|
+ //filename = filename.substring(0, filename.lastIndexOf('.'));
|
|
126
|
+ //return filename;
|
|
127
|
+ return source.getFilename();
|
127
|
128
|
} else {
|
128
|
129
|
return definition.name == null ? "Expansion" : definition.name;
|
129
|
130
|
}
|