-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
introduce SuffixLineContentCodeMining
which allows to render a code mining where the cursor selection does not include the code mining at the given source position.
- Loading branch information
1 parent
f801dc8
commit fdabddd
Showing
10 changed files
with
248 additions
and
26 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
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
45 changes: 45 additions & 0 deletions
45
...eclipse.jface.text/src/org/eclipse/jface/text/codemining/SuffixLineContentCodeMining.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,45 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024, SAP SE | ||
* | ||
* 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.jface.text.codemining; | ||
|
||
import java.util.function.Consumer; | ||
|
||
import org.eclipse.swt.events.MouseEvent; | ||
|
||
import org.eclipse.jface.text.Position; | ||
|
||
/** | ||
* Line content code mining which is drawn right to the given position. Cursor and selection | ||
* handling are not including the code mining. | ||
*/ | ||
public abstract class SuffixLineContentCodeMining extends LineContentCodeMining { | ||
|
||
/** | ||
* constructor to locate the code mining in a given position. | ||
* | ||
* @param position the position where the mining must be drawn. | ||
* @param provider the owner code mining provider which creates this mining. | ||
*/ | ||
public SuffixLineContentCodeMining(Position position, ICodeMiningProvider provider) { | ||
super(position, provider); | ||
} | ||
|
||
/** | ||
* constructor to locate the code mining in a given position. | ||
* | ||
* @param position the position where the mining must be drawn. | ||
* @param provider the owner code mining provider which creates this mining. | ||
* @param action the action to execute when mining is clicked and null otherwise. | ||
*/ | ||
public SuffixLineContentCodeMining(Position position, ICodeMiningProvider provider, Consumer<MouseEvent> action) { | ||
super(position, provider, action); | ||
} | ||
} |
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
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
Oops, something went wrong.