eclipse插件中的MarkerSupportView引发“从所需的.class文件间接引用”错误

时间:2018-06-29 04:49:20

标签: java eclipse eclipse-plugin eclipse-cdt

  

我遇到错误“类型java.util.Map $ Entry不能为   解决。它是从所需的.class文件中间接引用的。”


导入org.eclipse.ui.views.markers.MarkerSupportView;

public class CustomMarkerView extends MarkerSupportView
{

    public CustomMarkerView(String contentGeneratorId) {
        super(contentGeneratorId);
        // TODO Auto-generated constructor stub
    }

}
  

我在plugin.xml中添加了以下代码以生成   CustomMarkerView。


<extension
        id="com.test.plugin.markers"
        name="VNR Markers"
        point="org.eclipse.core.resources.markers">

        <persistent value="true"></persistent>

        <super type="org.eclipse.core.resources.textmarker"></super>

        <attribute name="Name"></attribute>

    </extension>

    <!--creating new view for displaying the markers --> 

    <extension point="org.eclipse.ui.views"> 

        <view 
             class="vnrcheck.handlers.CustomMarkerView" 
             icon="icons/issue.png" 
             id="com.test.customMarker" 
             name="VNR Markers View"> 
        </view>

    </extension >

    <extension  
        point="org.eclipse.ui.ide.markerSupport"> 

        <markerContentGenerator 
            id="com.test.customMarkerGenerator" name="Custom Marker View">  

        <markerTypeReference 
            id="com.test.plugin.markers"/>   

        <markerFieldReference 
            id="org.eclipse.ui.ide.locationField"/>  

        <markerFieldReference 
            id="org.eclipse.ui.ide.resourceField"/>

        <markerFieldReference 
            id="com.test.value"/> 

        <markerFieldReference 
            id="com.test.methodname"/> 
        </markerContentGenerator>

        <markerField
            class="vnrcheck.handlers.Description"
            id="com.test.methodname"
            name="Description">
        </markerField>

         <markerField
            class="vnrcheck.handlers.Justification"
            id="com.test.value"
            name="Justification">
         </markerField>

    </extension>
  

我在我的项目中添加的依赖文件如下。

     

数量:

 org.eclipse.ui,
 org.eclipse.ui.part,
 org.eclipse.ui.texteditor,
 org.eclipse.ui.views.markers,
 org.eclipse.ui.views.markers.internal
     

插件:

 org.eclipse.ui,
 org.eclipse.core.runtime,
 org.eclipse.core.resources;bundle-version="3.7.101",
 org.eclipse.cdt;bundle-version="8.0.2",
 org.eclipse.cdt.ui;bundle-version="5.3.2",
 org.eclipse.cdt.core;bundle-version="5.3.2",
 org.eclipse.jface.text;bundle-version="3.7.2"

I will be very thankful if anybody provide me the right solution.

0 个答案:

没有答案