Skip to content

Commit

Permalink
Provide class/method name completion in docs inside () and []
Browse files Browse the repository at this point in the history
  • Loading branch information
klesun committed Aug 30, 2018
1 parent ccef3da commit 5de5d72
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private Opt<List<String>> extractTypedFqnPart(String docValue, Project project,
Opt<PhpClass> caretClass = Tls.findParent(docPsi, PhpClass.class, a -> true);
PhpIndex idx = PhpIndex.getInstance(project);
return Opt.fst(() -> opt(null)
, () -> Tls.regex(" *([A-Za-z][A-Za-z0-9_]+)::([a-zA-Z0-9_]*?)(IntellijIdeaRulezzz.*)?", docValue)
, () -> Tls.regex("(?:|.*new\\s+|.*\\(|.*\\[) *([A-Za-z][A-Za-z0-9_]+)::([a-zA-Z0-9_]*?)(IntellijIdeaRulezzz.*)?", docValue)
// have to complete method
.map(mtch -> {
String clsName = mtch.gat(0).unw();
Expand All @@ -59,7 +59,7 @@ private Opt<List<String>> extractTypedFqnPart(String docValue, Project project,
.flt(p -> metMatcher.prefixMatches(p))
.map(f -> f + "()"));
})
, () -> Tls.regex(" *([A-Z][A-Za-z0-9_]+?)(IntellijIdeaRulezzz.*)?", docValue)
, () -> Tls.regex("(?:|.*new\\s+|.*\\(|.*\\[) *([A-Z][A-Za-z0-9_]+?)(IntellijIdeaRulezzz.*)?", docValue)
// have to complete class
.fop(m -> m.gat(0))
.map(CamelHumpMatcher::new)
Expand Down

0 comments on commit 5de5d72

Please sign in to comment.