Examples of ObjectEventListener


Examples of org.eclipse.wb.core.model.broadcast.ObjectEventListener

  //
  // Constructor
  //
  ////////////////////////////////////////////////////////////////////////////
  public UpdateSizeOnChildOutSupport(XmlObjectInfo root) {
    root.addBroadcastListener(new ObjectEventListener() {
      @Override
      public void childRemoveBefore(ObjectInfo parent, ObjectInfo child) throws Exception {
        removeSize(child);
      }
    });
View Full Code Here

Examples of org.eclipse.wb.core.model.broadcast.ObjectEventListener

  //
  // Context menu
  //
  ////////////////////////////////////////////////////////////////////////////
  private void contributeWidgetContextMenu() {
    addBroadcastListener(new ObjectEventListener() {
      @Override
      public void addContextMenu(List<? extends ObjectInfo> objects,
          ObjectInfo object,
          IMenuManager manager) throws Exception {
        if (object instanceof WidgetInfo && object.getParent() == AbsolutePanelInfo.this) {
View Full Code Here

Examples of org.eclipse.wb.core.model.broadcast.ObjectEventListener

  public WidgetInfo(EditorContext context,
      ComponentDescription description,
      CreationSupport creationSupport) throws Exception {
    super(context, description, creationSupport);
    // contribute context menu
    addBroadcastListener(new ObjectEventListener() {
      @Override
      public void addContextMenu(List<? extends ObjectInfo> objects,
          ObjectInfo object,
          IMenuManager manager) throws Exception {
        if (object == m_this) {
View Full Code Here

Examples of org.eclipse.wb.core.model.broadcast.ObjectEventListener

            && newParent != oldParent) {
          cleanUpWidget(child);
        }
      }
    });
    addBroadcastListener(new ObjectEventListener() {
      @Override
      public void childRemoveAfter(ObjectInfo parent, ObjectInfo child) throws Exception {
        if (child instanceof WidgetInfo && parent == HTMLTableInfo.this) {
          // remove setX() invocations for widget cell
          {
View Full Code Here

Examples of org.eclipse.wb.core.model.broadcast.ObjectEventListener

  /**
   * Adds {@link HTMLTableInfo} actions into context menu.
   */
  private void addContextMenuActions() {
    addBroadcastListener(new ObjectEventListener() {
      @Override
      public void addContextMenu(List<? extends ObjectInfo> objects,
          ObjectInfo object,
          IMenuManager manager) throws Exception {
        if (object instanceof WidgetInfo && object.getParent() == HTMLTableInfo.this) {
View Full Code Here

Examples of org.eclipse.wb.core.model.broadcast.ObjectEventListener

  private void cleanup_IconHelper(JavaInfo root) {
    try {
      final ClassLoader classLoader = JavaInfoUtils.getClassLoader(root);
      final Class<?> classIconHelper =
          classLoader.loadClass("com.extjs.gxt.ui.client.util.IconHelper");
      root.addBroadcastListener(new ObjectEventListener() {
        @Override
        public void refreshDispose() throws Exception {
          // 2.0.1
          {
            Field field = ReflectionUtils.getFieldByName(classIconHelper, "initialized");
View Full Code Here

Examples of org.eclipse.wb.core.model.broadcast.ObjectEventListener

  private void cleanup_TextMetrics(JavaInfo root) {
    try {
      final ClassLoader classLoader = JavaInfoUtils.getClassLoader(root);
      final Class<?> classTextMetics =
          classLoader.loadClass("com.extjs.gxt.ui.client.util.TextMetrics");
      root.addBroadcastListener(new ObjectEventListener() {
        @Override
        public void refreshDispose() throws Exception {
          ReflectionUtils.setField(classTextMetics, "instance", null);
        }
      });
View Full Code Here

Examples of org.eclipse.wb.core.model.broadcast.ObjectEventListener

   * <li>When <code>LayoutData</code> has all default values, then we can delete it at all.</li>
   * </ul>
   */
  private void turnIntoBlock_whenEnsureVariable() {
    // no invocations/fields -> inline
    addBroadcastListener(new ObjectEventListener() {
      @Override
      public void endEdit_aboutToRefresh() throws Exception {
        if (getVariableSupport() instanceof LocalUniqueVariableSupport) {
          LocalUniqueVariableSupport variableSupport =
              (LocalUniqueVariableSupport) getVariableSupport();
          if (variableSupport.canInline()) {
            variableSupport.inline();
          }
        }
      }
    });
    // is default -> delete
    addBroadcastListener(new ObjectEventListener() {
      @Override
      public void endEdit_aboutToRefresh() throws Exception {
        if (!isDeleted()
            && getCreationSupport() instanceof ConstructorCreationSupport
            && getMethodInvocations().isEmpty()
View Full Code Here

Examples of org.eclipse.wb.core.model.broadcast.ObjectEventListener

          value[0] = stringValue.replace(' ', '_');
        }
      }
    });
    // contribute context menu
    addBroadcastListener(new ObjectEventListener() {
      @Override
      public void addContextMenu(List<? extends ObjectInfo> objects,
          ObjectInfo object,
          IMenuManager manager) throws Exception {
        if (object == m_this) {
View Full Code Here

Examples of org.eclipse.wb.core.model.broadcast.ObjectEventListener

          }
        }
      }
    });
    // dispose on hierarchy dispose
    m_context.getBroadcastSupport().addListener(null, new ObjectEventListener() {
      @Override
      public void dispose() throws Exception {
        for (ContextDescription context : m_contextDescriptions) {
          context.dispose();
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.