eclipse-platform / eclipse-platform/eclipse.platform

3D Java Code Editor Mode

Open
#2,048 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
165
Forks
174
Avg merge
2d 8h
Merged PRs (30d)
22

Description

# Semitransparent, layered 3D class hierarchy visualization integrated into Eclipse Java code editor

Image

### **Summary:**

Introduce a next-generation visualization feature in Eclipse Java editor: a semitransparent, layered 3D class hierarchy overlay directly inside the code canvas. This allows developers to **optionally** see inherited and overridden code from superclasses in real time, using depth, color, and perspective, in addition to existing separate outline or hierarchy views. User could choose which direction the 3D effect fans out into.

### **Description:**

When working with large object-oriented systems, developers often struggle to track class hierarchies, overridden methods, and inherited/existing code. Current solutions (like "Open Type Hierarchy" or outline views) require switching context, disrupting the flow of coding and comprehension.

**Proposed enhancement:**

* **Direct inline visualization:** Display superclasses’ and inherited code *directly behind and alongside* the current code in the same editor pane.
* **3D layered effect:** Each class layer is shown as an overlaid "virtual sheet" behind the active class.
* **Text-based layering:** Instead of colored planes, use text overlays with changes in color, size, and opacity to represent depth and hierarchy.
* **Perspective spread:** Layers are horizontally "fanned out" (spread to the right) to avoid overlap and simulate 3D depth. This spread allows for clear line-by-line inspection of which code belongs to which ancestor, and you can immediately also see the ancestors' code perhaps allowing to avoid duplicating or complicating logic.
* **Interactive focus:** Developers can adjust focus using special key + mouse + scrollwheel or gesture controls. For example:

* Bringing a superclass forward for detailed inspection.
* Panning perspective in a desired direction.
* Temporarily collapsing or hiding deeper ancestors.
* Highlighting overridden methods automatically.

---

### **Benefits:**

* **Enhanced understanding of inheritance:** Developers can instantly see which methods are inherited or overridden without leaving the editing context.
* **Reduced cognitive load:** No need to mentally map outline or hierarchy information; it’s visible in place.
* **Improved code readability and maintainability:** Developers gain a full architectural picture at a glance, leading to faster debugging and fewer integration mistakes.

---

### **Technical Considerations:**

* Requires a rendering system that can support transparent layered text rendering (e.g., leveraging SWT/JFace extensions, OpenGL overlays, or newer GPU-based composition).
* Must ensure editor responsiveness is maintained (e.g., incremental rendering or on-demand layer loading).
* Color, opacity, and text scaling parameters should be configurable for different themes and accessibility needs.
* Ability to toggle or temporarily hide visualization for minimal distraction.

---

### **Potential Enhancements (Future Iterations):**

* Enable panning and orbiting around layers (full 3D navigation).
* Allow clicking on any superclass method to jump directly to its declaration or history.
* Support visualization for interfaces and multi-inheritance patterns (e.g., multiple implemented interfaces).

---

### **Conclusion:**

This feature represents a major leap forward in integrated code comprehension tools. By merging the class hierarchy directly into the code editor canvas in a visually layered, intuitive, and interactive way, Eclipse can greatly improve productivity and code quality for Java developers.

---

✅ Attached is some pseudocode/sample code via the ThreeDEditorEnhancer to further explain the RFE.
✅ AI suggests: NO NEED to patch any core Eclipse code to achieve this as a "3D mode" — all necessary hooks exist via plugin extension points and editor APIs (**unverified**).
* Install your ThreeDHierarchyPainter on the SourceViewer
* Add a toggle action to the editor’s toolbar/menu, EditorActionBarContributor

[PseudoJavaCodeEditorPerspectiveHierarchyOverlayWithCamera.txt](https://github.com/user-attachments/files/21233042/PseudoJavaCodeEditorPerspectiveHierarchyOverlayWithCamera.txt)
[ThreeDEditorEnhancer-sample.txt](https://github.com/user-attachments/files/21233170/ThreeDEditorEnhancer-sample.txt)
[ThreeDHierarchyPainter.-sample.txt](https://github.com/user-attachments/files/21233146/ThreeDHierarchyPainter.-sample.txt)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.