MyBatipse 项目教程
1. 项目的目录结构及介绍
MyBatipse 是一个为 MyBatis SQL Mapper 框架提供支持的 Eclipse 插件。以下是项目的目录结构及其介绍:
mybatipse/
├── mybatipse-feature/
│ ├── feature.xml
│ └── ...
├── mybatipse/
│ ├── META-INF/
│ │ └── MANIFEST.MF
│ ├── src/
│ │ └── ...
│ └── ...
├── screen/
│ └── ...
├── .gitattributes
├── .gitignore
├── LICENSE.md
├── README.md
└── ...
mybatipse-feature/: 包含插件的特性描述文件feature.xml和其他相关文件。mybatipse/: 插件的主要代码和资源文件,包括META-INF/目录下的MANIFEST.MF文件,以及src/目录下的源代码。screen/: 包含插件的截图和其他视觉资源。.gitattributes和.gitignore: Git 版本控制的相关配置文件。LICENSE.md: 项目的许可证文件。README.md: 项目的说明文档。
2. 项目的启动文件介绍
MyBatipse 插件的启动文件主要是 META-INF/MANIFEST.MF 文件,它定义了插件的元数据和依赖关系。以下是该文件的部分内容:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: MyBatipse
Bundle-SymbolicName: net.harawata.mybatis;singleton:=true
Bundle-Version: 1.2.3
Bundle-Vendor: harawata
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.jdt.core,
org.eclipse.wst.xml.core
...
Manifest-Version: 清单文件的版本。Bundle-ManifestVersion: 插件清单的版本。Bundle-Name: 插件的名称。Bundle-SymbolicName: 插件的唯一标识符。Bundle-Version: 插件的版本号。Bundle-Vendor: 插件的提供者。Require-Bundle: 插件依赖的其他插件。
3. 项目的配置文件介绍
MyBatipse 插件的配置文件主要包括 feature.xml 和 plugin.xml。
feature.xml
feature.xml 文件位于 mybatipse-feature/ 目录下,定义了插件特性的详细信息,包括版本、提供者、包含的插件等。
<feature
id="net.harawata.mybatis.feature"
label="MyBatipse Feature"
version="1.2.3"
provider-name="harawata">
<plugin
id="net.harawata.mybatis"
download-size="0"
install-size="0"
version="1.2.3"
unpack="false"/>
</feature>
id: 特性的唯一标识符。label: 特性的显示名称。version: 特性的版本号。provider-name: 特性的提供者。plugin: 特性包含的插件信息。
plugin.xml
plugin.xml 文件位于 mybatipse/ 目录下,定义了插件的扩展点和扩展,以及插件的详细配置。
<plugin
id="net.harawata.mybatis"
name="MyBatipse"
version="1.2.3"
provider-name="harawata">
<extension
point="org.eclipse.ui.editors">
<editor
id="net.harawata.mybatis.editor"
name="MyBatis Editor"
class="net.harawata.mybatis.editor.MyBatisEditor"
extensions="xml"
icon="icons/mybatis.png"
contributorClass="net.harawata.mybatis.editor.MyBatisEditorContributor"/>
</
创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考



