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

Method updateTitle

app/src/processing/app/ui/Editor.java:2105–2118  ·  view source on GitHub ↗

Set the title of the PDE window based on the current sketch, i.e. something like "sketch_070752a - Processing 0126"

()

Source from the content-addressed store, hash-verified

2103 * something like "sketch_070752a - Processing 0126"
2104 */
2105 public void updateTitle() {
2106 setTitle(sketch.getName() + " | Processing " + Base.getVersionName());
2107
2108 if (!sketch.isUntitled()) {
2109 // Set current file for macOS so that cmd-click in title bar works.
2110 // For 4.0 beta 6 changing this to the sketch folder, rather than the
2111 // .pde for the main tab. (Otherwise, we should have it update when
2112 // the tab changes, which seems like overkill for how this is used.)
2113 getRootPane().putClientProperty("Window.documentFile", sketch.getFolder());
2114 } else {
2115 // per other applications, don't set this until the file has been saved
2116 getRootPane().putClientProperty("Window.documentFile", null);
2117 }
2118 }
2119
2120
2121 /**

Callers 3

handleOpenInternalMethod · 0.95
updateInternalMethod · 0.80
setUntitledMethod · 0.80

Calls 5

getVersionNameMethod · 0.95
isUntitledMethod · 0.80
setTitleMethod · 0.65
getNameMethod · 0.45
getFolderMethod · 0.45

Tested by

no test coverage detected