2014-09-24 85 views
1

如何發現preferencePageId如對於常規 - >編輯 - >文本編輯器 - >拼寫Eclipse開發 - preferencePageId適用於Eclipse IDE標準首選項頁面,如「org.eclipse.ui.preferencePages.GeneralTextEditor」

詳情:

下面的代碼可以添加鏈接到其他選項的頁面:

Link link = new Link(parentComposite, SWT.NONE); 
    link.setText("Configure general text editors spelling <A>here</A>."); 
    FontData[] fontData = link.getFont().getFontData(); 
    for (FontData fd : fontData) { 
     fd.setHeight(10); 
     //-fd.setStyle(SWT.BOLD); 
    } 
    link.setFont(new Font(getShell().getDisplay(), fontData)); 
    link.addSelectionListener(new SelectionAdapter() { 
     public void widgetSelected(SelectionEvent e) { 
      IWorkbenchPreferenceContainer container= (IWorkbenchPreferenceContainer) getContainer(); 
      container.openPage("org.eclipse.ui.preferencePages.GeneralTextEditor", null); 
     } 
    });  

但是,沒有辦法,我能找到的名單預設值如"org.eclipse.ui.preferencePages.GeneralTextEditor"適用於常規 - >編輯 - >文本編輯 - >拼寫。使用grepcode找不到字符串值。

這是需要jdt.spelling

回答

1

沒有列表的任意位置。您可以使用'搜索>搜索...>插件搜索'來搜索工作區plugin.xml文件,以獲得對org.eclipse.ui.preferencePages擴展點的所有引用,然後查看結果以檢查聲明。

通過以上操作,我看到拼寫頁面在org.eclipse.ui.editors插件中定義,其ID爲org.eclipse.ui.editors.preferencePages.Spelling

+0

我沒那麼幸運找到價值。感謝您分享這個特定的價值。 – 2014-09-24 09:52:07

1

打開定義任何org.eclipse.ui.preferencePagesplugin.xml,右鍵單擊擴展名並選擇Find References。搜索視圖將顯示所有聲明的首選項頁面的列表。然後,您可以雙擊這些打開定義並找到ID。

相關問題