File tree Expand file tree Collapse file tree 12 files changed +82
-20
lines changed
kotlin/irony/ide/plugin/qsseditor Expand file tree Collapse file tree 12 files changed +82
-20
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ plugins {
55 id(" org.jetbrains.intellij" ) version " 1.17.2"
66}
77
8- group = " irony.pycharm "
8+ group = " irony.ide.plugin "
99version = " 1.0.0"
1010
1111repositories {
Original file line number Diff line number Diff line change 88 * Site: https://pyqt.site , https://pyqt5.com
99 */
1010
11- package irony.pycharm .qsseditor
11+ package irony.ide.plugin .qsseditor
1212
1313import com.intellij.openapi.actionSystem.AnAction
1414import com.intellij.openapi.actionSystem.AnActionEvent
Original file line number Diff line number Diff line change 88 * Site: https://pyqt.site , https://pyqt5.com
99 */
1010
11- package irony.pycharm .qsseditor
11+ package irony.ide.plugin .qsseditor
1212
1313import com.intellij.DynamicBundle
1414import org.jetbrains.annotations.Nls
Original file line number Diff line number Diff line change 1010
1111@file:Suppress(" ktlint:standard:no-wildcard-imports" )
1212
13- package irony.pycharm .qsseditor
13+ package irony.ide.plugin .qsseditor
1414
1515import com.intellij.openapi.diagnostic.logger
1616import com.intellij.util.ui.update.MergingUpdateQueue
@@ -111,14 +111,14 @@ class QSSClient : WebSocketListener() {
111111 host : String ,
112112 port : Int ,
113113 ) {
114- if (host == this .host && port == this .port) {
114+ if (host == Companion .host && port == Companion .port) {
115115 if (socket != null || self != null ) {
116116 return
117117 }
118118 }
119119
120- this .host = host
121- this .port = port
120+ Companion .host = host
121+ Companion .port = port
122122
123123 disconnect()
124124
Original file line number Diff line number Diff line change 88 * Site: https://pyqt.site , https://pyqt5.com
99 */
1010
11- package irony.pycharm .qsseditor
11+ package irony.ide.plugin .qsseditor
1212
1313import com.intellij.openapi.options.BoundSearchableConfigurable
1414import com.intellij.openapi.options.Configurable.NoScroll
Original file line number Diff line number Diff line change 88 * Site: https://pyqt.site , https://pyqt5.com
99 */
1010
11- package irony.pycharm .qsseditor
11+ package irony.ide.plugin .qsseditor
1212
1313import com.intellij.ide.plugins.DynamicPluginListener
1414import com.intellij.ide.plugins.IdeaPluginDescriptor
Original file line number Diff line number Diff line change 1+ package irony.ide.plugin.qsseditor
2+
3+ import com.intellij.lang.Language
4+ import com.intellij.openapi.fileTypes.LanguageFileType
5+ import com.intellij.openapi.util.IconLoader
6+ import javax.swing.Icon
7+
8+ class QSSLanguage : Language (" QSS" ) {
9+ companion object {
10+ val INSTANCE : QSSLanguage = QSSLanguage ()
11+ }
12+ }
13+
14+ class QSSFileType : LanguageFileType (QSSLanguage .INSTANCE ) {
15+ override fun getName (): String {
16+ return " qss"
17+ }
18+
19+ override fun getDescription (): String {
20+ return " Qt style sheet file"
21+ }
22+
23+ override fun getDefaultExtension (): String {
24+ return " qss"
25+ }
26+
27+ override fun getIcon (): Icon {
28+ return IconLoader .getIcon(" /icons/qss.png" , QSSFileType ::class .java)
29+ }
30+
31+ companion object {
32+ val INSTANCE : QSSFileType = QSSFileType ()
33+ }
34+ }
Original file line number Diff line number Diff line change 1+ package irony.ide.plugin.qsseditor
2+
3+ import com.intellij.navigation.ChooseByNameContributorEx
4+ import com.intellij.navigation.NavigationItem
5+ import com.intellij.psi.search.GlobalSearchScope
6+ import com.intellij.util.Processor
7+ import com.intellij.util.indexing.FindSymbolParameters
8+ import com.intellij.util.indexing.IdFilter
9+
10+ class QSSGoto : ChooseByNameContributorEx {
11+ override fun processNames (
12+ processor : Processor <in String >,
13+ scope : GlobalSearchScope ,
14+ filter : IdFilter ? ,
15+ ) {
16+ println (processor)
17+ println (filter)
18+ }
19+
20+ override fun processElementsWithName (
21+ name : String ,
22+ processor : Processor <in NavigationItem >,
23+ parameters : FindSymbolParameters ,
24+ ) {
25+ println (name)
26+ println (parameters)
27+ }
28+ }
Original file line number Diff line number Diff line change 1- package irony.pycharm .qsseditor
1+ package irony.ide.plugin .qsseditor
22
33import com.intellij.openapi.editor.event.DocumentEvent
44import com.intellij.openapi.editor.event.DocumentListener
Original file line number Diff line number Diff line change 88 * Site: https://pyqt.site , https://pyqt5.com
99 */
1010
11- package irony.pycharm .qsseditor
11+ package irony.ide.plugin .qsseditor
1212
1313import com.intellij.openapi.diagnostic.logger
1414import com.intellij.openapi.project.Project
You can’t perform that action at this time.
0 commit comments