{
   onDispose(
       (d) -> {
         applicationNames.dispose();
         appNameAnnotationModel.dispose();
         errorsInYaml.dispose();
         resourceAnnotationModel.dispose();
         selectedAppName.dispose();
       });
 }
 public CloudApplicationDeploymentProperties getDeploymentProperties() throws Exception {
   if (isCancelled) {
     throw new OperationCanceledException();
   }
   if (type.getValue() == null) {
     return null;
   }
   switch (type.getValue()) {
     case FILE:
       return fileModel.getDeploymentProperties();
     case MANUAL:
       return manualModel.getDeploymentProperties();
     default:
       return null;
   }
 }
 @Override
 public void refresh(Object obj) {
   super.refresh(obj);
   // Every sub-tree refresh should update the hidden elements label
   int totalElements = countChildren(getRoot());
   int filteredElements = countFilteredChildren(getRoot());
   hiddenElementCount.setValue(totalElements - filteredElements);
 }
 {
   onDispose(
       (d) -> {
         saveOrDiscardIfNeeded();
         validator.dispose();
         document.dispose();
         editorInput.dispose();
         fileLabel.dispose();
         selectedFile.dispose();
       });
 }
 @Override
 protected String compute() {
   AppNameAnnotationModel annotationModel = appNameAnnotationModel.getValue();
   attachListener(annotationModel);
   if (annotationModel != null) {
     AppNameAnnotation a = annotationModel.getSelectedAppAnnotation();
     if (a != null) {
       return a.getText();
     }
   }
   return null;
 }
 @Override
 protected Boolean compute() {
   IAnnotationModel annotationModel = resourceAnnotationModel.getValue();
   attachListener(annotationModel);
   if (annotationModel != null) {
     for (Iterator<Annotation> itr = annotationModel.getAnnotationIterator();
         itr.hasNext(); ) {
       Annotation next = itr.next();
       if (ReconcileProblemAnnotation.ERROR_ANNOTATION_TYPE == next.getType()) {
         return Boolean.TRUE;
       }
     }
   }
   return Boolean.FALSE;
 }
 @Override
 protected List<String> compute() {
   AppNameAnnotationModel annotationModel = appNameAnnotationModel.getValue();
   attachListener(annotationModel);
   if (annotationModel != null) {
     List<String> applicationNames = new ArrayList<>();
     for (Iterator<Annotation> itr = annotationModel.getAnnotationIterator();
         itr.hasNext(); ) {
       Annotation next = itr.next();
       if (next instanceof AppNameAnnotation) {
         AppNameAnnotation a = (AppNameAnnotation) next;
         applicationNames.add(a.getText());
       }
     }
     return applicationNames;
   }
   return Collections.emptyList();
 }
 public boolean isManualManifestType() {
   return type.getValue() == ManifestType.MANUAL;
 }
 public boolean isFileManifestType() {
   return type.getValue() == ManifestType.FILE;
 }
 private IFile getFile() {
   IResource r = selectedFile.getValue();
   return r instanceof IFile ? (IFile) r : null;
 }