Examples of AskEvent


Examples of org.openbp.jaspira.event.AskEvent

    Item originalItem = (Item) oee.original;
    Item modifiedItem = (Item) oee.getObject();

    // We fire an ask event to determine if this item is currently beeing edited
    // If so, we will ignore this save request, it will be handled by the editor that edits the item.
    AskEvent ae = new AskEvent(itemBrowser, "global.edit.geteditedinstance", originalItem);
    itemBrowser.fireEvent(ae);
    Item editedItem = (Item) ae.getAnswer();
    if (editedItem != null)
      // We will use the edited item instead of the current one as node provider (may be newer!)
      return EVENT_IGNORED;

    oee.saved = updateItem(originalItem, modifiedItem);
View Full Code Here

Examples of org.openbp.jaspira.event.AskEvent

        // the event in order to show the results of the finder.
        SwingUtilities.invokeLater(new Thread()
        {
          public void run()
          {
            AskEvent ae = new AskEvent(plugin, "plugin.finder.register");
            plugin.fireEvent(ae);
            ((FinderResultPlugin) ae.getAnswer()).focusPlugin();
            plugin.fireEvent("plugin.finderresult.present", contextModelObject);
          }
        });
      }
View Full Code Here

Examples of org.openbp.jaspira.event.AskEvent

  {
    boolean haveBreakpoints = breakpointDecorator != null;
    boolean haveHaltedProcess = haltedPosition != null;

    // Enable the breakpoint toggle action if any objects are selected.
    AskEvent ae = new AskEvent(this, "modeler.view.getselectioncount");
    fireEvent(ae);
    Integer selectionCount = (Integer) ae.getAnswer();
    boolean hasSelection = selectionCount != null && selectionCount.intValue() > 0;

    if (toggleBreakpointsAction != null)
    {
      toggleBreakpointsAction.setEnabled(hasSelection);
View Full Code Here

Examples of org.openbp.jaspira.event.AskEvent

     * @return The event status code
     */
    public JaspiraEventHandlerCode togglebreakpoints(JaspiraActionEvent jae)
    {
      // Get the current selection of the active modeler
      AskEvent ae = new AskEvent(DebuggerPlugin.this, "modeler.view.getselection");
      fireEvent(ae);
      List selection = (List) ae.getAnswer();
      if (selection == null || selection.size() == 0)
        return EVENT_IGNORED;

      // Qualifiers of the selected sockets
      List qualifiers = new ArrayList();
View Full Code Here

Examples of org.openbp.jaspira.event.AskEvent

      // This thread must not prevent VM shutdown.
      setDaemon(true);

      // First, retrieve the connection figure we want to animate
      AskEvent ae = new AskEvent(DebuggerPlugin.this, "modeler.view.getbyqualifier", qualifier);
      fireEvent(ae);

      if (ae.getAnswer() instanceof PolySplineConnection)
      {
        connection = (PolySplineConnection) ae.getAnswer();

        // We found it
        animator = this;
        this.autoStep = autoStep;
View Full Code Here

Examples of org.openbp.jaspira.event.AskEvent

  protected void determineDebuggerId()
  {
    if (debuggerId == null)
    {
      // Get the debugger client id we need to use from the debugger plugin
      AskEvent ae = new AskEvent(this, "debugger.client.getdebuggerid");
      fireEvent(ae);
      debuggerId = (String) ae.getAnswer();
      if (debuggerId == null)
      {
        System.err.println("Debugger id could not be requested from debugger plugin");
        return;
      }
View Full Code Here

Examples of org.openbp.jaspira.event.AskEvent

      else
      {
        // No skeleton, we dragged an existing item.
        // Check if it is currently being edited by a modeler.
        isSkeleton = false;
        AskEvent ae = new AskEvent(editor, "global.edit.geteditedinstance", npItem);
        editor.fireEvent(ae);
        Item editedItem = (Item) ae.getAnswer();
        if (editedItem != null)
        {
          // We will use the edited item instead of the current one as node provider (may be newer!)
          npItem = editedItem;
        }
View Full Code Here

Examples of org.openbp.jaspira.event.AskEvent

    if (item != null)
    {
      // We fire an ask event to determine if this item is currently beeing edited
      // If so, we will display the edited instance (probably a copy of the original item)
      AskEvent ae = new AskEvent(this, "global.edit.geteditedinstance", item);
      fireEvent(ae);
      Item editedItem = (Item) ae.getAnswer();
      if (editedItem != null)
      {
        // We will use the edited item instead of the current one as node provider (may be newer!)
        item = editedItem;
      }
View Full Code Here

Examples of org.openbp.jaspira.event.AskEvent

  protected void determineDebuggerId()
  {
    if (debuggerId == null)
    {
      // Get the debugger client id we need to use from the debugger plugin
      AskEvent ae = new AskEvent(this, "debugger.client.getdebuggerid");
      fireEvent(ae);
      debuggerId = (String) ae.getAnswer();
      if (debuggerId == null)
      {
        System.err.println("Debugger id could not be requested from debugger plugin");
        return;
      }
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.