2010年 4年后,我又回來(lái)了
4年后,我又決定回來(lái)了,開(kāi)始抽空寫(xiě)日志,記錄生活的一點(diǎn)一滴,希望這次能夠堅(jiān)持下去,為了自己將來(lái)有一個(gè)回憶,自己給自己鼓勵(lì)一下,yeah!posted @ 2010-01-26 00:00 stamp 閱讀(148) | 評(píng)論 (0) | 編輯 收藏
2006年與我同在
posted @ 2010-01-26 00:00 stamp 閱讀(148) | 評(píng)論 (0) | 編輯 收藏
posted @ 2006-01-01 16:36 stamp 閱讀(167) | 評(píng)論 (0) | 編輯 收藏
posted @ 2005-11-27 12:30 stamp 閱讀(548) | 評(píng)論 (0) | 編輯 收藏
posted @ 2005-11-25 20:15 stamp 閱讀(216) | 評(píng)論 (0) | 編輯 收藏
posted @ 2005-11-16 19:44 stamp 閱讀(170) | 評(píng)論 (0) | 編輯 收藏
posted @ 2005-11-13 12:08 stamp 閱讀(272) | 評(píng)論 (0) | 編輯 收藏
posted @ 2005-10-16 23:34 stamp 閱讀(187) | 評(píng)論 (0) | 編輯 收藏
posted @ 2005-10-11 18:52 stamp 閱讀(356) | 評(píng)論 (0) | 編輯 收藏
posted @ 2005-10-08 20:27 stamp 閱讀(218) | 評(píng)論 (0) | 編輯 收藏
在進(jìn)行文本編輯器的開(kāi)發(fā)時(shí)候,經(jīng)常會(huì)遇到對(duì)相關(guān)內(nèi)容的提示,可以通過(guò)如下代碼實(shí)現(xiàn)SourceViewerConfiguration的
public IContentAssistant getContentAssistant(ISourceViewer sourceViewer)
{
ContentAssistant assistant = new ContentAssistant();
assistant.setContentAssistProcessor (new XMLCompletionProcessor (), XMLPartitionScanner.XML_TAG);
assistant.enableAutoActivation(true);
assistant.setAutoActivationDelay(250);
assistant.setProposalPopupOrientation(IContentAssistant.PROPOSAL_OVERLAY);
assistant.setProposalSelectorBackground(ColorManager.background);
assistant.setProposalSelectorForeground(ColorManager.foreground);
return assistant;
}
其中XMLCompletionProcessor 主要實(shí)現(xiàn)IContentAssistProcessor接口,內(nèi)容輔助主要實(shí)現(xiàn)接口中的
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset)
{
for (int i = 0; i < 5;i++)
{
result[i] = new CompletionProposal("bbb", documentOffset, 0, 3, null,
"aaa",null, "");
}
return result;
}
此時(shí)會(huì)在輔助框中出現(xiàn)5個(gè)aaa,當(dāng)確定后,補(bǔ)充到文本編輯器的相應(yīng)位置是bbb,具體參數(shù)的說(shuō)明請(qǐng)見(jiàn)API說(shuō)明。
posted @ 2005-09-23 20:57 stamp 閱讀(468) | 評(píng)論 (0) | 編輯 收藏