return of auto format, remove a debug msg, clarify library warning

This commit is contained in:
benfry
2011-03-09 15:16:07 +00:00
parent 6801c25b81
commit fbbc728190
4 changed files with 26 additions and 7 deletions
+8
View File
@@ -649,6 +649,14 @@ public abstract class Editor extends JFrame implements RunnerListener {
menu.addSeparator();
item = Base.newJMenuItem("Auto Format", 'T');
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
handleAutoFormat();
}
});
menu.add(item);
item = Base.newJMenuItem("Comment/Uncomment", '/');
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
+12 -5
View File
@@ -215,6 +215,8 @@ public class Library {
}
static protected HashMap<String, Object> packageWarningMap = new HashMap<String, Object>();
/**
* Add the packages provided by this library to the master list that maps
* imports to specific libraries.
@@ -226,12 +228,17 @@ public class Library {
// pw.println(pkg + "\t" + libraryFolder.getAbsolutePath());
Library library = importToLibraryTable.get(pkg);
if (library != null) {
System.err.println("The library found in " + getPath());
System.err.println("conflicts with " + library.getPath());
System.err.println("which already defines the package " + pkg);
System.err.println();
if (!packageWarningMap.containsKey(pkg)) {
packageWarningMap.put(pkg, null);
System.err.println("The library found in " + getPath());
System.err.println("conflicts with " + library.getPath());
System.err.println("which already defines the package " + pkg);
System.err.println("If you have a line in your sketch that reads");
System.err.println("import " + pkg + ".*;");
System.err.println("Then you'll need to first remove one of those libraries.");
System.err.println();
}
} else {
// PApplet.println("adding pkg " + pkg + " for " + name);
importToLibraryTable.put(pkg, this);
}
}
+2 -2
View File
@@ -667,8 +667,8 @@ public abstract class Mode {
if (targetFolder != null) {
// Nuke the old applet/application folder because it can cause trouble
if (Preferences.getBoolean("export.delete_target_folder")) {
System.out.println("temporarily skipping deletion of " + targetFolder);
// Base.removeDir(targetFolder);
// System.out.println("temporarily skipping deletion of " + targetFolder);
Base.removeDir(targetFolder);
// targetFolder.renameTo(dest);
}
// Create a fresh output folder (needed before preproc is run next)
+4
View File
@@ -4,10 +4,14 @@ X examples menu still showing in regular mode
X import library shows nothing on osx and android
X examples not showing up in the window
X build.xml problem knocking out the library examples
X auto format missing
X remove "temporarily skipping deletion of" message
X figure out how to suppress errors from find in build.xml
_ flickering issue
_ when changing sketchbook location, need to reload examples window
_ and libraries, etc.. maybe just require a restart?
regressions