forked from JavaTX/JavaCompilerCore
Merge branch 'simplifyRes' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into simplifyRes
This commit is contained in:
commit
0c1337f84b
13
pom.xml
13
pom.xml
@ -63,6 +63,19 @@ http://maven.apache.org/maven-v4_0_0.xsd">
|
|||||||
<skipTests>true</skipTests>
|
<skipTests>true</skipTests>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.8.1</version>
|
||||||
|
<configuration>
|
||||||
|
<verbose>true</verbose>
|
||||||
|
<fork>true</fork>
|
||||||
|
<executable>/home/michael/programs/jdk/jdk8u232-b09/bin/javac</executable>
|
||||||
|
<compilerVersion>1.8</compilerVersion>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.antlr</groupId>
|
<groupId>org.antlr</groupId>
|
||||||
<artifactId>antlr4-maven-plugin</artifactId>
|
<artifactId>antlr4-maven-plugin</artifactId>
|
||||||
|
@ -63,7 +63,7 @@ public class Method extends SyntaxTreeNode implements IItemWithOffset, TypeScope
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Token getOffset() {
|
public Token getOffset() {
|
||||||
return null;
|
return super.getOffset();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
|
@ -60,12 +60,12 @@ public class TypeInsertFactory {
|
|||||||
|
|
||||||
private static synchronized Set<TypeInsertPoint> createGenericInsert(GenericsGeneratorResultForClass genericResult, ClassOrInterface cl, Method m, ResultSet resultSet, Token mOffset){
|
private static synchronized Set<TypeInsertPoint> createGenericInsert(GenericsGeneratorResultForClass genericResult, ClassOrInterface cl, Method m, ResultSet resultSet, Token mOffset){
|
||||||
Set<TypeInsertPoint> result = createGenericClassInserts(genericResult, cl);
|
Set<TypeInsertPoint> result = createGenericClassInserts(genericResult, cl);
|
||||||
|
|
||||||
Resolver resolver = new Resolver(resultSet);
|
Resolver resolver = new Resolver(resultSet);
|
||||||
|
|
||||||
if (m != null) {
|
if (m != null) {
|
||||||
List<GenericsGeneratorResult> methodConstraints = genericResult.getMethodConstraintsByID(MethodUtility.createID(resolver, m));
|
List<GenericsGeneratorResult> methodConstraints = genericResult.getMethodConstraintsByID(MethodUtility.createID(resolver, m));
|
||||||
result.addAll(createMethodConstraints(methodConstraints, mOffset));
|
result.addAll(createMethodConstraints(methodConstraints, m.getOffset() != null ? m.getOffset() : mOffset));
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -73,6 +73,14 @@ public class TypeInsertPoint {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int compare(TypeInsertPoint o1, TypeInsertPoint o2) {
|
public int compare(TypeInsertPoint o1, TypeInsertPoint o2) {
|
||||||
|
if (o1.point == null && o2.point == null) {
|
||||||
|
return 0;
|
||||||
|
} else if (o2.point == null) {
|
||||||
|
return 1;
|
||||||
|
} else if (o1.point == null) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (o1.getPositionInCode() > o2.getPositionInCode()) {
|
if (o1.getPositionInCode() > o2.getPositionInCode()) {
|
||||||
return 1;
|
return 1;
|
||||||
} else if (o1.getPositionInCode() < o2.getPositionInCode()) {
|
} else if (o1.getPositionInCode() < o2.getPositionInCode()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user