# eclipse有关调试问题的解决The source attachment does not contain the source for the file

On Wed, 20 Dec 2006 08:21:16 +0100, Daniel Megert wrote:I followed your instructions... feedback below. > Since you have the Eclipse SDK downloaded let's do it the easy way:> > 1.  start your workspace> 2.  File > Import... > Plug-ins and Fragments> 3.  click 'Next'> 4.  verify that the top most checkbox is checked and that the location > points to your Eclipse installationIt did.  No problems so far. >       if not: got to the PDE Target preference page and reset the settings> 5.  select 'Binary project'> 6.  click 'Next'> 7.  on the left side select org.eclipse.swt> 8.  click 'Add'> 9.  click 'Required Plug-ins'> 10. click 'Finish'> 11. now check that these steps worked:>        use Ctrl+Shift+T to open an SWT type (e.g. Display) and verify > that source is shown in the editorThis does not work.  If I highlight Display, I get:The source attachment does not contain the source for the fileDisplay.class.  You can change the source attachment by clicking ChangeAttached Source below. > 12. open your Java project's build path property pageProject->Properties-> Java Build Path> 13. make sure there is NO swt.jar under 'Libraries'SWT is there and under it is org.eclipse.swt.gtk.linux.x86.  And underNative library location it has.../workspace/org.eclipse.swt.gtk.linux.x86/- non modifiable.> 14. on the 'Projects' tab add all the org.eclipse.swt* projects that you > imported under step 10."Build path contains duplicate entry: 'org.eclipse.swt.gtk.linux.x86' forproject test"  So I removed it here. > 15. click 'OK'> > You should now be setup correctly. In the future if you need to switch > to a new SWT version simply install the new version and repeat steps 1 -10.It works now.FWIW, I have never had to manually add anything to do with SWT to myprojects before. Thanks for your help.
• 本文已收录于以下专栏：

举报原因： 您举报文章：eclipse有关调试问题的解决The source attachment does not contain the source for the file 色情 政治 抄袭 广告 招聘 骂人 其他 (最多只允许输入30个字)