private static void saveState(TreeAction action, boolean state) { if (action instanceof PropertyOwner) { final String propertyName = ((PropertyOwner) action).getPropertyName(); PropertiesComponent.getInstance() .setValue(getPropertyName(propertyName), Boolean.toString(state)); } }
public void saveInitialCheckBoxState(boolean state) { PropertiesComponent propertiesComponent = PropertiesComponent.getInstance(myProject); if (Boolean.TRUE .toString() .equals(propertiesComponent.getValue("GoToAction.toSaveAllIncluded"))) { propertiesComponent.setValue("GoToAction.allIncluded", Boolean.toString(state)); } }
@Override public void dispose() { PropertiesComponent instance = PropertiesComponent.getInstance(); instance.setValue(PROP_SORTED, Boolean.toString(isAlphabeticallySorted())); instance.setValue(PROP_SHOWCLASSES, Boolean.toString(myShowClasses)); if (myCopyJavadocCheckbox != null) { instance.setValue(PROP_COPYJAVADOC, Boolean.toString(myCopyJavadocCheckbox.isSelected())); } final Container contentPane = getContentPane(); if (contentPane != null) { contentPane.removeAll(); } mySelectedNodes.clear(); myElements = null; super.dispose(); }
public XDebuggerTree( final @NotNull Project project, final @NotNull XDebuggerEditorsProvider editorsProvider, final @Nullable XSourcePosition sourcePosition, final @NotNull String popupActionGroupId, @Nullable XValueMarkers<?, ?> valueMarkers) { myValueMarkers = valueMarkers; myProject = project; myEditorsProvider = editorsProvider; mySourcePosition = sourcePosition; myTreeModel = new DefaultTreeModel(null); setModel(myTreeModel); setCellRenderer(new XDebuggerTreeRenderer()); new TreeLinkMouseListener(new XDebuggerTreeRenderer()) { @Override protected boolean doCacheLastNode() { return false; } @Override protected void handleTagClick(@Nullable Object tag, @NotNull MouseEvent event) { if (tag instanceof XDebuggerTreeNodeHyperlink) { ((XDebuggerTreeNodeHyperlink) tag).onClick(event); } } }.installOn(this); setRootVisible(false); setShowsRootHandles(true); new DoubleClickListener() { @Override protected boolean onDoubleClick(MouseEvent e) { return expandIfEllipsis(); } }.installOn(this); addKeyListener( new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { int key = e.getKeyCode(); if (key == KeyEvent.VK_ENTER || key == KeyEvent.VK_SPACE || key == KeyEvent.VK_RIGHT) { expandIfEllipsis(); } } }); if (Boolean.valueOf(System.getProperty("xdebugger.variablesView.rss"))) { new XDebuggerTreeSpeedSearch(this, SPEED_SEARCH_CONVERTER); } else { new TreeSpeedSearch(this, SPEED_SEARCH_CONVERTER); } final ActionManager actionManager = ActionManager.getInstance(); addMouseListener( new PopupHandler() { @Override public void invokePopup(final Component comp, final int x, final int y) { ActionGroup group = (ActionGroup) actionManager.getAction(popupActionGroupId); actionManager .createActionPopupMenu(ActionPlaces.UNKNOWN, group) .getComponent() .show(comp, x, y); } }); registerShortcuts(); setTransferHandler(DEFAULT_TRANSFER_HANDLER); addComponentListener(myMoveListener); }
private static void setToShowTextField(boolean toShowTextField) { PropertiesComponent.getInstance() .setValue(FILE_CHOOSER_SHOW_PATH_PROPERTY, Boolean.toString(toShowTextField)); }
private void updateValidProperty() { Boolean oldValid = Boolean.valueOf(myValid); myValid = isEditorValidImpl(); myTextEditor.firePropertyChange(FileEditor.PROP_VALID, oldValid, Boolean.valueOf(myValid)); }
/** Updates "modified" property and fires event if necessary */ void updateModifiedProperty() { Boolean oldModified = Boolean.valueOf(myModified); myModified = isModifiedImpl(); myTextEditor.firePropertyChange( FileEditor.PROP_MODIFIED, oldModified, Boolean.valueOf(myModified)); }