private void updateFieldTemplateEnablement() {
   // Get the splash info if any
   ISplashInfo info = getSplashInfo();
   // Enable section under the following conditions:
   // (1) Product ID is defined
   // (2) Progress geometry is NOT defined
   // (3) Progress geometry is defined and splash handler type is defined
   if ((PDETextHelper.isDefined(getProduct().getProductId()) == false)
       || ((info.isDefinedGeometry() == true) && (info.isDefinedSplashHandlerType() == false))) {
     fFieldTemplateCombo.setEnabled(false);
   } else {
     fFieldTemplateCombo.setEnabled(true);
   }
 }
 private void updateUIFieldTemplateCombo() {
   // Update this sections enablement
   updateFieldEnablement();
   // Get the splash info if any
   ISplashInfo info = getSplashInfo();
   if (info.isDefinedSplashHandlerType() == false) {
     // No splash handler type defined, set "none" in combo box
     fFieldTemplateCombo.setText(PDEUIMessages.SplashConfigurationSection_none);
     return;
   }
   String splashHandlerType = info.getFieldSplashHandlerType();
   // Update the splash handler type in the combo box
   for (String[] typeChoice : ISplashHandlerConstants.F_SPLASH_SCREEN_TYPE_CHOICES) {
     String key = typeChoice[0];
     if (splashHandlerType.equals(key)) {
       String displayName = typeChoice[1];
       fFieldTemplateCombo.setText(displayName);
     }
   }
 }
 private void updateFieldProgressEnablement() {
   // Get the splash info if any
   ISplashInfo info = getSplashInfo();
   // Enable section under the following conditions:
   // (1) Product ID is defined
   // (2) Progress geometry is defined
   // (3) Splash handler type is NOT defined
   if ((PDETextHelper.isDefined(getProduct().getProductId()) == false)
       || ((info.isDefinedGeometry() == false) && (info.isDefinedSplashHandlerType() == true))) {
     fAddBarButton.setEnabled(false);
     fAddMessageButton.setEnabled(false);
     updateFieldProgressBarEnablement(false);
     updateFieldProgressMessageEnablement(false);
   } else {
     fAddBarButton.setEnabled(isEditable());
     fAddMessageButton.setEnabled(isEditable());
     updateFieldProgressBarEnablement(isEditable());
     updateFieldProgressMessageEnablement(isEditable());
   }
 }
  @Override
  public void refresh() {
    ISplashInfo info = getSplashInfo();
    fBlockNotification = true;

    fColorSelector.setColorValue(hexToRGB(info.getForegroundColor()));

    int[] pgeo = info.getProgressGeometry();
    boolean addProgress = pgeo != null;
    info.addProgressBar(addProgress, fBlockNotification);
    if (addProgress) {
      for (int i = 0; i < pgeo.length; i++) {
        fBarSpinners[i].setSelection(pgeo[i]);
      }
    } else {
      resetProgressBarGeometry();
    }

    fAddBarButton.setSelection(addProgress);

    int[] mgeo = info.getMessageGeometry();
    boolean addMessage = mgeo != null;
    info.addProgressMessage(addMessage, fBlockNotification);
    if (addMessage) {
      for (int i = 0; i < mgeo.length; i++) {
        fMessageSpinners[i].setSelection(mgeo[i]);
      }
    } else {
      resetProgressMessageGeometry();
    }
    fColorSelector.setColorValue(
        addMessage ? hexToRGB(info.getForegroundColor()) : new RGB(0, 0, 0));

    fAddMessageButton.setSelection(addMessage);

    // Update the UI
    updateUIFieldTemplateCombo();
    fBlockNotification = false;
    super.refresh();
    // Update this sections enablement
    updateFieldEnablement();
  }