Skip to content

Commit f0c67c5

Browse files
hansonrhansonr
authored andcommitted
fixes transpiler for Eclipse photon. adds timestamp to dist dir
1 parent 479cfef commit f0c67c5

File tree

6 files changed

+15
-11
lines changed

6 files changed

+15
-11
lines changed
-92 Bytes
Binary file not shown.
-92 Bytes
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
05/07/2018

sources/net.sf.j2s.core/src/net/sf/j2s/core/builder/AbstractImageBuilder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,8 @@ public ICompilationUnit fromIFile(IFile file) {
529529
protected void initializeAnnotationProcessorManager(Compiler newCompiler) {
530530
AbstractAnnotationProcessorManager annotationManager = JavaModelManager.getJavaModelManager().createAnnotationProcessorManager();
531531
if (annotationManager != null) {
532-
annotationManager.configureFromPlatform(newCompiler, this, this.javaBuilder.javaProject);
532+
// BH added , true for photon
533+
annotationManager.configureFromPlatform(newCompiler, this, this.javaBuilder.javaProject, true);
533534
annotationManager.setErr(new PrintWriter(System.err));
534535
annotationManager.setOut(new PrintWriter(System.out));
535536
}

sources/net.sf.j2s.core/src/net/sf/j2s/core/builder/ClasspathDirectory.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,12 @@ public NameEnvironmentAnswer findClass(String binaryFileName, String qualifiedPa
123123
if (reader != null) {
124124
String fileNameWithoutExtension = qualifiedBinaryFileName.substring(0, qualifiedBinaryFileName.length() - SuffixConstants.SUFFIX_CLASS.length);
125125
if (this.externalAnnotationPath != null) {
126-
try {
127-
this.annotationZipFile = reader.setExternalAnnotationProvider(this.externalAnnotationPath, fileNameWithoutExtension, this.annotationZipFile, null);
128-
} catch (@SuppressWarnings("unused") IOException e) {
129-
// don't let error on annotations fail class reading
130-
}
126+
// BH 2018 photon doesn't allow this
127+
// try {
128+
// this.annotationZipFile = reader.setExternalAnnotationProvider(this.externalAnnotationPath, fileNameWithoutExtension, this.annotationZipFile, null);
129+
// } catch (@SuppressWarnings("unused") IOException e) {
130+
// // don't let error on annotations fail class reading
131+
// }
131132
}
132133
if (this.accessRuleSet == null)
133134
return new NameEnvironmentAnswer(reader, null);

sources/net.sf.j2s.core/src/net/sf/j2s/core/builder/ClasspathJar.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,12 @@ public NameEnvironmentAnswer findClass(String binaryFileName, String qualifiedPa
169169
if (reader != null) {
170170
String fileNameWithoutExtension = qualifiedBinaryFileName.substring(0, qualifiedBinaryFileName.length() - SuffixConstants.SUFFIX_CLASS.length);
171171
if (this.externalAnnotationPath != null) {
172-
try {
173-
this.annotationZipFile = reader.setExternalAnnotationProvider(this.externalAnnotationPath, fileNameWithoutExtension, this.annotationZipFile, null);
174-
} catch (@SuppressWarnings("unused") IOException e) {
175-
// don't let error on annotations fail class reading
176-
}
172+
// photon doesn't allow this
173+
// try {
174+
// this.annotationZipFile = reader.setExternalAnnotationProvider(this.externalAnnotationPath, fileNameWithoutExtension, this.annotationZipFile, null);
175+
// } catch (@SuppressWarnings("unused") IOException e) {
176+
// // don't let error on annotations fail class reading
177+
// }
177178
}
178179
if (this.accessRuleSet == null)
179180
return new NameEnvironmentAnswer(reader, null);

0 commit comments

Comments
 (0)