toggles context tool panel off/on sets the controls with the selected element's settings
508278
function showPanel(on) {
		$('#marker_panel').toggle(on);

		if(on) {
			var el = selElems[0];
			var val;
			var ci;

			$.each(mtypes, function(i, pos) {
				var m = getLinked(el, "marker-" + pos);
				var txtbox = $('#' + pos + '_marker');
				if (!m) {
					val = '\\nomarker';
					ci = val;
					txtbox.hide(); // hide text box
				} else {
					if (!m.attributes.se_type) {return;} // not created by this extension
					val = '\\' + m.attributes.se_type.textContent;
					ci = val;
					if (val === '\\textmarker') {
						val = m.lastChild.textContent;
						//txtbox.show(); // show text box
					} else {
						txtbox.hide(); // hide text box
					}
				}
				txtbox.val(val);				
				setIcon(pos,ci);
			});
		}
	}
793523
function disableHandler(e) {
    const element = e.detail.element;

    that.remove(element);
    clearToolOptionsByElement(element);
  }
981508
public void disableToolbarButtons() {

        for (Widget button : m_toolbar.getAll()) {
            if (button instanceof I_CmsToolbarButton) {
                ((I_CmsToolbarButton)button).setEnabled(false);
            }
        }
        m_toolbar.setVisible(false);
    }
1255849
function ItemEventsHandler_toggleItemSelection(itemIndex) {
                    var site = this._site,
                        selection = site.selection,
                        selected = selection._isIncluded(itemIndex);

                    if (site.selectionMode === _UI.SelectionMode.single) {
                        if (!selected) {
                            selection.set(itemIndex);
                        } else {
                            selection.clear();
                        }
                    } else {
                        if (!selected) {
                            selection.add(itemIndex);
                        } else {
                            selection.remove(itemIndex);
                        }
                    }
                }
1031131
private void initContextPanel(AbstractContextPropertiesPanel contextPanel) {
		Context ctx = uiContexts.get(contextPanel.getContextIndex());
		if (ctx != null) {
			contextPanel.initContextData(session, ctx);
		}
	}
609565
public void setToolDefault(int tool, boolean enabled) {
        switch (tool) {
            case IBurpExtenderCallbacks.TOOL_PROXY:
                if (mCallbacks.loadExtensionSetting(SETTING_PROXY) == null) {
                    jCheckBoxProxy.setSelected(enabled);
                }
                break;
            case IBurpExtenderCallbacks.TOOL_REPEATER:
                if (mCallbacks.loadExtensionSetting(SETTING_REPEATER) == null) {
                    jCheckBoxRepeater.setSelected(enabled);
                }
                break;
            case IBurpExtenderCallbacks.TOOL_SCANNER:
                if (mCallbacks.loadExtensionSetting(SETTING_SCANNER) == null) {
                    jCheckBoxScanner.setSelected(enabled);
                }
                break;
            case IBurpExtenderCallbacks.TOOL_INTRUDER:
                if (mCallbacks.loadExtensionSetting(SETTING_INTRUDER) == null) {
                    jCheckBoxIntruder.setSelected(enabled);
                }
                break;
            case IBurpExtenderCallbacks.TOOL_SEQUENCER:
                if (mCallbacks.loadExtensionSetting(SETTING_SEQUENCER) == null) {
                    jCheckBoxProxy.setSelected(enabled);
                }
                break;
            case IBurpExtenderCallbacks.TOOL_SPIDER:
                if (mCallbacks.loadExtensionSetting(SETTING_SPIDER) == null) {
                    jCheckBoxSpider.setSelected(enabled);
                }
                break;
            case IBurpExtenderCallbacks.TOOL_EXTENDER:
                if (mCallbacks.loadExtensionSetting(SETTING_EXTENDER) == null) {
                    jCheckBoxExtender.setSelected(enabled);
                }
                break;
            default:
                break;
        }
    }
909825
function (settings) {
        var self = this;

        settings.autohide = true;
        settings.constrainToViewport = true;

        if (typeof settings.items === 'function') {
          settings.itemsFactory = settings.items;
          settings.items = [];
        }

        if (settings.itemDefaults) {
          var items = settings.items, i = items.length;

          while (i--) {
            items[i] = Tools.extend({}, settings.itemDefaults, items[i]);
          }
        }

        self._super(settings);
        self.classes.add('menu');
      }
1009708
function() {
    this.setColour(Blockly.Blocks.logic.HUE);
    this.appendDummyInput()
        .appendField(Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE);
    this.setPreviousStatement(true);
    this.setTooltip(Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP);
    this.contextMenu = false;
  }
667419
public static void toggleKeyPad(Context context) {
		InputMethodManager imm = (InputMethodManager) context
				.getSystemService(Context.INPUT_METHOD_SERVICE);
		if (imm != null) {
			imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
		}
	}
840753
function clearToolOptionsByElement(element) {
  for (const toolType in elementToolOptions) {
    elementToolOptions[toolType] = elementToolOptions[toolType].filter(
      toolOptionObject => toolOptionObject.element !== element
    );
  }
}
428614
@SuppressLint("RestrictedApi")
    public static void hideStatusBar(Context context) {
        if (Jzvd.TOOL_BAR_EXIST) {
            JZUtils.getWindow(context).setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
        }
    }
1293361
protected void toggleSelectionList(Context ctx) {
        if (mDrawer != null) {
            //if we already show the list. reset everything instead
            if (mDrawer.switchedDrawerContent()) {
                resetDrawerContent(ctx);
                mSelectionListShown = false;
            } else {
                //build and set the drawer selection list
                buildDrawerSelectionList();

                // update the arrow image within the drawer
                mAccountSwitcherArrow.clearAnimation();
                ViewCompat.animate(mAccountSwitcherArrow).rotation(180).start();
                //mAccountSwitcherArrow.setImageDrawable(new IconicsDrawable(ctx, MaterialDrawerFont.Icon.mdf_arrow_drop_up).sizeRes(R.dimen.material_drawer_account_header_dropdown).paddingRes(R.dimen.material_drawer_account_header_dropdown_padding).color(ColorHolder.color(mTextColor, ctx, R.attr.material_drawer_header_selection_text, R.color.material_drawer_header_selection_text)));
                mSelectionListShown = true;
            }
        }
    }
188556
function () {
        var self = this, settings = self.settings, elm, box, parent, name, parentEventsRoot;

        self.$el = $(self.getEl());
        self.state.set('rendered', true);

        // Bind on<event> settings
        for (name in settings) {
          if (name.indexOf("on") === 0) {
            self.on(name.substr(2), settings[name]);
          }
        }

        if (self._eventsRoot) {
          for (parent = self.parent(); !parentEventsRoot && parent; parent = parent.parent()) {
            parentEventsRoot = parent._eventsRoot;
          }

          if (parentEventsRoot) {
            for (name in parentEventsRoot._nativeEvents) {
              self._nativeEvents[name] = true;
            }
          }
        }

        bindPendingEvents(self);

        if (settings.style) {
          elm = self.getEl();
          if (elm) {
            elm.setAttribute('style', settings.style);
            elm.style.cssText = settings.style;
          }
        }

        if (self.settings.border) {
          box = self.borderBox;
          self.$el.css({
            'border-top-width': box.top,
            'border-right-width': box.right,
            'border-bottom-width': box.bottom,
            'border-left-width': box.left
          });
        }

        // Add instance to lookup
        var root = self.getRoot();
        if (!root.controlIdLookup) {
          root.controlIdLookup = {};
        }

        root.controlIdLookup[self._id] = self;

        for (var key in self._aria) {
          self.aria(key, self._aria[key]);
        }

        if (self.state.get('visible') === false) {
          self.getEl().style.display = 'none';
        }

        self.bindStates();

        self.state.on('change:visible', function (e) {
          var state = e.value, parentCtrl;

          if (self.state.get('rendered')) {
            self.getEl().style.display = state === false ? 'none' : '';

            // Need to force a reflow here on IE 8
            self.getEl().getBoundingClientRect();
          }

          // Parent container needs to reflow
          parentCtrl = self.parent();
          if (parentCtrl) {
            parentCtrl._lastRect = null;
          }

          self.fire(state ? 'show' : 'hide');

          ReflowQueue.add(self);
        });

        self.fire('postrender', {}, false);
      }
387483
private void initContextMenauAndToolBar() {
        toolbar = new JToolBar();
        toolbar.add(new Button(saveAction));
        toolbar.add(new Button(printAction));
        toolbar.addSeparator();
        toolbar.add(new Button(zoomInAction));
        toolbar.add(new Button(zoomOutAction));
        toolbar.add(new Button(resetAction));
        toolbar.addSeparator();
        toolbar.add(new Button(enlargePlotAreaAction));
        toolbar.add(new Button(shrinkPlotAreaAction));
        toolbar.add(new Button(increaseHeightAction));
        toolbar.add(new Button(decreaseHeightAction));
        toolbar.add(new Button(increaseWidthAction));
        toolbar.add(new Button(decreaseWidthAction));
        toolbar.addSeparator();
        toolbar.add(new Button(propertyAction));
    
        decreaseHeightAction.setEnabled(false);
        decreaseWidthAction.setEnabled(false);
        
        //Initialize popup menu.
        popup = new JPopupMenu();        
        popup.add(new JMenuItem(saveAction));
        popup.add(new JMenuItem(printAction));
        popup.addSeparator();
        popup.add(new JMenuItem(zoomInAction));
        popup.add(new JMenuItem(zoomOutAction));
        popup.add(new JMenuItem(resetAction));
        popup.addSeparator();
        popup.add(new JMenuItem(enlargePlotAreaAction));
        popup.add(new JMenuItem(shrinkPlotAreaAction));
        popup.add(new JMenuItem(increaseHeightAction));
        popup.add(new JMenuItem(decreaseHeightAction));
        popup.add(new JMenuItem(increaseWidthAction));
        popup.add(new JMenuItem(decreaseWidthAction));
        popup.addSeparator();
        popup.add(new JMenuItem(propertyAction));
        
        AncestorListener ancestorListener = new AncestorListener() {

            @Override
            public void ancestorAdded(AncestorEvent ae) {
                boolean inScrollPane = false;
                Container parent = getParent();
                while (parent != null) {
                    if (parent instanceof JScrollPane) {
                        inScrollPane = true;
                        scrollPane = (JScrollPane) parent;
                        break;
                    }
                    
                    parent = parent.getParent();
                }
                
                increaseHeightAction.setEnabled(inScrollPane);
                increaseWidthAction.setEnabled(inScrollPane);
            }

            @Override
            public void ancestorRemoved(AncestorEvent ae) {
            }

            @Override
            public void ancestorMoved(AncestorEvent ae) {
            }
        };
        
        addAncestorListener(ancestorListener);
    }
283935
function (context) {
                var oElement;
                var oFocusControl;
                var that = context;
                var defaultFocusableElements = [that._mParameters.firstFocusable, that._mParameters.lastFocusable];
                // jQuery custom selectors ":sapTabbable"
                var aTabbables = jQuery(":sapTabbable", that.$()).get();

                // search the first tabbable element
                for (var i = 0; i < aTabbables.length; i++) {
                    if (defaultFocusableElements.indexOf(aTabbables[i].id) === -1) {
                        oElement = aTabbables[i];
                        break;
                    }
                }

                // If a tabbable element is part of a control, focus the control instead
                // jQuery Plugin "control"
                oFocusControl = jQuery(oElement).control();
                if (oFocusControl[0]) {
                    var oFocusDomRef = oFocusControl[0].getFocusDomRef();
                    oElement = oFocusDomRef || oElement;
                } else {
                    // if there is no tabbable element in the content use the first fake
                    // element to set the focus to the toolpopup
                    oElement = defaultFocusableElements[0] ? window.document.getElementById(defaultFocusableElements[0]) : null;
                }

                // oElement might not be available if this function is called during destroy
                if (oElement) {
                    if (oElement) {
                        oElement.focus();
                    }
                    that._sInitialFocusId = oElement.id;
                }
            }
1115892
function(e) {
            var $this = $(this).closest('.context-menu-item'),
                data = $this.data(),
                opt = data.contextMenu,
                root = data.contextMenuRoot;

            root.$selected = opt.$selected = $this;
            root.isInput = opt.isInput = true;
        }
274315
def toggle_settings(
        toolbar=False, nbname=False, hideprompt=False, kernellogo=False):
    """"""

    toggle = ''
    if toolbar:
        toggle += 'div#maintoolbar {margin-left: 8px !important;}\n'
        toggle += '.toolbar.container {width: 100% !important;}\n'
    else:
        toggle += 'div#maintoolbar {display: none !important;}\n'
    if nbname:
        toggle += ('span.save_widget span.filename {margin-left: 8px; height: initial;'
                   'font-size: 100%; color: @nb-name-fg; background-color:'
                   '@cc-input-bg;}\n')
        toggle += ('span.save_widget span.filename:hover {color:'
                   '@nb-name-hover; background-color: @cc-input-bg;}\n')
        toggle += ('#menubar {padding-top: 4px; background-color:'
                   '@notebook-bg;}\n')
    else:
        toggle += '#header-container {display: none !important;}\n'
    if hideprompt:
        toggle += 'div.prompt.input_prompt {display: none !important;}\n'
        toggle += 'div.prompt.output_prompt {width: 5ex !important;}\n'
        toggle += 'div.out_prompt_overlay.prompt:hover {width: 5ex !important; min-width: 5ex !important;}\n'
        toggle += (
            '.CodeMirror-gutters, .cm-s-ipython .CodeMirror-gutters'
            '{ position: absolute; left: 0; top: 0; z-index: 3; width: 2em; '
            'display: inline-block !important; }\n')
        toggle += ('div.cell.code_cell .input { border-left: 5px solid @cm-gutters !important; border-bottom-left-radius: 5px; border-top-left-radius: 5px; }\n')
    if kernellogo:
        toggle += '@kernel-logo-display: block;'
    else:
        toggle += '@kernel-logo-display: none;'

    return toggle