Mercurial > projects > dwt-addons
comparison dwtx/jface/action/ExternalActionManager.d @ 90:7ffeace6c47f
Update 3.4M7 to 3.4
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 06 Jul 2008 23:30:07 +0200 |
parents | 5df4896124c7 |
children | 04b47443bb01 |
comparison
equal
deleted
inserted
replaced
89:040da1cb0d76 | 90:7ffeace6c47f |
---|---|
1 /******************************************************************************* | 1 /******************************************************************************* |
2 * Copyright (c) 2000, 2007 IBM Corporation and others. | 2 * Copyright (c) 2000, 2008 IBM Corporation and others. |
3 * All rights reserved. This program and the accompanying materials | 3 * All rights reserved. This program and the accompanying materials |
4 * are made available under the terms of the Eclipse Public License v1.0 | 4 * are made available under the terms of the Eclipse Public License v1.0 |
5 * which accompanies this distribution, and is available at | 5 * which accompanies this distribution, and is available at |
6 * http://www.eclipse.org/legal/epl-v10.html | 6 * http://www.eclipse.org/legal/epl-v10.html |
7 * | 7 * |
434 registeredListeners.add(commandId, cast(IPropertyChangeListener)existingList.getListeners()[0]); | 434 registeredListeners.add(commandId, cast(IPropertyChangeListener)existingList.getListeners()[0]); |
435 } | 435 } |
436 } | 436 } |
437 } | 437 } |
438 | 438 |
439 /** | |
440 * @since 3.4 | |
441 */ | |
439 public void preExecute(IAction action, Event event) { | 442 public void preExecute(IAction action, Event event) { |
440 String actionDefinitionId = action.getActionDefinitionId(); | 443 String actionDefinitionId = action.getActionDefinitionId(); |
441 if (actionDefinitionId is null | 444 if (actionDefinitionId is null |
442 || !applicabilityChecker.isApplicable(action)) { | 445 || !applicabilityChecker.isApplicable(action)) { |
443 return; | 446 return; |
447 EMPTY_MAP, event, null); | 450 EMPTY_MAP, event, null); |
448 | 451 |
449 commandManager.firePreExecute(actionDefinitionId, executionEvent); | 452 commandManager.firePreExecute(actionDefinitionId, executionEvent); |
450 } | 453 } |
451 | 454 |
455 /** | |
456 * @since 3.4 | |
457 */ | |
452 public void postExecuteSuccess(IAction action, Object returnValue) { | 458 public void postExecuteSuccess(IAction action, Object returnValue) { |
453 String actionDefinitionId = action.getActionDefinitionId(); | 459 String actionDefinitionId = action.getActionDefinitionId(); |
454 if (actionDefinitionId is null | 460 if (actionDefinitionId is null |
455 || !applicabilityChecker.isApplicable(action)) { | 461 || !applicabilityChecker.isApplicable(action)) { |
456 return; | 462 return; |
457 } | 463 } |
458 commandManager.firePostExecuteSuccess(actionDefinitionId, returnValue); | 464 commandManager.firePostExecuteSuccess(actionDefinitionId, returnValue); |
459 } | 465 } |
460 | 466 |
467 /** | |
468 * @since 3.4 | |
469 */ | |
461 public void postExecuteFailure(IAction action, | 470 public void postExecuteFailure(IAction action, |
462 ExecutionException exception) { | 471 ExecutionException exception) { |
463 String actionDefinitionId = action.getActionDefinitionId(); | 472 String actionDefinitionId = action.getActionDefinitionId(); |
464 if (actionDefinitionId is null | 473 if (actionDefinitionId is null |
465 || !applicabilityChecker.isApplicable(action)) { | 474 || !applicabilityChecker.isApplicable(action)) { |
466 return; | 475 return; |
467 } | 476 } |
468 commandManager.firePostExecuteFailure(actionDefinitionId, exception); | 477 commandManager.firePostExecuteFailure(actionDefinitionId, exception); |
469 } | 478 } |
470 | 479 |
480 /** | |
481 * @since 3.4 | |
482 */ | |
471 public void notDefined(IAction action, NotDefinedException exception) { | 483 public void notDefined(IAction action, NotDefinedException exception) { |
472 String actionDefinitionId = action.getActionDefinitionId(); | 484 String actionDefinitionId = action.getActionDefinitionId(); |
473 if (actionDefinitionId is null | 485 if (actionDefinitionId is null |
474 || !applicabilityChecker.isApplicable(action)) { | 486 || !applicabilityChecker.isApplicable(action)) { |
475 return; | 487 return; |
476 } | 488 } |
477 commandManager.fireNotDefined(actionDefinitionId, exception); | 489 commandManager.fireNotDefined(actionDefinitionId, exception); |
478 } | 490 } |
479 | 491 |
492 /** | |
493 * @since 3.4 | |
494 */ | |
480 public void notEnabled(IAction action, NotEnabledException exception) { | 495 public void notEnabled(IAction action, NotEnabledException exception) { |
481 String actionDefinitionId = action.getActionDefinitionId(); | 496 String actionDefinitionId = action.getActionDefinitionId(); |
482 if (actionDefinitionId is null | 497 if (actionDefinitionId is null |
483 || !applicabilityChecker.isApplicable(action)) { | 498 || !applicabilityChecker.isApplicable(action)) { |
484 return; | 499 return; |