Skip to content

Instantly share code, notes, and snippets.

@ashigeru
Created July 30, 2010 20:47
Show Gist options
  • Save ashigeru/501292 to your computer and use it in GitHub Desktop.
Save ashigeru/501292 to your computer and use it in GitHub Desktop.
Eclipseのコンパイラに介入する手順
=== プロジェクト作成 ===
== プラグインプロジェクトの新規作成 ==
* Activator不要
* UI不要
* テンプレート不要
== ビルド設定 ==
MANIFEST.MF > build.propertiesタブ
* http://gist.github.com/501171
== 依存プラグインの設定 ==
MANIFEST.MF > dependenciesタブ
* org.eclipse.core.runtime
* org.eclipse.core.resources
* org.eclipse.jdt.core
=== 検証プログラムの配置 ===
* http://gist.github.com/501282
* MyProblem.MARKER_ID を利用するマーカーIDに変更する
* パッケージやプログラム名を変更する
=== 拡張ポイントの設定 ===
== マーカーの作成 ==
MANIFEST.MF > Extensions
* point: org.eclipse.core.resources.markers
* id: (マーカーID)
* persistent: true
* super: org.eclipse.core.resources.textmarker
* super: org.eclipse.core.resources.problemmarker
== コンパイルフェーズへの参加 ==
MANIFEST.MF > Extensions
* point: org.eclipse.jdt.core.compilationParticipant
* class: (CompilationParticipant)
* id: (任意)
* modifiesEnvironment: false
* createsProblems: true
* managedMarker: (マーカーID)
=== 動作の確認 ===
Run > Debug Configurations
* Eclipse Application > New
* Name: ahack5
* ${workspace_loc}/../runtime-ahack5
=== プラグインの作成 ===
MANIFEST.MF > Overview
* Exporting > Export Wizard
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
id="com.ashigeru.example.javaex.problem"
name="marblejenka problem"
point="org.eclipse.core.resources.markers">
<persistent
value="true">
</persistent>
<super
type="org.eclipse.core.resources.textmarker">
</super>
<super
type="org.eclipse.core.resources.problemmarker">
</super>
</extension>
<extension
point="org.eclipse.jdt.core.compilationParticipant">
<compilationParticipant
class="com.ashigeru.example.javaex.core.MyCompilationParticipant"
createsProblems="true"
id="com.ashigeru.tools.ahack6.compilationParticipant1"
modifiesEnvironment="false">
<managedMarker
markerType="com.ashigeru.example.javaex.problem">
</managedMarker>
</compilationParticipant>
</extension>
</plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment