本文整理汇总了Java中com.intellij.openapi.ui.popup.JBPopup.cancel方法的典型用法代码示例。如果您正苦于以下问题:Java JBPopup.cancel方法的具体用法?Java JBPopup.cancel怎么用?Java JBPopup.cancel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.ui.popup.JBPopup
的用法示例。
在下文中一共展示了JBPopup.cancel方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: cancelPopups
import com.intellij.openapi.ui.popup.JBPopup; //导入方法依赖的package包/类
private static boolean cancelPopups(final JBPopup[] activePopup) {
for (JBPopup popup : activePopup) {
if (popup != null && popup.isVisible()) {
popup.cancel();
return true;
}
}
return false;
}
示例2: closeDocHint
import com.intellij.openapi.ui.popup.JBPopup; //导入方法依赖的package包/类
private void closeDocHint() {
JBPopup hint = getDocInfoHint();
if (hint == null) {
return;
}
myCloseOnSneeze = false;
hint.cancel();
Component toFocus = myPreviouslyFocused;
hint.cancel();
if (toFocus != null) {
IdeFocusManager.getInstance(myProject).requestFocus(toFocus, true);
}
}
示例3: actionPerformed
import com.intellij.openapi.ui.popup.JBPopup; //导入方法依赖的package包/类
@Override
public void actionPerformed(AnActionEvent e) {
super.actionPerformed(e);
final JBPopup hint = myHint;
if (hint != null && hint.isVisible()) {
hint.cancel();
}
}
示例4: closeQuickDocIfPossible
import com.intellij.openapi.ui.popup.JBPopup; //导入方法依赖的package包/类
private void closeQuickDocIfPossible() {
myAlarm.cancelAllRequests();
DocumentationManager docManager = getDocManager();
if (docManager == null) {
return;
}
JBPopup hint = docManager.getDocInfoHint();
if (hint == null) {
return;
}
hint.cancel();
myDocumentationManager = null;
}
示例5: handleMnemonic
import com.intellij.openapi.ui.popup.JBPopup; //导入方法依赖的package包/类
@Override
public void handleMnemonic(KeyEvent e, Project project, JBPopup popup) {
char mnemonic = e.getKeyChar();
final Bookmark bookmark = BookmarkManager.getInstance(project).findBookmarkForMnemonic(mnemonic);
if (bookmark != null) {
popup.cancel();
IdeFocusManager.getInstance(project).doWhenFocusSettlesDown(new Runnable() {
@Override
public void run() {
bookmark.navigate(true);
}
});
}
}
示例6: itemChosen
import com.intellij.openapi.ui.popup.JBPopup; //导入方法依赖的package包/类
@Override
public void itemChosen(ItemWrapper item, Project project, JBPopup popup, boolean withEnterOrDoubleClick) {
if (item instanceof BookmarkItem && withEnterOrDoubleClick) {
Bookmark bookmark = ((BookmarkItem)item).getBookmark();
popup.cancel();
bookmark.navigate(true);
}
}
示例7: showOpenTaskDialog
import com.intellij.openapi.ui.popup.JBPopup; //导入方法依赖的package包/类
private static void showOpenTaskDialog(final Project project, final Task task) {
JBPopup hint = DocumentationManager.getInstance(project).getDocInfoHint();
if (hint != null) hint.cancel();
ApplicationManager.getApplication().invokeLater(new Runnable() {
@Override
public void run() {
new OpenTaskDialog(project, task).show();
}
});
}