com.intellij.openapi.diagnostic.Logger.debug()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(7.3k)|赞(0)|评价(0)|浏览(116)

本文整理了Java中com.intellij.openapi.diagnostic.Logger.debug()方法的一些代码示例,展示了Logger.debug()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.debug()方法的具体详情如下:
包路径:com.intellij.openapi.diagnostic.Logger
类名称:Logger
方法名:debug

Logger.debug介绍

暂无

代码示例

代码示例来源:origin: JetBrains/ideavim

/**
 * Reset the selected register back to the default register.
 */
public void resetRegister() {
 lastRegister = defaultRegister;
 logger.debug("register reset");
}

代码示例来源:origin: JetBrains/ideavim

public ToggleInsertReplaceAction() {
 super(ToggleInsertReplace);
 logger.debug("ToggleInsertReplaceAction()");
}

代码示例来源:origin: JetBrains/ideavim

/**
 * 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);
}

代码示例来源:origin: JetBrains/ideavim

@Override
public void disposeComponent() {
 LOG.debug("disposeComponent");
 turnOffPlugin();
 EventFacade.getInstance().restoreTypedActionHandler();
 LOG.debug("done");
}

代码示例来源:origin: JetBrains/ideavim

@NotNull
private String processKey(String key, int start, int end) {
 if (logger.isDebugEnabled()) {
  logger.debug("process " + key + " " + start + "," + end);
 }
 StringBuilder res = new StringBuilder();
 res.append("      #  ").append(key).append(" ").append("history\n");
 String spaces = "       ";
 List<HistoryGroup.HistoryEntry> entries = VimPlugin.getHistory().getEntries(key, start, end);
 for (HistoryGroup.HistoryEntry entry : entries) {
  String num = Integer.toString(entry.getNumber());
  res.append(spaces.substring(num.length())).append(num).append("  ").append(entry.getEntry()).append("\n");
 }
 return res.toString();
}

代码示例来源:origin: JetBrains/ideavim

public static void runWriteCommand(@Nullable Project project, @NotNull Runnable cmd, @Nullable String name, @Nullable Object groupId) {
 if (logger.isDebugEnabled()) {
  logger.debug("write command " + cmd);
 }
 CommandProcessor.getInstance().executeCommand(project, new WriteAction(cmd), name, groupId);
}

代码示例来源:origin: JetBrains/ideavim

public static void runReadCommand(@Nullable Project project, @NotNull Runnable cmd, @Nullable String name, @Nullable Object groupId) {
 if (logger.isDebugEnabled()) {
  logger.debug("read command " + cmd);
 }
 CommandProcessor.getInstance().executeCommand(project, new ReadAction(cmd), name, groupId);
}

代码示例来源:origin: JetBrains/ideavim

/**
  * Invoked when an action occurs.
  */
 public void actionPerformed(ActionEvent e) {
  logger.debug("actionPerformed");
  ExTextField target = (ExTextField)getTextComponent(e);
  target.toggleInsertReplace();
 }
}

代码示例来源:origin: JetBrains/ideavim

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);
}

代码示例来源:origin: JetBrains/ideavim

protected void processKeyEvent(KeyEvent e) {
 if (logger.isDebugEnabled()) logger.debug("key=" + e);
 super.processKeyEvent(e);
}

代码示例来源:origin: JetBrains/ideavim

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);
}

代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin

@Nullable
private static String getGaeExecutablePath(@NotNull String sdkHomePath) {
 String goExecutablePath = PathUtil.toSystemIndependentName(sdkHomePath);
 goExecutablePath = StringUtil.trimEnd(goExecutablePath, GoConstants.APP_ENGINE_GO_ROOT_DIRECTORY_PATH);
 boolean gcloudInstallation = goExecutablePath.endsWith(GoConstants.GCLOUD_APP_ENGINE_DIRECTORY_PATH);
 if (gcloudInstallation) {
  LOG.debug("Detected gcloud GAE installation at " + goExecutablePath);
  goExecutablePath = FileUtil.join(StringUtil.trimEnd(goExecutablePath, GoConstants.GCLOUD_APP_ENGINE_DIRECTORY_PATH), "bin");
 }
 String executablePath = FileUtil.join(goExecutablePath, GoEnvironmentUtil.getGaeExecutableFileName(gcloudInstallation));
 return new File(executablePath).exists() ? executablePath : null;
}

代码示例来源:origin: JetBrains/ideavim

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);
}

代码示例来源:origin: JetBrains/ideavim

public boolean execute(@NotNull Editor editor, @NotNull DataContext context, @NotNull ExCommand cmd) throws ExException {
 String arg = cmd.getArgument();
 if (logger.isDebugEnabled()) {
  logger.debug("arg=" + arg);
 }
 return VimPlugin.getDigraph().parseCommandLine(editor, cmd.getArgument());
}

代码示例来源:origin: JetBrains/ideavim

/**
 * 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;
}

代码示例来源:origin: JetBrains/ideavim

private static void resetCursor(@NotNull VirtualFile virtualFile, Project proj, boolean insert) {
 logger.debug("resetCursor");
 Document doc = FileDocumentManager.getInstance().getDocument(virtualFile);
 if (doc == null) return; // Must be no text editor (such as image)
 Editor[] editors = EditorFactory.getInstance().getEditors(doc, proj);
 if (logger.isDebugEnabled()) {
  logger.debug("There are " + editors.length + " editors for virtual file " + virtualFile.getName());
 }
 for (Editor editor : editors) {
  editor.getSettings().setBlockCursor(!insert);
 }
}

代码示例来源:origin: JetBrains/ideavim

public void postKey(@NotNull KeyStroke stroke, @NotNull Editor editor) {
 final Component component = SwingUtilities.getAncestorOfClass(Window.class, editor.getComponent());
 final KeyEvent event = createKeyEvent(stroke, component);
 ApplicationManager.getApplication().invokeLater(() -> {
  if (logger.isDebugEnabled()) {
   logger.debug("posting " + event);
  }
  Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(event);
 });
}

代码示例来源:origin: JetBrains/ideavim

/**
 * 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);
}

代码示例来源:origin: JetBrains/ideavim

public void actionPerformed(ActionEvent actionEvent) {
  logger.debug("complete entry");
  KeyStroke stroke = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0);
  KeyHandler.getInstance().handleKey(
   ExEntryPanel.getInstance().getEntry().getEditor(),
   stroke,
   ExEntryPanel.getInstance().getEntry().getContext());
 }
}

代码示例来源:origin: JetBrains/ideavim

/**
 * This event indicates that a document is about to be changed. We use this event to update all the
 * editor's marks if text is about to be deleted.
 *
 * @param event The change event
 */
public void beforeDocumentChange(@NotNull DocumentEvent event) {
 if (!VimPlugin.isEnabled()) return;
 if (logger.isDebugEnabled()) logger.debug("MarkUpdater before, event = " + event);
 if (event.getOldLength() == 0) return;
 Document doc = event.getDocument();
 updateMarkFromDelete(getAnEditor(doc), VimPlugin.getMark().getAllFileMarks(doc), event.getOffset(),
            event.getOldLength());
 // TODO - update jumps
}

相关文章