Skip Navigation

plugin.xml for Basic Views

The following plugin.xml file represents the complete sample views that are built in Creating Sample Views.

After you create the sample views, your file should be similar to the following sample.

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.6"?>
<plugin>
  <extension point="org.eclipse.ui.views">

<!-- The following lines represent the view extension for the vertical view. -->
    <view class="com.sabre.redapp.example.view.basic.BasicViewPart"
          id="com.sabre.redapp.example.view.basic.view"
          name="Basic View"
          restorable="true"
          allowMultiple="true"
/>

<!-- The following lines represent the view extension for the horizontal view. -->
    <view class="com.sabre.redapp.example.view.basic.HorizontalViewPart"
          id="com.sabre.redapp.example.view.basic.horizontal"
          name="Horizontal View"
          restorable="true"
          allowMultiple="true" >
    </view>
  </extension>
  <extension point="org.eclipse.ui.perspectiveExtensions">

<!-- The following lines represent the perspective for the vertical view. -->
    <perspectiveExtension targetID="com.sabre.edge.app.ui.perspective">
      <view
          closeable="true"
          id="com.sabre.redapp.example.view.basic.view:*"
          minimized="false"
          moveable="false"
          ratio="0.7"
          relationship="right"
          relative="org.eclipse.ui.editorss"
          showTitle="true"
          standalone="true"
          visible="false" />
    </perspectiveExtension>

<!-- The following lines represent the perspective for the horizontal view. -->
    <perspectiveExtension targetID="com.sabre.edge.app.ui.perspective">
      <view
          closeable="true"
          id="com.sabre.redapp.example.view.basic.horizontal:*"
          minimized="false"
          moveable="false"
          ratio="0.4"
          relationship="bottom"
          relative="org.eclipse.ui.editorss"
          showTitle="true"
          standalone="true"
          visible="false">
      </view>
    </perspectiveExtension>
  </extension>
  <extension point="org.eclipse.ui.commands">

<!-- The following lines represent the command for the vertical view. -->
      <command id="com.sabre.edge.command.example.view.basic"
          name="Example view"
          categoryId="com.sabre.edge.app">
            <commandParameter id="viewId"
              name="Description of command parameter that opens the view" />
        </command>

<!-- The following lines represent the command for the horizontal view. -->
      <command id="com.sabre.edge.command.example.view.horizontal"
          name="Horizontal View">
            <commandParameter id="viewId"
              name="Description of command parameter that opens the view">
            </commandParameter>
      </command>
  </extension>
  <extension point="org.eclipse.ui.handlers">

<!-- The following lines represent the handler for the vertical view. -->
    <handler
      commandId="com.sabre.edge.command.example.view.basic"
      class="com.sabre.edge.platform.core.ui.handlers.OpenViewHandler" />

<!-- The following lines represent the handler for the horizontal view. -->
    <handler
      class="com.sabre.edge.platform.core.ui.handlers.OpenViewHandler"
      commandId="com.sabre.edge.command.example.view.horizontal">
    </handler>
...
  </extension>
</plugin>