Closed kaloyan-raev closed 9 years ago
@kaloyan-raev I think it's a good idea. It seems that it's similar issue than https://github.com/angelozerr/eclipse-wtp-webresources/issues/24
Today I'm very busy with tern.java, I will do this issue when I will have time.
It would be great if we could mark a list of source folders that would each be counted as the root. I'm looking at a project now with the following structure: src/main/resources/static/css, js, etc target/generated-resources/static/css, js, etc These static folders are combined later when deploying. I think I would need both static folders to be marked as web root.
I agree @MichaelChambers but I'm very busy for the moment with JSON Editor and Grunt development.
Any contribution are welcome!
I am working on this. I will consider @MichaelChambers suggestion.
PR #41
@MichaelChambers could you update from the snapshot repository and check if this solution works for you? http://oss.opensagres.fr/eclipse-wtp-webresources/0.9.0-SNAPSHOT/
@kaloyan-raev I tell me why Web Root Folders Preferences is inside Web Resources -> Validation -> Web Root Folders menu item. This config works too for completion, no? Wyh don't set this menu to Web Resources -> Web Root Folders ?
Isn't this what the Deployment Assembly property page already does and then surfaces through the ModuleCore APIs?
@nitind I'm sorry I don't understand what you mean?
@angelozerr No, currently web root folder are not considered for completion - just for validation. I had only the validation in my mind and did not thought about the completion. Therefore, I placed the new property page under the Web Resource > Validation one. When completion starts considering web root folders, I agree the page should me moved directly under Web Resources.
The Deployment Assembly page that @nitind mentioned is used in the WTP Java EE Tools. Here is screenshot: It provides mapping between project structure and deployment package structure. However, there some issues to use it to resolve the problem targeted by this issue:
Many thanks for your information.
It should be cool if completion could use your preferences.
This works perfectly. Thanks!
Consider the following project structure:
The template.phtml file is not directly accessible, but via inclusion in another PHP/HTML resource. Therefore any relative paths does not really follow the project tree hierarchy and are marked as validation errors, e.g.
<img src="/img/myimage.png" />
will be marked as error.This situation can be improved by marking a folder in the project (i.e. "public" in the above case) as the web root folder. I am thinking about providing a project property for this. The user can right-click on the project, choose properties, then go to the Web Resources node and browse a folder to specify as Web Root. Then the validator should consider the value of this property.
Is such improvement acceptable? Any other suggestions to resolve the above case?