当软件包错误信息时,如何在软件包上显示错误标志? [英] How to display an error sign on the Package when the Package has wrong information?

查看:115
本文介绍了当软件包错误信息时,如何在软件包上显示错误标志?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如你所知,如果包有一个编译错误,那么包将显示一个错误符号。
错误符号表示带有'X'的红色圆圈。



我的包还有一些其他类型的文件。 (它不是Java文件。)
如果用户修改文件,那么我的插件将检查该文件。
如果文件有错误的信息,应该在包上显示错误标志。



如何显示错误符号?

解决方案

我的插件中显示错误的方式是使用标记。



以下链接应该帮助你开始使用:
标记我的话



我有一些实现它们的问题,所以如果你遇到相同的错误,请随时看看我以前的问题:
Eclipse插件开发:创建给定资源的问题标记


As you know, If package has a compile error then the package display an error sign. Error sign means Red circle with 'X'.

My package has some other type file. (It is not a Java file.) If user modify the file then My plugin will inspect the file. And should display error sign on the package if the file has wrong information.

How can I display the error sign?

解决方案

The way I display errors within my plugin is through the use of Markers.

The following link should help you get started: Mark My Words

I had some problem with implementing them, so if you encounter the same error, feel free to take a look at my previous question: Eclipse Plug-in Development: Creating Problem Marker for a Given Resource

这篇关于当软件包错误信息时,如何在软件包上显示错误标志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆