This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
style BlackAndWhiteStyle { | |
description = "A style with white background and black foreground." | |
transparency = 0.95 | |
background-color = black | |
line-color = black | |
line-style = solid | |
line-width = 1 | |
font-color = black | |
font-name = "Tahoma" | |
font-size = 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IGaService gaService = Graphiti.getGaService(); | |
// Creating Style with given id and description | |
Style style = super.getStyle(diagram); | |
style.setId("BlackAndWhiteStyle"); | |
style.setDescription("A style with white background and black foreground."); | |
// transparency value | |
style.setTransparency(0.95); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DmodelCustomOpenModelElementFeature extends DmodelCustomOpenModelElementFeatureBase { | |
@Inject IURIEditorOpener opener; | |
public DmodelCustomOpenModelElementFeature(IFeatureProvider fp) { | |
super(fp); | |
opener = Activator.get(IURIEditorOpener.class); | |
} | |
@Override | |
public boolean canExecute(ICustomContext context) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Relation icon "uml/Extension.gif" : | |
connection ( ) { | |
from fromEntity; | |
to toEntity; | |
fromText text ( ) { | |
fromCardinality | |
}; | |
toText text ( ) { | |
toCardinality | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main; | |
import ch.aplu.turtle.Turtle; | |
import ch.aplu.turtle.TurtleFrame; | |
/** | |
* see http://www.aplu.ch/home/apluhomex.jsp?site=65 | |
* download Jar from http://www.aplu.ch/home/download/aplujar5.zip | |
* see http://www.geocaching.com/seek/cache_details.aspx?guid=fb9e65c2-aa9e-4848-9786-899d6eed9ca9 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grammar org.eclipse.xtext.example.ql.QlDsl with org.eclipse.xtext.xbase.Xbase | |
generate qlDsl "http://www.eclipse.org/xtext/example/ql/QlDsl" | |
/* The top-most container of QL files is a Questionnaire */ | |
Questionnare: | |
imports+=Import* | |
forms+=Form*; | |
/* Allows importing of qualified names of types */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import types.Money | |
form Box1HouseOwning { | |
hasSoldHouse: "Did you sell a house in 2010?" boolean | |
hasBoughtHouse: "Did you by a house in 2010?" boolean | |
hasMaintLoan: "Did you enter a loan for maintenance/reconstruction?" boolean | |
sellingPrice: "Price the house was sold for :" Money | |
privateDebt: "Private debts for the sold house: " Money | |
valueResidue: "Value residue: " Money |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grammar org.eclipse.xtext.example.ql.QlDsl with org.eclipse.xtext.xbase.Xbase | |
generate qlDsl "http://www.eclipse.org/xtext/example/ql/QlDsl" | |
/* The top-most container of QL files is a Questionnaire */ | |
Questionnaire: | |
imports+=Import* | |
forms+=Form*; | |
/* Allows importing of qualified names of types */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.eclipse.xtext.example.ql.jvmmodel | |
import com.google.inject.Inject | |
import java.io.Serializable | |
import org.eclipse.xtext.common.types.JvmOperation | |
import org.eclipse.xtext.common.types.util.TypeReferences | |
import org.eclipse.xtext.example.ql.qlDsl.ConditionalQuestionGroup | |
import org.eclipse.xtext.example.ql.qlDsl.Question | |
import org.eclipse.xtext.example.ql.qlDsl.Questionnaire | |
import org.eclipse.xtext.xbase.XExpression |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Check | |
def void check_featureDeclaredBeforeCall (XFeatureCall featureCall) { | |
val featureSource = featureCall.feature.sourceElements.head | |
val nodeFeature = if (featureSource != null) featureSource.node else featureCall.feature.node | |
val nodeCall = featureCall.node | |
if (nodeFeature != null) { | |
if (nodeFeature.offset > nodeCall.offset) { | |
error(featureCall.feature.simpleName+" must be declared before.",featureCall, | |
XbasePackage::eINSTANCE.XAbstractFeatureCall_Feature, IssueCodes::FEATURE_CALL_BEFORE_DECLARATION, null | |
) |
OlderNewer