Package org.eclipse.core.commands

Examples of org.eclipse.core.commands.State


    @Override
    public boolean isOnline() {
        LOGGER.fine("");
        Command command = commandService.getCommand(GFM_VIEWER_PLUGIN_ONLINE);
        State state = command.getState(RegistryToggleState.STATE_ID);
        return (Boolean) state.getValue();
    }
View Full Code Here


    final ICommandService service = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
    final Command command = service.getCommand(commandId);
    if(command == null) {
      return;
    }
    final State state = command.getState("org.eclipse.ui.commands.toggleState");
    if(state != null) {
      state.setValue(value);
    }
  }
View Full Code Here

  }

  protected static void setVerboseBranchMode(boolean state) {
    ICommandService srv = (ICommandService) PlatformUI.getWorkbench()
        .getService(ICommandService.class);
    State verboseBranchModeState = srv.getCommand(
        ToggleBranchCommitCommand.ID).getState(
        ToggleBranchCommitCommand.TOGGLE_STATE);
    verboseBranchModeState.setValue(Boolean.valueOf(state));
  }
View Full Code Here

public class HighlightLayerActionHandler extends MapEditorActionHandler {

  @Override
  public void executeForEditor(ExecutionEvent event, MapEditor activeEditor) {
    Command command = event.getCommand();
    State state = command.getState("STYLE");
    state.setValue(!(Boolean) state.getValue());
    activeEditor.setHighlightCurrentLayer((Boolean) state.getValue());
  }
View Full Code Here

TOP

Related Classes of org.eclipse.core.commands.State

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.