Package com.iizigo.fileexts
Class PropertiesFileContentDescriber
- java.lang.Object
- com.iizigo.fileexts.PropertiesFileContentDescriber
- All Implemented Interfaces:
org.eclipse.core.runtime.content.IContentDescriber
- Direct Known Subclasses:
ContextMenuFileContentDescriber
,FontFacesFileContentDescriber
,PanelFileContentDescriber
,StyleFileContentDescriber
public abstract class PropertiesFileContentDescriber extends java.lang.Object implements org.eclipse.core.runtime.content.IContentDescriber
The content describer for the property files. The properties file must have the following format and cannot a contain comment text before the first line:[?xml version="1.0" encoding="UTF-8" standalone="no"?] [UIPanel name="customers"]
- Author:
- Christopher Mindus
Constructor Summary
Constructors Constructor Description PropertiesFileContentDescriber()
The constructor.
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description int
describe(java.io.InputStream contents, org.eclipse.core.runtime.content.IContentDescription description)
Tries to fill a description for the given contents.org.eclipse.core.runtime.QualifiedName[]
getSupportedOptions()
Returns the properties supported by this describer.protected abstract java.lang.String[]
getTags()
Gets the list of tags names that is the content can process.
Method Detail
getTags
protected abstract java.lang.String[] getTags()
Gets the list of tags names that is the content can process. See the file "com.iizix.schema.base-properties.xml" for the tag names.- Returns:
- The array of supported tags.
getSupportedOptions
public org.eclipse.core.runtime.QualifiedName[] getSupportedOptions()
Returns the properties supported by this describer.- Specified by:
getSupportedOptions
in interfaceorg.eclipse.core.runtime.content.IContentDescriber
- Returns:
- the supported properties
- See Also:
describe(java.io.InputStream, org.eclipse.core.runtime.content.IContentDescription)
describe
public int describe(java.io.InputStream contents, org.eclipse.core.runtime.content.IContentDescription description) throws java.io.IOException
Tries to fill a description for the given contents. Returns anint
indicating whether the given stream of bytes represents a valid sample for its corresponding content type. If no content description is provided, this method should perform content type validation.The input stream must be kept open, and any IOExceptions while reading the stream should flow to the caller.
- Specified by:
describe
in interfaceorg.eclipse.core.runtime.content.IContentDescriber
- Parameters:
contents
- the contents to be examineddescription
- a description to be filled in, ornull
if only content type validation is to be performed- Returns:
- one of the following:
VALID
,INVALID
,INDETERMINATE
- Throws:
java.io.IOException
- if an I/O error occurs- See Also:
IContentDescription
,IContentDescriber.VALID
,IContentDescriber.INVALID
,IContentDescriber.INDETERMINATE