facebook

Bug: weird effect of hitting DEL while adding event handler

  1. MyEclipse Archived
  2.  > 
  3. Matisse/Swing UI Development
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #268028 Reply

    tkeating
    Member

    I’m just starting to use M4ME, and I quickly ran afoul of a REALLY annoying bug. I was not able to find any reference to it on the forum, so here’s the story, in pictures:


    In the designer, I start off by selecting the component to which I want to add an event handler. I right-click to get a menu of event handler choices.


    So far, so good. Choosing the event handler has caused M4ME to add the necessary boilerplate (event declaration, handler declaration with “Insert code here” comment).


    I select the marker comment to replace, and hit Delete . . .


    WTF? It didn’t just delete that line, it deleted the whole event handler AND it removed all the indenting from the code! That’s crazy AND annoying.

    Here’s what’s happening: when I hit DEL, that keystroke is for some reason still being sent to the designer. If I right-click on the control to get the initial event handler menu, or I use some key OTHER than delete (e.g. backspace), this doesn’t happen. (The Delete key doesn’t work in the code editor, however, because it’s still being sent to the designer.) Or, if I manually toggle between the source and designer windows, focus gets applied correctly to the source window and DEL works the way it is supposed to.

    The designer apparently unbeautifies the code behind the scenes to simplify the process of inserting the generated code, then rebeautifies it when you switch over to the source view. Only I’m already ON the source view, so I get to see the man behind the curtain, cranking on the little knobs and dials.

    Here is my system information block, per the posting guidelines:
    *** Date:
    Monday, March 26, 2007 4:37:38 PM CDT

    ** System properties:
    OS=WindowsXP
    OS version=5.1
    Java version=1.5.0_08

    *** MyEclipse details:
    MyEclipse Enterprise Workbench
    Version: 5.1.1 GA
    Build id: 20070302-5.1.1-GA

    *** Eclipse details:
    MyEclipse Enterprise Workbench

    Version: 5.1.1 GA
    Build id: 20070302-5.1.1-GA

    Eclipse Platform

    Version: 3.2.2.r322_v20070119-RQghndJN8IM0MsK
    Build id: M20070212-1330

    Eclipse RCP

    Version: 3.2.2.r322_v20070104-8pcviKVqd8J7C1U
    Build id: M20070212-1330

    Eclipse Java Development Tools

    Version: 3.2.2.r322_v20070104-R4CR0Znkvtfjv9-
    Build id: M20070212-1330

    Eclipse Project SDK

    Version: 3.2.2.r322_v20070104-dCGKm0Ln38lm-8s
    Build id: M20070212-1330

    Eclipse Graphical Editing Framework

    Version: 3.2.2.v20070208
    Build id: 20070208-1315

    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -launcher
    C:\Program Files\MyEclipse 5.1.1 GA\eclipse\eclipse.exe
    -name
    Eclipse
    -showsplash
    600
    -exitdata
    166c_60
    -vm
    C:\Program Files\MyEclipse 5.1.1 GA\jre\bin\javaw.exe

    #268035 Reply

    Luc
    Member

    Yes, this is a known problem. You correctly described the problem and the way to workaround it.
    The problem was fixed for MyEclipse 5.5 milestone release 1. If it annoyed you too much you can try this release.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Bug: weird effect of hitting DEL while adding event handler

You must be logged in to post in the forum log in