private void setInput(Object input) { if (fStructurePane != null) { fStructurePane.setInput(input); ((Splitter)fControl).layout(); } }
public void addSelectionChangedListener(ISelectionChangedListener listener) { if (fStructurePane != null) fStructurePane.addSelectionChangedListener(listener); }
private void feedContent(Widget w) { if (fContentPane != null && !fContentPane.isDisposed()) { Object o= w.getData(); if (o instanceof HistoryInput) { HistoryInput selected= (HistoryInput) o; fContentPane.setInput(selected); fContentPane.setText(getEditionLabel(selected)); fContentPane.setImage(fTimeImage); if (fCurrentFileHistory != null) fCurrentFileHistory.setSelected(selected.fFileState); } else { fContentPane.setInput(null); } } }
/** * Feeds input from the page into the content and structured viewers. * @param input the input */ private void setInput(Object input) { CompareViewerPane pane = fContentPane; if (pane != null && !pane.isDisposed()) fContentPane.setInput(input); if (fStructuredComparePane != null && !fStructuredComparePane.isDisposed()) fStructuredComparePane.setInput(input); }
return; boolean oldEmpty= isEmpty(); Control content= getContent(); setContent(null); setContent(null); boolean old= getVisible(); setContent(fViewer.getControl()); setVisible(old); // restore old visibility boolean newEmpty= isEmpty(); Composite parent= getParent(); if (parent instanceof Splitter) ((Splitter)parent).setVisible(this, fControlVisibility ? !newEmpty : true); layout(true);
@Override protected synchronized Control createDialogArea(Composite parent2) { Composite parent= (Composite) super.createDialogArea(parent2); getShell().setText(JavaCompareUtilities.getString(fBundle, "title")); //$NON-NLS-1$ fContentPane= new ViewerSwitchingPane(parent, SWT.BORDER | SWT.FLAT); fContentPane.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_VERTICAL)); if (fInput != null) fContentPane.setInput(fInput); applyDialogFont(parent); return parent; }
setViewer(new NullViewer(this)); addDisposeListener( new DisposeListener() { public void widgetDisposed(DisposeEvent e) {
private void updateTitle() { if (fTitle != null) { if (fTitleArgument != null) { String format= CompareMessages.CompareViewerSwitchingPane_Titleformat; String t= MessageFormat.format(format, new String[] { fTitle, fTitleArgument } ); setText(t); } else setText(fTitle); } else { setText(""); //$NON-NLS-1$ } }
private boolean hasFocus2() { // do we have focus? Display display= getDisplay(); if (display != null) for (Control focus= display.getFocusControl(); focus != null; focus= focus.getParent()) if (focus == this) return true; return false; }
return; boolean oldEmpty= isEmpty(); Control content= getContent(); setContent(null); setContent(null); boolean old= getVisible(); setContent(fViewer.getControl()); setVisible(old); // restore old visibility boolean newEmpty= isEmpty(); Composite parent= getParent(); if (parent instanceof Splitter) ((Splitter)parent).setVisible(this, fControlVisibility ? !newEmpty : true); layout(true);
protected synchronized Control createDialogArea(Composite parent2) { Composite parent= (Composite) super.createDialogArea(parent2); getShell().setText(JavaCompareUtilities.getString(fBundle, "title")); //$NON-NLS-1$ fContentPane= new ViewerSwitchingPane(parent, SWT.BORDER | SWT.FLAT); fContentPane.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_VERTICAL)); if (fInput != null) fContentPane.setInput(fInput); applyDialogFont(parent); return parent; }
/** * Feeds input from the page into the content and structured viewers. * @param input the input */ private void setInput(Object input) { CompareViewerPane pane = fContentPane; if (pane != null && !pane.isDisposed()) fContentPane.setInput(input); if (fStructuredComparePane != null && !fStructuredComparePane.isDisposed()) fStructuredComparePane.setInput(input); }
setViewer(new NullViewer(this)); addDisposeListener( e -> { if (fViewer != null)
private boolean hasFocus2() { // do we have focus? Display display= getDisplay(); if (display != null) for (Control focus= display.getFocusControl(); focus != null; focus= focus.getParent()) if (focus == this) return true; return false; }
private void setInput(Object input) { if (!fCompare && input instanceof ICompareInput) { ICompareInput ci= (ICompareInput) input; if (fTargetIsRight) input= ci.getLeft(); else input= ci.getRight(); } fContentPane.setInput(input); if (fStructuredComparePane != null) fStructuredComparePane.setInput(input); }