作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
尝试将 gmf 与 xpand 集成。
我使用 gmf list 文件中的扩展名创建了一个菜单和命令。并尝试调用 xpand 生成器。
该命令的代码如下所示
public class customCommand extends AbstractHandler implements IHandler {
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
// TODO Auto-generated method stub
Shell s=HandlerUtil.getActiveShell(event);
MessageBox mb=new MessageBox(s,SWT.None);
WorkflowRunner runner = new WorkflowRunner();
Bundle bundle=Platform.getBundle("MistScriptGenerator");
URL wfUrl = bundle.getEntry("src/workflow/generator.oaw");
String wfFile = "";
try {
wfFile = FileLocator.toFileURL(wfUrl).getFile();
mb.setMessage(wfFile);
mb.open();
Map<String, String> properties = new HashMap<String, String>();
//properties.put("model", $diagramFile$.getLocation().toOSString());
properties=null;
boolean isSuccess = runner.run(wfFile,new org.openarchitectureware.workflow.monitor.NullProgressMonito r(), properties, null);
}
catch (Exception e)
{
}
return null;
}
}
我已经能够成功获取工作流程的路径。现在,在调用工作流程时,我必须将 gmf 图表文件输入到工作流程中。但我怎样才能给出文件的路径呢?
我通过打开另一个工作台来执行我的 gmf 图:但是,现在,我如何获取 gmf 图文件的路径?
我已在我的工作流程中注册了 epackage。
你能指导一下吗,项目截止日期很快了。
最佳答案
IAML project使用openArchitectureWare XPand实现代码生成。作为如何将两者连接在一起的示例,您可以查看 GenerateCodeAction 的源代码-- 相关方法是doExecute()
。希望这有帮助:)
关于java - 将 gmf 与 xpand oaw 集成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4817115/
尝试将 gmf 与 xpand 集成。 我使用 gmf list 文件中的扩展名创建了一个菜单和命令。并尝试调用 xpand 生成器。 该命令的代码如下所示 public class customCo
我是一名优秀的程序员,十分优秀!