Eclipse/プラグイン開発のTIPS集/イントロ(概要画面)を作る
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
// 下階層用テンプレート
#topicpath
----
//ここにコンテンツを記述します。
イントロ画面(概要画面)とは、Eclipseを初めて起動したときに...
#ref(basicIntro.png)
#contents
***拡張ポイント [#sabf0d4e]
org.eclipse.ui.intro
後のorg.eclipse.ui.intro.config.CustomizableIntroPartなど...
を追加してください。
***plugin.xmlのサンプル [#k2f912f9]
<extension point="org.eclipse.ui.intro">
<intro class="nu.mine.kino.plugin.samples.rcp.SampleInt...
icon="icons/sample.gif"
id="nu.mine.kino.plugin.samples.rcp.intro1"/> <-イ...
<introProductBinding
introId="nu.mine.kino.plugin.samples.rcp.intro1" <-...
productId="nu.mine.kino.plugin.samples.rcp.product"...
</extension>
拡張ポイントに対応するJavaのインタフェースは
org.eclipse.ui.intro.IIntroPart
ですがEclipseが
org.eclipse.ui.part.IntroPart : 自分でウィジェットを置い...
org.eclipse.ui.intro.config.CustomizableIntroPart : コン...
などを提供してくれています。
**やってみる [#cda82d81]
***例1 [#i684f795]
-plugin.xml
<extension point="org.eclipse.ui.intro">
<intro class="org.eclipse.ui.intro.config.CustomizableI...
icon="icons/sample.gif" ↑コンテンツxhtmlを使う
id="nu.mine.kino.plugin.samples.rcp.intro1"/>
<introProductBinding ↓イントロのID
introId="nu.mine.kino.plugin.samples.rcp.intro1"
productId="nu.mine.kino.plugin.samples.rcp.product"/>
</extension> ↑ このRCPプロダクトIDに適用する
<extension point="org.eclipse.ui.intro.config">
<config content="introContent.xml"
id="template01" <- configのID ↓さっきのイントロのID
introId="nu.mine.kino.plugin.samples.rcp.intro1">
<presentation home-page-id="root" >
<implementation kind="html"/>
</presentation>
</config>
</extension>
ここまでで、nu.mine.kino.plugin.samples.rcp.productという...
というわけで、引き続きintroContent.xmlです。
-introContent.xml
<?xml version="1.0" encoding="utf-8" ?>
<introContent>
<page id="root" content="content/root.xhtml"/> <-id="r...
<page id="concept1" content="content/concept1.xhtml"/>
<page id="concept2" content="content/concept2.xhtml"/>
</introContent>
このid="root"のpage要素の記述で、イントロのトップページは...
引き続きcontent/root.xhtmlです。
-content/root.xhtml
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitiona...
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.d...
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; ch...
<title>root.xhtml</title>
<link rel="stylesheet" href="root.css" type="text/css"...
</head>
<body>
<h1>Welcome to Product A</h1>
<h4 id="firstH4">
<img border="0" src="welcome_item.gif" alt="Concept1...
<a href="http://org.eclipse.ui.intro/showPage?id=con...
</a> ↑ root.xhtmlで定義した別のページIDに遷移で...
</h4>
<h4>
<img border="0" src="welcome_item.gif" alt="Concept2...
<a href="http://org.eclipse.ui.intro/showPage?id=con...
</h4>
<anchor id="anchor1" /> <-アンカー。ここにコンテンツを...
</body>
</html>
ここまでで、ようやくroot.xhtmlがプロダクト概要として画面...
#ref(phase1.png)
***例2 [#y4f11f14]
既存のイントロに、拡張ポイントを使ってコンテンツを追加す...
-plugin.xmlに追加
<extension point="org.eclipse.ui.intro.configExtension">
<configExtension configId="template01" content="ext.x...
</extension> ↑拡張したいイントロのconfigを指定。さ...
ext.xml は追加したい「定義」?
この拡張ポイントで、さっきのconfigのIDにext.xmlというコン...
-ext.xml
<?xml version="1.0" encoding="utf-8" ?>
<introContent> ↓追加したいxhtmlコンテン...
<extensionContent content="content/extContent.xhtml" p...
<page id="concept3" content="content/concept3.xhtml"/>...
↑新たに、concept3というページIDを定義
</introContent>
まだなんか理解できていないですがpath="root/anchor1"のタグ...
-extContent.xhtml
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitiona...
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.d...
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; ch...
<title>root.xhtml</title>
<link rel="stylesheet" href="root.css" type="text/css"...
</head>
<body>
<h4>
<img border="0" src="welcome_item.gif" alt="Concept3...
<a href="http://org.eclipse.ui.intro/showPage?id=con...
</h4>
</body>
</html>
これでこのextContent.xhtmlの内容が、既存のイントロxhtml(r...
#ref(phase2.png)
これってxhtmlがxmlだからこんな芸当ができるんですよねぇ。...
**TIPS [#zea0f041]
***イントロ画面を再表示する [#maf8a135]
消したイントロ画面を再表示するには
IWorkbench.getIntroManager()
.showIntro(IWorkbenchWindow preferredWindow,boolean st...
をよべばよい。boolean standbyは、[[IIntroManagerのJavaDoc...
ちなみに、ActionFactoryから取得できる org.eclipse.ui.inte...
workbenchWindow.getWorkbench().getIntroManager().showInt...
workbenchWindow, false);
となってましたね。
**関連リンク [#y167af3a]
-[[とりあえずメモ:http://www.jsurfer.de/modules.php?name=...
-[[とりあえずメモ:http://www.eclipse.org/eclipse/platform...
Eclipseのヘルプを「概要部分の定義」で検索してヒットするペ...
----
この記事は
#vote(おもしろかった[7],そうでもない[1])
#comment
#topicpath
SIZE(10){現在のアクセス:&counter;}
終了行:
// 下階層用テンプレート
#topicpath
----
//ここにコンテンツを記述します。
イントロ画面(概要画面)とは、Eclipseを初めて起動したときに...
#ref(basicIntro.png)
#contents
***拡張ポイント [#sabf0d4e]
org.eclipse.ui.intro
後のorg.eclipse.ui.intro.config.CustomizableIntroPartなど...
を追加してください。
***plugin.xmlのサンプル [#k2f912f9]
<extension point="org.eclipse.ui.intro">
<intro class="nu.mine.kino.plugin.samples.rcp.SampleInt...
icon="icons/sample.gif"
id="nu.mine.kino.plugin.samples.rcp.intro1"/> <-イ...
<introProductBinding
introId="nu.mine.kino.plugin.samples.rcp.intro1" <-...
productId="nu.mine.kino.plugin.samples.rcp.product"...
</extension>
拡張ポイントに対応するJavaのインタフェースは
org.eclipse.ui.intro.IIntroPart
ですがEclipseが
org.eclipse.ui.part.IntroPart : 自分でウィジェットを置い...
org.eclipse.ui.intro.config.CustomizableIntroPart : コン...
などを提供してくれています。
**やってみる [#cda82d81]
***例1 [#i684f795]
-plugin.xml
<extension point="org.eclipse.ui.intro">
<intro class="org.eclipse.ui.intro.config.CustomizableI...
icon="icons/sample.gif" ↑コンテンツxhtmlを使う
id="nu.mine.kino.plugin.samples.rcp.intro1"/>
<introProductBinding ↓イントロのID
introId="nu.mine.kino.plugin.samples.rcp.intro1"
productId="nu.mine.kino.plugin.samples.rcp.product"/>
</extension> ↑ このRCPプロダクトIDに適用する
<extension point="org.eclipse.ui.intro.config">
<config content="introContent.xml"
id="template01" <- configのID ↓さっきのイントロのID
introId="nu.mine.kino.plugin.samples.rcp.intro1">
<presentation home-page-id="root" >
<implementation kind="html"/>
</presentation>
</config>
</extension>
ここまでで、nu.mine.kino.plugin.samples.rcp.productという...
というわけで、引き続きintroContent.xmlです。
-introContent.xml
<?xml version="1.0" encoding="utf-8" ?>
<introContent>
<page id="root" content="content/root.xhtml"/> <-id="r...
<page id="concept1" content="content/concept1.xhtml"/>
<page id="concept2" content="content/concept2.xhtml"/>
</introContent>
このid="root"のpage要素の記述で、イントロのトップページは...
引き続きcontent/root.xhtmlです。
-content/root.xhtml
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitiona...
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.d...
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; ch...
<title>root.xhtml</title>
<link rel="stylesheet" href="root.css" type="text/css"...
</head>
<body>
<h1>Welcome to Product A</h1>
<h4 id="firstH4">
<img border="0" src="welcome_item.gif" alt="Concept1...
<a href="http://org.eclipse.ui.intro/showPage?id=con...
</a> ↑ root.xhtmlで定義した別のページIDに遷移で...
</h4>
<h4>
<img border="0" src="welcome_item.gif" alt="Concept2...
<a href="http://org.eclipse.ui.intro/showPage?id=con...
</h4>
<anchor id="anchor1" /> <-アンカー。ここにコンテンツを...
</body>
</html>
ここまでで、ようやくroot.xhtmlがプロダクト概要として画面...
#ref(phase1.png)
***例2 [#y4f11f14]
既存のイントロに、拡張ポイントを使ってコンテンツを追加す...
-plugin.xmlに追加
<extension point="org.eclipse.ui.intro.configExtension">
<configExtension configId="template01" content="ext.x...
</extension> ↑拡張したいイントロのconfigを指定。さ...
ext.xml は追加したい「定義」?
この拡張ポイントで、さっきのconfigのIDにext.xmlというコン...
-ext.xml
<?xml version="1.0" encoding="utf-8" ?>
<introContent> ↓追加したいxhtmlコンテン...
<extensionContent content="content/extContent.xhtml" p...
<page id="concept3" content="content/concept3.xhtml"/>...
↑新たに、concept3というページIDを定義
</introContent>
まだなんか理解できていないですがpath="root/anchor1"のタグ...
-extContent.xhtml
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitiona...
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.d...
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; ch...
<title>root.xhtml</title>
<link rel="stylesheet" href="root.css" type="text/css"...
</head>
<body>
<h4>
<img border="0" src="welcome_item.gif" alt="Concept3...
<a href="http://org.eclipse.ui.intro/showPage?id=con...
</h4>
</body>
</html>
これでこのextContent.xhtmlの内容が、既存のイントロxhtml(r...
#ref(phase2.png)
これってxhtmlがxmlだからこんな芸当ができるんですよねぇ。...
**TIPS [#zea0f041]
***イントロ画面を再表示する [#maf8a135]
消したイントロ画面を再表示するには
IWorkbench.getIntroManager()
.showIntro(IWorkbenchWindow preferredWindow,boolean st...
をよべばよい。boolean standbyは、[[IIntroManagerのJavaDoc...
ちなみに、ActionFactoryから取得できる org.eclipse.ui.inte...
workbenchWindow.getWorkbench().getIntroManager().showInt...
workbenchWindow, false);
となってましたね。
**関連リンク [#y167af3a]
-[[とりあえずメモ:http://www.jsurfer.de/modules.php?name=...
-[[とりあえずメモ:http://www.eclipse.org/eclipse/platform...
Eclipseのヘルプを「概要部分の定義」で検索してヒットするペ...
----
この記事は
#vote(おもしろかった[7],そうでもない[1])
#comment
#topicpath
SIZE(10){現在のアクセス:&counter;}
ページ名: