??xml version="1.0" encoding="utf-8" standalone="yes"?>久久久精品蜜桃,久久久久久69,yiren22亚洲综合伊人22http://www.aygfsteel.com/GEF/category/22149.htmlzh-cnThu, 15 Sep 2011 21:52:55 GMTThu, 15 Sep 2011 21:52:55 GMT60jboss server view找不?/title><link>http://www.aygfsteel.com/GEF/archive/2011/09/15/358733.html</link><dc:creator>子非?/dc:creator><author>子非?/author><pubDate>Thu, 15 Sep 2011 10:40:00 GMT</pubDate><guid>http://www.aygfsteel.com/GEF/archive/2011/09/15/358733.html</guid><wfw:comment>http://www.aygfsteel.com/GEF/comments/358733.html</wfw:comment><comments>http://www.aygfsteel.com/GEF/archive/2011/09/15/358733.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/GEF/comments/commentRss/358733.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/GEF/services/trackbacks/358733.html</trackback:ping><description><![CDATA[<div><br />eclipse瘦n后发现jboss server view找不?br /><br />原因: org.jboss.ide.eclipse.as.feature中定?<br /><br /> <requires><br />          ...<br />          <import plugin="org.eclipse.wst.server.ui.doc.user"/><br />          ...<br /></requires><br /><br />该doc插g包在瘦n时被q掉?Djbossideplugin未正常加?恢复该包卛_</div><img src ="http://www.aygfsteel.com/GEF/aggbug/358733.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/GEF/" target="_blank">子非?/a> 2011-09-15 18:40 <a href="http://www.aygfsteel.com/GEF/archive/2011/09/15/358733.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>eclipse.ini内存讄各参数含义(转)http://www.aygfsteel.com/GEF/archive/2009/03/28/262575.html子非?/dc:creator>子非?/author>Sat, 28 Mar 2009 03:54:00 GMThttp://www.aygfsteel.com/GEF/archive/2009/03/28/262575.htmlhttp://www.aygfsteel.com/GEF/comments/262575.htmlhttp://www.aygfsteel.com/GEF/archive/2009/03/28/262575.html#Feedback1http://www.aygfsteel.com/GEF/comments/commentRss/262575.htmlhttp://www.aygfsteel.com/GEF/services/trackbacks/262575.html阅读全文

]]>
Eclipse 快捷键定Ӟ转)http://www.aygfsteel.com/GEF/archive/2008/10/06/232671.html子非?/dc:creator>子非?/author>Mon, 06 Oct 2008 07:18:00 GMThttp://www.aygfsteel.com/GEF/archive/2008/10/06/232671.html转自Qhttp://lemon.javaeye.com/blog/51480
        http://www.aygfsteel.com/fhawk/archive/2007/01/16/28993.html
利用IKeyBindingService接口为Actionl定快捷键:

1?br style="font-family: " /> 讄commands extension
   <extension
           
point = "org.eclipse.ui.commands">
           
<!-- activeKeyConfiguration用来说明所l定快捷键的初始讄 -->
           
<activeKeyConfiguration value="org.eclipse.ui.defaultAcceleratorConfiguration"/>
           
<!-- 如果快捷键设|有多套Q可以添加多个类?nbsp;-->
           
<category
               
name="intelliPlatform.Category1"
               description
="Test description"
               id
="intelliPlatform.Category1"/>
           
<!-- 其中id个command的IDQ相关的action通过q个ID标志扑ֈq个command -->
           
<command
             
name="intelliPlatform.command.DataSource"
             category
="intelliPlatform.Category1"
             description
="数据源配|?
             id
="com.longtop.intelliplatform.ide.project.commands.DataSource"/>
        
<!-- 具体的快捷键讄Q其中command指定实际的coomand的ID -->
        
<keyBinding
             
command="com.longtop.intelliplatform.ide.project.commands.DataSource"
             configuration
="org.eclipse.ui.defaultAcceleratorConfiguration"
             keySequence
="Ctrl+Shift+D"/>
   
</extension>
 以上是设|了plugin.xml中command extensionQƈ指定了keybindingQ在keybinding?br />  的keysequence中的字符串是讄的快捷键?nbsp;

------------

在具体的Action配置中,只要在其属性definitionId讄成command的ID卛_Q示例如下:
<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>

注意Q当l相关的action讄完definitionID后,必须保证其中讄的command是有的,而且是正的Q否则有可能D该action昄不出来?br /> 更具体的信息请参考eclipse开发参考中关于扩展点org.eclipse.ui.commands的详l描q?br />
------------

2?br />  建立Acion,在此建立的action可以是实现IAction接口的Q何类。比较方便的是?br />  org.eclipse.jface.ActionQ然后在新类中覆盖父cȝrunQ) Ҏ.

 public class CopyAction extends Action{
   
public CopyAction(){
    setId(
"org.example.copyaction");
    setActionDefinitionId(
"com.longtop.intelliplatform.ide.project.commands.DataSource");
   }

 }

3?br /> 在创建CopyAction的instance之后Q将copyActionInstance用IKeyBindingServicel定?br /> 指定的command?br /> 获得IKeyBinddingservice的一U简单方式ؓQ?br />
IKeyBindingService keyBindingService = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart().getSite().getKeyBindingService();
keyBindingService.registerAction(copyActionInstance);


注意Q?br /> 1、action的definitionid和command定义的id必须一致?br /> 2、当指定的keySequence与系l默认的冲突Ӟ如:在窗体的菜单栏中
指定了Edit->Copy(默认的快捷键为Ctrl+C),若将上面的keySequence改ؓ
M1+C(Ctrl+C)则系l默认的快捷?Ctrl+C)更改ؓCtrl+Insert。即RCP默认
的ؓ用户指定的优先,pȝ动态更新?br /> 3、IKeyBindingService指定的快捷键是有作用范围的?br />



Z菜单l定快捷?/span>

主菜单的快捷键即?Alt + 菜单名称中带下划U的字母
定义主菜单快捷键只要在主菜单lable中确定的字母前面加上&字符卛_
如:
plugin.properties  menulabel = &Intelliplatform
plugin_zh.properties menulabel = q_(&I)
Q注意:在该label引用的properties国际化文件中加,直接在plugin.xml中加好像无效Q此处存疑)


]]>
有关插g工程构徏和打包的问题http://www.aygfsteel.com/GEF/archive/2008/02/20/180773.html子非?/dc:creator>子非?/author>Wed, 20 Feb 2008 02:10:00 GMThttp://www.aygfsteel.com/GEF/archive/2008/02/20/180773.html 打包时过滤文?br />
在build.properties中的bin.excludes加入要过滤的文g
Q例如:qojar包中所有文件夹下的CC配置文g.copyarea.dbQ应该填?bin.excludes = **/.copyarea.db Q?/span>


构徏时过滤文?/span>

 

Properties -> Java Compiler -> Building

NEnable project specific settings, 在Output folder栏的Filtered Resources中填写你要过滤的文g   Q例如:qobin目录中所有文件夹下的CC配置文g.copyarea.dbQ应该填?*.copyarea.dbQ?/span>




]]>
Eclipse奇技淫yhttp://www.aygfsteel.com/GEF/archive/2007/08/29/140922.html子非?/dc:creator>子非?/author>Wed, 29 Aug 2007 07:01:00 GMThttp://www.aygfsteel.com/GEF/archive/2007/08/29/140922.html一个在RCP中快速打开文g的小技?/a>
一个在RCP中快速打开文g的小技巧,例如Q在Word中打开一个Word文档Q或者在Acrobat中打开一个PDF文g?br /> q可以通过SWT的org.eclipse.swt.program.ProgramcL实现Q?br />
    String filename = "myword.doc";
    Program.launch(filename);

q个c还提供了其他一些有用的ҎQ例如得到某一特定扩展名对应的可执行程序,甚至得到q个可执行程序的图标?br /> 转自Q?/span>http://www.aygfsteel.com/eclipshine/Q?


文gpȝ不同步问题resource is out of sync with the file  system的解军_??
在eclipse中,启动run on server时报错:
            Resource is out of sync with the file system:
            '/Test_1_Struts_Spring_Hibernate/WebContent/WEB-INF/.struts-config.xml.strutside'.
            查阅资料后发现这是文件系l不同步的问题,是因为在eclipse之外对工E中的resourceq行修改引v的;但是Q有时没有在eclipse之外q行修改Q也会报cM的错误?br style="font-family: " />             解决办法Q需要手动刷C下资源管理器?br style="font-family: " />             Q?Q在eclipse中,工程目录右键Q选择F5QrefreshQ?br style="font-family: " />             Q?Q设|eclipse自动h?br style="font-family: " />                        通过Window->Preferences->General->WorkspaceQ选中Refresh
            automatically?/span>


Eclipse中的插g包导入成源码工程
打开Eclipse的PDE的Plug-ins视图Q可以列出当前eclipse下(包括workspace中)的所有插Ӟ可以某一插g导入成工E?右键Import as->Source Project)

删除eclipse的configuration目录Declipse无法启动的解军_?/span>
q是׃equinox可以创徏 configuration目录Q但是无法自己创建config.ini文g。在启动eclipse的时候,需要用到config.ini中的配置内容?
删除了configuration后,启动eclipse会自动重建configuration目录?br /> 然后可以自己在configuration目录下新Z个config.ini文gQ增加以下五行内容到config.ini文g中?/span>

osgi.splashPath = platform:/base/plugins/org.eclipse.platform
osgi.bundles=org.eclipse.equinox.common@2:start, org.eclipse.update.configurator@3:start, org.eclipse.core.runtime@start
eclipse.product=org.eclipse.sdk.ide
osgi.instance.area.default=@user.home/workspace
eof=eof

保存文g后,重新启动eclipse没有问题了


IFileҎ
//取得IFile文g的绝对\?/span>
    String path= ifile.getLocation().makeAbsolute().toFile().getAbsolutePath(); 
    
//IFile转File
    File file =iFile.getLocation().toFile();

在New菜单l里d一?/span>
<extension
           
point="org.eclipse.ui.perspectiveExtensions">   
              
<perspectiveExtension
                    
targetID="org.eclipse.jdt.ui.JavaPerspective">   
                    
<newWizardShortcut id="XX.WebProjectWizard"/>
              
</perspectiveExtension>
   
</extension>

其中Q如果设|targetID = * 表示应用到所有透视?

java web工程报错 Java compiler level does not match the version of the installed Java project facet

q个是因为Facted Project中的Java版本讑֮与项目的Java版本讑֮不一致?br /> 解决Ҏ1Q?br /> eclipse 加vm参数  ?br /> 创徏一个快h式,讑֮目标位置?D:\eclipse_jee\eclipse.exe -vm D:\Java\jdk1.5.0_10\bin\javaw


Eclipse插g目q行调试报内存溢出的解决

插g调试时内存溢?Q调优JVM参数Q增加内存:

-Xms64m -Xmx512m -XX:PermSize=64M -XX:MaxPermSize=128M -XX:+UseParallelGC -XX:+HeapDumpOnOutOfMemoryError

(有关JVM参数调优讲解可参考:http://niyunjiu.javaeye.com/blog/337266)


Eclipse WorkSet
所有的已有的项目引入到工作区后Q显C在一个文件夹下?br />  
Show -> Working Sets -> create a working set -> select all projects -> ok
 
q样Q在eclipse工作ZQ所有的目以Working Set来显C?

]]>
(?Eclipse快捷?/title><link>http://www.aygfsteel.com/GEF/archive/2007/08/02/134089.html</link><dc:creator>子非?/dc:creator><author>子非?/author><pubDate>Thu, 02 Aug 2007 10:27:00 GMT</pubDate><guid>http://www.aygfsteel.com/GEF/archive/2007/08/02/134089.html</guid><description><![CDATA[<span style="font-size: 10pt; font-family: Verdana">F2: cL者方法,查看注释?br /> <span style="color: red">F3</span>: cL者方法,查看源码Q同QCtrl+鼠标左键Q?br /> F4: c,查看在类库中的承层ơ?br /> F5Q调试时单步跛_?br /> F6Q调试时单步跌?br /> F8Q调C一个断点,如果没有Q则执行完毕?br /> F11Q快速运行最新运行过的程序(调试状态)?br /> F12Q激zȝ辑器?br /> <strong>Ctrl + Shift + G</strong>: cL者方法,查看在其它地方的用法?br /> Ctrl + Shift + T: 打开按名U查扄的对话框?br /> Ctrl + Shift + RQ打开资源对话框?br /> Ctrl + Shift + F: 代码格式化?br /> <strong>Ctrl + Shift + O</strong>: 快速导入import的包?br /> Ctrl + Shift + LQ显C当前^台的全部快捷键?br /> Shift + Alt + R: cLҎ、变量,重命?br /> <strong>Ctrl + T</strong>: ҎQ查看实现该Ҏ的类及其父类?br /> Ctrl + O: 查看当前~辑器中打开的类中定义的Ҏ?br /> Ctrl + J: 在编辑器中查找某个字W串Q然?Ctrl + K",查找下一个?br /> Ctrl + D: 删除当前光标所在的一行?br /> Ctrl + FQ打开"Find/Replace"对话框?br /> Ctrl + HQ打开“Search”对话框?br /> Ctrl + LQ打开“Go to Line”对话框?br /> Ctrl + NQ打开New Wizard对话框?br /> Ctrl + Q: 回到最后一ơ编辑的地方?br /> Ctrl + MQ最大化/最化~辑器窗口?br /> Ctrl + /Q注?取消注释<br /> Ctrl + 1Q显C快速重构方案?br /> <strong style="color: red">Alt + /</strong>: 补cd或者方法名<br /> Shift + Alt + Q,  Q: 打开视图框?br /> Shift + Alt + Q, L: 打开"Error Log"视图?br /> Shift + Alt + QQPQ打开“Package Explorer"视图?br /> Alt +S,V: 打开Override对话框?br /> <span style="font-family: Verdana">双击左括P选中括号中的全部内容?br /> </span><span style="font-size: 10pt; font-family: Verdana">shift + alt + X : j q行MAIN<br /> shift + alt + X : T q行JUNIT<br /> Shift + alt + S : R 帮你自动完成 set get ҎQ?br /> shift + alt + Z : 4 ?try ,catch<br /> </span>ctrl+D删除一行?br /> <li>Ctrl + Shift + O :引入及管理imports语句 <li>Ctrl + Shift + T : 打开Open Type 查找cL? <li>Ctrl + Shift + F4 : 关闭所在打开的窗? <li>Ctrl + O : Open declarations <li>Ctrl + E : 打开~辑器(切换H口Q? <li>Ctrl + / : 注释本行 <li>Alt + Shift + R : 重命? <li>Alt + Shift + L : 抽取本地变量 <li>Alt + Shift + M : 抽取Ҏ <li><strong>F3 </strong>: Open Declaration <br /> 转自Q?br /> <a href="http://www.aygfsteel.com/xiaoxiaoleemin/archive/2007/05/02/115072.html">http://www.aygfsteel.com/xiaoxiaoleemin/archive/2007/05/02/115072.html</a></span> <p><br />  </p> <p><span style="font-family: Verdana"><span style="font-size: 8pt"><span style="color: #808080">使用Eclipse IDE的技?<br /> 作者:Sam Brodkin <br /> 译Qtetsu <br /> 版权声明Q可以Q意{载,转蝲时请务必以超链接形式标明文章原始出处和作者信息及本声?<br /> 作? <br /> Sam Brodkin ;tetsu <br /> 原文地址: <br /> http://www.javaworld.com/javaworld/jw-08-2005/jw-0829-eclipse.html<br /> 中文地址: <br /> http://www.matrix.org.cn/resource/article/43/43844_Eclipse_Hot_Key.html<br /> 关键词: Eclipse Hot Key <br /> 概要</span></span></span></p> <p><span style="color: #808080"><span style="font-family: Verdana"><span style="font-size: 8pt">Eclipse IDE 变得如此热门Q以至于出现在许多工作简历中。但是,也正因ؓ它的功能J多Q得难于入手了。在q篇文章中,Sam Brodkin 分n了他最常用的一些Eclipse功能。他也提C那些会让你的手指动的飞快的热键组合。在工作的时候,Z会怀疑你是在打电玩。(1,200字;2005q??9日) <br /> Eclipse最妙的地方是它的功能是如此的丰富。如果你找不到某功能,要么是你没有好好的去找,要么有一个插件可以实现它。Eclipse最p的地方也是它的功能如此的丰富。拥挤的工具条,臃肿的菜单,以及配置对话框都让我惌v了拉比林Ҏq宫Q译者注QMinotau’s labyrinthQ希腊神户中的hw牛头怪,住在Labyrinthq宫中,吃h们供奉的童男童女Q最后被Theseus杀死)Q尽配|对话框在Eclipse3.1中已l好了很多)。甚x有经验的EclipseE序员也是慢吞吞Q笨手笨脚的。我观察q无数的同事Q当试图在Eclipse的navigation面板里找一个类的时候,不假思烦的按?#8220;Ctrl Q?Shift Q?T”Q打开型别Qopen typeQ)。其实,只要有意识的投入一点点旉Q你也会不在W手W脚的,而成为热键高手?<br /> _NEclipse不单提高了你的效率,Q我知道Q按时赚钱的签Uh更喜Ƣ文本编辑器Q,对你的求职简历也有好处。既然Eclipse已经来多的出现在Java工作说明上,那么在你的求职简历上也绝Ҏ个好词。我把它攑֜我的个h历上Q就在POJOQ简单初始Java对象Q和POJIQ简单初始Java接口Q的中间。越来越多的公司转向EclipseQ因为它免费Q而且为大多数E序员所接受。(除了那些有的IntelliJ和Emacs的崇拜者) <br /> 因此Q你的简历上q不都是帮助你提高编E效率的大话Q在本文中,我将l你几条Eclipse高效的徏议。注意:如果你是个在L初学者教E的新手Q那么请参看资源部分?<br /> Eclipse的快捷键l合功能 <br /> 使用Eclipse的快捷键l合功能Q让你看h像是在打늎。特别是让h惌v《真人快打》(Mortal CombatQ的感觉。要成ؓ《真人快打》的高手Q你必须C大量的按键顺序。比如,要出Sub-Zero Skeleton RipQ你必须依次按下????和X键。这里的控制杆就是CtrlQAltQShiftQ字母键Q数字键和功能键的组合?<br /> 让我们按照用频率来看看我最q的一些热键组合。(注:以下内容在Eclipse3.02及一上版本通过试Q?<br /> 1. <span style="color: #000000">Control-Shift-T</span>: 打开cdQOpen typeQ。如果你不是有意洋工,q是忘记通过源码树(source treeQ打开的方式吧?<br /> 2. <span style="color: #000000">Control-Shift-R</span>: 打开资源Q不只是用来LJava文gQ。小提示Q利用Navigator视图的黄色双向箭头按钮让你的~辑H口和导航器相关联。这会让你打开的文件对应显C在D器的层l构中,q样便于l织信息。如果这影响了速度Q就x它?<br /> 3. <span style="color: #000000">F3</span>: 打开xQOpen declarationQ。或者,利用Declaration TabQ在Java视图模式下,选择Windows --> Show View -- > DeclarationQ。当你选中代码中的一个方法,然后按这个按键,它会把整个方法在xҎ里显C出来?<br /> 4. <span style="color: #000000">Alt-left arrow</span>: 在导航历史记录(Navigation HistoryQ中后退。就像Web览器的后退按钮一P在利用F3跌{之后Q特别有用。(用来q回原先~译的地方) <br /> 5. <span style="color: #000000">Alt-right arrow</span>: D历史记录中向前?<br /> 6. <span style="color: #000000">Control-Q</span>: 回到最后依ơ编辑的地方。这个快捷键也是当你在代码中跌{后用的。特别是当你ȝq深Q忘C最初在做什么的时候?<br /> 7. <span style="color: #000000">Control-Shift-G</span>: 在workspace中搜索引用(referenceQ。这是重构的前提。对于方法,q个热键的作用和F3恰好相反。它使你在方法的栈中Q向上找Z个方法的所有调用者。一个与此相关的功能是开?#8220;标记”功能Qoccurrence markingQ?。选择Windows->Preferences->Java-> Editor-> Mark OccurrencesQ勾选选项。这Ӟ当你单击一个元素的时候,代码中所有该元素存在的地斚w会被高亮昄。我个h只?#8220;标记本地变量”QMark Local VariablesQ。注意:太多的高亮显CZ拖慢Eclipse?<br /> 8.<span style="color: #000000"> Control-Shift-F</span>: Ҏ代码风格讑֮重新格式化代码。我们的团队有统一的代码格式,我们把它攑֜我们的wiki上。要q么做,我们打开EclipseQ选择Window?Preferences?Java?Code StyleQ然后设|Code FormatterQCode Style和Organize Imports。利用导出(ExportQ功能来生成配置文g。我们把q些配置文g攑֜wiki上,然后团队里的每个人都导入到自qEclipse中?<br /> 9. <span style="color: #000000">Control-O</span>: 快速概?quick outline)。通过q个快捷键,你可以迅速的跛_一个方法或者属性,只需要输入名字的头几个字母?<br /> 10. <span style="color: #000000">Control-/</span>: 对一行注释或取消注释。对于多行也同样适用?<br /> 11. <span style="color: #000000">Control-Alt-down arrow</span>: 复制高亮昄的一行或多行?<br /> 12. <span style="color: #000000">Alt-down arrow</span>: 一行或多行向下Ud。Alt-up arrow会向上移动?<br /> 其他的热键在菜单里有。你可以通过按下Control-Shift-LQ从3.1版本开始)Q看到所有快捷键的列表。按下Control-Shift-L两次Q会昄热键对话框(Keys Preferences dialogQ,你可以在q里自己讄热键。我Ƣ迎你在Talkback部分发表你的Eclipse提示?<br /> <span style="font-size: 10pt">其他的EclipseH门 </span><br /> 我ȝ了几个相关的窍门: <br /> <span style="color: #000000">锁定命o行窗?/span>Q在命o行视图中QWindow ? Show View ? Other ? Basic ? ConsoleQ,试试看用滚动锁定按钮来锁定控制台输出不要滚屏?<br /> <span style="color: #000000">使用Ant视图</span>Q在我的Java或Debug模式下,我喜Ƣ显C出Ant视图Q这h可以迅速的q行Antd。通过Window ? Show View ? Other ? Ant可以扑ֈ该视图。把Ant视图攑֜屏幕的一角, 通过“d~译文gQAdd BuildfilesQ?#8221;按钮来添加build.xml文g。在3.1版本中,甚至支持Ant调试脚本语言?<br /> <span style="color: #000000">自动遍历一个集?/span>Qfor + Control-Space: 如果你还不知道,那么你应该记住Control-Space是自动完成功能。在Eclipse中,你还可以自动完成l构。在一个数l或集合范围内,试试看输?#8220;for”然后按下Control-Space键。Eclipse会问你你惌遍历哪一个集合然后自动完成@环代码?<br /> <span style="color: #000000">使用分布局</span>Q在包浏览视图(Package Explorer viewQ中默认的布局Q扁q_Q方式让我困惑,它把包的全名昄在导航树Qnavigation treeQ中。我更喜Ƣ我源码的包和文件系l视图,在Eclipse中叫做分U布局QHierarchical LayoutQ。要切换到这U模式,点击包浏览视图中向下的按钮,选择布局QLayoutQ,然后选择分QHierarchialQ?<br /> <span style="color: #000000">一ơ显C多个文?/span>Q你可以一ơ浏览多个文件。把不在Ȁzȝ态的~辑H口拖到Ȁzȝ口的底部或侧边的滚动条上Q就可以打开该编辑窗口。这是我能描q该H门的最好方式了?<br /> <span style="color: #000000">同时打开两个Eclipse</span>Q要改动从一个CVS分支上合q到另外一个上Q我喜欢通过同时打开两个工作目录QWorkspaceQ不同Eclipse来实现。这h可以通过比较CVS上的最新版本看到所有的变化Q右键单dE,然后选择Compare with ? Lastest from HEADQ然后把每一个变化都合ƈ到另外一个CVS分支上。启动多个Eclipse的最单的Ҏ是利用Eclipse Launcher?<br /> <span style="color: #000000">Implementors插g</span>Q安装一个能够蟩C个接口的实现的插件。如果你是个dependency injection _丝Q或者正在基于编写优良的接口工作Q那么你需要一个这L插g来加速代码导航?你可以在SourceForge扑ֈq个插g?<br /> 像Modest Mouse乐队的歌?#8220;Out of Gas”qQ?#8220;意见像猫Q我已经送给别h”。这些是我的Eclipse猫Q希望你能给它找一个温暖的家?<br /> 关于作?<br /> Sam Brodkin使一个自由Java技术者,住在荷兰的Rotterdam。Brodkin’s的正式职业开始于8q前的Sun公司。他工作内容是Sun Java System Web Server。他目前正致力J2EE软g开发,特别是可l护性和漂亮的代码。Brodkin是一个IntelliJ的狂热者很多年了,但是却被q{到Eclipse来开发现在的目。虽然从没被抓到q,不过他还是被人怀疑在上班的时候玩电子游戏?<br /> 资源 <br /> Eclipse 文档说明? <br /> http://www.eclipse.org/documentation/main.html <br /> "A Starter’s Guide to the Eclipse IDE, Part 1," Satya Komatineni (java.net, 2005q??: <br /> http://today.java.net/pub/a/today/2005/03/02/eclipsestarter1.html <br /> Eclipse Launcher: <br /> http://sourceforge.net/projects/eclauncher/ <br /> Jesper Kamstrup Linnet的Implementors插g: <br /> http://eclipse-tools.sourceforge.net/implementors/ <br /> 可打印的Eclipse快捷键列? <br /> http://eclipse-tools.sourceforge.net/shortcuts.html <br /> 关于Java开发工L更多文章Q请览JavaWorld的主题烦引的开发工具部? <br /> http://www.javaworld.com/channel_content/jw-tools-index.shtml <br /> -----------------------------------------------</span></span> </span><br /> </p> </li> <img src ="http://www.aygfsteel.com/GEF/aggbug/134089.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/GEF/" target="_blank">子非?/a> 2007-08-02 18:27 <a href="http://www.aygfsteel.com/GEF/archive/2007/08/02/134089.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>模态窗?/title><link>http://www.aygfsteel.com/GEF/archive/2007/07/27/132734.html</link><dc:creator>子非?/dc:creator><author>子非?/author><pubDate>Fri, 27 Jul 2007 03:55:00 GMT</pubDate><guid>http://www.aygfsteel.com/GEF/archive/2007/07/27/132734.html</guid><description><![CDATA[<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top><span style="COLOR: #000000">Shell   dlgShell   </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">   </span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">   Shell(parent,   SWT.DIALOG_TRIM   </span><span style="COLOR: #000000">|</span><span style="COLOR: #000000">   SWT.APPLICATION_MODAL);   </span></div> <br><br><span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">setShellStyle(q里可以L讄样式);能够讄的样式如下:Q以下属性可以多选,但是某些属性相冲突时会D讄的其他属性失效)<br></span> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top><span style="COLOR: #000000">SWT.BORDER </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">建立一个有Ҏ但没有标题栏的窗?/span><span style="COLOR: #008000"><br><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #000000">SWT.CLOSE </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">建立一个只有关闭按钮的H口</span><span style="COLOR: #008000"><br><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #000000">SWT.MIN  </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">建立一个不能最大化的窗?/span><span style="COLOR: #008000"><br><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #000000">SWT.MAX, </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">建立一个可以最大化最化的窗?/span><span style="COLOR: #008000"><br><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #000000">SWT.NO_TRIM </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">建立一个没有Q何边界和标题栏的H口</span><span style="COLOR: #008000"><br><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #000000">SWT.RESIZE </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">建立一个可以改变大的H口</span><span style="COLOR: #008000"><br><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #000000">SWT.TITLE </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">建立一个没有标题栏图标Q没有关闭按钮的H口</span><span style="COLOR: #008000"><br><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #000000">SWT.ON_TOP </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">建立一个L在上的窗口,注意Q此属性最好与CLOSE、MIN、MAX一起用?/span><span style="COLOR: #008000"><br><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #000000">SWT.TOOL  </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">建立一个类似工h的窗?/span><span style="COLOR: #008000"><br><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #000000">SWT.APPLICATION_MODAL </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">建立一个APPLICATION模态窗?/span><span style="COLOR: #008000"><br><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #000000">SWT.MODELESS </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">建立一个非模态窗?/span><span style="COLOR: #008000"><br><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #000000">SWT.PRIMARY_MODAL </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">建立一个PRIMARY模态窗?/span><span style="COLOR: #008000"><br><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #000000">SWT.SYSTEM_MODAL  </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">建立一个SYSTEM模态窗?/span></div> <span style="FONT-SIZE: 10pt">     q有两个快捷属性来建立H口<br></span> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top><span style="COLOR: #000000">SHELL_TRIM </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">建立一个标准模式的H口Q相当于属性设|ؓCLOSE | TITLE | MIN | MAX | RESIZE</span><span style="COLOR: #008000"><br><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #000000">DIALOG_TRIM </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">建立一个对话框模式的窗口,相当于属性设|ؓTITLE | CLOSE | BORDER</span></div> <br>        <span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">所谓模态对话框Q就是指除非采取有效的关闭手D,用户的鼠标焦Ҏ者输入光标将一直停留在其上的对话框。非模态对话框则不会强制此U特性,用户可以在当前对话框以及其他H口间进行切换?<br><br><br>参考引用:<br></span><br><a ><span style="FONT-SIZE: 10pt">http://blog.csdn.net/zxy6173/archive/2007/03/04/1520113.aspx</span></a><br><a >http://www.cnblogs.com/hg98/archive/2006/09/18/507897.aspx</a> <img src ="http://www.aygfsteel.com/GEF/aggbug/132734.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/GEF/" target="_blank">子非?/a> 2007-07-27 11:55 <a href="http://www.aygfsteel.com/GEF/archive/2007/07/27/132734.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>actionSet ?perspective、view、editor{关?/title><link>http://www.aygfsteel.com/GEF/archive/2007/07/25/132336.html</link><dc:creator>子非?/dc:creator><author>子非?/author><pubDate>Wed, 25 Jul 2007 08:27:00 GMT</pubDate><guid>http://www.aygfsteel.com/GEF/archive/2007/07/25/132336.html</guid><description><![CDATA[<p style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"> </p> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #008080"> 1</span><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">extension </span><span style="COLOR: #ff0000">point</span><span style="COLOR: #0000ff">="org.eclipse.ui.actionSets"</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080"> 2</span><span style="COLOR: #000000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top>    </span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">actionSet<br></span><span style="COLOR: #008080"> 3</span><span style="COLOR: #800000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top>            </span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="org.eclipse.mylar.java.actionSet.browsing"</span><span style="COLOR: #ff0000"><br></span><span style="COLOR: #008080"> 4</span><span style="COLOR: #ff0000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top>            label</span><span style="COLOR: #0000ff">="Mylar Java Browsing"</span><span style="COLOR: #ff0000"><br></span><span style="COLOR: #008080"> 5</span><span style="COLOR: #ff0000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top>            visible</span><span style="COLOR: #0000ff">="false"</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"> <br></span><span style="COLOR: #008080"> 6</span><span style="COLOR: #000000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top>        </span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">action<br></span><span style="COLOR: #008080"> 7</span><span style="COLOR: #800000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top>           </span><span style="COLOR: #ff0000">class</span><span style="COLOR: #0000ff">="org.eclipse.mylar.internal.java.ui.actions.ApplyMylarToBrowsingPerspectiveAction"</span><span style="COLOR: #ff0000"><br></span><span style="COLOR: #008080"> 8</span><span style="COLOR: #ff0000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top>           id</span><span style="COLOR: #0000ff">="org.eclipse.mylar.java.ui.actions.ApplyMylarToBrowsingPerspectiveAction"</span><span style="COLOR: #ff0000"><br></span><span style="COLOR: #008080"> 9</span><span style="COLOR: #ff0000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top>           style</span><span style="COLOR: #0000ff">="toggle"</span><span style="COLOR: #ff0000"><br></span><span style="COLOR: #008080">10</span><span style="COLOR: #ff0000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top>           label</span><span style="COLOR: #0000ff">="Apply Mylar"</span><span style="COLOR: #ff0000"> <br></span><span style="COLOR: #008080">11</span><span style="COLOR: #ff0000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top>           icon</span><span style="COLOR: #0000ff">="icons/elcl16/interest-filtering-browsing.gif"</span><span style="COLOR: #ff0000"><br></span><span style="COLOR: #008080">12</span><span style="COLOR: #ff0000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top>           tooltip</span><span style="COLOR: #0000ff">="Filter Packages, Types, and Members views"</span><span style="COLOR: #ff0000"><br></span><span style="COLOR: #008080">13</span><span style="COLOR: #ff0000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top>           toolbarPath</span><span style="COLOR: #0000ff">="mylar"</span><span style="COLOR: #ff0000"><br></span><span style="COLOR: #008080">14</span><span style="COLOR: #ff0000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top>           enablesFor</span><span style="COLOR: #0000ff">="*"</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">15</span><span style="COLOR: #000000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top>        </span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">action</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">16</span><span style="COLOR: #000000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top>      </span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">actionSet</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">17</span><span style="COLOR: #000000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top>  </span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">extension</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">18</span><span style="COLOR: #000000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top><br></span><span style="COLOR: #008080">19</span><span style="COLOR: #000000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top> </span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">extension </span><span style="COLOR: #ff0000">point</span><span style="COLOR: #0000ff">="org.eclipse.ui.actionSetPartAssociations"</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">20</span><span style="COLOR: #000000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top>    </span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">actionSetPartAssociation </span><span style="COLOR: #ff0000">targetID</span><span style="COLOR: #0000ff">="org.eclipse.mylar.java.actionSet.browsing"</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">21</span><span style="COLOR: #000000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top>         </span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">part </span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="org.eclipse.jdt.ui.MembersView"</span><span style="COLOR: #0000ff">/></span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">22</span><span style="COLOR: #000000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top>         </span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">part </span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="org.eclipse.jdt.ui.PackagesView"</span><span style="COLOR: #0000ff">/></span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">23</span><span style="COLOR: #000000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top>         </span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">part </span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="org.eclipse.jdt.ui.TypesView"</span><span style="COLOR: #0000ff">/></span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">24</span><span style="COLOR: #000000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top>    </span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">actionSetPartAssociation</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">25</span><span style="COLOR: #000000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top>  </span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">extension</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">26</span><span style="COLOR: #000000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top><br></span><span style="COLOR: #008080">27</span><span style="COLOR: #000000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top>    </span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">extension </span><span style="COLOR: #ff0000">point</span><span style="COLOR: #0000ff">="org.eclipse.ui.perspectiveExtensions"</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">28</span><span style="COLOR: #000000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top>        </span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">perspectiveExtension <br></span><span style="COLOR: #008080">29</span><span style="COLOR: #800000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top>            </span><span style="COLOR: #ff0000">targetID</span><span style="COLOR: #0000ff">="org.eclipse.jdt.ui.JavaBrowsingPerspective"</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">30</span><span style="COLOR: #000000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top>            </span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">actionSet </span><span style="COLOR: #ff0000">id</span><span style="COLOR: #0000ff">="org.eclipse.mylar.java.actionSet.browsing"</span><span style="COLOR: #0000ff">/></span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">31</span><span style="COLOR: #000000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top>        </span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">perspectiveExtension</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">32</span><span style="COLOR: #000000"><img src="http://www.aygfsteel.com/Images/OutliningIndicators/None.gif" align=top>    </span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">extension</span><span style="COLOR: #0000ff">></span></div> <br><span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><strong><font style="BACKGROUND-COLOR: #ffff66">org.eclipse.ui.actionSetPartAssociations</font></strong> 扩展Ҏ供了另一U选择Q当特定的视图或者编辑器打开的时候,不管它们所处的透视图是否打开Q都允许一个action集处于可见状态。这是一U极好的方式来保证特定的action出现大范围的透视图中Q而不是明的些透视图添加action?/span> <img src ="http://www.aygfsteel.com/GEF/aggbug/132336.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/GEF/" target="_blank">子非?/a> 2007-07-25 16:27 <a href="http://www.aygfsteel.com/GEF/archive/2007/07/25/132336.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在非Editor中实现syntax coloringhttp://www.aygfsteel.com/GEF/archive/2007/07/24/132081.html子非?/dc:creator>子非?/author>Tue, 24 Jul 2007 08:34:00 GMThttp://www.aygfsteel.com/GEF/archive/2007/07/24/132081.html 参考:http://dev.eclipse.org/newslists/news.eclipse.platform.rcp/msg01745.html
在非Editor中实现syntax coloring


Rainer wrote:
I hope this is the right place to ask this question:

It's fine; eclipse.platform would have been right as well.

I am working on a simple XML editing rich client. One of the main components is a JFace TextViewer, embedded in an Eclipse view (I can't use an Eclipse editor in my special case, unfortunately). I want to add syntax coloring, but can't seem to get the presentation reconciler to work.

Here's the sample code:

[...]

reconciler= new PresentationReconciler();
DefaultDamagerRepairer dr = new DefaultDamagerRepairer(new CodeRuleScanner());
dr.setDocument(viewer.getDocument());
reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
reconciler.install(viewer);


[..]

The CodeRuleScanner (extends RuleBasedScanner) is configured with a set of rules and a default token. However, the PresentationReconciler seems to be totally inactive. Is there any further configuration necessary?

No. If you look at the implementation of PresentationReconciler.install, you will see that it waits until the viewer's document is set (via an ITextInputListener). So, in order for the above to work, you have to set the document *after* installing the reconciler.


You should also look at SourceViewer that adds more features and configures itself in the right order using a SourceViewerConfiguration.

HTH, tom
 
正确的做法:
 
PresentationReconciler reconciler= new PresentationReconciler();
        DefaultDamagerRepairer dr 
= new DefaultDamagerRepairer(new PolicyCodeScanner(new ColorProvider()));
        
        reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
        reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
        reconciler.install(sourceViewer);
//PresentationReconciler.install必须在setDoucument之前Q切?br />         
        
//讄字体
        sourceViewer.getTextWidget().setFont(new Font(sourceViewer.getControl().getDisplay(), 
                
new FontData("Courier"10, SWT.NORMAL)));
        
//讄当前~辑行的背景?/span>
        CursorLinePainter painter= new CursorLinePainter(sourceViewer);
        painter.setHighlightColor(yellow);
        sourceViewer.addPainter(painter);
        
        
//讄文档帮助
        final ContentAssistant assistant = new ContentAssistant();
        assistant.setContentAssistProcessor(
new PolicyContentAssistProcessor(), IDocument.DEFAULT_CONTENT_TYPE);
        assistant.install(sourceViewer);
        
        
//讄文本内容
        sourceViewer.setDocument(new Document(this.content));
        
        dr.setDocument(sourceViewer.getDocument());
        
 
  
另外Q?br /> 注入config:
sourceViewer.configure(SourceViewerConfiguration configuration)


 



]]>
վ֩ģ壺 ҵ| ̨| | ̶| ƽ| ʲ| ˮ| | ̨ǰ| ʡ| | ƽ| ٹ| ɽ| ĩ| ͤ| | û| ϵ| | | | Ƥ| | | ̨| | | | ɽ| ͼʲ| | γ| | ʡ| | | ƽ| ʼ| | ó|