Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [recommenders-dev] [SnipMatch] New search result display module trial version is finished

Doug, I was wondering from the beginning why I have to specify the variables separately and not using the existing JFace template language constructs.

Is there any particular reason why ${parent:var(type)} should not be used? Or is it used internally and I'm only confused by the UI?


On 12.04.2012, at 07:36, Doug Wightman wrote:

> No, we don't have any design documents :)
> 
> Zi and I will walk you through it, and I can write design documents
> for future committers.
> 
> Doug
> 
> 
> On Thu, Apr 12, 2012 at 1:26 AM, Chen Cheng <chengchendoc@xxxxxxxxx> wrote:
>> Hi Marcel,
>> 
>> SnipMatch use these patterns to define a code snip tempalate.
>> 
>> For example:
>> ${imp:import(org.eclipse.swt.SWT)} : this means current code snip will add
>> "import org.eclipse.swt.SWT" into current Java class's imports part.
>> ${cursor} : this means this is cursor's new place after code snip is
>> inserted into current editor
>> 
>> But, i did not get all the SnipMatch's code snip define grammar details.
>> Doug, did you guys have any design documents about the code snip define
>> part? Maybe it will help us to understand this grammar better, and in the
>> future, documents are always useful for new contributers.
>> 
>> 2012/4/12 Marcel Bruch <bruch@xxxxxxxxxxxxxxxxxx>
>>> 
>>> Hi Chen, do you use variables in your templates?
>>> 
>>> Something like:  ${composite:newName(org.eclipse.swt.widgets.Composite)}
>>> 
>>> as in:
>>> 
>>> ${compositeType:newType(org.eclipse.swt.widgets.Composite)}
>>> ${composite:newName(org.eclipse.swt.widgets.Composite)}= new
>>> ${compositeType}(${parent:var(org.eclipse.swt.widgets.Composite)},
>>> ${style:link(SWT.NONE, SWT.BORDER)});
>>> ...
>>> ${imp:import(org.eclipse.swt.SWT)}${cursor}
>>> 
>>> 
>>> ?
>>> 
>>> On 12.04.2012, at 06:50, Chen Cheng wrote:
>>> 
>>>> Hi Doug,
>>>> 
>>>> As we discussed before in mail list, "use dummy parameters" in our
>>>> current solution, this will make SnipMatch looks more like transitional
>>>> Eclips e content assist.
>>>> 
>>>> And in the future, user can specify *default dummy parameters* for every
>>>> code snip in *snip edit panel*, this is my plan.
>>>> 
>>>> I am not sure whether you think things should like this:
>>>> 1. Once user select a search result in search-result-display panel (Use
>>>> UP and DOWN button in keyboard, and then click ENTER)
>>>> 2. SnipMatch pop up a dialog to input parameters
>>>> 3. User click "finish" button in parameters input dialog
>>>> 4. SnipMatch insert code snip into current editor
>>>> 
>>>> This is how SnipMatch work before, if you insist this way, we can
>>>> implement it of course. But i personally think it deviate with Eclipse
>>>> users' habit.
>>>> 
>>>> What's your idea, Marcel?
>>>> 
>>>> 2012/4/12 Doug Wightman <douglasw@xxxxxxxxx>
>>>> ...it's totally fine that this isn't implemented yet, but I think it's
>>>> critical - your email makes it sound like you think this might not be
>>>> possible - please clarify.
>>>> 
>>>> 
>>>> On Wed, Apr 11, 2012 at 10:24 PM, Doug Wightman <douglasw@xxxxxxxxx>
>>>> wrote:
>>>>> Cheng,
>>>>> 
>>>>> Why can't we implement with specified parameters?
>>>>> 
>>>>> Doug
>>>>> 
>>>>> 
>>>>> On Wed, Apr 11, 2012 at 10:18 PM, Chen Cheng <chengchendoc@xxxxxxxxx>
>>>>> wrote:
>>>>>> Hi Doug,
>>>>>> 
>>>>>> User does not input parameters anymore, we just use dummy parameters
>>>>>> now, we
>>>>>> can improve this if we can find better solution in the future.
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 2012/4/12 Doug Wightman <douglasw@xxxxxxxxx>
>>>>>>> 
>>>>>>> Awesome! Will send you some feedback tomorrow (EST) - this looks
>>>>>>> really
>>>>>>> good.
>>>>>>> 
>>>>>>> On Wed, Apr 11, 2012 at 5:01 AM, Chen Cheng <chengchendoc@xxxxxxxxx>
>>>>>>> wrote:
>>>>>>>> Hi all,
>>>>>>>> 
>>>>>>>> SnipMatch's new search result display module is finished, i built
>>>>>>>> it
>>>>>>>> similar
>>>>>>>> with JDT's content assit, you can find the GUI in the attach
>>>>>>>> picture
>>>>>>>> file.
>>>>>>>> You guys can have a trial of it, then i can improve it according
>>>>>>>> to the
>>>>>>>> feedbacks. Or if there are any advises, you can just post it here.
>>>>>>>> 
>>>>>>>> Marcel,
>>>>>>>> You mentioned before, we should prepare a Snipmatch package before
>>>>>>>> Eclipse
>>>>>>>> Juno M2, so what will be focus on after search result display
>>>>>>>> module
>>>>>>>> before
>>>>>>>> M2 ?
>>>>>>>> 
>>>>>>>> --
>>>>>>>> Best Regards From Cheng Chen [chengchendoc@xxxxxxxxx]
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> --
>>>>>> 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
>>> 
>>> Thanks,
>>> Marcel
>>> 
>>> --
>>> Eclipse Code Recommenders:
>>>  w www.eclipse.org/recommenders
>>>  tw www.twitter.com/marcelbruch
>>>  g+ www.gplus.to/marcelbruch
>>> 
>>> _______________________________________________
>>> 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

Thanks,
Marcel

-- 
Eclipse Code Recommenders:
 w www.eclipse.org/recommenders
 tw www.twitter.com/marcelbruch
 g+ www.gplus.to/marcelbruch



Back to the top