/** {@inheritDoc} */
 protected void buttonPressed(final int buttonId) {
   if (buttonId == IDialogConstants.OK_ID) {
     fData.setRefactoringAware(true);
     final RefactoringDescriptorProxy[] descriptors = fHistoryControl.getCheckedDescriptors();
     Set set = new HashSet();
     IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
     for (int index = 0; index < descriptors.length; index++) {
       final String project = descriptors[index].getProject();
       if (project != null && !"".equals(project)) // $NON-NLS-1$
       set.add(root.getProject(project));
     }
     fData.setRefactoringProjects((IProject[]) set.toArray(new IProject[set.size()]));
     fData.setRefactoringDescriptors(descriptors);
     fData.setExportStructuralOnly(fExportStructural.getSelection());
     final IDialogSettings settings = fSettings;
     if (settings != null) settings.put(SETTING_SORT, fHistoryControl.isSortByProjects());
   }
   super.buttonPressed(buttonId);
 }
Пример #2
0
 private void xmlReadOptions(JarPackageData jarPackage, Element element)
     throws java.io.IOException {
   if (element.getNodeName().equals("options")) { // $NON-NLS-1$
     jarPackage.setOverwrite(getBooleanAttribute(element, "overwrite")); // $NON-NLS-1$
     jarPackage.setCompress(getBooleanAttribute(element, "compress")); // $NON-NLS-1$
     jarPackage.setExportErrors(getBooleanAttribute(element, "exportErrors")); // $NON-NLS-1$
     jarPackage.setExportWarnings(getBooleanAttribute(element, "exportWarnings")); // $NON-NLS-1$
     jarPackage.setSaveDescription(getBooleanAttribute(element, "saveDescription")); // $NON-NLS-1$
     jarPackage.setUseSourceFolderHierarchy(
         getBooleanAttribute(element, "useSourceFolders", false)); // $NON-NLS-1$
     jarPackage.setDescriptionLocation(
         Path.fromPortableString(element.getAttribute("descriptionLocation"))); // $NON-NLS-1$
     jarPackage.setBuildIfNeeded(
         getBooleanAttribute(
             element, "buildIfNeeded", jarPackage.isBuildingIfNeeded())); // $NON-NLS-1$
     jarPackage.setIncludeDirectoryEntries(
         getBooleanAttribute(element, "includeDirectoryEntries", false)); // $NON-NLS-1$
     jarPackage.setRefactoringAware(
         getBooleanAttribute(element, "storeRefactorings", false)); // $NON-NLS-1$
   }
 }