@Override
	public Template[] getTemplates(String contextTypeId) {
		String ctx = getCtx();
		if (ctx.contains("@@{")) ctx = ctx.substring(ctx.indexOf("@@{") + 3);
		if (ctx.contains("@{")) ctx = ctx.substring(ctx.indexOf("@{") + 2);
		System.out.println("templates " + contextTypeId + " - " + ctx);
		List<Template> result = new ArrayList<Template>();
		IJavaProject javaProject = JavaCore.create(editor.getProject());
		if (ctx.isEmpty() || !ctx.contains(".")) {
			// Look for controllers
			result.addAll(getMatchingTemplates("controllers", ctx, contextTypeId));
			// Packages (that may include controllers)
			try {
				IPackageFragmentRoot[] roots = javaProject.getPackageFragmentRoots();
				for (IPackageFragmentRoot root: roots) {
					if (!root.isArchive() &&
							(ctx.isEmpty() || root.getElementName().startsWith(ctx)))
						result.add(getTemplate(contextTypeId, root));
				}
			} catch (JavaModelException e) {
				e.printStackTrace();
				return result.toArray(new Template[result.size()]);
			}
		} else {
			String typeName = ctx.substring(0, ctx.lastIndexOf('.'));
			String query = ctx.substring(ctx.lastIndexOf('.') + 1);
			result.addAll(getMatchingTemplates("controllers." + typeName, query, contextTypeId));
		}
		return result.toArray(new Template[result.size()]);
	}