mirror of
https://github.com/Minres/RDL-Editor.git
synced 2025-05-10 07:26:37 +02:00
Compare commits
No commits in common. "master" and "1_2_0" have entirely different histories.
3
.gitignore
vendored
3
.gitignore
vendored
@ -3,6 +3,3 @@ com.minres.rdl.parent/*/target
|
|||||||
*.xtextbin
|
*.xtextbin
|
||||||
*.xtendbin
|
*.xtendbin
|
||||||
*._trace
|
*._trace
|
||||||
/.envrc
|
|
||||||
/*.py
|
|
||||||
/*.txt
|
|
||||||
|
24
Modulefile
24
Modulefile
@ -1,24 +0,0 @@
|
|||||||
#%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
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
<feature
|
<feature
|
||||||
id="com.minres.rdl.feature"
|
id="com.minres.rdl.feature"
|
||||||
label="RDL Feature "
|
label="RDL Feature "
|
||||||
version="1.4.1"
|
version="1.0.0.qualifier"
|
||||||
provider-name="MINRES Technologies GmbH">
|
provider-name="MINRES Technologies GmbH">
|
||||||
|
|
||||||
<plugin
|
<plugin
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.rdl</groupId>
|
<groupId>com.minres.rdl</groupId>
|
||||||
<artifactId>com.minres.rdl.parent</artifactId>
|
<artifactId>com.minres.rdl.parent</artifactId>
|
||||||
<version>1.4.1</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>com.minres.rdl.feature</artifactId>
|
<artifactId>com.minres.rdl.feature</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<classpathentry kind="src" path="src"/>
|
<classpathentry kind="src" path="src"/>
|
||||||
<classpathentry kind="src" path="src-gen"/>
|
<classpathentry kind="src" path="src-gen"/>
|
||||||
<classpathentry kind="src" path="xtend-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.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"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
@ -1 +0,0 @@
|
|||||||
/xtend-gen/
|
|
@ -1,10 +1,7 @@
|
|||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
org.eclipse.jdt.core.compiler.compliance=11
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
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.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
org.eclipse.jdt.core.compiler.release=enabled
|
|
||||||
org.eclipse.jdt.core.compiler.source=11
|
|
||||||
|
@ -3,13 +3,14 @@ Automatic-Module-Name: com.minres.rdl.ide
|
|||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: com.minres.rdl.ide
|
Bundle-Name: com.minres.rdl.ide
|
||||||
Bundle-Vendor: My Company
|
Bundle-Vendor: My Company
|
||||||
Bundle-Version: 1.4.1
|
Bundle-Version: 1.0.0.qualifier
|
||||||
Bundle-SymbolicName: com.minres.rdl.ide; singleton:=true
|
Bundle-SymbolicName: com.minres.rdl.ide; singleton:=true
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Require-Bundle: com.minres.rdl,
|
Require-Bundle: com.minres.rdl,
|
||||||
org.eclipse.xtext.ide,
|
org.eclipse.xtext.ide,
|
||||||
org.eclipse.xtext.xbase.ide,
|
org.eclipse.xtext.xbase.ide,
|
||||||
org.antlr.runtime;bundle-version="[3.2.0,3.2.1)"
|
org.antlr.runtime
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||||
Export-Package: com.minres.rdl.ide.contentassist.antlr.internal,
|
Export-Package: com.minres.rdl.ide.contentassist.antlr.internal,
|
||||||
com.minres.rdl.ide.contentassist.antlr
|
com.minres.rdl.ide.contentassist.antlr
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.rdl</groupId>
|
<groupId>com.minres.rdl</groupId>
|
||||||
<artifactId>com.minres.rdl.parent</artifactId>
|
<artifactId>com.minres.rdl.parent</artifactId>
|
||||||
<version>1.4.1</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>com.minres.rdl.ide</artifactId>
|
<artifactId>com.minres.rdl.ide</artifactId>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
@ -13,22 +13,27 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>log4j</groupId>
|
<groupId>log4j</groupId>
|
||||||
<artifactId>log4j</artifactId>
|
<artifactId>log4j</artifactId>
|
||||||
|
<version>1.2.16</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.lsp4j</groupId>
|
<groupId>org.eclipse.lsp4j</groupId>
|
||||||
<artifactId>org.eclipse.lsp4j</artifactId>
|
<artifactId>org.eclipse.lsp4j</artifactId>
|
||||||
|
<version>0.4.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.ow2.asm</groupId>
|
<groupId>org.ow2.asm</groupId>
|
||||||
<artifactId>asm</artifactId>
|
<artifactId>asm</artifactId>
|
||||||
|
<version>6.1.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.ow2.asm</groupId>
|
<groupId>org.ow2.asm</groupId>
|
||||||
<artifactId>asm-commons</artifactId>
|
<artifactId>asm-commons</artifactId>
|
||||||
|
<version>6.1.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.ow2.asm</groupId>
|
<groupId>org.ow2.asm</groupId>
|
||||||
<artifactId>asm-tree</artifactId>
|
<artifactId>asm-tree</artifactId>
|
||||||
|
<version>6.1.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* generated by Xtext 2.26.0
|
* generated by Xtext 2.14.0
|
||||||
*/
|
*/
|
||||||
package com.minres.rdl.ide;
|
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.IContentAssistParser;
|
||||||
import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.Lexer;
|
import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.Lexer;
|
||||||
import org.eclipse.xtext.ide.refactoring.IRenameStrategy2;
|
import org.eclipse.xtext.ide.refactoring.IRenameStrategy2;
|
||||||
import org.eclipse.xtext.ide.server.rename.IRenameService2;
|
import org.eclipse.xtext.ide.server.rename.IRenameService;
|
||||||
import org.eclipse.xtext.ide.server.rename.RenameService2;
|
import org.eclipse.xtext.ide.server.rename.RenameService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manual modifications go to {@link RDLIdeModule}.
|
* 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
|
// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2
|
||||||
public Class<? extends IRenameService2> bindIRenameService2() {
|
public Class<? extends IRenameService> bindIRenameService() {
|
||||||
return RenameService2.class;
|
return RenameService.class;
|
||||||
}
|
}
|
||||||
|
|
||||||
// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2
|
// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* generated by Xtext 2.26.0
|
* generated by Xtext 2.14.0
|
||||||
*/
|
*/
|
||||||
package com.minres.rdl.ide.contentassist.antlr;
|
package com.minres.rdl.ide.contentassist.antlr;
|
||||||
|
|
||||||
@ -8,9 +8,10 @@ import java.util.Collections;
|
|||||||
import org.eclipse.xtext.AbstractRule;
|
import org.eclipse.xtext.AbstractRule;
|
||||||
import org.eclipse.xtext.ide.editor.contentassist.antlr.FollowElement;
|
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.contentassist.antlr.internal.AbstractInternalContentAssistParser;
|
||||||
|
import org.eclipse.xtext.ide.editor.partialEditing.IPartialEditingContentAssistParser;
|
||||||
import org.eclipse.xtext.util.PolymorphicDispatcher;
|
import org.eclipse.xtext.util.PolymorphicDispatcher;
|
||||||
|
|
||||||
public class PartialRDLContentAssistParser extends RDLParser {
|
public class PartialRDLContentAssistParser extends RDLParser implements IPartialEditingContentAssistParser {
|
||||||
|
|
||||||
private AbstractRule rule;
|
private AbstractRule rule;
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* generated by Xtext 2.26.0
|
* generated by Xtext 2.14.0
|
||||||
*/
|
*/
|
||||||
package com.minres.rdl.ide.contentassist.antlr;
|
package com.minres.rdl.ide.contentassist.antlr;
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* generated by Xtext 2.26.0
|
* generated by Xtext 2.14.0
|
||||||
*/
|
*/
|
||||||
grammar InternalRDL;
|
grammar InternalRDL;
|
||||||
|
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
/**
|
||||||
|
* 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 {
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
/**
|
||||||
|
* 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));
|
||||||
|
}
|
||||||
|
}
|
@ -2,7 +2,7 @@
|
|||||||
<feature
|
<feature
|
||||||
id="com.minres.rdl.platform.feature"
|
id="com.minres.rdl.platform.feature"
|
||||||
label="Xtext Platform Feature"
|
label="Xtext Platform Feature"
|
||||||
version="1.4.1"
|
version="1.0.0.qualifier"
|
||||||
provider-name="MINRES Technologies GmbH">
|
provider-name="MINRES Technologies GmbH">
|
||||||
|
|
||||||
<description url="http://www.example.com/description">
|
<description url="http://www.example.com/description">
|
||||||
@ -130,6 +130,21 @@
|
|||||||
version="0.0.0"
|
version="0.0.0"
|
||||||
unpack="false"/>
|
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
|
<plugin
|
||||||
id="org.eclipse.equinox.p2.repository"
|
id="org.eclipse.equinox.p2.repository"
|
||||||
download-size="0"
|
download-size="0"
|
||||||
@ -263,6 +278,13 @@
|
|||||||
version="0.0.0"
|
version="0.0.0"
|
||||||
unpack="false"/>
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="org.eclipse.pde.core"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
<plugin
|
<plugin
|
||||||
id="org.eclipse.emf.codegen"
|
id="org.eclipse.emf.codegen"
|
||||||
download-size="0"
|
download-size="0"
|
||||||
@ -376,6 +398,13 @@
|
|||||||
version="0.0.0"
|
version="0.0.0"
|
||||||
unpack="false"/>
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="org.eclipse.jdt.junit"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
<plugin
|
<plugin
|
||||||
id="org.eclipse.xtext"
|
id="org.eclipse.xtext"
|
||||||
download-size="0"
|
download-size="0"
|
||||||
@ -459,6 +488,12 @@
|
|||||||
install-size="0"
|
install-size="0"
|
||||||
version="0.0.0"/>
|
version="0.0.0"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="org.eclipse.jdt.debug"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"/>
|
||||||
|
|
||||||
<plugin
|
<plugin
|
||||||
id="org.eclipse.emf.mwe2.language"
|
id="org.eclipse.emf.mwe2.language"
|
||||||
download-size="0"
|
download-size="0"
|
||||||
@ -543,6 +578,13 @@
|
|||||||
version="0.0.0"
|
version="0.0.0"
|
||||||
unpack="false"/>
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="org.eclipse.jdt.launching"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
<plugin
|
<plugin
|
||||||
id="org.eclipse.emf.mwe2.runtime"
|
id="org.eclipse.emf.mwe2.runtime"
|
||||||
download-size="0"
|
download-size="0"
|
||||||
@ -641,6 +683,13 @@
|
|||||||
version="0.0.0"
|
version="0.0.0"
|
||||||
unpack="false"/>
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="org.eclipse.jdt.debug.ui"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
<plugin
|
<plugin
|
||||||
id="org.eclipse.equinox.p2.operations"
|
id="org.eclipse.equinox.p2.operations"
|
||||||
download-size="0"
|
download-size="0"
|
||||||
@ -648,6 +697,13 @@
|
|||||||
version="0.0.0"
|
version="0.0.0"
|
||||||
unpack="false"/>
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="org.eclipse.jdt.junit.runtime"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
<plugin
|
<plugin
|
||||||
id="org.eclipse.ant.launching"
|
id="org.eclipse.ant.launching"
|
||||||
download-size="0"
|
download-size="0"
|
||||||
@ -760,6 +816,13 @@
|
|||||||
version="0.0.0"
|
version="0.0.0"
|
||||||
unpack="false"/>
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="javax.servlet"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
<plugin
|
<plugin
|
||||||
id="org.objectweb.asm"
|
id="org.objectweb.asm"
|
||||||
download-size="0"
|
download-size="0"
|
||||||
@ -788,6 +851,13 @@
|
|||||||
fragment="true"
|
fragment="true"
|
||||||
unpack="false"/>
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="org.eclipse.equinox.util"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
<plugin
|
<plugin
|
||||||
id="org.eclipse.core.variables"
|
id="org.eclipse.core.variables"
|
||||||
download-size="0"
|
download-size="0"
|
||||||
@ -948,6 +1018,13 @@
|
|||||||
version="0.0.0"
|
version="0.0.0"
|
||||||
unpack="false"/>
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="org.eclipse.jdt.ui"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
<plugin
|
<plugin
|
||||||
id="org.w3c.dom.svg"
|
id="org.w3c.dom.svg"
|
||||||
download-size="0"
|
download-size="0"
|
||||||
@ -969,6 +1046,13 @@
|
|||||||
version="0.0.0"
|
version="0.0.0"
|
||||||
unpack="false"/>
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="org.eclipse.jdt.junit.core"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
<plugin
|
<plugin
|
||||||
id="org.eclipse.e4.ui.workbench"
|
id="org.eclipse.e4.ui.workbench"
|
||||||
download-size="0"
|
download-size="0"
|
||||||
@ -1053,6 +1137,12 @@
|
|||||||
version="0.0.0"
|
version="0.0.0"
|
||||||
unpack="false"/>
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="org.eclipse.pde.build"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"/>
|
||||||
|
|
||||||
<plugin
|
<plugin
|
||||||
id="org.eclipse.ant.core"
|
id="org.eclipse.ant.core"
|
||||||
download-size="0"
|
download-size="0"
|
||||||
@ -1130,6 +1220,13 @@
|
|||||||
version="0.0.0"
|
version="0.0.0"
|
||||||
unpack="false"/>
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="org.eclipse.jdt.core.manipulation"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
<plugin
|
<plugin
|
||||||
id="org.eclipse.ui.trace"
|
id="org.eclipse.ui.trace"
|
||||||
download-size="0"
|
download-size="0"
|
||||||
@ -1151,6 +1248,13 @@
|
|||||||
version="0.0.0"
|
version="0.0.0"
|
||||||
unpack="false"/>
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="org.eclipse.pde.launching"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
<plugin
|
<plugin
|
||||||
id="org.apache.commons.lang"
|
id="org.apache.commons.lang"
|
||||||
download-size="0"
|
download-size="0"
|
||||||
@ -1186,6 +1290,14 @@
|
|||||||
version="0.0.0"
|
version="0.0.0"
|
||||||
unpack="false"/>
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="org.eclipse.jdt.compiler.apt"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
fragment="true"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
<plugin
|
<plugin
|
||||||
id="org.eclipse.osgi.services"
|
id="org.eclipse.osgi.services"
|
||||||
download-size="0"
|
download-size="0"
|
||||||
@ -1228,6 +1340,13 @@
|
|||||||
version="0.0.0"
|
version="0.0.0"
|
||||||
unpack="false"/>
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="org.eclipse.jdt.core"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
<plugin
|
<plugin
|
||||||
id="org.eclipse.ui.editors"
|
id="org.eclipse.ui.editors"
|
||||||
download-size="0"
|
download-size="0"
|
||||||
@ -1242,6 +1361,13 @@
|
|||||||
version="0.0.0"
|
version="0.0.0"
|
||||||
unpack="false"/>
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="org.eclipse.equinox.ds"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
<plugin
|
<plugin
|
||||||
id="org.eclipse.xtext.common.types"
|
id="org.eclipse.xtext.common.types"
|
||||||
download-size="0"
|
download-size="0"
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.rdl</groupId>
|
<groupId>com.minres.rdl</groupId>
|
||||||
<artifactId>com.minres.rdl.parent</artifactId>
|
<artifactId>com.minres.rdl.parent</artifactId>
|
||||||
<version>1.4.1</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>com.minres.rdl.platform.feature</artifactId>
|
<artifactId>com.minres.rdl.platform.feature</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<feature
|
<feature
|
||||||
id="com.minres.rdl.product.feature"
|
id="com.minres.rdl.product.feature"
|
||||||
label="RDL Feature "
|
label="RDL Feature "
|
||||||
version="1.4.1"
|
version="1.0.0.qualifier"
|
||||||
provider-name="MINRES Technologies GmbH">
|
provider-name="MINRES Technologies GmbH">
|
||||||
|
|
||||||
<requires>
|
<requires>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.rdl</groupId>
|
<groupId>com.minres.rdl</groupId>
|
||||||
<artifactId>com.minres.rdl.parent</artifactId>
|
<artifactId>com.minres.rdl.parent</artifactId>
|
||||||
<version>1.4.1</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>com.minres.rdl.product.feature</artifactId>
|
<artifactId>com.minres.rdl.product.feature</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<?pde version="3.5"?>
|
<?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.4.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.2.0.qualifier" useFeatures="true" includeLaunchers="true">
|
||||||
|
|
||||||
<configIni use="default">
|
<configIni use="default">
|
||||||
</configIni>
|
</configIni>
|
||||||
@ -23,12 +23,86 @@
|
|||||||
</vm>
|
</vm>
|
||||||
|
|
||||||
<plugins>
|
<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>
|
</plugins>
|
||||||
|
|
||||||
<features>
|
<features>
|
||||||
<feature id="com.minres.rdl.platform.feature"/>
|
<feature id="com.minres.rdl.platform.feature" version="1.0.0.qualifier"/>
|
||||||
<feature id="com.minres.rdl.product.feature"/>
|
<feature id="com.minres.rdl.product.feature" version="1.0.0.qualifier"/>
|
||||||
<feature id="com.minres.rdl.feature"/>
|
<feature id="com.minres.rdl.feature" version="1.0.0.qualifier"/>
|
||||||
<feature id="org.eclipse.emf.ecore"/>
|
<feature id="org.eclipse.emf.ecore"/>
|
||||||
<feature id="org.eclipse.rcp"/>
|
<feature id="org.eclipse.rcp"/>
|
||||||
<feature id="org.eclipse.emf.common"/>
|
<feature id="org.eclipse.emf.common"/>
|
||||||
|
@ -4,10 +4,10 @@
|
|||||||
|
|
||||||
<artifactId>com.minres.rdl.product.releng</artifactId>
|
<artifactId>com.minres.rdl.product.releng</artifactId>
|
||||||
<packaging>eclipse-repository</packaging>
|
<packaging>eclipse-repository</packaging>
|
||||||
<name>RDL Editor</name>
|
<name>RDL EEditor</name>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<version>1.4.1</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
<groupId>com.minres.rdl</groupId>
|
<groupId>com.minres.rdl</groupId>
|
||||||
<artifactId>com.minres.rdl.parent</artifactId>
|
<artifactId>com.minres.rdl.parent</artifactId>
|
||||||
</parent>
|
</parent>
|
||||||
@ -24,12 +24,6 @@
|
|||||||
<linux>tar.gz</linux>
|
<linux>tar.gz</linux>
|
||||||
<macosx>tar.gz</macosx>
|
<macosx>tar.gz</macosx>
|
||||||
</formats>
|
</formats>
|
||||||
<products>
|
|
||||||
<product>
|
|
||||||
<id>com.minres.rdl.product.product</id>
|
|
||||||
<archiveFileName>RDL-Editor-${project.version}</archiveFileName>
|
|
||||||
</product>
|
|
||||||
</products>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<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="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
<classpathentry kind="src" path="src"/>
|
<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"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
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
|
@ -2,8 +2,8 @@ Manifest-Version: 1.0
|
|||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: RDL Editor
|
Bundle-Name: RDL Editor
|
||||||
Bundle-SymbolicName: com.minres.rdl.product;singleton:=true
|
Bundle-SymbolicName: com.minres.rdl.product;singleton:=true
|
||||||
Bundle-Version: 1.4.1
|
Bundle-Version: 1.1.1.qualifier
|
||||||
Bundle-Vendor: MINRES Technologies GmbH
|
Bundle-Vendor: MINRES Technologies GmbH
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||||
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.12.0"
|
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.12.0"
|
||||||
Automatic-Module-Name: com.minres.rdl.product
|
Automatic-Module-Name: com.minres.rdl.product
|
||||||
|
@ -4,8 +4,9 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.rdl</groupId>
|
<groupId>com.minres.rdl</groupId>
|
||||||
<artifactId>com.minres.rdl.parent</artifactId>
|
<artifactId>com.minres.rdl.parent</artifactId>
|
||||||
<version>1.4.1</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>com.minres.rdl.product</artifactId>
|
<artifactId>com.minres.rdl.product</artifactId>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
|
<version>1.1.1-SNAPSHOT</version>
|
||||||
</project>
|
</project>
|
||||||
|
@ -1,104 +0,0 @@
|
|||||||
<?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>
|
|
@ -4,9 +4,10 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.rdl</groupId>
|
<groupId>com.minres.rdl</groupId>
|
||||||
<artifactId>com.minres.rdl.parent</artifactId>
|
<artifactId>com.minres.rdl.parent</artifactId>
|
||||||
<version>1.4.1</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>com.minres.rdl.repository</artifactId>
|
<artifactId>com.minres.rdl.repository</artifactId>
|
||||||
|
<version>1.1.1-SNAPSHOT</version>
|
||||||
<packaging>eclipse-repository</packaging>
|
<packaging>eclipse-repository</packaging>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
@ -46,96 +47,6 @@
|
|||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
</build>
|
</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>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</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">
|
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
@ -19,6 +20,5 @@
|
|||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry exported="true" kind="con" path="GROOVY_SUPPORT"/>
|
<classpathentry exported="true" kind="con" path="GROOVY_SUPPORT"/>
|
||||||
<classpathentry exported="true" kind="con" path="GROOVY_DSL_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"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
org.eclipse.jdt.core.compiler.compliance=11
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
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.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
org.eclipse.jdt.core.compiler.release=enabled
|
|
||||||
org.eclipse.jdt.core.compiler.source=11
|
|
||||||
|
@ -1,95 +1,20 @@
|
|||||||
import static groovy.io.FileType.FILES
|
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.
|
// Collect all jars.
|
||||||
def jars = []
|
def jars = []
|
||||||
def root = new File(project.getBasedir(), 'target/classes')
|
def root = new File(project.getBasedir(), 'target/classes')
|
||||||
def libs = new File(project.getBasedir(), 'target/classes/lib')
|
def libs = new File(project.getBasedir(), 'target/classes/lib')
|
||||||
def meta_inf = new File(project.getBasedir(), 'target/classes/META-INF')
|
|
||||||
|
|
||||||
libs.eachFileRecurse (FILES) { file ->
|
libs.eachFileRecurse (FILES) { file ->
|
||||||
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()
|
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.
|
// Write the manifest file.
|
||||||
Files.createDirectories( Paths.get(meta_inf.absolutePath))
|
def manifest = new File(project.getBasedir(), 'target/classes/META-INF/MANIFEST.MF')
|
||||||
def mf = new File(project.getBasedir(), 'target/classes/META-INF/MANIFEST.MF')
|
|
||||||
mf.write ''
|
manifest.write ''
|
||||||
mf << 'Manifest-Version: 1.0\n'
|
|
||||||
mf << 'Rsrc-Class-Path: ./ ' + jars.join(' ') + '\n'
|
manifest << 'Manifest-Version: 1.0\n'
|
||||||
mf << 'Rsrc-Main-Class: com.minres.rdl.generator.Main\n'
|
manifest << 'Class-Path: . ' + jars.join(' ') + '\n'
|
||||||
mf << 'Main-Class: org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader\n'
|
manifest << 'Rsrc-Main-Class: com.minres.rdl.generator.Main\n'
|
||||||
|
manifest << 'Main-Class: org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader\n'
|
Binary file not shown.
@ -1,13 +1,7 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<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">
|
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>
|
<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>
|
<artifactId>com.minres.rdl.standalone</artifactId>
|
||||||
|
|
||||||
<packaging>eclipse-repository</packaging>
|
<packaging>eclipse-repository</packaging>
|
||||||
<build>
|
<build>
|
||||||
<pluginManagement>
|
<pluginManagement>
|
||||||
@ -77,7 +71,7 @@
|
|||||||
<artifactItem>
|
<artifactItem>
|
||||||
<groupId>com.minres.rdl</groupId>
|
<groupId>com.minres.rdl</groupId>
|
||||||
<artifactId>com.minres.rdl</artifactId>
|
<artifactId>com.minres.rdl</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<overWrite>false</overWrite>
|
<overWrite>false</overWrite>
|
||||||
<outputDirectory>${project.build.directory}/classes</outputDirectory>
|
<outputDirectory>${project.build.directory}/classes</outputDirectory>
|
||||||
@ -171,12 +165,10 @@
|
|||||||
</snapshots>
|
</snapshots>
|
||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
<dependencies>
|
<parent>
|
||||||
<dependency>
|
<artifactId>com.minres.rdl.parent</artifactId>
|
||||||
<groupId>com.minres.rdl</groupId>
|
<groupId>com.minres.rdl</groupId>
|
||||||
<artifactId>com.minres.rdl</artifactId>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
<version>${project.version}</version>
|
</parent>
|
||||||
<type>eclipse-plugin</type>
|
<version>1.1.1-SNAPSHOT</version>
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</project>
|
</project>
|
@ -1,43 +1,33 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<?pde version="3.8"?>
|
<?pde version="3.8"?><target name="com.minres.rdl.target" sequenceNumber="1">
|
||||||
<target name="com.minres.coredsl.target" sequenceNumber="1">
|
|
||||||
<locations>
|
<locations>
|
||||||
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
|
<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.draw2d.feature.group" version="0.0.0"/>
|
||||||
<unit id="org.eclipse.emf.sdk.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.equinox.executable.feature.group" version="0.0.0"/>
|
||||||
<repository location="https://download.eclipse.org/releases/2022-03"/>
|
<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>
|
||||||
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
|
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
|
||||||
<unit id="org.eclipse.emf.mwe2.launcher.feature.group" version="0.0.0"/>
|
<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/"/>
|
<repository location="http://download.eclipse.org/modeling/emft/mwe/updates/releases/2.9.1/"/>
|
||||||
</location>
|
</location>
|
||||||
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
|
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
|
||||||
<unit id="org.eclipse.xtext.sdk.feature.group" version="0.0.0"/>
|
<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/"/>
|
<repository location="http://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.14.0/"/>
|
||||||
</location>
|
</location>
|
||||||
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
|
<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.gson" version="2.7.0.v20170129-0911"/>
|
||||||
<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.antlr.runtime" version="3.2.0.v201101311130"/>
|
||||||
<unit id="org.junit" version="4.13.2.v20211018-1956"/>
|
<unit id="org.junit" version="4.12.0.v201504281640"/>
|
||||||
<unit id="org.apiguardian" version="1.1.2.v20211018-1956"/>
|
<unit id="org.objectweb.asm" version="6.1.1.v20180414-0329"/>
|
||||||
<unit id="org.junit.jupiter.api" version="5.8.1.v20211018-1956"/>
|
<unit id="org.objectweb.asm.tree" version="6.1.1.v20180414-0329"/>
|
||||||
<unit id="org.junit.jupiter.engine" version="5.8.1.v20211018-1956"/>
|
<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/S20180504181223/repository"/>
|
||||||
<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>
|
</location>
|
||||||
</locations>
|
</locations>
|
||||||
</target>
|
</target>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.rdl</groupId>
|
<groupId>com.minres.rdl</groupId>
|
||||||
<artifactId>com.minres.rdl.parent</artifactId>
|
<artifactId>com.minres.rdl.parent</artifactId>
|
||||||
<version>1.4.1</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>com.minres.rdl.target</artifactId>
|
<artifactId>com.minres.rdl.target</artifactId>
|
||||||
<packaging>eclipse-target-definition</packaging>
|
<packaging>eclipse-target-definition</packaging>
|
||||||
|
@ -4,11 +4,7 @@
|
|||||||
<classpathentry kind="src" path="src-gen"/>
|
<classpathentry kind="src" path="src-gen"/>
|
||||||
<classpathentry kind="src" path="xtend-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.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.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"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
@ -1 +0,0 @@
|
|||||||
/xtend-gen/
|
|
@ -1,10 +1,7 @@
|
|||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
org.eclipse.jdt.core.compiler.compliance=11
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
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.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
org.eclipse.jdt.core.compiler.release=enabled
|
|
||||||
org.eclipse.jdt.core.compiler.source=11
|
|
||||||
|
@ -3,13 +3,14 @@ Automatic-Module-Name: com.minres.rdl.tests
|
|||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: com.minres.rdl.tests
|
Bundle-Name: com.minres.rdl.tests
|
||||||
Bundle-Vendor: My Company
|
Bundle-Vendor: My Company
|
||||||
Bundle-Version: 1.4.1
|
Bundle-Version: 1.0.0.qualifier
|
||||||
Bundle-SymbolicName: com.minres.rdl.tests; singleton:=true
|
Bundle-SymbolicName: com.minres.rdl.tests; singleton:=true
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Require-Bundle: com.minres.rdl,
|
Require-Bundle: com.minres.rdl,
|
||||||
org.junit.jupiter.api;bundle-version="[5.1.0,6.0.0)",
|
org.junit;bundle-version="4.12.0",
|
||||||
org.eclipse.xtext.testing,
|
org.eclipse.xtext.testing,
|
||||||
org.eclipse.xtext.xbase.testing,
|
org.eclipse.xtext.xbase.testing,
|
||||||
org.eclipse.xtext.xbase.lib;bundle-version="2.14.0"
|
org.eclipse.xtext.xbase.lib;bundle-version="2.14.0"
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||||
Export-Package: com.minres.rdl.tests;x-internal=true
|
Export-Package: com.minres.rdl.tests;x-internal=true
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.rdl</groupId>
|
<groupId>com.minres.rdl</groupId>
|
||||||
<artifactId>com.minres.rdl.parent</artifactId>
|
<artifactId>com.minres.rdl.parent</artifactId>
|
||||||
<version>1.4.1</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>com.minres.rdl.tests</artifactId>
|
<artifactId>com.minres.rdl.tests</artifactId>
|
||||||
<packaging>eclipse-test-plugin</packaging>
|
<packaging>eclipse-test-plugin</packaging>
|
||||||
@ -18,7 +18,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.eclipse.tycho</groupId>
|
<groupId>org.eclipse.tycho</groupId>
|
||||||
<artifactId>tycho-surefire-plugin</artifactId>
|
<artifactId>tycho-surefire-plugin</artifactId>
|
||||||
<!-- <version>${tycho-version}</version> -->
|
<version>${tycho-version}</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<failIfNoTests>false</failIfNoTests>
|
<failIfNoTests>false</failIfNoTests>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* generated by Xtext 2.26.0
|
* generated by Xtext 2.14.0
|
||||||
*/
|
*/
|
||||||
package com.minres.rdl.tests;
|
package com.minres.rdl.tests;
|
||||||
|
|
||||||
@ -25,6 +25,7 @@ public class RDLInjectorProvider implements IInjectorProvider, IRegistryConfigur
|
|||||||
@Override
|
@Override
|
||||||
public Injector getInjector() {
|
public Injector getInjector() {
|
||||||
if (injector == null) {
|
if (injector == null) {
|
||||||
|
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
|
||||||
this.injector = internalCreateInjector();
|
this.injector = internalCreateInjector();
|
||||||
stateAfterInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
|
stateAfterInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
|
||||||
}
|
}
|
||||||
@ -55,15 +56,11 @@ public class RDLInjectorProvider implements IInjectorProvider, IRegistryConfigur
|
|||||||
@Override
|
@Override
|
||||||
public void restoreRegistry() {
|
public void restoreRegistry() {
|
||||||
stateBeforeInjectorCreation.restoreGlobalState();
|
stateBeforeInjectorCreation.restoreGlobalState();
|
||||||
stateBeforeInjectorCreation = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setupRegistry() {
|
public void setupRegistry() {
|
||||||
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
|
|
||||||
if (injector == null) {
|
|
||||||
getInjector();
|
getInjector();
|
||||||
}
|
|
||||||
stateAfterInjectorCreation.restoreGlobalState();
|
stateAfterInjectorCreation.restoreGlobalState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,174 @@
|
|||||||
|
/**
|
||||||
|
* 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -4,7 +4,7 @@
|
|||||||
<classpathentry kind="src" path="src-gen"/>
|
<classpathentry kind="src" path="src-gen"/>
|
||||||
<classpathentry kind="src" path="xtend-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.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.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"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
@ -1 +0,0 @@
|
|||||||
/xtend-gen/
|
|
@ -1,10 +1,7 @@
|
|||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
org.eclipse.jdt.core.compiler.compliance=11
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
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.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
org.eclipse.jdt.core.compiler.release=enabled
|
|
||||||
org.eclipse.jdt.core.compiler.source=11
|
|
||||||
|
@ -3,16 +3,17 @@ Automatic-Module-Name: com.minres.rdl.ui.tests
|
|||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: com.minres.rdl.ui.tests
|
Bundle-Name: com.minres.rdl.ui.tests
|
||||||
Bundle-Vendor: My Company
|
Bundle-Vendor: My Company
|
||||||
Bundle-Version: 1.4.1
|
Bundle-Version: 1.0.0.qualifier
|
||||||
Bundle-SymbolicName: com.minres.rdl.ui.tests; singleton:=true
|
Bundle-SymbolicName: com.minres.rdl.ui.tests; singleton:=true
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Require-Bundle: com.minres.rdl.ui,
|
Require-Bundle: com.minres.rdl.ui,
|
||||||
org.junit.jupiter.api;bundle-version="[5.1.0,6.0.0)",
|
org.junit;bundle-version="4.12.0",
|
||||||
org.eclipse.xtext.testing,
|
org.eclipse.xtext.testing,
|
||||||
org.eclipse.xtext.xbase.testing,
|
org.eclipse.xtext.xbase.testing,
|
||||||
|
org.eclipse.xtext.junit4,
|
||||||
org.eclipse.xtext.xbase.junit,
|
org.eclipse.xtext.xbase.junit,
|
||||||
org.eclipse.core.runtime,
|
org.eclipse.core.runtime,
|
||||||
org.eclipse.xtext.ui.testing,
|
|
||||||
org.eclipse.ui.workbench;resolution:=optional
|
org.eclipse.ui.workbench;resolution:=optional
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||||
Export-Package: com.minres.rdl.ui.tests;x-internal=true
|
Export-Package: com.minres.rdl.ui.tests;x-internal=true
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.rdl</groupId>
|
<groupId>com.minres.rdl</groupId>
|
||||||
<artifactId>com.minres.rdl.parent</artifactId>
|
<artifactId>com.minres.rdl.parent</artifactId>
|
||||||
<version>1.4.1</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>com.minres.rdl.ui.tests</artifactId>
|
<artifactId>com.minres.rdl.ui.tests</artifactId>
|
||||||
<packaging>eclipse-test-plugin</packaging>
|
<packaging>eclipse-test-plugin</packaging>
|
||||||
@ -23,7 +23,25 @@
|
|||||||
<useUIHarness>true</useUIHarness>
|
<useUIHarness>true</useUIHarness>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</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>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* generated by Xtext 2.26.0
|
* generated by Xtext 2.14.0
|
||||||
*/
|
*/
|
||||||
package com.minres.rdl.ui.tests;
|
package com.minres.rdl.ui.tests;
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<classpathentry kind="src" path="src"/>
|
<classpathentry kind="src" path="src"/>
|
||||||
<classpathentry kind="src" path="src-gen"/>
|
<classpathentry kind="src" path="src-gen"/>
|
||||||
<classpathentry kind="src" path="xtend-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.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"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
@ -1,2 +1 @@
|
|||||||
/plugin.xml_gen
|
/plugin.xml_gen
|
||||||
/xtend-gen/
|
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
org.eclipse.jdt.core.compiler.compliance=11
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
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.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
org.eclipse.jdt.core.compiler.release=enabled
|
|
||||||
org.eclipse.jdt.core.compiler.source=11
|
|
||||||
|
@ -3,7 +3,7 @@ Automatic-Module-Name: com.minres.rdl.ui
|
|||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: com.minres.rdl.ui
|
Bundle-Name: com.minres.rdl.ui
|
||||||
Bundle-Vendor: MINRES Technologies GmbH
|
Bundle-Vendor: MINRES Technologies GmbH
|
||||||
Bundle-Version: 1.4.1
|
Bundle-Version: 1.2.0.qualifier
|
||||||
Bundle-SymbolicName: com.minres.rdl.ui; singleton:=true
|
Bundle-SymbolicName: com.minres.rdl.ui; singleton:=true
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Require-Bundle: com.minres.rdl,
|
Require-Bundle: com.minres.rdl,
|
||||||
@ -17,16 +17,12 @@ Require-Bundle: com.minres.rdl,
|
|||||||
org.eclipse.compare,
|
org.eclipse.compare,
|
||||||
org.eclipse.xtext.builder,
|
org.eclipse.xtext.builder,
|
||||||
org.eclipse.xtext.xbase.lib;bundle-version="2.14.0",
|
org.eclipse.xtext.xbase.lib;bundle-version="2.14.0",
|
||||||
org.eclipse.xtend.lib;bundle-version="2.14.0";resolution:=optional,
|
org.eclipse.xtend.lib;resolution:=optional,
|
||||||
org.eclipse.core.runtime,
|
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
|
Import-Package: org.apache.log4j
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||||
Export-Package: com.minres.rdl.ui.internal,
|
Export-Package: com.minres.rdl.ui.internal,
|
||||||
com.minres.rdl.ui.contentassist,
|
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
|
Bundle-Activator: com.minres.rdl.ui.internal.RdlActivator
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 493 B |
@ -100,7 +100,7 @@
|
|||||||
<page category="com.minres.rdl.RDL"
|
<page category="com.minres.rdl.RDL"
|
||||||
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:com.minres.rdl.ui.preferences.RdlPreferencePage"
|
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:com.minres.rdl.ui.preferences.RdlPreferencePage"
|
||||||
id="com.minres.rdl.RDL.preferences"
|
id="com.minres.rdl.RDL.preferences"
|
||||||
name="Output Configuration">
|
name="Generator">
|
||||||
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
|
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
|
||||||
</page>
|
</page>
|
||||||
</extension>
|
</extension>
|
||||||
@ -264,6 +264,11 @@
|
|||||||
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
|
<keywordReference id="com.minres.rdl.ui.keyword_RDL"/>
|
||||||
</page>
|
</page>
|
||||||
</extension>
|
</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">
|
<extension point="org.eclipse.ui.preferencePages">
|
||||||
<page
|
<page
|
||||||
category="com.minres.rdl.RDL"
|
category="com.minres.rdl.RDL"
|
||||||
@ -434,77 +439,16 @@
|
|||||||
</extension>
|
</extension>
|
||||||
<extension
|
<extension
|
||||||
point="org.eclipse.ui.newWizards">
|
point="org.eclipse.ui.newWizards">
|
||||||
<category id="com.minres.category" name="MINRES">
|
|
||||||
</category>
|
|
||||||
<wizard
|
<wizard
|
||||||
category="com.minres.category"
|
category="com.minres.category"
|
||||||
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:org.eclipse.xtext.ui.wizard.template.TemplateNewProjectWizard"
|
class="com.minres.rdl.ui.RDLExecutableExtensionFactory:com.minres.rdl.ui.wizard.RDLNewProjectWizard"
|
||||||
id="com.minres.rdl.ui.wizard.RDLNewProjectWizard"
|
id="com.minres.rdl.ui.wizard.RDLNewProjectWizard"
|
||||||
name="RDL Project"
|
name="RDL Project"
|
||||||
icon="icons/new_RDL_proj.gif"
|
|
||||||
project="true">
|
project="true">
|
||||||
</wizard>
|
</wizard>
|
||||||
</extension>
|
<category
|
||||||
<extension
|
id="com.minres.category"
|
||||||
point="org.eclipse.xtext.ui.projectTemplate">
|
name="MINRES">
|
||||||
<projectTemplateProvider
|
</category>
|
||||||
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>
|
</extension>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.rdl</groupId>
|
<groupId>com.minres.rdl</groupId>
|
||||||
<artifactId>com.minres.rdl.parent</artifactId>
|
<artifactId>com.minres.rdl.parent</artifactId>
|
||||||
<version>1.4.1</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>com.minres.rdl.ui</artifactId>
|
<artifactId>com.minres.rdl.ui</artifactId>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
@ -17,4 +17,6 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
<version>1.2.0-SNAPSHOT</version>
|
||||||
</project>
|
</project>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* generated by Xtext 2.26.0
|
* generated by Xtext 2.14.0
|
||||||
*/
|
*/
|
||||||
package com.minres.rdl.ui;
|
package com.minres.rdl.ui;
|
||||||
|
|
||||||
@ -14,6 +14,7 @@ import com.minres.rdl.ui.labeling.RDLDescriptionLabelProvider;
|
|||||||
import com.minres.rdl.ui.labeling.RDLLabelProvider;
|
import com.minres.rdl.ui.labeling.RDLLabelProvider;
|
||||||
import com.minres.rdl.ui.outline.RDLOutlineTreeProvider;
|
import com.minres.rdl.ui.outline.RDLOutlineTreeProvider;
|
||||||
import com.minres.rdl.ui.quickfix.RDLQuickfixProvider;
|
import com.minres.rdl.ui.quickfix.RDLQuickfixProvider;
|
||||||
|
import com.minres.rdl.ui.wizard.RDLProjectCreator;
|
||||||
import com.minres.rdl.validation.RDLValidatorConfigurationBlock;
|
import com.minres.rdl.validation.RDLValidatorConfigurationBlock;
|
||||||
import org.eclipse.compare.IViewerCreator;
|
import org.eclipse.compare.IViewerCreator;
|
||||||
import org.eclipse.core.resources.IWorkspaceRoot;
|
import org.eclipse.core.resources.IWorkspaceRoot;
|
||||||
@ -59,8 +60,6 @@ import org.eclipse.xtext.ui.editor.contentassist.IProposalConflictHelper;
|
|||||||
import org.eclipse.xtext.ui.editor.contentassist.PrefixMatcher;
|
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.AntlrProposalConflictHelper;
|
||||||
import org.eclipse.xtext.ui.editor.contentassist.antlr.DelegatingContentAssistContextFactory;
|
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.IOutlineTreeProvider;
|
||||||
import org.eclipse.xtext.ui.editor.outline.impl.IOutlineTreeStructureProvider;
|
import org.eclipse.xtext.ui.editor.outline.impl.IOutlineTreeStructureProvider;
|
||||||
import org.eclipse.xtext.ui.editor.preferences.IPreferenceStoreInitializer;
|
import org.eclipse.xtext.ui.editor.preferences.IPreferenceStoreInitializer;
|
||||||
@ -81,7 +80,6 @@ import org.eclipse.xtext.ui.resource.ResourceServiceDescriptionLabelProvider;
|
|||||||
import org.eclipse.xtext.ui.shared.Access;
|
import org.eclipse.xtext.ui.shared.Access;
|
||||||
import org.eclipse.xtext.ui.validation.AbstractValidatorConfigurationBlock;
|
import org.eclipse.xtext.ui.validation.AbstractValidatorConfigurationBlock;
|
||||||
import org.eclipse.xtext.ui.wizard.IProjectCreator;
|
import org.eclipse.xtext.ui.wizard.IProjectCreator;
|
||||||
import org.eclipse.xtext.ui.wizard.template.DefaultTemplateProjectCreator;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manual modifications go to {@link RDLUiModule}.
|
* Manual modifications go to {@link RDLUiModule}.
|
||||||
@ -191,11 +189,6 @@ public abstract class AbstractRDLUiModule extends DefaultUiModule {
|
|||||||
.to(BuilderPreferenceAccess.Initializer.class);
|
.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
|
// contributed by org.eclipse.xtext.xtext.generator.ui.labeling.LabelProviderFragment2
|
||||||
public Class<? extends ILabelProvider> bindILabelProvider() {
|
public Class<? extends ILabelProvider> bindILabelProvider() {
|
||||||
return RDLLabelProvider.class;
|
return RDLLabelProvider.class;
|
||||||
@ -294,9 +287,9 @@ public abstract class AbstractRDLUiModule extends DefaultUiModule {
|
|||||||
binder.bind(String.class).annotatedWith(Names.named(UIBindings.COMPARE_VIEWER_TITLE)).toInstance("RDL Compare");
|
binder.bind(String.class).annotatedWith(Names.named(UIBindings.COMPARE_VIEWER_TITLE)).toInstance("RDL Compare");
|
||||||
}
|
}
|
||||||
|
|
||||||
// contributed by org.eclipse.xtext.xtext.generator.ui.projectWizard.TemplateProjectWizardFragment
|
// contributed by org.eclipse.xtext.xtext.generator.ui.projectWizard.SimpleProjectWizardFragment2
|
||||||
public Class<? extends IProjectCreator> bindIProjectCreator() {
|
public Class<? extends IProjectCreator> bindIProjectCreator() {
|
||||||
return DefaultTemplateProjectCreator.class;
|
return RDLProjectCreator.class;
|
||||||
}
|
}
|
||||||
|
|
||||||
// contributed by org.eclipse.xtext.xtext.generator.exporting.SimpleNamesFragment2
|
// contributed by org.eclipse.xtext.xtext.generator.exporting.SimpleNamesFragment2
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
/*
|
/*
|
||||||
* generated by Xtext 2.26.0
|
* generated by Xtext 2.14.0
|
||||||
*/
|
*/
|
||||||
package com.minres.rdl.ui;
|
package com.minres.rdl.ui;
|
||||||
|
|
||||||
import com.google.inject.Injector;
|
import com.google.inject.Injector;
|
||||||
import com.minres.rdl.ui.internal.RdlActivator;
|
import com.minres.rdl.ui.internal.RdlActivator;
|
||||||
|
import org.eclipse.core.runtime.Platform;
|
||||||
import org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory;
|
import org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory;
|
||||||
import org.osgi.framework.Bundle;
|
import org.osgi.framework.Bundle;
|
||||||
import org.osgi.framework.FrameworkUtil;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class was generated. Customizations should only happen in a newly
|
* This class was generated. Customizations should only happen in a newly
|
||||||
@ -17,7 +17,7 @@ public class RDLExecutableExtensionFactory extends AbstractGuiceAwareExecutableE
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Bundle getBundle() {
|
protected Bundle getBundle() {
|
||||||
return FrameworkUtil.getBundle(RdlActivator.class);
|
return Platform.getBundle(RdlActivator.PLUGIN_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* generated by Xtext 2.26.0
|
* generated by Xtext 2.14.0
|
||||||
*/
|
*/
|
||||||
package com.minres.rdl.ui.contentassist;
|
package com.minres.rdl.ui.contentassist;
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* generated by Xtext 2.26.0
|
* generated by Xtext 2.14.0
|
||||||
*/
|
*/
|
||||||
package com.minres.rdl.ui.internal;
|
package com.minres.rdl.ui.internal;
|
||||||
|
|
||||||
|
@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,98 @@
|
|||||||
|
/*
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
|
}
|
@ -1,22 +1,52 @@
|
|||||||
/*
|
/*
|
||||||
* generated by Xtext 2.26.0
|
* generated by Xtext 2.14.0
|
||||||
*/
|
*/
|
||||||
package com.minres.rdl.validation;
|
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.jface.dialogs.IDialogSettings;
|
||||||
|
import org.eclipse.swt.widgets.Combo;
|
||||||
import org.eclipse.swt.widgets.Composite;
|
import org.eclipse.swt.widgets.Composite;
|
||||||
|
import org.eclipse.xtext.ui.preferences.OptionsConfigurationBlock;
|
||||||
import org.eclipse.xtext.ui.validation.AbstractValidatorConfigurationBlock;
|
import org.eclipse.xtext.ui.validation.AbstractValidatorConfigurationBlock;
|
||||||
|
import org.eclipse.xtext.validation.SeverityConverter;
|
||||||
|
|
||||||
@SuppressWarnings("restriction")
|
@SuppressWarnings("restriction")
|
||||||
public class RDLValidatorConfigurationBlock extends AbstractValidatorConfigurationBlock {
|
public class RDLValidatorConfigurationBlock extends AbstractValidatorConfigurationBlock {
|
||||||
|
|
||||||
protected static final String SETTINGS_SECTION_NAME = "RDL";
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void fillSettingsPage(Composite composite, int nColumns, int defaultIndent) {
|
protected void fillSettingsPage(Composite composite, int nColumns, int defaultIndent) {
|
||||||
addComboBox(RDLConfigurableIssueCodesProvider.DEPRECATED_MODEL_PART, "Deprecated Model Part", composite, 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
|
@Override
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
storeSectionExpansionStates(getDialogSettings());
|
storeSectionExpansionStates(getDialogSettings());
|
||||||
@ -26,9 +56,9 @@ public class RDLValidatorConfigurationBlock extends AbstractValidatorConfigurati
|
|||||||
@Override
|
@Override
|
||||||
protected IDialogSettings getDialogSettings() {
|
protected IDialogSettings getDialogSettings() {
|
||||||
IDialogSettings dialogSettings = super.getDialogSettings();
|
IDialogSettings dialogSettings = super.getDialogSettings();
|
||||||
IDialogSettings section = dialogSettings.getSection(SETTINGS_SECTION_NAME);
|
IDialogSettings section = dialogSettings.getSection("RDL");
|
||||||
if (section == null) {
|
if (section == null) {
|
||||||
return dialogSettings.addNewSection(SETTINGS_SECTION_NAME);
|
return dialogSettings.addNewSection("RDL");
|
||||||
}
|
}
|
||||||
return section;
|
return section;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
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};
|
||||||
|
}
|
||||||
|
}
|
@ -3,15 +3,16 @@
|
|||||||
*/
|
*/
|
||||||
package com.minres.rdl.ui
|
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.xtend.lib.annotations.FinalFieldsConstructor
|
||||||
import org.eclipse.xtext.documentation.IEObjectDocumentationProvider
|
|
||||||
import org.eclipse.xtext.ui.editor.hover.IEObjectHoverProvider
|
import org.eclipse.xtext.ui.editor.hover.IEObjectHoverProvider
|
||||||
import org.eclipse.xtext.ui.editor.hyperlinking.HyperlinkHelper
|
import org.eclipse.xtext.documentation.IEObjectDocumentationProvider
|
||||||
import org.eclipse.xtext.ui.editor.hyperlinking.XtextHyperlink
|
import org.eclipse.xtext.ui.wizard.IProjectCreator
|
||||||
import org.eclipse.xtext.ui.resource.IResourceSetProvider
|
import org.eclipse.xtext.ui.resource.IResourceSetProvider
|
||||||
import org.eclipse.xtext.ui.resource.SimpleResourceSetProvider
|
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.
|
* Use this class to register components to be used within the Eclipse IDE.
|
||||||
@ -27,20 +28,20 @@ class RDLUiModule extends AbstractRDLUiModule {
|
|||||||
typeof(RDLEObjectDocumentationProvider);
|
typeof(RDLEObjectDocumentationProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
// override Class<? extends IProjectCreator> bindIProjectCreator() {
|
override Class<? extends IProjectCreator> bindIProjectCreator() {
|
||||||
// return JDTFreeStructuralProjectCreator;
|
return JDTFreeStructuralProjectCreator;
|
||||||
// }
|
}
|
||||||
|
|
||||||
override Class<? extends IResourceSetProvider> bindIResourceSetProvider() {
|
override Class<? extends IResourceSetProvider> bindIResourceSetProvider() {
|
||||||
return SimpleResourceSetProvider
|
return SimpleResourceSetProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
def Class<? extends HyperlinkHelper> bindHyperlinkHelper() {
|
def Class<? extends HyperlinkHelper> bindHyperlinkHelper() {
|
||||||
return RdlHyperlinkHelper
|
return MyHyperlinkHelper
|
||||||
}
|
}
|
||||||
|
|
||||||
def Class<? extends XtextHyperlink> bindHyperlink() {
|
def Class<? extends XtextHyperlink> bindHyperlink() {
|
||||||
return RdlXtextHyperlink
|
return MyXtextHyperlink
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,134 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -43,10 +43,7 @@ class RDLLabelProvider extends DefaultEObjectLabelProvider {
|
|||||||
val pa = e.propertyAssignments.findFirst[PropertyAssignment pa |
|
val pa = e.propertyAssignments.findFirst[PropertyAssignment pa |
|
||||||
pa instanceof ExplicitPropertyAssignment && (pa as ExplicitPropertyAssignment).name==PropertyEnum.NAME
|
pa instanceof ExplicitPropertyAssignment && (pa as ExplicitPropertyAssignment).name==PropertyEnum.NAME
|
||||||
]
|
]
|
||||||
if(pa!== null)
|
|
||||||
e.type.literal+' '+ text((pa as ExplicitPropertyAssignment).rhs)
|
e.type.literal+' '+ text((pa as ExplicitPropertyAssignment).rhs)
|
||||||
else
|
|
||||||
e.type.literal
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,6 @@ import com.minres.rdl.preferences.PreferenceConstants
|
|||||||
import org.eclipse.ui.preferences.ScopedPreferenceStore
|
import org.eclipse.ui.preferences.ScopedPreferenceStore
|
||||||
import org.eclipse.core.runtime.preferences.InstanceScope
|
import org.eclipse.core.runtime.preferences.InstanceScope
|
||||||
import org.eclipse.jface.preference.ComboFieldEditor
|
import org.eclipse.jface.preference.ComboFieldEditor
|
||||||
import org.eclipse.jface.preference.StringFieldEditor
|
|
||||||
|
|
||||||
class RdlPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
|
class RdlPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
|
||||||
|
|
||||||
@ -22,12 +21,6 @@ class RdlPreferencePage extends FieldEditorPreferencePage implements IWorkbenchP
|
|||||||
override createFieldEditors() {
|
override createFieldEditors() {
|
||||||
addField(new BooleanFieldEditor(PreferenceConstants.P_GENERATE_CSV, "Generate CSV:", getFieldEditorParent()));
|
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 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) {
|
override init(IWorkbench workbench) {
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
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() {
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
* 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!
|
||||||
|
'''
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
/*
|
||||||
|
* generated by Xtext 2.14.0
|
||||||
|
*/
|
||||||
|
package com.minres.rdl.ui.wizard;
|
||||||
|
|
||||||
|
import org.eclipse.xtext.ui.wizard.DefaultProjectInfo;
|
||||||
|
|
||||||
|
public class RDLProjectInfo extends DefaultProjectInfo {
|
||||||
|
|
||||||
|
}
|
@ -1,81 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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;
|
|
||||||
''')
|
|
||||||
])
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,14 @@
|
|||||||
|
/*
|
||||||
|
* 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,4 +0,0 @@
|
|||||||
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>
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.minres.rdl.ui.hyperlink
|
package com.minres.structural.ui.hyperlink
|
||||||
|
|
||||||
import com.google.inject.Inject
|
import com.google.inject.Inject
|
||||||
import org.eclipse.emf.common.util.URI
|
import org.eclipse.emf.common.util.URI
|
||||||
@ -11,9 +11,8 @@ import org.eclipse.xtext.scoping.impl.ImportUriResolver
|
|||||||
import org.eclipse.xtext.ui.editor.hyperlinking.HyperlinkHelper
|
import org.eclipse.xtext.ui.editor.hyperlinking.HyperlinkHelper
|
||||||
import org.eclipse.xtext.ui.editor.hyperlinking.IHyperlinkAcceptor
|
import org.eclipse.xtext.ui.editor.hyperlinking.IHyperlinkAcceptor
|
||||||
import org.eclipse.xtext.util.TextRegion
|
import org.eclipse.xtext.util.TextRegion
|
||||||
import org.eclipse.jface.text.IRegion
|
|
||||||
|
|
||||||
class RdlHyperlinkHelper extends HyperlinkHelper {
|
class MyHyperlinkHelper extends HyperlinkHelper {
|
||||||
|
|
||||||
@Inject ImportUriResolver resolver;
|
@Inject ImportUriResolver resolver;
|
||||||
|
|
||||||
@ -34,10 +33,10 @@ class RdlHyperlinkHelper extends HyperlinkHelper {
|
|||||||
val textRegion = leaf.getTextRegion();
|
val textRegion = leaf.getTextRegion();
|
||||||
val uri = EcoreUtil.getURI(top);
|
val uri = EcoreUtil.getURI(top);
|
||||||
val result = hyperlinkProvider.get();
|
val result = hyperlinkProvider.get();
|
||||||
result.setHyperlinkRegion(new Region(textRegion.getOffset(), textRegion.getLength()) as IRegion);
|
result.setHyperlinkRegion(new Region(textRegion.getOffset(), textRegion.getLength()));
|
||||||
result.setURI(if(uri.isPlatformResource()) uri else resource.getResourceSet().getURIConverter().normalize(uri));
|
result.setURI(if(uri.isPlatformResource()) uri else resource.getResourceSet().getURIConverter().normalize(uri));
|
||||||
result.setHyperlinkText(labelProvider.getText(top));
|
result.setHyperlinkText(labelProvider.getText(top));
|
||||||
if(result instanceof RdlXtextHyperlink) result.selectTarget=false
|
if(result instanceof MyXtextHyperlink) result.selectTarget=false
|
||||||
acceptor.accept(result);
|
acceptor.accept(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,10 +1,10 @@
|
|||||||
package com.minres.rdl.ui.hyperlink
|
package com.minres.structural.ui.hyperlink
|
||||||
|
|
||||||
import com.google.inject.Inject
|
import com.google.inject.Inject
|
||||||
import org.eclipse.xtext.ui.editor.IURIEditorOpener
|
import org.eclipse.xtext.ui.editor.IURIEditorOpener
|
||||||
import org.eclipse.xtext.ui.editor.hyperlinking.XtextHyperlink
|
import org.eclipse.xtext.ui.editor.hyperlinking.XtextHyperlink
|
||||||
|
|
||||||
class RdlXtextHyperlink extends XtextHyperlink {
|
class MyXtextHyperlink extends XtextHyperlink {
|
||||||
|
|
||||||
var boolean select = true
|
var boolean select = true
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,57 @@
|
|||||||
|
/**
|
||||||
|
* 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);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
/**
|
||||||
|
* 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 {
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
/**
|
||||||
|
* 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 {
|
||||||
|
}
|
@ -0,0 +1,375 @@
|
|||||||
|
/**
|
||||||
|
* 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";
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,118 @@
|
|||||||
|
/**
|
||||||
|
* 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);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
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) {
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
/**
|
||||||
|
* 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 {
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
/**
|
||||||
|
* 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);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,72 @@
|
|||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
@ -4,6 +4,6 @@
|
|||||||
<classpathentry kind="src" path="src-gen"/>
|
<classpathentry kind="src" path="src-gen"/>
|
||||||
<classpathentry kind="src" path="xtend-gen"/>
|
<classpathentry kind="src" path="xtend-gen"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
|
<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-11"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||||
<classpathentry kind="output" path="target/classes"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
@ -1 +0,0 @@
|
|||||||
/xtend-gen/
|
|
@ -1,10 +1,7 @@
|
|||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
org.eclipse.jdt.core.compiler.compliance=11
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
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.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
org.eclipse.jdt.core.compiler.release=enabled
|
|
||||||
org.eclipse.jdt.core.compiler.source=11
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.rdl</groupId>
|
<groupId>com.minres.rdl</groupId>
|
||||||
<artifactId>com.minres.rdl.parent</artifactId>
|
<artifactId>com.minres.rdl.parent</artifactId>
|
||||||
<version>1.4.1</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>com.minres.rdl.web</artifactId>
|
<artifactId>com.minres.rdl.web</artifactId>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
@ -27,7 +27,7 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-war-plugin</artifactId>
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
<version>3.2.3</version>
|
<version>3.2.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<warSourceDirectory>WebRoot</warSourceDirectory>
|
<warSourceDirectory>WebRoot</warSourceDirectory>
|
||||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
<artifactId>jetty-maven-plugin</artifactId>
|
<artifactId>jetty-maven-plugin</artifactId>
|
||||||
<version>9.4.34.v20201102</version>
|
<version>9.4.9.v20180320</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<webAppSourceDirectory>WebRoot</webAppSourceDirectory>
|
<webAppSourceDirectory>WebRoot</webAppSourceDirectory>
|
||||||
</configuration>
|
</configuration>
|
||||||
@ -44,7 +44,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
<artifactId>build-helper-maven-plugin</artifactId>
|
<artifactId>build-helper-maven-plugin</artifactId>
|
||||||
<version>3.0.0</version>
|
<version>1.9.1</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>add-source</id>
|
<id>add-source</id>
|
||||||
@ -101,22 +101,22 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.webjars</groupId>
|
<groupId>org.webjars</groupId>
|
||||||
<artifactId>requirejs</artifactId>
|
<artifactId>requirejs</artifactId>
|
||||||
<version>2.3.6</version>
|
<version>2.3.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.webjars</groupId>
|
<groupId>org.webjars</groupId>
|
||||||
<artifactId>jquery</artifactId>
|
<artifactId>jquery</artifactId>
|
||||||
<version>3.5.1</version>
|
<version>2.2.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.webjars</groupId>
|
<groupId>org.webjars</groupId>
|
||||||
<artifactId>ace</artifactId>
|
<artifactId>ace</artifactId>
|
||||||
<version>1.3.3</version>
|
<version>1.2.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
<artifactId>jetty-annotations</artifactId>
|
<artifactId>jetty-annotations</artifactId>
|
||||||
<version>9.4.34.v20201102</version>
|
<version>9.4.9.v20180320</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* generated by Xtext 2.26.0
|
* generated by Xtext 2.14.0
|
||||||
*/
|
*/
|
||||||
package com.minres.rdl.web;
|
package com.minres.rdl.web;
|
||||||
|
|
||||||
|
@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
* 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();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
/**
|
||||||
|
* 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 {
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
/**
|
||||||
|
* 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));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,77 @@
|
|||||||
|
/**
|
||||||
|
* 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -3,7 +3,7 @@
|
|||||||
<classpathentry kind="src" path="src"/>
|
<classpathentry kind="src" path="src"/>
|
||||||
<classpathentry kind="src" path="src-gen"/>
|
<classpathentry kind="src" path="src-gen"/>
|
||||||
<classpathentry kind="src" path="xtend-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.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"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
@ -2,5 +2,3 @@
|
|||||||
/Run RDL Generator DBT-RISCV.launch
|
/Run RDL Generator DBT-RISCV.launch
|
||||||
/Run RDL Generator SC-Components-Test.launch
|
/Run RDL Generator SC-Components-Test.launch
|
||||||
/plugin.xml_gen
|
/plugin.xml_gen
|
||||||
/model/
|
|
||||||
/xtend-gen/
|
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
org.eclipse.jdt.core.compiler.compliance=11
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
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.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
org.eclipse.jdt.core.compiler.release=enabled
|
|
||||||
org.eclipse.jdt.core.compiler.source=11
|
|
||||||
|
@ -3,7 +3,7 @@ Automatic-Module-Name: com.minres.rdl
|
|||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: com.minres.rdl
|
Bundle-Name: com.minres.rdl
|
||||||
Bundle-Vendor: MINRES Technologies GmbH
|
Bundle-Vendor: MINRES Technologies GmbH
|
||||||
Bundle-Version: 1.4.1
|
Bundle-Version: 1.1.0.qualifier
|
||||||
Bundle-SymbolicName: com.minres.rdl; singleton:=true
|
Bundle-SymbolicName: com.minres.rdl; singleton:=true
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Require-Bundle: org.eclipse.xtext,
|
Require-Bundle: org.eclipse.xtext,
|
||||||
@ -14,10 +14,9 @@ Require-Bundle: org.eclipse.xtext,
|
|||||||
org.eclipse.xtext.util,
|
org.eclipse.xtext.util,
|
||||||
org.eclipse.emf.common,
|
org.eclipse.emf.common,
|
||||||
org.eclipse.xtend.lib;bundle-version="2.14.0",
|
org.eclipse.xtend.lib;bundle-version="2.14.0",
|
||||||
org.antlr.runtime;bundle-version="[3.2.0,3.2.1)",
|
org.antlr.runtime,
|
||||||
org.eclipse.equinox.preferences,
|
org.eclipse.equinox.preferences
|
||||||
org.eclipse.emf.mwe.utils
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-11
|
|
||||||
Export-Package: com.minres.rdl,
|
Export-Package: com.minres.rdl,
|
||||||
com.minres.rdl.generator,
|
com.minres.rdl.generator,
|
||||||
com.minres.rdl.parser.antlr,
|
com.minres.rdl.parser.antlr,
|
||||||
@ -29,6 +28,5 @@ Export-Package: com.minres.rdl,
|
|||||||
com.minres.rdl.scoping,
|
com.minres.rdl.scoping,
|
||||||
com.minres.rdl.serializer,
|
com.minres.rdl.serializer,
|
||||||
com.minres.rdl.services,
|
com.minres.rdl.services,
|
||||||
com.minres.rdl.validation,
|
com.minres.rdl.validation
|
||||||
com.minres.rdl.formatting2
|
|
||||||
Import-Package: org.apache.log4j
|
Import-Package: org.apache.log4j
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user