Last active
December 29, 2015 16:29
-
-
Save laurentpetit/7697984 to your computer and use it in GitHub Desktop.
Les 2 codes suivants sont strictement equivalents en termes de side-effects
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
(ns lein-script-test | |
(:require [ccw.util.eclipse :as e] | |
[ccw.util.e4.model :refer (merge! app])) | |
(defn greet [context] (e/info-dialog "Hello world" "This popup provided to you from a user script")) | |
(merge! @app | |
{:commands [{:element-id "lein-script-test/greeter" | |
:command-name "Hello from CCW"}] | |
:handlers [{:command "lein-script-test/greeter" | |
:contribution-URI "bundleclass://ccw.core/clojure/ccw.util.e4.model/handler-factory/lein-script-test/greet"}]})) |
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
(ns lein-script-test | |
(:require [ccw.util.eclipse :as e] | |
[ccw.util.e4.model.dsl :refer-all])) | |
(defn greet [context] (e/info-dialog "Hello world" "This popup provided to you from a user script")) | |
(deffragment | |
(defcommand greeter "Hello from CCW") | |
(defhandler greeter greet)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment