|
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.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.EditorPart
org.eclipse.debug.ui.sourcelookup.CommonSourceNotFoundEditor
Default editor displayed when source is not found. Displays a button to modify the source lookup path.
This editor's id is IDebugUIConstants.ID_COMMON_SOURCE_NOT_FOUND_EDITOR
(value org.eclipse.debug.ui.sourcelookup.CommonSourceNotFoundEditor
).
This class may be instantiated and subclassed.
AbstractSourceLookupDirector
,
CommonSourceNotFoundEditorInput
Field Summary |
---|
Fields inherited from interface org.eclipse.ui.IEditorPart |
---|
PROP_DIRTY, PROP_INPUT |
Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
---|
PROP_TITLE |
Constructor Summary | |
---|---|
CommonSourceNotFoundEditor()
|
Method Summary | |
---|---|
protected void |
closeEditor()
Closes this editor. |
protected void |
createButtons(Composite parent)
Create buttons to be displayed in this editor |
void |
createPartControl(Composite parent)
Creates the SWT controls for this workbench part. |
void |
dispose()
Disposes of this workbench part. |
void |
doSave(IProgressMonitor monitor)
Saves the contents of this part. |
void |
doSaveAs()
Saves the contents of this part to another object. |
protected void |
editSourceLookupPath()
Edits the source lookup path associated with the active debug context. |
protected Object |
getArtifact()
Returns the artifact this editor was opened for (i.e. the artifact that source was not found for), or null |
protected String |
getText()
Return the text to be displayed in this editor. |
void |
init(IEditorSite site,
IEditorInput input)
Initializes this editor with the given editor site and input. |
protected void |
initialize()
Initialize this editor. |
boolean |
isDirty()
Returns whether the contents of this part have changed since the last save operation. |
boolean |
isSaveAsAllowed()
Returns whether the "Save As" operation is supported by this part. |
void |
setFocus()
Asks this part to take focus within the workbench. |
void |
setInput(IEditorInput input)
Sets the input to this editor. |
Methods inherited from class org.eclipse.ui.part.EditorPart |
---|
checkSite, getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInputWithNotify, setPartName |
Methods inherited from class org.eclipse.ui.part.WorkbenchPart |
---|
addPropertyListener, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getSite, getTitle, getTitleImage, removePropertyListener, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy |
Methods inherited from class org.eclipse.core.commands.common.EventManager |
---|
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.ui.IEditorPart |
---|
getEditorInput, getEditorSite |
Methods inherited from interface org.eclipse.ui.IWorkbenchPart |
---|
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
---|
getAdapter |
Methods inherited from interface org.eclipse.ui.ISaveablePart |
---|
isSaveOnCloseNeeded |
Constructor Detail |
public CommonSourceNotFoundEditor()
Method Detail |
public void doSave(IProgressMonitor monitor)
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 ISaveablePart
doSave
in class EditorPart
public void doSaveAs()
ISaveablePart
Implementors are expected to open a "Save As" dialog where the user will
be able to select a new name for the contents. After the selection is made,
the contents should be saved to that new name. During this operation a
IProgressMonitor
should be used to indicate progress.
If the save is successful, the part fires a property changed event
reflecting the new dirty state (PROP_DIRTY
property).
doSaveAs
in interface ISaveablePart
doSaveAs
in class EditorPart
public void init(IEditorSite site, IEditorInput input) throws PartInitException
IEditorPart
This method is automatically called shortly after the part is instantiated.
It marks the start of the part's lifecycle. The
IWorkbenchPart.dispose
method will be called
automically at the end of the lifecycle. Clients must not call this method.
Implementors of this method must examine the editor input object type to
determine if it is understood. If not, the implementor must throw
a PartInitException
init
in interface IEditorPart
init
in class EditorPart
PartInitException
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 EditorPart
public boolean isSaveAsAllowed()
ISaveablePart
isSaveAsAllowed
in interface ISaveablePart
isSaveAsAllowed
in class EditorPart
public void createPartControl(Composite parent)
IWorkbenchPart
Clients 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 IWorkbenchPart
createPartControl
in class WorkbenchPart
protected void createButtons(Composite parent)
parent
- composite to create the buttons in.protected void editSourceLookupPath()
public void setFocus()
IWorkbenchPart
Clients should not call this method (the workbench calls this method at
appropriate times). To have the workbench activate a part, use
IWorkbenchPage.activate(IWorkbenchPart) instead
.
setFocus
in interface IWorkbenchPart
setFocus
in class WorkbenchPart
public void setInput(IEditorInput input)
IReusableEditor
Note: Clients must fire the IEditorPart.PROP_INPUT
property change within their implementation of
setInput()
.
setInput
in interface IReusableEditor
setInput
in class EditorPart
input
- the editor inputEditorPart.setInputWithNotify(IEditorInput)
protected String getText()
protected void closeEditor()
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 IWorkbenchPart
dispose
in class WorkbenchPart
protected Object getArtifact()
null
null
protected void initialize()
init(IEditorSite, IEditorInput)
. By default, a launch
listener is added to close this editor when the associated launch terminates.
Subclasses may override.
|
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, 2006. All rights reserved.