Skip to content

Instantly share code, notes, and snippets.

View laurentpetit's full-sized avatar

Laurent Petit laurentpetit

View GitHub Profile
!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
@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)]
@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 / 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 / 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: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
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)
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;
// Field descriptor #7 Lclojure/lang/Var;
> // Field descriptor #9 Ljava/lang/Class;
> private static java.lang.Class __cached_class__0;
>
15c18
< 1 invokespecial clojure.lang.AFunction() [10]
---
> 1 invokespecial clojure.lang.AFunction() [12]
20c23
< // Method descriptor #12 (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
---
@laurentpetit
laurentpetit / gist:fb86ea923dfb02e673da
Created May 9, 2015 18:54
Execution times for Counterclockwise dependencies. Execution times are written down depth-first.
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"