overwritten in Kwc_Menu_Trl_Events
510788
protected function _initSettings()
    {
        parent::_initSettings();
        $this->_emptyIfSingleEntry = $menuLevel = Kwc_Abstract::getSetting($this->_class, 'emptyIfSingleEntry');
    }
124073
def undo(self, key_value, modifier_mask):
        
        # TODO re-organize as request to controller which holds source-editor-view or any parent to it
        for key, tab in gui_singletons.main_window_controller.get_controller('states_editor_ctrl').tabs.items():
            if tab['controller'].get_controller('source_ctrl') is not None and \
                    react_to_event(self.view, tab['controller'].get_controller('source_ctrl').view.textview,
                                   (key_value, modifier_mask)) or \
                tab['controller'].get_controller('description_ctrl') is not None and \
                    react_to_event(self.view, tab['controller'].get_controller('description_ctrl').view.textview,
                                   (key_value, modifier_mask)):
                return False
        if self._selected_sm_model is not None:
            self._selected_sm_model.history.undo()
            return True
        else:
            logger.debug("Undo is not possible now as long as no state_machine is selected.")
512511
def rebind_events(self, *tks):
        
        for ref in self._refs:
            self._refs[ref].rebind(tks)
99379
def __Script_Editor_Output_plainTextEdit_contextMenuEvent(self, event):
        

        menu = self.Script_Editor_Output_plainTextEdit.createStandardContextMenu()
        menu.addSeparator()
        menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|Edit Selected Path",
            slot=self.__edit_selected_path_action__triggered))
        menu.exec_(event.globalPos())
107112
def _on_shortcut_changed(self, renderer, path, new_shortcuts):
        
        action = self.shortcut_list_store[int(path)][self.KEY_STORAGE_ID]
        old_shortcuts = self.gui_config_model.get_current_config_value("SHORTCUTS", use_preliminary=True)[action]

        from ast import literal_eval
        try:
            new_shortcuts = literal_eval(new_shortcuts)
            if not isinstance(new_shortcuts, list) and \
               not all([isinstance(shortcut, string_types) for shortcut in new_shortcuts]):
                raise ValueError()
        except (ValueError, SyntaxError):
            logger.warning("Shortcuts must be a list of strings")
            new_shortcuts = old_shortcuts

        shortcuts = self.gui_config_model.get_current_config_value("SHORTCUTS", use_preliminary=True,  default={})
        shortcuts[action] = new_shortcuts
        self.gui_config_model.set_preliminary_config_value("SHORTCUTS", shortcuts)
        self._select_row_by_column_value(self.view['shortcut_tree_view'], self.shortcut_list_store,
                                         self.KEY_STORAGE_ID, action)
494486
def keyPressEvent(self, event):
        
        if event.key() == QtCore.Qt.Key_F5 or \
           (event.key() == QtCore.Qt.Key_E and \
            event.modifiers() == QtCore.Qt.ControlModifier):
            code = str(self._edit.toPlainText())
            scope = self.viewWidget().codeScope()
            
            exec code in scope, scope
        else:
            super(XScriptView, self).keyPressEvent(event)
587898
protected function _onMenuChanged(Kwf_Events_Event_Abstract $event, Kwf_Component_Data $menu)
    {
        $this->fireEvent(new Kwf_Component_Event_Component_ContentChanged(
            $this->_class, $menu
        ));
    }
44360
protected void updateOverwriteExisting() {

        if (m_overwriteExisting != null) {
            boolean move = (m_dialogMode == DialogMode.move) || (m_actionCombo.getValue() == Action.move);
            if (move) {
                m_overwriteExisting.setValue(Boolean.FALSE);
                m_overwriteExisting.setVisible(false);
            } else {
                m_overwriteExisting.setVisible(true);
            }
        }
    }
1056583
private void menuEditCutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuEditCutActionPerformed
    final TabTitle title = this.getFocusedTab();
    if (title != null && title.getProvider().doesSupportCutCopyPaste()) {
      title.getProvider().doCut();
    }
    updateMenuItemsForProvider(title == null ? null : title.getProvider());
  }
1055518
def update(self, event_or_list):
        """"""

        event_or_list = super().update(event_or_list)

        for e in event_or_list:
            if e.type == KEYDOWN:
                if e.key == K_RIGHT:
                    if e.mod * KMOD_CTRL:
                        self.move_cursor_one_word(self.RIGHT)
                    else:
                        self.move_cursor_one_letter(self.RIGHT)

                elif e.key == K_LEFT:
                    if e.mod * KMOD_CTRL:
                        self.move_cursor_one_word(self.LEFT)
                    else:
                        self.move_cursor_one_letter(self.LEFT)

                elif e.key == K_BACKSPACE:
                    if self.cursor == 0:
                        continue

                    if e.mod & KMOD_CTRL:
                        self.delete_one_word(self.LEFT)
                    else:
                        self.delete_one_letter(self.LEFT)

                elif e.key == K_DELETE:
                    if e.mod & KMOD_CTRL:
                        self.delete_one_word(self.RIGHT)
                    else:
                        self.delete_one_letter(self.RIGHT)

                elif e.unicode != '' and e.unicode.isprintable():
                    self.add_letter(e.unicode)
267252
function (event) {
                if (!this._enabled) {
                    return;
                }
                event = new ariaDomEvent(event);
                if (ariaCoreBrowser.isSafari) {
                    event.ctrlKey = this._safariCtrlKey;
                }
                // ctrl right click only
                if (event.ctrlKey) {
                    // stop default behaviour, like opening real
                    // contextual menu
                    event.stopPropagation();
                    event.preventDefault();
                    var target = event.target;
                    this.__callContextualMenu(target, event.clientX, event.clientY);
                    event.$dispose();
                    return false;
                }
                event.$dispose();
            }
687146
private void _updateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event__updateActionPerformed
        jTextPane1.setText("");
        String text = new String(buffer, 0, pos);
        String[] lines = text.split("\n");

        Style style = jTextPane1.getStyle("INFO");
        for (String line : lines) {
            if (line.startsWith("o ")) {
                line = line.substring(2);
                style = jTextPane1.getStyle("OUTPUT");
            } else if (line.startsWith("i ")) {
                line = line.substring(2);
                style = jTextPane1.getStyle("INFO");
            } else if (line.startsWith("w ")) {
                line = line.substring(2);
                style = jTextPane1.getStyle("WARN");
            } else if (line.startsWith("e ")) {
                line = line.substring(2);
                style = jTextPane1.getStyle("ERROR");
            }

            try {
                jTextPane1.getDocument().insertString(jTextPane1.getDocument().getLength(), line + "\n", style);
                jTextPane1.setCaretPosition(jTextPane1.getDocument().getLength());
            } catch (Exception e) {
                 Log.Err.println(e.getMessage());
            }
        }
    }
982271
def contextMenuEvent(self, event):
        """"""
        self.setCurrentIndex(self.tabBar().tabAt(event.pos()))
        if self.menu:
            self.menu.popup(event.globalPos())
395375
private void cmdDuplicateMappingActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_duplicateMappingButtonActionPerformed
		Object[] currentSelection = mappingList.getSelectedValues();
		if (currentSelection == null) {
			JOptionPane.showMessageDialog(this, "No mappings have been selected", "ERROR", JOptionPane.ERROR_MESSAGE);
			return;
		}
		int confirm = JOptionPane.showConfirmDialog(
				this,
				"This will create copies of the selected mappings. \nNumber of mappings selected = "
				+ currentSelection.length + "\nContinue? ", 
				"Copy confirmation", 
				JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
		
		if (confirm == JOptionPane.NO_OPTION || confirm == JOptionPane.CANCEL_OPTION || confirm == JOptionPane.CLOSED_OPTION) {
			return;
		}
		OBDAModel controller = apic;
		URI current_srcuri = selectedSource.getSourceID();

		for (int i = 0; i < currentSelection.length; i++) {
			SQLPPTriplesMap mapping = (SQLPPTriplesMap) currentSelection[i];

			String id = mapping.getId();

			// Computing the next available ID
			int new_index = -1;
			for (int index = 0; index < 999999999; index++) {
				if (controller.indexOf(current_srcuri, id + "(" + index + ")") == -1) {
					new_index = index;
					break;
				}
			}
			String newId = id + "(" + new_index + ")";

			// inserting the new mapping
			try {

				SQLPPTriplesMap oldmapping = controller.getTriplesMap(id);
				SQLPPTriplesMap newmapping = new OntopNativeSQLPPTriplesMap(newId, oldmapping.getSourceQuery(),
                        oldmapping.getTargetAtoms());
				controller.addTriplesMap(current_srcuri, newmapping, false);

			} catch (DuplicateMappingException e) {
				JOptionPane.showMessageDialog(this, "Duplicate Mapping: " + newId);
				return;
			}
		}

	}
41774
def leaveEvent(self, event):
        
        super(FoldingPanel, self).leaveEvent(event)
        QtWidgets.QApplication.restoreOverrideCursor()
        self._highlight_runner.cancel_requests()
        if not self.highlight_caret_scope:
            self._clear_scope_decos()
            self._mouse_over_line = None
            self._current_scope = None
        else:
            self._block_nbr = -1
            self._highlight_caret_scope()
        self.editor.repaint()
1217003
function (p_sType, p_aArgs) {

    this.cfg.subscribeToConfigEvent(_VISIBLE, this._onVisibleChange);

    var bRootMenu = !this.parent,
        bLazyLoad = this.lazyLoad;


    /*
        Automatically initialize a menu's subtree if:

        1) This is the root menu and lazyload is off
        
        2) This is the root menu, lazyload is on, but the menu is 
           already visible

        3) This menu is a submenu and lazyload is off
    */



    if (((bRootMenu && !bLazyLoad) || 
        (bRootMenu && (this.cfg.getProperty(_VISIBLE) || 
        this.cfg.getProperty(_POSITION) == _STATIC)) || 
        (!bRootMenu && !bLazyLoad)) && this.getItemGroups().length === 0) {

        if (this.srcElement) {

            this._initSubTree();
        
        }


        if (this.itemData) {

            this.addItems(this.itemData);

        }
    
    }
    else if (bLazyLoad) {

        this.cfg.fireQueue();
    
    }

}
811724
private void txtQueryEditorKeyPressed(java.awt.event.KeyEvent evt) {// GEN-FIRST:event_txtQueryEditorKeyPressed
		// If users typed CTRL+E
		if ((evt.getKeyCode() == KeyEvent.VK_E) && ((evt.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
			executeQuery();
			txtClassUriTemplate.requestFocus();
		}
	}