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
//Preferred OnSubscribe API | |
Observable.create[ | |
onNext(9000) | |
onCompleted | |
] | |
.subscribe[ | |
println(it) | |
] | |
//force the deprecated OnSubscribeFunc API by returning a Subscription |
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
def static <T> myOperator(Observable<T> observable) { | |
observable.lift(new MyOperator) | |
} | |
def static void main(String[] args) { | |
Observable.just("Foo").myOperator | |
//instead of | |
Observable.just("Foo").lift(new MyOperator) | |
} |
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
<plugin> | |
<groupId>org.eclipse.tycho</groupId> | |
<artifactId>tycho-maven-plugin</artifactId> | |
<version>${tycho-version}</version> | |
<extensions>true</extensions> | |
</plugin> |
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
<plugin> | |
<groupId>org.eclipse.tycho</groupId> | |
<artifactId>target-platform-configuration</artifactId> | |
<version>${tycho-version}</version> | |
<configuration> | |
<target> | |
<artifact> | |
<groupId>org.xtext.builddsl</groupId> | |
<artifactId>org.xtext.builddsl.target</artifactId> | |
<version>1.0.0-SNAPSHOT</version> |
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
<artifactId>org.xtext.builddsl</artifactId> | |
<packaging>eclipse-plugin</packaging> | |
<parent> | |
<groupId>org.xtext.builddsl</groupId> | |
<artifactId>org.xtext.builddsl.parent</artifactId> | |
<version>1.0.0-SNAPSHOT</version> | |
<relativePath>../org.xtext.builddsl.parent/pom.xml</relativePath> | |
</parent> |
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
<plugin> | |
<groupId>org.eclipse.xtext</groupId> | |
<artifactId>xtext-maven-plugin</artifactId> | |
<version>2.6.0</version> | |
<executions> | |
<execution> | |
<goals> | |
<goal>generate</goal> | |
</goals> | |
</execution> |
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
plugins { | |
id 'org.xtext.xtext' version '0.1.0' | |
} | |
dependencies { | |
xtextTooling 'org.xtext.builddsl:org.xtext.builddsl:1.0.0-SNAPSHOT' | |
} | |
xtext { | |
version = '2.6.+' |
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
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>exec-maven-plugin</artifactId> | |
<version>1.2.1</version> | |
<executions> | |
<execution> | |
<id>mwe2Launcher</id> | |
<phase>generate-sources</phase> | |
<goals> | |
<goal>java</goal> |
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
//var grammarURI = "classpath:/org/xtext/builddsl/BuildDSL.xtext" | |
var grammarURI = "platform:/resource/${projectName}/src/org/xtext/builddsl/BuildDSL.xtext" |
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
@Target(TYPE) | |
@Active(LogProcessor) | |
annotation Log { | |
} | |
class LogProcessor extends AbstractClassProcessor { | |
override doTransform(MutableClassDeclaration cls, extension TransformationContext context) { | |
cls.addField("log") [ | |
static = true | |
final = true |
OlderNewer