Community
Participate
Working Groups
When I open a web task I don't see a browser widget or straight forward button to open the task in a browser.
What do you mean by web tasks, those created by the generic web repository connector or just tasks that have their URL set?
Tasks from the web connector seem to work but not Trac tasks that are accessed in web mode and do not have task data. I can look into it.
What you will probably want to do is copy what I did for the WebConnectorUi, which now contributes a browser editor.
While trying to figure out how to do this I ran into strange code in TaskEditor.addPages(): IEditorPart editor = factory.createEditor(this, getEditorInput()); IEditorInput input = task != null ? factory.createEditorInput(task) : getEditorInput(); This creates the editor from the factory using a TaskEditorInput created by TaskUiUtil, then creates a new RepositoryTaskEditorInput through the connector specific factory and initializes the editor with that input. I would expect the input to be created first and to be passed to factory.createEditor()?
Yes, that is a bit weird and begs fixing. I forget now why I did it that way, but I'm guessing that they only two bits of information needed to create the editor are the task and whether or not it is a new task.
For Trac it requires extra checking of the editor input. Looking at the API of AbstractTaskEditorInput I would have anticipated different behavior from the framework. I had to read the implementation of TaskEditor to understand what was going on and to get this right. We should consider making BrowserEditorInput, WebTaskEditorFactory and BrowserFormPage API since all plug-ins displaying web tasks will need that.
Created attachment 71831 [details] mylar/context/zip
Steffen: very good point, please file a bug for that.
Created bug 193472.