| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2210,7 +2210,6 @@ public boolean isInCurrentTab(LineID line) { | |||
| 2210 | 2210 | */ | |
| 2211 | 2211 | @Override | |
| 2212 | 2212 | public void setCode(SketchCode code) { | |
| 2213 | - | ||
| 2214 | 2213 | Document oldDoc = code.getDocument(); | |
| 2215 | 2214 | ||
| 2216 | 2215 | //System.out.println("tab switch: " + code.getFileName()); | |
@@ -2254,14 +2253,13 @@ public void setCode(SketchCode code) { | |||
| 2254 | 2253 | ||
| 2255 | 2254 | /** | |
| 2256 | 2255 | * Get a tab by its file name. | |
| 2257 | - * @param fileName the filename to search for. | ||
| 2258 | - * @return the {@link SketchCode} object representing the tab, or null if | ||
| 2259 | - * not found | ||
| 2256 | + * @param filename the filename to search for. | ||
| 2257 | + * @return the {@link SketchCode} object for the tab, or null if not found | ||
| 2260 | 2258 | */ | |
| 2261 | - public SketchCode getTab(String fileName) { | ||
| 2259 | + public SketchCode getTab(String filename) { | ||
| 2262 | 2260 | Sketch s = getSketch(); | |
| 2263 | 2261 | for (SketchCode c : s.getCode()) { | |
| 2264 | - if (c.getFileName().equals(fileName)) { | ||
| 2262 | + if (c.getFileName().equals(filename)) { | ||
| 2265 | 2263 | return c; | |
| 2266 | 2264 | } | |
| 2267 | 2265 | } | |
@@ -2297,72 +2295,6 @@ public void statusHalted() { | |||
| 2297 | 2295 | } | |
| 2298 | 2296 | ||
| 2299 | 2297 | ||
| 2300 | - public void statusMessage(String message, int type) { | ||
| 2301 | - if (EventQueue.isDispatchThread()) { | ||
| 2302 | - status.message(message, type); | ||
| 2303 | - } else { | ||
| 2304 | - EventQueue.invokeLater(() -> statusMessage(message, type)); | ||
| 2305 | - } | ||
| 2306 | - } | ||
| 2307 | - | ||
| 2308 | - | ||
| 2309 | - /* | ||
| 2310 | - static final int STATUS_EMPTY = 100; | ||
| 2311 | - static final int STATUS_COMPILER_ERR = 200; | ||
| 2312 | - static final int STATUS_WARNING = 300; | ||
| 2313 | - static final int STATUS_INFO = 400; | ||
| 2314 | - static final int STATUS_ERR = 500; | ||
| 2315 | - | ||
| 2316 | - int statusMessageType = STATUS_EMPTY; | ||
| 2317 | - String statusMessage; | ||
| 2318 | - | ||
| 2319 | - public void statusMessage(final String what, int type){ | ||
| 2320 | - // Don't re-display the old message again | ||
| 2321 | - if (type != STATUS_EMPTY) { | ||
| 2322 | - if (what.equals(statusMessage) && type == statusMessageType) { | ||
| 2323 | - return; | ||
| 2324 | - } | ||
| 2325 | - } | ||
| 2326 | - statusMessage = new String(what); | ||
| 2327 | - statusMessageType = type; | ||
| 2328 | - switch (type) { | ||
| 2329 | - case STATUS_COMPILER_ERR: | ||
| 2330 | - case STATUS_ERR: | ||
| 2331 | - super.statusError(what); | ||
| 2332 | - break; | ||
| 2333 | - case STATUS_INFO: | ||
| 2334 | - case STATUS_WARNING: | ||
| 2335 | - statusNotice(what); | ||
| 2336 | - break; | ||
| 2337 | - } | ||
| 2338 | - // Don't need to clear compiler error messages | ||
| 2339 | - if (type == STATUS_COMPILER_ERR) return; | ||
| 2340 | - | ||
| 2341 | - // Clear the message after a delay | ||
| 2342 | - SwingWorker<Object, Object> s = new SwingWorker<Object, Object>() { | ||
| 2343 | - @Override | ||
| 2344 | - protected Object doInBackground() throws Exception { | ||
| 2345 | - try { | ||
| 2346 | - Thread.sleep(2 * 1000); | ||
| 2347 | - } catch (InterruptedException e) { | ||
| 2348 | - e.printStackTrace(); | ||
| 2349 | - } | ||
| 2350 | - statusEmpty(); | ||
| 2351 | - return null; | ||
| 2352 | - } | ||
| 2353 | - }; | ||
| 2354 | - s.execute(); | ||
| 2355 | - } | ||
| 2356 | - | ||
| 2357 | - | ||
| 2358 | - public void statusEmpty(){ | ||
| 2359 | - statusMessage = null; | ||
| 2360 | - statusMessageType = STATUS_EMPTY; | ||
| 2361 | - super.statusEmpty(); | ||
| 2362 | - } | ||
| 2363 | - */ | ||
| 2364 | - | ||
| 2365 | - | ||
| 2366 | 2298 | /** | |
| 2367 | 2299 | * Updates the error table in the Error Window. | |
| 2368 | 2300 | * Overridden to handle the fugly import suggestions text. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments