mirror of
https://github.com/Minres/RDL-Editor.git
synced 2025-06-12 21:32:22 +02:00
Changed grammar and added code generator
* changed the grammar to ease code generation * added a code generator and a standalone setup to generate SystemC code using SC-Components lib
This commit is contained in:
1
com.minres.rdl.parent/com.minres.rdl.ui/xtend-gen/com/minres/rdl/ui/outline/.gitignore
vendored
Normal file
1
com.minres.rdl.parent/com.minres.rdl.ui/xtend-gen/com/minres/rdl/ui/outline/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/RDLOutlineTreeProvider.java
|
@ -4,10 +4,11 @@
|
||||
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.NamedInstantiation;
|
||||
import com.minres.rdl.rdl.Instantiation;
|
||||
import com.minres.rdl.rdl.PostPropertyAssignment;
|
||||
import com.minres.rdl.rdl.PropertyAssignment;
|
||||
import com.minres.rdl.rdl.PropertyAssignmentRhs;
|
||||
@ -42,10 +43,18 @@ public class RDLOutlineTreeProvider extends DefaultOutlineTreeProvider {
|
||||
this.createNode(parentNode, it);
|
||||
};
|
||||
domainModel.getPropertyAssignments().forEach(_function_3);
|
||||
final Consumer<NamedInstantiation> _function_4 = (NamedInstantiation it) -> {
|
||||
this.createNode(parentNode, it);
|
||||
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.getNamedInstantiations().forEach(_function_4);
|
||||
domainModel.getInstantiations().forEach(_function_4);
|
||||
}
|
||||
|
||||
protected void _createChildren(final IOutlineNode parentNode, final ComponentDefinition compDef) {
|
||||
@ -61,10 +70,18 @@ public class RDLOutlineTreeProvider extends DefaultOutlineTreeProvider {
|
||||
this.createNode(parentNode, it);
|
||||
};
|
||||
compDef.getPropertyAssignments().forEach(_function_2);
|
||||
final Consumer<NamedInstantiation> _function_3 = (NamedInstantiation it) -> {
|
||||
this.createNode(parentNode, it);
|
||||
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.getNamedInstantiations().forEach(_function_3);
|
||||
compDef.getInstantiations().forEach(_function_3);
|
||||
}
|
||||
|
||||
protected void _createChildren(final IOutlineNode parentNode, final EnumDefinition e) {
|
||||
@ -82,14 +99,18 @@ public class RDLOutlineTreeProvider extends DefaultOutlineTreeProvider {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected boolean _isLeaf(final NamedInstantiation 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);
|
||||
|
Reference in New Issue
Block a user