if (fHistoryViewer instanceof CheckboxTreeViewer) { final CheckboxTreeViewer viewer= (CheckboxTreeViewer) fHistoryViewer; viewer.addCheckStateListener(new ICheckStateListener() {  public final void checkStateChanged(final CheckStateChangedEvent event) { handleCheckStateChanged(); } }); }
	public final void createControl() {		RefactoringCore.getRefactoringHistoryService().connect();		fCaptionImage= RefactoringPluginImages.DESC_OBJS_COMPOSITE_CHANGE.createImage();		GridLayout layout= new GridLayout(2, false);		layout.marginHeight= 0;		layout.marginWidth= 0;		layout.horizontalSpacing= 0;		layout.verticalSpacing= 0;		setLayout(layout);		final GridData data= new GridData();		data.grabExcessHorizontalSpace= true;		data.grabExcessVerticalSpace= true;		data.horizontalAlignment= SWT.FILL;		data.verticalAlignment= SWT.FILL;		setLayoutData(data);		fSplitterControl= new Splitter(this, SWT.VERTICAL);		fSplitterControl.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_VERTICAL));		fSplitterControl.addDisposeListener(new DisposeListener() {			public final void widgetDisposed(final DisposeEvent event) {				if (fCaptionImage != null)					fCaptionImage.dispose();			}		});		createButtonBar(this);		final Composite leftPane= new Composite(fSplitterControl, SWT.NONE);		layout= new GridLayout();		layout.marginWidth= 0;		layout.marginHeight= 2;		layout.verticalSpacing= 2;		leftPane.setLayout(layout);		fHistoryPane= new CompareViewerPane(leftPane, SWT.BORDER | SWT.FLAT);		if (fControlConfiguration.isTimeDisplayed())			fHistoryPane.setImage(fCaptionImage);		String text= null;		final IProject project= fControlConfiguration.getProject();		if (project != null)			text= MessageFormat.format(fControlConfiguration.getProjectPattern(), new String[] { project.getName()});		else			text= fControlConfiguration.getWorkspaceCaption();		fHistoryPane.setText(text);		fHistoryPane.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL));		fHistoryViewer= createHistoryViewer(fHistoryPane);		if (!fControlConfiguration.isTimeDisplayed())			fHistoryViewer.setAutoExpandLevel(AbstractTreeViewer.ALL_LEVELS);		fHistoryViewer.setContentProvider(fControlConfiguration.getContentProvider());		fHistoryViewer.setLabelProvider(fControlConfiguration.getLabelProvider());		fHistoryViewer.addSelectionChangedListener(new ISelectionChangedListener() {			public final void selectionChanged(final SelectionChangedEvent event) {				final ISelection selection= event.getSelection();				if (selection instanceof IStructuredSelection)					handleSelectionChanged((IStructuredSelection) selection);			}		});		fHistoryPane.setContent(fHistoryViewer.getControl());		fCommentPane= new CompareViewerSwitchingPane(fSplitterControl, SWT.BORDER | SWT.FLAT) {			protected final Viewer getViewer(final Viewer viewer, final Object input) {				if (input instanceof String) {					final String comment= (String) input;					final TextViewer extended= new TextViewer(fCommentPane, SWT.NULL);					extended.setDocument(new Document(comment));					setText(fControlConfiguration.getCommentCaption());					return extended;				}				return null;			}		};		fCommentPane.setText(fControlConfiguration.getCommentCaption());		fCommentPane.setEnabled(false);		fSplitterControl.setWeights(new int[] { 80, 20});	}