Skip to content

Instantly share code, notes, and snippets.

View laurentpetit's full-sized avatar

Laurent Petit laurentpetit

View GitHub Profile
This file has been truncated, but you can view the full file.
// Compiled from eclipse.clj (version 1.5 : 49.0, super bit)
public final class ccw.eclipse$goto_editor_line extends clojure.lang.AFunction {
// Field descriptor #7 Lclojure/lang/Var;
public static final clojure.lang.Var const__0;
// Field descriptor #9 Ljava/lang/Object;
public static final java.lang.Object const__1;
Here's what we get with a modified version of Clojure including stack traces:
at clojure.lang.RestFn.invoke(RestFn.java:408)
at ccw.core.factories$handler_factory.invoke(factories.clj:10)
at clojure.lang.Var.invoke(Var.java:379)
at ccw.util.GenericExecutableExtension$1.run(GenericExecutableExtension.java:28)
at ccw.util.osgi.ClojureOSGi.withBundle(ClojureOSGi.java:71)
... 47 more
Caused by: java.lang.RuntimeException: exception while compiling classccw/eclipse$goto_editor_line
at clojure.lang.Compiler$ObjExpr.compile(Compiler.java:4453)
@laurentpetit
laurentpetit / gist:46917696afae0ecbdcf1
Last active August 29, 2015 14:11
CCW User Plugin for Integrating Eastwood with Counterclockwise
moved here: https://github.com/laurentpetit/ccw-plugin-eastwood
@laurentpetit
laurentpetit / gist:b93f3800fd5c45ba221b
Created December 11, 2014 15:31
Eclipse Markers contribution does not dynamically react to Registry Extension additions, here's how to circumvent this:
;; the markers definitions are cached in the cache field of the MarkerManager instance
;; the MarkerTypeDefinitionCache constructor gets the marker extensions from the registry
(let [mm (.getMarkerManager (e/workspace))
cache-field (.getDeclaredField org.eclipse.core.internal.resources.MarkerManager "cache")
new-cache (org.eclipse.core.internal.resources.MarkerTypeDefinitionCache.)]
(.setAccessible cache-field true)
(.set cache-field mm new-cache))
@laurentpetit
laurentpetit / gist:2004c6c0b937065cfec2
Created November 15, 2014 13:35
maven stacktrace after trying to build voclipse
[INFO] Fetching org.eclipse.ui.intro.universal_3.2.800.v20140805-1205.jar from http://download.vogella.com/p2/C-MASTER-eclipse.platform.releng.aggregator/lastStable/archive/eclipse.platform.releng.tychoeclipsebuilder/sdk/target/repository/plugins/ (1,07MB of 1,56MB at 172,02kB/s)
[INFO] Fetching org.eclipse.ui.intro.universal_3.2.800.v20140805-1205.jar from http://download.vogella.com/p2/C-MASTER-eclipse.platform.releng.aggregator/lastStable/archive/eclipse.platform.releng.tychoeclipsebuilder/sdk/target/repository/plugins/ (1,2MB of 1,56MB at 163,14kB/s)
[ERROR] An error occurred while transferring artifact canonical: osgi.bundle,org.eclipse.ui.intro.universal,3.2.800.v20140805-1205 from repository http://download.vogella.com/p2/C-MASTER-eclipse.platform.releng.aggregator/lastStable/archive/eclipse.platform.releng.tychoeclipsebuilder/sdk/target/repository:
[ERROR] Unable to read repository at http://download.vogella.com/p2/C-MASTER-eclipse.platform.releng.aggregator/lastStable/archive/eclipse.platform.rele
@laurentpetit
laurentpetit / mutabots.clj
Last active May 12, 2021 23:21 — forked from cgrand/mutabots.clj
Reimplementation of transducers, in terms of processing functions instead of reducing functions. WIP.
(ns mutabots
"Reimplementation of transducers, in terms of processing functions instead
of reducing functions.
tl;dr: reducing-fn based transducers are a special case, influenced by reducers,
of processing-fn based transducers.
In Clojure 1.7.0-alpha2, transducers are expressed in terms of the existing
concept of reducing functions.
To sum it up, a transducer has currently the signature :
@laurentpetit
laurentpetit / gist:417e7b2f7000e8084377
Created August 28, 2014 16:12
SWT invalid access while invoking IJavaProject.findElement() method!
org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4397)
at org.eclipse.swt.SWT.error(SWT.java:4312)
at org.eclipse.swt.SWT.error(SWT.java:4283)
at org.eclipse.swt.widgets.Display.error(Display.java:1258)
at org.eclipse.swt.widgets.Display.checkDevice(Display.java:764)
at org.eclipse.swt.widgets.Display.disposeExec(Display.java:1203)
at org.eclipse.jface.resource.ColorRegistry.hookDisplayDispose(ColorRegistry.java:268)
at org.eclipse.jface.resource.ColorRegistry.<init>(ColorRegistry.java:123)
at org.eclipse.jface.resource.ColorRegistry.<init>(ColorRegistry.java:106)
@laurentpetit
laurentpetit / lein_headless.clj
Created May 6, 2014 20:38
User plugin for expliciting starting a leiningen project from an editor or from a selected file/project.
(ns lein-headless
(:require [ccw.e4.dsl :refer [defcommand defhandler defkeybinding]]
[ccw.e4.model :refer [context-key]])
(:import [ccw.launching ClojureLaunchShortcut]))
(defn run
"Try to start a Leiningen Project. If focus is on a ClojureEditor, then first
try to launch from the editor project, else try to launch from the selection."
[context]
(let [editor (context-key context org.eclipse.ui.IEditorPart)]
!SESSION 2014-03-06 23:54:59.593 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_45
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=fr_FR
Command-line arguments: -os win32 -ws win32 -arch x86
!ENTRY org.eclipse.update.configurator 4 0 2014-03-06 23:55:01.734
!MESSAGE Could not install bundle plugins/ccw.branding_0.24.0.travis000247-master-gite431377cc3458caf1707a42436f36c53488b15d0.jar Bundle "ccw.branding" version "0.24.0.travis000247-master-gite431377cc3458caf1707a42436f36c53488b15d0" has already been installed from: reference:file:plugins/ccw.branding_0.24.0.travis000247-master-gite431377cc3458caf1707a42436f36c53488b15d0.jar
; constraint inside componenents
{:type :composite
:children [ {:type :label
:id :project-label
:text "Project name:"}
{:type :text
:id :project-name
:text ""
:form-data {:left {:control :project-label}}}