public CPathIncludeSymbolEntryPerFilePage(IStatusChangeListener context) { super(CPathEntryMessages.IncludeSymbolEntryPage_title); fContext = context; IncludeSymbolAdapter adapter = new IncludeSymbolAdapter(); fIncludeSymPathsList = new TreeListDialogField<CPElementGroup>( adapter, buttonLabel, new CPElementLabelProvider(true, false)) { @Override protected int getTreeStyle() { return super.getTreeStyle() & ~SWT.MULTI; } }; fIncludeSymPathsList.setLabelText(CPathEntryMessages.IncludeSymbolEntryPage_label); fIncludeSymPathsList.enableButton(IDX_ADD_FOLDER_FILE, false); fIncludeSymPathsList.enableButton(IDX_REMOVE, false); fIncludeSymPathsList.enableButton(IDX_EDIT, false); fIncludeSymPathsList.enableButton(IDX_ADD_CONTRIBUTED, true); fIncludeSymPathsList.enableButton(IDX_ADD_EXT_INCLUDE, true); fIncludeSymPathsList.enableButton(IDX_ADD_WS_INCLUDE, true); fIncludeSymPathsList.enableButton(IDX_ADD_SYMBOL, true); fIncludeSymPathsList.enableButton(IDX_EXPORT, false); fIncludeSymPathsList.enableButton(IDX_UP, false); fIncludeSymPathsList.enableButton(IDX_DOWN, false); fIncludeSymPathsList.setTreeExpansionLevel(fTreeExpansionLevel); fShowInheritedPaths = new SelectionButtonDialogField(SWT.CHECK); fShowInheritedPaths.setSelection(true); fShowInheritedPaths.setLabelText( CPathEntryMessages.IncludeSymbolsEntryPage_show_inherited_check); fShowInheritedPaths.setDialogFieldListener(adapter); fFilter = new CPElementPerFileFilter( new int[] { -1, IPathEntry.CDT_INCLUDE, IPathEntry.CDT_INCLUDE_FILE, IPathEntry.CDT_MACRO, IPathEntry.CDT_MACRO_FILE, IPathEntry.CDT_CONTAINER }, false, true); }
public TodoTaskConfigurationBlock( IStatusChangeListener context, IProject project, IWorkbenchPreferenceContainer container) { super(context, project, ALL_KEYS, container); TaskTagAdapter adapter = new TaskTagAdapter(); String[] buttons = new String[] { PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_add_button, PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_edit_button, PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_remove_button, null, PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_setdefault_button, }; fTodoTasksList = new ListDialogField<TodoTask>(adapter, buttons, new TodoTaskLabelProvider()); fTodoTasksList.setDialogFieldListener(adapter); fTodoTasksList.setRemoveButtonIndex(IDX_REMOVE); String[] columnsHeaders = new String[] { PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_name_column, PreferencesMessages.TodoTaskConfigurationBlock_markers_tasks_priority_column, }; fTodoTasksList.setTableColumns(new ListDialogField.ColumnsDescription(columnsHeaders, true)); fTodoTasksList.setViewerComparator(new TodoTaskSorter()); fCaseSensitiveCheckBox = new SelectionButtonDialogField(SWT.CHECK); fCaseSensitiveCheckBox.setLabelText( PreferencesMessages.TodoTaskConfigurationBlock_casesensitive_label); fCaseSensitiveCheckBox.setDialogFieldListener(adapter); unpackTodoTasks(); if (fTodoTasksList.getSize() > 0) { fTodoTasksList.selectFirstElement(); } else { fTodoTasksList.enableButton(IDX_EDIT, false); fTodoTasksList.enableButton(IDX_DEFAULT, false); } fTaskTagsStatus = new StatusInfo(); }