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.
e.g. Action quitAction = GUIUtilities.createQuitAction(); Generates (previously non-existet method) createQuitAction() static void createQuitAction() {.... So original class remains uncompilable. "static Action createQuitAction() {...." would be nice. Or "static Object..." with selected Object like with the newly created (e.g.) fields. Filing as enhancement since it is still much, much better than nothing. PS: This one for Leon next one for Honza ;)
"void" for methods and "Object" for fields is the fallback (it means "I have no idea of what type this should be."). It is trivial to make it "Object" for both. But, in the described case, it is possible to guess the type, so it should better propose the correct type.
i guess it's not hard. will take care of it these days
fixed. some functional tests to follow Checking in CreateElementJavaHint.java; /cvs/contrib/editorhints/java/src/org/netbeans/modules/java/hints/CreateElementJavaHint.java,v <-- CreateElementJavaHint.java new revision: 1.13; previous revision: 1.12 done
It's much better, thanks.
It's fixed only for method created in _this_ class. int a = createIntReturningMethod(); // works fine - creates method returning int int a = OtherClassThanThis.createIntReturningMethod(); // this still creates "static void". Should be "static int"
so, it's hopefully fixed better now. added some more tests. please shoot if it doesn't :)
Am I too "gluttonous"? Feel free to close as WONTFIX ;) class AA { static int getSomeInt() { return AA.pleasePleaseReturnInt(); } } newly created method pleasePleaseReturnInt() should return int :) But great work, thanks lot for a contribution to all hints-coders. I can't live without it anymore!
fixed (alltogether with some more usecases): for example if you have: existingMethod(int i) and you write existingMethod(unexistingMethod()), the return type of unexistingMethod should be int. thanks for reporting
Yes, it seems that everything works now. Really fast. Thanks.