Package org.openbp.common.generic.propertybrowser

Examples of org.openbp.common.generic.propertybrowser.ObjectDescriptor


  {
    Item item = context.getItem();
    if (requiredItemPropertyList != null && item != null)
    {
      StringBuffer errMsg = null;
      ObjectDescriptor od = null;

      int n = requiredItemPropertyList.size();
      for (int i = 0; i < n; ++i)
      {
        String property = (String) requiredItemPropertyList.get(i);

        Object value = null;
        try
        {
          value = PropertyAccessUtil.getProperty(item, property);
        }
        catch (PropertyException e)
        {
          System.err.println("Cannot access property '" + property + "': " + e);
        }

        if (value == null)
        {
          // Property not present
          if (errMsg == null)
          {
            // Initial text
            errMsg = new StringBuffer("The following required properties of the component have not been set:\n");
            try
            {
              // Get the object descriptor, but skip errors
              od = ObjectDescriptorMgr.getInstance().getDescriptor(item.getClass(), 0);
            }
            catch (XMLDriverException e)
            {
              System.err.println("Cannot access object descriptor for class '" + item.getClass().getName() + "': " + e);
            }
          }
          else
          {
            errMsg.append('\n');
          }

          String displayName = null;
          if (od != null)
          {
            // Try to get the display name of the property from the
            // object descriptor of the item
            PropertyDescriptor pd = od.getProperty(property);
            if (pd != null)
              displayName = pd.getDisplayName();
          }
          if (displayName == null)
            displayName = property;
View Full Code Here


      if (testMode.equals("ObjectDescriptor"))
      {
        try
        {
          ObjectDescriptor od = ObjectDescriptorMgr.getInstance().getDescriptor(ProcessItem.class, ObjectDescriptorMgr.ODM_THROW_ERROR);
          dumper.dump(od);
        }
        catch (XMLDriverException e)
        {
          ExceptionUtil.printTrace(e);
View Full Code Here

          ItemTypeDescriptor itd = ModelConnector.getInstance().getItemTypeDescriptor(itemType);

          ItemTypeToggleAction action = new ItemTypeToggleAction(getPlugin(), itd);

          String filterDescription = filterPrefix;
          ObjectDescriptor od = ItemUtil.obtainObjectDescriptor(itd);
          if (od != null)
          {
            filterDescription += " " + od.getDisplayName();
          }
          action.setDescription(filterDescription);
          action.setIcon(ItemIconMgr.getMultiIcon(ItemIconMgr.getInstance().getIcon(itemType, FlexibleSize.SMALL)));

          actionList.add(action);
View Full Code Here

    }

    try
    {
      // Create from object description data
      ObjectDescriptor objectDescriptor = ObjectDescriptorMgr.getInstance().getDescriptor(classType, ObjectDescriptorMgr.ODM_THROW_ERROR);

      node = new ObjectNode(objectDescriptor);
      if (node != null)
      {
        // Save to cache
View Full Code Here

TOP

Related Classes of org.openbp.common.generic.propertybrowser.ObjectDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.