变量上下文

    在执行菜单的事件时的变量上下文的规则。

普通动作

    普通动作使用当前表单的变量上下文,因此可以直接文档表单的一些变量,比如:

  • coolBar.getShell()
    coolBar是工具栏。
     
  • explorerActions
    XWorker编辑器的动作集合。
     
  • explorerContext
    XWorker编辑器的变量上下文。
     
  • actionContext
    当前变量上下文。
     
  • utilBrowser
    内置浏览器工具。
     
  • currentThing
    当前正在编辑的事物节点。
     
  • currentModelContext
    当前表单的变量上下文。
     
  • currentModel
    当前表单的模型事物。

SWT窗口

    执行SWT窗口时会创建新的变量上下文,其中传入的参数如下。

  • context.put("parent", coolBar.getShell());
  • context.put("editorShell", coolBar.getShell());
  • context.put("explorerActions", explorerActions);
  • context.put("explorerContext", explorerContext);
  • context.put("thingContext", actionContext);
  • context.put("utilBrowser", utilBrowser);
  • context.put("thing", currentThing);
  • context.put("currentThing", currentThing);
  • context.put("currentModelContext", currentModelContext);
  • context.put("currentModel", currentModel);
  • context.put("params", params);

Copyright ©  2007-2019 XWorker.org  版权所有  沪ICP备08000575号