Package org.dyno.visual.swing.plugin.spi

Examples of org.dyno.visual.swing.plugin.spi.ParserException


            return result;
        }
      }
    } catch (JavaModelException jme) {
      ParserPlugin.getLogger().error(jme);
      throw new ParserException(jme);
    }
    return null;
  }
View Full Code Here


          parsePropertyValue(lnf, cunit, beanAdapter);
          beanAdapter.clearDirty();
          return beanAdapter;
        }
      } else {
        throw new ParserException("This is not a swing class!");
      }
    } catch (ParserException pe) {
      throw pe;
    } catch (Throwable e) {
      ParserPlugin.getLogger().error(e);
      throw new ParserException(e);
    }
    return null;
  }
View Full Code Here

        }
      } catch (ParserException e) {
        throw e;
      } catch (Exception e) {
        ParserPlugin.getLogger().error(e);
        throw new ParserException(e);
      }
    }
  }
View Full Code Here

    Object fieldValue = null;
    try {
      fieldValue = field.get(bean);
    } catch (Exception e) {
      ParserPlugin.getLogger().error(e);
      throw new ParserException(e);
    }

    JComponent fieldComponent = (JComponent) fieldValue;
    WidgetAdapter adapter = ExtensionRegistry.createWidgetAdapter(fieldComponent, true);
    if (adapter.getWidget() != fieldComponent && fieldComponent instanceof JPopupMenu && adapter.getWidget() instanceof JPopupMenu) {
      JComponent jcomp = findPopupInvoker((JPopupMenu) fieldComponent, bean);
      if (jcomp != null) {
        jcomp.setComponentPopupMenu((JPopupMenu) adapter.getWidget());
      }
    }
    adapter.setName(fieldName);
    adapter.setLastName(fieldName);
    int flags = field.getModifiers();
    setAdapterFieldAccess(adapter, flags);

    String getName = NamespaceUtil.getGetMethodName(fieldName);
    Method getMethod = null;
    try {
      getMethod = clazz.getDeclaredMethod(getName);
    } catch (NoSuchMethodException nsme) {
      getName = NamespaceUtil.getGetMethodName(cunit, fieldName);
      if (getName == null)
        throw new ParserException("Method " + NamespaceUtil.getGetMethodName(fieldName) + "() is not found!\n" + "Please define it to initialize " + fieldName);
      try {
        getMethod = clazz.getDeclaredMethod(getName);
        WidgetAdapter ba = WidgetAdapter.getWidgetAdapter(fieldComponent);
        ba.setProperty("getMethodName", getName);
      } catch (NoSuchMethodException e) {
        throw new ParserException("Method " + getName + "() is not found!\n" + "Please define it to initialize " + fieldName);
      }
    }

    flags = getMethod.getModifiers();
    setAdapterGetMethodAccess(adapter, flags);
View Full Code Here

TOP

Related Classes of org.dyno.visual.swing.plugin.spi.ParserException

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.