ErrorMarker verschwinden jetzt wieder.
This commit is contained in:
parent
8f588df670
commit
d7c9247a27
@ -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;
|
||||
@ -36,7 +30,6 @@ public class ErrorMarker extends JavMarker{
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int getPositionInCode() {
|
||||
return point.getPositionInCode();
|
||||
@ -52,10 +45,4 @@ public class ErrorMarker extends JavMarker{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAnnotation(Annotation addAnnotation) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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<EFBFBD>r .jav-Dateien Anmerkung: Für jede ge<EFBFBD>ffntete Datei wird eine
|
||||
* Editor für .jav-Dateien Anmerkung: Für jede ge<EFBFBD>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<JavMarker> markers = new Vector<JavMarker>();
|
||||
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
|
||||
|
@ -31,13 +31,6 @@
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr4</artifactId>
|
||||
<version>4.7</version>
|
||||
<!--exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr-runtime</artifactId>
|
||||
<version>3.5.2</version>
|
||||
</exclusion>
|
||||
</exclusions-->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
@ -143,43 +136,6 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.eclipse.tycho</groupId>
|
||||
<artifactId>target-platform-configuration</artifactId>
|
||||
<version>${tycho.version}</version>
|
||||
<configuration>
|
||||
<pomDependencies>consider</pomDependencies>
|
||||
|
||||
<environments>
|
||||
<environment>
|
||||
<os>linux</os>
|
||||
<ws>gtk</ws>
|
||||
<arch>x86</arch>
|
||||
</environment>
|
||||
<environment>
|
||||
<os>linux</os>
|
||||
<ws>gtk</ws>
|
||||
<arch>x86_64</arch>
|
||||
</environment>
|
||||
<environment>
|
||||
<os>win32</os>
|
||||
<ws>win32</ws>
|
||||
<arch>x86</arch>
|
||||
</environment>
|
||||
<environment>
|
||||
<os>win32</os>
|
||||
<ws>win32</ws>
|
||||
<arch>x86_64</arch>
|
||||
</environment>
|
||||
<environment>
|
||||
<os>macosx</os>
|
||||
<ws>cocoa</ws>
|
||||
<arch>x86_64</arch>
|
||||
</environment>
|
||||
</environments>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
Loading…
Reference in New Issue
Block a user