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 36547 - Bad code is generated for BeanInfo
Summary: Bad code is generated for BeanInfo
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Beans (show other bugs)
Version: 3.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Jan Becicka
URL: http://www.jroller.com/page/behrangsa
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-12 15:20 UTC by behrangsa
Modified: 2010-09-23 08:33 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Source Code and Binaries for EqualiedLayout (10.02 KB, application/octet-stream)
2003-10-14 22:10 UTC, behrangsa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description behrangsa 2003-10-12 15:20:06 UTC
Hi

I have written a simple BeanInfo with NetBeans 
for my own custom layout. But there's a small 
problem with the generated code: when setting 
items like Short Description Code, Display Name 
Code, and whatever that's a String, NetBeans does 
not put double quotes in the generated code. So 
one has to write "Custom Layout" instead of 
Custom Layout in the value field to get the 
correct generated code. It's always reproducable.
Comment 1 Tomas Pavek 2003-10-13 09:28:30 UTC
Are the properties 'Short Description Code' and 'Display Name 
Code' really of String type? Don't you have your own PropertyEditor
for them? Or don't you set them via Form Connection property editor?
BTW If you set something as code then there cannot be quotes put
automatically because as code you can provide anything, not just
Strings. Can you give more details? Or best - to attach or send me
your layout manader so I could try it? Thanks
Comment 2 behrangsa 2003-10-14 22:10:36 UTC
Created attachment 11860 [details]
Source Code and Binaries for EqualiedLayout
Comment 3 behrangsa 2003-10-14 22:11:58 UTC
Oops... 

I forgot to send the comment itself... So here it is:

Hi

After clicking on the "BeanInfo Editor..." menu-item in the popup 
menu that becomes visible when someone clicks on the "Bean Patterns" 
node of a class, a dialog opens.

(In that dialog) and in the right panel for the "Bean" node's only 
child there are several items: Name, Expert, Hidden, ... and 
finally "Display Name Code", and "Short Description Code". I think 
these items should have a "..." button like the Component Inspector 
and the user should be able to select if he/she wants to set thses 
values with custom code or directly. But now the only option is 
custom code... Not very important but I think adding the 
forementioned option makes this part of NetBeans more consistent with 
the rest of the IDE.

BTW, my layout-manager (EqualizedLayout) and its BeanInfo and and 
PropertyEditor are attached to this post (as a jar file). Is there 
any chance to see it in the next version of NetBeans ? ;-)

Comment 4 Tomas Pavek 2003-10-15 09:41:11 UTC
Oh, this was my misunderstanding - I thought you meant code generation
in form editor, but it was actually the BeanInfo editor. It really has
not special property editors for code like form editor has. This could
be taken as enhancement request...

As for the EqualizedLayout appearing in NetBeans standard distribution
- that's not possible, we use just standard components from JDK, no
custom components or libraries. On the other hand it would be nice to
have e.g. a special module on netbeans.org collecting useful beans,
layouts etc for visual development; users could download them
additionally. But that's just an idea...