Amoung the JUnit test cases we have the one that tests OpenOn's
region
types
recognition. This tests contains the informatin for the specified file
region types and calls the OpenOn "detector" on each character position
in that file to ensure that the region types are properly detected.
sounds good.
So, for the CA we can create something like this. Because of
algorithm
of CA
invokation is closed deep inside ContentAssistant and
CompletionProposalPopup classes we have to write the same algorithm to
get
the CA Processor for the source viewer and text position specified and
then
aquire the processor for proposals.
Ok.
There are some difficulties because of UI staff (there are too many
private
and package local/internal classes in CA which need to, but cannot be
accessed from outside (from test case code)) but I think it's possible to
get the proposals for some test file.
would be really usefull if we could get this. But is all the UI stuff
needed to
test the contentassist ? Can't it run just on the model(s) ?
The big question is how the test case can ensure that the proposal
list
returned is the right proposals? There are too many variations for the
proposal set (depending on the JBoss and 3rd-party plugins installed and
project configuration it is possible to get a different set of
proposals).
I don't understand this. If you control the code completion then you also
can limit the code
completion to a specific set of completion mechanisms + you also can
completely control
what goes into the project you are code completing on.
--
--
Max Rydahl Andersen
callto://max.rydahl.andersen
Hibernate
max(a)hibernate.org
http://hibernate.org
JBoss a division of Red Hat
max.andersen(a)jboss.com