Mercurial > projects > dwt2
comparison org.eclipse.jface/src/org/eclipse/jface/action/ActionContributionItem.d @ 18:735224fcc45f
redirected all printings to DwtLogger
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 18 Mar 2009 09:57:53 +0100 |
parents | bc29606a740c |
children | 52184e4b815c |
comparison
equal
deleted
inserted
replaced
17:6f068362a363 | 18:735224fcc45f |
---|---|
50 import org.eclipse.jface.util.PropertyChangeEvent; | 50 import org.eclipse.jface.util.PropertyChangeEvent; |
51 | 51 |
52 import java.lang.all; | 52 import java.lang.all; |
53 import java.util.Set; | 53 import java.util.Set; |
54 import java.lang.JThread; | 54 import java.lang.JThread; |
55 import tango.io.Stdout; | |
56 | 55 |
57 /** | 56 /** |
58 * A contribution item which delegates to an action. | 57 * A contribution item which delegates to an action. |
59 * <p> | 58 * <p> |
60 * This class may be instantiated; it is not intended to be subclassed. | 59 * This class may be instantiated; it is not intended to be subclassed. |
576 bool trace = Policy.TRACE_ACTIONS; | 575 bool trace = Policy.TRACE_ACTIONS; |
577 | 576 |
578 long ms = 0L; | 577 long ms = 0L; |
579 if (trace) { | 578 if (trace) { |
580 ms = System.currentTimeMillis(); | 579 ms = System.currentTimeMillis(); |
581 Stdout.formatln("Running action: {}", action.getText()); //$NON-NLS-1$ | 580 getDwtLogger.info( __FILE__, __LINE__, "Running action: {}", action.getText()); //$NON-NLS-1$ |
582 } | 581 } |
583 | 582 |
584 IPropertyChangeListener resultListener = null; | 583 IPropertyChangeListener resultListener = null; |
585 if (callback !is null) { | 584 if (callback !is null) { |
586 resultListener = new class IPropertyChangeListener { | 585 resultListener = new class IPropertyChangeListener { |
612 if (resultListener !is null) { | 611 if (resultListener !is null) { |
613 result = null; | 612 result = null; |
614 action.removePropertyChangeListener(resultListener); | 613 action.removePropertyChangeListener(resultListener); |
615 } | 614 } |
616 if (trace) { | 615 if (trace) { |
617 Stdout.formatln("{} ms to run action: {}",(System.currentTimeMillis() - ms), action.getText()); //$NON-NLS-1$ | 616 getDwtLogger.info( __FILE__, __LINE__, "{} ms to run action: {}",(System.currentTimeMillis() - ms), action.getText()); //$NON-NLS-1$ |
618 } | 617 } |
619 } else { | 618 } else { |
620 if (callback !is null) { | 619 if (callback !is null) { |
621 callback.notEnabled(action, new NotEnabledException(action | 620 callback.notEnabled(action, new NotEnabledException(action |
622 .getText() | 621 .getText() |