|
-
Using Eclipse JDT to create a new 'working copy' of a source file in memory
I'm using Eclipse JDT to build a Java refactoring platform, for exploring different refactorings in memory before choosing one and saving it. I can create collections of working copies of the source files, edit them in memory, and commit the changes to disk using the JDT framework.
However, I also want to generate new 'working copy' source files in memory as part of refactorings, and only create the corresponding real source file if I commit the working copy. I have seen various hints that this is possible, e.g. http://www.jarvana.com/jarvana/view/..._api_manip.htm says "Note that the compilation unit does not need to exist in the Java model in order for a working copy to be created".
So far I have only been able to create a new real file, i.e.
ICompilationUnit newICompilationUnit = myPackage.createCompilationUnit(newName, "package piffle; public class Baz{private int i=0;}", false, null);
This is not what I want. Does anyone know how to create a new 'working copy' source file, that does not appear in my file system until I commit it? Or any other mechanism to achieve the same thing?
Similar Threads
-
By KrishnaPG in forum Architecture and Design
Replies: 0
Last Post: 10-09-2009, 11:26 PM
-
By IGOROTOWN in forum Java
Replies: 12
Last Post: 10-17-2008, 09:05 AM
-
By null_guy in forum Java
Replies: 27
Last Post: 07-16-2008, 06:33 AM
-
By jase_dukerider in forum C++
Replies: 2
Last Post: 04-14-2005, 07:48 PM
-
By Tomer Cagan in forum ASP.NET
Replies: 1
Last Post: 07-24-2001, 09:01 AM
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks