forked from eclipse-cdt/cdt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add internal API to CEditor to allow CDT-LSP to contribute a "try it"…
… banner Part of eclipse-cdt#968
- Loading branch information
1 parent
ca5dabc
commit be7896c
Showing
3 changed files
with
73 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/switchtolsp/ISwitchToLsp.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2025 Kichwa Coders Canada Inc. and others. | ||
* | ||
* This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License 2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*******************************************************************************/ | ||
|
||
package org.eclipse.cdt.internal.ui.switchtolsp; | ||
|
||
import org.eclipse.cdt.internal.ui.editor.CEditor; | ||
import org.eclipse.swt.widgets.Composite; | ||
import org.eclipse.ui.texteditor.ITextEditor; | ||
|
||
/** | ||
* This interface can be implemented by CDT-LSP to display a banner in the {@link CEditor} | ||
* to encourage users to try the new C/C++ editing experience based on CDT/LSP | ||
* | ||
* See org.eclipse.cdt.lsp/OSGI-INF/org.eclipse.cdt.lsp.internal.switchtolsp.SwitchToLsp.xml | ||
* for the use. | ||
* | ||
* This interface is not public API, it is provided as a hook for CDT LSP and may | ||
* be changed at any point. | ||
*/ | ||
public interface ISwitchToLsp { | ||
|
||
/** | ||
* Create the banner controls for the "try new experience" | ||
* | ||
* @param part the editor part that the banner is added on | ||
* @param parent the parent control | ||
* @return the new parent control the editor should use | ||
*/ | ||
Composite createTryLspEditor(ITextEditor part, Composite parent); | ||
|
||
} |