/******************************************************************************* * Copyright (c) 2015 QNX Software Systems 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 *******************************************************************************/ package org.eclipse.cdt.arduino.ui.internal.project; import org.eclipse.cdt.arduino.core.internal.remote.ArduinoRemoteConnection; import org.eclipse.core.expressions.PropertyTester; import org.eclipse.remote.core.IRemoteConnection; public class ArduinoPropertyTester extends PropertyTester { @Override public boolean test(Object receiver, String property, Object[] args, Object expectedValue) { if (receiver instanceof IRemoteConnection) { IRemoteConnection remote = (IRemoteConnection) receiver; return remote.hasService(ArduinoRemoteConnection.class); } else { return false; } } }