|
Eclipse Platform Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An extension to the IStructureCreator
interface that supports the
use of shared documents.
This interface is not intended to be implemented by clients. Client should instead
subclass StructureCreator
.
Method Summary | |
---|---|
ITypedElement |
createElement(Object element,
Object input,
IProgressMonitor monitor)
Creates the single node specified by path from the given input object. |
IStructureComparator |
createStructure(Object input,
IProgressMonitor monitor)
Creates a tree structure consisting of IStructureComparator s
from the given object and returns its root object. |
void |
destroy(Object object)
Release any resources associated with the given object. |
Methods inherited from interface org.eclipse.compare.structuremergeviewer.IStructureCreator |
---|
getContents, getName, getStructure, locate, save |
Method Detail |
public IStructureComparator createStructure(Object input, IProgressMonitor monitor) throws CoreException
IStructureComparator
s
from the given object and returns its root object. Implementing this
method typically involves parsing the input object. In case of an error
(e.g. a parsing error) the value null
is returned.
This method is equivalent to
IStructureCreator.getStructure(Object)
with the exception that
the destroy(Object)
method must be called with the returned
comparator as a parameter when the comparator is no longer
needed. This is done to allow structure creators
to make use of shared resources such a file buffer.
Also, the node returned from this method should adapt to an
ISharedDocumentAdapter
if the provided input has
a shared document adapter and it is being used by the
this creator. The convenience class SharedDocumentAdapterWrapper
is provided to allow the creator to wrap the adapter of the input
so that the proper key can be returned.
input
- the object from which to create the tree of
IStructureComparator
monitor
- a progress monitor or null
if progress and cancelation is not required
null
in case of
error
CoreException
IStructureCreator.getStructure(Object)
,
destroy(Object)
public ITypedElement createElement(Object element, Object input, IProgressMonitor monitor) throws CoreException
IStructureCreator.locate(Object, Object)
with the exception that
the destroy(Object)
method must be called with the returned
element as a parameter when the element is no longer
needed. This is done to allow structure creators
to make use of shared resources such a file buffer.
element
- specifies a sub object within the input objectinput
- the object from which to create the
ITypedElement
monitor
- a progress monitor or null
if progress is not desired
path
or
null
CoreException
- if an error occurs while parsing the inputIStructureCreator.locate(Object, Object)
,
destroy(Object)
public void destroy(Object object)
createStructure(Object, IProgressMonitor)
or
createElement(Object, Object, IProgressMonitor)
.
object
- the object to be destroyedcreateElement(Object, Object, IProgressMonitor)
,
createStructure(Object, IProgressMonitor)
|
Eclipse Platform Release 3.3 |
|||||||||||
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, 2007. All rights reserved.