| <?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> |
| |
| <!-- Common --> |
| <extension |
| point="org.eclipse.core.runtime.preferences"> |
| <initializer class="org.eclipse.statet.internal.redocs.wikitext.r.ui.config.WikitextRweaveUIPreferenceInitializer"/> |
| </extension> |
| |
| <!-- Core --> |
| <extension |
| point="org.eclipse.statet.ltk.ModelTypes"> |
| <modelType |
| id="WikidocRweave"> |
| <baseType modelTypeId="Wikidoc"/> |
| <secondaryType modelTypeId="R"/> |
| </modelType> |
| <unitType modelTypeId="WikidocRweave" |
| contextKey="persistence.default" |
| unitFactory="org.eclipse.statet.internal.redocs.wikitext.r.core.WikidocRweavePersistenceUnitFactory"> |
| </unitType> |
| <unitType modelTypeId="WikidocRweave" |
| contextKey="editor.default" |
| unitFactory="org.eclipse.statet.internal.redocs.wikitext.r.ui.WikidocRweaveEditorUnitFactory"> |
| </unitType> |
| </extension> |
| <extension |
| point="org.eclipse.statet.ltk.ModelAdapters"> |
| <adapterFactory |
| modelTypeId="WikidocRweave" |
| class="org.eclipse.statet.internal.redocs.wikitext.r.core.WikitextRweaveAdapterFactory"> |
| <adapter |
| type="org.eclipse.statet.docmlet.wikitext.core.WikitextBuildParticipant"/> |
| </adapterFactory> |
| <adapterFactory |
| modelTypeId="R" |
| class="org.eclipse.statet.internal.redocs.wikitext.r.core.WikitextRweaveRAdapterFactory"> |
| <adapter |
| type="org.eclipse.statet.docmlet.wikitext.core.model.build.WikidocSourceUnitEmbeddedModelReconciler"/> |
| </adapterFactory> |
| </extension> |
| |
| <!-- UI --> |
| <extension |
| point="org.eclipse.statet.ltk.ModelAdapters"> |
| <adapterFactory |
| modelTypeId="WikidocRweave" |
| class="org.eclipse.statet.internal.redocs.wikitext.r.ui.WikitextRweaveAdapterFactory"> |
| <adapter |
| type="org.eclipse.statet.ltk.ui.ElementLabelProvider"/> |
| </adapterFactory> |
| </extension> |
| |
| <extension |
| point="org.eclipse.core.expressions.definitions"> |
| <definition |
| id="org.eclipse.statet.redocs.expressions.isEditorActive.WikidocRweaveEditor"> |
| <with |
| variable="activeEditor"> |
| <instanceof |
| value="org.eclipse.statet.redocs.wikitext.r.ui.editors.WikidocRweaveEditor"> |
| </instanceof> |
| </with> |
| </definition> |
| </extension> |
| <extension |
| point="org.eclipse.core.expressions.definitions"> |
| <definition |
| id="org.eclipse.statet.redocs.expressions.isPartActive.WikidocRweaveEditor"> |
| <with |
| variable="activePart"> |
| <instanceof |
| value="org.eclipse.statet.redocs.wikitext.r.ui.editors.WikidocRweaveEditor"> |
| </instanceof> |
| </with> |
| </definition> |
| </extension> |
| |
| <extension |
| point="org.eclipse.ui.handlers"> |
| <handler |
| commandId="org.eclipse.statet.docmlet.commands.ConfigureMarkup" |
| class="org.eclipse.statet.docmlet.wikitext.ui.actions.ConfigureMarkupHandler"> |
| <activeWhen> |
| <reference |
| definitionId="org.eclipse.statet.redocs.expressions.isPartActive.WikidocRweaveEditor"/> |
| </activeWhen> |
| </handler> |
| <handler |
| commandId="org.eclipse.statet.ltk.commands.CorrectLineWrap" |
| class="org.eclipse.statet.docmlet.wikitext.ui.actions.WikidocCorrectLineWrapHandler"> |
| <activeWhen> |
| <and> |
| <reference |
| definitionId="org.eclipse.statet.redocs.expressions.isEditorActive.WikidocRweaveEditor"/> |
| <or> |
| <reference |
| definitionId="org.eclipse.statet.redocs.expressions.isPartActive.WikidocRweaveEditor"/> |
| <with |
| variable="selection"> |
| <instanceof |
| value="org.eclipse.jface.viewers.IStructuredSelection"> |
| </instanceof> |
| <iterate |
| ifEmpty="false" |
| operator="and"> |
| <instanceof |
| value="org.eclipse.statet.docmlet.wikitext.core.model.WikitextSourceElement"> |
| </instanceof> |
| </iterate> |
| </with> |
| </or> |
| </and> |
| </activeWhen> |
| </handler> |
| <handler |
| commandId="org.eclipse.jdt.ui.edit.text.java.toggleMarkOccurrences" |
| class="org.eclipse.statet.docmlet.wikitext.ui.actions.WikitextToggleMarkOccurrencesHandler"> |
| <activeWhen> |
| <reference |
| definitionId="org.eclipse.statet.redocs.expressions.isPartActive.WikidocRweaveEditor"/> |
| </activeWhen> |
| </handler> |
| <handler |
| commandId="org.eclipse.ui.edit.text.folding.toggle" |
| class="org.eclipse.statet.docmlet.wikitext.ui.actions.WikitextToggleFoldingHandler"> |
| <activeWhen> |
| <reference |
| definitionId="org.eclipse.statet.redocs.expressions.isPartActive.WikidocRweaveEditor"/> |
| </activeWhen> |
| </handler> |
| |
| <!-- navigate --> |
| <handler |
| commandId="org.eclipse.jdt.ui.edit.text.java.open.editor" |
| class="org.eclipse.statet.internal.redocs.wikitext.r.ui.editors.OpenDeclarationHandler"> |
| <activeWhen> |
| <reference |
| definitionId="org.eclipse.statet.redocs.expressions.isPartActive.WikidocRweaveEditor"/> |
| </activeWhen> |
| </handler> |
| |
| <!-- search --> |
| <handler |
| commandId="org.eclipse.statet.ltk.commands.SearchAllElementAccess" |
| class="org.eclipse.statet.internal.redocs.wikitext.r.ui.editors.ElementSearchHandler"> |
| <activeWhen> |
| <reference |
| definitionId="org.eclipse.statet.redocs.expressions.isPartActive.WikidocRweaveEditor"/> |
| </activeWhen> |
| </handler> |
| <handler |
| commandId="org.eclipse.statet.ltk.commands.SearchWriteElementAccess" |
| class="org.eclipse.statet.internal.redocs.wikitext.r.ui.editors.ElementSearchHandler"> |
| <activeWhen> |
| <reference |
| definitionId="org.eclipse.statet.redocs.expressions.isPartActive.WikidocRweaveEditor"/> |
| </activeWhen> |
| </handler> |
| </extension> |
| |
| <extension |
| point="org.eclipse.ui.menus"> |
| <!-- search --> |
| <menuContribution |
| locationURI="menu:org.eclipse.search.menu?endof=contextMenuActionsGroup"> |
| <menu |
| id="org.eclipse.statet.redocs.menus.WikidocRweaveSearchAllAccess" |
| label="%menus_Search_AllAccess_name" |
| mnemonic="%menus_Search_AllAccess_mnemonic"> |
| <dynamic |
| id="org.eclipse.statet.ltk.commands.SearchAllElementAccess" |
| class="org.eclipse.statet.internal.redocs.wikitext.r.ui.editors.ElementSearchContributionItem"> |
| </dynamic> |
| <visibleWhen |
| checkEnabled="false"> |
| <reference |
| definitionId="org.eclipse.statet.redocs.expressions.isPartActive.WikidocRweaveEditor"/> |
| </visibleWhen> |
| </menu> |
| <menu |
| id="org.eclipse.statet.redocs.menus.WikidocRweaveSearchWriteAccess" |
| label="%menus_Search_WriteAccess_name" |
| mnemonic="%menus_Search_WriteAccess_mnemonic"> |
| <dynamic |
| id="org.eclipse.statet.ltk.commands.SearchWriteElementAccess" |
| class="org.eclipse.statet.internal.redocs.wikitext.r.ui.editors.ElementSearchContributionItem"> |
| </dynamic> |
| <visibleWhen |
| checkEnabled="false"> |
| <reference |
| definitionId="org.eclipse.statet.redocs.expressions.isPartActive.WikidocRweaveEditor"/> |
| </visibleWhen> |
| </menu> |
| </menuContribution> |
| |
| <!-- context --> |
| <menuContribution |
| locationURI="popup:org.eclipse.statet.redocs.menus.WikidocRweaveEditorContextMenu?after=group.edit"> |
| <command |
| id="org.eclipse.statet.ltk.commands.ToggleComment" |
| commandId="org.eclipse.statet.ltk.commands.ToggleComment" |
| mnemonic="%menus_SweaveEditorContext_ToggleComment_mnemonic" |
| style="push"> |
| </command> |
| <!--command |
| id="org.eclipse.statet.ltk.commands.CorrectIndent" |
| commandId="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.WikidocRweaveEditorRulerMenuCommonContribution" |
| targetID="org.eclipse.statet.redocs.menus.WikidocRweaveEditorRulerMenu"> |
| <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.ui.editors.templates"> |
| <contextTypeRegistry |
| id="org.eclipse.statet.redocs.templates.WikitextRweaveDoc"> |
| </contextTypeRegistry> |
| <contextTypeRegistry |
| id="org.eclipse.statet.redocs.templates.WikitextRweaveCodegen"> |
| </contextTypeRegistry> |
| </extension> |
| |
| <extension |
| point="org.eclipse.ui.preferencePages"> |
| <page |
| id="org.eclipse.statet.redocs.preferencePages.WikitextREditor" |
| category="org.eclipse.statet.docmlet.preferencePages.Wikitext" |
| name="%preferencePages_WikitextRweaveEditorOptions" |
| class="org.eclipse.statet.internal.redocs.wikitext.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> |
| |
| <!-- Document Processing --> |
| <extension |
| point="org.eclipse.debug.core.launchConfigurationTypes"> |
| <launchConfigurationType |
| id="org.eclipse.statet.redocs.launchConfigurations.WikitextRweaveDocProcessing" |
| category="org.eclipse.ui.externaltools" |
| modes="run" |
| delegate="org.eclipse.statet.internal.redocs.wikitext.r.ui.processing.WikitextRweaveLaunchDelegate" |
| name="%launchConfigurations_WikitextRweaveProcessing_name" |
| public="true"> |
| </launchConfigurationType> |
| </extension> |
| <extension |
| point="org.eclipse.debug.ui.launchConfigurationTypeImages"> |
| <launchConfigurationTypeImage |
| id="org.eclipse.statet.redocs.images.RweaveWikitextDocProcessing" |
| configTypeID="org.eclipse.statet.redocs.launchConfigurations.WikitextRweaveDocProcessing" |
| icon="icons/obj_16/wikidoc_rweave-file.png"> |
| </launchConfigurationTypeImage> |
| </extension> |
| <extension |
| point="org.eclipse.debug.ui.launchConfigurationTabGroups"> |
| <launchConfigurationTabGroup |
| id="org.eclipse.statet.redocs.launchConfigurationTabGroups.WikitextRweaveDocProcessing" |
| type="org.eclipse.statet.redocs.launchConfigurations.WikitextRweaveDocProcessing" |
| class="org.eclipse.statet.internal.redocs.wikitext.r.ui.processing.WikitextRweaveConfigTabGroup" |
| description="%launchConfigurations_WikitextRweaveProcessing_description"> |
| </launchConfigurationTabGroup> |
| </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.WikidocRweaveEditor"/> |
| </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.WikidocRweaveEditor"/> |
| </activeWhen> |
| </handler> |
| </extension> |
| |
| <extension |
| point="org.eclipse.ui.menus"> |
| <menuContribution |
| locationURI="menu:org.eclipse.statet.base.menus.MainStatSource?endof=format"> |
| <command |
| commandId="org.eclipse.statet.ltk.commands.CorrectLineWrap" |
| style="push"> |
| <visibleWhen |
| checkEnabled="false"> |
| <reference |
| definitionId="org.eclipse.statet.redocs.expressions.isEditorActive.WikidocRweaveEditor"> |
| </reference> |
| </visibleWhen> |
| </command> |
| </menuContribution> |
| |
| <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.wikitext.r.ui.processing.WikitextRweaveConfigsMenuContribution:activeEditor"> |
| <visibleWhen> |
| <reference |
| definitionId="org.eclipse.statet.redocs.expressions.isEditorActive.WikidocRweaveEditor"/> |
| </visibleWhen> |
| </dynamic> |
| </menuContribution> |
| |
| <menuContribution |
| locationURI="popup:org.eclipse.ui.popup.any?before=additions"> |
| <separator |
| name="stat.submit"> |
| </separator> |
| </menuContribution> |
| <menuContribution |
| locationURI="popup:org.eclipse.ui.popup.any?endof=stat.submit"> |
| <menu |
| id="org.eclipse.statet.redocs.menus.DocumentMenu" |
| label="&Document"> |
| <visibleWhen |
| checkEnabled="false"> |
| <or> |
| <iterate |
| operator="or"> |
| <adapt |
| type="org.eclipse.core.resources.IFile"> |
| <test |
| forcePluginActivation="true" |
| property="org.eclipse.statet.ltk.matchesActivatedContentType" |
| value="org.eclipse.statet.redocs.contentTypes.WikidocRweave"> |
| </test> |
| </adapt> |
| </iterate> |
| </or> |
| </visibleWhen> |
| <dynamic |
| id="org.eclipse.statet.docmlet.menus.DocProcessingConfigItems" |
| class="org.eclipse.statet.internal.redocs.wikitext.r.ui.processing.WikitextRweaveConfigsMenuContribution:activeMenuSelection"> |
| </dynamic> |
| </menu> |
| </menuContribution> |
| </extension> |
| |
| </plugin> |