Showing preview only (614K chars total). Download the full file or copy to clipboard to get everything.
Repository: caofanCPU/D8gerAutoCode
Branch: Vip587
Commit: 0fc393f03039
Files: 86
Total size: 557.7 KB
Directory structure:
gitextract_52hz9hgr/
├── .idea/
│ ├── $CACHE_FILE$
│ ├── .gitignore
│ ├── D8gerAutoCodePluginProjectSetting.xml
│ ├── codeStyles/
│ │ ├── Project.xml
│ │ └── codeStyleConfig.xml
│ ├── compiler.xml
│ ├── dataSources.xml
│ ├── dictionaries/
│ │ ├── D8GER.xml
│ │ └── ht_caofan.xml
│ ├── encodings.xml
│ ├── gradle.xml
│ ├── inspectionProfiles/
│ │ └── Project_Default.xml
│ ├── jarRepositories.xml
│ ├── libraries-with-intellij-classes.xml
│ ├── misc.xml
│ ├── setting.xml
│ ├── uiDesigner.xml
│ └── vcs.xml
├── IntelliJBestAction.adoc
├── IntelliJBestAction.html
├── LICENCE
├── README.md
├── README_CN.md
├── build.gradle
├── doc/
│ ├── ComputerMathData.md
│ ├── Math.adoc
│ └── WX-MarkDownTest.md
├── settings.gradle
└── src/
├── main/
│ ├── java/
│ │ └── com/
│ │ └── xyz/
│ │ └── caofancpu/
│ │ └── d8ger/
│ │ ├── WhoAmI.java
│ │ ├── action/
│ │ │ ├── D8gerAutoCodeAction.java
│ │ │ └── SwaggerModelAutoRenderAction.java
│ │ ├── activity/
│ │ │ └── D8gerActivity.java
│ │ ├── core/
│ │ │ ├── AutoCodeTemplate.java
│ │ │ ├── D8gerAutoCoding.java
│ │ │ ├── EasterEggCodeTemplateEnum.java
│ │ │ ├── KeyEnum.java
│ │ │ ├── MoField.java
│ │ │ ├── ProjectEnvHandler.java
│ │ │ ├── SupportFieldTypeEnum.java
│ │ │ └── TemplateKeyWordEnum.java
│ │ ├── setting/
│ │ │ ├── D8gerApplicationState.java
│ │ │ ├── D8gerProjectState.java
│ │ │ ├── D8gerSetting.form
│ │ │ ├── D8gerSetting.java
│ │ │ └── D8gerSettingsConfigurable.java
│ │ └── util/
│ │ ├── CollectionUtil.java
│ │ ├── ConstantUtil.java
│ │ ├── DateUtil.java
│ │ ├── IdeaPlatformFileTreeUtil.java
│ │ ├── JSONUtil.java
│ │ ├── PropertiesUtil.java
│ │ ├── StringAlignUtil.java
│ │ └── VerbalExpressionUtil.java
│ └── resources/
│ ├── META-INF/
│ │ └── plugin.xml
│ ├── icons/
│ │ └── Icon
│ └── template/
│ ├── .zshrc
│ ├── ControllerTemplate.txt
│ ├── DeletedServiceInterfaceTemplate.txt
│ ├── EN/
│ │ ├── ControllerTemplate.txt
│ │ ├── D8GER.txt
│ │ ├── DeletedServiceInterfaceTemplate.txt
│ │ ├── ExampleTemplate.txt
│ │ ├── HandlerTemplate.txt
│ │ ├── MapperTemplate.txt
│ │ ├── MapperXMLTemplate.txt
│ │ ├── MoTemplate.txt
│ │ ├── SQLTemplate.txt
│ │ └── SwaggerMoTemplate.txt
│ ├── END.txt
│ ├── ExampleTemplate.txt
│ ├── HandlerTemplate.txt
│ ├── MapperTemplate.txt
│ ├── MapperXMLTemplate.txt
│ ├── MoTemplate.txt
│ ├── NASA.txt
│ ├── PLAN.txt
│ ├── Regex.txt
│ ├── SQLTemplate.txt
│ ├── SwaggerMoTemplate.txt
│ ├── caofan.txt
│ ├── d8ger-util-list.txt
│ ├── javaShorts.txt
│ ├── normal.command
│ └── ohmyd8ger.command
└── test/
├── java/
│ └── d8ger/
│ └── D8T.java
└── resources/
└── MyJSON.txt
================================================
FILE CONTENTS
================================================
================================================
FILE: .idea/$CACHE_FILE$
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectInspectionProfilesVisibleTreeState">
<entry key="Project Default">
<profile-state>
<expanded-state>
<State />
<State>
<id>Ali-Check</id>
</State>
</expanded-state>
<selected-state>
<State>
<id>AlibabaBooleanPropertyShouldNotStartWithIs</id>
</State>
</selected-state>
</profile-state>
</entry>
</component>
</project>
================================================
FILE: .idea/.gitignore
================================================
# Default ignored files
/workspace.xml
# Project exclude paths
/.
/../../
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
================================================
FILE: .idea/D8gerAutoCodePluginProjectSetting.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="com.xyz.caofancpu.d8ger.setting.D8gerProjectState">
<option name="voCheck" value="true" />
<option name="handlerCheck" value="true" />
<option name="controllerCheck" value="true" />
<option name="moPath" value="$PROJECT_DIR$/src/main/java/com/xyz/caofancpu/d8ger/test/mo" />
<option name="mapperPath" value="$PROJECT_DIR$/src/main/java/com/xyz/caofancpu/d8ger/test/mapper" />
<option name="mapperExamplePath" value="$PROJECT_DIR$/src/main/java/com/xyz/caofancpu/d8ger/test/mapper/example" />
<option name="mapperXmlPath" value="$PROJECT_DIR$/src/main/resources/mybatis" />
<option name="sqlPath" value="$PROJECT_DIR$/doc" />
<option name="voPath" value="$PROJECT_DIR$/src/main/java/com/xyz/caofancpu/d8ger/test/vo" />
<option name="handlerPath" value="$PROJECT_DIR$/src/main/java/com/xyz/caofancpu/d8ger/test/handler" />
<option name="controllerPath" value="$PROJECT_DIR$/src/main/java/com/xyz/caofancpu/d8ger/test/controller" />
<option name="defaultUrlPrefix" value="/d8gerAutoCode" />
</component>
</project>
================================================
FILE: .idea/codeStyles/Project.xml
================================================
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<option name="LINE_SEPARATOR" value=" " />
<option name="RIGHT_MARGIN" value="500" />
<JavaCodeStyleSettings>
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
<option name="JD_KEEP_INVALID_TAGS" value="false" />
</JavaCodeStyleSettings>
<JetCodeStyleSettings>
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
<value>
<package name="java.util" alias="false" withSubpackages="false" />
<package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" />
<package name="io.ktor" alias="false" withSubpackages="true" />
</value>
</option>
<option name="PACKAGES_IMPORT_LAYOUT">
<value>
<package name="" alias="false" withSubpackages="true" />
<package name="java" alias="false" withSubpackages="true" />
<package name="javax" alias="false" withSubpackages="true" />
<package name="kotlin" alias="false" withSubpackages="true" />
<package name="" alias="true" withSubpackages="true" />
</value>
</option>
</JetCodeStyleSettings>
<ScalaCodeStyleSettings>
<option name="MULTILINE_STRING_CLOSING_QUOTES_ON_NEW_LINE" value="true" />
</ScalaCodeStyleSettings>
<codeStyleSettings language="JAVA">
<option name="RIGHT_MARGIN" value="500" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
<option name="EXTENDS_LIST_WRAP" value="1" />
<option name="THROWS_KEYWORD_WRAP" value="2" />
<option name="KEEP_SIMPLE_METHODS_IN_ONE_LINE" value="true" />
</codeStyleSettings>
<codeStyleSettings language="JSON">
<indentOptions>
<option name="INDENT_SIZE" value="4" />
</indentOptions>
</codeStyleSettings>
</code_scheme>
</component>
================================================
FILE: .idea/codeStyles/codeStyleConfig.xml
================================================
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>
================================================
FILE: .idea/compiler.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile default="true" name="Default" enabled="true" />
<profile name="Gradle Imported" enabled="true">
<outputRelativeToContentRoot value="true" />
<processorPath useClasspath="false">
<entry name="$PROJECT_DIR$/../../GRADLE-Repository/caches/modules-2/files-2.1/org.projectlombok/lombok/1.18.10/625fc0055674dff70dbc76efa36d0f2c89b04a24/lombok-1.18.10.jar" />
</processorPath>
<module name="D8gerAutoCode.main" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel target="1.8" />
</component>
</project>
================================================
FILE: .idea/dataSources.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="d8ger@localhost" uuid="62108bf2-5589-45f1-a1bc-31c51250e2d6">
<driver-ref>mysql.8</driver-ref>
<synchronize>true</synchronize>
<remarks>local</remarks>
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
<jdbc-url>jdbc:mysql://localhost:3306</jdbc-url>
</data-source>
</component>
</project>
================================================
FILE: .idea/dictionaries/D8GER.xml
================================================
<component name="ProjectDictionaryState">
<dictionary name="D8GER">
<words>
<w>xtools</w>
</words>
</dictionary>
</component>
================================================
FILE: .idea/dictionaries/ht_caofan.xml
================================================
<component name="ProjectDictionaryState">
<dictionary name="ht-caofan">
<words>
<w>caofan</w>
<w>caofancpu</w>
<w>dibage</w>
<w>ocket</w>
<w>penta</w>
<w>uncapitalize</w>
<w>uncapitallize</w>
</words>
</dictionary>
</component>
================================================
FILE: .idea/encodings.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" native2AsciiForPropertiesFiles="true" defaultCharsetForPropertiesFiles="UTF-8">
<file url="PROJECT" charset="UTF-8" />
</component>
</project>
================================================
FILE: .idea/gradle.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="delegatedBuild" value="true" />
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleHome" value="/usr/local/Cellar/gradle/6.0.1/libexec" />
<option name="gradleJvm" value="1.8" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings>
</option>
</component>
</project>
================================================
FILE: .idea/inspectionProfiles/Project_Default.xml
================================================
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="AbstractBeanReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="ContextComponentScanInconsistencyInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="DuplicatedCode" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<Languages>
<language minSize="270" name="Java" />
</Languages>
</inspection_tool>
<inspection_tool class="Duplicates" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="FlowRequiredBeanTypeInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="InjectionValueTypeInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="JdkProxiedBeanTypeInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="KotlinSpringComponentScan" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="RequiredBeanTypeInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringAopErrorsInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringBatchModel" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringBeanAutowiringInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringBeanConstructorArgInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringBeanDepedencyCheckInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringBeanInstantiationInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringBeanLookupMethodInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringBootAdditionalConfig" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringCacheableComponentsInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringComponentScan" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringContextConfigurationInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringFacetProgrammaticInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringFactoryMethodInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringHandlersSchemasHighlighting" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringIncorrectResourceTypeInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringInjectionValueConsistencyInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringIntegrationModel" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringJavaAutowiringInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringJavaConfigInconsistencyInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringKotlinAutowiring" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringMVCInitBinder" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringMessageDispatcherWebXmlInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringModelInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringOsgiElementsInconsistencyInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringOsgiListenerInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringOsgiServiceCommonInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringRequiredAnnotationInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringRequiredPropertyInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringScopesInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringSecurityAnnotationBeanPointersResolveInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringSecurityModelInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringTransactionalComponentInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringWebServicesConfigurationsInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpringWebSocketConfigurationInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="UtilSchemaInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="WebflowConfigModelInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="WebflowModelInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="WebflowSetupInspection" enabled="true" level="WARNING" enabled_by_default="true" />
</profile>
</component>
================================================
FILE: .idea/jarRepositories.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="MavenRepo" />
<option name="name" value="MavenRepo" />
<option name="url" value="https://repo.maven.apache.org/maven2/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven2" />
<option name="name" value="maven2" />
<option name="url" value="https://cache-redirector.jetbrains.com/plugins.jetbrains.com/maven" />
</remote-repository>
<remote-repository>
<option name="id" value="maven" />
<option name="name" value="maven" />
<option name="url" value="http://dl.bintray.com/jetbrains/intellij-plugin-service" />
</remote-repository>
<remote-repository>
<option name="id" value="maven4" />
<option name="name" value="maven4" />
<option name="url" value="https://repo.rdc.aliyun.com/repository/130650-snapshot-xdHOzb/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven2" />
<option name="name" value="maven2" />
<option name="url" value="https://maven.aliyun.com/repository/public" />
</remote-repository>
<remote-repository>
<option name="id" value="maven3" />
<option name="name" value="maven3" />
<option name="url" value="https://repo.rdc.aliyun.com/repository/130650-release-LLgOVG/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven2" />
<option name="name" value="maven2" />
<option name="url" value="https://repo1.maven.org/maven2/" />
</remote-repository>
</component>
</project>
================================================
FILE: .idea/libraries-with-intellij-classes.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="libraries-with-intellij-classes">
<option name="intellijApiContainingLibraries">
<list>
<LibraryCoordinatesState>
<option name="artifactId" value="ideaIU" />
<option name="groupId" value="com.jetbrains.intellij.idea" />
</LibraryCoordinatesState>
<LibraryCoordinatesState>
<option name="artifactId" value="ideaIU" />
<option name="groupId" value="com.jetbrains" />
</LibraryCoordinatesState>
<LibraryCoordinatesState>
<option name="artifactId" value="ideaIC" />
<option name="groupId" value="com.jetbrains.intellij.idea" />
</LibraryCoordinatesState>
<LibraryCoordinatesState>
<option name="artifactId" value="ideaIC" />
<option name="groupId" value="com.jetbrains" />
</LibraryCoordinatesState>
<LibraryCoordinatesState>
<option name="artifactId" value="pycharmPY" />
<option name="groupId" value="com.jetbrains.intellij.pycharm" />
</LibraryCoordinatesState>
<LibraryCoordinatesState>
<option name="artifactId" value="pycharmPY" />
<option name="groupId" value="com.jetbrains" />
</LibraryCoordinatesState>
<LibraryCoordinatesState>
<option name="artifactId" value="pycharmPC" />
<option name="groupId" value="com.jetbrains.intellij.pycharm" />
</LibraryCoordinatesState>
<LibraryCoordinatesState>
<option name="artifactId" value="pycharmPC" />
<option name="groupId" value="com.jetbrains" />
</LibraryCoordinatesState>
<LibraryCoordinatesState>
<option name="artifactId" value="clion" />
<option name="groupId" value="com.jetbrains.intellij.clion" />
</LibraryCoordinatesState>
<LibraryCoordinatesState>
<option name="artifactId" value="clion" />
<option name="groupId" value="com.jetbrains" />
</LibraryCoordinatesState>
<LibraryCoordinatesState>
<option name="artifactId" value="riderRD" />
<option name="groupId" value="com.jetbrains.intellij.rider" />
</LibraryCoordinatesState>
<LibraryCoordinatesState>
<option name="artifactId" value="riderRD" />
<option name="groupId" value="com.jetbrains" />
</LibraryCoordinatesState>
<LibraryCoordinatesState>
<option name="artifactId" value="goland" />
<option name="groupId" value="com.jetbrains.intellij.goland" />
</LibraryCoordinatesState>
<LibraryCoordinatesState>
<option name="artifactId" value="goland" />
<option name="groupId" value="com.jetbrains" />
</LibraryCoordinatesState>
</list>
</option>
</component>
</project>
================================================
FILE: .idea/misc.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ASMPluginConfiguration">
<asm skipDebug="false" skipFrames="false" skipCode="false" expandFrames="false" />
<groovy codeStyle="LEGACY" />
</component>
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$" />
</component>
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
</project>
================================================
FILE: .idea/setting.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="arthas.idea.plugin">
<option name="redisAddress" value="" />
<option name="redisAuth" value="" />
<option name="redisCacheKey" value="" />
</component>
</project>
================================================
FILE: .idea/uiDesigner.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>
================================================
FILE: .idea/vcs.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
================================================
FILE: IntelliJBestAction.adoc
================================================
== IntelliJ IDEA最佳实践
. Intellij IDEA for Java WEB 开发
* 快捷键
* 插件
* 快速测试
* Java工具包
. Intellij IDEA for Scala 开发(ing)
. Intellij IDEA for Kotlin 开发(ing)
NOTE: 如无特殊说明, 本文基于Mac OS 及Intellij IDEA 2020.1.x, +
涉及系统或版本差异时会就近补充说明, +
总体上: Mac的**#cmd#**等价于Windows的**#ctrl#**, +
Intellij IDEA高版本功能是兼容低版本功能的, 只是部分插件会受到一些影响
=== 快捷键
- 找到所有快捷键, `Help` --> `Keymap Reference`, 出现的PDF展示了当前你的编辑器的所有快捷键
- 确实有点多, 不着急, 知道了方法, 后续只是时间问题.
如何搜索快捷键, 参见下图
image::http://file.debuggerpowerzcy.top/power/Shortcut.png[title=如何搜索快捷键]
.10个高频快捷键
|===
|功能 |关键词 |示例(默认)快捷键
|①语句自动完成
|Complete statement
|cmd + shift + enter
|②复写(父类)方法
|Override methods \| Generate
|ctrl + O \| ctrl + enter
|③智能提示\|纠错
|Show Context Actions
|ctrl + shift + alt + enter
|④快速复制粘贴
|Duplicate Line or Selection
|cmd + D
|⑤查看方法调用
|Call Hierarchy
|ctrl + alt + H
|⑥跳转到父类申明
|Go to Super Method
|cmd + U
|⑦跳转到子类实现
|Go to Declaration or Usages
|cmd + B
|⑧拼接下一行
|Join Lines
|ctrl + shift + J
|⑨优化导包
|Optimize Imports
|ctrl + alt + O
|⑩格式化代码
|Reformat Code
|cmd + alt + L
|更多彩蛋
|安装插件 Key Promoter X
|对于有快捷键的按钮, 当你点击时提示告诉你快捷键
|===
=== 插件
- https://plugins.jetbrains.com/plugin/9792-key-promoter-x/[Key Promoter X]
* 快捷键提示, 新手必备, 而老手也可以通过它得知新版IDEA的一些特性信息
- https://plugins.jetbrains.com/plugin/10080-rainbow-brackets/[Rainbow Brackets]
* 代码括号自动匹配, 彩板护眼
- https://plugins.jetbrains.com/plugin/6317-lombok/[Lombok]
* 这位都听说过吧, 没听过的要么是大佬要么改行吧
* 采坑经验, 使用Lombok时, 尽量避免对象间继承, 如果非要继承, 应考虑@EqualsAndHashCode(callSuper = true : false)
* 示例:
[source,jave]
----
/**
* balabala
*
* @author Mr.X
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
public class PormHub extends GitHub{
private Boolean well = Boolean.FALSE;
}
----
- https://plugins.jetbrains.com/plugin/7391-asciidoc/[AsciiDoc]
* 文档编辑神器, AsciiDoc本身目标是制作大型电子书, 超越MarkDown, 本文就是用AsciiDoc书写完成的
* **Spring**官方、**Spring-Alibaba**官方都采用AsciiDoc撰写文档, **GitHub**也支持AsciiDoc, AsciiDoc是未来的主流, MarkDown貌似要成替补了
* 个人使用体验, 对于写技术文档, 上手快, 简洁, 本文的一个小目标就是为新手提供常用的模块, 支持ctrl + c | v
image::http://file.debuggerpowerzcy.top/power/AsciiDoc.png[title=AsciiDoc文档速览]
- https://plugins.jetbrains.com/plugin/8579-translation/[Translation]
* 作为中国程序员, 英语不会咋办?
* 安装该插件, 选中任意文本, *ctrl + alt + T* 一键翻译
- https://plugins.jetbrains.com/plugin/6725-ibatis-mybatis-mini-plugin/[iBATIS/MyBatis mini-plugin]
* 对于采用Mybatis且保留SQL的方式, 从Mapper接口跳转到对应SQL处, 可以借助该插件完成
* 当然现在有很多采用无SQL的方式, 参见 https://github.com/baomidou/mybatis-plus[苞米豆]
- https://plugins.jetbrains.com/plugin/7179-maven-helper/[MavenHelper]
* 国内Java工程多采用Maven来管理依赖, 对于一些不讲究的老项目, 依赖纠缠不清, 这个时候咋办?
* 就这样, 凉拌吧!
* 又或者, MavenHelper带你浴火重生, 请看下图
image::http://file.debuggerpowerzcy.top/power/MavenHelper.png[title=MavenHelper特性速览]
- https://plugins.jetbrains.com/plugin/8286-sequencediagram/[SequenceDiagram]
* 当我们跳槽后接坑时, 代码的链路是怎样的, 怎么没完没了呢?
* 这个时候, SequenceDiagram带你一览全貌
* 方法调用时序图出来了, 慢慢瞅吧!
image::http://file.debuggerpowerzcy.top/power/SequenceDiagram.png[title=SequenceDiagram特性速览]
- https://plugins.jetbrains.com/plugin/13576-d8gerautocode/[D8gerAutoCode]
* 作为Web开发, 当业务理解清楚后, 开发过程就可以量化如下:
. 表设计
. SQL -> Mapper -> Mo -> -> handler -> *Service* -> Controller
. 自测
. 联调
. PM加需求, 再改一波...
* 在上诉步骤中, 我认为1、2、3步是自己可以控制的, 且步骤2中除了**Service**层代码由业务决定外, 其他基本代码基本如出一辙
* 这意味着什么?
* 据我的观察, 1-3年的大部分程序员就在写这些重复代码, 有时写错或者抄错了, 到调试时定位到问题, 真的浪费不少时间...
* 好在不少前辈通过创建工具, 以逆向工程方式生成``**生产环境可用的**``基础代码, 操作嘛也比较简单, 定义好SQL, 编写配置文件然后运行main方法生成
* 我的编码生涯里也有不少这样的回忆, 只是里面仍旧有不少重复操作, 甚至多人操作时会产生冲突
* 于是, 我从Mo出发, 写了D8gerAutoCode这个插件, 一切以表设计为核心, 你专注设计好Mo就可以, 其他基本代码使用快捷键一键搞定
* 如果D8gerAutoCode只有这个功能, 那其实和其他大佬插件相比没有啥可比性, 大家都用习惯了, 为何要使用新的呢?
* 重点来了: D8gerAutoCode插件专注**`解决重复`**, 在平常工作中的重复工作应该被简化, 在我看来, 程序的初衷不就是如此吗?
* 所以, D8gerAutoCode插件还带有字符串批处理, JSON处理, MySQL处理, 字段命名处理, 针对SwaggerAPI文档的处理, 这些功能是项目开发中都会用到的, 本着一键搞定原则而开发, 欲知详情参见后文
image::http://file.debuggerpowerzcy.top/power/D8Config.png[title=插件配置]
image::http://file.debuggerpowerzcy.top/power/D8Generate.png[title=生成代码]
image::http://file.debuggerpowerzcy.top/power/D8String.png[title=字符串批处理]
image::http://file.debuggerpowerzcy.top/power/D8Format.png[title=格式化]
image::http://file.debuggerpowerzcy.top/power/D8Regrex.png[title=正则彩蛋]
=== 快速测试
- 基于接口进行Http测试
- 整合Swagger-API, 代码及文档, 且支持文档界面进行调试(ing, 后续补充对应的Java实现代码)
- 项目中涉及登录权限等问题, 在HTTP测试时应尽量模拟全, 为前端联调创造真实环境
- 辅助工具
* shell + python脚本
* https://httpie.org/[httpie], 可视化格式化的HTTP请求调用工具包
* https://github.com/kevinburke/sshpass[sshpass], 登录服务器自动输入指定密码, 可实现自动登录
* https://github.com/caofanCPU/D8gerConcurrent[D8gerConcurrent], 支持登陆解析、自动封装Cookie、 http://www.debuggerpowerzcy.top/home/2020/05/15/EasyHttp%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97/[接口并发性能测试]
[source,shell script]
----
function downLoadResponse() {
echo "执行命令内容: \n http --verify=no -v --session-read-only=~/session-cookie-read-only.json POST ${1} < ~/Desktop/ssoLogin/requestBody.json -d >>~/Desktop/ssoLogin/ResponseBody.json ${@:2}\n"
http --verify=no -v --session-read-only=~/session-cookie-read-only.json POST ${1} < ~/Desktop/ssoLogin/requestBody.json -d >>~/Desktop/ssoLogin/ResponseBody.json ${@:2}
}
function downLoadExcel() {
echo "执行命令内容: \n http --verify=no -v --download --session-read-only=~/session-cookie-read-only.json POST ${1} < ~/Desktop/ssoLogin/requestBody.json -o ${2}"
http --verify=no -v --download --session-read-only=~/session-cookie-read-only.json POST ${1} < ~/Desktop/ssoLogin/requestBody.json -o ${2}
}
function show() {
echo "执行命令内容: \n http --verify=no -v --session-read-only=~/session-cookie-read-only.json POST ${1} < ~/Desktop/ssoLogin/requestBody.json ${@:2}\n"
http --verify=no -v --session-read-only=~/session-cookie-read-only.json POST ${1} < ~/Desktop/ssoLogin/requestBody.json ${@:2}
}
# 开发环境机器
function xDev() {
# 借助sshpass工具, 将服务器密码保存在文件第一行, 实现自动登录; 且-t 参数支持登录后跳转到指定目录
sshpass -f /Users/D8GER/Desktop/CAOFAN/sshpass/caofan-ssh-dev.txt ssh Mr.X@xxx.xx.xx.${1} -t 'cd /XXX/logs/; exec $SHELL'
}
# 将HTPP请求的响应结果存入指定文件中, 示例: https-downLoadResponse https://www.baidu.com/
alias https-downLoadResponse='downLoadResponse'
# 在控制台展示完整的HTTP请求过程, 响应打印在控制台, 示例: https-show https://www.baidu.com/
alias https-show='show'
# 对于文件下载, 通过输入参数指定下载后的文件名, 示例: https-downLoadExcel https://www.baidu.com/file/123456 D8ger.zip
alias https-downLoadExcel='downLoadExcel'
# 对于开发测试环境多服务器, 简化为: xDev 99, 则自动登录xxx.xx.xx。99服务器
alias 'xDev=xDev'
----
image::http://file.debuggerpowerzcy.top/power/D8Login.png[登录获取COOKIE,并写入指定文件]
image::http://file.debuggerpowerzcy.top/power/D8Http.png[调用HTTP接口进行测试]
IMPORT: 采用这种方法, 可以告别PostMan或PostWoman及其他软件了, 你只需要**Intellij IDEA** + *iterm2*|xshell + **python**环境
=== Java工具包
- Intellij IDEA代码简化模板, 这个技巧很香的, 比如常见的判断字符串不为空, 我只需要敲下``**fsnb**``, 就会得到如下代码
[source,text]
----
if (StringUtils.isNotBlank(光标在这)) {
}
话不多说, 常用模板定义如下:
/apim : SwaggerModel字段属性模板
oin : 对象为null ==> Objects.isNull()
onn : 对象不为null ==> Objects.nonNull()
o2e : 两对象相等 ==> Objects.equals(, )
one : 两对象不相等 ==> !Objects.equals(, )
foin : 判断对象为null ==> if (Objects.isNull()) {}
fonn : 判断对象不为null ==> if (Objects.nonNull()) {}
fo2e : 判断两对象相等 ==> if (Objects.equals(, )) {}
fone : 判断两对象不相等 ==> if (!Objects.equals(, )) {}
cie : 集合为空 ==> CollectionUtil.isEmpty()
cne : 集合不为空 ==> CollectionUtil.isNotEmpty()
sib : 字符串为空 ==> StringUtils.isBlank()
snb : 字符串不为空 ==> StringUtils.isNotBlank()
fcie : 判断集合为空 ==> if (CollectionUtil.isEmpty()){}
fcne : 判断集合不为空 ==> if (CollectionUtil.isNotEmpty()){}
fsib : 判断字符串为空 ==> if (StringUtils.isBlank()) {}
fsnb : 判断字符串不为空 ==> if (StringUtils.isNotBlank()) {}
----
image::http://file.debuggerpowerzcy.top/power/D8LiveTemplate.png[代码模板]
- 高频工具包, 推荐GitHub开源项目 https://github.com/caofanCPU/D8gerStarters[D8gerStarters]
* 通用工具包子项目 https://github.com/caofanCPU/D8gerStarters/tree/master/spring-cloud-starter-d8ger-common-util[``**spring-cloud-starter-d8ger-common-util**``]
. 集合流式处理工具**CollectionUtil**, 分组、求和、排序应有尽有, 基本可以告别for循环
. 树形处理工具**WrapTreeUtil**, 列表与树的多种转换骚操作也是应有尽有, 并且具有无侵入性, 开箱即用
. 数字精度运算工具**NumberUtil**, 金额进度计算, 精准百分比
. 枚举处理规范**IEnum**, 为项目打好根基, 规范枚举值用
- 中间件可插拔Starters整合工具包, 推荐GitHub开源项目 https://github.com/caofanCPU/D8gerStarters[D8gerStarters]
* 通用工具包子项目 https://github.com/caofanCPU/D8gerStarters/tree/master/spring-cloud-starter-d8ger-web-util[``**spring-cloud-starter-d8ger-web-util**``]
. 整合常用中间件, 例如业务线程池、邮件、Redis缓存、RestTemplate调用、消息队列、接口响应消息转换器、SwaggerAPI文档处理器
. 开关型可插拔, 默认有一套经过大型生产环境检验过的配置, 支持通过配置文件更改配置
. 保留扩展点, 通过继承等方式覆盖原有组件
=== 总结
- 3个开源项目相辅相成, 目的与Spring等框架一致, 解决'最后一站'的重复问题, 以工具的使命提高编码效率, 让我们专注于业务开发
* Intelli IDEA智能生码插件, https://plugins.jetbrains.com/plugin/13576-d8gerautocode/[D8gerAutoCode]
* Python脚本, 解决服务器、登录以及HTTP接口测试里的重复工作, https://github.com/caofanCPU/D8gerConcurrent[D8gerConcurrent]
* Java开发者的福利, 炒鸡香的工具集, https://github.com/caofanCPU/D8gerStarters[D8gerStarters]
- *捐赠|Donate*, **实践撰文分享**实属不易, 您的支持能为更多省时省事的分享提速, 如果💰不行, 那就帮上面的开源项目点量⭐吧, 谢谢!
image::http://file.debuggerpowerzcy.top/power/D8WZ.png[]
================================================
FILE: IntelliJBestAction.html
================================================
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<meta content="Asciidoctor 2.0.10" name="generator">
<title>IntelliJ IDEA最佳实践</title>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700" rel="stylesheet">
<style>
/* Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */
/* Uncomment @import statement to use as custom stylesheet */
/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700";*/
article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section {
display: block
}
audio, video {
display: inline-block
}
audio:not([controls]) {
display: none;
height: 0
}
html {
font-family: sans-serif;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%
}
a {
background: none
}
a:focus {
outline: thin dotted
}
a:active, a:hover {
outline: 0
}
h1 {
font-size: 2em;
margin: .67em 0
}
abbr[title] {
border-bottom: 1px dotted
}
b, strong {
font-weight: bold
}
dfn {
font-style: italic
}
hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0
}
mark {
background: #ff0;
color: #000
}
code, kbd, pre, samp {
font-family: monospace;
font-size: 1em
}
pre {
white-space: pre-wrap
}
q {
quotes: "\201C" "\201D" "\2018" "\2019"
}
small {
font-size: 80%
}
sub, sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline
}
sup {
top: -.5em
}
sub {
bottom: -.25em
}
img {
border: 0
}
svg:not(:root) {
overflow: hidden
}
figure {
margin: 0
}
fieldset {
border: 1px solid silver;
margin: 0 2px;
padding: .35em .625em .75em
}
legend {
border: 0;
padding: 0
}
button, input, select, textarea {
font-family: inherit;
font-size: 100%;
margin: 0
}
button, input {
line-height: normal
}
button, select {
text-transform: none
}
button, html input[type="button"], input[type="reset"], input[type="submit"] {
-webkit-appearance: button;
cursor: pointer
}
button[disabled], html input[disabled] {
cursor: default
}
input[type="checkbox"], input[type="radio"] {
box-sizing: border-box;
padding: 0
}
button::-moz-focus-inner, input::-moz-focus-inner {
border: 0;
padding: 0
}
textarea {
overflow: auto;
vertical-align: top
}
table {
border-collapse: collapse;
border-spacing: 0
}
*, *::before, *::after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box
}
html, body {
font-size: 100%
}
body {
background: #fff;
color: rgba(0, 0, 0, .8);
padding: 0;
margin: 0;
font-family: "Noto Serif", "DejaVu Serif", serif;
font-weight: 400;
font-style: normal;
line-height: 1;
position: relative;
cursor: auto;
tab-size: 4;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased
}
a:hover {
cursor: pointer
}
img, object, embed {
max-width: 100%;
height: auto
}
object, embed {
height: 100%
}
img {
-ms-interpolation-mode: bicubic
}
.left {
float: left !important
}
.right {
float: right !important
}
.text-left {
text-align: left !important
}
.text-right {
text-align: right !important
}
.text-center {
text-align: center !important
}
.text-justify {
text-align: justify !important
}
.hide {
display: none
}
img, object, svg {
display: inline-block;
vertical-align: middle
}
textarea {
height: auto;
min-height: 50px
}
select {
width: 100%
}
.center {
margin-left: auto;
margin-right: auto
}
.stretch {
width: 100%
}
.subheader, .admonitionblock td.content > .title, .audioblock > .title, .exampleblock > .title, .imageblock > .title, .listingblock > .title, .literalblock > .title, .stemblock > .title, .openblock > .title, .paragraph > .title, .quoteblock > .title, table.tableblock > .title, .verseblock > .title, .videoblock > .title, .dlist > .title, .olist > .title, .ulist > .title, .qlist > .title, .hdlist > .title {
line-height: 1.45;
color: #7a2518;
font-weight: 400;
margin-top: 0;
margin-bottom: .25em
}
div, dl, dt, dd, ul, ol, li, h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6, pre, form, p, blockquote, th, td {
margin: 0;
padding: 0;
direction: ltr
}
a {
color: #2156a5;
text-decoration: underline;
line-height: inherit
}
a:hover, a:focus {
color: #1d4b8f
}
a img {
border: 0
}
p {
font-family: inherit;
font-weight: 400;
font-size: 1em;
line-height: 1.6;
margin-bottom: 1.25em;
text-rendering: optimizeLegibility
}
p aside {
font-size: .875em;
line-height: 1.35;
font-style: italic
}
h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6 {
font-family: "Open Sans", "DejaVu Sans", sans-serif;
font-weight: 300;
font-style: normal;
color: #ba3925;
text-rendering: optimizeLegibility;
margin-top: 1em;
margin-bottom: .5em;
line-height: 1.0125em
}
h1 small, h2 small, h3 small, #toctitle small, .sidebarblock > .content > .title small, h4 small, h5 small, h6 small {
font-size: 60%;
color: #e99b8f;
line-height: 0
}
h1 {
font-size: 2.125em
}
h2 {
font-size: 1.6875em
}
h3, #toctitle, .sidebarblock > .content > .title {
font-size: 1.375em
}
h4, h5 {
font-size: 1.125em
}
h6 {
font-size: 1em
}
hr {
border: solid #dddddf;
border-width: 1px 0 0;
clear: both;
margin: 1.25em 0 1.1875em;
height: 0
}
em, i {
font-style: italic;
line-height: inherit
}
strong, b {
font-weight: bold;
line-height: inherit
}
small {
font-size: 60%;
line-height: inherit
}
code {
font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace;
font-weight: 400;
color: rgba(0, 0, 0, .9)
}
ul, ol, dl {
font-size: 1em;
line-height: 1.6;
margin-bottom: 1.25em;
list-style-position: outside;
font-family: inherit
}
ul, ol {
margin-left: 1.5em
}
ul li ul, ul li ol {
margin-left: 1.25em;
margin-bottom: 0;
font-size: 1em
}
ul.square li ul, ul.circle li ul, ul.disc li ul {
list-style: inherit
}
ul.square {
list-style-type: square
}
ul.circle {
list-style-type: circle
}
ul.disc {
list-style-type: disc
}
ol li ul, ol li ol {
margin-left: 1.25em;
margin-bottom: 0
}
dl dt {
margin-bottom: .3125em;
font-weight: bold
}
dl dd {
margin-bottom: 1.25em
}
abbr, acronym {
text-transform: uppercase;
font-size: 90%;
color: rgba(0, 0, 0, .8);
border-bottom: 1px dotted #ddd;
cursor: help
}
abbr {
text-transform: none
}
blockquote {
margin: 0 0 1.25em;
padding: .5625em 1.25em 0 1.1875em;
border-left: 1px solid #ddd
}
blockquote cite {
display: block;
font-size: .9375em;
color: rgba(0, 0, 0, .6)
}
blockquote cite::before {
content: "\2014 \0020"
}
blockquote cite a, blockquote cite a:visited {
color: rgba(0, 0, 0, .6)
}
blockquote, blockquote p {
line-height: 1.6;
color: rgba(0, 0, 0, .85)
}
@media screen and (min-width: 768px) {
h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6 {
line-height: 1.2
}
h1 {
font-size: 2.75em
}
h2 {
font-size: 2.3125em
}
h3, #toctitle, .sidebarblock > .content > .title {
font-size: 1.6875em
}
h4 {
font-size: 1.4375em
}
}
table {
background: #fff;
margin-bottom: 1.25em;
border: solid 1px #dedede
}
table thead, table tfoot {
background: #f7f8f7
}
table thead tr th, table thead tr td, table tfoot tr th, table tfoot tr td {
padding: .5em .625em .625em;
font-size: inherit;
color: rgba(0, 0, 0, .8);
text-align: left
}
table tr th, table tr td {
padding: .5625em .625em;
font-size: inherit;
color: rgba(0, 0, 0, .8)
}
table tr.even, table tr.alt {
background: #f8f8f7
}
table thead tr th, table tfoot tr th, table tbody tr td, table tr td, table tfoot tr td {
display: table-cell;
line-height: 1.6
}
h1, h2, h3, #toctitle, .sidebarblock > .content > .title, h4, h5, h6 {
line-height: 1.2;
word-spacing: -.05em
}
h1 strong, h2 strong, h3 strong, #toctitle strong, .sidebarblock > .content > .title strong, h4 strong, h5 strong, h6 strong {
font-weight: 400
}
.clearfix::before, .clearfix::after, .float-group::before, .float-group::after {
content: " ";
display: table
}
.clearfix::after, .float-group::after {
clear: both
}
:not(pre):not([class^=L]) > code {
font-size: .9375em;
font-style: normal !important;
letter-spacing: 0;
padding: .1em .5ex;
word-spacing: -.15em;
background: #f7f7f8;
-webkit-border-radius: 4px;
border-radius: 4px;
line-height: 1.45;
text-rendering: optimizeSpeed;
word-wrap: break-word
}
:not(pre) > code.nobreak {
word-wrap: normal
}
:not(pre) > code.nowrap {
white-space: nowrap
}
pre {
color: rgba(0, 0, 0, .9);
font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace;
line-height: 1.45;
text-rendering: optimizeSpeed
}
pre code, pre pre {
color: inherit;
font-size: inherit;
line-height: inherit
}
pre > code {
display: block
}
pre.nowrap, pre.nowrap pre {
white-space: pre;
word-wrap: normal
}
em em {
font-style: normal
}
strong strong {
font-weight: 400
}
.keyseq {
color: rgba(51, 51, 51, .8)
}
kbd {
font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace;
display: inline-block;
color: rgba(0, 0, 0, .8);
font-size: .65em;
line-height: 1.45;
background: #f7f7f7;
border: 1px solid #ccc;
-webkit-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 0 0 .1em white inset;
box-shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 0 0 .1em #fff inset;
margin: 0 .15em;
padding: .2em .5em;
vertical-align: middle;
position: relative;
top: -.1em;
white-space: nowrap
}
.keyseq kbd:first-child {
margin-left: 0
}
.keyseq kbd:last-child {
margin-right: 0
}
.menuseq, .menuref {
color: #000
}
.menuseq b:not(.caret), .menuref {
font-weight: inherit
}
.menuseq {
word-spacing: -.02em
}
.menuseq b.caret {
font-size: 1.25em;
line-height: .8
}
.menuseq i.caret {
font-weight: bold;
text-align: center;
width: .45em
}
b.button::before, b.button::after {
position: relative;
top: -1px;
font-weight: 400
}
b.button::before {
content: "[";
padding: 0 3px 0 2px
}
b.button::after {
content: "]";
padding: 0 2px 0 3px
}
p a > code:hover {
color: rgba(0, 0, 0, .9)
}
#header, #content, #footnotes, #footer {
width: 100%;
margin-left: auto;
margin-right: auto;
margin-top: 0;
margin-bottom: 0;
max-width: 62.5em;
*zoom: 1;
position: relative;
padding-left: .9375em;
padding-right: .9375em
}
#header::before, #header::after, #content::before, #content::after, #footnotes::before, #footnotes::after, #footer::before, #footer::after {
content: " ";
display: table
}
#header::after, #content::after, #footnotes::after, #footer::after {
clear: both
}
#content {
margin-top: 1.25em
}
#content::before {
content: none
}
#header > h1:first-child {
color: rgba(0, 0, 0, .85);
margin-top: 2.25rem;
margin-bottom: 0
}
#header > h1:first-child + #toc {
margin-top: 8px;
border-top: 1px solid #dddddf
}
#header > h1:only-child, body.toc2 #header > h1:nth-last-child(2) {
border-bottom: 1px solid #dddddf;
padding-bottom: 8px
}
#header .details {
border-bottom: 1px solid #dddddf;
line-height: 1.45;
padding-top: .25em;
padding-bottom: .25em;
padding-left: .25em;
color: rgba(0, 0, 0, .6);
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-ms-flex-flow: row wrap;
-webkit-flex-flow: row wrap;
flex-flow: row wrap
}
#header .details span:first-child {
margin-left: -.125em
}
#header .details span.email a {
color: rgba(0, 0, 0, .85)
}
#header .details br {
display: none
}
#header .details br + span::before {
content: "\00a0\2013\00a0"
}
#header .details br + span.author::before {
content: "\00a0\22c5\00a0";
color: rgba(0, 0, 0, .85)
}
#header .details br + span#revremark::before {
content: "\00a0|\00a0"
}
#header #revnumber {
text-transform: capitalize
}
#header #revnumber::after {
content: "\00a0"
}
#content > h1:first-child:not([class]) {
color: rgba(0, 0, 0, .85);
border-bottom: 1px solid #dddddf;
padding-bottom: 8px;
margin-top: 0;
padding-top: 1rem;
margin-bottom: 1.25rem
}
#toc {
border-bottom: 1px solid #e7e7e9;
padding-bottom: .5em
}
#toc > ul {
margin-left: .125em
}
#toc ul.sectlevel0 > li > a {
font-style: italic
}
#toc ul.sectlevel0 ul.sectlevel1 {
margin: .5em 0
}
#toc ul {
font-family: "Open Sans", "DejaVu Sans", sans-serif;
list-style-type: none
}
#toc li {
line-height: 1.3334;
margin-top: .3334em
}
#toc a {
text-decoration: none
}
#toc a:active {
text-decoration: underline
}
#toctitle {
color: #7a2518;
font-size: 1.2em
}
@media screen and (min-width: 768px) {
#toctitle {
font-size: 1.375em
}
body.toc2 {
padding-left: 15em;
padding-right: 0
}
#toc.toc2 {
margin-top: 0 !important;
background: #f8f8f7;
position: fixed;
width: 15em;
left: 0;
top: 0;
border-right: 1px solid #e7e7e9;
border-top-width: 0 !important;
border-bottom-width: 0 !important;
z-index: 1000;
padding: 1.25em 1em;
height: 100%;
overflow: auto
}
#toc.toc2 #toctitle {
margin-top: 0;
margin-bottom: .8rem;
font-size: 1.2em
}
#toc.toc2 > ul {
font-size: .9em;
margin-bottom: 0
}
#toc.toc2 ul ul {
margin-left: 0;
padding-left: 1em
}
#toc.toc2 ul.sectlevel0 ul.sectlevel1 {
padding-left: 0;
margin-top: .5em;
margin-bottom: .5em
}
body.toc2.toc-right {
padding-left: 0;
padding-right: 15em
}
body.toc2.toc-right #toc.toc2 {
border-right-width: 0;
border-left: 1px solid #e7e7e9;
left: auto;
right: 0
}
}
@media screen and (min-width: 1280px) {
body.toc2 {
padding-left: 20em;
padding-right: 0
}
#toc.toc2 {
width: 20em
}
#toc.toc2 #toctitle {
font-size: 1.375em
}
#toc.toc2 > ul {
font-size: .95em
}
#toc.toc2 ul ul {
padding-left: 1.25em
}
body.toc2.toc-right {
padding-left: 0;
padding-right: 20em
}
}
#content #toc {
border-style: solid;
border-width: 1px;
border-color: #e0e0dc;
margin-bottom: 1.25em;
padding: 1.25em;
background: #f8f8f7;
-webkit-border-radius: 4px;
border-radius: 4px
}
#content #toc > :first-child {
margin-top: 0
}
#content #toc > :last-child {
margin-bottom: 0
}
#footer {
max-width: 100%;
background: rgba(0, 0, 0, .8);
padding: 1.25em
}
#footer-text {
color: rgba(255, 255, 255, .8);
line-height: 1.44
}
#content {
margin-bottom: .625em
}
.sect1 {
padding-bottom: .625em
}
@media screen and (min-width: 768px) {
#content {
margin-bottom: 1.25em
}
.sect1 {
padding-bottom: 1.25em
}
}
.sect1:last-child {
padding-bottom: 0
}
.sect1 + .sect1 {
border-top: 1px solid #e7e7e9
}
#content h1 > a.anchor, h2 > a.anchor, h3 > a.anchor, #toctitle > a.anchor, .sidebarblock > .content > .title > a.anchor, h4 > a.anchor, h5 > a.anchor, h6 > a.anchor {
position: absolute;
z-index: 1001;
width: 1.5ex;
margin-left: -1.5ex;
display: block;
text-decoration: none !important;
visibility: hidden;
text-align: center;
font-weight: 400
}
#content h1 > a.anchor::before, h2 > a.anchor::before, h3 > a.anchor::before, #toctitle > a.anchor::before, .sidebarblock > .content > .title > a.anchor::before, h4 > a.anchor::before, h5 > a.anchor::before, h6 > a.anchor::before {
content: "\00A7";
font-size: .85em;
display: block;
padding-top: .1em
}
#content h1:hover > a.anchor, #content h1 > a.anchor:hover, h2:hover > a.anchor, h2 > a.anchor:hover, h3:hover > a.anchor, #toctitle:hover > a.anchor, .sidebarblock > .content > .title:hover > a.anchor, h3 > a.anchor:hover, #toctitle > a.anchor:hover, .sidebarblock > .content > .title > a.anchor:hover, h4:hover > a.anchor, h4 > a.anchor:hover, h5:hover > a.anchor, h5 > a.anchor:hover, h6:hover > a.anchor, h6 > a.anchor:hover {
visibility: visible
}
#content h1 > a.link, h2 > a.link, h3 > a.link, #toctitle > a.link, .sidebarblock > .content > .title > a.link, h4 > a.link, h5 > a.link, h6 > a.link {
color: #ba3925;
text-decoration: none
}
#content h1 > a.link:hover, h2 > a.link:hover, h3 > a.link:hover, #toctitle > a.link:hover, .sidebarblock > .content > .title > a.link:hover, h4 > a.link:hover, h5 > a.link:hover, h6 > a.link:hover {
color: #a53221
}
details, .audioblock, .imageblock, .literalblock, .listingblock, .stemblock, .videoblock {
margin-bottom: 1.25em
}
details > summary:first-of-type {
cursor: pointer;
display: list-item;
outline: none;
margin-bottom: .75em
}
.admonitionblock td.content > .title, .audioblock > .title, .exampleblock > .title, .imageblock > .title, .listingblock > .title, .literalblock > .title, .stemblock > .title, .openblock > .title, .paragraph > .title, .quoteblock > .title, table.tableblock > .title, .verseblock > .title, .videoblock > .title, .dlist > .title, .olist > .title, .ulist > .title, .qlist > .title, .hdlist > .title {
text-rendering: optimizeLegibility;
text-align: left;
font-family: "Noto Serif", "DejaVu Serif", serif;
font-size: 1rem;
font-style: italic
}
table.tableblock.fit-content > caption.title {
white-space: nowrap;
width: 0
}
.paragraph.lead > p, #preamble > .sectionbody > [class="paragraph"]:first-of-type p {
font-size: 1.21875em;
line-height: 1.6;
color: rgba(0, 0, 0, .85)
}
table.tableblock #preamble > .sectionbody > [class="paragraph"]:first-of-type p {
font-size: inherit
}
.admonitionblock > table {
border-collapse: separate;
border: 0;
background: none;
width: 100%
}
.admonitionblock > table td.icon {
text-align: center;
width: 80px
}
.admonitionblock > table td.icon img {
max-width: none
}
.admonitionblock > table td.icon .title {
font-weight: bold;
font-family: "Open Sans", "DejaVu Sans", sans-serif;
text-transform: uppercase
}
.admonitionblock > table td.content {
padding-left: 1.125em;
padding-right: 1.25em;
border-left: 1px solid #dddddf;
color: rgba(0, 0, 0, .6)
}
.admonitionblock > table td.content > :last-child > :last-child {
margin-bottom: 0
}
.exampleblock > .content {
border-style: solid;
border-width: 1px;
border-color: #e6e6e6;
margin-bottom: 1.25em;
padding: 1.25em;
background: #fff;
-webkit-border-radius: 4px;
border-radius: 4px
}
.exampleblock > .content > :first-child {
margin-top: 0
}
.exampleblock > .content > :last-child {
margin-bottom: 0
}
.sidebarblock {
border-style: solid;
border-width: 1px;
border-color: #dbdbd6;
margin-bottom: 1.25em;
padding: 1.25em;
background: #f3f3f2;
-webkit-border-radius: 4px;
border-radius: 4px
}
.sidebarblock > :first-child {
margin-top: 0
}
.sidebarblock > :last-child {
margin-bottom: 0
}
.sidebarblock > .content > .title {
color: #7a2518;
margin-top: 0;
text-align: center
}
.exampleblock > .content > :last-child > :last-child, .exampleblock > .content .olist > ol > li:last-child > :last-child, .exampleblock > .content .ulist > ul > li:last-child > :last-child, .exampleblock > .content .qlist > ol > li:last-child > :last-child, .sidebarblock > .content > :last-child > :last-child, .sidebarblock > .content .olist > ol > li:last-child > :last-child, .sidebarblock > .content .ulist > ul > li:last-child > :last-child, .sidebarblock > .content .qlist > ol > li:last-child > :last-child {
margin-bottom: 0
}
.literalblock pre, .listingblock > .content > pre {
-webkit-border-radius: 4px;
border-radius: 4px;
word-wrap: break-word;
overflow-x: auto;
padding: 1em;
font-size: .8125em
}
@media screen and (min-width: 768px) {
.literalblock pre, .listingblock > .content > pre {
font-size: .90625em
}
}
@media screen and (min-width: 1280px) {
.literalblock pre, .listingblock > .content > pre {
font-size: 1em
}
}
.literalblock pre, .listingblock > .content > pre:not(.highlight), .listingblock > .content > pre[class="highlight"], .listingblock > .content > pre[class^="highlight "] {
background: #f7f7f8
}
.literalblock.output pre {
color: #f7f7f8;
background: rgba(0, 0, 0, .9)
}
.listingblock > .content {
position: relative
}
.listingblock code[data-lang]::before {
display: none;
content: attr(data-lang);
position: absolute;
font-size: .75em;
top: .425rem;
right: .5rem;
line-height: 1;
text-transform: uppercase;
color: inherit;
opacity: .5
}
.listingblock:hover code[data-lang]::before {
display: block
}
.listingblock.terminal pre .command::before {
content: attr(data-prompt);
padding-right: .5em;
color: inherit;
opacity: .5
}
.listingblock.terminal pre .command:not([data-prompt])::before {
content: "$"
}
.listingblock pre.highlightjs {
padding: 0
}
.listingblock pre.highlightjs > code {
padding: 1em;
-webkit-border-radius: 4px;
border-radius: 4px
}
.listingblock pre.prettyprint {
border-width: 0
}
.prettyprint {
background: #f7f7f8
}
pre.prettyprint .linenums {
line-height: 1.45;
margin-left: 2em
}
pre.prettyprint li {
background: none;
list-style-type: inherit;
padding-left: 0
}
pre.prettyprint li code[data-lang]::before {
opacity: 1
}
pre.prettyprint li:not(:first-child) code[data-lang]::before {
display: none
}
table.linenotable {
border-collapse: separate;
border: 0;
margin-bottom: 0;
background: none
}
table.linenotable td[class] {
color: inherit;
vertical-align: top;
padding: 0;
line-height: inherit;
white-space: normal
}
table.linenotable td.code {
padding-left: .75em
}
table.linenotable td.linenos {
border-right: 1px solid currentColor;
opacity: .35;
padding-right: .5em
}
pre.pygments .lineno {
border-right: 1px solid currentColor;
opacity: .35;
display: inline-block;
margin-right: .75em
}
pre.pygments .lineno::before {
content: "";
margin-right: -.125em
}
.quoteblock {
margin: 0 1em 1.25em 1.5em;
display: table
}
.quoteblock:not(.excerpt) > .title {
margin-left: -1.5em;
margin-bottom: .75em
}
.quoteblock blockquote, .quoteblock p {
color: rgba(0, 0, 0, .85);
font-size: 1.15rem;
line-height: 1.75;
word-spacing: .1em;
letter-spacing: 0;
font-style: italic;
text-align: justify
}
.quoteblock blockquote {
margin: 0;
padding: 0;
border: 0
}
.quoteblock blockquote::before {
content: "\201c";
float: left;
font-size: 2.75em;
font-weight: bold;
line-height: .6em;
margin-left: -.6em;
color: #7a2518;
text-shadow: 0 1px 2px rgba(0, 0, 0, .1)
}
.quoteblock blockquote > .paragraph:last-child p {
margin-bottom: 0
}
.quoteblock .attribution {
margin-top: .75em;
margin-right: .5ex;
text-align: right
}
.verseblock {
margin: 0 1em 1.25em
}
.verseblock pre {
font-family: "Open Sans", "DejaVu Sans", sans;
font-size: 1.15rem;
color: rgba(0, 0, 0, .85);
font-weight: 300;
text-rendering: optimizeLegibility
}
.verseblock pre strong {
font-weight: 400
}
.verseblock .attribution {
margin-top: 1.25rem;
margin-left: .5ex
}
.quoteblock .attribution, .verseblock .attribution {
font-size: .9375em;
line-height: 1.45;
font-style: italic
}
.quoteblock .attribution br, .verseblock .attribution br {
display: none
}
.quoteblock .attribution cite, .verseblock .attribution cite {
display: block;
letter-spacing: -.025em;
color: rgba(0, 0, 0, .6)
}
.quoteblock.abstract blockquote::before, .quoteblock.excerpt blockquote::before, .quoteblock .quoteblock blockquote::before {
display: none
}
.quoteblock.abstract blockquote, .quoteblock.abstract p, .quoteblock.excerpt blockquote, .quoteblock.excerpt p, .quoteblock .quoteblock blockquote, .quoteblock .quoteblock p {
line-height: 1.6;
word-spacing: 0
}
.quoteblock.abstract {
margin: 0 1em 1.25em;
display: block
}
.quoteblock.abstract > .title {
margin: 0 0 .375em;
font-size: 1.15em;
text-align: center
}
.quoteblock.excerpt > blockquote, .quoteblock .quoteblock {
padding: 0 0 .25em 1em;
border-left: .25em solid #dddddf
}
.quoteblock.excerpt, .quoteblock .quoteblock {
margin-left: 0
}
.quoteblock.excerpt blockquote, .quoteblock.excerpt p, .quoteblock .quoteblock blockquote, .quoteblock .quoteblock p {
color: inherit;
font-size: 1.0625rem
}
.quoteblock.excerpt .attribution, .quoteblock .quoteblock .attribution {
color: inherit;
text-align: left;
margin-right: 0
}
table.tableblock {
max-width: 100%;
border-collapse: separate
}
p.tableblock:last-child {
margin-bottom: 0
}
td.tableblock > .content > :last-child {
margin-bottom: -1.25em
}
td.tableblock > .content > :last-child.sidebarblock {
margin-bottom: 0
}
table.tableblock, th.tableblock, td.tableblock {
border: 0 solid #dedede
}
table.grid-all > thead > tr > .tableblock, table.grid-all > tbody > tr > .tableblock {
border-width: 0 1px 1px 0
}
table.grid-all > tfoot > tr > .tableblock {
border-width: 1px 1px 0 0
}
table.grid-cols > * > tr > .tableblock {
border-width: 0 1px 0 0
}
table.grid-rows > thead > tr > .tableblock, table.grid-rows > tbody > tr > .tableblock {
border-width: 0 0 1px
}
table.grid-rows > tfoot > tr > .tableblock {
border-width: 1px 0 0
}
table.grid-all > * > tr > .tableblock:last-child, table.grid-cols > * > tr > .tableblock:last-child {
border-right-width: 0
}
table.grid-all > tbody > tr:last-child > .tableblock, table.grid-all > thead:last-child > tr > .tableblock, table.grid-rows > tbody > tr:last-child > .tableblock, table.grid-rows > thead:last-child > tr > .tableblock {
border-bottom-width: 0
}
table.frame-all {
border-width: 1px
}
table.frame-sides {
border-width: 0 1px
}
table.frame-topbot, table.frame-ends {
border-width: 1px 0
}
table.stripes-all tr, table.stripes-odd tr:nth-of-type(odd), table.stripes-even tr:nth-of-type(even), table.stripes-hover tr:hover {
background: #f8f8f7
}
th.halign-left, td.halign-left {
text-align: left
}
th.halign-right, td.halign-right {
text-align: right
}
th.halign-center, td.halign-center {
text-align: center
}
th.valign-top, td.valign-top {
vertical-align: top
}
th.valign-bottom, td.valign-bottom {
vertical-align: bottom
}
th.valign-middle, td.valign-middle {
vertical-align: middle
}
table thead th, table tfoot th {
font-weight: bold
}
tbody tr th {
display: table-cell;
line-height: 1.6;
background: #f7f8f7
}
tbody tr th, tbody tr th p, tfoot tr th, tfoot tr th p {
color: rgba(0, 0, 0, .8);
font-weight: bold
}
p.tableblock > code:only-child {
background: none;
padding: 0
}
p.tableblock {
font-size: 1em
}
ol {
margin-left: 1.75em
}
ul li ol {
margin-left: 1.5em
}
dl dd {
margin-left: 1.125em
}
dl dd:last-child, dl dd:last-child > :last-child {
margin-bottom: 0
}
ol > li p, ul > li p, ul dd, ol dd, .olist .olist, .ulist .ulist, .ulist .olist, .olist .ulist {
margin-bottom: .625em
}
ul.checklist, ul.none, ol.none, ul.no-bullet, ol.no-bullet, ol.unnumbered, ul.unstyled, ol.unstyled {
list-style-type: none
}
ul.no-bullet, ol.no-bullet, ol.unnumbered {
margin-left: .625em
}
ul.unstyled, ol.unstyled {
margin-left: 0
}
ul.checklist {
margin-left: .625em
}
ul.checklist li > p:first-child > .fa-square-o:first-child, ul.checklist li > p:first-child > .fa-check-square-o:first-child {
width: 1.25em;
font-size: .8em;
position: relative;
bottom: .125em
}
ul.checklist li > p:first-child > input[type="checkbox"]:first-child {
margin-right: .25em
}
ul.inline {
display: -ms-flexbox;
display: -webkit-box;
display: flex;
-ms-flex-flow: row wrap;
-webkit-flex-flow: row wrap;
flex-flow: row wrap;
list-style: none;
margin: 0 0 .625em -1.25em
}
ul.inline > li {
margin-left: 1.25em
}
.unstyled dl dt {
font-weight: 400;
font-style: normal
}
ol.arabic {
list-style-type: decimal
}
ol.decimal {
list-style-type: decimal-leading-zero
}
ol.loweralpha {
list-style-type: lower-alpha
}
ol.upperalpha {
list-style-type: upper-alpha
}
ol.lowerroman {
list-style-type: lower-roman
}
ol.upperroman {
list-style-type: upper-roman
}
ol.lowergreek {
list-style-type: lower-greek
}
.hdlist > table, .colist > table {
border: 0;
background: none
}
.hdlist > table > tbody > tr, .colist > table > tbody > tr {
background: none
}
td.hdlist1, td.hdlist2 {
vertical-align: top;
padding: 0 .625em
}
td.hdlist1 {
font-weight: bold;
padding-bottom: 1.25em
}
.literalblock + .colist, .listingblock + .colist {
margin-top: -.5em
}
.colist td:not([class]):first-child {
padding: .4em .75em 0;
line-height: 1;
vertical-align: top
}
.colist td:not([class]):first-child img {
max-width: none
}
.colist td:not([class]):last-child {
padding: .25em 0
}
.thumb, .th {
line-height: 0;
display: inline-block;
border: solid 4px #fff;
-webkit-box-shadow: 0 0 0 1px #ddd;
box-shadow: 0 0 0 1px #ddd
}
.imageblock.left {
margin: .25em .625em 1.25em 0
}
.imageblock.right {
margin: .25em 0 1.25em .625em
}
.imageblock > .title {
margin-bottom: 0
}
.imageblock.thumb, .imageblock.th {
border-width: 6px
}
.imageblock.thumb > .title, .imageblock.th > .title {
padding: 0 .125em
}
.image.left, .image.right {
margin-top: .25em;
margin-bottom: .25em;
display: inline-block;
line-height: 0
}
.image.left {
margin-right: .625em
}
.image.right {
margin-left: .625em
}
a.image {
text-decoration: none;
display: inline-block
}
a.image object {
pointer-events: none
}
sup.footnote, sup.footnoteref {
font-size: .875em;
position: static;
vertical-align: super
}
sup.footnote a, sup.footnoteref a {
text-decoration: none
}
sup.footnote a:active, sup.footnoteref a:active {
text-decoration: underline
}
#footnotes {
padding-top: .75em;
padding-bottom: .75em;
margin-bottom: .625em
}
#footnotes hr {
width: 20%;
min-width: 6.25em;
margin: -.25em 0 .75em;
border-width: 1px 0 0
}
#footnotes .footnote {
padding: 0 .375em 0 .225em;
line-height: 1.3334;
font-size: .875em;
margin-left: 1.2em;
margin-bottom: .2em
}
#footnotes .footnote a:first-of-type {
font-weight: bold;
text-decoration: none;
margin-left: -1.05em
}
#footnotes .footnote:last-of-type {
margin-bottom: 0
}
#content #footnotes {
margin-top: -.625em;
margin-bottom: 0;
padding: .75em 0
}
.gist .file-data > table {
border: 0;
background: #fff;
width: 100%;
margin-bottom: 0
}
.gist .file-data > table td.line-data {
width: 99%
}
div.unbreakable {
page-break-inside: avoid
}
.big {
font-size: larger
}
.small {
font-size: smaller
}
.underline {
text-decoration: underline
}
.overline {
text-decoration: overline
}
.line-through {
text-decoration: line-through
}
.aqua {
color: #00bfbf
}
.aqua-background {
background: #00fafa
}
.black {
color: #000
}
.black-background {
background: #000
}
.blue {
color: #0000bf
}
.blue-background {
background: #0000fa
}
.fuchsia {
color: #bf00bf
}
.fuchsia-background {
background: #fa00fa
}
.gray {
color: #606060
}
.gray-background {
background: #7d7d7d
}
.green {
color: #006000
}
.green-background {
background: #007d00
}
.lime {
color: #00bf00
}
.lime-background {
background: #00fa00
}
.maroon {
color: #600000
}
.maroon-background {
background: #7d0000
}
.navy {
color: #000060
}
.navy-background {
background: #00007d
}
.olive {
color: #606000
}
.olive-background {
background: #7d7d00
}
.purple {
color: #600060
}
.purple-background {
background: #7d007d
}
.red {
color: #bf0000
}
.red-background {
background: #fa0000
}
.silver {
color: #909090
}
.silver-background {
background: #bcbcbc
}
.teal {
color: #006060
}
.teal-background {
background: #007d7d
}
.white {
color: #bfbfbf
}
.white-background {
background: #fafafa
}
.yellow {
color: #bfbf00
}
.yellow-background {
background: #fafa00
}
span.icon > .fa {
cursor: default
}
a span.icon > .fa {
cursor: inherit
}
.admonitionblock td.icon [class^="fa icon-"] {
font-size: 2.5em;
text-shadow: 1px 1px 2px rgba(0, 0, 0, .5);
cursor: default
}
.admonitionblock td.icon .icon-note::before {
content: "\f05a";
color: #19407c
}
.admonitionblock td.icon .icon-tip::before {
content: "\f0eb";
text-shadow: 1px 1px 2px rgba(155, 155, 0, .8);
color: #111
}
.admonitionblock td.icon .icon-warning::before {
content: "\f071";
color: #bf6900
}
.admonitionblock td.icon .icon-caution::before {
content: "\f06d";
color: #bf3400
}
.admonitionblock td.icon .icon-important::before {
content: "\f06a";
color: #bf0000
}
.conum[data-value] {
display: inline-block;
color: #fff !important;
background: rgba(0, 0, 0, .8);
-webkit-border-radius: 100px;
border-radius: 100px;
text-align: center;
font-size: .75em;
width: 1.67em;
height: 1.67em;
line-height: 1.67em;
font-family: "Open Sans", "DejaVu Sans", sans-serif;
font-style: normal;
font-weight: bold
}
.conum[data-value] * {
color: #fff !important
}
.conum[data-value] + b {
display: none
}
.conum[data-value]::after {
content: attr(data-value)
}
pre .conum[data-value] {
position: relative;
top: -.125em
}
b.conum * {
color: inherit !important
}
.conum:not([data-value]):empty {
display: none
}
dt, th.tableblock, td.content, div.footnote {
text-rendering: optimizeLegibility
}
h1, h2, p, td.content, span.alt {
letter-spacing: -.01em
}
p strong, td.content strong, div.footnote strong {
letter-spacing: -.005em
}
p, blockquote, dt, td.content, span.alt {
font-size: 1.0625rem
}
p {
margin-bottom: 1.25rem
}
.sidebarblock p, .sidebarblock dt, .sidebarblock td.content, p.tableblock {
font-size: 1em
}
.exampleblock > .content {
background: #fffef7;
border-color: #e0e0dc;
-webkit-box-shadow: 0 1px 4px #e0e0dc;
box-shadow: 0 1px 4px #e0e0dc
}
.print-only {
display: none !important
}
@page {
margin: 1.25cm .75cm
}
@media print {
* {
-webkit-box-shadow: none !important;
box-shadow: none !important;
text-shadow: none !important
}
html {
font-size: 80%
}
a {
color: inherit !important;
text-decoration: underline !important
}
a.bare, a[href^="#"], a[href^="mailto:"] {
text-decoration: none !important
}
a[href^="http:"]:not(.bare)::after, a[href^="https:"]:not(.bare)::after {
content: "(" attr(href) ")";
display: inline-block;
font-size: .875em;
padding-left: .25em
}
abbr[title]::after {
content: " (" attr(title) ")"
}
pre, blockquote, tr, img, object, svg {
page-break-inside: avoid
}
thead {
display: table-header-group
}
svg {
max-width: 100%
}
p, blockquote, dt, td.content {
font-size: 1em;
orphans: 3;
widows: 3
}
h2, h3, #toctitle, .sidebarblock > .content > .title {
page-break-after: avoid
}
#toc, .sidebarblock, .exampleblock > .content {
background: none !important
}
#toc {
border-bottom: 1px solid #dddddf !important;
padding-bottom: 0 !important
}
body.book #header {
text-align: center
}
body.book #header > h1:first-child {
border: 0 !important;
margin: 2.5em 0 1em
}
body.book #header .details {
border: 0 !important;
display: block;
padding: 0 !important
}
body.book #header .details span:first-child {
margin-left: 0 !important
}
body.book #header .details br {
display: block
}
body.book #header .details br + span::before {
content: none !important
}
body.book #toc {
border: 0 !important;
text-align: left !important;
padding: 0 !important;
margin: 0 !important
}
body.book #toc, body.book #preamble, body.book h1.sect0, body.book .sect1 > h2 {
page-break-before: always
}
.listingblock code[data-lang]::before {
display: block
}
#footer {
padding: 0 .9375em
}
.hide-on-print {
display: none !important
}
.print-only {
display: block !important
}
.hide-for-print {
display: none !important
}
.show-for-print {
display: inherit !important
}
}
@media print, amzn-kf8 {
#header > h1:first-child {
margin-top: 1.25rem
}
.sect1 {
padding: 0 !important
}
.sect1 + .sect1 {
border: 0
}
#footer {
background: none
}
#footer-text {
color: rgba(0, 0, 0, .6);
font-size: .9em
}
}
@media amzn-kf8 {
#header, #content, #footnotes, #footer {
padding: 0
}
}
</style>
</head>
<body class="article">
<div id="header">
</div>
<div id="content">
<div class="sect1">
<h2 id="_intellij_idea最佳实践">IntelliJ IDEA最佳实践</h2>
<div class="sectionbody">
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Intellij IDEA for Java WEB 开发</p>
<div class="ulist">
<ul>
<li>
<p>快捷键</p>
</li>
<li>
<p>插件</p>
</li>
<li>
<p>快速测试</p>
</li>
<li>
<p>Java工具包</p>
</li>
</ul>
</div>
</li>
<li>
<p>Intellij IDEA for Scala 开发(ing)</p>
</li>
<li>
<p>Intellij IDEA for Kotlin 开发(ing)</p>
</li>
</ol>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<div class="title">Note</div>
</td>
<td class="content">
如无特殊说明, 本文基于Mac OS 及Intellij IDEA 2020.1.x,<br>
涉及系统或版本差异时会就近补充说明,<br>
总体上: Mac的<strong>
<mark>cmd</mark>
</strong>等价于Windows的<strong>
<mark>ctrl</mark>
</strong>,<br>
Intellij IDEA高版本功能是兼容低版本功能的, 只是部分插件会受到一些影响
</td>
</tr>
</table>
</div>
<div class="sect2">
<h3 id="_快捷键">快捷键</h3>
<div class="ulist">
<ul>
<li>
<p>找到所有快捷键, <code>Help</code> -→ <code>Keymap Reference</code>, 出现的PDF展示了当前你的编辑器的所有快捷键</p>
</li>
<li>
<p>确实有点多, 不着急, 知道了方法, 后续只是时间问题.
如何搜索快捷键, 参见下图</p>
</li>
</ul>
</div>
<div class="imageblock">
<div class="content">
<img alt="Shortcut" src="http://file.debuggerpowerzcy.top/power/Shortcut.png">
</div>
<div class="title">Figure 1. 如何搜索快捷键</div>
</div>
<table class="tableblock frame-all grid-all stretch">
<caption class="title">Table 1. 10个高频快捷键</caption>
<colgroup>
<col style="width: 33.3333%;">
<col style="width: 33.3333%;">
<col style="width: 33.3334%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">功能</th>
<th class="tableblock halign-left valign-top">关键词</th>
<th class="tableblock halign-left valign-top">示例(默认)快捷键</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">①语句自动完成</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Complete statement</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">cmd + shift + enter</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">②复写(父类)方法</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Override methods | Generate</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ctrl + O | ctrl + enter</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">③智能提示|纠错</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Show Context Actions</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ctrl + shift + alt + enter</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">④快速复制粘贴</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Duplicate Line or Selection</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">cmd + D</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">⑤查看方法调用</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Call Hierarchy</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ctrl + alt + H</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">⑥跳转到父类申明</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Go to Super Method</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">cmd + U</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">⑦跳转到子类实现</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Go to Declaration or Usages</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">cmd + B</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">⑧拼接下一行</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Join Lines</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ctrl + shift + J</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">⑨优化导包</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Optimize Imports</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">ctrl + alt + O</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">⑩格式化代码</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Reformat Code</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">cmd + alt + L</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">更多彩蛋</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">安装插件 Key Promoter X</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">对于有快捷键的按钮, 当你点击时提示告诉你快捷键</p></td>
</tr>
</tbody>
</table>
</div>
<div class="sect2">
<h3 id="_插件">插件</h3>
<div class="ulist">
<ul>
<li>
<p><a href="https://plugins.jetbrains.com/plugin/9792-key-promoter-x/">Key Promoter X</a></p>
<div class="ulist">
<ul>
<li>
<p>快捷键提示, 新手必备, 而老手也可以通过它得知新版IDEA的一些特性信息</p>
</li>
</ul>
</div>
</li>
<li>
<p><a href="https://plugins.jetbrains.com/plugin/10080-rainbow-brackets/">Rainbow Brackets</a></p>
<div class="ulist">
<ul>
<li>
<p>代码括号自动匹配, 彩板护眼</p>
</li>
</ul>
</div>
</li>
<li>
<p><a href="https://plugins.jetbrains.com/plugin/6317-lombok/">Lombok</a></p>
<div class="ulist">
<ul>
<li>
<p>这位都听说过吧, 没听过的要么是大佬要么改行吧</p>
</li>
<li>
<p>采坑经验, 使用Lombok时, 尽量避免对象间继承, 如果非要继承, 应考虑@EqualsAndHashCode(callSuper = true : false)</p>
</li>
<li>
<p>示例:</p>
</li>
</ul>
</div>
</li>
</ul>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="jave">/**
* balabala
*
* @author Mr.X
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
public class PormHub extends GitHub{
private Boolean well = Boolean.FALSE;
}</code></pre>
</div>
</div>
<div class="ulist">
<ul>
<li>
<p><a href="https://plugins.jetbrains.com/plugin/7391-asciidoc/">AsciiDoc</a></p>
<div class="ulist">
<ul>
<li>
<p>文档编辑神器, AsciiDoc本身目标是制作大型电子书, 超越MarkDown, 本文就是用AsciiDoc书写完成的</p>
</li>
<li>
<p><strong>Spring</strong>官方、<strong>Spring-Alibaba</strong>官方都采用AsciiDoc撰写文档, <strong>GitHub</strong>也支持AsciiDoc, AsciiDoc是未来的主流, MarkDown貌似要成替补了</p>
</li>
<li>
<p>个人使用体验, 对于写技术文档, 上手快, 简洁, 本文的一个小目标就是为新手提供常用的模块, 支持ctrl + c | v</p>
</li>
</ul>
</div>
</li>
</ul>
</div>
<div class="imageblock">
<div class="content">
<img alt="AsciiDoc" src="http://file.debuggerpowerzcy.top/power/AsciiDoc.png">
</div>
<div class="title">Figure 2. AsciiDoc文档速览</div>
</div>
<div class="ulist">
<ul>
<li>
<p><a href="https://plugins.jetbrains.com/plugin/8579-translation/">Translation</a></p>
<div class="ulist">
<ul>
<li>
<p>作为中国程序员, 英语不会咋办?</p>
</li>
<li>
<p>安装该插件, 选中任意文本, <strong>ctrl + alt + T</strong> 一键翻译</p>
</li>
</ul>
</div>
</li>
<li>
<p><a href="https://plugins.jetbrains.com/plugin/6725-ibatis-mybatis-mini-plugin/">iBATIS/MyBatis mini-plugin</a></p>
<div class="ulist">
<ul>
<li>
<p>对于采用Mybatis且保留SQL的方式, 从Mapper接口跳转到对应SQL处, 可以借助该插件完成</p>
</li>
<li>
<p>当然现在有很多采用无SQL的方式, 参见 <a href="https://github.com/baomidou/mybatis-plus">苞米豆</a></p>
</li>
</ul>
</div>
</li>
<li>
<p><a href="https://plugins.jetbrains.com/plugin/7179-maven-helper/">MavenHelper</a></p>
<div class="ulist">
<ul>
<li>
<p>国内Java工程多采用Maven来管理依赖, 对于一些不讲究的老项目, 依赖纠缠不清, 这个时候咋办?</p>
</li>
<li>
<p>就这样, 凉拌吧!</p>
</li>
<li>
<p>又或者, MavenHelper带你浴火重生, 请看下图</p>
</li>
</ul>
</div>
</li>
</ul>
</div>
<div class="imageblock">
<div class="content">
<img alt="MavenHelper" src="http://file.debuggerpowerzcy.top/power/MavenHelper.png">
</div>
<div class="title">Figure 3. MavenHelper特性速览</div>
</div>
<div class="ulist">
<ul>
<li>
<p><a href="https://plugins.jetbrains.com/plugin/8286-sequencediagram/">SequenceDiagram</a></p>
<div class="ulist">
<ul>
<li>
<p>当我们跳槽后接坑时, 代码的链路是怎样的, 怎么没完没了呢?</p>
</li>
<li>
<p>这个时候, SequenceDiagram带你一览全貌</p>
</li>
<li>
<p>方法调用时序图出来了, 慢慢瞅吧!</p>
</li>
</ul>
</div>
</li>
</ul>
</div>
<div class="imageblock">
<div class="content">
<img alt="SequenceDiagram" src="http://file.debuggerpowerzcy.top/power/SequenceDiagram.png">
</div>
<div class="title">Figure 4. SequenceDiagram特性速览</div>
</div>
<div class="ulist">
<ul>
<li>
<p><a href="https://plugins.jetbrains.com/plugin/13576-d8gerautocode/">D8gerAutoCode</a></p>
<div class="ulist">
<ul>
<li>
<p>作为Web开发, 当业务理解清楚后, 开发过程就可以量化如下:</p>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>表设计</p>
</li>
<li>
<p>SQL → Mapper → Mo → → handler → <strong>Service</strong> → Controller</p>
</li>
<li>
<p>自测</p>
</li>
<li>
<p>联调</p>
</li>
<li>
<p>PM加需求, 再改一波…​</p>
</li>
</ol>
</div>
</li>
<li>
<p>在上诉步骤中, 我认为1、2、3步是自己可以控制的, 且步骤2中除了<strong>Service</strong>层代码由业务决定外, 其他基本代码基本如出一辙</p>
</li>
<li>
<p>这意味着什么?</p>
</li>
<li>
<p>据我的观察, 1-3年的大部分程序员就在写这些重复代码, 有时写错或者抄错了, 到调试时定位到问题, 真的浪费不少时间…​</p>
</li>
<li>
<p>好在不少前辈通过创建工具, 以逆向工程方式生成<code><strong>生产环境可用的</strong></code>基础代码, 操作嘛也比较简单, 定义好SQL, 编写配置文件然后运行main方法生成</p>
</li>
<li>
<p>我的编码生涯里也有不少这样的回忆, 只是里面仍旧有不少重复操作, 甚至多人操作时会产生冲突</p>
</li>
<li>
<p>于是, 我从Mo出发, 写了D8gerAutoCode这个插件, 一切以表设计为核心, 你专注设计好Mo就可以, 其他基本代码使用快捷键一键搞定</p>
</li>
<li>
<p>如果D8gerAutoCode只有这个功能, 那其实和其他大佬插件相比没有啥可比性, 大家都用习惯了, 为何要使用新的呢?</p>
</li>
<li>
<p>重点来了: D8gerAutoCode插件专注<strong><code>解决重复</code></strong>, 在平常工作中的重复工作应该被简化, 在我看来, 程序的初衷不就是如此吗?</p>
</li>
<li>
<p>所以, D8gerAutoCode插件还带有字符串批处理, JSON处理, MySQL处理, 字段命名处理, 针对SwaggerAPI文档的处理, 这些功能是项目开发中都会用到的, 本着一键搞定原则而开发, 欲知详情参见后文</p>
</li>
</ul>
</div>
</li>
</ul>
</div>
<div class="imageblock">
<div class="content">
<img alt="D8Config" src="http://file.debuggerpowerzcy.top/power/D8Config.png">
</div>
<div class="title">Figure 5. 插件配置</div>
</div>
<div class="imageblock">
<div class="content">
<img alt="D8Generate" src="http://file.debuggerpowerzcy.top/power/D8Generate.png">
</div>
<div class="title">Figure 6. 生成代码</div>
</div>
<div class="imageblock">
<div class="content">
<img alt="D8String" src="http://file.debuggerpowerzcy.top/power/D8String.png">
</div>
<div class="title">Figure 7. 字符串批处理</div>
</div>
<div class="imageblock">
<div class="content">
<img alt="D8Format" src="http://file.debuggerpowerzcy.top/power/D8Format.png">
</div>
<div class="title">Figure 8. 格式化</div>
</div>
<div class="imageblock">
<div class="content">
<img alt="D8Regrex" src="http://file.debuggerpowerzcy.top/power/D8Regrex.png">
</div>
<div class="title">Figure 9. 正则彩蛋</div>
</div>
</div>
<div class="sect2">
<h3 id="_快速测试">快速测试</h3>
<div class="ulist">
<ul>
<li>
<p>基于接口进行Http测试</p>
</li>
<li>
<p>整合Swagger-API, 代码及文档, 且支持文档界面进行调试(ing, 后续补充对应的Java实现代码)</p>
</li>
<li>
<p>项目中涉及登录权限等问题, 在HTTP测试时应尽量模拟全, 为前端联调创造真实环境</p>
</li>
<li>
<p>辅助工具</p>
<div class="ulist">
<ul>
<li>
<p>shell + python脚本</p>
</li>
<li>
<p><a href="https://httpie.org/">httpie</a>, 可视化格式化的HTTP请求调用工具包</p>
</li>
<li>
<p><a href="https://github.com/kevinburke/sshpass">sshpass</a>, 登录服务器自动输入指定密码, 可实现自动登录</p>
</li>
<li>
<p><a href="https://github.com/caofanCPU/D8gerConcurrent">D8gerConcurrent</a>, 支持登陆解析、自动封装Cookie、 <a href="http://www.debuggerpowerzcy.top/home/2020/05/15/EasyHttp%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97/">接口并发性能测试</a></p>
</li>
</ul>
</div>
</li>
</ul>
</div>
<div class="listingblock">
<div class="content">
<pre>function downLoadResponse() {
echo "执行命令内容: \n http --verify=no -v --session-read-only=~/session-cookie-read-only.json POST ${1} < ~/Desktop/ssoLogin/requestBody.json -d >>~/Desktop/ssoLogin/ResponseBody.json ${@:2}\n"
http --verify=no -v --session-read-only=~/session-cookie-read-only.json POST ${1} < ~/Desktop/ssoLogin/requestBody.json -d >>~/Desktop/ssoLogin/ResponseBody.json ${@:2}
}
function downLoadExcel() {
echo "执行命令内容: \n http --verify=no -v --download --session-read-only=~/session-cookie-read-only.json POST ${1} < ~/Desktop/ssoLogin/requestBody.json -o ${2}"
http --verify=no -v --download --session-read-only=~/session-cookie-read-only.json POST ${1} < ~/Desktop/ssoLogin/requestBody.json -o ${2}
}
function show() {
echo "执行命令内容: \n http --verify=no -v --session-read-only=~/session-cookie-read-only.json POST ${1} < ~/Desktop/ssoLogin/requestBody.json ${@:2}\n"
http --verify=no -v --session-read-only=~/session-cookie-read-only.json POST ${1} < ~/Desktop/ssoLogin/requestBody.json ${@:2}
}
# 开发环境机器
function xDev() {
# 借助sshpass工具, 将服务器密码保存在文件第一行, 实现自动登录; 且-t 参数支持登录后跳转到指定目录
sshpass -f /Users/D8GER/Desktop/CAOFAN/sshpass/caofan-ssh-dev.txt ssh Mr.X@xxx.xx.xx.${1} -t 'cd /XXX/logs/; exec $SHELL'
}
# 将HTPP请求的响应结果存入指定文件中, 示例: https-downLoadResponse https://www.baidu.com/
alias https-downLoadResponse='downLoadResponse'
# 在控制台展示完整的HTTP请求过程, 响应打印在控制台, 示例: https-show https://www.baidu.com/
alias https-show='show'
# 对于文件下载, 通过输入参数指定下载后的文件名, 示例: https-downLoadExcel https://www.baidu.com/file/123456 D8ger.zip
alias https-downLoadExcel='downLoadExcel'
# 对于开发测试环境多服务器, 简化为: xDev 99, 则自动登录xxx.xx.xx。99服务器
alias 'xDev=xDev'</pre>
</div>
</div>
<div class="imageblock">
<div class="content">
<img alt="登录获取COOKIE" src="http://file.debuggerpowerzcy.top/power/D8Login.png" width="并写入指定文件">
</div>
</div>
<div class="imageblock">
<div class="content">
<img alt="调用HTTP接口进行测试" src="http://file.debuggerpowerzcy.top/power/D8Http.png">
</div>
</div>
<div class="paragraph">
<p>IMPORT: 采用这种方法, 可以告别PostMan或PostWoman及其他软件了, 你只需要<strong>Intellij IDEA</strong> + <strong>iterm2</strong>|xshell + <strong>python</strong>环境</p>
</div>
</div>
<div class="sect2">
<h3 id="_java工具包">Java工具包</h3>
<div class="ulist">
<ul>
<li>
<p>Intellij IDEA代码简化模板, 这个技巧很香的, 比如常见的判断字符串不为空, 我只需要敲下<code><strong>fsnb</strong></code>, 就会得到如下代码</p>
</li>
</ul>
</div>
<div class="listingblock">
<div class="content">
<pre>if (StringUtils.isNotBlank(光标在这)) {
}
话不多说, 常用模板定义如下:
/apim : SwaggerModel字段属性模板
oin : 对象为null ==> Objects.isNull()
onn : 对象不为null ==> Objects.nonNull()
o2e : 两对象相等 ==> Objects.equals(, )
one : 两对象不相等 ==> !Objects.equals(, )
foin : 判断对象为null ==> if (Objects.isNull()) {}
fonn : 判断对象不为null ==> if (Objects.nonNull()) {}
fo2e : 判断两对象相等 ==> if (Objects.equals(, )) {}
fone : 判断两对象不相等 ==> if (!Objects.equals(, )) {}
cie : 集合为空 ==> CollectionUtil.isEmpty()
cne : 集合不为空 ==> CollectionUtil.isNotEmpty()
sib : 字符串为空 ==> StringUtils.isBlank()
snb : 字符串不为空 ==> StringUtils.isNotBlank()
fcie : 判断集合为空 ==> if (CollectionUtil.isEmpty()){}
fcne : 判断集合不为空 ==> if (CollectionUtil.isNotEmpty()){}
fsib : 判断字符串为空 ==> if (StringUtils.isBlank()) {}
fsnb : 判断字符串不为空 ==> if (StringUtils.isNotBlank()) {}</pre>
</div>
</div>
<div class="imageblock">
<div class="content">
<img alt="代码模板" src="http://file.debuggerpowerzcy.top/power/D8LiveTemplate.png">
</div>
</div>
<div class="ulist">
<ul>
<li>
<p>高频工具包, 推荐GitHub开源项目 <a href="https://github.com/caofanCPU/D8gerStarters">D8gerStarters</a></p>
<div class="ulist">
<ul>
<li>
<p>通用工具包子项目 <a href="https://github.com/caofanCPU/D8gerStarters/tree/master/spring-cloud-starter-d8ger-common-util"><code><strong>spring-cloud-starter-d8ger-common-util</strong></code></a></p>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>集合流式处理工具<strong>CollectionUtil</strong>, 分组、求和、排序应有尽有, 基本可以告别for循环</p>
</li>
<li>
<p>树形处理工具<strong>WrapTreeUtil</strong>, 列表与树的多种转换骚操作也是应有尽有, 并且具有无侵入性, 开箱即用</p>
</li>
<li>
<p>数字精度运算工具<strong>NumberUtil</strong>, 金额进度计算, 精准百分比</p>
</li>
<li>
<p>枚举处理规范<strong>IEnum</strong>, 为项目打好根基, 规范枚举值用</p>
</li>
</ol>
</div>
</li>
</ul>
</div>
</li>
<li>
<p>中间件可插拔Starters整合工具包, 推荐GitHub开源项目 <a href="https://github.com/caofanCPU/D8gerStarters">D8gerStarters</a></p>
<div class="ulist">
<ul>
<li>
<p>通用工具包子项目 <a href="https://github.com/caofanCPU/D8gerStarters/tree/master/spring-cloud-starter-d8ger-web-util"><code><strong>spring-cloud-starter-d8ger-web-util</strong></code></a></p>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>整合常用中间件, 例如业务线程池、邮件、Redis缓存、RestTemplate调用、消息队列、接口响应消息转换器、SwaggerAPI文档处理器</p>
</li>
<li>
<p>开关型可插拔, 默认有一套经过大型生产环境检验过的配置, 支持通过配置文件更改配置</p>
</li>
<li>
<p>保留扩展点, 通过继承等方式覆盖原有组件</p>
</li>
</ol>
</div>
</li>
</ul>
</div>
</li>
</ul>
</div>
</div>
<div class="sect2">
<h3 id="_总结">总结</h3>
<div class="ulist">
<ul>
<li>
<p>3个开源项目相辅相成, 目的与Spring等框架一致, 解决’最后一站’的重复问题, 以工具的使命提高编码效率, 让我们专注于业务开发</p>
<div class="ulist">
<ul>
<li>
<p>Intelli IDEA智能生码插件, <a href="https://plugins.jetbrains.com/plugin/13576-d8gerautocode/">D8gerAutoCode</a></p>
</li>
<li>
<p>Python脚本, 解决服务器、登录以及HTTP接口测试里的重复工作, <a href="https://github.com/caofanCPU/D8gerConcurrent">D8gerConcurrent</a></p>
</li>
<li>
<p>Java开发者的福利, 炒鸡香的工具集, <a href="https://github.com/caofanCPU/D8gerStarters">D8gerStarters</a></p>
</li>
</ul>
</div>
</li>
<li>
<p><strong>捐赠|Donate</strong>, <strong>实践撰文分享</strong>实属不易, 您的支持能为更多省时省事的分享提速, 如果💰不行, 那就帮上面的开源项目点量⭐吧, 谢谢!</p>
</li>
</ul>
</div>
<div class="imageblock">
<div class="content">
<img alt="D8WZ" src="http://file.debuggerpowerzcy.top/power/D8WZ.png">
</div>
</div>
</div>
</div>
</div>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2020-08-30 00:02:13 +0800
</div>
</div>
</body>
</html>
================================================
FILE: LICENCE
================================================
Apache License
Version 2.0, January 2019
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and
distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the
copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other
entities that control, are controlled by, or are under common control with
that entity. For the purposes of this definition, "control" means (i) the
power, direct or indirect, to cause the direction or management of such
entity, whether by contract or otherwise, or (ii) ownership of
fifty percent (50%) or more of the outstanding shares, or (iii) beneficial
ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising
permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation source,
and configuration files.
"Object" form shall mean any form resulting from mechanical transformation
or translation of a Source form, including but not limited to compiled
object code, generated documentation, and conversions to
other media types.
"Work" shall mean the work of authorship, whether in Source or Object
form, made available under the License, as indicated by a copyright notice
that is included in or attached to the work (an example is provided in the
Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form,
that is based on (or derived from) the Work and for which the editorial
revisions, annotations, elaborations, or other modifications represent,
as a whole, an original work of authorship. For the purposes of this
License, Derivative Works shall not include works that remain separable
from, or merely link (or bind by name) to the interfaces of, the Work and
Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original
version of the Work and any modifications or additions to that Work or
Derivative Works thereof, that is intentionally submitted to Licensor for
inclusion in the Work by the copyright owner or by an individual or
Legal Entity authorized to submit on behalf of the copyright owner.
For the purposes of this definition, "submitted" means any form of
electronic, verbal, or written communication sent to the Licensor or its
representatives, including but not limited to communication on electronic
mailing lists, source code control systems, and issue tracking systems
that are managed by, or on behalf of, the Licensor for the purpose of
discussing and improving the Work, but excluding communication that is
conspicuously marked or otherwise designated in writing by the copyright
owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on
behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License.
Subject to the terms and conditions of this License, each Contributor
hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
royalty-free, irrevocable copyright license to reproduce, prepare
Derivative Works of, publicly display, publicly perform, sublicense,
and distribute the Work and such Derivative Works in
Source or Object form.
3. Grant of Patent License.
Subject to the terms and conditions of this License, each Contributor
hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
royalty-free, irrevocable (except as stated in this section) patent
license to make, have made, use, offer to sell, sell, import, and
otherwise transfer the Work, where such license applies only to those
patent claims licensable by such Contributor that are necessarily
infringed by their Contribution(s) alone or by combination of their
Contribution(s) with the Work to which such Contribution(s) was submitted.
If You institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
Contribution incorporated within the Work constitutes direct or
contributory patent infringement, then any patent licenses granted to
You under this License for that Work shall terminate as of the date such
litigation is filed.
4. Redistribution.
You may reproduce and distribute copies of the Work or Derivative Works
thereof in any medium, with or without modifications, and in Source or
Object form, provided that You meet the following conditions:
1. You must give any other recipients of the Work or Derivative Works a
copy of this License; and
2. You must cause any modified files to carry prominent notices stating
that You changed the files; and
3. You must retain, in the Source form of any Derivative Works that You
distribute, all copyright, patent, trademark, and attribution notices from
the Source form of the Work, excluding those notices that do not pertain
to any part of the Derivative Works; and
4. If the Work includes a "NOTICE" text file as part of its distribution,
then any Derivative Works that You distribute must include a readable copy
of the attribution notices contained within such NOTICE file, excluding
those notices that do not pertain to any part of the Derivative Works,
in at least one of the following places: within a NOTICE text file
distributed as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or, within a
display generated by the Derivative Works, if and wherever such
third-party notices normally appear. The contents of the NOTICE file are
for informational purposes only and do not modify the License.
You may add Your own attribution notices within Derivative Works that You
distribute, alongside or as an addendum to the NOTICE text from the Work,
provided that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and may
provide additional or different license terms and conditions for use,
reproduction, or distribution of Your modifications, or for any such
Derivative Works as a whole, provided Your use, reproduction, and
distribution of the Work otherwise complies with the conditions
stated in this License.
5. Submission of Contributions.
Unless You explicitly state otherwise, any Contribution intentionally
submitted for inclusion in the Work by You to the Licensor shall be under
the terms and conditions of this License, without any additional
terms or conditions. Notwithstanding the above, nothing herein shall
supersede or modify the terms of any separate license agreement you may
have executed with Licensor regarding such Contributions.
6. Trademarks.
This License does not grant permission to use the trade names, trademarks,
service marks, or product names of the Licensor, except as required for
reasonable and customary use in describing the origin of the Work and
reproducing the content of the NOTICE file.
7. Disclaimer of Warranty.
Unless required by applicable law or agreed to in writing, Licensor
provides the Work (and each Contributor provides its Contributions)
on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied, including, without limitation, any warranties
or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS
FOR A PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any risks
associated with Your exercise of permissions under this License.
8. Limitation of Liability.
In no event and under no legal theory, whether in tort
(including negligence), contract, or otherwise, unless required by
applicable law (such as deliberate and grossly negligent acts) or agreed
to in writing, shall any Contributor be liable to You for damages,
including any direct, indirect, special, incidental, or consequential
damages of any character arising as a result of this License or out of
the use or inability to use the Work (including but not limited to damages
for loss of goodwill, work stoppage, computer failure or malfunction,
or any and all other commercial damages or losses), even if such
Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability.
While redistributing the Work or Derivative Works thereof, You may choose
to offer, and charge a fee for, acceptance of support, warranty,
indemnity, or other liability obligations and/or rights consistent with
this License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf of any
other Contributor, and only if You agree to indemnify, defend, and hold
each Contributor harmless for any liability incurred by, or claims
asserted against, such Contributor by reason of your accepting any such
warranty or additional liability.
END OF TERMS AND CONDITIONS
Copyright 2019-2025 D8ger/DebuggerKing
LICENSED UNDER THE APACHE LICENSE, VERSION 2.0 (THE "LICENSE");
YOU MAY NOT USE THIS FILE EXCEPT IN COMPLIANCE WITH THE LICENSE.
YOU MAY OBTAIN A COPY OF THE LICENSE AT
http://www.apache.org/licenses/LICENSE-2.0
UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, SOFTWARE
DISTRIBUTED UNDER THE LICENSE IS DISTRIBUTED ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
SEE THE LICENSE FOR THE SPECIFIC LANGUAGE GOVERNING PERMISSIONS AND
LIMITATIONS UNDER THE LICENSE.
================================================
FILE: README.md
================================================
# D8gerAutoCode
<a href="https://github.com/caofanCPU/D8gerAutoCode"><img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/caofanCPU/D8gerAutoCode"></a>
<a href="https://github.com/caofanCPU/D8gerAutoCode/stargazers"><img src="https://badgen.net/github/stars/caofanCPU/D8gerAutoCode" alt="stars"></a>
<a href="https://plugins.jetbrains.com/plugin/13576-d8gerautocode"><img src="https://img.shields.io/jetbrains/plugin/d/13576"></a>
<a href="https://github.com/caofanCPU/D8gerAutoCode"><img src="https://img.shields.io/github/v/release/caofanCPU/D8gerAutoCode"></a>
<a href="https://github.com/caofanCPU/D8gerAutoCode/issues"><img src="https://badgen.net/github/open-issues/caofanCPU/D8gerAutoCode" alt="issues"></a>
<a href="http://file.debuggerpowerzcy.top/power/html/IntelliJBestAction.html"><img src="https://img.shields.io/github/search/caofanCPU/D8gerAutoCode/D8ger"></a>
<a href="https://github.com/caofanCPU/D8gerAutoCode/pulls"><img src="https://badgen.net/badge/PRs/welcome/cyan" alt="PRs Welcome"></a>
<a href="https://github.com/D8ger"><img src="https://badgen.net/badge/organization/join%20us/cyan" alt="open-source-organization"></a>
<a href="https://github.com/caofanCPU/D8gerAutoCode/blob/master/LICENCE"><img src="https://badgen.net/github/license/caofanCPU/D8gerAutoCode?color=green" alt="license"></a>
[](#)
## IDEA Code Automatically Generate Plugin • `For Java Version`
<div align="center">
<img src="http://file.debuggerpowerzcy.top/power/D8ger-V5.jpg" />
</div>
> [中文说明](./README_CN.md)
## Attention
The latest version is **4.1** is approved by the official on 10th, May.
If you can't fetch it, then [click here](https://github.com/caofanCPU/D8gerAutoCode/releases/tag/4.0) to download ~~.zip~~ file.
Important: This version has been implemented [DSP(D8ger Series Plan)](https://www.processon.com/view/5f96a5f35653bb06ef1870e8).
That is, some functions have been migrated to another plugin named [LaoYouTiao](https://github.com/caofanCPU/LaoYouTiao). After testing, installing two plugins will not affect performance. So, I hope you use happy and give me a 🌟, thx!
### Preface
As JetBrains' said, I believe that you should be good use of tools will save you precious hours on your busing work.
I always wonder, "If someone else has already solved the repeating work, why do I need to repeat it again?"
Well, that's a valid question for my drive to find the repeat parts at daily work and develop this plugin to save my time.
### [Quick Start](http://www.debuggerpowerzcy.top/home/2020/03/14/D8gerAutoCode%E6%8F%92%E4%BB%B6%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97/)
<a href="http://file.debuggerpowerzcy.top/power/html/IntelliJBestAction.html" target="_blank">ZN程序员福利</a>
### Convention
- The general problem provides standard solutions
- The personalized problem only provides example solutions
### Original design intention
- Remove the fixed duplication coding for improving efficiency in development
- Provide available code templates that can be used without modification
- Support code directory configuration, only by self-guided package intelligent programming can be done in one-click
- Support user-defined configuration, you can specify which file to be generated
### Features
- ~~Camel-Underline-Uppercase-Uncapitalize-Lowercase can be converted to each other by shortcut~~ `alt` + `shift` + `cmd` + `U`
- The comments of generated codes support English(Default) | Chinese Simplified(Optional) configuration
- ~~JSON formatting and single line text conversion, supporting section and whole document, default shortcut~~ `alt`+`shift`+`cmd`+`J` | `S`
- Generating `data table definition SQL` | `Mo` | `Mapper` | `Handler`, single table addition, deletion, modification and search with paging in one click
- Under the help of SwaggerApi generating `Vo` | `Controller` with friendly document description, in addition to this, supporting `Vo` field automatic sorting
- For smart coding, you just need one shortcut default as `alt`+`shift`+`cmd`+`D`
- Supporting customer configuration, for example, specify the author who you are
- Reserve easter eggs, you can try to edit the blank file in IDEA and type `d8ger` to get the default configuration template
- ~~Reserve easter eggs, edit the blank file in IDEA and enter `nasa` to get the NASA configuration file template. This is very useful and efficient for handling multi-lines, especially SQL field naming processing.~~
- ~~Reserve easter eggs, edit the blank file in IDEA and enter `regex` to get some commonly used regular expressions. Other code Easter eggs will be added later.~~
- For automatic sorting `Vo` field , you just need one shortcut default as `alt`+`shift`+`cmd`+`O`
### Using manual(v3.0+)
1.Open the configuration box to set the generation parameters, `Preference` --> `Other Settings` --> `D8gerAutoCode`
2.Check the file to be generated and choose the generation path, rewrite `author`、`apiUrlPrefix` and `locale`, and click the button to save your configuration.
<div align="center">
<img src="http://file.debuggerpowerzcy.top/power/D8King.jpg" />
</div>
### Using manual(under v3.0)
1. Create Model Class
2. Select the class name and press the (default) shortcut `alt`+`shift`+`cmd`+`D`
3. Under the default configuration, `D8gerAutoCode` directory and `data table SQL definitions` and **Web codes** will be generated
4. So, What you need to do:
- Under a multi-module project, configure the generated file output directory, for example, **`Mo.java`** should be moved into the `model` directory
- Add non-null constraints to **`xx.sql`** as required
- If you generated the **Controller.java** file, please note the interface returns type of **`Object`**, it should be modified to the project's uniform return type
- In the above steps the `xx.java` file will report some errors, ***don't worry***, these just require you to import packages
5. Default configuration file template for easter egg:
- In the ***`resource`*** root directory of the module where the `Model class` is located, create `d8ger.properties` property configuration file
- Type `d8ger` and click on `Tools`-> `D8ger`-> `D8gerMore`, and you will find some surprise
6. ~~Regex template for easter egg:~~
- ~~Choose any blank file, Type `regex` and click on `Tools`-> `D8ger`-> `D8gerMore`, and you will find some surprise~~
7. ~~NASA template for easter egg:~~
- ~~Choose any blank file, Type `nasa` and click on` Tools`-> `D8ger`-> `D8gerMore`, and you will get the NASA manual~~
- ~~Follow the manual, custom your config and write your own multi-lines need to be batch handled, then you will find some surprise~~
8. ~~Camel-Underline-Uppercase-Uncapitalize-Lowercase circle convert by one-click~~
- ~~Choose word text in any editing file, press `alt` + `shift` + `cmd` + `U`, you`ll find the changed word~~
- ~~If not satisfied just press the shortcut again and again util you are.~~
9. You will get the following default configuration information
- It's recommended that you change the configuration items
- `author` (you can't sign my name for the pits you dug!)
- `apiUrlPrefix` (the interface url prefix should be configured as the project interface unified URL prefix)
- generate file output directory under a multi-module project
- As for `boolean` configuration items, let you choose which files need to be generated, and specify output directory is optional
> By the way, these default shortcuts used in Mac OS, if you use Windows just take `cmd` into `ctrl`.
### How to install
<a href="https://plugins.jetbrains.com/plugin/13576-d8gerautocode" target="_blank">
<img src="https://cdn.jsdelivr.net/gh/YiiGuxing/TranslationPlugin@master/images/button-install.png" alt="Get from Marketplace" title="Get from Marketplace">
</a>
- `Preference` --> `Plugins` --> `Marketplace` --> type `D8` --> install
- [IDEA official plugin library installation](https://plugins.jetbrains.com/plugin/13576-d8gerautocode)
- As for `Source installation` requires you're familiar with Gradle, I will add more details about how to develop a plugin by ***Gradle*** later
### Bug & Question
- Known issues
> Modify the `d8ger.properties` file before generating code, the configuration file does not take effect
```
Solution
0. If you upgrade version 3.0+, you won`t see it again.
1. Because the IDEA file uses the VFS mechanism, as a plug-in to use the monitoring file I think it is not cost-effective
2. I also found a reason aboub editing .properties file, sometimes it will take one or two minutes to refresh after you finished
3. So, press `cmd` + `s` to force refreshing .properties file and you will solve it.
```
> The icon of plugin shows error like this: red square with a cross
<div align="center">
<img src="http://file.debuggerpowerzcy.top/power/W-D8ger.png" />
</div>
```
Solution
1.This issue is caused by Intellij IDEA of new version feature.
2.Try to upgrade the version of Intellij util 2019.3.*(greater than 2019.2.*), you'll fix it.
```
[Other issues, please come to join room](https://github.com/caofanCPU/D8gerAutoCode/issues)
### VersionRoadHistory
- 4.1
- Fix 'D8gerAutoCode' error file path parsing while in WINDOWS system. For more detail, please refer [issue2](https://github.com/caofanCPU/D8gerAutoCode/issues/2)
- 4.0(HIGH.START)
- Important note: This time the function is migrated and upgraded, the plug-in has been divided into functions, the purpose is to be full-time and dedicated, and the general functions are sinking to serve more programmers
- No.0: Each plug-in is positioned in two aspects, one is efficient coding, and the other is high-quality knowledge links to help users obtain enough useful information to improve their skills
- No.1: [LaoYouTiao](https://github.com/caofanCPU/LaoYouTiao), **Published**, located JetBrains full product plug-in, General functions, covering text parsing, numerical processing, shell script processing
- No.2: [D8gerAutoCode](https://github.com/caofanCPU/D8gerAutoCode), **Published**, located IntelliJ IDEA, auto coding
- No.3: D8gerByteSleep, Hatching, located PyCharm
- No.4: D8gerJustGo, Hatching, located GoLand
- No.5: D8gerAndison, Hatching, located Android Studio
- No.6: D8gerWebit, Hatching, located WebStorm
- No.7: RoadMap refers [DSP(D8ger Series Plan)](https://www.processon.com/view/5f96a5f35653bb06ef1870e8)
- Function migration:
- BeautifulJSON、SimplifyOneLine、BeautifulMySQL、CamelUnderlineConvert、D8gerMore are migrated into plugin named [LaoYouTiao](https://github.com/caofanCPU/LaoYouTiao)
- The shortcut keys and usage methods have not changed, only the code generation functions related to Java are retained
- 3.4
- Addition: 'OhMyZSH' easter eggs, try to type 'ohmyzsh' in the blank file in IDEA to get some useful linux commands. I'm sure you'll save much time.
- BugFix: Fix donate url(I'm waiting for your 🌟 the project on the github).
- Optimization: 'BeautifulJSON', 'SimplifyOneLine' and 'BeautifulMySQL' now supports section or whole document convert.
- 3.2
- BugFix: Fix 'BeautifulJSON' issue when parsing complex JSON string.
- Optimization: 'CamelUnderlineConvert' now supports Timestamp-LocalDateTime convert, select the text and use origin shortcut `alt` + `shift` + `cmd` + `U` to find out.
- 3.1
- BugFix:
- Fix config item `locale` problem when selected as `ZN`, and before the 3.0 version`s comment was English default.
- Fix SQL definition in x.sql file ✌️.
- Fix batch insert records in xMapper.xml file cause `id`, `createTime`, `updateTime` all should be according to the Database.
- Optimization: Config item `autoDetectSQLTimeColumn` now is more intelligent. If you checked, `createTime` and `updateTime` would be generated perfectly in there right position.
- 3.0
- Addition:
- Grand celebration for `D8gerAutoCode` getting his face! Now you can config the generated property parameters by setting GUI.
- First, Open the configuration box to set the generation parameters, `Preference` --> `Other Settings` --> `D8gerAutoCode`
- Then, Check the file to be generated and choose the generation path, rewrite `author`、`apiUrlPrefix` and `locale`, and click the button to save your configuration.
- Optimization: Support project level setting parameters for non-invasive, d8ger.properties should exist invisible.
- Adjustment: Remove the generated params by `d8ger.properties` file, replace of D8gerAutoCode setting GUI.
- 2.5
- Addition:
- Add `autoDetectSQLTimeColumn` configuration for supporting disable default generating `create_time` and `update_time` column definition in SQL.
- Add `mapperBatterThenRepository` configuration for supporting custom mapper annotation in both SpringMVC and SpringBoot.
- Add `selectOneByExample` in Mapper.java for supporting query one record.
- Add `insertSelectiveWithId` in Mapper.java for supporting insert `non null` field and `null` field will be filled with the database default value.
- Optimization: 'cause `id` is the primary key, all insert operations should exclude `id` column.
- BugFix:
- Generation `update_time` column definition remove the rare comma.
- Troubleshooting the rare dir named `D8gerAutoCode`, now you can see it only with unspecified directory configuration.
- Adjustment: Remove `ServiceInterface` and `ServiceImpl`, 'cause I think `Handler` is more suitable.
- 2.4
- Addition: One-click to beauty MySQL, isn't fragrant?
- Optimization: String parsing performance.
- Attention: Select your MySQL text, ctrl + alt + shift + `B` will back a surprise.
- 2.3
- BugFix: Json format bug.
- Addition:
- NASA easter eggs, try to type `nasa` in the blank file in IDEA to get the nasa-template.
- NASA easter eggs, multi-lines can be batch handled with the nasa-template, special for sql columns.
- Optimization:
- Optimize some regex performance.
- Support linebreak or comma as the delimiter.
- Support windows linebreak when rendering origin code.
- Attention:
- When execute auto-coding, you should be careful at the linebreak, it maybe different from your project config.
- Adjustment:
- Icons changed for align, friendly view etc.
- The manual of this plugin has been moved to my <a href="http://www.debuggerpowerzcy.top/home/2020/03/14/D8gerAutoCode%E6%8F%92%E4%BB%B6%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97/">website</a>.
- 2.1
- BugFix: add Uncapitalize, and the circle is Camel-Underline-Uppercase-Uncapitalize-Lowercase.
- Optimization: Optimize some regex performance.
- Attention: Regex easter eggs add some very useful regex search-replace skills hidden in JetBrains's IDE products. Try to learn, and you will save much time at working.
- 2.0
- BugFix: Modify method name in Controller.java.
- Addition:
- Remove repeat work of moving file into directories for smart coding.
- Camel-Underline-Uppercase-Lowercase can be converted to each other by shortcut `alt` + `shift` + `cmd` + `U`.
- Regex easter eggs, try to type `regex` in the blank file in IDEA to find it.
- Optimization: Optimize source code and improve performance.
- Attention: If the icon of plugin shows error(red square with a cross), try to upgrade the version of Intellij util 2019.3.*(greater than 2019.2.*).
- 1.24
- BugFix: Update method named `updateBatchByPrimaryKeySelective` in mapper.xml.
- Addition: Set default language English and you can config it as Chinese Simplified, as before, typing `d8ger` for the latest configuration template.
- Attention: You should configure your database connection like `allowMultiQueries=true` for supporting batchUpdate operation.
- 1.23
- BugFix: Fix required dependencies by JetBrains's suggestion for some known compatibility issues.
- Addition: Add JSON-formatter and WhiteChar-cleaner.
- Attention: Can you 🌟 the project on the github?
- 1.22
- BugFix: Fix README of style, description, picture problems.
- Enhance: Enhance profile for generating codes by using regex to replace the circle of matching string.
- Attention: Can you 🌟 the project on the github?
- 1.21
- BugFix: Fix README of style, description, picture problems.
- Addition: Add MoExample autoCoding for supporting simple sql.
- Attention: Can you 🌟 the project on the github?
- 1.20
- Completion: Auto coding for Mo/Example/Mapper/Xml/SQL/Service completed, wow!
- Attention: Can you 🌟 the project on the github?
### Contribute
- Please give me a 🌟
- Raise demand, write the repetitive problems you often handled at daily work in [issue](https://github.com/caofanCPU/D8gerAutoCode/issues)
- Invite me to sit at the 🍦 shop
<table>
<tr>
<td align="center" style="width: 200px;">
<a href="https://github.com/D8ger">
<img src="http://file.debuggerpowerzcy.top/power/WX.png" style="width: 400px;"><br>
<sub>微信</sub>
</a><br>
</td>
<td align="center" style="width: 200px;">
<a href="http://www.debuggerpowerzcy.top/">
<img src="http://file.debuggerpowerzcy.top/power/ZFB.png" style="width: 400px;"><br>
<sub>支付宝</sub>
</a><br>
</td>
<td align="center" style="width: 200px;">
<a href="https://github.com/caofanCPU">
<img src="http://file.debuggerpowerzcy.top/power/MX.jpg" style="width: 400px;"><br>
<sub>MiXin</sub>
</a><br>
</td>
</tr>
</table>
### Thanks
<a href="https://www.jetbrains.com/?from=D8gerAutoCode">
<img border="0" src="http://file.debuggerpowerzcy.top/power/jetbrains-variant-4.svg" width="131" alt="JetBrains"><br>
<sub>With JetBrains team's open source certificate supporting, this project will continue to develop in the spirit of open source</sub>
</a>
================================================
FILE: README_CN.md
================================================
# D8gerAutoCode
<a href="https://github.com/caofanCPU/D8gerAutoCode"><img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/caofanCPU/D8gerAutoCode"></a>
<a href="https://github.com/caofanCPU/D8gerAutoCode/stargazers"><img src="https://badgen.net/github/stars/caofanCPU/D8gerAutoCode" alt="stars"></a>
<a href="https://plugins.jetbrains.com/plugin/13576-d8gerautocode"><img src="https://img.shields.io/jetbrains/plugin/d/13576"></a>
<a href="https://github.com/caofanCPU/D8gerAutoCode"><img src="https://img.shields.io/github/v/release/caofanCPU/D8gerAutoCode"></a>
<a href="https://github.com/caofanCPU/D8gerAutoCode/issues"><img src="https://badgen.net/github/open-issues/caofanCPU/D8gerAutoCode" alt="issues"></a>
<a href="http://file.debuggerpowerzcy.top/power/html/IntelliJBestAction.html"><img src="https://img.shields.io/github/search/caofanCPU/D8gerAutoCode/D8ger"></a>
<a href="https://github.com/caofanCPU/D8gerAutoCode/pulls"><img src="https://badgen.net/badge/PRs/welcome/cyan" alt="PRs Welcome"></a>
<a href="https://github.com/D8ger"><img src="https://badgen.net/badge/organization/join%20us/cyan" alt="open-source-organization"></a>
<a href="https://github.com/caofanCPU/D8gerAutoCode/blob/master/LICENCE"><img src="https://badgen.net/github/license/caofanCPU/D8gerAutoCode?color=green" alt="license"></a>
[](#)
## IDEA代码自动生成插件•`Java版本`
<div align="center">
<img src="http://file.debuggerpowerzcy.top/power/D8ger-V5.jpg" />
</div>
## 说明
最新版本为**4.1**, 在 _**`05月10号`**_ 通过官方审核
如果无法获取, [戳此](https://github.com/caofanCPU/D8gerAutoCode/releases/tag/4.1) 下载~~.zip~~压缩包
如果用的不错, 给我点个🌟呗, thx!
重要: 本版本已执行[DSP(D8ger Series Plan)](https://www.processon.com/view/5f96a5f35653bb06ef1870e8).
即部分功能已迁入另一个插件[LaoYouTiao](https://github.com/caofanCPU/LaoYouTiao). 经过测试, 安装两个插件一本不会影响性能, 还请小伙伴们支持
### 序言
正如JetBrains所说, 我相信你在繁忙编码工作中时应该善用工具以节省宝贵的时间。
我时常在思考, "如果其他人已经解决了这些重复工作, 为什么我还需要重复解决?"
这个问题一直驱动着我, 在日常工作中探寻重复部分并开发此插件以节省时间。
### [快速开始](http://www.debuggerpowerzcy.top/home/2020/03/14/D8gerAutoCode%E6%8F%92%E4%BB%B6%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97/)
<a href="http://file.debuggerpowerzcy.top/power/html/IntelliJBestAction.html" target="_blank">ZN程序员福利, IntelliJ IDEA最佳实践</a>
### 约定
- 通用问题提供规范解法
- 个性化问题只提供示例解法
### 设计初衷
- 移除开发中的固定的重复编码过程, 提升开发效率
- 提供可用的代码模板, 基本不用修改就可使用的代码
- 支持代码目录配置, 一键自动生成代码, 仅需自行导包即可完成智能编程
- 支持用户自定义配置, 可指定需要生成的文件
### 功能特性
- ~~驼峰-下划线-大写-首字母小写-小写, 时间戳与标准时间字符串(香!), 一键转换, 默认快捷键~~ `alt` + `shift` + `cmd` + `U`
- 生成代码的注释支持英语|汉语配置
- ~~JSON格式化与单行文本转换, 默认快捷键~~ `alt`+`shift`+`cmd`+`J` | `S`
- 一键生成`数据表定义SQL` | `Mo` | `Mapper` | `Handler`, 单表增删改查+分页一键搞定
- 结合SwaggerApi, 一键生成带文档定义`Vo`及`Controller`, 支持Vo字段自动排序
- 一键智能编程, 默认快捷键 `alt`+`shift`+`cmd`+`D`
- 支持用户自定义配置, 指定生成哪些文件及文件author等
- 预留彩蛋, 在IDEA中编辑空白文件输入`d8ger`即可得到配置文件模板
- ~~预留彩蛋, 在IDEA中编辑空白文件输入`nasa`即可得到NASA模板, 针对多行字符串批量处理, 尤其是SQL字段命名处理~~
- ~~预留彩蛋, 在IDEA中编辑空白文件输入`regex`即可得到一些常用的有趣正则表达式, 后期会增加其他代码彩蛋~~
- SwaggerVo字段排序, 默认快捷键 `alt`+`shift`+`cmd`+`O`
### 使用手册(v3.0+)
1.打开配置框设置生成参数 `Preference` --> `Other Settings` --> `D8gerAutoCode`
2.勾选要生成的文件及生成路径, 指明 `author`、`apiUrlPrefix`、`locale`, 保存即可
<div align="center">
<img src="http://file.debuggerpowerzcy.top/power/D8King.jpg" />
</div>
### 使用手册(v3.0以下)
1. 创建Model类
2. 选中类名, 按下(默认)快捷键 `alt`+`shift`+`cmd`+`D`
3. 默认配置下, 会生成`D8gerAutoCode`目录及数据表SQL定义和Web代码, 共9个
4. 你需要做的:
- 多模块工程下, 配置生成文件输出目录, 例如 **`Mo.java`** 配置`model`目录
- 根据需求对 **`xx.sql`** 增加非空约束
- 如果你生成了 **`Controller.java`** 文件, ***请注意接口返回对象类型***, 应修改为项目统一的返回类型
- 在上述步骤中, 代码文件会飘红报错, 别慌, 这需要你自行导包解决
5. 默认配置文件模板, 代码彩蛋:
- 在`Model类`所在模块的 ***`resource`*** 根目录下, 创建`d8ger.properties`属性配置文件
- 输入`d8ger`并点击`Tools`-->`D8ger`-->`D8gerMore`
6. ~~正则表达式模板, 代码彩蛋:~~
- ~~任意空文本, 输入`regex`并点击`Tools`->`D8ger`->`D8gerMore`, 你会得到一点小惊喜~~
7. ~~NASA模板(多行文本批处理), 代码彩蛋:~~
- ~~任意空文本, 输入`nasa`并点击`Tools`->`D8ger`->`D8gerMore`, 你会得到NASA操作手册~~
- ~~按照NASA手册提示, 自定义配置并输入需要处理的多行文本, 然后你会得到一点小惊喜~~
8. ~~驼峰-下划线-大写-首字母小写-小写, 一键循环转换~~
- ~~选中任意编辑状态下文件里的单词, 按下快捷键`alt` + `shift` + `cmd` + `U`, 你会发现选中单词转换了~~
- ~~如果不是你想要的结果那就继续重复按下快捷键, 直到是你想要的为止~~
9. 你就得到如下默认配置信息
- 推荐你更改的配置项
- `author`(你挖的坑可不许署我的名!)
- `apiUrlPrefix`(接口url前缀应配置为项目接口统一Url前缀)
- 多模块工程下, 生成文件输出目录
- 其他`boolean`配置项, 是让你选择需要生成哪些文件, 可选指定输出目录
>以上默认快捷键针对MacOS系统, 对于Windows用户将`cmd`看做`ctrl`即可
### 如何安装
<a href="https://plugins.jetbrains.com/plugin/13576-d8gerautocode" target="_blank">
<img src="https://cdn.jsdelivr.net/gh/YiiGuxing/TranslationPlugin@master/images/button-install.png" alt="Get from Marketplace" title="Get from Marketplace">
</a>
- `Preference` --> `Plugins` --> `Marketplace` --> type `D8` --> install
- [IDEA官方插件库安装](https://plugins.jetbrains.com/plugin/13576-d8gerautocode)
- 源码安装, 这需要你熟悉Gradle, 后期我会详细补充如何使用Gradle开发一个插件
### Bug&问题
- 已知问题(最新版本3.0中已修复)
>修改`d8ger.properties`文件后再生成代码, 配置文件不生效
```
解决方法
0.升级到3.0及以上版本, 该问题不复存在
1.由于IDEA文件采用VFS机制, 作为一个插件去采用监听文件我认为是不合算的
2.此外, 编辑.properties文件时, 内容变更有时会消耗1-2分钟才会更新生效
3.所以, 执行快捷键`cmd` + `s`强制刷新.properties文件, 即可解决
```
> 插件图标显示异常, 图标内只出现相交的红叉
<div align="center">
<img src="http://file.debuggerpowerzcy.top/power/W-D8ger.png" />
</div>
```
1.这是Intelij IDEA新版本特性遗留的兼容性小BUG
2.升级Intelij IDEA版本, 至少为2019.3.*(2019.2.*及以下都会显示异常)
```
[其他问题, 欢迎前来查房](https://github.com/caofanCPU/D8gerAutoCode/issues)
### 版本演进历史
- 4.1
- Bug修复: 修复'D8gerAutoCode'在WINDOWS系统中文件路径解析错误的问题, 参见[issue2](https://github.com/caofanCPU/D8gerAutoCode/issues/2)
- 4.0(HIGH.START)
- 重要提示: 本次进行功能迁移升级, 插件已进行功能拆分, 目的是专职专责, 通用功能下沉以服务主流编程语言的程序YUAN
- No.0: 每个插件定位两方面, 一是高效编码, 二是高质量的知识链接, 帮助用户获取足够有用的信息, 以提高技能
- No.1: [LaoYouTiao](https://github.com/caofanCPU/LaoYouTiao), **已发布**, 坐标JetBrains全产品插件, 通用功能, 涵盖文本解析, 数值处理, shell脚本处理
- No.2: [D8gerAutoCode](https://github.com/caofanCPU/D8gerAutoCode), **已发布**, 坐标IntelliJ IDEA插件, 智能生码
- No.3: D8gerByteSleep, 孵化中, 坐标PyCharm插件
- No.4: D8gerJustGo, 孵化中, 坐标GoLand插件
- No.5: D8gerAndison, 孵化中, 坐标Android Studio插件
- No.6: D8gerWebit, 孵化中, 坐标WebStorm插件
- No.7: 插件RoadMap参见[DSP(D8ger Series Plan)](https://www.processon.com/view/5f96a5f35653bb06ef1870e8)
- 功能迁移:
- BeautifulJSON、SimplifyOneLine、BeautifulMySQL、CamelUnderlineConvert、D8gerMore均迁移至插件[LaoYouTiao](https://github.com/caofanCPU/LaoYouTiao)
- 快捷键及使用方法均未改变, 仅保留与Java相关的生码功能
- 3.6
- 体验优化: 修改插件LOGO
- 3.4
- 新增功能: 'OhMyZSH' 彩蛋, 空白文件中输入 'ohmyzsh' 将获得一些有用的linux命令工具及使用技巧. 这将节省你不少时间.
- Bug修复: 修复donate链接(铁子, 等着你🌟该项目, thx!).
- 体验优化: 'BeautifulJSON', 'SimplifyOneLine' 和 'BeautifulMySQL' 现在同时支持部分和整个文件内容转换.
- 3.2
- Bug修复: 修复'BeautifulJSON'在解析复杂JSON字符串时的问题
- 体验优化: 'CamelUnderlineConvert' 支持时间戳与标准时间字符串相互转换
- 3.1
- Bug修复:
- 修复配置项`locale`为中文时不生效的问题, 在之前的3.0版本只能生成英文注释.
- 修复x.sql中在某些情况下因缺失`,`导致报错的问题.
- 批量插入记录, 字段`id`, `createTime`, `updateTime`将被忽略强制采用数据库的默认值.
- 体验优化: 配置项`autoDetectSQLTimeColumn`现在更加智能. 当你勾选改配置项时, `createTime` and `updateTime`字段将会自动填充到合适的位置.
- 3.0
- 新增功能:
- 很高兴宣布插件`D8gerAutoCode`终于有脸(面)了! 现在你将通过设置界面配置生码参数.
- 第一步, 打开设置界面, `Preference` --> `Other Settings` --> `D8gerAutoCode`
- 第二步, 勾选你要生成的文件并指明文件生成后所在目录, 填写`author`、`apiUrlPrefix` and `locale`, 保存就完事了.
- 体验优化: 使用项目级别的界面配置, 对用户的代码无任何侵入性.
- 功能调整: 移除`d8ger.properties`配置文件, 一键生码配置参数将通过D8gerAutoCode设置GUI完成.
- 2.5
- 新增功能:
- 新增配置项`autoDetectSQLTimeColumn`用以支持`create_time`和`update_time`字段的自动探测定义.
- 新增配置项`mapperBatterThenRepository`用以支持`SpringMVC`和`SpringBoot`下的`mapper`注解.
- 在Mapper.java文件中新增`selectOneByExample`方法用以支持根据条件查询单条记录, 慢走不送: `xList.get(0)`.
- 在Mapper.java文件中新增`insertSelectiveWithId`用以支持只插入非NULL字段, NULL字段将采用数据库默认值.
- 体验优化: 考虑到`id`是约定的主键字段, 所有插入操作都应该排除该字段.
- Bug修复:
- 在x.sql文件定义中, `update_time`在某些情况下会出现多余的`,`.
- 颇费周折地抓获冗余目录`D8gerAutoCode`莫名出现的现场, 现在只有在你未指明生成目录的情况下才能遇到他, 版本不停步, 且用且珍惜.
- 功能调整: 去除`ServiceInterface`和`ServiceImpl`, 因为针对自动生码的通用性而言`Handler`将更合适.
- 2.4
- 新增功能: 一键美化SQL, 不香吗?
- 体验优化: 优化字符串解析性能.
- TheShy提示: 选中MySQL文本, 快捷键ctrl + alt + shift + `B`将奉上惊喜.
- 2.3
- Bug修复: Json字符串格式化的问题.
- 新增功能:
- NASA彩蛋, 空白文件中输入`nasa`获取模板.
- NASA彩蛋, 支持字符串批处理, 例如多行文本对齐, 提供SQL格式化及自动生成别名功能, 搞数据分析的小伙伴值得一试.
- 体验优化:
- 优化正则处理性能.
- 支持换行符作为分割符.
- 针对Windows系统, 字符串批处理结果渲染时使用Windows换行符.
- TheShy提示:
- 运行自动生码前, 请留意IDE项目默认换行符配置.
- 功能调整:
- 插件功能图标调整对齐.
- 插件使用指南搬迁到我的<a href="http://www.debuggerpowerzcy.top/home/2020/03/14/D8gerAutoCode%E6%8F%92%E4%BB%B6%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97/">博客</a>.
- 2.1
- Bug修复: 补充一键首字母小写转换功能, 完成字段命名闭环: 驼峰-下划线-全大写-首字母小写-全小写.
- 体验优化: 优化一些正则处理的性能.
- TheShy提示: 正则神器彩蛋中增加IDEA自带的高效查找与替换功能, 花点时间瞄一瞄, 之后工作快到飞起.
- 2.0
- Bug修复: 修改Controller.java文件中方法名.
- 新增功能:
- 通过配置指定文件生成目录, 不用再手动拖入目录了, 就应该是这样的, 重复工作应该被剔除.
- 驼峰-下划线-大写-小写一键转化: `alt` + `shift` + `cmd` + `U`.
- 空白文件中输入`regex` 获取正则神器菜单.
- 体验优化: 代码优化与性能优化.
- TheShy提示: 如果插件图标出现红叉, 这是IDEA版本不兼容引起的, 将IDEA版本升级至2019.3.*(至少是2019.2.*以后).
- 1.24
- Bug修复: mapper.xml文件中 `updateBatchByPrimaryKeySelective` SQL生成修复.
- 新增功能: 空白文件中输入`d8ger`以获取最新模板参数配置, 该版本支持代码注释中英文, 默认英文.
- TheShy提示: **对于批量更新功能, 数据库连接参数必须开启该功能: `allowMultiQueries=true`**.
- 1.23
- Bug修复: 修复Intellij版本间的依赖包兼容问题.
- 新增功能: 新增一键JSON美化和一键剔除空白字符.
- TheShy提示: 老铁, 点亮一颗🌟可好?
- 1.22
- Bug修复: 修正图片及文档格式.
- 体验优化: 使用正则匹配取缔原有循环处理以提升性能
- TheShy提示: 小伙伴, 点亮一颗🌟可好?
- 1.21
- Bug修复: 修正图片及文档格式.
- 新增功能: 新增MoExample查询条件对象以支持简单查询.
- TheShy提示: 同学, 点亮一颗🌟可好?
- 1.20
- 首发上阵: 一键自动生成Mo/Example/Mapper/Xml/SQL/Service 完成, wow!
- TheShy提示: 少年, 点亮一颗🌟可好?
### 参与贡献
- 帮我点亮一颗🌟
- 提需求, 在[issue](https://github.com/caofanCPU/D8gerAutoCode/issues)描述工作中经常处理的重复问题
- 请我到🍦店坐坐
<table>
<tr>
<td align="center" style="width: 200px;">
<a href="https://github.com/D8ger">
<img src="http://file.debuggerpowerzcy.top/power/WX.png" style="width: 400px;"><br>
<sub>微信</sub>
</a><br>
</td>
<td align="center" style="width: 200px;">
<a href="http://www.debuggerpowerzcy.top/">
<img src="http://file.debuggerpowerzcy.top/power/ZFB.png" style="width: 400px;"><br>
<sub>支付宝</sub>
</a><br>
</td>
<td align="center" style="width: 200px;">
<a href="https://github.com/caofanCPU">
<img src="http://file.debuggerpowerzcy.top/power/MX.jpg" style="width: 400px;"><br>
<sub>MiXin</sub>
</a><br>
</td>
</tr>
</table>
### 致谢
<a href="https://www.jetbrains.com/?from=D8gerAutoCode">
<img border="0" src="http://file.debuggerpowerzcy.top/power/jetbrains-variant-4.svg" width="131" alt="JetBrains"><br>
<sub>感谢JetBrains团队的开源证书支持, 本项目将秉承开源精神持续开发</sub>
</a>
================================================
FILE: build.gradle
================================================
plugins {
id 'java'
id 'org.jetbrains.intellij' version '0.4.21'
}
group 'com.xyz.caofancpu'
version '4.1'
sourceCompatibility = 1.8
repositories {
mavenCentral()
maven { url 'http://dl.bintray.com/jetbrains/intellij-plugin-service' }
maven { url 'https://repo1.maven.org/maven2/' }
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
apply plugin: 'idea'
apply plugin: 'org.jetbrains.intellij'
apply plugin: 'java'
//task myRun(type: JavaExec) {
// classpath sourceSets.main.runtimeClasspath
// main = "com.xyz.caofancpu.d8ger.action.D8gerSetting"
//}
// 自定义task跑代码
task D8ENV {
println('帝八哥正在编译插件....')
// println "$System.env.IDEA_HOME"
println("IDEA安装环境目录: " + System.getenv("IDEA_HOME"))
println("更新IDEA后, 别忘修改变量\$IDEA_HOME")
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
annotationProcessor 'org.projectlombok:lombok:1.18.10'
compileOnly group: 'org.projectlombok', name: 'lombok', version: '1.18.10'
compile group: 'commons-io', name: 'commons-io', version: '1.3.2'
compile group: 'commons-collections', name: 'commons-collections', version: '3.2.2'
compile group: 'ru.lanwen.verbalregex', name: 'java-verbal-expressions', version: '1.8'
compile group: 'com.alibaba', name: 'druid', version: '0.2.9'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.8.1'
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.6'
}
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
// version '2019.1.4'
// Adjust when toolbox update IDEA app
localPath System.getenv("IDEA_HOME")
plugins = ['java'] //Bundled plugin dependencies
pluginName 'D8gerAutoCode'
updateSinceUntilBuild false
sandboxDirectory = "${project.rootDir}/.sandbox"
}
patchPluginXml {
changeNotes
"""
What encounter to pain me ever belongs to see you now.<br>
<br>
Plug-in new revision, new features and high performance.<br>
One-click to handle multi-lines, isn't cool?<br>
One-click to beauty MySQL, isn't fragrant?<br>
It's very sure that you deserve to use.<br>
"""
}
================================================
FILE: doc/ComputerMathData.md
================================================
# MarkDown 数学公式语法大全
- 单行左对齐公式
$\sum_{i=0}^N\int_{a}^{b}g(t,i)\text{d}t$
- 跨行居中公式
$$
\sum_{i=0}^N\int_{a}^{b}g(t,i)\text{d}t
$$
- 无边框矩阵
$$
\begin{matrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1 \\
\end{matrix}
$$
- 小括号边框矩阵
$$
\begin{pmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1 \\
\end{pmatrix}
$$
- 大括号边框矩阵
$$
\begin{Bmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1 \\
\end{Bmatrix}
$$
- 双竖线边框矩阵
$$
\begin{Vmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1 \\
\end{Vmatrix}
$$
- 中括号边框矩阵
$$
\begin{bmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1 \\
\end{bmatrix}
$$
- 行列式边框矩阵
$$
\begin{vmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1 \\
\end{vmatrix}
$$
- m*n省略号矩阵
$$
\begin{bmatrix}
{a_{11}}&{a_{12}}&{\cdots}&{a_{1n}} \\
{a_{21}}&{a_{22}}&{\cdots}&{a_{2n}} \\
{\vdots}&{\vdots}&{\ddots}&{\vdots} \\
{a_{m1}}&{a_{m2}}&{\cdots}&{a_{mn}} \\
\end{bmatrix}
$$
- 常用集合符号函数矩阵
$$
\begin{bmatrix}
{\sin x}&{\ln x}&{\max(A,B)}&{\infty}&{\cup} \\
{\cap}&{\subset}&{\subseteq}&{\supset}&{\in} \\
{\notin}&{\varnothing}&{\forall}&{\exists}&{\lnot} \\
{\nabla}&{\partial}&{a \quad b}&{a \ b}&{a_{xyz}} \\
\end{bmatrix}
$$
- 常用微积分符号矩阵
$$
\begin{pmatrix}
{\sum_{i=1}^n{a_i}}&{\prod \frac{1}{i^2}}&{\lim_{x\to 0}}&{\prime} \\
{\int_0^\infty{f(x)dx}}&{\mathrm{d}}&{\int ^2_3 x^2 {rm d}x}&{\iint} \\
{\iiiint}&{\oint}{\frac{x}{y}}&&{\sqrt[x]{y}} \\
\end{pmatrix}
$$
- 泰勒级数
$$
e^{x} = 1 + \frac{x}{1!} + \frac{x^{2}}{2!} + \frac{x^{3}}{3!} + \cdots , \quad - \infty < x < \infty
$$
- 余弦公式
$$
\cos 2\theta = \cos^2 \theta - \sin^2 \theta = 2 \cos^2 \theta
$$
- 集合公式
$$
M(\beta^{\ast}(D),D) \subseteq C
$$
- 求和公式
$$
\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}
$$
- 平方根公式
$$
x = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a}
$$
- 条件函数
$$
f(n) =
\begin{cases}
\frac{n}{2}, & \text{if $n$ is even} \\
3n+1, & \text{if $n$ is odd}
\end{cases}
$$
- 偏导数公式
$$
\begin{equation}
\begin{split}
\frac{\partial^2 f}{\partial{x^2}} &= \frac{\partial(\Delta_x f(i,j))}{\partial x} = \frac{\partial(f(i+1,j)-f(i,j))}{\partial x} \\
&= \frac{\partial f(i+1,j)}{\partial x} - \frac{\partial f(i,j)}{\partial x} \\
&= f(i+2,j) -2f(f+1,j) + f(i,j)
\end{split}
\nonumber
\end{equation}
$$
- 统计学公式带编号
$$
\begin{equation}
\sum_{i=0}^n F_i \cdot \phi (H, p_i) - \sum_{i=1}^n a_i \cdot ( \tilde{x_i}, \tilde{y_i}) + b_i \cdot ( \tilde{x_i}^2 , \tilde{y_i}^2 ) \tag{1.2.3}
\end{equation}
$$
$$
\begin{equation}
\beta^*(D) = \mathop{argmin} \limits_{\beta} \lambda {||\beta||}^2 + \sum_{i=1}^n max(0, 1 - y_i f_{\beta}(x_i)) \tag{1.2.4}
\end{equation}
$$
$$
\begin{equation}
\sum_{i=0}^n F_i \cdot \phi (H, p_i) - \sum_{i=1}^n a_i \cdot ( \tilde{x_i}, \tilde{y_i}) + b_i \cdot ( \tilde{x_i}^2 , \tilde{y_i}^2 ) \tag{1.2.5}
\end{equation}
$$
$$
\beta^*(D) = \mathop{argmin} \limits_{\beta} \lambda {||\beta||}^2 + \sum_{i=1}^n max(0, 1 - y_i f_{\beta}(x_i)) \tag{1.2.6}
$$
$$z = (p_0, ..... , p_n) \tag{公式21} $$
$$ s = r cos(a+b) = r cos(a) cos(b) - r sin(a) sin(b) \tag{1.1} $$
$$ t = r sin(a+b) = r sin(a) cos(b) - r cos(a) sin(b) \tag{1.2} $$
- 极限
$$ \max \limits_{a<x<b}\{f(x)\} $$
- 好玩矩阵
$$
\begin{matrix}
{\lceil \frac{x}{2} \rceil} & {\lfloor \frac{x}{2} \rfloor} & x^2 \\
{\lbrace \rbrace} & {\langle,\rangle} & y^2 \\
{\mathop{a}\limits_{i=1}} & z & z^2 \\
\end{matrix}
$$
- 行内小矩阵
$$\bigl( \begin{smallmatrix} a & b \\ c & d \end{smallmatrix} \bigr)$$
- 数组带分割线
$$
\left[
\begin{array}{cc|c}
1&2&3\\
4&5&6
\end{array}
\right]
$$
- 矩阵方程表达式
$$
\left(
\begin{array}{c}
s \\
t
\end{array}
\right)
=\left[
\begin{array}{cc}
cos(b) & -sin(b) \\
sin(b) & cos(b)
\end{array}
\right]
*\left(
\begin{array}{c}
x \\
y
\end{array}
\right)
$$
- 向量表达式
$$
\begin{bmatrix}
{\vec {x}} \\
{\overrightarrow {x}} \\
{\overrightarrow {xyzcfcfcf}} \\
{\overleftarrow {xyzcfcfcfcfcf}}
{x^2} \\
{x_i} \\
{x_{n^2}^{2_n}}
\end{bmatrix}
$$
- 常用希腊字母表达式
$$
\begin{bmatrix}
{\alpha}&{\beta}&{\gamma}&{\delta}&{\epsilon}&{\zeta}&{\eta}&{\theta} \\
{\lambda}&{\mu}&{\nu}&{\xi}&{\pi}&{\rho}&{\sigma}&{\kappa} \\
{\upsilon}&{\phi}&{\chi}&{\psi}&{\omega}&{\tau}&{\iota}&{0} \\
{\Sigma}&{\Theta}&{\Gamma}&{\Delta}&{\Lambda}&{\Xi}&{\Pi}&{\Upsilon} \\
{\Phi}&{\Psi}&{\Omega}&{0}&{0}&{0}&{0}&{0}
\end{bmatrix}
$$
## 参考
[MarkDown公式语法](https://www.jianshu.com/p/a0aa94ef8ab2)
[MarkDown公式语法2](https://cloud.tencent.com/developer/article/1402840)
================================================
FILE: doc/Math.adoc
================================================
== Math
- A
\begin{equation}
\left[\begin{array}{cccccc}
{a_{11}} & {a_{12}} & {\cdots} & {a_{1 n}} \\
{a_{21}} & {a_{22}} & {\cdots} & {a_{2 n}} \\
{\vdots} & {\vdots} & {\ddots} & {\vdots} \\
{\sin x} & {\ln x} & {\cdots} & {\vdots} \\
{-} & {c} & {} & {\underline{c}} & {\supset} & {\epsilon} \\
{} & {\varnothing} & {} & {\Psi} & {\exists} & {\ddots} \\
{\nabla} & {\partial} & {} & {a} & {b_{3}} & {a b} & {a_{x y z}}
\end{array}\right]
\end{equation}
- B
\(\left[\begin{array}{cccccc}{a_{11}} & {a_{12}} & {\cdots} & {a_{1 n}} \\ {a_{21}} & {a_{22}} & {\cdots} & {a_{2 n}} \\ {\vdots} & {\vdots} & {\ddots} & {\vdots} \\ {\sin x} & {\ln x} & {\cdots} & {\vdots} \\ {-} & {c} & {} & {\underline{c}} & {\supset} & {\epsilon} \\ {} & {\varnothing} & {} & {\Psi} & {\exists} & {\ddots} \\ {\nabla} & {\partial} & {} & {a} & {b_{3}} & {a b} & {a_{x y z}}\end{array}\right]\)
- C
\begin{equation}
\sum_{i=0}^{N} \int_{a}^{b} g(t, i) \mathrm{d} t
\end{equation}
- D
\begin{equation}
\frac{\partial^{2} f}{\partial x^{2}}=\frac{\partial\left(\Delta_{\mathcal{X}} f(i, j)\right)}{\partial x}=\frac{\partial(f(i+1, j)-f(i, j))}{\partial x}=\frac{\partial f(i+1, j)}{\partial x}-\frac{\partial f(i, j)}{\partial x}=f(i+2, j)-2 f(f+1, j)+f(i, j)
\end{equation}
- E
================================================
FILE: doc/WX-MarkDownTest.md
================================================
# 示例文章:Google 搜索的即时自动补全功能究竟是如何“工作”的?
> Google 搜索**自动补全功能**的强大,相信不少朋友都能感受到,它帮助我们更快地“补全”我们所要输入的搜索关键字。那么,它怎么知道我们要输入什么内容?它又是如何工作的?在这篇文章里,我们一起来看看。
## 使用自动补全
Google 搜索的自动补全功能可以在 Google 搜索应用的大多数位置使用,包括 [Google](https://www.google.com/) 主页、适用于 IOS 和 Android 的 Google 应用,我们只需要在 Google 搜索框上开始键入关键字,就可以看到联想词了。

在上图示例中,我们可以看到,输入关键字 `juej`,Google 搜索会联想到“掘金”、“掘金小册”、“绝句”等等,好处就是,我们无须输入完整的关键字即可轻松完成针对这些 topics 的搜索。
谷歌搜索的自动补全功能对于使用移动设备的用户来说特别有用,用户可以轻松在难以键入的小屏幕上完成搜索。当然,对于移动设备用户和台式机用户而言,这都节省了大量的时间。根据 Google 官方报告,自动补全功能可以减少大约 25% 的打字,累积起来,预计每天可以节省 200 多年的打字时间。是的,每天!
> 注意,本文所提到的“**联想词**”与“**预测**”,是同一个意思。
## 基于“预测”而非“建议”
Google 官方将自动补全功能称之为“预测”,而不是“建议”,为什么呢?其实是有充分理由的。自动补全功能是为了**帮助用户完成他们打算进行的搜索**,而不是建议用户要执行什么搜索。
那么,Google 是如何确定这些“预测”的?其实,Google 会根据趋势搜索 [trends](https://trends.google.com/trends/?geo=US) 给到我们这些“预测”。简单来说,哪个热门、哪个搜索频率高,就更可能推给我们。当然,这也与我们当前所处的位置以及我们的搜索历史相关。
另外,这些“预测”也会随着我们键入的关键字的变更而更改。例如,当我们把键入的关键字从 `juej` 更改为 `juex` 时,与“掘金”相关的预测会“消失”,同时,与“觉醒”、“决心”相关联的词会出现。

## 为什么看不到某些联想词?
如果我们在输入某个关键字时看不到联想词,那么表明 Google 的算法可能检测到:
- 这个关键字不是热门字词;
- 搜索的字词太新了,我们可能需要等待几天或几周才能看到联想词;
- 这是一个侮辱性或敏感字词,这个搜索字词违反了 Google 的相关政策。更加详细的情况,可以了解 [Google 搜索自动补全政策](https://support.google.com/websearch/answer/7368877)。
## 为什么会看到某些不当的联想词?
Google 拥有专门设计的系统,可以自动捕获不适当的预测结果而不显示出来。然而,Google 每天需要处理数十亿次搜索,这意味着 Google 每天会显示数十亿甚至上百亿条预测。再好的系统,也可能存在缺陷,不正确的预测也可能随时会出现。
我们作为 Google 搜索的用户,如果认定某条预测违反了相关的搜索自动补全政策,可以进行举报反馈,点击右下角“**举报不当的联想查询**”并勾选相关选项即可。

## 如何实现自动补全算法?
目前,Google 官方似乎并没有公开搜索自动补全的算法实现,但是业界在这方面已经有了不少研究。
一个好的自动补全器必须是快速的,并且在用户键入下一个字符后立即更新联想词列表。**自动补全器的核心是一个函数,它接受输入的前缀,并搜索以给定前缀开头的词汇或语句列表**。通常来说,只需要返回少量的数目即可。
接下来,我们先从一个简单且低效的实现开始,并在此基础上逐步构建更高效的方法。
### 词汇表实现
一个**简单粗暴的实现方式**是:顺序查找词汇表,依次检查每个词汇,看它是否以给定的前缀开头。
但是,此方法需要将前缀与每个词汇进行匹配检查,若词汇量较少,这种方式可能勉强行得通。但是,如果词汇量规模较大,效率就太低了。
一个**更好的实现方式是**:让词汇按字典顺序排序。借助二分搜索算法,可以快速搜索有序词汇表中的前缀。由于二分搜索的每一步都会将搜索的范围减半,因此,总的搜索时间与词汇表中单词数量的对数成正比,即时间复杂度是 `O(log N)`。二分搜索的性能很好,但有没有更好的实现呢?当然有,往下看。
### 前缀树实现
通常来说,许多词汇都以相同的前缀开头,比如 `need`、`nested` 都以 `ne` 开头,`seed`、`speed` 都以 `s` 开头。要是为每个单词分别存储公共前缀似乎很浪费。

前缀树是一种利用公共前缀来加速补全速度的数据结构。前缀树在节点树中排列一组单词,单词沿着从根节点到叶子节点的路径存储,树的层次对应于前缀的字母位置。
前缀的补全是顺着前缀定义的路径来查找的。例如,在上图的前缀树中,前缀 `ne` 对应于从子节点取左边缘 `N` 和唯一边缘 `E` 的路径。然后可以通过继续遍历从 `E` 节点可以达到的所有叶节点来生成补全列表。在图中,`ne` 的补全可以是两个分支:`-ed` 和 `-sted`。如果在数中找不到由前缀定义的路径,则说明词汇表中不包含以该前缀开头的单词。
### 有限状态自动机(DFA)实现
前缀树可以有效处理公共前缀,但是,对于其他共享词部分,仍会分别存储在每个分支中。比如,后缀 `ed`、`ing`、`tion` 在英文单词中特别常见。在上一个例子中,`e`、`d` 分别存放在了每一个分支上。
有没有一种方法可以更加节省存储空间呢?有的,那就是 DFA。
<center>
<img src="https://imgkr.cn-bj.ufileos.com/02bc143e-e1a7-4b3c-bd5d-8d6d39139f0a.png" style="width: 50%;"></center>
在上面的例子中,单词 `need`、`nested`、`seed` 和 `speed` 仅由 9 个节点组成,而上一张图中的前缀树包含了 17 个节点。
可以看出,最小化前缀树 DFA 可以在很大程度上减少数据结构的大小。即使词汇量很大,最小化 DFA 通常也适合在内存中存储,避免昂贵的磁盘访问是实现快速自动补全的关键。
### 一些扩展
上面介绍了如何利用合理的数据结构实现基本的自动补全功能。这些数据结构可以通过多种方式进行扩展,从而改善用户体验。
通常,满足特定前缀的词汇可能很多,而用户界面上能够显示的却不多,我们更希望能显示最常搜索或者最有价值的词汇。这通常可以通过为词汇表中的每个单词增加一个代表单词值的**权重** `weight`,并且按照权重高低来排序自动补全列表。
- 对于排序后的词汇表来说,在词汇表每个元素上增加 `weight` 属性并不难;
- 对于前缀树来说,将 `weight` 存储在叶子节点中,也是很简单的一个实现;
- 对于 `DFA` 来说,则较为复杂。因为一个叶子节点可以通过多条路径到达。一种解决方案是将权重关联到路径而不是叶子节点。
目前有不少开源库都提供了这个功能,比如主流的搜索引擎框架 [Elasticsearch](https://www.elastic.co/products/elasticsearch)、[Solr](https://lucene.apache.org/solr/) 等,基于此,我们可以实现高效而强大的自动补全功能。
#### 推荐阅读
- [A: 原文链接](https://doocs.github.io/md/)
- [阿里又一个 20k+ stars 开源项目诞生,恭喜 fastjson!](https://mp.weixin.qq.com/s/RNKDCK2KoyeuMeEs6GUrow)
- [刷掉 90% 候选人的互联网大厂海量数据面试题(附题解 + 方法总结)](https://mp.weixin.qq.com/s/rjGqxUvrEqJNlo09GrT1Dw)
- [好用!期待已久的文本块功能究竟如何在 Java 13 中发挥作用?](https://mp.weixin.qq.com/s/kalGv5T8AZGxTnLHr2wDsA)
- [2019 GitHub 开源贡献排行榜新鲜出炉!微软谷歌领头,阿里跻身前 12!](https://mp.weixin.qq.com/s/_q812aGD1b9QvZ2WFI0Qgw)
- [哈哈](http://file.debuggerpowerzcy.top/power/)
---
欢迎关注我的公众号“**Doocs开源社区**”,原创技术文章第一时间推送。
<center>
<img src="https://imgkr.cn-bj.ufileos.com/1092dc45-e817-4bb0-82b0-2b2b4826ccf2.gif" style="width: 100px;">
</center>
```
Next generation plan
(backup: autoCode -> {
(MAPPER + XML层)
var1: insertWithIdSelective
selectByExampleWithBLOBs
updateByExampleWithBLOBs
updateByPrimaryKeyWithBLOBs
(SERVICE层)
selectByPrimaryKey
deleteByPrimaryKey
updateByPrimaryKey
var2: @ID, @SECOND_MAIN_KEY
@UNIQ(group, order), @INDEX, @UNIQ_INDEX(group, order),
@NOTNULL, @DEFAULT,
@BLOB
var3: CreateTime | UpdateTime(, bug?) 禁用配置
var4: caofanCPU-branch, private
var5: digital automatic
var6: bug fix, d8gerDir?
})
优先级
1.XML insertWithIdSelective
2.CreateTime | UpdateTime(, bug?) 禁用配置
3.Example支持limit 1
索引及其他标识, 交由用户自定义
大文本后期再处理
pid=`ps aux |grep newreport |grep -v grep| awk '{print }'`
if [ -n "$pid" ];then
kill -9 $pid
sleep 5
fi
rm -rf newreport-*.jar
scp
```
================================================
FILE: settings.gradle
================================================
rootProject.name = 'D8gerAutoCode'
================================================
FILE: src/main/java/com/xyz/caofancpu/d8ger/WhoAmI.java
================================================
package com.xyz.caofancpu.d8ger;
/**
* Who You Are?
*/
public class WhoAmI {
/**
* ID
*/
private Long id;
private Integer age;
private String name;
}
================================================
FILE: src/main/java/com/xyz/caofancpu/d8ger/action/D8gerAutoCodeAction.java
================================================
package com.xyz.caofancpu.d8ger.action;
import com.intellij.notification.Notification;
import com.intellij.notification.NotificationType;
import com.intellij.notification.Notifications;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.command.WriteCommandAction;
import com.intellij.psi.PsiClass;
import com.intellij.psi.PsiDirectory;
import com.intellij.psi.PsiJavaFile;
import com.xyz.caofancpu.d8ger.core.AutoCodeTemplate;
import com.xyz.caofancpu.d8ger.core.D8gerAutoCoding;
import com.xyz.caofancpu.d8ger.core.KeyEnum;
import com.xyz.caofancpu.d8ger.core.ProjectEnvHandler;
import com.xyz.caofancpu.d8ger.core.TemplateKeyWordEnum;
import com.xyz.caofancpu.d8ger.util.CollectionUtil;
import com.xyz.caofancpu.d8ger.util.ConstantUtil;
import com.xyz.caofancpu.d8ger.util.IdeaPlatformFileTreeUtil;
import com.xyz.caofancpu.d8ger.util.PropertiesUtil;
import lombok.NonNull;
import org.apache.commons.lang3.tuple.Pair;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
/**
* ACP(AutoCodingProgramming)
*
* @author caofanCPU
*/
public class D8gerAutoCodeAction extends AnAction {
@Override
public synchronized void actionPerformed(@NonNull final AnActionEvent e) {
D8gerAutoCoding d8gerAutoCoding = ProjectEnvHandler.checkAndInitEnv(e);
if (Objects.isNull(d8gerAutoCoding)) {
return;
}
// Create directory | file
WriteCommandAction.runWriteCommandAction(d8gerAutoCoding.getCurrentProject(), () -> generateAutoCodeFile(d8gerAutoCoding));
}
/**
* Perform file creation, all directory | file write operations must be inside this method,
* and externally use WriteCommandAction.runWriteCommandAction for wrapping
*
* @param d8gerAutoCoding
*/
public void generateAutoCodeFile(D8gerAutoCoding d8gerAutoCoding) {
List<String> fileNameList = new ArrayList<>();
// 1.Complete directory and package data
d8gerAutoCoding.getFileMap().keySet().forEach(key -> {
Pair<PsiDirectory, String> packagePair = d8gerAutoCoding.getCustomConfigAutoCodeDirMap().get(key);
if (Objects.isNull(packagePair)) {
if (d8gerAutoCoding.getRealNeedCreateFileKeyList().contains(key) && !d8gerAutoCoding.isUseDefaultDirectory()) {
// Create D8AutoCode directory
PsiDirectory d8gerAutoCodeDir = IdeaPlatformFileTreeUtil.getOrCreateSubDir(d8gerAutoCoding.getD8AutoCodeDir(), ConstantUtil.GENERATE_DIR);
d8gerAutoCoding.setD8AutoCodeDir(d8gerAutoCodeDir);
d8gerAutoCoding.setUseDefaultDirectory(true);
fileNameList.add(d8gerAutoCoding.getD8AutoCodeDir().getName());
}
d8gerAutoCoding.getCustomConfigAutoCodeDirMap().put(key, Pair.of(d8gerAutoCoding.getD8AutoCodeDir(), d8gerAutoCoding.getPackageName()));
}
});
// 2.Replace keyword data
handleCustomPackageKeyWordMap(d8gerAutoCoding);
// 3.Just force file
d8gerAutoCoding.getFileMap().forEach((key, pair) -> {
if (skipCurrentOperation(d8gerAutoCoding, key)) {
// don't create file
return;
}
PsiDirectory targetDirectory = d8gerAutoCoding.getCustomConfigAutoCodeDirMap().get(key).getLeft();
PsiJavaFile autoCodeFile = IdeaPlatformFileTreeUtil.forceCreateJavaFile(
targetDirectory,
d8gerAutoCoding.getCurrentProject(),
pair.getLeft(),
AutoCodeTemplate.render(pair.getRight(), d8gerAutoCoding.loadEnhanceKeyWordMap(key))
);
// Find and import enum classes
if (KeyEnum.needImportEnumClass(key)) {
d8gerAutoCoding.getEnumTypeClassName().forEach(item -> {
Optional<PsiClass> optionalPsiClass = IdeaPlatformFileTreeUtil.findClass(d8gerAutoCoding.getCurrentProject(), item);
optionalPsiClass.ifPresent(autoCodeFile::importClass);
if (!skipCurrentOperation(d8gerAutoCoding, KeyEnum.FORMAT_STYLE)) {
// do code formatting
IdeaPlatformFileTreeUtil.format(d8gerAutoCoding.getCurrentProject(), autoCodeFile);
}
});
}
// This step is very important which would cause fail of creating file if it was ignored
targetDirectory.add(autoCodeFile);
fileNameList.add(autoCodeFile.getName());
});
Notifications.Bus.notify(
new Notification(ConstantUtil.NOTIFICATION_GROUP_VIEW_ID, "Look Rebuilding file here", CollectionUtil.join(fileNameList, ConstantUtil.DOUBLE_NEXT_LINE), NotificationType.INFORMATION)
);
}
/**
* Skip current operation or not
*
* @param d8gerAutoCoding
* @param keyEnum
* @return
*/
private boolean skipCurrentOperation(D8gerAutoCoding d8gerAutoCoding, KeyEnum keyEnum) {
return !PropertiesUtil.checkConfigTakeEffect(d8gerAutoCoding.loadPropertiesFromRootResource(), keyEnum.getKey());
}
/**
* Handle replacing package names by custom directory configs
*/
private void handleCustomPackageKeyWordMap(D8gerAutoCoding d8gerAutoCoding) {
Map<String, StringBuilder> keyWordMatchMap = d8gerAutoCoding.getKeyWordMatchMap();
d8gerAutoCoding.getCustomConfigAutoCodeDirMap().forEach((key, pair) -> {
TemplateKeyWordEnum targetPackageKey = null;
switch (key) {
case MO:
targetPackageKey = TemplateKeyWordEnum.MO_PACKAGE_NAME_KEY;
break;
case MO_MAPPER:
targetPackageKey = TemplateKeyWordEnum.MAPPER_PACKAGE_NAME_KEY;
break;
case MO_EXAMPLE:
targetPackageKey = TemplateKeyWordEnum.MO_EXAMPLE_PACKAGE_NAME_KEY;
break;
case SWAGGER_MO:
targetPackageKey = TemplateKeyWordEnum.SWAGGER_MO_PACKAGE_NAME_KEY;
break;
case MO_HANDLER:
targetPackageKey = TemplateKeyWordEnum.HANDLER_PACKAGE_NAME_KEY;
break;
case MO_CONTROLLER:
targetPackageKey = TemplateKeyWordEnum.CONTROLLER_PACKAGE_NAME_KEY;
break;
default:
break;
}
if (Objects.nonNull(targetPackageKey)) {
keyWordMatchMap.put(targetPackageKey.getName(), new StringBuilder(pair.getRight()));
}
});
}
}
================================================
FILE: src/main/java/com/xyz/caofancpu/d8ger/action/SwaggerModelAutoRenderAction.java
================================================
package com.xyz.caofancpu.d8ger.action;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.command.WriteCommandAction;
import com.intellij.openapi.editor.Document;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.project.Project;
import com.xyz.caofancpu.d8ger.util.CollectionUtil;
import com.xyz.caofancpu.d8ger.util.ConstantUtil;
import com.xyz.caofancpu.d8ger.util.VerbalExpressionUtil;
import lombok.NonNull;
import java.util.ArrayList;
import java.util.List;
/**
* SwaggerModel model automatic rendering
*
* @author caofanCPU
*/
public class SwaggerModelAutoRenderAction extends AnAction {
@Override
public void actionPerformed(AnActionEvent e) {
final Editor currentEditor = e.getRequiredData(CommonDataKeys.EDITOR);
final Project currentProject = e.getRequiredData(CommonDataKeys.PROJECT);
final Document currentDocument = currentEditor.getDocument();
// Perform a refresh of the current file
WriteCommandAction.runWriteCommandAction(currentProject, () -> executeSwaggerRender(currentDocument));
}
/**
* Rewrite file
*
* @param currentDocument
*/
public void executeSwaggerRender(@NonNull Document currentDocument) {
// split lines by \n | \r\n
String[] codeLines = currentDocument.getText().split("(?:\\n|(?:\\r\\n))");
List<String> wrapLineList = new ArrayList<>(codeLines.length);
int apiModelPropertyCounter = 0;
int apiOperationSupportCounter = 0;
for (String item : codeLines) {
// case 1
if (item.contains("@ApiModelProperty(")) {
if (!item.contains("position")) {
String replacer = (item.contains("()") ? "position = " : ", position = ") + (++apiModelPropertyCounter) + ")";
item = item.replace(")", replacer);
} else {
item = VerbalExpressionUtil.regexHandleSwaggerModelProperty(item, "position = " + (++apiModelPropertyCounter));
}
}
// case 2
if (item.contains("@ApiOperationSupport(")) {
if (!item.contains("order")) {
String replacer = (item.contains("()") ? "order = " : ", order = ") + (++apiOperationSupportCounter) + ")";
item = item.replace(")", replacer);
} else {
item = VerbalExpressionUtil.regexHandleSwaggerModelProperty(item, "order = " + (++apiOperationSupportCounter));
}
}
wrapLineList.add(item);
}
boolean isWindowsLinebreak = currentDocument.getText().contains(ConstantUtil.WINDOWS_NEXT_LINE);
currentDocument.setText(CollectionUtil.join(wrapLineList, isWindowsLinebreak ? ConstantUtil.WINDOWS_NEXT_LINE : ConstantUtil.NEXT_LINE));
}
}
================================================
FILE: src/main/java/com/xyz/caofancpu/d8ger/activity/D8gerActivity.java
================================================
package com.xyz.caofancpu.d8ger.activity;
import com.intellij.ide.plugins.IdeaPluginDescriptor;
import com.intellij.ide.plugins.PluginManagerCore;
import com.intellij.notification.Notification;
import com.intellij.notification.NotificationType;
import com.intellij.notification.Notifications;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.extensions.PluginId;
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.startup.StartupActivity;
import com.intellij.util.text.VersionComparatorUtil;
import com.xyz.caofancpu.d8ger.setting.D8gerApplicationState;
import com.xyz.caofancpu.d8ger.util.ConstantUtil;
import org.jetbrains.annotations.NotNull;
import java.util.Objects;
/**
* Start up and update activity, show some message!
*
* @author D8GER
*/
public class D8gerActivity implements StartupActivity, DumbAware {
@Override
public void runActivity(@NotNull Project project) {
if (ApplicationManager.getApplication().isUnitTestMode()) {
return;
}
IdeaPluginDescriptor plugin = PluginManagerCore.getPlugin(PluginId.getId(ConstantUtil.PLUGIN_ID));
if (Objects.nonNull(plugin)) {
String installedVersion = D8gerApplicationState.getOldVersion();
int compare = VersionComparatorUtil.compare(installedVersion, plugin.getVersion());
if (compare < 0) {
ApplicationManager.getApplication()
.invokeLater(() -> Notifications.Bus.notify(
new Notification(ConstantUtil.NOTIFICATION_GROUP_VIEW_ID,
ConstantUtil.RENDER_TITLE + " (Update To v" + plugin.getVersion() + ")",
"If you like D8gerAutoCode, please star the project <a href='https://github.com/caofanCPU/D8gerAutoCode'>D8gerAutoCode</a>",
NotificationType.INFORMATION
))
);
D8gerApplicationState.setPluginVersion(plugin.getVersion());
}
}
}
}
================================================
FILE: src/main/java/com/xyz/caofancpu/d8ger/core/AutoCodeTemplate.java
================================================
package com.xyz.caofancpu.d8ger.core;
import com.xyz.caofancpu.d8ger.util.VerbalExpressionUtil;
import lombok.NonNull;
import ru.lanwen.verbalregex.VerbalExpression;
import java.util.Map;
/**
* Code template string constants
*
* @author caofanCPU
*/
public class AutoCodeTemplate {
public static Boolean IS_EN_LOCALE = Boolean.TRUE;
/**
* MO template string
*/
public static StringBuilder ZN_TEMPLATE_MO = new StringBuilder("package @moPackage@;\n" +
"\n" +
"import lombok.AllArgsConstructor;\n" +
"import lombok.Data;\n" +
"import lombok.NoArgsConstructor;\n" +
"import lombok.experimental.Accessors;\n" +
"\n" +
"import java.math.BigDecimal;\n" +
"import java.time.LocalDateTime;\n" +
"import java.util.Date;\n" +
"\n" +
"/**\n" +
" * @MoName@Mo\n" +
" *\n" +
" * @author @d8Author@\n" +
" */\n" +
"@Data\n" +
"@NoArgsConstructor\n" +
"@AllArgsConstructor\n" +
"@Accessors(chain = true)\n" +
"public class @MoName@Mo {\n" +
"\n" +
"@field@\n" +
"\n" +
"}");
/**
* Swagger VO template string
*/
public static StringBuilder ZN_TEMPLATE_SWAGGER_VO = new StringBuilder("package @swaggerMoPackage@;\n" +
"\n" +
"import io.swagger.annotations.ApiModel;\n" +
"import io.swagger.annotations.ApiModelProperty;\n" +
"import lombok.AllArgsConstructor;\n" +
"import lombok.Data;\n" +
"import lombok.NoArgsConstructor;\n" +
"import lombok.experimental.Accessors;\n" +
"\n" +
"import java.math.BigDecimal;\n" +
"import java.time.LocalDateTime;\n" +
"import java.util.Date;\n" +
"\n" +
"/**\n" +
" * @MoName@Mo对应的SwaggerApi增强Vo对象\n" +
" *\n" +
" * @author @d8Author@\n" +
" */\n" +
"@Data\n" +
"@NoArgsConstructor\n" +
"@AllArgsConstructor\n" +
"@Accessors(chain = true)\n" +
"@ApiModel\n" +
"public class @MoName@Vo {\n" +
"\n" +
"@swaggerField@\n" +
"\n" +
"}");
/**
* Sql template string
*/
public static StringBuilder ZN_TEMPLATE_MO_SQL = new StringBuilder("\n" +
"-- ----------------------------\n" +
"-- D8ger-Sql-Auto-Generated\n" +
"-- Table structure for `@mo_table_name@`\n" +
"-- @author @d8Author@\n" +
"-- ----------------------------\n" +
"-- DROP TABLE IF EXISTS `@mo_table_name@`;\n" +
"CREATE TABLE `@mo_table_name@`\n" +
"(\n" +
"@sql_column@\n" +
")\n" +
" comment '@MoName@表' charset = utf8mb4;\n");
/**
* Mapper template string
*/
public static StringBuilder ZN_TEMPLATE_MAPPER = new StringBuilder("package @mapperPackage@;\n" +
"\n" +
"import @moExamplePackage@.@MoName@Example;\n" +
"import @moPackage@.@MoName@Mo;\n" +
"import org.apache.ibatis.annotations.Param;\n" +
"import @MapperAnnotationPackage@;\n" +
"\n" +
"import java.util.List;\n" +
"\n" +
"/**\n" +
" * @MoName@Mo对应的Mapper\n" +
" *\n" +
" * @author @d8Author@\n" +
" */\n" +
"@MapperAnnotation@\n" +
"public interface @MoName@Mapper {\n" +
"\n" +
" /**\n" +
" * 根据条件查询列表\n" +
" *\n" +
" * @param @uncapitallizeMoName@Example\n" +
" * @return\n" +
" */\n" +
" List<@MoName@Mo> selectByExample(@MoName@Example @uncapitallizeMoName@Example);\n" +
"\n" +
" /**\n" +
" * 批量更新, 根据主键更新非null字段\n" +
" *\n" +
" * @param @uncapitallizeMoName@MoList\n" +
" * @return\n" +
" */\n" +
" int updateBatchByPrimaryKeySelective(List<@MoName@Mo> @uncapitallizeMoName@MoList);\n" +
"\n" +
" /**\n" +
" * 根据条件更新非null字段\n" +
" *\n" +
" * @param @uncapitallizeMoName@Mo\n" +
" * @param @uncapitallizeMoName@Example\n" +
" * @return\n" +
" */\n" +
" int updateByExampleSelective(@Param(\"record\") @MoName@Mo @uncapitallizeMoName@Mo, @Param(\"example\") @MoName@Example @uncapitallizeMoName@Example);\n" +
"\n" +
" /**\n" +
" * 根据条件删除记录\n" +
" *\n" +
" * @param @uncapitallizeMoName@Example\n" +
" * @return\n" +
" */\n" +
" int deleteByExample(@MoName@Example @uncapitallizeMoName@Example);\n" +
"\n" +
" /**\n" +
" * 根据条件统计记录\n" +
" *\n" +
" * @param @uncapitallizeMoName@Example\n" +
" * @return 记录条数\n" +
" */\n" +
" int countByExample(@MoName@Example @uncapitallizeMoName@Example);\n" +
"\n" +
" /**\n" +
" * 增加单条记录, 并为入参设置ID\n" +
" *\n" +
" * @param @uncapitallizeMoName@Mo\n" +
" * @return\n" +
" */\n" +
" int insertWithId(@MoName@Mo @uncapitallizeMoName@Mo);\n" +
"\n" +
" /**\n" +
" * 批量增加记录, 并为入参设置ID\n" +
" * 注意: `id` | `createTime` | `updateTime`字段将被忽略, 以数据库为准\n" +
" *\n" +
" * @param @uncapitallizeMoName@MoList\n" +
" * @return\n" +
" */\n" +
" int insertBatchWithId(List<@MoName@Mo> @uncapitallizeMoName@MoList);\n" +
"\n" +
" /**\n" +
" * @MoName@列表查询\n" +
" *\n" +
" * @param @uncapitallizeMoName@Mo\n" +
" * @return\n" +
" */\n" +
" List<@MoName@Mo> query@MoName@MoList(@MoName@Mo @uncapitallizeMoName@Mo);\n" +
"\n" +
" /**\n" +
" * 根据ID查询对象\n" +
" *\n" +
" * @param id\n" +
" * @return\n" +
" */\n" +
" <T extends Number> @MoName@Mo selectByPrimaryKey(T id);\n" +
"\n" +
" /**\n" +
" * 根据主键只更新非null字段\n" +
" *\n" +
" * @param @uncapitallizeMoName@Mo\n" +
" * @return\n" +
" */\n" +
" int updateByPrimaryKeySelective(@MoName@Mo @uncapitallizeMoName@Mo);\n" +
"\n" +
" /**\n" +
" * 根据ID删除记录\n" +
" *\n" +
" * @param id\n" +
" * @return\n" +
" */\n" +
" <T extends Number> int deleteByPrimaryKey(T id);\n" +
"\n" +
" /**\n" +
" * 根据条件查询单个对象\n" +
" *\n" +
" * @param @uncapitallizeMoName@Example\n" +
" * @return\n" +
" */\n" +
" @MoName@Mo selectOneByExample(@MoName@Example @uncapitallizeMoName@Example);\n" +
"\n" +
" /**\n" +
" * 增加单条非空字段记录, 并为入参设置ID\n" +
" *\n" +
" * @param @uncapitallizeMoName@Mo\n" +
" * @return\n" +
" */\n" +
" int insertSelectiveWithId(@MoName@Mo @uncapitallizeMoName@Mo);\n" +
"\n" +
"}");
/**
* MoExample template string
*/
public static StringBuilder ZN_TEMPLATE_MO_EXAMPLE = new StringBuilder("package @moExamplePackage@;\n" +
"\n" +
"import java.math.BigDecimal;\n" +
"import java.time.LocalDateTime;\n" +
"import java.util.ArrayList;\n" +
"import java.util.Date;\n" +
"import java.util.List;\n" +
"\n" +
"/**\n" +
" * @MoName@Mo对应的Example单表操作对象\n" +
" *\n" +
" * @author @d8Author@\n" +
" */\n" +
"public class @MoName@Example {\n" +
"\n" +
" protected String orderByClause;\n" +
"\n" +
" protected Integer limit;\n" +
"\n" +
" protected boolean distinct;\n" +
"\n" +
" protected List<Criteria> conditionCriteria;\n" +
"\n" +
" public @MoName@Example() {\n" +
" conditionCriteria = new ArrayList<>();\n" +
" }\n" +
"\n" +
" public @MoName@Example andOrderByClause(String orderByClause) {\n" +
" this.orderByClause = orderByClause;\n" +
" return this;\n" +
" }\n" +
"\n" +
" public String getOrderByClause() {\n" +
" return orderByClause;\n" +
" }\n" +
"\n" +
" public @MoName@Example andLimit(Integer limit) {\n" +
" if (limit != null && limit > 0) {\n" +
" this.limit = limit;\n" +
gitextract_52hz9hgr/
├── .idea/
│ ├── $CACHE_FILE$
│ ├── .gitignore
│ ├── D8gerAutoCodePluginProjectSetting.xml
│ ├── codeStyles/
│ │ ├── Project.xml
│ │ └── codeStyleConfig.xml
│ ├── compiler.xml
│ ├── dataSources.xml
│ ├── dictionaries/
│ │ ├── D8GER.xml
│ │ └── ht_caofan.xml
│ ├── encodings.xml
│ ├── gradle.xml
│ ├── inspectionProfiles/
│ │ └── Project_Default.xml
│ ├── jarRepositories.xml
│ ├── libraries-with-intellij-classes.xml
│ ├── misc.xml
│ ├── setting.xml
│ ├── uiDesigner.xml
│ └── vcs.xml
├── IntelliJBestAction.adoc
├── IntelliJBestAction.html
├── LICENCE
├── README.md
├── README_CN.md
├── build.gradle
├── doc/
│ ├── ComputerMathData.md
│ ├── Math.adoc
│ └── WX-MarkDownTest.md
├── settings.gradle
└── src/
├── main/
│ ├── java/
│ │ └── com/
│ │ └── xyz/
│ │ └── caofancpu/
│ │ └── d8ger/
│ │ ├── WhoAmI.java
│ │ ├── action/
│ │ │ ├── D8gerAutoCodeAction.java
│ │ │ └── SwaggerModelAutoRenderAction.java
│ │ ├── activity/
│ │ │ └── D8gerActivity.java
│ │ ├── core/
│ │ │ ├── AutoCodeTemplate.java
│ │ │ ├── D8gerAutoCoding.java
│ │ │ ├── EasterEggCodeTemplateEnum.java
│ │ │ ├── KeyEnum.java
│ │ │ ├── MoField.java
│ │ │ ├── ProjectEnvHandler.java
│ │ │ ├── SupportFieldTypeEnum.java
│ │ │ └── TemplateKeyWordEnum.java
│ │ ├── setting/
│ │ │ ├── D8gerApplicationState.java
│ │ │ ├── D8gerProjectState.java
│ │ │ ├── D8gerSetting.form
│ │ │ ├── D8gerSetting.java
│ │ │ └── D8gerSettingsConfigurable.java
│ │ └── util/
│ │ ├── CollectionUtil.java
│ │ ├── ConstantUtil.java
│ │ ├── DateUtil.java
│ │ ├── IdeaPlatformFileTreeUtil.java
│ │ ├── JSONUtil.java
│ │ ├── PropertiesUtil.java
│ │ ├── StringAlignUtil.java
│ │ └── VerbalExpressionUtil.java
│ └── resources/
│ ├── META-INF/
│ │ └── plugin.xml
│ ├── icons/
│ │ └── Icon
│ └── template/
│ ├── .zshrc
│ ├── ControllerTemplate.txt
│ ├── DeletedServiceInterfaceTemplate.txt
│ ├── EN/
│ │ ├── ControllerTemplate.txt
│ │ ├── D8GER.txt
│ │ ├── DeletedServiceInterfaceTemplate.txt
│ │ ├── ExampleTemplate.txt
│ │ ├── HandlerTemplate.txt
│ │ ├── MapperTemplate.txt
│ │ ├── MapperXMLTemplate.txt
│ │ ├── MoTemplate.txt
│ │ ├── SQLTemplate.txt
│ │ └── SwaggerMoTemplate.txt
│ ├── END.txt
│ ├── ExampleTemplate.txt
│ ├── HandlerTemplate.txt
│ ├── MapperTemplate.txt
│ ├── MapperXMLTemplate.txt
│ ├── MoTemplate.txt
│ ├── NASA.txt
│ ├── PLAN.txt
│ ├── Regex.txt
│ ├── SQLTemplate.txt
│ ├── SwaggerMoTemplate.txt
│ ├── caofan.txt
│ ├── d8ger-util-list.txt
│ ├── javaShorts.txt
│ ├── normal.command
│ └── ohmyd8ger.command
└── test/
├── java/
│ └── d8ger/
│ └── D8T.java
└── resources/
└── MyJSON.txt
SYMBOL INDEX (257 symbols across 25 files)
FILE: src/main/java/com/xyz/caofancpu/d8ger/WhoAmI.java
class WhoAmI (line 6) | public class WhoAmI {
FILE: src/main/java/com/xyz/caofancpu/d8ger/action/D8gerAutoCodeAction.java
class D8gerAutoCodeAction (line 35) | public class D8gerAutoCodeAction extends AnAction {
method actionPerformed (line 37) | @Override
method generateAutoCodeFile (line 53) | public void generateAutoCodeFile(D8gerAutoCoding d8gerAutoCoding) {
method skipCurrentOperation (line 114) | private boolean skipCurrentOperation(D8gerAutoCoding d8gerAutoCoding, ...
method handleCustomPackageKeyWordMap (line 121) | private void handleCustomPackageKeyWordMap(D8gerAutoCoding d8gerAutoCo...
FILE: src/main/java/com/xyz/caofancpu/d8ger/action/SwaggerModelAutoRenderAction.java
class SwaggerModelAutoRenderAction (line 23) | public class SwaggerModelAutoRenderAction extends AnAction {
method actionPerformed (line 24) | @Override
method executeSwaggerRender (line 39) | public void executeSwaggerRender(@NonNull Document currentDocument) {
FILE: src/main/java/com/xyz/caofancpu/d8ger/activity/D8gerActivity.java
class D8gerActivity (line 25) | public class D8gerActivity implements StartupActivity, DumbAware {
method runActivity (line 27) | @Override
FILE: src/main/java/com/xyz/caofancpu/d8ger/core/AutoCodeTemplate.java
class AutoCodeTemplate (line 14) | public class AutoCodeTemplate {
method render (line 2211) | public static StringBuilder render(@NonNull StringBuilder template, Ma...
FILE: src/main/java/com/xyz/caofancpu/d8ger/core/D8gerAutoCoding.java
class D8gerAutoCoding (line 35) | @Data
method build (line 114) | public static D8gerAutoCoding build(@NonNull Project currentProject, @...
method initFileMap (line 143) | private D8gerAutoCoding initFileMap() {
method getAllFileKeyList (line 155) | private List<KeyEnum> getAllFileKeyList() {
method initCustomConfigAutoCodeDirMap (line 173) | private D8gerAutoCoding initCustomConfigAutoCodeDirMap() {
method loadPropertiesFromRootResource (line 197) | public Properties loadPropertiesFromRootResource() {
method initKeyWordMap (line 206) | private D8gerAutoCoding initKeyWordMap() {
method wrapSwaggerPage (line 250) | public String wrapSwaggerPage() {
method loadEnhanceKeyWordMap (line 263) | public Map<String, StringBuilder> loadEnhanceKeyWordMap(KeyEnum key) {
method initMoFieldList (line 350) | private D8gerAutoCoding initMoFieldList() {
method getEnumTypeClassName (line 384) | public List<String> getEnumTypeClassName() {
method getMoName (line 393) | public String getMoName() {
method getPackageName (line 404) | public String getPackageName() {
method getXMLBaseColumnList (line 416) | private StringBuilder getXMLBaseColumnList() {
method getXMLSelectBaseColumnList (line 432) | private StringBuilder getXMLSelectBaseColumnList() {
method getXMLBatchUpdateNonNullFieldByID (line 443) | private StringBuilder getXMLBatchUpdateNonNullFieldByID() {
method getXMLInsertSelectiveColumnList (line 457) | private StringBuilder getXMLInsertSelectiveColumnList() {
method getXMLInsertSelectiveFieldList (line 471) | private StringBuilder getXMLInsertSelectiveFieldList() {
method getXMLUpdateNonNullFieldByExample (line 485) | private StringBuilder getXMLUpdateNonNullFieldByExample() {
method getXMLInsertField (line 499) | private StringBuilder getXMLInsertField() {
method getXMLBatchInsertField (line 511) | private StringBuilder getXMLBatchInsertField() {
method getXMLUpdateNonNullFieldByID (line 525) | private StringBuilder getXMLUpdateNonNullFieldByID() {
method getXMLMoListQuery (line 539) | private StringBuilder getXMLMoListQuery() {
method configOriginPsiClass (line 560) | public D8gerAutoCoding configOriginPsiClass() {
method produceIdField (line 567) | private void produceIdField() {
method produceCreateTimeField (line 583) | private void produceCreateTimeField() {
method produceUpdateTimeField (line 599) | private void produceUpdateTimeField() {
FILE: src/main/java/com/xyz/caofancpu/d8ger/core/EasterEggCodeTemplateEnum.java
type EasterEggCodeTemplateEnum (line 8) | public enum EasterEggCodeTemplateEnum {
method EasterEggCodeTemplateEnum (line 23) | EasterEggCodeTemplateEnum(String codeKey, String templateCode) {
method getCodeKey (line 28) | public String getCodeKey() {
method getTemplateCode (line 32) | public String getTemplateCode() {
FILE: src/main/java/com/xyz/caofancpu/d8ger/core/KeyEnum.java
type KeyEnum (line 8) | public enum KeyEnum {
method KeyEnum (line 24) | KeyEnum(String key) {
method ignoreCreateFile (line 34) | @Deprecated
method needImportEnumClass (line 45) | public static boolean needImportEnumClass(KeyEnum key) {
method getKey (line 49) | public String getKey() {
FILE: src/main/java/com/xyz/caofancpu/d8ger/core/MoField.java
class MoField (line 25) | @Data
method MoField (line 64) | public MoField(@NonNull PsiField field) {
method wrapSqlDefaultValueView (line 106) | public String wrapSqlDefaultValueView() {
method toString (line 122) | @Override
method toSwaggerString (line 135) | public String toSwaggerString() {
method toSqlColumnDefinitionString (line 145) | public String toSqlColumnDefinitionString() {
method toMoExampleDefinitionMethodString (line 158) | public String toMoExampleDefinitionMethodString() {
FILE: src/main/java/com/xyz/caofancpu/d8ger/core/ProjectEnvHandler.java
class ProjectEnvHandler (line 23) | public class ProjectEnvHandler {
method checkAndInitEnv (line 25) | public static D8gerAutoCoding checkAndInitEnv(AnActionEvent e) {
FILE: src/main/java/com/xyz/caofancpu/d8ger/core/SupportFieldTypeEnum.java
type SupportFieldTypeEnum (line 15) | public enum SupportFieldTypeEnum {
method SupportFieldTypeEnum (line 41) | SupportFieldTypeEnum(String originName, String shortName, String sqlNa...
method positionByShortName (line 47) | public static SupportFieldTypeEnum positionByShortName(String shortNam...
method getOriginName (line 59) | public String getOriginName() {
method getShortName (line 63) | public String getShortName() {
method setShortName (line 67) | public SupportFieldTypeEnum setShortName(String shortName) {
method getSqlName (line 72) | public String getSqlName() {
FILE: src/main/java/com/xyz/caofancpu/d8ger/core/TemplateKeyWordEnum.java
type TemplateKeyWordEnum (line 8) | public enum TemplateKeyWordEnum {
method TemplateKeyWordEnum (line 43) | TemplateKeyWordEnum(String name) {
method getName (line 47) | public String getName() {
FILE: src/main/java/com/xyz/caofancpu/d8ger/setting/D8gerApplicationState.java
class D8gerApplicationState (line 16) | @State(
method getInstance (line 23) | public static D8gerApplicationState getInstance() {
method getOldVersion (line 27) | public static String getOldVersion() {
method setPluginVersion (line 31) | public static void setPluginVersion(String version) {
method setVersion (line 35) | public void setVersion(String version) {
method getState (line 39) | @Nullable
method loadState (line 45) | @Override
FILE: src/main/java/com/xyz/caofancpu/d8ger/setting/D8gerProjectState.java
class D8gerProjectState (line 18) | @State(
method getInstance (line 47) | public static D8gerProjectState getInstance(Project currentProject) {
method getState (line 51) | @Nullable
method loadState (line 57) | @Override
FILE: src/main/java/com/xyz/caofancpu/d8ger/setting/D8gerSetting.java
class D8gerSetting (line 23) | public class D8gerSetting {
method D8gerSetting (line 144) | public D8gerSetting(Project project) {
method initTbbListener (line 150) | private void initTbbListener() {
method getFolderChooseListener (line 161) | private TextBrowseFolderListener getFolderChooseListener() {
method initDonate (line 178) | private void initDonate() {
method getPanel (line 186) | public JPanel getPanel() {
method getPreferredFocusedComponent (line 190) | public JComponent getPreferredFocusedComponent() {
method getMoCheck (line 194) | public boolean getMoCheck() {
method setMoCheck (line 198) | public void setMoCheck(boolean newStatus) {
method getMapperCheck (line 202) | public boolean getMapperCheck() {
method setMapperCheck (line 206) | public void setMapperCheck(boolean newStatus) {
method getMapperExampleCheck (line 210) | public boolean getMapperExampleCheck() {
method setMapperExampleCheck (line 214) | public void setMapperExampleCheck(boolean newStatus) {
method getMapperXmlCheck (line 218) | public boolean getMapperXmlCheck() {
method setMapperXmlCheck (line 222) | public void setMapperXmlCheck(boolean newStatus) {
method getSqlCheck (line 226) | public boolean getSqlCheck() {
method setSqlCheck (line 230) | public void setSqlCheck(boolean newStatus) {
method getVoCheck (line 234) | public boolean getVoCheck() {
method setVoCheck (line 238) | public void setVoCheck(boolean newStatus) {
method getHandlerCheck (line 242) | public boolean getHandlerCheck() {
method setHandlerCheck (line 246) | public void setHandlerCheck(boolean newStatus) {
method getControllerCheck (line 250) | public boolean getControllerCheck() {
method setControllerCheck (line 254) | public void setControllerCheck(boolean newStatus) {
method getFormatStyleCheck (line 258) | public boolean getFormatStyleCheck() {
method setFormatStyleCheck (line 262) | public void setFormatStyleCheck(boolean newStatus) {
method getDetectSQLTimeColumnCheck (line 266) | public boolean getDetectSQLTimeColumnCheck() {
method setDetectSQLTimeColumnCheck (line 270) | public void setDetectSQLTimeColumnCheck(boolean newStatus) {
method getMapperBetterThenRepositoryCheck (line 274) | public boolean getMapperBetterThenRepositoryCheck() {
method setMapperBetterThenRepositoryCheck (line 278) | public void setMapperBetterThenRepositoryCheck(boolean newStatus) {
method getMoPath (line 282) | @NotNull
method setMoPath (line 287) | public void setMoPath(@NotNull String newText) {
method getMapperPath (line 291) | @NotNull
method setMapperPath (line 296) | public void setMapperPath(@NotNull String newText) {
method getMapperExamplePath (line 300) | @NotNull
method setMapperExamplePath (line 305) | public void setMapperExamplePath(@NotNull String newText) {
method getMapperXmlPath (line 309) | @NotNull
method setMapperXmlPath (line 314) | public void setMapperXmlPath(@NotNull String newText) {
method getSqlPath (line 318) | @NotNull
method setSqlPath (line 323) | public void setSqlPath(@NotNull String newText) {
method getVoPath (line 327) | @NotNull
method setVoPath (line 332) | public void setVoPath(@NotNull String newText) {
method getHandlerPath (line 336) | @NotNull
method setHandlerPath (line 341) | public void setHandlerPath(@NotNull String newText) {
method getControllerPath (line 345) | @NotNull
method setControllerPath (line 350) | public void setControllerPath(@NotNull String newText) {
method getDefaultAuthor (line 354) | @NotNull
method setDefaultAuthor (line 359) | public void setDefaultAuthor(@NotNull String newText) {
method getDefaultUrlPrefix (line 363) | @NotNull
method setDefaultUrlPrefix (line 368) | public void setDefaultUrlPrefix(@NotNull String newText) {
method getDefaultLocale (line 372) | @NotNull
method setDefaultLocale (line 377) | public void setDefaultLocale(@NotNull String newText) {
FILE: src/main/java/com/xyz/caofancpu/d8ger/setting/D8gerSettingsConfigurable.java
class D8gerSettingsConfigurable (line 17) | public class D8gerSettingsConfigurable implements Configurable {
method D8gerSettingsConfigurable (line 32) | public D8gerSettingsConfigurable(Project currentProject) {
method getDisplayName (line 39) | @Nls(capitalization = Nls.Capitalization.Title)
method getPreferredFocusedComponent (line 45) | @Override
method createComponent (line 50) | @Nullable
method isModified (line 58) | @Override
method apply (line 87) | @Override
method reset (line 115) | @Override
method disposeUIResources (line 143) | @Override
FILE: src/main/java/com/xyz/caofancpu/d8ger/util/CollectionUtil.java
class CollectionUtil (line 36) | public class CollectionUtil extends CollectionUtils {
method union (line 49) | @SuppressWarnings("unchecked")
method intersection (line 67) | @SuppressWarnings("unchecked")
method disjunction (line 85) | @SuppressWarnings("unchecked")
method subtract (line 103) | @SuppressWarnings("unchecked")
method sum (line 119) | public static <F extends Number, T> BigDecimal sum(Collection<T> coll,...
method average (line 137) | public static <F extends Number, T> BigDecimal average(Collection<T> c...
method max (line 154) | public static <F extends Number, T> BigDecimal max(Collection<T> coll,...
method min (line 173) | public static <F extends Number, T> BigDecimal min(Collection<T> coll,...
method probeRepeatValueSet (line 193) | public static <T, F> Set<F> probeRepeatValueSet(Collection<T> coll, Fu...
method splitDelimitedStringToList (line 209) | public static <T> List<T> splitDelimitedStringToList(@NonNull String s...
method isEmpty (line 219) | public static boolean isEmpty(Map sourceMap) {
method isNotEmpty (line 223) | public static boolean isNotEmpty(Map sourceMap) {
method transToSet (line 234) | public static <E, R> Set<R> transToSet(Collection<E> source, Function<...
method transToList (line 245) | public static <E, R> List<R> transToList(Collection<E> source, Functio...
method transToCollection (line 257) | public static <E, R, C extends Collection<R>> C transToCollection(Supp...
method transToListWithFlatMap (line 269) | public static <E, R> List<R> transToListWithFlatMap(Collection<E> sour...
method transToSetWithFlatMap (line 281) | public static <E, R> Set<R> transToSetWithFlatMap(Collection<E> source...
method filterAndTransSet (line 293) | public static <F, T> Set<F> filterAndTransSet(Collection<T> coll, Pred...
method removeAndTransSet (line 306) | public static <F, T> Set<F> removeAndTransSet(Collection<T> coll, Pred...
method filterAndTransList (line 318) | public static <F, T> List<F> filterAndTransList(Collection<T> coll, Pr...
method removeAndTransList (line 331) | public static <F, T> List<F> removeAndTransList(Collection<T> coll, Pr...
method filterAndTransColl (line 345) | public static <T, F, R extends Collection<F>> R filterAndTransColl(Sup...
method removeAndTransColl (line 359) | public static <T, F, R extends Collection<F>> R removeAndTransColl(Sup...
method distinctList (line 371) | public static <E, R> List<R> distinctList(Collection<E> source, Functi...
method distinctListByField (line 383) | public static <T> List<T> distinctListByField(Collection<T> coll, Comp...
method groupIndexToMap (line 410) | public static <E, K> Map<K, List<E>> groupIndexToMap(Collection<E> sou...
method groupIndexToMap (line 425) | public static <E, K, V> Map<K, List<V>> groupIndexToMap(Collection<E> ...
method groupIndexToMap (line 437) | public static <E, K, M extends Map<K, List<E>>> M groupIndexToMap(Supp...
method groupIndexToMap (line 449) | public static <E, K, M extends Map<K, C>, C extends Collection<E>> M g...
method groupIndexToMap (line 464) | public static <E, K, V, M extends Map<K, C>, C extends Collection<V>> ...
method transToMap (line 476) | public static <E, K> Map<K, E> transToMap(@NonNull Iterable<E> values,...
method transToMap (line 490) | public static <E, K, M extends Map<K, E>> M transToMap(Supplier<M> map...
method transToMapEnhance (line 505) | public static <E, K, M extends Map<K, E>> M transToMapEnhance(Supplier...
method transToMap (line 520) | public static <E, K, V> Map<K, V> transToMap(@NonNull Iterable<E> valu...
method transToMap (line 536) | public static <E, K, V, M extends Map<K, V>> M transToMap(Supplier<M> ...
method transToMapByMerge (line 551) | public static <E, K, V, M extends Map<K, List<V>>> M transToMapByMerge...
method join (line 571) | public static String join(Object[] arr, String separator) {
method join (line 585) | public static <T> String join(Collection<T> coll, String separator) {
method sortedMapByValue (line 604) | public static <K, V extends Comparable<V>> LinkedHashMap<K, V> sortedM...
method findAny (line 621) | public static <T, F> T findAny(Collection<T> coll, Function<? super T,...
method findAnyInArrays (line 635) | public static <T, F> T findAnyInArrays(T[] source, Function<? super T,...
method findFirst (line 648) | public static <T, F> T findFirst(Collection<T> coll, Function<? super ...
method findFirst (line 660) | public static <T> T findFirst(Collection<T> coll, Predicate<? super T>...
method findAll (line 672) | public static <T, F> List<T> findAll(Collection<T> coll, Function<? su...
method findAll (line 689) | public static <T> List<T> findAll(Collection<T> coll, Predicate<? supe...
method existAtLeastOne (line 702) | public static <T, F> boolean existAtLeastOne(Collection<T> coll, Funct...
method exist (line 714) | public static <T, F> boolean exist(Collection<T> coll, Function<? supe...
method exist (line 725) | public static <T> boolean exist(Collection<T> coll, Predicate<? super ...
method reverseKV (line 742) | public static <E1, E2, K1, K2> Map<K2, List<E2>> reverseKV(@NonNull Ma...
method reverseKV (line 768) | public static <V1, V2, K1, K2, C1 extends Collection<V1>, C2 extends C...
method findInMap (line 789) | public static <K, V, T> List<Entry<K, V>> findInMap(Map<K, V> srcMap, ...
method findOneInMap (line 814) | public static <K, V, T> Entry<K, V> findOneInMap(Map<K, V> srcMap, Fun...
method findOneValue (line 834) | public static <K, V, T> V findOneValue(Map<K, V> srcMap, Function<? su...
method nonDuplicateKey (line 848) | private static <T> BinaryOperator<T> nonDuplicateKey() {
method enableNewOnDuplicateKey (line 854) | private static <T> BinaryOperator<T> enableNewOnDuplicateKey() {
FILE: src/main/java/com/xyz/caofancpu/d8ger/util/ConstantUtil.java
class ConstantUtil (line 13) | public class ConstantUtil {
FILE: src/main/java/com/xyz/caofancpu/d8ger/util/DateUtil.java
class DateUtil (line 38) | @Slf4j
method toLocalDateTime (line 51) | public static LocalDateTime toLocalDateTime(@NonNull Long milliSeconds) {
method parseStandardMilliSeconds (line 61) | public static Long parseStandardMilliSeconds(String dateTimeStr) {
method parseStandardDateTime (line 71) | public static LocalDateTime parseStandardDateTime(String dateTimeStr) {
method enhanceToLocalDateTime (line 78) | public static String enhanceToLocalDateTime(@NonNull Long milliSeconds) {
method enhanceParseMilliSeconds (line 96) | public static String enhanceParseMilliSeconds(String dateTimeStr) {
FILE: src/main/java/com/xyz/caofancpu/d8ger/util/IdeaPlatformFileTreeUtil.java
class IdeaPlatformFileTreeUtil (line 30) | public class IdeaPlatformFileTreeUtil {
method forceCreateJavaFile (line 41) | public static PsiJavaFile forceCreateJavaFile(@NonNull PsiDirectory ps...
method createJavaFile (line 57) | public static PsiJavaFile createJavaFile(@NonNull Project project, @No...
method format (line 67) | public static void format(@NonNull Project project, @NonNull PsiElemen...
method findClass (line 77) | public static Optional<PsiClass> findClass(@NonNull Project project, @...
method findClass (line 81) | public static Optional<PsiClass> findClass(@NonNull Project project, @...
method getOrCreateSubDir (line 119) | public static PsiDirectory getOrCreateSubDir(@NonNull Project project,...
method getOrCreateSubDirByPath (line 130) | public static PsiDirectory getOrCreateSubDirByPath(@NonNull Project cu...
method getOrCreateSubVirtualFile (line 152) | public static VirtualFile getOrCreateSubVirtualFile(@NonNull VirtualFi...
method getOrCreateSubDir (line 173) | public static PsiDirectory getOrCreateSubDir(@NonNull Project project,...
method getOrCreateSubDir (line 184) | public static PsiDirectory getOrCreateSubDir(@NonNull PsiDirectory cur...
FILE: src/main/java/com/xyz/caofancpu/d8ger/util/JSONUtil.java
class JSONUtil (line 15) | public class JSONUtil {
method formatStandardJSON (line 17) | public static String formatStandardJSON(@NonNull String source) {
FILE: src/main/java/com/xyz/caofancpu/d8ger/util/PropertiesUtil.java
class PropertiesUtil (line 16) | public class PropertiesUtil {
method loadPropertiesFromRootResource (line 24) | public static Properties loadPropertiesFromRootResource(Project curren...
method checkConfigTakeEffect (line 51) | public static boolean checkConfigTakeEffect(Properties properties, Str...
method detectConfigDirectoryPath (line 70) | public static String detectConfigDirectoryPath(Properties properties, ...
method checkAndDetectConfigDirectoryPath (line 90) | public static String checkAndDetectConfigDirectoryPath(Properties prop...
FILE: src/main/java/com/xyz/caofancpu/d8ger/util/StringAlignUtil.java
class StringAlignUtil (line 25) | @Slf4j
method formatMySQL (line 53) | public static String formatMySQL(String sql) {
method handleSplitMultiLines (line 80) | public static List<String> handleSplitMultiLines(@NonNull String origi...
method formatSQLColumn (line 99) | public static String formatSQLColumn(@NonNull String originText, Align...
method formatEND (line 132) | public static String formatEND(@NonNull String originText, Alignment a...
method cleanUnderLineForSQLAliasName (line 247) | public static String cleanUnderLineForSQLAliasName(@NonNull String col...
method formatBySplitSymbol (line 266) | public static String formatBySplitSymbol(String originText, String spl...
method formatMultiLine (line 278) | public static String formatMultiLine(List<String> stringList, Alignmen...
method format (line 291) | public static String format(int singleLineMaxChars, Alignment currentA...
method formatSQLColumn (line 324) | public static List<String> formatSQLColumn(int singleLineMaxChars, Ali...
method pad (line 335) | public static void pad(StringBuilder to, int howMany) {
method splitInputText (line 348) | public static List<String> splitInputText(String text, int singleLineM...
method checkAlignmentParam (line 368) | public static void checkAlignmentParam(int singleLineMaxChars, Alignme...
method formatText (line 385) | public String formatText(String text, int singleLineMaxChars, Alignmen...
type Alignment (line 390) | public enum Alignment {
type Algorithm (line 397) | public enum Algorithm {
method Algorithm (line 403) | Algorithm(String value) {
type ENDOperate (line 408) | public enum ENDOperate {
method ENDOperate (line 425) | ENDOperate(String value) {
FILE: src/main/java/com/xyz/caofancpu/d8ger/util/VerbalExpressionUtil.java
class VerbalExpressionUtil (line 23) | public class VerbalExpressionUtil {
method camelUnderLineNameConverter (line 115) | public static String camelUnderLineNameConverter(@NonNull String origi...
method regexHandleSwaggerModelProperty (line 168) | public static String regexHandleSwaggerModelProperty(String originStri...
method extractMatchContent (line 180) | public static List<String> extractMatchContent(@NonNull String originC...
method buildRegex (line 196) | public static VerbalExpression buildRegex(String matchKeyWord) {
method extractComment (line 206) | public static String extractComment(String originComment) {
method executePatternRex (line 223) | public static String executePatternRex(VerbalExpression regexExpressio...
method executePatternRex (line 237) | public static StringBuilder executePatternRex(VerbalExpression regexEx...
method sqlUnderLineName (line 249) | public static String sqlUnderLineName(String originName) {
method cropMoSuffix (line 259) | public static String cropMoSuffix(@NonNull String originMoName) {
method correctUrl (line 271) | public static String correctUrl(String property) {
method convertPathToPackage (line 304) | public static String convertPathToPackage(String originPath) {
method convertPathToPackage2 (line 320) | public static String convertPathToPackage2(String originPath) {
method beautyNextLine (line 361) | public static String beautyNextLine(@NonNull String source) {
method cleanWhiteChar (line 375) | public static String cleanWhiteChar(@NonNull String source) {
method cleanJSONWhiteChar (line 389) | public static String cleanJSONWhiteChar(@NonNull String source) {
FILE: src/test/java/d8ger/D8T.java
class D8T (line 10) | public class D8T {
method hello (line 13) | @Test
Condensed preview — 86 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (631K chars).
[
{
"path": ".idea/$CACHE_FILE$",
"chars": 532,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"ProjectInspectionProfilesVisibleTreeStat"
},
{
"path": ".idea/.gitignore",
"chars": 156,
"preview": "# Default ignored files\n/workspace.xml\n# Project exclude paths\n/.\n/../../\n\n\n\n\n# Datasource local storage ignored files\n/"
},
{
"path": ".idea/D8gerAutoCodePluginProjectSetting.xml",
"chars": 1141,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"com.xyz.caofancpu.d8ger.setting.D8gerPro"
},
{
"path": ".idea/codeStyles/Project.xml",
"chars": 2037,
"preview": "<component name=\"ProjectCodeStyleConfiguration\">\n <code_scheme name=\"Project\" version=\"173\">\n <option name=\"LINE_SEP"
},
{
"path": ".idea/codeStyles/codeStyleConfig.xml",
"chars": 149,
"preview": "<component name=\"ProjectCodeStyleConfiguration\">\n <state>\n <option name=\"PREFERRED_PROJECT_CODE_STYLE\" value=\"Defaul"
},
{
"path": ".idea/compiler.xml",
"chars": 712,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"CompilerConfiguration\">\n <annotationP"
},
{
"path": ".idea/dataSources.xml",
"chars": 505,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"DataSourceManagerImpl\" format=\"xml\" mult"
},
{
"path": ".idea/dictionaries/D8GER.xml",
"chars": 143,
"preview": "<component name=\"ProjectDictionaryState\">\n <dictionary name=\"D8GER\">\n <words>\n <w>xtools</w>\n </words>\n </d"
},
{
"path": ".idea/dictionaries/ht_caofan.xml",
"chars": 281,
"preview": "<component name=\"ProjectDictionaryState\">\n <dictionary name=\"ht-caofan\">\n <words>\n <w>caofan</w>\n <w>caofa"
},
{
"path": ".idea/encodings.xml",
"chars": 238,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"Encoding\" native2AsciiForPropertiesFiles"
},
{
"path": ".idea/gradle.xml",
"chars": 880,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"GradleMigrationSettings\" migrationVersio"
},
{
"path": ".idea/inspectionProfiles/Project_Default.xml",
"chars": 5904,
"preview": "<component name=\"InspectionProjectProfileManager\">\n <profile version=\"1.0\">\n <option name=\"myName\" value=\"Project De"
},
{
"path": ".idea/jarRepositories.xml",
"chars": 2186,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"RemoteRepositoriesConfiguration\">\n <r"
},
{
"path": ".idea/libraries-with-intellij-classes.xml",
"chars": 2885,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"libraries-with-intellij-classes\">\n <o"
},
{
"path": ".idea/misc.xml",
"chars": 698,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"ASMPluginConfiguration\">\n <asm skipDe"
},
{
"path": ".idea/setting.xml",
"chars": 256,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"arthas.idea.plugin\">\n <option name=\"r"
},
{
"path": ".idea/uiDesigner.xml",
"chars": 8792,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"Palette2\">\n <group name=\"Swing\">\n "
},
{
"path": ".idea/vcs.xml",
"chars": 167,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"VcsDirectoryMappings\">\n <mapping dire"
},
{
"path": "IntelliJBestAction.adoc",
"chars": 8973,
"preview": "== IntelliJ IDEA最佳实践\n\n. Intellij IDEA for Java WEB 开发\n* 快捷键\n* 插件\n* 快速测试\n* Java工具包\n. Intellij IDEA for Scala 开发(ing)\n. In"
},
{
"path": "IntelliJBestAction.html",
"chars": 84732,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta content=\"IE=edge\" http-equiv=\"X-UA-Compatib"
},
{
"path": "LICENCE",
"chars": 10265,
"preview": "Apache License\nVersion 2.0, January 2019\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AN"
},
{
"path": "README.md",
"chars": 18179,
"preview": "# D8gerAutoCode\n\n<a href=\"https://github.com/caofanCPU/D8gerAutoCode\"><img alt=\"GitHub commit activity\" src=\"https://img"
},
{
"path": "README_CN.md",
"chars": 10831,
"preview": "# D8gerAutoCode\n\n<a href=\"https://github.com/caofanCPU/D8gerAutoCode\"><img alt=\"GitHub commit activity\" src=\"https://img"
},
{
"path": "build.gradle",
"chars": 2199,
"preview": "plugins {\n id 'java'\n id 'org.jetbrains.intellij' version '0.4.21'\n}\n\ngroup 'com.xyz.caofancpu'\nversion '4.1'\n\nsou"
},
{
"path": "doc/ComputerMathData.md",
"chars": 4460,
"preview": "# MarkDown 数学公式语法大全\n- 单行左对齐公式\n$\\sum_{i=0}^N\\int_{a}^{b}g(t,i)\\text{d}t$\n\n- 跨行居中公式\n$$\n\\sum_{i=0}^N\\int_{a}^{b}g(t,i)\\text"
},
{
"path": "doc/Math.adoc",
"chars": 1263,
"preview": "== Math\n- A\n\\begin{equation}\n\\left[\\begin{array}{cccccc}\n{a_{11}} & {a_{12}} & {\\cdots} & {a_{1 n}} \\\\\n{a_{21}} & {a_{22"
},
{
"path": "doc/WX-MarkDownTest.md",
"chars": 5007,
"preview": "# 示例文章:Google 搜索的即时自动补全功能究竟是如何“工作”的?\n> Google 搜索**自动补全功能**的强大,相信不少朋友都能感受到,它帮助我们更快地“补全”我们所要输入的搜索关键字。那么,它怎么知道我们要输入什么内容?它又是"
},
{
"path": "settings.gradle",
"chars": 36,
"preview": "rootProject.name = 'D8gerAutoCode'\n\n"
},
{
"path": "src/main/java/com/xyz/caofancpu/d8ger/WhoAmI.java",
"chars": 183,
"preview": "package com.xyz.caofancpu.d8ger;\n\n/**\n * Who You Are?\n */\npublic class WhoAmI {\n\n /**\n * ID\n */\n private L"
},
{
"path": "src/main/java/com/xyz/caofancpu/d8ger/action/D8gerAutoCodeAction.java",
"chars": 6858,
"preview": "package com.xyz.caofancpu.d8ger.action;\n\nimport com.intellij.notification.Notification;\nimport com.intellij.notification"
},
{
"path": "src/main/java/com/xyz/caofancpu/d8ger/action/SwaggerModelAutoRenderAction.java",
"chars": 3002,
"preview": "package com.xyz.caofancpu.d8ger.action;\n\nimport com.intellij.openapi.actionSystem.AnAction;\nimport com.intellij.openapi."
},
{
"path": "src/main/java/com/xyz/caofancpu/d8ger/activity/D8gerActivity.java",
"chars": 2181,
"preview": "package com.xyz.caofancpu.d8ger.activity;\n\nimport com.intellij.ide.plugins.IdeaPluginDescriptor;\nimport com.intellij.ide"
},
{
"path": "src/main/java/com/xyz/caofancpu/d8ger/core/AutoCodeTemplate.java",
"chars": 109671,
"preview": "package com.xyz.caofancpu.d8ger.core;\n\nimport com.xyz.caofancpu.d8ger.util.VerbalExpressionUtil;\nimport lombok.NonNull;\n"
},
{
"path": "src/main/java/com/xyz/caofancpu/d8ger/core/D8gerAutoCoding.java",
"chars": 31108,
"preview": "package com.xyz.caofancpu.d8ger.core;\n\nimport com.intellij.openapi.module.Module;\nimport com.intellij.openapi.project.Pr"
},
{
"path": "src/main/java/com/xyz/caofancpu/d8ger/core/EasterEggCodeTemplateEnum.java",
"chars": 866,
"preview": "package com.xyz.caofancpu.d8ger.core;\n\n/**\n * EasterEgg code template keyword enumeration\n *\n * @author caofanCPU\n */\npu"
},
{
"path": "src/main/java/com/xyz/caofancpu/d8ger/core/KeyEnum.java",
"chars": 1158,
"preview": "package com.xyz.caofancpu.d8ger.core;\n\n/**\n * Generate file enum\n *\n * @author caofanCPU\n */\npublic enum KeyEnum {\n M"
},
{
"path": "src/main/java/com/xyz/caofancpu/d8ger/core/MoField.java",
"chars": 25532,
"preview": "package com.xyz.caofancpu.d8ger.core;\n\nimport com.intellij.psi.PsiElement;\nimport com.intellij.psi.PsiField;\nimport com."
},
{
"path": "src/main/java/com/xyz/caofancpu/d8ger/core/ProjectEnvHandler.java",
"chars": 2507,
"preview": "package com.xyz.caofancpu.d8ger.core;\n\nimport com.intellij.openapi.actionSystem.AnActionEvent;\nimport com.intellij.opena"
},
{
"path": "src/main/java/com/xyz/caofancpu/d8ger/core/SupportFieldTypeEnum.java",
"chars": 2474,
"preview": "package com.xyz.caofancpu.d8ger.core;\n\nimport com.xyz.caofancpu.d8ger.util.CollectionUtil;\n\nimport java.util.Arrays;\nimp"
},
{
"path": "src/main/java/com/xyz/caofancpu/d8ger/core/TemplateKeyWordEnum.java",
"chars": 1728,
"preview": "package com.xyz.caofancpu.d8ger.core;\n\n/**\n * Template keyword enum\n *\n * @author caofanCPU\n */\npublic enum TemplateKeyW"
},
{
"path": "src/main/java/com/xyz/caofancpu/d8ger/setting/D8gerApplicationState.java",
"chars": 1396,
"preview": "package com.xyz.caofancpu.d8ger.setting;\n\nimport com.intellij.openapi.components.PersistentStateComponent;\nimport com.in"
},
{
"path": "src/main/java/com/xyz/caofancpu/d8ger/setting/D8gerProjectState.java",
"chars": 2298,
"preview": "package com.xyz.caofancpu.d8ger.setting;\n\nimport com.intellij.openapi.components.PersistentStateComponent;\nimport com.in"
},
{
"path": "src/main/java/com/xyz/caofancpu/d8ger/setting/D8gerSetting.form",
"chars": 12944,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<form xmlns=\"http://www.intellij.com/uidesigner/form/\" version=\"1\" bind-to-class="
},
{
"path": "src/main/java/com/xyz/caofancpu/d8ger/setting/D8gerSetting.java",
"chars": 9484,
"preview": "package com.xyz.caofancpu.d8ger.setting;\n\nimport com.intellij.ide.BrowserUtil;\nimport com.intellij.openapi.fileChooser.F"
},
{
"path": "src/main/java/com/xyz/caofancpu/d8ger/setting/D8gerSettingsConfigurable.java",
"chars": 7001,
"preview": "package com.xyz.caofancpu.d8ger.setting;\n\nimport com.intellij.openapi.diagnostic.Logger;\nimport com.intellij.openapi.opt"
},
{
"path": "src/main/java/com/xyz/caofancpu/d8ger/util/CollectionUtil.java",
"chars": 32352,
"preview": "package com.xyz.caofancpu.d8ger.util;\n\n\nimport com.google.common.collect.Lists;\nimport lombok.NonNull;\nimport org.apache"
},
{
"path": "src/main/java/com/xyz/caofancpu/d8ger/util/ConstantUtil.java",
"chars": 7013,
"preview": "package com.xyz.caofancpu.d8ger.util;\n\nimport org.apache.commons.lang3.StringUtils;\nimport org.apache.commons.lang3.tupl"
},
{
"path": "src/main/java/com/xyz/caofancpu/d8ger/util/DateUtil.java",
"chars": 4231,
"preview": "/*\n * Copyright 2016-2020 the original author\n *\n * @D8GER(https://github.com/caofanCPU).\n *\n * Licensed under the Apach"
},
{
"path": "src/main/java/com/xyz/caofancpu/d8ger/util/IdeaPlatformFileTreeUtil.java",
"chars": 6922,
"preview": "package com.xyz.caofancpu.d8ger.util;\n\nimport com.intellij.ide.highlighter.JavaFileType;\nimport com.intellij.openapi.pro"
},
{
"path": "src/main/java/com/xyz/caofancpu/d8ger/util/JSONUtil.java",
"chars": 748,
"preview": "package com.xyz.caofancpu.d8ger.util;\n\nimport com.google.gson.Gson;\nimport com.google.gson.GsonBuilder;\nimport com.googl"
},
{
"path": "src/main/java/com/xyz/caofancpu/d8ger/util/PropertiesUtil.java",
"chars": 4688,
"preview": "package com.xyz.caofancpu.d8ger.util;\n\nimport com.intellij.openapi.diagnostic.Logger;\nimport com.intellij.openapi.projec"
},
{
"path": "src/main/java/com/xyz/caofancpu/d8ger/util/StringAlignUtil.java",
"chars": 16047,
"preview": "package com.xyz.caofancpu.d8ger.util;\n\nimport com.alibaba.druid.sql.SQLUtils;\nimport com.alibaba.druid.sql.ast.SQLStatem"
},
{
"path": "src/main/java/com/xyz/caofancpu/d8ger/util/VerbalExpressionUtil.java",
"chars": 14437,
"preview": "package com.xyz.caofancpu.d8ger.util;\n\nimport lombok.NonNull;\nimport org.apache.commons.lang3.StringUtils;\nimport ru.lan"
},
{
"path": "src/main/resources/META-INF/plugin.xml",
"chars": 15055,
"preview": "<idea-plugin>\n <id>com.xyz.caofancpu.D8gerAutoCode</id>\n <name>D8gerAutoCode</name>\n <vendor email=\"xyb5to0ZCY@"
},
{
"path": "src/main/resources/icons/Icon",
"chars": 1212,
"preview": "[阿里icon](https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=991968)\n\n[图片压缩](https://tinypng.com/)\n\n0."
},
{
"path": "src/main/resources/template/.zshrc",
"chars": 10651,
"preview": "export ZSH=\"$HOME/.oh-my-zsh\"\nexport HOMEBREW_NO_AUTO_UPDATE=true\n\nZSH_THEME=\"powerlevel9k/powerlevel9k\"\nPOWERLEVEL9K_MO"
},
{
"path": "src/main/resources/template/ControllerTemplate.txt",
"chars": 4861,
"preview": "package @controllerPackage@;\n\nimport @handlerPackage@.@MoName@Handler;\nimport @moPackage@.@MoName@Mo;\nimport @swaggerMoP"
},
{
"path": "src/main/resources/template/DeletedServiceInterfaceTemplate.txt",
"chars": 1187,
"preview": "package @serviceInterfacePackage@;\n\nimport @moPackage@.@MoName@Mo;\nimport java.util.List;\n\n/**\n * @MoName@Mo对应的Service接口"
},
{
"path": "src/main/resources/template/EN/ControllerTemplate.txt",
"chars": 5005,
"preview": "package @controllerPackage@;\n\nimport @handlerPackage@.@MoName@Handler;\nimport @moPackage@.@MoName@Mo;\nimport @swaggerMoP"
},
{
"path": "src/main/resources/template/EN/D8GER.txt",
"chars": 1612,
"preview": "# The default author called 'D8ger', but it's highly recommended to modify\nauthor=D8ger\n\n#### Basic generate, support tw"
},
{
"path": "src/main/resources/template/EN/DeletedServiceInterfaceTemplate.txt",
"chars": 1377,
"preview": "package @serviceInterfacePackage@;\n\nimport @moPackage@.@MoName@Mo;\nimport java.util.List;\n\n/**\n * @MoName@MoService Inte"
},
{
"path": "src/main/resources/template/EN/ExampleTemplate.txt",
"chars": 5597,
"preview": "package @moExamplePackage@;\n\nimport java.math.BigDecimal;\nimport java.time.LocalDateTime;\nimport java.util.ArrayList;\nim"
},
{
"path": "src/main/resources/template/EN/HandlerTemplate.txt",
"chars": 2872,
"preview": "package @handlerPackage@;\n\nimport @mapperPackage@.@MoName@Mapper;\nimport @moPackage@.@MoName@Mo;\nimport com.github.pageh"
},
{
"path": "src/main/resources/template/EN/MapperTemplate.txt",
"chars": 3263,
"preview": "package @mapperPackage@;\n\nimport @moExamplePackage@.@MoName@Example;\nimport @moPackage@.@MoName@Mo;\nimport org.apache.ib"
},
{
"path": "src/main/resources/template/EN/MapperXMLTemplate.txt",
"chars": 7844,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org/"
},
{
"path": "src/main/resources/template/EN/MoTemplate.txt",
"chars": 387,
"preview": "package @moPackage@;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Data;\nimport lombok.NoArgsConstructor;\nimport lomb"
},
{
"path": "src/main/resources/template/EN/SQLTemplate.txt",
"chars": 289,
"preview": "\n-- ----------------------------\n-- D8ger-Sql-Auto-Generated\n-- Table structure for `@mo_table_name@`\n-- @author @d8Auth"
},
{
"path": "src/main/resources/template/EN/SwaggerMoTemplate.txt",
"chars": 526,
"preview": "package @swaggerMoPackage@;\n\nimport io.swagger.annotations.ApiModel;\nimport io.swagger.annotations.ApiModelProperty;\nimp"
},
{
"path": "src/main/resources/template/END.txt",
"chars": 1329,
"preview": "=========================================END=========================================\nNote: 1.D8ger-ALIGN(included by ch"
},
{
"path": "src/main/resources/template/ExampleTemplate.txt",
"chars": 5575,
"preview": "package @moExamplePackage@;\n\nimport java.math.BigDecimal;\nimport java.time.LocalDateTime;\nimport java.util.ArrayList;\nim"
},
{
"path": "src/main/resources/template/HandlerTemplate.txt",
"chars": 2622,
"preview": "package @handlerPackage@;\n\nimport @mapperPackage@.@MoName@Mapper;\nimport @moPackage@.@MoName@Mo;\nimport com.github.pageh"
},
{
"path": "src/main/resources/template/MapperTemplate.txt",
"chars": 2680,
"preview": "package @mapperPackage@;\n\nimport @moExamplePackage@.@MoName@Example;\nimport @moPackage@.@MoName@Mo;\nimport org.apache.ib"
},
{
"path": "src/main/resources/template/MapperXMLTemplate.txt",
"chars": 7463,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org/"
},
{
"path": "src/main/resources/template/MoTemplate.txt",
"chars": 387,
"preview": "package @moPackage@;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Data;\nimport lombok.NoArgsConstructor;\nimport lomb"
},
{
"path": "src/main/resources/template/NASA.txt",
"chars": 1339,
"preview": "=========================================NASA=========================================\nNote: 1.D8ger-ALIGN(included by c"
},
{
"path": "src/main/resources/template/PLAN.txt",
"chars": 470,
"preview": "- Redis\n 1.Redis常用数据结构: 理论+实践\n 2.Redis锁: 理论+实践\n 3.Redis缓存、队列、雪崩、击穿、热点、布隆过滤器, LRU, 单线程IO多路复用, 了解\n- RocketMQ\n "
},
{
"path": "src/main/resources/template/Regex.txt",
"chars": 2428,
"preview": "0.About details, please refer https://github.com/caofanCPU/JavaVerbalExpressions\nUsage, static pattern can improve perfo"
},
{
"path": "src/main/resources/template/SQLTemplate.txt",
"chars": 290,
"preview": "\n-- ----------------------------\n-- D8ger-Sql-Auto-Generated\n-- Table structure for `@mo_table_name@`\n-- @author @d8Auth"
},
{
"path": "src/main/resources/template/SwaggerMoTemplate.txt",
"chars": 518,
"preview": "package @swaggerMoPackage@;\n\nimport io.swagger.annotations.ApiModel;\nimport io.swagger.annotations.ApiModelProperty;\nimp"
},
{
"path": "src/main/resources/template/caofan.txt",
"chars": 598,
"preview": "==== iTerm2快捷键 ====\n\n# 高亮光标位置\ncmd + /\n# 窗口弹出历史命令\ncmd + sft + h\n# 删除当前行\n^ + u\n# 跳到行首\n^ + a\n# 跳到行尾\n^ + e\n# 删除光标所在字符(向后删除)\n"
},
{
"path": "src/main/resources/template/d8ger-util-list.txt",
"chars": 699,
"preview": "🌟 autojump\n🌟 dart\n🌟 ffmpeg\n🌟 gource\n🌟 gradle\n🌟 httpie\n🌟 keystone\n🌟 lrzsz\n🌟 openssl\n🌟 python@3.8\n🌟 rename\n🌟 sshpass\n🌟 the"
},
{
"path": "src/main/resources/template/javaShorts.txt",
"chars": 827,
"preview": "/apim : SwaggerModel字段属性模板\n\noin : 对象为null ==> Objects.isNull()\nonn : 对象不为null ==> Objects.nonNull()\no2e "
},
{
"path": "src/main/resources/template/normal.command",
"chars": 574,
"preview": "# mvn编译检查详细未检查异常信息\nmcf compile -Xlint:unchecked\n\nhttp --verify=no -v -f POST https://1.d8ger.com/uploadFile param1:=1 fi"
},
{
"path": "src/main/resources/template/ohmyd8ger.command",
"chars": 943,
"preview": "alias searchPID='searchPID'\nalias killPID='killPID'\nalias searchPortOccupy='searchPortOccupy'\nalias https-downLoadRespon"
},
{
"path": "src/test/java/d8ger/D8T.java",
"chars": 203,
"preview": "package d8ger;\n\nimport org.junit.Test;\n\n/**\n * This is a Test Demo showing how to execute a test case by junit.\n *\n * @a"
},
{
"path": "src/test/resources/MyJSON.txt",
"chars": 0,
"preview": ""
}
]
About this extraction
This page contains the full source code of the caofanCPU/D8gerAutoCode GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 86 files (557.7 KB), approximately 151.6k tokens, and a symbol index with 257 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.