Skip to content

Commit

Permalink
Fix: null pointer on parameters.getOriginalPosition
Browse files Browse the repository at this point in the history
  • Loading branch information
klesun-itn committed Aug 14, 2018
1 parent 3bf14ec commit d27728f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<idea-plugin>
<id>lv.midiana.misc.idea-plugins.deep-js-completion</id>
<name>deep-js-completion</name>
<version>2018.06.16.001</version>
<version>2018.09.14.001</version>
<vendor email="[email protected]" url="http://midiana.lv/entry/deep-js-completion">Klesun</vendor>

<description><![CDATA[
Expand All @@ -26,7 +26,7 @@ This plugin will be highly inspired by my other plugin, <a href="https://plugins
]]></description>

<change-notes><![CDATA[
<li>First change note</li>
<li>Fix: null pointer on parameters.getOriginalPosition</li>
]]>
</change-notes>

Expand All @@ -46,4 +46,4 @@ This plugin will be highly inspired by my other plugin, <a href="https://plugins
<!-- Add your actions here -->
</actions>

</idea-plugin>
</idea-plugin>
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ class DeepKeysPvdr extends CompletionProvider[CompletionParameters] {
val depth = getMaxDepth(parameters.isAutoPopup)
val search = new SearchCtx().setDepth(depth)
val startTime = System.nanoTime
val suggestions = Option(parameters.getOriginalPosition.getParent)
val suggestions = Option(parameters.getOriginalPosition)
.flatMap(pos => Option(pos.getParent))
.flatMap(findRefExpr(_))
.flatMap(ref => Option(ref.getQualifier))
.flatMap(qual => search.findExprType(qual))
Expand Down

0 comments on commit d27728f

Please sign in to comment.