|
Eclipse Platform Release 3.2 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.team.ui.SaveablePartAdapter
org.eclipse.team.ui.PageSaveablePart
org.eclipse.team.ui.synchronize.ParticipantPageSaveablePart
Displays a synchronize participant page combined with the compare/merge infrastructure. This only works if the
synchronize page viewer provides selections that are of the following types: ITypedElement and ICompareInput
or if the participant is a ModelSynchronizeParticipant.
| Field Summary |
|---|
| Fields inherited from interface org.eclipse.team.ui.ISaveableWorkbenchPart |
|---|
PROP_DIRTY |
| Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
|---|
PROP_TITLE |
| Constructor Summary | |
|---|---|
ParticipantPageSaveablePart(Shell shell,
CompareConfiguration cc,
ISynchronizePageConfiguration pageConfiguration,
ISynchronizeParticipant participant)
Creates a part for the provided participant. |
|
| Method Summary | |
|---|---|
void |
contentChanged(IContentChangeNotifier source)
Called whenever the content of the given source has changed. |
void |
createPartControl(Composite parent2)
Creates the SWT controls for this workbench part. |
void |
dispose()
Disposes of this workbench part. |
void |
doSave(IProgressMonitor pm)
Saves the contents of this part. |
protected ICompareInput |
getCompareInput(ISelection selection)
|
ISynchronizePageConfiguration |
getPageConfiguration()
Return the synchronize page configuration for this part |
ISynchronizeParticipant |
getParticipant()
Return the Synchronize participant for this part |
String |
getTitle()
Returns the title of this workbench part. |
Image |
getTitleImage()
Returns the title image of this workbench part. |
boolean |
isDirty()
Returns whether the contents of this part have changed since the last save operation. |
protected void |
prepareInput(ICompareInput input,
CompareConfiguration configuration,
IProgressMonitor monitor)
|
void |
setNavigator(ISynchronizePageConfiguration configuration)
This method should not be called from clients. |
| Methods inherited from class org.eclipse.team.ui.PageSaveablePart |
|---|
getCompareConfiguration, getContentPane, getControl, getDirtyViewers, getEditionPane, getShell, getStructuredComparePane, hookContentChangeListener, prepareCompareInput, setDirty, setInput, setShowContentPanes |
| Methods inherited from class org.eclipse.team.ui.SaveablePartAdapter |
|---|
addPropertyListener, doSaveAs, getAdapter, getSite, getTitleToolTip, isSaveAsAllowed, isSaveOnCloseNeeded, removePropertyListener, setFocus |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ParticipantPageSaveablePart(Shell shell,
CompareConfiguration cc,
ISynchronizePageConfiguration pageConfiguration,
ISynchronizeParticipant participant)
For example, clients can decide if the user can edit the compare panes by calling CompareConfiguration.setLeftEditable(boolean)
or CompareConfiguration.setRightEditable(boolean).
shell - the parent shell for this partcc - the compare configuration that will be used to create the compare panespageConfiguration - the configuration that will be provided to the participant prior to creating the pageparticipant - the participant whose page will be displayed in this part| Method Detail |
public void dispose()
IWorkbenchPart
This is the last method called on the IWorkbenchPart. At this
point the part controls (if they were ever created) have been disposed as part
of an SWT composite. There is no guarantee that createPartControl() has been
called, so the part controls may never have been created.
Within this method a part may release any resources, fonts, images, etc. held by this part. It is also very important to deregister all listeners from the workbench.
Clients should not call this method (the workbench calls this method at appropriate times).
dispose in interface IWorkbenchPartdispose in class SaveablePartAdapterpublic Image getTitleImage()
IWorkbenchPartPROP_TITLE.
The title image is usually used to populate the title bar of this part's visual container. Since this image is managed by the part itself, callers must not dispose the returned image.
getTitleImage in interface IWorkbenchPartgetTitleImage in class PageSaveablePartpublic String getTitle()
IWorkbenchPartPROP_TITLE.
The title is used to populate the title bar of this part's visual container.
getTitle in interface IWorkbenchPartgetTitle in class PageSaveablePartpublic boolean isDirty()
ISaveablePartPROP_DIRTY.
Note: this method is called often on a part open or part activation switch, for example by actions to determine their enabled status.
isDirty in interface ISaveablePartisDirty in class PageSaveablePartpublic void contentChanged(IContentChangeNotifier source)
IContentChangeListener
contentChanged in interface IContentChangeListenersource - the source whose contents has changedpublic void doSave(IProgressMonitor pm)
ISaveablePart
If the save is successful, the part should fire a property changed event
reflecting the new dirty state (PROP_DIRTY property).
If the save is cancelled through user action, or for any other reason, the
part should invoke setCancelled on the IProgressMonitor
to inform the caller.
This method is long-running; progress and cancellation are provided by the given progress monitor.
doSave in interface ISaveablePartpm - the progress monitorpublic void createPartControl(Composite parent2)
IWorkbenchPartClients should not call this method (the workbench calls this method when it needs to, which may be never).
For implementors this is a multi-step process:
IActionBars.ISelectionService (optional).
createPartControl in interface IWorkbenchPartcreatePartControl in class PageSaveablePartpublic void setNavigator(ISynchronizePageConfiguration configuration)
protected void prepareInput(ICompareInput input,
CompareConfiguration configuration,
IProgressMonitor monitor)
throws InvocationTargetException
prepareInput in class PageSaveablePartInvocationTargetExceptionpublic ISynchronizePageConfiguration getPageConfiguration()
public ISynchronizeParticipant getParticipant()
protected ICompareInput getCompareInput(ISelection selection)
getCompareInput in class PageSaveablePart
|
Eclipse Platform Release 3.2 |
|||||||||||
| 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, 2005. All rights reserved.