Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-core-dev] Taking working copies in account when doing JavaModel operations

Working copies are not connected from the JavaModel, they are created on
demand to perform local operations which can then be commited onto the
JavaModel.
They can see other pieces of the JavaModel through name resolution, but
they cannot see any other working copy, since there is no mechanism in the
JavaModel to cause working copies to shadow their original compilation
unit. This is annoying when performing operations which involve some name
resolution, since the referenced working copies are being ignored (until
they are saved).

We are investigating ways to have multiple working copies to be considered
at once by JavaModel operations. We currently are leaning towards a
solution where some operations could take in argument a set of working
copies to be considered (taking precedence over the normal Java model). We
can imagine having the search engine and the type hierarchy resolver be
equipped with such APIs; unsure about code completion and code selection
(maybe).

Given we are not planning on indexing working copies, we would force these
extra working copies to be passed to the name resolution engine (and likely
resolved even if unnecessary), thus they would de facto take precedence
over the JavaModel regular lookup mechanism (SearchableEnvironment).

As a consequence, passing extra working copies could penalize affected
operations, does this sound acceptable ?




Back to the top