Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-dev] Compilation unit changes for non-existent compilation units

Is it possible to create a CompilationUnitChange (or any kind of text
change) against a resource that doesn't exist ?

I have a case like : 

'interface IFoo permits Foo'
(Foo doesn't exist)

where one might want a quick fix that creates a class, 'Foo' and the
methods it must implement from 'IFoo'. JDT can get around this by
bringing up a class creation wizard to confirm that 'Foo' should be
created but some clients may want to perform these changes without a
dialog popup.

The problem I end up having is the change needs to be known before a
user applies it, but the act of trying to compute the change either
fails, or ends up creating the non-existent resource, before getting
approval from the user to do so.

I just want to confirm there's no nice way to do this before working
around it with hidden/temporary ICompilationUnits to make the needed
changes.

Cheers,
-- 
Roland Grunberg



Back to the top