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.
In beans.xml code completion does not work e.g.: <beans> <alternatives> <stereotype>CTRL+SPACE --> does not suggest packages + classes</stereotype> </alternatives> </beans> Support for Java code completion would streamline the development of advanced JavaEE apps. General support for Java code completion in XML files would be also nice (e.g. in pom.xml etc.)
David, do you know how easy/difficult this is to do?
I have no idea as I never worked with editor code completion APIs before. Maybe Martin has a better idea? Adam, do you expect it to be common for developers to customizer CDI via beans.xml? Or in which cases it is necessary? Thanks.
(In reply to comment #2) > I have no idea as I never worked with editor code completion APIs before. Maybe > Martin has a better idea? Sorry, no idea - I didn't wrote it from scratch yet. I think, that some base for the completion could be taken from Spring Beans module since it looks pretty nice written there and for beans.xml it should be much easier than for Spring configs. If we would agreed to write this I can be volunteer for this job since it could be useful for me (and i.e. faces-config for future).
Cc'ing also Sergey, as he may have some ideas. Sergey, don't we have something like this for persistence.xml?
yes, there is simple completion for classes in persistence.xml, see http://wiki.netbeans.org/NetBeans_72_NewAndNoteworthy#Persistence.xml
just a note, int persistence it's not for classes but for entities, usually there are much less entities then classes and it may affect some code/optimization/performance.
I need to collect some use-cases, for <alternatives>: - <class> child node, should contain only possible "alternatives". - <stereotype> .. I'm still evaluating tutorials/specification. more use-cases possible use cases? The feature seams really useful for end to end development in a few clicks. One more option is to add "visual" panel(similar to persistence.xml or web.xml etc) as xml multiview editor (it's better to handle as separate enhancment if anybody is interested).
*** Bug 178989 has been marked as a duplicate of this bug. ***
Integrated into 'main-silver', will be available in build *201310240001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/a94aee22af9b User: Sergey B. Petrov <sj-nb@netbeans.org> Log: #229795 need cc and some other in web.beans module
unfortunately there is no internal model foe alternative classes as I see, and cc may be as slow as cc in java files on second ctrl+space, i.e. with all possible classes on full accessible classpath
I have a question if it can be expected to have at least dozens of alternatives/stereotypes. Currently I see no reasons to have structured list, i.e. packages on top and then after package selection select class (as in case of usual java classes in java editor). If there are 10-20 classes in different packages it may have sense to use plain list with fully qualified names here (or with simple and package in '()' ). Any ideas? Also for 8.0 I'll limit scope to current project only, later if may be done with second click to scan dependencies also (similar to java editor).
For 8.0 <class> <stereotype> completion is implemented, but with some limitation, to cover some progress I'm closing the issue, future enhancements need to be filed as new ones. what I see as items for future update: current classes are completed from current project only, no validation if stereotype is used anywhere, no filter for cc list for already added classes/stereotypes and classes list is "plain"(but last one may be ok)
Integrated into 'main-silver', will be available in build *201311111815* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/2949a84dcabd User: Sergey B. Petrov <sj-nb@netbeans.org> Log: #229795 <class> and <stereotype> in <alternatives> now show classes/annotations marked with @alternative