Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Creating files in a project folder
Creating files in a project folder [message #605720] Sun, 02 May 2010 20:59 Go to next message
David Patterson is currently offline David PattersonFriend
Messages: 11
Registered: March 2010
Junior Member
I'm working on a Plug-in that creates a bunch of Java files in a folder in the project. The files are created by a Job to avoid problems with blocking the GUI parts. It is taking longer than it would seem like it should (about 1 second per file, and the largest file is only 19K bytes with most of them being 1K-2K in size).

It seems like after each file is created, some Eclipse code is doing a synchronization with SVN and/or compiling the file.

I would like it if I could somehow defer the "background" file processing until after I've written all of the files. I am updating a view in my plug-in with progress and I'd like that to be quick. The files will not be used immediately so I can easily wait a bit for Eclipse to do the behind the scenes work after the fact.

In my Job, I call setRule with the IFolder object into which I'm writing all of the files. Is there more that can be done to defer things until after "my" work is done?

I'm using Display.asynchExec to run the code that updates the GUI so that should not be the problem. (I commented out the calls to asynchExec and the time did not improve.)

Thanks

Dave Patterson
Re: Creating files in a project folder [message #605724 is a reply to message #605720] Mon, 03 May 2010 09:47 Go to previous message
Jan Reimann is currently offline Jan ReimannFriend
Messages: 140
Registered: July 2009
Senior Member
Hi Dave,
for initiating the workspace to be re-build after all of your changes
are completed you should consider IWorkspaceRunnable. For further
information look here:
http://wiki.eclipse.org/FAQ_What_are_IWorkspaceRunnable,_IRu nnableWithProgress,_and_WorkspaceModifyOperation%3F

best regards,
Jan

David Patterson wrote:
> I'm working on a Plug-in that creates a bunch of Java files in a folder
> in the project. The files are created by a Job to avoid problems with
> blocking the GUI parts. It is taking longer than it would seem like it
> should (about 1 second per file, and the largest file is only 19K bytes
> with most of them being 1K-2K in size).
>
> It seems like after each file is created, some Eclipse code is doing a
> synchronization with SVN and/or compiling the file.
>
> I would like it if I could somehow defer the "background" file
> processing until after I've written all of the files. I am updating a
> view in my plug-in with progress and I'd like that to be quick. The
> files will not be used immediately so I can easily wait a bit for
> Eclipse to do the behind the scenes work after the fact.
> In my Job, I call setRule with the IFolder object into which I'm
> writing all of the files. Is there more that can be done to defer things
> until after "my" work is done?
>
> I'm using Display.asynchExec to run the code that updates the GUI so
> that should not be the problem. (I commented out the calls to asynchExec
> and the time did not improve.)
>
> Thanks
>
> Dave Patterson .
Previous Topic:Line Highlighting in active eclipse source code editor
Next Topic:Creating files in a project folder
Goto Forum:
  


Current Time: Tue Mar 19 08:01:16 GMT 2024

Powered by FUDForum. Page generated in 0.02493 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top