Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » possible bug with save-acton "Add 'this' qualifier to unqualified field accesses" and acti
possible bug with save-acton "Add 'this' qualifier to unqualified field accesses" and acti [message #989807] Fri, 07 December 2012 23:51
Eclipse UserFriend
Hi,

I think, I found a problem regarding the parsing of the inner class, WindowBuilder creates, when adding an action.




Steps I took:

1.) Create a new JFrame (File->New->Other->WindowBuilder->Swing Designer->JFrame)

2.) Add a JButton on that JFrame

3.) rightclick the new JButton->Set Action->New...
(the result is visible in attached screen1.png)
code:
 private class SwingAction_1 extends AbstractAction {
        public SwingAction_1() {
            putValue(NAME, "SwingAction_1");
            putValue(SHORT_DESCRIPTION, "Some short description");
        }

        public void actionPerformed(ActionEvent e) {
        }
    }


4.) Save the file
(the result is visible in attached screen2.png)
code:
 private class SwingAction_1 extends AbstractAction {
        public SwingAction_1() {
            this.putValue(Action.NAME, "SwingAction_1");
            this.putValue(Action.SHORT_DESCRIPTION, "Some short description");
        }

        
        public void actionPerformed(final ActionEvent e) {
        }
    }


The calls to "putValue" have been qualified with "this". In the design view the properties are not shown anymore.
If I remove the text "this." in the source view and switch back to the design view (without saving of course), the properties are shown again.


Version-info (I hope, I got the correct ones...):
Version: Juno Service Release 1
Build id: 20121004-1855

org.eclipse.wb.core.feature (1.5.1.r42x201209161109) "WindowBuilder Core"
org.eclipse.wb.core.ui.feature (1.5.1.r42x201209161116) "WindowBuilder Core UI"
org.eclipse.wb.core.xml.feature (1.5.1.r42x201209161132) "WindowBuilder Core for XML GUI's"
org.eclipse.wb.doc.user.feature (1.5.1.r42x201209161130) "WindowBuilder User Guide"
org.eclipse.wb.layout.group.feature (1.5.1.r42x201209161140) "WindowBuilder GroupLayout Support"
org.eclipse.wb.rcp.doc.user.feature (1.5.0.r42x201206111236) "WindowBuilder User Guide - SWT"
org.eclipse.wb.rcp.feature (1.5.1.r42x201209161238) "SWT Designer"
org.eclipse.wb.rcp.SWT_AWT_support (1.5.1.r42x201209161301) "WindowBuilder SWT_AWT Support"
org.eclipse.wb.swing.doc.user.feature (1.5.0.r42x201206111240) "WindowBuilder User Guide - Swing"
org.eclipse.wb.swing.feature (1.5.1.r42x201209161216) "Swing Designer"
org.eclipse.wb.swt.feature (1.5.1.r42x201209161211) "SWT Designer Core"
org.eclipse.wb.xwt.feature (1.5.1.r42x201209161246) "SWT Designer XWT Support"
  • Attachment: screen1.png
    (Size: 104.45KB, Downloaded 259 times)
  • Attachment: screen2.png
    (Size: 151.21KB, Downloaded 488 times)
Previous Topic:Adding form toolkit 'adapt' call
Next Topic:XWT - creating object inside a composite of a component
Goto Forum:
  


Current Time: Sun Feb 09 19:22:47 GMT 2025

Powered by FUDForum. Page generated in 0.03405 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top