.getPreferenceStore();
String orientString = prefStore
.getString(IDebugPreferenceConstants.VARIABLES_DETAIL_PANE_ORIENTATION);
setDetailPaneOrientation(orientString);
final TreeViewer variablesViewer = new DroolsVariablesViewer(getSashForm(),
SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL, this);
variablesViewer.setContentProvider(createContentProvider());
variablesViewer.setLabelProvider(new VariablesViewLabelProvider(
getModelPresentation()));
variablesViewer.setUseHashlookup(true);
variablesViewer.getControl().addFocusListener(new FocusAdapter() {
public void focusGained(FocusEvent e) {
getVariablesViewSelectionProvider()
.setUnderlyingSelectionProvider(variablesViewer);
setAction(SELECT_ALL_ACTION,
getAction(VARIABLES_SELECT_ALL_ACTION));
setAction(COPY_ACTION, getAction(VARIABLES_COPY_ACTION));
getViewSite().getActionBars().updateActionBars();
setFocusViewer(getVariablesViewer());
}
});
variablesViewer
.addSelectionChangedListener(getTreeSelectionChangedListener());
getVariablesViewSelectionProvider().setUnderlyingSelectionProvider(
variablesViewer);
getSite().setSelectionProvider(getVariablesViewSelectionProvider());
SourceViewer detailsViewer = new SourceViewer(getSashForm(), null,
SWT.V_SCROLL | SWT.H_SCROLL);
setDetailViewer(detailsViewer);
detailsViewer.setDocument(getDetailDocument());
detailsViewer.getTextWidget().setFont(
JFaceResources
.getFont(IInternalDebugUIConstants.DETAIL_PANE_FONT));
getDetailDocument().addDocumentListener(getDetailDocumentListener());
detailsViewer.setEditable(false);
getSashForm().setMaximizedControl(variablesViewer.getControl());
detailsViewer.getSelectionProvider().addSelectionChangedListener(
getDetailSelectionChangedListener());
detailsViewer.getControl().addFocusListener(new FocusAdapter() {