Home » Eclipse Projects » Eclipse Platform » Dirty marking in MultiPageEditorPart not removed after save
Dirty marking in MultiPageEditorPart not removed after save [message #115901] |
Mon, 25 August 2003 08:12  |
Eclipse User |
|
|
|
I am working on an editor that extends MultiPageEditorPart, and contains
a source page (much like the PDE editor). I have overridden doSave and
isDirty in the multipageeditor to suit my needs, like so:
public void doSave(IProgressMonitor monitor) {
updateDocument();
final IEditorInput input = getEditorInput();
WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
public void execute(final IProgressMonitor monitor) throws
CoreException {
documentProvider.saveDocument(monitor, input,
documentProvider.getDocument(input), true);
}
};
try {
updateModel();
documentProvider.aboutToChange(input);
op.run(monitor);
documentProvider.changed(input);
fireSaveNeeded();
setModelDirty(false);
}
catch (InterruptedException x) {
}
catch (InvocationTargetException x) {
}
}
public boolean isDirty() {
if (isModelDirty()) {
return true;
}
if (documentProvider != null) {
return documentProvider.canSaveDocument(getEditorInput());
}
return false;
}
public void fireSaveNeeded() {
firePropertyChange(PROP_DIRTY);
}
All properly works when I change something in the source viewer, or
change a value in another page in the editor. When I do a save, it
properly saves the document. However, after the save, the editor tab in
eclipse (version 3.0-M2 on linux/motif) still shows the little "dirty"
asterix. I have added all sorts of logging to make sure isDirty() gets
called after the save and that isDirty() returns false, but still I
cannot get rid of the asterix. Something I am missing?
jeff
--
Jeffrey Bonevich
Ann Arbor, Michigan
bonevich at covad dot net
jeff at bonevich dot com
http://www.bonevich.com
"Make me a fire and I'm warm for a night. Set me
on fire and I'm warm for the rest of my life."
- Ancient Didactical Saying
|
|
|
Re: Dirty marking in MultiPageEditorPart not removed after save [message #116257 is a reply to message #115901] |
Mon, 25 August 2003 11:41   |
Eclipse User |
|
|
|
Hard to say. What I did for you was to make a dump of all
method calls made in PDE UI when a change is saved in the
source page. Perhaps there is enough info for you in here?
Otherwise, I would suggest setting a breakpoint in the PDE
UI and step through its save logic and see how if differs
from yours?
Chris Laffra
trace started at: Mon Aug 25 11:38:02 EDT 2003
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.getSel ection() {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
org.eclipse.pde.internal.ui.editor.PDEMultiSelectionProvider .getSelection()
{
this = instance @306975308 of class
org.eclipse.pde.internal.ui.editor.PDEMultiSelectionProvider
org.eclipse.pde.internal.ui.editor.PDESourcePage.isVisible() {
this = instance @1964930334 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestSourcePa geNew
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.getCur rentPage() {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
return
org.eclipse.pde.internal.ui.editor.manifest.ManifestSourcePa geNew
}
return 1
}
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiSelectionProvider .getSelection()
to texteditor, method =
org.eclipse.ui.texteditor.AbstractTextEditor.getSelectionPro vider()
return org.eclipse.jface.text.TextSelection
}
return org.eclipse.jface.text.TextSelection
}
11:38:04
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.isDirt y() {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor.i sModelDirty(java
..lang.Object) {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
arg 0 = instance @1902932332 of class
org.eclipse.pde.internal.core.plugin.WorkspacePluginModel
return 0
}
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.isDirt y() to
workbench, method = org.eclipse.ui.part.EditorPart.getEditorInput()
return 1
}
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.doSave (org.eclipse.cor
e.runtime.IProgressMonitor) {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
arg 0 = instance @322376503 of class
org.eclipse.ui.internal.dialogs.EventLoopProgressMonitor
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.doSave (org.eclipse.cor
e.runtime.IProgressMonitor) to workbench, method =
org.eclipse.ui.part.EditorPart.getEditorInput()
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.commit FormPages(boolea
n) {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
arg 0 = "1"
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.getPag es()
{
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
return java.util.AbstractList$Itr
}
org.eclipse.pde.internal.ui.editor.PDEFormPage.getForm() {
this = instance @598090662 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestTemplate Page
return
org.eclipse.pde.internal.ui.editor.manifest.TemplateForm
}
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.commit FormPages(boolea
n) to forms, method =
org.eclipse.update.ui.forms.internal.AbstractSectionForm.com mitChanges(boole
an)
org.eclipse.pde.internal.ui.editor.PDEFormPage.getForm() {
this = instance @1740859331 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestFormPage
return
org.eclipse.pde.internal.ui.editor.manifest.ManifestForm
}
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.commit FormPages(boolea
n) to forms, method =
org.eclipse.update.ui.forms.internal.AbstractSectionForm.com mitChanges(boole
an)
org.eclipse.pde.internal.ui.editor.manifest.PluginSpecSectio n.isDirty() {
this = instance @1944024031 of class
org.eclipse.pde.internal.ui.editor.manifest.PluginSpecSectio n
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.manifest.PluginSpecSectio n.isDirty() to
forms, method = org.eclipse.update.ui.forms.internal.FormEntry.isDirty()
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.manifest.PluginSpecSectio n.isDirty() to
forms, method = org.eclipse.update.ui.forms.internal.FormEntry.isDirty()
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.manifest.PluginSpecSectio n.isDirty() to
forms, method = org.eclipse.update.ui.forms.internal.FormEntry.isDirty()
org.eclipse.pde.internal.ui.editor.manifest.PluginSpecSectio n.isFragment() {
this = instance @1944024031 of class
org.eclipse.pde.internal.ui.editor.manifest.PluginSpecSectio n
return 0
}
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.manifest.PluginSpecSectio n.isDirty() to
forms, method = org.eclipse.update.ui.forms.internal.FormEntry.isDirty()
return 0
}
org.eclipse.pde.internal.ui.editor.PDEFormPage.getForm() {
this = instance @1332694895 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestDependen ciesPage
return
org.eclipse.pde.internal.ui.editor.manifest.DependenciesForm
}
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.commit FormPages(boolea
n) to forms, method =
org.eclipse.update.ui.forms.internal.AbstractSectionForm.com mitChanges(boole
an)
org.eclipse.pde.internal.ui.editor.manifest.DependenciesForm .commitChanges(b
oolean) {
this = instance @1676043238 of class
org.eclipse.pde.internal.ui.editor.manifest.DependenciesForm
arg 0 = "1"
return null
}
org.eclipse.pde.internal.ui.editor.PDEFormPage.getForm() {
this = instance @2056813208 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestRuntimeP age
return
org.eclipse.pde.internal.ui.editor.manifest.RuntimeForm
}
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.commit FormPages(boolea
n) to forms, method =
org.eclipse.update.ui.forms.internal.AbstractSectionForm.com mitChanges(boole
an)
org.eclipse.pde.internal.ui.editor.PDEFormPage.getForm() {
this = instance @643180118 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestExtensio nsPage
return
org.eclipse.pde.internal.ui.editor.manifest.ExtensionsForm
}
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.commit FormPages(boolea
n) to forms, method =
org.eclipse.update.ui.forms.internal.AbstractSectionForm.com mitChanges(boole
an)
org.eclipse.pde.internal.ui.editor.PDEFormPage.getForm() {
this = instance @391583575 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestExtensio nPointPage
return
org.eclipse.pde.internal.ui.editor.manifest.ExtensionPointFo rm
}
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.commit FormPages(boolea
n) to forms, method =
org.eclipse.update.ui.forms.internal.AbstractSectionForm.com mitChanges(boole
an)
return null
}
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.update Document() {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
return null
}
new 5 org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor$4
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.doSave (org.eclipse.cor
e.runtime.IProgressMonitor) to workbench, method =
org.eclipse.ui.actions.WorkspaceModifyOperation.run(org.ecli pse.core.runtime
..IProgressMonitor)
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor$4.exec ute(org.eclipse.
core.runtime.IProgressMonitor) {
this = instance @993409846 of class
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor$4
arg 0 = instance @548544690 of class
org.eclipse.core.runtime.SubProgressMonitor
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.access $1(org.eclipse.p
de.internal.ui.editor.PDEMultiPageEditor) {
arg 0 = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
return
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor$S ynchronizedUTF8F
ileDocumentProvider
}
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.access $1(org.eclipse.p
de.internal.ui.editor.PDEMultiPageEditor) {
arg 0 = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
return
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor$S ynchronizedUTF8F
ileDocumentProvider
}
org.eclipse.pde.internal.ui.editor.PDEMultiPageXMLEditor$UTF 8FileDocumentPro
vider.doSaveDocument(org.eclipse.core.runtime.IProgressMonit or,java.lang.Obj
ect,org.eclipse.jface.text.IDocument,boolean) {
this = instance @635381215 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor$S ynchronizedUTF8F
ileDocumentProvider
arg 0 = instance @548544690 of class
org.eclipse.core.runtime.SubProgressMonitor
arg 1 = instance @717318881 of class
org.eclipse.ui.part.FileEditorInput
arg 2 = instance @2001172295 of class
org.eclipse.pde.internal.ui.editor.manifest.PartiallySynchro nizedDocument
arg 3 = "1"
org.eclipse.pde.internal.ui.editor.manifest.PartiallySynchro nizedDocument.ge
t() {
this = instance @2001172295 of class
org.eclipse.pde.internal.ui.editor.manifest.PartiallySynchro nizedDocument
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.manifest.PartiallySynchro nizedDocument.ge
t() to text, method = org.eclipse.jface.text.AbstractDocument.get()
return <?xml version="1.0" encoding="UTF-8"?>
<plugin
id="com.ibm.perf.time"
name="Inspector Plug-in"
version="1.0.0"
provider-name="IBM"
class="com.ibm.perf.time.TimePlugin">
<runtime>
<library name="inspector.jar"/>
</runtime>
<requires>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.ui"/>
<import plugin="com.ibm.eclipse.monitor"/>
</requires>
<extension
point="com.ibm.eclipse.monitor.CustomVisualizer">
<visualizer
name="SWT Widget Inspector"
class="com.ibm.perf.time.Visualizer"
id="com.ibm.perf.time.visualizer">
</visualizer>
</extension>
</plugin>
}
new 5 java.io.ByteArrayInputStream
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiPageXMLEditor$UTF 8FileDocumentPro
vider.doSaveDocument(org.eclipse.core.runtime.IProgressMonit or,java.lang.Obj
ect,org.eclipse.jface.text.IDocument,boolean) to editors, method =
org.eclipse.ui.editors.text.FileDocumentProvider.getElementI nfo(java.lang.Ob
ject)
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiPageXMLEditor$UTF 8FileDocumentPro
vider.doSaveDocument(org.eclipse.core.runtime.IProgressMonit or,java.lang.Obj
ect,org.eclipse.jface.text.IDocument,boolean) to texteditor, method =
org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel.upda teMarkers(org.ec
lipse.jface.text.IDocument)
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiPageXMLEditor$UTF 8FileDocumentPro
vider.doSaveDocument(org.eclipse.core.runtime.IProgressMonit or,java.lang.Obj
ect,org.eclipse.jface.text.IDocument,boolean) to editors, method =
org.eclipse.ui.editors.text.FileDocumentProvider.computeModi ficationStamp(or
g.eclipse.core.resources.IResource)
return null
}
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor$Elemen tListener.elemen
tDirtyStateChanged(java.lang.Object,boolean) {
this = instance @1241074169 of class
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor$Elemen tListener
arg 0 = instance @717318881 of class
org.eclipse.ui.part.FileEditorInput
arg 1 = "0"
return null
}
org.eclipse.pde.internal.ui.editor.PDESourcePage.firePropert yChange(int) {
this = instance @1964930334 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestSourcePa geNew
arg 0 = "257"
org.eclipse.pde.internal.ui.editor.PDESourcePage.getEditor()
{
this = instance @1964930334 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestSourcePa geNew
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDESourcePage.getEditor() to workbench,
method = org.eclipse.ui.part.EditorPart.getEditorInput()
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDESourcePage.getEditor() to workbench,
method = org.eclipse.ui.part.EditorPart.getEditorInput()
return
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
}
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.fireSa veNeeded() {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.fireSa veNeeded() to
workbench, method =
org.eclipse.ui.part.WorkbenchPart.firePropertyChange(int)
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor.g etTitle() {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.getMod el() {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
return
org.eclipse.pde.internal.core.plugin.WorkspacePluginModel
}
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor.i sModelCorrect(ja
va.lang.Object) {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
arg 0 = instance @1902932332 of class
org.eclipse.pde.internal.core.plugin.WorkspacePluginModel
return 1
}
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.getMod el() {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
return
org.eclipse.pde.internal.core.plugin.WorkspacePluginModel
}
return Inspector Plug-in
}
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.isDirt y() {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor.i sModelDirty(java
..lang.Object) {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
arg 0 = instance @1902932332 of class
org.eclipse.pde.internal.core.plugin.WorkspacePluginModel
return 0
}
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.isDirt y() to
workbench, method = org.eclipse.ui.part.EditorPart.getEditorInput()
return 0
}
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.isDirt y() {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor.i sModelDirty(java
..lang.Object) {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
arg 0 = instance @1902932332 of class
org.eclipse.pde.internal.core.plugin.WorkspacePluginModel
return 0
}
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.isDirt y() to
workbench, method = org.eclipse.ui.part.EditorPart.getEditorInput()
return 0
}
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.isDirt y() {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor.i sModelDirty(java
..lang.Object) {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
arg 0 = instance @1902932332 of class
org.eclipse.pde.internal.core.plugin.WorkspacePluginModel
return 0
}
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.isDirt y() to
workbench, method = org.eclipse.ui.part.EditorPart.getEditorInput()
return 0
}
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.isSave AsAllowed() {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
return 0
}
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.getCon tributor() {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.getCon tributor() to
workbench, method = org.eclipse.ui.part.EditorPart.getEditorSite()
return
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditorCo ntributor
}
org.eclipse.pde.internal.ui.editor.PDEEditorContributor.upda teActions() {
this = instance @1806068646 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditorCo ntributor
org.eclipse.pde.internal.ui.editor.PDEEditorContributor$Save Action.update()
{
this = instance @112330418 of class
org.eclipse.pde.internal.ui.editor.PDEEditorContributor$Save Action
org.eclipse.pde.internal.ui.editor.PDEEditorContributor.acce ss$0(org.eclipse
..pde.internal.ui.editor.PDEEditorContributor) {
arg 0 = instance @1806068646 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditorCo ntributor
return
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
}
org.eclipse.pde.internal.ui.editor.PDEEditorContributor.acce ss$0(org.eclipse
..pde.internal.ui.editor.PDEEditorContributor) {
arg 0 = instance @1806068646 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditorCo ntributor
return
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
}
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.isDirt y() {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor.i sModelDirty(java
..lang.Object) {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
arg 0 = instance @1902932332 of class
org.eclipse.pde.internal.core.plugin.WorkspacePluginModel
return 0
}
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.isDirt y() to
workbench, method = org.eclipse.ui.part.EditorPart.getEditorInput()
return 0
}
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEEditorContributor$Save Action.update()
to jface, method = org.eclipse.jface.action.Action.setEnabled(boolean)
return null
}
org.eclipse.pde.internal.ui.editor.PDEEditorContributor$Reve rtAction.update(
) {
this = instance @132974573 of class
org.eclipse.pde.internal.ui.editor.PDEEditorContributor$Reve rtAction
org.eclipse.pde.internal.ui.editor.PDEEditorContributor.acce ss$0(org.eclipse
..pde.internal.ui.editor.PDEEditorContributor) {
arg 0 = instance @1806068646 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditorCo ntributor
return
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
}
org.eclipse.pde.internal.ui.editor.PDEEditorContributor.acce ss$0(org.eclipse
..pde.internal.ui.editor.PDEEditorContributor) {
arg 0 = instance @1806068646 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditorCo ntributor
return
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
}
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.isDirt y() {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor.i sModelDirty(java
..lang.Object) {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
arg 0 = instance @1902932332 of class
org.eclipse.pde.internal.core.plugin.WorkspacePluginModel
return 0
}
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.isDirt y() to
workbench, method = org.eclipse.ui.part.EditorPart.getEditorInput()
return 0
}
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEEditorContributor$Reve rtAction.update(
) to jface, method = org.eclipse.jface.action.Action.setEnabled(boolean)
return null
}
return null
}
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.valida teEdit() {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.isDirt y() {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor.i sModelDirty(java
..lang.Object) {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
arg 0 = instance @1902932332 of class
org.eclipse.pde.internal.core.plugin.WorkspacePluginModel
return 0
}
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.isDirt y() to
workbench, method = org.eclipse.ui.part.EditorPart.getEditorInput()
return 0
}
return null
}
return null
}
return null
}
return null
}
org.eclipse.pde.internal.ui.editor.manifest.XMLOutlinePage$1 .documentModelCh
anged(org.eclipse.pde.internal.core.plugin.DocumentModelChan geEvent) {
this = instance @657663795 of class
org.eclipse.pde.internal.ui.editor.manifest.XMLOutlinePage$1
arg 0 = instance @44434086 of class
org.eclipse.pde.internal.core.plugin.DocumentModelChangeEven t
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.manifest.XMLOutlinePage$1 .documentModelCh
anged(org.eclipse.pde.internal.core.plugin.DocumentModelChan geEvent) to
pdecore, method =
org.eclipse.pde.internal.core.plugin.DocumentModelChangeEven t.getNode()
org.eclipse.pde.internal.ui.editor.manifest.XMLOutlinePage.a ccess$0(org.ecli
pse.pde.internal.ui.editor.manifest.XMLOutlinePage) {
arg 0 = instance @459479907 of class
org.eclipse.pde.internal.ui.editor.manifest.XMLOutlinePage
return org.eclipse.pde.internal.core.plugin.DocumentModel
}
return null
}
11:38:05
org.eclipse.pde.internal.ui.editor.manifest.XMLOutlinePage$1 .documentModelCh
anged(org.eclipse.pde.internal.core.plugin.DocumentModelChan geEvent) {
this = instance @657663795 of class
org.eclipse.pde.internal.ui.editor.manifest.XMLOutlinePage$1
arg 0 = instance @564535718 of class
org.eclipse.pde.internal.core.plugin.DocumentModelChangeEven t
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.manifest.XMLOutlinePage$1 .documentModelCh
anged(org.eclipse.pde.internal.core.plugin.DocumentModelChan geEvent) to
pdecore, method =
org.eclipse.pde.internal.core.plugin.DocumentModelChangeEven t.getNode()
org.eclipse.pde.internal.ui.editor.manifest.XMLOutlinePage.a ccess$0(org.ecli
pse.pde.internal.ui.editor.manifest.XMLOutlinePage) {
arg 0 = instance @459479907 of class
org.eclipse.pde.internal.ui.editor.manifest.XMLOutlinePage
return org.eclipse.pde.internal.core.plugin.DocumentModel
}
return null
}
11:38:06
org.eclipse.pde.internal.ui.editor.manifest.AlertSection.res ourceChanged(org
..eclipse.core.resources.IResourceChangeEvent) {
this = instance @72156237 of class
org.eclipse.pde.internal.ui.editor.manifest.AlertSection
arg 0 = instance @1778346495 of class
org.eclipse.core.internal.events.ResourceChangeEvent
org.eclipse.pde.internal.ui.editor.PDEFormSection.getFormPag e()
{
this = instance @72156237 of class
org.eclipse.pde.internal.ui.editor.manifest.AlertSection
return
org.eclipse.pde.internal.ui.editor.manifest.ManifestFormPage
}
org.eclipse.pde.internal.ui.editor.PDEFormPage.getEditor() {
this = instance @1740859331 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestFormPage
return
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
}
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.manifest.AlertSection.res ourceChanged(org
..eclipse.core.resources.IResourceChangeEvent) to workbench, method =
org.eclipse.ui.part.EditorPart.getEditorInput()
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.manifest.AlertSection.res ourceChanged(org
..eclipse.core.resources.IResourceChangeEvent) to swt, method =
org.eclipse.swt.widgets.Control.isDisposed()
new 5
org.eclipse.pde.internal.ui.editor.manifest.AlertSection$Del taVisitor
org.eclipse.pde.internal.ui.editor.manifest.AlertSection$Del taVisitor.visit(
org.eclipse.core.resources.IResourceDelta) {
this = instance @1845063161 of class
org.eclipse.pde.internal.ui.editor.manifest.AlertSection$Del taVisitor
arg 0 = instance @1655333546 of class
org.eclipse.core.internal.events.ResourceDelta
return 1
}
org.eclipse.pde.internal.ui.editor.manifest.AlertSection$Del taVisitor.visit(
org.eclipse.core.resources.IResourceDelta) {
this = instance @1845063161 of class
org.eclipse.pde.internal.ui.editor.manifest.AlertSection$Del taVisitor
arg 0 = instance @1699767632 of class
org.eclipse.core.internal.events.ResourceDelta
return 1
}
org.eclipse.pde.internal.ui.editor.manifest.AlertSection$Del taVisitor.visit(
org.eclipse.core.resources.IResourceDelta) {
this = instance @1845063161 of class
org.eclipse.pde.internal.ui.editor.manifest.AlertSection$Del taVisitor
arg 0 = instance @1788439193 of class
org.eclipse.core.internal.events.ResourceDelta
return 1
}
org.eclipse.pde.internal.ui.editor.manifest.AlertSection$Del taVisitor.getMar
kersChanged() {
this = instance @1845063161 of class
org.eclipse.pde.internal.ui.editor.manifest.AlertSection$Del taVisitor
return 0
}
return null
}
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.fireSa veNeeded() {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.fireSa veNeeded() to
workbench, method =
org.eclipse.ui.part.WorkbenchPart.firePropertyChange(int)
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor.g etTitle() {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.getMod el() {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
return
org.eclipse.pde.internal.core.plugin.WorkspacePluginModel
}
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor.i sModelCorrect(ja
va.lang.Object) {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
arg 0 = instance @1902932332 of class
org.eclipse.pde.internal.core.plugin.WorkspacePluginModel
return 1
}
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.getMod el() {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
return
org.eclipse.pde.internal.core.plugin.WorkspacePluginModel
}
return Inspector Plug-in
}
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.isDirt y()
{
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor.i sModelDirty(java
..lang.Object) {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
arg 0 = instance @1902932332 of class
org.eclipse.pde.internal.core.plugin.WorkspacePluginModel
return 0
}
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.isDirt y() to
workbench, method = org.eclipse.ui.part.EditorPart.getEditorInput()
return 0
}
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.isDirt y()
{
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor.i sModelDirty(java
..lang.Object) {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
arg 0 = instance @1902932332 of class
org.eclipse.pde.internal.core.plugin.WorkspacePluginModel
return 0
}
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.isDirt y() to
workbench, method = org.eclipse.ui.part.EditorPart.getEditorInput()
return 0
}
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.isDirt y()
{
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor.i sModelDirty(java
..lang.Object) {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
arg 0 = instance @1902932332 of class
org.eclipse.pde.internal.core.plugin.WorkspacePluginModel
return 0
}
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.isDirt y() to
workbench, method = org.eclipse.ui.part.EditorPart.getEditorInput()
return 0
}
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.isSave AsAllowed() {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
return 0
}
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.getCon tributor() {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.getCon tributor() to
workbench, method = org.eclipse.ui.part.EditorPart.getEditorSite()
return
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditorCo ntributor
}
org.eclipse.pde.internal.ui.editor.PDEEditorContributor.upda teActions() {
this = instance @1806068646 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditorCo ntributor
org.eclipse.pde.internal.ui.editor.PDEEditorContributor$Save Action.update()
{
this = instance @112330418 of class
org.eclipse.pde.internal.ui.editor.PDEEditorContributor$Save Action
org.eclipse.pde.internal.ui.editor.PDEEditorContributor.acce ss$0(org.eclipse
..pde.internal.ui.editor.PDEEditorContributor) {
arg 0 = instance @1806068646 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditorCo ntributor
return
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
}
org.eclipse.pde.internal.ui.editor.PDEEditorContributor.acce ss$0(org.eclipse
..pde.internal.ui.editor.PDEEditorContributor) {
arg 0 = instance @1806068646 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditorCo ntributor
return
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
}
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.isDirt y() {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor.i sModelDirty(java
..lang.Object) {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
arg 0 = instance @1902932332 of class
org.eclipse.pde.internal.core.plugin.WorkspacePluginModel
return 0
}
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.isDirt y() to
workbench, method = org.eclipse.ui.part.EditorPart.getEditorInput()
return 0
}
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEEditorContributor$Save Action.update()
to jface, method = org.eclipse.jface.action.Action.setEnabled(boolean)
return null
}
org.eclipse.pde.internal.ui.editor.PDEEditorContributor$Reve rtAction.update(
) {
this = instance @132974573 of class
org.eclipse.pde.internal.ui.editor.PDEEditorContributor$Reve rtAction
org.eclipse.pde.internal.ui.editor.PDEEditorContributor.acce ss$0(org.eclipse
..pde.internal.ui.editor.PDEEditorContributor) {
arg 0 = instance @1806068646 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditorCo ntributor
return
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
}
org.eclipse.pde.internal.ui.editor.PDEEditorContributor.acce ss$0(org.eclipse
..pde.internal.ui.editor.PDEEditorContributor) {
arg 0 = instance @1806068646 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditorCo ntributor
return
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
}
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.isDirt y() {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor.i sModelDirty(java
..lang.Object) {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
arg 0 = instance @1902932332 of class
org.eclipse.pde.internal.core.plugin.WorkspacePluginModel
return 0
}
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.isDirt y() to
workbench, method = org.eclipse.ui.part.EditorPart.getEditorInput()
return 0
}
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEEditorContributor$Reve rtAction.update(
) to jface, method = org.eclipse.jface.action.Action.setEnabled(boolean)
return null
}
return null
}
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.valida teEdit() {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.isDirt y() {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor.i sModelDirty(java
..lang.Object) {
this = instance @1254705865 of class
org.eclipse.pde.internal.ui.editor.manifest.ManifestEditor
arg 0 = instance @1902932332 of class
org.eclipse.pde.internal.core.plugin.WorkspacePluginModel
return 0
}
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.PDEMultiPageEditor.isDirt y() to
workbench, method = org.eclipse.ui.part.EditorPart.getEditorInput()
return 0
}
return null
}
return null
}
return null
}
11:38:06
org.eclipse.pde.internal.ui.editor.manifest.PartiallySynchro nizedDocument.ge
t(int,int) {
this = instance @2001172295 of class
org.eclipse.pde.internal.ui.editor.manifest.PartiallySynchro nizedDocument
arg 0 = "513"
arg 1 = "17"
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.manifest.PartiallySynchro nizedDocument.ge
t(int,int) to text, method =
org.eclipse.jface.text.AbstractDocument.get(int,int)
return <visualizer
}
org.eclipse.pde.internal.ui.editor.manifest.PartiallySynchro nizedDocument.ge
t(int,int) {
this = instance @2001172295 of class
org.eclipse.pde.internal.ui.editor.manifest.PartiallySynchro nizedDocument
arg 0 = "532"
arg 1 = "39"
call from plugin pdeui, method =
org.eclipse.pde.internal.ui.editor.manifest.PartiallySynchro nizedDocument.ge
t(int,int) to text, method =
org.eclipse.jface.text.AbstractDocument.get(int,int)
return name="SWT Widget Inspector"
}
11:38:06
"Jeffrey Bonevich" <jeff@bonevich.com> wrote in message
news:bicu1v$hff$1@eclipse.org...
> I am working on an editor that extends MultiPageEditorPart, and contains
> a source page (much like the PDE editor). I have overridden doSave and
> isDirty in the multipageeditor to suit my needs, like so:
>
> public void doSave(IProgressMonitor monitor) {
> updateDocument();
>
> final IEditorInput input = getEditorInput();
> WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
> public void execute(final IProgressMonitor monitor) throws
> CoreException {
> documentProvider.saveDocument(monitor, input,
> documentProvider.getDocument(input), true);
> }
> };
>
> try {
> updateModel();
> documentProvider.aboutToChange(input);
> op.run(monitor);
> documentProvider.changed(input);
> fireSaveNeeded();
> setModelDirty(false);
> }
> catch (InterruptedException x) {
> }
> catch (InvocationTargetException x) {
> }
> }
>
> public boolean isDirty() {
> if (isModelDirty()) {
> return true;
> }
> if (documentProvider != null) {
> return documentProvider.canSaveDocument(getEditorInput());
> }
> return false;
> }
>
> public void fireSaveNeeded() {
> firePropertyChange(PROP_DIRTY);
> }
>
> All properly works when I change something in the source viewer, or
> change a value in another page in the editor. When I do a save, it
> properly saves the document. However, after the save, the editor tab in
> eclipse (version 3.0-M2 on linux/motif) still shows the little "dirty"
> asterix. I have added all sorts of logging to make sure isDirty() gets
> called after the save and that isDirty() returns false, but still I
> cannot get rid of the asterix. Something I am missing?
>
> jeff
>
> --
> Jeffrey Bonevich
> Ann Arbor, Michigan
> bonevich at covad dot net
> jeff at bonevich dot com
> http://www.bonevich.com
>
> "Make me a fire and I'm warm for a night. Set me
> on fire and I'm warm for the rest of my life."
> - Ancient Didactical Saying
>
|
|
| | | |
Re: Dirty marking in MultiPageEditorPart not removed after save [message #116658 is a reply to message #116471] |
Tue, 26 August 2003 13:46  |
Eclipse User |
|
|
|
Good to hear you solved the problem
Chris
"Jeffrey Bonevich" <jeff@bonevich.com> wrote in message
news:bieco5$vqt$1@eclipse.org...
> Rrrrrrrrrrggggh. Hate these kind of insideous threading problems. The
> issue was that two lines in my doSave() method needed to be switched.
>
> fireSaveNeeded();
> setModelDirty(false);
> to
>
> setModelDirty(false);
> fireSaveNeeded();
>
> Because of course the isDirty implementation depended on isModelDirty(),
> and if I change that after firing off a property change event it does
> not do much good for the visual cue!
>
> Thanx anywho!
>
> jeff
>
> Jeffrey Bonevich wrote:
> > Thanx for the tracedump, but I think the crux of the problem is not in
> > the doSave method call. Maybe I can rephrase the question:
> >
> > To show the little asterix (i.e. "dirty indicator") in the header tab of
> > the editor, does eclipse not just call isDirty() on the editor? Or is
> > it a more complex operation than that? I have satisfied myself that,
> > after saving, anytime I or eclipse call isDirty(), it returns false. And
> > yet the asterix persists.
> >
> > jeff
> >
>
> --
> Jeffrey Bonevich
> Ann Arbor, Michigan
> bonevich at covad dot net
> jeff at bonevich dot com
> http://www.bonevich.com
>
> "Make me a fire and I'm warm for a night. Set me
> on fire and I'm warm for the rest of my life."
> - Ancient Didactical Saying
>
|
|
|
Goto Forum:
Current Time: Fri Apr 25 21:23:56 EDT 2025
Powered by FUDForum. Page generated in 0.04298 seconds
|