From b4ceef3c012e6ff18058f232df3f74008a95b04d Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Mon, 22 Jun 2015 20:46:34 -0400 Subject: [PATCH] fix build breaks --- app/src/processing/app/Mode.java | 4 ++-- app/src/processing/app/contrib/Contribution.java | 6 ------ app/src/processing/app/contrib/ContributionType.java | 6 ++++++ app/src/processing/app/contrib/ExamplesContribution.java | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/src/processing/app/Mode.java b/app/src/processing/app/Mode.java index c64fffebf..63ca332fd 100644 --- a/app/src/processing/app/Mode.java +++ b/app/src/processing/app/Mode.java @@ -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()); diff --git a/app/src/processing/app/contrib/Contribution.java b/app/src/processing/app/contrib/Contribution.java index 175ab1df5..065e3eb5a 100644 --- a/app/src/processing/app/contrib/Contribution.java +++ b/app/src/processing/app/contrib/Contribution.java @@ -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(); diff --git a/app/src/processing/app/contrib/ContributionType.java b/app/src/processing/app/contrib/ContributionType.java index bf5dddb60..ac2b86ad5 100644 --- a/app/src/processing/app/contrib/ContributionType.java +++ b/app/src/processing/app/contrib/ContributionType.java @@ -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()); } diff --git a/app/src/processing/app/contrib/ExamplesContribution.java b/app/src/processing/app/contrib/ExamplesContribution.java index af2de68c1..ebc3ff354 100644 --- a/app/src/processing/app/contrib/ExamplesContribution.java +++ b/app/src/processing/app/contrib/ExamplesContribution.java @@ -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));