Skip to content
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
1 change: 0 additions & 1 deletion .github/scripts/regenerate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ EXCLUDE=(

# Workflows whose committed output still differs from what they generate, with the issue that fixes each.
KNOWN_DRIFT=(
com.avaloq.tools.ddk.check.test.runtime/src/com/avaloq/tools/ddk/check/GenerateTestLanguage.mwe2 # #1672
)

root=$(git rev-parse --show-toplevel)
Expand Down
12 changes: 12 additions & 0 deletions com.avaloq.tools.ddk.check.test.runtime.ide/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-gen">
<attributes>
<attribute name="ignore_optional_problems" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
81 changes: 81 additions & 0 deletions com.avaloq.tools.ddk.check.test.runtime.ide/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.avaloq.tools.ddk.check.test.runtime.ide</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<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>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
<linkedResources>
<link>
<name>.checkstyle</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.checkstyle</locationURI>
</link>
<link>
<name>.fbprefs</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.fbprefs</locationURI>
</link>
<link>
<name>.pmd</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.pmd</locationURI>
</link>
<link>
<name>.settings/edu.umd.cs.findbugs.plugin.eclipse.prefs</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.settings/edu.umd.cs.findbugs.plugin.eclipse.prefs</locationURI>
</link>
<link>
<name>.settings/org.eclipse.core.resources.prefs</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.settings/org.eclipse.core.resources.prefs</locationURI>
</link>
<link>
<name>.settings/org.eclipse.core.runtime.prefs</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.settings/org.eclipse.core.runtime.prefs</locationURI>
</link>
<link>
<name>.settings/org.eclipse.jdt.core.prefs</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.settings/org.eclipse.jdt.core.prefs</locationURI>
</link>
<link>
<name>.settings/org.eclipse.jdt.ui.prefs</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.settings/org.eclipse.jdt.ui.prefs</locationURI>
</link>
<link>
<name>.settings/org.eclipse.pde.core.prefs</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.settings/org.eclipse.pde.core.prefs</locationURI>
</link>
</linkedResources>
</projectDescription>
Empty file.
14 changes: 14 additions & 0 deletions com.avaloq.tools.ddk.check.test.runtime.ide/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: com.avaloq.tools.ddk.check.test.runtime.ide
Bundle-Vendor: Avaloq Group AG
Bundle-Version: 17.3.1.qualifier
Bundle-SymbolicName: com.avaloq.tools.ddk.check.test.runtime.ide; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: com.avaloq.tools.ddk.check.test.runtime,
org.eclipse.xtext.ide,
org.antlr.runtime
Bundle-RequiredExecutionEnvironment: JavaSE-21
Automatic-Module-Name: com.avaloq.tools.ddk.check.test.runtime.ide
Export-Package: com.avaloq.tools.ddk.check.ide.contentassist.antlr,
com.avaloq.tools.ddk.check.ide.contentassist.antlr.internal
4 changes: 4 additions & 0 deletions com.avaloq.tools.ddk.check.test.runtime.ide/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source.. = src/,\
src-gen/
bin.includes = META-INF/,\
.
13 changes: 13 additions & 0 deletions com.avaloq.tools.ddk.check.test.runtime.ide/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<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>
<artifactId>ddk-parent</artifactId>
<groupId>com.avaloq.tools.ddk</groupId>
<version>18.0.1-SNAPSHOT</version>
<relativePath>../ddk-parent</relativePath>
</parent>
<version>17.3.1-SNAPSHOT</version>

<artifactId>com.avaloq.tools.ddk.check.test.runtime.ide</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
com.avaloq.tools.ddk.check.ide.TestLanguageIdeSetup
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
* generated by Xtext
*/
package com.avaloq.tools.ddk.check.ide;

import com.avaloq.tools.ddk.check.ide.contentassist.antlr.TestLanguageParser;
import com.avaloq.tools.ddk.check.ide.contentassist.antlr.internal.InternalTestLanguageLexer;
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 TestLanguageIdeModule}.
*/
@SuppressWarnings("all")
public abstract class AbstractTestLanguageIdeModule 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(InternalTestLanguageLexer.class);
}

// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class<? extends IContentAssistParser> bindIContentAssistParser() {
return TestLanguageParser.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;
}

}
Original file line number Diff line number Diff line change
@@ -1,29 +1,24 @@
/*
* generated by Xtext
*/
package com.avaloq.tools.ddk.check.ui.contentassist.antlr;
package com.avaloq.tools.ddk.check.ide.contentassist.antlr;

import java.util.Collection;
import java.util.Collections;

import org.eclipse.xtext.AbstractRule;
import org.eclipse.xtext.ui.codetemplates.ui.partialEditing.IPartialContentAssistParser;
import org.eclipse.xtext.ui.editor.contentassist.antlr.FollowElement;
import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;
import org.eclipse.xtext.ide.editor.contentassist.antlr.FollowElement;
import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;
import org.eclipse.xtext.util.PolymorphicDispatcher;

/*
* Template CodetemplatesGeneratorFragment.xpt
*/
public class PartialTestLanguageContentAssistParser extends TestLanguageParser implements IPartialContentAssistParser {
public class PartialTestLanguageContentAssistParser extends TestLanguageParser {

private AbstractRule rule;

@Override
public void initializeFor(AbstractRule rule) {
this.rule = rule;
}

@Override
protected Collection<FollowElement> getFollowElements(AbstractInternalContentAssistParser parser) {
if (rule == null || rule.eIsProxy())
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/*
* generated by Xtext
*/
package com.avaloq.tools.ddk.check.ide.contentassist.antlr;

import com.avaloq.tools.ddk.check.ide.contentassist.antlr.internal.InternalTestLanguageParser;
import com.avaloq.tools.ddk.check.services.TestLanguageGrammarAccess;
import com.google.common.collect.ImmutableMap;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import java.util.Map;
import org.eclipse.xtext.AbstractElement;
import org.eclipse.xtext.ide.editor.contentassist.antlr.AbstractContentAssistParser;

public class TestLanguageParser extends AbstractContentAssistParser {

@Singleton
public static final class NameMappings {

private final Map<AbstractElement, String> mappings;

@Inject
public NameMappings(TestLanguageGrammarAccess grammarAccess) {
ImmutableMap.Builder<AbstractElement, String> builder = ImmutableMap.builder();
init(builder, grammarAccess);
this.mappings = builder.build();
}

public String getRuleName(AbstractElement element) {
return mappings.get(element);
}

private static void init(ImmutableMap.Builder<AbstractElement, String> builder, TestLanguageGrammarAccess grammarAccess) {
builder.put(grammarAccess.getGreetingAccess().getGroup(), "rule__Greeting__Group__0");
builder.put(grammarAccess.getModelAccess().getGreetingsAssignment(), "rule__Model__GreetingsAssignment");
builder.put(grammarAccess.getGreetingAccess().getNameAssignment_1(), "rule__Greeting__NameAssignment_1");
}
}

@Inject
private NameMappings nameMappings;

@Inject
private TestLanguageGrammarAccess grammarAccess;

@Override
protected InternalTestLanguageParser createParser() {
InternalTestLanguageParser result = new InternalTestLanguageParser(null);
result.setGrammarAccess(grammarAccess);
return result;
}

@Override
protected String getRuleName(AbstractElement element) {
return nameMappings.getRuleName(element);
}

@Override
protected String[] getInitialHiddenTokens() {
return new String[] { "RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT" };
}

public TestLanguageGrammarAccess getGrammarAccess() {
return this.grammarAccess;
}

public void setGrammarAccess(TestLanguageGrammarAccess grammarAccess) {
this.grammarAccess = grammarAccess;
}

public NameMappings getNameMappings() {
return nameMappings;
}

public void setNameMappings(NameMappings nameMappings) {
this.nameMappings = nameMappings;
}
}
Loading