@Override
 public void deactivate() {
   if (isActive()) {
     doDeActivate();
     ActionsInput input = getWidgetModel().getActionsInput();
     for (AbstractWidgetAction a : input.getActionsList()) {
       a.dispose();
     }
     super.deactivate();
     // remove listener from all properties.
     for (String id : getWidgetModel().getAllPropertyIDs()) {
       getWidgetModel()
           .getProperty(id)
           .removeAllPropertyChangeListeners(); // removePropertyChangeListener(propertyListenerMap.get(id));
     }
     if (executionMode == ExecutionMode.RUN_MODE) {
       // remove script listeners before stopping PV.
       for (ScriptData scriptData : scriptDataList) {
         ScriptService.getInstance().unRegisterScript(scriptData);
       }
       if (hasStartedPVs) {
         // this is just a guard statement
         // if the widget was deactivated before it became fully active (and connected its pv),
         // we should not attempt to stop those pvs; this can happen with linking container
         for (Object pv : pvMap.values().toArray()) {
           ((IPV) pv).stop();
         }
       }
     }
     propertyListenerMap.clear();
     // propertyListenerMap = null;
     SingleSourceHelper.rapDeactivateBaseEditPart(this);
   }
 }
 /** @return the default {@link AbstractWidgetAction} when mouse click this widget. */
 public List<AbstractWidgetAction> getHookedActions() {
   ActionsInput actionsInput = getWidgetModel().getActionsInput();
   if (actionsInput != null
       && actionsInput.getActionsList().size() > 0
       && (actionsInput.isFirstActionHookedUpToWidget()
           || actionsInput.isHookUpAllActionsToWidget())) {
     if (actionsInput.isHookUpAllActionsToWidget())
       return getWidgetModel().getActionsInput().getActionsList();
     else return getWidgetModel().getActionsInput().getActionsList().subList(0, 1);
   }
   return null;
 }