Skip to content

Commit

Permalink
change menu items for Add Library/Mode/Tool to Manage
Browse files Browse the repository at this point in the history
  • Loading branch information
benfry committed Apr 23, 2022
1 parent 9e3cea9 commit 4091639
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 38 deletions.
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This repository contains the source code for the <a href="https://processing.org
If you're interested in using Processing, get started at the <a href="https://processing.org/download">download</a> page, or read more about the project at the <a href="https://processing.org/">home</a> page. There are also several <a href="https://processing.org/tutorials">tutorials</a> to complement the hundreds of examples that are included with the software itself.


## Processing 4.0
## Processing 4.0

Processing 4 makes important updates to the code to prepare the platform for its future. Most significantly, this includes the move to Java 17 and support for new Java language features. The changes should be transparent to most users, but because of the massive shift behind the scenes, this is 4.0.

Expand All @@ -25,7 +25,22 @@ This software is currently in beta. We don't have a schedule for the final 4.0 r

As with all releases, we'll do [everything possible](https://twitter.com/ben_fry/status/1426282574683516928) to avoid breaking API. However, there will still be tweaks that have to be made. We'll try to keep them minor. Our goal is stability, and keeping everyone's code running.

The full list of changes can be seen in [the release notes for each version](https://github.com/processing/processing4/blob/master/build/shared/changes.md), this is only a list of things that may break existing projects (whether sketches, Libraries, Modes, etc.)
The full list of changes can be seen in [the release notes for each version](https://github.com/processing/processing4/blob/master/build/shared/changes.md). The list below only covers internal changes that may have an impact on Libraries, Modes, or Tools.


### Beta 8

* Renamed the Add Mode, Add Library, and Add Tool menu items to Manage Mmodes, Manage Libraries, and Manage Tools. This will require translation updates for the new text:
* `toolbar.add_mode = Add Mode... ``toolbar.manage_modes = Manage Modes…`
* `menu.library.add_library = Add Library...``menu.library.manage_libraries = Manage Libraries…`
* `menu.tools.add_tool = Add Tool...``menu.tools.manage_tools = Manage Tools…`


### Beta 6

* Major rewrite of `handleOpen()`, now possible to use something besides the folder name for the main sketch file (see `changes.md` for details).

* Now using Java 17.0.2+8 from [Adoptium](https://adoptium.net/).


### Beta 3
Expand Down
7 changes: 4 additions & 3 deletions app/src/processing/app/Base.java
Original file line number Diff line number Diff line change
Expand Up @@ -851,9 +851,10 @@ public void populateToolsMenu(JMenu toolsMenu) {
toolsMenu.addSeparator();
}

JMenuItem item = new JMenuItem(Language.text("menu.tools.add_tool"));
item.addActionListener(e -> ContributionManager.openTools());
toolsMenu.add(item);
JMenuItem manageTools =
new JMenuItem(Language.text("menu.tools.manage_tools"));
manageTools.addActionListener(e -> ContributionManager.openTools());
toolsMenu.add(manageTools);
}


Expand Down
6 changes: 3 additions & 3 deletions app/src/processing/app/Mode.java
Original file line number Diff line number Diff line change
Expand Up @@ -497,9 +497,9 @@ public void rebuildImportMenu() { //JMenu importMenu) {
importMenu.removeAll();
}

JMenuItem addLib = new JMenuItem(Language.text("menu.library.add_library"));
addLib.addActionListener(e -> ContributionManager.openLibraries());
importMenu.add(addLib);
JMenuItem manageLibs = new JMenuItem(Language.text("menu.library.manage_libraries"));
manageLibs.addActionListener(e -> ContributionManager.openLibraries());
importMenu.add(manageLibs);
importMenu.addSeparator();

rebuildLibraryList();
Expand Down
6 changes: 3 additions & 3 deletions app/src/processing/app/ui/Editor.java
Original file line number Diff line number Diff line change
Expand Up @@ -480,9 +480,9 @@ public void rebuildModePopup() {
}

modePopup.addSeparator();
JMenuItem addLib = new JMenuItem(Language.text("toolbar.add_mode"));
addLib.addActionListener(e -> ContributionManager.openModes());
modePopup.add(addLib);
JMenuItem manageModes = new JMenuItem(Language.text("toolbar.manage_modes"));
manageModes.addActionListener(e -> ContributionManager.openModes());
modePopup.add(manageModes);

Toolkit.setMenuMnemsInside(modePopup);
}
Expand Down
9 changes: 6 additions & 3 deletions build/shared/lib/languages/PDE.properties
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ menu.sketch.tweak = Tweak
menu.sketch.stop = Stop
# ---
menu.library = Import Library...
menu.library.add_library = Add Library...
# menu.library.add_library = Add Library...
menu.library.manage_libraries = Manage Libraries…
menu.library.contributed = Contributed
menu.library.no_core_libraries = mode has no core libraries
# ---
Expand Down Expand Up @@ -122,7 +123,8 @@ menu.tools.create_font = Create Font...
menu.tools.archive_sketch = Archive Sketch
menu.tools.fix_the_serial_lbrary = Fix the Serial Library
menu.tools.install_processing_java = Install “processing-java”
menu.tools.add_tool = Add Tool...
# menu.tools.add_tool = Add Tool...
menu.tools.manage_tools = Manage Tools…

# | File | Edit | Sketch | Debug | Tools | Help |
# | Help |
Expand Down Expand Up @@ -316,7 +318,8 @@ toolbar.new = New
toolbar.open = Open
toolbar.save = Save
# toolbar.export_application = Export Application
toolbar.add_mode = Add Mode...
# toolbar.add_mode = Add Mode...
toolbar.manage_modes = Manage Modes…

# [Debug] [Continue] [Step] [Stop] [Toggle Breakpoints] [Variable Inspector]
#toolbar.debug.continue = Continue
Expand Down
54 changes: 30 additions & 24 deletions todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,22 @@ X NullPointerException when changing the theme
X https://github.com/processing/processing4/issues/476
X suppress java.lang.NoSuchMethodError: accessibilityHitTest error
X https://github.com/processing/processing4/issues/368
X change to "Modes..." or "Manage Modes..." and same for Libraries, etc
X toolbar.add_mode = Add Mode... ->
X toolbar.manage_modes = Manage Modes…
X menu.library.add_library = Add Library... ->
X menu.library.manage_libraries = Manage Libraries…
X menu.tools.add_tool = Add Tool... ->
X menu.tools.manage_tools = Manage Tools…


_ open dialog extensions only work for the current Mode
_ i.e. in Java Mode, won't list .js files as candidates

_ on release: submit to Microsoft
_ https://www.microsoft.com/en-us/wdsi/filesubmission
_ https://aka.ms/wdsi
_ https://www.microsoft.com/security/blog/2018/08/16/partnering-with-the-industry-to-minimize-false-positives/

design
X set minimum size for scroll bar thumb
Expand Down Expand Up @@ -53,18 +69,14 @@ X removing accents was trashing some input too
X redo category tallying for contribs (Libraries only anyway?)
X gets rid of maze of code that's storing libraries by their category
X remove unnecessary code that tracks contribs by category
X this was hiding the issue that was causing contribs to be added several times,
X this was hiding the issue that was causing contribs to add several times
X because the add() was inside the category loop of that code
X remove unused 'restart' flagging code, setRestartFlag() never used
X all that was left was maintenance of when that's been set, so...
X allow update of the current Mode
X if doing an update (not just delete), close sketches and re-open
X if doing a delete, require sketches to be closed
X change up StatusPanelDetail constructor to clean up accessors
X disable hashCode() implementation in Contribution
X was getting in the way of comparisons
_ but need to compare the entries differently so there aren't dupes
_ i.e. it was doing a name comparison, so need to swap by name

preproc
X correctly handling sketch renderer with fullScreen()
Expand All @@ -88,6 +100,11 @@ X https://github.com/processing/processing4/issues/279
X https://github.com/processing/processing4/pull/436


manager
X disable hashCode() implementation in Contribution
X was getting in the way of comparisons
_ but need to compare the entries differently so there aren't dupes
_ i.e. it was doing a name comparison, so need to swap by name
_ currently no indication that contrib download failed
_ so the 'try again' won't show up; everything looks fine
_ (was this for the contrib listing? or an actual contrib?)
Expand All @@ -101,11 +118,14 @@ _ this one shouldn't be in a single tab
_ and it should include all contribs (method from Base to get in one swoop?)
_ this is also likely the cause of per-Mode weirdness
_ holy s*t ContributionTableModel is using all of the contribs
_ after failed update of Mode, the button is no longer available
_ have to click something else, then click back on the Mode line again
_ remove updateInProgress from StatusPanelDetail
_ when starting in p5jsMode, contrib manager shows no green checks for libs
_ tricky because those aren't gonna show up in 'Add Library'
_ which is another case for a separate 'contrib manager' thing
_ maybe that's the update button? when no updates, it's still a button?

_ change to "Modes..." or "Manage Modes..." and same for Libraries, etc

_ open dialog extensions only work for the current Mode
_ i.e. in Java Mode, won't list .js files as candidates

_ if a sketch is in the docs folder, try triggering macos access dialog
_ do it once for the root, then see if it allows the folders inside as well
Expand All @@ -115,22 +135,8 @@ _ get rid of IgnorableException

_ contrib/mode/lib/example List objects in Base: which should be Set objects

_ after failed update of Mode, the button is no longer available
_ have to click something else, then click back on the Mode line again

_ lots of rewriting to use SwingWorker
_ https://docs.oracle.com/javase/tutorial/uiswing/concurrency/worker.html
_ when starting in p5jsMode, going to the contrib manager shows no green checks for libs
_ tricky because those aren't gonna show up in 'Add Library'
_ which is another case for a separate 'contrib manager' thing
_ maybe that's the update button? when no updates, it's still a button?

_ remove updateInProgress from StatusPanelDetail

_ on release: submit to Microsoft
_ https://www.microsoft.com/en-us/wdsi/filesubmission
_ https://aka.ms/wdsi
_ https://www.microsoft.com/security/blog/2018/08/16/partnering-with-the-industry-to-minimize-false-positives/

_ remove checkbox for detaching sketch name
_ just do this manually, and Save As will reset the name
Expand Down Expand Up @@ -161,7 +167,7 @@ _ otherwise impossible to know how to populate the Examples window

sketchbook
_ fix up the code for sketchbook building
_ is it time to make this into a tree object of some sort?
_ is it time to make the internal representation into a tree object
_ and then build the GUI versions separately (on the EDT)
_ Base.checkSketchFolder() is used to identify sketches for the sketchbook frame
_ but it assumes that it's folder name + default extension as the name for it
Expand Down

0 comments on commit 4091639

Please sign in to comment.