File tree Expand file tree Collapse file tree 2 files changed +12
-17
lines changed
src/main/java/org/scijava/ui/swing/script Expand file tree Collapse file tree 2 files changed +12
-17
lines changed Original file line number Diff line number Diff line change @@ -152,9 +152,12 @@ public boolean isBinaryFile(final String path) {
152
152
}
153
153
154
154
/**
155
- * Make a sensible effort to get the path of the source for a class.
155
+ * @deprecated Use {@link #getSourceURL(String)} instead.
156
+ * @throws ClassNotFoundException
156
157
*/
157
- public String getSourcePath (final String className )
158
+ @ Deprecated
159
+ public String getSourcePath (
160
+ @ SuppressWarnings ("unused" ) final String className )
158
161
throws ClassNotFoundException
159
162
{
160
163
// move updater's stuff into ij-core and re-use here
Original file line number Diff line number Diff line change @@ -1402,22 +1402,14 @@ else if (source == openMacroFunctions) try {
1402
1402
else if (source == extractSourceJar ) extractSourceJar ();
1403
1403
else if (source == openSourceForClass ) {
1404
1404
final String className = getSelectedClassNameOrAsk ();
1405
- if (className != null ) try {
1406
- final String path = new FileFunctions (this ).getSourcePath (className );
1407
- if (path != null ) open (new File (path ));
1408
- else {
1409
- final String url = new FileFunctions (this ).getSourceURL (className );
1410
- try {
1411
- platformService .open (new URL (url ));
1412
- }
1413
- catch (final Throwable e ) {
1414
- handleException (e );
1415
- }
1405
+ if (className != null ) {
1406
+ final String url = new FileFunctions (this ).getSourceURL (className );
1407
+ try {
1408
+ platformService .open (new URL (url ));
1409
+ }
1410
+ catch (final Throwable e ) {
1411
+ handleException (e );
1416
1412
}
1417
- }
1418
- catch (final ClassNotFoundException e ) {
1419
- log .debug (e );
1420
- error ("Could not open source for class " + className );
1421
1413
}
1422
1414
}
1423
1415
/* TODO
You can’t perform that action at this time.
0 commit comments