Changeset 8441 in josm for trunk


Ignore:
Timestamp:
2015-06-02T14:03:31+02:00 (9 years ago)
Author:
Don-vip
Message:

see #11209 - add debug messages

Location:
trunk/src/org/openstreetmap/josm
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java

    r8377 r8441  
    132132            if (offsetDialog != null) {
    133133                offsetDialog.updateOffset();
     134            }
     135            if (Main.isDebugEnabled()) {
     136                Main.debug(getClass().getName()+" consuming event "+kev);
    134137            }
    135138            kev.consume();
  • trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java

    r8395 r8441  
    647647        if (!Main.isDisplayingMapView() ||
    648648                !repeatedKeySwitchLassoOption || !getShortcut().isEvent(e)) return;
     649        if (Main.isDebugEnabled()) {
     650            Main.debug(getClass().getName()+" consuming event "+e);
     651        }
    649652        e.consume();
    650653        if (!lassoMode) {
  • trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java

    r8430 r8441  
    456456                // and the result differs from its default value
    457457                result = ExtendedDialog.DialogClosedOtherwise;
     458                if (Main.isDebugEnabled()) {
     459                    Main.debug(getClass().getName()+" ESC action performed ("+actionEvent+") from "+new Exception().getStackTrace()[1]);
     460                }
    458461                setVisible(false);
    459462            }
     
    482485        if (visible) {
    483486            repaint();
     487        }
     488
     489        if (Main.isDebugEnabled()) {
     490            Main.debug(getClass().getName()+".setVisible("+visible+") from "+new Exception().getStackTrace()[1]);
    484491        }
    485492
     
    646653
    647654    class HelpAction extends AbstractAction {
     655        /**
     656         * Constructs a new {@code HelpAction}.
     657         */
    648658        public HelpAction() {
    649659            putValue(SHORT_DESCRIPTION, tr("Show help information"));
  • trunk/src/org/openstreetmap/josm/gui/MainMenu.java

    r8419 r8441  
    966966                        Action menuAction = selectedItem.getAction();
    967967                        menuAction.actionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, null));
     968                        if (Main.isDebugEnabled()) {
     969                            Main.debug(getClass().getName()+" consuming event "+e);
     970                        }
    968971                        e.consume();
    969972                    }
  • trunk/src/org/openstreetmap/josm/gui/MenuScroller.java

    r8291 r8441  
    507507            firstIndex += mwe.getWheelRotation();
    508508            refreshMenu();
     509            if (Main.isDebugEnabled()) {
     510                Main.debug(getClass().getName()+" consuming event "+mwe);
     511            }
    509512            mwe.consume();
    510513        }
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingComboBox.java

    r8429 r8441  
    4646     */
    4747    class AutoCompletingComboBoxDocument extends PlainDocument {
    48         private JosmComboBox<AutoCompletionListItem> comboBox;
     48        private final JosmComboBox<AutoCompletionListItem> comboBox;
    4949        private boolean selecting = false;
    5050
     
    8888            // if the current offset isn't at the end of the document we don't autocomplete.
    8989            // If a highlighted autocompleted suffix was present and we get here Swing has
    90             // already removed it from the document. getLength() therefore doesn't include the
    91             // autocompleted suffix.
     90            // already removed it from the document. getLength() therefore doesn't include the autocompleted suffix.
    9291            if (offs + str.length() < getLength()) {
    9392                return;
     
    109108                    item = lookupItem(curText, true);
    110109                } catch (NumberFormatException e) {
    111                     // either the new text or the current text isn't a number. We continue with
    112                     // autocompletion
     110                    // either the new text or the current text isn't a number. We continue with autocompletion
    113111                    item = lookupItem(curText, false);
    114112                }
  • trunk/src/org/openstreetmap/josm/gui/util/AdvancedKeyPressDetector.java

    r8345 r8441  
    123123
    124124    private void processKeyEvent(KeyEvent e) {
     125        if (Main.isDebugEnabled()) {
     126            Main.debug("AdvancedKeyPressDetector enabled="+enabled+" => processKeyEvent("+e+") from "+new Exception().getStackTrace()[2]);
     127        }
    125128        if (e.getID() == KeyEvent.KEY_PRESSED) {
    126129            if (timer.isRunning()) {
     
    130133                    if (isFocusInMainWindow()) {
    131134                        for (KeyPressReleaseListener q: keyListeners) {
     135                            if (Main.isDebugEnabled()) {
     136                                Main.debug(q+" => doKeyPressed("+e+")");
     137                            }
    132138                            q.doKeyPressed(e);
    133139                        }
     
    142148                        if (isFocusInMainWindow()) {
    143149                            for (KeyPressReleaseListener q: keyListeners) {
     150                                if (Main.isDebugEnabled()) {
     151                                    Main.debug(q+" => doKeyReleased("+e+")");
     152                                }
    144153                                q.doKeyReleased(e);
    145154                            }
     
    192201    public final void setEnabled(boolean enabled) {
    193202        this.enabled = enabled;
     203        if (Main.isDebugEnabled()) {
     204            Main.debug("AdvancedKeyPressDetector enabled="+enabled+" from "+new Exception().getStackTrace()[1]);
     205        }
    194206    }
    195207
Note: See TracChangeset for help on using the changeset viewer.