本文整理了Java中org.eclipse.che.ide.api.action.ActionEvent.getPresentation()
方法的一些代码示例,展示了ActionEvent.getPresentation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ActionEvent.getPresentation()
方法的具体详情如下:
包路径:org.eclipse.che.ide.api.action.ActionEvent
类名称:ActionEvent
方法名:getPresentation
[英]Returns the presentation which represents the action in the place from where it is invoked or updated.
[中]返回表示从何处调用或更新操作的表示形式。
代码示例来源:origin: org.eclipse.che.core/che-core-ide-app
/** {@inheritDoc} */
@Override
public void updateInPerspective(@NotNull ActionEvent event) {
event.getPresentation().setEnabledAndVisible(true);
}
}
代码示例来源:origin: org.eclipse.che.core/che-core-ide-app
@Override
public void updateInPerspective(@NotNull ActionEvent event) {
event.getPresentation().setEnabledAndVisible(true);
}
}
代码示例来源:origin: org.eclipse.che.core/che-core-ide-app
@Override
public void updateInPerspective(@NotNull ActionEvent event) {
event.getPresentation().setEnabledAndVisible(true);
}
}
代码示例来源:origin: org.eclipse.che.core/che-core-ide-app
@Override
public void updateInPerspective(@NotNull ActionEvent event) {
event.getPresentation().setEnabledAndVisible(true);
}
}
代码示例来源:origin: org.eclipse.che.core/che-core-ide-app
@Override
public void updateInPerspective(@NotNull ActionEvent event) {
event.getPresentation().setEnabledAndVisible(true);
}
}
代码示例来源:origin: org.eclipse.che.core/che-core-ide-app
/** {@inheritDoc} */
@Override
public void updateInPerspective(@NotNull ActionEvent event) {
final Project project = appContext.getRootProject();
event.getPresentation().setVisible(true);
event.getPresentation().setEnabled(project != null);
}
代码示例来源:origin: org.eclipse.che.core/che-core-ide-app
/** {@inheritDoc} */
@Override
public void updateInPerspective(@NotNull ActionEvent e) {
final Resource[] resources = appContext.getResources();
e.getPresentation().setVisible(true);
e.getPresentation().setEnabled(resources != null && resources.length == 1);
}
}
代码示例来源:origin: org.eclipse.che.core/che-core-ide-app
/** {@inheritDoc} */
@Override
public void updateInPerspective(@NotNull ActionEvent e) {
final Resource[] resources = appContext.getResources();
e.getPresentation().setVisible(true);
e.getPresentation()
.setEnabled(
resources != null && resources.length == 1 && resources[0] instanceof Container);
}
}
代码示例来源:origin: org.eclipse.che.core/che-core-ide-app
/** {@inheritDoc} */
@Override
public void update(ActionEvent event) {
final Resource[] resources = appContext.getResources();
event.getPresentation().setVisible(true);
event.getPresentation().setEnabled(resources != null && resources.length == 1);
}
代码示例来源:origin: org.eclipse.che.core/che-core-ide-app
@Override
public void update(ActionEvent e) {
if (activePartStack == null) {
e.getPresentation().setEnabledAndVisible(false);
return;
}
e.getPresentation()
.setEnabledAndVisible(PartStack.State.MAXIMIZED == activePartStack.getPartStackState());
}
代码示例来源:origin: org.eclipse.che.plugin/che-plugin-help-ext-client
@Override
public void update(ActionEvent event) {
event.getPresentation().setVisible(!isNullOrEmpty(productInfoDataProvider.getSupportLink()));
}
}
代码示例来源:origin: org.eclipse.che.core/che-core-ide-app
@Override
public void updateInPerspective(@NotNull ActionEvent e) {
Resource[] resources = appContext.getResources();
e.getPresentation().setVisible(true);
e.getPresentation().setEnabled(containsResourcesToExcludes(resources));
}
代码示例来源:origin: org.eclipse.che.plugin/che-plugin-java-ext-lang-client
@Override
public void update(ActionEvent e) {
final Resource resource = appContext.getResource();
if (resource == null) {
e.getPresentation().setEnabledAndVisible(false);
return;
}
final Optional<Project> project = resource.getRelatedProject();
e.getPresentation().setEnabledAndVisible(project.isPresent() && project.get().isTypeOf(JAVAC));
}
}
代码示例来源:origin: org.eclipse.che.core/che-core-ide-app
@Override
public void updateInPerspective(@NotNull ActionEvent event) {
final EditorPartPresenter editor = editorAgent.getActiveEditor();
boolean isCanDoOperation = false;
HandlesTextOperations handlesOperations;
if (editor instanceof HandlesTextOperations) {
handlesOperations = (HandlesTextOperations) editor;
isCanDoOperation = handlesOperations.canDoOperation(TextEditorOperations.FORMAT);
}
event.getPresentation().setEnabled(isCanDoOperation);
}
}
代码示例来源:origin: org.eclipse.che.core/che-core-ide-app
@Override
public void update(ActionEvent e) {
final TreeExpander treeExpander = getTreeExpander();
e.getPresentation().setEnabledAndVisible(treeExpander.isCollapseEnabled());
}
}
代码示例来源:origin: org.eclipse.che.core/che-core-ide-app
@Override
public void update(ActionEvent e) {
final TreeExpander treeExpander = getTreeExpander();
e.getPresentation().setEnabledAndVisible(treeExpander.isExpandEnabled());
}
}
代码示例来源:origin: org.eclipse.che.plugin/che-plugin-debugger-ide
@Override
public void updateInPerspective(ActionEvent event) {
event
.getPresentation()
.setEnabled(
debuggerPresenter.getSelectedWatchExpression() != null
|| debuggerPresenter.getSelectedVariable() != null);
}
}
代码示例来源:origin: org.eclipse.che.plugin/che-plugin-debugger-ide
@Override
public void updateInPerspective(ActionEvent event) {
Debugger debugger = debuggerManager.getActiveDebugger();
event.getPresentation().setEnabled(debugger != null && debugger.isSuspended());
}
}
代码示例来源:origin: org.eclipse.che.plugin/che-plugin-debugger-ide
@Override
public void updateInPerspective(ActionEvent event) {
Debugger debugger = debuggerManager.getActiveDebugger();
event.getPresentation().setEnabled(debugger != null && debugger.isSuspended());
}
}
代码示例来源:origin: org.eclipse.che.core/che-core-ide-api
@Override
public final void update(ActionEvent e) {
if (appContext.getRootProject() == null) {
e.getPresentation().setEnabledAndVisible(false);
return;
}
updateProjectAction(e);
}
内容来源于网络,如有侵权,请联系作者删除!