/** * This is used to initialize each new editor that gets created. * * @param editor The editor to initialize */ public static void initializeEditor(Editor editor) { if (logger.isDebugEnabled()) logger.debug("editor created: " + editor); }
/** * Reset the selected register back to the default register. */ public void resetRegister() { lastRegister = defaultRegister; logger.debug("register reset"); }
public boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull ExCommand cmd) throws ExException { logger.info("execute"); return true; }
private void superProcessConsistentText(@NotNull String text, @NotNull Key outputType, boolean tcLikeFakeOutput) { try { SUPER_PROCESS_CONSISTENT_TEXT_METHOD.invoke(this, text, outputType, tcLikeFakeOutput); } catch (IllegalAccessException | InvocationTargetException e) { LOGGER.error(e); } } }
@NotNull private Kind getKind() { try { return Kind.values()[kind]; } catch (Exception e) { LOG.warn("Unknown kind '" + kind + "' of variable '" + name + "'"); return Kind.Invalid; } }
/** * Store which register the user wishes to work with. * * @param reg The register name * @return true if a valid register name, false if not */ public boolean selectRegister(char reg) { if (VALID_REGISTERS.indexOf(reg) != -1) { lastRegister = reg; if (logger.isDebugEnabled()) logger.debug("register selected: " + lastRegister); return true; } else { return false; } }
public ToggleInsertReplaceAction() { super(ToggleInsertReplace); logger.debug("ToggleInsertReplaceAction()"); }
public GoDeleteRangeQuickFix(@NotNull PsiElement startElement, @NotNull PsiElement endElement, @NotNull String name) { super(startElement, endElement); if (!startElement.getParent().equals(endElement.getParent())) { LOG.error("Cannot delete range of elements with different parents"); } myName = name; }
protected void processKeyEvent(KeyEvent e) { if (logger.isDebugEnabled()) logger.debug("key=" + e); super.processKeyEvent(e); }
void close() { try { if (client != null) { client.shutDown(); } } catch (InterruptedException e) { LOGGER.debug(e); } }
public SdkAdditionalData loadAdditionalData(@NotNull Sdk elixirSdk, Element additional) { org.elixir_lang.sdk.erlang_dependent.SdkAdditionalData sdkAdditionalData = new org.elixir_lang.sdk.erlang_dependent.SdkAdditionalData(elixirSdk); try { sdkAdditionalData.readExternal(additional); } catch (InvalidDataException e) { LOG.error(e); } return sdkAdditionalData; }
/** * Fetches the set of commands that can be used * on a text component that is using a model and * view produced by this kit. * * @return the set of actions */ public Action[] getActions() { Action[] res = TextAction.augmentList(super.getActions(), this.exActions); if (logger.isDebugEnabled()) logger.debug("res.length=" + res.length); return res; }
public static void report_error_(PsiBuilder builder, ErrorState state, boolean advance) { Frame frame = state.currentFrame; if (frame == null) { LOG.error("unbalanced enter/exit section call: got null"); return; } int position = builder.rawTokenIndex(); if (frame.errorReportedAt < position && getLastVariantPos(state, position + 1) <= position) { reportError(builder, state, frame, null, true, advance); } }
public void addEntry(String key, @NotNull String text) { if (logger.isDebugEnabled()) { logger.debug("Add entry '" + text + "' to " + key); } HistoryBlock block = blocks(key); block.addEntry(text); }
/** * Invoked when an action occurs. */ public void actionPerformed(ActionEvent e) { logger.debug("actionPerformed"); ExTextField target = (ExTextField)getTextComponent(e); target.toggleInsertReplace(); } }
/** * This is used to clean up editors whenever they are closed. * * @param editor The editor to cleanup */ public static void unInitializeEditor(@NotNull Editor editor) { if (logger.isDebugEnabled()) logger.debug("editor closed: " + editor); editor.putUserData(COMMAND_STATE, null); editor.putUserData(LAST_HIGHLIGHTS, null); editor.putUserData(LAST_SELECTION_TYPE, null); editor.putUserData(LAST_VISUAL_RANGE, null); editor.putUserData(MORE_PANEL, null); editor.putUserData(EX_OUTPUT_MODEL, null); }
public void saveData(@NotNull Element element) { logger.debug("saveData"); Element hist = new Element("history"); saveData(hist, SEARCH); saveData(hist, COMMAND); saveData(hist, EXPRESSION); saveData(hist, INPUT); element.addContent(hist); }
public void readData(@NotNull Element element) { logger.debug("readData"); Element hist = element.getChild("history"); if (hist == null) { return; } readData(hist, SEARCH); readData(hist, COMMAND); readData(hist, EXPRESSION); readData(hist, INPUT); }
void createConnection(Callback callback) { client = new WebSocketClient(getUri()); try { client.handshake(callback); } catch (InterruptedException | URISyntaxException | SSLException e) { myConnectionState = ConnectionState.CONNECTING; LOGGER.debug(e); } }