Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Adding Root Domain Object on Diagram Creation
Adding Root Domain Object on Diagram Creation [message #1001959] Thu, 17 January 2013 11:02 Go to previous message
Dan Simkins is currently offline Dan Simkins
Messages: 36
Registered: December 2012
Member
Hi,

I have created a custom Diagram Editor by extending DiagramEditor.

I have created a custom New Diagram Wizard by extending BasicNewResourceWizard.

I am struggling to determine the correct place to automatically add the root domain object on diagram creation. I have tried after opening the newly created diagram as follows:

try
{
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor( editorInput, editorID );

ModelPackageImpl.init();
Model model = ControlFactory.eINSTANCE.createModel();
diagram.eResource().getContents().add( model );
}

and whilst I get no exception, the resultant new diagram file does not contain the root domain object.

Any pointers would be greatly appreciated.

Thanks

Dan
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:Graphiti . EMF Validation
Next Topic:Manhattan Connection routing
Goto Forum:
  


Current Time: Fri May 24 10:31:35 EDT 2013

Powered by FUDForum. Page generated in 0.01975 seconds