|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Plugins who wish to interact with Pliny should implement this interface. See the extension point defined by the Pliny Plugin 'resourceExtensionProcessor'.
The interface makes it possible for Pliny to do several things with the the implementor:
canHandleObject
processDrop
makeMyResource
getSource
getContentFigure
Which IResourceExtensionProcessor to use is determined by the resource's
ObjectType
. Thus, the implementor must
identify which resource type he is for by providing it through method
getMyObjectType
AbstractResourceExtensionProcessor
which provides some useful common code to support drop processing.
Nested Class Summary | |
static class |
IResourceExtensionProcessor.CacheElement
|
Method Summary | |
boolean |
canHandleObject(Object data)
tests an object that has been dropped onto an ObjectType folder within the Resource Explorer to see if this object can process it. |
IResourceExtensionProcessor.CacheElement[] |
getCacheElements(Resource r)
provides access to cache data you want stored in the pliny archive file. |
org.eclipse.draw2d.IFigure |
getContentFigure(Resource resource)
return an IFigure object that can be used to provide a 'content' display by Pliny. |
ObjectType |
getMyObjectType()
provides the ObjectType that this Processor is for. |
IResourceExtensionProcessorSource |
getSource()
return an appropriate instance of IResourceExtensionProcessorSource. |
Resource |
makeMyResource()
generate an empty instance of the appropriate Resource class that this plugin expects to use for its Resources. |
void |
processArchiveEntries(IGetsArchiveEntries archive,
Resource r)
provides a way for the Pliny archive importer to give your access to data from its archive that you will want to store in a local cache. |
boolean |
processDrop(org.eclipse.swt.dnd.DropTargetEvent event)
processes an object that has been dropped onto an ObjectType folder within the Resource Explorer. |
void |
setViewPart(org.eclipse.ui.part.ViewPart myViewPart)
Pliny's Resource Explorer will make its ViewPart available to the implementor of this interface by calling this method at the time that this processor is setup by the Explorer. |
Method Detail |
public void setViewPart(org.eclipse.ui.part.ViewPart myViewPart)
myViewPart
- public ObjectType getMyObjectType()
public boolean processDrop(org.eclipse.swt.dnd.DropTargetEvent event)
DropTargetEvent
.
event
- public boolean canHandleObject(Object data)
data
field in
the DropTargetEvent
.
data
- public Resource makeMyResource()
true
, e.g. new Resource(true)
). This is because
this method is invoked on pre-existing DB resource data, and the caller
within Pliny will
fill data that has already been read from the DB into this created instance.
PlinyXMLImporter
public IResourceExtensionProcessorSource getSource()
public org.eclipse.draw2d.IFigure getContentFigure(Resource resource)
resource
- the Resource the IFigure should be about.public IResourceExtensionProcessor.CacheElement[] getCacheElements(Resource r)
public void processArchiveEntries(IGetsArchiveEntries archive, Resource r) throws PlinyImportException
Once the archive reader has invoked your caching code through this
method, your code can request data for caching by calling
IGetsArchiveEntries.getArchiveEntry(java.lang.String)
archive
- IGetsArchiveEntries archive process that can provide you
with access to input streams from the archive containing the data you want
to put in the cache.r
- Resource the cache data should belong to.
PlinyImportException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |