本文整理汇总了Java中com.intellij.openapi.wm.ToolWindowType类的典型用法代码示例。如果您正苦于以下问题:Java ToolWindowType类的具体用法?Java ToolWindowType怎么用?Java ToolWindowType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ToolWindowType类属于com.intellij.openapi.wm包,在下文中一共展示了ToolWindowType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setSelected
import com.intellij.openapi.wm.ToolWindowType; //导入依赖的package包/类
public void setSelected(AnActionEvent event,boolean flag){
Project project = CommonDataKeys.PROJECT.getData(event.getDataContext());
if (project == null) {
return;
}
String id=ToolWindowManager.getInstance(project).getActiveToolWindowId();
if(id==null){
return;
}
ToolWindowManagerEx mgr=ToolWindowManagerEx.getInstanceEx(project);
ToolWindowEx toolWindow=(ToolWindowEx)mgr.getToolWindow(id);
ToolWindowType type=toolWindow.getType();
if(ToolWindowType.FLOATING==type){
toolWindow.setType(toolWindow.getInternalType(), null);
}else{
toolWindow.setType(ToolWindowType.FLOATING, null);
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:ToggleFloatingModeAction.java
示例2: setSelected
import com.intellij.openapi.wm.ToolWindowType; //导入依赖的package包/类
public void setSelected(AnActionEvent event, boolean flag) {
Project project = CommonDataKeys.PROJECT.getData(event.getDataContext());
if (project == null) {
return;
}
String id = ToolWindowManager.getInstance(project).getActiveToolWindowId();
if (id == null) {
return;
}
ToolWindowManagerEx mgr = ToolWindowManagerEx.getInstanceEx(project);
ToolWindowEx toolWindow = (ToolWindowEx)mgr.getToolWindow(id);
ToolWindowType type = toolWindow.getType();
if (ToolWindowType.WINDOWED == type) {
toolWindow.setType(toolWindow.getInternalType(), null);
}
else {
toolWindow.setType(ToolWindowType.WINDOWED, null);
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:ToggleWindowedModeAction.java
示例3: setSelected
import com.intellij.openapi.wm.ToolWindowType; //导入依赖的package包/类
public void setSelected(AnActionEvent event,boolean flag){
Project project = CommonDataKeys.PROJECT.getData(event.getDataContext());
if (project == null) {
return;
}
ToolWindowManager windowManager = ToolWindowManager.getInstance(project);
String id=windowManager.getActiveToolWindowId();
if(id==null){
return;
}
ToolWindow toolWindow=windowManager.getToolWindow(id);
ToolWindowType type=toolWindow.getType();
if(ToolWindowType.DOCKED==type){
toolWindow.setType(ToolWindowType.SLIDING, null);
} else if(ToolWindowType.SLIDING==type){
toolWindow.setType(ToolWindowType.DOCKED, null);
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:ToggleDockModeAction.java
示例4: update
import com.intellij.openapi.wm.ToolWindowType; //导入依赖的package包/类
public void update(AnActionEvent event){
super.update(event);
Presentation presentation = event.getPresentation();
Project project = CommonDataKeys.PROJECT.getData(event.getDataContext());
if (project == null) {
presentation.setEnabled(false);
return;
}
ToolWindowManager mgr=ToolWindowManager.getInstance(project);
String id=mgr.getActiveToolWindowId();
if(id==null){
presentation.setEnabled(false);
return;
}
ToolWindow toolWindow=mgr.getToolWindow(id);
presentation.setEnabled(toolWindow.isAvailable()
&& toolWindow.getType() != ToolWindowType.FLOATING
&& toolWindow.getType() != ToolWindowType.WINDOWED);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:ToggleDockModeAction.java
示例5: configureProject
import com.intellij.openapi.wm.ToolWindowType; //导入依赖的package包/类
@Override
public void configureProject(final Project project, @NotNull final VirtualFile baseDir, Ref<Module> moduleRef) {
StartupManager.getInstance(project).registerPostStartupActivity(new DumbAwareRunnable() {
@Override
public void run() {
// ensure the dialog is shown after all startup activities are done
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
ApplicationManager.getApplication().invokeLater(new Runnable() {
@Override
public void run() {
if (project.isDisposed()) return;
final ToolWindow toolWindow = ToolWindowManager.getInstance(project).getToolWindow(ToolWindowId.PROJECT_VIEW);
if (toolWindow != null && toolWindow.getType() != ToolWindowType.SLIDING) {
toolWindow.activate(null);
}
}
}, ModalityState.NON_MODAL);
}
});
}
});
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:PlatformProjectViewOpener.java
示例6: setSelected
import com.intellij.openapi.wm.ToolWindowType; //导入依赖的package包/类
public void setSelected(AnActionEvent event,boolean flag){
Project project = PlatformDataKeys.PROJECT.getData(event.getDataContext());
if (project == null) {
return;
}
String id=ToolWindowManager.getInstance(project).getActiveToolWindowId();
if(id==null){
return;
}
ToolWindowManagerEx mgr=ToolWindowManagerEx.getInstanceEx(project);
ToolWindowEx toolWindow=(ToolWindowEx)mgr.getToolWindow(id);
ToolWindowType type=toolWindow.getType();
if(ToolWindowType.FLOATING==type){
toolWindow.setType(toolWindow.getInternalType(), null);
}else{
toolWindow.setType(ToolWindowType.FLOATING, null);
}
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:19,代码来源:ToggleFloatingModeAction.java
示例7: setSelected
import com.intellij.openapi.wm.ToolWindowType; //导入依赖的package包/类
public void setSelected(AnActionEvent event,boolean flag){
Project project = PlatformDataKeys.PROJECT.getData(event.getDataContext());
if (project == null) {
return;
}
ToolWindowManager windowManager = ToolWindowManager.getInstance(project);
String id=windowManager.getActiveToolWindowId();
if(id==null){
return;
}
ToolWindow toolWindow=windowManager.getToolWindow(id);
ToolWindowType type=toolWindow.getType();
if(ToolWindowType.DOCKED==type){
toolWindow.setType(ToolWindowType.SLIDING, null);
} else if(ToolWindowType.SLIDING==type){
toolWindow.setType(ToolWindowType.DOCKED, null);
}
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:19,代码来源:ToggleDockModeAction.java
示例8: update
import com.intellij.openapi.wm.ToolWindowType; //导入依赖的package包/类
public void update(AnActionEvent event){
super.update(event);
Presentation presentation = event.getPresentation();
Project project = PlatformDataKeys.PROJECT.getData(event.getDataContext());
if (project == null) {
presentation.setEnabled(false);
return;
}
ToolWindowManager mgr=ToolWindowManager.getInstance(project);
String id=mgr.getActiveToolWindowId();
if(id==null){
presentation.setEnabled(false);
return;
}
ToolWindow toolWindow=mgr.getToolWindow(id);
presentation.setEnabled(toolWindow.isAvailable()&&ToolWindowType.FLOATING!=toolWindow.getType());
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:18,代码来源:ToggleDockModeAction.java
示例9: updateToolWindow
import com.intellij.openapi.wm.ToolWindowType; //导入依赖的package包/类
private void updateToolWindow(int count, final Project project, final CyclicDependencyDetector detector)
{
final int finalCount = count;
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
ToolWindowManager.getInstance(project).unregisterToolWindow("Find Cyclic AMD Dependencies");
ToolWindow window = ToolWindowManager.getInstance(project).registerToolWindow("Find Cyclic AMD Dependencies", true, ToolWindowAnchor.BOTTOM);
window.setTitle("Find Cyclic AMD Dependencies");
window.setDefaultState(ToolWindowAnchor.BOTTOM, ToolWindowType.DOCKED, null);
window.show(null);
window.activate(null);
Map<String, List<String>> incriminatingModules = detector.getIncriminatingModules();
new FindCyclicDependenciesToolWindow().createContent(project, window, incriminatingModules, finalCount);
}
});
}
开发者ID:cefolger,项目名称:needsmoredojo,代码行数:19,代码来源:FindCyclicDependenciesAction.java
示例10: setSelected
import com.intellij.openapi.wm.ToolWindowType; //导入依赖的package包/类
@Override
public void setSelected(AnActionEvent event, boolean flag) {
Project project = event.getData(CommonDataKeys.PROJECT);
if (project == null) {
return;
}
String id = ToolWindowManager.getInstance(project).getActiveToolWindowId();
if (id == null) {
return;
}
ToolWindowManagerEx mgr = ToolWindowManagerEx.getInstanceEx(project);
ToolWindowEx toolWindow = (ToolWindowEx)mgr.getToolWindow(id);
ToolWindowType type = toolWindow.getType();
if (ToolWindowType.FLOATING == type) {
toolWindow.setType(toolWindow.getInternalType(), null);
}
else {
toolWindow.setType(ToolWindowType.FLOATING, null);
}
}
开发者ID:consulo,项目名称:consulo,代码行数:21,代码来源:ToggleFloatingModeAction.java
示例11: setSelected
import com.intellij.openapi.wm.ToolWindowType; //导入依赖的package包/类
@Override
public void setSelected(AnActionEvent event, boolean flag) {
Project project = event.getData(CommonDataKeys.PROJECT);
if (project == null) {
return;
}
String id = ToolWindowManager.getInstance(project).getActiveToolWindowId();
if (id == null) {
return;
}
ToolWindowManagerEx mgr = ToolWindowManagerEx.getInstanceEx(project);
ToolWindowEx toolWindow = (ToolWindowEx)mgr.getToolWindow(id);
ToolWindowType type = toolWindow.getType();
if (ToolWindowType.WINDOWED == type) {
toolWindow.setType(toolWindow.getInternalType(), null);
}
else {
toolWindow.setType(ToolWindowType.WINDOWED, null);
}
}
开发者ID:consulo,项目名称:consulo,代码行数:21,代码来源:ToggleWindowedModeAction.java
示例12: setSelected
import com.intellij.openapi.wm.ToolWindowType; //导入依赖的package包/类
public void setSelected(AnActionEvent event, boolean flag) {
Project project = event.getData(CommonDataKeys.PROJECT);
if (project == null) {
return;
}
ToolWindowManager windowManager = ToolWindowManager.getInstance(project);
String id = windowManager.getActiveToolWindowId();
if (id == null) {
return;
}
ToolWindow toolWindow = windowManager.getToolWindow(id);
ToolWindowType type = toolWindow.getType();
if (ToolWindowType.DOCKED == type) {
toolWindow.setType(ToolWindowType.SLIDING, null);
}
else if (ToolWindowType.SLIDING == type) {
toolWindow.setType(ToolWindowType.DOCKED, null);
}
}
开发者ID:consulo,项目名称:consulo,代码行数:20,代码来源:ToggleDockModeAction.java
示例13: update
import com.intellij.openapi.wm.ToolWindowType; //导入依赖的package包/类
public void update(AnActionEvent event) {
super.update(event);
Presentation presentation = event.getPresentation();
Project project = event.getData(CommonDataKeys.PROJECT);
if (project == null) {
presentation.setEnabled(false);
return;
}
ToolWindowManager mgr = ToolWindowManager.getInstance(project);
String id = mgr.getActiveToolWindowId();
if (id == null) {
presentation.setEnabled(false);
return;
}
ToolWindow toolWindow = mgr.getToolWindow(id);
presentation.setEnabled(toolWindow.isAvailable() && ToolWindowType.FLOATING != toolWindow.getType());
}
开发者ID:consulo,项目名称:consulo,代码行数:18,代码来源:ToggleDockModeAction.java
示例14: paintComponent
import com.intellij.openapi.wm.ToolWindowType; //导入依赖的package包/类
@Override
protected void paintComponent(Graphics g) {
Rectangle r = getBounds();
Graphics2D g2d = (Graphics2D)g;
Shape clip = g2d.getClip();
ToolWindowType type = myToolWindow.getType();
Image image;
if (isActive()) {
if (myActiveImage == null || /*myActiveImage.getHeight() != r.height ||*/ type != myImageType) {
myActiveImage = drawToBuffer(true, r.height, myToolWindow.getType() == ToolWindowType.FLOATING);
}
image = myActiveImage;
} else {
if (myImage == null || /*myImage.getHeight() != r.height ||*/ type != myImageType) {
myImage = drawToBuffer(false, r.height, myToolWindow.getType() == ToolWindowType.FLOATING);
}
image = myImage;
}
myImageType = myToolWindow.getType();
Rectangle clipBounds = clip.getBounds();
for (int x = clipBounds.x; x < clipBounds.x + clipBounds.width; x+=150) {
UIUtil.drawImage(g, image, x, 0, null);
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:31,代码来源:ToolWindowHeader.java
示例15: isSelected
import com.intellij.openapi.wm.ToolWindowType; //导入依赖的package包/类
public boolean isSelected(AnActionEvent event){
Project project = CommonDataKeys.PROJECT.getData(event.getDataContext());
if (project == null) {
return false;
}
ToolWindowManager windowManager = ToolWindowManager.getInstance(project);
String id=windowManager.getActiveToolWindowId();
if(id==null){
return false;
}
return ToolWindowType.FLOATING==windowManager.getToolWindow(id).getType();
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:ToggleFloatingModeAction.java
示例16: isSelected
import com.intellij.openapi.wm.ToolWindowType; //导入依赖的package包/类
public boolean isSelected(AnActionEvent event) {
Project project = CommonDataKeys.PROJECT.getData(event.getDataContext());
if (project == null) {
return false;
}
ToolWindowManager windowManager = ToolWindowManager.getInstance(project);
String id = windowManager.getActiveToolWindowId();
if (id == null) {
return false;
}
return ToolWindowType.WINDOWED == windowManager.getToolWindow(id).getType();
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:ToggleWindowedModeAction.java
示例17: isSelected
import com.intellij.openapi.wm.ToolWindowType; //导入依赖的package包/类
public boolean isSelected(AnActionEvent event){
Project project = CommonDataKeys.PROJECT.getData(event.getDataContext());
if (project == null) {
return false;
}
ToolWindowManager windowManager = ToolWindowManager.getInstance(project);
String id=windowManager.getActiveToolWindowId();
if(id==null){
return false;
}
return ToolWindowType.DOCKED==windowManager.getToolWindow(id).getType();
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:ToggleDockModeAction.java
示例18: WindowInfoImpl
import com.intellij.openapi.wm.ToolWindowType; //导入依赖的package包/类
/**
* Creates <code>WindowInfo</code> for tool window with wpecified <code>ID</code>.
*/
WindowInfoImpl(final String id){
myActive=false;
myAnchor=ToolWindowAnchor.LEFT;
myAutoHide=false;
myFloatingBounds=null;
myId=id;
setType(ToolWindowType.DOCKED);
myVisible=false;
myWeight=DEFAULT_WEIGHT;
mySideWeight = DEFAULT_SIDE_WEIGHT;
myOrder=-1;
mySplitMode =false;
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:17,代码来源:WindowInfoImpl.java
示例19: parseToolWindowType
import com.intellij.openapi.wm.ToolWindowType; //导入依赖的package包/类
private static ToolWindowType parseToolWindowType(final String text) {
if (ToolWindowType.DOCKED.toString().equalsIgnoreCase(text)) {
return ToolWindowType.DOCKED;
}
if (ToolWindowType.FLOATING.toString().equalsIgnoreCase(text)) {
return ToolWindowType.FLOATING;
}
if (ToolWindowType.SLIDING.toString().equalsIgnoreCase(text)) {
return ToolWindowType.SLIDING;
}
throw new IllegalArgumentException(text);
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:13,代码来源:WindowInfoImpl.java
示例20: paintComponent
import com.intellij.openapi.wm.ToolWindowType; //导入依赖的package包/类
@Override
protected void paintComponent(Graphics g) {
Rectangle r = getBounds();
Graphics2D g2d = (Graphics2D)g;
Shape clip = g2d.getClip();
ToolWindowType type = myToolWindow.getType();
Image image;
if (isActive()) {
if (myActiveImage == null || /*myActiveImage.getHeight() != r.height ||*/ type != myImageType) {
myActiveImage = drawToBuffer(true, r.height, myToolWindow.getType() == ToolWindowType.FLOATING);
}
image = myActiveImage;
} else {
if (myImage == null || /*myImage.getHeight() != r.height ||*/ type != myImageType) {
myImage = drawToBuffer(false, r.height, myToolWindow.getType() == ToolWindowType.FLOATING);
}
image = myImage;
}
myImageType = myToolWindow.getType();
Rectangle clipBounds = clip.getBounds();
for (int x = clipBounds.x; x < clipBounds.x + clipBounds.width; x+=150) {
UIUtil.drawImage(g, image, x, 0, null);
}
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:31,代码来源:ToolWindowHeader.java
注:本文中的com.intellij.openapi.wm.ToolWindowType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论