1 <?xml version='1.0' encoding='UTF-8'?>
   2 <!--   
   3    Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
   4    
   5    DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   6    
   7    The contents of this file are subject to the terms of either the Universal Permissive License 
   8    v 1.0 as shown at http://oss.oracle.com/licenses/upl
   9    
  10    or the following license:
  11    
  12    Redistribution and use in source and binary forms, with or without modification, are permitted
  13    provided that the following conditions are met:
  14    
  15    1. Redistributions of source code must retain the above copyright notice, this list of conditions
  16    and the following disclaimer.
  17    
  18    2. Redistributions in binary form must reproduce the above copyright notice, this list of
  19    conditions and the following disclaimer in the documentation and/or other materials provided with
  20    the distribution.
  21    
  22    3. Neither the name of the copyright holder nor the names of its contributors may be used to
  23    endorse or promote products derived from this software without specific prior written permission.
  24    
  25    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
  26    IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  27    FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
  28    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  29    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  30    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  31    WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
  32    WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  33 -->
  34 <schema targetNamespace="org.openjdk.jmc.console.ui" xmlns="http://www.w3.org/2001/XMLSchema">
  35 <annotation>
  36       <appInfo>
  37          <meta.schema plugin="org.openjdk.jmc.console.ui" id="consolepage" name="Console Page"/>
  38       </appInfo>
  39       <documentation>
  40          This extension point is used to add new pages to the JDK Mission Control Console.
  41       </documentation>
  42    </annotation>
  43 
  44    <element name="extension">
  45       <annotation>
  46          <appInfo>
  47             <meta.element />
  48          </appInfo>
  49       </annotation>
  50       <complexType>
  51          <choice minOccurs="1" maxOccurs="unbounded">
  52             <element ref="consolePage"/>
  53          </choice>
  54          <attribute name="point" type="string" use="required">
  55             <annotation>
  56                <documentation>
  57                   
  58                </documentation>
  59             </annotation>
  60          </attribute>
  61          <attribute name="id" type="string">
  62             <annotation>
  63                <documentation>
  64                   
  65                </documentation>
  66             </annotation>
  67          </attribute>
  68          <attribute name="name" type="string">
  69             <annotation>
  70                <documentation>
  71                   
  72                </documentation>
  73                <appInfo>
  74                   <meta.attribute translatable="true"/>
  75                </appInfo>
  76             </annotation>
  77          </attribute>
  78       </complexType>
  79    </element>
  80 
  81    <element name="consolePage">
  82       <complexType>
  83          <attribute name="id" type="string" use="required">
  84             <annotation>
  85                <documentation>
  86                   A unique identifier for this page.
  87                </documentation>
  88             </annotation>
  89          </attribute>
  90          <attribute name="class" type="string" use="required">
  91             <annotation>
  92                <documentation>
  93                   The class adding the page UI. This is accomplished through dependency injection. It is described in the package documentation of org.openjdk.jmc.console.ui.editor.
  94                </documentation>
  95                <appInfo>
  96                   <meta.attribute kind="java"/>
  97                </appInfo>
  98             </annotation>
  99          </attribute>
 100          <attribute name="name" type="string">
 101             <annotation>
 102                <documentation>
 103                   The title to use for the form page.
 104                </documentation>
 105                <appInfo>
 106                   <meta.attribute translatable="true"/>
 107                </appInfo>
 108             </annotation>
 109          </attribute>
 110          <attribute name="hostEditorId" type="string" use="required">
 111             <annotation>
 112                <documentation>
 113                   The editor id to add the page to.
 114                </documentation>
 115                <appInfo>
 116                   <meta.attribute kind="identifier" basedOn="org.eclipse.ui.editors/editor/@id"/>
 117                </appInfo>
 118             </annotation>
 119          </attribute>
 120          <attribute name="icon" type="string">
 121             <annotation>
 122                <documentation>
 123                   The icon to use for the page.
 124                </documentation>
 125                <appInfo>
 126                   <meta.attribute kind="resource"/>
 127                </appInfo>
 128             </annotation>
 129          </attribute>
 130          <attribute name="placement" type="string">
 131             <annotation>
 132                <documentation>
 133                   A placement string used to order form pages within a group, by string comparison. Pages with unspecified placement may be placed anywhere, but typically end up after pages with specified placement.
 134                </documentation>
 135             </annotation>
 136          </attribute>
 137          <attribute name="helpContextID" type="string">
 138             <annotation>
 139                <documentation>
 140                   The identifier for context sensitive help for the tab. Combined with org.eclipse.help.contexts extension.
 141                </documentation>
 142             </annotation>
 143          </attribute>
 144          <attribute name="isSupportedClass" type="string">
 145             <annotation>
 146                <documentation>
 147                   A predicate class that can answer whether this page should be visible or not.
 148                </documentation>
 149                <appInfo>
 150                   <meta.attribute kind="java" basedOn=":org.openjdk.jmc.console.ui.editor.IConsolePageSupportTester"/>
 151                </appInfo>
 152             </annotation>
 153          </attribute>
 154       </complexType>
 155    </element>
 156 
 157    <annotation>
 158       <appInfo>
 159          <meta.section type="since"/>
 160       </appInfo>
 161       <documentation>
 162          6.0.0
 163       </documentation>
 164    </annotation>
 165 
 166    <annotation>
 167       <appInfo>
 168          <meta.section type="examples"/>
 169       </appInfo>
 170       <documentation>
 171          &lt;pre&gt;
 172 &lt;extension point=&quot;org.openjdk.jmc.console.ui.consolepage&quot;&gt;
 173     &lt;formPage
 174        class=&quot;com.example.consolepage.HelloWorldPage&quot;
 175        hostEditorId=&quot;org.openjdk.jmc.console.ui.editor&quot;
 176        icon=&quot;/icons/data.gif&quot;
 177        id=&quot;com.example.consolepage.HelloWorldPage&quot;
 178        title=&quot;Hello World&quot;&gt;  
 179     &lt;/formPage&gt; 
 180 &lt;/extension&gt;
 181 
 182 package com.example.consolepage;
 183 
 184 import javax.inject.Inject;
 185 
 186 import org.eclipse.ui.forms.IManagedForm;
 187 
 188 public class HelloWorldPage
 189 {
 190    @Inject
 191    protected void createPageContent(IManagedForm managedForm) 
 192    {
 193       managedForm.getToolkit().createLabel(managedForm.getForm().getBody(), &quot;Hello, world!&quot;);
 194    }
 195 }
 196 &lt;/pre&gt;
 197       </documentation>
 198    </annotation>
 199 
 200 
 201 
 202    <annotation>
 203       <appInfo>
 204          <meta.section type="copyright"/>
 205       </appInfo>
 206       <documentation>
 207          Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
 208       </documentation>
 209    </annotation>
 210 
 211 </schema>