Skip to content

Commit d653226

Browse files
committed
fix(devin-lang): update icon loading and add missing package declaration #101
The icon used for the DevInFileType was updated to use a custom icon instead of the AI Copilot icon. Additionally, a new file was added to declare the icon in a separate file, and the missing package declaration in DevInLexerAdapter was fixed. The build.gradle.kts file was modified to remove the unnecessary plugin and plugin version settings, as well as the dependency on the :java project, since these were not needed for this change.
1 parent 7ea39e3 commit d653226

File tree

5 files changed

+25
-12
lines changed

5 files changed

+25
-12
lines changed

build.gradle.kts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -588,15 +588,6 @@ project(":exts:devin-lang") {
588588
plugin("org.jetbrains.grammarkit")
589589
}
590590

591-
intellij {
592-
version.set(ideaVersion)
593-
plugins.set(ideaPlugins)
594-
}
595-
dependencies {
596-
implementation(project(":"))
597-
implementation(project(":java"))
598-
}
599-
600591
tasks {
601592
generateLexer {
602593
sourceFile.set(file("src/grammar/DevInLexer.flex"))

exts/devin-lang/src/main/kotlin/cc/unitmesh/language/DevInFileType.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
package cc.unitmesh.language
22

3-
import cc.unitmesh.devti.AutoDevIcons
43
import com.intellij.openapi.fileTypes.LanguageFileType
54
import com.intellij.openapi.vfs.VirtualFile
65
import javax.swing.Icon
76

87
object DevInFileType : LanguageFileType(DevInLanguage) {
98
override fun getName(): String = "DevIn File"
109

11-
override fun getIcon(): Icon = AutoDevIcons.AI_COPILOT
10+
override fun getIcon(): Icon = DevInIcons.DEFAULT
1211

1312
override fun getDefaultExtension(): String = "devin"
1413

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package cc.unitmesh.language
2+
3+
import com.intellij.openapi.util.IconLoader
4+
import javax.swing.Icon
5+
6+
object DevInIcons {
7+
@JvmField
8+
val DEFAULT: Icon = IconLoader.getIcon("/icons/ai-copilot.svg", DevInIcons::class.java)
9+
}

exts/devin-lang/src/main/kotlin/cc/unitmesh/language/DevInLexerAdapter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ package cc.unitmesh.language
22

33
import com.intellij.lexer.FlexAdapter
44

5-
class DevInLexerAdapter : FlexAdapter(cc.unitmesh.language._DevInLexer()) {
5+
class DevInLexerAdapter : FlexAdapter(_DevInLexer()) {
66

77
}
Lines changed: 14 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)