001: /*******************************************************************************
002: * Copyright (c) 2000, 2006 IBM Corporation and others.
003: * All rights reserved. This program and the accompanying materials
004: * are made available under the terms of the Eclipse Public License v1.0
005: * which accompanies this distribution, and is available at
006: * http://www.eclipse.org/legal/epl-v10.html
007: *
008: * Contributors:
009: * IBM Corporation - initial API and implementation
010: *******************************************************************************/package org.eclipse.ui;
011:
012: /**
013: * Describes the public attributes for a resource and the acceptable values
014: * each may have.
015: * <p>
016: * A popup menu extension may use these constants to describe its object target.
017: * Each identifies an attribute name or possible value.
018: * <p>
019: * Clients are not expected to implement this interface.
020: * </p>
021: *
022: * @see org.eclipse.ui.IActionFilter
023: */
024: public interface IResourceActionFilter extends IActionFilter {
025: /**
026: * An attribute indicating the file name (value <code>"name"</code>).
027: * The attribute value in xml is unconstrained. "*" may be used at the start or
028: * the end to represent "one or more characters".
029: */
030: public static final String NAME = "name"; //$NON-NLS-1$
031:
032: /**
033: * An attribute indicating the file extension (value <code>"extension"</code>).
034: * The attribute value in xml is unconstrained.
035: */
036: public static final String EXTENSION = "extension"; //$NON-NLS-1$
037:
038: /**
039: * An attribute indicating the file path (value <code>"path"</code>).
040: * The attribute value in xml is unconstrained. "*" may be used at the start or
041: * the end to represent "one or more characters".
042: */
043: public static final String PATH = "path"; //$NON-NLS-1$
044:
045: /**
046: * An attribute indicating whether the file is read only (value <code>"readOnly"</code>).
047: * The attribute value in xml must be one of <code>"true" or "false"</code>.
048: */
049: public static final String READ_ONLY = "readOnly"; //$NON-NLS-1$
050:
051: /**
052: * An attribute indicating the project nature (value <code>"projectNature"</code>).
053: * The attribute value in xml is unconstrained.
054: */
055: public static final String PROJECT_NATURE = "projectNature"; //$NON-NLS-1$
056:
057: /**
058: * An attribute indicating a persistent property on the selected resource
059: * (value <code>"persistentProperty"</code>).
060: * If the value is a simple string, then this simply tests for existence of the property on the resource.
061: * If it has the format <code>"propertyName=propertyValue" this obtains the value of the property
062: * with the specified name and tests it for equality with the specified value.
063: */
064: public static final String PERSISTENT_PROPERTY = "persistentProperty"; //$NON-NLS-1$
065:
066: /**
067: * An attribute indicating a persistent property on the selected resource's project.
068: * (value <code>"projectPersistentProperty"</code>).
069: * If the value is a simple string, then this simply tests for existence of the property on the resource.
070: * If it has the format <code>"propertyName=propertyValue" this obtains the value of the property
071: * with the specified name and tests it for equality with the specified value.
072: */
073: public static final String PROJECT_PERSISTENT_PROPERTY = "projectPersistentProperty"; //$NON-NLS-1$
074:
075: /**
076: * An attribute indicating a session property on the selected resource
077: * (value <code>"sessionProperty"</code>).
078: * If the value is a simple string, then this simply tests for existence of the property on the resource.
079: * If it has the format <code>"propertyName=propertyValue" this obtains the value of the property
080: * with the specified name and tests it for equality with the specified value.
081: */
082: public static final String SESSION_PROPERTY = "sessionProperty"; //$NON-NLS-1$
083:
084: /**
085: * An attribute indicating a session property on the selected resource's project.
086: * (value <code>"projectSessionProperty"</code>).
087: * If the value is a simple string, then this simply tests for existence of the property on the resource.
088: * If it has the format <code>"propertyName=propertyValue" this obtains the value of the property
089: * with the specified name and tests it for equality with the specified value.
090: */
091: public static final String PROJECT_SESSION_PROPERTY = "projectSessionProperty"; //$NON-NLS-1$
092:
093: /**
094: * An attribute indicating that this is an xml file
095: * and we should ensure that the first tag (or top-level
096: * tag) has this name.
097: * @since 3.0
098: * @deprecated Please use content types instead.
099: */
100: public static final String XML_FIRST_TAG = "xmlFirstTag"; //$NON-NLS-1$
101:
102: /**
103: * An attribute indicating that this is an xml file and we should ensure that the DTD
104: * definition in this xml file is the value supplied with this attribute.
105: * @since 3.0
106: * @deprecated Please use content types instead.
107: */
108: public static final String XML_DTD_NAME = "xmlDTDName"; //$NON-NLS-1$
109:
110: /**
111: * An attribute indicating that this is a file, and we are looking to verify
112: * that the file matches the content type matching the given identifier.
113: * The identifier is provided in the value.
114: * @since 3.0
115: */
116: public static final String CONTENT_TYPE_ID = "contentTypeId"; //$NON-NLS-1$
117: }
|