This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Currently type is checked against the name of each class directly | |
public Collection<EObject> getAllOfType(String type) throws EolModelElementTypeNotFoundException { | |
... | |
if (allOfType == null || !cachingEnabled){ | |
allOfType = new ArrayList<EObject>(); | |
for (EObject eObject : allContents()) { | |
if (eObject.eClass().getName().equals(type) || getFullyQualifiedName(eObject.eClass()).equals(type)){ | |
allOfType.add(eObject); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static org.junit.Assert.*; | |
import java.util.*; | |
import org.junit.*; | |
public class SellOneItemTest { | |
public static class Sale { | |
private Display display; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************************* | |
* Copyright (c) 2011 The University of York. | |
* 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 | |
* | |
* Contributors: | |
* Louis Rose - initial API and implementation | |
******************************************************************************/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example; | |
import java.io.IOException; | |
import java.net.URI; | |
import java.net.URISyntaxException; | |
import javax.servlet.ServletException; | |
import javax.servlet.ServletOutputStream; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example; | |
import java.io.IOException; | |
import java.net.URI; | |
import java.net.UnknownHostException; | |
import java.util.Set; | |
import java.util.logging.Logger; | |
import javax.servlet.ServletConfig; | |
import javax.servlet.ServletException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* <copyright> | |
* </copyright> | |
* | |
* $Id$ | |
*/ | |
package PetriNet.tests; | |
import PetriNet.Net; | |
import PetriNet.PetriNetFactory; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// diff --git a/plugins/org.eclipse.epsilon.eol.engine/src/org/eclipse/epsilon/eol/AbstractModule.java b/plugins/org.eclipse.epsilon.eol.engine/src/org/eclipse/epsilon/eol/AbstractModule.java | |
// index 20c1972..8a98273 100644 | |
//--- a/plugins/org.eclipse.epsilon.eol.engine/src/org/eclipse/epsilon/eol/AbstractModule.java | |
//+++ b/plugins/org.eclipse.epsilon.eol.engine/src/org/eclipse/epsilon/eol/AbstractModule.java | |
//@@ -69,7 +69,9 @@ public abstract class AbstractModule extends AbstractModuleElement implements IM | |
public boolean parse(String code, File file) throws Exception { | |
this.sourceFile = file; | |
- this.sourceUri = (file != null) ? file.toURI() : null; | |
+ if (file != null) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void run(IAction action) { | |
if (getFirstElementInSelection() instanceof IFile) { | |
final IFile file = (IFile)getFirstElementInSelection(); | |
String projectName = file.getProject().getName(); | |
final EglFileGeneratingTemplateFactory factory = new EglFileGeneratingTemplateFactory(); | |
final EglTemplate template = factory.load(Activator.getDefault().getBundle().getResource("transformations/my.egx").toURI()); | |
// You'll need to loop over the list returned by this method, and | |
// log any errors somewhere. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Widget_Controller extends Dev_Controller { | |
public function show() { | |
$params = $this->app->request()->params(); | |
// Here we use a "null object" that initialises all attributes to empty strings or other sensible defaults | |
$this->render(new Widget()); | |
} | |
public function create() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "State", | |
"properties": [ | |
"name", | |
"recurrent", | |
"w", | |
"h" | |
], | |
"behavior": { | |
"tick" : { |
OlderNewer