Retrieving Agent Work Area Data
Before you begin, add an Activator class that inherits from AbstractEdgeBaseNonUIPlugin or AbstractEdgeBasePlugin to your plug-in project.
Add the following dependency to your plug-in:
Obtain a reference to the IWorkAreaService service from the OSGI environment. If your plug-in has an activator that inherits from AbstractEdgeBaseNonUIPlugin or AbstractEdgeBasePlugin, the following line of code is all that you need.
IWorkAreaService service = Activator.getDefault().getServiceReference(IWorkAreaService. class);
To obtain the current work area name in use, invoke the getWorkAreaInUse() method on IWorkAreaService.
WorkAreaData workArea = service.getWorkAreaInUse();
To obtain a list of active work areas, invoke the getActiveWorkAreas() method.
Set <WorkAreaData> areas = service.getActiveWorkAreas();
The object of type WorkAreaData also retrieves the following data about each active work area:
Work area name
To obtain the data in this object, use the access methods that this class exposes.