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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,22 @@
*/
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;
}
Expand Down
Loading