Package org.eclipse.wb.internal.core.model.util

Examples of org.eclipse.wb.internal.core.model.util.ObjectInfoAction


    for (final LayoutDescription description : descriptions) {
      final Class<?> layoutClass = editorLoader.loadClass(description.getLayoutClassName());
      final String creationId = description.getCreationId();
      ComponentDescription layoutComponentDescription =
          ComponentDescriptionHelper.getDescription(editor, layoutClass);
      ObjectInfoAction action = new ObjectInfoAction(this) {
        @Override
        protected void runEx() throws Exception {
          description.ensureLibraries(editor.getJavaProject());
          LayoutInfo layout =
              (LayoutInfo) JavaInfoUtils.createJavaInfo(
                  getEditor(),
                  layoutClass,
                  new ConstructorCreationSupport(creationId, true));
          setLayout(layout);
        }
      };
      action.setText(description.getName());
      action.setImageDescriptor(new ImageImageDescriptor(layoutComponentDescription.getIcon()));
      layoutsManager.add(action);
    }
  }
View Full Code Here


    for (final LayoutDescription description : descriptions) {
      final Class<?> layoutClass = editorLoader.loadClass(description.getLayoutClassName());
      final String creationId = description.getCreationId();
      ComponentDescription layoutComponentDescription =
          ComponentDescriptionHelper.getDescription(editor, layoutClass);
      ObjectInfoAction action = new ObjectInfoAction(this) {
        @Override
        protected void runEx() throws Exception {
          description.ensureLibraries(editor.getJavaProject());
          LayoutInfo layout =
              (LayoutInfo) JavaInfoUtils.createJavaInfo(
                  getEditor(),
                  layoutClass,
                  new ConstructorCreationSupport(creationId, true));
          setLayout(layout);
        }
      };
      action.setText(description.getName());
      action.setImageDescriptor(new ImageImageDescriptor(layoutComponentDescription.getIcon()));
      layoutsManager.add(action);
    }
  }
View Full Code Here

      private void addAction(IMenuManager manager,
          String text,
          String iconName,
          final RunnableEx runnable) {
        Image icon = Activator.getImage("info/Grid/" + iconName + ".png");
        manager.appendToGroup(DesignContextMenuProvider.GROUP_TOP, new ObjectInfoAction(
            GridInfo.this, text, icon) {
          @Override
          protected void runEx() throws Exception {
            runnable.run();
          }
View Full Code Here

      new OrderingSupport(widgets, widget).contributeActions(manager);
    }
    // auto-size
    {
      IAction action =
          new ObjectInfoAction(widget, "Autosize widget",
              DesignerPlugin.getImageDescriptor("info/layout/absolute/fit_to_size.png")) {
            @Override
            protected void runEx() throws Exception {
              widget.getSizeSupport().setSize(null);
            }
View Full Code Here

      new OrderingSupport(widgets, widget).contributeActions(manager);
    }
    // auto-size
    {
      IAction action =
          new ObjectInfoAction(widget, "Autosize widget",
              DesignerPlugin.getImageDescriptor("info/layout/absolute/fit_to_size.png")) {
            @Override
            protected void runEx() throws Exception {
              widget.getSizeSupport().setSize(null);
            }
View Full Code Here

    IAction[] actions = new IAction[2];
    // try to find existing stub method
    {
      MethodDeclaration method = getMethodDeclaration(false);
      if (method != null) {
        actions[0] = new ObjectInfoAction(m_object) {
          @Override
          protected void runEx() throws Exception {
            openListener();
          }
        };
        actions[0].setText(name + " -> " + method.getName().getIdentifier());
        actions[0].setImageDescriptor(EventsPropertyUtils.LISTENER_METHOD_IMAGE_DESCRIPTOR);
      }
    }
    // in any case prepare action for creating new stub method
    {
      actions[1] = new ObjectInfoAction(m_object) {
        @Override
        protected void runEx() throws Exception {
          openListener();
        }
      };
View Full Code Here

TOP

Related Classes of org.eclipse.wb.internal.core.model.util.ObjectInfoAction

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.