summaryrefslogtreecommitdiff
path: root/platform/core-impl/src/com/intellij/psi/impl/source/text/BlockSupportImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/core-impl/src/com/intellij/psi/impl/source/text/BlockSupportImpl.java')
-rw-r--r--platform/core-impl/src/com/intellij/psi/impl/source/text/BlockSupportImpl.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/platform/core-impl/src/com/intellij/psi/impl/source/text/BlockSupportImpl.java b/platform/core-impl/src/com/intellij/psi/impl/source/text/BlockSupportImpl.java
index e9d2badbdb83..80d62f72d72b 100644
--- a/platform/core-impl/src/com/intellij/psi/impl/source/text/BlockSupportImpl.java
+++ b/platform/core-impl/src/com/intellij/psi/impl/source/text/BlockSupportImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2013 JetBrains s.r.o.
+ * Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -76,7 +76,7 @@ public class BlockSupportImpl extends BlockSupport {
@Override
@NotNull
public DiffLog reparseRange(@NotNull final PsiFile file,
- TextRange changedPsiRange,
+ @NotNull TextRange changedPsiRange,
@NotNull final CharSequence newFileText,
@NotNull final ProgressIndicator indicator) {
final PsiFileImpl fileImpl = (PsiFileImpl)file;
@@ -315,7 +315,8 @@ public class BlockSupportImpl extends BlockSupport {
PsiTreeChangeEventImpl event = new PsiTreeChangeEventImpl(manager);
event.setParent(scope);
event.setFile(scope.getContainingFile());
- event.setOffset(scope.getTextRange().getStartOffset());
+ TextRange range = scope.getTextRange();
+ event.setOffset(range == null ? 0 : range.getStartOffset());
event.setOldLength(scope.getTextLength());
// the "generic" event is being sent on every PSI change. It does not carry any specific info except the fact that "something has changed"
event.setGenericChange(isGenericChange);