Replies: 1 comment
-
Source files without a semantic change might still need to be compiled because line numbers in the debug information are changed. You probably want to analyze the old and new class file content instead to detect signature, annotation, and constant value changes (if you want to go that far and perform such a fine-grained analysis). I'm not aware of a helper in JDT that does this in isolation for class files. You might want to reverse engineer the poorly documented approach taken here https://github.com/eclipse/xtext-extras/blob/master/org.eclipse.xtext.builder.standalone/src/org/eclipse/xtext/builder/standalone/compiler/InternalIncrementalCompiler.java#L529 / https://github.com/eclipse/xtext-extras/blob/master/org.eclipse.xtext.builder.standalone/src/org/eclipse/xtext/builder/standalone/compiler/InternalIncrementalCompiler.java#L367 |
Beta Was this translation helpful? Give feedback.
-
Tycho has comparators for different files to check if they have changed in a "relevant" way.
Currently java source files are just compared "as-is", but I wonder if JDT can be used to compare them on a semantic level, that is, e.g. if just the order has changed of a method it could be detected?
Beta Was this translation helpful? Give feedback.
All reactions