| /******************************************************************************* |
| * Copyright (c) 2014-2016 Akos Horvath, Abel Hegedus, Akos Menyhert, Zoltan Ujhelyi, IncQuery Labs Ltd. |
| * This program and the accompanying materials are made available under the |
| * terms of the Eclipse Public License v. 2.0 which is available at |
| * http://www.eclipse.org/legal/epl-v20.html. |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| *******************************************************************************/ |
| package org.eclipse.viatra.examples.cps.model.viewer |
| |
| import "http://org.eclipse.viatra/model/cps" |
| |
| @Item(item = host, label = "$host.identifier$") |
| @Format(color = "#CC6600", textColor = "#000000") |
| pattern allHostInstances(host : HostInstance) { |
| HostInstance(host); |
| } |
| |
| @Item(item = app, label = "$app.identifier$") |
| @Format(color = "#996600", textColor = "#000000") |
| pattern appInstancesWithAllocation(app : ApplicationInstance) { |
| ApplicationInstance(app); |
| ApplicationInstance.allocatedTo(app, _); |
| } |
| |
| @Item(item = app, label = "$app.identifier$") |
| @Format(color = "#FF0000", textColor = "#000000") |
| pattern appInstancesNoAllocation(app : ApplicationInstance) { |
| ApplicationInstance(app); |
| neg find appInstancesWithAllocation(app); |
| } |
| |
| @Edge(source = host, target = app, label = "$app.identifier$ - $host.identifier$") |
| pattern connectAppAndHost(app : ApplicationInstance, host : HostInstance) { |
| ApplicationInstance.allocatedTo(app, host); |
| } |