public boolean handleObject(BeanObserveInfo object) {
return true;
}
public VariableDeclarationFragment getKeyObject(BeanObserveInfo observe) {
FragmentReferenceProvider provider =
(FragmentReferenceProvider) observe.getReferenceProvider();
return provider.getFragment();
}
public boolean equals(VariableDeclarationFragment key0, VariableDeclarationFragment key1) {
return key0 == key1;
}
public BeanObserveInfo findObject(Map<VariableDeclarationFragment, BeanObserveInfo> keyObjectToObject,
VariableDeclarationFragment key) throws Exception {
return null;
}
public BeanObserveInfo createObject(VariableDeclarationFragment fragment)
throws Exception {
try {
// prepare bean class
Type type = CoreUtils.getType(fragment, true);
Class<?> beanClass =
CoreUtils.load(
CoreUtils.classLoader(root),
AstNodeUtils.getFullyQualifiedName(type, true));
// prepare association widget
JavaInfo widget = getJavaInfoRepresentedBy(root, fragment.getName().getIdentifier());
//
IReferenceProvider referenceProvider = new FragmentReferenceProvider(fragment);
//
IObservePresentation presentation =
new BeanObservePresentation(beanClass,
referenceProvider,
widget,