zoukankan      html  css  js  c++  java
  • Eclipse One Inspector

    net.sf.yari.eclipse.EclipseInspectorViewPart

    Through the outline of EclipseInspectorViewPart, we can get known how the above "Eclipse Inspector" view is created and what is happening when clicking some buttons or view opening or refreshing or setting memento, etc.

    plugin.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <?eclipse version="3.2"?>
    <plugin> 
    <!-- expose this extension to outside -->
    <extension-point id="net.sf.yari.eclipse" name="inspection" schema="schema/net.sf.yari.eclipse.exsd"/> <extension point="org.eclipse.ui.views"> <view category="net.sf.yari.category" class="net.sf.yari.eclipse.EclipseInspectorViewPart" <!--Create a view and content inside of view--> icon="icons/16x16/dialog-information.png" id="net.sf.yari.eclipseInspectorView" name="Eclipse Inspector"> </view> </extension> <extension point="org.eclipse.ui.commands"> <command defaultHandler="net.sf.yari.eclipse.handler.EvaluateExpressionHandler" <!--command handler--> description="opens a dialog where eclipse expressions can be validated" id="net.sf.yari.openExpressionEvalutatorCommand" name="Open Expression Evaluator"><!--MainMenu/YARI/Open Expression Evaluator--> </command> <command defaultHandler="net.sf.yari.ui.internal.handler.OpenViewHandler"<!--command handler--> description="opens a dialog which contains all available views" id="net.sf.yari.eclipse.openViewList" name="Open ViewSelection dialog"> <!--MainMenu/YARI/Open ViewSelection dialog--> </command> </extension> <extension point="org.eclipse.ui.menus"> <menuContribution locationURI="menu:yari?before=eclipse"> <command commandId="net.sf.yari.openExpressionEvalutatorCommand" id="net.sf.yari.menuContribution.expressionEvalutator" style="push" tooltip="Open a dialog where eclipse expressions can be evaluated"> </command> <command commandId="net.sf.yari.eclipse.openViewList" id="net.sf.yari.menuContribution.openViewList" style="push" tooltip="Opens a dialog which contains all available views"> </command> </menuContribution> </extension> <extension point="net.sf.yari.eclipse"> <!--extension itself point which just is exposed--> <eclipseInspection lookupClass="net.sf.yari.eclipse.internal.ContributionLookup"> </eclipseInspection> <!--set property of EclipseInspection interface by create a new object of ContributionLookup--> <eclipseInspection lookupClass="net.sf.yari.eclipse.internal.MenuEntriesLookup"> </eclipseInspection> <eclipseInspection lookupClass="net.sf.yari.eclipse.internal.WorkbenchLookup"> </eclipseInspection> <eclipseInspection lookupClass="net.sf.yari.eclipse.internal.BundlesLookup"> </eclipseInspection> <eclipseInspection lookupClass="net.sf.yari.eclipse.internal.JavaStuffLookup"> </eclipseInspection> </extension> </plugin>

    schema/net.sf.yari.eclipse.exsd

    <?xml version='1.0' encoding='UTF-8'?>
    <!-- Schema file written by PDE -->
    <schema targetNamespace="net.sf.yari.eclipse" xmlns="http://www.w3.org/2001/XMLSchema">
    <annotation>
          <appInfo>
             <meta.schema plugin="net.sf.yari.eclipse" id="net.sf.yari.eclipse" name="inspection"/>
          </appInfo>
          <documentation>
             [Enter description of this extension point.]
          </documentation>
       </annotation>
       <element name="extension">
          <annotation>
             <appInfo>
                <meta.element />
             </appInfo>
          </annotation>
          <complexType>
             <choice>
                <element ref="eclipseInspection" minOccurs="1" maxOccurs="unbounded"/>
             </choice>
             <attribute name="point" type="string" use="required">
                <annotation>
                   <documentation>                  
                   </documentation>
                </annotation>
             </attribute>
             <attribute name="id" type="string">
                <annotation>
                   <documentation>                  
                   </documentation>
                </annotation>
             </attribute>
             <attribute name="name" type="string">
                <annotation>
                   <documentation>                  
                   </documentation>
                   <appInfo>
                      <meta.attribute translatable="true"/>
                   </appInfo>
                </annotation>
             </attribute>
          </complexType>
       </element>
       <element name="eclipseInspection">
          <annotation>
             <documentation>
                hook for inspecting eclipse stuff
             </documentation>
          </annotation>
          <complexType>
             <attribute name="lookupClass" type="string" use="required"> <!--lookupClass property to look up all related class-->
                <annotation>
                   <documentation>                  
                   </documentation>
                   <appInfo>
                      <meta.attribute kind="java" basedOn=":net.sf.yari.eclipse.IEclipseInspection"/>
                   </appInfo>
                </annotation>
             </attribute>
          </complexType>
       </element>
       <annotation>
          <appInfo>
             <meta.section type="since"/>
          </appInfo>
          <documentation>
             [Enter the first release in which this extension point appears.]
          </documentation>
       </annotation>
       <annotation>
          <appInfo>
             <meta.section type="examples"/>
          </appInfo>
          <documentation>
             [Enter extension point usage example here.]
          </documentation>
       </annotation>
       <annotation>
          <appInfo>
             <meta.section type="apiinfo"/>
          </appInfo>
          <documentation>
             [Enter API information here.]
          </documentation>
       </annotation>
       <annotation>
          <appInfo>
             <meta.section type="implementation"/>
          </appInfo>
          <documentation>
             [Enter information about supplied implementation of this extension point.]
          </documentation>
       </annotation>
    </schema>
  • 相关阅读:
    Linux如何设置时区/时间/上海时间
    Anaconda Python3.7环境 import _ssl DLL load failed(ImportError:DLL load failed:找不到指定模块)
    一行命令搞定/usr/bin/perl^M: bad interpreter
    Embed MP4 in HTML using flash-player(html5 video player)
    mp4文件转码为m3u8
    Python 下载图片的三种方法
    图解MySQL 内连接、外连接、左连接、右连接、全连接……太多了
    DOS批处理中%~dp0表示什么意思
    Android学习探索之App多渠道打包及动态添加修改资源属性
    Android学习探索之运用MVP设计模式实现项目解耦
  • 原文地址:https://www.cnblogs.com/iiiDragon/p/3298843.html
Copyright © 2011-2022 走看看