Skip to content

Devassist | Hover solution (AST-16742^) - #268

Open
cx-aniket-shinde wants to merge 51 commits into
feature/devassist_integrationfrom
feature/hover
Open

Devassist | Hover solution (AST-16742^)#268
cx-aniket-shinde wants to merge 51 commits into
feature/devassist_integrationfrom
feature/hover

Conversation

@cx-aniket-shinde

Copy link
Copy Markdown
Collaborator

No description provided.

cx-aniket-shinde and others added 30 commits August 7, 2026 23:57
- Remove McpInstallService from PreferencesPage (common-lib)
- Create AuthenticationListener in devassist-lib configuration
- Register listener in McpInstallService static block
- Create IProjectLifecycleListener interface in common-lib
- ProjectLifecycleListener implements interface
- Update PluginStartup.getProjectListener() to return interface
- MCP auto-install now triggered by authentication event (devassist-lib)
- Workspace scan triggered after login via interface

Architecture: common-lib has no devassist imports, clean separation.
- Create IAuthenticationSuccessHandler interface in common-lib
- Move welcome dialog logic to AuthenticationSuccessHandler in devassist-lib
- PreferencesPage delegates to handler via Preferences registry
- Removes WelcomeDialog import from common-lib PreferencesPage
- Handlers registered in McpInstallService static block

Architecture: common-lib has NO devassist imports, clean separation.
- Create ISettingsChangeNotifier interface in common-lib
- Create SettingsChangeNotifier implementation in main plugin
- Register notifier in PluginStartup static block
- Remove PluginStartup and PluginUtils imports from common-lib PreferencesPage
- Use notifier instead of direct event broker calls

Architecture: common-lib has NO main plugin imports, clean separation.
devassist-lib should depend on common-lib for JAR access, not duplicate them.
- Remove lib/ references from devassist-lib MANIFEST.MF and build.properties
- Remove lib/ references from devassist-lib .classpath
- devassist-lib Require-Bundle: common-lib provides JAR access
- Revert .gitignore to only track main plugin lib/
Major improvements to HTML rich hover display:
1. Fixed O(n²) duplicate detection using HashSet instead of ArrayList
2. Added performance monitoring to detect slow hover operations (>100ms)
3. Improved error handling with proper exception catching during annotation iteration
4. Centralized HTML escaping to HtmlEscapeUtil utility class
5. Enhanced HTML styling with severity-based colors, proper spacing, and fonts
6. Added visual improvements: separator styling, font sizes, color hierarchy
7. Optimized annotation model access with better error recovery

Performance fixes:
- Replaced O(n) contains() checks with O(1) HashSet lookups
- Added timeout monitoring (logs if hover takes >100ms)
- Proper exception handling without blocking UI thread

HTML/UX improvements:
- Severity colors: Malicious (red), Critical (dark red), High (orange), Medium (yellow), Low (green)
- Better visual hierarchy with font sizes and weights
- Improved spacing and divider styling
- Action links now styled with blue color and cursor pointer indicator
- Font family and size defaults for consistent rendering

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Hover now shows:
- Title (orange/red)
- Description
- Informational action links (Fix, View Details, Ignore, Copy Details)
- Helper text: "Press Ctrl+1 for Quick Fix actions"

The action links are text-only (Eclipse hovers can't capture clicks).
Actual implementations are in Quick Fix system via CheckmarxMarkerResolutionGenerator.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Hover now displays:
- Title (orange) + Description
- Four styled action buttons: Fix with AI, Details, Ignore, Copy
- Buttons are clickable and trigger corresponding actions
- Uses HTML button elements with action: protocol URL handlers
- LocationListener intercepts clicks via reflection on internal Browser

Next: Hook action handlers to actual Quick Fix implementations.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Removed button styling (background, borders, padding)
- Now displays as simple text links: blue + underlined
- Links are clickable via LocationListener on action: protocol URLs
- Simpler, cleaner appearance matching typical hover link styles

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
The HoverControlCreator (small preview) had the action handler set up, but the
PresenterControlCreator (large interactive popup) did not. When the user moved
the mouse into the hover popup, JFace replaced it with the PresenterControlCreator,
which had no LocationListener to intercept action: protocol URLs. Now both control
creators set up the handler, so clicks work on both the preview and the interactive popup.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Changed action links from href-based to onclick-based with window.location
assignment. This ensures LocationListener receives location change events for
action: protocol URLs. Added debug logging to verify LocationListener setup and
invocation.

Fixes: Links now trigger handleHoverAction() when clicked on both preview and
interactive popups.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Changed from custom protocol (action:) to URL fragment (#action:).
SWT Browser navigates to about:blank#action:fix on link click, and
LocationListener can now parse the fragment to extract the action name.

Fixes: Clicks on action links now trigger handleHoverAction() correctly.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@stepsecurity-app

stepsecurity-app Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Resolved — a later workflow run passed this policy check.

Original alert (resolved)

Security Policy Alert: Actions Policy Violation

This workflow run has been blocked by StepSecurity's actions policy.

Disallowed Actions:

  • timonvs/pr-labeler-action@8b99f404a073744885d8021d1de4e40c6eaf38e2

To fix this issue, please modify the workflow to use only allowed actions. Contact your organization administrator to request changes to the allowed actions list if needed.

For more information, see StepSecurity's Actions Policy documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant