本文整理汇总了Java中com.intellij.ui.content.ContentManagerEvent.getContent方法的典型用法代码示例。如果您正苦于以下问题:Java ContentManagerEvent.getContent方法的具体用法?Java ContentManagerEvent.getContent怎么用?Java ContentManagerEvent.getContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.ui.content.ContentManagerEvent
的用法示例。
在下文中一共展示了ContentManagerEvent.getContent方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: contentAdded
import com.intellij.ui.content.ContentManagerEvent; //导入方法依赖的package包/类
@Override
public void contentAdded(ContentManagerEvent event) {
final Content content = event.getContent();
final ContentTabLabel tab;
if (content instanceof TabbedContent) {
tab = new TabbedContentTabLabel((TabbedContent)content, this);
} else {
tab = new ContentTabLabel(content, this);
}
myTabs.add(event.getIndex(), tab);
myContent2Tabs.put(content, tab);
myCached.clear();
}
示例2: contentAdded
import com.intellij.ui.content.ContentManagerEvent; //导入方法依赖的package包/类
@Override
public void contentAdded(ContentManagerEvent event) {
final ContentTabLabel tab = new ContentTabLabel(event.getContent(), this);
myTabs.add(event.getIndex(), tab);
myContent2Tabs.put(event.getContent(), tab);
myCached.clear();
}
示例3: contentRemoved
import com.intellij.ui.content.ContentManagerEvent; //导入方法依赖的package包/类
public void contentRemoved(ContentManagerEvent event) {
if (event.getContent() == myContent) {
myContentManager.removeContentManagerListener(this);
AntBuildMessageView buildMessageView = myContent.getUserData(KEY);
if (!myCloseAllowed) {
buildMessageView.stopProcess();
}
ProjectManager.getInstance().removeProjectManagerListener(myProject, this);
myContent.release();
myContent = null;
buildMessageView.myBuildFile = null;
buildMessageView.myPlainTextView.dispose();
}
}
示例4: contentRemoveQuery
import com.intellij.ui.content.ContentManagerEvent; //导入方法依赖的package包/类
public void contentRemoveQuery(ContentManagerEvent event) {
if (event.getContent() == myContent) {
boolean canClose = closeQuery();
if (!canClose) {
event.consume();
}
}
}
示例5: contentRemoved
import com.intellij.ui.content.ContentManagerEvent; //导入方法依赖的package包/类
@Override
public void contentRemoved(ContentManagerEvent event) {
if (event.getContent() == myContent) {
myContentManager.removeContentManagerListener(this);
myContent.release();
myContent = null;
}
}
示例6: contentRemoveQuery
import com.intellij.ui.content.ContentManagerEvent; //导入方法依赖的package包/类
@Override
public void contentRemoveQuery(ContentManagerEvent event) {
if (event.getContent() == myContent) {
if (!myIndicator.isCanceled() && shouldAskUser()) {
int result = Messages.showOkCancelDialog(myProject, CompilerBundle.message("warning.compiler.running.on.toolwindow.close"),
CompilerBundle.message("compiler.running.dialog.title"), Messages.getQuestionIcon());
if (result != 0) {
event.consume(); // veto closing
}
myUserAcceptedCancel = true;
}
}
}
示例7: contentAdded
import com.intellij.ui.content.ContentManagerEvent; //导入方法依赖的package包/类
@Override
public void contentAdded(ContentManagerEvent event) {
Content content = event.getContent();
if (content instanceof TabbedContent) {
content.addPropertyChangeListener(this);
}
}
示例8: contentRemoved
import com.intellij.ui.content.ContentManagerEvent; //导入方法依赖的package包/类
@Override
public void contentRemoved(ContentManagerEvent event) {
Content content = event.getContent();
if (content instanceof TabbedContent) {
content.removePropertyChangeListener(this);
}
}
示例9: contentAdded
import com.intellij.ui.content.ContentManagerEvent; //导入方法依赖的package包/类
@Override
public void contentAdded(ContentManagerEvent event) {
final Content content = event.getContent();
final ContentTabLabel tab;
if (content instanceof TabbedContent) {
tab = new TabbedContentTabLabel((TabbedContent)content, this);
}
else {
tab = new ContentTabLabel(content, this);
}
myTabs.add(event.getIndex(), tab);
myContent2Tabs.put(content, tab);
myCached.clear();
}