0

新しいプラグインを使用して、カスタム メニュー項目のエントリをクリックしてプロパティ ページを開く必要があります。plugins.xml に追加する必要があるもの

この plugin.xml では、目的の結果が得られません。

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
<extension
     point="org.eclipse.ui.propertyPages">
   <page
        class="com.abc.gis.map.displayscale.DisplayPropertiesSummary"
        id="com.abc.gis.map.displayScale.page3"
        name="Test"
        objectClass="net.refractions.udig.project.IMap">
  </page>
  </extension>

   <extension
          point="org.eclipse.ui.handlers">
    <handler
          class="com.abc.gis.map.displayscale.DisplayPropertiesCommandHandler"
          commandId="com.abc.gis.map.displayscale.displayProperties">
       <enabledWhen>
          <iterate
                ifEmpty="false"
                operator="or">
             <adapt
                   type="net.refractions.udig.project.IMap">
             </adapt>
             <instanceof
                   value="net.refractions.udig.project.IMap">
             </instanceof>
          </iterate>
       </enabledWhen>
    </handler>
    </extension>

 </plugin>

このプロパティ ページのラジオ ボタンなどのユーザー入力ツールを含む単純なプロパティ ページを開こうとしています。このプロパティ ページは、カスタム メニュー項目をクリックすると開きます。

カスタム メニュー項目

4

1 に答える 1

1

createPropertyDialogOnのメソッドを使用してorg.eclipse.ui.dialogs.PreferencesUtil、特定のプロパティ ページを表示できます。何かのようなもの:

PreferencesUtil.createPropertyDialogOn(getShell(), obj, id, new String[] {id}, input).open()
于 2013-09-17T11:57:10.393 に答える