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

Enhance the SQL-DataSet-Editor with a search option - see #1584 #1700

Closed
speckyspooky opened this issue May 20, 2024 · 8 comments
Closed

Enhance the SQL-DataSet-Editor with a search option - see #1584 #1700

speckyspooky opened this issue May 20, 2024 · 8 comments
Assignees
Labels
Enhancement Small change to improve the current supported functionality
Milestone

Comments

@speckyspooky
Copy link
Contributor

In the past I programmed lot of SQL-statements which are very long.
Some of my statements have mor like 1.000 lines of code for MS SQL Server.
Also some of my Oracle-statements are very complex and long.

The master development will be done on MS SQL Studio or the SQL-developer.
But in special cases it would be very helpful to have a search option of query text directly on the SQL-DataSetEditor.

The topic is that the standard "Find/Replace"-dialog are not available on the source-viewer-editor which is the core component of the SQL-editor.
To get the search option I would prefer to add directly a search option into the wizard with forward-/backward-serach
and with the standard option of case-sensitive- & whole-word-search.

For this change a created a small PoC for the SQLDataSet-editor

1. Screen, search first text
grafik

2. Screen, forward search
grafik

3. Screen, forward search end, with message
grafik

4. Screen, backward search end, with message
grafik

@speckyspooky speckyspooky added the Enhancement Small change to improve the current supported functionality label May 20, 2024
@speckyspooky speckyspooky added this to the 4.16 milestone May 20, 2024
@speckyspooky speckyspooky self-assigned this May 20, 2024
@speckyspooky
Copy link
Contributor Author

@wimjongman @hvbtup @merks your vote is welcome before I create a PR for this change.

@speckyspooky speckyspooky changed the title Enhance the SQL-DataSet-Editor with an search option - see #1584 Enhance the SQL-DataSet-Editor with a search option - see #1584 May 20, 2024
@merks
Copy link
Contributor

merks commented May 21, 2024

@speckyspooky

If it's a helpful feature for you, then I'm sure others will find it helpful too.

BTW, I'm not sure if the new refactor find/replace infrastructure might be useful or reusable for this purpose.

eclipse-platform/eclipse.platform.ui#1192

@speckyspooky
Copy link
Contributor Author

@merks
Thanks for your vote :o)

Parallel I will show your link to the new version. I saw that the new version is really very new.
So I hope we can to in further steps a kind of improvements to have the first step with the search above
and if the new dialog is usable on this WizardDialog-level we can optimize it.

@Wittmaxi
Copy link

Wittmaxi commented May 21, 2024

@merks the goal is to later provide an interface for all Views to implement so that the overlay can target them. It is alreay possible to implement IFindReplaceTarget and IFindReplaceTargetExtension1..4 in order for the FindReplaceDialog to correctly open and target the view for searching. I strongly vote for using this existing mechanism instead of remaking a new Find/Replace-Mechanism, unless there is no other way. Feel free to reach out in case further questions arise.

@speckyspooky
Copy link
Contributor Author

@Wittmaxi
Good to hear that all views will get the option for the Find/Replace-Mechanism.
I will not implement a new way, it is a small helper to solve the biggest pain to find query text on large statements.

So if your interface-implementation is done, I would replace my stuff of the simple search with your better version.
Do you have a time schedule for the interface so that we can use the new overlay?

@Wittmaxi
Copy link

Wittmaxi commented May 21, 2024

In order to simplify the transition, your own implementation could look like this:

  • Your editor implements IFindReplaceTarget and the required extensions
  • Your UI only accesses the editor using these interfaces
    alternatively, you don't even build your own ui but rather just ipen the FindReplaceDialog with your editor as target

There is no concrete timeline and I cannot make any commitments about dates currently. But I will be working on it as soon as the Overlay for the editor is working decently well (in fact, I already have a prototype done which allows the Problems View to use the same overlay!)

@speckyspooky
Copy link
Contributor Author

speckyspooky commented May 21, 2024

Yes, I have extended a new class from the SourceViewer and there I use the IFindReplaceTarget to find the entered search text.
The UI elements are only to control the find options and navigate forward/backward.

So it will be easy to reimplements based on it your overlay.
Let my know when it would be possible to integrate your overlay.

speckyspooky added a commit that referenced this issue May 23, 2024
* Enhance the SQL-dataset-editor with a search option (#1700)
* Set symbol-sign unicode-encoded and simplify the button events
* Optimize color handling and source code
@speckyspooky
Copy link
Contributor Author

The change is merged to the master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Small change to improve the current supported functionality
Projects
None yet
Development

No branches or pull requests

3 participants