Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [recommenders-dev] SnipMatch's local search demo

I could be wrong, but I think our final version didn't flicker at all on the Mac. Can anyone correct me? If we never had a stable version, then yes, it might makes sense to fix this earlier rather than later. Otherwise, I propose that we leave it until mid-summer. I don't have any flickering on my Mac.

On Thu, Mar 15, 2012 at 10:26 PM, Zi Ye <zi@xxxxxxx> wrote:
The display was giving us grief. The same code would produce very different looks and behaviour on Macs and on PCs. For example, the flickering only appears on Macs, and the font is much smaller on Macs. Feel free to change it however you see fit, but perhaps Doug can tell you some of the important design decisions we made.


On 15 March 2012 22:10, Chen Cheng <chengchendoc@xxxxxxxxx> wrote:
About this display part, it is designed and implemented by Doug & Zi Ye, i made a little change. I personally would like to improve its user preference, but we can hear Doug & Zi Ye's voices first, then decide the future plan as they had been working with this part for a long time.

We have two choices at least:
1. Try to find a solution to  avoid screen flickering, i am not sure, but this will be easier
2. Build a brand new search result display module, I think Doug know the difficult.

As we have many other things to do besides this improving demand, so this is low priority now. Your ideas?

2012/3/16 Marcel Bruch <bruch@xxxxxxxxxxxxxxxxxx>
I guess a bit off-topic, but why do you use a bunch of styled-text widgets to display the template proposals? I am sure part of the answer is "if you need to ask, you don't need to know" :) but, I'm wondering if a shell with a table viewer with a lazy content provider wouldn't suffice here? 

I also wonder whether a lazy population feature of the provider is needed actually at the moment?

Marcel


On 15.03.2012, at 21:34, Doug Wightman wrote:

Thanks, this looks great!

I can tell you what we did to avoid screen flickering and how we handled placeholders, when you're ready :)

Doug


On Thu, Mar 15, 2012 at 7:34 AM, Chen Cheng <chengchendoc@xxxxxxxxx> wrote:
Hi,

I have added Color & Font preference for SnipMatch, now we can set up color and font for SnipMatch (see attach file color_font_preference.png), default font is Eclipse text editor's default font.

<fontDefinition
        categoryId="org.eclipse.recommenders.snipmatch.preferences.themeElementCategory"
        id="org.eclipse.recommenders.snipmatch.preferences.fontDefinition"
        label="SnipMatch Search Font"
        defaultsTo="org.eclipse.jface.textfont">
        <description>
            SnipMatch theme font
        </description>
</fontDefinition>


2012/3/15 Chen Cheng <chengchendoc@xxxxxxxxx>
Hi Marcel,

Yeah, this is a demo, we should keep improving SnipMatch in the future. But before other coding job, i think i have to finish GSoC's project proposal first as GSoC's student application will open soon. Once i finished draft version of project proposal, we still need discuss and improve, this process will also cost several days.


2012/3/15 Marcel Bruch <marcel.bruch@xxxxxxxxx>
Hi Chen,

I'd played with snipmatch and I happy that the local search engine works without any severe issue (see the google issue I opened). Thank you!

I have fixed this null pointer exception already, and push to Git repository :-)
 
I've a few comments on the UI (I didn't look at the code yet). For the demo, 

can you use a larger font in the popup search window? Maybe just use the text editor default font? 

Current font for search box:
searchFont = new Font(PlatformUI.getWorkbench().getDisplay(), "Arial", 10, SWT.NORMAL);

I will try to use text editor default font
 

and:

Is it possible to use dummy placeholders for variables which haven't been bound yet? It looks odd if the templates have gaps that don't compile.

I know what is your mean, but i do not think it is a necessary feature, even we can not realize it at all.  For example (see attach file loop.png):
If user doesn't bound variable for <loopable>, and there is not any list variable in current editor context, how can we build the dummy ? Even i use null (see attach file loop2.png), Eclipse also show compile error tips.



On mac there is a lot of flickering and jumping windows when the proposals are displayed one-by-one. Do you have the same on Linux/Win?

Yeah, this is a problem, i found the reason, it is caused by SnipMatch's current GUI snippets display code. You can find method "displayMatches()" in class SearchBox, we have to create StyledText to display search result if there is not enough StyledText instance in current "matchTexts" list, and use Shell.open() to show the StyledText instance, but this step cost too much time. Usually, it will cost 50ms to create and show a StyleText instance.

Debug log:

Before create new StyledText:1331797189285
Finish create a new StyledText:1331797189336
Before create new StyledText:1331797189359
Finish create a new StyledText:1331797189409
Before create new StyledText:1331797189433
Finish create a new StyledText:1331797189483

It is limited by Eclipse's swt preference in current design model. If we want to improve it, we have to make a great change of SnipMatch's current this part of code. I will try to find the solution, i hope we can rebuild this module just like Eclipse Java class editor's content assist (see attach file contentassist.png).
 

I've also a few ideas for the preferences - but not tonight :) Thanks and keep up the good work! I'm looking forward to demo Snipmatch at EclipseCon.

Marcel


On 14.03.2012, at 08:53, Chen Cheng wrote:

Two attach files to help explain how to use it:

1. snipmatch_preference.png 
SnipMatch's local setting preference page, operate step 2 and 3 in this dialog

2. SnipMatch.png
SnipMatch works in java file editor


2012/3/14 Chen Cheng <chengchendoc@xxxxxxxxx>
Hi Marcel & Doug,

I have finished SnipMatch's local search demo, and submit code into GIT repository, You guys can update the latest code and have a trial of it in Eclipse's debug.

This is the simple guide about how to use it:

1. Download snippets into local file system, you can use "git clone https://code.google.com/a/eclipselabs.org/p/code-recommenders.snipmatch-snippets/" to get sample json format snippet files. Here we suppose you store the snippets in "D://snippets"

2. Run "SnipMatchPlugin" project as Eclipse application. Then, open Eclipse preference -> Code Recommenders -> SnipMatch -> Local setting, you will find a "Snippets directory" option, click "Browse" button after it, select your json format snippet store path, here is "D://snippets"

3. Select "Search engine file path" in the same dialog, suppose it is "D://snippets/demo.txt", then click the button "Update Index", it will generate the index file for the demo search engine named "D://snippets/demo.txt".

4. In Java file editor, use "Ctrl + Enter" to pop up snippet query dialog, you can input "print", "loop" or "awt" etc to have a trial.

I just use a simple string compare to search snippets here, we should discuss how to merge the Lucene based search engine in the coming days :-)


--
Best Regards From Cheng Chen [chengchendoc@xxxxxxxxx]



--
Best Regards From Cheng Chen [chengchendoc@xxxxxxxxx]
<snipmatch_preference.png><SnipMatch.png>_______________________________________________
recommenders-dev mailing list
recommenders-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/recommenders-dev


_______________________________________________
recommenders-dev mailing list
recommenders-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/recommenders-dev




--
Best Regards From Cheng Chen [chengchendoc@xxxxxxxxx]



--
Best Regards From Cheng Chen [chengchendoc@xxxxxxxxx]

_______________________________________________
recommenders-dev mailing list
recommenders-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/recommenders-dev


_______________________________________________
recommenders-dev mailing list
recommenders-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/recommenders-dev

Thanks,
Marcel



_______________________________________________
recommenders-dev mailing list
recommenders-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/recommenders-dev




--
Best Regards From Cheng Chen [chengchendoc@xxxxxxxxx]

_______________________________________________
recommenders-dev mailing list
recommenders-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/recommenders-dev



_______________________________________________
recommenders-dev mailing list
recommenders-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/recommenders-dev



Back to the top