Bug 164491 - [DiagramEditor] Create ResourceSetDiagramDocumentProvider class
Summary: [DiagramEditor] Create ResourceSetDiagramDocumentProvider class
Status: NEW
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 major
Target Milestone: 3.0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 174501 (view as bug list)
Depends on:
Blocks: 188321 205149
  Show dependency tree
 
Reported: 2006-11-14 11:32 EST by Alex Shatalin CLA
Modified: 2011-05-01 08:11 EDT (History)
4 users (show)

See Also:


Attachments
Implementation of the corresponding DocumentProvider (24.76 KB, patch)
2006-11-14 11:40 EST, Alex Shatalin CLA
no flags Details | Diff
More correct version created (28.10 KB, patch)
2007-02-22 15:38 EST, Alex Shatalin CLA
no flags Details | Diff
Removing ResourceSetModificationListener in ResourceSetInfo.dispose() (28.21 KB, patch)
2007-02-26 06:46 EST, Alex Shatalin CLA
no flags Details | Diff
Tacking care of touch events (28.23 KB, text/plain)
2007-04-17 18:16 EDT, Mohammed Mostafa CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Shatalin CLA 2006-11-14 11:32:41 EST
Currently used FileDiagramDocumentProvider works incorrectly with real diagrams (notation and semantic model loaded from tge different EMF resources). In particular:

- diagram editor will be marked as dirty only if diagram EMF Resource was modified
- all *Rules returned by this provider wraps only diagram resources -> the rest of the loaded resources can not be correctly saved, etc. (https://bugs.eclipse.org/bugs/show_bug.cgi?id=112825)
- FileDiagramDocumentProvider listens only for diagram file changes in eclipse Resources subsystem -> the rest of the loaded EMF resources (semantic model files) could be changed on disk without corresponding processing (refresh) in diagram editor
- eclipse Resource renaming processed only for diagram file
- save action saves only diagram resource

I suggest to create separate class ResourceSetDiagramDocumentProvider based on EMF ResourceSet internally and implementing all these requirements.
Comment 1 Alex Shatalin CLA 2006-11-14 11:40:44 EST
Created attachment 53827 [details]
Implementation of the corresponding DocumentProvider
Comment 2 Alex Shatalin CLA 2006-11-14 11:42:37 EST
Attached patch conteins required DocumentProvider implementstion. Currently tooling re-generate this implementation for each diagram. Once this patch will be commited, generated code will be able to use it.
Comment 3 Alex Shatalin CLA 2007-02-22 15:38:41 EST
Created attachment 59606 [details]
More correct version created

This version works without any *EditorInputProxies + with EMF URIEditorInput
Comment 4 Alex Shatalin CLA 2007-02-22 15:39:55 EST
Comment on attachment 53827 [details]
Implementation of the corresponding DocumentProvider

New version created
Comment 5 Alex Shatalin CLA 2007-02-22 15:45:37 EST
Without this class generator always produce a lot of identical code.
Comment 6 Alex Shatalin CLA 2007-02-26 06:46:12 EST
Created attachment 59772 [details]
Removing ResourceSetModificationListener in ResourceSetInfo.dispose()
Comment 7 Alex Boyko CLA 2007-04-05 15:49:35 EDT
*** Bug 174501 has been marked as a duplicate of this bug. ***
Comment 8 Mohammed Mostafa CLA 2007-04-17 18:16:05 EDT
Hi Alex;

   The Attached Patch does not filter touch events

So, i have modified it to do so.
Take a look at the modified pacth and let me know what do you think.
If you agree the change is acceptable i can commit the change  
Comment 9 Mohammed Mostafa CLA 2007-04-17 18:16:34 EDT
Created attachment 64111 [details]
Tacking care of touch events
Comment 10 Alex Shatalin CLA 2007-04-25 07:08:38 EDT
Now GMF is generating RCP-compatible code. Different DocumentProvider should be used in this mode. Nevertheless, huge part of ResourceSetDiagramDocumentProvider could be reused in RCP mode too. So, to my understanding the best solution would be to split ResourceSetDiagramDocumentProvider on at least 2 classes – RCPDiagramDocumentProvider and IDEDiagramDocumentProvider. First one will support URIEditorInput, second will subclass RCPDiagramDocumentProvider and support FileEditorInput in addition. 

What do you think of this? I can provide you with modified patch if you agree it make sense and point me to the appropriate plugin for RCPDiagramDocumentProvider (org.eclipse.gmf.runtime.diagram.ui.resources.editor ?).
Comment 11 Alex Shatalin CLA 2007-06-04 06:25:38 EDT
Any news about comment #10?
Comment 12 Anthony Hunter CLA 2007-06-08 11:47:36 EDT
Since this is marked major we need to do something with this Bugzilla.
Comments?
Comment 13 Linda Damus CLA 2007-06-08 12:44:34 EDT
I second Alex's proposal in comment 10 to split up the implementation so that we can have an RCP-compliant version of the document provider in addition to the one with IDE dependencies.
Comment 14 Mohammed Mostafa CLA 2007-06-08 15:42:00 EDT
(In reply to comment #13)
> I second Alex's proposal in comment 10 to split up the implementation so that
> we can have an RCP-compliant version of the document provider in addition to
> the one with IDE dependencies.

I agree this sounds like a good idea.
But since I知 moving to another team on June 15, and have other work to do in the remaining 5 days, i guess it might make more sense to move the defect to someone else to think about the best way to do it.
Comment 15 Cherie Revells CLA 2007-06-18 16:46:53 EDT
Alex, I am taking over this bugzilla from Mohammed.  In response to comment#10, yes, I think that org.eclipse.gmf.runtime.diagram.ui.resources.editor plugin is the correct place for the RCP version.  So you will split up the original class into the RCP and IDE versions?
Comment 16 Anthony Hunter CLA 2007-06-19 13:35:52 EDT
Not sure if this is 2.0, 2.0.x or 2.1.
Comment 17 Artem Tikhomirov CLA 2007-06-20 13:59:44 EDT
I'd say 2.0 but it's too late. Perhaps, 2.0.1 then?
Comment 18 Anthony Hunter CLA 2007-06-20 14:08:08 EDT
(In reply to comment #17)
> I'd say 2.0 but it's too late. Perhaps, 2.0.1 then?

2.0.1 then.
Comment 19 Alex Shatalin CLA 2009-06-29 08:49:47 EDT
Moving to GMF 3.0
Comment 20 Eclipse Webmaster CLA 2010-07-19 12:30:27 EDT
[GMF Restructure] Bug 319140 : product GMF and component Runtime Diagram was the original product and component for this bug