Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [recommenders-dev] SnipMatch progress

I think what we're looking for is already supported in Eclipse Templates, whatever it uses. At the time, I couldn't find any way to leverage just that power without using Eclipse Templates themselves. I need the ability to get local vars and fields, and their types, and generic types, and element types, and the like. It seems that Eclipse Templates supports this with their ${blah(blah)} syntax. I need that kind of power, but without necessarily having to use everything else that comes with Eclipse Templates.

On 25 October 2011 03:44, Marcel Bruch <bruch@xxxxxxxxxxxxxxxxxx> wrote:

On 25.10.2011, at 09:34, Zi Ye wrote:

Oh and regarding the intelligent completion context...
One of the advantages of the method I was using was that it got local variables, and class members, and anything really that fit the constraints of the dummy code.

Could you specify in little bit more detail what you need? I'm trying to figure out what you need to solve your completion context issue but I don't know what exactly you need yet.

local variables: available.
fields: available.
other members such as methods: not available. But easily to fetch.
name prefix matching: no. has to be implemented in completion context.


What else do you need?

Thus, a list of local variables isn't enough.

On 25 October 2011 03:31, Zi Ye <zi@xxxxxxx> wrote:
Done! Thank you.


On 25 October 2011 03:28, Marcel Bruch <bruch@xxxxxxxxxxxxxxxxxx> wrote:
could you please join the list? Thanks.

The last mail copied below:

On 25.10.2011, at 06:33, Zi Ye wrote:

There must be a way to just extract local variables from the current source file, right?


We have use an "extended" completion context:


which provides access to 

/**
     * Returns a set of all local variables declared in the method code
     * completion was triggered in.
     * <p>
     * Note, the objects returned by this method are compiler ast nodes. This
     * API is very likely to change!
     * </p>
     */
    @Experimental
    Set<LocalDeclaration> getLocalDeclarations();

    /**
     * Returns a set of all fields declared in the scope of this compilation
     * unit( or just type?) completion was triggered in.
     * <p>
     * Note, the objects returned by this method are compiler ast nodes. This
     * API is very likely to change!
     * </p>
     */
    @Experimental
    Set<FieldDeclaration> getFieldDeclarations();


Is this what you need?





On 25.10.2011, at 09:23, Zi Ye wrote:

No I didn't.

On 25 October 2011 02:34, Marcel Bruch <bruch@xxxxxxxxxxxxxxxxxx> wrote:
Did you receive this mail?


On 25.10.2011, at 06:33, Zi Ye wrote:

There must be a way to just extract local variables from the current source file, right?


We have use an "extended" completion context:


which provides access to 

/**
     * Returns a set of all local variables declared in the method code
     * completion was triggered in.
     * <p>


....


On 25.10.2011, at 08:31, Marcel Bruch wrote:

Hi Zi, are you on the mailing list?

On 25.10.2011, at 06:34, Zi Ye wrote:

Hi Marcel,

I have absolutely no experience in database programming, or networking beyond sending POST messages, unfortunately.

On 25 October 2011 00:33, Marcel Bruch <bruch@xxxxxxxxxxxxxxxxxx> wrote:
Zi,

I forgot to mention:

Regarding your local snippet cache:
I'm currently seeking a good way to store your code templates locally and synchronize them with a remote database. A search interface using Lucene is implemented quite quickly after that. Do you have any ideas on how to sync code templates between a server and a local database?

On 25.10.2011, at 06:27, Marcel Bruch wrote:

Hi Zi,

it looks like that I'll have the opportunity to get two students to work on SnipMatch.  I would like to let them work on the snippet editor (the dialog window). As far as I can see, you use the standard JFace template language for your snippets, right? My plans are, to let them develop a snippet editor based on Xtext with code completion support, syntax highlighting etc. pp.

In parallel, I'm trying to get one or two masters working on mining multi-object usage patterns (code snippets) from example code repositories today. These mined patterns than might serve as input to Snipmatch's template store.

Regarding your completion engine issue:

SnipMatch currently uses a very quick and hacky solution for extracting local variables from the user's code, using code completion. This has many limitations, and is potentially inefficient. A better solution would be to extract this information directly from the AST.

It might be that we already have a solution to this one in Code Recommenders but I'm not sure about this. Can you explain in little more detail which issues you have with the current solution? We may also be able to request JDT API changes for Eclipse 3.8 according to your needs.

On 25.10.2011, at 04:38, Zi Ye wrote:

Hi Marcel,

Should I just use Git to commit changes, or is there a specific way to go about this? I have very little clue what Maven is, even after reading up on it.

- Zi

On 23 October 2011 04:00, Marcel Bruch <bruch@xxxxxxxxxxxxxxxxxx> wrote:
Okay. I just wanted to be sure that you don't wait for anything I should have provided.

Just as a reminder: On Monday, I'm going to offer a few topics on SnipMatch to students. Let me know if there are any changes in the plan.

Best,
Marcel

On 23.10.2011, at 09:41, Zi Ye wrote:

Hi Marcel,

We are very sorry, but there are no changes because we are both very busy lately. We will get on it soon.

- Zi

On 23 October 2011 03:43, Marcel Bruch <bruch@xxxxxxxxxxxxxxxxxx> wrote:
Hi Doug,
Hi Zi,

I just had a look on repository and noticed that there are no changes yet. Are you waiting for anything I should provide and might have missed?


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

Thanks,
Marcel




Thanks,
Marcel



Thanks,
Marcel




Thanks,
Marcel





Thanks,
Marcel



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



Back to the top