|
Eclipse Platform Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.compare.ZipFileStructureCreator
This implementation of the IStructureCreator interface makes the contents of a zip archive available as a hierarchical structure of IStructureComparators.
It is used when comparing the internal structure of a zip archive.
Constructor Summary | |
ZipFileStructureCreator()
Create a new ZipFileStructureCreator. | |
ZipFileStructureCreator(String title)
Create a new ZipFileStructureCreator with the given title. |
Method Summary | |
boolean | canRewriteTree()
Returns false since this IStructureCreator cannot rewrite the diff tree in order to fold certain combinations of additons and deletions. |
boolean | canSave()
Returns false since we cannot update a zip archive. |
String | getContents(Object o,
boolean ignoreWhitespace)
Returns the contents of the given node as a string for the purpose of performing a content comparison only (that is the string will not be visible in the UI). |
String | getName()
Returns a descriptive name which can be used in the UI of the StructureDiffViewer. |
IStructureComparator | getStructure(Object input)
Creates a tree structure consisting of IStructureComparators from the given object and returns its root object. |
IStructureComparator | locate(Object path,
Object source)
Creates the single node specified by path from the given input object. |
void | rewriteTree(Differencer diff,
IDiffContainer root)
Empty implementation since this IStructureCreator cannot rewrite the diff tree in order to fold certain combinations of additons and deletions. |
void | save(IStructureComparator structure,
Object input)
Called whenever a copy operation has been performed on a tree node. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ZipFileStructureCreator()
public ZipFileStructureCreator(String title)
Method Detail |
public String getName()
public IStructureComparator getStructure(Object input)
public String getContents(Object o, boolean ignoreWhitespace)
public boolean canSave()
public void save(IStructureComparator structure, Object input)
public IStructureComparator locate(Object path, Object source)
One (not optimized) approach to implement this method is calling getStructure(input) to build the full tree, and then finding that node within the tree that is specified by path.
The syntax of path is not specified, because it is treated by the compare subsystem as an opaque entity and is not further interpreted. Clients using this functionality will pass a value of path to the selectEdition method of ReplaceWithEditionDialog and will receive this value unchanged as an argument to locate.
public boolean canRewriteTree()
Note: this method is for internal use only. Clients should not call this method.
public void rewriteTree(Differencer diff, IDiffContainer root)
Note: this method is for internal use only. Clients should not call this method.
|
Eclipse Platform Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.