blob: edcb4c8488c8db8c7dccb061192d3d794f09bf71 [file] [log] [blame]
/**********************************************************************
* Copyright (c) 2003, 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
 *
* Contributors:
* IBM - Initial API and implementation
**********************************************************************/
package org.eclipse.wst.server.ui.internal;
import org.eclipse.core.expressions.PropertyTester;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.ServerUtil;
/**
*
*/
public class ServerPropertyTester extends PropertyTester {
/* (non-Javadoc)
* @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
*/
public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
try {
IModule module = ServerUtil.getModule(receiver, false);
return (module != null);
} catch (Exception e) {
return true;
}
}
}