<!ELEMENT extension (foldingReconciler)+>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED>
<!ELEMENT foldingReconciler (enabledWhen?)>
<!ATTLIST foldingReconciler
class CDATA #REQUIRED
contentType IDREF #REQUIRED>
org.eclipse.jface.text.reconciler.IReconciler
To manipulate folding, the implementation reconciler needs to use ProjectionAnnotation and viewer.getProjectionModel(). You can find a sample in
org.eclipse.ui.internal.genericeditor.folding.DefaultFoldingReconciler.<!ELEMENT foldingReconcilingStrategy (enabledWhen?)>
<!ATTLIST foldingReconcilingStrategy
class CDATA #REQUIRED
contentType IDREF #REQUIRED>
org.eclipse.jface.text.reconciler.IReconcilingStrategy
<!ELEMENT enabledWhen (not | or | and | instanceof | test | systemTest | equals | count | with | resolve | adapt | iterate | reference)?>
A core Expression that controls the enabled of the given folding reconciler. The viewer, editor, and editor input are registered in the evaluation context as variable:
*
<extension point="org.eclipse.ui.genericeditor.foldingReconcilers"> <foldingReconciler class="org.eclipse.ui.genericeditor.examples.TargetDefinitionFoldingReconciler" contentType="org.eclipse.pde.targetFile"> <enabledWhen> <with variable="editor"> <test property="org.eclipse.ui.genericeditor.examples.TargetDefinitionPropertyTester"> </test> </with> </enabledWhen> </foldingReconciler> </extension>
Copyright (c) 2017 Red Hat Inc. and others This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html/ SPDX-License-Identifier: EPL-2.0