MCPcopy Index your code
hub / github.com/benfry/processing4 / canEdit

Method canEdit

app/src/processing/app/Mode.java:731–737  ·  view source on GitHub ↗

True if this Mode can edit this file (usually meaning that its extension matches one that is supported by the Mode).

(final File file)

Source from the content-addressed store, hash-verified

729 * its extension matches one that is supported by the Mode).
730 */
731 public boolean canEdit(final File file) {
732 final int dot = file.getName().lastIndexOf('.');
733 if (dot < 0) {
734 return false;
735 }
736 return validExtension(file.getName().substring(dot + 1));
737 }
738
739
740 public boolean canEdit(Sketch sketch) {

Callers 1

changeModeMethod · 0.80

Calls 4

validExtensionMethod · 0.95
getCodeMethod · 0.80
getNameMethod · 0.45
getExtensionMethod · 0.45

Tested by

no test coverage detected