- // From a view you get the site which allow to get the service
- IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.class);
- try {
- handlerService.executeCommand("add.command", null);
- } catch (Exception ex) {
- throw new RuntimeException("add.command not found");
- // Give message
- } 将夜
- }
转载于:https://www.cnblogs.com/jiangyea/p/3319185.html