| /******************************************************************************* |
| * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro |
| * 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: |
| * Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation |
| *******************************************************************************/ |
| |
| package org.eclipse.viatra2.framework.properties; |
| |
| import java.util.Set; |
| |
| /** |
| * |
| * @author Istvan Rath |
| * |
| */ |
| public interface IViatraPropertyProvider { |
| |
| /** |
| * True, if this property provider belongs to an active plugin. False, if |
| * it's just provided by the framework for holding property data for |
| * non-present property provider plugins. |
| * |
| * Note: only active property providers are displayed on the GUI. |
| */ |
| public boolean isActive(); |
| |
| /** |
| * Returns the unique provider ID of this provider. |
| */ |
| public String getProviderID(); |
| |
| /** |
| * Sets the actual value of the given property. |
| */ |
| public void setProperty(String id, String val); |
| |
| /** |
| * Returns the actual value of the given property; |
| */ |
| public String getProperty(String id); |
| |
| /** |
| * Gets the property kind used for display (INTEGER,STRING,BOOLEAN,PATH, |
| * etc). |
| */ |
| public VIATRAPropertyKind getPropertyKind(String id); |
| |
| /** |
| * Returns the default value for a given property. |
| */ |
| public String getDefaultPropertyValue(String id); |
| |
| /** |
| * Returns a set of string id's for all properties which this provider wants |
| * to support. |
| */ |
| public Set<String> getAllPropertyIds(); |
| |
| /** |
| * Add a property changed listener to this provider. |
| */ |
| public void addListener(IViatraPropertyChangedListener l); |
| |
| /** |
| * Removes a property changed listener from this provider. |
| */ |
| public void removeListener(IViatraPropertyChangedListener l); |
| |
| } |