Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Refresh Package explorer
Refresh Package explorer [message #236226] Fri, 22 September 2006 05:12 Go to next message
Eclipse UserFriend
Originally posted by: dummy.toto.com

I'm working with an IJavaProject witch has a Class folder (lib) in its
classpath entries.

The lib folder will contain .class files and will be refresh automatically
or on user UI interactions :
- add new .class files
- remove existing .class files

Currently, I'm doing FileSystem Operations with java.io.File creation and
delete operations.
I'm facing problems with the refresh of the Java Project.
I''m trying to do some refresh operations (on the project, on the lib
folder...).

Unfortunately :

The pachage explorer view is never synchronized with the file system after
these refresh operations.
I also have problems with import in java source files who need to import the
new added classes.
I have to do manually the import, organize import does not work.

I don't know if there are some mechamisms to do the add and delete
operations with Eclipse APIs (JavaCore, others..), to avoid the problem of
the FileSystem and Eclipse resource synchronisations.

Have you got som ideas ?

Thanks.

Evelyne
Re: Refresh Package explorer [message #236249 is a reply to message #236226] Fri, 22 September 2006 07:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Evelyne,

If you refresh the project properly, i.e.,
IResource.refreshLocal(IResource.DEPTH_INFINITE...), it should work
fine. You should also be able to use IFile.create/delete/setContents to
create, destroy, or update resources.


Evelyne Merle wrote:
> I'm working with an IJavaProject witch has a Class folder (lib) in its
> classpath entries.
>
> The lib folder will contain .class files and will be refresh automatically
> or on user UI interactions :
> - add new .class files
> - remove existing .class files
>
> Currently, I'm doing FileSystem Operations with java.io.File creation and
> delete operations.
> I'm facing problems with the refresh of the Java Project.
> I''m trying to do some refresh operations (on the project, on the lib
> folder...).
>
> Unfortunately :
>
> The pachage explorer view is never synchronized with the file system after
> these refresh operations.
> I also have problems with import in java source files who need to import the
> new added classes.
> I have to do manually the import, organize import does not work.
>
> I don't know if there are some mechamisms to do the add and delete
> operations with Eclipse APIs (JavaCore, others..), to avoid the problem of
> the FileSystem and Eclipse resource synchronisations.
>
> Have you got som ideas ?
>
> Thanks.
>
> Evelyne
>
>
>
>
>
>
>
Re: Refresh Package explorer [message #236270 is a reply to message #236249] Fri, 22 September 2006 12:00 Go to previous message
Eclipse UserFriend
Originally posted by: dummy.toto.com

Thanks for your reply Ed.

I was doing refresh with refreshLocal, with IProject instance, and IFolder
instance of lib too.
It seems that it doesn't work well if you want to refresh a folder which is
in the classpath entries as a class folder.

I solve my problem like this :
Instead of a class folder, i use a jar file in the classpath entries,
containing all the classes i wanted to store in my lib folder.
Rebuild all the jar automatically, or on user interactions.

Call IProject.refreshLocal(IResource.DEPTH_INFINITE...) after the jar
rebuild works well.
The Package Explorer view is synchronized with jar updates.
Organize imports works well too.

I guess that the problem comes when you want to refresh a class folder.

Evelyne.

"Ed Merks" <merks@ca.ibm.com> a
Previous Topic:org.eclipse.jdt.ui.actions.FormatAllAction.runOnMultiple(ICompiliationUnit[]) slow on single ICU
Next Topic:JDT core disk usage and Quotas
Goto Forum:
  


Current Time: Fri Apr 25 01:56:40 EDT 2025

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

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

Back to the top