diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 000000000..067d58428
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,6 @@
+{
+ "extends": [
+ "bluelovers"
+ ],
+ "rules": {}
+}
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000..a8a4bf55c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,217 @@
+# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
+
+# dependencies
+/node_modules
+/.pnp
+.pnp.js
+
+# testing
+/coverage
+
+# next.js
+/.next/
+/out/
+
+# production
+/build
+
+# misc
+.DS_Store
+*.pem
+
+# debug
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+# local env files
+.env.local
+.env.development.local
+.env.test.local
+.env.production.local
+
+# vercel
+.vercel
+
+/.*/
+.idea
+node_modules
+~ci.list.txt
+~ci.log.txt
+~ci.errors.txt
+*.stackdump
+*.bak
+*.old
+package-lock.json
+test/**/*.js
+test/**/*.d.ts
+test/*.js
+test/*.d.ts
+test/temp*
+test/**/*.map
+tests/**/*.js
+tests/**/*.d.ts
+tests/*.js
+tests/*.d.ts
+tests/temp*
+tests/**/*.map
+bin/*.d.ts
+bin/**/*.d.ts
+/packages/*/bin/*.d.ts
+/packages/*/test/**/*.js
+/packages/*/test/**/*.d.ts
+/packages/*/test/*.js
+/packages/*/test/*.d.ts
+/packages/*/test/temp*
+/packages/*/tests/**/*.js
+/packages/*/tests/**/*.d.ts
+/packages/*/tests/*.js
+/packages/*/tests/*.d.ts
+/packages/*/tests/temp*
+
+test/**/*.mjs
+test/**/*.d.mts
+test/*.mjs
+test/*.d.mts
+test/temp*
+test/**/*.map
+tests/**/*.mjs
+tests/**/*.d.mts
+tests/*.mjs
+tests/*.d.mts
+tests/temp*
+tests/**/*.map
+bin/*.d.mts
+bin/**/*.d.mts
+/packages/*/bin/*.d.mts
+/packages/*/test/**/*.mjs
+/packages/*/test/**/*.d.mts
+/packages/*/test/*.mjs
+/packages/*/test/*.d.mts
+/packages/*/test/temp*
+/packages/*/tests/**/*.mjs
+/packages/*/tests/**/*.d.mts
+/packages/*/tests/*.mjs
+/packages/*/tests/*.d.mts
+/packages/*/tests/temp*
+
+test/**/*.cjs
+test/**/*.d.cts
+test/*.cjs
+test/*.d.cts
+test/temp*
+test/**/*.map
+tests/**/*.cjs
+tests/**/*.d.cts
+tests/*.cjs
+tests/*.d.cts
+tests/temp*
+tests/**/*.map
+bin/*.d.cts
+bin/**/*.d.cts
+/packages/*/bin/*.d.cts
+/packages/*/test/**/*.cjs
+/packages/*/test/**/*.d.cts
+/packages/*/test/*.cjs
+/packages/*/test/*.d.cts
+/packages/*/test/temp*
+/packages/*/tests/**/*.cjs
+/packages/*/tests/**/*.d.cts
+/packages/*/tests/*.cjs
+/packages/*/tests/*.d.cts
+/packages/*/tests/temp*
+
+/src/**/*.d.ts
+/src/**/*.js
+/src/**/*.d.cts
+/src/**/*.d.mts
+/src/**/*.cjs
+/src/**/*.mjs
+
+**/node_modules
+*.tgz
+/tsconfig.json.tpl
+/.eslintrc.json.tpl
+!tsconfig.json
+!.eslintrc.json
+yarn-error.log
+*.log
+.git
+yarn.lock
+.env.local
+.env.*.local
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
+*.vue.js
+*.vue.d.ts
+*.vue.js.map
+vue.config.d.ts
+vue.config.js.map
+.nyc_output
+coverage
+/*.tpl
+!.forestry
+!.vuepress
+!.github
+!.gitee
+!.gitlab
+.git
+
+*.tsbuildinfo
+tsconfig.esm.json.tpl
+
+.browserslistrc
+.nvmrc
+
+/.eslintignore
+/package.d.ts
+.nycrc
+.mocharc.yml
+#jest.config.js
+node_modules/.cache
+.yarn-integrity
+jest.config.d.ts
+jest.config.js.map
+/report.*.json
+*.js.map
+*.cjs.map
+*.mjs.map
+*.ts.map
+*.cts.map
+*.mts.map
+/now.json
+.nyc_output
+.coverage-cache
+.reify-cache
+*.spec.d.ts
+*.spec.js
+.nowignore
+*/**/.github
+!/.github
+!npm-shrinkwrap.json
+*.stat
+.vercel
+/test/*.tpl
+/*.tpl
+/report.json
+
+.opt-in
+.opt-out
+/gradle
+.gradle
+/out
+/build
+
+/_*/
+_snowpack
+web_modules
+tsc-multi.json.tpl
+!/original-plugin-raw/**/*
+/.github/
diff --git a/.npmignore b/.npmignore
new file mode 100644
index 000000000..db4e4a071
--- /dev/null
+++ b/.npmignore
@@ -0,0 +1,122 @@
+/.pnp
+.pnp.js
+.idea
+~ci.list.txt
+~ci.log.txt
+~ci.errors.txt
+*.stackdump
+*.bak
+*.old
+*.log
+tsconfig.json
+package-lock.json
+test
+.github
+.gitkeep
+/.*/
+/.*
+tests
+/~*
+__test__
+__tests__
+node_modules
+/node_modules/
+**/node_modules/
+*.ts
+!*.d.ts
+/bin/**/*.d.ts
+/bin/*.d.ts
+
+!*.d.mts
+/bin/**/*.d.mts
+/bin/*.d.mts
+
+!*.d.cts
+/bin/**/*.d.cts
+/bin/*.d.cts
+
+/src/**/*.d.ts
+/src/**/*.js
+/src/**/*.d.cts
+/src/**/*.d.mts
+/src/**/*.cjs
+/src/**/*.mjs
+
+*.tgz
+/tsconfig.json.tpl
+yarn-error.log
+.git
+yarn.lock
+.env.local
+.env.*.local
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
+*.vue.js
+*.vue.d.ts
+*.vue.js.map
+.nyc_output
+coverage
+/*.tpl
+webpack.config.js
+vue.config.js
+/jestconfig.json
+/tslint.json
+.git
+webpack.*.config.js
+webpack.*.config.d.ts
+webpack.*.config.js.map
+webpack.*.config.ts
+karma.conf.js
+/_config.yml
+intellij-style-guide.xml
+jest.config.js
+*.tsbuildinfo
+tsconfig.*.json
+tsconfig.esm.json.tpl
+/package.d.ts
+.mocharc.yml
+jest.config.js
+jest.config.*
+/report.*.json
+now.json
+/Makefile
+*.spec.d.ts
+*.spec.js
+*.spec.ts
+
+*.spec.d.cts
+*.spec.cjs
+*.spec.cts
+
+*.spec.d.mts
+*.spec.mjs
+*.spec.mts
+
+*.spec.tsx
+__mocks__
+__tests__
+__snapshots__
+*.snap
+npm-shrinkwrap.json
+/example/
+*.stat
+.vercel
+tsdx.config.js
+/report.json
+
+/_*/
+_snowpack
+
+/snowpack.config.js
+web_modules
+cz-adapter
+
+tsc-multi.json.tpl
+tsc-multi.json
diff --git a/README.md b/README.md
new file mode 100644
index 000000000..5cbc4349a
--- /dev/null
+++ b/README.md
@@ -0,0 +1,12 @@
+# README.md
+
+
+
+## install
+
+```bash
+yarn add idea-l10n-zht
+yarn-tool add idea-l10n-zht
+yt add idea-l10n-zht
+```
+
diff --git a/jest.config.js b/jest.config.js
new file mode 100644
index 000000000..5e9a8eac1
--- /dev/null
+++ b/jest.config.js
@@ -0,0 +1,112 @@
+// @ts-check
+
+/**
+ * @param {string} name
+ * @returns {string}
+ * @private
+ */
+function _requireResolve(name)
+{
+ let result;
+
+ try
+ {
+ const { requireResolveExtra, requireResolveCore } = require('@yarn-tool/require-resolve');
+
+ const paths = [
+ requireResolveExtra('@bluelovers/tsdx').result,
+ requireResolveExtra('tsdx').result,
+ ].filter(Boolean);
+
+ result = requireResolveCore(name, {
+ includeGlobal: true,
+ includeCurrentDirectory: true,
+ paths,
+ })
+ }
+ catch (e)
+ {
+
+ }
+
+ return result || require.resolve(name)
+}
+
+const testExt = [
+ 'ts',
+ 'tsx',
+ 'mts',
+ 'cts',
+ //'js',
+ //'jsx',
+// 'mjs',
+// 'cjs',
+].join('|');
+
+/**
+ * @type { import('@jest/types').Config.InitialOptions }
+ */
+module.exports = {
+ clearMocks: true,
+ moduleFileExtensions: [
+ 'ts',
+ 'tsx',
+ 'mts',
+ 'cts',
+ 'js',
+ 'jsx',
+ 'mjs',
+ 'cjs',
+ 'json',
+ 'node',
+ ],
+ testEnvironment: 'node',
+ //testMatch: ['**/*.test.ts', '**/*.spec.ts'],
+ testMatch: void 0,
+ testRegex: [
+ `\\.(tests?|spec)\\.(${testExt})$`,
+ `__tests__\/\.*\\.(${testExt})$`,
+ ],
+ testPathIgnorePatterns: [
+ '/node_modules/',
+ '/__fixtures__/',
+ '/fixtures/',
+ '/__tests__/helpers/',
+ '/__tests__/utils/',
+ '__mocks__',
+ ],
+ //testRunner: 'jest-circus/runner',
+ setupFilesAfterEnv: [
+ //"jest-chain",
+ //"jest-extended/all",
+ //"jest-extended-extra",
+ //"jest-num-close-with",
+ /**
+ * https://medium.com/doctolib/how-to-run-the-same-jest-test-suite-across-several-platforms-jest-os-detection-plugin-included-f8113832482b
+ * https://github.com/doctolib/jest-os-detection
+ */
+ //'jest-os-detection',
+ ],
+ transform: {
+ '.(ts|tsx|mts|cts)$': _requireResolve('ts-jest'),
+ },
+ verbose: true,
+ /**
+ * if didn't set `coverageProvider` to `v8`
+ * with `collectCoverage` `true`, nodejs debug point maybe will fail
+ */
+ coverageProvider: 'v8',
+ collectCoverage: false,
+ coveragePathIgnorePatterns: [
+ '/node_modules/',
+ '/__snapshots__/',
+ '/__tests__/',
+ //'**/node_modules/',
+ //'**/__snapshots__/',
+ //'**/__tests__/',
+ ],
+ /**
+ * https://github.com/facebook/jest/issues/9771#issuecomment-872764344
+ */
+ //resolver: 'jest-node-exports-resolver',
+}
diff --git a/lib/cli-progress.ts b/lib/cli-progress.ts
new file mode 100644
index 000000000..185995500
--- /dev/null
+++ b/lib/cli-progress.ts
@@ -0,0 +1,15 @@
+import { ensureDirSync } from 'fs-extra';
+import { join } from 'path';
+// @ts-ignore
+import progressEstimator from 'progress-estimator';
+import { findPkgModuleCachePathCore, findPkgModulePathCore } from 'cache-path/lib/finder/findPkgModuleCachePath';
+
+export function createProgressEstimator(root: string)
+{
+ const storagePath = join(findPkgModuleCachePathCore(root), '.progress-estimator');
+ ensureDirSync(storagePath);
+ return progressEstimator({
+ // All configuration keys are optional, but it's recommended to specify a storage location.
+ storagePath,
+ });
+}
diff --git a/original-plugin-raw/zh/META-INF/MANIFEST.MF b/original-plugin-raw/zh/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..aa1b8491e
--- /dev/null
+++ b/original-plugin-raw/zh/META-INF/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Ant-Version: Apache Ant 1.10.5
+Created-By: 11.0.13+7-b1751.21 (JetBrains s.r.o.)
+
diff --git a/original-plugin-raw/zh/META-INF/plugin.xml b/original-plugin-raw/zh/META-INF/plugin.xml
new file mode 100644
index 000000000..f092ecf56
--- /dev/null
+++ b/original-plugin-raw/zh/META-INF/plugin.xml
@@ -0,0 +1,15 @@
+
中文语言包将为您的 IntelliJ IDEA, AppCode, CLion, DataGrip, GoLand, PyCharm, PhpStorm, RubyMine, 和WebStorm 带来完全中文化的界面。
您的反馈至关重要。您可以直接通过 IDE 或者 YouTrack 以中文或者英文的形式提交您的反馈。]]>
2021 年 4 月 27 日(版本更新)
2021 年 1 月 4 日(版本更新)
2020年 10月 30日(版本更新)
2020 年 6 月 10 日(安装配置及反馈提交指南)
2020 年 5 月 11 日(中文化插件发布)]]>
这是每次创建新的 Gauge 概念文件时使用的内置模板。 + | +
为 BDD 测试方案创建功能文件。 此方案基于 Gherkin 语法。
+使用 Given
、When
和 Then
关键字定义步骤。
用于创建新 JavaFX 应用程序的内置模板。 + | +
这是每次创建新的 Gauge 规范文件时使用的内置模板。 + | +
+ 生成(例如,使用代码 | 实现方法操作)时创建实现的函数的主体。 + 编辑模板时,您可以使用 C++ 表达式、注释和以下预定义变量: + |
+
+ | 函数的返回类型。 | +|
+ | 函数的默认返回值。 | +|
C 文件标头模板(包含选项卡)的所有预定义变量(例如,${USER} 和 ${DATE})也可用。 + | +
+ 生成(例如,使用代码 | 重写方法操作)时创建被重写函数的主体。 + 编辑模板时,您可以使用 C++ 表达式、注释和以下预定义变量: + |
+
+ | 基本函数调用,对于 void 函数 — BaseClass::functionName() ,带或不带形参;
+ 对于其他函数 - return BaseClass::functionName() ,带或不带形参。
+ |
+ |
+ | 函数的返回类型。 | +|
+ | 函数的默认返回值。 | +|
C 文件标头模板(包含选项卡)的所有预定义变量(例如,${USER} 和 ${DATE})也可用。 + | +
在生成时填充 catch 块的主体,例如,当应用代码 | 环绕方式…函数时。 + 此内置模板是可编辑的。 除了 Java 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量接收以下值: | +||
+ | 指定为 catch 形参的 Exception 变量的名称 | +|
+ | catch 形参的类型 | +
在生成时填充 catch 形参,例如,调用代码 | 环绕方式… 功能。 + 此内置模板是可编辑的。 例如,您可以将生成的形参设为 final,无论捕获的异常的限定名称是什么,都会始终使用预定义的名称。 + |
+
预定义变量接收以下值: | +||
+ | 如果限定名称以 Exception 结尾,Exception 变量的名称被指定为从捕获的异常类型 e 派生的 catch 形参。 | +|
+ | catch 形参的类型。 | +
+ 一个 Codeception 功能测试方法的内置模板,在例如 "新建测试" 对话框中选择了生成方法的复选框时使用。 + + | +
预定义变量接收以下值: | +||
+ |
+ + | + 方法名称。 + | +
+ |
+ + | + 第一个字符大写的方法名称。 + | +
+ |
+ + | + 被测试的类的名称。 + | +
+ 在例如 "新建测试" 对话框中选择了生成方法的复选框时使用的Codeception 单元测试方法的内置模板。 + + | +
预定义变量接收以下值: | +||
+ |
+ + | + 方法名称。 + | +
+ |
+ + | + 第一个字符大写的方法名称。 + | +
+ |
+ + | + 被测试的类的名称。 + | +
+ 在 Cucumber 中为 Java 文件创建步骤定义。 + | +
预定义变量接收以下值: | +||
+ | 步骤定义的注解。 通常,关键字用于调用步骤(Given、Then、And 等)。 | +|
+ | 为接受步骤而生成的正则表达式。 | +|
+ | 生成的方法的形参。 | +|
+ | 生成的方法体。 | +
+ 在 Cucumber 中为 Java 文件创建步骤定义。 + | +
预定义变量接收以下值: | +||
+ | 步骤定义的注解。 通常,关键字用于调用步骤(Given、Then、And 等)。 | +|
+ | 为接受步骤而生成的正则表达式。 | +|
+ | 生成的方法的名称。 | +|
+ | 生成的方法的形参。 | +|
+ | 生成的方法体。 | +
这是在程序每次生成 FreeMarker 动态方法时,用于填充方法体的内置模板。 + 模板是可编辑的。 除了 Java 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量接收以下值: | +||
+ | 创建的方法的返回类型 | +|
+ | 方法默认返回的值 | +|
+ | 创建的方法名称 | +|
+ | 创建方法的类的限定名称 | +
Go Benchmark 是一个内置模板,可用于在测试文件中创建 Go 基准函数。 + 此模板仅适用于带有 _test 后缀的测试文件。 要使用模板,点击 代码 | 生成 并选择基准。 + | +
预定义变量列表 | +||
+ | 基准函数名称 | +|
+ | 函数形参的名称 | +|
+ | 函数形参的类型 | +
Go Example 是一个内置模板,可用于在测试文件中创建 Go 示例函数。 + 此模板仅适用于带有 _test 后缀的测试文件。 要使用模板,点击 代码 | 生成 并选择示例。 + | +
预定义变量列表 | +||
+ | 示例函数名称 | +
Go 表基准 是一个内置模板,可用于在测试文件中创建 Go 表基准函数。 + 此模板仅适用于带有 _test 后缀的测试文件。 要使用模板,点击 代码 | 生成 并选择表基准。 + | +
预定义变量列表 | +||
+ | 表基准函数名称 | +|
+ | 函数形参的名称 | +|
+ | 函数形参的类型 | +
Go Table Test 是一个内置模板,可用于在测试文件中创建 Go 表测试函数。 + 此模板仅适用于带有 _test 后缀的测试文件。 要使用模板,点击 代码 | 生成 并选择表测试。 + | +
预定义变量列表 | +||
+ | 表测试函数名称 | +|
+ | 函数形参的名称 | +|
+ | 函数形参的类型 | +
Go Test 是一个内置模板,可用于在测试文件中创建 Go 测试函数。 + 此模板仅适用于带有 _test 后缀的测试文件。 要使用模板,点击 代码 | 生成 并选择测试。 + | +
预定义变量列表 | +||
+ | 测试函数名称 | +|
+ | 函数形参的名称 | +|
+ | 函数形参的类型 | +
+ 在 Google Test 固定例程中创建 SetUp 方法。
+ |
+
编辑模板时,您可以使用 C++ 表达式、注释和以下预定义变量: | +||
+ | 将光标移到此位置。 | +
+ 在 Google Test 固定例程中创建 TearDown 方法。
+ |
+
编辑模板时,您可以使用 C++ 表达式、注释和以下预定义变量: | +||
+ | 将光标移到此位置。 | +
+ 创建 Google Test 固定例程。 + | +
编辑模板时,您可以使用 C++ 表达式、注释和以下预定义变量: | +||
+ | 套件名称。 | +|
+ | 将光标移到此位置。 | +
+ 在 Google Test 测试套件中创建测试方法。 + | +
编辑模板时,您可以使用 C++ 表达式、注释和以下预定义变量: | +||
+ | 套件名称。 | +|
+ | 创建的方法的名称。 | +|
+ | 将光标移到此位置。 | +
+ 这是用于在 Groovy JUnit 测试类中创建 setUp 方法的模板。 + + | +
预定义变量接收以下值: | +||
+ | 创建的方法的名称。 | +|
+ | 生成的方法体。 | +
+ 这是用于在 Groovy JUnit 测试类中创建 tearDown 方法的模板。 + + | +
预定义变量接收以下值: | +||
+ | 创建的方法的名称。 | +|
+ | 生成的方法体。 | +
+ 这是用于创建 JUnit 3 测试类的模板。 + + | +
预定义变量接收以下值: | +||
+ | 创建的类的名称。 | +|
+ | 生成的类主体。 | +
+ 这是用于在 JUnit 3 测试类中创建测试方法的模板。 + + | +
预定义变量接收以下值: | +||
+ | 创建的方法的名称。 | +|
+ | 生成的方法体。 | +
这是在每次由程序生成 Groovy 方法(例如,使用从用法创建方法意图操作)时用于填充方法体的内置模板。 + 模板是可编辑的。 除了 Groovy 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量接收以下值: | +||
+ | 创建的方法的返回类型 | +|
+ | 方法默认返回的值 | +|
+ | 创建的方法名称 | +|
+ | 创建方法的类的限定名称 | +|
+ | 实现方法的类的非限定名称 | +
+ 将字符串串联(如 String s = "Hello " + name; )
+ 替换为国际化的 Java 代码表达式(如
+ String s = MessageFormat.format(myResourceBundle.getString("hello.0"), name); )。+ 此内置模板是可编辑的。 除了 Java 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量接收以下值: | +||
+ | java.util.ResourceBundle 类型的表达式,这一类型的实例在此上下文中可用。 | +|
+ | 字符串串联中使用的变量,通常作为实参传递给国际化表达式。 | +|
+ | 在相应的属性文件中定义的属性键名称。 + 通常,它是用于 ResourceBundle.getString() 方法形参的值。 + | +|
+ | 在相应的属性文件中定义的属性值。 + 这就是原始的 Java 字符串字面值。 + | +
+ 将字符串文字表达式(如 String s = "Hello"; )
+ 替换为国际化的 Java 代码表达式
+ (如 String s = myResourceBundle.getString("hello"); )。+ 此内置模板是可编辑的。 除了 Java 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量接收以下值: | +||
+ | java.util.ResourceBundle 类型的表达式,这一类型的实例在此上下文中可用。 | +|
+ | 在相应的属性文件中指定的属性键名称。 + 通常,它是用于 ResourceBundle.getString() 方法形参的值。 + | +|
+ | 在相应的属性文件中定义的属性值。 + 这就是原始的 Java 字符串字面值。 + | +
+ 这是内置模板,用于将 GSP 中的文本,
+ 例如:
+ + + <html> + <body> + Hello ${'world'}! + </body> + </html> + + 替换为国际化 GSP 自定义标记用法, + 例如: + + + <html> + <body> + <g:message code="HelloKey" args="['world']"/> + </body> + </html> + 。 + + 模板是可编辑的。 除了 GSP 上下文中允许的表达式外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量接收以下值: | +||
+ | 在相应的属性文件中指定的属性键名称。 + | +|
+ | 在相应的属性文件中指定的属性值。 + 这是一个原始的 GSP 文本选择值。 + | +|
+ | 实参 | +
+ 这是内置模板,用于将 GSP 中的文本
+ 例如:
+ + + <html> + <body> + Hello! + </body> + </html> + + 替换为国际化 GSP 自定义标记用法, + 例如: + + + <html> + <body> + <g:message code="HelloKey"/> + </body> + </html> + 。 + + 模板是可编辑的。 除了 GSP 上下文中允许的表达式外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量接收以下值: | +||
+ | 在相应的属性文件中指定的属性键名称。 + | +|
+ | 在相应的属性文件中指定的属性值。 + 这是一个原始的 GSP 文本选择值。 + | +
+ 这是内置模板,用于将 GSP 中的文本,
+ 例如:
+ + + <html> + <body> + Hello ${'world'}! + </body> + </html> + + 替换为国际化 GSP 自定义标记用法, + 例如: + + + <html> + <body> + <g:message code="HelloKey" args="['world']"/> + </body> + </html> + 。 + + 模板是可编辑的。 除了 GSP 上下文中允许的表达式外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量接收以下值: | +||
+ | 在相应的属性文件中指定的属性键名称。 + | +|
+ | 在相应的属性文件中指定的属性值。 + 这是一个原始的 GSP 文本选择值。 + | +|
+ | 实参 | +
+ 这是内置模板,用于将 GSP 中的文本
+ 例如:
+ + + <html> + <body> + Hello! + </body> + </html> + + 替换为国际化 GSP 自定义标记用法, + 例如: + + + <html> + <body> + <g:message code="HelloKey"/> + </body> + </html> + 。 + + 模板是可编辑的。 除了 GSP 上下文中允许的表达式外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量接收以下值: | +||
+ | 在相应的属性文件中指定的属性键名称。 + | +|
+ | 在相应的属性文件中指定的属性值。 + 这是一个原始的 GSP 文本选择值。 + | +
+ 替换 JSP 中的文本,
+ 例如:
+ + <html><body>
+ + 带有国际化的 JSP 自定义标记,例如: + + <html><body>
+ + 此内置模板是可编辑的。 除了 JSP 上下文中允许的表达式外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量接收以下值: | +||
+ | 在相应的属性文件中指定的属性键名称。 + | +|
+ | 在相应的属性文件中指定的属性值。 + 这是原始的 JSP 文本选择值。 + | +
+ 在生成已实现方法(例如,应用实现 abstract 类或实现 abstract 方法意图操作或调用代码 | 实现方法… 功能)时填充方法体。 + 此内置模板是可编辑的。 除了 Java 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量接收以下值: | +||
+ | 创建方法的返回类型 | +|
+ | 方法默认返回的值 | +|
+ | 实现的方法的名称 | +|
+ | 实现方法的类的限定名称 | +|
+ | 实现方法的类的非限定名称 | +|
文件头模板(Includes 选项卡)中的所有预定义变量也可用(例如 ${USER}、${DATE} 等)。 + | +
+ + 这是每次实现 Scala 方法时 IntelliJ IDEA 使用的内置模板 + + | +
+ 在 JUnit 3 测试类中创建一个 setUp 方法。 + + | +
预定义变量接收以下值: | +||
+ | 创建的方法的名称 | +|
+ | 生成的方法体 | +
+ 在 JUnit 3 测试类中创建一个 tearDown 方法。 + + | +
预定义变量接收以下值: | +||
+ | 创建的方法的名称 | +|
+ | 生成的方法体 | +
+ 创建一个 JUnit 3 测试类。 + | +
预定义变量接收以下值: | +||
+ | 创建的类的名称 | +|
+ | 被测试的类的名称 | +|
+ | 生成的类主体 | +
+ 在 JUnit 3 测试类中创建一个测试方法。 + + | +
预定义变量接收以下值: | +||
+ | 创建的方法的名称 | +|
+ | 生成的方法体 | +
+ 在 JUnit 4 测试类中创建一个 afterClass 方法。 + | +
预定义变量接收以下值: | +||
+ | 创建的方法的名称 | +|
+ | 生成的方法体 | +
+ 在 JUnit 4 测试类中创建一个 beforeClass 方法。 + | +
预定义变量接收以下值: | +||
+ | 创建的方法的名称 | +|
+ | 生成的方法体 | +
+ 在 JUnit 4 形参化测试类中创建一个数据方法。 + | +
预定义变量接收以下值: | +||
+ | 创建的方法的名称 | +|
+ | 生成的方法体 | +
+ 在 JUnit 4 测试类中创建一个 setUp 方法。 + | +
预定义变量接收以下值: | +||
+ | 创建的方法的名称 | +|
+ | 生成的方法体 | +
+ 在 JUnit 4 测试类中创建一个 tearDown 方法。 + | +
预定义变量接收以下值: | +||
+ | 创建的方法的名称 | +|
+ | 生成的方法体 | +
+ 创建一个 JUnit 4 测试类。 + | +
预定义变量接收以下值: | +||
+ | 创建的类的名称 | +|
+ | 被测试的类的名称 | +|
+ | 生成的类主体 | +
+ 在 JUnit 4 测试类中创建一个测试方法。 + | +
预定义变量接收以下值: | +||
+ | 创建的方法的名称 | +|
+ | 生成的方法体 | +
+ 在 JUnit 5 测试类中创建一个 afterAll 方法。 + | +
预定义变量接收以下值: | +||
+ | 创建的方法的名称 | +|
+ | 生成的方法体 | +
+ 在 JUnit 5 测试类中创建一个 beforeAll 方法。 + | +
预定义变量接收以下值: | +||
+ | 创建的方法的名称 | +|
+ | 生成的方法体 | +
+ 在 JUnit 5 测试类中创建一个 setUp 方法。 + | +
预定义变量接收以下值: | +||
+ | 创建的方法的名称 | +|
+ | 生成的方法体 | +
+ 在 JUnit 5 测试类中创建一个 tearDown 方法。 + | +
预定义变量接收以下值: | +||
+ | 创建的方法的名称 | +|
+ | 生成的方法体 | +
+ 创建一个 JUnit 5 测试类。 + | +
预定义变量接收以下值: | +||
+ | 创建的类的名称 | +|
+ | 被测试的类的名称 | +|
+ | 生成的类主体 | +
+ 在 JUnit 5 测试类中创建一个测试方法。 + | +
预定义变量接收以下值: | +||
+ | 创建的方法的名称 | +|
+ | 生成的方法体 | +
+
+ 此内置模板用于在每次生成方法(例如,通过从用法创建方法 意图操作)时填充方法体。+ 模板是可编辑的。 除了 Javascript 表达式和注释,您还可以使用预定义变量。 + 当模板被应用时,这些变量将被替换成相应的值。 + + |
+
预定义变量接收以下值: | +||
+ | 如果创建的方法是赋值目标,则返回 'true'。 | +|
+ | 如果创建的方法是在 ‘new’ 调用下,则返回 ‘true’。 | +|
+ | 如果创建的方法在应为类型的位置,则返回 'true'。 | +|
+ | 创建方法的预期类型的默认值(如果没有预期类型,则为 'undefined') | +|
+ | 创建的方法名称 | +|
所有来自 文件头 模板(包含选项卡)的预定义变量也可用。 + (例如: + ${USER}、 + ${DATE} + 等。) + | +
+
+ 此内置模板用于在每次生成被重写方法(例如,调用代码 | 重写方法… 功能)时填写方法体。+ 模板是可编辑的。 除了 Javascript 表达式和注释,您还可以使用预定义变量。 + 当模板被应用时,这些变量将被替换成相应的值。 + + |
+
预定义变量接收以下值: | +||
+ | super 方法调用,对于 void 方法 - super.method_name(); 带或不带形参;
+ 对于其他方法 - return super.method_name(); 带或不带形参
+ |
+ |
+ | super 方法调用,super.method_name(); 带或不带形参;
+ |
+ |
+ | 创建方法的返回类型 | +|
+ | 方法默认返回的值 | +|
+ | 被重写的方法的名称 | +|
所有来自 文件头 模板(包含选项卡)的预定义变量也可用。 + (例如: + ${USER}、 + ${DATE} + 等。) + | +
+ 创建 afterEach(^{}) Kiwi 代码块。
+ |
+
预定义变量接收以下值: | +||
+ | 将文本光标移至此位置 | +
+ 创建 beforeEach(^{}) Kiwi 代码块。
+ |
+
预定义变量接收以下值: | +||
+ | 将文本光标移至此位置 | +
+ 创建 context(^{}) Kiwi 代码块。
+ |
+
预定义变量接收以下值: | +||
+ | context 块的名称 |
+ |
+ | 将文本光标移至此位置 | +
+ 创建 it(^{}) Kiwi 代码块。
+ |
+
预定义变量接收以下值: | +||
+ | it 块的名称 |
+ |
+ | 将文本光标移至此位置 | +
+ 创建 specify(^{}) Kiwi 代码块。
+ |
+
预定义变量接收以下值: | +||
+ | 将文本光标移至此位置 | +
+ 这是用于为 Ktor 应用程序创建 JUnit 4 测试类的模板。 + | +
预定义变量接收以下值: | +||
+ | 创建的类的名称。 | +|
+ | 被测试的类的名称. | +|
+ | 生成的类主体。 | +
+ 这是用于在 JUnit 4 测试类中为 Ktor 创建测试方法的模板。 + | +
预定义变量接收以下值: | +||
+ |
+ + | 创建的方法的名称。 | +
+ |
+ + | 所使用的 HTTP 方法(Get、Post 等)。 | +
+ |
+ + | 相对于需要测试的当前服务的路由。 + | +
+ |
+ + | 一种路由扩展方法,用于为需要测试的服务器部件配置路由树。 + | +
+ |
+ + | 生成的方法体。 | +
每次由程序生成时填充 Kotlin 函数体,例如,使用根据用法创建函数意图操作时。 模板是可编辑的。 除了 Kotlin 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量接收以下值: | +||
+ | 创建的函数的返回类型 | +|
+ | 创建的函数的名称 | +|
+ | 创建函数的类的限定名称 | +|
+ | 实现函数的类的非限定名称 | +
每次由程序生成时,填充 Kotlin 属性的初始值设定项,例如,使用根据用法创建属性意图操作时。 模板是可编辑的。 除了 Kotlin 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量接收以下值: | +||
+ | 创建的属性的类型 | +|
+ | 创建的属性的名称 | +|
+ | 创建属性的类的限定名称 | +|
+ | 创建属性的类的非限定名称 | +
每次由程序生成时,填充 Kotlin 二级构造函数体,例如,使用根据用法创建二级构造函数意图操作时。 模板是可编辑的。 除了 Kotlin 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量接收以下值: | +||
+ | 创建函数的类的限定名称 | +|
+ | 实现函数的类的非限定名称 | +
在生成方法(例如,应用从用法创建方法意图操作)时填充方法体。 + 此内置模板是可编辑的。 除了 Java 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量接收以下值: | +||
+ | 创建方法的返回类型 | +|
+ | 方法默认返回的值 | +|
+ | 创建的方法的名称 | +|
+ | 创建方法的类的限定名称 | +|
+ | 实现方法的类的非限定名称 | +|
所有来自 文件头 模板(包含选项卡)的预定义变量也可用。 + (例如: + ${USER}、 + ${DATE} + 等。) + | +
+ 生成(例如,调用代码 | 实现方法操作)时创建实现方法的主体。 + 模板是可编辑的。 除了 Objective-C 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量将接收以下值: | +||
+ | 创建的方法的返回类型 | +|
+ | 方法默认返回的值 | +|
+ | 在其中实现方法的类的名称 | +|
C 文件标头模板(包含选项卡)中的所有预定义变量也可用(${USER}、${DATE} 等) + | +
+ 生成(例如,调用代码 | 生成 | -copyWithZone: 操作)时创建被重写 -copyWithZone: 方法的主体。+ 模板是可编辑的。 除了 Objective-C 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量将接收以下值: | +||
+ | super 方法调用,对于 void 方法 — [super methodName] ,带或不带形参;
+ 对于其他方法 — return [super methodName] ,带或不带形参
+ |
+ |
+ | 创建的方法的返回类型 | +|
+ | 方法默认返回的值 | +|
+ | 在其中重写方法的类的名称 | +|
+ | 生成的方法的主体 | +|
C 文件标头模板(包含选项卡)中的所有预定义变量也可用(${USER}、${DATE} 等) + | +
+ 生成(例如,调用代码 | 生成 | -copyWithZone: 操作)时创建实现的 -copyWithZone: 方法的主体。+ 模板是可编辑的。 除了 Objective-C 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量将接收以下值: | +||
+ | 创建的方法的返回类型 | +|
+ | 方法默认返回的值 | +|
+ | 在其中实现方法的类的名称 | +|
+ | 生成的方法的主体 | +|
C 文件标头模板(包含选项卡)中的所有预定义变量也可用(${USER}、${DATE} 等) + | +
+ 为没有实例变量的类生成(例如,调用代码 | 生成 | -copyWithZone: 操作)时创建实现的 -copyWithZone: 方法的主体。+ 模板是可编辑的。 除了 Objective-C 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量将接收以下值: | +||
+ | 创建的方法的返回类型 | +|
+ | 方法默认返回的值 | +|
+ | 在其中实现方法的类的名称 | +|
C 文件标头模板(包含选项卡)中的所有预定义变量也可用(${USER}、${DATE} 等) + | +
+ 生成(例如,调用代码 | 生成 | -description 操作)时创建被重写 -description 方法的主体。+ 模板是可编辑的。 除了 Objective-C 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量将接收以下值: | +||
+ | super 方法调用,对于 void 方法 — [super methodName] ,带或不带形参;
+ 对于其他方法 — return [super methodName] ,带或不带形参
+ |
+ |
+ | 创建的方法的返回类型 | +|
+ | 方法默认返回的值 | +|
+ | 在其中重写方法的类的名称 | +|
+ | 生成的方法的主体 | +|
C 文件标头模板(包含选项卡)中的所有预定义变量也可用(${USER}、${DATE} 等) + | +
+ 生成(例如,调用代码 | 生成 | -description 操作)时创建实现的 -description 方法的主体。+ 模板是可编辑的。 除了 Objective-C 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量将接收以下值: | +||
+ | 创建的方法的返回类型 | +|
+ | 方法默认返回的值 | +|
+ | 在其中实现方法的类的名称 | +|
+ | 生成的方法的主体 | +|
C 文件头模板(包含选项卡)中的所有预定义变量也可用 + (例如, + ${USER}、 + ${DATE} 等) + | +
+ 为没有实例变量的类生成(例如,调用代码 | 生成 | -description 操作)时创建实现的 -description 方法的主体。+ 模板是可编辑的。 除了 Objective-C 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量将接收以下值: | +||
+ | 创建的方法的返回类型 | +|
+ | 方法默认返回的值 | +|
+ | 在其中实现方法的类的名称 | +|
C 文件标头模板(包含选项卡)中的所有预定义变量也可用(${USER}、${DATE} 等) + | +
+ 生成(例如,调用代码 | 重写方法或代码 | 生成 | -initWith 操作)时创建被重写 -init 方法的主体。+ 模板是可编辑的。 除了 Objective-C 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量将接收以下值: | +||
+ | super 方法调用,对于 void 方法 — [super methodName] ,带或不带形参;
+ 对于其他方法 — return [super methodName] ,带或不带形参
+ |
+ |
+ | 创建的方法的返回类型 | +|
+ | 方法默认返回的值 | +|
+ | 在其中重写方法的类的名称 | +|
+ | 生成方法的主体 | +|
C 文件标头模板(包含选项卡)中的所有预定义变量也可用(${USER}、${DATE} 等) + | +
+ 生成(例如,调用代码 | 重写方法或代码 | 生成 | -isEqual: 和 -hash 操作)时创建被重写 -isEqual: 方法的主体。+ 模板是可编辑的。 除了 Objective-C 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量将接收以下值: | +||
+ | super 方法调用,对于 void 方法 — [super methodName] ,带或不带形参;
+ 对于其他方法 — return [super methodName] ,带或不带形参
+ |
+ |
+ | 创建的方法的返回类型 | +|
+ | 方法默认返回的值 | +|
+ | 在其中重写方法的类的名称 | +|
+ | type-specific isEqualToType:比较方法名称(如果已生成) | +|
C 文件标头模板(包含选项卡)中的所有预定义变量也可用(${USER}、${DATE} 等) + | +
+ 生成(例如,调用代码 | 重写方法操作)时创建被重写方法的主体。 + 模板是可编辑的。 除了 Objective-C 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量将接收以下值: | +||
+ | super 方法调用,对于 void 方法 — [super methodName] ,带或不带形参;
+ 对于其他方法 — return [super methodName] ,带或不带形参
+ |
+ |
+ | 创建的方法的返回类型 | +|
+ | 方法默认返回的值 | +|
+ | 在其中重写方法的类的名称 | +|
C 文件头模板(包含选项卡)中的所有预定义变量也可用 + (例如, + ${USER}、 + ${DATE} 等) + | +
+ 生成(例如,调用代码 | 重写方法操作)时创建属性被重写 getter 方法的主体。 + 模板是可编辑的。 除了 Objective-C 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量将接收以下值: | +||
+ | super 方法调用,对于 void 方法 — [super methodName] ,带或不带形参;
+ 对于其他方法 — return [super methodName] ,带或不带形参
+ |
+ |
+ | 创建的方法的返回类型 | +|
+ | 方法默认返回的值 | +|
+ | 在其中重写方法的类的名称 | +|
+ | 当属性有实例变量 时,为 "true" | +|
+ | 实例变量的名称 | +|
+ | 在 ARC 模式下:已设置 copy 特性时,为 "copyArc",否则为 "assign"+ 在非 ARC 模式下:已设置 copy 特性时,为 "copy",已设置 retain 特性时,为 "retain",否则为 "assign" |
+ |
C 文件标头模板(包含选项卡)中的所有预定义变量也可用(${USER}、${DATE} 等) + | +
+ 生成(例如,调用代码 | 重写方法操作)时创建属性被重写 setter 方法的主体。 + 模板是可编辑的。 除了 Objective-C 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量将接收以下值: | +||
+ | super 方法调用,对于 void 方法 — [super methodName] ,带或不带形参;
+ 对于其他方法 — return [super methodName] ,带或不带形参
+ |
+ |
+ | 创建的方法的返回类型 | +|
+ | 方法默认返回的值 | +|
+ | 在其中重写方法的类的名称 | +|
+ | 当属性有实例变量 时,为 "true" | +|
+ | 实例变量的名称 | +|
+ | setter 形参的名称 | +|
+ | 在 ARC 模式下:已设置 copy 特性时,为 "copyArc",否则为 "assign"+ 在非 ARC 模式下:已设置 copy 特性时,为 "copy",已设置 retain 特性时,为 "retain",否则为 "assign" |
+ |
C 文件标头模板(包含选项卡)中的所有预定义变量也可用(${USER}、${DATE} 等) + | +
+ 在类标头部分生成 +sharedInstance 方法的声明,例如,调用代码 | 生成 | +sharedInstance 操作时。+ 模板是可编辑的。 除了 Objective-C 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量将接收以下值: | +||
+ | 在其中实现方法的类的名称 | +|
C 文件标头模板(包含选项卡)中的所有预定义变量也可用(${USER}、${DATE} 等) + | +
+ 在类实现部分生成 +sharedInstance 方法,例如,调用代码 | 生成 | +sharedInstance 操作时。+ 模板是可编辑的。 除了 Objective-C 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量将接收以下值: | +||
+ | 在其中实现方法的类的名称 | +|
C 文件标头模板(包含选项卡)中的所有预定义变量也可用(${USER}、${DATE} 等) + | +
+ 在每次由程序生成被重写方法(例如,调用代码 | 重写方法… 函数)时填充方法体。 + 此内置模板是可编辑的。 除了 Java 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量接收以下值: | +||
+ | super 方法调用,对于 void 方法 - super.method_name(); ,带或不带形参;
+ 对于其他方法 - return super.method_name(); ,带或不带形参
+ |
+ |
+ | super 方法调用,super.method_name(); ,带或不带形参
+ |
+ |
+ | 创建方法的返回类型 | +|
+ | 方法默认返回的值 | +|
+ | 被重写的方法的名称 | +|
+ | 方法被重写的类的限定名称 | +|
+ | 实现方法的类的非限定名称 | +|
所有来自 文件头 模板(包含选项卡)的预定义变量也可用。 + (例如: + ${USER}、 + ${DATE} + 等。) + | +
+ + 这是每次重写 Scala 方法时 IntelliJ IDEA 使用的内置模板。 + + | +
一个 PHP 类构造函数的内置模板。 + |
+
预定义变量接收以下值: | +||
+ | 逗号分隔的构造函数形参列表,对应每个选定属性。 | +|
+ | 形参的 PHPDoc 注释。 + 生成为一系列行 ‘* @param type name’。 如果没有形参,评估为空内容。 |
+ |
+ | 异常的 PHPDoc 注释。 + 生成为一系列行 '* @throws type‘。 如果没有抛出异常,评估为空内容。 |
+ |
+ | 类名。 | +|
+ | 包含 '$this->property=$property;' 的赋值的构造函数主体。 | +
一个 PHP setter 方法的内置模板。 例如,当调用 "添加 getter 和 setter" 快速修复时,就会用到它。 + |
+
预定义变量接收以下值: | +||
+ | + 使用骆驼拼写法样式的方法名,没有 "set" 前缀,第一个字符大写。 例如,属性名称 '_my_property' 被 + 转换为 'MyProperty'。 + | +|
+ | 包含类名称。 | +|
+ | 如果语言级别为 PHP 7.0 或更高版本,则包含标量类型提示 | +|
+ | 指示语言水平是否为 PHP 7.0 或更高,因此可以为函数/方法指定返回类型。 | +|
+ | 原始属性名称保持原样。 | +|
+ | setter 形参名称。 几乎与 ${FIELD_NAME} 相同, + 但删除了第一个下划线(如果有的话)。 例如,属性名称 '_myProperty' 被 + 转换为 'myProperty'。 | +|
+ | 属性类型提示,如果未指定,则为空字符串。 | +|
+ |
+ + | 美元符号,计算为普通的 “$” 字符。 | +
一个 PHP getter 方法的内置模板。 例如,当调用 "添加 getter 和 setter" 快速修复时,就会用到它。 + |
+
+ 预定义变量接收以下值: | +||
+ | 如果属性是静态的,则取值为 'static',否则为空字符串。 | +|
+ | + 'get/is' 前缀。 如果一个属性有一个布尔类型(类型提示),则评估为 'is',否则评估为 'get' 字符串。 + | +|
+ | + 使用骆驼拼写法样式的方法名,没有 "get" 前缀,第一个字符大写。 例如,属性名称 '_my_property' 被转换为 'MyProperty'。 + | +|
+ | 包含类名称。 | +|
+ | 如果语言级别为 PHP 7.0 或更高版本,则包含返回类型提示 | +|
+ | 原始属性名称保持原样。 | +|
+ | 属性类型提示,如果未指定,则为空字符串。 | +|
+ |
+ + | 美元符号,计算为普通的 “$” 字符。 | +
一个已实现的 PHP 方法主体的内置模板。 + |
+
预定义变量接收以下值: | +||
+ | 方法名称。 | +|
+ | + 一个逗号分隔的形参列表,类似于原始方法。 + | +
+ 一个用于覆盖的 PHP 方法主体的内置模板。 + + | +
预定义变量接收以下值: | +||
+ | 方法名称。 | +|
+ | + 一个逗号分隔的形参列表,类似于原始方法。 + | +|
+ | + 如果原始方法有一个 return 语句,该变量就包含一个 'return' 字符串,否则包含一个空字符串。 + | +
+ 一个 PHP setter 方法的内置模板。 例如,当调用 "添加 getter 和 setter" 快速修复时,就会用到它。 + + | +
预定义变量接收以下值: | +||
+ | 如果属性是静态的,则取值为 'static',否则为空字符串。 | +|
+ | + 使用骆驼拼写法样式的方法名,没有 "set" 前缀,第一个字符大写。 例如,属性名称 '_my_property' 被 + 转换为 'MyProperty'。 + | +|
+ | 包含类名称。 | +|
+ | 如果语言级别为 PHP 7.0 或更高版本,则包含标量类型提示 | +|
+ | 原始属性名称保持原样。 | +|
+ | setter 形参名称。 几乎与 ${FIELD_NAME} 相同, + 但删除了第一个下划线(如果有的话)。 例如,属性名称 '_myProperty' 被 + 转换为 'myProperty'。 | +|
+ | 属性类型提示,如果未指定,则为空字符串。 | +|
+ | 指示 void 返回类型是否可用于项目中的 PHP 语言级别。 | +|
+ |
+ + | 美元符号,计算为普通的 “$” 字符。 | +
+ 一个 PHPSpec 测试方法的内置模板,在例如 "新建测试" 对话框中选择了生成方法的复选框时使用。 + + | +
预定义变量接收以下值: | +||
+ |
+ + | + 方法名称。 + | +
+ |
+ + | + 第一个字符大写的方法名称。 + | +
+ |
+ + | + 被测试的类的名称。 + | +
+ 一个 PHPUnit setUp 方法的内置模板。 + + | +
+ 一个 PHPUnit tearDown 方法的内置模板。 + + | +
+ 一个 PHPUnit 测试方法的内置模板。 例如,当在 “新建测试” 对话框中选中用于生成测试方法的复选框时,将使用它。 + + | +
预定义变量接收以下值: | +||
+ |
+ + | + 方法名称。 + | +
+ |
+ + | + 第一个字符大写的方法名称。 + | +
+ |
+ + | + 被测试的类的名称。 + | +
+
+ 此内置模板用于创建 React 类组件(例如,通过提取组件 重构)。 您可以定制这个模板,例如,使用 Component 代替 PureComponent 或改变 prop 类型的定义。
+ 您也可以使用预定义的变量。 当模板被应用时,这些变量将被替换成相应的值。
+
+ |
+
预定义变量接收以下值: | +||
+ | 组件名称 | +|
+ | 组件主体 | +|
+ | prop 类型定义(使用 prop-types 模块) | +|
+ | 当没有提供 prop 值时,React 将使用默认的 prop 值。 | +
+
+ 此内置模板用于创建 React 函数组件(例如,通过提取组件 重构)。 您可以定制这个模板,例如,将组件定义为箭头函数或改变 prop 类型的定义。
+ 您也可以使用预定义的变量。 当模板被应用时,这些变量将被替换成相应的值。
+
+ |
+
预定义变量接收以下值: | +||
+ | 组件名称 | +|
+ | 如果组件有 props,则为 true | +|
+ | 组件主体 | +|
+ | prop 类型定义(使用 prop-types 模块) | +
+ + 这是每次创建 ScalaTest 测试类时 IntelliJ IDEA 使用的内置模板 + + | +
+ + 这是每次创建 Specs2 测试类时 IntelliJ IDEA 使用的内置模板 + + | +
+ 这是用于在 Spock 测试类中创建测试方法的模板。 + + | +
预定义变量接收以下值: | +||
+ | 创建的方法的名称。 | +|
+ | 生成的方法体。 | +
+ 这是用于在 Spock 测试类中创建 cleanup() 方法的模板。 + + | +
预定义变量接收以下值: | +||
+ | 创建的方法的名称。 | +|
+ | 生成的方法体。 | +
+ 这是用于在 Spock 测试类中创建 setup() 方法的模板。 + + | +
预定义变量接收以下值: | +||
+ | 创建的方法的名称。 | +|
+ | 生成的方法体。 | +
+ 在生成已实现初始值设定项(例如,使用代码 | 生成 | 实现方法操作)时填充初始值设定项的主体。 + 模板是可编辑的。 除了 Swift 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量接收以下值: | +||
+ | 初始值设定项签名 | +|
Swift 文件头模板(包含选项卡)中的所有预定义变量也可用(例如 ${USER}、${DATE} 等)。 + | +
+ 在生成已实现方法(例如,使用代码 | 生成 | 实现方法操作)时填充方法体。 + 模板是可编辑的。 除了 Swift 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量接收以下值: | +||
+ | 创建的方法的返回类型 | +|
+ | 返回值的建议默认值(可以为空) | +|
+ | 方法签名 | +|
Swift 文件头模板(包含选项卡)中的所有预定义变量也可用(例如 ${USER}、${DATE} 等)。 + | +
+ 在生成已实现属性(例如,使用代码 | 生成 | 实现方法操作)时填充属性的主体。 + 模板是可编辑的。 除了 Swift 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量接收以下值: | +||
+ | 创建的属性的类型 | +|
+ | 返回值的建议默认值(可以为空) | +|
+ | 属性签名 | +|
+ | 当属性有 setter 时,为 "true" | +|
+ | 属性 getter 的 getter 效果(async 、throws ) |
+ |
+ | 属性 getter 的特性 | +|
+ | 属性 setter 的特性 | +|
Swift 文件头模板(包含选项卡)中的所有预定义变量也可用(例如 ${USER}、${DATE} 等)。 + | +
+ 在生成已实现下标(例如,使用代码 | 生成 | 实现方法操作)时填充下标的主体。 + 模板是可编辑的。 除了 Swift 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量接收以下值: | +||
+ | 创建的下标的返回类型 | +|
+ | 返回值的建议默认值(可以为空) | +|
+ | 下标签名 | +|
+ | 当下标有 setter 时,为 "true" | +|
+ | 属性 getter 的 getter 效果(async 、throws ) |
+ |
+ | 下标 getter 的特性 | +|
+ | 下标 setter 的特性 | +|
+ Swift 文件头模板(包含选项卡)中的所有预定义变量也可用(例如 ${USER}、${DATE} 等)。 + | +
+ 在生成被重写初始值设定项(例如,使用代码 | 生成 | 重写方法操作)时填充初始值设定项的主体。 + 模板是可编辑的。 除了 Swift 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量接收以下值: | +||
+ | super 初始值设定项调用 - 带或不带形参的 super.init()
+ |
+ |
+ | 方法签名 | +|
Swift 文件头模板(包含选项卡)中的所有预定义变量也可用(例如 ${USER}、${DATE} 等)。 + | +
+ 在生成被重写方法(例如,使用代码 | 生成 | 重写方法操作)时填充方法体。 + 模板是可编辑的。 除了 Swift 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量接收以下值: | +||
+ |
+ super 方法调用,用于 Void 方法:带或不带形参的 super.methodName() ;
+ 对于其他方法:带或不带形参的 return super.methodName()
+ |
+ |
+ | 创建的方法的返回类型 | +|
+ | 方法默认返回的值 | +|
+ | 方法签名 | +|
Swift 文件头模板(包含选项卡)中的所有预定义变量也可用(例如 ${USER}、${DATE} 等)。 + | +
+ 在生成被重写属性(例如,使用代码 | 生成 | 重写方法操作)时填充属性的主体。 + 模板是可编辑的。 除了 Swift 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量接收以下值: | +||
+ | super 属性调用:super.propertyName |
+ |
+ | 创建的属性的返回类型 | +|
+ | 属性默认返回的值 | +|
+ | 属性签名 | +|
+ | 当属性有 setter 时,为 "true" | +|
+ | 当被重写属性有 setter 时,为 "true" | +|
+ | 属性 getter 的 getter 效果(async 、throws ) |
+ |
+ | 属性 getter 的特性 | +|
+ | 属性 setter 的特性 | +|
Swift 文件头模板(包含选项卡)中的所有预定义变量也可用(例如 ${USER}、${DATE} 等)。 + | +
+ 在生成被重写下标(例如,使用代码 | 生成 | 重写方法操作)时填充下标的主体。 + 模板是可编辑的。 除了 Swift 表达式和注释外,您还可以使用预定义变量,这些变量随后将被扩展为相应值。 + |
+
预定义变量接收以下值: | +||
+ | super 下标调用 - 带形参的 return super[]
+ |
+ |
+ | 创建的下标的返回类型 | +|
+ | 下标默认返回的值 | +|
+ | 下标签名 | +|
+ | 当下标有 setter 时,为 "true" | +|
+ | 当被重写下标有 setter 时,为 "true" | +|
+ | 属性 getter 的 getter 效果(async 、throws ) |
+ |
+ | 下标 getter 的特性 | +|
+ | 下标 setter 的特性 | +|
Swift 文件头模板(包含选项卡)中的所有预定义变量也可用(例如 ${USER}、${DATE} 等)。 + | +
为插入 'default' 分支等快速修复操作使用的 switch 表达式或语句生成 default 分支。 + 此内置模板是可编辑的。 例如,您可以更改抛出的异常或调用日志记录框架。 + |
+
预定义变量接收以下值: | +||
+ | 切换选择器表达式文本 | +|
+ | switch 选择器表达式的类型 | +
+ 在 TestNG 测试类中创建一个 afterClass 方法。 + | +
预定义变量接收以下值: | +||
+ | 创建的方法的名称 | +|
+ | 生成的方法体 | +
+ 在 TestNG 测试类中创建一个 beforeClass 方法。 + | +
预定义变量接收以下值: | +||
+ | 创建的方法的名称 | +|
+ | 生成的方法体 | +
+ 在 TestNG 测试类中创建一个数据方法。 + | +
预定义变量接收以下值: | +||
+ | 创建的方法的名称 | +|
+ | 生成的方法体 | +
+ 在 TestNG 测试类中创建一个 setUp 方法。 + | +
预定义变量接收以下值: | +||
+ | 创建的方法的名称 | +|
+ | 生成的方法体 | +
+ 在 TestNG 测试类中创建一个 tearDown 方法。 + | +
预定义变量接收以下值: | +||
+ | 创建的方法的名称 | +|
+ | 生成的方法体 | +
+ 创建一个 TestNG 测试类。 + | +
预定义变量接收以下值: | +||
+ | 创建的类的名称 | +|
+ | 被测试的类的名称 | +|
+ | 生成的类主体 | +
+ 在 TestNG 测试类中创建一个测试方法。 + | +
预定义变量接收以下值: | +||
+ | 创建的方法的名称 | +|
+ | 生成的方法体 | +
+
+ 此内置模板用于在生成方法(例如,通过从用法创建方法 意图操作)时填充方法体。+ 模板是可编辑的。 除了 TypeScript 表达式和注释,您还可以使用预定义变量。 + 当模板被应用时,这些变量将被替换成相应的值。 + + |
+
预定义变量接收以下值: | +||
+ | 创建方法的返回类型 | +|
+ | 方法默认返回的值 | +|
+ | 创建的方法名称 | +|
所有来自 文件头 模板(包含选项卡)的预定义变量也可用。 + (例如: + ${USER}、 + ${DATE} + 等。) + | +
+
+ 此内置模板用于创建 React 类组件(例如,通过提取组件 重构)。 您可以定制这个模板,例如,使用 Component 代替 PureComponent 或改变 prop 类型的定义。
+ 您也可以使用预定义的变量。 当模板被应用时,这些变量将被替换成相应的值。
+ 这个模板在 TypeScript 和 Flow 中被使用。
+
+ |
+
预定义变量接收以下值: | +||
+ | 组件名称 | +|
+ | 组件主体 | +|
+ | props 类型定义 | +|
+ | 当没有提供 prop 值时,React 将使用默认的 prop 值。 | +
+
+ 此内置模板用于创建 React 函数组件(例如,通过提取组件 重构)。 您可以定制这个模板,例如,将组件定义为箭头函数或改变 prop 类型的定义。 您也可以使用预定义的变量。
+ 当模板被应用时,这些变量将被替换成相应的值。
+ 这个模板在 TypeScript 和 Flow 中被使用。
+
+ |
+
预定义变量接收以下值: | +||
+ | 组件名称 | +|
+ | 组件主体 | +|
+ | props 类型定义 | +
+ 在 XCTest 测试类中创建 setUp 方法。
+ |
+
预定义变量接收以下值: | +||
+ | 将文本光标移至此位置 | +
+ 在 XCTest 测试类中创建 tearDown 方法。
+ |
+
预定义变量接收以下值: | +||
+ | 将文本光标移至此位置 | +
+ 在 XCTest 测试类中创建 test 方法。
+ |
+
预定义变量接收以下值: | +||
+ | 创建的方法的名称 | +|
+ | 将文本光标移至此位置 | +
+ + 这是每次创建 uTest 测试对象时 IntelliJ IDEA 使用的内置模板 + + | +
在文件模板中,您可以使用文本、代码、注释和预定义变量。 以下提供了预定义变量的列表。 当您在模板中使用这些变量时,它们稍后会在编辑器中扩展为相应的值。 + + 您也可以指定自定义变量。 自定义变量使用以下格式:${VARIABLE_NAME},其中 VARIABLE_NAME是变量的名称(例如,${MY_CUSTOM_FUNCTION_NAME}) 。 + 在 IDE 创建包含自定义变量的新文件之前,您会看到一个对话框,您可以在其中定义模板中自定义变量的值。 + + 通过使用 #parse 指令,可以包括 包含 选项卡中的模板。 要包含模板,请在引号中将模板的全名指定为形参(例如,#parse("File Header"))。 + |
+
预定义变量列表 | +||
+ |
+ + | 当前系统日期 | +
+ |
+ + | 当前月份的日期 | +
+ |
+ + | 当前日期名称的前 3 个字母(例如,Mon、Tue 等) | +
+ |
+ + | 当前日期的全名(Monday、Tuesday 等) | +
+ |
+ + | 新文件的目录路径(相对于项目根目录) | +
+ |
+ + | 美元符号 ($)。 此变量用于转义美元字符,因此不会将其视为模板变量的前缀。 | +
+ |
+ + | 新文件名称 | +
+ |
+ + | 当前小时 | +
+ |
+ + | 当前分钟 | +
+ |
+ + | 当前秒 | +
+ |
+ + | 当前月份 | +
+ |
+ + | 当前月份名称的前 3 个字母(Jan、Feb 等)。 + | +
+ |
+ + | 当前月份的全名(January、February 等)。 + | +
+ |
+ + | 新实体的名称(文件、类型、接口等) | +
+ |
+ + | 在项目设置中指定的组织名称 | +
+ |
+ + | IDE 名称 | +
+ |
+ + | 当前项目名称 | +
+ |
+ + | 当前系统时间 | +
+ |
+ + | 当前用户的系统登录名 | +
+ |
+ + | 当前年度 | +
一个 Drupal 挂钩实现的 PHPDoc 注释的内置模板。 它包含一个代码片段,可以在 #parse 指令的帮助下将其包含在文件模板(Templates 标签)中。 + 模板是可编辑的。 除了静态文本、代码和注释外,您还可以使用预定义变量,这些变量将像宏一样被扩展为相应值。 + |
+
+ 预定义变量接收以下值: | +||
+ | 挂钩名称。 | +
包含一个代码片段,可以在 #parse 指令的帮助下将其包含在文件模板(Templates 选项卡)中。 + 此内置模板是可编辑的。 除了静态文本、代码和注释外,您还可以使用预定义变量,这些变量随后将像宏一样被扩展为相应值。 + |
+
预定义变量接收以下值: | +||
+ | 在其中创建新文件的软件包名称 | +|
+ | 当前的用户系统登录名 | +|
+ | 当前系统日期 | +|
+ | 当前系统时间 | +|
+ | 当前年度 | +|
+ | 当前月份 | +|
+ | 当前月份名称的前 3 个字母。 例如:Jan、Feb 等 | +|
+ | 当前月份的全名。 例如:January、February 等 | +|
+ | 当前月份的日期 | +|
+ | 当前日期名称的前 3 个字母。 例如:Mon、Tue 等 | +|
+ | 当前日期的全名。 例如:Monday、Tuesday 等 | +|
+ | 当前小时 | +|
+ | 当前分钟 | +|
+ | 当前项目名称 | +
一个 PHP 类的 PHPDoc 注释的内置模板。 它包含一个代码片段,可以在 #parse 指令的帮助下将其包含在文件模板(Templates 标签)中。 + 模板是可编辑的。 除了静态文本、代码和注释外,您还可以使用预定义变量,这些变量将像宏一样被扩展为相应值。 + |
+
+ 预定义变量接收以下值: | +||
+ | 类名。 | +|
+ | 类命名空间的完全限定名称,没有前导斜杠。 | +|
+ |
+ + | 美元符号,计算为普通的 “$” 字符。 | +
+ |
+ + | 当前系统日期 | +
+ |
+ + | 当前系统时间 | +
+ | 当前年度 | +|
+ | 当前月份 | +|
+ | 当前月份名称的前 3 个字母。 例如:Jan、Feb 等 | +|
+ | 当前月份的全名。 例如:January、February 等 | +|
+ | 当前月份的日期 | +|
+ | 当前小时 | +|
+ | 当前分钟 | +|
+ | 当前秒 | +|
+ | 当前项目名称 | +|
+ | 当前用户 | +|
+ |
+ + | 标记添加注释后文本光标必须移动到的位置。 | +
一个 PHP 文件头的内置模板。 它包含一个代码片段,可以在 #parse 指令的帮助下将其包含在文件模板(Templates 标签)中。 + 模板是可编辑的。 除了静态文本、代码和注释外,您还可以使用预定义变量,这些变量将像宏一样被扩展为相应值。 + |
+
预定义变量接收以下值: | +||
+ |
+ + | 当前文件名称 | +
+ |
+ + | 当前的用户系统登录名 | +
+ |
+ + | 当前系统日期 | +
+ |
+ + | 当前系统时间 | +
+ | 当前年度 | +|
+ | 当前月份 | +|
+ | 当前月份名称的前 3 个字母。 例如:Jan、Feb 等 | +|
+ | 当前月份的全名。 例如:January、February 等 | +|
+ | 当前月份的日期 | +|
+ | 当前小时 | +|
+ | 当前分钟 | +|
+ | 当前秒 | +|
+ |
+ + | 当前 IDE 名称 | +
+ |
+ + | 当前项目名称 | +
一个 PHP 函数的 PHPDoc 注释的内置模板。 它包含一个代码片段,可以在 #parse 指令的帮助下将其包含在文件模板(Templates 标签)中。 + 模板是可编辑的。 除了静态文本、代码和注释外,您还可以使用预定义变量,这些变量将像宏一样被扩展为相应值。 + |
+
+ 预定义变量接收以下值: | +||
+ | 函数名称。 | +|
+ | 函数返回值的类型提示。 如果没有推断出返回类型,则评估为 'void'。 | +|
+ |
+
+ 形参的 PHPDoc 注释。 + 生成为一系列行 '* @param type name'。 如果没有形参,评估为空内容。 + + |
+ |
+ |
+
+ 异常的文档注释。 + 生成为一系列行 '* @throws type'。 如果没有抛出异常,评估为空内容。 + + |
+ |
+ | 如果函数/方法是静态的,则取值为 'static',否则为空字符串。 例如:
+ + #if (${STATIC} == "static") * @static + #end + |
+ |
+ |
+ + | 美元符号,计算为普通的 “$” 字符。 | +
+ |
+ + | 当前系统日期 | +
+ |
+ + | 当前系统时间 | +
+ | 当前年度 | +|
+ | 当前月份 | +|
+ | 当前月份名称的前 3 个字母。 例如:Jan、Feb 等 | +|
+ | 当前月份的全名。 例如:January、February 等 | +|
+ | 当前月份的日期 | +|
+ | 当前小时 | +|
+ | 当前分钟 | +|
+ | 当前秒 | +|
+ | 当前项目名称 | +|
+ | 当前用户 | +|
+ |
+ + | 标记添加注释后文本光标必须移动到的位置。 | +
一个 PHP 接口的 PHPDoc 注释的内置模板。 它包含一个代码片段,可以在 #parse 指令的帮助下将其包含在文件模板(Templates 标签)中。 + 模板是可编辑的。 除了静态文本、代码和注释外,您还可以使用预定义变量,这些变量将像宏一样被扩展为相应值。 + |
+
+ 预定义变量接收以下值: | +||
+ | 接口名称。 | +|
+ | 接口命名空间的完全限定名称,没有前导斜杠。 | +|
+ |
+ + | 美元符号,计算为普通的 “$” 字符。 | +
+ |
+ + | 当前系统日期 | +
+ |
+ + | 当前系统时间 | +
+ | 当前年度 | +|
+ | 当前月份 | +|
+ | 当前月份名称的前 3 个字母。 例如:Jan、Feb 等 | +|
+ | 当前月份的全名。 例如:January、February 等 | +|
+ | 当前月份的日期 | +|
+ | 当前小时 | +|
+ | 当前分钟 | +|
+ | 当前秒 | +|
+ | 当前项目名称 | +|
+ | 当前用户 | +|
+ |
+ + | 标记添加注释后文本光标必须移动到的位置。 | +
一个 PHP 类属性的 PHPDoc 注释的内置模板。 它包含一个代码片段,可以在 #parse 指令的帮助下将其包含在文件模板(Templates 标签)中。 + 模板是可编辑的。 除了静态文本、代码和注释外,您还可以使用预定义变量,这些变量将像宏一样被扩展为相应值。 + |
+
+ 预定义变量接收以下值: | +||
+ | 属性名称。 | +|
+ | 类名。 | +|
+ | 如果属性是静态的,则取值为 'static',否则为空字符串。 | +|
+ | 属性命名空间的完全限定名称,没有前导斜杠。 | +|
+ |
+ + | 美元符号,计算为普通的 “$” 字符。 | +
+ |
+ + | 当前系统日期 | +
+ |
+ + | 当前系统时间 | +
+ | 当前年度 | +|
+ | 当前月份 | +|
+ | 当前月份名称的前 3 个字母。 例如:Jan、Feb 等 | +|
+ | 当前月份的全名。 例如:January、February 等 | +|
+ | 当前月份的日期 | +|
+ | 当前小时 | +|
+ | 当前分钟 | +|
+ | 当前秒 | +|
+ | 当前项目名称 | +|
+ | 当前用户 | +|
+ |
+ + | 标记添加注释后文本光标必须移动到的位置。 | +
一个 PHP 特征的 PHPDoc 注释的内置模板。 它包含一个代码片段,可以在 #parse 指令的帮助下将其包含在文件模板(Templates 标签)中。 + 模板是可编辑的。 除了静态文本、代码和注释外,您还可以使用预定义变量,这些变量将像宏一样被扩展为相应值。 + |
+
+ 预定义变量接收以下值: | +||
+ | 特征名称。 | +|
+ | 特征类的完全限定名称,没有前导斜杠。 | +|
+ |
+ + | 美元符号,计算为普通的 “$” 字符。 | +
+ |
+ + | 当前系统日期 | +
+ |
+ + | 当前系统时间 | +
+ | 当前年度 | +|
+ | 当前月份 | +|
+ | 当前月份名称的前 3 个字母。 例如:Jan、Feb 等 | +|
+ | 当前月份的全名。 例如:January、February 等 | +|
+ | 当前月份的日期 | +|
+ | 当前小时 | +|
+ | 当前分钟 | +|
+ | 当前秒 | +|
+ | 当前项目名称 | +|
+ | 当前用户 | +|
+ |
+ + | 标记添加注释后文本光标必须移动到的位置。 | +
+ 在此模板中,您可以借助 #parse 指令指定要包含在文件模板(文件选项卡)中
+ 的代码片段。 一个模板可以由多个文件模板共享。 除了RBS 语句、表达式和注释外,您还可以使用预定义变量,这些变量随后将像宏一样被扩展为相应值。
+
+ |
+
预定义变量接收以下值: | +||
+ ${FILE_NAME} |
+ + | 当前文件名称 | +
+ ${USER} |
+ + | 当前的用户系统登录名 | +
+ ${DATE} |
+ + | 当前系统日期 | +
+ ${TIME} |
+ + | 当前系统时间 | +
+ ${YEAR} |
+ + | 当前年度 | +
+ ${MONTH} |
+ + | 当前月份 | +
+ ${DAY} |
+ + | 当前月份的日期 | +
+ ${HOUR} |
+ + | 当前小时 | +
+ ${MINUTE} |
+ + | 当前分钟 | +
+ ${PRODUCT_NAME} |
+ + | 当前 IDE 名称 | +
+ ${PROJECT_NAME} |
+ + | 当前项目名称 | +
+ 在此模板中,您可以借助 #parse 指令指定要包含在文件模板(文件选项卡)中
+ 的代码片段。 一个模板可以由多个文件模板共享。 除了Ruby 语句、表达式和注释外,您还可以使用预定义变量,这些变量随后将像宏一样被扩展为相应值。
+
+ |
+
预定义变量接收以下值: | +||
+ ${FILE_NAME} |
+ + | 当前文件名称 | +
+ ${USER} |
+ + | 当前的用户系统登录名 | +
+ ${DATE} |
+ + | 当前系统日期 | +
+ ${TIME} |
+ + | 当前系统时间 | +
+ ${YEAR} |
+ + | 当前年度 | +
+ ${MONTH} |
+ + | 当前月份 | +
+ ${DAY} |
+ + | 当前月份的日期 | +
+ ${HOUR} |
+ + | 当前小时 | +
+ ${MINUTE} |
+ + | 当前分钟 | +
+ ${PRODUCT_NAME} |
+ + | 当前 IDE 名称 | +
+ ${PROJECT_NAME} |
+ + | 当前项目名称 | +
包含一个代码段,可以使用 #parse 指令将其包含在文件模板(模板选项卡)中。+ 模板是可编辑的。 除了静态文本、代码和注释外,您还可以使用预定义变量,这些变量随后将像宏一样被扩展为相应值。 + + |
+
预定义变量接收以下值: | +||
+ | 当前文件的名称 | +|
+ | 当前用户的系统登录名 | +|
+ | 当前用户的全名 | +|
+ | Xcode 项目的组织名称 | +|
+ | 当前系统日期 | +|
+ | 当前系统时间 | +|
+ | 当前年度 | +|
+ | 当前月份 | +|
+ | 当前月份名称的前 3 个字母。 例如:Jan、Feb 等 | +|
+ | 当前月份的全名。 例如:January、February 等 | +|
+ | 当前日期 | +|
+ | 当前日期名称的前 3 个字母。 例如:Mon、Tue 等 | +|
+ | 当天的全名。 例如:Monday、Tuesday 等 | +|
+ | 当前小时 | +|
+ | 当前分钟 | +|
+ | 当前项目的名称 | +|
+ | Swift 编译器的主要版本 | +|
+ | Swift 编译器的次要版本 | +|
+ | 首选显式返回选项(偏好设置 | 编辑器 | 代码样式 | Swift | 代码生成)的值 | +
利用 #parse 指令,指定要包含到文件模板(模板选项卡)中的代码片段。 + 一个模板可以被多个文件模板共享。 + 除了静态文本、代码和注释外,您还可以使用预定义变量,这些变量随后将像宏一样被扩展为相应值。 + |
+
预定义变量接收以下值: | +||
+ | 在其中创建新文件的软件包名称 | +|
+ | 当前用户的系统登录名 | +|
+ | 当前系统日期 | +|
+ | 当前系统时间 | +|
+ | 当前年度 | +|
+ | 当前月份 | +|
+ | 当前月份名称的前 3 个字母(Jan、Feb 等) | +|
+ | 当前月份的全名(January、February 等)。 | +|
+ | 当前月份的日期 | +|
+ | 当前日期名称的前 3 个字母(例如,Mon、Tue 等) | +|
+ | 当前日期的全名(Monday、Tuesday 等) | +|
+ | 当前小时 | +|
+ | 当前分钟 | +|
+ | 当前项目名称 | +
+ + AWS CloudFormation (JSON) 空模板。 + + | +
+ + AWS CloudFormation (YAML) 空模板。 + + | +
适用于通过在项目工具窗口中调用新建 | Java 类 | 注解创建的新 Java 注解。 + + 此内置模板是可编辑的。 除了 Java 表达式和注释外,您还可以使用预定义变量(如下所列),这些变量随后将像宏一样被扩展为相应值。 + + 您也可以指定自定义变量。 自定义变量使用以下格式:${VARIABLE_NAME},其中 VARIABLE_NAME是变量的名称(例如,${MY_CUSTOM_FUNCTION_NAME}) 。 + 在 IDE 创建包含自定义变量的新文件之前,您会看到一个对话框,您可以在其中定义模板中自定义变量的值。 + + 通过使用 #parse 指令,可以包括 包含 选项卡中的模板。 要包含模板,请在引号中将模板的全名指定为形参(例如,#parse("File Header.java"))。 + |
+
预定义变量接收以下值: | +||
+ | 在其中创建新注解的软件包名称 | +|
+ | 您在创建新类对话框中指定的新注解的名称 | +|
+ | 当前用户的系统登录名 | +|
+ | 当前系统日期 | +|
+ | 当前系统时间 | +|
+ | 当前年度 | +|
+ | 当前月份 | +|
+ | 当前月份名称的前 3 个字母(例如,Jan、Feb 等) | +|
+ | 当前月份的全名(January、February 等)。 | +|
+ | 当前月份的日期 | +|
+ | 当前小时 | +|
+ | 当前分钟 | +|
+ | 当前项目名称 | +
创建空的 CMakeLists.txt 文件。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/fileTemplates/internal/Class.java.html b/original-plugin-raw/zh/fileTemplates/internal/Class.java.html new file mode 100644 index 000000000..6bf8fcc02 --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/internal/Class.java.html @@ -0,0 +1,87 @@ + + +适用于通过在项目工具窗口中调用新建 | Java 类 | 类创建的新 Java 类。 + + 此内置模板是可编辑的。 除了 Java 表达式和注释外,您还可以使用预定义变量(如下所列),这些变量随后将像宏一样被扩展为相应值。 + + 您也可以指定自定义变量。 自定义变量使用以下格式:${VARIABLE_NAME},其中 VARIABLE_NAME是变量的名称(例如,${MY_CUSTOM_FUNCTION_NAME}) 。 + 在 IDE 创建包含自定义变量的新文件之前,您会看到一个对话框,您可以在其中定义模板中自定义变量的值。 + + 通过使用 #parse 指令,可以包括 包含 选项卡中的模板。 要包含模板,请在引号中将模板的全名指定为形参(例如,#parse("File Header.java"))。 + |
+
预定义变量接收以下值: | +||
+ | 在其中创建新类的软件包名称 | +|
+ | 您在创建新类对话框中指定的新类的名称 | +|
+ | 当前用户的系统登录名 | +|
+ | 当前系统日期 | +|
+ | 当前系统时间 | +|
+ | 当前年度 | +|
+ | 当前月份 | +|
+ | 当前月份名称的前 3 个字母(Jan、Feb 等) | +|
+ | 当前月份的全名(January、February 等)。 | +|
+ | 当前月份的日期 | +|
+ | 当前小时 | +|
+ | 当前分钟 | +|
+ | 当前项目名称 | +
+ 一个 Codeception 功能测试的内置模板。 每次您创建新的 Codeception 功能测试时都会使用此模版。 从项目视图之一的弹出菜单
+ 中选择 新建 | PHP 测试 ,然后选择 “Codeception 功能” 作为测试库。 + 模板是可编辑的。 除了 PHP 语句、表达式和注释外,您还可以使用下面列出的预定义变量。 每个变量都像宏一样扩展为相应的值。 通过 #parse 指令,可以通过将所需模板的全名指定为引号中的形参,从而包含 Includes 选项卡中的模板。 + |
+
预定义变量接收以下值: | +||
+ |
+ + | 被测试的类的名称 | +
+ |
+ + | 被测试的类的命名空间 | +
+ |
+ + | 测试类名 | +
+ |
+ + | 测试类命名空间 | +
+ |
+ + | 当前文件名称 | +
+ |
+ + | 当前的用户系统登录名 | +
+ |
+ + | 当前系统日期 | +
+ |
+ + | 当前系统时间 | +
+ |
+ + | 当前年度 | +
+ |
+ + | 当前月份 | +
+ |
+ + | 当前月份的日期 | +
+ |
+ + | 当前小时 | +
+ |
+ + | 当前分钟 | +
+ |
+ + | 当前 IDE 名称 | +
+ |
+ + | 美元符号,计算为普通的 “$” 字符。 | +
+ |
+ + | 当前项目名称 | +
+ 一个 Codeception 单元测试的内置模板。 每次您创建新的 Codeception 单元测试时都会使用此模版。 从项目视图之一的弹出菜单
+ 中选择 新建 | PHP 测试 ,然后选择 “Codeception 单元” 作为测试库。 + 模板是可编辑的。 除了 PHP 语句、表达式和注释外,您还可以使用下面列出的预定义变量。 每个变量都像宏一样扩展为相应的值。 通过 #parse 指令,可以通过将所需模板的全名指定为引号中的形参,从而包含 Includes 选项卡中的模板。 + |
+
预定义变量接收以下值: | +||
+ |
+ + | 被测试的类的名称 | +
+ |
+ + | 被测试的类的命名空间 | +
+ |
+ + | 测试类名 | +
+ |
+ + | 测试类命名空间 | +
+ |
+ + | 当前文件名称 | +
+ |
+ + | 当前的用户系统登录名 | +
+ |
+ + | 当前系统日期 | +
+ |
+ + | 当前系统时间 | +
+ |
+ + | 当前年度 | +
+ |
+ + | 当前月份 | +
+ |
+ + | 当前月份的日期 | +
+ |
+ + | 当前小时 | +
+ |
+ + | 当前分钟 | +
+ |
+ + | 当前 IDE 名称 | +
+ |
+ + | 美元符号,计算为普通的 “$” 字符。 | +
+ |
+ + | 当前项目名称 | +
+ + 使用脚本创建 ColdFusion 文件。 + + | +
+ + 通过脚本创建 ColdFusion 组件。 + + | +
+ + 通过脚本创建 ColdFusion 接口。 + + | +
+
+ 使用 cfcomponent 标记创建 ColdFusion 组件。
+
+ |
+
+
+ 使用 cfinterface 标记创建 ColdFusion 接口。
+
+ |
+
+ 一个 ERB 文件的内置模板。 每次您创建新的 ERB 文件时都会使用此模版。 从项目视图之一的弹出菜单中选择 新建 | ERB 文件 。 除了 Ruby 和 HTML 语句、表达式和注释外,您还可以使用下面列出的预定义变量。 每个变量都像宏一样扩展为相应的值。 通过 #parse 指令,可以通过将所需模板的全名指定为引号中的形参,从而包含 Includes 选项卡中的模板。
+ |
+
预定义变量接收以下值: | +||
+ ${FILE_NAME} |
+ + | 当前文件名称 | +
+ ${USER} |
+ + | 当前的用户系统登录名 | +
+ ${DATE} |
+ + | 当前系统日期 | +
+ ${TIME} |
+ + | 当前系统时间 | +
+ ${YEAR} |
+ + | 当前年度 | +
+ ${MONTH} |
+ + | 当前月份 | +
+ ${DAY} |
+ + | 当前月份的日期 | +
+ ${HOUR} |
+ + | 当前小时 | +
+ ${MINUTE} |
+ + | 当前分钟 | +
+ ${PRODUCT_NAME} |
+ + | 当前 IDE 名称 | +
+ ${PROJECT_NAME} |
+ + | 当前项目名称 | +
适用于通过在项目工具窗口中调用新建 | Java 类 | 枚举创建的新 Java 枚举。 + + 此内置模板是可编辑的。 除了 Java 表达式和注释外,您还可以使用预定义变量(如下所列),这些变量随后将像宏一样被扩展为相应值。 + + 您也可以指定自定义变量。 自定义变量使用以下格式:${VARIABLE_NAME},其中 VARIABLE_NAME是变量的名称(例如,${MY_CUSTOM_FUNCTION_NAME}) 。 + 在 IDE 创建包含自定义变量的新文件之前,您会看到一个对话框,您可以在其中定义模板中自定义变量的值。 + + 通过使用 #parse 指令,可以包括 包含 选项卡中的模板。 要包含模板,请在引号中将模板的全名指定为形参(例如,#parse("File Header.java"))。 + |
+
预定义变量接收以下值: | +||
+ | 在其中创建新枚举的软件包名称 | +|
+ | 您在创建新类对话框中指定的新枚举的名称 | +|
+ | 当前用户的系统登录名 | +|
+ | 当前系统日期 | +|
+ | 当前系统时间 | +|
+ | 当前年度 | +|
+ | 当前月份 | +|
+ | 当前月份名称的前 3 个字母(Jan、Feb 等) | +|
+ | 当前月份的全名(January、February 等)。 | +|
+ | 当前月份的日期 | +|
+ | 当前小时 | +|
+ | 当前分钟 | +|
+ | 当前项目名称 | +
创建一个 Python 脚本提供简单的 "Hello World!" Flask 应用程序和用于运行它的 '__main__'
方法。
有关创建 Flask 应用程序的更多信息,请参阅:
++ + 用于创建 Gant 构建脚本的内置模板。 + + | +
Go 应用程序 是每次创建新 Go 文件时使用的内置模板。 与 Go 文件 模板相比,Go 应用程序 具有预定义的 main 函数。 要使用此模板,请转到 文件 | 新建 ,在 Go 类别中选择 Go 文件 ,然后选择 简单的应用程序。 + + 模板是可编辑的。 在模板中,可以使用下面列出的预定义变量。 这些变量稍后将 + 在编辑器中扩展为相应的值。 + + 您也可以指定自定义变量。 自定义变量使用以下格式: ${VARIABLE_NAME} ,其中 VARIABLE_NAME是变量的名称(例如,${MY_CUSTOM_FUNCTION_NAME} ) 。
+ 在 IDE 使用自定义变量创建新文件之前,您会看到一个对话框,您可以在其中定义模板中自定义变量的值。+ + 通过使用 #parse 指令,可以包括 包含 选项中的模板。 要包含模板,请在引号中将模板的全名指定为形参(例如,#parse("File Header") )。
+ |
+
预定义变量列表 | +||
+ |
+ + | 在其中创建新测试文件的软件包名称。 该文件必须具有 _test 后缀。 该名称的格式如下:package_test 。 |
+
+ |
+ + | 在其中创建新文件的软件包名称。 | +
+ |
+ + | 当前系统日期。 | +
+ |
+ + | 当前月份的日期。 | +
+ |
+ + | 当前日期名称的前 3 个字母(例如,Mon 、Tue 等)。 |
+
+ |
+ + | 当前日期的全名(例如,Monday 、Tuesday 等)。 |
+
+ |
+ + | 新文件的目录路径。 此路径相对于项目根目录的。 | +
+ |
+ + | 美元符号 ($)。 此变量用于转义美元字符,因此不会将其视为模板变量的前缀。 | +
+ |
+ + | 新文件名称。 | +
+ |
+ + | 当前小时。 | +
+ |
+ + | 当前分钟。 | +
+ |
+ + | 当前秒。 | +
+ |
+ + | 当前月份。 | +
+ |
+ + | 当前月份名称的前 3 个字母(例如,Jan 、Feb 等)。
+ |
+
+ |
+ + | 当前月份的全名(例如,January 、February 等)。
+ |
+
+ |
+ + | 新实体的名称:文件、类型、接口等。 | +
+ |
+ + | 在项目设置中指定的组织名称。 | +
+ |
+ + | IDE 名称。 | +
+ |
+ + | 当前项目名称。 | +
+ |
+ + | 当前系统时间。 | +
+ |
+ + | 当前用户的系统登录名。 | +
+ |
+ + | 当前年份。 | +
Go 文件 是每次创建新 Go 文件时使用的内置模板。 要使用此模板,请转到 文件 | 新建 ,在 Go 类别中选择 Go 文件 ,然后选择 空文件。 + + 模板是可编辑的。 在模板中,可以使用下面列出的预定义变量。 这些变量稍后将 + 在编辑器中扩展为相应的值。 + + 您也可以指定自定义变量。 自定义变量使用以下格式: ${VARIABLE_NAME} ,其中 VARIABLE_NAME 是变量的名称(例如,${MY_CUSTOM_FUNCTION_NAME} ) 。
+ 在 IDE 使用自定义变量创建新文件之前,您会看到一个对话框,您可以在其中定义模板中自定义变量的值。+ + 通过使用 #parse 指令,可以包括 包含 选项中的模板。 要包含模板,请在引号中将模板的全名指定为形参(例如,#parse("File Header") )。
+ |
+
预定义变量列表 | +||
+ |
+ + | 在其中创建新测试文件的软件包名称。 该文件必须具有 _test 后缀。 该名称的格式如下:package_test 。 |
+
+ |
+ + | 在其中创建新文件的软件包名称。 | +
+ |
+ + | 当前系统日期。 | +
+ |
+ + | 当前月份的日期。 | +
+ |
+ + | 当前日期名称的前 3 个字母(例如,Mon 、Tue 等)。 |
+
+ |
+ + | 当前日期的全名(例如,Monday 、Tuesday 等)。 |
+
+ |
+ + | 新文件的目录路径。 此路径相对于项目根目录的。 | +
+ |
+ + | 美元符号 ($)。 此变量用于转义美元字符,因此不会将其视为模板变量的前缀。 | +
+ |
+ + | 新文件名称。 | +
+ |
+ + | 当前小时。 | +
+ |
+ + | 当前分钟。 | +
+ |
+ + | 当前秒。 | +
+ |
+ + | 当前月份。 | +
+ |
+ + | 当前月份名称的前 3 个字母(例如,Jan 、Feb 等)。
+ |
+
+ |
+ + | 当前月份的全名(例如,January 、February 等)。
+ |
+
+ |
+ + | 新实体的名称:文件、类型、接口等。 | +
+ |
+ + | 在项目设置中指定的组织名称。 | +
+ |
+ + | IDE 名称。 | +
+ |
+ + | 当前项目名称。 | +
+ |
+ + | 当前系统时间。 | +
+ |
+ + | 当前用户的系统登录名。 | +
+ |
+ + | 当前年份。 | +
Go 草稿 是每次创建新 Go 临时文件时使用的内置模板。
+ 临时文件是功能齐全、可运行且可调试的文件,您可以使用它们来草拟您的编码想法。 要创建临时文件,请点击 文件 | 新建 | 临时文件。 在新建临时文件 对话框中,找到并选择 Go。 + + 模板是可编辑的。 在模板中,可以使用下面列出的预定义变量。 这些变量稍后将 + 在编辑器中扩展为相应的值。 + + 您也可以指定自定义变量。 自定义变量使用以下格式: ${VARIABLE_NAME} ,其中 VARIABLE_NAME 是变量的名称(例如,${MY_CUSTOM_FUNCTION_NAME} ) 。
+ 在 IDE 使用自定义变量创建新文件之前,您会看到一个对话框,您可以在其中定义模板中自定义变量的值。+ + 通过使用 #parse 指令,可以包括 包含 选项中的模板。 要包含模板,请在引号中将模板的全名指定为形参(例如,#parse("File Header") )。
+ |
+
预定义变量列表 | +||
+ |
+ + | 在其中创建新测试文件的软件包名称。 该文件必须具有 _test 后缀。 该名称的格式如下:package_test 。 |
+
+ |
+ + | 在其中创建新文件的软件包名称。 | +
+ |
+ + | 当前系统日期。 | +
+ |
+ + | 当前月份的日期。 | +
+ |
+ + | 当前日期名称的前 3 个字母(例如,Mon 、Tue 等)。 |
+
+ |
+ + | 当前日期的全名(例如,Monday 、Tuesday 等)。 |
+
+ |
+ + | 新文件的目录路径。 此路径相对于项目根目录的。 | +
+ |
+ + | 美元符号 ($)。 此变量用于转义美元字符,因此不会将其视为模板变量的前缀。 | +
+ |
+ + | 新文件名称。 | +
+ |
+ + | 当前小时。 | +
+ |
+ + | 当前分钟。 | +
+ |
+ + | 当前秒。 | +
+ |
+ + | 当前月份。 | +
+ |
+ + | 当前月份名称的前 3 个字母(例如,Jan 、Feb 等)。
+ |
+
+ |
+ + | 当前月份的全名(例如,January 、February 等)。
+ |
+
+ |
+ + | 新实体的名称:文件、类型、接口等。 | +
+ |
+ + | 在项目设置中指定的组织名称。 | +
+ |
+ + | IDE 名称。 | +
+ |
+ + | 当前项目名称。 | +
+ |
+ + | 当前系统时间。 | +
+ |
+ + | 当前用户的系统登录名。 | +
+ |
+ + | 当前年份。 | +
+ + 用于创建 Groovy 注解的内置模板。 + + | +
+ + 用于创建 Groovy 类的内置模板。 + + | +
+ + 用于创建 Groovy 脚本的内置模板。 + + | +
+ + 用于创建 Groovy 枚举的内置模板。 + + | +
+ + 用于创建 Groovy 接口的内置模板。 + + | +
+ + 用于创建 Groovy 脚本的内置模板。 + + | +
+ + 这是每次创建新 Groovy Server Page 时使用的内置模板。 + + | +
+ + 用于创建 Groovy 特征的内置模板。 + + | +
适用于通过在项目工具窗口中调用新建 | Java 类 | 接口创建的新 Java 接口。 + + 此内置模板是可编辑的。 除了 Java 表达式和注释外,您还可以使用预定义变量(如下所列),这些变量随后将像宏一样被扩展为相应值。 + + 您也可以指定自定义变量。 自定义变量使用以下格式:${VARIABLE_NAME},其中 VARIABLE_NAME是变量的名称(例如,${MY_CUSTOM_FUNCTION_NAME}) 。 + 在 IDE 创建包含自定义变量的新文件之前,您会看到一个对话框,您可以在其中定义模板中自定义变量的值。 + + 通过使用 #parse 指令,可以包括 包含 选项卡中的模板。 要包含模板,请在引号中将模板的全名指定为形参(例如,#parse("File Header.java"))。 + |
+
预定义变量接收以下值: | +||
+ | 在其中创建新接口的软件包名称 | +|
+ | 您在创建新类对话框中指定的新接口的名称 | +|
+ | 当前的用户系统登录名 | +|
+ | 当前用户的系统登录名 | +|
+ | 当前系统时间 | +|
+ | 当前年度 | +|
+ | 当前月份 | +|
+ | 当前月份名称的前 3 个字母(Jan、Feb 等) | +|
+ | 当前月份的全名(January、February 等)。 | +|
+ | 当前月份的日期 | +|
+ | 当前小时 | +|
+ | 当前分钟 | +|
+ | 当前项目名称 | +
+ + 每次您创建 Jade 文件时都会使用此内置模板。 + + | +
+
+ 适用于通过在项目工具窗口中调用新建 | Kotlin 类/文件 | 类创建的新 Kotlin 类。 + + |
+
+
+ 适用于通过在项目工具窗口中调用新建 | Kotlin 类/文件 | 数据类创建的新 Kotlin 数据类。 + + |
+
+
+ 适用于通过在项目工具窗口中调用新建 | Kotlin 类/文件 | 枚举类创建的新 Kotlin 枚举。 + + |
+
+
+ 适用于通过在项目工具窗口中调用新建 | Kotlin 类/文件 | 文件创建的新 Kotlin 文件。 + + |
+
+
+ 适用于通过在项目工具窗口中调用新建 | Kotlin 类/文件 | 接口创建的新 Kotlin 接口。 + + |
+
+
+ 适用于通过在项目工具窗口中调用新建 | Kotlin 类/文件 | 对象创建的新 Kotlin 对象。 + + |
+
+
+ 适用于通过在项目工具窗口中调用新建 | Kotlin 脚本创建的新 Kotlin 脚本。 + + |
+
+
+ 适用于通过在项目工具窗口中调用新建 | Kotlin 工作表创建的新 Kotlin 工作表。 + + |
+
+ 一个 Liquid 文件的内置模板。 每次您创建新的 Liquid 文件时都会使用此模版。 从项目视图之一的弹出菜单中选择 新建 | Liquid 文件 。 除了 Liquid 语句、表达式和注释外,您还可以使用下面列出的预定义变量。 每个变量都像宏一样扩展为相应的值。 通过 #parse 指令,可以通过将所需模板的全名指定为引号中的形参,从而包含 Includes 选项卡中的模板。
+ |
+
预定义变量接收以下值: | +||
+ ${FILE_NAME} |
+ + | 当前文件名称 | +
+ ${USER} |
+ + | 当前的用户系统登录名 | +
+ ${DATE} |
+ + | 当前系统日期 | +
+ ${TIME} |
+ + | 当前系统时间 | +
+ ${YEAR} |
+ + | 当前年度 | +
+ ${MONTH} |
+ + | 当前月份 | +
+ ${DAY} |
+ + | 当前月份的日期 | +
+ ${HOUR} |
+ + | 当前小时 | +
+ ${MINUTE} |
+ + | 当前分钟 | +
+ ${PRODUCT_NAME} |
+ + | 当前 IDE 名称 | +
+ ${PROJECT_NAME} |
+ + | 当前项目名称 | +
+ 一个 Minitest 规范测试的内置模板。 每次您创建新的测试时都会使用此模版。 从项目视图之一的弹出菜单中选择 新建 | Ruby 测试 。 当测试源根文件夹被选中时,模板可用。 除了 Ruby 语句、表达式和注释外,您还可以使用下面列出的预定义变量。 每个变量都像宏一样
+ 扩展为相应的值。 通过 #parse 指令,可以通过将所需模板的全名指定为引号中的形参,从而包含 Includes 选项卡中的模板。
+ |
+
预定义变量接收以下值: | +||
+ ${FILE_NAME} |
+ + | 当前文件名称 | +
+ ${USER} |
+ + | 当前的用户系统登录名 | +
+ ${DATE} |
+ + | 当前系统日期 | +
+ ${TIME} |
+ + | 当前系统时间 | +
+ ${YEAR} |
+ + | 当前年度 | +
+ ${MONTH} |
+ + | 当前月份 | +
+ ${DAY} |
+ + | 当前月份的日期 | +
+ ${HOUR} |
+ + | 当前小时 | +
+ ${MINUTE} |
+ + | 当前分钟 | +
+ ${PRODUCT_NAME} |
+ + | 当前 IDE 名称 | +
+ ${PROJECT_NAME} |
+ + | 当前项目名称 | +
+ 一个 Minitest 测试的内置模板。 每次您创建新的测试时都会使用此模版。 从项目视图之一的弹出菜单中选择 新建 | Ruby 测试 。 当测试源根文件夹被选中时,模板可用。 除了 Ruby 语句、表达式和注释外,您还可以使用下面列出的预定义变量。 每个变量都像宏一样
+ 扩展为相应的值。 通过 #parse 指令,可以通过将所需模板的全名指定为引号中的形参,从而包含 Includes 选项卡中的模板。
+ |
+
预定义变量接收以下值: | +||
+ ${FILE_NAME} |
+ + | 当前文件名称 | +
+ ${USER} |
+ + | 当前的用户系统登录名 | +
+ ${DATE} |
+ + | 当前系统日期 | +
+ ${TIME} |
+ + | 当前系统时间 | +
+ ${YEAR} |
+ + | 当前年度 | +
+ ${MONTH} |
+ + | 当前月份 | +
+ ${DAY} |
+ + | 当前月份的日期 | +
+ ${HOUR} |
+ + | 当前小时 | +
+ ${MINUTE} |
+ + | 当前分钟 | +
+ ${PRODUCT_NAME} |
+ + | 当前 IDE 名称 | +
+ ${PROJECT_NAME} |
+ + | 当前项目名称 | +
+ 一个 PHP 类的内置模板。 每次您创建新的 PHP 类时都会使用此模版。 从项目视图之一的弹出菜单中选择 新建 | PHP 类 。 + 模板是可编辑的。 除了 PHP 语句、表达式和注释外,您还可以使用下面列出的预定义变量。 每个变量都像宏一样扩展为相应的值。 通过 #parse 指令,可以通过将所需模板的全名指定为引号中的形参,从而包含 Includes 选项卡中的模板。 + |
+
预定义变量接收以下值: | +||
+ |
+ + | 当前文件名称 | +
+ |
+ + | 当前的用户系统登录名 | +
+ |
+ + | 当前系统日期 | +
+ |
+ + | 当前系统时间 | +
+ |
+ + | 当前年度 | +
+ |
+ + | 当前月份 | +
+ |
+ + | 当前月份的日期 | +
+ |
+ + | 当前小时 | +
+ |
+ + | 当前分钟 | +
+ |
+ + | 当前 IDE 名称 | +
+ |
+ + | 当前项目名称 | +
+ |
+ + | 美元符号,计算为普通的 “$” 字符。 | +
+ 一个 PHP 文件的内置模板。 每次您从某个项目视图的弹出菜单中选择 新建 | PHP 文件 创建新的 PHP 文件时,都会使用此模版。 + 模板是可编辑的。 除了 PHP 语句、表达式和注释外,您还可以使用下面列出的预定义变量。 每个变量都像宏一样扩展为相应的值。 通过 #parse 指令,可以通过将所需模板的全名指定为引号中的形参,从而包含 Includes 选项卡中的模板。 + |
+
预定义变量接收以下值: | +||
+ |
+ + | 当前文件名称 | +
+ |
+ + | 当前的用户系统登录名 | +
+ |
+ + | 当前系统日期 | +
+ |
+ + | 当前系统时间 | +
+ |
+ + | 当前年度 | +
+ |
+ + | 当前月份 | +
+ |
+ + | 当前月份的日期 | +
+ |
+ + | 当前小时 | +
+ |
+ + | 当前分钟 | +
+ |
+ + | 当前 IDE 名称 | +
+ |
+ + | 当前项目名称 | +
+ 这是一个新 PHP 接口的内置模板。 每次您从某个项目视图的弹出菜单中选择 新建 | PHP 类 创建新的 PHP 接口时,都会使用此模版。 + 模板是可编辑的。 除了 PHP 语句、表达式和注释外,您还可以使用下面列出的预定义变量。 每个变量都像宏一样扩展为相应的值。 通过 #parse 指令,可以通过将所需模板的全名指定为引号中的形参,从而包含 Includes 选项卡中的模板。 + |
+
预定义变量接收以下值: | +||
+ |
+ + | 当前文件名称 | +
+ |
+ + | 当前的用户系统登录名 | +
+ |
+ + | 当前系统日期 | +
+ |
+ + | 当前系统时间 | +
+ |
+ + | 当前年度 | +
+ |
+ + | 当前月份 | +
+ |
+ + | 当前月份的日期 | +
+ |
+ + | 当前小时 | +
+ |
+ + | 当前分钟 | +
+ |
+ + | 当前 IDE 名称 | +
+ |
+ + | 美元符号,计算为普通的 “$” 字符。 | +
+ |
+ + | 当前项目名称 | +
+ 一个 PHP 特征的内置模板。 每次您创建新的 PHP 特征时都会使用此模版。 从项目视图之一的弹出菜单中选择 新建 | PHP 类 。 + 模板是可编辑的。 除了 PHP 语句、表达式和注释外,您还可以使用下面列出的预定义变量。 每个变量都像宏一样扩展为相应的值。 通过 #parse 指令,可以通过将所需模板的全名指定为引号中的形参,从而包含 Includes 选项卡中的模板。 + |
+
预定义变量接收以下值: | +||
+ |
+ + | 当前文件名称 | +
+ |
+ + | 当前的用户系统登录名 | +
+ |
+ + | 当前系统日期 | +
+ |
+ + | 当前系统时间 | +
+ |
+ + | 当前年度 | +
+ |
+ + | 当前月份 | +
+ |
+ + | 当前月份的日期 | +
+ |
+ + | 当前小时 | +
+ |
+ + | 当前分钟 | +
+ |
+ + | 当前 IDE 名称 | +
+ |
+ + | 美元符号,计算为普通的 “$” 字符。 | +
+ |
+ + | 当前项目名称 | +
+ 一个 PHPSpec 规范的内置模板。
+ 每次您创建新的 PHPSpec 规范时都会使用此模版。 从项目视图之一的弹出菜单
+ 中选择 新建 | PHP 测试 ,然后选择 “PHPSpec” 作为测试库。 + 模板是可编辑的。 除了 PHP 语句、表达式和注释外,您还可以使用下面列出的预定义变量。 每个变量都像宏一样扩展为相应的值。 通过 #parse 指令,可以通过将所需模板的全名指定为引号中的形参,从而包含 Includes 选项卡中的模板。 + |
+
预定义变量接收以下值: | +||
+ |
+ + | 被测试的类的名称 | +
+ |
+ + | 被测试的类的命名空间 | +
+ |
+ + | 测试类名 | +
+ |
+ + | 测试类命名空间 | +
+ |
+ + | 当前文件名称 | +
+ |
+ + | 当前的用户系统登录名 | +
+ |
+ + | 当前系统日期 | +
+ |
+ + | 当前系统时间 | +
+ |
+ + | 当前年度 | +
+ |
+ + | 当前月份 | +
+ |
+ + | 当前月份的日期 | +
+ |
+ + | 当前小时 | +
+ |
+ + | 当前分钟 | +
+ |
+ + | 当前 IDE 名称 | +
+ |
+ + | 美元符号,计算为普通的 “$” 字符。 | +
+ |
+ + | 当前项目名称 | +
+ 一个为版本 6 或更高版本的 PHPUnit 测试的内置模板。
+ 每次您创建新的 PHPUnit 测试时都会使用此模版。 从项目视图之一的弹出菜单
+ 中选择 新建 | PHP 测试 ,然后选择 “PHPUnit” 作为测试库。 + 模板是可编辑的。 除了 PHP 语句、表达式和注释外,您还可以使用下面列出的预定义变量。 每个变量都像宏一样扩展为相应的值。 通过 #parse 指令,可以通过将所需模板的全名指定为引号中的形参,从而包含 Includes 选项卡中的模板。 + |
+
预定义变量接收以下值: | +||
+ |
+ + | 被测试的类的名称 | +
+ |
+ + | 被测试的类的命名空间 | +
+ |
+ + | 测试类名 | +
+ |
+ + | 测试类命名空间 | +
+ |
+ + | 当前文件名称 | +
+ |
+ + | 当前的用户系统登录名 | +
+ |
+ + | 当前系统日期 | +
+ |
+ + | 当前系统时间 | +
+ |
+ + | 当前年度 | +
+ |
+ + | 当前月份 | +
+ |
+ + | 当前月份的日期 | +
+ |
+ + | 当前小时 | +
+ |
+ + | 当前分钟 | +
+ |
+ + | 当前 IDE 名称 | +
+ |
+ + | 美元符号,计算为普通的 “$” 字符。 | +
+ |
+ + | 当前项目名称 | +
+ 一个为版本 5 或更早的 PHPUnit 测试的内置模板。
+ 每次您创建新的 PHPUnit 测试时都会使用此模版。 从项目视图之一的弹出菜单
+ 中选择 新建 | PHP 测试 ,然后选择 “PHPUnit < 6” 作为测试库。 + 模板是可编辑的。 除了 PHP 语句、表达式和注释外,您还可以使用下面列出的预定义变量。 每个变量都像宏一样扩展为相应的值。 通过 #parse 指令,可以通过将所需模板的全名指定为引号中的形参,从而包含 Includes 选项卡中的模板。 + |
+
预定义变量接收以下值: | +||
+ |
+ + | 被测试的类的名称 | +
+ |
+ + | 被测试的类的命名空间 | +
+ |
+ + | 测试类名 | +
+ |
+ + | 测试类命名空间 | +
+ |
+ + | 当前文件名称 | +
+ |
+ + | 当前的用户系统登录名 | +
+ |
+ + | 当前系统日期 | +
+ |
+ + | 当前系统时间 | +
+ |
+ + | 当前年度 | +
+ |
+ + | 当前月份 | +
+ |
+ + | 当前月份的日期 | +
+ |
+ + | 当前小时 | +
+ |
+ + | 当前分钟 | +
+ |
+ + | 当前 IDE 名称 | +
+ |
+ + | 美元符号,计算为普通的 “$” 字符。 | +
+ |
+ + | 当前项目名称 | +
+ + 这是每次创建 Scala 软件包对象时 IntelliJ IDEA 使用的内置模板 + + | +
+ + 这是每次创建 Play 2 文件时 IntelliJ IDEA 使用的内置模板。 + + | +
+ + 每次您创建 Pug 文件时都会使用此内置模板。 + + | +
为基于 Jinja 模板的 Starter 项目创建布局并包含一个内容容器。 + 此容器由内容行和包含 Pylons 项目链接的行组成。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/fileTemplates/internal/Pyramid layout pt.pt.html b/original-plugin-raw/zh/fileTemplates/internal/Pyramid layout pt.pt.html new file mode 100644 index 000000000..2016c9dc4 --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/internal/Pyramid layout pt.pt.html @@ -0,0 +1,6 @@ + + +为基于 Chameleon ZPT 的 Starter 项目创建布局并包含一个内容容器。 + 此内容容器由内容行和包含 Pylons 项目链接的行组成。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/fileTemplates/internal/Pyramid mytemplate jinja2.jinja2.html b/original-plugin-raw/zh/fileTemplates/internal/Pyramid mytemplate jinja2.jinja2.html new file mode 100644 index 000000000..1d7fc15e7 --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/internal/Pyramid mytemplate jinja2.jinja2.html @@ -0,0 +1,5 @@ + + +基于 Jinja 布局模板为 Pyramid Starter 项目创建模板。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/fileTemplates/internal/Pyramid mytemplate pt.pt.html b/original-plugin-raw/zh/fileTemplates/internal/Pyramid mytemplate pt.pt.html new file mode 100644 index 000000000..157afa08a --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/internal/Pyramid mytemplate pt.pt.html @@ -0,0 +1,5 @@ + + +基于 Chameleon ZPT 布局模板为 Pyramid Starter 项目创建模板。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/fileTemplates/internal/Python Script.py.html b/original-plugin-raw/zh/fileTemplates/internal/Python Script.py.html new file mode 100644 index 000000000..70a42c665 --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/internal/Python Script.py.html @@ -0,0 +1,12 @@ + + +创建空的 Python 文件。
+Python 脚本的简单示例:
+def print_hi(name):
print(f'Hi, {name}')
if __name__ == '__main__':
print_hi('Python')
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/fileTemplates/internal/Python Stub.pyi.html b/original-plugin-raw/zh/fileTemplates/internal/Python Stub.pyi.html
new file mode 100644
index 000000000..a6e517307
--- /dev/null
+++ b/original-plugin-raw/zh/fileTemplates/internal/Python Stub.pyi.html
@@ -0,0 +1,7 @@
+
+
+创建扩展名为 .pyi
的空存根文件。
+ 通过存根文件可以同时对 Python 2 和 Python 3 使用 Python 3 语法来指定类型提示。
有关详细信息,请参阅使用存根文件。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/fileTemplates/internal/Python Unit Test.py.html b/original-plugin-raw/zh/fileTemplates/internal/Python Unit Test.py.html new file mode 100644 index 000000000..a2a84dd54 --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/internal/Python Unit Test.py.html @@ -0,0 +1,5 @@ + + +使用包含 assertEqual
的方法创建 unittest.TestCase
类的实例。 修改此方法以实现一些断言逻辑。
创建一个空的 R 脚本。
+ + diff --git a/original-plugin-raw/zh/fileTemplates/internal/R Test.R.html b/original-plugin-raw/zh/fileTemplates/internal/R Test.R.html new file mode 100644 index 000000000..b75f50b06 --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/internal/R Test.R.html @@ -0,0 +1,5 @@ + + +使用简单检查创建示例 R 测试。 将其替换为必需逻辑。
+ + diff --git a/original-plugin-raw/zh/fileTemplates/internal/RBS Class.rbs.html b/original-plugin-raw/zh/fileTemplates/internal/RBS Class.rbs.html new file mode 100644 index 000000000..17785e869 --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/internal/RBS Class.rbs.html @@ -0,0 +1,96 @@ + + + +
+ 一个 RBS 类的内置模板。 每次您创建新的 RBS 类时都会使用此模版。 从项目视图之一的弹出菜单中选择 新建 | RBS 文件/类 。 除了 RBS 语句、表达式和注释外,您还可以使用下面列出的预定义变量。 每个变量都像宏一样扩展为相应的值。 通过 #parse 指令,可以通过将所需模板的全名指定为引号中的形参,从而包含 Includes 选项卡中的模板。
+ |
+
预定义变量接收以下值: | +||
+ ${FILE_NAME} |
+ + | 当前文件名称 | +
+ ${USER} |
+ + | 当前的用户系统登录名 | +
+ ${DATE} |
+ + | 当前系统日期 | +
+ ${TIME} |
+ + | 当前系统时间 | +
+ ${YEAR} |
+ + | 当前年度 | +
+ ${MONTH} |
+ + | 当前月份 | +
+ ${DAY} |
+ + | 当前月份的日期 | +
+ ${HOUR} |
+ + | 当前小时 | +
+ ${MINUTE} |
+ + | 当前分钟 | +
+ ${PRODUCT_NAME} |
+ + | 当前 IDE 名称 | +
+ ${PROJECT_NAME} |
+ + | 当前项目名称 | +
+ 一个 RBS 文件的内置模板。 每次您创建新的 RBS 文件时都会使用此模版。 从项目视图之一的弹出菜单中选择 新建 | RBS 文件/类 。 除了 RBS 语句、表达式和注释外,您还可以使用下面列出的预定义变量。 每个变量都像宏一样扩展为相应的值。 通过 #parse 指令,可以通过将所需模板的全名指定为引号中的形参,从而包含 Includes 选项卡中的模板。
+ |
+
预定义变量接收以下值: | +||
+ ${FILE_NAME} |
+ + | 当前文件名称 | +
+ ${USER} |
+ + | 当前的用户系统登录名 | +
+ ${DATE} |
+ + | 当前系统日期 | +
+ ${TIME} |
+ + | 当前系统时间 | +
+ ${YEAR} |
+ + | 当前年度 | +
+ ${MONTH} |
+ + | 当前月份 | +
+ ${DAY} |
+ + | 当前月份的日期 | +
+ ${HOUR} |
+ + | 当前小时 | +
+ ${MINUTE} |
+ + | 当前分钟 | +
+ ${PRODUCT_NAME} |
+ + | 当前 IDE 名称 | +
+ ${PROJECT_NAME} |
+ + | 当前项目名称 | +
+ 一个 RBS 接口的内置模板。 每次您创建新的 RBS 接口时都会使用此模版。 从项目视图之一的弹出菜单中选择 新建 | RBS 文件/类 。 除了 RBS 语句、表达式和注释外,您还可以使用下面列出的预定义变量。 每个变量都像宏一样扩展为相应的值。 通过 #parse 指令,可以通过将所需模板的全名指定为引号中的形参,从而包含 Includes 选项卡中的模板。
+ |
+
预定义变量接收以下值: | +||
+ ${FILE_NAME} |
+ + | 当前文件名称 | +
+ ${USER} |
+ + | 当前的用户系统登录名 | +
+ ${DATE} |
+ + | 当前系统日期 | +
+ ${TIME} |
+ + | 当前系统时间 | +
+ ${YEAR} |
+ + | 当前年度 | +
+ ${MONTH} |
+ + | 当前月份 | +
+ ${DAY} |
+ + | 当前月份的日期 | +
+ ${HOUR} |
+ + | 当前小时 | +
+ ${MINUTE} |
+ + | 当前分钟 | +
+ ${PRODUCT_NAME} |
+ + | 当前 IDE 名称 | +
+ ${PROJECT_NAME} |
+ + | 当前项目名称 | +
+ 一个 RBS 模块的内置模板。 每次您创建新的 RBS 模块时都会使用此模版。 从项目视图之一的弹出菜单中选择 新建 | RBS 文件/类 。 除了 RBS 语句、表达式和注释外,您还可以使用下面列出的预定义变量。 每个变量都像宏一样扩展为相应的值。 通过 #parse 指令,可以通过将所需模板的全名指定为引号中的形参,从而包含 Includes 选项卡中的模板。
+ |
+
预定义变量接收以下值: | +||
+ ${FILE_NAME} |
+ + | 当前文件名称 | +
+ ${USER} |
+ + | 当前的用户系统登录名 | +
+ ${DATE} |
+ + | 当前系统日期 | +
+ ${TIME} |
+ + | 当前系统时间 | +
+ ${YEAR} |
+ + | 当前年度 | +
+ ${MONTH} |
+ + | 当前月份 | +
+ ${DAY} |
+ + | 当前月份的日期 | +
+ ${HOUR} |
+ + | 当前小时 | +
+ ${MINUTE} |
+ + | 当前分钟 | +
+ ${PRODUCT_NAME} |
+ + | 当前 IDE 名称 | +
+ ${PROJECT_NAME} |
+ + | 当前项目名称 | +
创建一个带有空代码块和示例代码块的 R Markdown 文件。 + 该文件还包含简单的说明,以便您可以执行代码并构建笔记本输出。
+ + diff --git a/original-plugin-raw/zh/fileTemplates/internal/RMarkdown.notebook.rmd.html b/original-plugin-raw/zh/fileTemplates/internal/RMarkdown.notebook.rmd.html new file mode 100644 index 000000000..a5839ccfd --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/internal/RMarkdown.notebook.rmd.html @@ -0,0 +1,6 @@ + + +创建一个带有空代码块和示例代码块的 R Markdown 笔记本。 + 该文件还包含简单的说明,以便您可以执行代码并构建笔记本输出。
+ + diff --git a/original-plugin-raw/zh/fileTemplates/internal/RMarkdown.presentation.rmd.html b/original-plugin-raw/zh/fileTemplates/internal/RMarkdown.presentation.rmd.html new file mode 100644 index 000000000..9067ce75a --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/internal/RMarkdown.presentation.rmd.html @@ -0,0 +1,5 @@ + + +创建一个由三张幻灯片组成的 Markdown 演示文稿。
+ + diff --git a/original-plugin-raw/zh/fileTemplates/internal/RMarkdown.shiny.rmd.html b/original-plugin-raw/zh/fileTemplates/internal/RMarkdown.shiny.rmd.html new file mode 100644 index 000000000..4680c52c1 --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/internal/RMarkdown.shiny.rmd.html @@ -0,0 +1,6 @@ + + +创建带有输入和输出面板的 Shiny 脚本。 该脚本包含服务器逻辑的占位符。
+使用快速修复加载必需库。
+ + diff --git a/original-plugin-raw/zh/fileTemplates/internal/RSpec.rb.html b/original-plugin-raw/zh/fileTemplates/internal/RSpec.rb.html new file mode 100644 index 000000000..aaa8e9ed2 --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/internal/RSpec.rb.html @@ -0,0 +1,97 @@ + + + +
+ 一个 RSpec 测试的内置模板。 每次您创建新的测试时都会使用此模版。 从项目视图之一的弹出菜单中选择 新建 | Ruby 测试 。 当测试源根文件夹被选中时,模板可用。 除了 Ruby 语句、表达式和注释外,您还可以使用下面列出的预定义变量。 每个变量都像宏一样
+ 扩展为相应的值。 通过 #parse 指令,可以通过将所需模板的全名指定为引号中的形参,从而包含 Includes 选项卡中的模板。
+ |
+
预定义变量接收以下值: | +||
+ ${FILE_NAME} |
+ + | 当前文件名称 | +
+ ${USER} |
+ + | 当前的用户系统登录名 | +
+ ${DATE} |
+ + | 当前系统日期 | +
+ ${TIME} |
+ + | 当前系统时间 | +
+ ${YEAR} |
+ + | 当前年度 | +
+ ${MONTH} |
+ + | 当前月份 | +
+ ${DAY} |
+ + | 当前月份的日期 | +
+ ${HOUR} |
+ + | 当前小时 | +
+ ${MINUTE} |
+ + | 当前分钟 | +
+ ${PRODUCT_NAME} |
+ + | 当前 IDE 名称 | +
+ ${PROJECT_NAME} |
+ + | 当前项目名称 | +
适用于通过在项目工具窗口中调用新建 | Java 类 | 记录创建的 Java 记录。 + + 此内置模板是可编辑的。 除了 Java 表达式和注释外,您还可以使用预定义变量(如下所列),这些变量随后将像宏一样被扩展为相应值。 + + 您也可以指定自定义变量。 自定义变量使用以下格式:${VARIABLE_NAME},其中 VARIABLE_NAME是变量的名称(例如,${MY_CUSTOM_FUNCTION_NAME}) 。 + 在 IDE 创建包含自定义变量的新文件之前,您会看到一个对话框,您可以在其中定义模板中自定义变量的值。 + + 通过使用 #parse 指令,可以包括 包含 选项卡中的模板。 要包含模板,请在引号中将模板的全名指定为形参(例如,#parse("File Header.java"))。 + |
+
预定义变量接收以下值: | +||
+ | 在其中创建新纪录的软件包名称 | +|
+ | 您在创建新类对话框中指定的新记录的名称 | +|
+ | 当前用户的系统登录名 | +|
+ | 当前系统日期 | +|
+ | 当前系统时间 | +|
+ | 当前年度 | +|
+ | 当前月份 | +|
+ | 当前月份名称的前 3 个字母(Jan、Feb 等) | +|
+ | 当前月份的全名(January、February 等)。 | +|
+ | 当前月份的日期 | +|
+ | 当前小时 | +|
+ | 当前分钟 | +|
+ | 当前项目名称 | +
+ 一个 Ruby 类的内置模板。 每次您创建新的 Ruby 类时都会使用此模版。 从项目视图之一的弹出菜单中选择 新建 | Ruby 文件/类 。 除了 Ruby 语句、表达式和注释外,您还可以使用下面列出的预定义变量。 每个变量都像宏一样扩展为相应的值。 通过 #parse 指令,可以通过将所需模板的全名指定为引号中的形参,从而包含 Includes 选项卡中的模板。
+ |
+
预定义变量接收以下值: | +||
+ ${FILE_NAME} |
+ + | 当前文件名称 | +
+ ${USER} |
+ + | 当前的用户系统登录名 | +
+ ${DATE} |
+ + | 当前系统日期 | +
+ ${TIME} |
+ + | 当前系统时间 | +
+ ${YEAR} |
+ + | 当前年度 | +
+ ${MONTH} |
+ + | 当前月份 | +
+ ${DAY} |
+ + | 当前月份的日期 | +
+ ${HOUR} |
+ + | 当前小时 | +
+ ${MINUTE} |
+ + | 当前分钟 | +
+ ${PRODUCT_NAME} |
+ + | 当前 IDE 名称 | +
+ ${PROJECT_NAME} |
+ + | 当前项目名称 | +
+ 一个 Ruby 文件的内置模板。 每次您创建新的 Ruby 文件时都会使用此模版。 从项目视图之一的弹出菜单中选择 新建 | Ruby 文件/类 。 除了 Ruby 语句、表达式和注释外,您还可以使用下面列出的预定义变量。 每个变量都像宏一样扩展为相应的值。 通过 #parse 指令,可以通过将所需模板的全名指定为引号中的形参,从而包含 Includes 选项卡中的模板。
+ |
+
预定义变量接收以下值: | +||
+ ${FILE_NAME} |
+ + | 当前文件名称 | +
+ ${USER} |
+ + | 当前的用户系统登录名 | +
+ ${DATE} |
+ + | 当前系统日期 | +
+ ${TIME} |
+ + | 当前系统时间 | +
+ ${YEAR} |
+ + | 当前年度 | +
+ ${MONTH} |
+ + | 当前月份 | +
+ ${DAY} |
+ + | 当前月份的日期 | +
+ ${HOUR} |
+ + | 当前小时 | +
+ ${MINUTE} |
+ + | 当前分钟 | +
+ ${PRODUCT_NAME} |
+ + | 当前 IDE 名称 | +
+ ${PROJECT_NAME} |
+ + | 当前项目名称 | +
+ 一个 Ruby 模块的内置模板。 每次您创建新的 Ruby 模块时都会使用此模版。 从项目视图之一的弹出菜单中选择 新建 | Ruby 文件/类 。 除了 Ruby 语句、表达式和注释外,您还可以使用下面列出的预定义变量。 每个变量都像宏一样扩展为相应的值。 通过 #parse 指令,可以通过将所需模板的全名指定为引号中的形参,从而包含 Includes 选项卡中的模板。
+ |
+
预定义变量接收以下值: | +||
+ ${FILE_NAME} |
+ + | 当前文件名称 | +
+ ${USER} |
+ + | 当前的用户系统登录名 | +
+ ${DATE} |
+ + | 当前系统日期 | +
+ ${TIME} |
+ + | 当前系统时间 | +
+ ${YEAR} |
+ + | 当前年度 | +
+ ${MONTH} |
+ + | 当前月份 | +
+ ${DAY} |
+ + | 当前月份的日期 | +
+ ${HOUR} |
+ + | 当前小时 | +
+ ${MINUTE} |
+ + | 当前分钟 | +
+ ${PRODUCT_NAME} |
+ + | 当前 IDE 名称 | +
+ ${PROJECT_NAME} |
+ + | 当前项目名称 | +
+ + 这是每次创建 Scala case 类时 IntelliJ IDEA 使用的内置模板 + + | +
+ + 这是每次创建 Scala 单例对象时 IntelliJ IDEA 使用的内置模板 + + | +
+ + 这是每次创建 Scala 类时 IntelliJ IDEA 使用的内置模板 + + | +
+ + 这是每次创建 Scala 单例对象时 IntelliJ IDEA 使用的内置模板 + + | +
+ + 这是每次创建 Scala 脚本时 IntelliJ IDEA 使用的内置模板 + + | +
+ + 这是每次创建 Scala 特征时 IntelliJ IDEA 使用的内置模板 + + | +
+ + 这是每次创建 Scala 工作表时 IntelliJ IDEA 使用的内置模板 + + | +
使用以下形参创建设置脚本:name
、version
、packages
、url
、license
、author
、author_email
和 description
。
有关使用设置脚本创建 Python 软件包的详细信息,请参阅 Setup.py。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/fileTemplates/internal/TestUnit.rb.html b/original-plugin-raw/zh/fileTemplates/internal/TestUnit.rb.html new file mode 100644 index 000000000..f942ac11e --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/internal/TestUnit.rb.html @@ -0,0 +1,97 @@ + + + +
+ 一个 Test::Unit 测试的内置模板。 每次您创建新的测试时都会使用此模版。 从项目视图之一的弹出菜单中选择 新建 | Ruby 测试 。 当测试源根文件夹被选中时,模板可用。 除了 Ruby 语句、表达式和注释外,您还可以使用下面列出的预定义变量。 每个变量都像宏一样
+ 扩展为相应的值。 通过 #parse 指令,可以通过将所需模板的全名指定为引号中的形参,从而包含 Includes 选项卡中的模板。
+ |
+
预定义变量接收以下值: | +||
+ ${FILE_NAME} |
+ + | 当前文件名称 | +
+ ${USER} |
+ + | 当前的用户系统登录名 | +
+ ${DATE} |
+ + | 当前系统日期 | +
+ ${TIME} |
+ + | 当前系统时间 | +
+ ${YEAR} |
+ + | 当前年度 | +
+ ${MONTH} |
+ + | 当前月份 | +
+ ${DAY} |
+ + | 当前月份的日期 | +
+ ${HOUR} |
+ + | 当前小时 | +
+ ${MINUTE} |
+ + | 当前分钟 | +
+ ${PRODUCT_NAME} |
+ + | 当前 IDE 名称 | +
+ ${PROJECT_NAME} |
+ + | 当前项目名称 | +
+ 一个 WordPress 主插件文件的内置模板。 每次创建 WordPress 插件类型的新项目时都会使用它。 + 模板是可编辑的。 除了 PHP 语句、表达式和注释外,您还可以使用下面列出的预定义变量。 每个变量都像宏一样扩展为相应的值。 通过 #parse 指令,可以通过将所需模板的全名指定为引号中的形参,从而包含 Includes 选项卡中的模板。 + |
+
预定义变量接收以下值: | +||
+ |
+ + | 派生自目录名称的当前插件名称 | +
+ |
+ + | 当前文件名称 | +
+ |
+ + | 当前的用户系统登录名 | +
+ |
+ + | 当前系统日期 | +
+ |
+ + | 当前系统时间 | +
+ |
+ + | 当前年度 | +
+ |
+ + | 当前月份 | +
+ |
+ + | 当前月份的日期 | +
+ |
+ + | 当前小时 | +
+ |
+ + | 当前分钟 | +
+ |
+ + | 当前 IDE 名称 | +
+ |
+ + | 当前项目名称 | +
+ |
+ + | 美元符号,计算为普通的 “$” 字符。 | +
+ 一个 composer.json 文件的内置模板。 每次您创建新的 composer.json 文件时都会使用此模版。 从项目视图之一的弹出菜单
+ 中选择 新建 | composer.json 。 + 模板是可编辑的。 + |
+
适用于通过在项目工具窗口中调用新建 | module-info.java 创建的新 module-info.java 文件。 + + 此内置模板是可编辑的。 除了 Java 表达式和注释外,您还可以使用预定义变量(如下所列),这些变量随后将像宏一样被扩展为相应值。 + + 您也可以指定自定义变量。 自定义变量使用以下格式:${VARIABLE_NAME},其中 VARIABLE_NAME是变量的名称(例如,${MY_CUSTOM_FUNCTION_NAME}) 。 + 在 IDE 创建包含自定义变量的新文件之前,您会看到一个对话框,您可以在其中定义模板中自定义变量的值。 + + 通过使用 #parse 指令,可以包括 包含 选项卡中的模板。 要包含模板,请在引号中将模板的全名指定为形参(例如,#parse("File Header.java"))。 + |
+
预定义变量接收以下值: | +||
+ | 在其中创建新 module-info.java 文件的模块的名称 | +|
+ | 当前用户的系统登录名 | +|
+ | 当前系统日期 | +|
+ | 当前系统时间 | +|
+ | 当前年度 | +|
+ | 当前月份 | +|
+ | 当前月份名称的前 3 个字母(Jan、Feb 等) | +|
+ | 当前月份的全名(January、February 等)。 | +|
+ | 当前月份的日期 | +|
+ | 当前小时 | +|
+ | 当前分钟 | +|
+ | 当前项目名称 | +
适用于通过在项目工具窗口中调用新建 | package-info.java 创建的新 package-info.java 文件。 + + 此内置模板是可编辑的。 除了 Java 表达式和注释外,您还可以使用预定义变量(如下所列),这些变量随后将像宏一样被扩展为相应值。 + + 您也可以指定自定义变量。 自定义变量使用以下格式:${VARIABLE_NAME},其中 VARIABLE_NAME是变量的名称(例如,${MY_CUSTOM_FUNCTION_NAME}) 。 + 在 IDE 创建包含自定义变量的新文件之前,您会看到一个对话框,您可以在其中定义模板中自定义变量的值。 + + 通过使用 #parse 指令,可以包括 包含 选项卡中的模板。 要包含模板,请在引号中将模板的全名指定为形参(例如,#parse("File Header.java"))。 + |
+
预定义变量接收以下值: | +||
+ | 在其中创建新 package-info.java 文件的软件包名称 | +|
+ | 当前用户的系统登录名 | +|
+ | 当前系统日期 | +|
+ | 当前系统时间 | +|
+ | 当前年度 | +|
+ | 当前月份 | +|
+ | 当前月份名称的前 3 个字母(Jan、Feb 等) | +|
+ | 当前月份的全名(January、February 等)。 | +|
+ | 当前月份的日期 | +|
+ | 当前小时 | +|
+ | 当前分钟 | +|
+ | 当前项目名称 | +
为 R 软件包创建示例测试。 将 PackageName
替换为要测试的软件包的实际名称,并添加一些必需测试逻辑。
+ + 这是在每次创建基于注解的新切面时使用的内置模板。 + + | +
用于创建新的 IntelliJ 平台操作的内置模板。 + | +
这是用于在 Android 应用程序中创建新活动的内置文件模板。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/fileTemplates/j2ee/AndroidManifest.xml.html b/original-plugin-raw/zh/fileTemplates/j2ee/AndroidManifest.xml.html new file mode 100644 index 000000000..ad54c8dbb --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/j2ee/AndroidManifest.xml.html @@ -0,0 +1,5 @@ + + +这是用于在 Android 应用程序中创建 AndroidManifest.xml 文件的内置文件模板。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/fileTemplates/j2ee/AppEngineApplication.xml.html b/original-plugin-raw/zh/fileTemplates/j2ee/AppEngineApplication.xml.html new file mode 100644 index 000000000..b67e20dd0 --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/j2ee/AppEngineApplication.xml.html @@ -0,0 +1,13 @@ + + ++ + 用于在 Google App Engine 应用程序中创建 appengine-application.xml 描述符的内置模板。 + + | +
+ + 用于在 Google App Engine 应用程序中创建 jdoconfig.xml 描述符的内置模板。 + + | +
+ + 用于在 Google App Engine 应用程序中创建 persistence.xml 描述符的内置模板。 + + | +
+ + 用于在 Google App Engine 应用程序中创建 appengine-web.xml 描述符的内置模板。 + + | +
这是用于在 Android 应用程序中创建自定义 Application 类的内置文件模板。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/fileTemplates/j2ee/Aspect.aj.html b/original-plugin-raw/zh/fileTemplates/j2ee/Aspect.aj.html new file mode 100644 index 000000000..828774e8a --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/j2ee/Aspect.aj.html @@ -0,0 +1,13 @@ + + ++ + 这是您每次创建新的 AspectJ 样式(普通旧)切面时使用的内置模板。 + + | +
这是用于在 Android 应用程序中创建新的广播接收器的内置文件模板。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/fileTemplates/j2ee/EJB Local Interface.java.html b/original-plugin-raw/zh/fileTemplates/j2ee/EJB Local Interface.java.html new file mode 100644 index 000000000..dbbcaec00 --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/j2ee/EJB Local Interface.java.html @@ -0,0 +1,13 @@ + + ++ + 这是每次创建 EJB 本地接口类时使用的内置模板 + + | +
+ + 这是每次创建 EJB 远程接口类时使用的内置模板 + + | +
+ + 这是每次创建 EJB3.0 EnterpriseBean 侦听器类时使用的内置模板 + + | +
+ + 这是每次创建 Bean 托管持久性实体 Bean 类时使用的内置模板 + + | +
+ + 这是每次创建容器托管的持久性版本 1.x 实体 Bean 类时使用的内置模板 + + | +
+ + 这是每次创建容器托管的持久性版本 2.x 实体 Bean 类时使用的内置模板 + + | +
+ + 这是每次创建实体 Bean 远程主接口类时使用的内置模板 + + | +
+ + 这是每次创建实体 Bean 本地主接口类时使用的内置模板 + + | +
+ + 这是每次创建注解的 Java EE 6 筛选器类时使用的内置模板 + + | +
+ + 这是每次创建筛选器类时使用的内置模板 + + | +
这是用于在 Android 应用程序中创建新片段的内置文件模板。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/fileTemplates/j2ee/GuiceNewBindingAnnotation.java.html b/original-plugin-raw/zh/fileTemplates/j2ee/GuiceNewBindingAnnotation.java.html new file mode 100644 index 000000000..0bd6c1e6c --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/j2ee/GuiceNewBindingAnnotation.java.html @@ -0,0 +1,83 @@ + + +这是每次创建新的 Guice 绑定注解时使用的内置模板。 + 使用 #parse 指令,将所需模板的全名指定为引号中的形参可以在包含选项卡中包含模板。 + 例如: + #parse("File Header.java") + |
+
预定义变量接收以下值: | +||
+ | 在其中创建新类的软件包名称 | +|
+ | 在创建新类对话框中指定的新类的名称 | +|
+ | 当前的用户系统登录名 | +|
+ | 当前系统日期 | +|
+ | 当前系统时间 | +|
+ | 当前年度 | +|
+ | 当前月份 | +|
+ | 当前月份名称的前 3 个字母。 例如:Jan、Feb 等 | +|
+ | 当前月份的全名。 例如:January、February 等 | +|
+ | 当前日期 | +|
+ | 当前小时 | +|
+ | 当前分钟 | +|
+ | 当前项目的名称 | +
这是每次创建新的 Guice 方法侦听器类时使用的内置模板。 + 使用 #parse 指令,将所需模板的全名指定为引号中的形参可以在包含选项卡中包含模板。 + 例如: + #parse("File Header.java") + |
+
预定义变量接收以下值: | +||
+ | 在其中创建新类的软件包名称 | +|
+ | 在创建新类对话框中指定的新类的名称 | +|
+ | 当前的用户系统登录名 | +|
+ | 当前系统日期 | +|
+ | 当前系统时间 | +|
+ | 当前年度 | +|
+ | 当前月份 | +|
+ | 当前月份名称的前 3 个字母。 例如:Jan、Feb 等 | +|
+ | 当前月份的全名。 例如:January、February 等 | +|
+ | 当前日期 | +|
+ | 当前小时 | +|
+ | 当前分钟 | +|
+ | 当前项目的名称 | +
这是每次创建新的 Guice 模块类时使用的内置模板。 + 使用 #parse 指令,将所需模板的全名指定为引号中的形参可以在包含选项卡中包含模板。 + 例如: + #parse("File Header.java") + |
+
预定义变量接收以下值: | +||
+ | 在其中创建新类的软件包名称 | +|
+ | 在创建新类对话框中指定的新类的名称 | +|
+ | 当前的用户系统登录名 | +|
+ | 当前系统日期 | +|
+ | 当前系统时间 | +|
+ | 当前年度 | +|
+ | 当前月份 | +|
+ | 当前月份名称的前 3 个字母。 例如:Jan、Feb 等 | +|
+ | 当前月份的全名。 例如:January、February 等 | +|
+ | 当前日期 | +|
+ | 当前小时 | +|
+ | 当前分钟 | +|
+ | 当前项目的名称 | +
这是每次创建新的 Guice 范围注解时使用的内置模板。 + 使用 #parse 指令,将所需模板的全名指定为引号中的形参可以在包含选项卡中包含模板。 + 例如: + #parse("File Header.java") + |
+
预定义变量接收以下值: | +||
+ | 在其中创建新类的软件包名称 | +|
+ | 在创建新类对话框中指定的新类的名称 | +|
+ | 当前的用户系统登录名 | +|
+ | 当前系统日期 | +|
+ | 当前系统时间 | +|
+ | 当前年度 | +|
+ | 当前月份 | +|
+ | 当前月份名称的前 3 个字母。 例如:Jan、Feb 等 | +|
+ | 当前月份的全名。 例如:January、February 等 | +|
+ | 当前日期 | +|
+ | 当前小时 | +|
+ | 当前分钟 | +|
+ | 当前项目的名称 | +
+ + 用于创建 Google Web Toolkit 模块的内置模板。 + + | +
+ + 用于在 1.3 或更早版本的 GWT 应用程序中创建 Google Web Toolkit 模块的内置模板。 + + | +
+ + 用于在 1.4 或 1.5 版本的 GWT 应用程序中创建 Google Web Toolkit 模块的内置模板。 + + | +
+ + 用于在 1.6 或更高版本的 GWT 应用程序中创建 Google Web Toolkit 模块的内置模板。 + + | +
+ + 用于在 GWT 1.4 应用程序中创建 Google Web Toolkit 服务的内置模板。 + + | +
+ + 用于创建 Google Web Toolkit 服务的内置模板。 + + | +
+ + 用于创建 Google Web Toolkit 服务的内置模板。 + + | +
+ + 用于在 GWT 1.0 应用程序中创建 Google Web Toolkit 服务的内置模板。 + + | +
+ + 用于在 1.5 或更高版本的 GWT 应用程序中创建 Google Web Toolkit 服务的内置模板。 + + | +
+ + 用于在 GWT 1.4 应用程序中创建 Google Web Toolkit 模块的内置模板。 + + | +
+ + 用于在 GWT 1.5 应用程序中创建 Google Web Toolkit 模块的内置模板。 + + | +
+ + 用于在 1.6 或更高版本的 GWT 应用程序中创建 Google Web Toolkit 模块的内置模板。 + + | +
+ + 用于创建 Google Web Toolkit 入口点的内置模板。 + + | +
+ + 用于创建 GWT 事件类的内置模板。 + + | +
+ + 用于创建 GWT 事件处理程序类的内置模板。 + + | +
+ + 用于在 GWT 应用程序中创建 ui.xml 文件的内置模板。 + + | +
+ + 用于创建 Google Web Toolkit 可序列化类的内置模板。 + + | +
+ + 用于创建 GWT 测试用例的内置模板。 + + | +
+ + 一个内置模板,用于在 GWT 应用程序中为 ui.xml 文件创建带有 UiBinder 实现的 Java 类。 + + | +
+ + 一个内置模板,用于在 GWT 应用程序中为 ui.xml 文件创建带有 UiRenderer 实现的 Java 类。 + + | +
+ + 用于将内容添加到 GWT 应用程序中的生成 UiRenderer 实体的内置模板。 + + | +
+ + 用于在 GWT 应用程序中为 UiRenderer 实现创建 ui.xml 文件的内置模板。 + + | +
用于为代码检查创建新描述的内置模板。 + | +
这是每次创建 Web 服务时使用的内置模板 + | +
这是每次创建 RESTful Web 服务时使用的内置模板 + | +
+ 适用于代码生成脚本的 Jpa @JoinColumn 模板 + | +
+ + 这是每次创建 jsp 页面时使用的内置模板 + + | +
+ + 这是每次创建 jspx 页面时使用的内置模板 + + | +
+ 适用于代码生成脚本并带有复杂主键的 Kotlin 实体类模板 + | +
+ 适用于代码生成脚本的 Kotlin equals() 方法模板 + | +
+ 适用于代码生成脚本的 Kotlin hashCode() 方法模板 + | +||
+ + 重要提示:如果在初始化属性之前将延迟加载的实体放入集合,然后更新该实体,则会生成不同的 hashCode() 值,并且更新之后的对象不再等效于更新之前的对象,因此,建议在实体类中使用常量 hashCode() 结果。 + | +
+ 适用于代码生成脚本的 Kotlin 类属性模板 + | +
+ 适用于代码生成脚本的 Kotlin 类 mappedBy 属性模板 + | +
+ 适用于代码生成脚本的 Kotlin 类联接列属性模板 + | +
+ 适用于代码生成脚本的 Kotlin toString() 方法模板 + | +
+ + 这是每次创建注解的 Java EE 6 侦听器类时使用的内置模板 + + | +
+ + 这是每次创建侦听器类时使用的内置模板 + + | +
+
+ 这是每次创建新的 Maven profiles.xml 文件时使用的内置模板
+
+ |
+
+ + 这是每次创建新的 Maven 项目时使用的内置模板。 + + | +
+
+ 这是每次创建新的 Maven settings.xml 文件时使用的内置模板
+
+ |
+
+ + 这是每次创建 EJB3.0 消息驱动型 Bean 类时使用的内置模板 + + | +
+ + 这是每次创建消息驱动型 Bean 类时使用的内置模板 + + | +
用于在基于 IntelliJ 的 IDE 源中创建新的 Message Bundle 类的内置模板。
+ |
+
+ + 这是每次创建 EJB 3.0 Embeddable 类时使用的内置模板 + + | +
+ + 这是每次创建 EJB 3.0 实体类时使用的内置模板 + + | +
这是用于在 Android 应用程序中创建新的 AIDL 文件的内置文件模板。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/fileTemplates/j2ee/Service.java.html b/original-plugin-raw/zh/fileTemplates/j2ee/Service.java.html new file mode 100644 index 000000000..939825515 --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/j2ee/Service.java.html @@ -0,0 +1,5 @@ + + +这是用于在 Android 应用程序中创建新服务的内置文件模板。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/fileTemplates/j2ee/Servlet Annotated Class.java.html b/original-plugin-raw/zh/fileTemplates/j2ee/Servlet Annotated Class.java.html new file mode 100644 index 000000000..c27afb107 --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/j2ee/Servlet Annotated Class.java.html @@ -0,0 +1,13 @@ + + ++ + 这是每次创建注解的 Java EE 6 Servlet 类时使用的内置模板 + + | +
+ + 这是每次创建 Servlet 类时使用的内置模板 + + | +
+ + 这是每次创建 EJB3.1 单例会话 Bean 类时使用的内置模板 + + | +
+ + 这是每次创建 EJB3.0 有状态会话 Bean 类时使用的内置模板 + + | +
+ + 这是每次创建有状态会话 Bean 类时使用的内置模板 + + | +
+ + 这是每次创建 EJB3.0 无状态会话 Bean 类时使用的内置模板 + + | +
+ + 这是每次创建无状态会话 Bean 类时使用的内置模板 + + | +
+ + 这是每次创建会话 Bean 远程主接口类时使用的内置模板 + + | +
+ + 这是每次创建会话 Bean 本地主接口类时使用的内置模板 + + | +
+ + 这是每次创建无状态会话 Bean 服务端点接口类时使用的内置模板 + + | +
+ + 这是用于生成 JSP 标记库描述符的内置模板 + + | +
+ 创建新的 Tapestry 组件类。 + + | +
+ 创建新的 Tapestry 组件模板。 + + | +
+ 创建新的 Tapestry mixin 类。 + + | +
+ 创建新的 Tapestry 页面类。 + + | +
+ 创建新的 Tapestry 页面模板。 + + | +
+ 为您的 Tapestry 模块创建启动 POM。 + + | +
自定义 UI 主题中使用的编辑器配色方案的内置模板。 | +
用于创建新的自定义 UI 主题的内置模板。 | +
+ + 这是用于创建 Vaadin 6 应用程序的内置模板 + + | +
+ + 这是用于为 Vaadin 微件创建客户端类的内置模板 + + | +
+ + 这是用于为 Vaadin 6 微件创建服务器端类的内置模板 + + | +
+ + 这是用于为 Vaadin 6 微件集创建 GWT 模块描述符的内置模板 + + | +
+ + 这是用于为 Vaadin 微件创建客户端类的内置模板 + + | +
+ + 这是用于创建 Vaadin 7 应用程序的内置模板 + + | +
+ + 这是用于为 Vaadin 7 微件创建服务器端类的内置模板 + + | +
+ + 这是用于为 Vaadin 微件创建客户端 RPC 类的内置模板 + + | +
+ + 这是用于为 Vaadin 微件创建连接器的内置模板 + + | +
+ + 这是用于为 Vaadin 微件创建服务器端 RPC 类的内置模板 + + | +
+ + 这是用于为 Vaadin 7 微件集创建 GWT 模块描述符的内置模板 + + | +
+ + 这是用于为 Vaadin 微件创建状态类的内置模板 + + | +
+ + 这是用于创建 Vaadin 自定义组件的内置模板 + + | +
这是每次创建新的 application.xml 时使用的内置模板 + | +
这是每次创建新的 application.xml 时使用的内置模板 + | +
这是每次创建新的 application.xml 时使用的内置模板 + | +
这是每次创建新的 application.xml 时使用的内置模板 + | +
这是每次创建新的 application.xml 时使用的内置模板 + | +
这是每次创建新的 application.xml 时使用的内置模板 + | +
这是每次创建新的 application.xml 时使用的内置模板 + | +
这是每次创建新的 application.xml 时使用的内置模板 + | +
这是每次创建 batch.xml 时使用的内置模板 + | +
这是每次创建 batch.xml 时使用的内置模板 + | +
为新的 C Executable 项目填充自动生成的 CMakeLists.txt 文件
+此处列出了所有可用变量和命令
+ + + diff --git a/original-plugin-raw/zh/fileTemplates/j2ee/c.library.CMakeLists.txt.html b/original-plugin-raw/zh/fileTemplates/j2ee/c.library.CMakeLists.txt.html new file mode 100644 index 000000000..8ea193cef --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/j2ee/c.library.CMakeLists.txt.html @@ -0,0 +1,10 @@ + + + +为新的 C Library 项目填充自动生成的 CMakeLists.txt 文件
+此处列出了所有可用变量和命令
+ + + diff --git a/original-plugin-raw/zh/fileTemplates/j2ee/cdi.beans_1_0.xml.html b/original-plugin-raw/zh/fileTemplates/j2ee/cdi.beans_1_0.xml.html new file mode 100644 index 000000000..4b82a67ec --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/j2ee/cdi.beans_1_0.xml.html @@ -0,0 +1,10 @@ + + +这是每次创建 beans.xml 时使用的内置模板 + | +
这是每次创建 beans.xml 时使用的内置模板 + | +
这是每次创建 beans.xml 时使用的内置模板 + | +
这是每次创建 beans.xml 时使用的内置模板 + | +
这是用于创建 Seam components.xml 文件的内置模板 + | +
这是用于创建 Seam components.xml 文件的内置模板 + | +
这是用于创建 JSF 复合组件文件的内置模板 + | +
这是每次创建新的 Tomcat 5.x 特定部署描述符 (context.xml) 时使用的内置模板。 + 此描述符代表在 Tomcat 服务器中运行的 Web 应用程序,并将此类形参定义为应用程序的上下文根 (docbase) 和上下文路径 + | +
这是每次从持久性单元生成 Java Server Faces 时用于创建 JSF 转换器类的内置模板 + | +
为新的 C++ Executable 项目填充自动生成的 CMakeLists.txt 文件
+此处列出了所有可用变量和命令
+ + + diff --git a/original-plugin-raw/zh/fileTemplates/j2ee/cpp.library.CMakeLists.txt.html b/original-plugin-raw/zh/fileTemplates/j2ee/cpp.library.CMakeLists.txt.html new file mode 100644 index 000000000..5c585ecbb --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/j2ee/cpp.library.CMakeLists.txt.html @@ -0,0 +1,10 @@ + + + +为新的 C++ Library 项目填充自动生成的 CMakeLists.txt 文件
+此处列出了所有可用变量和命令
+ + + diff --git a/original-plugin-raw/zh/fileTemplates/j2ee/cuda.executable.CMakeLists.txt.html b/original-plugin-raw/zh/fileTemplates/j2ee/cuda.executable.CMakeLists.txt.html new file mode 100644 index 000000000..4a98958b3 --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/j2ee/cuda.executable.CMakeLists.txt.html @@ -0,0 +1,10 @@ + + + +为新的 CUDA Executable 项目填充自动生成的 CMakeLists.txt 文件
+此处列出了所有可用变量和命令
+ + + diff --git a/original-plugin-raw/zh/fileTemplates/j2ee/cuda.library.CMakeLists.txt.html b/original-plugin-raw/zh/fileTemplates/j2ee/cuda.library.CMakeLists.txt.html new file mode 100644 index 000000000..4b56a24ae --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/j2ee/cuda.library.CMakeLists.txt.html @@ -0,0 +1,10 @@ + + + +为新的 CUDA Library 项目填充自动生成的 CMakeLists.txt 文件
+此处列出了所有可用变量和命令
+ + + diff --git a/original-plugin-raw/zh/fileTemplates/j2ee/cxf.webservice.interface.java.html b/original-plugin-raw/zh/fileTemplates/j2ee/cxf.webservice.interface.java.html new file mode 100644 index 000000000..bf728a608 --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/j2ee/cxf.webservice.interface.java.html @@ -0,0 +1,10 @@ + + +这是每次创建 CXF Web 服务接口时使用的内置模板 + | +
这是每次创建 CXF Web 服务时使用的内置模板 + | +
这是每次创建 Web 服务时使用的内置模板 + | +
这是用于创建 Drools 规则文件的内置模板 + | +
这是每次创建新版本 1.x ejb-jar.xml 时使用的内置模板 + | +
这是每次创建新版本 2.0 ejb-jar.xml 时使用的内置模板 + | +
这是每次创建新版本 2.1 ejb-jar.xml 时使用的内置模板 + | +
这是每次创建新版本 3.0 ejb-jar.xml 时使用的内置模板 + | +
这是每次创建新版本 3.1 ejb-jar.xml 时使用的内置模板 + | +
这是每次创建新版本 3.2 ejb-jar.xml 时使用的内置模板 + | +
这是每次创建新版本 4.0 ejb-jar.xml 时使用的内置模板 + | +
这是用于创建 Facelets 页面的内置模板 + | +
这是每次添加 Java Server Faces 支持时用于创建 JSF 配置文件的内置模板 + | +
这是每次添加 Java Server Faces 支持时用于创建 JSF 配置文件的内置模板 + | +
这是每次添加 Java Server Faces 支持时用于创建 JSF 配置文件的内置模板 + | +
这是每次添加 Java Server Faces 支持时用于创建 JSF 配置文件的内置模板 + | +
这是每次添加 Java Server Faces 支持时用于创建 JSF 2.2 配置文件的内置模板 + | +
这是每次添加 Java Server Faces 支持时用于创建 JSF 2.3 配置文件的内置模板 + | +
这是每次添加 Java Server Faces 支持时用于创建 JSF 3.0 配置文件的内置模板 + | +
这是用于创建 JSF 页面的内置模板 + | +
这是每次从持久性单元生成 Java Server Faces 时用于创建 JSF 创建页面的内置模板 + | +
这是每次从持久性单元生成 Java Server Faces 时用于创建 JSF 创建页面的内置模板 + | +
这是每次从持久性单元生成 Java Server Faces 时用于创建 JSF 编辑页面的内置模板 + | +
这是每次从持久性单元生成 Java Server Faces 时用于创建 JSF 编辑页面的内置模板 + | +
这是每次从持久性单元生成 Java Server Faces 时用于创建 JSF 列表页面的内置模板 + | +
这是每次从持久性单元生成 Java Server Faces 时用于创建 JSF 表格页面的内置模板 + | +
这是每次从持久性单元生成 Java Server Faces 时用于创建 JSF 视图页面的内置模板 + | +
这是每次从持久性单元生成 Java Server Faces 时用于创建 JSF 视图页面的内置模板 + | +
+ + 这是每次创建新的 glassfish-application.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 glassfish-ejb-jar.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 glassfish-web.xml 时使用的内置模板 + + | +
用于为 IntelliJ 平台插件创建新的 Gradle 模块的内置模板。 + | +
这是每次创建新的 Hibernate 3.X XML 配置时使用的内置模板 + | +
这是每次创建新的 Hibernate 4.X XML 配置时使用的内置模板 + | +
这是每次创建新的 Hibernate 5.0 XML 配置时使用的内置模板 + | +
这是每次创建新的 Hibernate 5.2 XML 配置时使用的内置模板 + | +
这是每次创建新的 Hibernate 3.X Java 主类时使用的内置模板 + | +
这是每次创建新的 Hibernate 4.X Java 主类时使用的内置模板 + | +
这是每次创建新的 Hibernate 5.0 Java 主类时使用的内置模板 + | +
这是每次创建新的 Hibernate 5.2 Java 主类时使用的内置模板 + | +
这是每次创建新的 Hibernate 3.X XML 映射时使用的内置模板 + | +
这是每次创建新的 Hibernate 4.X XML 映射时使用的内置模板 + | +
这是每次创建新的 Hibernate 5.X XML 映射时使用的内置模板 + | +
+ + 这是每次创建新的 ibm-application-bnd.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 ibm-application-bnd.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 ibm-application-bnd.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 ibm-application-ext-pme.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 ibm-application-ext.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 ibm-application-ext.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 ibm-ejb-jar-bnd.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 ibm-ejb-jar-bnd.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 ibm-ejb-jar-bnd.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 ibm-ejb-jar-ext-pme.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 ibm-ejb-jar-ext.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 ibm-ejb-jar-ext.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 ibm-web-bnd.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 ibm-web-bnd.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 ibm-web-bnd.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 ibm-web-ext-pme.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 ibm-web-ext.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 ibm-web-ext.xml 时使用的内置模板 + + | +
+ 这是每次从持久性单元生成 Java Server Faces 时用于创建 JSF 索引页面的内置模板 + | +
这是每次创建 Java 2 EE 1.4 Web 服务时使用的内置模板 + | +
这是每次创建 Java 2 EE 1.4 Web 服务时使用的内置模板 + | +
这是每次创建 JaxWS Web 服务时使用的内置模板 + | +
+ + 这是每次创建新的 jboss-app.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jboss-app.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jboss-app.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jboss-app.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jboss-app.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jboss-deployment-structure.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jboss-deployment-structure.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jboss-deployment-structure.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jboss-deployment-structure.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jboss-web.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jboss-web.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jboss-web.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jboss-web.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jboss-web.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jboss-web.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jboss-web.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jboss-web.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jboss-web.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jboss-web.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jboss-web.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jboss.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jboss.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jboss.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jboss.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jboss.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jbosscmp-jdbc.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jbosscmp-jdbc.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jbosscmp-jdbc.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jetty-web.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jetty-web.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jetty-web.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 jetty-web.xml 时使用的内置模板 + + | +
这是每次创建简单的作业 xml 时使用的内置模板 + | +
这是用于创建 JSF 2.2 页面的内置模板 + | +
这是用于在 Android 应用程序中创建布局 XML 文件的内置文件模板。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/fileTemplates/j2ee/layoutResourceFile_vertical.xml.html b/original-plugin-raw/zh/fileTemplates/j2ee/layoutResourceFile_vertical.xml.html new file mode 100644 index 000000000..6314ff830 --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/j2ee/layoutResourceFile_vertical.xml.html @@ -0,0 +1,5 @@ + + +这是用于在 Android 应用程序中创建垂直布局 XML 文件的内置文件模板。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/fileTemplates/j2ee/managed_bean_template1.java.html b/original-plugin-raw/zh/fileTemplates/j2ee/managed_bean_template1.java.html new file mode 100644 index 000000000..05d87c3e3 --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/j2ee/managed_bean_template1.java.html @@ -0,0 +1,10 @@ + + +这是每次从持久性单元生成 Java Server Faces 时用于创建 JSF 托管 Bean 类的内置模板 + | +
这是用于创建 Spring Bean 配置文件的内置模板。 + | +
这是用于在 Android 应用程序中创建导航 XML 文件的内置文件模板。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/fileTemplates/j2ee/orm_1_0.xml.html b/original-plugin-raw/zh/fileTemplates/j2ee/orm_1_0.xml.html new file mode 100644 index 000000000..c2af31285 --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/j2ee/orm_1_0.xml.html @@ -0,0 +1,10 @@ + + +这是每次创建新的 orm.xml 时使用的内置模板 + | +
这是每次创建新的 JPA 2.0 orm.xml 时使用的内置模板 + | +
这是每次创建新的 JPA 2.1 orm.xml 时使用的内置模板 + | +
这是每次创建新的 JPA 2.2 orm.xml 时使用的内置模板 + | +
这是每次创建新的 JPA 3.0 orm.xml 时使用的内置模板 + | +
这是用于创建 Spring Dynamic Modules 配置上下文文件的内置模板 + | +
这是用于创建 Seam Pageflow 文件的内置模板 + | +
这是用于创建 Seam pages.xml 文件的内置模板 + | +
这是每次创建新的 persistence.xml 时使用的内置模板 + | +
这是每次创建新的 JPA 2.0 persistence.xml 时使用的内置模板 + | +
这是每次创建新的 JPA 2.1 persistence.xml 时使用的内置模板 + | +
这是每次创建新的 JPA 2.2 persistence.xml 时使用的内置模板 + | +
这是每次创建新的 JPA 3.0 persistence.xml 时使用的内置模板 + | +
用于创建新的基于 Plugin DevKit 的 IntelliJ 平台插件模块的内置模板。 + | +
这是每次创建 pojo 样式 Web 服务时使用的内置模板 + | +
这是用于创建 jPDL 4.4 进程文件的内置模板 + | +
为新的 Qt 项目填充自动生成的 CMakeLists.txt 文件
+此处列出了所有可用变量和命令
+ + + diff --git a/original-plugin-raw/zh/fileTemplates/j2ee/resourceFile.xml.html b/original-plugin-raw/zh/fileTemplates/j2ee/resourceFile.xml.html new file mode 100644 index 000000000..c2c153a73 --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/j2ee/resourceFile.xml.html @@ -0,0 +1,5 @@ + + +这是用于在 Android 应用程序中创建布局 XML 资源文件的内置文件模板。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/fileTemplates/j2ee/rest.cxf.webservice.interface.java.html b/original-plugin-raw/zh/fileTemplates/j2ee/rest.cxf.webservice.interface.java.html new file mode 100644 index 000000000..bdf1f3089 --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/j2ee/rest.cxf.webservice.interface.java.html @@ -0,0 +1,10 @@ + + +这是每次创建 CXF RESTful Web 服务时使用的内置模板 + | +
这是每次创建 CXF RESTful Web 服务时使用的内置模板 + | +
这是用于创建 Spring Bean 配置文件的内置模板 + | +
这是用于创建 Spring Bean 配置文件的内置模板 + | +
这是用于创建 Spring Bean 配置文件的内置模板 + | +
+ + 这是每次创建新的 sun-application.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 sun-application.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 sun-application.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 sun-application.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 sun-cmp-mapping.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 sun-cmp-mapping.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 sun-cmp-mapping.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 sun-ejb-jar.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 sun-ejb-jar.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 sun-ejb-jar.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 sun-ejb-jar.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 sun-ejb-jar.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 sun-ejb-jar.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 sun-web.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 sun-web.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 sun-web.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 sun-web.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 sun-web.xml 时使用的内置模板 + + | +
+ + 这是每次创建新的 sun-web.xml 时使用的内置模板 + + | +
这是每次从持久性单元生成 Java Server Faces 时用于创建 JSF 创建页面的内置模板 + | +
这是每次从持久性单元生成 Java Server Faces 时用于创建 JSF 编辑页面的内置模板 + | +
这是每次从持久性单元生成 Java Server Faces 时用于创建 JSF 列表页面的内置模板 + | +
这是每次从持久性单元生成 Java Server Faces 时用于创建 JSF 托管 Bean 类的内置模板 + | +
这是每次从持久性单元生成 Java Server Faces 时用于创建 JSF 视图页面的内置模板 + | +
这是用于在 "value" 文件夹中创建空 XML 资源文件的内置文件模板
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/fileTemplates/j2ee/web.2_2.xml.html b/original-plugin-raw/zh/fileTemplates/j2ee/web.2_2.xml.html new file mode 100644 index 000000000..04ca7f636 --- /dev/null +++ b/original-plugin-raw/zh/fileTemplates/j2ee/web.2_2.xml.html @@ -0,0 +1,10 @@ + + +这是每次为 Servlet 2.2 规范创建新的 web.xml 时使用的内置模板 + | +
这是每次为 Servlet 2.3 规范创建新的 web.xml 时使用的内置模板 + | +
这是每次为 Servlet 2.4 规范创建新的 web.xml 时使用的内置模板 + | +
这是每次为 Servlet 2.5 规范创建新的 web.xml 时使用的内置模板 + | +
这是每次为 Servlet 3.0 规范创建新的 web.xml 时使用的内置模板 + | +
这是每次为 Servlet 3.1 规范创建新的 web.xml 时使用的内置模板 + | +
这是每次为 Servlet 4.0 规范创建新的 web.xml 时使用的内置模板 + | +
这是每次创建新的 web.xml 5.0 规范时使用的内置模板 + | +
示例:
+
+ JPanel panel = new JPanel(new BorderLayout(2, 2));
+ JLabel label = new JLabel("Hello World");
+ panel.add(label, BorderLayout.NORTH);
+
+在应用快速修复后:
+
+ JPanel panel = new JPanel(new BorderLayout(2, 2));
+ JLabel label = new JLabel("Hello World");
+ panel.add(label, BorderLayout.PAGE_START);
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AbsoluteImport.html b/original-plugin-raw/zh/inspectionDescriptions/AbsoluteImport.html
new file mode 100644
index 000000000..7803dc0da
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AbsoluteImport.html
@@ -0,0 +1,21 @@
+
+
+报告可以与基础软件包(设置 | 语言和框架 | Scala | 基础软件包)相关的完全限定导入。
+仅当在设置 | 编辑器 | 代码样式 | Scala | 导入中启用对基础软件包例外选项时才适用。
+示例:
+
+ package org.example.application
+ package ui
+
+ import org.example.application.model.Data
+
+在应用快速修复后:
+
+ package org.example.application
+ package ui
+
+ import model.Data
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AbstractBeanReferencesInspection.html b/original-plugin-raw/zh/inspectionDescriptions/AbstractBeanReferencesInspection.html
new file mode 100644
index 000000000..907ae1ecb
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AbstractBeanReferencesInspection.html
@@ -0,0 +1,20 @@
+
+
+报告引用的抽象 Bean。
+ +抽象 Bean 只能用作模板 Bean 定义,即子定义的父项。
+ 尝试通过作为另一个 Bean 的 ref 属性进行引用,或者通过使用父 Bean ID 调用 getBean()
来单独使用此类抽象父 Bean,将导致错误。
示例:
+ +
+ <bean abstract="true" id="parentBeanWithoutClass"/>
+ <bean class="com.my.company.FooBean" id="childBean" parent="parentBeanWithoutClass">
+ <!-- properties -->
+ </bean>
+
+
+在此示例中,父 Bean 不能自己实例化,因为它不完整并且被显式声明为抽象。
+ + + diff --git a/original-plugin-raw/zh/inspectionDescriptions/AbstractClassExtendsConcreteClass.html b/original-plugin-raw/zh/inspectionDescriptions/AbstractClassExtendsConcreteClass.html new file mode 100644 index 000000000..04d5524b2 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AbstractClassExtendsConcreteClass.html @@ -0,0 +1,6 @@ + + +报告扩展具体类的abstract
类。
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AbstractClassNeverImplemented.html b/original-plugin-raw/zh/inspectionDescriptions/AbstractClassNeverImplemented.html
new file mode 100644
index 000000000..aac618758
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AbstractClassNeverImplemented.html
@@ -0,0 +1,7 @@
+
+
+报告没有任何具体子类的 abstract
类。
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AbstractClassWithOnlyOneDirectInheritor.html b/original-plugin-raw/zh/inspectionDescriptions/AbstractClassWithOnlyOneDirectInheritor.html
new file mode 100644
index 000000000..a9de01a71
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AbstractClassWithOnlyOneDirectInheritor.html
@@ -0,0 +1,16 @@
+
+
+报告仅具有一个直接继承者的 abstract 类。 虽然这种类可能会在内存受限或带宽受限的环境中提供令人钦佩的设计清晰度,但它们不必要地增加了应用程序的总占用空间。 请考虑将抽象类与其继承者合并。
++ 此检查适用于 Java ME 和其他资源高度受限的环境。 + 不加考虑地应用此检查的结果可能会对代码清晰度和设计产生负面影响。 +
+示例:
+
+ abstract class Base {} // 将被报告
+
+ class Inheritor extends Base {}
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AbstractClassWithoutAbstractMethods.html b/original-plugin-raw/zh/inspectionDescriptions/AbstractClassWithoutAbstractMethods.html
new file mode 100644
index 000000000..f08343c1a
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AbstractClassWithoutAbstractMethods.html
@@ -0,0 +1,7 @@
+
+
+报告没有任何 abstract
方法的 abstract
类。
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AbstractMethodCallInConstructor.html b/original-plugin-raw/zh/inspectionDescriptions/AbstractMethodCallInConstructor.html
new file mode 100644
index 000000000..680dd2e52
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AbstractMethodCallInConstructor.html
@@ -0,0 +1,34 @@
+
+
+报告在对象构造期间对当前类的 abstract
方法的调用。
+如果方法位于以下位置,则会在对象构造期间调用: +
clone()
方法readObject()
方法readObjectNoData()
方法此类调用可能会导致难以捉摸的错误,因为对象初始化可能发生在方法调用之前。
+示例:
+
+ abstract class Parent {
+ abstract void abstractMethod();
+ }
+
+ class Child extends Parent {
+ Child() {
+ abstractMethod();
+ }
+ }
+
+
+此检查与以下检查共享功能:
+一次只能启用一个检查,以防止警告重复。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AbstractMethodOverridesAbstractMethod.html b/original-plugin-raw/zh/inspectionDescriptions/AbstractMethodOverridesAbstractMethod.html new file mode 100644 index 000000000..131eba063 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AbstractMethodOverridesAbstractMethod.html @@ -0,0 +1,18 @@ + + +报告重写abstract
方法的 abstract
方法。
+此类方法毫无意义,因为任何具体的子类都必须实现抽象方法。
++ 此检查不会报告返回类型、异常声明、注解或修饰符与被重写方法不同的方法。 +
+ ++ 配置检查: +
+abstract
方法。
+此检查不会报告从 java.lang.Object
重写的方法。
abstract
方法。
++ 这会导致子类发生编译时错误;该检查会报告 abstract 方法点处的问题,从而可以更快地检测出问题。 +
+ + + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AbstractValueInTrait.html b/original-plugin-raw/zh/inspectionDescriptions/AbstractValueInTrait.html new file mode 100644 index 000000000..0e8bc332a --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AbstractValueInTrait.html @@ -0,0 +1,11 @@ + +报告在初始化期间可能导致错误的特征中的抽象值和变量。
+示例:
+
+ trait Sample {
+ val method: Method
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AccessStaticViaInstance.html b/original-plugin-raw/zh/inspectionDescriptions/AccessStaticViaInstance.html
new file mode 100644
index 000000000..8fff24574
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AccessStaticViaInstance.html
@@ -0,0 +1,18 @@
+
+
+报告通过类实例而非类本身对 static
方法和字段的引用。
+虽然 Java 语言规范允许使用实例变量引用 static 成员,但代码阅读者可能会误认为该方法依赖于实例,从而使代码令人困惑。
+该快速修复会将实例变量替换为类名。
+示例:
+
+ String s1 = s.valueOf(0);
+
+在应用快速修复后:
+
+ String s = String.valueOf(0);
+
+
++ + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AccessToNonThreadSafeStaticFieldFromInstance.html b/original-plugin-raw/zh/inspectionDescriptions/AccessToNonThreadSafeStaticFieldFromInstance.html new file mode 100644 index 000000000..c2f2d0229 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AccessToNonThreadSafeStaticFieldFromInstance.html @@ -0,0 +1,24 @@ + +
+报告对非线程安全类型的static
字段的访问。
+
+ 从实例方法或非同步块访问 static
字段时,多个线程都可以访问该字段。
+ 这可能导致未指明的副作用,例如异常和不正确的结果。
+
示例:
+
+ class Sample {
+ private static final SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
+ String method() {
+ return df.format("");
+ }
+ }
+
+
++ 您可以指定哪些类型应被视为非线程安全。 + 仅报告具有这些确切类型或使用这些确切类型进行初始化的字段,因为可能存在这些类型的线程安全子类。 +
+ + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AccessToStaticFieldLockedOnInstance.html b/original-plugin-raw/zh/inspectionDescriptions/AccessToStaticFieldLockedOnInstance.html new file mode 100644 index 000000000..30d92a7bf --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AccessToStaticFieldLockedOnInstance.html @@ -0,0 +1,25 @@ + + +报告对在this
或 this
的实例字段上锁定的非常量 static 字段的访问。
++ 在实例数据上锁定 static 字段并不能防止其他实例修改该字段,因此可能会导致意外的竞争条件。 +
+示例:
+
+ static String test;
+ public void foo() {
+ synchronized (this) {
+ System.out.println(test); // 警告
+ }
+ }
+
++ 通过快速修复可以忽略特定类型的 static 字段。 + 可以在检查选项中管理被忽略的类型。 +
+ ++ 使用检查选项可以指定应忽略哪些用于 static 字段的类。 +
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AccessorLikeMethodIsEmptyParen.html b/original-plugin-raw/zh/inspectionDescriptions/AccessorLikeMethodIsEmptyParen.html new file mode 100644 index 000000000..817f258aa --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AccessorLikeMethodIsEmptyParen.html @@ -0,0 +1,23 @@ + +
+报告具有类似访问器名称且形参子句为空的方法。
+符合访问器 JavaBean 命名协定的方法预计不会有副作用。 + 这些方法的推荐惯例是在没有形参时使用无形参方法。
+该惯例促进了统一访问原则,即客户端代码不应受到将特性实现为字段或方法的决定的影响。
+该快速修复会移除空形参子句。
+示例:
+
+ trait Test {
+ def hasProperty(): Boolean
+ }
+
+在应用快速修复后:
+
+ trait Test {
+ def hasProperty: Boolean
+ }
+
+
+此检查将不报告重写其他成员的方法。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AccessorLikeMethodIsUnit.html b/original-plugin-raw/zh/inspectionDescriptions/AccessorLikeMethodIsUnit.html new file mode 100644 index 000000000..db0898829 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AccessorLikeMethodIsUnit.html @@ -0,0 +1,15 @@ + + +报告具有类似访问器名称且结果类型为 Unit
的方法。
符合访问器 JavaBean 命名协定的方法预计不会有副作用。 然而,结果类型为 Unit
的方法仅针对它们的副作用而执行。
这表明该方法应该导致非 Unit
类型或重命名以更好地反映副作用。
示例:
+
+ trait Test {
+ def getTarget(): Unit
+ }
+
+
+此检查将不报告重写其他成员的方法。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AccessorsWereOverridden.html b/original-plugin-raw/zh/inspectionDescriptions/AccessorsWereOverridden.html new file mode 100644 index 000000000..0519b5800 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AccessorsWereOverridden.html @@ -0,0 +1,5 @@ + + + 如果具有 @synthesize 语句的属性的所有访问器(对于readonly
属性,为 getter,其他情况下则为 getter 和 setter)均已显式定义,则报告这些属性。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ActionCableChannelNotFound.html b/original-plugin-raw/zh/inspectionDescriptions/ActionCableChannelNotFound.html
new file mode 100644
index 000000000..4d153b14f
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ActionCableChannelNotFound.html
@@ -0,0 +1,5 @@
+
+
+报告未定义的 Action Cable 通道的用法。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ActorMutableStateInspection.html b/original-plugin-raw/zh/inspectionDescriptions/ActorMutableStateInspection.html
new file mode 100644
index 000000000..d3effb619
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ActorMutableStateInspection.html
@@ -0,0 +1,28 @@
+
+
+报告 actor 具有可变状态的情况。
+示例:
+
+ import akka.actor._
+
+ class ActorImpl(private var counter: Int = 0) extends AbstractActor {
+ override def receive = {
+ case _ => counter += 1
+ }
+ }
+
+在应用快速修复后:
+
+ import akka.actor._
+
+ class ActorImpl(private val counter: Int = 0) extends AbstractActor {
+ override def receive = onMessage(counter)
+
+ private def onMessage(counter: Int): Receive = {
+ case _ => context.become(onMessage(counter + 1))
+ }
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AddOperatorModifier.html b/original-plugin-raw/zh/inspectionDescriptions/AddOperatorModifier.html
new file mode 100644
index 000000000..feaaf694f
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AddOperatorModifier.html
@@ -0,0 +1,29 @@
+
+
+报告与其中一个运算符惯例匹配但缺少 operator
关键字的函数。
+通过添加 operator
修饰符,您可以允许函数使用者编写惯用的 Kotlin 代码。
示例:
+
+ class Complex(val real: Double, val imaginary: Double) {
+ fun plus(other: Complex) =
+ Complex(real + other.real, imaginary + other.imaginary)
+ }
+
+ fun usage(a: Complex, b: Complex) {
+ a.plus(b)
+ }
+
+该快速修复会添加 operator
修饰符关键字:
+ class Complex(val real: Double, val imaginary: Double) {
+ operator fun plus(other: Complex) =
+ Complex(real + other.real, imaginary + other.imaginary)
+ }
+
+ fun usage(a: Complex, b: Complex) {
+ a + b
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AddVarianceModifier.html b/original-plugin-raw/zh/inspectionDescriptions/AddVarianceModifier.html
new file mode 100644
index 000000000..9dc327101
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AddVarianceModifier.html
@@ -0,0 +1,31 @@
+
+
+报告可以具有 in
或 out
差异的类型形参。
+使用 in
和 out
差异可以在 Kotlin 中提供更精确的类型推断以及更清晰的代码语义。
示例:
+
+ class Box<T>(val obj: T)
+
+ fun consumeString(box: Box<String>) {}
+ fun consumeCharSequence(box: Box<CharSequence>) {}
+
+ fun usage(box: Box<String>) {
+ consumeString(box)
+ consumeCharSequence(box) // 编译时错误
+ }
+
+该快速修复会添加匹配的差异修饰符:
+
+ class Box<out T>(val obj: T)
+
+ fun consumeString(box: Box<String>) {}
+ fun consumeCharSequence(box: Box<CharSequence>) {}
+
+ fun usage(box: Box<String>) ++{
+ consumeString(box)
+ consumeCharSequence(box) // 可以
+ }
+
+
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AlphaUnsortedPropertiesFile.html b/original-plugin-raw/zh/inspectionDescriptions/AlphaUnsortedPropertiesFile.html
new file mode 100644
index 000000000..9e3e60052
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AlphaUnsortedPropertiesFile.html
@@ -0,0 +1,5 @@
+
+
+报告未按字母顺序排序的资源包或 .properties 文件。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AmbiguousFieldAccess.html b/original-plugin-raw/zh/inspectionDescriptions/AmbiguousFieldAccess.html
new file mode 100644
index 000000000..83b78b543
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AmbiguousFieldAccess.html
@@ -0,0 +1,40 @@
+
+
+如果在类周围的代码中存在同名的局部变量、形参或字段,则报告从匿名类、内部类或局部类对超类字段的访问。
+在这种情况下,看似访问了来自周围代码的元素,而实际上访问的是来自超类的字段。
+
+ 为阐明代码的意图,建议对字段访问添加显式 super
限定符。
+
示例:
+
+ class First {
+ protected String ambiguous;
+ }
+ class Second {
+ void foo(String ambiguous) {
+ new First() {
+ {
+ System.out.println(ambiguous); // 访问的是字段,而不是形参
+ }
+ };
+ }
+ }
+
+在应用快速修复后:
+
+ class First {
+ protected String ambiguous;
+ }
+ class Second {
+ void foo(String ambiguous) {
+ new First() {
+ {
+ System.out.println(super.ambiguous);
+ }
+ };
+ }
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AmbiguousMethodCall.html b/original-plugin-raw/zh/inspectionDescriptions/AmbiguousMethodCall.html
new file mode 100644
index 000000000..36b4b57b8
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AmbiguousMethodCall.html
@@ -0,0 +1,42 @@
+
+
+如果在类周围的代码中存在具有相同签名的方法,则报告从匿名类、内部类或局部类对超类方法的调用。
+在这种情况下,看似调用了来自周围代码的方法,而实际上调用的是来自超类的方法。
+
+ 为了阐明代码的意图,建议对方法调用添加显式的 super
限定符。
+
示例:
+
+ class Parent {
+ void ambiguous(){}
+ }
+
+ class Example {
+ void ambiguous(){}
+
+ class Inner extends Parent {
+ void example(){
+ ambiguous(); //警告
+ }
+ }
+ }
+
+在应用快速修复后:
+
+ class Parent {
+ void ambiguous(){}
+ }
+
+ class Example {
+ void ambiguous(){}
+
+ class Inner extends Parent {
+ void example(){
+ super.ambiguous();
+ }
+ }
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AmmoniteUnresolvedLibrary.html b/original-plugin-raw/zh/inspectionDescriptions/AmmoniteUnresolvedLibrary.html
new file mode 100644
index 000000000..ff0dd7af5
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AmmoniteUnresolvedLibrary.html
@@ -0,0 +1,6 @@
+
+
+报告并帮助修正 Ammonite 脚本中未解析的 import。
+ + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AndroidDomInspection.html b/original-plugin-raw/zh/inspectionDescriptions/AndroidDomInspection.html new file mode 100644 index 000000000..57ad5ac1d --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AndroidDomInspection.html @@ -0,0 +1,3 @@ + + 验证 Android XML 文件内部的资源引用。 + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AndroidElementNotAllowed.html b/original-plugin-raw/zh/inspectionDescriptions/AndroidElementNotAllowed.html new file mode 100644 index 000000000..e8ab9aee5 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AndroidElementNotAllowed.html @@ -0,0 +1,5 @@ + + +此检查会高亮显示 Android 资源文件和 AndroidManifest.xml 中不允许使用的 XML 标记 + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AndroidMissingOnClickHandler.html b/original-plugin-raw/zh/inspectionDescriptions/AndroidMissingOnClickHandler.html new file mode 100644 index 000000000..cdf3c25da --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AndroidMissingOnClickHandler.html @@ -0,0 +1,6 @@ + + +检查在 onClick XML 特性中指定的方法是否已在相关活动中声明 + + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AndroidNonConstantResIdsInSwitch.html b/original-plugin-raw/zh/inspectionDescriptions/AndroidNonConstantResIdsInSwitch.html new file mode 100644 index 000000000..a07e53438 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AndroidNonConstantResIdsInSwitch.html @@ -0,0 +1,4 @@ + +验证在 Android 库模块的 switch 语句中使用资源 ID 的情况。WHERE id = ?
)的 Room SQL 查询。 Room 查询分析器不支持此做法,它需要已命名的查询形参(如 WHERE id = :id
),这些形参对应于使用 @Query
注解的方法的实参。
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AndroidUnknownAttribute.html b/original-plugin-raw/zh/inspectionDescriptions/AndroidUnknownAttribute.html
new file mode 100644
index 000000000..298ee85f2
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AndroidUnknownAttribute.html
@@ -0,0 +1,5 @@
+
+
+此检查会高亮显示 Android 资源文件和 AndroidManifest.xml 中的未知 XML 特性
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AndroidUnresolvableTag.html b/original-plugin-raw/zh/inspectionDescriptions/AndroidUnresolvableTag.html
new file mode 100644
index 000000000..2f942afbd
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AndroidUnresolvableTag.html
@@ -0,0 +1,20 @@
+
+
+
+此检查会高亮显示 Android 资源文件中无法解析的 XML 标记引用
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AndroidUnresolvedRoomSqlReference.html b/original-plugin-raw/zh/inspectionDescriptions/AndroidUnresolvedRoomSqlReference.html
new file mode 100644
index 000000000..3c5f83eb6
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AndroidUnresolvedRoomSqlReference.html
@@ -0,0 +1,5 @@
+
+
+检查 Room SQL 查询中是否有未解析的引用。
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AngularAmbiguousComponentTag.html b/original-plugin-raw/zh/inspectionDescriptions/AngularAmbiguousComponentTag.html
new file mode 100644
index 000000000..541e9d34d
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AngularAmbiguousComponentTag.html
@@ -0,0 +1,6 @@
+
+
+报告与嵌入的模板元素 <ng-template>
匹配的一个组件
+或与其他任何元素匹配的多个组件。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AngularCliAddDependency.html b/original-plugin-raw/zh/inspectionDescriptions/AngularCliAddDependency.html
new file mode 100644
index 000000000..d38cacc5f
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AngularCliAddDependency.html
@@ -0,0 +1,6 @@
+
+
+建议使用 ng add
命令安装依赖项。
+ng add
将使用软件包管理器进行下载,并调用原理图,该原理图可以通过配置更改、添加附加依赖项(例如 polyfills)或基架软件包特定的初始化代码来更新项目。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AngularInaccessibleComponentMemberInAotMode.html b/original-plugin-raw/zh/inspectionDescriptions/AngularInaccessibleComponentMemberInAotMode.html
new file mode 100644
index 000000000..7c72e63b4
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AngularInaccessibleComponentMemberInAotMode.html
@@ -0,0 +1,5 @@
+
+
template
和 templateUrl
属性的组件。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AngularInsecureBindingToEvent.html b/original-plugin-raw/zh/inspectionDescriptions/AngularInsecureBindingToEvent.html
new file mode 100644
index 000000000..c50b0bced
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AngularInsecureBindingToEvent.html
@@ -0,0 +1,7 @@
+
+
+报告与事件属性或特性的绑定,
+例如 [onclick]
或 [attr.onclick]
而不是
+(click)
。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AngularInvalidAnimationTriggerAssignment.html b/original-plugin-raw/zh/inspectionDescriptions/AngularInvalidAnimationTriggerAssignment.html
new file mode 100644
index 000000000..9fcd492c0
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AngularInvalidAnimationTriggerAssignment.html
@@ -0,0 +1,6 @@
+
+
+报告动画触发器的无效赋值。 要将动画附加到元素,请使用
+[@triggerName]="expression"
或不含 @triggerName
值的特性。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AngularInvalidEntryComponent.html b/original-plugin-raw/zh/inspectionDescriptions/AngularInvalidEntryComponent.html
new file mode 100644
index 000000000..dc9100f83
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AngularInvalidEntryComponent.html
@@ -0,0 +1,5 @@
+
+
+报告在模块的 bootstrap
或 entryComponents
属性中指定的无效 Angular 组件。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AngularInvalidI18nAttribute.html b/original-plugin-raw/zh/inspectionDescriptions/AngularInvalidI18nAttribute.html
new file mode 100644
index 000000000..fd59b353e
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AngularInvalidI18nAttribute.html
@@ -0,0 +1,5 @@
+
+
+报告 i18n-*
特性的问题。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AngularInvalidImportedOrDeclaredSymbol.html b/original-plugin-raw/zh/inspectionDescriptions/AngularInvalidImportedOrDeclaredSymbol.html
new file mode 100644
index 000000000..ecef3e380
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AngularInvalidImportedOrDeclaredSymbol.html
@@ -0,0 +1,5 @@
+
+
+报告由不是模块、组件、指令或管道或不能在属性上下文中使用的 Angular 模块所声明、导入或导出的任何符号。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AngularInvalidSelector.html b/original-plugin-raw/zh/inspectionDescriptions/AngularInvalidSelector.html
new file mode 100644
index 000000000..c15edb15b
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AngularInvalidSelector.html
@@ -0,0 +1,5 @@
+
+
+报告组件或指令的无效 selector
属性。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AngularInvalidTemplateReferenceVariable.html b/original-plugin-raw/zh/inspectionDescriptions/AngularInvalidTemplateReferenceVariable.html
new file mode 100644
index 000000000..835aa09e7
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AngularInvalidTemplateReferenceVariable.html
@@ -0,0 +1,5 @@
+
+
+报告在使用 exportAs
时未赋给一条指令或赋给多条指令的模板引用变量。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AngularMissingEventHandler.html b/original-plugin-raw/zh/inspectionDescriptions/AngularMissingEventHandler.html
new file mode 100644
index 000000000..017bbd301
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AngularMissingEventHandler.html
@@ -0,0 +1,5 @@
+
+
+报告事件绑定缺少的事件处理程序语句。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AngularMissingOrInvalidDeclarationInModule.html b/original-plugin-raw/zh/inspectionDescriptions/AngularMissingOrInvalidDeclarationInModule.html
new file mode 100644
index 000000000..85d64ea6a
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AngularMissingOrInvalidDeclarationInModule.html
@@ -0,0 +1,5 @@
+
+
+报告未在任何模块中声明或在多个模块中声明的 Angular 组件、指令或管道。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AngularMultipleStructuralDirectives.html b/original-plugin-raw/zh/inspectionDescriptions/AngularMultipleStructuralDirectives.html
new file mode 100644
index 000000000..e996fe67b
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AngularMultipleStructuralDirectives.html
@@ -0,0 +1,5 @@
+
+
+报告一个元素中的多条结构型指令(*ngIf
、*ngFor
等)。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AngularNonEmptyNgContent.html b/original-plugin-raw/zh/inspectionDescriptions/AngularNonEmptyNgContent.html
new file mode 100644
index 000000000..f5bc02686
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AngularNonEmptyNgContent.html
@@ -0,0 +1,5 @@
+
+
+报告用于内容投影的 <ng-content>
标记内出现的文本或标记。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AngularRecursiveModuleImportExport.html b/original-plugin-raw/zh/inspectionDescriptions/AngularRecursiveModuleImportExport.html
new file mode 100644
index 000000000..50ce6862d
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AngularRecursiveModuleImportExport.html
@@ -0,0 +1,5 @@
+
+
+报告 Angular 模块之间的循环依赖关系。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AngularUndefinedBinding.html b/original-plugin-raw/zh/inspectionDescriptions/AngularUndefinedBinding.html
new file mode 100644
index 000000000..f91c6557c
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AngularUndefinedBinding.html
@@ -0,0 +1,5 @@
+
+
+报告元素中未定义的属性、事件或结构型指令绑定。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AngularUndefinedModuleExport.html b/original-plugin-raw/zh/inspectionDescriptions/AngularUndefinedModuleExport.html
new file mode 100644
index 000000000..62994a631
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AngularUndefinedModuleExport.html
@@ -0,0 +1,5 @@
+
+
+报告从 Angular 模块导出的未声明或未导入的组件、指令或管道。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AngularUndefinedTag.html b/original-plugin-raw/zh/inspectionDescriptions/AngularUndefinedTag.html
new file mode 100644
index 000000000..ae2114ba5
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AngularUndefinedTag.html
@@ -0,0 +1,5 @@
+
+
+报告由超出当前范围的组件或指令定义的标记。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/Annotation.html b/original-plugin-raw/zh/inspectionDescriptions/Annotation.html
new file mode 100644
index 000000000..af37ae9c1
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/Annotation.html
@@ -0,0 +1,9 @@
+
+
+报告注解。
+Java 1.4 和更早版本的 JVM 不支持注解。
+
++ + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AnnotationClass.html b/original-plugin-raw/zh/inspectionDescriptions/AnnotationClass.html new file mode 100644 index 000000000..4bdfd94a4 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AnnotationClass.html @@ -0,0 +1,9 @@ + +
+报告注解接口。 +Java 1.4 和更早版本的 JVM 不支持此类接口。 + ++ + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/Annotator.html b/original-plugin-raw/zh/inspectionDescriptions/Annotator.html new file mode 100644 index 000000000..443b1c0cf --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/Annotator.html @@ -0,0 +1,5 @@ + +
+报告语言注解器在批处理代码检查运行结果中发现的问题。 + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AnnotatorBasedError.html b/original-plugin-raw/zh/inspectionDescriptions/AnnotatorBasedError.html new file mode 100644 index 000000000..407e26a15 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AnnotatorBasedError.html @@ -0,0 +1,6 @@ + + +报告所有存在错误的文件
+ + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/Anonymous2MethodRef.html b/original-plugin-raw/zh/inspectionDescriptions/Anonymous2MethodRef.html new file mode 100644 index 000000000..fd79cd84e --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/Anonymous2MethodRef.html @@ -0,0 +1,22 @@ + + +报告可以替换为方法引用的匿名类。 +
+ 请注意,如果将匿名类转换为未绑定的方法引用,则 Java 运行时可以在后续调用期间重用相同的方法引用对象。 另一方面,使用匿名类时,每次都会创建单独的对象。 因此,在极少数情况下,应用该快速修复可能会导致语义发生变化,例如,当匿名类实例用作 HashMap
键时。
+
示例:
+
+ Runnable r = new Runnable() {
+ @Override
+ public void run() {
+ System.out.println();
+ }
+ };
+
+该快速修复会将此代码更改为压缩形式:Runnable r = System.out::println;
。
使用在接口未使用 @FunctionalInterface 注解时报告选项可为未使用 @FunctionalInterface 注解的接口启用此检查。
+ +仅当项目或模块的语言级别为 8 或更高时,此检查才会报告。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AnonymousClassComplexity.html b/original-plugin-raw/zh/inspectionDescriptions/AnonymousClassComplexity.html new file mode 100644 index 000000000..c09711760 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AnonymousClassComplexity.html @@ -0,0 +1,9 @@ + + +报告总复杂度超过指定最大值的匿名内部类。 +类的总复杂度是该类声明的所有方法和初始值设定项的循环复杂度的总和。 继承的方法和初始值设定项不计入总复杂度。
+匿名类应该具有非常低的复杂度,否则它们会难以理解并且应提升为命名的内部类。
+ +使用循环复杂度限制字段可指定类允许的最大复杂度。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AnonymousClassMethodCount.html b/original-plugin-raw/zh/inspectionDescriptions/AnonymousClassMethodCount.html new file mode 100644 index 000000000..45adf0bf1 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AnonymousClassMethodCount.html @@ -0,0 +1,8 @@ + + +报告方法数超过指定最大值的匿名内部类。 +具有大量方法的匿名类可能难以理解,应该提升为命名内部类。
+ +使用方法计数限制字段可指定匿名内部类中允许的最大方法数。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AnonymousClassVariableHidesContainingMethodVariable.html b/original-plugin-raw/zh/inspectionDescriptions/AnonymousClassVariableHidesContainingMethodVariable.html new file mode 100644 index 000000000..965a42b98 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AnonymousClassVariableHidesContainingMethodVariable.html @@ -0,0 +1,23 @@ + + +报告匿名类中名称与包含方法或 lambda 表达式的局部变量或形参相同的字段。 ++ 由于进行此类命名,在包含方法中有意使用同名变量或形参的情况下,您可能会误用匿名类字段。 +
+建议通过快速修复重命名该字段。
+示例:
+
+ class Test {
+ public Test(String value) {
+ Object foo = new Object() {
+ private String value = "TEST";
+ public void foo() {
+ System.out.println(value); //访问的是字段,而不是形参
+ }
+ };
+ }
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AnonymousFunctionJS.html b/original-plugin-raw/zh/inspectionDescriptions/AnonymousFunctionJS.html
new file mode 100644
index 000000000..76c1f082e
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AnonymousFunctionJS.html
@@ -0,0 +1,7 @@
+
+
+报告匿名函数。 函数表达式的显式名称可能有助于调试。
+如果 ECMAScript 6 标准中指定了 name
属性,则忽略没有名称的函数表达式。
+例如,不会报告 var bar = function() {};
。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AnonymousHasLambdaAlternative.html b/original-plugin-raw/zh/inspectionDescriptions/AnonymousHasLambdaAlternative.html
new file mode 100644
index 000000000..a3456e508
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AnonymousHasLambdaAlternative.html
@@ -0,0 +1,26 @@
+
+
+报告可以转换为构造函数或带有 lambda 表达式实参的工厂方法调用的匿名类。
+本次检查报告以下类别: +
ThreadLocal
的匿名类,其具有 initialValue()
方法(可以替换为 ThreadLocal.withInitial
)Thread
的匿名类,其具有 run()
方法(可以替换为 new Thread(Runnable)
)示例:
+
+ new Thread() {
+ @Override
+ public void run() {
+ System.out.println("Hello from thread!");
+ }
+ }.start();
+
+在应用快速修复后:
+
+ new Thread(() -> {
+ System.out.println("Hello from thread!");
+ }).start();
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AnonymousInnerClass.html b/original-plugin-raw/zh/inspectionDescriptions/AnonymousInnerClass.html
new file mode 100644
index 000000000..e07f1e039
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AnonymousInnerClass.html
@@ -0,0 +1,8 @@
+
+
+报告匿名内部类。
+在某些情况下,将匿名内部类替换为内部类可以提高代码的可读性和可维护性。 + 另外,有些代码标准不建议使用匿名内部类。
+ + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AnonymousInnerClassMayBeStatic.html b/original-plugin-raw/zh/inspectionDescriptions/AnonymousInnerClassMayBeStatic.html new file mode 100644 index 000000000..1c48bd5ec --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AnonymousInnerClassMayBeStatic.html @@ -0,0 +1,34 @@ + + +报告可以安全地替换为static
内部类的匿名类。
+如果某个匿名类没有从周围方法显式引用其封闭实例或局部类,则它可能是 static
内部类。
+
+static
内部类不保留对其封闭实例的隐式引用。
+这可以防止常见的内存泄漏,并减少每个类实例使用的内存。
+
该快速修复会将匿名类提取到命名的 static
内部类中。
示例:
+
+ void sample(){
+ Thread thread = new Thread(new Runnable() {
+ @Override
+ public void run() {
+ }
+ });
+ }
+
+在应用快速修复后:
+
+ void sample() {
+ Thread thread = new Thread(new Task());
+ }
+
+ private static class Task implements Runnable {
+ @Override
+ public void run() {
+ }
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AntDuplicateTargetsInspection.html b/original-plugin-raw/zh/inspectionDescriptions/AntDuplicateTargetsInspection.html
new file mode 100644
index 000000000..e593e9713
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AntDuplicateTargetsInspection.html
@@ -0,0 +1,11 @@
+
+
+
+ 报告当前构建文件中的重复 targets 。
+ |
+
+ 报告缺失的 .properties 文件。 + | +
+ 报告无法解析的属性和自定义类型定义上的未解析引用。 + | +
不允许 Google App Engine Java 应用程序使用某些 API(例如 Thread 的类构造函数)并声明本机方法。 + + + diff --git a/original-plugin-raw/zh/inspectionDescriptions/AppEngineThreadsafeCGIHandlerInspection.html b/original-plugin-raw/zh/inspectionDescriptions/AppEngineThreadsafeCGIHandlerInspection.html new file mode 100644 index 000000000..0069daa9d --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AppEngineThreadsafeCGIHandlerInspection.html @@ -0,0 +1,5 @@ + +
+报告未通过 CGI 处理程序启用 threadsafe 的情况。
+ + diff --git a/original-plugin-raw/zh/inspectionDescriptions/AppEngineThreadsafeInspection.html b/original-plugin-raw/zh/inspectionDescriptions/AppEngineThreadsafeInspection.html new file mode 100644 index 000000000..54774dfd8 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AppEngineThreadsafeInspection.html @@ -0,0 +1,5 @@ + + +报告 threadsafe 不存在或未设置为yes
或 no
的情况。
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ApparentResultTypeRefinement.html b/original-plugin-raw/zh/inspectionDescriptions/ApparentResultTypeRefinement.html
new file mode 100644
index 000000000..10fa0446e
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ApparentResultTypeRefinement.html
@@ -0,0 +1,16 @@
+
+
+报告结果类型和函数体之间缺少 =
。
当用作函数的结果类型时,不能细化类型。
+ 但是,当结果类型和函数体之间缺少 =
时,它可能看起来很精致。
示例:
+
+ def test(): T {}
+
+在应用快速修复后
+
+ def test(): T = {}
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AppliedTypeLambdaCanBeSimplified.html b/original-plugin-raw/zh/inspectionDescriptions/AppliedTypeLambdaCanBeSimplified.html
new file mode 100644
index 000000000..62dd06022
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AppliedTypeLambdaCanBeSimplified.html
@@ -0,0 +1,13 @@
+
+报告可以简化的类型。
+示例:
+
+ def test: ({type l[a] = Either[String, a]})#l[Int] = ???
+
+在应用快速修复后:
+
+ def test: Either[String, Int] = ???
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AppropriateActorConstructorNotFound.html b/original-plugin-raw/zh/inspectionDescriptions/AppropriateActorConstructorNotFound.html
new file mode 100644
index 000000000..c6b5a5e94
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AppropriateActorConstructorNotFound.html
@@ -0,0 +1,12 @@
+
+
+报告缺少合适的 actor 构造函数的情况。
+示例:
+
+ import akka.actor._
+
+ Props(classOf[ActorImpl])
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ApproximateMatchIncorrectResolve.html b/original-plugin-raw/zh/inspectionDescriptions/ApproximateMatchIncorrectResolve.html
new file mode 100644
index 000000000..51a82447f
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ApproximateMatchIncorrectResolve.html
@@ -0,0 +1,7 @@
+
+
+检测大致正确的解析(大致正确解析表示 RM 解析和运行时解析 80% 匹配)。
+本检查仅用于测试。 并且需要包含有关正确解析信息的特殊文件。
+对于该检查,此文件必须位于此处:/tmp/ApproximateMatchIncorrectResolve.txt
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ArgNamesErrorsInspection.html b/original-plugin-raw/zh/inspectionDescriptions/ArgNamesErrorsInspection.html
new file mode 100644
index 000000000..c22baef58
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ArgNamesErrorsInspection.html
@@ -0,0 +1,5 @@
+
+
+如果 @AspectJ
argNames
特性值与实际方法形参名称不一致,则报告。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ArgNamesWarningsInspection.html b/original-plugin-raw/zh/inspectionDescriptions/ArgNamesWarningsInspection.html
new file mode 100644
index 000000000..107fe404a
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ArgNamesWarningsInspection.html
@@ -0,0 +1,6 @@
+
+
+如果未在 @AspectJ
注解中定义 argNames
特性,则报告。
+建议在 @AspectJ
注解中定义 argNames
特性,因为方法形参名称在运行时可能不可用。
示例:
+
+ const User* get_User(int64_t company_id, int64_t user_id) {
+ return new User{company_id, user_id, "foo"};
+ }
+
+ void call_User(int64_t company_id, int64_t user_id) {
+ const User* user = get_User(user_id, company_id); // 此处有潜在问题
+ //...
+ }
+
+
+使用下面的复选框可以检查名称少于三个符号的实参。
+ +2018.2 最新变化
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AroundAdviceStyleInspection.html b/original-plugin-raw/zh/inspectionDescriptions/AroundAdviceStyleInspection.html new file mode 100644 index 000000000..f653664d2 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AroundAdviceStyleInspection.html @@ -0,0 +1,14 @@ + + +在使用 @Around
建议时,请记住两点:
+
org.aspectj.lang.ProceedingJoinPoint#proceed
,否则调用将无法到达目标。java.lang.Object
),否则返回值永远不会到达原始调用方。不过,以下两种状况几乎始终表明存在编码错误:
+
@Around
方法的签名未使用 ProceedingJoinPoint
作为第一个实参:在这种情况下,调用无法到达目标。@Around
方法的签名未使用 Object
作为返回类型:在这种情况下,目标方法的返回值总是丢失。报告未准备好使用 Arquillian 进行测试的测试类。
+
+ 根据 Arquillian 文档,测试类应被注解为 @RunWith(Arquillian.class)
(对于 Arquillian 的 JUnit 版本)或从 org.jboss.arquillian.testng.Arquillian
类继承(对于 Arquillian 的 TestNG 版本)。
+
该快速修复要么声明测试类 abstract
,要么使其符合要求。
报告没有部署的 Arquillian 测试用例类。
+
+ 根据 Arquillian 文档,Arquillian 测试类应该使用具有特定签名的 public static 方法定义部署归档,并使用 @Deployment
注解。
+
该快速修复会根据用户可编辑的 Arquillian 部署方法代码模板添加所需方法。
+ +示例:
+
+ // 此测试用例无法被 Arquillian 启动
+ @RunWith(Arquillian.class)
+ public class SomeTest {
+ @Test
+ public void testSomething() {
+ Assert.fail("To be implemented");
+ }
+ }
+
+在应用快速修复后:
+
+ @RunWith(Arquillian.class)
+ public class SomeTest {
+ // 通过快速修复添加
+ @Deployment
+ public static JavaArchive ${DEPLOYMENT_NAME}() {
+ return ShrinkWrap.create(JavaArchive.class)
+ .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
+ }
+
+ @Test
+ public void testSomething() {
+ Assert.fail("To be implemented");
+ }
+ }
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ArquillianDeploymentReturnType.html b/original-plugin-raw/zh/inspectionDescriptions/ArquillianDeploymentReturnType.html
new file mode 100644
index 000000000..a46b10ca1
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ArquillianDeploymentReturnType.html
@@ -0,0 +1,42 @@
+
+
+报告使用 @Deployment
注解的方法的不正确返回类型。
+ 根据 Arquillian 文档,使用 @Deployment
注解的方法必须具有从 ShrinkWrap Archive 继承的返回类型。
+
示例:
+
+ // 此测试用例无法被 Arquillian 启动
+ @RunWith(Arquillian.class)
+ public class SomeTest {
+ @Deployment
+ public static ZipFile createDeployment() {
+ throw new UnsupportedOperationException("Implement me");
+ }
+
+ @Test
+ public void testSomething() {
+ Assert.fail("To be implemented");
+ }
+ }
+
+在应用快速修复后:
+
+ import org.jboss.shrinkwrap.api.Archive;
+
+ @RunWith(Arquillian.class)
+ public class SomeTest {
+ @Deployment
+ public static Archive createDeployment() {
+ throw new UnsupportedOperationException("Implement me");
+ }
+
+ @Test
+ public void testSomething() {
+ Assert.fail("To be implemented");
+ }
+ }
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ArquillianDeploymentSignature.html b/original-plugin-raw/zh/inspectionDescriptions/ArquillianDeploymentSignature.html
new file mode 100644
index 000000000..bb59b3fe6
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ArquillianDeploymentSignature.html
@@ -0,0 +1,40 @@
+
+
+报告使用 @Deployment
注解的方法的不正确签名。
+ 根据 Arquillian 文档,Arquillian 测试类应该使用具有特定签名的 public static 方法定义部署归档,并使用 @Deployment
注解。
+
示例:
+
+ //此测试用例无法被 Arquillian 启动,Deployment 方法不为 static
+ @RunWith(Arquillian.class)
+ public class SomeTest {
+ @Deployment
+ public JavaArchive createDeployment() {
+ throw new UnsupportedOperationException("Implement me");
+ }
+
+ @Test
+ public void testSomething() {
+ Assert.fail("To be implemented");
+ }
+ }
+
+在应用快速修复后:
+
+ @RunWith(Arquillian.class)
+ public class SomeTest {
+ @Deployment
+ public static JavaArchive createDeployment() {
+ throw new UnsupportedOperationException("Implement me");
+ }
+
+ @Test
+ public void testSomething() {
+ Assert.fail("To be implemented");
+ }
+ }
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ArquillianTooManyDeployment.html b/original-plugin-raw/zh/inspectionDescriptions/ArquillianTooManyDeployment.html
new file mode 100644
index 000000000..02a5b2dd9
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ArquillianTooManyDeployment.html
@@ -0,0 +1,8 @@
+
+
+报告定义多个部署的 Arquillian 测试用例类。
+
+ 根据 Arquillian 文档,Arquillian 测试类应使用具有特定签名的 public static 方法定义部署归档,并使用 @Deployment
注解。 每个测试用例应该有一个部署,计算测试用例超类中定义的方法。
+
EnumType.values()
调用的枚举常量数组。
+通常,在更新这样一个枚举时,您必须同时更新数组。 但是,如果您改用 EnumType.values()
,则无需修改。
示例:
+
+ enum States {
+ NOT_RUN, IN_PROGRESS, FINISHED;
+ }
+
+ handleStates(new States[] {NOT_RUN, IN_PROGRESS, FINISHED});
+
+在应用快速修复后:
+
+ handleStates(States.values());
+
+2019.1 最新变化
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ArrayCreationWithoutNewKeyword.html b/original-plugin-raw/zh/inspectionDescriptions/ArrayCreationWithoutNewKeyword.html new file mode 100644 index 000000000..607d38274 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ArrayCreationWithoutNewKeyword.html @@ -0,0 +1,13 @@ + + +报告没有new
数组表达式的数组初始化器并建议添加它们。
+示例:
+
+ int[] a = {42}
+
+在应用快速修复后:
+
+ int[] a = new int[]{42}
+
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ArrayEquality.html b/original-plugin-raw/zh/inspectionDescriptions/ArrayEquality.html
new file mode 100644
index 000000000..e9dca6f65
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ArrayEquality.html
@@ -0,0 +1,22 @@
+
+
+报告用于测试数组相等性的运算符 ==
和 !=
。
+在大多数情况下,如果原本就要测试数组内容的相等性,可以通过 java.util.Arrays.equals()
方法来完成。
+
+ 建议通过快速修复将 ==
替换为 java.util.Arrays.equals()
。
+
示例:
+
+ void foo(Object[] x, Object[] y) {
+ boolean comparison = x == y;
+ }
+
+在应用快速修复后:
+
+ void foo(Object[] x, Object[] y) {
+ boolean comparison = Arrays.equals(x, y);
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ArrayEquals.html b/original-plugin-raw/zh/inspectionDescriptions/ArrayEquals.html
new file mode 100644
index 000000000..34612ee69
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ArrayEquals.html
@@ -0,0 +1,20 @@
+
+
+报告可以比较两个数组的 equals()
调用。
+对数组调用 equals()
可以比较同一性,相当于使用 ==
。
+ 使用 Arrays.equals()
比较两个数组的内容,或使用 Arrays.deepEquals()
比较多维数组的内容。
示例:
+
+ void sample(int[] first, int[] second){
+ if (first.equals(second)) return;
+ }
+
+在应用快速修复后:
+
+ void sample(int[] first, int[] second){
+ if (Arrays.equals(first, second)) return;
+ }
+
+
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ArrayHashCode.html b/original-plugin-raw/zh/inspectionDescriptions/ArrayHashCode.html
new file mode 100644
index 000000000..8bd454762
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ArrayHashCode.html
@@ -0,0 +1,13 @@
+
+
+报告数组的不正确哈希代码计算。
+为正确计算数组的哈希代码,请执行以下操作:
+Arrays.hashcode()
Arrays.deepHashcode()
Objects.hash(string, Arrays.hashcode(array))
,这些方法还应与 Objects.hash()
一起使用:
+
++ + diff --git a/original-plugin-raw/zh/inspectionDescriptions/ArrayInDataClass.html b/original-plugin-raw/zh/inspectionDescriptions/ArrayInDataClass.html new file mode 100644 index 000000000..f859b133c --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ArrayInDataClass.html @@ -0,0 +1,33 @@ + +
+报告data
类中类型为 Array
但没有被重写的 equals()
或 hashCode()
的属性。
+
+ 数组形参通过引用相等进行了比较,这可能是一种意外行为。
+ 在此类情况下,强烈建议重写 equals()
和 hashCode()
。
+
示例:
+
+ data class Text(val lines: Array<String>)
+
+该快速修复会生成缺失的 equals()
和 hashCode()
实现:
+ data class Text(val lines: Array<String>) {
+ override fun equals(other: Any?): Boolean {
+ if (this === other) return true
+ if (javaClass != other?.javaClass) return false
+
+ other as Text
+
+ if (!lines.contentEquals(other.lines)) return false
+
+ return true
+ }
+
+ override fun hashCode(): Int {
+ return lines.contentHashCode()
+ }
+ }
+
+
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ArrayIssues.html b/original-plugin-raw/zh/inspectionDescriptions/ArrayIssues.html
new file mode 100644
index 000000000..7a88f63c8
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ArrayIssues.html
@@ -0,0 +1,5 @@
+
+
+报告不正确的数组用法。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ArrayLengthInLoopCondition.html b/original-plugin-raw/zh/inspectionDescriptions/ArrayLengthInLoopCondition.html
new file mode 100644
index 000000000..3d9852f6b
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ArrayLengthInLoopCondition.html
@@ -0,0 +1,16 @@
+
+
+报告对循环语句条件部分中数组的 .length
属性的访问。 在资源高度受限的环境中,此类调用可能会对性能产生不利影响。
++ 此检查适用于 Java ME 和其他资源高度受限的环境。 + 不加考虑地应用此检查的结果可能会对代码清晰度和设计产生负面影响。 +
+示例:
+
+ void foo(Object[] x) {
+ for (int i = 0; i < x.length; i++) { /**/ }
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ArrayObjectsEquals.html b/original-plugin-raw/zh/inspectionDescriptions/ArrayObjectsEquals.html
new file mode 100644
index 000000000..7229066f4
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ArrayObjectsEquals.html
@@ -0,0 +1,13 @@
+
+
+报告似乎使用不当方法来确定数组相等性或计算其哈希代码的表达式。
+报告的方法调用如下:
+Object.equals()
Arrays.equals()
Arrays.hashCode()
+ + diff --git a/original-plugin-raw/zh/inspectionDescriptions/ArraysAsListWithZeroOrOneArgument.html b/original-plugin-raw/zh/inspectionDescriptions/ArraysAsListWithZeroOrOneArgument.html new file mode 100644 index 000000000..1936197ff --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ArraysAsListWithZeroOrOneArgument.html @@ -0,0 +1,22 @@ + +
+报告对最多包含一个实参的Arrays.asList()
的调用。
+
+ 在 JDK 9 及更高版本中,此类调用可以替换为 Collections.singletonList()
、Collections.emptyList()
或 List.of()
,从而节省内存。
特别是,无实参的 Collections.emptyList()
和 List.of()
总是返回共享实例,而无实参的 Arrays.asList()
每次调用时都会创建一个新对象。
注意:Collections.singletonList()
和 List.of()
返回的列表不可变,而列表返回的 Arrays.asList()
允许调用 set()
方法。
+这在极少数情况下可能会破坏代码。
示例:
+
+ List<String> empty = Arrays.asList();
+ List<String> one = Arrays.asList("one");
+
+在应用快速修复后:
+
+ List<String> empty = Collections.emptyList();
+ List<String> one = Collections.singletonList("one");
+
+
++ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AssertBetweenInconvertibleTypes.html b/original-plugin-raw/zh/inspectionDescriptions/AssertBetweenInconvertibleTypes.html new file mode 100644 index 000000000..c0eba4485 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AssertBetweenInconvertibleTypes.html @@ -0,0 +1,15 @@ + +
+报告“预期”实参和“实际”实参的类型不兼容时对断言方法的调用。 +此类调用通常表明测试中存在错误。 + 该检查会检查相关的 JUnit、TestNG 和 AssertJ 方法。
+示例:
+
+ assertEquals("1", 1);
+ assertNotSame(new int[0], 0);
+
+ // 弱警告,可能只测试 equals() 约定
+ assertThat(foo).as("user type").isNotEqualTo(bar);
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AssertEqualsCalledOnArray.html b/original-plugin-raw/zh/inspectionDescriptions/AssertEqualsCalledOnArray.html
new file mode 100644
index 000000000..2dc821cf7
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AssertEqualsCalledOnArray.html
@@ -0,0 +1,27 @@
+
+
+报告带有数组类型实参的 JUnit assertEquals()
调用。
+此类方法会比较数组的标识,而不是数组的内容。
+应使用 assertArrayEquals()
方法检查数组内容。
+示例:
+
+ @Test
+ public void testSort() {
+ int[] actual = {248, 496, 0, 56};
+ Arrays.sort(actual);
+ Assert.assertEquals(new int[] {0, 56, 248, 496}, actual);
+ }
+
+在应用快速修复后:
+
+ @Test
+ public void testSort() {
+ int[] actual = {248, 496, 0, 56};
+ Arrays.sort(actual);
+ Assert.assertArrayEquals(new int[] {0, 56, 248, 496}, actual);
+ }
+
+
++ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AssertEqualsMayBeAssertSame.html b/original-plugin-raw/zh/inspectionDescriptions/AssertEqualsMayBeAssertSame.html new file mode 100644 index 000000000..46decb32f --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AssertEqualsMayBeAssertSame.html @@ -0,0 +1,24 @@ + +
+报告可以替换为等效assertSame()
调用的 JUnit assertEquals()
调用。
+当实参是不重写 Object.equals()
方法并显式比较对象标识的 final
类的实例时,可能发生这种情况。
+建议将 assertEquals()
替换为 assertSame()
。
示例:
+
+ @Test
+ public void testObjectType() {
+ Object o = getObject();
+ Assert.assertEquals(String.class, o.getClass());
+ }
+
+在应用快速修复后:
+
+ @Test
+ public void testSort() {
+ Object o = getObject();
+ Assert.assertSame(String.class, o.getClass());
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AssertMessageNotString.html b/original-plugin-raw/zh/inspectionDescriptions/AssertMessageNotString.html
new file mode 100644
index 000000000..4f0a26857
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AssertMessageNotString.html
@@ -0,0 +1,16 @@
+
+
+报告非 java.lang.String
类型的 assert
消息。
+使用字符串可以提供更多信息,有助于诊断失败或断言原因。
+示例:
+
+ void foo(List<Integer> myList) {
+ assert myList.isEmpty() : false;
+ }
+
+
+
+使用仅当 assert
消息为 'boolean' 或 'java.lang.Boolean' 时发出警告选项可以仅在 assert
消息类型为 boolean
或 java.lang.Boolean
时发出警告。
+boolean
详细消息不太可能提供有关断言失败的其他信息,可能是由于错误输入 :
而不是 &
所致。
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AssertStatement.html b/original-plugin-raw/zh/inspectionDescriptions/AssertStatement.html
new file mode 100644
index 000000000..5488f43af
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AssertStatement.html
@@ -0,0 +1,9 @@
+
+
assert
语句。 默认情况下,在生产环境中执行期间禁用 assert
语句。 可以考虑改用记录器或异常。
+Java 1.3 和更早版本的 JVM 不支持 assert
语句。
+ + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AssertWithSideEffects.html b/original-plugin-raw/zh/inspectionDescriptions/AssertWithSideEffects.html new file mode 100644 index 000000000..7c9a24a77 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AssertWithSideEffects.html @@ -0,0 +1,11 @@ + +
+报告导致副作用的assert
语句。
++ 由于断言可能关闭,无法保证这些副作用,这可能导致难以捉摸的错误。 此检查检测到的不受欢迎的常见副作用是变量和字段修改。 涉及到方法调用时,将对它们进行一级深入分析。
+示例:
+
+ assert i++ < 10;
+
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AssertWithoutMessage.html b/original-plugin-raw/zh/inspectionDescriptions/AssertWithoutMessage.html
new file mode 100644
index 000000000..89b3f5984
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AssertWithoutMessage.html
@@ -0,0 +1,17 @@
+
+
+报告对没有错误消息字符串实参的 assertXXX()
或 fail()
的调用。
+有关断言失败的错误消息可能有助于澄清测试用例的意图。
+示例:
+
+ assertTrue(checkValid());
+
+在应用快速修复后:
+assertTrue(checkValid(), "|");
++ 消息实参根据所使用的断言框架添加到现有实参前面或后面。 +
+ + + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AssertionCanBeIf.html b/original-plugin-raw/zh/inspectionDescriptions/AssertionCanBeIf.html new file mode 100644 index 000000000..b5a4fb44a --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AssertionCanBeIf.html @@ -0,0 +1,15 @@ + + +报告assert
语句并建议将它们替换为抛出 java.lang.AssertionError
的 if
语句。
+示例:
+
+ assert param != null;
+
+在应用快速修复后:
+
+ if (param == null) throw new AssertionError();
+
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AssignmentOrReturnOfFieldWithMutableType.html b/original-plugin-raw/zh/inspectionDescriptions/AssignmentOrReturnOfFieldWithMutableType.html
new file mode 100644
index 000000000..6b2d9c4b0
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AssignmentOrReturnOfFieldWithMutableType.html
@@ -0,0 +1,42 @@
+
+
+报告从方法形参到数组或可变类型(如 Collection
、Date
、Map
、Calendar
等)的返回或赋值
+由于这种类型是可变的,此结构可能会导致来自所属类之外的对象状态发生意外修改。 尽管出于性能原因,此结构可能很有用,但它本质上很容易出现错误。
+报告了以下可变类型:
+java.util.Date
java.util.Calendar
java.util.Collection
java.util.Map
com.google.common.collect.Multimap
com.google.common.collect.Table
该快速修复会添加对字段的 .clone()
方法的调用。
示例:
+
+ class Log {
+ String[] messages;
+ ...
+
+ String[] getMessages() {
+ return messages; // 警告:返回 String[] 字段 'messages'
+ }
+ }
+
+在应用快速修复后:
+
+ class Log {
+ String[] messages;
+ ...
+
+ String[] getMessages() {
+ return messages.clone();
+ }
+ }
+
+
+使用忽略 private 方法中的赋值和返回值选项可忽略 private
方法中的赋值和返回值。
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AssignmentResultUsedJS.html b/original-plugin-raw/zh/inspectionDescriptions/AssignmentResultUsedJS.html
new file mode 100644
index 000000000..22149f303
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AssignmentResultUsedJS.html
@@ -0,0 +1,8 @@
+
+
=
而不是 ==
。
+此外,它们可能会由于运算顺序而导致混淆,
+因为赋值的求值可能会以意想不到的方式影响外部表达式。
+将忽略圆括号中的表达式。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AssignmentToCatchBlockParameter.html b/original-plugin-raw/zh/inspectionDescriptions/AssignmentToCatchBlockParameter.html new file mode 100644 index 000000000..4cfcad5c0 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AssignmentToCatchBlockParameter.html @@ -0,0 +1,37 @@ + + +报告对catch
块形参的赋值。
+更改 catch
块形参很容易令人困惑,不建议使用。
该快速修复会添加新变量的声明。
+示例:
+
+ void processFile(String fileName) throws Exception {
+ try {
+ doProcessFile(fileName);
+ } catch(Exception ex) {
+ if (ex instanceof UncheckedIOException) {
+ // Warning: catch block parameter reassigned
+ ex = ((UncheckedIOException) ex).getCause();
+ }
+ throw ex;
+ }
+ }
+
+在应用快速修复后:
+
+ void processFile(String fileName) throws Exception {
+ try {
+ doProcessFile(fileName);
+ } catch(Exception ex) {
+ Exception unwrapped = ex;
+ if (unwrapped instanceof UncheckedIOException) {
+ unwrapped = ((UncheckedIOException)
+ unwrapped).getCause();
+ }
+ throw unwrapped;
+ }
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AssignmentToForLoopParameter.html b/original-plugin-raw/zh/inspectionDescriptions/AssignmentToForLoopParameter.html
new file mode 100644
index 000000000..9fc7e6e11
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AssignmentToForLoopParameter.html
@@ -0,0 +1,38 @@
+
+
+报告对循环体内 for
循环形参的赋值或修改。
+虽然偶尔是有意为之,但此结构可能令人困惑,通常是由拼写错误或使用错误变量引起。
+该快速修复会添加新变量的声明。
+示例:
+
+ for (String s : list) {
+ // 警告:s 在循环内被更改
+ s = s.trim();
+ System.out.println("String: " + s);
+ }
+
+在应用快速修复后:
+
+ for (String s : list) {
+ String trimmed = s.trim();
+ System.out.println("String: " + trimmed);
+ }
+
+不报告没有 update 语句的基本 for
循环中的赋值。
+ 在此类情况下,赋值很可能是预期的,不能轻易移动到 for
循环的更新部分。
示例:
+
+ for (int i = 0; i < list.size(); ) {
+ if (element.equals(list.get(i))) {
+ list.remove(i);
+ } else {
+ // 因为没有 update 语句
+ // 所以不报告 for 循环形参的修改
+ i++;
+ }
+ }
+
+
+使用检查增强型 'for' 循环形参选项可指定是否还应报告增强的 for
循环形参的修改。
for
循环形参的变量的赋值。
+虽然偶尔是有意为之,但此结构可能格外令人困惑,并且通常是由错误所致。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AssignmentToFunctionParameterJS.html b/original-plugin-raw/zh/inspectionDescriptions/AssignmentToFunctionParameterJS.html
new file mode 100644
index 000000000..ba0733ea0
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AssignmentToFunctionParameterJS.html
@@ -0,0 +1,6 @@
+
+
+报告对函数形参的赋值,包括递增和递减运算。
+虽然偶尔是有意为之,但此结构可能格外令人困惑,并且通常是由错误所致。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AssignmentToLambdaParameter.html b/original-plugin-raw/zh/inspectionDescriptions/AssignmentToLambdaParameter.html
new file mode 100644
index 000000000..dfb3886a8
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AssignmentToLambdaParameter.html
@@ -0,0 +1,23 @@
+
+
+报告对 lambda 形参的赋值或修改。
+虽然偶尔是有意为之,但此结构可能令人困惑,通常是由拼写错误或使用错误变量所致。
+该快速修复会添加新变量的声明。
+示例:
+
+ list.forEach(s -> {
+ s = s.trim();
+ System.out.println("String: " + s);
+ });
+
+在应用快速修复后:
+
+ list.forEach(s -> {
+ String trimmed = s.trim();
+ System.out.println("String: " + trimmed);
+ });
+
+
+使用如果赋值是原始形参的转换,则忽略选项可以忽略根据先前值修改形参值的赋值。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AssignmentToMethodParameter.html b/original-plugin-raw/zh/inspectionDescriptions/AssignmentToMethodParameter.html new file mode 100644 index 000000000..de87544be --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AssignmentToMethodParameter.html @@ -0,0 +1,25 @@ + + +报告对方法形参的赋值或修改。 +虽然有时是有意为之,但此结构可能令人困惑,因此在一些 Java 项目中被禁止使用。
+该快速修复会添加新变量的声明。
+示例:
+
+ void printTrimmed(String s) {
+ s = s.trim();
+ System.out.println(s);
+ }
+
+在应用快速修复后:
+
+ void printTrimmed(String s) {
+ String trimmed = s.trim();
+ System.out.println(trimmed);
+ }
+
+
++ 使用如果赋值是原始形参的转换,则忽略选项可忽略根据先前值修改形参值的赋值。 +
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AssignmentToNull.html b/original-plugin-raw/zh/inspectionDescriptions/AssignmentToNull.html new file mode 100644 index 000000000..86fdf8128 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AssignmentToNull.html @@ -0,0 +1,25 @@ + + +报告在声明外被赋值给null
的变量。
+Java 中 null
的主要用途是表示未初始化的引用变量。 在极少数情况下,将变量显式赋值给 null
有助于垃圾回收。 但是,使用 null
来表示缺失、未指定、无效值或找不到的元素被认为是一种不好的做法,可能会使您的代码更容易出现 NullPointerExceptions
。
+ 请改为考虑定义具有预期语义的 sentinel 对象或使用像 Optional
这样的库类型来表示没有值。
示例:
+
+ Integer convert(String s) {
+ Integer value;
+ try {
+ value = Integer.parseInt(s);
+ } catch (NumberFormatException e) {
+ // 警告:null 用于表示“无效值”
+ value = null;
+ }
+ return value;
+ }
+
+
++使用忽略对字段的赋值选项可忽略对字段的赋值。 +
+ + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AssignmentToStaticFieldFromInstanceMethod.html b/original-plugin-raw/zh/inspectionDescriptions/AssignmentToStaticFieldFromInstanceMethod.html new file mode 100644 index 000000000..242ff6c69 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AssignmentToStaticFieldFromInstanceMethod.html @@ -0,0 +1,19 @@ + + +报告对实例方法中static
字段的赋值或修改。
+虽然合法,但此类赋值很难安全完成,并且通常是无意中将字段标记为 static
的结果。
示例:
+
+ class Counter {
+ private static int count = 0;
+
+ void increment() {
+ // 警告:从实例方法
+ // 更新 static 字段
+ count++;
+ }
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AssignmentToSuperclassField.html b/original-plugin-raw/zh/inspectionDescriptions/AssignmentToSuperclassField.html
new file mode 100644
index 000000000..3f4a93746
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AssignmentToSuperclassField.html
@@ -0,0 +1,34 @@
+
+
+报告对超类中从子类构造函数中声明的字段的赋值或修改。
+最好在其自己的构造函数中初始化超类的字段,并在子类中委托给该构造函数。 如果它在构造后没有改变,这还将允许声明一个字段 final
。
示例:
+
+ class Super {
+ int x;
+ }
+ class Sub extends Super {
+ Sub(int _x) {
+ // Warning: x is declared in a superclass
+ x = _x;
+ }
+ }
+
+要避免此问题,请声明超类构造函数:
+
+ class Super {
+ final int x;
+
+ Super(int _x) {
+ x = _x;
+ }
+ }
+ class Sub extends Super {
+ Sub(int _x) {
+ super(_x);
+ }
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AssignmentUsedAsCondition.html b/original-plugin-raw/zh/inspectionDescriptions/AssignmentUsedAsCondition.html
new file mode 100644
index 000000000..2741e3fc6
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AssignmentUsedAsCondition.html
@@ -0,0 +1,27 @@
+
+
+报告用作 if
、while
、for
或
+do
语句或条件表达式的赋值。
+虽然有时是有意为之,但这种用法令人困惑,并且可能表明存在拼写错误(例如,应使用 =
而不是 ==
)。
该快速修复会将 =
替换为 ==
。
示例:
+
+ void update(String str, boolean empty) {
+ // 警告:'empty' 被重新赋值,
+ // 不与 str.isEmpty() 进行比较
+ if (empty = str.isEmpty()) {
+ ...
+ }
+ }
+
+在应用快速修复后:
+
+ void update(String str, boolean empty) {
+ if (empty == str.isEmpty()) {
+ ...
+ }
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AssociatedTypeMismatch.html b/original-plugin-raw/zh/inspectionDescriptions/AssociatedTypeMismatch.html
new file mode 100644
index 000000000..e3d090697
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AssociatedTypeMismatch.html
@@ -0,0 +1,6 @@
+
+
+ 报告在其接口和实现中具有不同返回类型或形参类型的方法。
+ 它还会报告采用/返回的类型与对应属性类型不同的 setter 和 getter。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AsyncMethodInspection.html b/original-plugin-raw/zh/inspectionDescriptions/AsyncMethodInspection.html
new file mode 100644
index 000000000..0bf55653f
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AsyncMethodInspection.html
@@ -0,0 +1,10 @@
+
+
+报告 @Async 方法的不正确返回类型。
+ +对于目标方法签名,允许任何形参类型。
+ 但是,返回类型应该是 void
或 Future。
+ 还可以返回更具体的 ListenableFuture 或 CompletableFuture 类型,它们允许与异步任务进行更丰富的交互,并允许与进一步处理步骤立即组合。
AtomicLongFieldUpdater
、AtomicIntegerFieldUpdater
或 AtomicReferenceFieldUpdater
字段(java.util.concurrent.atomic
软件包)的问题。
+报告的问题与原子字段更新程序可能发生的运行时问题相同:找不到指定字段、指定字段不可访问、指定字段类型错误等。
+示例:
+
+ class A {
+ private static volatile int value = 0;
+ private static final AtomicIntegerFieldUpdater updater =
+ AtomicIntegerFieldUpdater.newUpdater((A.class), "value"); // 警告:字段 'value' 具有 'static' 修饰符
+ }
+
+ class B {
+ private static final AtomicIntegerFieldUpdater updater =
+ AtomicIntegerFieldUpdater.newUpdater(B.class, "value"); // 警告:在类 'B' 中找不到名为 'Value' 的字段
+ }
+
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AtomicFieldUpdaterNotStaticFinal.html b/original-plugin-raw/zh/inspectionDescriptions/AtomicFieldUpdaterNotStaticFinal.html new file mode 100644 index 000000000..40dad34b8 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AtomicFieldUpdaterNotStaticFinal.html @@ -0,0 +1,30 @@ + +
+报告以下类型的字段: +java.util.concurrent.atomic.AtomicLongFieldUpdater
java.util.concurrent.atomic.AtomicIntegerFieldUpdater
java.util.concurrent.atomic.AtomicReferenceFieldUpdater
static final
。
+因为在一个类的所有实例中,只需要一个原子字段更新程序来更新 volatile
字段,所以它几乎总是 static
。
+
+使更新程序为 final
,JVM 就能优化访问以提高性能。
示例:
+
+ class Main {
+ private volatile int id;
+ private AtomicIntegerFieldUpdater<Main> idFieldUpdater = AtomicIntegerFieldUpdater.newUpdater(Main.class, "id");
+ }
+
+在应用快速修复后:
+
+ class Main {
+ private volatile int id;
+ private static final AtomicIntegerFieldUpdater<Main> idFieldUpdater = AtomicIntegerFieldUpdater.newUpdater(Main.class, "id");
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AutoBoxing.html b/original-plugin-raw/zh/inspectionDescriptions/AutoBoxing.html
new file mode 100644
index 000000000..38b1a8b29
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AutoBoxing.html
@@ -0,0 +1,12 @@
+
+
+报告受自动装箱转换(将基元值自动包装为对象)影响的表达式。
+尽量不使用对象,而是使用基元。 它可能会显著影响性能。
+示例:
+Integer x = 42;
+该快速修复会将转换设为显式:
+Integer x = Integer.valueOf(42);
+
+Java 1.4 和更早版本的 JVM 不支持自动装箱转换。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AutoCloseableResource.html b/original-plugin-raw/zh/inspectionDescriptions/AutoCloseableResource.html new file mode 100644 index 000000000..88c8b9e13 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AutoCloseableResource.html @@ -0,0 +1,47 @@ + + +报告未在 try-with-resources 语句中使用的AutoCloseable
实例,也称 自动资源管理。
+
+ 这意味着还报告在 try-with-resources 可用前使用的“在 try
前面/中打开资源,在 finally
中关闭资源”的样式。
+ 在 Java 7 及更高版本中开发时,此检查意在取代所有已打开但未安全关闭的检查。
+
示例:
+
+ private static void foo() throws IOException {
+ InputStream profile = Thread.currentThread().getContextClassLoader().getResourceAsStream("/someFile");
+ System.out.println(profile.read());
+ }
+
+
++ 使用以下选项配置检查: +
+AutoCloseable
的子类。
+ java.util.stream.Stream
,该检查仍将报告从 java.nio.file.Files
方法 lines()
、walk()
、list()
以及 find()
返回的流。
+ 这些流包含需要关闭的关联 I/O 资源。
+ AutoCloseable
的方法。
+ AutoCloseable
。
+ 启用此选项时,工厂方法的结果也将被忽略。
+ AutoCloseable
实例作为方法调用实参传递时,该检查是否应报告。
+ 如果启用此选项,该检查将假定所调用方法中的资源已关闭。
+ 不会忽略名称中含有 'close' 的 finally
块和 AutoCloseable
实参中的方法调用。
+ 报告可以转换为元组的逗号分隔实参。
+如果没有合适的多实参方法但有一个合适的单实参方法,Scala 编译器会尝试将逗号分隔的实参转换为元组。 这种转换可能会破坏类型安全并导致意外结果。
+示例:
+
+ def foo(a: Any) = {}
+ foo(1, 2)
+
+在应用快速修复后:
+
+ def foo(a: Any) = {}
+ foo((1, 2))
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AutoUnboxing.html b/original-plugin-raw/zh/inspectionDescriptions/AutoUnboxing.html
new file mode 100644
index 000000000..e5cd20ed5
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AutoUnboxing.html
@@ -0,0 +1,13 @@
+
+
+报告受拆箱转换(自动将对象解开为基元值)影响的表达式。
+尽量不使用对象,而是使用基元。 它可能会显著影响性能。
+示例:
+int x = new Integer(42);
+该快速修复会将转换设为显式:
+int x = new Integer(42).intValue();
+
+Java 1.4 和更早版本的 JVM 不支持自动装箱转换。
+ + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/AwaitNotInLoop.html b/original-plugin-raw/zh/inspectionDescriptions/AwaitNotInLoop.html new file mode 100644 index 000000000..f9db4fcf4 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/AwaitNotInLoop.html @@ -0,0 +1,25 @@ + + +报告没有在循环中调用的java.util.concurrent.locks.Condition.await()
。
+
+ await()
和相关方法通常用于挂起线程,直到某个条件变为 true 为止。
+ 线程可能出于不同原因而被唤醒,因此应在 await()
调用返回后检查条件。
+ 使用循环很容易做到这一点。
+
示例:
+
+ void acquire(Condition released) throws InterruptedException {
+ released.await();
+ }
+
+优良的代码应类似于:
+
+ void acquire(Condition released) throws InterruptedException {
+ while (acquired) {
+ released.await();
+ }
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/AwaitWithoutCorrespondingSignal.html b/original-plugin-raw/zh/inspectionDescriptions/AwaitWithoutCorrespondingSignal.html
new file mode 100644
index 000000000..9be9fa72f
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/AwaitWithoutCorrespondingSignal.html
@@ -0,0 +1,29 @@
+
+
+报告对无法为之找到相应 Condition.signal()
或 Condition.signalAll()
调用的 Condition.await()
的调用。
+
+ 在没有相应 Condition.signal()
的线程中调用 Condition.await()
可能导致该线程被禁用,直到它被中断或发生“可疑唤醒”为止。
+
此检查仅报告以当前类的目标字段为目标的调用。
+示例:
+
+ class Queue {
+ private final Condition isEmpty = ...;
+
+ void add(Object elem) {
+ // ...
+ // isEmpty.signal();
+ // ...
+ }
+
+ void remove(Object elem) throws InterruptedException {
+ // ...
+ isEmpty.await(); // 'await()' 不包含相应的 'signal()'/'signalAll()' 调用
+ // ...
+ }
+ }
+
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/BadExceptionCaught.html b/original-plugin-raw/zh/inspectionDescriptions/BadExceptionCaught.html
new file mode 100644
index 000000000..92a7b6dad
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/BadExceptionCaught.html
@@ -0,0 +1,16 @@
+
+
+报告捕获不适当异常的 catch
子句。
+一些异常(例如 java.lang.NullPointerException
或 java.lang.IllegalMonitorStateException
)表示编程错误,因此几乎肯定不会在生产代码中被捕获。
+
示例:
+
+ try {
+ return component.getMousePosition(true) != null;
+ } catch (NullPointerException e) { // warning: Prohibited exception 'NullPointerException' caught
+ return false;
+ }
+
+
+使用被禁止的异常列表可指定应报告哪些异常。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/BadExceptionDeclared.html b/original-plugin-raw/zh/inspectionDescriptions/BadExceptionDeclared.html new file mode 100644 index 000000000..9cf19c599 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/BadExceptionDeclared.html @@ -0,0 +1,16 @@ + +
+报告在其throws
子句中声明不适当异常的方法。
+例如,异常可能因为过于通用而不适当,例如 java.lang.Exception
或 java.lang.Throwable
。
+示例:
+
+ void describeModule(String module) throws Exception {} // 警告:声明了禁止的异常 'Exception'
+
+
+配置检查:
+throw
语句。
+例如,异常可能因为过于通用而不适当,例如 java.lang.Exception
或 java.io.IOException
。
+示例:
+
+ void setup(Mode mode) {
+ if (mode == null)
+ throw new RuntimeException("Problem during setup"); // 警告:抛出了禁止的异常 'RuntimeException'
+ ...
+ }
+
+
+使用被禁止的异常列表可指定应报告哪些异常。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/BadExpressionStatementJS.html b/original-plugin-raw/zh/inspectionDescriptions/BadExpressionStatementJS.html new file mode 100644 index 000000000..090500c88 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/BadExpressionStatementJS.html @@ -0,0 +1,6 @@ + +
+报告既非赋值也非调用的表达式语句。 +此类语句通常表明有错误。 + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/BadOddness.html b/original-plugin-raw/zh/inspectionDescriptions/BadOddness.html new file mode 100644 index 000000000..703ee30b0 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/BadOddness.html @@ -0,0 +1,9 @@ + + +报告以下形式的奇偶校验:x % 2 == 1
。
+当与负奇数一起使用时,此类检查将会失败。
+请考虑改用 x % 2 != 0
或 (x & 1) == 1
。
+
++ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/BatchJobDomInspection.html b/original-plugin-raw/zh/inspectionDescriptions/BatchJobDomInspection.html new file mode 100644 index 000000000..50d1e2425 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/BatchJobDomInspection.html @@ -0,0 +1,5 @@ + +
+报告通用批处理作业文件解析错误。
+ + diff --git a/original-plugin-raw/zh/inspectionDescriptions/BatchXmlDomInspection.html b/original-plugin-raw/zh/inspectionDescriptions/BatchXmlDomInspection.html new file mode 100644 index 000000000..e3e7cc73b --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/BatchXmlDomInspection.html @@ -0,0 +1,5 @@ + + +报告一般 batch.xml
配置解析错误。
public
和 static
、不返回 void
或接受实参的 JUnit 4.0 @BeforeClass
或 @AfterClass
方法。
+此类方法很容易无意间创建,但是 JUnit 测试运行程序不会执行这些方法。
+示例:
+
+ public class MainTest {
+ @BeforeClass
+ String beforeClass(int i) {
+ }
+ }
+
+应用快速修复后,该方法变为:
+
+ class MainTest {
+ @BeforeClass
+ public static void beforeClass() {
+ }
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/BeforeOrAfterIsPublicVoidNoArg.html b/original-plugin-raw/zh/inspectionDescriptions/BeforeOrAfterIsPublicVoidNoArg.html
new file mode 100644
index 000000000..1436a543d
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/BeforeOrAfterIsPublicVoidNoArg.html
@@ -0,0 +1,14 @@
+
+
+报告未被声明为 public
、不返回 void
或接受实参的 JUnit 4 @Before
或 @After
方法。 此类方法很容易无意间创建,但是 JUnit 测试运行程序不会执行这些方法。
+该检查会为方法签名提供修正。
+示例:
+
+ @Before private int foo(int arg) { ... }
+
+在应用快速修复后:
+
+ @Before public void foo() { ... }
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/BigDecimalEquals.html b/original-plugin-raw/zh/inspectionDescriptions/BigDecimalEquals.html
new file mode 100644
index 000000000..8e8c6f86c
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/BigDecimalEquals.html
@@ -0,0 +1,11 @@
+
+
+报告 .equals()
被调用以比较两个 java.math.BigDecimal
数字的情况。
+这通常会是错误,因为两个 java.math.BigDecimal
数字只有在值和比例上都相等时才相等。
示例:
+if (new BigDecimal("2.0").equals(new BigDecimal("2.00"))) {}
+在应用快速修复后:
+if (new BigDecimal("2.0").compareTo(new BigDecimal("2.00")) == 0) {}
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/BigDecimalLegacyMethod.html b/original-plugin-raw/zh/inspectionDescriptions/BigDecimalLegacyMethod.html
new file mode 100644
index 000000000..198cdb28c
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/BigDecimalLegacyMethod.html
@@ -0,0 +1,12 @@
+
+
+报告对使用整数常量指定舍入模式的 BigDecimal.divide()
或 BigDecimal.setScale()
的调用。
+自 JDK 1.5 起,可以考虑使用接受 RoundingMode
enum
形参的方法。
+示例:
+new BigDecimal("42").setScale(2, BigDecimal.ROUND_FLOOR);
+在应用快速修复后:
+new BigDecimal("42").setScale(2, RoundingMode.FLOOR);
+
++ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/BigDecimalMethodWithoutRoundingCalled.html b/original-plugin-raw/zh/inspectionDescriptions/BigDecimalMethodWithoutRoundingCalled.html new file mode 100644 index 000000000..2709fba91 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/BigDecimalMethodWithoutRoundingCalled.html @@ -0,0 +1,12 @@ + +
+报告对没有舍入模式实参的divide()
或 setScale()
的调用。
+在结果中不能表示精确值时(例如由于具有非终止十进制扩展),此类调用可能导致 ArithmeticException
。
指定舍入模式可防止 ArithmeticException
。
示例:
+
+ BigDecimal.valueOf(1).divide(BigDecimal.valueOf(3));
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/BindingAnnotationWithoutInject.html b/original-plugin-raw/zh/inspectionDescriptions/BindingAnnotationWithoutInject.html
new file mode 100644
index 000000000..83178467a
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/BindingAnnotationWithoutInject.html
@@ -0,0 +1,8 @@
+
+
+
+ 报告没有匹配的 @Inject
注解的字段和形参上的绑定注解。
+ Guice 会忽略此类注解。
+
检测 Gradle 插件 com.jfrog.bintray
的用法。
+ 该插件用于将构建结果发布到 Bintray。
+ 发布到 Bintray 服务已禁用。
+
@show
、@stop
或 @overwrite
指令结束的 @section
指令。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/BladeControlDirectives.html b/original-plugin-raw/zh/inspectionDescriptions/BladeControlDirectives.html
new file mode 100644
index 000000000..457c32c7e
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/BladeControlDirectives.html
@@ -0,0 +1,8 @@
+
+
+ 报告未通过相应 @end...
指令结束的 Blade 控制指令。
+ + 有关详细信息,请参阅 Blade 指令 (laravel.com) 。 +
+ + diff --git a/original-plugin-raw/zh/inspectionDescriptions/BlockMarkerComments.html b/original-plugin-raw/zh/inspectionDescriptions/BlockMarkerComments.html new file mode 100644 index 000000000..1e7c5b324 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/BlockMarkerComments.html @@ -0,0 +1,19 @@ + + +报告用作代码块标记的注释。 +该快速修复会移除此类注释。 +示例:
+
+ while (i < 10) {
+ i++;
+ } // end while
+
+在应用快速修复后:
+
+ while (i < 10) {
+ i++;
+ }
+
+
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/BlockStatementJS.html b/original-plugin-raw/zh/inspectionDescriptions/BlockStatementJS.html
new file mode 100644
index 000000000..375d590af
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/BlockStatementJS.html
@@ -0,0 +1,7 @@
+
+
+报告不用作 if
、for
、while
、do
、
+with
或 try
语句体,也不用作函数声明体的块语句。 从 ECMAScript 6 开始,JavaScript 块为 let
和 const
变量引入了新的范围,
+但独立的块语句在与 var
变量一起使用时仍然会引起混淆,并导致难以捉摸的错误。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/BlockingMethodInNonBlockingContext.html b/original-plugin-raw/zh/inspectionDescriptions/BlockingMethodInNonBlockingContext.html
new file mode 100644
index 000000000..365cc4ba6
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/BlockingMethodInNonBlockingContext.html
@@ -0,0 +1,36 @@
+
+
+报告不应阻塞线程的代码段中的线程阻塞方法调用。
+
+示例(项目 Reactor):
+
+Flux.just("1").flatMap(f -> {
+ Flux<String> just = loadUsersFromDatabase();
+ just.toIterable(); // 错误:在非阻塞范围内调用阻塞运算符
+ return just;
+ }
+);
+
+
+考虑使用适当的计划程序(例如 Schedulers.boundedElastic()
)运行阻塞代码,或者尝试寻找替代的非阻塞 API。
示例(Kotlin 协同程序):
+
+suspend fun exampleFun() {
+ Thread.sleep(100); // 错误:在挂起函数中调用阻塞方法
+}
+
+
+考虑使用特殊调度程序(例如 Dispatchers.IO
)运行阻塞代码,或尝试寻找替代的非阻塞 API。
配置检查:
+指定的注解可用作外部注解
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/BooleanConstructor.html b/original-plugin-raw/zh/inspectionDescriptions/BooleanConstructor.html new file mode 100644 index 000000000..f9f19d15d --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/BooleanConstructor.html @@ -0,0 +1,18 @@ + + +报告Boolean
对象的创建情况。
+
+ 基本不必要创建新的 Boolean
对象,如果经常这样做,可能会导致性能问题。 此外,Boolean
构造函数自 Java 9 起已弃用,在未来的 Java 版本中可能会被移除或变得无法访问。
示例:
+
+ Boolean b1 = new Boolean(true);
+ Boolean b2 = new Boolean(str);
+
+在应用快速修复后:
+
+ Boolean b1 = Boolean.TRUE;
+ Boolean b2 = Boolean.valueOf(str);
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/BooleanExpressionMayBeConditional.html b/original-plugin-raw/zh/inspectionDescriptions/BooleanExpressionMayBeConditional.html
new file mode 100644
index 000000000..c319d9f69
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/BooleanExpressionMayBeConditional.html
@@ -0,0 +1,16 @@
+
+
+报告任何能够以比使用条件表达式更紧凑、更清晰的方式来表述的 boolean
表达式。
+使用该快速修复可以将 boolean
表达式替换为条件表达式。
示例:
+
+ a && b || !a && c;
+
+在应用快速修复后:
+
+ a ? b : c;
+
+
++ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/BooleanLiteralArgument.html b/original-plugin-raw/zh/inspectionDescriptions/BooleanLiteralArgument.html new file mode 100644 index 000000000..238acc60a --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/BooleanLiteralArgument.html @@ -0,0 +1,26 @@ + +
+报告类型为Boolean
但未指定显式形参名称的调用实参。
++ 按顺序传递多个布尔文字时,很容易忘记形参顺序,这可能会导致错误。 + 显式形参名称让阅读和理解代码变得更容易。 +
+示例:
+
+ fun check(checkName: Boolean, checkAddress: Boolean, checkPhone: Boolean) {}
+
+ fun usage() {
+ check(true, false, true) //这是什么意思?
+ }
+
+该快速修复会添加缺少的形参名称:
+
+ fun check(checkName: Boolean, checkAddress: Boolean, checkPhone: Boolean) {}
+
+ fun usage() {
+ check(checkName = true, checkAddress = false, checkPhone = true)
+ }
+
+
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/BooleanMethodIsAlwaysInverted.html b/original-plugin-raw/zh/inspectionDescriptions/BooleanMethodIsAlwaysInverted.html
new file mode 100644
index 000000000..145928100
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/BooleanMethodIsAlwaysInverted.html
@@ -0,0 +1,38 @@
+
+
+报告一个返回类型为 boolean
的方法,该方法仅在否定上下文中使用。
+您可以使用快速修复来重命名方法和反转方法。 + 由于性能原因,某些方法可能不会在编辑器中高亮显示。
+示例:
+
+ class C {
+ boolean alwaysTrue() {
+ return true;
+ }
+
+ void f() {
+ if (!alwaysTrue()) {
+ return;
+ }
+ }
+ boolean member = !alwaysTrue();
+ }
+
+在应用快速修复后:
+
+ class C {
+ boolean alwaysFalse() {
+ return false;
+ }
+
+ void f() {
+ if (alwaysFalse()) {
+ return;
+ }
+ }
+ boolean member = alwaysFalse();
+ }
+
+
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/BooleanMethodNameMustStartWithQuestion.html b/original-plugin-raw/zh/inspectionDescriptions/BooleanMethodNameMustStartWithQuestion.html
new file mode 100644
index 000000000..68f712d6e
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/BooleanMethodNameMustStartWithQuestion.html
@@ -0,0 +1,19 @@
+
+
+报告名称不以疑问词开头的布尔方法。
+此检查将忽略重写库方法的布尔方法。
+示例:
+boolean empty(List<String> list) {
+ return list.isEmpty();
+}
+只能在编辑器中使用重命名此类方法的快速修复。
+ +配置检查:
+java.lang.Boolean
的方法。 @interface
) 的布尔方法。boolean
形参的 public 方法。
+如果某个 public 方法(API 的一部分)不是 setter,则向该方法添加 boolean
形参几乎始终是一种不好的做法。
+使用此类方法读取代码时,如果不查看源代码或文档,会很难理解 boolean
的含义。
此问题也被称为布尔陷阱。
+ boolean
形参通常可以替换为 enum
。
示例:
+
+ // 警告:在查看对此方法的
+ // 调用时,很难理解
+ // 布尔形参的含义
+ public boolean setPermission(File f,
+ int access,
+ boolean enable,
+ boolean ownerOnly) {
+ // ...
+ }
+
+
++使用仅报告具有多个布尔形参的方法选项可以仅在一个方法包含多个布尔形参时发出警告。 +
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/BooleanVariableAlwaysNegated.html b/original-plugin-raw/zh/inspectionDescriptions/BooleanVariableAlwaysNegated.html new file mode 100644 index 000000000..514eb57f7 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/BooleanVariableAlwaysNegated.html @@ -0,0 +1,14 @@ + +
+报告使用其值时总是否定的布尔变量或字段。 + +示例:
+
+ void m() {
+ boolean b = true; //始终反转布尔变量 'b'
+ System.out.println(!b);
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/BoundFieldAssignment.html b/original-plugin-raw/zh/inspectionDescriptions/BoundFieldAssignment.html
new file mode 100644
index 000000000..0a2c78621
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/BoundFieldAssignment.html
@@ -0,0 +1,6 @@
+
+
+报告绑定到 UI Designer 窗体中的组件的字段赋值。
+此类赋值将导致 UI Designer 为此类字段生成的组件设置代码被忽略。
+ + diff --git a/original-plugin-raw/zh/inspectionDescriptions/BoundedWildcard.html b/original-plugin-raw/zh/inspectionDescriptions/BoundedWildcard.html new file mode 100644 index 000000000..4fc9ed40d --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/BoundedWildcard.html @@ -0,0 +1,63 @@ + + +报告可以使用有界通配符的通用方法形参。 +示例:
+
+ void process(Consumer<Number> consumer);
+
+应替换为:
+
+ void process(Consumer<? super Number> consumer);
+
+
+ 此方法签名更灵活,因为它接受更多类型:不仅是 Consumer<Number>
,还有 Consumer<Object>
。
+
同样,在协变位置输入形参:
+
+ T produce(Producer<T> p);
+
+应替换为:
+
+ T produce(Producer<? extends T> p);
+
+
++ 引用 Effective Java 第三版中的 Joshua Bloch: +
+++ +第 31 项:使用有界通配符增加 API 灵活性
+ 在 API 中使用通配符类型虽然麻烦,但会使 API 更加灵活。 + 如果您编写的库将被广泛使用,则应强制正确使用通配符类型。 + 记住基本规则:生产者-extends, 使用者-super (PECS)。 + 还要记住,所有 Comparable 和 Comparator 都是消费者。 +
+ 使用检查选项可以切换以下各项的报告: +
+
+ 不变类。 一个不变类的示例是 java.util.List<T>
,因为它既接受值(通过 List.add(T)
方法)又生成值(通过 T List.get()
方法)。
+
+ 另一方面,contravariant
类只接收值,例如,只有方法 accept(T)
的 java.util.function.Consumer<T>
。 类似地,covariant
类只产生值,例如,只有方法 T get()
的 java.util.function.Supplier<T>
。
+
+ 人们经常在协变/逆变类中使用有界通配符,但避免在不变类中使用通配符,例如 void process(List<? extends T> l)
。
+ 禁用此选项可以忽略这种不变类并保留它们的严格类型,例如 void process(List<T> l)
。
+
+ 可视为不属于公共 API 一部分的 private
方法
+
+ 实例方法 +
++ 这是冗余的操作,因为任何装箱的值都会先自动拆箱,然后再次对该值装箱。 如果在内部循环中进行,此类代码可能会导致性能问题。 +
+ +示例:
+
+ Integer value = 1;
+ method(Integer.valueOf(value));
+
+在应用快速修复后:
+
+ Integer value = 1;
+ method(value);
+
++ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/BpmnConfigDomInspection.html b/original-plugin-raw/zh/inspectionDescriptions/BpmnConfigDomInspection.html new file mode 100644 index 000000000..3471b00a3 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/BpmnConfigDomInspection.html @@ -0,0 +1,16 @@ + +
+报告不正确的 BPMN 2.0 XML 文件:
+ +switch
语句分支结尾以外的位置使用的 break
语句。
+break
语句导致重构复杂化,可能令人困惑。
示例:
+
+void foo(List<String> strs) {
+ for (String str : strs) {
+ if (str.contains("stop")) break;
+ handleStr(str);
+ }
+}
+
+
++ + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/BreakStatementJS.html b/original-plugin-raw/zh/inspectionDescriptions/BreakStatementJS.html new file mode 100644 index 000000000..2143a5041 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/BreakStatementJS.html @@ -0,0 +1,5 @@ + +
+报告break
语句。 忽略结束 case 块的 break
语句。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/BreakStatementWithLabel.html b/original-plugin-raw/zh/inspectionDescriptions/BreakStatementWithLabel.html
new file mode 100644
index 000000000..fa7db34ce
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/BreakStatementWithLabel.html
@@ -0,0 +1,21 @@
+
+
+报告包含标签的 break
语句。
+break
标签语句导致重构复杂化,可能令人困惑。
示例:
+
+ void handle(List<String> strs) {
+ outer:
+ for (String s: strs) {
+ for (char ch : s.toCharArray()) {
+ if ('s' == ch) break outer;
+ handleChar(ch);
+ }
+ }
+ }
+
+
++ + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/BreakStatementWithLabelJS.html b/original-plugin-raw/zh/inspectionDescriptions/BreakStatementWithLabelJS.html new file mode 100644 index 000000000..2ab31f7f4 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/BreakStatementWithLabelJS.html @@ -0,0 +1,5 @@ + +
+报告break
标签语句。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/BridgeCastIssues.html b/original-plugin-raw/zh/inspectionDescriptions/BridgeCastIssues.html
new file mode 100644
index 000000000..59c369d6e
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/BridgeCastIssues.html
@@ -0,0 +1,5 @@
+
+
+报告桥式转换的不正确用法。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/BusyWait.html b/original-plugin-raw/zh/inspectionDescriptions/BusyWait.html
new file mode 100644
index 000000000..e804654b0
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/BusyWait.html
@@ -0,0 +1,20 @@
+
+
+报告在循环内发生的对 java.lang.Thread.sleep()
的调用。
+此类调用表示“忙等待”。 忙等待通常效率低下,并且可能导致意外死锁,因为忙等待线程不会释放锁定的资源。
+示例:
+
+ class X {
+ volatile int x;
+ public void waitX() throws Exception {
+ while (x > 0) {
+ Thread.sleep(10);// 警告:在循环中调用 'Thread.sleep()',可能处于忙等待
+ }
+ }
+ }
+
+
++ + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/BvConfigDomInspection.html b/original-plugin-raw/zh/inspectionDescriptions/BvConfigDomInspection.html new file mode 100644 index 000000000..019276ef1 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/BvConfigDomInspection.html @@ -0,0 +1,25 @@ + +
+报告 Bean 验证 <validation-config>
文件中的不正确元素:
示例:
+
+<validation-config>
+ <default-provider>foo.UnknownProvider</default-provider> <!-- 无法解析 'UnknownProvider' 类或软件包 -->
+ <message-interpolator>my.Interpolator</message-interpolator>
+ <constraint-mapping>META-INF/ConstraintMappings.xml</constraint-mapping>
+ <constraint-mapping>META-INF/unknown.xml</constraint-mapping>
+</validation-config>
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/BvConstraintMappingsInspection.html b/original-plugin-raw/zh/inspectionDescriptions/BvConstraintMappingsInspection.html
new file mode 100644
index 000000000..2800669df
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/BvConstraintMappingsInspection.html
@@ -0,0 +1,37 @@
+
+
+报告 Bean 验证 <constraint-mappings>
文件中的不正确元素:
示例:
+
+<constraint-mappings version="1.1">
+ <bean class="my.UserClass" ignore-annotations="false">
+ <field name="name">
+ <constraint annotation="java.lang.String"/> <!--'java.lang.String' 不是 Java 注解 -->
+ </field>
+
+ <field name="name">
+ <constraint annotation="javax.validation.constraints.Size">
+ <element name="min">non-number</element> <!--应该为 '-2,147,483,648' 到 '2,147,483,647' 之间的数字 -->
+ </constraint>
+ </field>
+
+ <getter name="zzz"> 无法解析 'zzz' 符号
+ <valid/>
+ </getter>
+
+ </bean>
+</constraint-mappings>
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CStyleArrayDeclaration.html b/original-plugin-raw/zh/inspectionDescriptions/CStyleArrayDeclaration.html
new file mode 100644
index 000000000..c16d60391
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CStyleArrayDeclaration.html
@@ -0,0 +1,22 @@
+
+
+报告以 C 风格语法编写的数组声明,其中数组指示符中括号放置在变量名称之后或方法形参列表之后。
+示例:
+
+ public String process(String value[])[] {
+ return value;
+ }
+
+大多数代码风格更喜欢 Java 风格的数组声明,其中数组指示符中括号附加到类型名称,例如:
+
+ public String[] process(String[] value) {
+ return value;
+ }
+
+
+配置检查:
++使用 忽略变量中的C样式声明 选项仅报告方法返回类型的 C 样式数组声明。 +
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/CachedNumberConstructorCall.html b/original-plugin-raw/zh/inspectionDescriptions/CachedNumberConstructorCall.html new file mode 100644 index 000000000..a0394252c --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/CachedNumberConstructorCall.html @@ -0,0 +1,23 @@ + +
+报告具有基元long
、integer
、short
或 byte
实参的新 Long
、Integer
、Short
或 Byte
对象的实例化。
+建议使用 Java 5 中引入的 static 方法 valueOf()
默认情况下,此方法缓存值介于 -128 到 127(包含)之间的对象。
+
示例:
+
+ Integer i = new Integer(1);
+ Long l = new Long(1L);
+
+应用快速修复后,代码变为:
+
+ Integer i = Integer.valueOf(1);
+ Long l = Long.valueOf(1L);
+
+
+仅当项目或模块的语言级别为 5 或更高级别时,此检查才会报告。
+
+ 使用忽略具有字符串实参的新数字表达式选项可以忽略对包含 String
实参的数字构造函数的调用。
+ 使用仅在构造函数为 @Deprecated 时报告选项,仅报告对弃用的构造函数的调用。
+ Long
、Integer
、Short
和 Byte
构造函数自 JDK 9 起已被弃用。
dealloc
消息。 此类消息绝不应直接发送。
+ 相反,对象的 dealloc
方法应通过 release
+ NSObject
协议方法间接调用(如果 release
消息导致接收器的保留计数变为 0)。
+ 有关使用这些方法的更多详细信息,请参阅内存管理编程指南。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CallToNativeMethodWhileLocked.html b/original-plugin-raw/zh/inspectionDescriptions/CallToNativeMethodWhileLocked.html
new file mode 100644
index 000000000..896f5bf2e
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CallToNativeMethodWhileLocked.html
@@ -0,0 +1,19 @@
+
+
+报告 synchronized
块或方法中的调用 native
方法。
+
+ 如果可能,最好将对 native
方法的调用排除在同步上下文之外,因为此类调用会导致开销巨大的上下文切换,并且可能导致性能问题。
+
示例:
+
+ native void nativeMethod();
+
+ void example(){
+ synchronized (lock){
+ nativeMethod();//警告
+ }
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CallToSimpleGetterInClass.html b/original-plugin-raw/zh/inspectionDescriptions/CallToSimpleGetterInClass.html
new file mode 100644
index 000000000..1ab6e83aa
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CallToSimpleGetterInClass.html
@@ -0,0 +1,46 @@
+
+
+报告从属性的类内部对简单属性 getter 的调用。
++ 简单的属性 getter 会被定义为只返回字段的值,而不进行其他计算。 可以使用该快速修复安全地内联此类简单的 getter 调用。 + 为了保持代码清晰,某些编码标准还建议不使用简单的 getter。 +
+示例:
+
+ public class Salient {
+ private String name;
+
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public String toString() {
+ return getName();
+ }
+ }
+
+在应用快速修复后:
+
+ public class Salient {
+ private String name;
+
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public String toString() {
+ return name;
+ }
+ }
+
+
+使用以下选项配置检查:
+this
上的 getter 调用,而不报告作为形参传入的相同类型的对象。private
getter。+ 简单的属性 setter 被定义为只将其形参的值分配给一个字段,而不进行其他计算。 可以安全地内联此类简单的 setter 调用。 + 为了保持代码清晰,某些编码标准还建议不使用简单的 setter。 +
+示例:
+
+ class Foo {
+ private int index;
+ public Foo(int idx) {
+ setIndex(idx);
+ }
+ public void setIndex(int idx) {
+ index = idx;
+ }
+ }
+
+在应用快速修复后:
+
+ class Foo {
+ private int index;
+ public Foo(int idx) {
+ index = idx;
+ }
+ public void setIndex(int idx) {
+ index = idx;
+ }
+ }
+
+
+使用以下选项配置检查:
+this
上的 setter 调用,而不报告作为形参传入的相同类型的对象。private
setter。java.lang.String.concat()
的调用。
+
+ 如果在带有常量实参的常量上调用该方法,可以将此类调用替换为 +
运算符,以提高清晰度和性能。
示例:
+
+ String foo(String name) {
+ return name.concat("foo");
+ }
+
+在应用快速修复后:
+
+ String foo(String name) {
+ return name + "foo";
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CallToSuspiciousStringMethod.html b/original-plugin-raw/zh/inspectionDescriptions/CallToSuspiciousStringMethod.html
new file mode 100644
index 000000000..d4b848a98
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CallToSuspiciousStringMethod.html
@@ -0,0 +1,19 @@
+
+
+报告对以下各项的调用:
+equals()
equalsIgnoreCase()
compareTo()
compareToIgnoreCase()
和trim()
+ (发生在 String
对象上)。
+ 对国际化字符的比较可能应改为使用 java.text.Collator
。
+ String.trim()
只会移除 0x00 和 0x20 之间的控制字符。
+ Java 11 中引入的 String.strip()
方法对 Unicode 的感知更好,可以作为替代。
+
caller
属性的用法。
+使用此属性访问调用方法的堆栈帧可能格外令人困惑,并导致难以捉摸的错误。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CallingSubscribeInNonBlockingScope.html b/original-plugin-raw/zh/inspectionDescriptions/CallingSubscribeInNonBlockingScope.html
new file mode 100644
index 000000000..d040d9fab
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CallingSubscribeInNonBlockingScope.html
@@ -0,0 +1,15 @@
+
+
+报告 "reactive" 方法中的 subscribe()
调用。
返回 Publisher
类型(包括 Flux
和 Mono
)的方法不应直接调用 subscribe()
方法,因为它可能破坏反应式调用链。
不要使用 subscribe()
,而是考虑使用组合运算符,例如 flatMap()
、zip()
、then()
> 等。
示例:
+
+ Flux<String> stringFlux(){
+ Flux<String> flux = Flux.just("abc");
+ flux.subscribe(); // <- 在非阻塞上下文中阻塞 'subscribe' 调用
+ return flux;
+ }
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CanBeFinal.html b/original-plugin-raw/zh/inspectionDescriptions/CanBeFinal.html
new file mode 100644
index 000000000..547b719ea
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CanBeFinal.html
@@ -0,0 +1,8 @@
+
+
+报告在指定检查范围内发现的所有字段、方法或类,这些字段、方法或类可能在其声明中添加了 final
修饰符。
+final 类不能被扩展,final 方法不能被重写,final 字段不能被重新分配。
+ +使用报告类和报告方法选项可定义要报告的声明。
+ + diff --git a/original-plugin-raw/zh/inspectionDescriptions/CanBeParameter.html b/original-plugin-raw/zh/inspectionDescriptions/CanBeParameter.html new file mode 100644 index 000000000..ebad97b37 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/CanBeParameter.html @@ -0,0 +1,27 @@ + + +报告val
或 var
可被移除的主构造函数形参。
++ 在构造函数中声明的类属性会增加内存消耗。 + 如果形参值仅在构造函数中使用,则可以省略它们。 +
+请注意,引用的对象可能是之前被垃圾回收。
+示例:
+
+ class Task(val name: String) {
+ init {
+ print("Task created: $name")
+ }
+ }
+
+该快速修复会移除额外的 val
或 var
关键字:
+ class Task(name: String) {
+ init {
+ print("Task created: $name")
+ }
+ }
+
+
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CanBePrimaryConstructorProperty.html b/original-plugin-raw/zh/inspectionDescriptions/CanBePrimaryConstructorProperty.html
new file mode 100644
index 000000000..ec11b0962
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CanBePrimaryConstructorProperty.html
@@ -0,0 +1,18 @@
+
+
+报告显式分配给主构造函数形参的属性。
+可以直接在主构造函数中声明属性,从而减少代码量并提高代码可读性。
+示例:
+
+ class User(name: String) {
+ val name = name
+ }
+
+快速修复会将形参和属性声明联接到主构造函数形参中:
+
+ class User(val name: String) {
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CanBeStatic.html b/original-plugin-raw/zh/inspectionDescriptions/CanBeStatic.html
new file mode 100644
index 000000000..789729cbc
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CanBeStatic.html
@@ -0,0 +1,5 @@
+
+
+报告在指定检查范围内发现的所有字段、方法或类,这些字段、方法或类可能在其声明中添加了 static
修饰符。
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CanBeVal.html b/original-plugin-raw/zh/inspectionDescriptions/CanBeVal.html
new file mode 100644
index 000000000..3dc8bdf08
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CanBeVal.html
@@ -0,0 +1,23 @@
+
+
+报告使用 var
关键字声明但从未被修改的局部变量。
+Kotlin 鼓励使用 val
关键字声明几乎不可变的变量,以确保它们的值永远不会改变。
示例:
+
+ fun example() {
+ var primeNumbers = listOf(1, 2, 3, 5, 7, 11, 13)
+ var fibonacciNumbers = listOf(1, 1, 2, 3, 5, 8, 13)
+ print("Same numbers: " + primeNumbers.intersect(fibonacciNumbers))
+ }
+
+快速修复会将 var
关键字替换为 val
:
+ fun example() {
+ val primeNumbers = listOf(1, 2, 3, 5, 7, 11, 13)
+ val fibonacciNumbers = listOf(1, 1, 2, 3, 5, 8, 13)
+ print("Same numbers: " + primeNumbers.intersect(fibonacciNumbers))
+ }
+
+
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CanSealedSubClassBeObject.html b/original-plugin-raw/zh/inspectionDescriptions/CanSealedSubClassBeObject.html
new file mode 100644
index 000000000..997ecbe95
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CanSealedSubClassBeObject.html
@@ -0,0 +1,21 @@
+
+
+报告没有状态和被重写的 equals()
方法的 sealed
类的直接继承者。
+强烈建议重写 equals()
以提供比较稳定性,或将 class
转换为 object
以达到相同的效果。
示例:
+
+ sealed class Receiver {
+ class Everyone : Receiver()
+ class User(val id: Int) : Receiver()
+ }
+
+快速修复会将 class
转换为 object
:
+ sealed class Receiver {
+ object Everyone : Receiver()
+ class User(val id: Int) : Receiver()
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CannotResolve.html b/original-plugin-raw/zh/inspectionDescriptions/CannotResolve.html
new file mode 100644
index 000000000..9e914d549
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CannotResolve.html
@@ -0,0 +1,5 @@
+
+
+报告代码中的未解析符号。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CapturingCleaner.html b/original-plugin-raw/zh/inspectionDescriptions/CapturingCleaner.html
new file mode 100644
index 000000000..9bd7f4372
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CapturingCleaner.html
@@ -0,0 +1,24 @@
+
+
+报告当 Runnable
传递给 Cleaner.register()
捕获引用时会导致内存泄漏的情况。
+此问题的可能来源:
+this
本身的 lambda将报告的代码示例:
+
+ int fileDescriptor;
+ Cleaner.Cleanable cleanable = Cleaner.create().register(this, () -> {
+ System.out.println("adsad");
+ //this 通过 fileDescriptor 捕获
+ fileDescriptor = 0;
+ });
+
+仅当项目或模块的语言级别为 9 或更高时,此检查才会报告。
+2018.1 最新变化
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/CascadeIf.html b/original-plugin-raw/zh/inspectionDescriptions/CascadeIf.html new file mode 100644 index 000000000..d118f9e0f --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/CascadeIf.html @@ -0,0 +1,40 @@ + + +报告有三个以上分支并且可以替换为when
表达式的 if
语句。
+示例:
+
+ fun checkIdentifier(id: String) {
+ fun Char.isIdentifierStart() = this in 'A'..'z'
+ fun Char.isIdentifierPart() = isIdentifierStart() || this in '0'..'9'
+
+ if (id.isEmpty()) {
+ print("Identifier is empty")
+ } else if (!id.first().isIdentifierStart()) {
+ print("Identifier should start with a letter")
+ } else if (!id.subSequence(1, id.length).all(Char::isIdentifierPart)) {
+ print("Identifier should contain only letters and numbers")
+ }
+ }
+
+快速修复会将 if
表达式转换为 when
:
+ fun checkIdentifier(id: String) {
+ fun Char.isIdentifierStart() = this in 'A'..'z'
+ fun Char.isIdentifierPart() = isIdentifierStart() || this in '0'..'9'
+
+ when {
+ id.isEmpty() -> {
+ print("Identifier is empty")
+ }
+ !id.first().isIdentifierStart() -> {
+ print("Identifier should start with a letter")
+ }
+ !id.subSequence(1, id.length).all(Char::isIdentifierPart) -> {
+ print("Identifier should contain only letters and numbers")
+ }
+ }
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CaseClassParam.html b/original-plugin-raw/zh/inspectionDescriptions/CaseClassParam.html
new file mode 100644
index 000000000..623a1db51
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CaseClassParam.html
@@ -0,0 +1,13 @@
+
+报告 case class
形参上的冗余 val
修饰符。
示例:
+
+ case class W (val x: Int)
+
+在应用快速修复后:
+
+ case class W (x: Int)
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CastCanBeRemovedNarrowingVariableType.html b/original-plugin-raw/zh/inspectionDescriptions/CastCanBeRemovedNarrowingVariableType.html
new file mode 100644
index 000000000..ff0fc8b6a
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CastCanBeRemovedNarrowingVariableType.html
@@ -0,0 +1,19 @@
+
+
+如果将变量类型范围缩小到转换类型,则报告可以移除的类型转换。
+示例:
+
+ Object x = " string ";
+ System.out.println(((String)x).trim());
+
+
+在这里,将 x
的类型更改为 String
使转换变得冗余。 建议的快速修复会更新变量类型并移除该变量上的所有冗余转换:
+
+ String x = " string ";
+ System.out.println(x.trim());
+
+
+2018.2 最新变化
+ + diff --git a/original-plugin-raw/zh/inspectionDescriptions/CastConflictsWithInstanceof.html b/original-plugin-raw/zh/inspectionDescriptions/CastConflictsWithInstanceof.html new file mode 100644 index 000000000..760371959 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/CastConflictsWithInstanceof.html @@ -0,0 +1,26 @@ + + +报告前面包含用于检查不同类型的instanceof
的类型转换表达式。
+
+ 尽管这可能是有意为之,但此类结构很可能是错误,在运行时将导致 java.lang.ClassCastException
。
+
示例:
+
+ class Main {
+ int whenCharSequenceCastToNumber(Object o){
+ if (o instanceof CharSequence) {
+ return ((Number) o).intValue();
+ }
+ return 0;
+ }
+
+ int earlyReturnWhenNotCharSequence(Object o){
+ if (!(o instanceof CharSequence)) return 0;
+ return ((Number)o).intValue();
+ }
+ }
+
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CastThatLosesPrecision.html b/original-plugin-raw/zh/inspectionDescriptions/CastThatLosesPrecision.html
new file mode 100644
index 000000000..c9e7481a0
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CastThatLosesPrecision.html
@@ -0,0 +1,16 @@
+
+
+报告可能导致精度损失的基元数值类型之间的转换运算。
+此类转换不一定是问题,但如果意外造成精度损失,则可能会导致难以跟踪错误。
+示例:
+
+ int a = 420;
+ byte b = (byte) a;
+
+
+使用忽略从 int 到 char 的转换选项可以忽略从 int
到 char
的转换。
+ 在实现 I/O 操作时经常使用这种类型的转换,因为 java.io.Reader
类的 read()
方法会返回一个 int
。
使用忽略从 int 128-255 到字节的转换选项可以忽略从 int
到 byte
的常量值 (128-255) 的转换。
+ 此类值将溢出到仍能容纳在一个字节内的负数。
+ 尽管这可能是有意为之,但此类结构很可能是错误,在运行时将导致 java.lang.ClassCastException
。
+
示例:
+
+ interface A {}
+ interface Z {}
+ static class C {}
+
+ void x(C c) {
+ if (c instanceof Z) {
+ A a = ((A)c); // 转换为不兼容的接口 'A'
+ }
+ }
+
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CatchMayIgnoreException.html b/original-plugin-raw/zh/inspectionDescriptions/CatchMayIgnoreException.html
new file mode 100644
index 000000000..d23f0f485
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CatchMayIgnoreException.html
@@ -0,0 +1,50 @@
+
+
+报告空的或可能忽略异常的 catch
块。
+虽然偶尔是有意为之,但空的 catch
块可能导致调试复杂化。
+此外,忽略 catch
形参可能是错误的。
+ 最后,静态代码分析器会报告是否检测到 catch
块可能无提示地忽略重要的 VM 异常,如 NullPointerException
。 忽略此类异常(不记录或重新抛出)可能会隐藏错误。
+ 该检查不会报告任何命名为 ignore
或 ignored
的 catch
形参。
+ 相反,它将对真正在使用的命名为 ignore
或 ignored
的 catch
形参发出警告。
+ 此外,该检查不会报告命名为 expected
或 ok
的测试源中的 catch
形参。
+
+ 您可以使用快速修复将异常名称更改为 ignored
。
+ 对于空的 catch 块,建议使用其他快速修复来生成 catch 主体。
+ 您可以在设置 | 编辑器 | 文件和代码模板中的“代码”选项卡上修改 "Catch Statement Body" 模板。
+
示例:
+
+ try {
+ throwingMethod();
+ } catch (IOException ex) {
+
+ }
+
+在应用快速修复后:
+
+ try {
+ System.out.println(System.in.read());
+ } catch (IOException ignored) {
+
+ }
+
+
+配置检查:
+catch
块。
+ catch
块。
+ ignored
的变量。
+ 2018.1 最新变化
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/CaughtExceptionImmediatelyRethrown.html b/original-plugin-raw/zh/inspectionDescriptions/CaughtExceptionImmediatelyRethrown.html new file mode 100644 index 000000000..6dd47f0df --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/CaughtExceptionImmediatelyRethrown.html @@ -0,0 +1,16 @@ + + +报告不对其执行任何操作,而是立即重新抛出所捕获的异常的catch
块。
+此类 catch
块非必要,并且没有处理错误。
+
+示例:
+
+ try {
+ new FileInputStream("");
+ } catch (FileNotFoundException e) {
+ throw e;
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CdiAlternativeInspection.html b/original-plugin-raw/zh/inspectionDescriptions/CdiAlternativeInspection.html
new file mode 100644
index 000000000..044c37ace
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CdiAlternativeInspection.html
@@ -0,0 +1,8 @@
+
+
+
+ 报告被否决的 @Alternative
Bean。
+ 当一个 Bean 使用 @Vetoed
注解或在被否决的软件包中声明时,会被视为否决。
+
报告不正确的 @Decorator
Bean 定义。
@Delegate
注解的代理特性(字段或形参)。报告不正确的 disposer 方法。
+ +@Disposes
注解的已处置形参。报告 beans.xml
配置文件中不正确的 Bean 定义。
报告不正确的注入点:使用 @Inject
注解并违反 CDI 规范的字段、方法和形参。
字段要求:
+@Produces
注解对包含注入的方法的要求:
+@Disposes
和 @Observes
注解的形参报告具有不明确依赖项的 Bean 类中的注入点。
+ +示例:
+
+ interface Engine {}
+
+ @Singleton
+ class GasEngine implements Engine {}
+
+ @Singleton
+ class ElectricEngine implements Engine {}
+
+ @Singleton
+ class Car {
+ @Inject Engine engine; // 依赖项不明确:有多个 Bean 匹配注入点
+ }
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CdiInterceptorInspection.html b/original-plugin-raw/zh/inspectionDescriptions/CdiInterceptorInspection.html
new file mode 100644
index 000000000..583ad6c8d
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CdiInterceptorInspection.html
@@ -0,0 +1,5 @@
+
+
+报告没有绑定类型的 @Interceptor
类。 侦听器必须指定至少一个侦听器绑定。
报告不正确的 Bean 定义规则。
+顶级 Java 类可以为简单的 Bean,如果:
+@Decorator
进行注解。 @Initializer
注解的构造函数。
+ javax.servlet.Servlet
、
+ javax.servlet.Filter
、
+ javax.servlet.ServletContextListener
、
+ javax.servlet.http.HttpSessionListener
、
+ javax.servlet.ServletRequestListener
、
+ javax.ejb.EnterpriseBean
。
+ javax.faces.component.UIComponent
。报告具有不在默认 @Dependent
范围内的 public 实例字段的托管 Bean。
+ 根据 CDI 规范,上下文范围(@RequestScoped
、@ApplicationScoped
、@SessionScoped
和 ConversationScoped
)不允许用于具有 public 实例字段的托管 Bean。
+
示例:
+
+ @ApplicationScoped // 警告:具有非默认范围的 Bean 不得具有 public 字段
+ class Car {
+ public String engine;
+ }
+
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CdiObservesInspection.html b/original-plugin-raw/zh/inspectionDescriptions/CdiObservesInspection.html
new file mode 100644
index 000000000..f45dbf7df
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CdiObservesInspection.html
@@ -0,0 +1,11 @@
+
+
+报告不正确的观察者方法定义。
+ +@Observes
形参@Disposes
注解的形参@Inject
和 @Produces
注解报告不正确的 Bean 范围:
+@ApplicationScoped
或 @Dependent
@Dependent
报告 @Specializes
注解的不正确用法。
@Produces
方法@Named
注解不能用于专用化类和专用类报告不正确的 @Stereotype
注解类:
@Named
注解报告在不同范围内具有多个构造型的类,或者未指定范围的类
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/CdiTypedAnnotationInspection.html b/original-plugin-raw/zh/inspectionDescriptions/CdiTypedAnnotationInspection.html new file mode 100644 index 000000000..c9ac50628 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/CdiTypedAnnotationInspection.html @@ -0,0 +1,9 @@ + + +报告违反以下规则的 @Typed
注解用法:
@Typed
注解@Typed
注解中提到的类型报告没有相应生产者方法的 disposer 方法。
+每个 disposer 方法必须恰好有一个与相应生产者方法或生产者字段返回类型相同类型的已处置形参。 在为生产者方法或生产者字段搜索 disposer 方法时,容器会考虑已处置形参的类型和限定符。 如果已处理的形参解析为同一 Bean 类声明的生产者方法或生产者字段,则容器在销毁该生产者方法或生产者字段返回的任何实例时必须调用此方法。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/CdiUnproxyableBeanTypesInspection.html b/original-plugin-raw/zh/inspectionDescriptions/CdiUnproxyableBeanTypesInspection.html new file mode 100644 index 000000000..15ad5659e --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/CdiUnproxyableBeanTypesInspection.html @@ -0,0 +1,13 @@ + + +报告无法代理的 Bean 类型的不正确用法。
+容器不能代理某些合法的 Bean 类型:没有不带形参的非 private 构造函数的类、声明为 final 的类或具有 final 方法、基元类型和数组类型的类。
+ +此检查会报告此类 Bean 类型的以下违规行为:
+java.io.Serializable
报告未解析的路径引用。
+ + diff --git a/original-plugin-raw/zh/inspectionDescriptions/CfmlReferenceInspection.html b/original-plugin-raw/zh/inspectionDescriptions/CfmlReferenceInspection.html new file mode 100644 index 000000000..d836d9ffb --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/CfmlReferenceInspection.html @@ -0,0 +1,5 @@ + + +报告未解析的函数引用。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ChainedEquality.html b/original-plugin-raw/zh/inspectionDescriptions/ChainedEquality.html new file mode 100644 index 000000000..304ef564a --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ChainedEquality.html @@ -0,0 +1,19 @@ + + +报告链式相等比较。 +此类比较可能令人困惑:a == b == c
表示 (a == b) == c
,但可能 a == b && a == c
是有意为之。
示例:
+
+ boolean chainedEquality(boolean a, boolean b, boolean c) {
+ return a == b == c;
+ }
+
+您可以使用圆括号使比较不那么令人困惑:
+
+ boolean chainedEquality(boolean a, boolean b, boolean c) {
+ return (a == b) == c;
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ChainedEqualityJS.html b/original-plugin-raw/zh/inspectionDescriptions/ChainedEqualityJS.html
new file mode 100644
index 000000000..45b317449
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ChainedEqualityJS.html
@@ -0,0 +1,5 @@
+
+
+报告链式相等比较(即 a==b==c
)。 此类比较令人困惑。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ChainedFunctionCallJS.html b/original-plugin-raw/zh/inspectionDescriptions/ChainedFunctionCallJS.html
new file mode 100644
index 000000000..31c4024fa
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ChainedFunctionCallJS.html
@@ -0,0 +1,5 @@
+
+
+报告目标为另一个函数调用的函数调用,例如 foo().bar()
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ChainedMethodCall.html b/original-plugin-raw/zh/inspectionDescriptions/ChainedMethodCall.html
new file mode 100644
index 000000000..ad49b0640
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ChainedMethodCall.html
@@ -0,0 +1,38 @@
+
+
+报告目标是另一个方法调用的方法调用。
+该快速修复会建议引入局部变量。
+示例:
+
+ class X {
+ int foo(File f) {
+ return f.getName().length();
+ }
+ }
+
+在应用快速修复后:
+
+ class X {
+ int foo(File f) {
+ final String name = f.getName();
+ return name.length();
+ }
+ }
+
+
+使用检查选项来切换以下各项的警告:
+
+ 字段初始值设定项中的链式方法调用,例如 private final int i = new Random().nextInt();
+
+ 在相同的类型上运算的链式方法调用,例如,new StringBuilder().append("x: ").append(new X()).append("y: ").append(new Y()).toString();
。
+
报告应该在基础软件包中链接的软件包语句。
+仅当在设置 | 语言和框架 | Scala | 基础软件包中定义基础软件包时才适用。
+示例:
+
+ package org.example.application.NAME
+
+在应用快速修复后:
+
+ package org.example.application
+ package NAME
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ChangeToMethod.html b/original-plugin-raw/zh/inspectionDescriptions/ChangeToMethod.html
new file mode 100644
index 000000000..7edaae206
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ChangeToMethod.html
@@ -0,0 +1,13 @@
+
+
+报告可替换为方法调用的运算符调用。
+示例:
+
+ a + b
+
+在应用快速修复后:
+
+ a.plus(b)
+
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ChangeToOperator.html b/original-plugin-raw/zh/inspectionDescriptions/ChangeToOperator.html
new file mode 100644
index 000000000..9d5dfb009
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ChangeToOperator.html
@@ -0,0 +1,13 @@
+
+
+报告可以替换为运算符调用的方法调用。
+示例:
+
+ a.plus(b)
+
+在应用快速修复后:
+
+ a + b
+
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ChannelResource.html b/original-plugin-raw/zh/inspectionDescriptions/ChannelResource.html
new file mode 100644
index 000000000..4361c553a
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ChannelResource.html
@@ -0,0 +1,27 @@
+
+
+报告未安全关闭的 Channel
资源,包括任何通过在文件或套接字资源上调用 getChannel()
而创建的实例。
++ 默认情况下,该检查假定资源可以由名称中带有 'close' 或 'cleanup' 的任何方法关闭。 +
+示例:
+
+ void send(Socket socket) throws IOException {
+ SocketChannel channel = socket.getChannel(); //警告
+ channel.write(ByteBuffer.wrap("message".getBytes()));
+ }
+
+
++ 使用以下选项配置检查: +
+try
块内打开 Channel
资源。 这种样式不太合意,因为它比在 try
块前面打开 Channel
更复杂。
+ char
类型的表达式。
+此类代码不一定是问题,但可能会导致错误(例如,如果需要字符串)。
+示例:int a = 'a' + 42;
应用该快速修复后:int a = (int) 'a' + 42;
对于 String
上下文:
+
int i1 = 1;
+int i2 = 2;
+System.out.println(i2 + '-' + i1 + " = " + (i2 - i1));
+在应用快速修复后:
+System.out.println(i2 + "-" + i1 + " = " + (i2 - i1));
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CharacterComparison.html b/original-plugin-raw/zh/inspectionDescriptions/CharacterComparison.html
new file mode 100644
index 000000000..b6c90a031
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CharacterComparison.html
@@ -0,0 +1,6 @@
+
+
+报告 char
值的顺序比较。 在国际化环境中,此类比较很少是正确的。
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CharsetObjectCanBeUsed.html b/original-plugin-raw/zh/inspectionDescriptions/CharsetObjectCanBeUsed.html
new file mode 100644
index 000000000..0387ff9b6
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CharsetObjectCanBeUsed.html
@@ -0,0 +1,21 @@
+
+
+报告可以用预定义的 StandardCharsets.UTF_8
代码替换其中常量字符集 String
文字(例如,"UTF-8"
)的方法和构造函数。
+修复后可以加快代码的速度,因为字符集查找变得不必要。
+ 此外,您可能也不需要捕捉 UnsupportedEncodingException
。 在这种情况下,catch 块将被自动删除。
示例:
+
+ try {
+ byte[] bytes = "str".getBytes("UTF-8");
+ } catch (UnsupportedEncodingException e) {
+ }
+
+在应用快速修复后:
+
+ byte[] bytes = "str".getBytes(StandardCharsets.UTF_8);
+
+
+该检查在 Java 7 及更高版本中可用。
+2018.2 最新变化
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/CheckDtdRefs.html b/original-plugin-raw/zh/inspectionDescriptions/CheckDtdRefs.html new file mode 100644 index 000000000..6160b95c1 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/CheckDtdRefs.html @@ -0,0 +1,6 @@ + + +报告特定于 DTD 的引用(例如,对 XML 实体或 DTD 元素声明的引用)中的不一致。 +适用于 DTD 和 XML 文件。 + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/CheckEmptyScriptTag.html b/original-plugin-raw/zh/inspectionDescriptions/CheckEmptyScriptTag.html new file mode 100644 index 000000000..19210e342 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/CheckEmptyScriptTag.html @@ -0,0 +1,5 @@ + + +报告在某些浏览器中无法正常使用的空标记(如script
)。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CheckForOutOfMemoryOnLargeArrayAllocation.html b/original-plugin-raw/zh/inspectionDescriptions/CheckForOutOfMemoryOnLargeArrayAllocation.html
new file mode 100644
index 000000000..75b44bdce
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CheckForOutOfMemoryOnLargeArrayAllocation.html
@@ -0,0 +1,13 @@
+
+
+报告不检查 java.lang.OutOfMemoryError
的大型数组分配。 在内存受限的环境中,可能应该检查大数据对象的分配是否存在内存耗尽的情况。
++ 此检查适用于 Java ME 和其他资源高度受限的环境。 + 不加考虑地应用此检查的结果可能会对代码清晰度和设计产生负面影响。 +
+ ++ 使用该选项可以指定在未检查的数组分配中允许的最大元素数。 +
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/CheckImageSize.html b/original-plugin-raw/zh/inspectionDescriptions/CheckImageSize.html new file mode 100644 index 000000000..7e6df135b --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/CheckImageSize.html @@ -0,0 +1,5 @@ + + +报告与所引用图像的实际宽度和高度不同的img
标记的 width
和 height
特性值。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CheckJsfComponentUnderViewTag.html b/original-plugin-raw/zh/inspectionDescriptions/CheckJsfComponentUnderViewTag.html
new file mode 100644
index 000000000..212d6004d
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CheckJsfComponentUnderViewTag.html
@@ -0,0 +1,6 @@
+
+
+报告位于 view
或 subview
标记之外的 JSF component
标记。
+检查适用于 JSP 或 JSPX 文件类型。 示例:
+
+ <xsl:template match="h:txtarea" />
+
+
+
+ 如果 h
被绑定到 XHTML 命名空间,检查会将 match
表达式的这一部分报告为未知元素名称,因为该元素的正确名称是 "textarea"。
+
由 XPathView + XSLT-Support 提供技术支持
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/CheckTagEmptyBody.html b/original-plugin-raw/zh/inspectionDescriptions/CheckTagEmptyBody.html new file mode 100644 index 000000000..e09c4fb55 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/CheckTagEmptyBody.html @@ -0,0 +1,5 @@ + + +报告内容为空的元素。 + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/CheckValidXmlInScriptTagBody.html b/original-plugin-raw/zh/inspectionDescriptions/CheckValidXmlInScriptTagBody.html new file mode 100644 index 000000000..41c020766 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/CheckValidXmlInScriptTagBody.html @@ -0,0 +1,5 @@ + + +报告script
标记的无效 XML 内容。java.lang.RuntimeException
子类的 java.lang.Exception
的子类)。
+某些编码标准禁止已检查的用户定义的异常类。
+示例:
+
+ class IllegalMoveException extends Exception {}
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClangTidy.html b/original-plugin-raw/zh/inspectionDescriptions/ClangTidy.html
new file mode 100644
index 000000000..850a32c21
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ClangTidy.html
@@ -0,0 +1,8 @@
+
+
+报告与 C++ 核心准则、现代化、可读性和性能相关的各种问题。 使用下面的复选框可以让此检查忽略 IDE 设置并使用 .clang-tidy 文件中指定的检查列表(如果有)。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClangdErrorsAndWarnings.html b/original-plugin-raw/zh/inspectionDescriptions/ClangdErrorsAndWarnings.html new file mode 100644 index 000000000..e097f2cab --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ClangdErrorsAndWarnings.html @@ -0,0 +1,5 @@ + + +报告来自 clangd 的 C/C++ 错误和警告。访问此类属性可能产生意外的结果。
+示例:
+
+ class X {
+ boolean isFoo() { true }
+ boolean getFoo() { false }
+ }
+
+ // 将调用 getFoo()
+ new X().foo
+
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClashingTraitMethods.html b/original-plugin-raw/zh/inspectionDescriptions/ClashingTraitMethods.html
new file mode 100644
index 000000000..123a5dc83
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ClashingTraitMethods.html
@@ -0,0 +1,31 @@
+
+
+报告实现两个或多个特征(包含具有相同签名的方法)的类。
+调用此类方法可能产生意外的结果。
+该快速修复会添加显式重写方法。
+示例:
+
+ trait T1 {
+ def foo() {}
+ }
+
+ trait T2 {
+ def foo() {}
+ }
+
+ class X implements T1, T2 {}
+
+ // 将调用 T2.foo()
+ new X().foo()
+
+在应用快速修复后:
+
+ class X implements T1, T2 {
+ @Override
+ Object foo() {
+ return T2.super.foo()
+ }
+ }
+
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClassCanBeRecord.html b/original-plugin-raw/zh/inspectionDescriptions/ClassCanBeRecord.html
new file mode 100644
index 000000000..a7cc9368d
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ClassCanBeRecord.html
@@ -0,0 +1,44 @@
+
+
+建议用记录替换类。
+当您需要专注于建模不可变数据而不是可扩展行为时,检查会很有用。 + 数据驱动方法的自动实现,例如 equals 和访问器,有助于消除样板。
++ 请注意,不是每个类都可以成为记录。 以下是一些限制: +
+要获取完整的限制列表,请参阅 Oracle 文档。
+ +示例:
+
+ class Point {
+ private final double x;
+ private final double y;
+
+ Point(double x, double y) {
+ this.x = x;
+ this.y = y;
+ }
+
+ double getX() {
+ return x;
+ }
+
+ double getY() {
+ return y;
+ }
+ }
+
+此记录将转换为:
+
+ record Point(int x, int y) {
+ }
+
+仅当项目或模块的语言级别为 15(预览)或更高时,此检查才会报告。
+2020.3 最新变化
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClassComplexity.html b/original-plugin-raw/zh/inspectionDescriptions/ClassComplexity.html new file mode 100644 index 000000000..8bf0566e3 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ClassComplexity.html @@ -0,0 +1,9 @@ + + +报告总复杂度超过指定最大值的类。 +类的总复杂度是该类声明的所有方法和初始值设定项的循环复杂度的总和。 继承的方法和初始值设定项不计入总复杂度。
+过高的复杂度表明该类应该被重构为几个更小的类。
+ +使用下面的循环复杂度限制字段可指定类允许的最大复杂度。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClassCoupling.html b/original-plugin-raw/zh/inspectionDescriptions/ClassCoupling.html new file mode 100644 index 000000000..aa2eeb064 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ClassCoupling.html @@ -0,0 +1,13 @@ + + +报告引用过多其他类的类。 +耦合度过高的类可能非常脆弱,应该被拆分为较小的类。
+ +配置检查:
+java.
或 javax.
软件包中的那些类)的引用。示例:
+private
内部 class
的 public
方法。class
的 protected
字段。+在 Java 9 中,模块可能会通过将其软件包排除在导出之外来隐藏某些类。 +因此,如果导出的 API 的签名包含非导出类,此类 API 在模块之外就是无用的。 + +
配置检查:
+private
类的 package-local API。java.lang.Class
实例上调用的 getClass()
方法。
+这通常是一个错误,因为结果总是等同于 Class.class
。
+如果是错误,那么最好移除 getClass()
调用并直接使用限定符。
+ 如果行为是故意的,最好显式编写 Class.class
以避免混淆。
示例:
+
+ void test(Class<?> clazz) {
+ String name = clazz.getClass().getName();
+ }
+
+在应用可能的快速修复之一后:
+
+ void test(Class<?> clazz) {
+ String name = clazz.getName();
+ }
+
+
+2018.2 最新变化
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClassHasNoToStringMethod.html b/original-plugin-raw/zh/inspectionDescriptions/ClassHasNoToStringMethod.html new file mode 100644 index 000000000..6e7d828d0 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ClassHasNoToStringMethod.html @@ -0,0 +1,5 @@ + + +报告没有toString()
方法的类。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClassInDefaultPackage.html b/original-plugin-raw/zh/inspectionDescriptions/ClassInDefaultPackage.html
new file mode 100644
index 000000000..bf8dcbac4
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ClassInDefaultPackage.html
@@ -0,0 +1,7 @@
+
+
+报告位于默认软件包中的类。
+OSGi 并不能很好地处理这些类,因此强烈建议您在使用 OSGi 时将类放入一个软件包中。 +
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClassIndependentOfModule.html b/original-plugin-raw/zh/inspectionDescriptions/ClassIndependentOfModule.html new file mode 100644 index 000000000..c8afde8f0 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ClassIndependentOfModule.html @@ -0,0 +1,12 @@ + + +报告符合以下情况的类: +这种类表示临时或不连贯的模块化策略,并且通常可以有利地移动。
+ +仅适用于代码 | 检查代码或代码 | 分析代码 | 通过名称运行检查,并且不会在编辑器中报告。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClassInheritanceDepth.html b/original-plugin-raw/zh/inspectionDescriptions/ClassInheritanceDepth.html new file mode 100644 index 000000000..da062745d --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ClassInheritanceDepth.html @@ -0,0 +1,9 @@ + + +报告继承层次结构过深的类。 +继承太深的类可能令人困惑,并表明有必要重构。
+库中的所有超类都被视为单个超类,库被认为不可修改。
+ +使用继承深度限制字段可指定类的最大继承深度。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClassInitializer.html b/original-plugin-raw/zh/inspectionDescriptions/ClassInitializer.html new file mode 100644 index 000000000..265eb8dc3 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ClassInitializer.html @@ -0,0 +1,13 @@ + + +报告类中的非static
初始值设定项。
+某些编码标准禁止实例初始值设定项,建议使用构造函数或字段初始值设定项进行初始化。
+ 此外,删除 static
关键字可能会导致意外创建非 static
初始值设定项,造成模糊不清的错误。
+
此检查不报告匿名类中的实例初始值设定项。 + +
+ 使用仅在类具有一个或多个构造函数时警告选项,可忽略没有任何构造函数的类中的实例初始值设定项。 +
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClassInitializerMayBeStatic.html b/original-plugin-raw/zh/inspectionDescriptions/ClassInitializerMayBeStatic.html new file mode 100644 index 000000000..e39d9bd34 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ClassInitializerMayBeStatic.html @@ -0,0 +1,28 @@ + + +报告可以使之为static
的实例初始值设定项。
++ 如果实例初始值设定项不引用其类的任何非 static 成员,则可以为 static。 + static 初始值设定项在类解析后执行,而实例初始值设定项对此类的每个实例化执行。
+示例:
+
+ class A {
+ public static String CONSTANT;
+ {
+ CONSTANT = "Hello";
+ }
+ }
+
+在应用快速修复后:
+
+ class A {
+ public static String CONSTANT;
+ static {
+ CONSTANT = "Hello"; // 现在每个类仅实例化一次
+ }
+ }
+
+
+
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClassLoaderInstantiation.html b/original-plugin-raw/zh/inspectionDescriptions/ClassLoaderInstantiation.html
new file mode 100644
index 000000000..bc43d5069
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ClassLoaderInstantiation.html
@@ -0,0 +1,16 @@
+
+
+报告 java.lang.ClassLoader
类的实例化。
+虽然通常是良性的,但在任何安全审核中都应该仔细检查 ClassLoader
的任何实例化。
示例:
+ Class<?> loadExtraClass(String name) throws Exception {
+ try(URLClassLoader loader =
+ new URLClassLoader(new URL[]{new URL("extraClasses/")})) {
+ return loader.loadClass(name);
+ }
+ }
+
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClassMayBeInterface.html b/original-plugin-raw/zh/inspectionDescriptions/ClassMayBeInterface.html
new file mode 100644
index 000000000..9ac12b651
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ClassMayBeInterface.html
@@ -0,0 +1,44 @@
+
+
+报告可以转换为接口的 abstract
类。
+最好使用接口而不是类,因为 Java 不支持多类继承,而一个类可以实现多个接口。
+如果一个类没有超类(Object 以外)、只有 public static final
字段、public abstract
方法和 public
内部类,则可以将其转换为接口。
+
+
+
示例:
+
+abstract class Example {
+ public static final int MY_CONST = 42;
+ public abstract void foo();
+}
+
+class Inheritor extends Example {
+ @Override
+ public void foo() {
+ System.out.println(MY_CONST);
+ }
+}
+
+
+在应用快速修复后:
+ +
+interface Example {
+ int MY_CONST = 42;
+ void foo();
+}
+
+class Inheritor implements Example {
+ @Override
+ public void foo() {
+ System.out.println(MY_CONST);
+ }
+}
+
+配置检查:
+
+ 使用 Java 8 时报告包含非 abstract 方法的类 选项可用于仅报告其 static
和非 abstract 方法可以转换为 default
方法的类(仅适用于语言级别为 8 或更高时)。
+
+ + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClassName.html b/original-plugin-raw/zh/inspectionDescriptions/ClassName.html new file mode 100644 index 000000000..70e5cba9c --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ClassName.html @@ -0,0 +1,19 @@ + +
+报告不遵循推荐命名惯例的类名。 ++ 一致的命名会让阅读和理解代码变得更容易。 + 根据 Kotlin 官方样式指南,类名应以大写字母开头并使用驼峰拼写法。 +
+可以通过更改“模式”正则表达式来引入其他命名规则。
+示例:
+
+ class user(val name: String)
+
+该快速修复会根据 Kotlin 命名惯例重命名类:
+
+ class User(val name: String)
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClassNameDiffersFromFileName.html b/original-plugin-raw/zh/inspectionDescriptions/ClassNameDiffersFromFileName.html
new file mode 100644
index 000000000..44f7bbc46
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ClassNameDiffersFromFileName.html
@@ -0,0 +1,7 @@
+
+
+报告所属的文件名与其不匹配的顶层类名。
+虽然 Java 规范允许以这种方式命名非 public
类,但名称不匹配的文件可能令人困惑,并降低各种软件工具的实用性。
虽然偶尔使用此类名称是合理的,但通常是由于欠佳的命名方案而使用,可能冗余并且令人生厌。
+示例: +
+ package byteCode;
+ class ByteCodeAnalyzer {}
+
+只能在编辑器中采用快速修复来重命名这种类。
+ ++ + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClassNameSameAsAncestorName.html b/original-plugin-raw/zh/inspectionDescriptions/ClassNameSameAsAncestorName.html new file mode 100644 index 000000000..38d52b0e6 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ClassNameSameAsAncestorName.html @@ -0,0 +1,14 @@ + +
+报告与其某个超类的名称相同,而其完全限定名称仍然不同的类。 +这种类名可能令人困惑。 +示例:
+
+ package util;
+ abstract class Iterable<T> implements java.lang.Iterable<T> {}
+
+只能在编辑器中采用快速修复来重命名这种类。
+ + + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClassNestingDepth.html b/original-plugin-raw/zh/inspectionDescriptions/ClassNestingDepth.html new file mode 100644 index 000000000..7b08b687b --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ClassNestingDepth.html @@ -0,0 +1,8 @@ + + +报告嵌套内部类的数量超过指定最大值的类。 +将内部类嵌套在其他内部类中令人困惑,并表明可能有必要重构。
+ +使用嵌套限制字段可指定类允许的最大嵌套深度。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClassNewInstance.html b/original-plugin-raw/zh/inspectionDescriptions/ClassNewInstance.html new file mode 100644 index 000000000..d9205cb42 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ClassNewInstance.html @@ -0,0 +1,21 @@ + +
+报告对java.lang.Class.newInstance()
的调用。
++ 此方法会传播由无实参构造函数抛出的异常,包括已检查的异常。 使用此方法可以有效地绕过本由编译器执行的编译时异常检查。 +
+
+ 建议通过快速修复将该调用替换为对 java.lang.reflect.Constructor.newInstance()
方法的调用,这种方式将构造函数抛出的任何异常包装在(已检查的)java.lang.reflect.InvocationTargetException
中,从而可以避免这个问题。
+
示例:
+
+ clazz.newInstance()
+
+在应用快速修复后:
+
+ clazz.getConstructor().newInstance();
+
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClassOnlyUsedInOneModule.html b/original-plugin-raw/zh/inspectionDescriptions/ClassOnlyUsedInOneModule.html
new file mode 100644
index 000000000..8ce254869
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ClassOnlyUsedInOneModule.html
@@ -0,0 +1,13 @@
+
+
+报告符合以下情况的类:
+这种类可以移动到它们所依赖的模块中。
+ +仅适用于代码 | 检查代码或代码 | 分析代码 | 通过名称运行检查,并且不会在编辑器中报告。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClassOnlyUsedInOnePackage.html b/original-plugin-raw/zh/inspectionDescriptions/ClassOnlyUsedInOnePackage.html new file mode 100644 index 000000000..0a8ddeab9 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ClassOnlyUsedInOnePackage.html @@ -0,0 +1,8 @@ + + +报告如下类:不依赖于其软件包中的任何其他类,而是依赖于其他软件包中的类,并且本身仅是此其他软件包中类的依赖项。 +请考虑将这种类移到它们所依赖的软件包中。 + +仅适用于代码 | 检查代码或代码 | 分析代码 | 通过名称运行检查,并且不会在编辑器中报告。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClassReferencesSubclass.html b/original-plugin-raw/zh/inspectionDescriptions/ClassReferencesSubclass.html new file mode 100644 index 000000000..4a6b03fbc --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ClassReferencesSubclass.html @@ -0,0 +1,19 @@ + + +报告包含对其中一个子类进行了引用的类。 +此类引用可能令人困惑,并违反面向对象设计的多条规则。 +示例:
+
+ class Entity {
+ // 警告:该类引用了其子类
+ void compare(SimpleEntity entity) {
+ ...
+ }
+ }
+ class SimpleEntity extends Entity {
+ ...
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClassUnconnectedToPackage.html b/original-plugin-raw/zh/inspectionDescriptions/ClassUnconnectedToPackage.html
new file mode 100644
index 000000000..ae8dc10b0
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ClassUnconnectedToPackage.html
@@ -0,0 +1,8 @@
+
+
+报告如下类:不依赖于其软件包中的任何其他类,也不是其软件包中任何其他类的依赖项。
+这种类表明临时或不连贯的打包策略,并且通常可以有利地移动。
+
+仅适用于代码 | 检查代码或代码 | 分析代码 | 通过名称运行检查,并且不会在编辑器中报告。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClassWithMultipleLoggers.html b/original-plugin-raw/zh/inspectionDescriptions/ClassWithMultipleLoggers.html new file mode 100644 index 000000000..879e4c396 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ClassWithMultipleLoggers.html @@ -0,0 +1,20 @@ + + +报告声明了多个记录器的类。 +为应用程序提供统一的日志记录实现的一大重要步骤,是确保每个类都有一个专用的记录器。 +示例:
+
+ public class Critical {
+ protected static final Logger LOG = Logger.getLogger(Critical.class);
+
+ protected static final Logger myLogger = Logger.getLogger(getClass());
+ }
+
+
++使用下表可指定 Logger 类名。 +此检查将报告声明多个字段具有所指定类的类型之一的类。 +
+ + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClassWithOnlyPrivateConstructors.html b/original-plugin-raw/zh/inspectionDescriptions/ClassWithOnlyPrivateConstructors.html new file mode 100644 index 000000000..ee47be10d --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ClassWithOnlyPrivateConstructors.html @@ -0,0 +1,7 @@ + +
+报告仅包含private
构造函数的类。
+只有 private
构造函数的类不能在文件外扩展,应声明为 final
。
对这种类的任何依赖项的修改都可能需要更改该类,从而使其容易出现不稳定。
+仅报告顶级类。
+ +使用最大依赖项数字段可指定类允许的最大依赖项数。
+仅适用于代码 | 检查代码或代码 | 分析代码 | 通过名称运行检查,并且不会在编辑器中报告。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClassWithTooManyDependents.html b/original-plugin-raw/zh/inspectionDescriptions/ClassWithTooManyDependents.html new file mode 100644 index 000000000..406c031e6 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ClassWithTooManyDependents.html @@ -0,0 +1,10 @@ + + +报告被过多其他类直接依赖的类。 +对这种类的任何修改都可能需要更改许多其他类,这可能开销巨大。
+仅报告顶级类。
+ +使用下面的字段可指定类的最大允许依赖项数。
+仅适用于代码 | 检查代码或代码 | 分析代码 | 通过名称运行检查,并且不会在编辑器中报告。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClassWithTooManyTransitiveDependencies.html b/original-plugin-raw/zh/inspectionDescriptions/ClassWithTooManyTransitiveDependencies.html new file mode 100644 index 000000000..f12ac6a27 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ClassWithTooManyTransitiveDependencies.html @@ -0,0 +1,10 @@ + + +报告直接或间接依赖于过多其他类的类。 +对这种类的任何依赖项的修改都可能需要更改该类,从而使其容易出现不稳定。
+仅报告顶级类。
+ +使用最大传递依赖项数字段可指定类允许的最大直接或间接依赖项数。
+仅适用于代码 | 检查代码或代码 | 分析代码 | 通过名称运行检查,并且不会在编辑器中报告。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClassWithTooManyTransitiveDependents.html b/original-plugin-raw/zh/inspectionDescriptions/ClassWithTooManyTransitiveDependents.html new file mode 100644 index 000000000..bd4a4d745 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ClassWithTooManyTransitiveDependents.html @@ -0,0 +1,11 @@ + + +报告被过多其他类直接或间接依赖的类。 +对这种类的任何修改都可能需要更改许多其他类,这可能开销巨大。
+仅报告顶级类。
+ +使用最大传递依赖项数字段可指定类允许的最大直接或间接依赖项数。
+仅适用于代码 | 检查代码或代码 | 分析代码 | 通过名称运行检查,并且不会在编辑器中报告。
+ + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClassWithoutConstructor.html b/original-plugin-raw/zh/inspectionDescriptions/ClassWithoutConstructor.html new file mode 100644 index 000000000..c0c5bbd4e --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ClassWithoutConstructor.html @@ -0,0 +1,9 @@ + + +报告没有构造函数的类。 +某些编码标准禁止这种类。
+ ++ + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClassWithoutLogger.html b/original-plugin-raw/zh/inspectionDescriptions/ClassWithoutLogger.html new file mode 100644 index 000000000..329c304be --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ClassWithoutLogger.html @@ -0,0 +1,21 @@ + +
+报告没有声明记录器的类。 +确保每个类都有一个专用的记录器是为应用程序提供统一的日志记录实现的重要步骤。 此检查不报告接口、枚举、注解、内部类和 abstract 类。
+示例:
+
+ public class NoLoggerDeclared {
+
+ int calculateNthDigitOfPi(int n) {
+ // todo
+ return 1;
+ }
+ }
+
+
++ 使用 Options 部分中的表可以指定记录器类名。 +此检查将报告未声明具有指定类之一类型的字段的类。 + + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ClassWithoutNoArgConstructor.html b/original-plugin-raw/zh/inspectionDescriptions/ClassWithoutNoArgConstructor.html new file mode 100644 index 000000000..92cce4d07 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ClassWithoutNoArgConstructor.html @@ -0,0 +1,12 @@ + +
+报告没有无实参构造函数的类。 +此类构造函数在某些上下文中是必要的。 举个例子,如果需要使用反射来创建类。
+ ++ 使用下面的复选框可忽略没有显式构造函数的类。 + 编译器为这种类提供了默认的无实参构造函数。 +
+ + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/Clazy.html b/original-plugin-raw/zh/inspectionDescriptions/Clazy.html new file mode 100644 index 000000000..bfa9a0921 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/Clazy.html @@ -0,0 +1,6 @@ + +
+报告 Qt 相关的编译器警告,从不需要的内存分配到滥用的 API。 +2021.1 最新变化
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/CloneCallsConstructors.html b/original-plugin-raw/zh/inspectionDescriptions/CloneCallsConstructors.html new file mode 100644 index 000000000..fc2f84b85 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/CloneCallsConstructors.html @@ -0,0 +1,8 @@ + + +报告对clone()
方法中的对象构造函数的调用。
+与其直接创建这些对象来支持后续的子类,不如调用 clone()
来实例化 clone()
方法中的对象。
+此检查不会报告被声明为 final
的 clone()
方法或者final
类上的 clone()
方法。
throws CloneNotSupportedException
的 clone()
方法。
+如果没有声明 throws CloneNotSupportedException
,该方法的子类将不能以标准方式禁止克隆。 此检查不会报告声明为 final
的 clone()
方法和 final
类内的 clone()
方法。
配置检查:
+使用仅对 'protected' 克隆方法发出警告选项可以指示此检查仅对 protected clone()
方法发出警告。
+Effective Java 一书(第二版和第三版)建议在 public
方法上省略 CloneNotSupportedException
声明,因为不抛出已检查的异常的方法更容易使用。
+
示例:
+
+ public class Example implements Cloneable {
+ // 方法未声明 ’throws CloneNotSupportedException‘
+ protected Object clone() {
+ try {
+ return super.clone();
+ } catch (CloneNotSupportedException e) {
+ return null;
+ }
+ }
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CloneInNonCloneableClass.html b/original-plugin-raw/zh/inspectionDescriptions/CloneInNonCloneableClass.html
new file mode 100644
index 000000000..e45622ee0
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CloneInNonCloneableClass.html
@@ -0,0 +1,11 @@
+
+
+报告重写 clone()
方法但不实现 Cloneable
接口的类。
+这通常表示编程错误。
+
+
+ 使用仅对 'public' 克隆方法发出警告选项可以忽略不是 public
的方法。
对于设计为继承的类,您可以选择不实现 Cloneable
接口,而是重写 clone()
并将其声明为 protected
,并决定是否在子类中实现 Cloneable
接口。
+
clone()
方法。
+clone()
方法的返回类型通常为 java.lang.Object
,这导致其难以被客户端使用。
+Effective Java(第二版和第三版)建议将 clone()
方法的返回类型设为与其返回对象的类的类型相同。
示例:
+
+ class Foo implements Cloneable {
+ public Object clone() {
+ try {
+ return super.clone();
+ } catch (CloneNotSupportedException e) {
+ throw new AssertionError();
+ }
+ }
+ }
+
+在应用快速修复后:
+
+ class Foo implements Cloneable {
+ public Foo clone() {
+ try {
+ return (Foo)super.clone();
+ } catch (CloneNotSupportedException e) {
+ throw new AssertionError();
+ }
+ }
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CloneableClassInSecureContext.html b/original-plugin-raw/zh/inspectionDescriptions/CloneableClassInSecureContext.html
new file mode 100644
index 000000000..5b8afbb5b
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CloneableClassInSecureContext.html
@@ -0,0 +1,23 @@
+
+
+报告可能被克隆的类。
+
+ 如果一个类支持 Cloneable
接口,并且它的 clone()
方法没有定义为立即抛出错误,则该类可以被克隆。 在用于安全使用的代码中,可克隆类可能是危险的。
+
示例:
+class SecureBean implements Cloneable {}
+在应用快速修复后:
class SecureBean {}
++当类扩展现有的可克隆类或实现可克隆接口时,应用该快速修复后,代码可能如下所示: +
class SecureBean extends ParentBean {
+ @Override
+ protected SecureBean clone() throws CloneNotSupportedException {
+ throw new CloneNotSupportedException();
+ }
+}
+
+
++ + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/CloneableImplementsClone.html b/original-plugin-raw/zh/inspectionDescriptions/CloneableImplementsClone.html new file mode 100644 index 000000000..8c5b74a6f --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/CloneableImplementsClone.html @@ -0,0 +1,38 @@ + +
+报告实现Cloneable
接口但不重写 clone()
方法的类。
+这种类使用 clone()
的默认实现,它不是 public
,而是 protected
,并且不复制该类的可变状态。
可以通过快速修复生成基本的 clone()
方法,它可以作为 Cloneable
类所期望的正常运行的 clone()
方法的基础。
示例:
+
+ public class Data implements Cloneable {
+ private String[] names;
+ }
+
+在应用快速修复后:
+
+ public class Data implements Cloneable {
+ private String[] names;
+
+ @Override
+ public Data clone() {
+ try {
+ Data clone = (Data) super.clone();
+ // TODO:在此处复制可变状态,因此克隆无法更改原始克隆的内部项
+ return clone;
+ } catch (CloneNotSupportedException e) {
+ throw new AssertionError();
+ }
+ }
+ }
+
+
+
+使用忽略由于继承而可克隆的类选项可以忽略因继承自 Cloneable
类而 Cloneable
的类。
使用忽略需要 Cloneable 才能调用超类的 clone() 方法的情况选项可以忽略因从超类调用 clone()
方法而需要实现 Cloneable
的类。
示例:
+
+ Comparable<String> c = o -> {return 0;};
+
+在应用快速修复后:
+
+ Comparable<String> c = o -> 0;
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CoffeeScriptFunctionSignatures.html b/original-plugin-raw/zh/inspectionDescriptions/CoffeeScriptFunctionSignatures.html
new file mode 100644
index 000000000..74c71ffa0
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CoffeeScriptFunctionSignatures.html
@@ -0,0 +1,6 @@
+
+
+检查 CoffeeScript 调用表达式中与所引用函数的签名不匹配的实参,包括实参的类型、数目和顺序。
+也报告在形参和返回类型方面与被重载函数不匹配的重载函数。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CoffeeScriptInfiniteLoop.html b/original-plugin-raw/zh/inspectionDescriptions/CoffeeScriptInfiniteLoop.html
new file mode 100644
index 000000000..96e9b9344
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CoffeeScriptInfiniteLoop.html
@@ -0,0 +1,6 @@
+
+
+报告只能通过抛出异常来退出的 for
、
+while
或 do
语句。 虽然此类语句可能是正确的,但它们通常表明有编码错误。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CoffeeScriptLiteralNotFunction.html b/original-plugin-raw/zh/inspectionDescriptions/CoffeeScriptLiteralNotFunction.html
new file mode 100644
index 000000000..d8b5a7d7e
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CoffeeScriptLiteralNotFunction.html
@@ -0,0 +1,5 @@
+
+
+报告作为函数调用的对象文字表达式。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CoffeeScriptModulesDependencies.html b/original-plugin-raw/zh/inspectionDescriptions/CoffeeScriptModulesDependencies.html
new file mode 100644
index 000000000..84caa3ead
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CoffeeScriptModulesDependencies.html
@@ -0,0 +1,6 @@
+
+
+报告未通过 import
语句引用的模块。
+建议插入 import 语句。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/CoffeeScriptSillyAssignment.html b/original-plugin-raw/zh/inspectionDescriptions/CoffeeScriptSillyAssignment.html new file mode 100644 index 000000000..25a799dc2 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/CoffeeScriptSillyAssignment.html @@ -0,0 +1,5 @@ + + +报告 CoffeeScript 内容中任何x = x
形式的赋值。 此类赋值通常表明有编码错误。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CoffeeScriptSwitchStatementWithNoDefaultBranch.html b/original-plugin-raw/zh/inspectionDescriptions/CoffeeScriptSwitchStatementWithNoDefaultBranch.html
new file mode 100644
index 000000000..417ad1503
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CoffeeScriptSwitchStatementWithNoDefaultBranch.html
@@ -0,0 +1,6 @@
+
+
+报告 CoffeeScript 内容中没有 default
分支的 switch
语句。 如果意外情况被无提示地忽略,
+此类语句会导致难以跟踪错误。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CoffeeScriptUnusedLocalSymbols.html b/original-plugin-raw/zh/inspectionDescriptions/CoffeeScriptUnusedLocalSymbols.html
new file mode 100644
index 000000000..f27703d70
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CoffeeScriptUnusedLocalSymbols.html
@@ -0,0 +1,5 @@
+
+
+报告本地可以访问的并且未使用的形参、局部变量、函数、类或 private 成员声明。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CollectHeadOption.html b/original-plugin-raw/zh/inspectionDescriptions/CollectHeadOption.html
new file mode 100644
index 000000000..0d1133b48
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CollectHeadOption.html
@@ -0,0 +1,16 @@
+
+
+报告 collection.collect(f).headOption
并建议在可能的情况下将其替换为 collection.collectFirst(f)
。
示例:
+
+ val x: Set[Int]
+ x.collect(f).headOption
+
+在应用快速修复后:
+
+ val x: Set[Int]
+ x.collectFirst(f)
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CollectionAddAllCanBeReplacedWithConstructor.html b/original-plugin-raw/zh/inspectionDescriptions/CollectionAddAllCanBeReplacedWithConstructor.html
new file mode 100644
index 000000000..83e380c09
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CollectionAddAllCanBeReplacedWithConstructor.html
@@ -0,0 +1,16 @@
+
+
+在使用无参构造函数实例化集合后,立即报告 Collection.addAll()
和 Map.putAll()
调用。
+此类结构可以替换为对形参化构造函数的单次调用,从而简化代码。 此外,对于某些集合,替换可能会更高效。
+示例:
+ Set<String> set = new HashSet<>();
+ set.addAll(Arrays.asList("alpha", "beta", "gamma"));
+
+可以替换为:
+ Set<String> set = new HashSet<>(Arrays.asList("alpha", "beta", "gamma"));
+
+
++默认情况下支持标准的 JDK 集合类。 此外,还可以在检查选项中指定其他类。 + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/CollectionAddedToSelf.html b/original-plugin-raw/zh/inspectionDescriptions/CollectionAddedToSelf.html new file mode 100644 index 000000000..b4479ff09 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/CollectionAddedToSelf.html @@ -0,0 +1,15 @@ + +
+报告对java.util.Collection
+或 java.util.Map
的方法调用的实参是集合或映射本身的情况。
+由于复制粘贴,原始类型的代码中可能会出现此类情况。
+
+示例:
+
+ ArrayList list = new ArrayList<>();
+ list.add(list); // 此处为警告
+ return list.hashCode(); // 抛出 StackOverflowError
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CollectionContainsUrl.html b/original-plugin-raw/zh/inspectionDescriptions/CollectionContainsUrl.html
new file mode 100644
index 000000000..9b72d6db8
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CollectionContainsUrl.html
@@ -0,0 +1,16 @@
+
+
+报告包含 java.net.URL
对象的 java.util.Set
和 java.util.Map
的实例化。
+
+ 由于对 URL
的 equals()
和 hashCode()
方法的调用,将 URL
对象添加到此类集合可能会导致性能问题。
+
+ URL
的 equals()
和 hashCode()
方法使用 DNS 查找,这取决于网络的可用性,且 DNS 服务器的速度可能会导致显著延迟。
+
示例:
+
+ Set<URL> set = new HashSet<URL>();
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CollectionsFieldAccessReplaceableByMethodCall.html b/original-plugin-raw/zh/inspectionDescriptions/CollectionsFieldAccessReplaceableByMethodCall.html
new file mode 100644
index 000000000..985304278
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CollectionsFieldAccessReplaceableByMethodCall.html
@@ -0,0 +1,15 @@
+
+
+报告 java.util.Collections
字段的用法:EMPTY_LIST
、EMPTY_MAP
+或 EMPTY_SET
。 这些字段用法可以替换为以下方法调用:emptyList()
、emptyMap()
或 emptySet()
。
+此类方法调用会防止编译器发出未检查的警告,因为可以推断出类型形参。
+示例:
+List<Integer> emptyList = Collections.EMPTY_LIST;
+在应用快速修复后:
+List<Integer> emptyList = Collections.emptyList();
+
+该检查仅在项目或模块的语言级别为 5 或更高时有效。
++ + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/CollectionsMustHaveInitialCapacity.html b/original-plugin-raw/zh/inspectionDescriptions/CollectionsMustHaveInitialCapacity.html new file mode 100644 index 000000000..51ed17f62 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/CollectionsMustHaveInitialCapacity.html @@ -0,0 +1,19 @@ + +
+报告在不指定初始容量的情况下实例化新Collection
对象的尝试。
++ 如果未指定初始容量,则使用默认容量,这很少是最佳选择。 如果在超出初始容量时需要重新分配空间和复制内存,则未能为集合指定初始容量可能会导致性能问题。 + 此检查会检查在检查的设置中列出的类的分配。 +
+示例:
+
+ new HashMap<String, String>();
+
+
+使用以下选项配置检查:
+for
循环的 update 部分中的逗号表达式
+被忽略。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CommandLineInspection.html b/original-plugin-raw/zh/inspectionDescriptions/CommandLineInspection.html
new file mode 100644
index 000000000..2703c8ace
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CommandLineInspection.html
@@ -0,0 +1,7 @@
+
+
+报告您在控制台中键入的命令实参顺序不正确的问题。 此检查还会验证选项名称和实参是否正确。
+如果您将使用命令行界面(例如 Django 中的 manage.py),请不要禁用此检查。
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/CommentedOutCode.html b/original-plugin-raw/zh/inspectionDescriptions/CommentedOutCode.html new file mode 100644 index 000000000..f40369385 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/CommentedOutCode.html @@ -0,0 +1,9 @@ + + +报告包含 Java 代码的注释。 +通常,被注释掉的代码很快就会过时并且会引起误解。 +由于大多数项目使用某种版本控制系统,因此最好完全删除注释掉的代码并改用 VCS 历史记录。
+ +2020.3 最新变化 + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ComparableImplementedButEqualsNotOverridden.html b/original-plugin-raw/zh/inspectionDescriptions/ComparableImplementedButEqualsNotOverridden.html new file mode 100644 index 000000000..3c33185aa --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ComparableImplementedButEqualsNotOverridden.html @@ -0,0 +1,38 @@ + +
+报告实现java.lang.Comparable
但不重写 equals()
的类。
+
+ 如果未重写 equals()
,equals()
实现与 compareTo()
实现将不一致。 如果将这种类的对象添加到 java.util.SortedSet
等集合,该集合将违反根据 equals()
定义的 java.util.Set
的约定。
+
示例:
+
+ class Length implements Comparable<Length> {
+ private int cm = 0;
+
+ @Override
+ public int compareTo(@NotNull Length o) {
+ if (cm == o.cm) return 0;
+ return cm < o.cm ? -1 : 1;
+ }
+ }
+
+在应用快速修复后:
+
+ class Length implements Comparable<Length> {
+ private int cm = 0;
+
+ @Override
+ public int compareTo(@NotNull Length o) {
+ if (cm == o.cm) return 0;
+ return cm < o.cm ? -1 : 1;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ return o instanceof Length && compareTo((Length) o) == 0;
+ }
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ComparatorCombinators.html b/original-plugin-raw/zh/inspectionDescriptions/ComparatorCombinators.html
new file mode 100644
index 000000000..a72caa8cc
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ComparatorCombinators.html
@@ -0,0 +1,26 @@
+
+
+报告定义为可以使用 Comparator.comparing()
调用表示的 lambda 表达式的 Comparator
实例。
+还会报告可以替换为 Comparator.thenComparing()
表达式的链式比较。
+示例:
+
+ myList.sort((person1, person2) -> person1.getName().compareTo(person2.getName()));
+
+ myList2.sort((person1, person2) -> {
+ int res = person1.first().compareTo(person2.first());
+ if(res == 0) res = person1.second().compareTo(person2.second());
+ if(res == 0) res = person1.third() - person2.third();
+ return res;
+ });
+
+在应用快速修复后:
+
+ myList.sort(Comparator.comparing(Person::getName));
+
+ myList2.sort(Comparator.comparing(Person::first)
+ .thenComparing(Person::second)
+ .thenComparingInt(Person::third));
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ComparatorMethodParameterNotUsed.html b/original-plugin-raw/zh/inspectionDescriptions/ComparatorMethodParameterNotUsed.html
new file mode 100644
index 000000000..bb13ae6e8
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ComparatorMethodParameterNotUsed.html
@@ -0,0 +1,21 @@
+
+
+报告 Comparator.compare()
实现中的问题。
+报告的情况如下:
+0
。 此类比较器违反了约定,当遇到相同的元素时,会产生不可预测的结果。 特别是,某些数据可能会出现异常而导致排序失败。示例:
+
+ Comparator<String> lambda =
+ (a, b) -> a.length() > b.length()
+ ? 0
+ : Math.random() > 0.5 ? -1 : 1;
+
+
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ComparatorNotSerializable.html b/original-plugin-raw/zh/inspectionDescriptions/ComparatorNotSerializable.html
new file mode 100644
index 000000000..09fa07f27
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ComparatorNotSerializable.html
@@ -0,0 +1,31 @@
+
+
+报告实现 java.lang.Comparator
但不实现 java.io.Serializable
的类。
+
+ 如果使用不可序列化的比较器来构建 java.util.TreeMap
或 java.util.TreeSet
之类的有序集合,那么该集合也将不可序列化。 这可能会导致意外且难以诊断的错误。
+
+ java.lang.Comparator
的子类通常无状态,因此只需将它们标记为可序列化,即可轻松避免此类问题。
+
示例:
+
+ class Foo implements Comparator { // 警告
+ @Override
+ public int compare(Object o1, Object o2) {
+ /* ... */
+ }
+ }
+
+在应用快速修复后:
+
+ class Foo implements Comparator, Serializable { // 此处无警告
+ @Override
+ public int compare(Object o1, Object o2) {
+ /* ... */
+ }
+ }
+
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ComparatorResultComparison.html b/original-plugin-raw/zh/inspectionDescriptions/ComparatorResultComparison.html
new file mode 100644
index 000000000..22f1c7066
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ComparatorResultComparison.html
@@ -0,0 +1,25 @@
+
+
+报告 Comparator.compare()
或 Comparable.compareTo()
调用结果与非零常量的比较。
+根据约定,这些方法可以返回任何整数(不只是 -1、0 或 1),因此与特定数字比较是一种不好的做法。 某些广泛使用的比较方法(例如 String.compareTo()
)实际上返回 [-1..1] 范围之外的值,此类比较可能会导致不正确的程序行为。
+示例:
+
+ void validate(String s1, String s2) {
+ // 与 1 比较不正确
+ if (s1.compareTo(s2) == 1) {
+ throw new IllegalArgumentException("Incorrect order");
+ }
+ }
+
+在应用快速修复后:
+
+ void validate(String s1, String s2) {
+ if (s1.compareTo(s2) > 0) {
+ throw new IllegalArgumentException("Incorrect order");
+ }
+ }
+
+
+2017.2 最新变化
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/CompareToUsesNonFinalVariable.html b/original-plugin-raw/zh/inspectionDescriptions/CompareToUsesNonFinalVariable.html new file mode 100644 index 000000000..6ad18bcb5 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/CompareToUsesNonFinalVariable.html @@ -0,0 +1,39 @@ + + +报告对compareTo()
实现中的非 final
字段的访问。
+
+ 此类访问可能导致 compareTo()
在对象生命周期的不同时刻返回不同的结果,进而可能在使用 java.util.TreeSet
等标准集合类时导致问题。
+
+ 只有在对该字段不具备写入访问权限时,才可以通过快速修复将该字段设为 final
,否则不建议进行修正。
+
示例:
+
+ class Foo implements Comparable<Foo>{
+ private int index;
+ Foo(int idx) {
+ index = idx;
+ }
+ @Override
+ public int compareTo(Foo foo) {
+ return Integer.compare(this.index, foo.index);
+ }
+ }
+
+在应用快速修复后:
+
+ class Foo implements Comparable<Foo>{
+ private final int index;
+ Foo(int idx) {
+ index = idx;
+ }
+ @Override
+ public int compareTo(Foo foo) {
+ return Integer.compare(this.index, foo.index);
+ }
+ }
+
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ComparingDiffCollectionKinds.html b/original-plugin-raw/zh/inspectionDescriptions/ComparingDiffCollectionKinds.html
new file mode 100644
index 000000000..01eb9d730
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ComparingDiffCollectionKinds.html
@@ -0,0 +1,17 @@
+
+
+报告比较不同类别的 Scala 集合的情况。
+不同类别(Set、Seq、Map 或 Iterator)的 Scala 集合不能相等,也不应与数组进行比较。 此检查建议将其中一个集合转换为同一类别。
+示例:
+
+ seq == iterator
+ seq != array
+
+在应用快速修复后:
+
+ seq.toIterator == iterator or seq == iterator.toSeq
+ seq != array.toSeq
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ComparingLength.html b/original-plugin-raw/zh/inspectionDescriptions/ComparingLength.html
new file mode 100644
index 000000000..4d595ac0a
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ComparingLength.html
@@ -0,0 +1,32 @@
+
+
+报告比较 .length
或 .size
,并建议将其替换为 .sizeIs
。
示例:
+
+ var seq: Seq[Int]
+ seq.length == n
+ seq.length != n
+ seq.length < n
+ seq.length > n
+
+ seq.size == n
+ seq.size != n
+ seq.size < n
+ seq.size > n
+
+在应用快速修复后:
+
+ var seq: Seq[Int]
+ seq.sizeIs == n
+ seq.sizeIs != n
+ seq.sizeIs < n
+ seq.sizeIs > n
+
+ seq.sizeIs == n
+ seq.sizeIs != n
+ seq.sizeIs < n
+ seq.sizeIs > n
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ComparingUnrelatedTypes.html b/original-plugin-raw/zh/inspectionDescriptions/ComparingUnrelatedTypes.html
new file mode 100644
index 000000000..14c31d85e
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ComparingUnrelatedTypes.html
@@ -0,0 +1,11 @@
+
+
+报告表达式的比较 (==
and !=
),两者的类型不能相同。
示例:
+
+ 1 == "test"
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ComparisonOfShortAndChar.html b/original-plugin-raw/zh/inspectionDescriptions/ComparisonOfShortAndChar.html
new file mode 100644
index 000000000..0adcbf723
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ComparisonOfShortAndChar.html
@@ -0,0 +1,11 @@
+
+
+报告 short
与 char
值之间的相等比较。
+此类比较可能会导致难以捉摸的错误,因为虽然两个值都是 2 字节长,short
值有符号,而 char
值无符号。
示例:
+
+if (Character.MAX_VALUE == shortValue()) {} // 永远不能为 true
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ComparisonToNaN.html b/original-plugin-raw/zh/inspectionDescriptions/ComparisonToNaN.html
new file mode 100644
index 000000000..400a98214
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ComparisonToNaN.html
@@ -0,0 +1,16 @@
+
+
+报告任何与 Double.NaN
或 Float.NaN
的比较。
+此类比较毫无意义,因为 NaN 不等于任何内容,包括不等于自身。
+改用 Double.isNaN()
或 Float.isNaN()
方法。
+示例:
+
+ if (x == Double.NaN) {...}
+
+在应用快速修复后:
+
+ if (Double.isNaN(x)) {...}
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ComplexRedundantLet.html b/original-plugin-raw/zh/inspectionDescriptions/ComplexRedundantLet.html
new file mode 100644
index 000000000..f980d14ef
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ComplexRedundantLet.html
@@ -0,0 +1,27 @@
+
+
+报告基于实参的冗余 let
调用。
+当 lambda 形参仅用作调用表达式中的限定符时,let
冗余。
如果需要为限定表达式命名,请声明一个局部变量。
+示例:
+
+ fun splitNumbers() {
+ "1,2,3".let { it.split(',') }
+ }
+
+该快速修复会移除额外的 let()
调用:
+ fun example() {
+ "1,2,3".split(',')
+ }
+
+或者:
+
+ fun splitNumbers() {
+ val numbers = "1,2,3"
+ numbers.split(',')
+ }
+
+
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ComponentNotRegistered.html b/original-plugin-raw/zh/inspectionDescriptions/ComponentNotRegistered.html
new file mode 100644
index 000000000..0b2f68059
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ComponentNotRegistered.html
@@ -0,0 +1,18 @@
+
+
+报告未在 plugin.xml
描述符中注册的插件组件和操作。
++ 这在使用“创建类”意图时可简化新组件的开发,并且可以帮助跟踪潜在的过时组件。 +
+
+ 提供的用于注册组件的快速修复将在 plugin.xml
描述符中添加必要的注册。
+
配置检查:
+plugin.xml
描述符中未正确注册的插件组件(组件和操作)。
++ 报告的问题如下: +
+plugin.xml
)plugin.xml
)plugin.xml
)ProjectComponent
注册为应用程序组件,或者类完全没有实现任何组件接口(plugin.xml
和 Java 代码)
+ public
,并且必须有 public 无实参构造函数。 此外,操作和组件实现类不得为 abstract(plugin.xml
和 Java 代码)
+ plugin.xml
)配置检查:
+plugin.xml
描述符中的检查。报告 Docker Compose 文件中未加引号的端口映射。
+
+ 根据 Compose 文件规范,HOST:CONTAINER
格式的映射端口在使用小于 60 的容器端口时可能会导致错误的结果,因为 YAML 会将格式为 xx:yy
的数字解析为六十进制值。
+ 因此,我们建议始终将端口映射明确指定为字符串。
+
示例:
+
+ ports:
+ - 3000
+ - 3000-3005
+ - 22:22
+ - 8080:8080
+
+在应用快速修复后:
+
+ ports:
+ - "3000"
+ - "3000-3005"
+ - "22:22"
+ - "8080:8080"
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ComposerJsonFileReferencesInspection.html b/original-plugin-raw/zh/inspectionDescriptions/ComposerJsonFileReferencesInspection.html
new file mode 100644
index 000000000..b534583cd
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ComposerJsonFileReferencesInspection.html
@@ -0,0 +1,5 @@
+
+
+报告 composer.json 中未解析的文件引用。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/CompoundInitializers.html b/original-plugin-raw/zh/inspectionDescriptions/CompoundInitializers.html
new file mode 100644
index 000000000..2f438c1a1
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/CompoundInitializers.html
@@ -0,0 +1,5 @@
+
+
+在此处写下您的描述
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConditionCoveredByFurtherCondition.html b/original-plugin-raw/zh/inspectionDescriptions/ConditionCoveredByFurtherCondition.html
new file mode 100644
index 000000000..e5fde48ad
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConditionCoveredByFurtherCondition.html
@@ -0,0 +1,9 @@
+
+
+报告由于后续条件完全覆盖而变得冗余的条件。
+例如,在 value != -1 && value > 0
条件下,第一部分是冗余的:如果它为 false,那么第二部分也为 false。
+或者在像 obj != null && obj instanceof String
这样的条件下,null 检查是冗余的,因为 instanceof
运算符意味着非 null。
2018.3 最新变化
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConditionSignal.html b/original-plugin-raw/zh/inspectionDescriptions/ConditionSignal.html new file mode 100644 index 000000000..fea58b12e --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ConditionSignal.html @@ -0,0 +1,6 @@ + + +报告对java.util.concurrent.locks.Condition.signal()
的调用。 虽然偶尔有用,但在几乎所有情况下,signalAll()
都是更好、更安全的选择。
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConditionalBreakInInfiniteLoop.html b/original-plugin-raw/zh/inspectionDescriptions/ConditionalBreakInInfiniteLoop.html
new file mode 100644
index 000000000..6fa153f6a
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConditionalBreakInInfiniteLoop.html
@@ -0,0 +1,19 @@
+
+
+报告在循环开始或结束处的条件中断,并建议使用循环条件来缩短代码。
+示例:
+
+ while (true) {
+ if (i == 23) break;
+ i++;
+ }
+
+在应用快速修复后:
+
+ while (i != 23) {
+ i++;
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConditionalCanBeOptional.html b/original-plugin-raw/zh/inspectionDescriptions/ConditionalCanBeOptional.html
new file mode 100644
index 000000000..ce36eb0aa
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConditionalCanBeOptional.html
@@ -0,0 +1,17 @@
+
+
+报告 null 检查条件并建议用 Optional
链替换它们。
+示例:
+
+ return str == null ? "" : str.trim();
+
+应用快速修复后:
+return Optional.ofNullable(str).map(String::trim).orElse("");
+
+虽然替换并不总是更短,但它可能有助于进一步重构(例如,将方法返回值更改为 Optional
)。
请注意,当条件的非 null 分支返回 null 值时,相应的映射步骤将产生一个空的 Optional
,可能会改变语义。 如果不能静态证明保留语义,则快速修复操作名称将包含 “(可能更改语义)” 通知,并关闭检查高亮显示。
仅当项目或模块的语言级别为 8 或更高时,此检查才会报告。
+2018.1 最新变化
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConditionalCanBePushedInsideExpression.html b/original-plugin-raw/zh/inspectionDescriptions/ConditionalCanBePushedInsideExpression.html new file mode 100644 index 000000000..2052e8746 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ConditionalCanBePushedInsideExpression.html @@ -0,0 +1,19 @@ + + +报告满足以下条件表达式:带有then
和 示例:
+
+ double g(int a, int b) {
+ return a == b ? Math.cos(0) : Math.cos(1);
+ }
+
+在应用快速修复后:
+
+ double g(int a, int b) {
+ return Math.cos(a == b ? 0 : 1);
+ }
+
+
+2017.2 最新变化
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConditionalExpression.html b/original-plugin-raw/zh/inspectionDescriptions/ConditionalExpression.html new file mode 100644 index 000000000..14058297e --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ConditionalExpression.html @@ -0,0 +1,29 @@ + + +报告三元条件运算符的用法并建议将它们转换为if
/else
语句。
+一些代码标准禁止使用条件运算符。
+示例:
+
+ Object result = (condition) ? foo() : bar();
+
+在应用快速修复后:
+
+ Object result;
+ if (condition) {
+ comp = foo();
+ }
+ else {
+ comp = bar();
+ }
+
+
+配置检查:
+使用 对简单赋值和返回值忽略 选项忽略简单的赋值和返回并允许以下结构:
+
+ String s = (foo == null) ? "" : foo.toString();
+
+
+ 在不可能用 if 语句自动替换的上下文中(例如,当条件表达式用作 super()
构造函数调用),使用 忽略无法使用 if 语句的位置 选项来忽略条件表达式。
+
if
语句。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConditionalExpressionWithIdenticalBranches.html b/original-plugin-raw/zh/inspectionDescriptions/ConditionalExpressionWithIdenticalBranches.html
new file mode 100644
index 000000000..407f5fe78
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConditionalExpressionWithIdenticalBranches.html
@@ -0,0 +1,17 @@
+
+
+报告包含相同 then
和 else
分支的条件表达式。
+此类表达式几乎肯定表明有错误。 该检查提供了一种折叠条件表达式的修正。
+示例:
+
+ int y = x == 10 ? 4 : 4;
+
+在应用快速修复后:
+
+ int y = 4;
+
+
++ + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConditionalExpressionWithIdenticalBranchesJS.html b/original-plugin-raw/zh/inspectionDescriptions/ConditionalExpressionWithIdenticalBranchesJS.html new file mode 100644 index 000000000..bb24b790d --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ConditionalExpressionWithIdenticalBranchesJS.html @@ -0,0 +1,5 @@ + +
+报告具有相同的then
和 else
分支的三元条件表达式。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConfigurationProperties.html b/original-plugin-raw/zh/inspectionDescriptions/ConfigurationProperties.html
new file mode 100644
index 000000000..8f566cc8f
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConfigurationProperties.html
@@ -0,0 +1,18 @@
+
+
+报告 @ConfigurationProperties
注解中定义的无效前缀:
+ 检查在使用 @ConfigurationProperties
注解且未通过 @EnableConfigurationProperties
注册、标记为 Spring 组件或通过 @ConfigurationPropertiesScan
扫描的类中触发。
+ 当项目或模块的 Spring Boot 版本设置为 2.2.0 或更高版本时,此检查仅在使用 @ConfigurationProperties
注解且未通过 @ConfigurationPropertiesScan
扫描的类中触发。
+
2018.3 最新变化
+ + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConflictingAnnotations.html b/original-plugin-raw/zh/inspectionDescriptions/ConflictingAnnotations.html new file mode 100644 index 000000000..fa57eaa8a --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ConflictingAnnotations.html @@ -0,0 +1,8 @@ + + +
+ 报告冲突的 Guice 注解。
+ 例如,同时使用 @ImplementedBy
和 @ProvidedBy
,或者 @Singleton
和 @SessionScoped
。
+
get
或 set
方法自动生成的合成属性相冲突的扩展属性。
+应移除或重命名此类属性,以避免将来在编译器中进行更改时破坏代码。
+该快速修复会删除扩展属性。
+示例:
+
+ val File.name: String
+ get() = getName()
+
+该快速修复会添加 @Deprecated
注解:
+ @Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("name"), level = DeprecationLevel.HIDDEN)
+ val File.name: String
+ get() = getName()
+
+
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConfusingElse.html b/original-plugin-raw/zh/inspectionDescriptions/ConfusingElse.html
new file mode 100644
index 000000000..91d7f773f
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConfusingElse.html
@@ -0,0 +1,26 @@
+
+
+在 if
—else
语句和语句链中报告冗余的 else
关键字。
+
+如果 else
关键字因为之前分支中的代码以 return
、throw
、break
或 continue
语句结尾而无法到达,则它是冗余的。 在这种情况下,来自 else
分支的语句可以放在 if
语句之后,并且 else
关键字可以删除。
+
示例:
+
+ if (name == null) {
+ throw new IllegalArgumentException();
+ } else {
+ System.out.println(name);
+ }
+
+在应用快速修复后:
+
+ if (name == null) {
+ throw new IllegalArgumentException();
+ }
+ System.out.println(name);
+
+
+禁用 当 'if' 语句之后没有其他语句时报告 选项以忽略 if
—else
语句是代码块中最后一条语句的情况。
此类文字可能令人困惑,并且违反多种编码标准。
+示例:
+double d = .03;
+在应用快速修复后:
+double d = 0.03;
+
++使用忽略科学记数法中的浮点文字选项可以忽略科学记数法中的浮点数。
+ + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConfusingFloatingPointLiteralJS.html b/original-plugin-raw/zh/inspectionDescriptions/ConfusingFloatingPointLiteralJS.html new file mode 100644 index 000000000..1cb5c8806 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ConfusingFloatingPointLiteralJS.html @@ -0,0 +1,7 @@ + + + +报告任何没有小数点的浮点数或小数点前的任何数字 +或小数点后的任何数字。 此类文字可能令人困惑,并且违反多种编码标准。 + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConfusingMainMethod.html b/original-plugin-raw/zh/inspectionDescriptions/ConfusingMainMethod.html new file mode 100644 index 000000000..907b1fdcf --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ConfusingMainMethod.html @@ -0,0 +1,16 @@ + + +报告命名为 "main" 但没有public static void main(String[])
签名的方法。
+此类方法可能令人困惑,因为命名为 "main" 的方法应为应用程序入口点。
+示例:
+
+ class Main {
+ void main(String[] args) {} //此处有警告,因为没有 "public static" 修饰符
+ }
+
+只能在编辑器中使用重命名此类方法的快速修复。
+ ++ + + \ No newline at end of file diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConfusingOctalEscape.html b/original-plugin-raw/zh/inspectionDescriptions/ConfusingOctalEscape.html new file mode 100644 index 000000000..fd16af672 --- /dev/null +++ b/original-plugin-raw/zh/inspectionDescriptions/ConfusingOctalEscape.html @@ -0,0 +1,11 @@ + +
+报告包含紧跟数字的八进制转义序列的字符串文字。 +此类字符串可能令人困惑,并且通常是转义码创建错误的结果。
+示例:
+
+ System.out.println("\1234"); // 紧跟数字的八进制转义序列 '\123'
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConfusingPlusesOrMinusesJS.html b/original-plugin-raw/zh/inspectionDescriptions/ConfusingPlusesOrMinusesJS.html
new file mode 100644
index 000000000..d16d29716
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConfusingPlusesOrMinusesJS.html
@@ -0,0 +1,5 @@
+
+
+报告 JavaScript 代码中 +
或 -
字符的可疑组合 (例如 a+++b
) 。 此类序列令人困惑,并且它们的语义可能会因为空格的变化而变化。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConnectionResource.html b/original-plugin-raw/zh/inspectionDescriptions/ConnectionResource.html
new file mode 100644
index 000000000..fd47c1dba
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConnectionResource.html
@@ -0,0 +1,12 @@
+
+
+报告未在 try
块前打开并在相应的 finally
块中关闭的 Java ME javax.microedition.io.Connection
资源。 如果在资源关闭之前抛出异常,此类资源可能会被无意泄漏。
+示例:
+
+ void example() throws IOException {
+ Connection c = Connector.open("foo");
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConstExpressionRequired.html b/original-plugin-raw/zh/inspectionDescriptions/ConstExpressionRequired.html
new file mode 100644
index 000000000..5c7a11bce
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConstExpressionRequired.html
@@ -0,0 +1,5 @@
+
+
+报告需要是常量但不是的表达式。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConstPropertyName.html b/original-plugin-raw/zh/inspectionDescriptions/ConstPropertyName.html
new file mode 100644
index 000000000..f9a283b02
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConstPropertyName.html
@@ -0,0 +1,18 @@
+
+
+报告不遵循推荐命名惯例的 const
属性名称。
+
+ 一致的命名会让阅读和理解代码变得更容易。
+ 根据 Kotlin 官方样式指南,const
属性应使用大写下划线分隔的名称。
+
示例:
+
+ const val Planck: Double = 6.62607015E-34
+
+该快速修复会重命名属性:
+
+ const val PLANCK: Double = 6.62607015E-34
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConstantAssertArgument.html b/original-plugin-raw/zh/inspectionDescriptions/ConstantAssertArgument.html
new file mode 100644
index 000000000..7b8bd7cb2
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConstantAssertArgument.html
@@ -0,0 +1,14 @@
+
+
+报告 assertTrue()
、assertFalse()
、assertNull()
和 assertNotNull()
调用中的常量实参。
++ 对这些包含常量实参的方法的调用要么总是成功,要么总是失败。 + 此类语句很容易在重构后遗留下来,并且可能并非有意为之。 +
+示例:
+
+ assertNotNull("foo");
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConstantAssertCondition.html b/original-plugin-raw/zh/inspectionDescriptions/ConstantAssertCondition.html
new file mode 100644
index 000000000..dd82e37bc
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConstantAssertCondition.html
@@ -0,0 +1,13 @@
+
+
+报告为常量的 assert
语句条件。 具有常量条件的 assert
语句要么总是失败,要么总是成功。
+此类语句可能在重构后遗留下来,并且可能不是有意的。
+示例:
+
+ void foo() {
+ assert true;
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConstantConditionIf.html b/original-plugin-raw/zh/inspectionDescriptions/ConstantConditionIf.html
new file mode 100644
index 000000000..807ef464a
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConstantConditionIf.html
@@ -0,0 +1,21 @@
+
+
+报告具有 true
或 false
常量文字条件且可以简化的 if
表达式。
+虽然偶尔是有意为之,但此结构令人困惑,并且通常是由拼写错误或之前的重构所致。
+示例:
+
+ fun example() {
+ if (true) {
+ throw IllegalStateException("Unexpected state")
+ }
+ }
+
+该快速修复会移除 if
条件:
+ fun example() {
+ throw IllegalStateException("Unexpected state")
+ }
+
+
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConstantConditionalExpression.html b/original-plugin-raw/zh/inspectionDescriptions/ConstantConditionalExpression.html
new file mode 100644
index 000000000..9843e626a
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConstantConditionalExpression.html
@@ -0,0 +1,15 @@
+
+
+报告条件为 true
或 false
常量的条件表达式。
+这些表达式有时是自动重构的结果,并且可以被简化。
+示例:
+
+ return true ? "Yes" : "No";
+
+在应用快速修复后:
+
+ return "Yes";
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConstantConditionalExpressionJS.html b/original-plugin-raw/zh/inspectionDescriptions/ConstantConditionalExpressionJS.html
new file mode 100644
index 000000000..dd48f0886
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConstantConditionalExpressionJS.html
@@ -0,0 +1,6 @@
+
+
+报告格式为 true? 的条件表达式 result1: result2
或 false? result1: result2。
+建议简化该表达式。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConstantConditions.html b/original-plugin-raw/zh/inspectionDescriptions/ConstantConditions.html
new file mode 100644
index 000000000..576c8a07f
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConstantConditions.html
@@ -0,0 +1,36 @@
+
+
+报告始终产生相同结果、可能抛出异常或违反可 null 性约定的代码结构。
+示例:
+if (array.length < index) {
+ System.out.println(array[index]);
+} // 数组索引始终超出界限
+
+if (str == null) System.out.println("str is null");
+System.out.println(str.trim());
+// 最后一个语句可能会抛出 NPE
+
+@NotNull
+Integer square(@Nullable Integer input) {
+ // 违反方法约定
+ return input == null ? null : input * input;
+}
+
+ 检查行为可能由许多注解控制,例如可 null 性注解、@Contract
注解、@Range
注解等。
+
+
+配置检查:
+
+ - 使用对可 null 值的方法/字段/形参建议使用 @Nullable 注解选项可以在以下情况下发出警告:null 值作为实参传递给具有非注解形参的方法时,存储到非注解字段时,或从非注解方法返回时。 在这种情况下,该检查将建议传播
@Nullable
注解。 您还可以使用配置注解按钮配置可 null 性注解。
+ - 使用将未注解的成员和形参视为 @Nullable 选项可假设非注解成员可以为 null,因此不得在非 null 上下文中使用。
+ - 使用报告使用 null 文字实参用法的非 null 必需形参>选项可以报告不能为 null(例如在方法体中立即取消引用),但存在传递
null
文字的调用点的方法形参。
+ - 使用报告始终返回非 null 值的可 null 方法选项,可报告注解为
@Nullable
但始终返回非 null 值的方法。 在这种情况下,建议您将注解更改为 @NotNull
。
+ - 使用不报告条件静态证明始终为 true 的断言选项可避免报告静态证明始终为 true 的断言。 这还包括
if (alwaysFalseCondition) throw new IllegalArgumentException();
等条件。
+ - 使用忽略 assert 语句选项可控制检查如何处理
assert
语句。 默认情况下,该选项被禁用,这意味着断言视为被执行(-ea 模式)。 如果启用该选项,断言将被完全忽略(-da 模式)。
+ - 使用读取保证为常量的值时发出警告选项可在读取包含某些常量值(如
true
、false
或 null
)的变量时添加警告。
+ - 使用报告仅在某些代码路径上发生的问题选项可控制是否报告仅在某些代码路径上发生的问题。 如果禁用此选项,则不会报告 exception is possible 等警告。 该检查只会报告类似 exception will definitely occur 的警告。 这种模式可以大大减少误报的数量,特别是如果代码没有一致地使用可 null 性和约定注解进行注解。 这就是为什么它对于查找传统代码库中最重要的问题很有用。
+
+
+
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConstantConditionsOC.html b/original-plugin-raw/zh/inspectionDescriptions/ConstantConditionsOC.html
new file mode 100644
index 000000000..f59cd41b0
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConstantConditionsOC.html
@@ -0,0 +1,16 @@
+
+
+报告始终为 true
或 false
的条件以及值被静态证明为常量的表达式。
+示例:
+
+ void process(State current) {
+ current = State::Started;
+
+ if (current == State::Stopped) {
+ //代码
+ }
+ //代码
+ }
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConstantDeclaredInAbstractClass.html b/original-plugin-raw/zh/inspectionDescriptions/ConstantDeclaredInAbstractClass.html
new file mode 100644
index 000000000..30be8e4ec
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConstantDeclaredInAbstractClass.html
@@ -0,0 +1,7 @@
+
+
+报告在 abstract 类中声明的常量(public static final
字段)。
+有些编码标准要求在接口中声明常量。
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConstantDeclaredInInterface.html b/original-plugin-raw/zh/inspectionDescriptions/ConstantDeclaredInInterface.html
new file mode 100644
index 000000000..c2a195887
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConstantDeclaredInInterface.html
@@ -0,0 +1,7 @@
+
+
+报告在接口中声明的常量(public static final
字段)。
+有些编码标准要求在 abstract 类中声明常量。
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConstantExpression.html b/original-plugin-raw/zh/inspectionDescriptions/ConstantExpression.html
new file mode 100644
index 000000000..3efe747ff
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConstantExpression.html
@@ -0,0 +1,8 @@
+
+
+报告编译时常量表达式并建议用它们的实际值替换它们。 例如,系统会提示您将 “2 + 2” 替换为 “4”。
+
+
+2018.1 最新变化
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConstantFunctionResult.html b/original-plugin-raw/zh/inspectionDescriptions/ConstantFunctionResult.html
new file mode 100644
index 000000000..54851cde0
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConstantFunctionResult.html
@@ -0,0 +1,7 @@
+
+
+报告返回值始终为同一常量的函数。
+
+2021.1 最新变化
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConstantMathCall.html b/original-plugin-raw/zh/inspectionDescriptions/ConstantMathCall.html
new file mode 100644
index 000000000..9edd85979
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConstantMathCall.html
@@ -0,0 +1,10 @@
+
+
+报告对可以被确定为简单的编译时常量的 java.lang.Math
或 java.lang.StrictMath
方法的调用。
+示例:
+double v = Math.sin(0.0);
+在应用快速修复后:
+double v = 0.0;
+
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConstantOnLHSOfComparisonJS.html b/original-plugin-raw/zh/inspectionDescriptions/ConstantOnLHSOfComparisonJS.html
new file mode 100644
index 000000000..39c9d906b
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConstantOnLHSOfComparisonJS.html
@@ -0,0 +1,7 @@
+
+
+
+报告左侧有常量的比较运算。 根据
+编码惯例,常量应当位于比较的右侧。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConstantOnRHSOfComparisonJS.html b/original-plugin-raw/zh/inspectionDescriptions/ConstantOnRHSOfComparisonJS.html
new file mode 100644
index 000000000..01ffc5122
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConstantOnRHSOfComparisonJS.html
@@ -0,0 +1,7 @@
+
+
+
+报告右侧有常量的比较运算。 根据
+编码惯例,常量应当只位于比较的左侧。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConstantOnWrongSideOfComparison.html b/original-plugin-raw/zh/inspectionDescriptions/ConstantOnWrongSideOfComparison.html
new file mode 100644
index 000000000..3a71b6edb
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConstantOnWrongSideOfComparison.html
@@ -0,0 +1,23 @@
+
+
+报告常量值在错误一侧的比较运算。
+某些编码惯例会指定常量应该位于比较的特定一侧,要么左侧,要么右侧。
+示例:
+
+ boolean compare(int x) {
+ return 1 > x; // 位于比较左侧的常量 '1'
+ }
+
+在应用快速修复后:
+
+ boolean compare(int x) {
+ return x < 1;
+ }
+
+
+
+ 使用检查设置可以选择比较中的常量一侧,并选择 null
文字位于错误一侧时是否发出警告。
+
+2019.2 最新变化
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConstantParameter.html b/original-plugin-raw/zh/inspectionDescriptions/ConstantParameter.html
new file mode 100644
index 000000000..d1d9426c5
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConstantParameter.html
@@ -0,0 +1,7 @@
+
+
+报告始终具有相同值的函数形参。
+
+2021.1 最新变化
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConstantValueVariableUse.html b/original-plugin-raw/zh/inspectionDescriptions/ConstantValueVariableUse.html
new file mode 100644
index 000000000..fe057e5c6
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConstantValueVariableUse.html
@@ -0,0 +1,27 @@
+
+
+报告已知为常量的变量的所有用法。
+如果(读取)使用的变量被 if
、while
或 for
语句包围,且存在该变量与常量相比较的 ==
条件时,就会发生这种情况。
+ 在这种情况下,使用的已知为常量的变量可以替换为实际常量。
+示例:
+
+ private static void foo(double number) {
+ if (number == 1.0) {
+ f(number);
+ }
+ }
+ private static void f(double number) {}
+
+在应用快速修复后:
+
+ private static void foo(double number) {
+ if (number == 1.0) {
+ f(1.0);
+ }
+ }
+ private static void f(double number) {}
+
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConstructionIsNotAllowed.html b/original-plugin-raw/zh/inspectionDescriptions/ConstructionIsNotAllowed.html
new file mode 100644
index 000000000..d80f028cd
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConstructionIsNotAllowed.html
@@ -0,0 +1,5 @@
+
+
+报告非法构造。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConstructorCount.html b/original-plugin-raw/zh/inspectionDescriptions/ConstructorCount.html
new file mode 100644
index 000000000..12ce2acb9
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConstructorCount.html
@@ -0,0 +1,12 @@
+
+
+报告构造函数数量超过指定最大值的类。
+具有太多构造函数的类容易出现初始化错误,通常建议将这种类建模为多个子类。
+
+配置检查:
+
+ - 使用构造函数计数限制字段可指定类中允许的构造函数的最大数量。
+ - 使用忽略弃用的构造函数选项可避免将已弃用的构造函数添加到总计数中。
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ContextComponentScanInconsistencyInspection.html b/original-plugin-raw/zh/inspectionDescriptions/ContextComponentScanInconsistencyInspection.html
new file mode 100644
index 000000000..fa8a16455
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ContextComponentScanInconsistencyInspection.html
@@ -0,0 +1,18 @@
+
+
+报告 XML 应用程序上下文 <component-scan> 中不一致的 <filter> 定义。
+
+示例:
+
+
+ public class NonAnnotationTypeClass {}
+ <beans>
+ <ctx:component-scan base-package="com.my.company">
+ <ctx:exclude-filter expression="com.my.company.anno.NonAnnotationTypeClass" type="annotation"/>
+ </ctx:component-scan>
+ </beans>
+
+
+在此示例中,NonAnnotationTypeClass
应为注解类型。
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ContextJavaBeanUnresolvedMethodsInspection.html b/original-plugin-raw/zh/inspectionDescriptions/ContextJavaBeanUnresolvedMethodsInspection.html
new file mode 100644
index 000000000..517cb50e7
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ContextJavaBeanUnresolvedMethodsInspection.html
@@ -0,0 +1,19 @@
+
+
+报告 @Bean 注解的 initMethod
和 destroyMethod
形参上的未解析方法引用。
+
+示例:
+如果 MyBean 类不包含 'public void 'doInit'(){...}' 方法,将在 'doInit' 表达式上报告 "无法解析方法"
+
+ public class MyBean {...}
+
+ @Component
+ public class MyComponent {
+ @Bean(initMethod="doInit" )
+ public MyBean myBean() {...}
+ }
+
+
+在此示例中,如果 MyBean
不定义 doInit()
方法,该检查将报告未解析的方法引用。
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ContinueOrBreakFromFinallyBlock.html b/original-plugin-raw/zh/inspectionDescriptions/ContinueOrBreakFromFinallyBlock.html
new file mode 100644
index 000000000..bda2524fb
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ContinueOrBreakFromFinallyBlock.html
@@ -0,0 +1,17 @@
+
+
+报告 finally
块中的 break
或 continue
语句。
+虽然偶尔是有意为之,但此类语句非常令人困惑,可能会掩盖抛出的异常,并导致调试复杂化。
+示例:
+
+ while (true) {
+ try {
+ throwingMethod();
+ } finally {
+ continue;
+ }
+ }
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ContinueOrBreakFromFinallyBlockJS.html b/original-plugin-raw/zh/inspectionDescriptions/ContinueOrBreakFromFinallyBlockJS.html
new file mode 100644
index 000000000..1145b48d5
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ContinueOrBreakFromFinallyBlockJS.html
@@ -0,0 +1,5 @@
+
+
+报告 finally
块中的 break
或 continue
语句。 此类语句非常令人困惑,可能隐藏异常,并导致调试复杂化。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ContinueStatement.html b/original-plugin-raw/zh/inspectionDescriptions/ContinueStatement.html
new file mode 100644
index 000000000..e3a8f1a9a
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ContinueStatement.html
@@ -0,0 +1,15 @@
+
+
+报告 continue
语句。
+continue
语句导致重构复杂化,可能令人困惑。
+示例:
+
+ void foo(List<String> strs) {
+ for (String str : strs) {
+ if (str.contains("skip")) continue;
+ handleStr(str);
+ }
+ }
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ContinueStatementJS.html b/original-plugin-raw/zh/inspectionDescriptions/ContinueStatementJS.html
new file mode 100644
index 000000000..95e374456
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ContinueStatementJS.html
@@ -0,0 +1,5 @@
+
+
+报告 continue
语句。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ContinueStatementWithLabel.html b/original-plugin-raw/zh/inspectionDescriptions/ContinueStatementWithLabel.html
new file mode 100644
index 000000000..18f08cc54
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ContinueStatementWithLabel.html
@@ -0,0 +1,18 @@
+
+
+报告包含标签的 continue
语句。
+continue
标签语句导致重构复杂化,可能令人困惑。
+示例:
+
+ void handle(List<String> strs) {
+ outer:
+ for (String s: strs) {
+ for (char ch : s.toCharArray()) {
+ if ('s' == ch) continue outer;
+ handleChar(ch);
+ }
+ }
+ }
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ContinueStatementWithLabelJS.html b/original-plugin-raw/zh/inspectionDescriptions/ContinueStatementWithLabelJS.html
new file mode 100644
index 000000000..3bfc2e817
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ContinueStatementWithLabelJS.html
@@ -0,0 +1,5 @@
+
+
+添加 continue
标签语句。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/Contract.html b/original-plugin-raw/zh/inspectionDescriptions/Contract.html
new file mode 100644
index 000000000..11babd2a3
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/Contract.html
@@ -0,0 +1,18 @@
+
+
+报告方法 @Contract
注解中的问题。 可以报告的问题类型有:
+
+- 约定语法错误
+- 不符合方法签名的约定(错误的形参计数)
+- 与约定不一致的方法实现(例如,即使约定声明
false
,也返回 true
)
+
+示例:
+
+ // 方法没有形参,参约定预期 1
+ @Contract("_ -> fail")
+ void x() {
+ throw new AssertionError();
+ }
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ControlFlowStatementWithoutBraces.html b/original-plugin-raw/zh/inspectionDescriptions/ControlFlowStatementWithoutBraces.html
new file mode 100644
index 000000000..dbcaa2bc0
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ControlFlowStatementWithoutBraces.html
@@ -0,0 +1,16 @@
+
+
+报告任何不带大括号的 if
、while
或 for
语句。
+大括号使代码更易于阅读并有助于防止错误。
+示例:
+
+ if (x > 0) System.out.println("x is positive");
+
+快速修复用大括号包装语句体:
+
+ if (x > 0) {
+ System.out.println("x is positive");
+ }
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ControlFlowWithEmptyBody.html b/original-plugin-raw/zh/inspectionDescriptions/ControlFlowWithEmptyBody.html
new file mode 100644
index 000000000..22edd186c
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ControlFlowWithEmptyBody.html
@@ -0,0 +1,12 @@
+
+
+报告语句体为空的 if
、while
、do
或 for
语句。
+虽然偶尔是有意为之,但此结构令人困惑,并且通常是由拼写错误所致。
+该快速修复会移除语句。
+示例:
+
+ if (a > b) {}
+
+
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/Convert2Diamond.html b/original-plugin-raw/zh/inspectionDescriptions/Convert2Diamond.html
new file mode 100644
index 000000000..a9f15037f
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/Convert2Diamond.html
@@ -0,0 +1,14 @@
+
+
+报告所有 new
表达式,其类型实参可以替换为 Diamond 类型 <>
。
+示例:
+
+ List<String> list = new ArrayList<String>(); // 报告数组列表类型实参
+
+在应用快速修复后:
+
+ List<String> list = new ArrayList<>();
+
+仅当项目或模块的语言级别为 7 或更高时,此检查才会报告。
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/Convert2Lambda.html b/original-plugin-raw/zh/inspectionDescriptions/Convert2Lambda.html
new file mode 100644
index 000000000..1329008ee
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/Convert2Lambda.html
@@ -0,0 +1,28 @@
+
+
+报告可以替换为 lambda 表达式的匿名类。
+示例:
+
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ // 运行线程
+ }
+ });
+
+在应用快速修复后:
+
+ new Thread(() -> {
+ // 运行线程
+ });
+
+
+请注意,如果将匿名类转换为无状态 lambda,则 Java 运行时可以在后续调用期间重用相同的 lambda 对象。 另一方面,当使用匿名类时,每次都会创建单独的对象。 因此,在极少数情况下,应用该快速修复可能会导致语义发生变化,例如,当匿名类实例用作 HashMap
键时。
+
+Java 1.7 和更早版本的 JVM 不支持 lambda 语法。
+
+
+使用在接口未使用 @FunctionalInterface 注解时报告选项可忽略匿名类实现没有 @FunctionalInterface
注解的接口的情况。
+
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/Convert2MethodRef.html b/original-plugin-raw/zh/inspectionDescriptions/Convert2MethodRef.html
new file mode 100644
index 000000000..06ecb61cc
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/Convert2MethodRef.html
@@ -0,0 +1,19 @@
+
+
+报告可以替换为方法引用的 lambda。 方法引用比 lambda 更容易理解和阅读,尽管它们通常取决于您的喜好。
+示例:
+
+ Runnable r = () -> System.out.println();
+
+在应用快速修复后:
+
+ Runnable r = System.out::println;
+
+
+
+ 即使 lambda 不调用任何方法,该检查也可能会建议方法引用,例如将 obj -> obj != null
替换为 Objects::nonNull
。
+ 使用设置 | 编辑器 | 代码样式 | Java | 代码生成设置来配置特殊方法引用。
+
+仅当项目或模块的语言级别为 8 或更高时,此检查才会报告。
+
+
diff --git a/original-plugin-raw/zh/inspectionDescriptions/Convert2streamapi.html b/original-plugin-raw/zh/inspectionDescriptions/Convert2streamapi.html
new file mode 100644
index 000000000..b6de95e12
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/Convert2streamapi.html
@@ -0,0 +1,26 @@
+
+
+报告使用 lambda 表达式替换为流 API 调用的循环。
+此类替换将命令式样式更改为功能式样式,代码也变得更加紧凑。
+示例:
+
+ boolean check(List<String> data) {
+ for (String e : data) {
+ String trimmed = e.trim();
+ if (!trimmed.startsWith("xyz")) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+在应用快速修复后:
+
+ boolean check(List<String> data) {
+ return data.stream().map(String::trim).allMatch(trimmed -> trimmed.startsWith("xyz"));
+ }
+
+
+仅当项目或模块的语言级别为 8 或更高时,此检查才会报告。
+
+
\ No newline at end of file
diff --git a/original-plugin-raw/zh/inspectionDescriptions/ConvertArgumentToSet.html b/original-plugin-raw/zh/inspectionDescriptions/ConvertArgumentToSet.html
new file mode 100644
index 000000000..f1ebb483b
--- /dev/null
+++ b/original-plugin-raw/zh/inspectionDescriptions/ConvertArgumentToSet.html
@@ -0,0 +1,28 @@
+
+
+检测可以通过将实参转换为 Set
而加快速度的函数调用。
+
+
+ 当实参为集合时,'minus' 或 'intersect' 等运算更高效。
+ 将 Iterable<T>
或 Array<T>
显式转换为 Set<T>
通常可以提高代码效率。
+
+
+
+ 该快速修复会向函数调用添加显式转换。
+
+
+示例:
+
+ fun <T> f(a: Iterable<T>, b: Iterable<T>): Int =
+ a.intersect(b).size
+
+
+在应用快速修复后:
+
+ fun <T> f(a: Iterable<T>, b: Iterable<T>): Int =
+ a.intersect(b.toSet()).size
+
+
+
+
+