Skip to content

Commit

Permalink
ref: change package name
Browse files Browse the repository at this point in the history
The previous package name didn't refer to intellij, which is an important aspect of the plugin. It generally wuld be a breaking change but since I didn't publish the plugin with the previous id/package name, doesn't make sense to update the major.
  • Loading branch information
pcha committed Feb 2, 2025
1 parent 46a6bad commit 8c486c5
Show file tree
Hide file tree
Showing 16 changed files with 38 additions and 40 deletions.
10 changes: 5 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ tasks {

generateLexer {
// source flex file
sourceFile.set(file("src/main/kotlin/com/github/pcha/bloblang/Bloblang.flex"))
sourceFile.set(file("src/main/kotlin/com/github/pcha/intellij/bloblang/Bloblang.flex"))

// target directory for lexer
targetOutputDir.set(file("src/main/gen/com/github/pcha/bloblang"))
targetOutputDir.set(file("src/main/gen/com/github/pcha/intellij/bloblang"))

// if set, plugin will remove a lexer output file before generating new one. Default: false
// purgeOldFiles.set(true)
Expand All @@ -68,16 +68,16 @@ tasks {

generateParser {
// source bnf file
sourceFile.set(file("src/main/kotlin/com/github/pcha/bloblang/Bloblang.bnf"))
sourceFile.set(file("src/main/kotlin/com/github/pcha/intellij/bloblang/Bloblang.bnf"))

// optional, task-specific root for the generated files. Default: none
targetRootOutputDir.set(file("src/main/gen"))

// path to a parser file, relative to the targetRoot
pathToParser.set("com/github/pcha/bloblang/parser/BloblangParser.java")
pathToParser.set("com/github/pcha/intellij/bloblang/parser/BloblangParser.java")

// path to a directory with generated psi files, relative to the targetRoot
pathToPsiRoot.set("com/github/pcha/bloblang/psi")
pathToPsiRoot.set("com/github/pcha/intellij/bloblang/psi")

// if set, the plugin will remove a parser output file and psi output directory before generating new ones. Default: false
purgeOldFiles.set(true)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
parserClass="com.github.pcha.bloblang.parser.BloblangParser"
parserClass="com.github.pcha.intellij.bloblang.parser.BloblangParser"

extends="com.intellij.extapi.psi.ASTWrapperPsiElement"

psiClassPrefix="Bloblang"
psiImplClassSuffix="Impl"
psiPackage="com.github.pcha.bloblang.psi"
psiImplPackage="com.github.pcha.bloblang.psi.impl"
psiPackage="com.github.pcha.intellij.bloblang.psi"
psiImplPackage="com.github.pcha.intellij.bloblang.psi.impl"

elementTypeHolderClass="com.github.pcha.bloblang.psi.BloblangTypes"
elementTypeClass="com.github.pcha.bloblang.psi.BloblangElementType"
tokenTypeClass="com.github.pcha.bloblang.psi.BloblangTokenType"
elementTypeHolderClass="com.github.pcha.intellij.bloblang.psi.BloblangTypes"
elementTypeClass="com.github.pcha.intellij.bloblang.psi.BloblangElementType"
tokenTypeClass="com.github.pcha.intellij.bloblang.psi.BloblangTokenType"
}

bloblangFile ::= item_*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.github.pcha.bloblang;
package com.github.pcha.intellij.bloblang;

import com.intellij.lexer.FlexLexer;
import com.intellij.psi.tree.IElementType;
import com.github.pcha.bloblang.psi.BloblangTypes;
import com.github.pcha.intellij.bloblang.psi.BloblangTypes;
import com.intellij.psi.TokenType;

%%
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.pcha.bloblang
package com.github.pcha.intellij.bloblang

import com.intellij.openapi.editor.colors.TextAttributesKey
import com.intellij.openapi.fileTypes.SyntaxHighlighter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.pcha.bloblang
package com.github.pcha.intellij.bloblang

import com.intellij.openapi.fileTypes.LanguageFileType
import javax.swing.Icon
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.github.pcha.bloblang
package com.github.pcha.intellij.bloblang

import com.intellij.openapi.util.IconLoader
import javax.swing.Icon

object BloblangIcons {
@JvmField
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.pcha.bloblang
package com.github.pcha.intellij.bloblang

import com.intellij.lang.Language

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.pcha.bloblang
package com.github.pcha.intellij.bloblang

import com.intellij.lexer.FlexAdapter

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.github.pcha.bloblang
package com.github.pcha.intellij.bloblang

import com.github.pcha.bloblang.parser.BloblangParser
import com.github.pcha.bloblang.psi.BloblangFile
import com.github.pcha.bloblang.psi.BloblangTokenSets
import com.github.pcha.bloblang.psi.BloblangTypes
import com.github.pcha.intellij.bloblang.parser.BloblangParser
import com.github.pcha.intellij.bloblang.psi.BloblangFile
import com.github.pcha.intellij.bloblang.psi.BloblangTokenSets
import com.github.pcha.intellij.bloblang.psi.BloblangTypes
import com.intellij.lang.ASTNode
import com.intellij.lang.ParserDefinition
import com.intellij.lang.PsiParser
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.github.pcha.bloblang
package com.github.pcha.intellij.bloblang

import com.github.pcha.bloblang.psi.BloblangTypes
import com.github.pcha.intellij.bloblang.psi.BloblangTypes
import com.intellij.lexer.Lexer
import com.intellij.openapi.editor.DefaultLanguageHighlighterColors
import com.intellij.openapi.editor.colors.TextAttributesKey
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.pcha.bloblang
package com.github.pcha.intellij.bloblang

import com.intellij.openapi.fileTypes.SyntaxHighlighter
import com.intellij.openapi.fileTypes.SyntaxHighlighterFactory
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.github.pcha.bloblang.psi
package com.github.pcha.intellij.bloblang.psi

import com.intellij.psi.tree.IElementType
import com.github.pcha.bloblang.BloblangLanguage
import com.github.pcha.intellij.bloblang.BloblangLanguage

class BloblangElementType(debugName: String) : IElementType(debugName, BloblangLanguage.INSTANCE)
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package com.github.pcha.bloblang.psi
package com.github.pcha.intellij.bloblang.psi

import com.intellij.extapi.psi.PsiFileBase
import com.intellij.openapi.fileTypes.FileType
import com.intellij.psi.FileViewProvider
import com.github.pcha.bloblang.BloblangFileType
import com.github.pcha.bloblang.BloblangLanguage
import org.jetbrains.annotations.NotNull
import com.github.pcha.intellij.bloblang.BloblangFileType
import com.github.pcha.intellij.bloblang.BloblangLanguage

class BloblangFile(viewProvider: FileViewProvider) :
PsiFileBase(viewProvider, BloblangLanguage.INSTANCE) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.pcha.bloblang.psi
package com.github.pcha.intellij.bloblang.psi

import com.intellij.psi.TokenType
import com.intellij.psi.tree.TokenSet
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.github.pcha.bloblang.psi
package com.github.pcha.intellij.bloblang.psi

import com.github.pcha.bloblang.BloblangLanguage
import com.github.pcha.intellij.bloblang.BloblangLanguage
import com.intellij.psi.tree.IElementType
import org.jetbrains.annotations.NonNls

Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@

<extensions defaultExtensionNs="com.intellij">
<fileType name="Bloblang File"
implementationClass="com.github.pcha.bloblang.BloblangFileType"
implementationClass="com.github.pcha.intellij.bloblang.BloblangFileType"
fieldName="INSTANCE"
language="Bloblang"
extensions="blobl"/>
<lang.parserDefinition language="Bloblang"
implementationClass="com.github.pcha.bloblang.BloblangParserDefinition"/>
implementationClass="com.github.pcha.intellij.bloblang.BloblangParserDefinition"/>
<lang.syntaxHighlighterFactory language="Bloblang"
implementationClass="com.github.pcha.bloblang.BloblangSyntaxHighlighterFactory"/>
implementationClass="com.github.pcha.intellij.bloblang.BloblangSyntaxHighlighterFactory"/>
<colorSettingsPage
implementation="com.github.pcha.bloblang.BloblangColorSettingsPage"/>
implementation="com.github.pcha.intellij.bloblang.BloblangColorSettingsPage"/>

</extensions>
</idea-plugin>

0 comments on commit 8c486c5

Please sign in to comment.