Compare commits

...

41 Commits

Author SHA1 Message Date
52c0c1d9a6 adds more fixes for #7 2023-01-08 18:56:49 +01:00
80ebbbea0f fixes #7 2023-01-08 18:35:16 +01:00
f7c2614e8a Merge branch 'release/1.4.1' 2023-01-05 16:18:00 +01:00
35a4e7f5cf updates version number 2023-01-05 16:17:49 +01:00
d657ab45b7 Merge branch 'hotfix/offest_propagation' 2023-01-05 14:28:32 +01:00
e2d7a0f180 Merge branch 'hotfix/offest_propagation' into develop 2023-01-05 14:28:32 +01:00
13594cf149 adds offset to registerResources() function for simple regs (#6) 2023-01-05 14:28:23 +01:00
c6efe0f9d2 Merge branch 'release/1.4.0' 2022-11-13 09:15:16 +01:00
262100d648 updates build setup 2022-11-13 09:12:11 +01:00
ab015c3d88 extends standalone help output 2022-11-13 09:12:11 +01:00
30b425dbcf updates build setup 2022-11-13 09:05:00 +01:00
aa866c26a3 extends standalone help output 2022-11-13 09:03:45 +01:00
53bee39661
Merge pull request #5 from Minres/develop
Develop
2022-10-26 15:48:07 +02:00
954bf79d9c updates build system and versions 2022-10-26 15:42:08 +02:00
26fc38b7ee adds more configurability of output 2022-10-26 10:30:44 +02:00
1d2384257e extends configurability of generator 2022-10-24 20:18:49 +02:00
1c9c0ee340 updates target platform and removes product 2022-10-22 12:14:26 +02:00
96c8c1310e add read-only/write-only reg gen 2022-02-15 14:41:58 +01:00
0ced8fcec4 cleanup 2022-02-13 23:09:10 +01:00
9211dfdb68 Merge branch 'master' of https://github.com/Minres/RDL-Editor.git 2022-02-13 22:36:13 +01:00
9fdaf19fea Merge branch 'release/1.3.0' into develop 2022-02-13 22:35:15 +01:00
84d69fef5b Merge branch 'release/1.3.0' 2022-02-13 22:35:15 +01:00
1639239b2b update version numbers 2022-02-13 22:35:04 +01:00
dae876ff84 update templates 2022-02-13 22:12:40 +01:00
a78566675e cleanup build path 2022-02-13 18:17:05 +01:00
291a079bc0
Merge pull request #4 from Minres/develop
fix log4j version
2022-02-13 17:53:00 +01:00
6b1bc92918 fix log4j version 2022-02-13 17:51:51 +01:00
5a62a66f94 update build versions 2022-02-13 17:46:43 +01:00
ffa5058caa remove generated files 2022-02-13 16:53:04 +01:00
c827f261ff update target platform incl. XText/Xtend 2022-02-13 12:40:21 +01:00
564977ed54 fix import warnings 2020-10-08 08:41:59 +02:00
add1d362cc fix #1 'Generate register access functions for FW' 2020-10-08 08:40:04 +02:00
1804692f8d remove not needed target definitions 2020-10-08 07:21:08 +02:00
ef9391a196 gitignore added 2018-07-29 19:30:38 +02:00
2173b0554f Fixed pom dependencies 2018-07-29 13:03:45 +02:00
7e060f2a7e Bumped version numbers 2018-06-04 21:12:17 +02:00
c2ff8f1f67 Fixed NPE in generator 2018-06-04 20:55:10 +02:00
aee194f777 Fixed project wizard and removed JDT/PDE dependency 2018-06-04 20:54:35 +02:00
c7d8d6c417 Cleanup and fix of old settings 2018-06-04 18:49:04 +02:00
acb5b95f5a Fixed pom setting for product naming 2018-06-03 13:02:58 +02:00
e43f205ba7 Fixed version numbers 2018-06-03 11:19:08 +02:00
214 changed files with 3391 additions and 6489 deletions

3
.gitignore vendored
View File

@ -3,3 +3,6 @@ com.minres.rdl.parent/*/target
*.xtextbin
*.xtendbin
*._trace
/.envrc
/*.py
/*.txt

24
Modulefile Normal file
View File

@ -0,0 +1,24 @@
#%Module######################################################################
##
## Project Module
##
proc ModulesHelp { } {
puts stderr "\tThe TGFS-CG Project Module\n"
puts stderr "\tThis module loads PATHs and variables for accessing Verilator."
}
#set distro [exec /bin/lsb_release -i -s]
#if { $distro == "CentOS" && ![info exists ::env(PROJECT)] && ![info exists ::env(PCP_DIR)] } {
# puts stderr "Don't forget to execute 'scl enable devtoolset-7 bash'"
#}
if {![info exists ::env(PROJECT)] && [file exists $::env(HOME)/.sdkman/candidates/java/17.0.2-open/] != 1} {
puts stderr "Please install java via 'sdk install java 17.0.2-open'!"
prereq java/17.0.2
} else {
prepend-path PATH $::env(HOME)/.sdkman/candidates/java/17.0.2-open/bin
}
setenv PROJECT RDL-Editor

View File

@ -2,7 +2,7 @@
<feature
id="com.minres.rdl.feature"
label="RDL Feature "
version="1.0.0.qualifier"
version="1.4.1"
provider-name="MINRES Technologies GmbH">
<plugin

View File

@ -4,7 +4,7 @@
<parent>
<groupId>com.minres.rdl</groupId>
<artifactId>com.minres.rdl.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.4.1</version>
</parent>
<artifactId>com.minres.rdl.feature</artifactId>
<packaging>eclipse-feature</packaging>

View File

@ -3,7 +3,7 @@
<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-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -0,0 +1 @@
/xtend-gen/

View File

@ -1,7 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
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.source=1.8
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11

View File

@ -3,14 +3,13 @@ Automatic-Module-Name: com.minres.rdl.ide
Bundle-ManifestVersion: 2
Bundle-Name: com.minres.rdl.ide
Bundle-Vendor: My Company
Bundle-Version: 1.0.0.qualifier
Bundle-Version: 1.4.1
Bundle-SymbolicName: com.minres.rdl.ide; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: com.minres.rdl,
org.eclipse.xtext.ide,
org.eclipse.xtext.xbase.ide,
org.antlr.runtime
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
org.antlr.runtime;bundle-version="[3.2.0,3.2.1)"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: com.minres.rdl.ide.contentassist.antlr.internal,
com.minres.rdl.ide.contentassist.antlr

View File

@ -4,7 +4,7 @@
<parent>
<groupId>com.minres.rdl</groupId>
<artifactId>com.minres.rdl.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.4.1</version>
</parent>
<artifactId>com.minres.rdl.ide</artifactId>
<packaging>eclipse-plugin</packaging>
@ -13,27 +13,22 @@
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
<dependency>
<groupId>org.eclipse.lsp4j</groupId>
<artifactId>org.eclipse.lsp4j</artifactId>
<version>0.4.0</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>6.1.1</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
<version>6.1.1</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-tree</artifactId>
<version>6.1.1</version>
</dependency>
</dependencies>
<build>

View File

@ -1,5 +1,5 @@
/*
* generated by Xtext 2.14.0
* generated by Xtext 2.26.0
*/
package com.minres.rdl.ide;
@ -16,8 +16,8 @@ import org.eclipse.xtext.ide.editor.contentassist.antlr.AntlrProposalConflictHel
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.IRenameService;
import org.eclipse.xtext.ide.server.rename.RenameService;
import org.eclipse.xtext.ide.server.rename.IRenameService2;
import org.eclipse.xtext.ide.server.rename.RenameService2;
/**
* Manual modifications go to {@link RDLIdeModule}.
@ -48,8 +48,8 @@ public abstract class AbstractRDLIdeModule extends DefaultIdeModule {
}
// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2
public Class<? extends IRenameService> bindIRenameService() {
return RenameService.class;
public Class<? extends IRenameService2> bindIRenameService2() {
return RenameService2.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2

View File

@ -1,5 +1,5 @@
/*
* generated by Xtext 2.14.0
* generated by Xtext 2.26.0
*/
package com.minres.rdl.ide.contentassist.antlr;
@ -8,10 +8,9 @@ import java.util.Collections;
import org.eclipse.xtext.AbstractRule;
import org.eclipse.xtext.ide.editor.contentassist.antlr.FollowElement;
import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;
import org.eclipse.xtext.ide.editor.partialEditing.IPartialEditingContentAssistParser;
import org.eclipse.xtext.util.PolymorphicDispatcher;
public class PartialRDLContentAssistParser extends RDLParser implements IPartialEditingContentAssistParser {
public class PartialRDLContentAssistParser extends RDLParser {
private AbstractRule rule;

View File

@ -1,5 +1,5 @@
/*
* generated by Xtext 2.14.0
* generated by Xtext 2.26.0
*/
package com.minres.rdl.ide.contentassist.antlr;

View File

@ -1,5 +1,5 @@
/*
* generated by Xtext 2.14.0
* generated by Xtext 2.26.0
*/
grammar InternalRDL;

View File

@ -1,13 +0,0 @@
/**
* generated by Xtext 2.14.0
*/
package com.minres.rdl.ide;
import com.minres.rdl.ide.AbstractRDLIdeModule;
/**
* Use this class to register ide components.
*/
@SuppressWarnings("all")
public class RDLIdeModule extends AbstractRDLIdeModule {
}

View File

@ -1,24 +0,0 @@
/**
* generated by Xtext 2.14.0
*/
package com.minres.rdl.ide;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.minres.rdl.RDLRuntimeModule;
import com.minres.rdl.RDLStandaloneSetup;
import com.minres.rdl.ide.RDLIdeModule;
import org.eclipse.xtext.util.Modules2;
/**
* Initialization support for running Xtext languages as language servers.
*/
@SuppressWarnings("all")
public class RDLIdeSetup extends RDLStandaloneSetup {
@Override
public Injector createInjector() {
RDLRuntimeModule _rDLRuntimeModule = new RDLRuntimeModule();
RDLIdeModule _rDLIdeModule = new RDLIdeModule();
return Guice.createInjector(Modules2.mixin(_rDLRuntimeModule, _rDLIdeModule));
}
}

View File

@ -2,7 +2,7 @@
<feature
id="com.minres.rdl.platform.feature"
label="Xtext Platform Feature"
version="1.0.0.qualifier"
version="1.4.1"
provider-name="MINRES Technologies GmbH">
<description url="http://www.example.com/description">
@ -130,21 +130,6 @@
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.jdt.compiler.tool"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>
<plugin
id="org.eclipse.pde.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.equinox.p2.repository"
download-size="0"
@ -278,13 +263,6 @@
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.pde.core"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.emf.codegen"
download-size="0"
@ -398,13 +376,6 @@
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.jdt.junit"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.xtext"
download-size="0"
@ -488,12 +459,6 @@
install-size="0"
version="0.0.0"/>
<plugin
id="org.eclipse.jdt.debug"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.eclipse.emf.mwe2.language"
download-size="0"
@ -578,13 +543,6 @@
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.jdt.launching"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.emf.mwe2.runtime"
download-size="0"
@ -683,13 +641,6 @@
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.jdt.debug.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.equinox.p2.operations"
download-size="0"
@ -697,13 +648,6 @@
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.jdt.junit.runtime"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.ant.launching"
download-size="0"
@ -816,13 +760,6 @@
version="0.0.0"
unpack="false"/>
<plugin
id="javax.servlet"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.objectweb.asm"
download-size="0"
@ -851,13 +788,6 @@
fragment="true"
unpack="false"/>
<plugin
id="org.eclipse.equinox.util"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.core.variables"
download-size="0"
@ -1018,13 +948,6 @@
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.jdt.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.w3c.dom.svg"
download-size="0"
@ -1046,13 +969,6 @@
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.jdt.junit.core"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.e4.ui.workbench"
download-size="0"
@ -1137,12 +1053,6 @@
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.pde.build"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.eclipse.ant.core"
download-size="0"
@ -1220,13 +1130,6 @@
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.jdt.core.manipulation"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.ui.trace"
download-size="0"
@ -1248,13 +1151,6 @@
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.pde.launching"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.apache.commons.lang"
download-size="0"
@ -1290,14 +1186,6 @@
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.jdt.compiler.apt"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>
<plugin
id="org.eclipse.osgi.services"
download-size="0"
@ -1340,13 +1228,6 @@
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.jdt.core"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.ui.editors"
download-size="0"
@ -1361,13 +1242,6 @@
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.equinox.ds"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.xtext.common.types"
download-size="0"

View File

@ -4,7 +4,7 @@
<parent>
<groupId>com.minres.rdl</groupId>
<artifactId>com.minres.rdl.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.4.1</version>
</parent>
<artifactId>com.minres.rdl.platform.feature</artifactId>
<packaging>eclipse-feature</packaging>

View File

@ -2,7 +2,7 @@
<feature
id="com.minres.rdl.product.feature"
label="RDL Feature "
version="1.0.0.qualifier"
version="1.4.1"
provider-name="MINRES Technologies GmbH">
<requires>

View File

@ -4,7 +4,7 @@
<parent>
<groupId>com.minres.rdl</groupId>
<artifactId>com.minres.rdl.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.4.1</version>
</parent>
<artifactId>com.minres.rdl.product.feature</artifactId>
<packaging>eclipse-feature</packaging>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>
<product name="RDL Editor" uid="com.minres.rdl.product.product" id="com.minres.rdl.product.product" application="org.eclipse.ui.ide.workbench" version="1.2.0.qualifier" useFeatures="true" includeLaunchers="true">
<product name="RDL Editor" uid="com.minres.rdl.product.product" id="com.minres.rdl.product.product" application="org.eclipse.ui.ide.workbench" version="1.4.0.qualifier" useFeatures="true" includeLaunchers="true">
<configIni use="default">
</configIni>
@ -23,86 +23,12 @@
</vm>
<plugins>
<plugin id="com.ibm.icu"/>
<plugin id="com.minres.rdl.product"/>
<plugin id="javax.inject"/>
<plugin id="javax.xml"/>
<plugin id="org.apache.batik.css"/>
<plugin id="org.apache.batik.util"/>
<plugin id="org.apache.batik.util.gui"/>
<plugin id="org.apache.commons.jxpath"/>
<plugin id="org.eclipse.core.commands"/>
<plugin id="org.eclipse.core.contenttype"/>
<plugin id="org.eclipse.core.databinding"/>
<plugin id="org.eclipse.core.databinding.observable"/>
<plugin id="org.eclipse.core.databinding.property"/>
<plugin id="org.eclipse.core.expressions"/>
<plugin id="org.eclipse.core.filesystem"/>
<plugin id="org.eclipse.core.filesystem.macosx" fragment="true"/>
<plugin id="org.eclipse.core.jobs"/>
<plugin id="org.eclipse.core.runtime"/>
<plugin id="org.eclipse.e4.core.commands"/>
<plugin id="org.eclipse.e4.core.contexts"/>
<plugin id="org.eclipse.e4.core.di"/>
<plugin id="org.eclipse.e4.core.di.annotations"/>
<plugin id="org.eclipse.e4.core.di.extensions"/>
<plugin id="org.eclipse.e4.core.services"/>
<plugin id="org.eclipse.e4.emf.xpath"/>
<plugin id="org.eclipse.e4.ui.bindings"/>
<plugin id="org.eclipse.e4.ui.css.core"/>
<plugin id="org.eclipse.e4.ui.css.swt"/>
<plugin id="org.eclipse.e4.ui.css.swt.theme"/>
<plugin id="org.eclipse.e4.ui.di"/>
<plugin id="org.eclipse.e4.ui.model.workbench"/>
<plugin id="org.eclipse.e4.ui.services"/>
<plugin id="org.eclipse.e4.ui.widgets"/>
<plugin id="org.eclipse.e4.ui.workbench"/>
<plugin id="org.eclipse.e4.ui.workbench.addons.swt"/>
<plugin id="org.eclipse.e4.ui.workbench.renderers.swt"/>
<plugin id="org.eclipse.e4.ui.workbench.renderers.swt.cocoa" fragment="true"/>
<plugin id="org.eclipse.e4.ui.workbench.swt"/>
<plugin id="org.eclipse.e4.ui.workbench3"/>
<plugin id="org.eclipse.emf.common"/>
<plugin id="org.eclipse.emf.ecore"/>
<plugin id="org.eclipse.emf.ecore.change"/>
<plugin id="org.eclipse.emf.ecore.xmi"/>
<plugin id="org.eclipse.equinox.app"/>
<plugin id="org.eclipse.equinox.bidi"/>
<plugin id="org.eclipse.equinox.common"/>
<plugin id="org.eclipse.equinox.p2.core"/>
<plugin id="org.eclipse.equinox.p2.engine"/>
<plugin id="org.eclipse.equinox.p2.metadata"/>
<plugin id="org.eclipse.equinox.p2.metadata.repository"/>
<plugin id="org.eclipse.equinox.p2.repository"/>
<plugin id="org.eclipse.equinox.preferences"/>
<plugin id="org.eclipse.equinox.registry"/>
<plugin id="org.eclipse.equinox.security"/>
<plugin id="org.eclipse.equinox.security.macosx" fragment="true"/>
<plugin id="org.eclipse.help"/>
<plugin id="org.eclipse.jface"/>
<plugin id="org.eclipse.jface.databinding"/>
<plugin id="org.eclipse.jface.text"/>
<plugin id="org.eclipse.osgi"/>
<plugin id="org.eclipse.osgi.compatibility.state" fragment="true"/>
<plugin id="org.eclipse.osgi.services"/>
<plugin id="org.eclipse.swt"/>
<plugin id="org.eclipse.swt.cocoa.macosx.x86_64" fragment="true"/>
<plugin id="org.eclipse.text"/>
<plugin id="org.eclipse.ui"/>
<plugin id="org.eclipse.ui.cocoa" fragment="true"/>
<plugin id="org.eclipse.ui.ide"/>
<plugin id="org.eclipse.ui.workbench"/>
<plugin id="org.tukaani.xz"/>
<plugin id="org.w3c.css.sac"/>
<plugin id="org.w3c.dom.events"/>
<plugin id="org.w3c.dom.smil"/>
<plugin id="org.w3c.dom.svg"/>
</plugins>
<features>
<feature id="com.minres.rdl.platform.feature" version="1.0.0.qualifier"/>
<feature id="com.minres.rdl.product.feature" version="1.0.0.qualifier"/>
<feature id="com.minres.rdl.feature" version="1.0.0.qualifier"/>
<feature id="com.minres.rdl.platform.feature"/>
<feature id="com.minres.rdl.product.feature"/>
<feature id="com.minres.rdl.feature"/>
<feature id="org.eclipse.emf.ecore"/>
<feature id="org.eclipse.rcp"/>
<feature id="org.eclipse.emf.common"/>

View File

@ -4,10 +4,10 @@
<artifactId>com.minres.rdl.product.releng</artifactId>
<packaging>eclipse-repository</packaging>
<name>RDL EEditor</name>
<name>RDL Editor</name>
<parent>
<version>1.0.0-SNAPSHOT</version>
<version>1.4.1</version>
<groupId>com.minres.rdl</groupId>
<artifactId>com.minres.rdl.parent</artifactId>
</parent>
@ -24,6 +24,12 @@
<linux>tar.gz</linux>
<macosx>tar.gz</macosx>
</formats>
<products>
<product>
<id>com.minres.rdl.product.product</id>
<archiveFileName>RDL-Editor-${project.version}</archiveFileName>
</product>
</products>
</configuration>
<executions>
<execution>

View File

@ -1,7 +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.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -1,7 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8

View File

@ -2,8 +2,8 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: RDL Editor
Bundle-SymbolicName: com.minres.rdl.product;singleton:=true
Bundle-Version: 1.1.1.qualifier
Bundle-Version: 1.4.1
Bundle-Vendor: MINRES Technologies GmbH
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.12.0"
Automatic-Module-Name: com.minres.rdl.product

View File

@ -4,9 +4,8 @@
<parent>
<groupId>com.minres.rdl</groupId>
<artifactId>com.minres.rdl.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.4.1</version>
</parent>
<artifactId>com.minres.rdl.product</artifactId>
<packaging>eclipse-plugin</packaging>
<version>1.1.1-SNAPSHOT</version>
</project>

View File

@ -0,0 +1,104 @@
<?xml version="1.0"?>
<project name="project">
<target name="getMajorMinorVersion">
<script language="javascript">
<![CDATA[
// getting the value
buildnumber = project.getProperty("unqualifiedVersion");
index = buildnumber.lastIndexOf(".");
counter = buildnumber.substring(0, index);
project.setProperty("majorMinorVersion",counter);
]]>
</script>
</target>
<target name="test_getMajorMinor" depends="getMajorMinorVersion">
<echo message="majorMinorVersion: ${majorMinorVersion}"/>
</target>
<!--
site.label The name/title/label of the created composite site
unqualifiedVersion The version without any qualifier replacement
buildQualifier The build qualifier
-->
<target name="compute.child.repository.data" depends="getMajorMinorVersion">
<property name="full.version" value="${unqualifiedVersion}" />
<property name="software.download.area" location="${user.home}/p2.repositories" />
<property name="updates.dir" value="updates" />
<property name="site.composite.name" value="${site.label} ${majorMinorVersion}" />
<property name="main.site.composite.name" value="${site.label} All Versions" />
<!--
<property name="main.composite.repository.directory" location="${software.download.area}/${updates.dir}" />
-->
<property name="main.composite.repository.directory" location="${software.download.area}" />
<property name="composite.repository.directory" value="${main.composite.repository.directory}/${majorMinorVersion}" />
<property name="child.repository" value="${full.version}" />
<property name="child.repository.directory" value="${composite.repository.directory}/${child.repository}/" />
</target>
<target name="p2.composite.add" depends="compute.child.repository.data">
<property name="source.repository" location="${project.build.directory}/repository"/>
<echo message=" " />
<echo message="Source repository path: ${source.repository}" />
<echo message="Copying to ${child.repository.directory}..." />
<mkdir dir="${child.repository.directory}"/>
<copy todir="${child.repository.directory}" overwrite="true">
<fileset dir="${source.repository}" />
</copy>
<add.composite.repository.internal
composite.repository.location="${composite.repository.directory}"
composite.repository.name="${site.composite.name}"
composite.repository.child="${child.repository}"
/>
<add.composite.repository.internal
composite.repository.location="${main.composite.repository.directory}"
composite.repository.name="${main.site.composite.name}"
composite.repository.child="${majorMinorVersion}"
/>
</target>
<!-- = = = = = = = = = = = = = = = = =
macrodef: add.composite.repository.internal
= = = = = = = = = = = = = = = = = -->
<macrodef name="add.composite.repository.internal">
<attribute name="composite.repository.location" />
<attribute name="composite.repository.name" />
<attribute name="composite.repository.child" />
<sequential>
<echo message=" " />
<echo message="Composite repository : @{composite.repository.location}" />
<echo message="Composite name : @{composite.repository.name}" />
<echo message="Adding child repository : @{composite.repository.child}" />
<p2.composite.repository>
<repository compressed="false" location="@{composite.repository.location}" name="@{composite.repository.name}" />
<add>
<repository location="@{composite.repository.child}" />
</add>
</p2.composite.repository>
<echo file="@{composite.repository.location}/p2.index">version=1
metadata.repository.factory.order=compositeContent.xml,\!
artifact.repository.factory.order=compositeArtifacts.xml,\!
</echo>
</sequential>
</macrodef>
</project>

View File

@ -4,10 +4,9 @@
<parent>
<groupId>com.minres.rdl</groupId>
<artifactId>com.minres.rdl.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.4.1</version>
</parent>
<artifactId>com.minres.rdl.repository</artifactId>
<version>1.1.1-SNAPSHOT</version>
<packaging>eclipse-repository</packaging>
<build>
@ -47,6 +46,96 @@
</pluginManagement>
</build>
<profiles>
<profile>
<!-- Activate this profile to perform the release to Bintray -->
<id>release-composite</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>bash</executable>
<!-- optional -->
<workingDirectory>${software.download.area}</workingDirectory>
<arguments>
<argument>-c</argument>
<argument>if [ -d RDL-Editor-GHP ]; then cd RDL-Editor-GHP; git pull; else git clone -v --branch gh-pages https://github.com/Minres/RDL-Editor.git RDL-Editor-GHP; fi</argument>
</arguments>
<environmentVariables>
<LANG>en_US</LANG>
</environmentVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-eclipserun-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<!-- IMPORTANT: DO NOT split the arg line -->
<appArgLine>-application org.eclipse.ant.core.antRunner -buildfile packaging-p2-composite.ant p2.composite.add -Dsite.label="RDL-Editor Software Repository" -Dproject.build.directory=${project.build.directory} -DunqualifiedVersion=${unqualifiedVersion} -Dsoftware.download.area="${software.download.area}/RDL-Editor-GHP/repository"</appArgLine>
<repositories>
<repository>
<id>2022-03</id>
<layout>p2</layout>
<url>http://download.eclipse.org/releases/2022-03/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<artifactId>org.eclipse.ant.core</artifactId>
<type>eclipse-plugin</type>
</dependency>
<dependency>
<artifactId>org.apache.ant</artifactId>
<type>eclipse-plugin</type>
</dependency>
<dependency>
<artifactId>org.eclipse.equinox.p2.repository.tools</artifactId>
<type>eclipse-plugin</type>
</dependency>
<dependency>
<artifactId>org.eclipse.equinox.p2.core.feature</artifactId>
<type>eclipse-feature</type>
</dependency>
<dependency>
<artifactId>org.eclipse.equinox.p2.extras.feature</artifactId>
<type>eclipse-feature</type>
</dependency>
<dependency>
<artifactId>org.eclipse.equinox.ds</artifactId>
<type>eclipse-plugin</type>
</dependency>
</dependencies>
</configuration>
<executions>
<execution>
<id>add-p2-composite-repository</id>
<phase>package</phase>
<goals>
<goal>eclipse-run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
</dependencies>
</project>

View File

@ -12,7 +12,6 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<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.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
@ -20,5 +19,6 @@
</classpathentry>
<classpathentry exported="true" kind="con" path="GROOVY_SUPPORT"/>
<classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -1,8 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
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.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11

View File

@ -1,20 +1,95 @@
import static groovy.io.FileType.FILES
import java.nio.file.Files
import java.nio.file.Paths
import java.util.zip.ZipEntry
def needed_jars = [
/org\.eclipse\.xtext/,
/org\.eclipse\.emf\.ecore\.xmi/,
/org\.eclipse\.emf\.ecore/,
/org\.eclipse\.emf\.common/,
/org\.antlr\.runtime/,
/com\.google\.inject/,
/org\.eclipse\.emf\.mwe\.core/,
/org\.apache\.commons\.cli/,
/org\.eclipse\.emf\.mwe2\.runtime/,
/org\.eclipse\.emf\.mwe\.utils/,
/org\.eclipse\.xtext\.util/,
/com\.google\.guava/,
/javax\.inject/,
/org\.eclipse\.xtext\.xbase/,
/org\.eclipse\.xtext\.common\.types/,
/org\.eclipse\.xtend\.lib/,
/org\.eclipse\.xtext\.xbase\.lib/,
/org\.eclipse\.xtend\.lib\.macro/,
/org\.eclipse\.equinox\.common/,
/eclipse-trace/,
/groovy-eclipse/,
/ivy-2\.5\.0\.jar/,
/groovy-3\.0\.\d-indy/,
/groovy-templates-3\.0\.\d/,
/org\.eclipse\.xtext\.xtext\.generator/,
/org\.eclipse\.emf\.codegen\.ecore/,
/org\.eclipse\.emf\.codegen/,
/org\.eclipse\.emf\.mwe2\.launch/,
/org\.eclipse\.emf\.mwe2\.language/,
/org\.eclipse\.emf\.mwe2\.lib/,
/org\.objectweb\.asm/,
/org\.apache\.commons\.logging/,
/org\.apache\.log4j/,
/com\.ibm\.icu/,
/org\.json/,
/com\.minres\.rdl/
]
// Collect all jars.
def jars = []
def root = new File(project.getBasedir(), 'target/classes')
def libs = new File(project.getBasedir(), 'target/classes/lib')
def meta_inf = new File(project.getBasedir(), 'target/classes/META-INF')
libs.eachFileRecurse (FILES) { file ->
jars << root.toURI().relativize(file.toURI()).toString()
if(file.name =~/org\.codehaus\.groovy_/) { // we need to unpack this one sinc it is already jar in jar
println("Unpacking ${file}")
def zipFile = new java.util.zip.ZipFile(file)
zipFile.entries().findAll {ZipEntry entry -> !entry.directory && entry.name =~/\.jar$/}.each {ZipEntry entry ->
def outFile = new File(libs, entry.name.split(/\//)[-1])
println "Extracting file ${entry.name} to ${outFile.path} with size ${entry.size}bytes (${entry.compressedSize}bytes)"
Files.copy(zipFile.getInputStream(entry), outFile.toPath())
}
}
}
libs.eachFileRecurse (FILES) { file ->
def fileName = file.name.split("/")[-1]
if(needed_jars.find{fileName =~ it}) {
println "Adding $file to the included jars"
jars << root.toURI().relativize(file.toURI()).toString()
} else {
file.delete()
}
}
def zipFile = new java.util.zip.ZipFile(new File(project.getBasedir(), 'jar-in-jar-loader.zip'))
zipFile.entries().each {ZipEntry it ->
def path = Paths.get("${root}/", it.name)
if(it.directory){
Files.createDirectories(path)
} else {
def parentDir = path.getParent()
if (!Files.exists(parentDir)) {
Files.createDirectories(parentDir)
}
Files.deleteIfExists(path)
println "Extracting file ${it.name} to ${path} with size ${it.size}bytes (${it.compressedSize}bytes)"
Files.copy(zipFile.getInputStream(it), path)
}
}
// Write the manifest file.
def manifest = new File(project.getBasedir(), 'target/classes/META-INF/MANIFEST.MF')
manifest.write ''
manifest << 'Manifest-Version: 1.0\n'
manifest << 'Class-Path: . ' + jars.join(' ') + '\n'
manifest << 'Rsrc-Main-Class: com.minres.rdl.generator.Main\n'
manifest << 'Main-Class: org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader\n'
Files.createDirectories( Paths.get(meta_inf.absolutePath))
def mf = new File(project.getBasedir(), 'target/classes/META-INF/MANIFEST.MF')
mf.write ''
mf << 'Manifest-Version: 1.0\n'
mf << 'Rsrc-Class-Path: ./ ' + jars.join(' ') + '\n'
mf << 'Rsrc-Main-Class: com.minres.rdl.generator.Main\n'
mf << 'Main-Class: org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader\n'

View File

@ -1,7 +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>com.minres.rdl.parent</artifactId>
<groupId>com.minres.rdl</groupId>
<version>1.4.1</version>
</parent>
<artifactId>com.minres.rdl.standalone</artifactId>
<packaging>eclipse-repository</packaging>
<build>
<pluginManagement>
@ -71,7 +77,7 @@
<artifactItem>
<groupId>com.minres.rdl</groupId>
<artifactId>com.minres.rdl</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>${project.version}</version>
<type>jar</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
@ -165,10 +171,12 @@
</snapshots>
</repository>
</repositories>
<parent>
<artifactId>com.minres.rdl.parent</artifactId>
<groupId>com.minres.rdl</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<version>1.1.1-SNAPSHOT</version>
</project>
<dependencies>
<dependency>
<groupId>com.minres.rdl</groupId>
<artifactId>com.minres.rdl</artifactId>
<version>${project.version}</version>
<type>eclipse-plugin</type>
</dependency>
</dependencies>
</project>

View File

@ -1,33 +1,43 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?><target name="com.minres.rdl.target" sequenceNumber="1">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.draw2d.feature.group" version="0.0.0"/>
<unit id="org.eclipse.emf.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.executable.feature.group" version="0.0.0"/>
<unit id="org.eclipse.jdt.feature.group" version="0.0.0"/>
<unit id="org.eclipse.pde.feature.group" version="0.0.0"/>
<unit id="org.eclipse.platform.feature.group" version="0.0.0"/>
<unit id="org.eclipse.xpand" version="0.0.0"/>
<unit id="org.eclipse.xtend" version="0.0.0"/>
<unit id="org.eclipse.xtend.typesystem.emf" version="0.0.0"/>
<repository location="http://download.eclipse.org/releases/photon"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.emf.mwe2.launcher.feature.group" version="0.0.0"/>
<repository location="http://download.eclipse.org/modeling/emft/mwe/updates/releases/2.9.1/"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.xtext.sdk.feature.group" version="0.0.0"/>
<repository location="http://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.14.0/"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="com.google.gson" version="2.7.0.v20170129-0911"/>
<unit id="org.antlr.runtime" version="3.2.0.v201101311130"/>
<unit id="org.junit" version="4.12.0.v201504281640"/>
<unit id="org.objectweb.asm" version="6.1.1.v20180414-0329"/>
<unit id="org.objectweb.asm.tree" version="6.1.1.v20180414-0329"/>
<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/S20180504181223/repository"/>
</location>
</locations>
<?pde version="3.8"?>
<target name="com.minres.coredsl.target" sequenceNumber="1">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.jdt.feature.group" version="0.0.0"/>
<unit id="org.eclipse.platform.feature.group" version="0.0.0"/>
<unit id="org.eclipse.pde.feature.group" version="0.0.0"/>
<unit id="org.eclipse.draw2d.feature.group" version="0.0.0"/>
<unit id="org.eclipse.emf.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.executable.feature.group" version="0.0.0"/>
<repository location="https://download.eclipse.org/releases/2022-03"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.emf.mwe2.launcher.feature.group" version="0.0.0"/>
<repository location="https://download.eclipse.org/modeling/emft/mwe/updates/releases/2.12.2/"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.xtext.sdk.feature.group" version="0.0.0"/>
<repository location="https://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.26.0/"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="com.google.gson" version="2.8.9.v20220111-1409"/>
<unit id="com.google.inject" version="5.0.1.v20210324-2015"/>
<unit id="javax.inject" version="1.0.0.v20091030"/>
<unit id="org.antlr.runtime" version="3.2.0.v201101311130"/>
<unit id="org.junit" version="4.13.2.v20211018-1956"/>
<unit id="org.apiguardian" version="1.1.2.v20211018-1956"/>
<unit id="org.junit.jupiter.api" version="5.8.1.v20211018-1956"/>
<unit id="org.junit.jupiter.engine" version="5.8.1.v20211018-1956"/>
<unit id="org.junit.platform.commons" version="1.8.1.v20211018-1956"/>
<unit id="org.junit.platform.engine" version="1.8.1.v20211018-1956"/>
<unit id="org.junit.platform.launcher" version="1.8.1.v20211018-1956"/>
<unit id="org.junit.platform.runner" version="1.8.1.v20211018-1956"/>
<unit id="org.junit.platform.suite.commons" version="1.8.1.v20211018-1956"/>
<unit id="org.opentest4j" version="1.2.0.v20211018-1956"/>
<unit id="org.objectweb.asm" version="9.2.0.v20210813-1119"/>
<unit id="org.objectweb.asm.tree" version="9.2.0.v20210813-1119"/>
<unit id="io.github.classgraph" version="4.8.138.v20211212-1642"/>
<repository location="https://download.eclipse.org/tools/orbit/downloads/2022-03"/>
</location>
</locations>
</target>

View File

@ -4,7 +4,7 @@
<parent>
<groupId>com.minres.rdl</groupId>
<artifactId>com.minres.rdl.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.4.1</version>
</parent>
<artifactId>com.minres.rdl.target</artifactId>
<packaging>eclipse-target-definition</packaging>

View File

@ -4,7 +4,11 @@
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="src" path="xtend-gen"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<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="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -0,0 +1 @@
/xtend-gen/

View File

@ -1,7 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
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.source=1.8
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11

View File

@ -3,14 +3,13 @@ Automatic-Module-Name: com.minres.rdl.tests
Bundle-ManifestVersion: 2
Bundle-Name: com.minres.rdl.tests
Bundle-Vendor: My Company
Bundle-Version: 1.0.0.qualifier
Bundle-Version: 1.4.1
Bundle-SymbolicName: com.minres.rdl.tests; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: com.minres.rdl,
org.junit;bundle-version="4.12.0",
org.junit.jupiter.api;bundle-version="[5.1.0,6.0.0)",
org.eclipse.xtext.testing,
org.eclipse.xtext.xbase.testing,
org.eclipse.xtext.xbase.lib;bundle-version="2.14.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: com.minres.rdl.tests;x-internal=true

View File

@ -4,7 +4,7 @@
<parent>
<groupId>com.minres.rdl</groupId>
<artifactId>com.minres.rdl.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.4.1</version>
</parent>
<artifactId>com.minres.rdl.tests</artifactId>
<packaging>eclipse-test-plugin</packaging>
@ -18,7 +18,7 @@
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<!-- <version>${tycho-version}</version> -->
<configuration>
<failIfNoTests>false</failIfNoTests>
</configuration>

View File

@ -1,5 +1,5 @@
/*
* generated by Xtext 2.14.0
* generated by Xtext 2.26.0
*/
package com.minres.rdl.tests;
@ -25,7 +25,6 @@ public class RDLInjectorProvider implements IInjectorProvider, IRegistryConfigur
@Override
public Injector getInjector() {
if (injector == null) {
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
this.injector = internalCreateInjector();
stateAfterInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
}
@ -56,11 +55,15 @@ public class RDLInjectorProvider implements IInjectorProvider, IRegistryConfigur
@Override
public void restoreRegistry() {
stateBeforeInjectorCreation.restoreGlobalState();
stateBeforeInjectorCreation = null;
}
@Override
public void setupRegistry() {
getInjector();
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
if (injector == null) {
getInjector();
}
stateAfterInjectorCreation.restoreGlobalState();
}
}

View File

@ -1,174 +0,0 @@
/**
* generated by Xtext 2.14.0
*/
package com.minres.rdl.tests;
import com.google.inject.Inject;
import com.minres.rdl.rdl.Root;
import com.minres.rdl.tests.RDLInjectorProvider;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.xtend2.lib.StringConcatenation;
import org.eclipse.xtext.testing.InjectWith;
import org.eclipse.xtext.testing.XtextRunner;
import org.eclipse.xtext.testing.util.ParseHelper;
import org.eclipse.xtext.xbase.lib.Exceptions;
import org.eclipse.xtext.xbase.lib.IterableExtensions;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(XtextRunner.class)
@InjectWith(RDLInjectorProvider.class)
@SuppressWarnings("all")
public class RDLParsingTest {
@Inject
private ParseHelper<Root> parseHelper;
@Test
public void loadModel() {
try {
StringConcatenation _builder = new StringConcatenation();
_builder.append("regfile uart_regs {");
_builder.newLine();
_builder.append("\t");
_builder.append("reg {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("name=\"txdata\";");
_builder.newLine();
_builder.append("\t\t");
_builder.append("desc=\"Transmit data register\";");
_builder.newLine();
_builder.append("\t\t");
_builder.append("field {} data[7:0];");
_builder.newLine();
_builder.append("\t\t");
_builder.append("field {} full[31:31];");
_builder.newLine();
_builder.append("\t");
_builder.append("} txdata @0x00;");
_builder.newLine();
_builder.append("\t");
_builder.append("reg {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("name=\"rxdata\";");
_builder.newLine();
_builder.append("\t\t");
_builder.append("desc=\"Receive data register\";");
_builder.newLine();
_builder.append("\t\t");
_builder.append("field {} data[7:0];");
_builder.newLine();
_builder.append("\t\t");
_builder.append("field {} empty[31:31];");
_builder.newLine();
_builder.append("\t");
_builder.append("}rxdata @0x04;");
_builder.newLine();
_builder.append("\t");
_builder.append("reg {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("name=\"txctrl\";");
_builder.newLine();
_builder.append("\t\t");
_builder.append("desc=\"Transmit control register\";");
_builder.newLine();
_builder.append("\t\t");
_builder.append("field {} txen[1];");
_builder.newLine();
_builder.append("\t\t");
_builder.append("field {} nstop[1];");
_builder.newLine();
_builder.append("\t\t");
_builder.append("field {} txcnt[18:16];");
_builder.newLine();
_builder.append("\t");
_builder.append("}txctrl @0x08;");
_builder.newLine();
_builder.append("\t");
_builder.append("reg {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("name=\"rxctrl\";");
_builder.newLine();
_builder.append("\t\t");
_builder.append("desc=\"Receive control register\";");
_builder.newLine();
_builder.append("\t\t");
_builder.append("field {} rxen[1];");
_builder.newLine();
_builder.append("\t\t");
_builder.append("field {} rxcnt[18:16];");
_builder.newLine();
_builder.append("\t");
_builder.append("}rxctrl @0x0C;");
_builder.newLine();
_builder.append("\t");
_builder.append("reg {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("name=\"ie\";");
_builder.newLine();
_builder.append("\t\t");
_builder.append("desc=\"UART interrupt enable\";");
_builder.newLine();
_builder.append("\t\t");
_builder.append("field{} txwm[1];");
_builder.newLine();
_builder.append("\t\t");
_builder.append("field{} rxwm[1];");
_builder.newLine();
_builder.append("\t");
_builder.append("}ie @0x10;");
_builder.newLine();
_builder.append("\t");
_builder.append("reg {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("name=\"ip\";");
_builder.newLine();
_builder.append("\t\t");
_builder.append("desc=\"UART Interrupt pending\";");
_builder.newLine();
_builder.append("\t\t");
_builder.append("field{} txwm[1];");
_builder.newLine();
_builder.append("\t\t");
_builder.append("field{} rxwm[1];");
_builder.newLine();
_builder.append("\t");
_builder.append("} ip @0x14;");
_builder.newLine();
_builder.append("\t");
_builder.append("reg {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("name=\"div\";");
_builder.newLine();
_builder.append("\t\t");
_builder.append("desc=\"Baud rate divisor\";");
_builder.newLine();
_builder.append("\t\t");
_builder.append("field{} div[16];");
_builder.newLine();
_builder.append("\t");
_builder.append("} div @0x18;");
_builder.newLine();
_builder.append("};");
_builder.newLine();
final Root result = this.parseHelper.parse(_builder);
Assert.assertNotNull(result);
final EList<Resource.Diagnostic> errors = result.eResource().getErrors();
StringConcatenation _builder_1 = new StringConcatenation();
_builder_1.append("Unexpected errors: ");
String _join = IterableExtensions.join(errors, ", ");
_builder_1.append(_join);
Assert.assertTrue(_builder_1.toString(), errors.isEmpty());
} catch (Throwable _e) {
throw Exceptions.sneakyThrow(_e);
}
}
}

View File

@ -4,7 +4,7 @@
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="src" path="xtend-gen"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<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="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -0,0 +1 @@
/xtend-gen/

View File

@ -1,7 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
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.source=1.8
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11

View File

@ -3,17 +3,16 @@ Automatic-Module-Name: com.minres.rdl.ui.tests
Bundle-ManifestVersion: 2
Bundle-Name: com.minres.rdl.ui.tests
Bundle-Vendor: My Company
Bundle-Version: 1.0.0.qualifier
Bundle-Version: 1.4.1
Bundle-SymbolicName: com.minres.rdl.ui.tests; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: com.minres.rdl.ui,
org.junit;bundle-version="4.12.0",
org.junit.jupiter.api;bundle-version="[5.1.0,6.0.0)",
org.eclipse.xtext.testing,
org.eclipse.xtext.xbase.testing,
org.eclipse.xtext.junit4,
org.eclipse.xtext.xbase.junit,
org.eclipse.core.runtime,
org.eclipse.xtext.ui.testing,
org.eclipse.ui.workbench;resolution:=optional
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: com.minres.rdl.ui.tests;x-internal=true

View File

@ -4,7 +4,7 @@
<parent>
<groupId>com.minres.rdl</groupId>
<artifactId>com.minres.rdl.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.4.1</version>
</parent>
<artifactId>com.minres.rdl.ui.tests</artifactId>
<packaging>eclipse-test-plugin</packaging>
@ -23,25 +23,7 @@
<useUIHarness>true</useUIHarness>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<configuration>
<dependency-resolution>
<extraRequirements>
<!-- to get the org.eclipse.osgi.compatibility.state plugin
if the target platform is Luna or later.
(backward compatible with kepler and previous versions)
see https://bugs.eclipse.org/bugs/show_bug.cgi?id=492149 -->
<requirement>
<type>eclipse-feature</type>
<id>org.eclipse.rcp</id>
<versionRange>0.0.0</versionRange>
</requirement>
</extraRequirements>
</dependency-resolution>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,5 +1,5 @@
/*
* generated by Xtext 2.14.0
* generated by Xtext 2.26.0
*/
package com.minres.rdl.ui.tests;

View File

@ -3,7 +3,7 @@
<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-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -1 +1,2 @@
/plugin.xml_gen
/xtend-gen/

View File

@ -1,7 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
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.source=1.8
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11

View File

@ -3,7 +3,7 @@ Automatic-Module-Name: com.minres.rdl.ui
Bundle-ManifestVersion: 2
Bundle-Name: com.minres.rdl.ui
Bundle-Vendor: MINRES Technologies GmbH
Bundle-Version: 1.2.0.qualifier
Bundle-Version: 1.4.1
Bundle-SymbolicName: com.minres.rdl.ui; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: com.minres.rdl,
@ -17,12 +17,16 @@ Require-Bundle: com.minres.rdl,
org.eclipse.compare,
org.eclipse.xtext.builder,
org.eclipse.xtext.xbase.lib;bundle-version="2.14.0",
org.eclipse.xtend.lib;resolution:=optional,
org.eclipse.xtend.lib;bundle-version="2.14.0";resolution:=optional,
org.eclipse.core.runtime,
org.eclipse.core.resources
org.eclipse.core.resources,
org.eclipse.ui.forms,
org.eclipse.jdt.core,
org.eclipse.pde.core
Import-Package: org.apache.log4j
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: com.minres.rdl.ui.internal,
com.minres.rdl.ui.contentassist,
com.minres.rdl.ui.quickfix
com.minres.rdl.ui.quickfix,
com.minres.rdl.ui.wizard
Bundle-Activator: com.minres.rdl.ui.internal.RdlActivator

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

View File

@ -1,454 +1,510 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
<extension
point="org.eclipse.ui.editors">
<editor
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor"
contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
default="true"
extensions="rdl"
id="com.minres.rdl.RDL"
name="RDL Editor">
</editor>
</extension>
<extension
point="org.eclipse.ui.handlers">
<handler
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler"
commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration">
<activeWhen>
<reference
definitionId="com.minres.rdl.RDL.Editor.opened">
</reference>
</activeWhen>
</handler>
<handler
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler"
commandId="com.minres.rdl.RDL.validate">
<activeWhen>
<reference
definitionId="com.minres.rdl.RDL.Editor.opened">
</reference>
</activeWhen>
</handler>
<!-- copy qualified name -->
<handler
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedNameHandler"
commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName">
<activeWhen>
<reference definitionId="com.minres.rdl.RDL.Editor.opened" />
</activeWhen>
</handler>
<handler
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedNameHandler"
commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName">
<activeWhen>
<and>
<reference definitionId="com.minres.rdl.RDL.XtextEditor.opened" />
<iterate>
<adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" />
</iterate>
</and>
</activeWhen>
</handler>
</extension>
<extension point="org.eclipse.core.expressions.definitions">
<definition id="com.minres.rdl.RDL.Editor.opened">
<and>
<reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
<with variable="activeEditor">
<test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
value="com.minres.rdl.RDL"
forcePluginActivation="true"/>
</with>
</and>
</definition>
<definition id="com.minres.rdl.RDL.XtextEditor.opened">
<and>
<reference definitionId="isXtextEditorActive"/>
<with variable="activeEditor">
<test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
value="com.minres.rdl.RDL"
forcePluginActivation="true"/>
</with>
</and>
</definition>
</extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
id="com.minres.rdl.RDL"
name="RDL">
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
</page>
<page
category="com.minres.rdl.RDL"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage"
id="com.minres.rdl.RDL.coloring"
name="Syntax Coloring">
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
</page>
<page
category="com.minres.rdl.RDL"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage"
id="com.minres.rdl.RDL.templates"
name="Templates">
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
</page>
<page category="com.minres.rdl.RDL"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:com.minres.rdl.ui.preferences.RdlPreferencePage"
id="com.minres.rdl.RDL.preferences"
name="Generator">
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
</page>
</extension>
<extension
point="org.eclipse.ui.propertyPages">
<page
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
id="com.minres.rdl.RDL"
name="RDL">
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
<enabledWhen>
<adapt type="org.eclipse.core.resources.IProject"/>
</enabledWhen>
<filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
</page>
</extension>
<extension
point="org.eclipse.ui.keywords">
<keyword
id="com.minres.rdl.ui.keyword_RDL"
label="RDL"/>
</extension>
<extension
point="org.eclipse.ui.commands">
<command
description="Trigger expensive validation"
id="com.minres.rdl.RDL.validate"
name="Validate">
</command>
<!-- copy qualified name -->
<command
id="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
categoryId="org.eclipse.ui.category.edit"
description="Copy the qualified name for the selected element"
name="Copy Qualified Name">
</command>
<command
id="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"
categoryId="org.eclipse.ui.category.edit"
description="Copy the qualified name for the selected element"
name="Copy Qualified Name">
</command>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:#TextEditorContext?after=group.edit">
<command
commandId="com.minres.rdl.RDL.validate"
style="push"
tooltip="Trigger expensive validation">
<visibleWhen checkEnabled="false">
<reference
definitionId="com.minres.rdl.RDL.Editor.opened">
</reference>
</visibleWhen>
</command>
</menuContribution>
<!-- copy qualified name -->
<menuContribution locationURI="popup:#TextEditorContext?after=copy">
<command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
style="push" tooltip="Copy Qualified Name">
<visibleWhen checkEnabled="false">
<reference definitionId="com.minres.rdl.RDL.Editor.opened" />
</visibleWhen>
</command>
</menuContribution>
<menuContribution locationURI="menu:edit?after=copy">
<command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
style="push" tooltip="Copy Qualified Name">
<visibleWhen checkEnabled="false">
<reference definitionId="com.minres.rdl.RDL.Editor.opened" />
</visibleWhen>
</command>
</menuContribution>
<menuContribution locationURI="popup:org.eclipse.xtext.ui.outline?after=additions">
<command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"
style="push" tooltip="Copy Qualified Name">
<visibleWhen checkEnabled="false">
<and>
<reference definitionId="com.minres.rdl.RDL.XtextEditor.opened" />
<iterate>
<adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" />
</iterate>
</and>
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="popup:#TextEditorContext?endof=group.find">
<command commandId="org.eclipse.xtext.ui.editor.FindReferences">
<visibleWhen checkEnabled="false">
<reference definitionId="com.minres.rdl.RDL.Editor.opened">
</reference>
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.handlers">
<handler
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler"
commandId="org.eclipse.xtext.ui.editor.FindReferences">
<activeWhen>
<reference
definitionId="com.minres.rdl.RDL.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
<extension point="org.eclipse.core.contenttype.contentTypes">
<content-type
base-type="org.eclipse.core.runtime.text"
file-extensions="rdl"
id="com.minres.rdl.RDL.contenttype"
name="RDL File"
priority="normal">
</content-type>
</extension>
<!-- adding resource factories -->
<extension
point="org.eclipse.emf.ecore.extension_parser">
<parser
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory"
type="rdl">
</parser>
</extension>
<extension point="org.eclipse.xtext.extension_resourceServiceProvider">
<resourceServiceProvider
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
uriExtension="rdl">
</resourceServiceProvider>
</extension>
<!-- marker definitions for com.minres.rdl.RDL -->
<extension
id="rdl.check.fast"
name="RDL Problem"
point="org.eclipse.core.resources.markers">
<super type="org.eclipse.xtext.ui.check.fast"/>
<persistent value="true"/>
</extension>
<extension
id="rdl.check.normal"
name="RDL Problem"
point="org.eclipse.core.resources.markers">
<super type="org.eclipse.xtext.ui.check.normal"/>
<persistent value="true"/>
</extension>
<extension
id="rdl.check.expensive"
name="RDL Problem"
point="org.eclipse.core.resources.markers">
<super type="org.eclipse.xtext.ui.check.expensive"/>
<persistent value="true"/>
</extension>
<extension point="org.eclipse.ui.preferencePages">
<page
category="com.minres.rdl.RDL"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.validation.ValidatorPreferencePage"
id="com.minres.rdl.RDL.validator.preferencePage"
name="Errors/Warnings">
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
</page>
</extension>
<extension point="org.eclipse.xtext.builder.participant">
<participant
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant"
fileExtensions="rdl"/>
</extension>
<extension point="org.eclipse.ui.preferencePages">
<page
category="com.minres.rdl.RDL"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
id="com.minres.rdl.RDL.compiler.preferencePage"
name="Compiler">
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
</page>
</extension>
<extension point="org.eclipse.ui.propertyPages">
<page
category="com.minres.rdl.RDL"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
id="com.minres.rdl.RDL.compiler.propertyPage"
name="Compiler">
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
<enabledWhen>
<adapt type="org.eclipse.core.resources.IProject"/>
</enabledWhen>
<filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
</page>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="popup:#TextEditorContext?after=xtext.ui.openDeclaration">
<command
commandId="org.eclipse.xtext.ui.OpenGeneratedFileCommand"
id="com.minres.rdl.RDL.OpenGeneratedCode"
style="push">
<visibleWhen checkEnabled="false">
<reference definitionId="com.minres.rdl.RDL.Editor.opened" />
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.handlers">
<handler
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.generator.trace.OpenGeneratedFileHandler"
commandId="org.eclipse.xtext.ui.OpenGeneratedFileCommand">
<activeWhen>
<reference definitionId="com.minres.rdl.RDL.Editor.opened" />
</activeWhen>
</handler>
</extension>
<!-- Quick Outline -->
<extension
point="org.eclipse.ui.handlers">
<handler
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler"
commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline">
<activeWhen>
<reference
definitionId="com.minres.rdl.RDL.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
<extension
point="org.eclipse.ui.commands">
<command
description="Open the quick outline."
id="org.eclipse.xtext.ui.editor.outline.QuickOutline"
name="Quick Outline">
</command>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:#TextEditorContext?after=group.open">
<command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"
style="push"
tooltip="Open Quick Outline">
<visibleWhen checkEnabled="false">
<reference definitionId="com.minres.rdl.RDL.Editor.opened"/>
</visibleWhen>
</command>
</menuContribution>
</extension>
<!-- quickfix marker resolution generator for com.minres.rdl.RDL -->
<extension
point="org.eclipse.ui.ide.markerResolution">
<markerResolutionGenerator
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
markerType="com.minres.rdl.ui.rdl.check.fast">
<attribute
name="FIXABLE_KEY"
value="true">
</attribute>
</markerResolutionGenerator>
<markerResolutionGenerator
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
markerType="com.minres.rdl.ui.rdl.check.normal">
<attribute
name="FIXABLE_KEY"
value="true">
</attribute>
</markerResolutionGenerator>
<markerResolutionGenerator
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
markerType="com.minres.rdl.ui.rdl.check.expensive">
<attribute
name="FIXABLE_KEY"
value="true">
</attribute>
</markerResolutionGenerator>
</extension>
<!-- Rename Refactoring -->
<extension point="org.eclipse.ui.handlers">
<handler
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.DefaultRenameElementHandler"
commandId="org.eclipse.xtext.ui.refactoring.RenameElement">
<activeWhen>
<reference
definitionId="com.minres.rdl.RDL.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:#TextEditorContext?after=group.edit">
<command commandId="org.eclipse.xtext.ui.refactoring.RenameElement"
style="push">
<visibleWhen checkEnabled="false">
<reference
definitionId="com.minres.rdl.RDL.Editor.opened">
</reference>
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.preferencePages">
<page
category="com.minres.rdl.RDL"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferencePage"
id="com.minres.rdl.RDL.refactoring"
name="Refactoring">
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
</page>
</extension>
<extension point="org.eclipse.compare.contentViewers">
<viewer id="com.minres.rdl.RDL.compare.contentViewers"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
extensions="rdl">
</viewer>
<contentTypeBinding
contentTypeId="com.minres.rdl.RDL.contenttype"
contentViewerId="com.minres.rdl.RDL.compare.contentViewers" />
</extension>
<extension point="org.eclipse.compare.contentMergeViewers">
<viewer id="com.minres.rdl.RDL.compare.contentMergeViewers"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
extensions="rdl" label="RDL Compare">
</viewer>
<contentTypeBinding
contentTypeId="com.minres.rdl.RDL.contenttype"
contentMergeViewerId="com.minres.rdl.RDL.compare.contentMergeViewers" />
</extension>
<extension point="org.eclipse.ui.editors.documentProviders">
<provider id="com.minres.rdl.RDL.editors.documentProviders"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.model.XtextDocumentProvider"
extensions="rdl">
</provider>
</extension>
<extension point="org.eclipse.team.core.fileTypes">
<fileTypes
extension="rdl"
type="text">
</fileTypes>
</extension>
<extension
point="org.eclipse.ui.newWizards">
<wizard
category="com.minres.category"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:com.minres.rdl.ui.wizard.RDLNewProjectWizard"
id="com.minres.rdl.ui.wizard.RDLNewProjectWizard"
name="RDL Project"
project="true">
</wizard>
<category
id="com.minres.category"
name="MINRES">
</category>
</extension>
<extension
point="org.eclipse.ui.editors">
<editor
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor"
contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
default="true"
extensions="rdl"
id="com.minres.rdl.RDL"
name="RDL Editor">
</editor>
</extension>
<extension
point="org.eclipse.ui.handlers">
<handler
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler"
commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration">
<activeWhen>
<reference
definitionId="com.minres.rdl.RDL.Editor.opened">
</reference>
</activeWhen>
</handler>
<handler
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler"
commandId="com.minres.rdl.RDL.validate">
<activeWhen>
<reference
definitionId="com.minres.rdl.RDL.Editor.opened">
</reference>
</activeWhen>
</handler>
<!-- copy qualified name -->
<handler
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedNameHandler"
commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName">
<activeWhen>
<reference definitionId="com.minres.rdl.RDL.Editor.opened" />
</activeWhen>
</handler>
<handler
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedNameHandler"
commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName">
<activeWhen>
<and>
<reference definitionId="com.minres.rdl.RDL.XtextEditor.opened" />
<iterate>
<adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" />
</iterate>
</and>
</activeWhen>
</handler>
</extension>
<extension point="org.eclipse.core.expressions.definitions">
<definition id="com.minres.rdl.RDL.Editor.opened">
<and>
<reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
<with variable="activeEditor">
<test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
value="com.minres.rdl.RDL"
forcePluginActivation="true"/>
</with>
</and>
</definition>
<definition id="com.minres.rdl.RDL.XtextEditor.opened">
<and>
<reference definitionId="isXtextEditorActive"/>
<with variable="activeEditor">
<test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
value="com.minres.rdl.RDL"
forcePluginActivation="true"/>
</with>
</and>
</definition>
</extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
id="com.minres.rdl.RDL"
name="RDL">
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
</page>
<page
category="com.minres.rdl.RDL"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage"
id="com.minres.rdl.RDL.coloring"
name="Syntax Coloring">
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
</page>
<page
category="com.minres.rdl.RDL"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage"
id="com.minres.rdl.RDL.templates"
name="Templates">
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
</page>
<page category="com.minres.rdl.RDL"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:com.minres.rdl.ui.preferences.RdlPreferencePage"
id="com.minres.rdl.RDL.preferences"
name="Output Configuration">
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
</page>
</extension>
<extension
point="org.eclipse.ui.propertyPages">
<page
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
id="com.minres.rdl.RDL"
name="RDL">
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
<enabledWhen>
<adapt type="org.eclipse.core.resources.IProject"/>
</enabledWhen>
<filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
</page>
</extension>
<extension
point="org.eclipse.ui.keywords">
<keyword
id="com.minres.rdl.ui.keyword_RDL"
label="RDL"/>
</extension>
<extension
point="org.eclipse.ui.commands">
<command
description="Trigger expensive validation"
id="com.minres.rdl.RDL.validate"
name="Validate">
</command>
<!-- copy qualified name -->
<command
id="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
categoryId="org.eclipse.ui.category.edit"
description="Copy the qualified name for the selected element"
name="Copy Qualified Name">
</command>
<command
id="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"
categoryId="org.eclipse.ui.category.edit"
description="Copy the qualified name for the selected element"
name="Copy Qualified Name">
</command>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:#TextEditorContext?after=group.edit">
<command
commandId="com.minres.rdl.RDL.validate"
style="push"
tooltip="Trigger expensive validation">
<visibleWhen checkEnabled="false">
<reference
definitionId="com.minres.rdl.RDL.Editor.opened">
</reference>
</visibleWhen>
</command>
</menuContribution>
<!-- copy qualified name -->
<menuContribution locationURI="popup:#TextEditorContext?after=copy">
<command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
style="push" tooltip="Copy Qualified Name">
<visibleWhen checkEnabled="false">
<reference definitionId="com.minres.rdl.RDL.Editor.opened" />
</visibleWhen>
</command>
</menuContribution>
<menuContribution locationURI="menu:edit?after=copy">
<command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
style="push" tooltip="Copy Qualified Name">
<visibleWhen checkEnabled="false">
<reference definitionId="com.minres.rdl.RDL.Editor.opened" />
</visibleWhen>
</command>
</menuContribution>
<menuContribution locationURI="popup:org.eclipse.xtext.ui.outline?after=additions">
<command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"
style="push" tooltip="Copy Qualified Name">
<visibleWhen checkEnabled="false">
<and>
<reference definitionId="com.minres.rdl.RDL.XtextEditor.opened" />
<iterate>
<adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" />
</iterate>
</and>
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="popup:#TextEditorContext?endof=group.find">
<command commandId="org.eclipse.xtext.ui.editor.FindReferences">
<visibleWhen checkEnabled="false">
<reference definitionId="com.minres.rdl.RDL.Editor.opened">
</reference>
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.handlers">
<handler
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler"
commandId="org.eclipse.xtext.ui.editor.FindReferences">
<activeWhen>
<reference
definitionId="com.minres.rdl.RDL.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
<extension point="org.eclipse.core.contenttype.contentTypes">
<content-type
base-type="org.eclipse.core.runtime.text"
file-extensions="rdl"
id="com.minres.rdl.RDL.contenttype"
name="RDL File"
priority="normal">
</content-type>
</extension>
<!-- adding resource factories -->
<extension
point="org.eclipse.emf.ecore.extension_parser">
<parser
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory"
type="rdl">
</parser>
</extension>
<extension point="org.eclipse.xtext.extension_resourceServiceProvider">
<resourceServiceProvider
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
uriExtension="rdl">
</resourceServiceProvider>
</extension>
<!-- marker definitions for com.minres.rdl.RDL -->
<extension
id="rdl.check.fast"
name="RDL Problem"
point="org.eclipse.core.resources.markers">
<super type="org.eclipse.xtext.ui.check.fast"/>
<persistent value="true"/>
</extension>
<extension
id="rdl.check.normal"
name="RDL Problem"
point="org.eclipse.core.resources.markers">
<super type="org.eclipse.xtext.ui.check.normal"/>
<persistent value="true"/>
</extension>
<extension
id="rdl.check.expensive"
name="RDL Problem"
point="org.eclipse.core.resources.markers">
<super type="org.eclipse.xtext.ui.check.expensive"/>
<persistent value="true"/>
</extension>
<extension point="org.eclipse.ui.preferencePages">
<page
category="com.minres.rdl.RDL"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.validation.ValidatorPreferencePage"
id="com.minres.rdl.RDL.validator.preferencePage"
name="Errors/Warnings">
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
</page>
</extension>
<extension point="org.eclipse.ui.preferencePages">
<page
category="com.minres.rdl.RDL"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
id="com.minres.rdl.RDL.compiler.preferencePage"
name="Compiler">
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
</page>
</extension>
<extension point="org.eclipse.ui.propertyPages">
<page
category="com.minres.rdl.RDL"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
id="com.minres.rdl.RDL.compiler.propertyPage"
name="Compiler">
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
<enabledWhen>
<adapt type="org.eclipse.core.resources.IProject"/>
</enabledWhen>
<filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
</page>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="popup:#TextEditorContext?after=xtext.ui.openDeclaration">
<command
commandId="org.eclipse.xtext.ui.OpenGeneratedFileCommand"
id="com.minres.rdl.RDL.OpenGeneratedCode"
style="push">
<visibleWhen checkEnabled="false">
<reference definitionId="com.minres.rdl.RDL.Editor.opened" />
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.handlers">
<handler
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.generator.trace.OpenGeneratedFileHandler"
commandId="org.eclipse.xtext.ui.OpenGeneratedFileCommand">
<activeWhen>
<reference definitionId="com.minres.rdl.RDL.Editor.opened" />
</activeWhen>
</handler>
</extension>
<!-- Quick Outline -->
<extension
point="org.eclipse.ui.handlers">
<handler
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler"
commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline">
<activeWhen>
<reference
definitionId="com.minres.rdl.RDL.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
<extension
point="org.eclipse.ui.commands">
<command
description="Open the quick outline."
id="org.eclipse.xtext.ui.editor.outline.QuickOutline"
name="Quick Outline">
</command>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:#TextEditorContext?after=group.open">
<command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"
style="push"
tooltip="Open Quick Outline">
<visibleWhen checkEnabled="false">
<reference definitionId="com.minres.rdl.RDL.Editor.opened"/>
</visibleWhen>
</command>
</menuContribution>
</extension>
<!-- quickfix marker resolution generator for com.minres.rdl.RDL -->
<extension
point="org.eclipse.ui.ide.markerResolution">
<markerResolutionGenerator
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
markerType="com.minres.rdl.ui.rdl.check.fast">
<attribute
name="FIXABLE_KEY"
value="true">
</attribute>
</markerResolutionGenerator>
<markerResolutionGenerator
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
markerType="com.minres.rdl.ui.rdl.check.normal">
<attribute
name="FIXABLE_KEY"
value="true">
</attribute>
</markerResolutionGenerator>
<markerResolutionGenerator
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
markerType="com.minres.rdl.ui.rdl.check.expensive">
<attribute
name="FIXABLE_KEY"
value="true">
</attribute>
</markerResolutionGenerator>
</extension>
<!-- Rename Refactoring -->
<extension point="org.eclipse.ui.handlers">
<handler
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.DefaultRenameElementHandler"
commandId="org.eclipse.xtext.ui.refactoring.RenameElement">
<activeWhen>
<reference
definitionId="com.minres.rdl.RDL.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:#TextEditorContext?after=group.edit">
<command commandId="org.eclipse.xtext.ui.refactoring.RenameElement"
style="push">
<visibleWhen checkEnabled="false">
<reference
definitionId="com.minres.rdl.RDL.Editor.opened">
</reference>
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.preferencePages">
<page
category="com.minres.rdl.RDL"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferencePage"
id="com.minres.rdl.RDL.refactoring"
name="Refactoring">
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
</page>
</extension>
<extension point="org.eclipse.compare.contentViewers">
<viewer id="com.minres.rdl.RDL.compare.contentViewers"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
extensions="rdl">
</viewer>
<contentTypeBinding
contentTypeId="com.minres.rdl.RDL.contenttype"
contentViewerId="com.minres.rdl.RDL.compare.contentViewers" />
</extension>
<extension point="org.eclipse.compare.contentMergeViewers">
<viewer id="com.minres.rdl.RDL.compare.contentMergeViewers"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
extensions="rdl" label="RDL Compare">
</viewer>
<contentTypeBinding
contentTypeId="com.minres.rdl.RDL.contenttype"
contentMergeViewerId="com.minres.rdl.RDL.compare.contentMergeViewers" />
</extension>
<extension point="org.eclipse.ui.editors.documentProviders">
<provider id="com.minres.rdl.RDL.editors.documentProviders"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.model.XtextDocumentProvider"
extensions="rdl">
</provider>
</extension>
<extension point="org.eclipse.team.core.fileTypes">
<fileTypes
extension="rdl"
type="text">
</fileTypes>
</extension>
<extension
point="org.eclipse.ui.newWizards">
<category id="com.minres.category" name="MINRES">
</category>
<wizard
category="com.minres.category"
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.wizard.template.TemplateNewProjectWizard"
id="com.minres.rdl.ui.wizard.RDLNewProjectWizard"
name="RDL Project"
icon="icons/new_RDL_proj.gif"
project="true">
</wizard>
</extension>
<extension
point="org.eclipse.xtext.ui.projectTemplate">
<projectTemplateProvider
class="com.minres.rdl.ui.wizard.RDLProjectTemplateProvider"
grammarName="com.minres.rdl.RDL">
</projectTemplateProvider>
</extension>
<extension
point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension targetID="org.eclipse.ui.resourcePerspective">
<newWizardShortcut id="com.minres.rdl.ui.wizard.RDLNewProjectWizard"/>
</perspectiveExtension>
</extension>
<!-- <extension point="org.eclipse.xtext.builder.participant">
<participant
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant"
fileExtensions="rdl"/>
</extension>-->
<extension
point="org.eclipse.ui.handlers">
<handler
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:com.minres.rdl.ui.builder.GenerationHandler"
commandId="com.minres.rdl.ui.handler.GenerationCommand">
</handler>
</extension>
<extension
point="org.eclipse.ui.commands">
<command name="Generate Code from RDL"
id="com.minres.rdl.ui.handler.GenerationCommand">
</command>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu">
<command
commandId="com.minres.rdl.ui.handler.GenerationCommand"
style="push">
<visibleWhen
checkEnabled="false">
<iterate>
<adapt type="org.eclipse.core.resources.IResource">
<test property="org.eclipse.core.resources.name"
value="*.rdl"/>
</adapt>
</iterate>
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="popup:#TextEditorContext?after=additions">
<command
commandId="com.minres.rdl.ui.handler.GenerationCommand"
style="push">
<visibleWhen checkEnabled="false">
<reference
definitionId="com.minres.rdl.RDL.Editor.opened">
</reference>
</visibleWhen>
</command>
</menuContribution>
</extension>
</plugin>

View File

@ -4,7 +4,7 @@
<parent>
<groupId>com.minres.rdl</groupId>
<artifactId>com.minres.rdl.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.4.1</version>
</parent>
<artifactId>com.minres.rdl.ui</artifactId>
<packaging>eclipse-plugin</packaging>
@ -17,6 +17,4 @@
</plugin>
</plugins>
</build>
<version>1.2.0-SNAPSHOT</version>
</project>

View File

@ -1,5 +1,5 @@
/*
* generated by Xtext 2.14.0
* generated by Xtext 2.26.0
*/
package com.minres.rdl.ui;
@ -14,7 +14,6 @@ import com.minres.rdl.ui.labeling.RDLDescriptionLabelProvider;
import com.minres.rdl.ui.labeling.RDLLabelProvider;
import com.minres.rdl.ui.outline.RDLOutlineTreeProvider;
import com.minres.rdl.ui.quickfix.RDLQuickfixProvider;
import com.minres.rdl.ui.wizard.RDLProjectCreator;
import com.minres.rdl.validation.RDLValidatorConfigurationBlock;
import org.eclipse.compare.IViewerCreator;
import org.eclipse.core.resources.IWorkspaceRoot;
@ -60,6 +59,8 @@ import org.eclipse.xtext.ui.editor.contentassist.IProposalConflictHelper;
import org.eclipse.xtext.ui.editor.contentassist.PrefixMatcher;
import org.eclipse.xtext.ui.editor.contentassist.antlr.AntlrProposalConflictHelper;
import org.eclipse.xtext.ui.editor.contentassist.antlr.DelegatingContentAssistContextFactory;
import org.eclipse.xtext.ui.editor.formatting.IContentFormatterFactory;
import org.eclipse.xtext.ui.editor.formatting2.ContentFormatterFactory;
import org.eclipse.xtext.ui.editor.outline.IOutlineTreeProvider;
import org.eclipse.xtext.ui.editor.outline.impl.IOutlineTreeStructureProvider;
import org.eclipse.xtext.ui.editor.preferences.IPreferenceStoreInitializer;
@ -80,6 +81,7 @@ import org.eclipse.xtext.ui.resource.ResourceServiceDescriptionLabelProvider;
import org.eclipse.xtext.ui.shared.Access;
import org.eclipse.xtext.ui.validation.AbstractValidatorConfigurationBlock;
import org.eclipse.xtext.ui.wizard.IProjectCreator;
import org.eclipse.xtext.ui.wizard.template.DefaultTemplateProjectCreator;
/**
* Manual modifications go to {@link RDLUiModule}.
@ -189,6 +191,11 @@ public abstract class AbstractRDLUiModule extends DefaultUiModule {
.to(BuilderPreferenceAccess.Initializer.class);
}
// contributed by org.eclipse.xtext.xtext.generator.formatting.Formatter2Fragment2
public Class<? extends IContentFormatterFactory> bindIContentFormatterFactory() {
return ContentFormatterFactory.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.labeling.LabelProviderFragment2
public Class<? extends ILabelProvider> bindILabelProvider() {
return RDLLabelProvider.class;
@ -287,9 +294,9 @@ public abstract class AbstractRDLUiModule extends DefaultUiModule {
binder.bind(String.class).annotatedWith(Names.named(UIBindings.COMPARE_VIEWER_TITLE)).toInstance("RDL Compare");
}
// contributed by org.eclipse.xtext.xtext.generator.ui.projectWizard.SimpleProjectWizardFragment2
// contributed by org.eclipse.xtext.xtext.generator.ui.projectWizard.TemplateProjectWizardFragment
public Class<? extends IProjectCreator> bindIProjectCreator() {
return RDLProjectCreator.class;
return DefaultTemplateProjectCreator.class;
}
// contributed by org.eclipse.xtext.xtext.generator.exporting.SimpleNamesFragment2

View File

@ -1,13 +1,13 @@
/*
* generated by Xtext 2.14.0
* generated by Xtext 2.26.0
*/
package com.minres.rdl.ui;
import com.google.inject.Injector;
import com.minres.rdl.ui.internal.RdlActivator;
import org.eclipse.core.runtime.Platform;
import org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory;
import org.osgi.framework.Bundle;
import org.osgi.framework.FrameworkUtil;
/**
* This class was generated. Customizations should only happen in a newly
@ -17,7 +17,7 @@ public class RDLExecutableExtensionFactory extends AbstractGuiceAwareExecutableE
@Override
protected Bundle getBundle() {
return Platform.getBundle(RdlActivator.PLUGIN_ID);
return FrameworkUtil.getBundle(RdlActivator.class);
}
@Override

View File

@ -1,5 +1,5 @@
/*
* generated by Xtext 2.14.0
* generated by Xtext 2.26.0
*/
package com.minres.rdl.ui.contentassist;

View File

@ -1,5 +1,5 @@
/*
* generated by Xtext 2.14.0
* generated by Xtext 2.26.0
*/
package com.minres.rdl.ui.internal;

View File

@ -1,55 +0,0 @@
/*
* generated by Xtext 2.14.0
*/
package com.minres.rdl.ui.wizard;
import org.eclipse.xtext.ui.wizard.XtextNewProjectWizard;
import org.eclipse.xtext.ui.wizard.IExtendedProjectInfo;
import org.eclipse.xtext.ui.wizard.IProjectCreator;
import com.google.inject.Inject;
public class RDLNewProjectWizard extends XtextNewProjectWizard {
private RDLWizardNewProjectCreationPage mainPage;
@Inject
public RDLNewProjectWizard(IProjectCreator projectCreator) {
super(projectCreator);
setWindowTitle("New RDL Project");
}
protected RDLWizardNewProjectCreationPage getMainPage() {
return mainPage;
}
/**
* Use this method to add pages to the wizard.
* The one-time generated version of this class will add a default new project page to the wizard.
*/
@Override
public void addPages() {
mainPage = createMainPage("basicNewProjectPage");
mainPage.setTitle("RDL Project");
mainPage.setDescription("Create a new RDL project.");
addPage(mainPage);
}
protected RDLWizardNewProjectCreationPage createMainPage(String pageName) {
return new RDLWizardNewProjectCreationPage(pageName);
}
/**
* Use this method to read the project settings from the wizard pages and feed them into the project info class.
*/
@Override
protected IExtendedProjectInfo getProjectInfo() {
RDLProjectInfo projectInfo = new RDLProjectInfo();
projectInfo.setProjectName(mainPage.getProjectName());
if (!mainPage.useDefaults()) {
projectInfo.setLocationPath(mainPage.getLocationPath());
}
return projectInfo;
}
}

View File

@ -1,98 +0,0 @@
/*
* generated by Xtext 2.14.0
*/
package com.minres.rdl.ui.wizard;
import org.eclipse.xtext.ui.wizard.AbstractPluginProjectCreator;
import java.util.HashMap;
import java.util.List;
import java.util.Set;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.xtext.builder.EclipseResourceFileSystemAccess2;
import org.eclipse.xtext.generator.IFileSystemAccess;
import org.eclipse.xtext.generator.IFileSystemAccess2;
import org.eclipse.xtext.generator.IOutputConfigurationProvider;
import org.eclipse.xtext.generator.OutputConfiguration;
import org.eclipse.xtext.ui.util.PluginProjectFactory;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import com.google.inject.Inject;
import com.google.inject.Provider;
public class RDLProjectCreator extends AbstractPluginProjectCreator {
protected static final String DSL_PROJECT_NAME = "com.minres.rdl";
@Inject
private RDLNewProjectWizardInitialContents initialContents;
@Inject
private Provider<EclipseResourceFileSystemAccess2> fileSystemAccessProvider;
@Inject
private IOutputConfigurationProvider outputConfigurationProvider;
@Override
protected PluginProjectFactory createProjectFactory() {
PluginProjectFactory projectFactory = super.createProjectFactory();
projectFactory.setWithPluginXml(false);
return projectFactory;
}
@Override
protected RDLProjectInfo getProjectInfo() {
return (RDLProjectInfo) super.getProjectInfo();
}
@Override
protected String getModelFolderName() {
return "src";
}
@Override
protected List<String> getAllFolders() {
Set<OutputConfiguration> outputConfigurations = outputConfigurationProvider.getOutputConfigurations();
String outputFolder = "src-gen";
for (OutputConfiguration outputConfiguration : outputConfigurations) {
if (IFileSystemAccess.DEFAULT_OUTPUT.equals(outputConfiguration.getName())) {
outputFolder = outputConfiguration.getOutputDirectory();
break;
}
}
return ImmutableList.of(getModelFolderName(), outputFolder);
}
@Override
protected List<String> getRequiredBundles() {
return Lists.newArrayList(DSL_PROJECT_NAME);
}
@Override
protected void enhanceProject(final IProject project, final IProgressMonitor monitor) throws CoreException {
IFileSystemAccess2 access = getFileSystemAccess(project, monitor);
initialContents.generateInitialContents(access);
project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
}
protected IFileSystemAccess2 getFileSystemAccess(final IProject project, final IProgressMonitor monitor) {
EclipseResourceFileSystemAccess2 access = fileSystemAccessProvider.get();
access.setContext(project);
access.setMonitor(monitor);
OutputConfiguration defaultOutput = new OutputConfiguration(IFileSystemAccess.DEFAULT_OUTPUT);
defaultOutput.setDescription("Output Folder");
defaultOutput.setOutputDirectory("./");
defaultOutput.setOverrideExistingResources(true);
defaultOutput.setCreateOutputDirectory(true);
defaultOutput.setCleanUpDerivedResources(false);
defaultOutput.setSetDerivedProperty(false);
defaultOutput.setKeepLocalHistory(false);
HashMap<String, OutputConfiguration> outputConfigurations = new HashMap<String, OutputConfiguration>();
outputConfigurations.put(IFileSystemAccess.DEFAULT_OUTPUT, defaultOutput);
access.setOutputConfigurations(outputConfigurations);
return access;
}
}

View File

@ -1,52 +1,22 @@
/*
* generated by Xtext 2.14.0
* generated by Xtext 2.26.0
*/
package com.minres.rdl.validation;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.xtext.ui.preferences.OptionsConfigurationBlock;
import org.eclipse.xtext.ui.validation.AbstractValidatorConfigurationBlock;
import org.eclipse.xtext.validation.SeverityConverter;
@SuppressWarnings("restriction")
public class RDLValidatorConfigurationBlock extends AbstractValidatorConfigurationBlock {
protected static final String SETTINGS_SECTION_NAME = "RDL";
@Override
protected void fillSettingsPage(Composite composite, int nColumns, int defaultIndent) {
addComboBox(RDLConfigurableIssueCodesProvider.DEPRECATED_MODEL_PART, "Deprecated Model Part", composite, defaultIndent);
}
@Override
protected Job getBuildJob(IProject project) {
Job buildJob = new OptionsConfigurationBlock.BuildJob("Validation Settings Changed", project);
buildJob.setRule(ResourcesPlugin.getWorkspace().getRuleFactory().buildRule());
buildJob.setUser(true);
return buildJob;
}
@Override
protected String[] getFullBuildDialogStrings(boolean workspaceSettings) {
return new String[] { "Validation Settings Changed",
"Validation settings have changed. A full rebuild is required for changes to take effect. Do the full build now?" };
}
@Override
protected void validateSettings(String changedKey, String oldValue, String newValue) {
}
protected Combo addComboBox(String prefKey, String label, Composite parent, int indent) {
String[] values = new String[] { SeverityConverter.SEVERITY_ERROR, SeverityConverter.SEVERITY_WARNING,
SeverityConverter.SEVERITY_INFO, SeverityConverter.SEVERITY_IGNORE };
String[] valueLabels = new String[] { "Error", "Warning", "Info", "Ignore" };
Combo comboBox = addComboBox(parent, label, prefKey, indent, values, valueLabels);
return comboBox;
}
@Override
public void dispose() {
storeSectionExpansionStates(getDialogSettings());
@ -56,9 +26,9 @@ public class RDLValidatorConfigurationBlock extends AbstractValidatorConfigurati
@Override
protected IDialogSettings getDialogSettings() {
IDialogSettings dialogSettings = super.getDialogSettings();
IDialogSettings section = dialogSettings.getSection("RDL");
IDialogSettings section = dialogSettings.getSection(SETTINGS_SECTION_NAME);
if (section == null) {
return dialogSettings.addNewSection("RDL");
return dialogSettings.addNewSection(SETTINGS_SECTION_NAME);
}
return section;
}

View File

@ -1,17 +0,0 @@
package com.minres.rdl.ui;
import org.eclipse.xtext.ui.XtextProjectHelper;
import com.minres.rdl.ui.wizard.RDLProjectCreator;
public class JDTFreeStructuralProjectCreator extends RDLProjectCreator {
@Override
protected String[] getProjectNatures() {
return new String[] {XtextProjectHelper.NATURE_ID};
}
@Override
protected String[] getBuilders() {
return new String[] {XtextProjectHelper.BUILDER_ID};
}
}

View File

@ -3,16 +3,15 @@
*/
package com.minres.rdl.ui
import com.minres.rdl.ui.hyperlink.RdlHyperlinkHelper
import com.minres.rdl.ui.hyperlink.RdlXtextHyperlink
import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor
import org.eclipse.xtext.ui.editor.hover.IEObjectHoverProvider
import org.eclipse.xtext.documentation.IEObjectDocumentationProvider
import org.eclipse.xtext.ui.wizard.IProjectCreator
import org.eclipse.xtext.ui.editor.hover.IEObjectHoverProvider
import org.eclipse.xtext.ui.editor.hyperlinking.HyperlinkHelper
import org.eclipse.xtext.ui.editor.hyperlinking.XtextHyperlink
import org.eclipse.xtext.ui.resource.IResourceSetProvider
import org.eclipse.xtext.ui.resource.SimpleResourceSetProvider
import org.eclipse.xtext.ui.editor.hyperlinking.HyperlinkHelper
import com.minres.structural.ui.hyperlink.MyHyperlinkHelper
import org.eclipse.xtext.ui.editor.hyperlinking.XtextHyperlink
import com.minres.structural.ui.hyperlink.MyXtextHyperlink
/**
* Use this class to register components to be used within the Eclipse IDE.
@ -28,20 +27,20 @@ class RDLUiModule extends AbstractRDLUiModule {
typeof(RDLEObjectDocumentationProvider);
}
override Class<? extends IProjectCreator> bindIProjectCreator() {
return JDTFreeStructuralProjectCreator;
}
// override Class<? extends IProjectCreator> bindIProjectCreator() {
// return JDTFreeStructuralProjectCreator;
// }
override Class<? extends IResourceSetProvider> bindIResourceSetProvider() {
return SimpleResourceSetProvider
}
def Class<? extends HyperlinkHelper> bindHyperlinkHelper() {
return MyHyperlinkHelper
return RdlHyperlinkHelper
}
def Class<? extends XtextHyperlink> bindHyperlink() {
return MyXtextHyperlink
return RdlXtextHyperlink
}
}

View File

@ -0,0 +1,134 @@
package com.minres.rdl.ui.builder;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.IHandler;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.handlers.HandlerUtil;
import org.eclipse.xtext.builder.EclipseResourceFileSystemAccess2;
import org.eclipse.xtext.generator.IGenerator2;
import org.eclipse.xtext.resource.IResourceDescriptions;
import org.eclipse.xtext.resource.XtextResource;
import org.eclipse.xtext.ui.editor.XtextEditor;
import org.eclipse.xtext.ui.resource.IResourceSetProvider;
import org.eclipse.xtext.util.CancelIndicator;
import org.eclipse.xtext.util.concurrent.IUnitOfWork;
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.minres.rdl.generator.RdlGeneratorContext;
import com.minres.rdl.preferences.PreferenceConstants;
public class GenerationHandler extends AbstractHandler implements IHandler {
@Inject
private IGenerator2 generator;
@Inject
private Provider<EclipseResourceFileSystemAccess2> fileAccessProvider;
@Inject
IResourceDescriptions resourceDescriptions;
@Inject
IResourceSetProvider resourceSetProvider;
IEclipsePreferences preferences = InstanceScope.INSTANCE.getNode(PreferenceConstants.SCOPE_NAME);
@Override
public Object execute(ExecutionEvent event) {
RdlGeneratorContext context = new RdlGeneratorContext();
context.cancelIndicator = CancelIndicator.NullImpl;
context.namespace = preferences.get(PreferenceConstants.P_NAMESPACE, "sysc");
context.forceOverwrite=preferences.getBoolean(PreferenceConstants.P_OVERWRITE_STUBS, false);
String whatToGenerate = preferences.get(PreferenceConstants.P_FILETYPES_TO_GENERATE, "all");
if(whatToGenerate=="sc-comp") {
context.generateFw=false;
} else if(whatToGenerate=="fw") {
context.generateSc=false;
}
context.forceOverwrite=preferences.getBoolean(PreferenceConstants.P_OVERWRITE_STUBS, false);
context.fwPathModifier=preferences.get(PreferenceConstants.P_FIRMWARE_PATH, "");
context.scPathModifier=preferences.get(PreferenceConstants.P_COMPONENT_PATH, "");
String outputDir = preferences.get("outlet.DEFAULT_OUTPUT.directory", "src-gen");
IEditorPart activeEditor = HandlerUtil.getActiveEditor(event);
IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
if (activeEditor instanceof XtextEditor && activeEditor == activePart) {
IFile file = (IFile) activeEditor.getEditorInput().getAdapter(IFile.class);
if (file != null) {
final EclipseResourceFileSystemAccess2 fsa = getFsa(outputDir, file, context.fwPathModifier, context.scPathModifier);
((XtextEditor)activeEditor).getDocument().readOnly(new IUnitOfWork<Boolean, XtextResource>() {
@Override
public Boolean exec(XtextResource state) throws Exception {
generator.doGenerate(state, fsa, context);
return Boolean.TRUE;
}
});
}
} else {
ISelection selection = HandlerUtil.getCurrentSelection(event);
if (selection instanceof IStructuredSelection) {
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
for (Object element : structuredSelection) {
if (element instanceof IFile) {
IFile file = (IFile) element;
final EclipseResourceFileSystemAccess2 fsa = getFsa(outputDir, file, context.fwPathModifier, context.scPathModifier);
URI uri = URI.createPlatformResourceURI(file.getFullPath().toString(), true);
Resource r = resourceSetProvider.get(file.getProject()).getResource(uri, true);
try {
generator.doGenerate(r, fsa, context);
} finally {}
}
}
}
}
return null;
}
private EclipseResourceFileSystemAccess2 getFsa(String outputDir, IFile file, String fwPath, String scPath) {
IProject project = file.getProject();
IFolder srcGenFolder = project.getFolder(outputDir);
createIfNotExists(srcGenFolder);
if(fwPath.length()>0) createIfNotExists(srcGenFolder.getFolder(fwPath));
if(scPath.length()>0) createIfNotExists(srcGenFolder.getFolder(scPath));
final EclipseResourceFileSystemAccess2 fsa = fileAccessProvider.get();
fsa.setOutputPath("src-gen");
String scGenFolderPath = (fwPath.length()>0? srcGenFolder.getFolder(scPath) : srcGenFolder).getProjectRelativePath().toString();
fsa.setOutputPath("sc-incl-out", scGenFolderPath);
fsa.setOutputPath("sc-src-out", scGenFolderPath);
String fwGenFolderPath = (fwPath.length()>0? srcGenFolder.getFolder(fwPath) : srcGenFolder).getProjectRelativePath().toString();
fsa.setOutputPath("fw-incl-out", fwGenFolderPath);
fsa.setOutputPath("fw-src-out", fwGenFolderPath);
fsa.setProject(project);
fsa.setMonitor(new NullProgressMonitor());
return fsa;
}
private void createIfNotExists(IFolder srcGenFolder) {
if (!srcGenFolder.exists()) {
try {
srcGenFolder.create(true, true, new NullProgressMonitor());
} catch (CoreException e) { }
}
}
@Override
public boolean isEnabled() {
return true;
}
}

View File

@ -1,4 +1,4 @@
package com.minres.structural.ui.hyperlink
package com.minres.rdl.ui.hyperlink
import com.google.inject.Inject
import org.eclipse.emf.common.util.URI
@ -11,8 +11,9 @@ import org.eclipse.xtext.scoping.impl.ImportUriResolver
import org.eclipse.xtext.ui.editor.hyperlinking.HyperlinkHelper
import org.eclipse.xtext.ui.editor.hyperlinking.IHyperlinkAcceptor
import org.eclipse.xtext.util.TextRegion
import org.eclipse.jface.text.IRegion
class MyHyperlinkHelper extends HyperlinkHelper {
class RdlHyperlinkHelper extends HyperlinkHelper {
@Inject ImportUriResolver resolver;
@ -33,10 +34,10 @@ class MyHyperlinkHelper extends HyperlinkHelper {
val textRegion = leaf.getTextRegion();
val uri = EcoreUtil.getURI(top);
val result = hyperlinkProvider.get();
result.setHyperlinkRegion(new Region(textRegion.getOffset(), textRegion.getLength()));
result.setHyperlinkRegion(new Region(textRegion.getOffset(), textRegion.getLength()) as IRegion);
result.setURI(if(uri.isPlatformResource()) uri else resource.getResourceSet().getURIConverter().normalize(uri));
result.setHyperlinkText(labelProvider.getText(top));
if(result instanceof MyXtextHyperlink) result.selectTarget=false
if(result instanceof RdlXtextHyperlink) result.selectTarget=false
acceptor.accept(result);
}
}

View File

@ -1,10 +1,10 @@
package com.minres.structural.ui.hyperlink
package com.minres.rdl.ui.hyperlink
import com.google.inject.Inject
import org.eclipse.xtext.ui.editor.IURIEditorOpener
import org.eclipse.xtext.ui.editor.hyperlinking.XtextHyperlink
class MyXtextHyperlink extends XtextHyperlink {
class RdlXtextHyperlink extends XtextHyperlink {
var boolean select = true

View File

@ -43,7 +43,10 @@ class RDLLabelProvider extends DefaultEObjectLabelProvider {
val pa = e.propertyAssignments.findFirst[PropertyAssignment pa |
pa instanceof ExplicitPropertyAssignment && (pa as ExplicitPropertyAssignment).name==PropertyEnum.NAME
]
e.type.literal+' '+ text((pa as ExplicitPropertyAssignment).rhs)
if(pa!== null)
e.type.literal+' '+ text((pa as ExplicitPropertyAssignment).rhs)
else
e.type.literal
}
}

View File

@ -8,6 +8,7 @@ import com.minres.rdl.preferences.PreferenceConstants
import org.eclipse.ui.preferences.ScopedPreferenceStore
import org.eclipse.core.runtime.preferences.InstanceScope
import org.eclipse.jface.preference.ComboFieldEditor
import org.eclipse.jface.preference.StringFieldEditor
class RdlPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
@ -21,6 +22,12 @@ class RdlPreferencePage extends FieldEditorPreferencePage implements IWorkbenchP
override createFieldEditors() {
addField(new BooleanFieldEditor(PreferenceConstants.P_GENERATE_CSV, "Generate CSV:", getFieldEditorParent()));
addField(new ComboFieldEditor(PreferenceConstants.P_ADDRESSUNIT, "Address unit size", #[#["Byte (8bit)","byte"], #["Word (16bit)","word"], #["DWord (32bit)","dword"]], getFieldEditorParent()))
addField(new StringFieldEditor(PreferenceConstants.P_NAMESPACE, "Namespace of generated SystemC", 30, getFieldEditorParent()))
addField(new BooleanFieldEditor(PreferenceConstants.P_OVERWRITE_STUBS, "Always overwrite component stubs", getFieldEditorParent()));
addField(new ComboFieldEditor(PreferenceConstants.P_FILETYPES_TO_GENERATE, "File types to generate", #[#["All","all"], #["FW only","fw"], #["SC components","sc-comp"]], getFieldEditorParent()))
addField(new StringFieldEditor(PreferenceConstants.P_COMPONENT_PATH, "relative path for SystemC files", 30, getFieldEditorParent()))
addField(new StringFieldEditor(PreferenceConstants.P_FIRMWARE_PATH, "relative path for FW files", 30, getFieldEditorParent()))
addField(new StringFieldEditor(PreferenceConstants.P_COPYRIGHT_HEADER, "Copyright header", 40, 5, StringFieldEditor.VALIDATE_ON_KEY_STROKE, getFieldEditorParent()))
}
override init(IWorkbench workbench) {

View File

@ -0,0 +1,20 @@
package com.minres.rdl.ui.wizard;
import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
private static final String BUNDLE_NAME = "com.minres.rdl.ui.wizard.messages"; //$NON-NLS-1$
public static String HelloWorldProject_Label;
public static String HelloWorldProject_Description;
public static String RdlProject_Label;
public static String RdlProject_Description;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
}
private Messages() {
}
}

View File

@ -1,26 +0,0 @@
/*
* generated by Xtext 2.14.0
*/
package com.minres.rdl.ui.wizard
import com.google.inject.Inject
import org.eclipse.xtext.generator.IFileSystemAccess2
import org.eclipse.xtext.resource.FileExtensionProvider
class RDLNewProjectWizardInitialContents {
@Inject
FileExtensionProvider fileExtensionProvider
def generateInitialContents(IFileSystemAccess2 fsa) {
fsa.generateFile(
"src/model/Model." + fileExtensionProvider.primaryFileExtension,
'''
/*
* This is an example model
*/
Hello Xtext!
'''
)
}
}

View File

@ -1,10 +0,0 @@
/*
* generated by Xtext 2.14.0
*/
package com.minres.rdl.ui.wizard;
import org.eclipse.xtext.ui.wizard.DefaultProjectInfo;
public class RDLProjectInfo extends DefaultProjectInfo {
}

View File

@ -0,0 +1,81 @@
/*
* generated by Xtext 2.14.0
*/
package com.minres.rdl.ui.wizard
import org.eclipse.xtext.ui.XtextProjectHelper
import org.eclipse.xtext.ui.util.PluginProjectFactory
import org.eclipse.xtext.ui.wizard.template.IProjectGenerator
import org.eclipse.xtext.ui.wizard.template.IProjectTemplateProvider
import org.eclipse.xtext.ui.wizard.template.ProjectTemplate
/**
* Create a list with all project templates to be shown in the template new project wizard.
*
* Each template is able to generate one or more projects. Each project can be configured such that any number of files are included.
*/
class RDLProjectTemplateProvider implements IProjectTemplateProvider {
override getProjectTemplates() {
#[new RdlProject]
}
}
@ProjectTemplate(
label="RDL template",
icon="project_template.png",
description="<p><b>RDL</b></p><p>This is a simple project for RDL.</p>")
final class RdlProject {
// val advanced = check("Advanced:", false)
// val advancedGroup = group("Properties")
// val name = combo("Name:", #["Xtext", "World", "Foo", "Bar"], "The name to say 'Hello' to", advancedGroup)
// val path = text("Package:", "mydsl", "The package path to place the files in", advancedGroup)
//
// override protected updateVariables() {
// name.enabled = advanced.value
// path.enabled = advanced.value
// if (!advanced.value) {
// name.value = "Xtext"
// path.value = "rdl"
// }
// }
//
// override protected validate() {
// if (path.value.matches('[a-z][a-z0-9_]*(/[a-z][a-z0-9_]*)*'))
// null
// else
// new Status(ERROR, "Wizard", "'" + path + "' is not a valid package name")
// }
override generateProjects(IProjectGenerator generator) {
generator.generate(new PluginProjectFactory => [
projectName = projectInfo.projectName
location = projectInfo.locationPath
projectNatures += XtextProjectHelper.NATURE_ID //#[JavaCore.NATURE_ID, "org.eclipse.pde.PluginNature", XtextProjectHelper.NATURE_ID]
builderIds += XtextProjectHelper.BUILDER_ID //JavaCore.BUILDER_ID
folders += "src"
addFile('''src/Model.rdl''', '''
enum ERRSLICE0_MISSIONERR_ENABLE_ERR25_enum{
DISABLE = 1'd0;
ENABLE = 1'd1;
};
addrmap {
name = "foo registers";
desc = "this is a bunch of foo regs bla bla bla";
regfile bar_regs {
name = "bar registers";
desc = "this is a bunch of bar regs bla bla bla";
reg {
field { name="field 1"; sw=rw; hw=rw; we; } fld1[9:0] = 10'd0;
field { name="field 2"; sw=rw; hw=r; } fld2[15:15];
field {encode=ERRSLICE0_MISSIONERR_ENABLE_ERR25_enum; sw=rw; hw=r; reset=1'h1;} ERR25[25:25];
} a_reg[2];
} bar;
} foo;
''')
])
}
}

View File

@ -1,14 +0,0 @@
/*
* generated by Xtext 2.14.0
*/
package com.minres.rdl.ui.wizard;
import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
public class RDLWizardNewProjectCreationPage extends WizardNewProjectCreationPage {
public RDLWizardNewProjectCreationPage(String pageName) {
super(pageName);
}
}

View File

@ -0,0 +1,4 @@
HelloWorldProject_Label=Hello World
HelloWorldProject_Description=<p><b>Hello World</b></p> <p>This is a parameterized hello world for RDL. You can set a parameter to modify the content in the generated file and a parameter to set the package the file is created in.</p>
RdlProject_Label=RDL template
RdlProject_Description=<p><b>RDL</b></p><p>This is a simple project for RDL.</p>

View File

@ -1,12 +0,0 @@
package com.minres.rdl.ui;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.documentation.IEObjectDocumentationProvider;
@SuppressWarnings("all")
public class RDLEObjectDocumentationProvider implements IEObjectDocumentationProvider {
@Override
public String getDocumentation(final EObject o) {
return null;
}
}

View File

@ -1,46 +0,0 @@
package com.minres.rdl.ui;
import com.minres.rdl.rdl.ComponentDefinition;
import com.minres.rdl.rdl.ComponentDefinitionType;
import com.minres.rdl.rdl.ComponentInstance;
import com.minres.rdl.rdl.Instantiation;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.ui.editor.hover.html.DefaultEObjectHoverProvider;
import org.eclipse.xtext.xbase.lib.StringExtensions;
@SuppressWarnings("all")
public class RDLEObjectHoverProvider extends DefaultEObjectHoverProvider {
@Override
protected String getFirstLine(final EObject o) {
boolean _matched = false;
if (o instanceof ComponentDefinition) {
_matched=true;
String _name = ((ComponentDefinition)o).getName();
String _plus = ("Component " + _name);
String _plus_1 = (_plus + " of type ");
String _literal = ((ComponentDefinition)o).getType().getLiteral();
return (_plus_1 + _literal);
}
if (!_matched) {
if (o instanceof ComponentInstance) {
_matched=true;
final EObject parent = ((ComponentInstance)o).eContainer();
if ((parent instanceof Instantiation)) {
ComponentDefinitionType _xifexpression = null;
ComponentDefinition _componentRef = ((Instantiation)parent).getComponentRef();
boolean _tripleNotEquals = (_componentRef != null);
if (_tripleNotEquals) {
_xifexpression = ((Instantiation)parent).getComponentRef().getType();
} else {
_xifexpression = ((Instantiation)parent).getComponent().getType();
}
String _firstUpper = StringExtensions.toFirstUpper(_xifexpression.getLiteral());
String _plus = (_firstUpper + " ");
String _name = ((ComponentInstance)o).getName();
return (_plus + _name);
}
}
}
return super.getFirstLine(o);
}
}

View File

@ -1,57 +0,0 @@
/**
* generated by Xtext 2.14.0
*/
package com.minres.rdl.ui;
import com.minres.rdl.ui.AbstractRDLUiModule;
import com.minres.rdl.ui.JDTFreeStructuralProjectCreator;
import com.minres.rdl.ui.RDLEObjectDocumentationProvider;
import com.minres.rdl.ui.RDLEObjectHoverProvider;
import com.minres.structural.ui.hyperlink.MyHyperlinkHelper;
import com.minres.structural.ui.hyperlink.MyXtextHyperlink;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor;
import org.eclipse.xtext.documentation.IEObjectDocumentationProvider;
import org.eclipse.xtext.ui.editor.hover.IEObjectHoverProvider;
import org.eclipse.xtext.ui.editor.hyperlinking.HyperlinkHelper;
import org.eclipse.xtext.ui.editor.hyperlinking.XtextHyperlink;
import org.eclipse.xtext.ui.resource.IResourceSetProvider;
import org.eclipse.xtext.ui.resource.SimpleResourceSetProvider;
import org.eclipse.xtext.ui.wizard.IProjectCreator;
/**
* Use this class to register components to be used within the Eclipse IDE.
*/
@FinalFieldsConstructor
@SuppressWarnings("all")
public class RDLUiModule extends AbstractRDLUiModule {
public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() {
return RDLEObjectHoverProvider.class;
}
public Class<? extends IEObjectDocumentationProvider> bindIEObjectDocumentationProviderr() {
return RDLEObjectDocumentationProvider.class;
}
@Override
public Class<? extends IProjectCreator> bindIProjectCreator() {
return JDTFreeStructuralProjectCreator.class;
}
@Override
public Class<? extends IResourceSetProvider> bindIResourceSetProvider() {
return SimpleResourceSetProvider.class;
}
public Class<? extends HyperlinkHelper> bindHyperlinkHelper() {
return MyHyperlinkHelper.class;
}
public Class<? extends XtextHyperlink> bindHyperlink() {
return MyXtextHyperlink.class;
}
public RDLUiModule(final AbstractUIPlugin arg0) {
super(arg0);
}
}

View File

@ -1,14 +0,0 @@
/**
* generated by Xtext 2.14.0
*/
package com.minres.rdl.ui.contentassist;
import com.minres.rdl.ui.contentassist.AbstractRDLProposalProvider;
/**
* See https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#content-assist
* on how to customize the content assistant.
*/
@SuppressWarnings("all")
public class RDLProposalProvider extends AbstractRDLProposalProvider {
}

View File

@ -1,15 +0,0 @@
/**
* generated by Xtext 2.14.0
*/
package com.minres.rdl.ui.labeling;
import org.eclipse.xtext.ui.label.DefaultDescriptionLabelProvider;
/**
* Provides labels for IEObjectDescriptions and IResourceDescriptions.
*
* See https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#label-provider
*/
@SuppressWarnings("all")
public class RDLDescriptionLabelProvider extends DefaultDescriptionLabelProvider {
}

View File

@ -1,375 +0,0 @@
/**
* generated by Xtext 2.14.0
*/
package com.minres.rdl.ui.labeling;
import com.google.common.base.Objects;
import com.google.inject.Inject;
import com.minres.rdl.IntegerWithRadix;
import com.minres.rdl.rdl.ComponentDefinition;
import com.minres.rdl.rdl.ComponentDefinitionType;
import com.minres.rdl.rdl.ComponentInstance;
import com.minres.rdl.rdl.EnumDefinition;
import com.minres.rdl.rdl.EnumEntry;
import com.minres.rdl.rdl.EnumProperty;
import com.minres.rdl.rdl.ExplicitPropertyAssignment;
import com.minres.rdl.rdl.InstancePropertyRef;
import com.minres.rdl.rdl.InstanceRef;
import com.minres.rdl.rdl.PostPropertyAssignment;
import com.minres.rdl.rdl.PropertyAssignment;
import com.minres.rdl.rdl.PropertyAssignmentRhs;
import com.minres.rdl.rdl.PropertyDefinition;
import com.minres.rdl.rdl.PropertyEnum;
import com.minres.rdl.rdl.PropertyModifier;
import com.minres.rdl.rdl.RValue;
import com.minres.rdl.rdl.RValueConstant;
import com.minres.rdl.rdl.Range;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
import org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider;
import org.eclipse.xtext.xbase.lib.Functions.Function1;
import org.eclipse.xtext.xbase.lib.IterableExtensions;
import org.eclipse.xtext.xbase.lib.ListExtensions;
/**
* Provides labels for EObjects.
*
* See https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#label-provider
*/
@SuppressWarnings("all")
public class RDLLabelProvider extends DefaultEObjectLabelProvider {
@Inject
public RDLLabelProvider(final AdapterFactoryLabelProvider delegate) {
super(delegate);
}
public String text(final ComponentDefinition e) {
String _xifexpression = null;
String _name = e.getName();
boolean _tripleNotEquals = (_name != null);
if (_tripleNotEquals) {
String _literal = e.getType().getLiteral();
String _plus = (_literal + " ");
String _name_1 = e.getName();
_xifexpression = (_plus + _name_1);
} else {
String _xblockexpression = null;
{
final Function1<PropertyAssignment, Boolean> _function = (PropertyAssignment pa) -> {
return Boolean.valueOf(((pa instanceof ExplicitPropertyAssignment) && Objects.equal(((ExplicitPropertyAssignment) pa).getName(), PropertyEnum.NAME)));
};
final PropertyAssignment pa = IterableExtensions.<PropertyAssignment>findFirst(e.getPropertyAssignments(), _function);
String _literal_1 = e.getType().getLiteral();
String _plus_1 = (_literal_1 + " ");
Object _text = this.text(((ExplicitPropertyAssignment) pa).getRhs());
_xblockexpression = (_plus_1 + _text);
}
_xifexpression = _xblockexpression;
}
return _xifexpression;
}
public String text(final ExplicitPropertyAssignment e) {
String res = "";
PropertyModifier _modifier = e.getModifier();
boolean _notEquals = (!Objects.equal(_modifier, PropertyModifier.UNDEFINED));
if (_notEquals) {
String _res = res;
String _literal = e.getModifier().getLiteral();
String _plus = (_literal + " ");
res = (_res + _plus);
}
String _res_1 = res;
PropertyEnum _name = e.getName();
res = (_res_1 + _name);
PropertyAssignmentRhs _rhs = e.getRhs();
boolean _tripleNotEquals = (_rhs != null);
if (_tripleNotEquals) {
String _res_2 = res;
Object _text = this.text(e.getRhs());
String _plus_1 = (" = " + _text);
res = (_res_2 + _plus_1);
}
return res;
}
public String text(final PostPropertyAssignment e) {
String res = "";
String _res = res;
String _text = this.text(e.getInstance());
res = (_res + _text);
PropertyDefinition _property = e.getProperty();
boolean _tripleNotEquals = (_property != null);
if (_tripleNotEquals) {
String _res_1 = res;
String _name = e.getProperty().getName();
String _plus = ("->" + _name);
res = (_res_1 + _plus);
} else {
PropertyEnum _propertyEnum = e.getPropertyEnum();
boolean _notEquals = (!Objects.equal(_propertyEnum, PropertyEnum.UNSPECIFIED));
if (_notEquals) {
String _res_2 = res;
String _literal = e.getPropertyEnum().getLiteral();
String _plus_1 = ("->" + _literal);
res = (_res_2 + _plus_1);
}
}
return res;
}
public String text(final InstanceRef e) {
String _xifexpression = null;
InstanceRef _tail = e.getTail();
boolean _tripleNotEquals = (_tail != null);
if (_tripleNotEquals) {
String _name = e.getInstance().getName();
String _plus = (_name + ".");
String _text = this.text(e.getTail());
_xifexpression = (_plus + _text);
} else {
_xifexpression = e.getInstance().getName();
}
return _xifexpression;
}
public String text(final ComponentInstance e) {
String res = e.getName();
Range _range = e.getRange();
boolean _tripleNotEquals = (_range != null);
if (_tripleNotEquals) {
String _res = res;
String _xifexpression = null;
Object _size = e.getRange().getSize();
boolean _tripleNotEquals_1 = (_size != null);
if (_tripleNotEquals_1) {
_xifexpression = e.getRange().getSize().toString();
} else {
Object _left = e.getRange().getLeft();
String _plus = (_left + ":");
Object _right = e.getRange().getRight();
_xifexpression = (_plus + _right);
}
String _plus_1 = ("[" + _xifexpression);
String _plus_2 = (_plus_1 + "]");
res = (_res + _plus_2);
}
Object _address = e.getAddress();
boolean _tripleNotEquals_2 = (_address != null);
if (_tripleNotEquals_2) {
String _res_1 = res;
Object _address_1 = e.getAddress();
String _plus_3 = (" @" + _address_1);
res = (_res_1 + _plus_3);
}
return res;
}
public Object text(final PropertyAssignmentRhs e) {
Object _xifexpression = null;
RValue _value = e.getValue();
boolean _tripleNotEquals = (_value != null);
if (_tripleNotEquals) {
_xifexpression = this.text(e.getValue());
} else {
Object _xifexpression_1 = null;
InstancePropertyRef _instPropRef = e.getInstPropRef();
boolean _tripleNotEquals_1 = (_instPropRef != null);
if (_tripleNotEquals_1) {
_xifexpression_1 = this.text(e.getInstPropRef());
} else {
Object _xifexpression_2 = null;
EnumDefinition _enumRef = e.getEnumRef();
boolean _tripleNotEquals_2 = (_enumRef != null);
if (_tripleNotEquals_2) {
_xifexpression_2 = this.text(e.getEnumRef());
}
_xifexpression_1 = _xifexpression_2;
}
_xifexpression = _xifexpression_1;
}
return _xifexpression;
}
public String text(final InstancePropertyRef ref) {
String _text = this.text(ref.getInstance());
String _xifexpression = null;
PropertyDefinition _property = ref.getProperty();
boolean _tripleNotEquals = (_property != null);
if (_tripleNotEquals) {
String _name = ref.getProperty().getName();
_xifexpression = ("->" + _name);
} else {
String _xifexpression_1 = null;
PropertyEnum _propertyEnum = ref.getPropertyEnum();
boolean _notEquals = (!Objects.equal(_propertyEnum, PropertyEnum.UNSPECIFIED));
if (_notEquals) {
String _literal = ref.getPropertyEnum().getLiteral();
_xifexpression_1 = ("->" + _literal);
} else {
_xifexpression_1 = "";
}
_xifexpression = _xifexpression_1;
}
return (_text + _xifexpression);
}
public String text(final RValue e) {
String _xifexpression = null;
String _str = e.getStr();
boolean _tripleNotEquals = (_str != null);
if (_tripleNotEquals) {
_xifexpression = this.elipse(e.getStr());
} else {
RValueConstant _val = e.getVal();
boolean _notEquals = (!Objects.equal(_val, RValueConstant.UNDEFINED));
if (_notEquals) {
return e.getVal().getLiteral();
} else {
Object _num = e.getNum();
boolean _tripleNotEquals_1 = (_num != null);
if (_tripleNotEquals_1) {
Object _num_1 = e.getNum();
final IntegerWithRadix num = ((IntegerWithRadix) _num_1);
return num.toString();
}
}
}
return _xifexpression;
}
public String elipse(final String string) {
final int pos = string.indexOf("\n");
if ((pos > 0)) {
String _substring = string.substring(0, (pos - 1));
return (_substring + "...");
} else {
int _length = string.length();
boolean _greaterThan = (_length > 30);
if (_greaterThan) {
String _substring_1 = string.substring(0, 30);
return (_substring_1 + "...");
} else {
return string;
}
}
}
public String text(final EnumEntry e) {
String _xifexpression = null;
Object _index = e.getIndex();
boolean _tripleNotEquals = (_index != null);
if (_tripleNotEquals) {
String _name = e.getName();
String _plus = (_name + "=");
String _string = e.getIndex().toString();
_xifexpression = (_plus + _string);
} else {
String _name_1 = e.getName();
String _plus_1 = (_name_1 + "=");
final Function1<EnumProperty, String> _function = (EnumProperty it) -> {
return this.text(it);
};
String _join = IterableExtensions.join(ListExtensions.<EnumProperty, String>map(e.getProperties(), _function), ",");
_xifexpression = (_plus_1 + _join);
}
return _xifexpression;
}
public String text(final EnumProperty e) {
String _name = e.getName();
String _plus = (_name + "=");
String _elipse = this.elipse(e.getValue());
return (_plus + _elipse);
}
public String image(final ComponentDefinition e) {
ComponentDefinitionType _type = e.getType();
if (_type != null) {
switch (_type) {
case ADDRMAP:
return "A.png";
case FIELD:
return "F.png";
case REG:
return "R.png";
case REGFILE:
return "R.png";
case SIGNAL:
return "S.png";
default:
break;
}
}
return null;
}
public String image(final PropertyAssignmentRhs e) {
String _xifexpression = null;
RValue _value = e.getValue();
boolean _tripleNotEquals = (_value != null);
if (_tripleNotEquals) {
_xifexpression = "V.png";
} else {
String _xifexpression_1 = null;
InstancePropertyRef _instPropRef = e.getInstPropRef();
boolean _tripleNotEquals_1 = (_instPropRef != null);
if (_tripleNotEquals_1) {
_xifexpression_1 = this.image(e.getInstPropRef());
} else {
String _xifexpression_2 = null;
EnumDefinition _enumRef = e.getEnumRef();
boolean _tripleNotEquals_2 = (_enumRef != null);
if (_tripleNotEquals_2) {
_xifexpression_2 = "E.png";
}
_xifexpression_1 = _xifexpression_2;
}
_xifexpression = _xifexpression_1;
}
return _xifexpression;
}
public String image(final InstancePropertyRef ref) {
String _xifexpression = null;
PropertyDefinition _property = ref.getProperty();
boolean _tripleNotEquals = (_property != null);
if (_tripleNotEquals) {
_xifexpression = "P.png";
} else {
String _xifexpression_1 = null;
PropertyEnum _propertyEnum = ref.getPropertyEnum();
boolean _notEquals = (!Objects.equal(_propertyEnum, PropertyEnum.UNSPECIFIED));
if (_notEquals) {
_xifexpression_1 = "E.png";
} else {
_xifexpression_1 = "I.png";
}
_xifexpression = _xifexpression_1;
}
return _xifexpression;
}
public String image(final EnumDefinition e) {
return "E.png";
}
public String image(final ExplicitPropertyAssignment e) {
return "P.png";
}
public String image(final PostPropertyAssignment e) {
return "P.png";
}
public String image(final ComponentInstance e) {
return "I.png";
}
public String image(final EnumEntry v) {
return "V.png";
}
public String image(final EnumProperty e) {
return "P.png";
}
}

View File

@ -1,118 +0,0 @@
/**
* generated by Xtext 2.14.0
*/
package com.minres.rdl.ui.outline;
import com.minres.rdl.rdl.ComponentDefinition;
import com.minres.rdl.rdl.ComponentInstance;
import com.minres.rdl.rdl.EnumDefinition;
import com.minres.rdl.rdl.EnumEntry;
import com.minres.rdl.rdl.ExplicitPropertyAssignment;
import com.minres.rdl.rdl.Instantiation;
import com.minres.rdl.rdl.PostPropertyAssignment;
import com.minres.rdl.rdl.PropertyAssignment;
import com.minres.rdl.rdl.PropertyAssignmentRhs;
import com.minres.rdl.rdl.PropertyDefinition;
import com.minres.rdl.rdl.Root;
import java.util.function.Consumer;
import org.eclipse.xtext.ui.editor.outline.IOutlineNode;
import org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider;
import org.eclipse.xtext.ui.editor.outline.impl.DocumentRootNode;
/**
* Customization of the default outline structure.
*
* See https://www.eclipse.org/Xtext/documentation/310_eclipse_support.html#outline
*/
@SuppressWarnings("all")
public class RDLOutlineTreeProvider extends DefaultOutlineTreeProvider {
protected void _createChildren(final DocumentRootNode parentNode, final Root domainModel) {
final Consumer<EnumDefinition> _function = (EnumDefinition it) -> {
this.createNode(parentNode, it);
};
domainModel.getEnumDefinitions().forEach(_function);
final Consumer<PropertyDefinition> _function_1 = (PropertyDefinition it) -> {
this.createNode(parentNode, it);
};
domainModel.getPropertyDefinitions().forEach(_function_1);
final Consumer<ComponentDefinition> _function_2 = (ComponentDefinition it) -> {
this.createNode(parentNode, it);
};
domainModel.getComponentDefinitions().forEach(_function_2);
final Consumer<PropertyAssignment> _function_3 = (PropertyAssignment it) -> {
this.createNode(parentNode, it);
};
domainModel.getPropertyAssignments().forEach(_function_3);
final Consumer<Instantiation> _function_4 = (Instantiation instantiation) -> {
ComponentDefinition _component = instantiation.getComponent();
boolean _tripleNotEquals = (_component != null);
if (_tripleNotEquals) {
this.createNode(parentNode, instantiation.getComponent());
}
final Consumer<ComponentInstance> _function_5 = (ComponentInstance it) -> {
this.createNode(parentNode, it);
};
instantiation.getComponentInstances().forEach(_function_5);
};
domainModel.getInstantiations().forEach(_function_4);
}
protected void _createChildren(final IOutlineNode parentNode, final ComponentDefinition compDef) {
final Consumer<EnumDefinition> _function = (EnumDefinition it) -> {
this.createNode(parentNode, it);
};
compDef.getEnumDefinitions().forEach(_function);
final Consumer<ComponentDefinition> _function_1 = (ComponentDefinition it) -> {
this.createNode(parentNode, it);
};
compDef.getComponentDefinitions().forEach(_function_1);
final Consumer<PropertyAssignment> _function_2 = (PropertyAssignment it) -> {
this.createNode(parentNode, it);
};
compDef.getPropertyAssignments().forEach(_function_2);
final Consumer<Instantiation> _function_3 = (Instantiation instantiation) -> {
ComponentDefinition _component = instantiation.getComponent();
boolean _tripleNotEquals = (_component != null);
if (_tripleNotEquals) {
this.createNode(parentNode, instantiation.getComponent());
}
final Consumer<ComponentInstance> _function_4 = (ComponentInstance it) -> {
this.createNode(parentNode, it);
};
instantiation.getComponentInstances().forEach(_function_4);
};
compDef.getInstantiations().forEach(_function_3);
}
protected void _createChildren(final IOutlineNode parentNode, final EnumDefinition e) {
final Consumer<EnumEntry> _function = (EnumEntry it) -> {
this.createNode(parentNode, it);
};
e.getBody().getEntries().forEach(_function);
}
protected void _createChildren(final IOutlineNode parentNode, final PostPropertyAssignment p) {
this.createNode(parentNode, p.getRhs());
}
protected boolean _isLeaf(final ExplicitPropertyAssignment feature) {
return true;
}
protected boolean _isLeaf(final Instantiation feature) {
return ((feature.getComponent() == null) && (feature.getComponentInstances().size() == 0));
}
protected boolean _isLeaf(final PropertyAssignmentRhs feature) {
return true;
}
protected boolean _isLeaf(final ComponentInstance feature) {
return true;
}
protected boolean _isLeaf(final EnumEntry feature) {
int _size = feature.getProperties().size();
return (_size == 0);
}
}

View File

@ -1,35 +0,0 @@
package com.minres.rdl.ui.preferences;
import com.minres.rdl.preferences.PreferenceConstants;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.ComboFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.preferences.ScopedPreferenceStore;
@SuppressWarnings("all")
public class RdlPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
public RdlPreferencePage() {
super(FieldEditorPreferencePage.GRID);
final ScopedPreferenceStore store = new ScopedPreferenceStore(InstanceScope.INSTANCE, PreferenceConstants.SCOPE_NAME);
this.setPreferenceStore(store);
this.setDescription("Code generator configuration options");
}
@Override
public void createFieldEditors() {
Composite _fieldEditorParent = this.getFieldEditorParent();
BooleanFieldEditor _booleanFieldEditor = new BooleanFieldEditor(PreferenceConstants.P_GENERATE_CSV, "Generate CSV:", _fieldEditorParent);
this.addField(_booleanFieldEditor);
Composite _fieldEditorParent_1 = this.getFieldEditorParent();
ComboFieldEditor _comboFieldEditor = new ComboFieldEditor(PreferenceConstants.P_ADDRESSUNIT, "Address unit size", new String[][] { new String[] { "Byte (8bit)", "byte" }, new String[] { "Word (16bit)", "word" }, new String[] { "DWord (32bit)", "dword" } }, _fieldEditorParent_1);
this.addField(_comboFieldEditor);
}
@Override
public void init(final IWorkbench workbench) {
}
}

View File

@ -1,15 +0,0 @@
/**
* generated by Xtext 2.14.0
*/
package com.minres.rdl.ui.quickfix;
import org.eclipse.xtext.ui.editor.quickfix.DefaultQuickfixProvider;
/**
* Custom quickfixes.
*
* See https://www.eclipse.org/Xtext/documentation/310_eclipse_support.html#quick-fixes
*/
@SuppressWarnings("all")
public class RDLQuickfixProvider extends DefaultQuickfixProvider {
}

View File

@ -1,32 +0,0 @@
/**
* generated by Xtext 2.14.0
*/
package com.minres.rdl.ui.wizard;
import com.google.inject.Inject;
import org.eclipse.xtend2.lib.StringConcatenation;
import org.eclipse.xtext.generator.IFileSystemAccess2;
import org.eclipse.xtext.resource.FileExtensionProvider;
@SuppressWarnings("all")
public class RDLNewProjectWizardInitialContents {
@Inject
private FileExtensionProvider fileExtensionProvider;
public void generateInitialContents(final IFileSystemAccess2 fsa) {
String _primaryFileExtension = this.fileExtensionProvider.getPrimaryFileExtension();
String _plus = ("src/model/Model." + _primaryFileExtension);
StringConcatenation _builder = new StringConcatenation();
_builder.append("/*");
_builder.newLine();
_builder.append(" ");
_builder.append("* This is an example model");
_builder.newLine();
_builder.append(" ");
_builder.append("*/");
_builder.newLine();
_builder.append("Hello Xtext!");
_builder.newLine();
fsa.generateFile(_plus, _builder);
}
}

View File

@ -1,72 +0,0 @@
package com.minres.structural.ui.hyperlink;
import com.google.inject.Inject;
import com.minres.structural.ui.hyperlink.MyXtextHyperlink;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.jface.text.Region;
import org.eclipse.xtext.EcoreUtil2;
import org.eclipse.xtext.nodemodel.ILeafNode;
import org.eclipse.xtext.nodemodel.INode;
import org.eclipse.xtext.nodemodel.util.NodeModelUtils;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.resource.XtextResource;
import org.eclipse.xtext.scoping.impl.ImportUriResolver;
import org.eclipse.xtext.ui.editor.hyperlinking.HyperlinkHelper;
import org.eclipse.xtext.ui.editor.hyperlinking.IHyperlinkAcceptor;
import org.eclipse.xtext.ui.editor.hyperlinking.XtextHyperlink;
import org.eclipse.xtext.util.ITextRegion;
import org.eclipse.xtext.util.TextRegion;
@SuppressWarnings("all")
public class MyHyperlinkHelper extends HyperlinkHelper {
@Inject
private ImportUriResolver resolver;
@Override
public void createHyperlinksByOffset(final XtextResource resource, final int offset, final IHyperlinkAcceptor acceptor) {
final TextRegion region = new TextRegion(offset, 0);
final INode crossRefNode = this.getEObjectAtOffsetHelper().getCrossReferenceNode(resource, region);
if ((crossRefNode == null)) {
final IParseResult parseResult = resource.getParseResult();
if ((parseResult != null)) {
final ILeafNode leaf = NodeModelUtils.findLeafNodeAtOffset(parseResult.getRootNode(), region.getOffset());
final EObject semObj = NodeModelUtils.findActualSemanticObjectFor(leaf);
final String importURI = this.resolver.resolve(semObj);
if (((importURI != null) && EcoreUtil2.isValidUri(semObj, URI.createURI(importURI)))) {
final Resource referencedResource = EcoreUtil2.getResource(resource, importURI);
if (((referencedResource != null) && (referencedResource.getContents().size() > 0))) {
final EObject top = referencedResource.getContents().get(0);
final ITextRegion textRegion = leaf.getTextRegion();
final URI uri = EcoreUtil.getURI(top);
final XtextHyperlink result = this.getHyperlinkProvider().get();
int _offset = textRegion.getOffset();
int _length = textRegion.getLength();
Region _region = new Region(_offset, _length);
result.setHyperlinkRegion(_region);
URI _xifexpression = null;
boolean _isPlatformResource = uri.isPlatformResource();
if (_isPlatformResource) {
_xifexpression = uri;
} else {
_xifexpression = resource.getResourceSet().getURIConverter().normalize(uri);
}
result.setURI(_xifexpression);
result.setHyperlinkText(this.getLabelProvider().getText(top));
if ((result instanceof MyXtextHyperlink)) {
((MyXtextHyperlink)result).setSelectTarget(false);
}
acceptor.accept(result);
}
}
}
} else {
final EObject crossLinkedEObject = this.getEObjectAtOffsetHelper().getCrossReferencedElement(crossRefNode);
if (((crossLinkedEObject != null) && (!crossLinkedEObject.eIsProxy()))) {
this.createHyperlinksTo(resource, crossRefNode, crossLinkedEObject, acceptor);
}
}
}
}

View File

@ -1,26 +0,0 @@
package com.minres.structural.ui.hyperlink;
import com.google.inject.Inject;
import org.eclipse.xtext.ui.editor.IURIEditorOpener;
import org.eclipse.xtext.ui.editor.hyperlinking.XtextHyperlink;
@SuppressWarnings("all")
public class MyXtextHyperlink extends XtextHyperlink {
private boolean select = true;
@Inject
private IURIEditorOpener uriEditorOpener;
@Override
public void open() {
this.uriEditorOpener.open(this.getURI(), this.select);
}
public boolean getSelectTarget() {
return this.select;
}
public void setSelectTarget(final boolean select) {
this.select = select;
}
}

View File

@ -4,6 +4,6 @@
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="src" path="xtend-gen"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
<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.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -0,0 +1 @@
/xtend-gen/

View File

@ -1,7 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
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.source=1.8
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11

View File

@ -4,7 +4,7 @@
<parent>
<groupId>com.minres.rdl</groupId>
<artifactId>com.minres.rdl.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.4.1</version>
</parent>
<artifactId>com.minres.rdl.web</artifactId>
<packaging>war</packaging>
@ -27,7 +27,7 @@
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.0</version>
<version>3.2.3</version>
<configuration>
<warSourceDirectory>WebRoot</warSourceDirectory>
<failOnMissingWebXml>false</failOnMissingWebXml>
@ -36,7 +36,7 @@
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.4.9.v20180320</version>
<version>9.4.34.v20201102</version>
<configuration>
<webAppSourceDirectory>WebRoot</webAppSourceDirectory>
</configuration>
@ -44,7 +44,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.9.1</version>
<version>3.0.0</version>
<executions>
<execution>
<id>add-source</id>
@ -101,22 +101,22 @@
<dependency>
<groupId>org.webjars</groupId>
<artifactId>requirejs</artifactId>
<version>2.3.2</version>
<version>2.3.6</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery</artifactId>
<version>2.2.4</version>
<version>3.5.1</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>ace</artifactId>
<version>1.2.3</version>
<version>1.3.3</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-annotations</artifactId>
<version>9.4.9.v20180320</version>
<version>9.4.34.v20201102</version>
<scope>provided</scope>
</dependency>
<dependency>

View File

@ -1,5 +1,5 @@
/*
* generated by Xtext 2.14.0
* generated by Xtext 2.26.0
*/
package com.minres.rdl.web;

View File

@ -1,40 +0,0 @@
/**
* generated by Xtext 2.14.0
*/
package com.minres.rdl.web;
import com.google.inject.Injector;
import com.minres.rdl.web.RDLWebSetup;
import javax.servlet.annotation.WebServlet;
import org.eclipse.xtext.util.DisposableRegistry;
import org.eclipse.xtext.web.servlet.XtextServlet;
import org.eclipse.xtext.xbase.lib.Exceptions;
/**
* Deploy this class into a servlet container to enable DSL-specific services.
*/
@WebServlet(name = "XtextServices", urlPatterns = "/xtext-service/*")
@SuppressWarnings("all")
public class RDLServlet extends XtextServlet {
private DisposableRegistry disposableRegistry;
@Override
public void init() {
try {
super.init();
final Injector injector = new RDLWebSetup().createInjectorAndDoEMFRegistration();
this.disposableRegistry = injector.<DisposableRegistry>getInstance(DisposableRegistry.class);
} catch (Throwable _e) {
throw Exceptions.sneakyThrow(_e);
}
}
@Override
public void destroy() {
if ((this.disposableRegistry != null)) {
this.disposableRegistry.dispose();
this.disposableRegistry = null;
}
super.destroy();
}
}

View File

@ -1,13 +0,0 @@
/**
* generated by Xtext 2.14.0
*/
package com.minres.rdl.web;
import com.minres.rdl.web.AbstractRDLWebModule;
/**
* Use this class to register additional components to be used within the web application.
*/
@SuppressWarnings("all")
public class RDLWebModule extends AbstractRDLWebModule {
}

View File

@ -1,26 +0,0 @@
/**
* generated by Xtext 2.14.0
*/
package com.minres.rdl.web;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.minres.rdl.RDLRuntimeModule;
import com.minres.rdl.RDLStandaloneSetup;
import com.minres.rdl.ide.RDLIdeModule;
import com.minres.rdl.web.RDLWebModule;
import org.eclipse.xtext.util.Modules2;
/**
* Initialization support for running Xtext languages in web applications.
*/
@SuppressWarnings("all")
public class RDLWebSetup extends RDLStandaloneSetup {
@Override
public Injector createInjector() {
RDLRuntimeModule _rDLRuntimeModule = new RDLRuntimeModule();
RDLIdeModule _rDLIdeModule = new RDLIdeModule();
RDLWebModule _rDLWebModule = new RDLWebModule();
return Guice.createInjector(Modules2.mixin(_rDLRuntimeModule, _rDLIdeModule, _rDLWebModule));
}
}

View File

@ -1,77 +0,0 @@
/**
* generated by Xtext 2.14.0
*/
package com.minres.rdl.web;
import java.net.InetSocketAddress;
import java.net.URI;
import org.eclipse.jetty.annotations.AnnotationConfiguration;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.util.log.Slf4jLog;
import org.eclipse.jetty.webapp.Configuration;
import org.eclipse.jetty.webapp.MetaInfConfiguration;
import org.eclipse.jetty.webapp.WebAppContext;
import org.eclipse.jetty.webapp.WebInfConfiguration;
import org.eclipse.jetty.webapp.WebXmlConfiguration;
import org.eclipse.xtext.xbase.lib.Exceptions;
import org.eclipse.xtext.xbase.lib.ObjectExtensions;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
/**
* This program starts an HTTP server for testing the web integration of your DSL.
* Just execute it and point a web browser to http://localhost:8080/
*/
@SuppressWarnings("all")
public class ServerLauncher {
public static void main(final String[] args) {
InetSocketAddress _inetSocketAddress = new InetSocketAddress("localhost", 8080);
final Server server = new Server(_inetSocketAddress);
WebAppContext _webAppContext = new WebAppContext();
final Procedure1<WebAppContext> _function = (WebAppContext it) -> {
it.setResourceBase("WebRoot");
it.setWelcomeFiles(new String[] { "index.html" });
it.setContextPath("/");
AnnotationConfiguration _annotationConfiguration = new AnnotationConfiguration();
WebXmlConfiguration _webXmlConfiguration = new WebXmlConfiguration();
WebInfConfiguration _webInfConfiguration = new WebInfConfiguration();
MetaInfConfiguration _metaInfConfiguration = new MetaInfConfiguration();
it.setConfigurations(new Configuration[] { _annotationConfiguration, _webXmlConfiguration, _webInfConfiguration, _metaInfConfiguration });
it.setAttribute(WebInfConfiguration.CONTAINER_JAR_PATTERN, ".*/com\\.minres\\.rdl\\.web/.*,.*\\.jar");
it.setInitParameter("org.mortbay.jetty.servlet.Default.useFileMappedBuffer", "false");
};
WebAppContext _doubleArrow = ObjectExtensions.<WebAppContext>operator_doubleArrow(_webAppContext, _function);
server.setHandler(_doubleArrow);
String _name = ServerLauncher.class.getName();
final Slf4jLog log = new Slf4jLog(_name);
try {
server.start();
URI _uRI = server.getURI();
String _plus = ("Server started " + _uRI);
String _plus_1 = (_plus + "...");
log.info(_plus_1);
final Runnable _function_1 = () -> {
try {
log.info("Press enter to stop the server...");
final int key = System.in.read();
if ((key != (-1))) {
server.stop();
} else {
log.warn("Console input is not available. In order to stop the server, you need to cancel process manually.");
}
} catch (Throwable _e) {
throw Exceptions.sneakyThrow(_e);
}
};
new Thread(_function_1).start();
server.join();
} catch (final Throwable _t) {
if (_t instanceof Exception) {
final Exception exception = (Exception)_t;
log.warn(exception.getMessage());
System.exit(1);
} else {
throw Exceptions.sneakyThrow(_t);
}
}
}
}

View File

@ -3,7 +3,7 @@
<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-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -2,3 +2,5 @@
/Run RDL Generator DBT-RISCV.launch
/Run RDL Generator SC-Components-Test.launch
/plugin.xml_gen
/model/
/xtend-gen/

View File

@ -1,7 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
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.source=1.8
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11

View File

@ -3,7 +3,7 @@ Automatic-Module-Name: com.minres.rdl
Bundle-ManifestVersion: 2
Bundle-Name: com.minres.rdl
Bundle-Vendor: MINRES Technologies GmbH
Bundle-Version: 1.1.0.qualifier
Bundle-Version: 1.4.1
Bundle-SymbolicName: com.minres.rdl; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.xtext,
@ -14,9 +14,10 @@ Require-Bundle: org.eclipse.xtext,
org.eclipse.xtext.util,
org.eclipse.emf.common,
org.eclipse.xtend.lib;bundle-version="2.14.0",
org.antlr.runtime,
org.eclipse.equinox.preferences
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
org.antlr.runtime;bundle-version="[3.2.0,3.2.1)",
org.eclipse.equinox.preferences,
org.eclipse.emf.mwe.utils
Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: com.minres.rdl,
com.minres.rdl.generator,
com.minres.rdl.parser.antlr,
@ -28,5 +29,6 @@ Export-Package: com.minres.rdl,
com.minres.rdl.scoping,
com.minres.rdl.serializer,
com.minres.rdl.services,
com.minres.rdl.validation
com.minres.rdl.validation,
com.minres.rdl.formatting2
Import-Package: org.apache.log4j

Some files were not shown because too many files have changed in this diff Show More