Package org.eclipse.wb.internal.core.utils

Examples of org.eclipse.wb.internal.core.utils.Version


  /**
   * @return the version of build file, not exactly same as version of GWT.
   */
  private static Version getBuildVersion(IProject project) {
    Version version = Utils.getVersion(project);
    if (version.isHigherOrSame(Utils.GWT_2_0)) {
      version = Utils.GWT_2_0;
    }
    return version;
  }
View Full Code Here


public abstract class WizardUtils {
  /**
   * @return the path for versioned templates, with trailing "/".
   */
  public static String getTemplatePath(IProject project) {
    Version version = getTemplateVersion(project);
    return "templates/" + version.getStringMajorMinor() + "/";
  }
View Full Code Here

  /**
   * @return the version of templates, not exactly same as version of GWT.
   */
  private static Version getTemplateVersion(IProject project) {
    Version version = Utils.getVersion(project);
    if (version.isHigherOrSame(Utils.GWT_2_1)) {
      version = Utils.GWT_2_1;
    }
    return version;
  }
View Full Code Here

  private static void check_getDefaultVersion(String gwtLocation, Version expected)
      throws Exception {
    String oldLocation = Activator.getGWTLocation();
    try {
      Activator.setGWTLocation(gwtLocation);
      Version actual = Utils.getDefaultVersion();
      assertEquals(expected, actual);
    } finally {
      Activator.setGWTLocation(oldLocation);
    }
  }
View Full Code Here

      do_projectDispose();
      do_projectCreate();
      GTestUtils.configure(gwtLocation, m_testProject);
      // use IJavaProject
      {
        Version actual = Utils.getVersion(m_javaProject);
        assertEquals(expected, actual);
      }
      // use IProject
      {
        Version actual = Utils.getVersion(m_project);
        assertEquals(expected, actual);
      }
    } finally {
      do_projectDispose();
    }
View Full Code Here

  private static void warmUpHostedMode() {
    try {
      IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
      for (IProject project : projects) {
        if (Utils.isGpeGwtProject(project)) {
          Version version = Utils.getVersion(project);
          if (version.isHigherOrSame(Utils.GWT_2_2)) {
            IJavaProject javaProject = JavaCore.create(project);
            List<ModuleDescription> modules = Utils.getModules(javaProject);
            if (!modules.isEmpty()) {
              ModuleDescription module = modules.get(0);
              warmUpHostedMode(module);
View Full Code Here

  /**
   * @return <code>true</code> if given {@link IJavaProject} support MVP framework.
   */
  public static boolean supportMvp(IJavaProject javaProject) {
    Version version = getVersion(javaProject);
    return supportMvp(version);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.wb.internal.core.utils.Version

Copyright © 2018 www.massapicom. 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.