Creating a node using CreateViewRequest [message #107284] |
Tue, 27 February 2007 14:10 |
Eclipse User |
|
|
|
Originally posted by: ganesh.mohan.hp.com
Hello,
I am facing a problem while creating a node using CreateViewRequest. I
used the following code.
--********************************************************** ***************--
ElementType "element" = GvxmlFactory.eINSTANCE.createElementType();
ContainerEditPart part = (ContainerEditPart)selectedPart.getParent();
CreateElementRequest request = new
CreateElementRequest(part.getEditingDomain(), EObject container,
GvxmlElementTypes.element);
viewRequest = CreateViewRequestFactory.getCreateShapeRequest
(GvxmlElementTypes."elementType", part.getDiagramPreferencesHint());
DiagramCommandStack stack =
part.getDiagramEditDomain().getDiagramCommandStack();
stack.execute(part.getCommand(viewRequest);
--********************************************************** *****************--
No exceptions are thrown, but the node is not created on the editor. Can
anyone please help me out in resolving this problem. Is there any other
way i can create an element on the editor programatically????
Thanx,
Ganesh
|
|
|
|
Re: Creating a node using CreateViewRequest [message #107397 is a reply to message #107310] |
Wed, 28 February 2007 06:56 |
Eclipse User |
|
|
|
Originally posted by: ganesh.mohan.hp.com
Hello Cherie,
The following exception is thrown while executing the createViewCommand.
-- ************************************************************ ***********
--
org.eclipse.core.commands.ExecutionException: While executing the
operation, an exception occurred
java.lang.IllegalStateException: Cannot activate read/write transaction in
read-only transaction context
While executing the operation, an exception occurred
-----------
*******************************************************----- ------
Thanx,
Ganesh
|
|
|
|
Powered by
FUDForum. Page generated in 0.04931 seconds