Is there a way of adding a custom menu annotation to properties? I want to add a functionality using a menu annotation. It would be nice if that custom menu item is shown on editors when right clicked on property.
This is definitely possible. I think you need to make a menu model factory, I am a bit fuzzy on the details.
Anyway, I think this example does what you want:
This file has been truncated.
//Copyright 2012-2021 Keysight Technologies
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
// Icon annotations can be used to provide custom context menu / right-click functionality
It should also be in the examples from the SDK package (Advanced Examples).