Skip to content

Instantly share code, notes, and snippets.

View lschuetze's full-sized avatar
Compiling

Lars Schütze lschuetze

Compiling
View GitHub Profile
<plugin>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-eclipserun-plugin</artifactId>
<!-- tested with 0.18 -->
<version>${tycho.version}</version>
<configuration>
<!-- linebreaks not permitted in this arg line -->
<appArgLine>-data target/workspace -application org.eclipse.emf.codegen.ecore.Generator -projects ${basedir} -model ${basedir}/model/my.genmodel target/generated-sources/emf</appArgLine>
<dependencies>
<dependency>
@lschuetze
lschuetze / part-of-pom
Last active August 29, 2015 14:22
Tycho upload update site
<properties>
<!-- Properties relative to the
distant host where to upload the repo -->
<scp.url>scp://${env.UPLOAD_USER}:${env.UPLOAD_PASS}@host.com</scp.url>
<scp.toDir>www/dir/on/the/server</scp.toDir>
<!-- Relative path to the repo being uploaded -->
<repo.path>${project.build.directory}/repository/</repo.path>
</properties>
<build>
<?xml version="1.0" encoding="UTF-8"?>
<archetype-catalog xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-catalog/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-catalog/1.0.0 http://maven.apache.org/xsd/archetype-catalog-1.0.0.xsd">
<archetypes>
<archetype>
<groupId>com.github.spring-mvc-archetypes</groupId>
<artifactId>spring-mvc-quickstart</artifactId>
<version>1.0.0</version>
<repository></repository>
@lschuetze
lschuetze / addNature.java
Created July 30, 2015 11:55
Add Xtext nature to Eclipse Project
public static void addNature(IProject project) throws CoreException {
if (!project.hasNature("org.eclipse.xtext.ui.shared.xtextNature")) {
IProjectDescription description = project.getDescription();
String[] prevNatures = description.getNatureIds();
String[] newNatures = new String[prevNatures.length + 1];
System.arraycopy(prevNatures, 0, newNatures, 0, prevNatures.length);
newNatures[prevNatures.length] = "org.eclipse.xtext.ui.shared.xtextNature";
description.setNatureIds(newNatures);
project.setDescription(description, null);
@lschuetze
lschuetze / build-with-profile.sbt
Last active November 30, 2018 09:26
Profiles with SBT (Scala Build Tool)
lazy val Profile = config("profile") extend(Runtime)
lazy val commonSettings = Seq(
organization := "organization",
version := "0.0.1",
scalaVersion := "2.12.0",
scalacOptions ++= Seq(
"-encoding", "utf8",
"-deprecation",
"-feature",
@lschuetze
lschuetze / ClassFile.java
Created November 8, 2018 14:11
generateBootstrapMethods adaptions
if (contentsEntries + localContentsOffset >= this.contents.length) {
resizeContents(contentsEntries);
}
char[] SIGNATURE = "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;II)Ljava/lang/invoke/CallSite;".toCharArray(); //$NON-NLS-1$
char[] NAME = "callNext".toCharArray(); //$NON-NLS-1$
MethodBinding callNext = objectTeamsCallNextBootstrap.getMethod(this.referenceBinding.scope, NAME);
if(indexForCallNext == 0) {
// The invokeDynamic bootstrap links a
// (BaseType, args*)RetType to (RoleType, args*)RetType
// where there are many different such RoleType which are inner classes of a TeamType
// On the stack we have an BaseType object and args*
// Iterate over all active Teams
while (teamIterator.hasNext()) {
ITeam currentTeam = teamIterator.next();
Class<?> teamClass = currentTeam.getClass();
#lang racket
#|
Thise file contains a simple implementation of Featherweight EpsilonJ as presented in the paper
Kamina T, Tamai T.
"A Smooth Combination of Role-based Language and Context Activation" FOAL 2010 Proceedings, 2010.
|#
[0.092s][trace][jfr,system] Starting a recording
[0.154s][debug][jfr,dcmd ] Executing DCmdStart: name=null, settings=[profile], delay=null, duration=null, disk=null, filename=bench.jfr, maxage=null, flush=null, maxsize=null, dumponexit =null, path-to-gc-roots=null
[0.249s][info ][jfr,system] Initialized disk repository
[0.296s][info ][jfr,system] Created native
[0.296s][debug][jfr,system] Recorder thread STARTED
[0.308s][info ][jfr,system] Adding forced instrumentation for event type jdk.SecurityPropertyModification during initial class load
[0.309s][info ][jfr,system,bytecode] Generated bytecode for class jdk.jfr.internal.handlers.EventHandler1783_1595847601509-15647
[0.315s][trace][jfr,system,bytecode] Bytecode:
// class version 52.0 (52)
// access flags 0x31