TableColumn column1= table.getColumn(0);
TableColumn column1= new TableColumn(table, SWT.NULL);
	protected Control createContents(Composite ancestor) {			Composite parent= new Composite(ancestor, SWT.NULL);		GridLayout layout= new GridLayout();		layout.numColumns= 2;		layout.marginHeight= 0;		layout.marginWidth= 0;		parent.setLayout(layout);								fTableViewer= new CheckboxTableViewer(parent, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION);		Table table= fTableViewer.getTable();				GridData data= new GridData(GridData.FILL_BOTH);		data.widthHint= convertWidthInCharsToPixels(80);		data.heightHint= convertHeightInCharsToPixels(10);		fTableViewer.getTable().setLayoutData(data);						table.setHeaderVisible(true);		table.setLinesVisible(true);				TableLayout tableLayout= new TableLayout();		table.setLayout(tableLayout);				TableColumn column1= table.getColumn(0);		column1.setText(TemplateMessages.getString("TemplatePreferencePage.column.name")); //$NON-NLS-1$		TableColumn column2= new TableColumn(table, SWT.NULL);		column2.setText(TemplateMessages.getString("TemplatePreferencePage.column.context")); //$NON-NLS-1$			TableColumn column3= new TableColumn(table, SWT.NULL);		column3.setText(TemplateMessages.getString("TemplatePreferencePage.column.description")); //$NON-NLS-1$				tableLayout.addColumnData(new ColumnWeightData(30));		tableLayout.addColumnData(new ColumnWeightData(20));		tableLayout.addColumnData(new ColumnWeightData(70));				fTableViewer.setLabelProvider(new TemplateLabelProvider());		fTableViewer.setContentProvider(new TemplateContentProvider());		fTableViewer.setSorter(new ViewerSorter() {			public int compare(Viewer viewer, Object object1, Object object2) {				if ((object1 instanceof Template) && (object2 instanceof Template)) {					Template left= (Template) object1;					Template right= (Template) object2;					int result= left.getName().compareToIgnoreCase(right.getName());					if (result != 0)						return result;					return left.getDescription().compareToIgnoreCase(right.getDescription());				}				return super.compare(viewer, object1, object2);			}						public boolean isSorterProperty(Object element, String property) {				return true;			}		});				fTableViewer.addDoubleClickListener(new IDoubleClickListener() {			public void doubleClick(DoubleClickEvent e) {				edit();			}		});				fTableViewer.addSelectionChangedListener(new ISelectionChangedListener() {			public void selectionChanged(SelectionChangedEvent e) {				selectionChanged1();			}		});		fTableViewer.addCheckStateListener(new ICheckStateListener() {			public void checkStateChanged(CheckStateChangedEvent event) {				Template template= (Template) event.getElement();				template.setEnabled(event.getChecked());			}		});		Composite buttons= new Composite(parent, SWT.NULL);		buttons.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));		layout= new GridLayout();		layout.marginHeight= 0;		layout.marginWidth= 0;		buttons.setLayout(layout);				fAddButton= new Button(buttons, SWT.PUSH);		fAddButton.setLayoutData(getButtonGridData(fAddButton));		fAddButton.setText(TemplateMessages.getString("TemplatePreferencePage.new")); //$NON-NLS-1$		fAddButton.addListener(SWT.Selection, new Listener() {			public void handleEvent(Event e) {				add();			}		});		fEditButton= new Button(buttons, SWT.PUSH);		fEditButton.setLayoutData(getButtonGridData(fEditButton));		fEditButton.setText(TemplateMessages.getString("TemplatePreferencePage.edit")); //$NON-NLS-1$		fEditButton.addListener(SWT.Selection, new Listener() {			public void handleEvent(Event e) {				edit();			}		});		fRemoveButton= new Button(buttons, SWT.PUSH);		fRemoveButton.setLayoutData(getButtonGridData(fRemoveButton));		fRemoveButton.setText(TemplateMessages.getString("TemplatePreferencePage.remove")); //$NON-NLS-1$		fRemoveButton.addListener(SWT.Selection, new Listener() {			public void handleEvent(Event e) {				remove();			}		});						createSpacer(buttons);		fImportButton= new Button(buttons, SWT.PUSH);		fImportButton.setLayoutData(getButtonGridData(fImportButton));		fImportButton.setText(TemplateMessages.getString("TemplatePreferencePage.import")); //$NON-NLS-1$		fImportButton.addListener(SWT.Selection, new Listener() {			public void handleEvent(Event e) {				import_();			}		});		fExportButton= new Button(buttons, SWT.PUSH);		fExportButton.setLayoutData(getButtonGridData(fExportButton));		fExportButton.setText(TemplateMessages.getString("TemplatePreferencePage.export")); //$NON-NLS-1$		fExportButton.addListener(SWT.Selection, new Listener() {			public void handleEvent(Event e) {				export();			}		});		fExportAllButton= new Button(buttons, SWT.PUSH);		fExportAllButton.setLayoutData(getButtonGridData(fExportAllButton));		fExportAllButton.setText(TemplateMessages.getString("TemplatePreferencePage.export.all")); //$NON-NLS-1$		fExportAllButton.addListener(SWT.Selection, new Listener() {			public void handleEvent(Event e) {				exportAll();			}		});				createSpacer(buttons);				fEnableAllButton= new Button(buttons, SWT.PUSH);		fEnableAllButton.setLayoutData(getButtonGridData(fEnableAllButton));		fEnableAllButton.setText(TemplateMessages.getString("TemplatePreferencePage.enable.all")); //$NON-NLS-1$		fEnableAllButton.addListener(SWT.Selection, new Listener() {			public void handleEvent(Event e) {				enableAll(true);			}		});		fDisableAllButton= new Button(buttons, SWT.PUSH);		fDisableAllButton.setLayoutData(getButtonGridData(fDisableAllButton));		fDisableAllButton.setText(TemplateMessages.getString("TemplatePreferencePage.disable.all")); //$NON-NLS-1$		fDisableAllButton.addListener(SWT.Selection, new Listener() {			public void handleEvent(Event e) {				enableAll(false);			}		});		fPatternViewer= createViewer(parent);				createSpacer(parent);		fFormatButton= new Button(parent, SWT.CHECK);		fFormatButton.setText(TemplateMessages.getString("TemplatePreferencePage.use.code.formatter")); //$NON-NLS-1$		fTableViewer.setInput(fTemplates);				fTableViewer.setAllChecked(false);		fTableViewer.setCheckedElements(getEnabledTemplates());				IPreferenceStore prefs= JavaPlugin.getDefault().getPreferenceStore();		fFormatButton.setSelection(prefs.getBoolean(PREF_FORMAT_TEMPLATES));		updateButtons();		WorkbenchHelp.setHelp(parent, new DialogPageContextComputer(this, IJavaHelpContextIds.TEMPLATE_PREFERENCE_PAGE));				return parent;	}