mirror of
https://github.com/processing/processing4.git
synced 2026-02-03 21:59:20 +01:00
fix build breaks
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user