Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bundle of updates/bugfix, dealing with2020.1 Beta #655

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions idea-plugin/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
kotlin_version=1.3.50
kotlin_version=1.3.71
idea_version=IU-201.6073.9-EAP-SNAPSHOT
#idea_version=171.3780.15
idea_version=145.258.11
#idea_version=145.258.11
plugin_name=Alibaba Java Coding Guidelines
gradle_jetbrains_version=0.4.5
gradle_jetbrains_version=0.4.16
systemProp.file.encoding=UTF-8

plugin_version=2.0.1
Empty file modified idea-plugin/gradlew
100755 → 100644
Empty file.
5 changes: 3 additions & 2 deletions idea-plugin/p3c-common/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id "org.jetbrains.intellij" version '0.4.5'
id 'java'
id "org.jetbrains.intellij" version "0.4.16"
}
apply plugin: 'kotlin'
apply plugin: 'idea'
Expand Down Expand Up @@ -28,7 +29,7 @@ artifacts {

def myPlugins = []

if (idea_version.startsWith('193.') || idea_version.startsWith('2019.3')) {
if (idea_version.startsWith('193.') || idea_version.startsWith('2019.3') || idea_version.startsWith('IU-201.')) {
myPlugins = ['java']
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,32 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.p3c.idea.component
package com.alibaba.p3c.idea.activity

import com.alibaba.p3c.idea.config.P3cConfig
import com.alibaba.p3c.idea.i18n.P3cBundle
import com.alibaba.p3c.idea.util.HighlightInfoTypes
import com.alibaba.p3c.idea.util.HighlightSeverities
import com.alibaba.p3c.pmd.I18nResources
import com.alibaba.smartfox.idea.common.component.AliBaseApplicationComponent
import com.alibaba.smartfox.idea.common.activity.AliBaseApplicationStartupActivity
import com.intellij.codeInsight.daemon.impl.SeverityRegistrar
import com.intellij.openapi.actionSystem.ActionManager
import com.intellij.openapi.project.Project

/**
*
*
* @author caikang
* @date 2017/06/19
*/
class CommonSettingsApplicationComponent(private val p3cConfig: P3cConfig) : AliBaseApplicationComponent {
override fun initComponent() {
class CommonSettingsApplicationStartupActivity() : AliBaseApplicationStartupActivity {
companion object {
val analyticsGroupId = "com.alibaba.p3c.analytics.action_group"
val analyticsGroupText = "$analyticsGroupId.text"
private val p3cConfig = P3cConfig()
}

override fun runActivity(project: Project) {
SeverityRegistrar.registerStandard(HighlightInfoTypes.BLOCKER, HighlightSeverities.BLOCKER)
SeverityRegistrar.registerStandard(HighlightInfoTypes.CRITICAL, HighlightSeverities.CRITICAL)
SeverityRegistrar.registerStandard(HighlightInfoTypes.MAJOR, HighlightSeverities.MAJOR)
Expand All @@ -40,9 +47,4 @@ class CommonSettingsApplicationComponent(private val p3cConfig: P3cConfig) : Ali
val analyticsGroup = ActionManager.getInstance().getAction(analyticsGroupId)
analyticsGroup.templatePresentation.text = P3cBundle.getMessage(analyticsGroupText)
}

companion object {
val analyticsGroupId = "com.alibaba.p3c.analytics.action_group"
val analyticsGroupText = "$analyticsGroupId.text"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ package com.alibaba.p3c.idea.inspection

import com.alibaba.p3c.idea.i18n.P3cBundle
import com.intellij.codeHighlighting.HighlightDisplayLevel
import com.siyeh.ig.threading.AccessToNonThreadSafeStaticFieldFromInstanceInspectionBase
import com.siyeh.ig.threading.AccessToNonThreadSafeStaticFieldFromInstanceInspection

/**
* @author caikang
* @date 2016/12/08
*/
class AliAccessToNonThreadSafeStaticFieldFromInstanceInspection
: AccessToNonThreadSafeStaticFieldFromInstanceInspectionBase,
: AccessToNonThreadSafeStaticFieldFromInstanceInspection,
AliBaseInspection {
constructor()
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import org.jetbrains.annotations.NonNls
*/
class AliWrapperTypeEqualityInspection : BaseInspection, AliBaseInspection {
constructor()

/**
* For Javassist
*/
Expand Down Expand Up @@ -125,7 +126,7 @@ class AliWrapperTypeEqualityInspection : BaseInspection, AliBaseInspection {

}

private class ArrayEqualityFix(private val deepEquals: Boolean) : InspectionGadgetsFix() {
private inner class ArrayEqualityFix(private val deepEquals: Boolean) : InspectionGadgetsFix() {

override fun getName(): String {
if (deepEquals) {
Expand All @@ -136,7 +137,7 @@ class AliWrapperTypeEqualityInspection : BaseInspection, AliBaseInspection {
}

override fun getFamilyName(): String {
return familyName
return this@AliWrapperTypeEqualityInspection.familyName
}

@Throws(IncorrectOperationException::class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.smartfox.idea.common.component
package com.alibaba.smartfox.idea.common.activity

import com.alibaba.smartfox.idea.common.util.PluginVersions
import com.intellij.openapi.components.ApplicationComponent
import com.intellij.openapi.startup.StartupActivity

/**
*
*
* @author caikang
* @date 2017/05/11
*/
interface AliBaseApplicationComponent : ApplicationComponent {
override fun getComponentName(): String {
return "${PluginVersions.pluginId.idString}-${javaClass.name}"
}

override fun disposeComponent() {
}

override fun initComponent() {
}
interface AliBaseApplicationStartupActivity : StartupActivity {
}
5 changes: 3 additions & 2 deletions idea-plugin/p3c-idea/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
plugins {
id "org.jetbrains.intellij" version '0.4.5'
id 'java'
id "org.jetbrains.intellij" version "0.4.16"
}
apply plugin: 'kotlin'
apply plugin: 'idea'

def myPlugins = ['git4idea']

if (idea_version.startsWith('193.') || idea_version.startsWith('2019.3')) {
if (idea_version.startsWith('193.') || idea_version.startsWith('2019.3') || idea_version.startsWith('IU-201.')) {
myPlugins = ['git4idea', 'java']
}

Expand Down
22 changes: 11 additions & 11 deletions idea-plugin/p3c-idea/src/main/resources/META-INF/p3c.xml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<idea-plugin>
<application-components>
<component>
<implementation-class>com.alibaba.p3c.idea.component.CommonSettingsApplicationComponent
</implementation-class>
</component>
</application-components>
<project-components>
<component>
<implementation-class>com.alibaba.p3c.idea.component.AliProjectComponent</implementation-class>
Expand Down Expand Up @@ -44,10 +38,16 @@
interface="com.alibaba.p3c.idea.ep.InspectionActionExtensionPoint"/>
</extensionPoints>
<extensions defaultExtensionNs="com.intellij">
<applicationService serviceImplementation="com.alibaba.p3c.idea.config.P3cConfig"/>
<projectService serviceImplementation="com.alibaba.p3c.idea.config.SmartFoxProjectConfig"/>
<checkinHandlerFactory implementation="com.alibaba.p3c.idea.vcs.AliCodeAnalysisCheckinHandlerFactory"
order="first"/>
<inspectionToolProvider implementation="com.alibaba.p3c.idea.inspection.AliLocalInspectionToolProvider"/>
<applicationService
serviceImplementation="com.alibaba.p3c.idea.config.P3cConfig"/>
<projectService
serviceImplementation="com.alibaba.p3c.idea.config.SmartFoxProjectConfig"/>
<checkinHandlerFactory
implementation="com.alibaba.p3c.idea.vcs.AliCodeAnalysisCheckinHandlerFactory"
order="first"/>
<inspectionToolProvider
implementation="com.alibaba.p3c.idea.inspection.AliLocalInspectionToolProvider"/>
<postStartupActivity
implementation="com.alibaba.p3c.idea.activity.CommonSettingsApplicationStartupActivity"/>
</extensions>
</idea-plugin>
Empty file modified idea-plugin/p3c-idea/src/main/resources/META-INF/plugin.xml
100755 → 100644
Empty file.
Empty file modified p3c-formatter/eclipse-codestyle.xml
100755 → 100644
Empty file.
18 changes: 0 additions & 18 deletions p3c-pmd/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -253,24 +253,6 @@
</tags>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
Expand Down