-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Manually added project to dashboard is removed after re-opening workspace or re-opening IDE #264
Comments
My scenario involved the same series of steps but with a maven project (vs a gradle project) in a 2 (or more) application dashboard. |
@TrevCraw , I did notice that when following the steps above, specifically in the 5th step, manual additing of project, the workspace is not specified. In this step, I observed that the workspace name appears as 'UNTITLED'. Upon further investigation during debugging, I discovered that manually adding a project to the Liberty dashboard requires a 'workspaceState' and utilizes a specific type of key variable, 'LIBERTY_DASHBOARD_WORKSPACE_STORAGE_KEY', to fetch the workspace accurately. Since no workspace is created beforehand, there is no workspace data available at this point. Consequently, the process only considers the ProjectProvider 'projects' and excludes the manually added project. The same kind of event occurs when selecting File -> Save Workspace As... , |
When I checked Microsoft Visual Studio Code. |
Check the possibility of saving the workspace state before performing a |
Though debugging found that the issue happens due to an unsaved workspace , when you add the project to the liberty dashboard manually before saving the workspace and then upon saving the workspace at the end as per the steps in the issue, the state is not saved. After following the steps in the issue and when tried to get the data about the manually added projects, the data is empty , however when the workspace is saved first, then the data for the manually added projects is available . Tried saving the workspace first followed by the steps in the issue and the issue doesn’t occur . |
Hi @JoshwinThomasIBM , Based on the high level description of the problem, I think there are two different approaches we can take:
Option 1 is less intrusive, but I am not sure if it is possible. You will need to investigate. I am open to other ideas as well. If you have any suggestions you would like to propose, please do. |
Discussed with @mrglavas and @turkeylurkey:
|
There are two ways in which we can close the workspace : 1 - by closing the IDE and we get a prompt for asking to save the workspace , we could get a control over this flow in the 2 - File-> closeWorkspace - in this flow we could not get the control over closing the workspace , deactivate() is not called |
Moved ahead with prompting the user to save the workspace first when a user try to add a project to the liberty dashboard where the workspace is untitled and contains more than one project. Changes are completed and is in for review and demo |
Problem:
A project manually added to the Liberty Dashboard is removed from the the Liberty Dashboard after the workspace is closed and re-opened or if the IDE is closed and re-opened.
The issue occurs If the workspace has more than two projects, and it tends to happen only the first time the sequence of steps outlined below are followed. Subsequent attempts to remove/add the project in question and re-open the workspace/IDE work as expected: The added project is still listed in the Liberty Dashboard after the workspace is re-opened.
Steps to recreate:
Created a Gradle abd Maven starter projects (https://openliberty.io/start/)
Open the Gradle project (file→ Open Folder).
Add the Maven project to the workspace (File-> Add Folder to workspace)
Expand the Gradle project:
Rename src/main/liberty/config to src/main/liberty/config2
Comment out the Liberty Gradle Plugin definition entry in build.gradle and save:
The gradle project should have been removed.
“Add Project to Liberty Dashboard”.
Select the Gradle project. The project should now be added to the Liberty dashboard.
Go to File -> “Close Workspace”.
When asked: “Do you want to save your workspace configuration as a file?”
Select save, specify the dir and file name + save.
The text was updated successfully, but these errors were encountered: