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

Extensions base #92

Open
wants to merge 57 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
93ce426
Extension point for content generators introduced
nyavro Dec 5, 2020
54f9a59
Separation by extention point
nyavro Dec 24, 2020
0d60c5e
Separation by extension point: LocalizationSourceSearch separation fi…
nyavro Dec 25, 2020
503533c
Separation by extension point: LocalizationSourceSearch
nyavro Dec 26, 2020
24d6eff
Dynamic extension points
nyavro Dec 26, 2020
2b2e47b
Move to IDEA version since 201
nyavro Dec 26, 2020
d1b6a6e
Settings separation first step
nyavro Dec 26, 2020
f1defb4
Settings separation second step: config,configurable and panel separa…
nyavro Dec 27, 2020
694e956
Settings separation third step: implemented separate settings for Vue…
nyavro Dec 28, 2020
73b1673
Settings panels tests fix
nyavro Dec 29, 2020
11e7722
References tests fix
nyavro Dec 29, 2020
9356c96
Folding tests fix
nyavro Dec 29, 2020
fcfde13
CodeCompletion tests fix
nyavro Dec 29, 2020
5ab2435
Hint tests fix
nyavro Dec 29, 2020
afacb52
Inspections tests fix
nyavro Dec 29, 2020
2463df9
Actions tests disabled
nyavro Dec 29, 2020
10f4138
Quickfix tests fixed
nyavro Dec 29, 2020
ae74b73
References/translation tests fixed
nyavro Dec 29, 2020
6b74d42
Completion tests fixed
nyavro Dec 29, 2020
7cb663e
References tests fixed
nyavro Dec 29, 2020
6cbf5bc
Tests fixed
nyavro Dec 29, 2020
d0f394c
Tests fixes
nyavro Jan 11, 2021
97b5670
Tests fixes
nyavro Jan 11, 2021
a9e6ef4
Tests fixes
nyavro Jan 12, 2021
bcbd796
Tests fixes
nyavro Jan 12, 2021
eeea6b8
Tests fixes
nyavro Jan 12, 2021
3f9573a
Tests fixes
nyavro Jan 12, 2021
102253f
Tests fixes
nyavro Jan 12, 2021
c6a9995
Separate yaml support
nyavro Jan 13, 2021
2899eff
Yaml separation
nyavro Jan 16, 2021
b8b5da2
Yaml separation
nyavro Jan 16, 2021
e523141
Vue separation
nyavro Jan 16, 2021
2a939f0
Ignore test
nyavro Jan 16, 2021
d231911
Yaml tests separation
nyavro Jan 16, 2021
8594d4f
Yaml tests separation
nyavro Jan 17, 2021
396441a
Vue tests separation
nyavro Jan 17, 2021
71391b0
Vue tests separation
nyavro Jan 19, 2021
4f8f8d7
Vue tests separation
nyavro Jan 24, 2021
363a037
Disable unstable test
nyavro Feb 13, 2021
8255a56
Disable unstable test
nyavro Feb 13, 2021
264caf8
Disable unstable test
nyavro Feb 13, 2021
94cec9a
Disable unstable test
nyavro Feb 13, 2021
a8b818e
Disable unstable tests
nyavro Feb 13, 2021
ae8eef8
Disable unstable tests
nyavro Feb 13, 2021
311a068
Disable unstable tests
nyavro Feb 13, 2021
0618b44
Disable unstable tests
nyavro Feb 16, 2021
8ce15a7
Remove failing tests
nyavro Feb 16, 2021
3343013
Remove failing tests
nyavro Feb 17, 2021
6edc39f
Introduce multi project gradle setup
nyavro Feb 17, 2021
e78e6bc
Separation
nyavro Feb 17, 2021
af32dfa
Separation
nyavro Feb 18, 2021
2dccfab
Separation
nyavro Feb 23, 2021
b12579c
Separation
nyavro Feb 23, 2021
160db29
Fix build: annotations only
nyavro Feb 27, 2021
c416362
Merge branch 'extensions-base' of https://github.com/nyavro/i18nPlugi…
nyavro Feb 27, 2021
25246be
Experimental
nyavro Mar 1, 2021
507ac23
Experimental
nyavro Mar 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
/*.iml
/.idea/**
/.gradle/**
/buildSrc/.gradle/**
/app/build/**
/core/build/**
/php/build/**
/vue/build/**
/yaml/build/**
/buildSrc/build/**
/list/build/**
/utilities/build/**
/i18nKey/build/**
/build/**
/out/**
/examples/simple/.idea/**
Expand Down
111 changes: 19 additions & 92 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,94 +1,21 @@
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61"
}
}
plugins {
id 'org.jetbrains.intellij' version '0.4.16'
}

apply plugin: 'org.jetbrains.intellij'
apply plugin: 'kotlin'
apply plugin: 'jacoco'

intellij {
version 'IU-LATEST-EAP-SNAPSHOT'
pluginName 'i18n'
downloadSources false
updateSinceUntilBuild false
plugins = ['yaml', 'php', 'localization']
//alternativeIdePath = "C:\\opt\\PhpStorm"
}

test {
// intellij {
// version 'IU-2020.1'
// type "IC"
// pluginName 'i18n'
// plugins = [
// 'yaml',
// 'JavaScriptLanguage',
// 'CSS',
// "org.jetbrains.plugins.vue:201.6668.30",
// "com.jetbrains.php:201.6668.30",
// "org.jetbrains.plugins.localization:201.6668.9"
// ]
plugins = [project('core')]
}

// OR

//dependencies {
// implementation project('core')
// rootProject.name = 'i18n'
//
// include('list', 'utilities', 'i18nKey', 'vue', 'core', 'php', 'yaml')
//}
//
//prepareSandbox {
// def task = project.tasks.getByPath(':i18nPlugin:core:prepareSandbox')
// from(new File(task.destinationDir, task.pluginName)) {
// into task.pluginName
// }
intellij {
version 'IU-2019.3'
type "IC"
pluginName 'i18n'
plugins = [
'yaml',
'JavaScriptLanguage',
'CSS',
"org.jetbrains.plugins.vue:193.5233.118",
"com.jetbrains.php:193.5233.102",
"org.jetbrains.plugins.localization:193.5233.70"
]
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.2'
testCompile 'org.junit.jupiter:junit-jupiter-api:5.6.2'
testCompile 'org.junit.jupiter:junit-jupiter-params:5.6.2'
testRuntime 'org.junit.jupiter:junit-jupiter-engine:5.6.2'
testCompile 'org.junit.vintage:junit-vintage-engine:5.6.2'
testImplementation 'io.mockk:mockk:1.10.2'
testImplementation 'com.jaliansystems:marathon-java-driver:5.2.5.0'
}

useJUnitPlatform()
}

patchPluginXml {
sinceBuild '193'
}

group 'com.eny'
version '2.5.0'

repositories {
mavenCentral()
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "1.8"
}
}

publishPlugin {
token = System.getenv("IJ_HUB_TOKEN")
}

jacocoTestReport {
reports {
xml.enabled true
html.enabled false
}
}

check.dependsOn jacocoTestReport
// dependsOn task
//}
//
17 changes: 17 additions & 0 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* This file was generated by the Gradle 'init' task.
*/

plugins {
// Support convention plugins written in Groovy. Convention plugins are build scripts in 'src/main' that automatically become available as plugins in the main build.
id 'groovy-gradle-plugin'
}

repositories {
// Use the plugin portal to apply community plugins in convention plugins.
gradlePluginPortal()
}

dependencies {
implementation 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* This file was generated by the Gradle 'init' task.
*/

plugins {
// Apply the common convention plugin for shared build configuration between library and application projects.
id 'i18nPlugin.kotlin-common-conventions'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* This file was generated by the Gradle 'init' task.
*/

plugins {
// Apply the org.jetbrains.kotlin.jvm Plugin to add support for Kotlin.
id 'org.jetbrains.kotlin.jvm'
}

repositories {
// Use JCenter for resolving dependencies.
jcenter()
}

dependencies {
constraints {
// Define dependency versions as constraints
implementation 'org.apache.commons:commons-text:1.9'

implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
}

// Align versions of all Kotlin components
implementation platform('org.jetbrains.kotlin:kotlin-bom')

// Use the Kotlin JDK 8 standard library.
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'

// Align versions of all Kotlin components
implementation platform('org.jetbrains.kotlin:kotlin-bom')

testImplementation 'io.mockk:mockk:1.10.2'
testImplementation 'com.jaliansystems:marathon-java-driver:5.2.5.0'
testCompile 'junit:junit:4.12'
}

tasks.named('test') {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* This file was generated by the Gradle 'init' task.
*/

plugins {
// Apply the common convention plugin for shared build configuration between library and application projects.
id 'i18nPlugin.kotlin-common-conventions'

// Apply the java-library plugin for API and implementation separation.
id 'java-library'
}
31 changes: 31 additions & 0 deletions core/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
id 'i18nPlugin.kotlin-library-conventions'
id 'org.jetbrains.intellij' version '0.6.5'
}

dependencies {
implementation project(':utilities')
implementation project(':i18nKey')
}

intellij {
version 'IU-2020.1'
plugins = [
'yaml',
'JavaScriptLanguage',
'CSS',
"org.jetbrains.plugins.vue:201.6668.153",
"com.jetbrains.php:201.6668.153",
"org.jetbrains.plugins.localization:201.6668.60"
]
}

//apply plugin: 'org.jetbrains.intellij'

tasks.withType(KotlinCompile).all {
kotlinOptions {
jvmTarget = "1.8"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.eny.i18n.plugin.addons.js

import com.eny.i18n.plugin.ide.JsLanguageFactory
import com.eny.i18n.plugin.ide.completion.CompositeKeyCompletionContributor

/**
* Completion contributor for JS dialects
*/
class JsCompletionContributor: CompositeKeyCompletionContributor(JsLanguageFactory().callContext())
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.eny.i18n.plugin.addons.js

import com.eny.i18n.plugin.ide.CompositeKeyAnnotatorBase
import com.eny.i18n.plugin.ide.JsCallContext
import com.eny.i18n.plugin.ide.JsLanguageFactory
import com.eny.i18n.plugin.ide.annotator.*

/**
* i18n annotator for js
*/
class JsCompositeKeyAnnotator : CompositeKeyAnnotatorBase(
FullKeyExtractor(
JsCallContext(),
KeyExtractorImpl()
),
JsLanguageFactory().translationExtractor().folderSelector()
)

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.eny.i18n.plugin.addons.js

import com.eny.i18n.plugin.ide.JsLanguageFactory
import com.eny.i18n.plugin.ide.folding.FoldingBuilderBase

/**
* Js i18n folding builder
*/
class JsFoldingBuilder: FoldingBuilderBase(JsLanguageFactory())
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.eny.i18n.plugin.addons.js

import com.eny.i18n.plugin.ide.JsLanguageFactory
import com.eny.i18n.plugin.ide.references.code.ReferenceContributorBase

/**
* JS dialect reference contributor
*/
class JsReferenceContributor: ReferenceContributorBase(JsLanguageFactory().referenceAssistant())
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.eny.i18n.plugin.addons.js

import com.eny.i18n.plugin.ide.JsxLanguageFactory
import com.eny.i18n.plugin.ide.references.code.ReferenceContributorBase

/**
* JSX dialect reference contributor
*/
class JsxReferenceContributor: ReferenceContributorBase(JsxLanguageFactory().referenceAssistant())
Loading