PageCompareEditorInput
and CompareUI.openCompareDialog(org.eclipse.compare.CompareEditorInput)
public class ParticipantPageSaveablePart extends PageSaveablePart implements IContentChangeListener
ModelSynchronizeParticipant
.PROP_DIRTY
PROP_TITLE
Constructor and Description |
---|
ParticipantPageSaveablePart(Shell shell,
CompareConfiguration cc,
ISynchronizePageConfiguration pageConfiguration,
ISynchronizeParticipant participant)
Deprecated.
Creates a part for the provided participant.
|
Modifier and Type | Method and Description |
---|---|
void |
contentChanged(IContentChangeNotifier source)
Deprecated.
Called whenever the content of the given source has changed.
|
protected Control |
createPage(Composite parent,
ToolBarManager toolBarManager)
Deprecated.
Create the page for this part and return the top level control
for the page.
|
void |
dispose()
Deprecated.
Disposes of this workbench part.
|
void |
doSave(IProgressMonitor pm)
Deprecated.
This method flushes the content in any viewers.
|
protected ICompareInput |
getCompareInput(ISelection selection)
Deprecated.
Return a compare input that represents the selection.
|
ISynchronizePageConfiguration |
getPageConfiguration()
Deprecated.
Return the synchronize page configuration for this part
|
ISynchronizeParticipant |
getParticipant()
Deprecated.
Return the Synchronize participant for this part
|
protected ISelectionProvider |
getSelectionProvider()
Deprecated.
Return the selection provider for the page.
|
String |
getTitle()
Deprecated.
Returns the title of this workbench part.
|
Image |
getTitleImage()
Deprecated.
Returns the title image of this workbench part.
|
boolean |
isDirty()
Deprecated.
Returns whether the contents of this part have changed since the last save
operation.
|
protected void |
prepareInput(ICompareInput input,
CompareConfiguration configuration,
IProgressMonitor monitor)
Deprecated.
Prepare the compare input for display in a content viewer.
|
createPartControl, getControl, getShell, prepareCompareInput, setDirty, setNavigator, setPageDescription, setShowContentPanes
addPropertyListener, doSaveAs, getAdapter, getSite, getTitleToolTip, isSaveAsAllowed, isSaveOnCloseNeeded, removePropertyListener, setFocus
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 partpublic 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 IWorkbenchPart
dispose
in class SaveablePartAdapter
public Image getTitleImage()
IWorkbenchPart
PROP_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 IWorkbenchPart
public String getTitle()
IWorkbenchPart
PROP_TITLE
.
The title is used to populate the title bar of this part's visual container.
getTitle
in interface IWorkbenchPart
null
)public boolean isDirty()
ISaveablePart
PROP_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 ISaveablePart
isDirty
in class PageSaveablePart
true
if the contents have been modified and need
saving, and false
if they have not changed since the last
savepublic void contentChanged(IContentChangeNotifier source)
IContentChangeListener
contentChanged
in interface IContentChangeListener
source
- the source whose contents has changedpublic void doSave(IProgressMonitor pm)
PageSaveablePart
doSave
in interface ISaveablePart
doSave
in class PageSaveablePart
pm
- a progress monitorprotected Control createPage(Composite parent, ToolBarManager toolBarManager)
PageSaveablePart
createPage
in class PageSaveablePart
parent
- the parent compositetoolBarManager
- the toolbar manager for the pageprotected final ISelectionProvider getSelectionProvider()
PageSaveablePart
getSelectionProvider
in class PageSaveablePart
protected void prepareInput(ICompareInput input, CompareConfiguration configuration, IProgressMonitor monitor) throws InvocationTargetException
PageSaveablePart.prepareCompareInput(ICompareInput)
and may be called
from a non-UI thread. This method should not be called by others.prepareInput
in class PageSaveablePart
input
- the inputconfiguration
- the compare configurationmonitor
- a progress monitorInvocationTargetException
public ISynchronizePageConfiguration getPageConfiguration()
public ISynchronizeParticipant getParticipant()
protected ICompareInput getCompareInput(ISelection selection)
ICompareInput
.
Subclasses may override.getCompareInput
in class PageSaveablePart
selection
- the selection
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.