Package org.eclipse.jst.javaee.application

Examples of org.eclipse.jst.javaee.application.Application


    //if the ear project Java EE level was < 5.0, the following would throw a ClassCastException 
    final IEARModelProvider earModel = (IEARModelProvider)ModelProviderManager.getModelProvider(project);
    if (earModel == null) {
      return;
    }
    final Application app = (Application)earModel.getModelObject();
    if (app != null) {
      if (newLibDir == null || "/".equals(newLibDir)) { //$NON-NLS-1$
        newLibDir = "lib"; //$NON-NLS-1$
      }
      //MECLIPSEWTP-167 : lib directory mustn't start with a slash
      else if (newLibDir.startsWith("/")) { //$NON-NLS-1$
        newLibDir = newLibDir.substring(1);
      }
      String oldLibDir = app.getLibraryDirectory();
      if (newLibDir.equals(oldLibDir)) return;
      final String libDir = newLibDir;
      earModel.modify(new Runnable() {
        @Override
    public void run() {    
        app.setLibraryDirectory(libDir);
      }}, null);
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jst.javaee.application.Application

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.