1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

fixed NPE on init

This commit is contained in:
David Inglis 2004-03-18 15:10:24 +00:00
parent 24b55c3712
commit bea720fa70

View file

@ -63,12 +63,13 @@ public class RenameRefactoringAction extends SelectionDispatchAction {
}
if((element == null) || (element instanceof ITranslationUnit)){
enable = false;
}
} else {
ITextSelection textSelection= (ITextSelection)fEditor.getSelectionProvider().getSelection();
if( (((CElement)element).getIdStartPos() != textSelection.getOffset())
|| (((CElement)element).getIdLength() != textSelection.getLength())) {
enable = false;
}
}
setEnabled(enable);
}