[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-cvs-dev] Detect changes in the workspace that is performed outside eclipse

Title: Detect changes in the workspace that is performed outside eclipse

Hi,

I have tried to ask this question in the eclipse.platform forum but no answers. I will give it a try here and hope for the best.

I inherited a development project for a clearcase plugin for Eclipse.

We have a background job doing refresh of the state of files. The problem we have at the moment is that when we checkin or undo a checkout outside Eclipse

and go back to eclipse the state of the file does not change.

I have read that there is a refreshLocal() method on IResource to detect changes made outside Eclipse.

I changed my refresh method that the Job calls and added the refreshLocal on the resource.

Bang and I got the following error ( see below).

I did some some more reading and found out that the workspace becomes locked when changes are made.

I guess you guys have certainly bumped into this problem and maybe want to share your experience with me.

Br,

//mike


Error
====
!ENTRY org.eclipse.core.jobs 4 2 2009-03-09 10:50:00.671 !MESSAGE An internal error occurred during: "Refreshing ClearCase Resource States".

!STACK 0
java.lang.IllegalArgumentException: Attempted to beginRule: P/Drive_U, does not match outer scope rule:
net.sourceforge.eclipseccase.ClearcasePlugin$2@d2434c
                 at
org.eclipse.core.runtime.Assert.isLegal(Assert.java:64)
                 at
org.eclipse.core.internal.jobs.ThreadJob.illegalPush(ThreadJob.java:122)
                 at
org.eclipse.core.internal.jobs.ThreadJob.push(ThreadJob.java:232)
                 at
org.eclipse.core.internal.jobs.ImplicitJobs.begin(ImplicitJobs.java:80)
                 at
org.eclipse.core.internal.jobs.JobManager.beginRule(JobManager.java:230)
                 at
org.eclipse.core.internal.resources.WorkManager.checkIn(WorkManager.java:117)
                 at
org.eclipse.core.internal.resources.Workspace.prepareOperation(Workspace.java:1747)
                 at
org.eclipse.core.internal.resources.Resource.refreshLocal(Resource.java:1478)
                 at
net.sourceforge.eclipseccase.StateCacheJob.execute(StateCacheJob.java:144)
                 at
net.sourceforge.eclipseccase.StateCacheJobQueue.executePendingJobs(StateCacheJobQueue.java:135)
                 at
net.sourceforge.eclipseccase.StateCacheJobQueue.run(StateCacheJobQueue.java:90)
                 at
org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)