3

これが取引です。プログラムでEclipse RCPでプロジェクトを作成します。次に、いくつかの永続的なプロパティを追加します。プロジェクト エクスプローラー ビューでプロジェクトを右クリックし、[プロパティ] タブをクリックします。私のプロパティページがあるはずです。ここに私が持っているものがあります:

<extension
         point="org.eclipse.ui.propertyPages">
      <page
            adaptable="false"
            class="bg.bulsi.rcp.first.properties.SamplePropertyPage"
            id="bg.bulsi.rcp.first.properties.samplePropertyPage"
            name="Sample Page"
            nameFilter="*.*"
            objectClass="org.eclipse.core.resources.IProject"
            selectionFilter="single">
         <enabledWhen>
            <instanceof
                  value="org.eclipse.core.resources.IProject">
            </instanceof>
         </enabledWhen>
      </page>
   </extension>

このページがプロジェクトのプロパティに表示されないのはなぜですか?

4

2 に答える 2

6

ページタグから「nameFilter」属性を削除してみてください。プロジェクト名にドットが含まれていない限り、それがプロパティ ページの表示を妨げている可能性があります。

于 2012-11-02T16:58:00.240 に答える
2

を取り外してnameFilter="*.*"使用

<adapt type="org.eclipse.core.resources.IProject"> </adapt>

それ以外の<instanceof ...></instanceof>

(ところで、 optionsobjectCalssadaptableは非推奨です)

完全に修正:

<extension point="org.eclipse.ui.propertyPages">
    <page
        class="bg.bulsi.rcp.first.properties.SamplePropertyPage"
        id="bg.bulsi.rcp.first.properties.samplePropertyPage"
        name="Sample Page"
        selectionFilter="single">
        <enabledWhen>
            <adapt type="org.eclipse.core.resources.IProject">
            </adapt>
        </enabledWhen>
    </page>
</extension>
于 2017-04-16T18:47:18.837 に答える