This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 3974 - Form Editor does not generate constants for properties, instead uses hard-coded values.
Summary: Form Editor does not generate constants for properties, instead uses hard-cod...
Status: CLOSED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: All All
: P4 normal (vote)
Assignee: Jon Koplin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1999-09-22 22:46 UTC by Jon Koplin
Modified: 2003-06-30 18:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Koplin 1999-09-22 22:46:08 UTC
When Gandalf generates code that involves class constants, like, e.g.
the EAST, WEST, NORTH, etc. constants of java.awt.BorderLayout or the
LOWERED and RAISED constants of BevelBorder, it generates code
containing the values instead of the names of the constants.


I.e., instead of
    jLabel.setBorder(new BevelBorder(BevelBorder.LOWERED));
or
    jPanel.add(jLabel, BorderLayout.SOUTH);
it generates
    jLabel.setBorder(new BevelBorder(1));
or
    jPanel.add(jLabel, "South");

This is extremely bad coding as it runs counter to what these constants
are there for, i.e. NOT having to deal with the values in the first
place, thereby making the code less error-prone and more portable across
 releases of the JDK as well as independent from implementation details.
Comment 1 Marek Grummich 2000-07-25 09:23:59 UTC
Priority is changed to P4 (normal).
Comment 2 Marian Mirilovic 2001-01-15 17:45:59 UTC
In [nb31](34) is fixed and now verified :
- generation border position is right, for position is generated
	e.g. BorderLayout.SOUTH


This bug is reopen, because:

- for BevelBorder isn't gerated whole :
	setBorder(new BevelBorder(BevelBorder.LOWERED))

but  only setBorder(new BevelBorder(1))
Comment 3 Tomas Pavek 2001-02-23 17:02:45 UTC
Fixed.
Comment 4 Marian Mirilovic 2001-02-23 18:24:17 UTC
verified in [nb-dev](132), [pilsen](010222)
Comment 5 Quality Engineering 2003-06-30 18:28:00 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.