forked from unshare/hybris-integration-intellij-idea-plugin
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#155 | Added localextensions.xml DOM model and custom Icon
- Loading branch information
Showing
10 changed files
with
423 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/com/intellij/idea/plugin/hybris/system/localExtensions/LeSDomFileDescription.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
} |
63 changes: 63 additions & 0 deletions
63
src/com/intellij/idea/plugin/hybris/system/localExtensions/model/Extension.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 <scan> entry to be able to look up the extension location. | ||
* </pre> | ||
* @return the value of the name child. | ||
*/ | ||
@NotNull | ||
@Attribute ("name") | ||
GenericAttributeValue<String> getName(); | ||
|
||
|
||
} |
109 changes: 109 additions & 0 deletions
109
src/com/intellij/idea/plugin/hybris/system/localExtensions/model/Extensions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
|
||
|
||
} |
51 changes: 51 additions & 0 deletions
51
src/com/intellij/idea/plugin/hybris/system/localExtensions/model/Hybrisconfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
|
||
|
||
} |
77 changes: 77 additions & 0 deletions
77
src/com/intellij/idea/plugin/hybris/system/localExtensions/model/Scan.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
|
||
|
||
} |
Oops, something went wrong.