Author: mareshkau
Date: 2008-06-09 09:11:25 -0400 (Mon, 09 Jun 2008)
New Revision: 8644
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1900
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-06-09
12:05:31 UTC (rev 8643)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-06-09
13:11:25 UTC (rev 8644)
@@ -432,14 +432,14 @@
getChangeEvents().addLast(new VpeEventBean(notifier, eventType, feature,
oldValue,newValue, pos));
- if(uiJob==null || uiJob.getState()==Job.NONE) {
+ if(uiJob==null) {
uiJob = new UIJob(VpeUIMessages.VPE_UPDATE_JOB_TITLE){
@Override
public IStatus runInUIThread(IProgressMonitor monitor) {
monitor.beginTask(VpeUIMessages.VPE_UPDATE_JOB_TITLE, 100);
while(getChangeEvents().size()>0) {
- VpeDebugUtil.debugInfo(getChangeEvents().size()+"\n"); //$NON-NLS-1$
+
monitor.worked((int)(100/getChangeEvents().size()));
VpeEventBean eventBean = getChangeEvents().getFirst();
if (monitor.isCanceled()) {
@@ -464,10 +464,15 @@
}
};
+ }
+
+ if(uiJob.getState()!=Job.RUNNING) {
+
uiJob.setPriority(Job.LONG);
- uiJob.schedule();
+ //Fix of JBIDE-1900
+ uiJob.cancel();
+ uiJob.schedule(400L);
}
-
return;
}