Skip to content

Commit 50c135c

Browse files
committed
Fix subtreeChanged() to call super and minor refactorings
1 parent 4ccb8d7 commit 50c135c

7 files changed

Lines changed: 8 additions & 17 deletions

File tree

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
buildscript {
2-
ext.kotlin_version = '1.2.40'
2+
ext.kotlin_version = '1.2.41'
33

44
repositories {
55
mavenCentral()
@@ -12,7 +12,7 @@ buildscript {
1212

1313

1414
plugins {
15-
id "org.jetbrains.kotlin.jvm" version "1.2.40"
15+
id "org.jetbrains.kotlin.jvm" version "1.2.41"
1616
id "org.jetbrains.intellij" version "0.3.1"
1717
}
1818

@@ -65,7 +65,7 @@ task wrapper(type: Wrapper) {
6565
// Information about the plugin
6666

6767
// Plugin version number
68-
version '3.0pre10'
68+
version '3.0pre11'
6969

7070
intellij {
7171
version = '2018.1.2'

resources/META-INF/change-notes.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<i>New features and bug-fixes in version 3:</i>
33
<br/>
44
<ul>
5+
<li>Fix for a bug in IDEA 2018</li>
56
<li>Project wide completion</li>
67
<li>Support for Mathematica source libraries</li>
78
</ul>

src/de/halirutan/mathematica/codeinsight/editoractions/enter/CommentStarInsertEnterHandler.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,10 @@ class CommentStarInsertEnterHandler : MathematicaEnterHandler() {
5252
if (comment is PsiComment && offset >= commentRange.startOffset + 2 && offset <= commentRange.endOffset - 2) {
5353

5454
val document = editor.document
55-
val textLength = document.textLength
5655

5756
val lineNumber = document.getLineNumber(offset)
5857
val elementStartLine = document.getLineNumber(comment.textOffset)
5958
val elementEndLine = document.getLineNumber(comment.textOffset + comment.textLength)
60-
val lineStartOffset = document.getLineStartOffset(lineNumber)
6159

6260
val insertString: String
6361
val move: Int

src/de/halirutan/mathematica/index/packageexport/MathematicaPackageExportIndex.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525

2626
import com.intellij.openapi.fileTypes.LanguageFileType;
2727
import com.intellij.psi.PsiFile;
28-
import com.intellij.util.containers.HashMap;
29-
import com.intellij.util.containers.HashSet;
3028
import com.intellij.util.indexing.DataIndexer;
3129
import com.intellij.util.indexing.FileBasedIndex.InputFilter;
3230
import com.intellij.util.indexing.FileContent;
@@ -36,9 +34,7 @@
3634
import de.halirutan.mathematica.lang.MathematicaLanguage;
3735
import org.jetbrains.annotations.NotNull;
3836

39-
import java.util.Collection;
40-
import java.util.Map;
41-
import java.util.Set;
37+
import java.util.*;
4238

4339
/**
4440
* Simple file index for functions that are exported from a package by giving them a usage message.

src/de/halirutan/mathematica/lang/psi/impl/ExpressionImpl.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,7 @@ public String toString() {
4747

4848
@Override
4949
public void subtreeChanged() {
50-
// final PsiElement[] children = getChildren();
51-
// for (PsiElement child : children) {
52-
// if (child instanceof ExpressionImpl) {
53-
// ((ExpressionImpl) child).subtreeChanged();
54-
// }
55-
// }
56-
50+
super.subtreeChanged();
5751
}
5852

5953
@Override

src/de/halirutan/mathematica/lang/psi/impl/MathematicaPsiFileImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ public HashSet<SymbolResolveResult> getCachedDefinitions() {
8484

8585
@Override
8686
public void subtreeChanged() {
87+
super.subtreeChanged();
8788
isCacheOutdated = true;
8889
}
8990
}

src/de/halirutan/mathematica/lang/psi/impl/SymbolImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ public ResolveResult[] multiResolve(boolean incompleteCode) {
194194

195195
@Override
196196
public void subtreeChanged() {
197+
super.subtreeChanged();
197198
myScope = null;
198199
}
199200

0 commit comments

Comments
 (0)