Skip to content

Instantly share code, notes, and snippets.

@ujhelyiz
ujhelyiz / toolchains.xml
Created Mar 6, 2017
Simple toolchains.xml used by Tycho
View toolchains.xml
<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 Dec 22, 2016
Measure the effects of profile indexer in Papyrus
View ProfileHelperMeasurements.java
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 Oct 3, 2016
Toolchain definition for VIATRA
View toolchains.xml
<?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 Mar 18, 2016
Updated domain model generator with Reflective editor
View GenerateDomainmodelLanguage.mwe2
/*******************************************************************************
* 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 Jun 22, 2016 — forked from szarnyasg/pom.xml
VIATRA Maven configuration
View pom.xml
<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 Aug 29, 2015
SSL issue in Eclipse
View 1. SSLTEST.java
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 Jul 4, 2014
Exception trace while scrolling with Zest.FX
View stacktrace.log
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)
View ObservableTest.java
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 Nov 29, 2012
Migrating EMF-IncQuery projects to 0.7.0
View new_project.xml
<?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>
View SchoolTestsModelManipulation.xtend
@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