CodeMining Providers

Identifier:
org.eclipse.ui.workbench.texteditor.codeMiningProviders

Since:
3.10

Description:
This extension point is used to register codemining providers. Associating providers via this extension doesn't automatically enable code-mining, and that clients are also supposed to use a reconcilier or whatever event mechanism to invoke ISourceViewerExtension5.updateCodeMinings().

Configuration Markup:

<!ELEMENT extension (codeMiningProvider+)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT codeMiningProvider (enabledWhen?)>

<!ATTLIST codeMiningProvider

id    CDATA #REQUIRED

class CDATA #REQUIRED

label CDATA #IMPLIED>

A CodeMining provider.



<!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 codemining provider



Examples:
The following is an example of a codemining provider definition:

   <extension
         point="org.eclipse.ui.workbench.texteditor.codeMiningProviders">
      <codeMiningProvider
         class="org.eclipse.jdt.internal.ui.codemining.JavaReferencesCodeMiningProvider"
         id="org.eclipse.jdt.ui.codemining.references"
         label="Java References">
         <enabledWhen>
            <with variable="editor">
               <instanceof value="org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor"/>
            </with>
         </enabledWhen>
      </codeMiningProvider>
   </extension>

API Information:
See the org.eclipse.jface.text.codemining.ICodeMiningProvider class and the org.eclipse.ui.workbench.texteditor.codeMiningProviders extension point.


Copyright (c) 2017 Angelo ZERR.
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