Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Problem creating view
Problem creating view [message #559824] Sun, 19 September 2010 16:28
123star  is currently offline 123star Friend
Messages: 70
Registered: June 2010

I'm trying to create the view of semantic elements, but I encountered an exception:

Here's the code:

public static void createNodeView(EObject element){

PapyrusMultiDiagramEditor editor = (PapyrusMultiDiagramEditor) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().getActiveEditor();

ViewDescriptor viewDescriptor = new ViewDescriptor(
new EObjectAdapter(element), Node.class, String.valueOf(ViewUtil.APPEND), editor.getDiagramEditPart().getDiagramPreferencesHint());

CreateViewRequest req = new CreateViewRequest(viewDescriptor);

Command comm = editor.getDiagramEditPart().getCommand(req);


Here's the exception:

Caused by: org.eclipse.core.runtime.AssertionFailedException: null argument:failed to create a view
at org.eclipse.core.runtime.Assert.isNotNull(
at ExecuteWithResult(
at org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTr ansactionalCommand.doExecute(AbstractTransactionalCommand.ja va:247)
at org.eclipse.emf.workspace.AbstractEMFOperation.execute(Abstr
at org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy.ex ecute(
at org.eclipse.gef.commands.CompoundCommand.execute(CompoundCom
at main.Shared.createNodeView(

I can't see the error, any suggestion?
Thanks in advance, 123star
Previous Topic:Actor in Block Definition Diagram?
Next Topic:Change Shape of Collaboration in UML2 Composite Diagram
Goto Forum:

Current Time: Fri Jul 03 21:08:40 GMT 2020

Powered by FUDForum. Page generated in 0.01840 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top