Skip to main content
summaryrefslogtreecommitdiffstats
blob: 34b17b0892b050398f1ace0e9fa37b3afdfd5dc5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
 * <copyright>
 *
 * Copyright (c) 2005-2006 Sven Efftinge (http://www.efftinge.de) and others.
 * All rights reserved.   This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Sven Efftinge (http://www.efftinge.de) - Initial API and implementation
 *
 * </copyright>
 */
package org.eclipse.xtend.ui.core.internal.builder;

import java.util.List;

import org.eclipse.internal.xtend.expression.ast.DeclaredParameter;
import org.eclipse.internal.xtend.expression.ast.Identifier;
import org.eclipse.internal.xtend.xtend.ast.JavaExtensionStatement;
import org.eclipse.internal.xtend.xtend.parser.ExtensionFactory;
import org.eclipse.jdt.core.IJavaProject;

public class PluginExtensionFactory extends ExtensionFactory {

    private IJavaProject jp;

    public PluginExtensionFactory(final IJavaProject jp, final String name) {
        super(name);
        this.jp = jp;
    }

    @Override
    public JavaExtensionStatement createJavaExtension(Identifier name, Identifier type, List<DeclaredParameter> params, 
    		Identifier javaType, Identifier javaMethod, List<Identifier> javaParamTypes, Identifier cached, Identifier priv) {
        return (JavaExtensionStatement) handle(new PluginJavaExtensionStatement(jp,
                name, nonNull(params), type, javaType, javaMethod, nonNull(javaParamTypes), cached != null,
                priv != null));
    }
}

Back to the top