Skip to content

Instantly share code, notes, and snippets.


Laurent Petit laurentpetit

View GitHub Profile
View .log
!SESSION 2014-03-06 23:54:59.593 -----------------------------------------------
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
laurentpetit / lein_headless.clj
Created May 6, 2014
User plugin for expliciting starting a leiningen project from an editor or from a selected file/project.
View lein_headless.clj
(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."
(let [editor (context-key context org.eclipse.ui.IEditorPart)]
laurentpetit / gist:417e7b2f7000e8084377
Created Aug 28, 2014
SWT invalid access while invoking IJavaProject.findElement() method!
View gist:417e7b2f7000e8084377
org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(
at org.eclipse.swt.SWT.error(
at org.eclipse.swt.SWT.error(
at org.eclipse.swt.widgets.Display.error(
at org.eclipse.swt.widgets.Display.checkDevice(
at org.eclipse.swt.widgets.Display.disposeExec(
at org.eclipse.jface.resource.ColorRegistry.hookDisplayDispose(
at org.eclipse.jface.resource.ColorRegistry.<init>(
at org.eclipse.jface.resource.ColorRegistry.<init>(
laurentpetit / gist:2004c6c0b937065cfec2
Created Nov 15, 2014
maven stacktrace after trying to build voclipse
View gist:2004c6c0b937065cfec2
[INFO] Fetching org.eclipse.ui.intro.universal_3.2.800.v20140805-1205.jar from (1,07MB of 1,56MB at 172,02kB/s)
[INFO] Fetching org.eclipse.ui.intro.universal_3.2.800.v20140805-1205.jar from (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
[ERROR] Unable to read repository at
laurentpetit / gist:b93f3800fd5c45ba221b
Created Dec 11, 2014
Eclipse Markers contribution does not dynamically react to Registry Extension additions, here's how to circumvent this:
View gist:b93f3800fd5c45ba221b
;; 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 / gist:46917696afae0ecbdcf1
Last active Aug 29, 2015
CCW User Plugin for Integrating Eastwood with Counterclockwise
View gist:46917696afae0ecbdcf1
moved here:
View gist:cc86d7ed873fb1479f78
Here's what we get with a modified version of Clojure including stack traces:
at clojure.lang.RestFn.invoke(
at ccw.core.factories$handler_factory.invoke(factories.clj:10)
at clojure.lang.Var.invoke(
at ccw.util.GenericExecutableExtension$
at ccw.util.osgi.ClojureOSGi.withBundle(
... 47 more
Caused by: java.lang.RuntimeException: exception while compiling classccw/eclipse$goto_editor_line
at clojure.lang.Compiler$ObjExpr.compile(
View gist:dd2da51372ced23b1d42
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;
View gist:4ccd78d01b8aead90f04
> // Field descriptor #9 Ljava/lang/Class;
> private static java.lang.Class __cached_class__0;
< 1 invokespecial clojure.lang.AFunction() [10]
> 1 invokespecial clojure.lang.AFunction() [12]
< // Method descriptor #12 (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
laurentpetit / gist:fb86ea923dfb02e673da
Created May 9, 2015
Execution times for Counterclockwise dependencies. Execution times are written down depth-first.
View gist:fb86ea923dfb02e673da
Execution time: 32ms for LOADING "core_proxy"
Execution time: 130ms for LOADING "core_print"
Execution time: 37ms for LOADING "genclass"
Execution time: 65ms for LOADING "core_deftype"
Execution time: 73ms for LOADING "core/protocols"
Execution time: 41ms for LOADING "gvec"
Execution time: 59ms for LOADING "instant"
Execution time: 21ms for LOADING "uuid"
Execution time: 45ms for LOADING "/clojure/string"
Execution time: 160ms for LOADING "/clojure/java/io"