Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 363677

Summary: Publicly setting the editor input in Diagram Editor
Product: [Modeling] Graphiti Reporter: saurav sarkar <saurav.sarkar1>
Component: CoreAssignee: Project Inbox <graphiti-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: enhancement    
Priority: P4 CC: michael.wenz
Version: 0.8.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 336488    
Bug Blocks:    

Description saurav sarkar CLA 2011-11-14 03:10:51 EST
Hi,

This is the bug request related to the forum post here http://www.eclipse.org/forums/index.php/t/261853/

I would need a mechanism to set the Graphical input in the Diagram editor which would then set the diagram from my model.
I was having my doubts over exposing the setInput method from the Diagram Editor class, but then i saw the eclipse EditorPart API which mentions setInput can be exposed.

My scenario works if i make the setInput() in DiagramEditorInternal as public.
Please let me know if there are any better approaches or my proposed solution can be taken up.

cheers,
Saurav
Comment 1 Michael Wenz CLA 2011-11-22 07:52:35 EST
Marked as enhancement request.

This can be tangled earliest after the editor APIs have been refined (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=336488). Even when this is done I'm not yet convinced that this would be a wise thing to do or if we should not better stick to the current paradigm that diagram editors can not be reused.
Comment 2 saurav sarkar CLA 2011-11-23 01:03:53 EST
Hi Michael,

Thanks for the info.
At least making the setInput() protected would help as, so that we can extend the diagram editor and can call the super.

We would like to have it urgently as our release depends on this :).
If possible i can attach a patch and provide the fix .

cheers,
Saurav
Comment 3 Michael Wenz CLA 2011-11-23 03:23:12 EST
(In reply to comment #2)
> Hi Michael,
> Thanks for the info.
> At least making the setInput() protected would help as, so that we can extend
> the diagram editor and can call the super.
> We would like to have it urgently as our release depends on this :).
> If possible i can attach a patch and provide the fix .
> cheers,
> Saurav

Hi Saurav,

well, the setInput method is already protected so you could do as you proposed, can't you?

Michael
Comment 4 saurav sarkar CLA 2011-11-23 03:41:29 EST
oops..sorry i must have overlooked it :).
I will look at it
Comment 5 Michael Wenz CLA 2016-02-09 10:31:56 EST
Requested method was already there