Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Code Recommenders » Test report((template context - Bug 435632))
Test report [message #1416576] Thu, 04 September 2014 19:48 Go to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
I am trying the new template context feature introduced with Bug 435632 using the version installed with this update site:
http://download.eclipse.org/recommenders/updates/simrel/luna/2014-09-03_09-47-57/

It uses the new format-4 branch (see Updating Snippet Repositories)

I have one template for each type (see attached file: Snippets.zip)
* AAA File
* AAA Javadoc
* AAA Java
* AAA Java Statement
* AAA Type members

Here my test class:
 package tmp;

//Cursor position A

/**
 * //Cursor position B
 * @author jbr
 */
//Cursor position C
public class SomeClass {

    //Cursor position D
    
    /**
     * //Cursor position E
     * @param args
     */
    public static void main(String[] args) {
        //Cursor position F
    }

    //Cursor position G
}

//Cursor position H

Everything is working fine.

Now when I do similar test in a plugin, it is not working at all:
package plugintmp;

//Cursor position I

import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;

/**
 * //Cursor position J
 * 
 * The activator class controls the plug-in life cycle
 * 
 */
//Cursor position K
public class Activator extends AbstractUIPlugin {
    //Cursor position L
    
    // The plug-in ID
    public static final String PLUGIN_ID = "tmp1"; //$NON-NLS-1$

    // The shared instance
    private static Activator plugin;
    
    /**
     * The constructor
     */
    public Activator() {
        //Cursor position G
        
    }

    /*
     * (non-Javadoc)
     * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
     */
    public void start(BundleContext context) throws Exception {
        super.start(context);
        plugin = this;
    }

    /*
     * (non-Javadoc)
     * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
     */
    public void stop(BundleContext context) throws Exception {
        plugin = null;
        super.stop(context);
    }

    /**
     * Returns the shared instance
     *
     * @return the shared instance
     */
    public static Activator getDefault() {
        return plugin;
    }
    //Cursor position M
    
}
//Cursor position N


See the screenshots:
index.php/fa/19056/0/

index.php/fa/19057/0/
Re: Test report [message #1417330 is a reply to message #1416576] Fri, 05 September 2014 07:42 Go to previous message
Johannes Dorn is currently offline Johannes DornFriend
Messages: 61
Registered: June 2013
Member
Thanks for that detailed bug report.

I've opened a new bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=443380 for this, since the cause is unrelated to the location context. That is only the first time the bug has become noticeable.
Previous Topic:Support for old *milestone* model repositories discontinued
Next Topic:Location awareness coming to Snipmatch
Goto Forum:
  


Current Time: Thu Apr 25 00:43:09 GMT 2024

Powered by FUDForum. Page generated in 0.02623 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top