Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: DSL for the component editor #635

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions bundles/com.espressif.idf.component.dsl.parent/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.espressif.idf.component.dsl.parent</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="src" path="xtend-gen"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.espressif.idf.component.dsl.ide</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Manifest-Version: 1.0
Automatic-Module-Name: com.espressif.idf.component.dsl.ide
Bundle-ManifestVersion: 2
Bundle-Name: com.espressif.idf.component.dsl.ide
Bundle-Vendor: My Company
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: com.espressif.idf.component.dsl.ide; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: com.espressif.idf.component.dsl,
org.eclipse.xtext.ide,
org.eclipse.xtext.xbase.ide,
org.antlr.runtime;bundle-version="[3.2.0,3.2.1)"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: com.espressif.idf.componen.ide.contentassist.antlr.internal,
com.espressif.idf.componen.ide.contentassist.antlr
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source.. = src/,\
src-gen/,\
xtend-gen/
bin.includes = .,\
META-INF/
bin.excludes = **/*.xtend
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
<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>
<parent>
<groupId>com.espressif.idf.component.dsl</groupId>
<artifactId>com.espressif.idf.component.dsl.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>com.espressif.idf.component.dsl.ide</artifactId>
<packaging>eclipse-plugin</packaging>

<dependencies>
<dependency>
<groupId>ch.qos.reload4j</groupId>
<artifactId>reload4j</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.lsp4j</groupId>
<artifactId>org.eclipse.lsp4j</artifactId>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<configuration>
<pomDependencies>consider</pomDependencies>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<excludeGroupIds>p2.eclipse-feature</excludeGroupIds>
<outputDirectory>${project.build.directory}/libs</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
<excludeTransitive>true</excludeTransitive>
<excludeArtifactIds>
com.ibm.icu,
org.apache.ant,
org.apache.commons.lang,
org.apache.commons.logging,
org.eclipse.core.commands,
org.eclipse.core.contenttype,
org.eclipse.core.expressions,
org.eclipse.core.filesystem,
org.eclipse.core.jobs,
org.eclipse.core.resources,
org.eclipse.core.runtime,
org.eclipse.core.variables,
org.eclipse.debug.core,
org.eclipse.emf.codegen.ecore,
org.eclipse.emf.codegen,
org.eclipse.emf.mwe.core,
org.eclipse.emf.mwe.utils,
org.eclipse.emf.mwe2.lib,
org.eclipse.emf.mwe2.runtime,
org.eclipse.equinox.app,
org.eclipse.equinox.preferences,
org.eclipse.equinox.registry,
org.eclipse.jdt.core,
org.eclipse.jdt.debug,
org.eclipse.jdt.launching,
org.eclipse.text,
</excludeArtifactIds>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.googlecode.addjars-maven-plugin</groupId>
<artifactId>addjars-maven-plugin</artifactId>
<version>1.0.5</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>add-jars</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>${project.build.directory}/libs</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.eclipse.xtext.ide.server.ServerLauncher</mainClass>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>plugin.properties</resource>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer">
</transformer>
</transformers>
<artifactSet>
<excludes><!-- avoid duplicate inclusion due to addjars plugin -->
<exclude>*:com.espressif.idf.component.dsl.ide-org.eclipse.lsp4j*</exclude>
<exclude>*:com.espressif.idf.component.dsl.ide-org.eclipse.xtext.xbase.lib*</exclude>
<exclude>*:com.espressif.idf.component.dsl.ide-org.eclipse.xtend.lib*</exclude>
<exclude>*:com.espressif.idf.component.dsl.ide-com.google.guava*</exclude>
<exclude>*:com.espressif.idf.component.dsl.ide-asm*</exclude>
<exclude>*:com.espressif.idf.component.dsl.ide-log4j*</exclude>
<exclude>*:com.espressif.idf.component.dsl.ide-reload4j*</exclude>
<exclude>*:com.espressif.idf.component.dsl.ide-org.objectweb.asm*</exclude>
<exclude>*:com.espressif.idf.component.dsl.ide-org.apache.log4j*</exclude>
</excludes>
</artifactSet>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/INDEX.LIST</exclude>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
<exclude>.options</exclude>
<exclude>.api_description</exclude>
<exclude>*.profile</exclude>
<exclude>*.html</exclude>
<exclude>about.*</exclude>
<exclude>about_files/*</exclude>
<exclude>plugin.xml</exclude>
<exclude>systembundle.properties</exclude>
<exclude>profile.list</exclude>
<exclude>**/*._trace</exclude>
<exclude>**/*.g</exclude>
<exclude>**/*.mwe2</exclude>
<exclude>**/*.xtext</exclude>
</excludes>
</filter>
</filters>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>ls</shadedClassifierName>
<minimizeJar>false</minimizeJar>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
com.espressif.idf.componen.ide.IDFComponentDslIdeSetup
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
* generated by Xtext 2.28.0
*/
package com.espressif.idf.componen.ide;

import com.espressif.idf.componen.ide.contentassist.antlr.IDFComponentDslParser;
import com.espressif.idf.componen.ide.contentassist.antlr.internal.InternalIDFComponentDslLexer;
import com.google.inject.Binder;
import com.google.inject.name.Names;
import org.eclipse.xtext.ide.DefaultIdeModule;
import org.eclipse.xtext.ide.LexerIdeBindings;
import org.eclipse.xtext.ide.editor.contentassist.FQNPrefixMatcher;
import org.eclipse.xtext.ide.editor.contentassist.IPrefixMatcher;
import org.eclipse.xtext.ide.editor.contentassist.IProposalConflictHelper;
import org.eclipse.xtext.ide.editor.contentassist.antlr.AntlrProposalConflictHelper;
import org.eclipse.xtext.ide.editor.contentassist.antlr.IContentAssistParser;
import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.Lexer;
import org.eclipse.xtext.ide.refactoring.IRenameStrategy2;
import org.eclipse.xtext.ide.server.rename.IRenameService2;
import org.eclipse.xtext.ide.server.rename.RenameService2;

/**
* Manual modifications go to {@link IDFComponentDslIdeModule}.
*/
@SuppressWarnings("all")
public abstract class AbstractIDFComponentDslIdeModule extends DefaultIdeModule {

// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public void configureContentAssistLexer(Binder binder) {
binder.bind(Lexer.class)
.annotatedWith(Names.named(LexerIdeBindings.CONTENT_ASSIST))
.to(InternalIDFComponentDslLexer.class);
}

// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class<? extends IContentAssistParser> bindIContentAssistParser() {
return IDFComponentDslParser.class;
}

// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class<? extends IProposalConflictHelper> bindIProposalConflictHelper() {
return AntlrProposalConflictHelper.class;
}

// contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2
public Class<? extends IPrefixMatcher> bindIPrefixMatcher() {
return FQNPrefixMatcher.class;
}

// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2
public Class<? extends IRenameService2> bindIRenameService2() {
return RenameService2.class;
}

// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2
public Class<? extends IRenameStrategy2> bindIRenameStrategy2() {
return IRenameStrategy2.DefaultImpl.class;
}

}
Loading