|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.microsoft.tfs.core.externaltools.ExternalToolAssociation
public final class ExternalToolAssociation
Associates one or more file extension strings with an ExternalTool.
Extensions always have whitespace trimmed and are compared case-insensitive.
| Constructor Summary | |
|---|---|
ExternalToolAssociation(java.lang.String[] extensions,
ExternalTool tool)
Creates a ExternalToolAssociation that associates the given
extensions with the given tool. |
|
| Method Summary | |
|---|---|
void |
clearExtensions()
Clears the extensions in this association. |
boolean |
containsExtension(java.lang.String fileExtension)
Tests whether this ExternalToolAssociation contains the given
extension. |
java.lang.String[] |
getExtensions()
|
ExternalTool |
getTool()
|
static ExternalToolAssociation |
loadFromMemento(Memento memento)
Loads association state from the given Memento, which can have
any name. |
boolean |
putExtension(java.lang.String extension)
Adds an extension to the set of file extensions, if it did not already exist in the set. |
boolean |
putExtensions(java.lang.String[] extensions)
Adds all the given file extensions, if they did not already exist in the set. |
void |
saveToMemento(Memento memento)
Saves this association's state to the given Memento, which should
have a name (of the caller's choice) but no other data. |
void |
setTool(ExternalTool tool)
Sets the ExternalTool. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExternalToolAssociation(java.lang.String[] extensions,
ExternalTool tool)
ExternalToolAssociation that associates the given
extensions with the given tool.
extensions - the extension (may be null or empty; elements not
null, or empty string, or all whitespace)tool - the tool (may be null)| Method Detail |
|---|
public boolean putExtension(java.lang.String extension)
extension - the extension to add (not null, not empty, not all
whitespace)
public boolean putExtensions(java.lang.String[] extensions)
extensions - the extensions to add (may be null or empty; elements
not null, or empty string, or all whitespace)
putExtension(String)public java.lang.String[] getExtensions()
public void clearExtensions()
public void setTool(ExternalTool tool)
ExternalTool.
tool - the ExternalTool, may be nullpublic ExternalTool getTool()
ExternalTool, may be nullpublic boolean containsExtension(java.lang.String fileExtension)
ExternalToolAssociation contains the given
extension.
fileExtension - the file extension (must not be null)
public void saveToMemento(Memento memento)
Memento, which should
have a name (of the caller's choice) but no other data.
memento - the Memento to save this association's state to (must not
be null)public static ExternalToolAssociation loadFromMemento(Memento memento)
Memento, which can have
any name.
memento - the Memento to load state from (must not be
null)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||