Skip to content

Instantly share code, notes, and snippets.

@ujhelyiz
ujhelyiz / toolchains.xml
Created March 6, 2017 09:34
Simple toolchains.xml used by Tycho
<toolchains>
<toolchain>
<type>jdk</type>
<provides>
<id>J2SE-1.5</id>
</provides>
<configuration>
<jdkHome>/opt/public/common/jdk1.5.0-latest/jre</jdkHome>
</configuration>
</toolchain>
@ujhelyiz
ujhelyiz / ProfileHelperMeasurements.java
Created December 22, 2016 14:40
Measure the effects of profile indexer in Papyrus
package org.eclipse.papyrus.uml.profile.measures;
import java.util.ArrayList;
import java.util.Collection;
import java.util.concurrent.TimeUnit;
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
@ujhelyiz
ujhelyiz / toolchains.xml
Last active October 3, 2016 14:54
Toolchain definition for VIATRA
<?xml version="1.0" encoding="UTF-8"?>
<toolchains>
<toolchain>
<type>jdk</type>
<provides>
<!-- The ID has to be exactly in this format -->
<id>JavaSE-1.7</id>
</provides>
<configuration>
<!-- Path to JDK; JRE will not work! -->
@ujhelyiz
ujhelyiz / GenerateDomainmodelLanguage.mwe2
Created March 18, 2016 19:17
Updated domain model generator with Reflective editor
/*******************************************************************************
* Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
module org.eclipse.xtext.example.domainmodel.GenerateDomainmodelLanguage
import org.eclipse.emf.mwe.utils.*
@ujhelyiz
ujhelyiz / pom.xml
Last active June 22, 2016 06:44 — forked from szarnyasg/pom.xml
VIATRA Maven configuration
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>hu.bme.mit.viatra</groupId>
<artifactId>viatra-maven</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.eclipse.viatra</groupId>
@ujhelyiz
ujhelyiz / 1. SSLTEST.java
Last active August 29, 2015 14:20
SSL issue in Eclipse
package test;
import java.io.DataInputStream;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@ujhelyiz
ujhelyiz / stacktrace.log
Created July 4, 2014 11:38
Exception trace while scrolling with Zest.FX
Exception in thread "JavaFX Application Thread" java.lang.StackOverflowError
at javafx.scene.Parent.updateCachedBounds(Parent.java:1598)
at javafx.scene.Parent.recomputeBounds(Parent.java:1537)
at javafx.scene.Parent.impl_computeGeomBounds(Parent.java:1388)
at javafx.scene.Node.updateGeomBounds(Node.java:3526)
at javafx.scene.Node.getGeomBounds(Node.java:3479)
at javafx.scene.Node.getLocalBounds(Node.java:3427)
at javafx.scene.Node.updateTxBounds(Node.java:3590)
at javafx.scene.Node.getTransformedBounds(Node.java:3373)
at javafx.scene.Parent.updateCachedBounds(Parent.java:1598)
import java.util.HashSet;
import java.util.Set;
import org.eclipse.core.databinding.observable.Realm;
import org.eclipse.core.databinding.observable.set.ComputedSet;
import org.eclipse.core.databinding.observable.set.IObservableSet;
import org.eclipse.core.databinding.observable.set.ISetChangeListener;
import org.eclipse.core.databinding.observable.set.SetChangeEvent;
import org.eclipse.core.databinding.observable.set.UnionSet;
import org.eclipse.core.databinding.observable.set.WritableSet;
@ujhelyiz
ujhelyiz / new_project.xml
Created November 29, 2012 14:10
Migrating EMF-IncQuery projects to 0.7.0
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.eclipse.viatra2.emf.incquery.testing.core</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
@Test
def changeSchoolName(){
val sns = snapshot
val pm = queryInputEIQ
pm.assertMatchResults(sns)
// MODEL MODIFICATION HERE
// change the School "Budapest University of Technology and Economics" name to "BME"
val matcher = pm.initializeMatcherFromModel(sns.EMFRootForSnapshot, "school.schools")
val s = matcher.oneArbitraryMatch.get("Sch") as School