コード例 #1
0
 public PropertySourceTableView(Class<?> beanType) {
   this(beanType.getName());
   try {
     this.exemplar = new BeanPropertySource(null, beanType);
   } catch (IntrospectionException e) {
     Activator.getLogger()
         .warning("Failed to create BeanPropertySource for " + beanType.getName() + ". " + e, e);
   }
 }
コード例 #2
0
ファイル: NodeSupport.java プロジェクト: nickboldt/fuseide
 public IPropertySource getPropertySource() {
   if (propertySource == null) {
     try {
       propertySource = createPropertySource();
     } catch (IntrospectionException e) {
       Activator.getLogger().warning("Failed to create PropertySource for " + this + ". " + e, e);
     }
   }
   return propertySource;
 }
コード例 #3
0
ファイル: NodeSupport.java プロジェクト: nickboldt/fuseide
 @Override
 public IPropertySource getPropertySource(Object object) {
   // avoid infinite recursion!
   if (object != null && object != this) {
     // System.out.println("====== warning getPropertySource() asked for: " + object + " of class:
     // "+ object.getClass());
     return null;
   }
   if (object == null) {
     return null;
   }
   if (propertySource == null) {
     try {
       propertySource = createPropertySource();
     } catch (Exception e) {
       Activator.getLogger().warning(e);
     }
   }
   return propertySource;
 }
コード例 #4
0
  @Override
  public void setInput(IWorkbenchPart part, ISelection selection) {
    if (part == getPart() && selection == getSelection()) {
      return;
    }
    super.setInput(part, selection);
    if (page != null) {
      page.getControl().removeControlListener(controlListener);
      aboutToBeHidden();
      page.dispose();
      page.getControl().dispose();
      page = null;
    }
    Object first = Selections.getFirstSelection(selection);
    if (first == null) {
      return;
    }
    page = createPage(first);
    if (page != null) {
      if (page instanceof IPageBookViewPage) {
        try {
          ((IPageBookViewPage) page).init(parentPage.getSite());
        } catch (PartInitException e) {
          Activator.getDefault().getLog().log(e.getStatus());
        }
      }
      page.createControl(container);
      FormData data = new FormData();
      data.left = new FormAttachment(0, 0);
      data.right = new FormAttachment(100, 0);
      data.top = new FormAttachment(0, 0);
      data.bottom = new FormAttachment(100, 0);
      page.getControl().setLayoutData(data);

      page.getControl().addControlListener(controlListener);
    }

    container.layout(true, true);
    parentPage.resizeScrolledComposite();
  }