Search code examples
eclipseeclipse-rcp

Restrict open Tabs in Eclipse RCP project


I was looking for an option to set the number of open tabs in a RCP application. Currently, I could do it by going to preference->editor settings and tick property of close editor on reaching a certain count. But I was looking for setting this property and count (like 10 active tabs) via .ini/.xml file or product file of the application. Any suggestions to this would be really helpful.


Solution

  • For this customization goto plugin_customization.ini of the application plugin and add the following lines:

    org.eclipse.ui.workbench/REUSE_OPEN_EDITORS=10
    org.eclipse.ui.workbench/REUSE_OPEN_EDITORS_BOOLEAN=true
    

    where the number of open editors can be configured as required. Save the file and re-run the application.