Bug 46775 [reconciling] Need a save synchronization method to ensure transactional updating of problem requestor
I20031113 Each working copy has a problem requestor for its lifetime. The problem requestor needs to be updated transactionally, i.e. no interleaving start/end call pairs. In order to ensure that, IWorkingCopy.reconcile should only be called when being in a monitor locking the working copy. This scheme is "per convention" and not satisfied by the Java core itself. We need a better scheme to also avoid the reconciler to become active during long running operations involving files open in editors such as refactorings across many files. A workspace operation using the working copy as scheduling rule seems appropriate. Need to check how to deal with working copies without an underlying resource. Need to check for the most appropriate location, i.e. caller or callee.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitDocumentProvider.java
private static final String SPELLING_ANNOTATION_TYPE= "org.eclipse.ui.workbench.texteditor.spelling"; 
			
			
			/** 
			 * The layer in which task problem annotations are located.
			 */
			private static final int TASK_LAYER;
			/** 
			 * The layer in which info problem annotations are located.
			 */
			private static final int INFO_LAYER;
			/** 
			 * The layer in which warning problem annotations representing are located.
			 */
			private static final int WARNING_LAYER;
			/** 
			 * The layer in which error problem annotations representing are located.
			 */
			private static final int ERROR_LAYER;
			
			static {
				AnnotationPreferenceLookup lookup= EditorsUI.getAnnotationPreferenceLookup();
				TASK_LAYER= computeLayer("org.eclipse.ui.workbench.texteditor.task", lookup); 
				INFO_LAYER= computeLayer("org.eclipse.jdt.ui.info", lookup); 
				WARNING_LAYER= computeLayer("org.eclipse.jdt.ui.warning", lookup); 
				ERROR_LAYER= computeLayer("org.eclipse.jdt.ui.error", lookup); 
			}