コード例 #1
0
 @Override
 protected void updateItem(MBindingContext item, boolean empty) {
   super.updateItem(item, empty);
   if (item != null) {
     setText("BindingContext - " + item.getName());
     System.err.println(pool.getImageUnchecked(ResourceProvider.Model_BindingContext));
     setGraphic(new ImageView(pool.getImageUnchecked(ResourceProvider.Model_BindingContext)));
   }
 }
コード例 #2
0
 private void defineContexts(MBindingContext parent, MBindingContext current) {
   if (current.getName() == null || current.getElementId() == null) {
     logger.error("Binding context name or id is null for: " + current); // $NON-NLS-1$
     return;
   }
   Context context = contextManager.getContext(current.getElementId());
   if (!context.isDefined()) {
     String localizedName =
         LocalizationHelper.getLocalized(current.getName(), current, application.getContext());
     String localizedDescriptor =
         LocalizationHelper.getLocalized(
             current.getDescription(), current, application.getContext());
     context.define(
         localizedName, localizedDescriptor, parent == null ? null : parent.getElementId());
   }
   for (MBindingContext child : current.getChildren()) {
     defineContexts(current, child);
   }
 }