开发者

How to enable a menu in Eclipse depending on the EXE file

I want to disable a context menu item in Eclipse plugin bases on the EXE file. I mean, I want to enable the menu only when my EXE file is installed in the user's system. Otherwise it should 开发者_开发问答be in disable mode. What is the way to do it?


There are no easy way to do this.

The normal options are

  • have a special option in the test system (which can be spoofed...)
  • have a PropertyTester that can test some special different between the systems

The first option is very easy, but can also easily be spoofed.

To do the later, you must

  • create and declare a PropertyTester
  • add a activeWhen or visibleWhen expression to the relevant menu entries, which use test expression element to get the value from the property tester
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜