Skip to content

Commit

Permalink
Fix src paths in Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
veriktig committed Jul 4, 2024
1 parent b30d3fc commit e81ca98
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public boolean accept(File dir, String name) {
localeList.add(new ErrorByLocale(prefix, language_locale, errorList));

// Use bundle and getPackage to create file path
File fd2 = new File(Main.workPath + "/" + bundle + "/src/" + pkg.getPackage().replace(".", "/") + "/" + java_filename);
File fd2 = new File(Main.workPath + "/" + bundle + "/src/main/java/" + pkg.getPackage().replace(".", "/") + "/" + java_filename);
ErrorClassFileFactory.make(fd2, pkg.getPackage(), java_class, summaries);
Set<String> commands = new HashSet<String>();
for (Summary summary : summaries) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static void make(List<HelpByBundle> pkgList) throws FactoryException {
List<Help> helpList = helpPkg.getHelp();
for (Help help : helpList) {
String name = camelCase(help.getName());
String filename = new String(Main.workPath + "/" + bundle + "/src/" + pkg + "/" + name + "Cmd.java");
String filename = new String(Main.workPath + "/" + bundle + "/src/main/java/" + pkg + "/" + name + "Cmd.java");
File fd = new File(filename);
if (fd.exists()) {
updateFile(fd, help);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,10 @@ public boolean accept(File dir, String name) {
summaries.add(new Summary(hh.getName(), hh.getHelp()));
}
// Create List of Help grouped by language_locale
if (!bundle.contains("Test")) {
localeList.add(new HelpByLocale(language_locale, helpList));
}
localeList.add(new HelpByLocale(language_locale, helpList));

// Use bundle and getPackage to create file path
File fd2 = new File(Main.workPath + "/" + bundle + "/src/" + pkg.getPackage().replace(".", "/") + "/" + java_filename);
File fd2 = new File(Main.workPath + "/" + bundle + "/src/main/java/" + pkg.getPackage().replace(".", "/") + "/" + java_filename);
HelpClassFileFactory.make(fd2, pkg.getPackage(), java_class, summaries);
Set<String> commands = new HashSet<String>();
for (Summary summary : summaries) {
Expand Down Expand Up @@ -189,7 +187,7 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IO
}
@Override
public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
if (dir.toString().contains("/src/") && dir.toString().contains("/cmd") && !dir.toString().contains("tcl")) {
if (dir.toString().contains("/src/main/java/") && dir.toString().contains("/cmd") && !dir.toString().contains("tcl")) {
look_here = true;
} else {
look_here = false;
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ run:

clobber:
cd demo; rm -rf .scandium_history felix-cache *.jar; cd bundle; rm -rf *.jar;
cd Documentation; make clobber
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
public class Help_en_US extends ListResourceBundle {
protected Object[][] getContents() {
return new Object[][] {
{"help", "Displays a concise description of a command."},
{"printvar", "Displays the value of variables."},
{"help", "Displays a concise description of a command."},
{"print_versions", "Displays the installed bundles and version information."}
};
}
Expand Down

0 comments on commit e81ca98

Please sign in to comment.