diff --git a/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/ErrorMarker.java b/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/ErrorMarker.java index b3b943e..ad57e8c 100644 --- a/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/ErrorMarker.java +++ b/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/ErrorMarker.java @@ -1,13 +1,7 @@ package typinferenzplugin; -import java.util.Vector; - -import org.eclipse.core.resources.IMarker; -import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.source.Annotation; -import typinferenzplugin.editor.JavEditor; - public class ErrorMarker extends JavMarker{ private String message; @@ -35,7 +29,6 @@ public class ErrorMarker extends JavMarker{ return this.point; } - @Override public int getPositionInCode() { @@ -52,10 +45,4 @@ public class ErrorMarker extends JavMarker{ return true; } - @Override - public void setAnnotation(Annotation addAnnotation) { - // TODO Auto-generated method stub - - } - } diff --git a/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/editor/JavEditor.java b/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/editor/JavEditor.java index 6ecada4..884b654 100644 --- a/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/editor/JavEditor.java +++ b/JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/src/typinferenzplugin/editor/JavEditor.java @@ -4,8 +4,10 @@ import static org.eclipse.core.runtime.IStatus.ERROR; import static typinferenzplugin.Activator.PLUGIN_ID; import static java.util.Collections.singletonList; +import java.util.ArrayList; import java.util.Collection; import java.util.Collections; +import java.util.List; import java.util.TreeSet; import java.util.Vector; @@ -51,7 +53,7 @@ import typinferenzplugin.error.ErrorOutput; //Example from: http://help.eclipse.org/indigo/index.jsp /** - * Editor f�r .jav-Dateien Anmerkung: Für jede ge�ffntete Datei wird eine + * Editor für .jav-Dateien Anmerkung: Für jede ge�ffntete Datei wird eine * Instanz des Editors erstellt * * @author janulrich @@ -124,7 +126,6 @@ public class JavEditor extends TextEditor implements UnifyResultListener { private void typeReconstruction() { Job job = Job.create("Doing type recoustruction...", (ICoreRunnable) monitor -> { // do something long running - Vector markers = new Vector(); if (!this.typeReplaceMarkers.isEmpty() || !this.errorMarkers.isEmpty()) { LOG.log(new Status(ERROR, PLUGIN_ID, "Fehler: Zuerst Marker löschen, bevor Typinferenz durchgeführt werden kann")); @@ -134,10 +135,10 @@ public class JavEditor extends TextEditor implements UnifyResultListener { try { typeinference.run(this); } catch (TypeinferenceException texc) { - //markers.add(new ErrorMarker(texc.getMessage(), new CodePoint(texc.getOffset()))); - this.placeMarkers(extractResource(), singletonList(new ErrorMarker(texc.getMessage(), new CodePoint(texc.getOffset())))); + ErrorMarker errorMarker = new ErrorMarker(texc.getMessage(), new CodePoint(texc.getOffset())); + this.errorMarkers.add(errorMarker); + this.placeMarkers(extractResource(), singletonList(errorMarker)); } - }); // Start the Job diff --git a/JavaCompilerPlugin/releng/JavaCompilerPlugin.Configuration/pom.xml b/JavaCompilerPlugin/releng/JavaCompilerPlugin.Configuration/pom.xml index 23936cf..17983e3 100644 --- a/JavaCompilerPlugin/releng/JavaCompilerPlugin.Configuration/pom.xml +++ b/JavaCompilerPlugin/releng/JavaCompilerPlugin.Configuration/pom.xml @@ -1,185 +1,141 @@ - - 4.0.0 - de.dhbwstuttgart - JavaCompilerPlugin.configuration - 0.1.0-SNAPSHOT - pom - - - 1.2.0 - http://download.eclipse.org/releases/oxygen - UTF-8 - true - true - - - - - eclipse-release - ${eclipse-repo.url} - p2 - - - - - - de.dhbwstuttgart - JavaTXcompiler - 0.2 - - - org.antlr - antlr4 - 4.7 - - - - commons-io - commons-io - 2.6 - - - com.google.guava - guava - 27.0.1-jre - - - org.reflections - reflections - 0.9.11 - - - org.ow2.asm - asm - [6.1.1,) - - - org.apache.bcel - bcel - 6.2 - - - - - - - org.eclipse.tycho - tycho-compiler-plugin - ${tycho.version} - - - - de.dhbwstuttgart - JavaTXcompiler - 0.2.0 - - - org.antlr - antlr4 - 4.7 - - - commons-io - commons-io - 2.6 - - - com.google.guava - guava - 27.0.1-jre - - - org.reflections - reflections - 0.9.11 - - - org.ow2.asm - asm - [6.1.1,) - - - org.apache.bcel - bcel - 6.2 - - - - - - - org.eclipse.tycho - tycho-maven-plugin - ${tycho.version} - true - - - - org.eclipse.tycho - tycho-p2-repository-plugin - ${tycho.version} - - true - - - - - org.eclipse.tycho - tycho-packaging-plugin - ${tycho.version} - - - package - package-feature - - ${project.artifactId}_${unqualifiedVersion}.${buildQualifier} - - - - - - - org.eclipse.tycho - target-platform-configuration - ${tycho.version} - - consider - - - - linux - gtk - x86 - - - linux - gtk - x86_64 - - - win32 - win32 - x86 - - - win32 - win32 - x86_64 - - - macosx - cocoa - x86_64 - - - - - - + + 4.0.0 + de.dhbwstuttgart + JavaCompilerPlugin.configuration + 0.1.0-SNAPSHOT + pom + + + 1.2.0 + http://download.eclipse.org/releases/oxygen + UTF-8 + true + true + + + + + eclipse-release + ${eclipse-repo.url} + p2 + + + + + + de.dhbwstuttgart + JavaTXcompiler + 0.2 + + + org.antlr + antlr4 + 4.7 + + + commons-io + commons-io + 2.6 + + + com.google.guava + guava + 27.0.1-jre + + + org.reflections + reflections + 0.9.11 + + + org.ow2.asm + asm + [6.1.1,) + + + org.apache.bcel + bcel + 6.2 + + + + + + + org.eclipse.tycho + tycho-compiler-plugin + ${tycho.version} + + + + de.dhbwstuttgart + JavaTXcompiler + 0.2.0 + + + org.antlr + antlr4 + 4.7 + + + commons-io + commons-io + 2.6 + + + com.google.guava + guava + 27.0.1-jre + + + org.reflections + reflections + 0.9.11 + + + org.ow2.asm + asm + [6.1.1,) + + + org.apache.bcel + bcel + 6.2 + + + + + + + org.eclipse.tycho + tycho-maven-plugin + ${tycho.version} + true + + + + org.eclipse.tycho + tycho-p2-repository-plugin + ${tycho.version} + + true + + + + + org.eclipse.tycho + tycho-packaging-plugin + ${tycho.version} + + + package + package-feature + + ${project.artifactId}_${unqualifiedVersion}.${buildQualifier} + + + + + + \ No newline at end of file