sid-srini commented on PR #7610:
URL: https://github.com/apache/netbeans/pull/7610#issuecomment-2262014613

   Thank you @lahodaj for reviewing the PR.
   
   > So, what if, just before the new code here, we would check if there's 
exactly one workspace, and if there is, we would use the single workspace. 
(Keeping the pre-existing code computing the workspace folders, as that is 
needed as a default working directory.) 
   > Having one workspace should be the typical thing.
   Yes, having one workspace is the typical use-case.
   
   > What do you think?
   
   When I was adding this new code, my concern with this approach of defaulting 
to the single open workspace was that it may lead to a security/*cross-talk* 
issue if someone opens a file external to the regular workspace (with workspace 
folders). 
   - The workspace arguments and VM options might contain credentials etc. 
which should not be sent to the workspace-external program, *even when its a 
trusted file*.
   - Additionally, opening the same file when another workspace is open would 
lead to different runtime behaviour. 
       - This would also be outside the user's control.
   - On the other hand, by using only the *global* workspace, i.e. without any 
workspace folders, the user would have greater control.
       - It would be clear that only the global run configuration is in effect.
   
   Do you think that in case no suitable workspace is found, then this method 
should introduce adding a new `Workspace`?
   - I think this might be harder to achieve since it would require changing 
`WorkspaceServiceImpl` and maybe `WorkspaceService` and the scope of that seems 
very wide.
   
   Please let me know what you think.
   
   Thank you.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to