Bug 80429 [Preferences] [Dialogs] FieldEditors should relax requirements to support DialogPages
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/BuildOrderPreferencePage.java
private boolean defaultOrderInitiallySelected;
    private IPropertyChangeListener validityChangeListener = new IPropertyChangeListener() {
        public void propertyChange(PropertyChangeEvent event) {
            if (event.getProperty().equals(FieldEditor.IS_VALID))
                updateValidState();
        }
    };
    /**
     * Add another project to the list at the end.
     */
    private void addProject() {
        String[] currentItems = this.buildList.getItems();
        IProject[] allProjects = getWorkspace().getRoot().getProjects();
        ILabelProvider labelProvider = new LabelProvider() {
            public String getText(Object element) {
                return (String) element;
            }
        };
        SimpleListContentProvider contentsProvider = new SimpleListContentProvider();
        contentsProvider
                .setElements(sortedDifference(allProjects, currentItems));
        ListSelectionDialog dialog = new ListSelectionDialog(this.getShell(),
                this, contentsProvider, labelProvider,
                PROJECT_SELECTION_MESSAGE);
        if (dialog.open() != Dialog.OK)
            return;
        Object[] result = dialog.getResult();
        int currentItemsLength = currentItems.length;
        int resultLength = result.length;