Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting in search schema object definition #4

Open
patelriki13 opened this issue Jun 1, 2020 · 2 comments
Open

Syntax highlighting in search schema object definition #4

patelriki13 opened this issue Jun 1, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@patelriki13
Copy link
Contributor

Hi Akarzazi,

I would like to have Syntax highlighting in SQL object definition of Search schema.

I have made some R&D on that.
Following are way we can implement it.

  1. AvalonEdit WPF based control (https://github.com/icsharpcode/AvalonEdit)
  2. Add FastColoredTextBox win form based control (https://github.com/PavelTorgashov/FastColoredTextBox)
  3. Create our custom control which highlight syntax of SQL. (Problem for this option we need to make error/bug free control for that it will take time.)

I would like to contribute on this but give me suggestion, how I can progress or crease basic architecture and we peer it for this implementation.

@akarzazi
Copy link
Owner

akarzazi commented Jun 2, 2020

Hi Rikin,
The syntax highlighting can be a nice addition, but in "Search schema" the detail is not always SQL as for tables and columns.

Also, i emphasis the primary & secondary text in some cases.
see : /src/SSMSPlusCore/Ui/Search/TextFragment.cs

Nonetheless, if you want to give it a try, the window "Execution History" is an easier target to begin with.
AvalonEdit seems to be a fair choice.
I've tried the nuget package.
It seems working ok and it has a "TSQL" syntax support.

<avalonEdit:TextEditor  Grid.Row="1"  Margin="0,10,0,0" 
		Name="textEditor"
                Document="{Binding Doc, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
		FontFamily="Consolas"
                IsReadOnly="True"
		FontSize="10pt"
		SyntaxHighlighting="TSQL">
</avalonEdit:TextEditor>

Now I think, the difficult part is about highlighting the search term efficiently.

@akarzazi akarzazi added the enhancement New feature or request label Jun 4, 2020
@patelriki13
Copy link
Contributor Author

Thanks for updates, Let me try with your suggestion ("Execution History").
And for search schema part let me do R&D how we can handle it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants