Пример #1
0
 public List /*<URL>*/ getJavadocs() {
   String path = ip.getProperty(PROP_JAVADOCS);
   if (path == null) {
     ArrayList list = new ArrayList();
     try {
       // tomcat docs
       File jspApiDoc = new File(homeDir, "webapps/tomcat-docs/jspapi"); // NOI18N
       File servletApiDoc = new File(homeDir, "webapps/tomcat-docs/servletapi"); // NOI18N
       if (jspApiDoc.exists() && servletApiDoc.exists()) {
         list.add(Util.fileToUrl(jspApiDoc));
         list.add(Util.fileToUrl(servletApiDoc));
       } else {
         File j2eeDoc =
             InstalledFileLocator.getDefault()
                 .locate("docs/javaee6-doc-api.zip", null, false); // NOI18N
         if (j2eeDoc != null) {
           list.add(Util.fileToUrl(j2eeDoc));
         }
       }
       // jwsdp docs
       File docs = new File(homeDir, "docs/api"); // NOI18N
       if (docs.exists()) {
         list.add(Util.fileToUrl(docs));
       }
     } catch (MalformedURLException e) {
       Exceptions.printStackTrace(e);
     }
     return list;
   }
   return CustomizerSupport.tokenizePath(path);
 }
Пример #2
0
 public List /*<URL>*/ getSources() {
   String path = ip.getProperty(PROP_SOURCES);
   if (path == null) {
     return new ArrayList();
   }
   return CustomizerSupport.tokenizePath(path);
 }
Пример #3
0
 public void setJavadocs(List /*<URL>*/ path) {
   ip.setProperty(PROP_JAVADOCS, CustomizerSupport.buildPath(path));
   tm.getTomcatPlatform().notifyLibrariesChanged();
 }
Пример #4
0
 public void setSources(List /*<URL>*/ path) {
   ip.setProperty(PROP_SOURCES, CustomizerSupport.buildPath(path));
   tm.getTomcatPlatform().notifyLibrariesChanged();
 }