Hi everyone,
I was searching on the mailing list but did not find a sufficient
answer fop my problem.
I want to use my own layoutProvider while using the already existing
menu item "Arrange All".
I did the following things so far:
1. Add the extension point, see below:
<extension name="PSC Viewer Layout Provider"
point="org.eclipse.gmf.runtime.diagram.ui.layoutProviders">
<layoutProvider class="ui.diagram.providers.LayoutProvider">
<Priority name="Highest">
</Priority>
</layoutProvider>
</extension>
2. Create a class derived from
org.eclipse.gmf.runtime.diagram.ui.services.layout.AbstractLayoutNodeProvider
public class PscViewerLayoutProvider extends
AbstractLayoutNodeProvider {
public Runnable layoutLayoutNodes(List layoutNodes,
boolean offsetFromBoundingBox, IAdaptable layoutHint) {
System.out.println("layoutNodes: "+layoutNodes.toString());
System.out.println("offsetFromBoundingBox: "+offsetFromBoundingBox);
System.out.println("layoutHint: "+layoutHint.toString());
return null;
}
public boolean provides(IOperation operation) {
System.out.println(""+operation.toString());
if (operation instanceof
org.eclipse.gmf.runtime.diagram.ui.services.layout.ILayoutNodeOperation)
{
System.out.println("true");
return true;
}
System.out.println("false");
return false;
}
}
I would expect to see at least the println while calling "Arrange All".
But I don't see any thing at System.out!
Does any one could please give me a hint how to solve the problem?
Thanks, Martin