Allowing only one instance of an application
By default, a user can work with multiple instances
of a ZIETrans rich client application at one time by opening multiple
instances of the application's transformation view. To restrict a
user from starting multiple instances of an application, you can set
a flag in the plug-in manifest file, plugin.xml, for the plug-in project.
This flag tells Eclipse to allow only one instance of the application's
view. To set this flag:
- Open the plug-in manifest file for the project by clicking Open the plug-in manifest on the Overview page of the Project Settings editor.
- Click the Extensions tab.
- In the All Extensions tree, expand the org.eclipse.ui.views node and select the node corresponding to your project. By default, only one view is listed.
- In the Extension Element Details section, change the allowMultiple setting from true to false.
- Save the file.
Note: Any change to a plug-in manifest
file while the application is running requires a restart of the runtime
workbench.
At runtime, if a user attempts to open a second instance of the application, the view corresponding to the first application instance receives the focus.