How do I stop an Eclipse Editor from closing in an RCP

后端 未结 3 620
轻奢々
轻奢々 2021-01-01 06:37

I am working on an Eclipse based RCP. We have a need to prevent one of the opened editors from being closed by the user.

The desired behavior is:

  1. the
3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-01 06:51

    You can also cancel the saving in

    @Override
    public void doSave(IProgressMonitor monitor) {
    

    by calling

    monitor.setCanceled(true);
    

    In the EditorPart implementation

提交回复
热议问题