Skip to main content



      Home
Home » Eclipse Projects » Sirius » Disable automatic arrange all on diagram opening
Disable automatic arrange all on diagram opening [message #1730619] Wed, 27 April 2016 03:35 Go to next message
Eclipse UserFriend
Hi,

When I open my diagram for the first time Sirius automatically reorder my elements.
Is there a way to get this disabled ?

Thanks,
Alex
Re: Disable automatic arrange all on diagram opening [message #1730803 is a reply to message #1730619] Thu, 28 April 2016 10:45 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

Would you give us more informations (context, action for behavior
reproduction)
Is your diagram created programaticaly?
If yes, you can choose the coordinates to set àt the opening diagram

Regards,



--
Julien - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Disable automatic arrange all on diagram opening [message #1730807 is a reply to message #1730803] Thu, 28 April 2016 11:37 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

In fact I call a java service at the opening of my diagram (not created programaticaly), my elements have semantics fields in which is stored the position X and Y, so the java service takes the value of this fields and sets the positions of the elements Nodes on the diagram. (For example if my element has X = 50, and Y = 100 it's corresponding node coordinates has to be X = 50 and Y = 100).
It's working fine and I can see the elements in place for like 0.5seconds and then the system probably triggers and arrangeAll command that put back my element on line.
This is what I want to disable (if possible of course).

Thanks,
Alex
Re: Disable automatic arrange all on diagram opening [message #1731991 is a reply to message #1730807] Wed, 11 May 2016 09:14 Go to previous messageGo to next message
Eclipse UserFriend
up
Re: Disable automatic arrange all on diagram opening [message #1732115 is a reply to message #1731991] Thu, 12 May 2016 12:56 Go to previous messageGo to next message
Eclipse UserFriend
Hi Alx,

Not sure if it helps you , but Did you try to set positions on partOpened and not on opening ?

for example in your Activator class add the following:
DiagramHandler handler = new DiagramHandler();

and have Diagram Handler Class something like this:
public class DiagramHandler {

	public DiagramHandler() {
		PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().addPartListener(new IPartListener2() {
			
			@Override
			public void partVisible(IWorkbenchPartReference partRef) {
				// TODO Auto-generated method stub
				
			}
			
			@Override
			public void partOpened(IWorkbenchPartReference partRef) {
								IEditorPart editorPart = partRef.getPage().getActiveEditor();
				if (editorPart != null && editorPart instanceof DiagramEditor) {
					if (editorPart instanceof DiagramEditor) {
						DiagramEditPart diagramEditPart = ((DiagramEditor) editorPart).getDiagramEditPart();
}
}
			}
			
			@Override
			public void partInputChanged(IWorkbenchPartReference partRef) {
				// TODO Auto-generated method stub
				
			}
			
			@Override
			public void partHidden(IWorkbenchPartReference partRef) {
				// TODO Auto-generated method stub
				
			}
			
			@Override
			public void partDeactivated(IWorkbenchPartReference partRef) {
				// TODO Auto-generated method stub
				
			}
			
			@Override
			public void partClosed(IWorkbenchPartReference partRef) {
				// TODO Auto-generated method stub
				
			}
			
			@Override
			public void partBroughtToTop(IWorkbenchPartReference partRef) {
				// TODO Auto-generated method stub
				
			}
			
			@Override
			public void partActivated(IWorkbenchPartReference partRef) {
				// TODO Auto-generated method stub
				
			}
		});
}


I hope it helps,
Bests,
Parsa

[Updated on: Thu, 12 May 2016 12:58] by Moderator

Re: Disable automatic arrange all on diagram opening [message #1732421 is a reply to message #1732115] Tue, 17 May 2016 03:25 Go to previous message
Eclipse UserFriend
Thanks Parsa, I'll try your solution and let you know if it works.
Previous Topic:EmbededEditor with diagram
Next Topic:How to create an object view from an external java action?
Goto Forum:
  


Current Time: Mon Mar 24 23:39:26 EDT 2025

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

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

Back to the top