Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions org.eclipse.wildwebdeveloper.xml/plugin.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ providerName=Eclipse Wild Web Developer project
XMLPreferencePage.name=XML (Wild Web Developer)
XMLCatalogPreferencePage.name=Catalogs
XMLCatalogPreferencePage.preferenceKeywords.xmlcatalog=xml catalog entries
XMLCodeLensPreferencePage.name=CodeLens
XMLCodeLensPreferencePage.preferenceKeywords.xmlcodelens=xml codelens
XMLCodeMiningsPreferencePage.name=Code Minings
XMLCodeMiningsPreferencePage.preferenceKeywords.xmlcodeminings=xml codeminings
XMLFormattingPreferencePage.name=Formatting
XMLFormattingPreferencePage.preferenceKeywords.xmlformatting=xml formatting
XMLValidationPreferencePage.name=Validation & Resolution
Expand Down
40 changes: 20 additions & 20 deletions org.eclipse.wildwebdeveloper.xml/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</reconciler>
</extension>

<!-- XML Language -->
<!-- XML Language -->
<extension
point="org.eclipse.core.contenttype.contentTypes">
<content-type
Expand Down Expand Up @@ -69,7 +69,7 @@
priority="low">
</content-type>
</extension>

<extension
point="org.eclipse.lsp4e.languageServer">
<server
Expand Down Expand Up @@ -99,9 +99,9 @@
<contentTypeMapping
contentType="org.eclipse.wildwebdeveloper.rng"
id="org.eclipse.wildwebdeveloper.xml">
</contentTypeMapping>
</contentTypeMapping>
</extension>

<extension
point="org.eclipse.tm4e.registry.grammars">
<grammar
Expand Down Expand Up @@ -129,15 +129,15 @@
scopeName="source.rnc">
</scopeNameContentTypeBinding>
</extension>

<extension
point="org.eclipse.tm4e.languageconfiguration.languageConfigurations">
<languageConfiguration
contentTypeId="org.eclipse.wildwebdeveloper.rnc"
path="language-configurations/rnc/rnc.language-configuration.json">
</languageConfiguration>
</extension>

<extension
point="org.eclipse.tm4e.ui.snippets">
<snippet
Expand All @@ -153,7 +153,7 @@
icon="icons/xmlEditorIcon.png">
</icon>
</extension>

<extension
point="org.eclipse.ui.preferencePages">
<page
Expand All @@ -170,10 +170,10 @@
</page>
<page
category="org.eclipse.wildwebdeveloper.xml.internal.ui.preferences.XMLPreferencePage"
class="org.eclipse.wildwebdeveloper.xml.internal.ui.preferences.XMLCodeLensPreferencePage"
id="org.eclipse.wildwebdeveloper.xml.internal.ui.preferences.XMLCodeLensPreferencePage"
name="%XMLCodeLensPreferencePage.name">
<keywordReference id="org.eclipse.wildwebdeveloper.xml.ui.xmlcodelens"/>
class="org.eclipse.wildwebdeveloper.xml.internal.ui.preferences.XMLCodeMiningsPreferencePage"
id="org.eclipse.wildwebdeveloper.xml.internal.ui.preferences.XMLCodeMiningsPreferencePage"
name="%XMLCodeMiningsPreferencePage.name">
<keywordReference id="org.eclipse.wildwebdeveloper.xml.ui.xmlcodeminings"/>
</page>
<page
category="org.eclipse.wildwebdeveloper.xml.internal.ui.preferences.XMLPreferencePage"
Expand All @@ -190,35 +190,35 @@
<keywordReference id="org.eclipse.wildwebdeveloper.xml.ui.xmlvalidation"/>
</page>
</extension>

<!-- Keywords for preference and properties pages -->
<extension point="org.eclipse.ui.keywords">
<keyword
label="%XMLCatalogPreferencesPage.preferenceKeywords.xmlcatalog"
id="org.eclipse.wildwebdeveloper.xml.ui.xmlcatalogs"/>
<keyword
label="%XMLCodeLensPreferencesPage.preferenceKeywords.xmlcodelens"
id="org.eclipse.wildwebdeveloper.xml.ui.xmlcodelens"/>
label="%XMLCodeMiningsPreferencesPage.preferenceKeywords.xmlcodeminings"
id="org.eclipse.wildwebdeveloper.xml.ui.xmlcodeminings"/>
<keyword
label="%XMLCodeLensPreferencesPage.preferenceKeywords.xmlformatting"
label="%XMLFormattingPreferencesPage.preferenceKeywords.xmlformatting"
id="org.eclipse.wildwebdeveloper.xml.ui.xmlformatting"/>
<keyword
label="%XMLValidationPreferencesPage.preferenceKeywords.xmlvalidation"
id="org.eclipse.wildwebdeveloper.xml.ui.xmlvalidation"/>
id="org.eclipse.wildwebdeveloper.xml.ui.xmlvalidation"/>
</extension>

<extension
point="org.eclipse.core.runtime.preferences">
<initializer
class="org.eclipse.wildwebdeveloper.xml.internal.ui.preferences.XMLPreferenceInitializer">
</initializer>
</extension>

<extension
point="org.eclipse.ui.handlers">
<handler
class="org.eclipse.wildwebdeveloper.xml.internal.commands.AssociateGrammarHandler"
commandId="xml.open.binding.wizard">
</handler>
commandId="xml.open.binding.wizard">
</handler>
</extension>
</plugin>
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public class Messages extends NLS {
public static String XMLCatalogPreferencePage_OpenInEditorMessage;
public static String XMLCatalogPreferencePage_OpenInEditorApplyAndEdit;

// --------- XML CodeLens preference page
public static String XMLCodelensPreferencePage_codelens_enabled;
// --------- XML CodeMinings preference page
public static String XMLCodeMiningsPreferencePage_codeminings_enabled;

// --------- XML Formatting preference page
public static String XMLFormattingPreferencePage_format_maxLineWidth;
Expand Down Expand Up @@ -56,7 +56,7 @@ public class Messages extends NLS {
public static String XMLFormattingPreferencePage_format_preserveSpace;
public static String XMLFormattingPreferencePage_format_joinCommentLines;
public static String XMLFormattingPreferencePage_format_joinCDATALines;

public static String PreserveSpaceFieldEditor_inputDialog_description;
public static String PreserveSpaceFieldEditor_inputDialog_title;

Expand All @@ -72,7 +72,7 @@ public class Messages extends NLS {
public static String XMLValidationPreferencePage_validation_namespace_option_onNamespaceEncountered;
public static String XMLValidationPreferencePage_validation_schema_option_onValidSchema;
public static String XMLValidationPreferencePage_validation_noGrammar_option_hint;

// --------- Associate Grammar Dialog
public static String AssociateGrammarDialog_title;
public static String AssociateGrammarDialog_grammar_field;
Expand All @@ -86,7 +86,7 @@ public class Messages extends NLS {
public static String Add_button;
public static String Remove_button;
public static String Browse_button;

static {
NLS.initializeMessages("org.eclipse.wildwebdeveloper.xml.internal.ui.messages", Messages.class); //$NON-NLS-1$
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ XMLCatalogPreferencePage_OpenInEditorTitle=Open XML Catalog in editor
XMLCatalogPreferencePage_OpenInEditorMessage=Do you want to Apply the changes and open the selected XML Catalog in editor?
XMLCatalogPreferencePage_OpenInEditorApplyAndEdit=Apply and Edit

# XML CodeLens preference page
XMLCodelensPreferencePage_codelens_enabled=Enable XML &CodeLens
# XML Minings preference page
XMLCodeMiningsPreferencePage_codeminings_enabled=Enable XML &Code Minings

# XML Formatting preference page
XMLFormattingPreferencePage_format_emptyElements=Expand/collapse &empty elements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*******************************************************************************/
package org.eclipse.wildwebdeveloper.xml.internal.ui.preferences;

import static org.eclipse.wildwebdeveloper.xml.internal.ui.preferences.XMLPreferenceServerConstants.XML_PREFERENCES_CODELENS_ENABLED;
import static org.eclipse.wildwebdeveloper.xml.internal.ui.preferences.XMLPreferenceServerConstants.XML_PREFERENCES_CODEMININGS_ENABLED;

import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
Expand All @@ -25,16 +25,16 @@
* XML code lens preference page.
*
*/
public class XMLCodeLensPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
public class XMLCodeMiningsPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {

public XMLCodeLensPreferencePage() {
public XMLCodeMiningsPreferencePage() {
super(GRID);
}

@Override
public void createFieldEditors() {
addField(new BooleanFieldEditor(XML_PREFERENCES_CODELENS_ENABLED.preferenceId,
Messages.XMLCodelensPreferencePage_codelens_enabled, getFieldEditorParent()));
addField(new BooleanFieldEditor(XML_PREFERENCES_CODEMININGS_ENABLED.preferenceId,
Messages.XMLCodeMiningsPreferencePage_codeminings_enabled, getFieldEditorParent()));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

import static org.eclipse.wildwebdeveloper.xml.internal.ui.preferences.XMLPreferenceClientConstants.XML_PREFERENCES_COMPLETION_AUTO_CLOSE_TAGS;
import static org.eclipse.wildwebdeveloper.xml.internal.ui.preferences.XMLPreferenceServerConstants.XML_PREFERENCES_CATAGLOGS;
import static org.eclipse.wildwebdeveloper.xml.internal.ui.preferences.XMLPreferenceServerConstants.XML_PREFERENCES_CODELENS_ENABLED;
import static org.eclipse.wildwebdeveloper.xml.internal.ui.preferences.XMLPreferenceServerConstants.XML_PREFERENCES_CODEMININGS_ENABLED;
import static org.eclipse.wildwebdeveloper.xml.internal.ui.preferences.XMLPreferenceServerConstants.XML_PREFERENCES_DOWNLOAD_EXTERNAL_RESOURCES;
import static org.eclipse.wildwebdeveloper.xml.internal.ui.preferences.XMLPreferenceServerConstants.XML_PREFERENCES_FOLDING_INCLUDE_CLOSING_TAG_IN_FOLD;
import static org.eclipse.wildwebdeveloper.xml.internal.ui.preferences.XMLPreferenceServerConstants.XML_PREFERENCES_FORMAT_CLOSING_BRACKET_NEW_LINE;
Expand Down Expand Up @@ -76,7 +76,7 @@ public void initializeDefaultPreferences() {
// Server settings
STORE.setDefault(XML_PREFERENCES_DOWNLOAD_EXTERNAL_RESOURCES.preferenceId, false);
STORE.setDefault(XML_PREFERENCES_CATAGLOGS.preferenceId, "");
STORE.setDefault(XML_PREFERENCES_CODELENS_ENABLED.preferenceId, true);
STORE.setDefault(XML_PREFERENCES_CODEMININGS_ENABLED.preferenceId, true);
STORE.setDefault(XML_PREFERENCES_FOLDING_INCLUDE_CLOSING_TAG_IN_FOLD.preferenceId, true);

STORE.setDefault(XML_PREFERENCES_FORMAT_MAX_LINE_WIDTH.preferenceId, 80);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static class LemminxPreference {
public final String preferenceId;
/**
* without the "xml" prefix
*
*
* @see https://github.com/redhat-developer/vscode-xml#supported-vs-code-settings
*/
public final String lemminxOptionPath;
Expand Down Expand Up @@ -74,8 +74,8 @@ public void storeToLemminxOptions(Object value, Map<String, Object> options) {
// Catalog settings
public static final LemminxPreference XML_PREFERENCES_CATAGLOGS = new LemminxPreference("catalogs");

// CodeLens settings
public static final LemminxPreference XML_PREFERENCES_CODELENS_ENABLED = new LemminxPreference("codeLens/enabled");
// Code Minings (CodeLens) settings
public static final LemminxPreference XML_PREFERENCES_CODEMININGS_ENABLED = new LemminxPreference("codeLens/enabled");

// Folding settings
public static final LemminxPreference XML_PREFERENCES_FOLDING_INCLUDE_CLOSING_TAG_IN_FOLD = new LemminxPreference(
Expand Down Expand Up @@ -148,7 +148,7 @@ public void storeToLemminxOptions(Object value, Map<String, Object> options) {
private static final LemminxPreference[] ALL_LEMMINX_PREFERENCES = { //
XML_PREFERENCES_DOWNLOAD_EXTERNAL_RESOURCES, //
XML_PREFERENCES_CATAGLOGS, //
XML_PREFERENCES_CODELENS_ENABLED, //
XML_PREFERENCES_CODEMININGS_ENABLED, //
XML_PREFERENCES_FOLDING_INCLUDE_CLOSING_TAG_IN_FOLD, //
XML_PREFERENCES_FORMAT_MAX_LINE_WIDTH, //
XML_PREFERENCES_FORMAT_GRAMMAR_AWARE_FORMATTING, //
Expand Down Expand Up @@ -192,8 +192,8 @@ public static void storePreferencesToLemminxOptions(IPreferenceStore store, Map<
XML_PREFERENCES_CATAGLOGS.storeToLemminxOptions(
XMLCatalogs.getAllCatalogs(store).stream().map(File::getAbsolutePath).toArray(String[]::new), xmlOpts);

// CodeLens settings
setAsBoolean(XML_PREFERENCES_CODELENS_ENABLED, store, xmlOpts);
// Code Minings settings
setAsBoolean(XML_PREFERENCES_CODEMININGS_ENABLED, store, xmlOpts);

// Folding settings
setAsBoolean(XML_PREFERENCES_FOLDING_INCLUDE_CLOSING_TAG_IN_FOLD, store, xmlOpts);
Expand Down Expand Up @@ -232,10 +232,10 @@ private static void setAsString(LemminxPreference preference, IPreferenceStore s
}

private static void setAsArrayString(LemminxPreference preference, IPreferenceStore store, Map<String, Object> xmlOpts) {
String value = store.getString(preference.preferenceId);
String value = store.getString(preference.preferenceId);
preference.storeToLemminxOptions(value.split(","), xmlOpts);
}

private static void setAsBoolean(LemminxPreference preference, IPreferenceStore store,
Map<String, Object> xmlOpts) {
preference.storeToLemminxOptions(store.getBoolean(preference.preferenceId), xmlOpts);
Expand Down