mirror of
https://github.com/processing/processing4.git
synced 2026-02-23 15:25:51 +01:00
more 7u40 retina fixes, removed unused Tool code
This commit is contained in:
@@ -937,37 +937,37 @@ public abstract class Editor extends JFrame implements RunnerListener {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Attempt to init or run a Tool from the safety of a try/catch block that
|
||||
* will report errors to the user.
|
||||
* @param tool The Tool object to be inited or run
|
||||
* @param item null to call init(), or the existing JMenuItem for run()
|
||||
* @return
|
||||
*/
|
||||
protected boolean safeTool(Tool tool, JMenuItem item) {
|
||||
try {
|
||||
if (item == null) {
|
||||
tool.init(Editor.this);
|
||||
} else {
|
||||
tool.run();
|
||||
}
|
||||
return true;
|
||||
|
||||
} catch (NoSuchMethodError nsme) {
|
||||
System.out.println("tool is " + tool + " ");
|
||||
statusError("\"" + tool.getMenuTitle() + "\" " +
|
||||
"is not compatible with this version of Processing");
|
||||
nsme.printStackTrace();
|
||||
|
||||
} catch (Exception ex) {
|
||||
statusError("An error occurred inside \"" + tool.getMenuTitle() + "\"");
|
||||
ex.printStackTrace();
|
||||
}
|
||||
if (item != null) {
|
||||
item.setEnabled(false); // don't you try that again
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// /**
|
||||
// * Attempt to init or run a Tool from the safety of a try/catch block that
|
||||
// * will report errors to the user.
|
||||
// * @param tool The Tool object to be inited or run
|
||||
// * @param item null to call init(), or the existing JMenuItem for run()
|
||||
// * @return
|
||||
// */
|
||||
// protected boolean safeTool(Tool tool, JMenuItem item) {
|
||||
// try {
|
||||
// if (item == null) {
|
||||
// tool.init(Editor.this);
|
||||
// } else {
|
||||
// tool.run();
|
||||
// }
|
||||
// return true;
|
||||
//
|
||||
// } catch (NoSuchMethodError nsme) {
|
||||
// System.out.println("tool is " + tool + " ");
|
||||
// statusError("\"" + tool.getMenuTitle() + "\" " +
|
||||
// "is not compatible with this version of Processing");
|
||||
// nsme.printStackTrace();
|
||||
//
|
||||
// } catch (Exception ex) {
|
||||
// statusError("An error occurred inside \"" + tool.getMenuTitle() + "\"");
|
||||
// ex.printStackTrace();
|
||||
// }
|
||||
// if (item != null) {
|
||||
// item.setEnabled(false); // don't you try that again
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
|
||||
|
||||
void addToolItem(final Tool tool, HashMap<String, JMenuItem> toolItems) {
|
||||
@@ -982,7 +982,8 @@ public abstract class Editor extends JFrame implements RunnerListener {
|
||||
} catch (NoSuchMethodError nsme) {
|
||||
statusError("\"" + tool.getMenuTitle() + "\" is not" +
|
||||
"compatible with this version of Processing");
|
||||
nsme.printStackTrace();
|
||||
//nsme.printStackTrace();
|
||||
Base.log("Incompatible tool found during tool.run()", nsme);
|
||||
item.setEnabled(false);
|
||||
|
||||
} catch (Exception ex) {
|
||||
@@ -1015,7 +1016,8 @@ public abstract class Editor extends JFrame implements RunnerListener {
|
||||
} catch (NoSuchMethodError nsme) {
|
||||
System.err.println("\"" + tool.getMenuTitle() + "\" is not " +
|
||||
"compatible with this version of Processing");
|
||||
nsme.printStackTrace();
|
||||
System.err.println("This method no longer exists: " + nsme.getMessage());
|
||||
Base.log("Incompatible Tool found during tool.init()", nsme);
|
||||
|
||||
} catch (Exception ex) {
|
||||
System.err.println("An error occurred inside \"" + tool.getMenuTitle() + "\"");
|
||||
|
||||
@@ -201,8 +201,8 @@ public class PdeTextAreaDefaults extends TextAreaDefaults {
|
||||
int fontSize = Preferences.getInteger("editor.font.size");
|
||||
plainFont = new Font(fontFamily, Font.PLAIN, fontSize);
|
||||
boldFont = new Font(fontFamily, Font.BOLD, fontSize);
|
||||
System.out.println("font is " + plainFont.getFamily() + " / " + plainFont.getName() + " / " + plainFont.getFontName() + " / " + plainFont.getPSName());
|
||||
// antialias = Preferences.getBoolean("editor.antialias");
|
||||
// System.out.println("font is " + plainFont.getFamily() + " / " + plainFont.getName() + " / " + plainFont.getFontName() + " / " + plainFont.getPSName());
|
||||
antialias = Preferences.getBoolean("editor.antialias");
|
||||
|
||||
styles = new SyntaxStyle[Token.ID_COUNT];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user