use of com.intellij.execution.ui.layout.ViewContext in project intellij-community by JetBrains.
the class XDebugView method getData.
@Nullable
public static <T> T getData(DataKey<T> key, @NotNull Component component) {
DataContext dataContext = DataManager.getInstance().getDataContext(component);
ViewContext viewContext = ViewContext.CONTEXT_KEY.getData(dataContext);
ContentManager contentManager = viewContext == null ? null : viewContext.getContentManager();
if (contentManager != null) {
T data = key.getData(DataManager.getInstance().getDataContext(contentManager.getComponent()));
if (data != null) {
return data;
}
}
return key.getData(dataContext);
}
use of com.intellij.execution.ui.layout.ViewContext in project intellij-community by JetBrains.
the class BaseViewAction method update.
@Override
public final void update(final AnActionEvent e) {
ViewContext context = getViewFacade(e);
Content[] content = getContent(e);
if (context != null && content != null) {
if (containsInvalidContent(content)) {
e.getPresentation().setEnabled(false);
} else {
update(e, context, content);
}
} else {
e.getPresentation().setEnabled(false);
}
}
Aggregations