You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2026/04/05 08:15:40 UTC
(struts-intellij-plugin) branch feat/disable-graph-editor-by-default created (now 5c50501)
This is an automated email from the ASF dual-hosted git repository.
lukaszlenart pushed a change to branch feat/disable-graph-editor-by-default
in repository https://gitbox.apache.org/repos/asf/struts-intellij-plugin.git
at 5c50501 feat: disable deprecated Graph editor tab by default
This branch includes the following new commits:
new 5c50501 feat: disable deprecated Graph editor tab by default
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(struts-intellij-plugin) 01/01: feat: disable deprecated Graph editor tab by default
Posted by lu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lukaszlenart pushed a commit to branch feat/disable-graph-editor-by-default
in repository https://gitbox.apache.org/repos/asf/struts-intellij-plugin.git
commit 5c5050114eda7ae84f50c635343249a4347b7bbc
Author: Lukasz Lenart <lu...@apache.org>
AuthorDate: Sun Apr 5 10:15:27 2026 +0200
feat: disable deprecated Graph editor tab by default
The Graph editor tab uses deprecated IntelliJ Platform APIs
(GraphBuilder, GraphBuilderFactory) that can cause IDE freezes on
newer platform versions. Gate the feature behind a JVM system property
so it is hidden by default. Users who need the graph view can opt in
with -Dcom.intellij.struts2.enableGraphEditor=true via
Help | Edit Custom VM Options.
Made-with: Cursor
---
CHANGELOG.md | 1 +
README.md | 14 ++++++++++++++
.../graph/fileEditor/Struts2GraphFileEditorProvider.java | 14 ++++++++++++++
3 files changed, 29 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6e22719..73c9120 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,7 @@
### Changed
+- Disable the deprecated Graph editor tab by default; opt in with JVM property `-Dcom.intellij.struts2.enableGraphEditor=true`
- Update `platformVersion` to `2026.1`
- Change since/until build to `261-261.*` (2026.1 only)
- Dependencies - upgrade `org.jetbrains.intellij.platform` to `2.13.1`
diff --git a/README.md b/README.md
index 5f418cc..f961cc4 100644
--- a/README.md
+++ b/README.md
@@ -28,6 +28,20 @@ Provides full integration of Apache Struts 2.
Questions related to the usage of the plugin should be posted to the [user mailing list](https://struts.apache.org/mail.html).
Any issues should be reported using JIRA and [IDEA plugin](https://issues.apache.org/jira/issues/?jql=project%20%3D%20WW%20AND%20component%20%3D%20%22IDEA%20Plugin%22) component.
+## Optional features
+
+### Graph editor tab (disabled by default)
+
+The plugin includes a visual graph view for `struts.xml` configuration files. This feature uses a deprecated IntelliJ Platform API and is disabled by default because it can cause IDE freezes on newer platform versions.
+
+To enable it, add the following JVM property via **Help | Edit Custom VM Options**:
+
+```
+-Dcom.intellij.struts2.enableGraphEditor=true
+```
+
+Restart the IDE after adding the property. The `Graph` tab will then appear when opening `struts.xml` files that are part of a Struts file set.
+
## Testing
Tests are located in `src/test/java` and use IntelliJ Platform test frameworks (`LightJavaCodeInsightFixtureTestCase` and similar). Test data fixtures are in `src/test/testData`.
diff --git a/src/main/java/com/intellij/struts2/graph/fileEditor/Struts2GraphFileEditorProvider.java b/src/main/java/com/intellij/struts2/graph/fileEditor/Struts2GraphFileEditorProvider.java
index a45d3f0..cb68ac9 100644
--- a/src/main/java/com/intellij/struts2/graph/fileEditor/Struts2GraphFileEditorProvider.java
+++ b/src/main/java/com/intellij/struts2/graph/fileEditor/Struts2GraphFileEditorProvider.java
@@ -37,8 +37,22 @@ import java.util.Set;
*/
public class Struts2GraphFileEditorProvider extends PerspectiveFileEditorProvider {
+ /**
+ * JVM system property to opt in to the (deprecated) Graph editor tab.
+ * Disabled by default; enable with {@code -Dcom.intellij.struts2.enableGraphEditor=true}.
+ */
+ static final String GRAPH_EDITOR_ENABLED_PROPERTY = "com.intellij.struts2.enableGraphEditor";
+
+ static boolean isGraphEditorEnabled() {
+ return Boolean.getBoolean(GRAPH_EDITOR_ENABLED_PROPERTY);
+ }
+
@Override
public boolean accept(@NotNull final Project project, @NotNull final VirtualFile file) {
+ if (!isGraphEditorEnabled()) {
+ return false;
+ }
+
if (!file.isValid()) {
return false;
}