summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-07-05 06:06:09 (EDT)
committerEike Stepper2007-07-05 06:06:09 (EDT)
commitd06b59b1f0cc24c04adbe5b4735ad0e789ee7001 (patch)
treef8fe35d5e33626192001d0b67b4a7b34f1838294
parent0db15e601339593012fb6e219953f591a85a19fc (diff)
downloadcdo-d06b59b1f0cc24c04adbe5b4735ad0e789ee7001.zip
cdo-d06b59b1f0cc24c04adbe5b4735ad0e789ee7001.tar.gz
cdo-d06b59b1f0cc24c04adbe5b4735ad0e789ee7001.tar.bz2
task 1: Develop 0.8.0
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java31
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java5
2 files changed, 24 insertions, 12 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java
index b6386eb..864c8f2 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java
@@ -167,13 +167,27 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
{
public void notifyEvent(IEvent event)
{
- if (event instanceof CDOViewDirtyEvent)
+ if (event instanceof CDOViewDirtyEvent || event instanceof CDOViewCommittedEvent)
{
- firePropertyChange(IEditorPart.PROP_DIRTY);
- }
- else if (event instanceof CDOViewCommittedEvent)
- {
- firePropertyChange(IEditorPart.PROP_DIRTY);
+ try
+ {
+ getSite().getShell().getDisplay().syncExec(new Runnable()
+ {
+ public void run()
+ {
+ try
+ {
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+ }
+ catch (Exception ignore)
+ {
+ }
+ }
+ });
+ }
+ catch (Exception ignore)
+ {
+ }
}
}
};
@@ -944,6 +958,7 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
CDOEditorInput editorInput = (CDOEditorInput)getEditorInput();
view = editorInput.getView();
+ // TODO Check if a CommandStack is needed
BasicCommandStack commandStack = new BasicCommandStack();
commandStack.addCommandStackListener(new CommandStackListener()
{
@@ -953,7 +968,7 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
{
public void run()
{
- firePropertyChange(IEditorPart.PROP_DIRTY);
+ // firePropertyChange(IEditorPart.PROP_DIRTY);
Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand();
if (mostRecentCommand != null)
@@ -1386,7 +1401,7 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
// Refresh the necessary state.
//
((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone();
- firePropertyChange(IEditorPart.PROP_DIRTY);
+ // firePropertyChange(IEditorPart.PROP_DIRTY);
}
catch (Exception exception)
{
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java
index 1f5da6e..192c20b 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java
@@ -287,10 +287,7 @@ public class CDOViewImpl extends org.eclipse.net4j.internal.util.event.Notifier
if (result != null)
{
Map<CDOID, CDOID> idMappings = result.getIdMappings();
- if (idMappings != null && !idMappings.isEmpty())
- {
- fireEvent(new CommittedEvent(idMappings));
- }
+ fireEvent(new CommittedEvent(idMappings));
}
}