Skip to content

Commit

Permalink
[506331] Centralize ContentBehavior to be bound to root part alone.
Browse files Browse the repository at this point in the history
- Ensured that ContentBehavior is only bound to root part and not to all
content parts.
- Changed synchronization to be based on four passes.
  • Loading branch information
nyssen authored and mwienand committed Dec 12, 2016
1 parent 284109a commit ef77cc2
Show file tree
Hide file tree
Showing 2 changed files with 218 additions and 155 deletions.
21 changes: 0 additions & 21 deletions org.eclipse.gef.mvc.fx/src/org/eclipse/gef/mvc/fx/MvcFxModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,6 @@ protected void bindAbstractContentPartAdapters(
// register default providers
bindTransformProviderAsAbstractContentPartAdapter(adapterMapBinder);

// register default behaviors
bindContentBehaviorAsAbstractContentPartAdapter(adapterMapBinder);

// register default policies
bindContentPolicyAsAbstractContentPartAdapter(adapterMapBinder);
}
Expand Down Expand Up @@ -230,24 +227,6 @@ protected void bindClickDragToolAsDomainAdapter(
.to(ClickDragTool.class);
}

/**
* Adds a binding for {@link ContentBehavior}, parameterized by {@link Node}
* , to the {@link AdapterMap} binder for {@link AbstractContentPart}.
*
* @param adapterMapBinder
* The {@link MapBinder} to be used for the binding registration.
* In this case, will be obtained from
* {@link AdapterMaps#getAdapterMapBinder(Binder, Class)} using
* {@link AbstractContentPart} as a key.
*
* @see AdapterMaps#getAdapterMapBinder(Binder, Class)
*/
protected void bindContentBehaviorAsAbstractContentPartAdapter(
MapBinder<AdapterKey<?>, Object> adapterMapBinder) {
adapterMapBinder.addBinding(AdapterKey.defaultRole())
.to(ContentBehavior.class);
}

/**
* Adds a binding for {@link ContentBehavior}, parameterized by {@link Node}
* , to the {@link AdapterMap} binder for {@link IRootPart}.
Expand Down
Loading

0 comments on commit ef77cc2

Please sign in to comment.