fix build breaks

This commit is contained in:
Ben Fry
2015-06-22 20:46:34 -04:00
parent 2161146c75
commit b4ceef3c01
4 changed files with 10 additions and 10 deletions

View File

@@ -696,7 +696,7 @@ public abstract class Mode {
} catch (IOException e) {
e.printStackTrace();
}
DefaultMutableTreeNode contributedExamplesNode =
buildContributedExamplesTrees();
if(contributedExamplesNode.getChildCount() > 0){
@@ -718,7 +718,7 @@ public abstract class Mode {
subfolders = new File[0]; //empty array
}
for (File sub : subfolders) {
if (!ExamplesContribution.isExamplesCompatible(base, sub))
if (!ExamplesContribution.isCompatible(base, sub))
continue;
DefaultMutableTreeNode subNode =
new DefaultMutableTreeNode(sub.getName());

View File

@@ -189,12 +189,6 @@ abstract public class Contribution {
}
/** Get the name of the properties file for this type of contribution. */
public String getPropertiesName() {
return getTypeName() + ".properties";
}
abstract public boolean isInstalled();

View File

@@ -77,6 +77,12 @@ public enum ContributionType {
// }
/** Get the name of the properties file for this type of contribution. */
public String getPropertiesName() {
return toString() + ".properties";
}
public File createTempFolder() throws IOException {
return Base.createTempFolder(toString(), "tmp", getSketchbookFolder());
}

View File

@@ -49,10 +49,10 @@ public class ExamplesContribution extends LocalContribution {
* @return true if the example is compatible with the mode of the currently
* active editor
*/
public boolean isCompatible(Base base, File exampleFolder) {
static public boolean isCompatible(Base base, File exampleFolder) {
String currentIdentifier = base.getActiveEditor().getMode().getIdentifier();
File propertiesFile =
new File(exampleFolder, getPropertiesName());
new File(exampleFolder, EXAMPLES.getPropertiesName());
if (propertiesFile.exists()) {
StringList compatibleList =
parseModeList(Base.readSettings(propertiesFile));