if (item.commands != null) { Command[] commands = (Command[]) item.commands.toArray( new Command[item.commands.size()] );
if (item.commands != null && this.itemCommands != null) {   Command[] commands = (Command[]) this.itemCommands.toArray( new Command[this.itemCommands.size()] );
	protected void removeItemCommands( Item item ) {		if (item.commands != null) {			Command[] commands = (Command[]) item.commands.toArray( new Command[item.commands.size()] );			for (int i = 0; i < commands.length; i++) {				Command command = commands[i];				//#ifdef tmp.useExternalMenuBar					this.menuBar.removeCommand(command);				//#else					removeCommand(command);				//#endif			}		}		if (this.focusedItem == item) {			this.focusedItem = null;		}		//#ifdef tmp.useExternalMenuBar			if (isShown()) {				repaint();			}		//#endif	}