Merge branch 'copy_libs' of uhl@gohorb.ba-horb.de:/bahome/projekt/git/Plugin_JCC into copy_libs

This commit is contained in:
michael 2019-11-27 21:49:59 +01:00
commit e241b423a3
5 changed files with 44 additions and 46 deletions

View File

@ -2,6 +2,6 @@
<extension> <extension>
<groupId>org.eclipse.tycho.extras</groupId> <groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-pomless</artifactId> <artifactId>tycho-pomless</artifactId>
<version>1.2.0</version> <version>1.5.1</version>
</extension> </extension>
</extensions> </extensions>

View File

@ -1,28 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> <classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<classpathentry kind="src" path="src"/> <attributes>
<classpathentry kind="lib" path="lib/animal-sniffer-annotations.jar"/> <attribute name="module" value="true"/>
<classpathentry kind="lib" path="lib/antlr-runtime.jar"/> </attributes>
<classpathentry kind="lib" path="lib/antlr4-runtime.jar"/> </classpathentry>
<classpathentry kind="lib" path="lib/antlr4.jar"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="lib" path="lib/asm.jar"/> <classpathentry kind="lib" path="lib/animal-sniffer-annotations.jar"/>
<classpathentry kind="lib" path="lib/bcel.jar"/> <classpathentry kind="lib" path="lib/antlr-runtime.jar"/>
<classpathentry kind="lib" path="lib/checker-qual.jar"/> <classpathentry kind="lib" path="lib/antlr4-runtime.jar"/>
<classpathentry kind="lib" path="lib/commons-io.jar"/> <classpathentry kind="lib" path="lib/antlr4.jar"/>
<classpathentry kind="lib" path="lib/error_prone_annotations.jar"/> <classpathentry kind="lib" path="lib/asm.jar"/>
<classpathentry kind="lib" path="lib/failureaccess.jar"/> <classpathentry kind="lib" path="lib/bcel.jar"/>
<classpathentry kind="lib" path="lib/guava.jar"/> <classpathentry kind="lib" path="lib/checker-qual.jar"/>
<classpathentry kind="lib" path="lib/icu4j.jar"/> <classpathentry kind="lib" path="lib/commons-io.jar"/>
<classpathentry kind="lib" path="lib/j2objc-annotations.jar"/> <classpathentry kind="lib" path="lib/error_prone_annotations.jar"/>
<classpathentry kind="lib" path="lib/javassist.jar"/> <classpathentry kind="lib" path="lib/failureaccess.jar"/>
<classpathentry kind="lib" path="lib/JavaTXcompiler.jar" sourcepath="/JavaCompilerCore"/> <classpathentry kind="lib" path="lib/guava.jar"/>
<classpathentry kind="lib" path="lib/javax.json.jar"/> <classpathentry kind="lib" path="lib/icu4j.jar"/>
<classpathentry kind="lib" path="lib/jsr305.jar"/> <classpathentry kind="lib" path="lib/j2objc-annotations.jar"/>
<classpathentry kind="lib" path="lib/listenablefuture.jar"/> <classpathentry kind="lib" path="lib/javassist.jar"/>
<classpathentry kind="lib" path="lib/org.abego.treelayout.core.jar"/> <classpathentry kind="lib" path="lib/JavaTXcompiler.jar"/>
<classpathentry kind="lib" path="lib/reflections.jar"/> <classpathentry kind="lib" path="lib/javax.json.jar"/>
<classpathentry kind="lib" path="lib/ST4.jar"/> <classpathentry kind="lib" path="lib/jsr305.jar"/>
<classpathentry kind="output" path="target/classes"/> <classpathentry kind="lib" path="lib/listenablefuture.jar"/>
</classpath> <classpathentry kind="lib" path="lib/org.abego.treelayout.core.jar"/>
<classpathentry kind="lib" path="lib/reflections.jar"/>
<classpathentry kind="lib" path="lib/ST4.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -24,14 +24,12 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.equinox.p2.core, org.eclipse.equinox.p2.core,
org.eclipse.equinox.p2.operations, org.eclipse.equinox.p2.operations,
org.eclipse.equinox.p2.engine, org.eclipse.equinox.p2.engine,
org.eclipse.equinox.ds,
org.eclipse.equinox.event, org.eclipse.equinox.event,
org.eclipse.equinox.p2.repository;bundle-version="2.3.200", org.eclipse.equinox.p2.repository;bundle-version="2.3.200",
org.eclipse.equinox.p2.metadata;bundle-version="2.3.100", org.eclipse.equinox.p2.metadata;bundle-version="2.3.100",
org.eclipse.ui.ide, org.eclipse.ui.ide,
org.eclipse.ui.views, org.eclipse.ui.views
org.eclipse.equinox.ds; visibility:=reexport Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy Bundle-ActivationPolicy: lazy
Bundle-ClassPath: ., Bundle-ClassPath: .,
lib/animal-sniffer-annotations.jar, lib/animal-sniffer-annotations.jar,

View File

@ -5,20 +5,16 @@ import static java.util.stream.Collectors.toCollection;
import static org.eclipse.core.runtime.IStatus.ERROR; import static org.eclipse.core.runtime.IStatus.ERROR;
import static typinferenzplugin.Activator.PLUGIN_ID; import static typinferenzplugin.Activator.PLUGIN_ID;
import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet; import java.util.TreeSet;
import java.util.Vector; import java.util.Vector;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import javax.inject.Inject; import javax.inject.Inject;
import org.antlr.v4.parse.BlockSetTransformer.topdown_return;
import org.eclipse.core.resources.IMarker; import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResource;
@ -38,7 +34,6 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput; import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.editors.text.TextEditor; import org.eclipse.ui.editors.text.TextEditor;
import org.eclipse.ui.internal.ide.TipsAndTricksAction;
import org.eclipse.ui.part.FileEditorInput; import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.texteditor.IDocumentProvider; import org.eclipse.ui.texteditor.IDocumentProvider;
import org.eclipse.ui.texteditor.SimpleMarkerAnnotation; import org.eclipse.ui.texteditor.SimpleMarkerAnnotation;
@ -47,8 +42,6 @@ import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
import de.dhbwstuttgart.exceptions.TypeinferenceException; import de.dhbwstuttgart.exceptions.TypeinferenceException;
import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.SourceFile;
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric; import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
import de.dhbwstuttgart.typedeployment.TypeInsert;
import de.dhbwstuttgart.typedeployment.TypeInsertFactory;
import de.dhbwstuttgart.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typedeployment.TypeInsertPoint;
import de.dhbwstuttgart.typeinference.result.ResultSet; import de.dhbwstuttgart.typeinference.result.ResultSet;
import de.dhbwstuttgart.typeinference.unify.UnifyResultEvent; import de.dhbwstuttgart.typeinference.unify.UnifyResultEvent;
@ -253,35 +246,38 @@ public class JavEditor extends TextEditor implements UnifyResultListener {
typeReplaceMarkers.removeIf(trm -> !trm.isConsistent(typeReplaceMarker)); typeReplaceMarkers.removeIf(trm -> !trm.isConsistent(typeReplaceMarker));
int lengthOfInsert = typeReplaceMarker.getInsertPoint().getInsertString().length(); int lengthOfInsert = typeReplaceMarker.getInsertPoint().getInsertString().length();
int postitionOfInsert = typeReplaceMarker.getPositionInCode();
for (TypeReplaceMarker toCheck : typeReplaceMarkers) { for (TypeReplaceMarker toCheck : typeReplaceMarkers) {
if (toCheck.getPoint().getPositionInCode() > typeReplaceMarker.getPoint().getPositionInCode() + lengthOfInsert) { if (toCheck.getPoint().getPositionInCode() > postitionOfInsert) {
toCheck.getInsertPoint().point.addExtraOffset(lengthOfInsert); toCheck.getInsertPoint().point.addExtraOffset(lengthOfInsert);
} }
// Add extra offset for the additional insert points of "typeReplaceMarker" // Add extra offset for the additional insert points of "typeReplaceMarker"
// to "toCheck" // to "toCheck"
// ... // ...
/*
for (TypeInsertPoint additionalPoint : typeReplaceMarker.getInsertPoint().getAdditionalPointsUnsorted()) { for (TypeInsertPoint additionalPoint : typeReplaceMarker.getInsertPoint().getAdditionalPointsUnsorted()) {
int lengthAdditionalInsert = additionalPoint.getInsertString().length(); int lengthAdditionalInsert = additionalPoint.getInsertString().length();
int positionAdditionalInsert = additionalPoint.getPositionInCode(); int positionAdditionalInsert = additionalPoint.getPositionInCode();
if (additionalIdentityElimination.add(additionalPoint) && toCheck.getPositionInCode() > positionAdditionalInsert + lengthAdditionalInsert) { if (additionalIdentityElimination.add(additionalPoint) && postitionOfInsert > positionAdditionalInsert) {
toCheck.getInsertPoint().point.addExtraOffset(lengthAdditionalInsert); toCheck.getInsertPoint().point.addExtraOffset(lengthAdditionalInsert);
} }
} }
*/
for (TypeInsertPoint tip : typeReplaceMarker.getInsertPoint().getAdditionalPointsUnsorted()) { for (TypeInsertPoint tip : typeReplaceMarker.getInsertPoint().getAdditionalPointsUnsorted()) {
// Add to all other type replace markers the extra offsets of the additional // Add to all other type replace markers the extra offsets of the additional
// points of this type replace marker. // points of this type replace marker.
// ... // ...
if (toCheck.getPoint().getPositionInCode() > tip.getPositionInCode() - tip.getInsertString().length()) { if (toCheck.getPoint().getPositionInCode() > postitionOfInsert - tip.getInsertString().length()) {
toCheck.getInsertPoint().point.addExtraOffset(tip.getInsertString().length()); toCheck.getInsertPoint().point.addExtraOffset(tip.getInsertString().length());
} }
} }
for (TypeInsertPoint toCheckAddi : toCheck.getInsertPoint().getAdditionalPointsUnsorted()) { for (TypeInsertPoint toCheckAddi : toCheck.getInsertPoint().getAdditionalPointsUnsorted()) {
if (toCheckAddi.getPositionInCode() > typeReplaceMarker.getPoint().getPositionInCode() + lengthOfInsert) { if (toCheckAddi.getPositionInCode() > postitionOfInsert) {
toCheckAddi.addExtraOffset(lengthOfInsert); toCheckAddi.addExtraOffset(lengthOfInsert);
} }

View File

@ -6,8 +6,8 @@
<packaging>pom</packaging> <packaging>pom</packaging>
<properties> <properties>
<tycho.version>1.2.0</tycho.version> <tycho.version>1.5.1</tycho.version>
<eclipse-repo.url>http://download.eclipse.org/releases/oxygen</eclipse-repo.url> <eclipse-repo.url>http://download.eclipse.org/eclipse/updates/4.14milestones</eclipse-repo.url>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<downloadSources>true</downloadSources> <downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs> <downloadJavadocs>true</downloadJavadocs>