子非魚(yú)
BlogJava
首頁(yè)
新隨筆
聯(lián)系
聚合
管理
21 Posts :: 0 Stories :: 1 Comments :: 0 Trackbacks
常用鏈接
我的隨筆
我的評(píng)論
我的參與
最新評(píng)論
留言簿
(1)
給我留言
查看公開(kāi)留言
查看私人留言
隨筆分類(lèi)
eclipse(9)
INVEST(1)
JAVA(9)
OTHER(2)
隨筆檔案
2011年9月 (1)
2009年3月 (4)
2008年10月 (1)
2008年4月 (1)
2008年2月 (1)
2008年1月 (1)
2007年10月 (2)
2007年8月 (5)
2007年7月 (5)
搜索
最新評(píng)論
1.?re: eclipse.ini內(nèi)存設(shè)置各參數(shù)含義(轉(zhuǎn))
內(nèi)容詳細(xì),詳盡深入
--Hua Hero
閱讀排行榜
1.?java.lang.OutOfMemoryError: PermGen space及其解決方法(轉(zhuǎn))(22672)
2.?Eclipse奇技淫巧(3216)
3.?模態(tài)窗口(1319)
4.?Eclipse 快捷鍵定制(轉(zhuǎn))(1258)
5.?actionSet 和 perspective、view、editor等關(guān)聯(lián)(946)
評(píng)論排行榜
1.?eclipse.ini內(nèi)存設(shè)置各參數(shù)含義(轉(zhuǎn))(1)
2.?java.lang.OutOfMemoryError: PermGen space及其解決方法(轉(zhuǎn))(0)
3.?深入研究java對(duì)String字符串對(duì)象的創(chuàng)建以及管理(轉(zhuǎn))(0)
4.?Eclipse 快捷鍵定制(轉(zhuǎn))(0)
5.?待整理的東東(0)
2008年10月6日
#
jboss server view找不到
eclipse瘦身后發(fā)現(xiàn)jboss server view找不到
原因: org.jboss.ide.eclipse.as.feature中定義:
<requires>
...
<import plugin="org.eclipse.wst.server.ui.doc.user"/>
...
</requires>
該doc插件包在瘦身時(shí)被干掉了,導(dǎo)致jbossideplugin未正常加載,恢復(fù)該包即可
posted @
2011-09-15 18:40
子非魚(yú) 閱讀(287) |
評(píng)論 (0)
|
編輯
收藏
我的開(kāi)發(fā)工具箱
摘要:
閱讀全文
posted @
2009-03-29 13:27
子非魚(yú)|
編輯
收藏
eclipse.ini內(nèi)存設(shè)置各參數(shù)含義(轉(zhuǎn))
摘要:
閱讀全文
posted @
2009-03-28 11:54
子非魚(yú) 閱讀(908) |
評(píng)論 (1)
|
編輯
收藏
java.lang.OutOfMemoryError: PermGen space及其解決方法(轉(zhuǎn))
摘要: 內(nèi)存溢出與JVM參數(shù)設(shè)置
閱讀全文
posted @
2009-03-28 10:09
子非魚(yú)|
編輯
收藏
深入研究java對(duì)String字符串對(duì)象的創(chuàng)建以及管理(轉(zhuǎn))
摘要: 轉(zhuǎn)自 http://topic.csdn.net/u/20080929/02/4e0ef626-98ee-4d6d-96ed-fe40afe8290b.html
閱讀全文
posted @
2009-03-28 09:18
子非魚(yú)|
編輯
收藏
Eclipse 快捷鍵定制(轉(zhuǎn))
轉(zhuǎn)自:http://lemon.javaeye.com/blog/51480
http://www.aygfsteel.com/fhawk/archive/2007/01/16/28993.html
利用IKeyBindingService接口為Action綁定快捷鍵:
1、
設(shè)置commands extension
<
extension
point
= "org.eclipse.ui.commands"
>
<!--
activeKeyConfiguration項(xiàng)用來(lái)說(shuō)明所綁定快捷鍵的初始設(shè)置
-->
<
activeKeyConfiguration
value
="org.eclipse.ui.defaultAcceleratorConfiguration"
/>
<!--
如果快捷鍵設(shè)置有多套,可以添加多個(gè)類(lèi)別
-->
<
category
name
="intelliPlatform.Category1"
description
="Test description"
id
="intelliPlatform.Category1"
/>
<!--
其中id為這個(gè)command的ID,相關(guān)的action通過(guò)這個(gè)ID標(biāo)志找到這個(gè)command
-->
<
command
name
="intelliPlatform.command.DataSource"
category
="intelliPlatform.Category1"
description
="數(shù)據(jù)源配置"
id
="com.longtop.intelliplatform.ide.project.commands.DataSource"
/>
<!--
具體的快捷鍵設(shè)置,其中command指定實(shí)際的coomand的ID
-->
<
keyBinding
command
="com.longtop.intelliplatform.ide.project.commands.DataSource"
configuration
="org.eclipse.ui.defaultAcceleratorConfiguration"
keySequence
="Ctrl+Shift+D"
/>
</
extension
>
以上是設(shè)置了plugin.xml中command extension,并指定了keybinding,在keybinding中
的keysequence中的字符串是設(shè)置的快捷鍵。
------------
在具體的Action配置中,只要在其屬性definitionId設(shè)置成command的ID即可,示例如下:
<
action
label
="Sample Action"
icon
="icons/sample.gif"
class
="cli.bacchus.portal.ui.actions.BacchusAction"
tooltip
="Hello, Eclipse world"
menubarPath
="sampleMenu/sampleGroup"
toolbarPath
="sampleGroup"
id
="bacchus.portal.ui.actions.BacchusAction"
definitionId
="com.longtop.intelliplatform.ide.project.commands.datesource"
>
</
action
>
注意:當(dāng)給相關(guān)的action設(shè)置完definitionID后,必須保證其中設(shè)置的command是有的,而且是正確的,否則有可能導(dǎo)致該action顯示不出來(lái)。
更具體的信息請(qǐng)參考eclipse開(kāi)發(fā)參考中關(guān)于擴(kuò)展點(diǎn)org.eclipse.ui.commands的詳細(xì)描述。
------------
2、
建立Acion,在此建立的action可以是實(shí)現(xiàn)IAction接口的任何類(lèi)。比較方便的是繼承
org.eclipse.jface.Action,然后在新類(lèi)中覆蓋父類(lèi)的run() 方法.
public
class
CopyAction
extends
Action
{
public
CopyAction()
{
setId(
"
org.example.copyaction
"
);
setActionDefinitionId(
"
com.longtop.intelliplatform.ide.project.commands.DataSource
"
);
}
}
3、
在創(chuàng)建CopyAction的instance之后,將copyActionInstance用IKeyBindingService綁定到
指定的command。
獲得IKeyBinddingservice的一種簡(jiǎn)單方式為:
IKeyBindingService keyBindingService
=
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart().getSite().getKeyBindingService();
keyBindingService.registerAction(copyActionInstance);
注意:
1、action的definitionid和command定義的id必須一致。
2、當(dāng)指定的keySequence與系統(tǒng)默認(rèn)的沖突時(shí),如:在窗體的菜單欄中
指定了Edit->Copy(默認(rèn)的快捷鍵為Ctrl+C),若將上面的keySequence改為
M1+C(Ctrl+C)則系統(tǒng)默認(rèn)的快捷鍵(Ctrl+C)將更改為Ctrl+Insert。即RCP默認(rèn)
的為用戶(hù)指定的優(yōu)先,系統(tǒng)動(dòng)態(tài)更新。
3、IKeyBindingService指定的快捷鍵是有作用范圍的。
為主菜單綁定快捷鍵
主菜單的快捷鍵即為 Alt + 菜單名稱(chēng)中帶下劃線的字母
定義主菜單快捷鍵只要在主菜單lable中確定的字母前面加上&字符即可
如:
plugin.properties menulabel = &Intelliplatform
plugin_zh.properties menulabel = 平臺(tái)(&I)
(注意:在該label引用的properties國(guó)際化文件中加,直接在plugin.xml中加好像無(wú)效,此處存疑)
posted @
2008-10-06 15:18
子非魚(yú)|
編輯
收藏
Powered by:
BlogJava
Copyright © 子非魚(yú)
主站蜘蛛池模板:
云霄县
|
金华市
|
石楼县
|
广西
|
石城县
|
普定县
|
墨脱县
|
安阳县
|
琼中
|
若尔盖县
|
安溪县
|
怀集县
|
清徐县
|
江永县
|
聂拉木县
|
民县
|
甘孜县
|
西盟
|
普兰店市
|
扎囊县
|
晴隆县
|
葵青区
|
阳城县
|
高淳县
|
星子县
|
望江县
|
绥中县
|
兴城市
|
景东
|
武功县
|
宝鸡市
|
渑池县
|
阳新县
|
全椒县
|
丹凤县
|
兖州市
|
进贤县
|
皋兰县
|
隆尧县
|
洱源县
|
慈溪市
|