Xtext - Proposal Provider actual line - dsl

I for giving good proposals in Xtext I need to know the text entered before the actual proposal.
With eAllContents I can see all the text entered. Also the text after the actual line.
Is it possible to find out in which line the user currently is?
Thanks

Related

Underlining text posted to slack

I am trying to see if there is a way to underline a text posted to slack. I am using webhook for posting messages to slack.
You can approximate it with Unicode’s COMBINING LOW LINE character: http://www.fileformat.info/info/unicode/char/0332/index.htm . Before posting, split your string along grapheme boundaries and insert a COMBINING LOW LINE after each. This sort of works, but with Slack’s default font the underline sometimes splits visually between characters. It’s enough though to give an impression, which might be what you want if, for example, you’re trying to give an example of the position of a link within a piece of text.
I don't think this can be done. See https://api.slack.com/docs/formatting for the available message formatting options.

Finding 2 numerical strings on same line

I am new to Notepad++ and have ben researching how to do this, but it seems each answer I try to mimic doesn't work correctly.
Here is the scenario:
I have 2 text files, each with ATM transactions such as time of transaction (In military time, such as 18:09) and transaction amount (Displayed as 43.00)
I need to find a way to search the document so that it only returns matches where both the time and amount are there, and on the same line of the document.
Example would be, I need to find on this huge text file where both 43.00 and 18:09 appear on the same line, allowing my to verify the transaction was valid.
Any ideas on how to do this? I am using the latest Notepad++6.8 and have downloaded the compare plugin.
Thank you and I will begin researching how the coding works in notepad++ in the meantime, as I am not an experienced programmer (Just had 1 college course in C++ which I loved but eh)
Cheers!
Ctrl-F, Select "Regular expression" as Search mode and then write:
8:09.*43.00
Ctrl F, search for 43.00 or 18:09.

Azure Search result highlight snippets

I am using the Hit Highlighting feature in Azure Search and noticed a discrepancy in the way it behaves from the documentation. In the documentation it says that when you use hit highlighting it will return a snippet of the field with the highlight, but it always returns the entire field (with proper highlighting).
Is there a way to have Azure Search instead return just a snippet (say of about 200 characters) that includes the highlight?
Currently, the answer is no, you cannot. The field breaks according to (English) sentence rules, ie. it breaks on ".", "!", "?".
Also see this question for an example on breaking and some more info relating to the delimiters.
Depending on the nature of the field you might be able to add one of the above delimiters to 'emulate' what you want to accomplish (as suggested by Nate Ko).
I want to suggest something else on top of what Nate spoke to. When you look at the document response, also take a look at the Highlights part of the results (as opposed to the Document). For example, you might be currently getting the field results by retrieving something like this:
Results[i].Document.DESCRIPTION
If there is a highlight found for that field, the snipped will be found here:
Results[i].Highlights.DESCRIPTION
What I like to do is to first check if there is a valid Highlight and if so display it. If not, I show the actual field content.
Liam
We recently introduced a change that improves the highlighter performance on large fields and NLP experience. One side effect of the change was that the new highlighter generates snippets based on sentences, breaking the text field on '.' (period).
One way to workaround the issue is to put '.'s in the field. We are working to enforce the snippet size and let you know when it is available.

What kind of sign is "‎" and what is it used for

What kind of sign is "‎" and what is it used for (note there is a invisible sign there)?
I have searched through all my documents and found a lot of them. They messed upp my htaccess file. I think I got them when I copied webadresses from google to redirect. So maybe a warning searching through your documents for this one also :)
It is U+200E LEFT-TO-RIGHT MARK. (A quick way to check out such things is to copy a string containing the character and paste it in the writing area in my Full Unicode input utility, then click on the “Show U+” button there, and use Fileformat.Info character search to check out the name and other properties of the character, on the basis of its U+... number.)
The LEFT-TO-RIGHT MARK sets the writing direction of directionally neutral characters. It does not affect e.g. English or Arabic words, but it may mess up text that contains parentheses for example – though for text in English, there should be no confusion in this sense.
But, of course, when text is processed programmatically, as when a web server processes a .htaccess file, they are character data and make a big difference.

notepad++ how to convert to typing assistant like?

I was using notepad++ to create a report and its taking a quite a while for me to type and do so.
Well i had tried a software called typing assistant it was really good(except for the money part :D).
TO the Point :
is there any way tat i can link a dict(text file of words) and use notepad ++ as typing assistant please tell me if so i
can speed my report.
Cause i am a programmer too so i really like the keyword completion and stuff .But is there a way to use it for text ?
already tried Phrase Express -.-:
Takes long and its kinda for macro text and text completion don't work tat fast for me to tab and complete
if there's a question in the form like mine link me to tat :
i searched it and i didn't get it
Yes, you can set up your own custom auto-complete dictionaries in notepad++. You need to create an xml file with your language name and put it under the plugins/APIs directory in notepad++. Of course this assumes you know how to write xml. There's a formal description of how to implement this here.
I've never tried to create an auto-complete dictionary for plain text files, so I'm not sure if it's possible, but I have successfully created them for user-defined languages, which you could also do if you can't get it to work with text files.
I'm not sure if this question is really a duplicate, but here is a very similar one, which may help you in your research.

Resources