合肥企业快速建站,韩国风网站,评价一个网站设计项目的好坏,平台公司和项目公司的区别本文整理匯總了Java中org.eclipse.core.commands.State.setValue方法的典型用法代碼示例。如果您正苦於以下問題#xff1a;Java State.setValue方法的具體用法#xff1f;Java State.setValue怎麽用#xff1f;Java State.setValue使用的例子#xff1f;那麽恭喜您, 這裏精…本文整理匯總了Java中org.eclipse.core.commands.State.setValue方法的典型用法代碼示例。如果您正苦於以下問題Java State.setValue方法的具體用法Java State.setValue怎麽用Java State.setValue使用的例子那麽恭喜您, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.core.commands.State的用法示例。在下文中一共展示了State.setValue方法的9個代碼示例這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚您的評價將有助於我們的係統推薦出更棒的Java代碼示例。示例1: updateElement點讚 3import org.eclipse.core.commands.State; //導入方法依賴的package包/類SuppressWarnings(rawtypes)Overridepublic void updateElement(UIElement element, Map parameters) {Activator activator Activator.getDefault();if (activator.getSelectedProjects().size() 1) {IProject project activator.getSelectedProjects().iterator().next();String projectName project.getName();boolean enabled SpotterProjectSupport.isExpertViewEnabled(projectName);State state getCommandState(null);state.setValue(Boolean.valueOf(enabled));String label (enabled ? Disable : Enable) Expert View;element.setText(label);}}開發者ID:sopeco項目名稱:DynamicSpotter代碼行數:17示例2: toggleButtonOff點讚 3import org.eclipse.core.commands.State; //導入方法依賴的package包/類private void toggleButtonOff(){ICommandService commandService (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);Command toggleCommand commandService.getCommand(COMMAND_ID);State state toggleCommand.getState(STYLE);boolean currentState (Boolean) state.getValue();if (currentState) {// turn it offstate.setValue(!currentState);UiDesk.getDisplay().syncExec(new Runnable() {public void run(){commandService.refreshElements(toggleCommand.getId(), null);}});}}開發者ID:elexis項目名稱:elexis-3-base代碼行數:19示例3: execute點讚 3import org.eclipse.core.commands.State; //導入方法依賴的package包/類public final Object execute(ExecutionEvent event) throws ExecutionException {ICommandService commandService (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);// update toggled stateState state event.getCommand().getState(IMenuStateIds.STYLE);if (state null)throw new ExecutionException(You need to declare a ToggleState with idSTYLE for your command to use ToggleHandler!);boolean currentState (Boolean) state.getValue();boolean newState !currentState;state.setValue(newState);// trigger element updateexecuteToggle(event, newState);commandService.refreshElements(event.getCommand().getId(), null);// return value is reserved for future apisreturn null;}開發者ID:elexis項目名稱:elexis-3-base代碼行數:20示例4: execute點讚 3import org.eclipse.core.commands.State; //導入方法依賴的package包/類public final Object execute(ExecutionEvent event) throws ExecutionException {ICommandService commandService (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);this.commandId event.getCommand().getId();// update toggled stateState state event.getCommand().getState(IMenuStateIds.STYLE);if (state null)throw new ExecutionException(You need to declare a ToggleState with idSTYLE for your command to use ToggleHandler!);boolean currentState (Boolean) state.getValue();boolean newState !currentState;state.setValue(newState);// trigger element updateexecuteToggle(event, newState);commandService.refreshElements(event.getCommand().getId(), null);// return value is reserved for future apisreturn null;}開發者ID:elexis項目名稱:elexis-3-base代碼行數:21示例5: setToggleCommandState點讚 2import org.eclipse.core.commands.State; //導入方法依賴的package包/類public static void setToggleCommandState(String commandId, String stateId, boolean stateValue) throws ExecutionException{ICommandService svc (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);Command command svc.getCommand(commandId);State state command.getState(org.eclipse.ui.commands.toggleState);if (state null)throw new ExecutionException(The command does not have a toggle state); //$NON-NLS-1$if (!(state.getValue() instanceof Boolean))throw new ExecutionException(The commands toggle state doesnt contain a boolean value); //$NON-NLS-1$state.setValue(new Boolean(stateValue));}開發者ID:Spacecraft-Code項目名稱:SPELL代碼行數:12示例6: setCommandState點讚 2import org.eclipse.core.commands.State; //導入方法依賴的package包/類private void setCommandState(boolean state){ICommandService service (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);Command command service.getCommand(COMMAND_ID);State commandState command.getState(COMMAND_STATE);if (((Boolean) commandState.getValue()) ! state){commandState.setValue(state);service.refreshElements(COMMAND_ID, null);}}開發者ID:apicloudcom項目名稱:APICloud-Studio代碼行數:12示例7: setEnabled點讚 2import org.eclipse.core.commands.State; //導入方法依賴的package包/類Overridepublic void setEnabled(Object evaluationContext){Object activeSite ((IEvaluationContext) evaluationContext).getVariable(ISources.ACTIVE_SITE_NAME);Object activeEditor ((IEvaluationContext) evaluationContext).getVariable(ISources.ACTIVE_EDITOR_NAME);if (activeSite instanceof IWorkbenchSite activeEditor instanceof AbstractThemeableEditor){ICommandService commandService (ICommandService) ((IWorkbenchSite) activeSite).getService(ICommandService.class);Command command commandService.getCommand(COMMAND_ID);State state command.getState(RegistryToggleState.STATE_ID);state.setValue(((AbstractThemeableEditor) activeEditor).getWordWrapEnabled());}}開發者ID:apicloudcom項目名稱:APICloud-Studio代碼行數:15示例8: changeButtonState點讚 2import org.eclipse.core.commands.State; //導入方法依賴的package包/類public void changeButtonState(Boolean value) {ICommandService service (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);Command command service.getCommand(ZoomSweepToolHandler.COMMAND_ID);State state command.getState(ZoomSweepToolHandler.ZOOM_SWEEP_TOOGLE_STATE);state.setValue(value);}開發者ID:nasa項目名稱:OpenSPIFe代碼行數:7示例9: saveCurrentState點讚 2import org.eclipse.core.commands.State; //導入方法依賴的package包/類private void saveCurrentState(SelectInProgress selectInProgress) {State state new State();state.setValue(selectInProgress);state.setId(ID_SELECTS_IN_PROGRESS);addState(ID_SELECTS_IN_PROGRESS, state);}開發者ID:caspark項目名稱:eclipse-multicursor代碼行數:7注本文中的org.eclipse.core.commands.State.setValue方法示例整理自Github/MSDocs等源碼及文檔管理平台相關代碼片段篩選自各路編程大神貢獻的開源項目源碼版權歸原作者所有傳播和使用請參考對應項目的License未經允許請勿轉載。