Add utility methods for casting resources to their particular types #3239
Labels
kind/task
Internal things, technical debt, and to-do tasks to be performed.
Milestone
Add to
org.eclipse.che.ide.api.resources.Resource
interface utility methods to cast current resource to its particular type.Proposed method names:
org.eclipse.che.ide.api.resources.Resource#asFile
org.eclipse.che.ide.api.resources.Resource#asFolder
org.eclipse.che.ide.api.resources.Resource#asProject
It's syntax sugar to better code readability.
Example of usage:
If resource type is not corresponding caller method, method should throw
java.lang.IllegalStateException
The text was updated successfully, but these errors were encountered: