Skip to content

Creation of a new status control for feedback on activities, processes, background jobs - #337

Merged
lesquoyb merged 36 commits into
2024-06from
Towards-a-better-activity-status-line
Apr 28, 2025
Merged

Creation of a new status control for feedback on activities, processes, background jobs#337
lesquoyb merged 36 commits into
2024-06from
Towards-a-better-activity-status-line

Conversation

@AlexisDrogoul

Copy link
Copy Markdown
Member

This will involve several steps.

First step: move global GAML reference search to GAML editors -- and revamp the corresponding dialog for better ease of use.

Second step: create the new status control or monitor (separate from the experiment status) and move user tasks, sub-tasks, etc. over to this new control.

Third step : implement a contexual menu that gives access to parallel tasks (if any).

Fourth step : reroute the system messages (such as updates, compilation of files, etc.) to this new control.

The corresponding dialog has also been revamped for better ease of use.
codescene-delta-analysis[bot]

This comment was marked as off-topic.

codescene-delta-analysis[bot]

This comment was marked as off-topic.

codescene-delta-analysis[bot]

This comment was marked as off-topic.

codescene-delta-analysis[bot]

This comment was marked as off-topic.

@lesquoyb

lesquoyb commented Oct 1, 2024

Copy link
Copy Markdown
Contributor

Some remarks about the current work on the new status bar:

  1. It is not emptied after the compilation is done:
    image
    or after closing an experiment:
    image

  2. On some monitors the status bar is moved under the toolbar even though there seems to be enough room to have everything on the same line:
    image

  3. Between the status bar and the trash bin icon there's another button without icon and that looks like it's doing nothing, idk if it's meant to be a real button later but I thought I might as well report it now in case it's a mistake:
    image

  4. errors that where displayed in the statusbar are not available anymore.
    Taking for example the model given in When an error appears at initialisation of an experiment there's no menu nor toolbar button to kill it #286:

model batcherror

global{
	map<bool, string> a;
	string b;
}

experiment simulationBase {
	parameter 'c' var: b <- a[true];
}

In the main branch we have the error message in the statusbar:
image
But in this branch there's nothing, we don't even know that the model has been (partially?) compiled:
image

@lesquoyb

Copy link
Copy Markdown
Contributor

I don't think that was really closed by 2cacee8, probably a wrong number in the commit names?

@lesquoyb lesquoyb reopened this Mar 15, 2025
@AlexisDrogoul

Copy link
Copy Markdown
Member Author

Yeah right. Sorry :) It was #377 actually !

- [Breaking change] Removes the possibility to add data to the bottom overlay of displays.
- Reduces the number of StatusTypes
- Adds new icons for the activities (tentative introduction of new iconsets)
- clearly separates the two "refresher" threads
- makes StatusRefresher an internal UIJob
- Editors menu is now located in the editor
- GAML reference search is now located next to the GC
- also adds GamaFonts (a font registry for caching SWT fonts)
- makes FontSizer and equivalent classes singletons / static classes
- reduces the number of generated icon (from 1200 to 1000)
- reduces the memory used by the update to the status
- generalizes the expansion/collapse of trees
- better reports when tests are running
- removes the toggle of toolbars
- changes the name of "build" to "validation" for icons (to not mess with Git)
- creates more icons
- create icons corresponding to the outline and better interpret GAML files
Promotes the MiniMap view as one of the regular views of the modeling perspective
Adds icon for it and templates view
Proposes a different initial organisation of the perspective
@lesquoyb

Copy link
Copy Markdown
Contributor

I've tried on windows and I noticed a problem on some models, here is what I see for the models of the 3D tutorial:
image
I don't have any toolbar to run the model
If I look up in the console I can see why:

> GAML  : Artifacts                                     built in______ 35ms
Creating part control of Model 01.gaml
> GAMA  : Retrieving workspace metadata                 done in_______ 356ms
Updating toolbar for Model 01.gaml
> COMPIL: Model 01.gaml                                 in____________ 680ms
Updating toolbar for Model 01.gaml
Size of parent : Point {1280, 39}
Size of composite : Point {0, 0}
Size of toolbar : Point {0, 0}

I can still run the experiment with the button on the model explorer on the left so everything is working, it's just that the toolbar has a size of 0 for some reason.
The model in the first tab has a normal toolbar. I tried to move the model that doesn't work at the first tab position but even after restarting gama the toolbar doesn't appear, so I guess it's model specific.

@AlexisDrogoul

Copy link
Copy Markdown
Member Author

Right. As I said, I did not test it on Windows, and the problem of toolbar sizes is a recurring one on this platform (as the toolbar takes the height of the first icon dropped on it). It shouldn't be too difficult to solve (I hope)

- better computes dynamics icons
- correctly restores the background
Installs a RunAndTrack addon to make sure that requests of light icons in dark mode are correctly rerouted.
@AlexisDrogoul

Copy link
Copy Markdown
Member Author

So it is still not tested on Windows, but I would suggest to merge this PR (which now plays well with the dark mode as well) as soon as we can, in order for it to be available for everyone in the Coding Camp -- we can work out the small UI glitches there. @lesquoyb is it ok on your side ?

@lesquoyb

Copy link
Copy Markdown
Contributor

It is still not usable on windows as some models cannot be run at all with the standard way as I mentioned above, so I would advise not to merge before that one is solved.
As a side note, some jobs in windows are prefixed with Win32, which could be removed in my opinion:
image

@AlexisDrogoul

AlexisDrogoul commented Apr 24, 2025

Copy link
Copy Markdown
Member Author

OK. I've been able to overcome the problems of Windows on ARM, and it appears that I can't reproduce the problem (I've opened dozens of editor views), but maybe is it due to 588ecf8 (which was necessary to have GAMA working at all on Windows ARM) ? Can you try and test it ?

Windows 11 ARM 2025-04-24 07-25-36

@lesquoyb

Copy link
Copy Markdown
Contributor

a little bit better now as there's a button in the bar:
image
but still no button to run the model's experiment.

But I noticed that it's now only the last experiment not being shown:
image

Also now the whole gama disappears after the splashscreen on windows when the dark mode is activated, which is even worse. The stack error in eclipse is:

> GAML  : Artifacts                                     built in______ 20ms
Creating part control of Model 02.gaml
!SESSION 2025-04-24 09:04:35.274 -----------------------------------------------
eclipse.buildId=unknown
java.version=23.0.1
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -product gama.ui.application.product --launcher.defaultAction openFile
Command-line arguments:  -product gama.ui.application.product -data C:\Users\baptiste\eclipse-workspace-2025-03.2/../runtime-gama.product -dev file:///C:/Users/baptiste/eclipse-workspace-2025-03.2/.metadata/.plugins/org.eclipse.pde.core/gama.product/dev.properties -os win32 -ws win32 -arch x86_64 -consoleLog -data @noDefault --launcher.defaultAction openFile

!ENTRY org.eclipse.e4.ui.workbench.swt 4 2 2025-04-24 09:04:52.416
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.e4.ui.workbench.swt".
!STACK 0
java.lang.NullPointerException: Cannot invoke "org.eclipse.swt.widgets.Menu.getShell()" because the return value of "org.eclipse.swt.widgets.MenuItem.getMenu()" is null
	at org.eclipse.swt.widgets.MenuItem.calculateRenderedTextSize(MenuItem.java:1265)
	at org.eclipse.swt.widgets.MenuItem.wmMeasureChild(MenuItem.java:1208)
	at org.eclipse.swt.widgets.Control.WM_MEASUREITEM(Control.java:5237)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4798)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:336)
	at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1482)
	at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2354)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5089)
	at org.eclipse.swt.internal.win32.OS.DefWindowProc(Native Method)
	at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:512)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4859)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:336)
	at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1482)
	at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2348)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5089)
	at org.eclipse.swt.internal.win32.OS.BringWindowToTop(Native Method)
	at org.eclipse.swt.widgets.Decorations.bringToTop(Decorations.java:215)
	at org.eclipse.swt.widgets.Shell.open(Shell.java:1292)
	at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer.postProcess(WBWRenderer.java:743)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:676)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:762)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:727)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:711)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1079)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1042)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:668)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:576)
	at gama.ui.application.Application.start(Application.java:148)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:149)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:115)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:467)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:298)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:670)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:607)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1492)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1465)
	Suppressed: java.lang.NullPointerException: Cannot invoke "org.eclipse.swt.widgets.Menu.getShell()" because the return value of "org.eclipse.swt.widgets.MenuItem.getMenu()" is null
		at org.eclipse.swt.widgets.MenuItem.getMonitorZoom(MenuItem.java:1131)
		at org.eclipse.swt.widgets.MenuItem.createNewGC(MenuItem.java:1125)
		at org.eclipse.swt.widgets.MenuItem.wmDrawChild(MenuItem.java:1148)
		at org.eclipse.swt.widgets.Control.WM_DRAWITEM(Control.java:4979)
		at org.eclipse.swt.widgets.Control.windowProc(Control.java:4771)
		... 39 more

!ENTRY org.eclipse.e4.ui.workbench 4 0 2025-04-24 09:04:52.420
!MESSAGE Exception occurred while rendering: IDEWindow=org.eclipse.e4.ui.model.application.ui.basic.impl.TrimmedWindowImpl@41a8f0d8 (tags: [topLevel, shellMaximized], contributorURI: platform:/plugin/org.eclipse.ui.workbench) (widget: Shell {gama2025-05.2 - Tutorials/3D/models/Model 02.gaml - Gama} [layout=org.eclipse.e4.ui.workbench.renderers.swt.TrimmedPartLayout@5d0d1e50], renderer: org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer@4700963e, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, context: TrimmedWindowImpl (IDEWindow) Context, variables: [], x: 27, y: 73, width: 1024, height: 768)
!STACK 0
java.lang.NullPointerException: Cannot invoke "org.eclipse.swt.widgets.Menu.getShell()" because the return value of "org.eclipse.swt.widgets.MenuItem.getMenu()" is null
	at org.eclipse.swt.widgets.MenuItem.calculateRenderedTextSize(MenuItem.java:1265)
	at org.eclipse.swt.widgets.MenuItem.wmMeasureChild(MenuItem.java:1208)
	at org.eclipse.swt.widgets.Control.WM_MEASUREITEM(Control.java:5237)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4798)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:336)
	at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1482)
	at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2354)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5089)
	at org.eclipse.swt.internal.win32.OS.DefWindowProc(Native Method)
	at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:512)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4859)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:336)
	at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1482)
	at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2348)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5089)
	at org.eclipse.swt.internal.win32.OS.BringWindowToTop(Native Method)
	at org.eclipse.swt.widgets.Decorations.bringToTop(Decorations.java:215)
	at org.eclipse.swt.widgets.Shell.open(Shell.java:1292)
	at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer.postProcess(WBWRenderer.java:743)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:676)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:762)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:727)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:711)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1079)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1042)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:668)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:576)
	at gama.ui.application.Application.start(Application.java:148)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:149)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:115)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:467)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:298)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:670)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:607)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1492)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1465)
	Suppressed: java.lang.NullPointerException: Cannot invoke "org.eclipse.swt.widgets.Menu.getShell()" because the return value of "org.eclipse.swt.widgets.MenuItem.getMenu()" is null
		at org.eclipse.swt.widgets.MenuItem.getMonitorZoom(MenuItem.java:1131)
		at org.eclipse.swt.widgets.MenuItem.createNewGC(MenuItem.java:1125)
		at org.eclipse.swt.widgets.MenuItem.wmDrawChild(MenuItem.java:1148)
		at org.eclipse.swt.widgets.Control.WM_DRAWITEM(Control.java:4979)
		at org.eclipse.swt.widgets.Control.windowProc(Control.java:4771)
		... 39 more

@lesquoyb

Copy link
Copy Markdown
Contributor

I've pushed a fix for the crash after the splash screen, but the missing last experiment problem remains

@lesquoyb

Copy link
Copy Markdown
Contributor

Seeing the bots' results it seems like going back to jdk21 broke compilation

@lesquoyb

Copy link
Copy Markdown
Contributor

I've noticed some probably missing icons in the model outline view:
image

@lesquoyb
lesquoyb merged commit a17d7f2 into 2024-06 Apr 28, 2025
@github-project-automation github-project-automation Bot moved this from Todo to Done in GAMA 2025-06 Apr 28, 2025
@AlexisDrogoul
AlexisDrogoul deleted the Towards-a-better-activity-status-line branch May 2, 2025 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants