Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

#65 #66

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

#65 #66

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>ApexDoc</groupId>
<artifactId>ApexDoc</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.1.8</version>
<name>ApexDoc</name>
<description>A documentation generator for Apex using JavaDoc style comment blocks</description>

Expand Down Expand Up @@ -30,6 +30,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<!-- DO NOT include log4j.properties file in your Jar -->
<excludes>
Expand Down
4 changes: 2 additions & 2 deletions src/org/salesforce/apexdoc/ApexDoc.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void run(IProgressMonitor monitor) throws InvocationTargetException, Inte
// Eclipse PlugIn invocation
public static void RunApexDoc(String[] args, IProgressMonitor monitor) {
String sourceDirectory = "";
String targetDirectory = "";
String targetDirectory = "ApexDocumentation";
String homefilepath = "";
String authorfilepath = "";
String hostedSourceURL = "";
Expand Down Expand Up @@ -138,7 +138,7 @@ private static void printHelp() {
System.out.println(" Invalid Arguments detected. The correct syntax is:\n");
System.out.println("apexdoc -s <source_directory> [-t <target_directory>] [-g <source_url>] [-h <homefile>] [-a <authorfile>] [-p <scope>]\n");
System.out.println("<source_directory> - The folder location which contains your apex .cls classes");
System.out.println("<target_directory> - Optional. Specifies your target folder where documentation will be generated.");
System.out.println("<target_directory> - Optional. Specifies your target folder where documentation will be generated. Defaults to ApexDocumentation.");
System.out.println("<source_url> - Optional. Specifies a URL where the source is hosted (so ApexDoc can provide links to your source).");
System.out.println("<homefile> - Optional. Specifies the html file that contains the contents for the home page\'s content area.");
System.out.println("<authorfile> - Optional. Specifies the text file that contains project information for the documentation header.");
Expand Down
29 changes: 14 additions & 15 deletions src/org/salesforce/apexdoc/Constants.java
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
package org.salesforce.apexdoc;

public class Constants {

public static final String HEADER_OPEN = "<html><head>" +
"<script type='text/javascript' src='jquery-1.11.1.js'></script>" +
"<script type='text/javascript' src='CollapsibleList.js'></script>" +
"<script type='text/javascript' src='ApexDoc.js'></script>" +
"<link rel='stylesheet' type='text/css' href='ApexDoc.css' /> " +
"<script type='text/javascript' src='CollapsibleList.js'></script>" +
"<script type='text/javascript' src='ApexDoc.js'></script>" +
"<link rel='stylesheet' type='text/css' href='ApexDoc.css' /> " +
"</head>" +
"<body>";
public static final String HEADER_CLOSE =

public static final String HEADER_CLOSE =
"</td>" +
"</tr>" +
"</table>" +
"</div>";
public static final String FOOTER = "</div></div></td></tr></table><hr/>" +
"<center style='font-size:.8em;'><a href='http://github.com/SalesforceFoundation/ApexDoc' target='_blank'>Powered By ApexDoc</a>" +

public static final String FOOTER = "</div></div></td></tr></table><hr/>" +
"<center style='font-size:.8em;'><a href='http://github.com/SalesforceFoundation/ApexDoc' target='_blank'>Powered By ApexDoc</a>" +
"</center></body></html>";

public static final String ROOT_DIRECTORY = "ApexDocumentation";
public static final String DEFAULT_HOME_CONTENTS = "<h1>Project Home</h2>";
public static final String PROJECT_DETAIL =
public static final String PROJECT_DETAIL =
"<div class='topsection'>" +
"<table>" +
"<tr><td>" +
"<img src='apex_doc_logo.png' style='border:1px solid #000;'/>" +
"</td>" +
"<td>" +
"<td>" +
"<h2 style='margin:0px;'>Project Demo</h2>" +
"Check out the gitHub project at:<br/>" +
"Check out the gitHub project at:<br/>" +
"<a href='http://github.com/SalesforceFoundation/ApexDoc'>http://github.com/SalesforceFoundation/ApexDoc</a><br/>";

public static String getHeader(String projectDetail) {
Expand All @@ -42,5 +41,5 @@ public static String getHeader(String projectDetail) {
}
return header;
}
}

}
7 changes: 0 additions & 7 deletions src/org/salesforce/apexdoc/FileManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ public FileManager(String path) {

private boolean createHTML(TreeMap<String, String> mapFNameToContent, IProgressMonitor monitor) {
try {
if (path.endsWith("/") || path.endsWith("\\")) {
path += Constants.ROOT_DIRECTORY; // + "/" + fileName + ".html";
} else {
path += "/" + Constants.ROOT_DIRECTORY; // + "/" + fileName + ".html";
}

(new File(path)).mkdirs();

for (String fileName : mapFNameToContent.keySet()) {
Expand Down Expand Up @@ -382,7 +376,6 @@ private String getPageLinks(TreeMap<String, ClassGroup> mapGroupNameToClassGroup
}

private void docopy(String source, String target) throws Exception {

InputStream is = this.getClass().getResourceAsStream(source);
// InputStreamReader isr = new InputStreamReader(is);
// BufferedReader reader = new BufferedReader(isr);
Expand Down