blob: ef360c12df8b38398f85ddd18cc8968c90f6a495 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<!--
#=============================================================================#
# Copyright (c) 2007, 2021 Stephan Wahlbrink and others.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
# which is available at https://www.apache.org/licenses/LICENSE-2.0.
#
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
#
# Contributors:
# Stephan Wahlbrink <sw@wahlbrink.eu> - initial API and implementation
#=============================================================================#
-->
<plugin>
<extension
point="org.eclipse.core.runtime.preferences">
<initializer class="org.eclipse.statet.internal.redocs.tex.r.ui.config.TexRweaveUIPreferenceInitializer"/>
</extension>
<extension
point="org.eclipse.core.contenttype.contentTypes">
<content-type
id="org.eclipse.statet.redocs.contentTypes.LtxRweave"
base-type="org.eclipse.statet.docmlet.contentTypes.Ltx"
name="%contentTypes_LtxRweave_name"
file-extensions="Rnw,rnw,Snw,snw"
priority="normal">
<property
name="bom">
</property>
</content-type>
</extension>
<extension
point="org.eclipse.statet.autonature.AutoConfigurations">
<onFileContent
contentTypeId="org.eclipse.statet.redocs.contentTypes.LtxRweave"
enable="true">
<ensureProjectNature
natureId="org.eclipse.statet.r.resourceProjects.R"/>
<ensureProjectNature
natureId="org.eclipse.statet.docmlet.resourceProjects.Tex"/>
</onFileContent>
</extension>
<extension
point="org.eclipse.statet.ltk.ContentTypeActivation">
<contentType
id="org.eclipse.statet.redocs.contentTypes.LtxRweave"
secondaryId="org.eclipse.statet.r.contentTypes.R">
</contentType>
</extension>
<extension
point="org.eclipse.statet.ltk.ModelTypes">
<modelType
id="LtxRweave">
<baseType modelTypeId="Ltx"/>
<secondaryType modelTypeId="R"/>
</modelType>
<contentType
contentTypeId="org.eclipse.statet.redocs.contentTypes.LtxRweave"
modelTypeId="LtxRweave">
</contentType>
<unitType modelTypeId="LtxRweave"
contextKey="persistence.default"
unitFactory="org.eclipse.statet.internal.redocs.tex.r.core.LtxRweavePersistenceUnitFactory">
</unitType>
<unitType modelTypeId="LtxRweave"
contextKey="editor.default"
unitFactory="org.eclipse.statet.internal.redocs.tex.r.ui.LtxRweaveEditorUnitFactory">
</unitType>
</extension>
<extension
point="org.eclipse.statet.ltk.ModelAdapters">
<adapterFactory
modelTypeId="LtxRweave"
class="org.eclipse.statet.internal.redocs.tex.r.core.TexRweaveAdapterFactory">
<adapter
type="org.eclipse.statet.docmlet.tex.core.TexBuildParticipant"/>
</adapterFactory>
<adapterFactory
modelTypeId="R"
class="org.eclipse.statet.internal.redocs.tex.r.core.TexRweaveRAdapterFactory">
<adapter
type="org.eclipse.statet.docmlet.tex.core.model.build.LtxSourceUnitEmbeddedModelReconciler"/>
</adapterFactory>
</extension>
<extension
point="org.eclipse.team.core.fileTypes">
<fileTypes
extension="Rnw"
type="text"/>
<fileTypes
extension="rnw"
type="text"/>
<fileTypes
extension="Snw"
type="text"/>
<fileTypes
extension="snw"
type="text"/>
</extension>
<extension
point="org.eclipse.core.filebuffers.documentSetup">
<participant
contentTypeId="org.eclipse.statet.redocs.contentTypes.LtxRweave"
class="org.eclipse.statet.redocs.tex.r.core.source.LtxRweaveDocumentSetupParticipant">
</participant>
</extension>
<!-- UI -->
<extension
point="org.eclipse.statet.ltk.ModelAdapters">
<adapterFactory
modelTypeId="LtxRweave"
class="org.eclipse.statet.internal.redocs.tex.r.ui.TexRweaveAdapterFactory">
<adapter
type="org.eclipse.statet.ltk.ui.ElementLabelProvider"/>
</adapterFactory>
</extension>
<extension
point="org.eclipse.core.expressions.definitions">
<definition
id="org.eclipse.statet.redocs.expressions.isSelectionActive.LtxRweaveResource">
<with
variable="selection">
<count
value="1"/>
<iterate>
<adapt
type="org.eclipse.core.resources.IFile">
<test
property="org.eclipse.core.resources.contentTypeId"
value="org.eclipse.statet.redocs.contentTypes.LtxRweave"
forcePluginActivation="true"/>
</adapt>
</iterate>
</with>
</definition>
</extension>
<extension
point="org.eclipse.core.expressions.definitions">
<definition
id="org.eclipse.statet.redocs.expressions.isEditorActive.LtxRweaveEditor">
<with
variable="activeEditor">
<instanceof
value="org.eclipse.statet.redocs.tex.r.ui.editors.LtxRweaveEditor">
</instanceof>
</with>
</definition>
</extension>
<extension
point="org.eclipse.core.expressions.definitions">
<definition
id="org.eclipse.statet.redocs.expressions.isPartActive.LtxRweaveEditor">
<with
variable="activePart">
<instanceof
value="org.eclipse.statet.redocs.tex.r.ui.editors.LtxRweaveEditor">
</instanceof>
</with>
</definition>
</extension>
<extension
point="org.eclipse.ui.editors">
<editor
id="org.eclipse.statet.redocs.editors.LtxRweave"
class="org.eclipse.statet.internal.redocs.tex.r.ui.editors.LtxRweaveDocEditor"
contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
default="true"
icon="icons/obj_16/ltx_rweave-file.png"
name="%editors_LtxRweave_name">
<contentTypeBinding contentTypeId="org.eclipse.statet.redocs.contentTypes.LtxRweave"/>
</editor>
</extension>
<extension
point="org.eclipse.ui.editors.templates">
<contextTypeRegistry
id="org.eclipse.statet.redocs.templates.TexRweaveDoc">
</contextTypeRegistry>
<contextType
id="Ltx+Rweave_NewDoc"
registryId="org.eclipse.statet.redocs.templates.TexRweaveDoc"
class="org.eclipse.statet.internal.redocs.tex.r.core.LtxRweaveTemplateContextType">
</contextType>
<contextTypeRegistry
id="org.eclipse.statet.redocs.templates.TexRweaveCodegen">
</contextTypeRegistry>
<contextType
id="Ltx+Rweave_Weave:DocDefault"
registryId="org.eclipse.statet.redocs.templates.TexRweaveCodegen"
class="org.eclipse.statet.internal.redocs.tex.r.core.LtxRweaveTemplateContextType">
</contextType>
<include
file="templates/default-doc-templates.xml"
translations="templates/default-templates.properties">
</include>
</extension>
<extension
point="org.eclipse.statet.docmlet.TexDocTemplates">
<category
id="LtxRweave.NewDoc"
image="platform:/plugin/org.eclipse.statet.redocs.tex.r/icons/tool_16/new-ltx_rweave-file.png"
label="%docTemplates_NewTextileRweave_name"
itemImage="platform:/plugin/org.eclipse.statet.redocs.tex.r/icons/obj_16/ltx_rweave-file.png"
configurationClass="org.eclipse.statet.internal.redocs.tex.r.ui.NewDocTemplateCategoryConfiguration">
</category>
</extension>
<extension
point="org.eclipse.ui.handlers">
<handler
commandId="org.eclipse.jdt.ui.edit.text.java.toggleMarkOccurrences"
class="org.eclipse.statet.docmlet.tex.ui.actions.TexToggleMarkOccurrencesHandler">
<activeWhen>
<reference
definitionId="org.eclipse.statet.redocs.expressions.isPartActive.LtxRweaveEditor"/>
</activeWhen>
</handler>
<handler
commandId="org.eclipse.ui.edit.text.folding.toggle"
class="org.eclipse.statet.docmlet.tex.ui.actions.TexToggleFoldingHandler">
<activeWhen>
<reference
definitionId="org.eclipse.statet.redocs.expressions.isPartActive.LtxRweaveEditor"/>
</activeWhen>
</handler>
<!-- navigate -->
<handler
commandId="org.eclipse.jdt.ui.edit.text.java.open.editor"
class="org.eclipse.statet.internal.redocs.tex.r.ui.editors.OpenDeclarationHandler">
<activeWhen>
<reference
definitionId="org.eclipse.statet.redocs.expressions.isPartActive.LtxRweaveEditor"/>
</activeWhen>
</handler>
<!-- search -->
<handler
commandId="org.eclipse.statet.ltk.commands.SearchAllElementAccess"
class="org.eclipse.statet.internal.redocs.tex.r.ui.editors.ElementSearchHandler">
<activeWhen>
<reference
definitionId="org.eclipse.statet.redocs.expressions.isPartActive.LtxRweaveEditor"/>
</activeWhen>
</handler>
<handler
commandId="org.eclipse.statet.ltk.commands.SearchWriteElementAccess"
class="org.eclipse.statet.internal.redocs.tex.r.ui.editors.ElementSearchHandler">
<activeWhen>
<reference
definitionId="org.eclipse.statet.redocs.expressions.isPartActive.LtxRweaveEditor"/>
</activeWhen>
</handler>
</extension>
<extension
point="org.eclipse.ui.actionSetPartAssociations">
<actionSetPartAssociation
targetID="org.eclipse.ui.edit.text.actionSet.presentation">
<part
id="org.eclipse.statet.redocs.editors.LtxRweave">
</part>
</actionSetPartAssociation>
</extension>
<extension
point="org.eclipse.ui.menus">
<!-- search -->
<menuContribution
locationURI="menu:org.eclipse.search.menu?endof=contextMenuActionsGroup">
<menu
id="org.eclipse.statet.r.menus.SweaveSearchAllAccess"
label="%menus_Search_AllAccess_name"
mnemonic="%menus_Search_AllAccess_mnemonic">
<dynamic
id="org.eclipse.statet.ltk.commands.SearchAllElementAccess"
class="org.eclipse.statet.internal.redocs.tex.r.ui.editors.ElementSearchContributionItem">
</dynamic>
<visibleWhen
checkEnabled="false">
<reference
definitionId="org.eclipse.statet.redocs.expressions.isPartActive.LtxRweaveEditor"/>
</visibleWhen>
</menu>
<menu
id="org.eclipse.statet.r.menus.SweaveSearchWriteAccess"
label="%menus_Search_WriteAccess_name"
mnemonic="%menus_Search_WriteAccess_mnemonic">
<dynamic
id="org.eclipse.statet.ltk.commands.SearchWriteElementAccess"
class="org.eclipse.statet.internal.redocs.tex.r.ui.editors.ElementSearchContributionItem">
</dynamic>
<visibleWhen
checkEnabled="false">
<reference
definitionId="org.eclipse.statet.redocs.expressions.isPartActive.LtxRweaveEditor"/>
</visibleWhen>
</menu>
</menuContribution>
<!-- context -->
<menuContribution
locationURI="popup:org.eclipse.statet.redocs.menus.LtxRweaveEditorContextMenu?after=group.edit">
<command
commandId="org.eclipse.statet.ltk.commands.ToggleComment"
id="org.eclipse.statet.ltk.commands.ToggleComment"
mnemonic="%menus_SweaveEditorContext_ToggleComment_mnemonic"
style="push">
</command>
<!--command
commandId="org.eclipse.statet.ltk.commands.CorrectIndent"
id="org.eclipse.statet.ltk.commands.CorrectIndent"
mnemonic="%menus_REditorContext_CorrectIndent_mnemonic"
style="push">
</command-->
</menuContribution>
</extension>
<extension
point="org.eclipse.ui.popupMenus">
<viewerContribution
id="org.eclipse.statet.redocs.legacy.LtxRweaveEditorRulerMenuCommonContribution"
targetID="org.eclipse.statet.redocs.menus.LtxRweaveEditorRulerMenu">
<action
id=".AddTask"
class="org.eclipse.ui.texteditor.TaskRulerAction"
label="AddTask"
menubarPath="add"
helpContextId="org.eclipse.ui.AddTask_action_context">
</action>
<action
id=".AddBookmark"
class="org.eclipse.ui.texteditor.BookmarkRulerAction"
label="AddBookmark"
menubarPath="add"
helpContextId="org.eclipse.ui.bookmark_action_context">
</action>
</viewerContribution>
</extension>
<extension
point="org.eclipse.statet.base.ui.codeGenerationTemplatesCategory">
<category
id="org.eclipse.statet.redocs.codegenerationCategory.TexRweaveCodeTemplates"
name="%templatesCategory_LtxRweaveCodeTemplates_name"
providerClass="org.eclipse.statet.internal.redocs.tex.r.ui.LtxRweaveTemplatesProvider"/>
</extension>
<extension
point="org.eclipse.ui.newWizards">
<wizard
id="org.eclipse.statet.redocs.newWizards.LtxRweaveDocCreation"
category="org.eclipse.statet.r.newWizards.RCategory"
class="org.eclipse.statet.internal.redocs.tex.r.ui.NewLtxRweaveDocCreationWizard"
icon="icons/tool_16/new-ltx_rweave-file.png"
name="%wizards_NewLtxRweaveDoc_name"
project="false">
<description>
%wizards_NewLtxRweaveDoc_description
</description>
</wizard>
</extension>
<extension
point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension targetID="org.eclipse.statet.base.perspectives.StatetPerspective">
<newWizardShortcut id="org.eclipse.statet.redocs.newWizards.LtxRweaveDocCreation"/>
</perspectiveExtension>
</extension>
<extension
point="org.eclipse.ui.navigator.navigatorContent">
<commonWizard
type="new"
menuGroupId="org.eclipse.statet"
wizardId="org.eclipse.statet.redocs.newWizards.LtxRweaveDocCreation">
<enablement>
<or>
<adapt
type="org.eclipse.core.resources.IContainer">
<test
property="org.eclipse.core.resources.projectNature"
value="org.eclipse.statet.r.resourceProjects.R">
</test>
</adapt>
</or></enablement>
</commonWizard>
</extension>
<extension
point="org.eclipse.compare.contentViewers">
<viewer
id="org.eclipse.statet.redocs.compareContentViewers.LtxRweave"
class="org.eclipse.statet.internal.redocs.tex.r.ui.editors.LtxRweaveContentViewerCreator">
</viewer>
<contentTypeBinding
contentViewerId="org.eclipse.statet.redocs.compareContentViewers.LtxRweave"
contentTypeId="org.eclipse.statet.redocs.contentTypes.LtxRweave"/>
</extension>
<extension
point="org.eclipse.compare.contentMergeViewers">
<viewer
id="org.eclipse.statet.r.compareContentViewers.LtxRweaveMergeViewer"
class="org.eclipse.statet.internal.redocs.tex.r.ui.editors.LtxRweaveMergeViewerCreator">
</viewer>
<contentTypeBinding
contentMergeViewerId="org.eclipse.statet.r.compareContentViewers.LtxRweaveMergeViewer"
contentTypeId="org.eclipse.statet.redocs.contentTypes.LtxRweave"/>
</extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
id="org.eclipse.statet.r.preferencePages.LtxRweaveEditor"
category="org.eclipse.statet.docmlet.preferencePages.Tex"
name="%preferencePages_SweaveEditorOptions"
class="org.eclipse.statet.internal.redocs.tex.r.ui.config.EditorPreferencePage">
<keywordReference id="org.eclipse.statet.ltk.keywords.SourceEditor"/>
<keywordReference id="org.eclipse.statet.ltk.keywords.SourceAppearance"/>
<keywordReference id="org.eclipse.statet.ltk.keywords.SpellChecking"/>
</page>
</extension>
<extension
point="org.eclipse.statet.r.ui.rCodeLaunchContentHandler">
<contentHandler
contentTypeId="org.eclipse.statet.redocs.contentTypes.LtxRweave"
handler="org.eclipse.statet.internal.redocs.tex.r.ui.debug.LtxRweaveSubmitContentHandler">
<fileCommand
id="org.eclipse.statet.r.rFileCommands.SweaveRweaveTexDoc"
defaultCommand="Sweave(&quot;${resource_loc}&quot;)"
name="%rCodeLaunchHandler_SweaveRweaveTexDoc_label">
</fileCommand>
</contentHandler>
</extension>
<extension
point="org.eclipse.debug.ui.launchShortcuts">
<shortcut
id="org.eclipse.statet.r.launchShortcuts.SweaveRweaveTexDoc"
category="org.eclipse.statet.r.basic"
modes="run"
class="org.eclipse.statet.internal.redocs.tex.r.ui.debug.TexRweaveViaSweaveLaunchShortcut"
label="%launchShortcuts_RunRweaveTexDocViaSweave"
icon="platform:/plugin/org.eclipse.statet.redocs.r/icons/tool_16/run-sweave.png"
path="statet/r/5">
<enablement>
<reference
definitionId="org.eclipse.statet.redocs.expressions.isSelectionActive.LtxRweaveResource"/>
</enablement>
<contextualLaunch>
<enablement>
<reference
definitionId="org.eclipse.statet.redocs.expressions.isSelectionActive.LtxRweaveResource"/>
</enablement>
</contextualLaunch>
</shortcut>
</extension>
<!-- Document Processing -->
<extension
point="org.eclipse.debug.core.launchConfigurationTypes">
<launchConfigurationType
id="org.eclipse.statet.redocs.launchConfigurations.TexRweaveDocProcessing"
category="org.eclipse.ui.externaltools"
modes="run"
delegate="org.eclipse.statet.internal.redocs.tex.r.ui.processing.TexRweaveLaunchDelegate"
name="%launchConfigurations_TexRweaveProcessing_name"
public="true">
</launchConfigurationType>
</extension>
<extension
point="org.eclipse.debug.ui.launchConfigurationTypeImages">
<launchConfigurationTypeImage
id="org.eclipse.statet.redocs.images.TexRweaveDocProcessing"
configTypeID="org.eclipse.statet.redocs.launchConfigurations.TexRweaveDocProcessing"
icon="icons/obj_16/ltx_rweave-file.png">
</launchConfigurationTypeImage>
</extension>
<extension
point="org.eclipse.debug.ui.launchConfigurationTabGroups">
<launchConfigurationTabGroup
id="org.eclipse.statet.redocs.launchConfigurationTabGroups.TexRweaveDocProcessing"
type="org.eclipse.statet.redocs.launchConfigurations.TexRweaveDocProcessing"
class="org.eclipse.statet.internal.redocs.tex.r.ui.processing.TexRweaveConfigTabGroup"
description="%launchConfigurations_TexRweaveProcessing_description">
</launchConfigurationTabGroup>
</extension>
<extension
point="org.eclipse.statet.docmlet.DocProcessing">
<processingType
contentTypeId="org.eclipse.statet.redocs.contentTypes.LtxRweave"
configTypeId="org.eclipse.statet.redocs.launchConfigurations.TexRweaveDocProcessing"
managerClass="org.eclipse.statet.redocs.r.ui.processing.RweaveDocProcessingManager">
</processingType>
</extension>
<extension
point="org.eclipse.debug.ui.launchShortcuts">
<shortcut
id="org.eclipse.statet.redocs.launchShortcuts.TexRweaveDocProcessing"
class="org.eclipse.statet.docmlet.base.ui.processing.actions.RunActiveDocConfigLaunchShortcut"
label="%launchShortcuts_TexRweaveProcessing_name"
icon="platform:/plugin/org.eclipse.statet.docmlet.base.ui/icons/tool_16/process_and_preview.png"
modes="run">
<configurationType
id="org.eclipse.statet.redocs.launchConfigurations.TexRweaveDocProcessing"/>
<enablement>
<reference
definitionId="org.eclipse.statet.redocs.expressions.isSelectionActive.LtxRweaveResource"/>
</enablement>
<contextualLaunch>
<enablement>
<reference
definitionId="org.eclipse.statet.redocs.expressions.isSelectionActive.LtxRweaveResource"/>
</enablement>
</contextualLaunch>
</shortcut>
</extension>
<extension
point="org.eclipse.ui.handlers">
<handler
commandId="org.eclipse.statet.redocs.commands.ProcessWeaveDefault">
<class class="org.eclipse.statet.docmlet.base.ui.processing.actions.RunActiveDocConfigWorkbenchHandler">
<parameter
name="launchFlags"
value="weave"/>
</class>
<activeWhen>
<reference
definitionId="org.eclipse.statet.redocs.expressions.isEditorActive.LtxRweaveEditor"/>
</activeWhen>
</handler>
<handler
commandId="org.eclipse.statet.docmlet.commands.ProcessTexDefault">
<class class="org.eclipse.statet.docmlet.base.ui.processing.actions.RunActiveDocConfigWorkbenchHandler">
<parameter
name="launchFlags"
value="produce_output"/>
</class>
<activeWhen>
<reference
definitionId="org.eclipse.statet.redocs.expressions.isEditorActive.LtxRweaveEditor"/>
</activeWhen>
</handler>
</extension>
<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="menu:org.eclipse.statet.docmlet.menus.MainDoc?after=processing">
<dynamic
id="org.eclipse.statet.docmlet.menus.DocProcessingConfigItems"
class="org.eclipse.statet.internal.redocs.tex.r.ui.processing.TexRweaveConfigsMenuContribution:activeEditor">
<visibleWhen>
<reference
definitionId="org.eclipse.statet.redocs.expressions.isEditorActive.LtxRweaveEditor"/>
</visibleWhen>
</dynamic>
</menuContribution>
</extension>
</plugin>