|
80 | 80 | import org.eclipse.jface.text.source.IOverviewRuler; |
81 | 81 | import org.eclipse.jface.text.source.ISourceViewer; |
82 | 82 | import org.eclipse.jface.text.source.IVerticalRuler; |
| 83 | +import org.eclipse.jface.text.source.SourceViewer; |
83 | 84 | import org.eclipse.jface.text.source.SourceViewerConfiguration; |
84 | 85 |
|
85 | 86 | import org.eclipse.ui.IEditorInput; |
@@ -1539,7 +1540,7 @@ protected void handlePreferenceStoreChanged(PropertyChangeEvent event) { |
1539 | 1540 |
|
1540 | 1541 | try { |
1541 | 1542 |
|
1542 | | - AdaptedSourceViewer asv= (AdaptedSourceViewer) getSourceViewer(); |
| 1543 | + SourceViewer asv= (SourceViewer)getSourceViewer(); |
1543 | 1544 | if (asv != null) { |
1544 | 1545 |
|
1545 | 1546 | String p= event.getProperty(); |
@@ -1574,11 +1575,11 @@ protected void handlePreferenceStoreChanged(PropertyChangeEvent event) { |
1574 | 1575 | removeActionActivationCode("IndentOnTab"); //$NON-NLS-1$ |
1575 | 1576 | } |
1576 | 1577 | } |
1577 | | - |
1578 | | - IContentAssistant c= asv.getContentAssistant(); |
1579 | | - if (c instanceof ContentAssistant) |
1580 | | - ContentAssistPreference.changeConfiguration((ContentAssistant) c, getPreferenceStore(), event); |
1581 | | - |
| 1578 | + if (asv instanceof AdaptedSourceViewer) { |
| 1579 | + IContentAssistant c = ((AdaptedSourceViewer)asv).getContentAssistant(); |
| 1580 | + if (c instanceof ContentAssistant) |
| 1581 | + ContentAssistPreference.changeConfiguration((ContentAssistant) c, getPreferenceStore(), event); |
| 1582 | + } |
1582 | 1583 | if (CODE_FORMATTER_TAB_SIZE.equals(p) && isTabsToSpacesConversionEnabled()) { |
1583 | 1584 | uninstallTabsToSpacesConverter(); |
1584 | 1585 | installTabsToSpacesConverter(); |
|
0 commit comments