File tree Expand file tree Collapse file tree 6 files changed +33
-21
lines changed
graph-database-plugin/src/main/resources/META-INF
language/cypher/src/main/java/com/albertoventurini/graphdbplugin/language/cypher/references
platform/src/main/resources/graphdb/messages
ui/jetbrains/src/main/java/com/albertoventurini/graphdbplugin/jetbrains/inspection Expand file tree Collapse file tree 6 files changed +33
-21
lines changed Original file line number Diff line number Diff line change 1- version =0.1.2
1+ version =0.1.3
22
33# Intellij SDK
44intellijSdkVersion =2022.2
Original file line number Diff line number Diff line change 1111 Graph database plugin for the IntelliJ Platform
1212 </a>
1313 </p>
14-
1514 <p>
1615 <b>Features:</b>
1716 <ul>
5251 </ul>
5352 </ul>
5453 </p>
54+ <p>
55+ This plugin is based on the 'Graph Database Support plugin'
56+ developed by Neueda Technologies, Ltd. The original plugin has not been updated
57+ in a long time.
58+ </p>
59+ <p>
60+ This plugin has been updated to run with modern versions of IntelliJ and related IDEs.
61+ Just like the original plugin, it supports Neo4j and Cypher data sources; however, support for
62+ Gremlin data sources (such as Cosmos DB) has been dropped.
63+ </p>
5564 ]]> </description >
5665
5766 <change-notes ><![CDATA[
Original file line number Diff line number Diff line change @@ -67,10 +67,13 @@ default List<InvokableInformation> resolve() {
6767 return matchedInvocations ;
6868 }
6969
70+ String name = getFullName ();
71+
7072 matchedInvocations .addAll (CypherBuiltInFunctions .FUNCTIONS .stream ()
7173 .map (CypherBuiltInFunctionElement ::getInvokable )
72- .filter (invokable -> Objects .equals (invokable .getName (), getFullName () ))
74+ .filter (invokable -> Objects .equals (invokable .getName (), name ))
7375 .collect (toList ()));
76+
7477 if (matchedInvocations .isEmpty ()) {
7578 svc .findUserFunction (getFullName ())
7679 .map (CypherUserFunctionElement ::getInvokableInformation )
Original file line number Diff line number Diff line change 66 */
77package com .albertoventurini .graphdbplugin .language .cypher .references ;
88
9+ import com .albertoventurini .graphdbplugin .language .cypher .completion .metadata .atoms .CypherSimpleType ;
910import com .albertoventurini .graphdbplugin .language .cypher .psi .CypherMaybeVariableLength ;
1011import com .albertoventurini .graphdbplugin .language .cypher .psi .CypherNodePattern ;
1112import com .albertoventurini .graphdbplugin .language .cypher .psi .CypherPatternPart ;
1516import com .intellij .psi .PsiReference ;
1617import com .albertoventurini .graphdbplugin .language .cypher .completion .metadata .atoms .CypherList ;
1718import com .albertoventurini .graphdbplugin .language .cypher .completion .metadata .atoms .CypherType ;
19+ import com .intellij .psi .PsiReferenceService ;
20+ import org .jetbrains .annotations .NotNull ;
1821import org .jetbrains .annotations .Nullable ;
1922
2023import java .util .Optional ;
@@ -43,16 +46,13 @@ default CypherType getType() {
4346 } else if (node instanceof CypherPatternPart ) {
4447 return PATH ;
4548 } else if (node instanceof CypherRelationshipDetail ) {
46- return resolveRelationshipType ((CypherRelationshipDetail ) node );
49+ CypherMaybeVariableLength maybeVariableLength =
50+ ((CypherRelationshipDetail ) node ).getMaybeVariableLength ();
51+ return nonNull (maybeVariableLength ) ? CypherList .of (RELATIONSHIP ) : RELATIONSHIP ;
4752 }
4853
4954 return null ;
5055 })
5156 .orElse (ANY );
5257 }
53-
54- default CypherType resolveRelationshipType (CypherRelationshipDetail relationshipDetail ) {
55- CypherMaybeVariableLength maybeVariableLength = relationshipDetail .getMaybeVariableLength ();
56- return nonNull (maybeVariableLength ) ? CypherList .of (RELATIONSHIP ) : RELATIONSHIP ;
57- }
5858}
Original file line number Diff line number Diff line change 11updater.title =Graph Database plugin updated to v{0}
22updater.notification =Initial release of Graph Database Plugin.<br/>\
3- This plugin is based on the ' Graph Database Support plugin' \
4- developed by Neueda. The original plugin has not been updated\
5- in a long time. <br/>\
6- <br/>\
7- This plugin adds support for newer versions of IntelliJ\
8- and related IDEs.\
9- <br/>\
10- This plugin supports Neo4j data sources but does not support\
11- Gremlin-based data sources such as Cosmos DB.\
12- \
3+ This plugin is based on the ' Graph Database Support plugin' \
4+ developed by Neueda Technologies, Ltd. The original plugin has not been updated \
5+ in a long time. <br/>\
136<br/>\
14- <a href =" https://github.com/albertoventurini/graphdb-intellij-plugin" >Github</a>
7+ This plugin has been updated to run with modern versions of IntelliJ and related IDEs. \
8+ Just like the original plugin, it supports Neo4j and Cypher data sources; however, support for \
9+ Gremlin data sources (such as Cosmos DB) has been dropped. \
10+ <br/>\
11+ For more information, please see the \
12+ <a href =" https://github.com/albertoventurini/graphdb-intellij-plugin" >Github</a> \
13+ repository.
Original file line number Diff line number Diff line change 1212import com .intellij .codeInspection .LocalInspectionTool ;
1313import com .intellij .codeInspection .LocalInspectionToolSession ;
1414import com .intellij .codeInspection .ProblemsHolder ;
15+ import com .intellij .openapi .application .ApplicationManager ;
1516import com .intellij .psi .PsiElement ;
1617import com .intellij .psi .PsiElementVisitor ;
1718import com .albertoventurini .graphdbplugin .database .api .GraphDatabaseApi ;
@@ -52,7 +53,7 @@ public void visitElement(@NotNull PsiElement element) {
5253 private void checkStatement (@ NotNull PsiElement statement , @ NotNull ProblemsHolder problemsHolder ) {
5354 if (statement .getNode ().getElementType () == CypherTypes .SINGLE_QUERY ) {
5455 final DatabaseManagerService databaseManagerService =
55- statement . getProject ().getService (DatabaseManagerService .class );
56+ ApplicationManager . getApplication ().getService (DatabaseManagerService .class );
5657
5758 final DataSourcesComponent dataSourcesComponent =
5859 statement .getProject ().getService (DataSourcesComponent .class );
You can’t perform that action at this time.
0 commit comments