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

Hi,

First of all I appreciate your answer.

I have a scheduling rule for my job. This is how it looks like:

public void schedule(int jobPriority) {
		priority = jobPriority;
		StateCacheJobQueue queue =
StateCacheFactory.getInstance()
				.getJobQueue();
		queue.schedule(this);
	}

'This' is the object that contains the method above.

Then my StateCacheJobQueue extends Job.

How do I set the refreshRule for my job above?

Br,

//mikael 

-----Original Message-----
From: platform-cvs-dev-bounces@xxxxxxxxxxx
[mailto:platform-cvs-dev-bounces@xxxxxxxxxxx] On Behalf Of Szymon
Brandys
Sent: den 12 mars 2009 11:22
To: Eclipse CVS Integration developers list.
Subject: Re: [platform-cvs-dev] Detect changes in the workspace thatis
performed outside eclipse

Hi Mikael,

You wrote:
"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. "

Does your job use any scheduling rule? When you do refreshLocal, the
refresh rule is used (see IResourceRuleFactory#refreshRule) and it is in
conflict with the rule of the job.


--
Szymon Brandys



 

             "Mikael

             Petterson"

             <mikael.petterson
To 
             @ericsson.com>            <platform-cvs-dev@xxxxxxxxxxx>

             Sent by:
cc 
             platform-cvs-dev-

             bounces@xxxxxxxxx
Subject 
             rg                        [platform-cvs-dev] Detect changes

                                       in the workspace that is

                                       performed outside eclipse

             2009-03-12 08:53

 

 

             Please respond to

               "Eclipse CVS

                Integration

             developers list."

             <platform-cvs-dev

               @eclipse.org>

 

 





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:14
4)
                 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)




_______________________________________________
platform-cvs-dev mailing list
platform-cvs-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-cvs-dev




_______________________________________________
platform-cvs-dev mailing list
platform-cvs-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-cvs-dev