use of org.eclipse.wb.internal.rcp.databinding.xwt.model.BindingInfo in project windowbuilder by eclipse.
the class DatabindingsProvider method gotoDefinition.
@Override
public void gotoDefinition(IBindingInfo ibinding) {
BindingInfo binding = (BindingInfo) ibinding;
int position = binding.getDefinitionOffset();
if (position != -1) {
IDesignPageSite site = IDesignPageSite.Helper.getSite(m_xmlObjectRoot);
site.openSourcePosition(position);
}
}
use of org.eclipse.wb.internal.rcp.databinding.xwt.model.BindingInfo in project windowbuilder by eclipse.
the class DatabindingsProvider method createBinding.
// //////////////////////////////////////////////////////////////////////////
//
// Creation/Editing
//
// //////////////////////////////////////////////////////////////////////////
@Override
public IBindingInfo createBinding(IObserveInfo target, IObserveInfo targetProperty, IObserveInfo model, IObserveInfo modelProperty) throws Exception {
// prepare target
BindableInfo targetBindable = (BindableInfo) target;
BindableInfo targetBindableProperty = (BindableInfo) targetProperty;
IObservableFactory targetFactory = targetBindableProperty.getObservableFactory();
// prepare model
BindableInfo modelBindable = (BindableInfo) model;
BindableInfo modelBindableProperty = (BindableInfo) modelProperty;
IObservableFactory modelFactory = modelBindableProperty.getObservableFactory();
// calculate type
Type type = org.eclipse.wb.internal.rcp.databinding.DatabindingsProvider.calculateObserveType(targetFactory, modelFactory);
// handle input type
if (type == Type.Input) {
// XXX
throw new UnsupportedOperationException();
}
// create binding
BindingInfo binding = new BindingInfo(targetBindable, targetBindableProperty, modelBindable, modelBindableProperty);
binding.setDocumentEditor(new AttributeDocumentEditor(binding));
//
return binding;
}
use of org.eclipse.wb.internal.rcp.databinding.xwt.model.BindingInfo in project windowbuilder by eclipse.
the class DatabindingsProvider method getContentProviders.
// //////////////////////////////////////////////////////////////////////////
//
// UI editing
//
// //////////////////////////////////////////////////////////////////////////
@Override
public List<IUiContentProvider> getContentProviders(IBindingInfo ibinding, IPageListener listener) throws Exception {
List<IUiContentProvider> providers = Lists.newArrayList();
BindingInfo binding = (BindingInfo) ibinding;
binding.createContentProviders(providers, listener, this);
return providers;
}
use of org.eclipse.wb.internal.rcp.databinding.xwt.model.BindingInfo in project windowbuilder by eclipse.
the class DatabindingParser method createBinding.
private BindingInfo createBinding(BindableInfo target, BindableInfo targetProperty, BindableInfo model, BindableInfo modelProperty, Map<String, String> attributes) throws Exception {
BindingInfo binding = new BindingInfo(target, targetProperty, model, modelProperty);
binding.setMode(attributes.get("mode"));
binding.setTrigger(attributes.get("updatesourcetrigger"));
m_provider.getBindings0().add(binding);
return binding;
}
Aggregations