Package com.munian.ivy.module.util

Source Code of com.munian.ivy.module.util.ProjectUtility

package com.munian.ivy.module.util;

import java.lang.reflect.Method;
import org.netbeans.api.project.Project;
import org.netbeans.spi.project.support.ant.AntProjectHelper;
import org.openide.util.Exceptions;

/**
*
* @author raymond
*/
public class ProjectUtility {
    public static final String J2SE_PROJECT = "org-netbeans-modules-java-j2seproject";
    public static final String WEB_PROJECT = "org-netbeans-modules-web-project";
   
    public static final String ACTIONS_PATH_SUBMENUS_ROOT = "IvySubMenu/";
   
    public static AntProjectHelper getAntProjectHelper(Project project) {
        try {
            Method getAntProjectHelperMethod = project.getClass().getMethod(
                    "getAntProjectHelper"); //NOI18N
            if (getAntProjectHelperMethod != null) {
                AntProjectHelper helper = (AntProjectHelper)
                        getAntProjectHelperMethod.invoke(project);

                return helper;
            }
        } catch (NoSuchMethodException nme) {
            Exceptions.printStackTrace(nme);
        } catch (Exception ex) {
            Exceptions.printStackTrace(ex);
        }

        return null;
    }
}
TOP

Related Classes of com.munian.ivy.module.util.ProjectUtility

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.