Skip to content

Commit 391c290

Browse files
author
Chris
committed
Merge branch 'node.orientation' of https://github.com/DeveloperLiberationFront/Program-Navigation-Plugin into node.orientation
2 parents da161b1 + 5196664 commit 391c290

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
import org.eclipse.jface.text.source.IOverviewRuler;
8181
import org.eclipse.jface.text.source.ISourceViewer;
8282
import org.eclipse.jface.text.source.IVerticalRuler;
83+
import org.eclipse.jface.text.source.SourceViewer;
8384
import org.eclipse.jface.text.source.SourceViewerConfiguration;
8485

8586
import org.eclipse.ui.IEditorInput;
@@ -1539,7 +1540,7 @@ protected void handlePreferenceStoreChanged(PropertyChangeEvent event) {
15391540

15401541
try {
15411542

1542-
AdaptedSourceViewer asv= (AdaptedSourceViewer) getSourceViewer();
1543+
SourceViewer asv= (SourceViewer)getSourceViewer();
15431544
if (asv != null) {
15441545

15451546
String p= event.getProperty();
@@ -1574,11 +1575,11 @@ protected void handlePreferenceStoreChanged(PropertyChangeEvent event) {
15741575
removeActionActivationCode("IndentOnTab"); //$NON-NLS-1$
15751576
}
15761577
}
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+
}
15821583
if (CODE_FORMATTER_TAB_SIZE.equals(p) && isTabsToSpacesConversionEnabled()) {
15831584
uninstallTabsToSpacesConverter();
15841585
installTabsToSpacesConverter();

0 commit comments

Comments
 (0)