Update dependencies and let plugin build with java 19
This commit is contained in:
parent
3c469b567b
commit
7c6cd3a4cf
@ -1,8 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="lib" path="lib/animal-sniffer-annotations.jar"/>
|
||||
<classpathentry kind="lib" path="lib/antlr-runtime.jar"/>
|
||||
<classpathentry kind="lib" path="lib/antlr4-runtime.jar"/>
|
||||
@ -18,12 +17,13 @@
|
||||
<classpathentry kind="lib" path="lib/icu4j.jar"/>
|
||||
<classpathentry kind="lib" path="lib/j2objc-annotations.jar"/>
|
||||
<classpathentry kind="lib" path="lib/javassist.jar"/>
|
||||
<classpathentry kind="lib" path="lib/JavaTXcompiler.jar" sourcepath="/JavaTXcompiler/src/main/java"/>
|
||||
<classpathentry kind="lib" path="lib/JavaTXcompiler.jar" sourcepath="C:/Users/Daniel/Documents/Programming/JavaCompilerCore/src/main/java"/>
|
||||
<classpathentry kind="lib" path="lib/javax.json.jar"/>
|
||||
<classpathentry kind="lib" path="lib/jsr305.jar"/>
|
||||
<classpathentry kind="lib" path="lib/listenablefuture.jar"/>
|
||||
<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="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
@ -14,7 +14,6 @@ Require-Bundle: org.eclipse.swt,
|
||||
org.eclipse.core.resources,
|
||||
org.eclipse.jdt.ui,
|
||||
org.eclipse.osgi,
|
||||
org.eclipse.equinox.ds;visibility:=reexport,
|
||||
org.eclipse.jface,
|
||||
org.eclipse.e4.ui.services,
|
||||
org.eclipse.e4.core.services,
|
||||
@ -29,7 +28,7 @@ Require-Bundle: org.eclipse.swt,
|
||||
org.eclipse.equinox.p2.metadata;bundle-version="2.3.100",
|
||||
org.eclipse.ui.ide,
|
||||
org.eclipse.ui.views
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-19
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-ClassPath: .,
|
||||
lib/animal-sniffer-annotations.jar,
|
||||
|
@ -25,9 +25,6 @@ import org.eclipse.core.runtime.Status;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
|
||||
import de.dhbwstuttgart.bytecode.BytecodeGen;
|
||||
import de.dhbwstuttgart.bytecode.Exception.BytecodeGeneratorError;
|
||||
import de.dhbwstuttgart.bytecode.genericsGeneratorTypes.GenericGenratorResultForSourceFile;
|
||||
import de.dhbwstuttgart.core.JavaTXCompiler;
|
||||
import de.dhbwstuttgart.exceptions.TypeinferenceException;
|
||||
import de.dhbwstuttgart.syntaxtree.ClassOrInterface;
|
||||
@ -93,15 +90,14 @@ public class Typinferenz {
|
||||
|
||||
Set<TypeInsert> tips = new HashSet<>();
|
||||
String outputDirectory = getOutputDirectory();
|
||||
File currentFile = editor.getFilePath().toFile();
|
||||
|
||||
List<GenericGenratorResultForSourceFile> simplifyResultsForAllSourceFiles = new ArrayList<>();//wird in getBytecode bestimmt
|
||||
if (this.forByteCode.size() > 0) {
|
||||
for (SourceFile sf : compiler.sourceFiles.values()) {
|
||||
try {
|
||||
//HashMap<String, byte[]> bytecode = getBytecode(sf, this.forByteCode, outputDirectory, genericResults);
|
||||
compiler.generateBytecodForFile(outputDirectory, /*bytecode,*/ sf, new ArrayList<>(forByteCode), simplifyResultsForAllSourceFiles);
|
||||
//this.writeClassFile(outputDirectory, bytecode);
|
||||
} catch (BytecodeGeneratorError | IOException ex) {
|
||||
var generatedClasses = compiler.generateBytecode(sf, newResults);
|
||||
compiler.writeClassFile(generatedClasses, new File(outputDirectory));
|
||||
} catch (IOException ex) {
|
||||
ErrorMarker toAdd = new ErrorMarker(ex.getMessage(), new CodePoint(sf.getOffset()));
|
||||
ret.add(toAdd);
|
||||
deleteClassFileIfExists(outputDirectory, sf.getClasses());
|
||||
@ -110,7 +106,7 @@ public class Typinferenz {
|
||||
}
|
||||
int i = 0;
|
||||
for (ResultSet tiResult : newResults) {
|
||||
tips.addAll(TypeInsertFactory.createTypeInsertPoints(parsedSource, tiResult, newResults, simplifyResultsForAllSourceFiles));
|
||||
tips.addAll(TypeInsertFactory.createTypeInsertPoints(parsedSource, tiResult, compiler.getGeneratedGenerics().get(compiler.sourceFiles.get(currentFile)).get(i)));
|
||||
i++;
|
||||
for (TypeInsert p : tips) {
|
||||
TypeReplaceMarker toAdd = new TypeReplaceMarker(editor, tiResult, p);
|
||||
@ -170,7 +166,7 @@ public class Typinferenz {
|
||||
}
|
||||
|
||||
//wird nicht mehr benoetigt
|
||||
public synchronized HashMap<String, byte[]> getBytecode(SourceFile sf, Collection<ResultSet> resultSets, String path, List<GenericGenratorResultForSourceFile> genericResultsRet) {
|
||||
/*public synchronized HashMap<String, byte[]> getBytecode(SourceFile sf, Collection<ResultSet> resultSets, String path, List<GenericGenratorResultForSourceFile> genericResultsRet) {
|
||||
try {
|
||||
HashMap<String, byte[]> classFiles = new HashMap<>();
|
||||
|
||||
@ -184,7 +180,7 @@ public class Typinferenz {
|
||||
|
||||
return new HashMap<>();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
public void deleteClassFileIfExists(String outputDirectory, List<ClassOrInterface> clazzes) {
|
||||
for (ClassOrInterface clazz : clazzes) {
|
||||
|
@ -65,7 +65,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<EFBFBD>r .jav-Dateien Anmerkung: F<EFBFBD>r jede ge<EFBFBD>ffntete Datei wird eine
|
||||
* Instanz des Editors erstellt
|
||||
*
|
||||
* @author janulrich
|
||||
@ -82,12 +82,12 @@ public class JavEditor extends TextEditor implements UnifyResultListener {
|
||||
|
||||
private JavOutline outlinePage;
|
||||
/**
|
||||
* Der SyntaxBaum für das aktuell geöffnete Dokument.
|
||||
* Der SyntaxBaum f<EFBFBD>r das aktuell ge<EFBFBD>ffnete Dokument.
|
||||
*/
|
||||
private SourceFile sourceFile;
|
||||
|
||||
/**
|
||||
* Die TypeReplaceMarker für das aktuell geöffnete Dokument
|
||||
* Die TypeReplaceMarker f<EFBFBD>r das aktuell ge<EFBFBD>ffnete Dokument
|
||||
*/
|
||||
private Vector<JavMarker> errorMarkers = new Vector<JavMarker>();
|
||||
private Vector<TypeReplaceMarker> typeReplaceMarkers = new Vector<TypeReplaceMarker>();
|
||||
@ -150,7 +150,7 @@ public class JavEditor extends TextEditor implements UnifyResultListener {
|
||||
* Startet den Typinferenzalgorithmus, zuvor sollten alle Marker entfernt werden
|
||||
*/
|
||||
private void typeReconstruction() {
|
||||
Job job = Job.create("Doing type recoustruction...", (ICoreRunnable) monitor -> {
|
||||
Job job = Job.create("Doing type reconstruction...", (ICoreRunnable) monitor -> {
|
||||
Runnable cancelledChecker = new Runnable() {
|
||||
|
||||
@Override
|
||||
@ -177,7 +177,7 @@ public class JavEditor extends TextEditor implements UnifyResultListener {
|
||||
// do something long running
|
||||
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"));
|
||||
"Fehler: Zuerst Marker l<EFBFBD>schen, bevor Typinferenz durchgef<65>hrt werden kann"));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -458,9 +458,9 @@ public class JavEditor extends TextEditor implements UnifyResultListener {
|
||||
public void onNewTypeResultFound(UnifyResultEvent evt) {
|
||||
Vector<JavMarker> markers = updateMarkers(evt);
|
||||
|
||||
// Anschließend die TypeReplaceMarker im Quellcode anzeigen:
|
||||
// Anschlie<EFBFBD>end die TypeReplaceMarker im Quellcode anzeigen:
|
||||
// https://stackoverflow.com/questions/8945371/how-to-implement-quick-fix-quick-assist-for-custom-eclipse-editor
|
||||
// LOG.log(new Status(INFO, PLUGIN_ID, "Typinferez durchgeführt. Berechnete
|
||||
// LOG.log(new Status(INFO, PLUGIN_ID, "Typinferez durchgef<EFBFBD>hrt. Berechnete
|
||||
// Marker:\n" + markers));
|
||||
Display.getDefault().asyncExec(() -> {
|
||||
updateGuiWithNewMarkers(markers);
|
||||
|
@ -6,8 +6,8 @@
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<tycho.version>1.5.1</tycho.version>
|
||||
<eclipse-repo.url>http://download.eclipse.org/eclipse/updates/4.7</eclipse-repo.url>
|
||||
<tycho.version>3.0.4</tycho.version>
|
||||
<eclipse-repo.url>https://download.eclipse.org/eclipse/updates/4.27</eclipse-repo.url>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<downloadSources>true</downloadSources>
|
||||
<downloadJavadocs>true</downloadJavadocs>
|
||||
@ -31,7 +31,7 @@
|
||||
<dependency>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr4</artifactId>
|
||||
<version>4.7</version>
|
||||
<version>4.11.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
@ -82,7 +82,7 @@
|
||||
<dependency>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr4</artifactId>
|
||||
<version>4.7</version>
|
||||
<version>4.11.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
@ -237,21 +237,7 @@
|
||||
<artifactId>tycho-p2-publisher-plugin</artifactId>
|
||||
<version>${tycho.version}</version>
|
||||
<configuration>
|
||||
<profiles>JavaSE-1.8,JavaSE-9,JavaSE-10,JavaSE-11,JavaSE-12,JavaSE-13</profiles>
|
||||
</configuration>
|
||||
</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>
|
||||
<profiles>JavaSE-19</profiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
@ -3,41 +3,34 @@
|
||||
<target name="JavaCompilerPlugin.Target" sequenceNumber="2">
|
||||
<locations>
|
||||
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
|
||||
<unit id="ch.qos.logback.slf4j" version="1.0.7.v201505121915"/>
|
||||
<unit id="ch.qos.logback.slf4j.source" version="1.0.7.v201505121915"/>
|
||||
<unit id="org.hamcrest" version="1.1.0.v20090501071000"/>
|
||||
<unit id="org.hamcrest.text" version="1.1.0.v20090501071000"/>
|
||||
<unit id="org.mockito" version="1.9.5.v201605172210"/>
|
||||
<unit id="org.mockito.source" version="1.9.5.v201605172210"/>
|
||||
<unit id="org.slf4j.api" version="1.7.2.v20121108-1250"/>
|
||||
<unit id="org.slf4j.api.source" version="1.7.2.v20121108-1250"/>
|
||||
<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20160520211859/repository/"/>
|
||||
<repository location="https://download.eclipse.org/eclipse/updates/4.27/"/>
|
||||
<unit id="org.eclipse.equinox.p2.sdk.feature.group" version="3.11.1900.v20230120-0604"/>
|
||||
<unit id="org.eclipse.equinox.sdk.feature.group" version="3.23.700.v20230220-1352"/>
|
||||
<unit id="org.eclipse.platform.sdk" version="4.27.0.I20230302-0300"/>
|
||||
</location>
|
||||
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
|
||||
<repository location="http://download.eclipse.org/technology/swtbot/releases/2.8.0/"/>
|
||||
<unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
|
||||
<unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/>
|
||||
<unit id="org.eclipse.swtbot.eclipse.feature.group" version="2.8.0.201906121535"/>
|
||||
<unit id="org.eclipse.swtbot.eclipse.test.junit.feature.group" version="2.8.0.201906121535"/>
|
||||
<unit id="org.eclipse.swtbot.feature.group" version="2.8.0.201906121535"/>
|
||||
<unit id="org.eclipse.swtbot.forms.feature.group" version="2.8.0.201906121535"/>
|
||||
<unit id="org.eclipse.swtbot.ide.feature.group" version="2.8.0.201906121535"/>
|
||||
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20230302014618/repository/"/>
|
||||
<unit id="ch.qos.logback.slf4j" version="1.2.3.v20221112-0806"/>
|
||||
<unit id="ch.qos.logback.slf4j.source" version="1.2.3.v20221112-0806"/>
|
||||
<unit id="org.hamcrest" version="2.2.0.v20210711-0821"/>
|
||||
<unit id="org.hamcrest.source" version="2.2.0.v20210711-0821"/>
|
||||
<unit id="org.mockito.mockito-core" version="4.8.1.v20221103-2317"/>
|
||||
<unit id="org.mockito.mockito-core.source" version="4.8.1.v20221103-2317"/>
|
||||
<unit id="org.slf4j.api" version="1.7.30.v20221112-0806"/>
|
||||
<unit id="org.slf4j.api.source" version="1.7.30.v20221112-0806"/>
|
||||
</location>
|
||||
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
|
||||
<repository location="https://download.eclipse.org/technology/swtbot/releases/latest/"/>
|
||||
<unit id="org.eclipse.swtbot.feature.group" version="4.0.0.202206011610"/>
|
||||
<unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/>
|
||||
<unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/>
|
||||
<unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/>
|
||||
<unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/>
|
||||
</location>
|
||||
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
|
||||
<repository location="http://download.eclipse.org/eclipse/updates/4.7"/>
|
||||
<unit id="org.eclipse.platform.sdk" version="0.0.0"/>
|
||||
<unit id="org.eclipse.equinox.sdk.feature.group" version="0.0.0"/>
|
||||
<unit id="org.eclipse.equinox.p2.sdk.feature.group" version="0.0.0"/>
|
||||
<unit id="org.eclipse.swtbot.eclipse.feature.group" version="4.0.0.202206011610"/>
|
||||
<unit id="org.eclipse.swtbot.forms.feature.group" version="4.0.0.202206011610"/>
|
||||
<unit id="org.eclipse.swtbot.ide.feature.group" version="4.0.0.202206011610"/>
|
||||
<unit id="org.eclipse.swtbot.junit5.feature.group" version="4.0.0.202206011610"/>
|
||||
</location>
|
||||
</locations>
|
||||
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/java-11-openjdk-amd64"/>
|
||||
<environment>
|
||||
<os>linux</os>
|
||||
<ws>gtk</ws>
|
||||
<arch>x86_64</arch>
|
||||
</environment>
|
||||
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-19"/>
|
||||
</target>
|
Loading…
Reference in New Issue
Block a user