本文整理汇总了Java中com.intellij.openapi.wm.ToolWindow.isAvailable方法的典型用法代码示例。如果您正苦于以下问题:Java ToolWindow.isAvailable方法的具体用法?Java ToolWindow.isAvailable怎么用?Java ToolWindow.isAvailable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.wm.ToolWindow
的用法示例。
在下文中一共展示了ToolWindow.isAvailable方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import com.intellij.openapi.wm.ToolWindow; //导入方法依赖的package包/类
protected void init() {
final ToolWindow findWindow = ToolWindowManager.getInstance(myProject).getToolWindow(ToolWindowId.FIND);
final boolean available = findWindow != null && findWindow.isAvailable();
myForm.getNewTabCheckbox().setEnabled(available);
myForm.getNewTabCheckbox().setSelected(FindSettings.getInstance().isShowResultsInSeparateView());
myForm.getScopePanel().addPropertyChangeListener("scope", new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
updateOkAction();
}
});
myForm.getMatchEachNode().setSelected(mySettings.MATCH_RECURSIVELY);
myForm.getMatchRootNode().setSelected(!mySettings.MATCH_RECURSIVELY);
Disposer.register(myDisposable, myForm);
super.init();
}
示例2: updateWindowAvailable
import com.intellij.openapi.wm.ToolWindow; //导入方法依赖的package包/类
private void updateWindowAvailable(boolean showIfAvailable) {
boolean available = ServersToolWindowFactory.isAvailable(myProject);
final ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(myProject);
final ToolWindow toolWindow = toolWindowManager.getToolWindow(WINDOW_ID);
if (toolWindow == null) {
if (available) {
toolWindowManager.invokeLater(new Runnable() {
@Override
public void run() {
createToolWindow(myProject, toolWindowManager).show(null);
}
});
}
return;
}
boolean doShow = !toolWindow.isAvailable() && available;
if (toolWindow.isAvailable() && !available) {
toolWindow.hide(null);
}
toolWindow.setAvailable(available, null);
if (showIfAvailable && doShow) {
toolWindow.show(null);
}
}
示例3: getVisibleIdsOn
import com.intellij.openapi.wm.ToolWindow; //导入方法依赖的package包/类
public List<String> getVisibleIdsOn(final ToolWindowAnchor anchor, ToolWindowManagerImpl manager) {
ArrayList<String> ids = new ArrayList<String>();
for (WindowInfoImpl each : getAllInfos(anchor)) {
if (manager == null) break;
final ToolWindow window = manager.getToolWindow(each.getId());
if (window == null) continue;
if (window.isAvailable() || UISettings.getInstance().ALWAYS_SHOW_WINDOW_BUTTONS) {
ids.add(each.getId());
}
}
return ids;
}