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>
  • 相关阅读:
    [置顶] Docker学习总结(3)——Docker实战之入门以及Dockerfile(三)
    [置顶] Docker学习总结(2)——Docker实战之入门以及Dockerfile(二)
    Vue-Router中History模式【华为云分享】
    Linux系统通过FTP进行文档基本操作【华为云分享】
    窥探日志的秘密【华为云分享】
    弹性负载均衡:负载无限,均衡有道【华为云分享】
    不给糖果就捣乱,用Python绘制有趣的万圣节南瓜怪【华为云分享】
    机器学习笔记(八)---- 神经网络【华为云分享】
    还在为运维烦恼?体验云上运维服务,提意见赢好礼!【华为云分享】
    Vue+ElementUI项目使用webpack输出MPA【华为云分享】
  • 原文地址:https://www.cnblogs.com/iiiDragon/p/3298843.html
Copyright © 2011-2022 走看看