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 87177 - filtering doen't work in element value completion.
Summary: filtering doen't work in element value completion.
Status: RESOLVED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Text-Edit (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@xml
URL:
Keywords:
Depends on:
Blocks: 89008
  Show dependency tree
 
Reported: 2006-10-15 16:21 UTC by Milos Kleint
Modified: 2007-09-25 01:33 UTC (History)
1 user (show)

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 Milos Kleint 2006-10-15 16:21:18 UTC
in the maven support I write at mevenide.codehaus.org I have code completion for
maven xml project files. I suppose that influence any other grammar provider
registered.

I complete both the elements and their values, eg.
<project>
   <artifactId>org.openide.util</artifactId>
<project>

completing the element <artifactId> works fine, completing the value
org.openide.util doesn't in 5.5 (works fine in 5.0 and trunk builds til the merge)
I figured one possible problem is the XmlCompletionQuery.java file which at line
138 assigns a new list of completions instead of adding to the original one
retrieved by the plugged in provider. after removing that line I ws able to get
completion on the first position (which gives the full list of available
values), but any subsequent position (whihc is supposed to give a subset that
matches the entered prefix) still doesn't work.

http://jira.codehaus.org/browse/MEVENIDE-460
Comment 1 Marek Fukala 2006-10-16 12:58:53 UTC
OK, I see, it is a regression in 5.5. The problem is that there aren't many
client of the xml cc api using the xml completion for element values so nobody
found the problem in 5.5 testing cycle. I'll fix it in 6.0.
Comment 2 Petr Jiricka 2006-10-17 17:02:50 UTC
Since this only happens in a very specific use case, and affects only a module
that is not a part of the standard distribution, we determined this is not a
showstopper for NetBeans 5.5. Requesting a waiver for this issue.
Comment 3 Milos Kleint 2006-10-17 19:24:24 UTC
fine with me.
 I should have noticed earlier. I actually only noticed because the 5.5 j2ee
support got merged into trunk.
Comment 4 Marek Fukala 2007-02-16 14:44:49 UTC
Reassigning to default owner of selected subcomponent. New owners are gladly
welcomed.
Comment 5 Milos Kleint 2007-02-16 15:02:05 UTC
doesn that mean this code is not currently maintained by anyone?
Comment 6 Marek Fukala 2007-02-16 15:37:11 UTC
No, Prakash Narayan's team has taken over the XML modules. Prague's j2ee team is
not responsible for most of the XML modules anymore. I expect that somebody from
the team will assign the issues to concrete persons. Sorry for the confusion.
Comment 7 Samaresh Panda 2007-07-11 01:47:55 UTC
Milos, is it still a problem? How can I reproduce this problem?
Comment 8 Milos Kleint 2007-07-11 07:45:39 UTC
yup. Still seeing the problem.


steps to reproduce.
1. install 6.0 M10 or daily build.
2. from the update center install "Maven" feature.
3. checkout subversion repository url: https://svn.codehaus.org/mevenide/branches/NB60COMPATIBLE
4. open the root project named "Maven2 support at Mevenide"
5. under the project Files subnode, open the pom.xml file
6. scroll down until you find this snippet.

        <repository>
            <id>codehaus</id>
            <name>Mevenide's M2 repo</name>
            <url>http://repository.codehaus.org</url>
            <releases>
                <updatePolicy>never</updatePolicy>
            </releases>
        </repository>
7. place the caret at the beginning of updatePolicy value. delete "never". invoke CC. it shows multiple values. 
8. type 'a', invoke CC again. nothing is shown. Shall show "always". ERROR.
Comment 9 Samaresh Panda 2007-07-12 01:26:26 UTC
This is not same as the original bug description. You do get a list of values for element. The problem I see right now
is that filtering doesn't work and IMO it is a problem in your code. Can you please verify that?

In any case, this cannot be a P2. I'm updating the summary.
Comment 10 Milos Kleint 2007-07-12 07:11:35 UTC
filtering does work for me elsewhere (in element names). it used to work seamlessly in 5.0, got completely broken in 5.5
timeframe. I've added a hotfix to the xml codebase to at least get the initial empty completion.
don't agree with P3 downgrade. The fact that the empty completion works is useless as noone will attempt to do
completion at that stage. And for many values I have the complete list is too long to be of any use.
Comment 11 Milos Kleint 2007-09-19 08:27:37 UTC
fixed.

Checking in ValueResultItem.java;
/cvs/xml/text-edit/src/org/netbeans/modules/xml/text/completion/ValueResultItem.java,v  <--  ValueResultItem.java
new revision: 1.7; previous revision: 1.6
done
Checking in XMLCompletionProvider.java;
/cvs/xml/text-edit/src/org/netbeans/modules/xml/text/completion/XMLCompletionProvider.java,v  <-- 
XMLCompletionProvider.java
new revision: 1.3; previous revision: 1.2