Package org.eclipse.jst.j2ee.internal.deployables

Examples of org.eclipse.jst.j2ee.internal.deployables.J2EEFlexProjDeployable


   * @return the path string of the web application root folder.
   *    If any errors occurs, returns blank string.
   */
  public static String getWebAppRootFolder(IProject project){
    try {
      J2EEFlexProjDeployable deployable = new J2EEFlexProjDeployable(project);
      IContainer[] containers = deployable.getResourceFolders();
      if(containers.length > 0){
        return containers[0].getProjectRelativePath().toString();
      }
    } catch(Exception ex){
    }
View Full Code Here


   * @return the path string of the web application root folder.
   *    If any errors occurs, returns blank string.
   */
  public static String getWebAppRootFolder(IProject project){
    try {
      J2EEFlexProjDeployable deployable = new J2EEFlexProjDeployable(project);
      IContainer[] containers = deployable.getResourceFolders();
      if(containers.length > 0){
        return containers[0].getProjectRelativePath().toString();
      }
    } catch(Exception ex){
    }
View Full Code Here

  }

  public static String getContextRoot(IModule module) throws Exception{
    String contextRoot = null;

    J2EEFlexProjDeployable j2eeModule = (J2EEFlexProjDeployable) module.loadAdapter(J2EEFlexProjDeployable.class, null);
    contextRoot = ((IWebModule) j2eeModule).getContextRoot();

    if (contextRoot == null)
      contextRoot = getId(module);
View Full Code Here

  public static String getId(IModule module) {
    // use the module ID
    String moduleId = module.getId();

    J2EEFlexProjDeployable j2eeModule = (J2EEFlexProjDeployable) module.loadAdapter(J2EEFlexProjDeployable.class, null);
    if (j2eeModule != null) {
      // j2eeFlex
      ArtifactEdit edit = null;
      try {
        edit = ArtifactEdit.getArtifactEditForRead(j2eeModule.getProject());
        //TODO JAXB Refactoring - Can below two lines be removed without harm?
        //XMIResource res = (XMIResource) edit.getContentModelRoot().eResource();
        //moduleId = res.getID(edit.getContentModelRoot());
      } finally {
        if (edit != null)
          edit.dispose();
      }
    }

    if (moduleId != null && moduleId.length() > 0)
      return moduleId;

    // ...but if there is no defined module ID, pick the best alternative

    IPath moduleLocation = new Path(j2eeModule.getURI(module));
    if (moduleLocation != null) {
      moduleId = moduleLocation.removeFileExtension().lastSegment();
    }

    if (j2eeModule instanceof IWebModule) {
View Full Code Here

        // delete the dummy jar if module no longer associated with server
        if (!ServerUtil.containsModule(server, module, monitor) && dummyJarFile.exists()) {
          deleteList.add(dummyJarFile);
        } else {
          HashSet entries = new HashSet();
          J2EEFlexProjDeployable j2eeModule = (J2EEFlexProjDeployable) module.loadAdapter(J2EEFlexProjDeployable.class, null);
          if(GeronimoUtils.isEarModule(module)) {
            IModule[] childModules = j2eeModule.getChildModules();
            for(int j = 0; j < modules.length; j++) {
              entries.addAll(processModule(childModules[i]));
            }
          } else {
            entries.addAll(processModule(module));
View Full Code Here

   * @return the path string of the web application root folder.
   *    If any errors occurs, returns blank string.
   */
  public static String getWebAppRootFolder(IProject project){
    try {
      J2EEFlexProjDeployable deployable = new J2EEFlexProjDeployable(project);
      IContainer[] containers = deployable.getResourceFolders();
      if(containers.length > 0){
        return containers[0].getProjectRelativePath().toString();
      }
    } catch(Exception ex){
    }
View Full Code Here

TOP

Related Classes of org.eclipse.jst.j2ee.internal.deployables.J2EEFlexProjDeployable

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.