Skip to content

Instantly share code, notes, and snippets.

@laurentpetit
Last active December 29, 2015 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laurentpetit/7697984 to your computer and use it in GitHub Desktop.
Save laurentpetit/7697984 to your computer and use it in GitHub Desktop.
Les 2 codes suivants sont strictement equivalents en termes de side-effects
(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"}]}))
(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