use of org.eclipse.wb.internal.swing.databinding.model.beans.ElPropertyObserveInfo in project windowbuilder by eclipse.
the class ElPropertyInfo method getObserveProperty.
@Override
public ObserveInfo getObserveProperty(ObserveInfo observeObject) throws Exception {
// configure observe object account with base property
if (m_baseProperty != null) {
Assert.instanceOf(BeanPropertyInfo.class, m_baseProperty);
observeObject = m_baseProperty.getObserveProperty(observeObject);
}
// find property
for (IObserveInfo observeProperty : observeObject.getChildren(ChildrenContext.ChildrenForPropertiesTable)) {
if (observeProperty instanceof ElPropertyObserveInfo) {
return (ObserveInfo) observeProperty;
}
}
return null;
}
use of org.eclipse.wb.internal.swing.databinding.model.beans.ElPropertyObserveInfo in project windowbuilder by eclipse.
the class ChooseClassAndPropertiesUiContentProvider method handleELProperty.
// //////////////////////////////////////////////////////////////////////////
//
// Properties
//
// //////////////////////////////////////////////////////////////////////////
private void handleELProperty() {
try {
Object[] elements = m_treeViewer.getCheckedElements();
if (m_elProperty) {
if (elements.length == 1) {
ObservePropertyAdapter adapter = (ObservePropertyAdapter) elements[0];
if (adapter.getProperty() instanceof ElPropertyObserveInfo) {
m_elPropertyUIContentProvider.setProperty((ElPropertyInfo) convertAdapterToProperty(new BeanSupport(), m_choosenClass, adapter));
return;
}
}
m_elProperty = false;
m_elPropertyUIContentProvider.setProperty(null);
} else if (elements.length == 1) {
ObservePropertyAdapter adapter = (ObservePropertyAdapter) elements[0];
if (adapter.getProperty() instanceof ElPropertyObserveInfo) {
m_elProperty = true;
m_elPropertyUIContentProvider.setProperty((ElPropertyInfo) convertAdapterToProperty(new BeanSupport(), m_choosenClass, adapter));
}
}
} catch (Throwable e) {
DesignerPlugin.log(e);
}
}
use of org.eclipse.wb.internal.swing.databinding.model.beans.ElPropertyObserveInfo in project windowbuilder by eclipse.
the class ColumnBindingUiContentProvider method handleELProperty.
private void handleELProperty() {
IGenericType objectType = binding.getJTableBinding().getInputElementType();
try {
Object[] elements = treeViewer.getCheckedElements();
if (elProperty) {
if (elements.length == 1) {
ObservePropertyAdapter adapter = (ObservePropertyAdapter) elements[0];
if (adapter.getProperty() instanceof ElPropertyObserveInfo) {
elPropertyUIContentProvider.setProperty((ElPropertyInfo) convertAdapterToProperty(new BeanSupport(), objectType, adapter));
return;
}
}
elProperty = false;
elPropertyUIContentProvider.setProperty(null);
} else if (elements.length == 1) {
ObservePropertyAdapter adapter = (ObservePropertyAdapter) elements[0];
if (adapter.getProperty() instanceof ElPropertyObserveInfo) {
elProperty = true;
elPropertyUIContentProvider.setProperty((ElPropertyInfo) convertAdapterToProperty(new BeanSupport(), objectType, adapter));
}
}
} catch (Throwable e) {
DesignerPlugin.log(e);
}
}
Aggregations