Java Code Examples for docking.action.MenuData#setMenuPath()

The following examples show how to use docking.action.MenuData#setMenuPath() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FindReferencesToDataTypeAction.java    From ghidra with Apache License 2.0 6 votes vote down vote up
private void updateMenuName(DataType type) {

		if (type == null) {
			return; // not sure if this can happen
		}

		String typeName = type.getName();
		String menuName = "Find Uses of " + typeName;

		String fieldName = getDataTypeField();
		if (fieldName != null) {
			menuName += '.' + fieldName;
		}

		MenuData data = getPopupMenuData().cloneData();
		data.setMenuPath(new String[] { LocationReferencesService.MENU_GROUP, menuName });
		setPopupMenuData(data);
	}
 
Example 2
Source File: FindReferencesToSymbolAction.java    From ghidra with Apache License 2.0 5 votes vote down vote up
private void updateMenuName(Symbol symbol) {

		if (symbol == null) {
			return; // not sure if this can happen
		}

		String symbolName = symbol.getName(false);
		String menuName = MENU_ITEM_TEXT + ' ' + symbolName;

		MenuData data = getPopupMenuData().cloneData();
		data.setMenuPath(new String[] { LocationReferencesService.MENU_GROUP, menuName });
		setPopupMenuData(data);
	}
 
Example 3
Source File: RecentlyUsedAction.java    From ghidra with Apache License 2.0 5 votes vote down vote up
private void updatePopupMenu(DataType dt) {
	MenuData popupData = getPopupMenuData();
	String displayName = dt == null ? "<empty>" : dt.getDisplayName();
	if (popupData != null) {
		popupData.setMenuPath(new String[] { "Data", "Last Used: " + displayName });
	}
	else {
		setPopupMenuData(new MenuData(new String[] { "Data", "Last Used: " + displayName },
			GROUP_NAME));
	}
}
 
Example 4
Source File: FindReferencesToField.java    From ghidra with Apache License 2.0 5 votes vote down vote up
private void updateMenuName(String name) {

		String menuName = ACTION_NAME + ' ' + name;
		MenuData data = getPopupMenuData().cloneData();
		data.setMenuPath(new String[] { menuName });
		setPopupMenuData(data);
	}