diff --git a/examples/text-editor/plugins/darkTheme.wyv b/examples/text-editor/plugins/darkTheme.wyv index e60e0da5b..e4447658f 100644 --- a/examples/text-editor/plugins/darkTheme.wyv +++ b/examples/text-editor/plugins/darkTheme.wyv @@ -1,5 +1,5 @@ import uiEffects -module def darkTheme(logger: Logger, uiManager: UIManager): {} Plugin[{logger.Update, uiEffects.PaintUI, uiEffects.SetUILookAndFeel}] +module def darkTheme(logger: Logger, uiManager: UIManager): {} ThemePlugin[{logger.Update, uiEffects.PaintUI, uiEffects.SetUILookAndFeel}] // N.B.: In Java, once the theme is changed, apparently, there is no way to change it again, so this plugin shouldn't be registered in the menu. effect Run = {logger.Update, uiEffects.PaintUI, uiEffects.SetUILookAndFeel} diff --git a/examples/text-editor/plugins/lightTheme.wyv b/examples/text-editor/plugins/lightTheme.wyv index 360338da6..194934626 100644 --- a/examples/text-editor/plugins/lightTheme.wyv +++ b/examples/text-editor/plugins/lightTheme.wyv @@ -1,5 +1,5 @@ import uiEffects -module def lightTheme(logger: Logger, uiManager: UIManager): {} Plugin[{logger.Update, uiEffects.PaintUI, uiEffects.SetUILookAndFeel}] +module def lightTheme(logger: Logger, uiManager: UIManager): {} ThemePlugin[{logger.Update, uiEffects.PaintUI, uiEffects.SetUILookAndFeel}] // N.B.: In Java, once the theme is changed, apparently, there is no way to change it again, so this plugin shouldn't be registered in the menu. effect Run = {logger.Update, uiEffects.PaintUI, uiEffects.SetUILookAndFeel} diff --git a/examples/text-editor/textEditor.wyv b/examples/text-editor/textEditor.wyv index 02a5a309f..c67870f2d 100644 --- a/examples/text-editor/textEditor.wyv +++ b/examples/text-editor/textEditor.wyv @@ -94,8 +94,8 @@ def getAttenuatedNativeJOptionPane(): {} OptionPane /******* Step 2: Instantiate plugins passing in appropriate resources *******/ -val darkTheme: Plugin[{logger.Update, uiEffects.PaintUI, uiEffects.SetUILookAndFeel}] = darkTheme(logger, getAttenuatedNativeUIManager()) -val lightTheme: Plugin[{logger.Update, uiEffects.PaintUI, uiEffects.SetUILookAndFeel}] = lightTheme(logger, getAttenuatedNativeUIManager()) +val darkTheme: ThemePlugin[{logger.Update, uiEffects.PaintUI, uiEffects.SetUILookAndFeel}] = darkTheme(logger, getAttenuatedNativeUIManager()) +val lightTheme: ThemePlugin[{logger.Update, uiEffects.PaintUI, uiEffects.SetUILookAndFeel}] = lightTheme(logger, getAttenuatedNativeUIManager()) val wordCount: Plugin[{logger.Update, uiEffects.ReadTextArea, uiEffects.ShowDialog, uiEffects.GetMessageValue}] = wordCount(logger, getAttenuatedNativeJTextArea(), getAttenuatedNativeJOptionPane()) // Must pass in TextArea and not just String because need to get the latest version of the text val questionnaireCreator: Plugin[{logger.Update, fs.Write, fs.Append, uiEffects.ReadTextArea}] = questionnaireCreator(logger, getAttenuatedNativeJTextArea(), fs) // Must pass in TextArea and not just String because need to get the latest version of the text