Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » ArrangeAll is not working as expected if we create the instances programatically(ArrangeAll is not working as expected if we create the instances programatically)
ArrangeAll is not working as expected if we create the instances programatically [message #1810055] Tue, 30 July 2019 07:21
Sharmila D is currently offline Sharmila DFriend
Messages: 81
Registered: June 2018
Member
Hii

Iam creating the instances programatically in design through external java action not used createInstance Task in design.
My external java action is working fine my instances are creating.

While creating the instances iam providing an option for user to give number so that , iam creating that many instances based on the user option.
This is the main code Iam using for creating the instances.
local_accessor.eAdd(global_target,
featureName, global_instance);

local_context.setNextPushEObject(global_instance);
As of now everything works fine. if 2 user gives then 2 instances are creating and they are overlapping so after creating only i thought of calling Arrange All.

Iam calling ArrangeAll but it is not working


IEditorPart local_editor1 = EclipseUIUtil.getActiveEditor();
List<Object> local_partsToArrange = new ArrayList<>(1);
if (local_editor1 instanceof DiagramEditor) {
DiagramEditor local_diagramEditor = (DiagramEditor) local_editor1;
DiagramEditPart local_diagramEditPart =
local_diagramEditor.getDiagramEditPart();
ArrangeRequest local_arrangeRequest =
new ArrangeRequest(ActionIds.ACTION_ARRANGE_ALL);
local_partsToArrange.add(local_diagramEditPart);
local_arrangeRequest.setPartsToArrange(local_partsToArrange);
local_diagramEditPart.performRequest(local_arrangeRequest);
}
by debugging I checked like in
DiagramEditPart local_diagramEditPart =
local_diagramEditor.getDiagramEditPart();

In local_diagramEditPart the children is showing null.

Why my edit parts are not showing still they are created.?

Is there anything extra like refreshing the diagram or any other I need to do to make those editparts available.

Please give me some suggestions
Previous Topic:How DDiagram Element can hold color if coloring done Programatically .
Next Topic:Java Service Not Called From Style Customization
Goto Forum:
  


Current Time: Sat Oct 19 06:49:10 GMT 2019

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

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

Back to the top