Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
freem
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Openai/691151cc-3da4-800f-9b7c-81b0e0d10369
(section)
Add languages
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Assistant: いいですね。では、まず Eclipse PDE(Plug-in Development Environment) を使って「AI補完プラグインプロジェクト」を作る手順を、初めてでも確実に進められるように段階的に説明します。 === いいですね。では、まず Eclipse PDE(Plug-in Development Environment) を使って「AI補完プラグインプロジェクト」を作る手順を、初めてでも確実に進められるように段階的に説明します。 ==== ### ==== プラグイン開発を行うには、「Eclipse IDE for RCP and RAP Developers」 を使う必要があります。 (通常の「Eclipse IDE for Java Developers」ではPDEが入っていません。) もしまだインストールしていない場合: * 公式サイト:https://www.eclipse.org/downloads/packages/ * 「Eclipse IDE for RCP and RAP Developers」を選択し、インストール。 ==== ### ==== * 好きな開発用フォルダを選んで開始します。 ===== 1. メニューで [File] → [New] → [Project...] を選択。 ===== # 検索バーに「Plug-in」と入力。 # 「Plug-in Project」 を選択 → [Next]。 ===== | | | ===== | --- | --- | | | | | | | | | | | | | → [Next] ===== | | | ===== | --- | --- | | | | | | | | | | | | | | | | ☑ 「Generate an activator」 にチェックを入れる(PluginActivator が生成されます)。 ☑ 「This plug-in will make contributions to the UI」にもチェックを入れる(UI連携を有効化)。 → [Next] ===== Eclipseでは「どんな種類のプラグインを作るか」のテンプレートを選べます。 ===== ここでは最初は空のテンプレートがよいです: * 「No template」 を選択(最小構成で自作しやすい)。 → [Finish] ===== 作成後、Package Explorerに以下のような構造ができます: ===== <syntaxhighlight>com.example.aiassist/ ├─ META-INF/ │ └─ MANIFEST.MF ├─ build.properties ├─ plugin.xml └─ src/ └─ com/example/aiassist/Activator.java </syntaxhighlight> ✅ plugin.xml がEclipseプラグインの中心。 ✅ MANIFEST.MF は依存関係を記述。 ✅ Activator.java はプラグインのライフサイクル管理クラス。 ==== プラグインを試すには、Eclipseを「もう1つのEclipse」として起動します。 ==== # Package Explorerでプロジェクトを選択。 # メニューから [Run] → [Run Configurations...] を開く。 # 左のツリーで「Eclipse Application」を右クリック → 「New Configuration」。 # Nameを AIPlugin Test などに設定。 # [Run] ボタンを押す。 新しい Eclipse インスタンスが立ち上がります。 これは「開発中プラグインを組み込んだテスト用Eclipse」です。 以降の開発では、この「もう1つのEclipse」で動作確認を行います。 ==== | | | ==== | --- | --- | | | | | | | | | | ==== 次に行うのは、<code>plugin.xml</code> に「ショートカットキー+コマンド+ハンドラ」を定義することです。 ==== つまり、ショートカットを押したらJavaコードが呼ばれる仕組みを作ります。 もし希望があれば次に進む前に: * Eclipseのバージョン(例:2024-09など) * Javaバージョン を教えてもらえれば、それに合わせた正確なテンプレート設定例も出せます。 進めますか?
Summary:
Please note that all contributions to freem are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 (see
Freem:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)