Skip to content

Commit

Permalink
Merge pull request #200127 from microsoft/aiday/refactoringHoverFile
Browse files Browse the repository at this point in the history
Refactoring the hover.ts file
  • Loading branch information
aiday-mar committed Dec 7, 2023
2 parents 9bbc169 + 6fc4a88 commit bdef7fd
Show file tree
Hide file tree
Showing 8 changed files with 197 additions and 123 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Range } from 'vs/editor/common/core/range';
import { IEditorContribution } from 'vs/editor/common/editorCommon';
import { ColorDecorationInjectedTextMarker } from 'vs/editor/contrib/colorPicker/browser/colorDetector';
import { ColorHoverParticipant } from 'vs/editor/contrib/colorPicker/browser/colorHoverParticipant';
import { ModesHoverController } from 'vs/editor/contrib/hover/browser/hover';
import { HoverController } from 'vs/editor/contrib/hover/browser/hover';
import { HoverStartMode, HoverStartSource } from 'vs/editor/contrib/hover/browser/hoverOperation';
import { HoverParticipantRegistry } from 'vs/editor/contrib/hover/browser/hoverTypes';

Expand Down Expand Up @@ -56,7 +56,7 @@ export class ColorContribution extends Disposable implements IEditorContribution
return;
}

const hoverController = this._editor.getContribution<ModesHoverController>(ModesHoverController.ID);
const hoverController = this._editor.getContribution<HoverController>(HoverController.ID);
if (!hoverController) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/vs/editor/contrib/hover/browser/contentHover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class ContentHoverController extends Disposable {
/**
* Returns true if the hover shows now or will show.
*/
public maybeShowAt(mouseEvent: IEditorMouseEvent): boolean {
public showsOrWillShow(mouseEvent: IEditorMouseEvent): boolean {
if (this._widget.isResizing) {
return true;
}
Expand Down

0 comments on commit bdef7fd

Please sign in to comment.