I am working on Rcl based on Eclipse. We need to prevent the user from closing one of the open editors.
Desired behavior:
Oh yes, and is it possible?
Thanks dk
You can use org.eclipse.ui.ISaveablePart2, more specifically, the method promptToSaveOnClose().
org.eclipse.ui.ISaveablePart2
promptToSaveOnClose()
However, as said in this thread ,
, .
. SaveableHelper.java .
SaveableHelper.java
. RCP, , :
@Override public void doSave(IProgressMonitor monitor) {
monitor.setCanceled(true);
EditorPart
, , , .
page.addPartListener(new IPartListener2() { // [...] @Override public void partClosed(IWorkbenchPartReference partRef) { try { page.openEditor(input, id); } catch (PartInitException e) { e.printStackTrace(); } } });
Source: https://habr.com/ru/post/1730438/More articles:make wmd-editor not post html? - javascriptlocal and remote sockets on iphone - iphoneМогу ли я изменить глобальный веб-приложение в jboss 4.2? - javaHow to find all R packages containing graphics functions? - rjQuery (or perhaps a browser) are cache ajax scripts - jqueryDirectShow - how to debug pin connection errors - c #What does SQL Server do between returning my first record and returning my last record? - sql-serverHow can I use Regex for TextReader? - regexIs it possible to group rows per day stored in a timestamp? - mysqlZend framework: what is the right place to check user input? - phpAll Articles