Merge branch 'master' into copy_libs
# Conflicts: # JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/.classpath # JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/META-INF/MANIFEST.MF # JavaCompilerPlugin/bundles/JavaCompilerPlugin.Plugin/build.properties
This commit is contained in:
commit
345f0cf14b
@ -1,23 +1,60 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: JavaCompilerPlugin.Plugin
|
||||
Bundle-SymbolicName: JavaCompilerPlugin.Plugin;singleton:=true
|
||||
Bundle-Name: TypinferenzPlugin
|
||||
Bundle-SymbolicName: TypinferenzPlugin;singleton:=true
|
||||
Bundle-Version: 0.1.0.qualifier
|
||||
Bundle-Vendor: de.dhbwstuttgart
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-ClassPath: .,
|
||||
bin,
|
||||
lib
|
||||
Automatic-Module-Name: JavaCompilerPlugin.Plugin;singleton:=true
|
||||
Bundle-Activator: typinferenzplugin.Activator
|
||||
Require-Bundle: org.eclipse.ui,
|
||||
javax.inject,
|
||||
org.eclipse.core.runtime,
|
||||
org.eclipse.jface.text,
|
||||
org.eclipse.jdt.ui,
|
||||
org.eclipse.ui.editors,
|
||||
org.eclipse.ui.workbench,
|
||||
org.eclipse.core.resources,
|
||||
org.eclipse.swt,
|
||||
org.eclipse.osgi,
|
||||
org.eclipse.jface,
|
||||
org.eclipse.e4.ui.services,
|
||||
org.eclipse.e4.ui.workbench,
|
||||
org.eclipse.e4.ui.di,
|
||||
org.eclipse.e4.core.di.annotations,
|
||||
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
|
||||
org.eclipse.equinox.ds; visibility:=reexport
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||
Provide-Capability: osgi.ee;osgi.ee="JavaSE";version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,9"
|
||||
Bundle-Activator: typinferenzplugin.Activator
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-ClassPath: .,
|
||||
lib/animal-sniffer-annotations.jar,
|
||||
lib/antlr4.jar,
|
||||
lib/antlr4-runtime.jar,
|
||||
lib/antlr-runtime.jar,
|
||||
lib/asm.jar,
|
||||
lib/bcel.jar,
|
||||
lib/checker-qual.jar,
|
||||
lib/commons-io.jar,
|
||||
lib/error_prone_annotations.jar,
|
||||
lib/failureaccess.jar,
|
||||
lib/guava.jar,
|
||||
lib/icu4j.jar,
|
||||
lib/j2objc-annotations.jar,
|
||||
lib/javassist.jar,
|
||||
lib/JavaTXcompiler.jar,
|
||||
lib/javax.json.jar,
|
||||
lib/jsr305.jar,
|
||||
lib/listenablefuture.jar,
|
||||
lib/org.abego.treelayout.core.jar,
|
||||
lib/reflections.jar,
|
||||
lib/ST4.jar,
|
||||
bin,
|
||||
typinferenzplugin
|
||||
Import-Package: javax.annotation;version="1.2.0"
|
||||
Automatic-Module-Name: TypinferenzPlugin
|
||||
|
@ -2,7 +2,7 @@
|
||||
<?eclipse version="3.4"?>
|
||||
<plugin>
|
||||
|
||||
<!-- Jav-Editor: -->
|
||||
<!-- Jav-Editor: -->
|
||||
<extension
|
||||
point="org.eclipse.ui.editors">
|
||||
<editor
|
||||
@ -16,19 +16,19 @@
|
||||
</editor>
|
||||
</extension>
|
||||
|
||||
<!-- Marker
|
||||
Tutorial dazu: http://cubussapiens.hu/2011/05/custom-markers-and-annotations-the-bright-side-of-eclipse/
|
||||
-->
|
||||
<extension
|
||||
id="typinferenzplugin.replacemarker"
|
||||
name="TypeReplaceMarker"
|
||||
point="org.eclipse.core.resources.markers">
|
||||
<super type="org.eclipse.core.resources.problemmarker" />
|
||||
<super type="org.eclipse.core.resources.textmarker" />
|
||||
</extension>
|
||||
<!-- Marker
|
||||
Tutorial dazu: http://cubussapiens.hu/2011/05/custom-markers-and-annotations-the-bright-side-of-eclipse/
|
||||
-->
|
||||
<extension
|
||||
id="typinferenzplugin.replacemarker"
|
||||
name="TypeReplaceMarker"
|
||||
point="org.eclipse.core.resources.markers">
|
||||
<super type="org.eclipse.core.resources.problemmarker" />
|
||||
<super type="org.eclipse.core.resources.textmarker" />
|
||||
</extension>
|
||||
|
||||
<!-- Src: http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fextension-points%2Forg_eclipse_ui_editors_annotationTypes.html -->
|
||||
<extension
|
||||
<!-- Src: http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fextension-points%2Forg_eclipse_ui_editors_annotationTypes.html -->
|
||||
<extension
|
||||
point="org.eclipse.ui.editors.annotationTypes">
|
||||
<type
|
||||
name="typinferenzplugin.annotation"
|
||||
@ -69,8 +69,8 @@
|
||||
</specification>
|
||||
</extension>
|
||||
|
||||
<!-- ExtensionPoint für die QuickFixes der ReplaceMarker Quelle: http://wiki.eclipse.org/FAQ_How_do_I_implement_Quick_Fixes_for_my_own_language%3F -->
|
||||
<extension point="org.eclipse.ui.ide.markerResolution">
|
||||
<!-- ExtensionPoint für die QuickFixes der ReplaceMarker Quelle: http://wiki.eclipse.org/FAQ_How_do_I_implement_Quick_Fixes_for_my_own_language%3F -->
|
||||
<extension point="org.eclipse.ui.ide.markerResolution">
|
||||
<markerResolutionGenerator
|
||||
markerType="typinferenzplugin.replacemarker"
|
||||
class="typinferenzplugin.marker.QuickFixer"/>
|
||||
|
@ -38,7 +38,7 @@ import typinferenzplugin.error.ErrorOutput;
|
||||
//Example from: http://help.eclipse.org/indigo/index.jsp
|
||||
/**
|
||||
* Editor für .jav-Dateien
|
||||
* Anmerkung: Für jede geöffnete Datei wird eine Instanz des Editors erstellt
|
||||
* Anmerkung: Für jede geöffntete Datei wird eine Instanz des Editors erstellt
|
||||
* @author janulrich
|
||||
*
|
||||
*/
|
||||
@ -115,7 +115,7 @@ public class JavEditor extends TextEditor{
|
||||
}catch(TypeinferenceException texc){
|
||||
markers.add(new ErrorMarker(texc.getMessage(),new CodePoint(texc.getOffset())));
|
||||
}
|
||||
//Anschließend die TypeReplaceMarker im Quellcode anzeigen: https://stackoverflow.com/questions/8945371/how-to-implement-quick-fix-quick-assist-for-custom-eclipse-editor
|
||||
//Anschließend die TypeReplaceMarker im Quellcode anzeigen: https://stackoverflow.com/questions/8945371/how-to-implement-quick-fix-quick-assist-for-custom-eclipse-editor
|
||||
System.out.println("Typinferez durchgeführt. Berechnete Marker:\n"+markers);
|
||||
|
||||
IResource activeDocument = extractResource();
|
||||
@ -182,7 +182,7 @@ public class JavEditor extends TextEditor{
|
||||
}
|
||||
|
||||
/**
|
||||
* Löscht die zu marker gehörende Annotation
|
||||
* Löscht die zu marker gehörende Annotation
|
||||
* @param marker
|
||||
*/
|
||||
private void deleteAnnotation(JavMarker marker){
|
||||
@ -211,7 +211,7 @@ public class JavEditor extends TextEditor{
|
||||
|
||||
|
||||
/**
|
||||
* Diese Funktion führt einen ReplaceMarker aus.
|
||||
* Diese Funktion führt einen ReplaceMarker aus.
|
||||
* @param typeReplaceMarker
|
||||
*/
|
||||
public void runReplaceMarker(TypeReplaceMarker typeReplaceMarker) {
|
||||
@ -239,7 +239,7 @@ public class JavEditor extends TextEditor{
|
||||
|
||||
/**
|
||||
* Aktualisiert die OutlinePage, falls vorhanden.
|
||||
* Muss nach Änderungen an markers aufgerufen werden.
|
||||
* Muss nach Änderungen an markers aufgerufen werden.
|
||||
*/
|
||||
private void updateOutlinePage() {
|
||||
if(this.outlinePage!= null && this.sourceFile != null && this.errorMarkers != null)
|
||||
@ -255,7 +255,7 @@ public class JavEditor extends TextEditor{
|
||||
}
|
||||
|
||||
/**
|
||||
* Ermittelt die momentan an dem Dokument, für welches dieser Editor zuständig ist, angebrachten TypeReplaceMarker.
|
||||
* Ermittelt die momentan an dem Dokument, für welches dieser Editor zuständig ist, angebrachten TypeReplaceMarker.
|
||||
* Dabei werden die ReplaceMarker herausgefiltert, welche mindestens einen Typ an dem übergebenen offset einsetzen.
|
||||
* @param offset
|
||||
* @return
|
||||
|
@ -14,6 +14,7 @@ import org.eclipse.jface.text.contentassist.CompletionProposal;
|
||||
import org.eclipse.jface.text.contentassist.ContentAssistant;
|
||||
import org.eclipse.jface.text.contentassist.ContextInformation;
|
||||
import org.eclipse.jface.text.contentassist.ICompletionProposal;
|
||||
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
|
||||
import org.eclipse.jface.text.contentassist.IContentAssistant;
|
||||
import org.eclipse.jface.text.contentassist.IContextInformation;
|
||||
import org.eclipse.jface.text.presentation.IPresentationReconciler;
|
||||
@ -44,8 +45,9 @@ public class JavViewerConfiguration extends SourceViewerConfiguration {
|
||||
|
||||
private JavEditor editor;
|
||||
|
||||
public JavViewerConfiguration(JavEditor parentEditor){
|
||||
public JavViewerConfiguration(JavEditor editor){
|
||||
super();
|
||||
|
||||
this.editor = editor;
|
||||
}
|
||||
|
||||
@ -125,6 +127,16 @@ public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceVie
|
||||
ret.setInformationControlCreator(getInformationControlCreator(sourceViewer));
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IContentAssistant getContentAssistant(ISourceViewer sv) {
|
||||
ContentAssistant ca = new ContentAssistant();
|
||||
IContentAssistProcessor pr = new JafCompletionProcess();
|
||||
ca.setContentAssistProcessor(pr, IDocument.DEFAULT_CONTENT_TYPE);
|
||||
ca.setInformationControlCreator(getInformationControlCreator(sv));
|
||||
return ca;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
</license>
|
||||
|
||||
<plugin
|
||||
id="JavaCompilerPlugin.Plugin"
|
||||
id="TypinferenzPlugin"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
|
@ -1,8 +1,7 @@
|
||||
<project>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>de.dhbwstuttgart</groupId>
|
||||
<artifactId>JavaCompilerPlugin</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<parent>
|
||||
<groupId>de.dhbwstuttgart</groupId>
|
||||
|
@ -7,8 +7,10 @@
|
||||
|
||||
<properties>
|
||||
<tycho.version>1.2.0</tycho.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<eclipse-repo.url>http://download.eclipse.org/releases/oxygen</eclipse-repo.url>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<downloadSources>true</downloadSources>
|
||||
<downloadJavadocs>true</downloadJavadocs>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
|
Loading…
Reference in New Issue
Block a user