Skip to content

Commit

Permalink
Ready to move org (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
jxnu-liguobin authored Dec 8, 2021
1 parent 8e4da61 commit 7dc493d
Show file tree
Hide file tree
Showing 83 changed files with 312 additions and 298 deletions.
4 changes: 2 additions & 2 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ comment:
behavior: default

ignore:
- "src/main/scala/io/github/dreamylost/package.scala"
- "src/main/scala/io/github/dreamylost/macros/macros.scala"
- "src/main/scala/org/bitlap/tools/package.scala"
- "src/main/scala/org/bitlap/tools/macros/macros.scala"
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<img align="right" width="30%" height="30%" src="img.png" alt="https://dreamylost.cn"/>
<img align="right" width="30%" height="30%" src="img.png" alt="https://bitlap.org"/>

# scala-macro-tools

[![Build](https://github.com/jxnu-liguobin/scala-macro-tools/actions/workflows/ScalaCI.yml/badge.svg)](https://github.com/jxnu-liguobin/scala-macro-tools/actions/workflows/ScalaCI.yml)
[![codecov](https://codecov.io/gh/jxnu-liguobin/scala-macro-tools/branch/master/graph/badge.svg?token=IA596YRTOT)](https://codecov.io/gh/jxnu-liguobin/scala-macro-tools)
[![Maven Central](https://img.shields.io/maven-central/v/io.github.jxnu-liguobin/scala-macro-tools_2.13.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22io.github.jxnu-liguobin%22%20AND%20a:%22scala-macro-tools_2.13%22)
[![Build](https://github.com/bitlap/scala-macro-tools/actions/workflows/ScalaCI.yml/badge.svg)](https://github.com/bitlap/scala-macro-tools/actions/workflows/ScalaCI.yml)
[![codecov](https://codecov.io/gh/bitlap/scala-macro-tools/branch/master/graph/badge.svg?token=IA596YRTOT)](https://codecov.io/gh/bitlap/scala-macro-tools)
[![Maven Central deprecated](https://img.shields.io/maven-central/v/io.github.jxnu-liguobin/scala-macro-tools_2.13.svg?label=Maven%20Central%20deprecated)](https://search.maven.org/search?q=g:%22io.github.jxnu-liguobin%22%20AND%20a:%22scala-macro-tools_2.13%22)
[![Maven Central](https://img.shields.io/maven-central/v/org.bitlap/scala-macro-tools_2.13.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22org.bitlap%22%20AND%20a:%22scala-macro-tools_2.13%22)
[![Version](https://img.shields.io/jetbrains/plugin/v/17202-scala-macro-tools)](https://plugins.jetbrains.com/plugin/17202-scala-macro-tools)

Motivation
Expand Down Expand Up @@ -34,6 +35,7 @@ Learn Scala macro and abstract syntax tree.
- `@jacksonEnum`
- `@elapsed`
- `@JavaCompatible`
- `ProcessorCreator`

> The intellij plugin named `Scala-Macro-Tools` in marketplace.
Expand All @@ -46,7 +48,7 @@ Learn Scala macro and abstract syntax tree.
Add library dependency

```scala
"io.github.jxnu-liguobin" %% "scala-macro-tools" % "<VERSION>"
"org.bitlap.tools" %% "scala-macro-tools" % "<VERSION>"
```

The artefacts have been uploaded to Maven Central. Importing the library into your build system (e.g gradle, sbt), is not enough. You need to follow an extra step.
Expand Down
12 changes: 7 additions & 5 deletions README_CN.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<img align="right" width="30%" height="30%" src="img.png" alt="https://dreamylost.cn"/>
<img align="right" width="30%" height="30%" src="img.png" alt="https://bitlap.org"/>

# scala-macro-tools

[![Build](https://github.com/jxnu-liguobin/scala-macro-tools/actions/workflows/ScalaCI.yml/badge.svg)](https://github.com/jxnu-liguobin/scala-macro-tools/actions/workflows/ScalaCI.yml)
[![codecov](https://codecov.io/gh/jxnu-liguobin/scala-macro-tools/branch/master/graph/badge.svg?token=IA596YRTOT)](https://codecov.io/gh/jxnu-liguobin/scala-macro-tools)
[![Maven Central](https://img.shields.io/maven-central/v/io.github.jxnu-liguobin/scala-macro-tools_2.13.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22io.github.jxnu-liguobin%22%20AND%20a:%22scala-macro-tools_2.13%22)
[![Build](https://github.com/bitlap/scala-macro-tools/actions/workflows/ScalaCI.yml/badge.svg)](https://github.com/bitlap/scala-macro-tools/actions/workflows/ScalaCI.yml)
[![codecov](https://codecov.io/gh/bitlap/scala-macro-tools/branch/master/graph/badge.svg?token=IA596YRTOT)](https://codecov.io/gh/bitlap/scala-macro-tools)
[![Maven Central deprecated](https://img.shields.io/maven-central/v/io.github.jxnu-liguobin/scala-macro-tools_2.13.svg?label=Maven%20Central$20deprecated)](https://search.maven.org/search?q=g:%22io.github.jxnu-liguobin%22%20AND%20a:%22scala-macro-tools_2.13%22)
[![Maven Central](https://img.shields.io/maven-central/v/org.bitlap/scala-macro-tools_2.13.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22org.bitlap%22%20AND%20a:%22scala-macro-tools_2.13%22)
[![Version](https://img.shields.io/jetbrains/plugin/v/17202-scala-macro-tools)](https://plugins.jetbrains.com/plugin/17202-scala-macro-tools)

该库的目的
Expand Down Expand Up @@ -34,6 +35,7 @@
- `@jacksonEnum`
- `@elapsed`
- `@JavaCompatible`
- `ProcessorCreator`

> Intellij插件 `Scala-Macro-Tools`
Expand All @@ -48,7 +50,7 @@
> 在gradle,maven中,通常`scala-macro-tools`被替换为`scala-macro-tools_2.12`这种。其中,`2.12`表示Scala版本号。
```scala
"io.github.jxnu-liguobin" %% "scala-macro-tools" % "<VERSION>"
"org.bitlap.tools" %% "scala-macro-tools" % "<VERSION>"
```

该库已发布到maven中央仓库,请使用最新版本。仅将本库导入构建系统(例如gradle、sbt)是不够的。你需要多走一步。
Expand Down
6 changes: 3 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import sbt.{ Def, Test }
import sbtrelease.ReleaseStateTransformations._

name := "scala-macro-tools"
organization := "io.github.jxnu-liguobin"
organization := "org.bitlap"

lazy val scala212 = "2.12.14"
lazy val scala211 = "2.11.12"
Expand Down Expand Up @@ -33,9 +33,9 @@ lazy val root = (project in file("."))
case _ => List("-Ymacro-annotations" /*, "-Ymacro-debug-verbose"*/)
}
} ++ Seq("-language:experimental.macros"),
organizationName := "jxnu-liguobin && contributors",
organizationName := "org.bitlap",
startYear := Some(2021),
licenses += ("MIT", new URL("https://github.com/jxnu-liguobin/scala-macro-tools/blob/master/LICENSE")),
licenses += ("MIT", new URL("https://github.com/bitlap/scala-macro-tools/blob/master/LICENSE")),
Test / testOptions += Tests.Argument("-oDF"),
Test / fork := true,
// Test / classLoaderLayeringStrategy := ClassLoaderLayeringStrategy.ScalaLibrary,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
package io.github.dreamylost
package org.bitlap.tools

import io.github.dreamylost.toString

/**
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
package io.github.dreamylost
package org.bitlap.tools

import io.github.dreamylost.toString

/**
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
package io.github.dreamylost
package org.bitlap.tools

import io.github.dreamylost.toString
import io.github.dreamylost.builder
import io.github.dreamylost.apply

/**
*
Expand Down
2 changes: 1 addition & 1 deletion intellij-plugin/build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import org.jetbrains.sbtidea.Keys._

name := "scala-macro-tools-intellij-plugin"
organization := "io.github.jxnu-liguobin"
organization := "org.bitlap.tools"

lazy val scala213 = "2.13.6"

Expand Down
6 changes: 3 additions & 3 deletions intellij-plugin/src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
<resource-bundle>messages.PluginBundle</resource-bundle>

<extensions defaultExtensionNs="com.intellij">
<applicationService serviceImplementation="io.github.dreamylost.plugin.ScalaMacroProcessorProvider" />
<!-- <lang.psiAugmentProvider implementation="io.github.dreamylost.plugin.ScalaMacroAugmentProvider"/> -->
<applicationService serviceImplementation="org.bitlap.tools.plugin.ScalaMacroProcessorProvider" />
<!-- <lang.psiAugmentProvider implementation="org.bitlap.tools.plugin.ScalaMacroAugmentProvider"/> -->
<notificationGroup displayType="BALLOON" id="Scala-Macro-Tools Plugin" />
</extensions>

<extensions defaultExtensionNs="org.intellij.scala">
<syntheticMemberInjector implementation="io.github.dreamylost.plugin.ScalaMacroInjector"/>
<syntheticMemberInjector implementation="org.bitlap.tools.plugin.ScalaMacroInjector"/>
</extensions>

</idea-plugin>
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ hello.from.project.getname=Hello from project "{0}"!
my.cool.tool.window=My Cool Tool Window

### resources/META-INF/plugin.xml
action.io.github.dreamylost.plugin.PopupDialogAction.text=Action Basics Plugin: Pop Dialog Action
action.io.github.dreamylost.plugin.PopupDialogAction.description=SDK action example
action.org.bitlap.tools.plugin.PopupDialogAction.text=Action Basics Plugin: Pop Dialog Action
action.org.bitlap.tools.plugin.PopupDialogAction.description=SDK action example
4 changes: 2 additions & 2 deletions intellij-plugin/src/main/resources/patch/description.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<![CDATA[
<h1>Scala Macro Tools plugin for IntelliJ IDEA</h1>
<br/>
<a href="https://github.com/jxnu-liguobin/scala-macro-tools">GitHub</a> |
<a href="https://github.com/jxnu-liguobin/scala-macro-tools/issues">Issues</a>
<a href="https://github.com/bitlap/scala-macro-tools">GitHub</a> |
<a href="https://github.com/bitlap/scala-macro-tools/issues">Issues</a>
<br/>
<br/>
<b>A plugin that implements Lombok-like functionality with Scala macros</b>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.dreamylost.plugin
package org.bitlap.tools.plugin

import com.intellij.DynamicBundle
import org.jetbrains.annotations.{ NotNull, PropertyKey }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.github.dreamylost.plugin
package org.bitlap.tools.plugin

import com.intellij.openapi.components.ServiceManager
import io.github.dreamylost.plugin.processor.ProcessType
import io.github.dreamylost.plugin.processor.ProcessType.ProcessType
import org.bitlap.tools.plugin.processor.ProcessType
import org.bitlap.tools.plugin.processor.ProcessType.ProcessType
import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.ScTypeDefinition
import org.jetbrains.plugins.scala.lang.psi.impl.toplevel.typedef.SyntheticMembersInjector
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.dreamylost.plugin
package org.bitlap.tools.plugin

/**
* Mail: [email protected]
Expand All @@ -7,7 +7,7 @@ package io.github.dreamylost.plugin
*/
object ScalaMacroNames {

private val NS = "io.github.dreamylost"
private val NS = "org.bitlap.tools"
val BUILDER = s"$NS.builder"
val LOG = s"$NS.log"
val APPLY = s"$NS.apply"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.github.dreamylost.plugin
package org.bitlap.tools.plugin

import com.intellij.openapi.Disposable
import io.github.dreamylost.plugin.processor.Processor
import io.github.dreamylost.plugin.processor.clazz.{ ApplyProcessor, BuilderProcessor, ConstructorProcessor, EqualsAndHashCodeProcessor, JsonProcessor, LogProcessor }
import org.bitlap.tools.plugin.processor.Processor
import org.bitlap.tools.plugin.processor.clazz.{ ApplyProcessor, BuilderProcessor, ConstructorProcessor, EqualsAndHashCodeProcessor, JsonProcessor, LogProcessor }
import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.{ ScClass, ScObject, ScTypeDefinition }

import scala.collection.mutable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.dreamylost.plugin.processor
package org.bitlap.tools.plugin.processor

import org.jetbrains.plugins.scala.lang.psi.api.base.ScMethodLike
import org.jetbrains.plugins.scala.lang.psi.api.statements.params.ScClassParameter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.dreamylost.plugin.processor
package org.bitlap.tools.plugin.processor

/**
* Mail: [email protected]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.dreamylost.plugin.processor
package org.bitlap.tools.plugin.processor

import io.github.dreamylost.plugin.processor.ProcessType.ProcessType
import org.bitlap.tools.plugin.processor.ProcessType.ProcessType
import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.ScTypeDefinition

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.dreamylost.plugin.processor.clazz
package org.bitlap.tools.plugin.processor.clazz

import io.github.dreamylost.plugin.processor.ProcessType.ProcessType
import io.github.dreamylost.plugin.processor.{ AbsProcessor, ProcessType }
import org.bitlap.tools.plugin.processor.ProcessType.ProcessType
import org.bitlap.tools.plugin.processor.{ AbsProcessor, ProcessType }
import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.{ ScClass, ScObject, ScTypeDefinition }

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.dreamylost.plugin.processor.clazz
package org.bitlap.tools.plugin.processor.clazz

import io.github.dreamylost.plugin.processor.{ AbsProcessor, ProcessType }
import io.github.dreamylost.plugin.processor.ProcessType.ProcessType
import org.bitlap.tools.plugin.processor.{ AbsProcessor, ProcessType }
import org.bitlap.tools.plugin.processor.ProcessType.ProcessType
import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.{ ScClass, ScObject, ScTypeDefinition }

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.github.dreamylost.plugin.processor.clazz
package org.bitlap.tools.plugin.processor.clazz

import io.github.dreamylost.plugin.ScalaMacroNames
import io.github.dreamylost.plugin.processor.ProcessType.ProcessType
import io.github.dreamylost.plugin.processor.{ AbsProcessor, ProcessType }
import org.bitlap.tools.plugin.ScalaMacroNames
import org.bitlap.tools.plugin.processor.ProcessType.ProcessType
import org.bitlap.tools.plugin.processor.{ AbsProcessor, ProcessType }
import org.jetbrains.plugins.scala.lang.psi.api.expr.ScMethodCall
import org.jetbrains.plugins.scala.lang.psi.api.statements.ScVariableDefinition
import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.{ ScClass, ScTypeDefinition }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.dreamylost.plugin.processor.clazz
package org.bitlap.tools.plugin.processor.clazz

import io.github.dreamylost.plugin.processor.ProcessType.ProcessType
import io.github.dreamylost.plugin.processor.{ AbsProcessor, ProcessType }
import org.bitlap.tools.plugin.processor.ProcessType.ProcessType
import org.bitlap.tools.plugin.processor.{ AbsProcessor, ProcessType }
import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.{ ScClass, ScTypeDefinition }

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.dreamylost.plugin.processor.clazz
package org.bitlap.tools.plugin.processor.clazz

import io.github.dreamylost.plugin.processor.ProcessType.ProcessType
import io.github.dreamylost.plugin.processor.{ AbsProcessor, ProcessType }
import org.bitlap.tools.plugin.processor.ProcessType.ProcessType
import org.bitlap.tools.plugin.processor.{ AbsProcessor, ProcessType }
import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.{ ScObject, ScTypeDefinition }

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.github.dreamylost.plugin.processor.clazz
package org.bitlap.tools.plugin.processor.clazz

import io.github.dreamylost.plugin.ScalaMacroNames
import io.github.dreamylost.plugin.processor.ProcessType.ProcessType
import io.github.dreamylost.plugin.processor.{ AbsProcessor, ProcessType }
import org.bitlap.tools.plugin.ScalaMacroNames
import org.bitlap.tools.plugin.processor.ProcessType.ProcessType
import org.bitlap.tools.plugin.processor.{ AbsProcessor, ProcessType }
import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.{ ScClass, ScObject, ScTypeDefinition }

/**
Expand Down
6 changes: 3 additions & 3 deletions project/Publishing.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ object Publishing {
)),
sonatypeProfileName := organization.value,
isSnapshot := version.value endsWith "SNAPSHOT",
homepage := Some(url("https://github.com/jxnu-liguobin")),
homepage := Some(url("https://bitlap.org")),
scmInfo := Some(
ScmInfo(
url("https://github.com/jxnu-liguobin/scala-macro-tools"),
"scm:[email protected]:jxnu-liguobin/scala-macro-tools.git"
url("https://github.com/bitlap/scala-macro-tools"),
"scm:[email protected]:bitlap/scala-macro-tools.git"
))
)
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 jxnu-liguobin && contributors
* Copyright (c) 2021 org.bitlap
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
Expand All @@ -19,10 +19,10 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

package io.github.dreamylost
package org.bitlap.tools

import scala.annotation.{ compileTimeOnly, StaticAnnotation }
import io.github.dreamylost.macros.javaCompatibleMacro
import org.bitlap.tools.macros.javaCompatibleMacro

/**
* annotation to generate non-parameter constructor and get/set method for case classes.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 jxnu-liguobin && contributors
* Copyright (c) 2021 org.bitlap
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
Expand All @@ -19,7 +19,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

package io.github.dreamylost
package org.bitlap.tools

/**
* Log Level for elapsed
Expand All @@ -33,7 +33,7 @@ object LogLevel extends Enumeration {
type LogLevel = Value
val INFO, WARN, DEBUG = Value

private[dreamylost] def getLogLevel(shortType: String): LogLevel = {
private[bitlap] def getLogLevel(shortType: String): LogLevel = {
val tpe1 = s"$PACKAGE.elapsed.$shortType" //LogLevel.INFO
val tpe2 = s"$PACKAGE.elapsed.LogLevel.$shortType" // INFO
val v = LogLevel.values.find(p => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 jxnu-liguobin && contributors
* Copyright (c) 2021 org.bitlap
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
Expand All @@ -19,9 +19,9 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

package io.github.dreamylost
package org.bitlap.tools

import io.github.dreamylost.macros.ProcessorCreatorMacro
import org.bitlap.tools.macros.ProcessorCreatorMacro

import java.util.concurrent.Executor

Expand Down
Loading

0 comments on commit 7dc493d

Please sign in to comment.