From c2f1c53457f670164857dd71d950027662140c45 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Mon, 28 Jan 2013 21:21:04 +0000 Subject: [PATCH] SDK: - generalize BinaryModelFileLoader a bit, cleanup javadoc git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10227 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../core/assets/BinaryModelFileLoader.java | 29 ++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/sdk/jme3-core/src/com/jme3/gde/core/assets/BinaryModelFileLoader.java b/sdk/jme3-core/src/com/jme3/gde/core/assets/BinaryModelFileLoader.java index 09e7844d1..52da1ebbd 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/assets/BinaryModelFileLoader.java +++ b/sdk/jme3-core/src/com/jme3/gde/core/assets/BinaryModelFileLoader.java @@ -47,8 +47,8 @@ import org.openide.loaders.MultiFileLoader; public class BinaryModelFileLoader extends MultiFileLoader { public static final String PROP_EXTENSIONS = "extensions"; // NOI18N - public static final String INFO_EXTENSION = "j3odata"; public static final String FILE_EXTENSION = "j3o"; + public static final String INFO_EXTENSION = FILE_EXTENSION + "data"; public static final String MIME_TYPE = "application/jme3model"; private static final long serialVersionUID = -4579746482156153693L; @@ -72,10 +72,12 @@ public class BinaryModelFileLoader extends MultiFileLoader { getExtensions(); } - /** For a given file find the primary file. + /** + * For a given file find the primary file. + * * @param fo the file to find the primary file for - * @return the primary file for this file or null - * if this file is not recognized by this loader. + * @return the primary file for this file or null if this file is not + * recognized by this loader. */ protected FileObject findPrimaryFile(FileObject fo) { // never recognize folders. @@ -97,7 +99,9 @@ public class BinaryModelFileLoader extends MultiFileLoader { return null; } - /** Create the primary file entry. Primary files are the j3o files. + /** + * Create the primary file entry. Primary files are the j3o files. + * * @param primaryFile primary file recognized by this loader * @return primary entry for that file */ @@ -106,9 +110,10 @@ public class BinaryModelFileLoader extends MultiFileLoader { return new FileEntry(obj, primaryFile); } - /** Create a secondary file entry. - * Secondary files are properties files, which should also be retained (so, not a - * FileEntry.Numb object) + /** + * Create a secondary file entry. Secondary files are properties files, + * which should also be retained (so, not a FileEntry.Numb object) + * * @param secondaryFile secondary file to create entry for * @return the entry */ @@ -117,7 +122,9 @@ public class BinaryModelFileLoader extends MultiFileLoader { return new FileEntry(obj, secondaryFile); } - /** @return The list of extensions this loader recognizes. */ + /** + * @return The list of extensions this loader recognizes. + */ public ExtensionList getExtensions() { ExtensionList extensions = (ExtensionList) getProperty(PROP_EXTENSIONS); if (extensions == null) { @@ -130,7 +137,9 @@ public class BinaryModelFileLoader extends MultiFileLoader { return extensions; } - /** Sets the extension list for this data loader. + /** + * Sets the extension list for this data loader. + * * @param ext new list of extensions. */ public void setExtensions(ExtensionList ext) {