Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added localextensions.xml DOM model and custom Icon #155

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
6 changes: 6 additions & 0 deletions resources/META-INF/optional-lang-dependencies.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@
<dom.fileMetaData rootTagName="extensioninfo" stubVersion="1"
implementation="com.intellij.idea.plugin.hybris.system.extensionInfo.EiSDomFileDescription"/>

<!-- ####################################################################################################### -->
<!-- ExtensionInfo -->
<!-- ####################################################################################################### -->
<dom.fileMetaData rootTagName="hybrisconfig" stubVersion="1"
implementation="com.intellij.idea.plugin.hybris.system.localExtensions.LeSDomFileDescription"/>

<!-- ####################################################################################################### -->
<!-- Hybris Type System -->
<!-- ####################################################################################################### -->
Expand Down
1 change: 1 addition & 0 deletions resources/META-INF/plugin-release-info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
<li><i>Feature:</i> Inspection for <code>beans.xml</code> rely on whole Bean System, not only current file (<a href="https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/88" target="_blank" rel="nofollow">#88</a>)</li>
<li><i>Feature:</i> Regrouped [y] Application settings into separate sections (<a href="https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/130" target="_blank" rel="nofollow">#130</a>)</li>
<li><i>Feature:</i> New Remote Instance Wizard will prefill some data from [y] properties (<a href="https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/143" target="_blank" rel="nofollow">#143</a>)</li>
<li><i>Feature:</i> Added localextensions.xml DOM model and custom Icon (<a href="https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/155" target="_blank" rel="nofollow">#155</a>)</li>
<li><i>Feature:</i> Added extensioninfo.xml DOM model and custom Icon (<a href="https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/147" target="_blank" rel="nofollow">#147</a>)</li>
<li><i>Feature:</i> Added process.xml DOM model and custom Icon (<a href="https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/148" target="_blank" rel="nofollow">#148</a>)</li>
<li><i>Feature:</i> Decreases cognitive complexity for Code Completion and custom Icons (<a href="https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/152" target="_blank" rel="nofollow">#152</a>)</li>
Expand Down
3 changes: 3 additions & 0 deletions resources/i18n/HybrisBundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ hybris.inspections.ei.EiDuplicateExtensionDefinition.key=[y] Dependency on exten
hybris.inspections.fix.ei.EiDuplicateExtensionDefinition.message=[y] Dependency on ''{0}'' extension is already declared
hybris.inspections.fix.ei.EiUnknownExtensionDefinition.message=[y] Unknown ''{0}'' extension

hybris.inspections.le.LeUnknownExtensionDefinition.key=[y] Unknown extension
hybris.inspections.fix.le.LeUnknownExtensionDefinition.message=[y] Unknown ''{0}'' extension

hybris.inspections.fix.xml.AddTag=Add tag {0}
hybris.inspections.fix.xml.AddTagWithAttributes=Add tag {0} with {1}
hybris.inspections.fix.xml.AddAttribute=Add attribute {0}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ private HybrisIcons() {

public static final Icon HYBRIS = getIcon("/icons/hybrisIcon.svg");
public static final Icon EXTENSION_INFO = getIcon("/icons/extensionInfo.svg");
public static final Icon LOCAL_EXTENSIONS = getIcon("/icons/extensionInfo.svg");
public static final Icon BUSINESS_PROCESS = getIcon("/icons/businessProcess.svg");
public static final Icon HYBRIS_REMOTE = getIcon("/icons/hybrisRemoteIcon.svg");
public static final Icon MONITORING = getIcon("/icons/monitoring.svg");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
* Copyright (C) 2019 EPAM Systems <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package com.intellij.idea.plugin.hybris.system.localExtensions

import com.intellij.idea.plugin.hybris.common.HybrisConstants
import com.intellij.idea.plugin.hybris.common.utils.HybrisIcons
import com.intellij.idea.plugin.hybris.system.localExtensions.model.Hybrisconfig
import com.intellij.openapi.module.Module
import com.intellij.psi.xml.XmlFile
import com.intellij.util.xml.DomFileDescription
import javax.swing.Icon

class LeSDomFileDescription : DomFileDescription<Hybrisconfig>(Hybrisconfig::class.java, "hybrisconfig") {

override fun getFileIcon(flags: Int): Icon = HybrisIcons.LOCAL_EXTENSIONS

override fun isMyFile(file: XmlFile, module: Module?) = super.isMyFile(file, module)
&& file.name == HybrisConstants.LOCAL_EXTENSIONS_XML

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*
* This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
* Copyright (C) 2019 EPAM Systems <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

// Generated on Thu Jan 12 19:15:30 CET 2023
// DTD/Schema : null

package com.intellij.idea.plugin.hybris.system.localExtensions.model;

import com.intellij.util.xml.*;
import com.intellij.util.xml.DomElement;
import org.jetbrains.annotations.NotNull;

/**
* null:extensionType interface.
* <pre>
* <h3>Type null:extensionType documentation</h3>
* Adds an extension to the hybris platform.
* </pre>
*/
public interface Extension extends DomElement {

/**
* Returns the value of the dir child.
* <pre>
* <h3>Attribute null:dir documentation</h3>
* Path to the extension folder relative to the platform home.
* </pre>
* @return the value of the dir child.
*/
@NotNull
@Attribute ("dir")
GenericAttributeValue<String> getDir();


/**
* Returns the value of the name child.
* <pre>
* <h3>Attribute null:name documentation</h3>
* The name of the extension. Requires at least one &lt;scan&gt; entry to be able to look up the extension location.
* </pre>
* @return the value of the name child.
*/
@NotNull
@Attribute ("name")
GenericAttributeValue<String> getName();


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
/*
* This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
* Copyright (C) 2019 EPAM Systems <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

// Generated on Thu Jan 12 19:15:30 CET 2023
// DTD/Schema : null

package com.intellij.idea.plugin.hybris.system.localExtensions.model;

import com.intellij.util.xml.*;
import com.intellij.util.xml.DomElement;
import org.jetbrains.annotations.NotNull;

/**
* null:extensionsType interface.
* <pre>
* <h3>Type null:extensionsType documentation</h3>
* Configures the installed extensions for the hybris platform..
* </pre>
*/
public interface Extensions extends DomElement {

/**
* Returns the value of the autoload child.
* <pre>
* <h3>Attribute null:autoload documentation</h3>
* Loads automatically all extensions of the platform. If set to 'false', you
* have to manually add the platform extensions in the (local)extensions.xml file.
* Default value is 'true'.
* </pre>
* @return the value of the autoload child.
*/
@NotNull
@Attribute ("autoload")
GenericAttributeValue<Boolean> getAutoload();


/**
* Returns the list of path children.
* <pre>
* <h3>Element null:path documentation</h3>
* Adds a directory to scan for extensions in.
* </pre>
* @return the list of path children.
*/
@NotNull
@SubTagList ("path")
java.util.List<Scan> getPaths();
/**
* Adds new child to the list of path children.
* @return created child
*/
@SubTagList ("path")
Scan addPath();


/**
* Returns the list of extension children.
* <pre>
* <h3>Element null:extension documentation</h3>
* Adds an extension to the hybris platform.
* </pre>
* @return the list of extension children.
*/
@NotNull
@SubTagList ("extension")
java.util.List<Extension> getExtensions();
/**
* Adds new child to the list of extension children.
* @return created child
*/
@SubTagList ("extension")
Extension addExtension();


/**
* Returns the list of webapp children.
* <pre>
* <h3>Element null:webapp documentation</h3>
* Adds external extensions to the hybris platform.
* </pre>
* @return the list of webapp children.
*/
@NotNull
@SubTagList ("webapp")
java.util.List<Webapp> getWebapps();
/**
* Adds new child to the list of webapp children.
* @return created child
*/
@SubTagList ("webapp")
Webapp addWebapp();


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
* Copyright (C) 2019 EPAM Systems <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

// Generated on Thu Jan 12 19:15:30 CET 2023
// DTD/Schema : null

package com.intellij.idea.plugin.hybris.system.localExtensions.model;

import com.intellij.util.xml.*;
import com.intellij.util.xml.DomElement;
import org.jetbrains.annotations.NotNull;

/**
* null:hybrisconfigElemType interface.
* <pre>
* <h3>Type null:hybrisconfigElemType documentation</h3>
* Configures the installed extensions for the hybris platform.
* </pre>
*/
public interface Hybrisconfig extends DomElement {

/**
* Returns the value of the extensions child.
* <pre>
* <h3>Element null:extensions documentation</h3>
* Configures the installed extensions for the hybris platform..
* </pre>
* @return the value of the extensions child.
*/
@NotNull
@SubTag ("extensions")
@Required
Extensions getExtensions();


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/*
* This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
* Copyright (C) 2019 EPAM Systems <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

// Generated on Thu Jan 12 19:15:30 CET 2023
// DTD/Schema : null

package com.intellij.idea.plugin.hybris.system.localExtensions.model;

import com.intellij.util.xml.*;
import com.intellij.util.xml.DomElement;
import org.jetbrains.annotations.NotNull;

/**
* null:scanType interface.
* <pre>
* <h3>Type null:scanType documentation</h3>
* Scans for extensions in a given folder.
* </pre>
*/
public interface Scan extends DomElement {

/**
* Returns the value of the dir child.
* <pre>
* <h3>Attribute null:dir documentation</h3>
* Path to the extension folder relative to the platform home.
* </pre>
* @return the value of the dir child.
*/
@NotNull
@Attribute ("dir")
@Required
GenericAttributeValue<String> getDir();


/**
* Returns the value of the autoload child.
* <pre>
* <h3>Attribute null:autoload documentation</h3>
* Defines which extensions shall be loaded. Can be 'true' for loading all that can be found inside that folder or 'false' to load only extensions that are required by others.
* </pre>
* @return the value of the autoload child.
*/
@NotNull
@Attribute ("autoload")
GenericAttributeValue<Boolean> getAutoload();


/**
* Returns the value of the depth child.
* <pre>
* <h3>Attribute null:depth documentation</h3>
* The maximum directory depth to traverse when scanning for extensions.
* </pre>
* @return the value of the depth child.
*/
@NotNull
@Attribute ("depth")
GenericAttributeValue<Integer> getDepth();


}
Loading