File tree Expand file tree Collapse file tree 7 files changed +72
-1
lines changed
kotlin/com/github/xepozz/temporal/languages/php Expand file tree Collapse file tree 7 files changed +72
-1
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ platformVersion = 2025.1.1
1414
1515# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
1616# Example: platformPlugins = com.jetbrains.php:203.4449.22, org.intellij.scala:2023.3.27@EAP
17- platformPlugins =
17+ platformPlugins = com.jetbrains.php:251.23774.16,com.jetbrains.hackathon.indices.viewer:1.30
1818# Example: platformBundledPlugins = com.intellij.java
1919platformBundledPlugins =
2020# Example: platformBundledModules = intellij.spellchecker
Original file line number Diff line number Diff line change 1+ package com.github.xepozz.temporal.languages.php
2+
3+ object TemporalClasses {
4+ const val ACTIVITY = " \\ Temporal\\ Activity\\ ActivityInterface"
5+ const val WORKFLOW = " \\ Temporal\\ Workflow\\ WorkflowInterface"
6+ const val SIGNAL_METHOD = " \\ Temporal\\ Workflow\\ SignalMethod"
7+ const val CHILD_WORKFLOW_STUB = " \\ Temporal\\ Workflow\\ ChildWorkflowStubInterface"
8+ }
Original file line number Diff line number Diff line change 1+ package com.github.xepozz.temporal.languages.php
2+
3+ import com.intellij.openapi.project.Project
4+ import com.intellij.psi.PsiElement
5+ import com.jetbrains.php.lang.psi.elements.PhpNamedElement
6+ import com.jetbrains.php.lang.psi.resolve.types.PhpType
7+ import com.jetbrains.php.lang.psi.resolve.types.PhpTypeProvider4
8+
9+ class TemporalTypeProvider : PhpTypeProvider4 {
10+ override fun getKey () = ' \uBEB1 '
11+ override fun getType (p0 : PsiElement ? ): PhpType ? {
12+ TODO (" Not yet implemented" )
13+ }
14+
15+ override fun complete (
16+ p0 : String? ,
17+ p1 : Project ?
18+ ): PhpType ? {
19+ TODO (" Not yet implemented" )
20+ }
21+
22+ override fun getBySignature (
23+ p0 : String? ,
24+ p1 : Set <String ?>? ,
25+ p2 : Int ,
26+ p3 : Project ?
27+ ): Collection <PhpNamedElement ?>? {
28+ TODO (" Not yet implemented" )
29+ }
30+
31+ override fun interceptsNativeSignature () = true
32+
33+
34+ }
Original file line number Diff line number Diff line change 1+ package com.github.xepozz.temporal.languages.php
2+
3+ object UtilClasses {
4+ const val REACT_PROMISE = " \\ React\\ Promise\\ PromiseInterface"
5+ }
Original file line number Diff line number Diff line change 1+ package com.github.xepozz.temporal.languages.php
2+
3+ import com.intellij.openapi.util.TextRange
4+ import com.intellij.psi.ElementManipulators
5+ import com.intellij.psi.PsiLanguageInjectionHost
6+ import com.jetbrains.php.lang.psi.elements.PhpAttributesOwner
7+ import com.jetbrains.php.lang.psi.elements.PhpClass
8+
9+ fun PhpClass.hasTrait (fqn : String ): Boolean = traits.any { it.fqn == fqn }
10+ fun PhpAttributesOwner.hasAttribute (fqn : String ): Boolean = attributes.any { it.fqn == fqn }
11+ fun PhpClass.hasInterface (fqn : String ): Boolean = implementedInterfaces.any { it.fqn == fqn }
12+ fun PhpClass.hasSuperClass (fqn : String ): Boolean = superClasses.any { it.fqn == fqn }
13+ val PsiLanguageInjectionHost .contentRange: TextRange
14+ get() = ElementManipulators .getValueTextRange(this ).shiftRight(textRange.startOffset)
15+
16+ // fun PhpReference.getSignatures(): Collection<String> = signature.split('|')
17+ // fun PhpReference.hasSignature(signatureToFind: String): Boolean = getSignatures().any { it==signatureToFind }
Original file line number Diff line number Diff line change 1+ <idea-plugin >
2+ <extensions defaultExtensionNs =" com.jetbrains.php" >
3+ <typeProvider4
4+ implementation =" com.github.xepozz.temporal.languages.php.TemporalTypeProvider" />
5+ </extensions >
6+ </idea-plugin >
Original file line number Diff line number Diff line change 55 <
vendor email =
" [email protected] " url =
" https://github.com/xepozz" >Dmitrii Derepko (@xepozz)</
vendor >
66
77 <depends >com.intellij.modules.platform</depends >
8+ <depends optional =" true" config-file =" language-php.xml" >com.jetbrains.php</depends >
89
910 <resource-bundle >messages.TemporalBundle</resource-bundle >
1011
You can’t perform that action at this time.
0 commit comments