use of org.eclipse.wb.internal.core.databinding.model.IBindingInfo in project windowbuilder by eclipse.
the class ControllerSupport method convertJavaInfosToGetters.
private static void convertJavaInfosToGetters(DatabindingsProvider provider, AstEditor editor, TypeDeclaration rootNode) throws Exception {
provider.setController(true);
provider.setControllerViewerField("m_" + StringUtils.uncapitalize(rootNode.getName().getIdentifier()));
//
List<IBindingInfo> bindings = provider.getBindings();
for (IBindingInfo binding : bindings) {
convertJavaInfoToGetter(provider, binding.getModel());
convertJavaInfoToGetter(provider, binding.getTarget());
}
editor.commitChanges();
}
use of org.eclipse.wb.internal.core.databinding.model.IBindingInfo in project windowbuilder by eclipse.
the class JComboBoxSelfObserveProperty method getText.
@Override
protected String getText() throws Exception {
IBindingInfo binding = getBinding();
if (binding == null) {
return "";
}
int column = binding.getTargetProperty() == m_observeProperty ? 2 : 1;
return BindingLabelProvider.INSTANCE.getColumnText(binding, column);
}
use of org.eclipse.wb.internal.core.databinding.model.IBindingInfo in project windowbuilder by eclipse.
the class ObserveProperty method getBindings.
// //////////////////////////////////////////////////////////////////////////
//
// AbstractObserveProperty
//
// //////////////////////////////////////////////////////////////////////////
@Override
public void getBindings(List<IBindingInfo> bindings, List<Boolean> isTargets) throws Exception {
BindableInfo observeProperty = (BindableInfo) m_observeProperty;
bindings.addAll(observeProperty.getBindings());
//
for (IBindingInfo binding : bindings) {
isTargets.add(binding.getTargetProperty() == m_observeProperty);
}
}
use of org.eclipse.wb.internal.core.databinding.model.IBindingInfo in project windowbuilder by eclipse.
the class ObserveProperty method getBindings.
// //////////////////////////////////////////////////////////////////////////
//
// AbstractObserveProperty
//
// //////////////////////////////////////////////////////////////////////////
@Override
public void getBindings(List<IBindingInfo> bindings, List<Boolean> isTargets) throws Exception {
ObserveInfo observeProperty = (ObserveInfo) m_observeProperty;
bindings.addAll(observeProperty.getBindings());
//
for (IBindingInfo binding : bindings) {
isTargets.add(binding.getTargetProperty() == m_observeProperty);
}
}
use of org.eclipse.wb.internal.core.databinding.model.IBindingInfo 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);
}
}
Aggregations