Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Associate diagram extension
Associate diagram extension [message #903273] Wed, 22 August 2012 15:22 Go to next message
Rui Domingues is currently offline Rui Domingues
Messages: 189
Registered: October 2010
Senior Member
Risking to be the most annoying person in this forum, I'd like to know How can I associate an extension to my diagram files, and How can I create and open programmatically an either new or saved diagram file?

Thanks in advance
Re: Associate diagram extension [message #903709 is a reply to message #903273] Thu, 23 August 2012 08:40 Go to previous messageGo to next message
Michael Wenz is currently offline Michael Wenz
Messages: 1590
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Rui,

This can be done using the standard Eclipse editor extension point
(org.eclipse.ui.editors) and defining the file extension there. Either use
the standard Graphiti DiagramEditor class or your own subclass of it. (Don't
forget the DiagramEditorActionBarContributor...)

Opening the editor can simply be done programmatically by standard Eclipse
functionality:
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor().

Michael
Re: Associate diagram extension [message #903862 is a reply to message #903709] Sun, 26 August 2012 15:21 Go to previous message
Rui Domingues is currently offline Rui Domingues
Messages: 189
Registered: October 2010
Senior Member
Hi. Thank you very much.

Rui
Previous Topic:Graphiti and e4 / compatibility layer
Next Topic:Delete Feature does not work in MPE
Goto Forum:
  


Current Time: Mon Sep 01 10:07:27 EDT 2014

Powered by FUDForum. Page generated in 0.11180 seconds