diff --git a/JavaCompilerPlugin/.mvn/extensions.xml b/JavaCompilerPlugin/.mvn/extensions.xml index 07d2e46..887646b 100644 --- a/JavaCompilerPlugin/.mvn/extensions.xml +++ b/JavaCompilerPlugin/.mvn/extensions.xml @@ -2,6 +2,6 @@ org.eclipse.tycho.extras tycho-pomless - 1.2.0 + 1.5.1 diff --git a/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/.classpath b/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/.classpath index d0394ef..fccab6a 100644 --- a/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/.classpath +++ b/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/.classpath @@ -1,28 +1,32 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/META-INF/MANIFEST.MF b/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/META-INF/MANIFEST.MF index 54559f1..1a4cddd 100644 --- a/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/META-INF/MANIFEST.MF +++ b/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/META-INF/MANIFEST.MF @@ -24,14 +24,12 @@ Require-Bundle: org.eclipse.ui, org.eclipse.equinox.p2.core, org.eclipse.equinox.p2.operations, org.eclipse.equinox.p2.engine, - org.eclipse.equinox.ds, org.eclipse.equinox.event, org.eclipse.equinox.p2.repository;bundle-version="2.3.200", org.eclipse.equinox.p2.metadata;bundle-version="2.3.100", org.eclipse.ui.ide, - org.eclipse.ui.views, - org.eclipse.equinox.ds; visibility:=reexport -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 + org.eclipse.ui.views +Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ActivationPolicy: lazy Bundle-ClassPath: ., lib/animal-sniffer-annotations.jar, diff --git a/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/editor/JavEditor.java b/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/editor/JavEditor.java index 4260aa5..676dab5 100644 --- a/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/editor/JavEditor.java +++ b/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/editor/JavEditor.java @@ -5,20 +5,16 @@ import static java.util.stream.Collectors.toCollection; import static org.eclipse.core.runtime.IStatus.ERROR; import static typinferenzplugin.Activator.PLUGIN_ID; -import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; -import java.util.Map; -import java.util.Set; import java.util.TreeSet; import java.util.Vector; import java.util.stream.Collectors; import javax.inject.Inject; -import org.antlr.v4.parse.BlockSetTransformer.topdown_return; import org.eclipse.core.resources.IMarker; import org.eclipse.core.resources.IProject; 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.IFileEditorInput; import org.eclipse.ui.editors.text.TextEditor; -import org.eclipse.ui.internal.ide.TipsAndTricksAction; import org.eclipse.ui.part.FileEditorInput; import org.eclipse.ui.texteditor.IDocumentProvider; 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.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric; -import de.dhbwstuttgart.typedeployment.TypeInsert; -import de.dhbwstuttgart.typedeployment.TypeInsertFactory; import de.dhbwstuttgart.typedeployment.TypeInsertPoint; import de.dhbwstuttgart.typeinference.result.ResultSet; import de.dhbwstuttgart.typeinference.unify.UnifyResultEvent; @@ -253,35 +246,38 @@ public class JavEditor extends TextEditor implements UnifyResultListener { typeReplaceMarkers.removeIf(trm -> !trm.isConsistent(typeReplaceMarker)); int lengthOfInsert = typeReplaceMarker.getInsertPoint().getInsertString().length(); + int postitionOfInsert = typeReplaceMarker.getPositionInCode(); for (TypeReplaceMarker toCheck : typeReplaceMarkers) { - if (toCheck.getPoint().getPositionInCode() > typeReplaceMarker.getPoint().getPositionInCode() + lengthOfInsert) { + if (toCheck.getPoint().getPositionInCode() > postitionOfInsert) { toCheck.getInsertPoint().point.addExtraOffset(lengthOfInsert); } // Add extra offset for the additional insert points of "typeReplaceMarker" // to "toCheck" // ... + /* for (TypeInsertPoint additionalPoint : typeReplaceMarker.getInsertPoint().getAdditionalPointsUnsorted()) { int lengthAdditionalInsert = additionalPoint.getInsertString().length(); int positionAdditionalInsert = additionalPoint.getPositionInCode(); - if (additionalIdentityElimination.add(additionalPoint) && toCheck.getPositionInCode() > positionAdditionalInsert + lengthAdditionalInsert) { + if (additionalIdentityElimination.add(additionalPoint) && postitionOfInsert > positionAdditionalInsert) { toCheck.getInsertPoint().point.addExtraOffset(lengthAdditionalInsert); } } + */ for (TypeInsertPoint tip : typeReplaceMarker.getInsertPoint().getAdditionalPointsUnsorted()) { // Add to all other type replace markers the extra offsets of the additional // 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()); } } for (TypeInsertPoint toCheckAddi : toCheck.getInsertPoint().getAdditionalPointsUnsorted()) { - if (toCheckAddi.getPositionInCode() > typeReplaceMarker.getPoint().getPositionInCode() + lengthOfInsert) { + if (toCheckAddi.getPositionInCode() > postitionOfInsert) { toCheckAddi.addExtraOffset(lengthOfInsert); } diff --git a/JavaCompilerPlugin/releng/JavaCompilerPlugin.Configuration/pom.xml b/JavaCompilerPlugin/releng/JavaCompilerPlugin.Configuration/pom.xml index dcda8a6..55c6c58 100644 --- a/JavaCompilerPlugin/releng/JavaCompilerPlugin.Configuration/pom.xml +++ b/JavaCompilerPlugin/releng/JavaCompilerPlugin.Configuration/pom.xml @@ -6,8 +6,8 @@ pom - 1.2.0 - http://download.eclipse.org/releases/oxygen + 1.5.1 + http://download.eclipse.org/eclipse/updates/4.14milestones UTF-8 true true