Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 208275 - Task, Category and Repository should fill the standard Properties view:
Summary: Task, Category and Repository should fill the standard Properties view:
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: dev   Edit
Hardware: All All
: P4 enhancement (vote)
Target Milestone: ---   Edit
Assignee: maarten meijer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 341079
  Show dependency tree
 
Reported: 2007-10-31 12:24 EDT by maarten meijer CLA
Modified: 2011-03-28 11:30 EDT (History)
2 users (show)

See Also:


Attachments
mylyn/context/zip (11.03 KB, application/octet-stream)
2007-11-05 17:30 EST, maarten meijer CLA
no flags Details
bugzilla task properties view (31.18 KB, image/png)
2007-11-05 17:33 EST, maarten meijer CLA
no flags Details
local task properties view (29.57 KB, image/png)
2007-11-05 17:34 EST, maarten meijer CLA
no flags Details
repository query properties view (24.78 KB, image/png)
2007-11-05 17:35 EST, maarten meijer CLA
no flags Details
task repository properties view (52.53 KB, image/png)
2007-11-05 17:35 EST, maarten meijer CLA
no flags Details
org.eclipse.mylyn.tasks.spy (11.47 KB, application/octet-stream)
2007-11-06 03:40 EST, maarten meijer CLA
no flags Details
Tasks properties & repository spy in mylyn.sandbox.dev (33.09 KB, patch)
2007-11-06 14:09 EST, maarten meijer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description maarten meijer CLA 2007-10-31 12:24:17 EDT
See bug 207498: [patch] stop automatic configuration retrieval if already done
https://bugs.eclipse.org/bugs/show_bug.cgi?id=207498#c10

What you want is a new bug: Task, Category and Repository should fill the standard Properties view:
http://dev.eclipse.org/blogs/wayne/2007/10/08/getting-started-with-properties/
http://dev.eclipse.org/blogs/wayne/2007/10/15/adapters/
http://dev.eclipse.org/blogs/wayne/2007/10/23/adapters-part-deux/

Some key data relevant to users (or developers) can be shown here
Comment 1 Eugene Kuleshov CLA 2007-10-31 15:42:01 EDT
Please don't use that fancy bloated property pages that have tabs. Good old tree table is the best.
Comment 2 maarten meijer CLA 2007-11-01 17:41:08 EDT
Steps:
Make sure that the Task List tells the Properties View of selection changes
add a getAdapter() to AbstractTaskContainer, AbstratRepositoryQuery,  AbstractTaskCartegory, AbstractTask, TaskRepository
add IPropertySource implementations for each in org.eclipse.mylyn.tasks.ui

Anything else?
Comment 3 Mik Kersten CLA 2007-11-01 17:46:53 EDT
Maarten: could you outline the use cases for this?
Comment 4 maarten meijer CLA 2007-11-01 17:59:12 EDT
My original idea was to make some spies as tools for connector developers to help display inside information, I already have a repository spy see bug 207498.
Eugene suggested using the properties view.

I use Properties View  if I want to know more about a file/resource/ui element  than is shown in the list (or hover), but less than actually opening the editor.
I think I need to give it a good think and do a simple one on the Task Repositories view.
Comment 5 Steffen Pingel CLA 2007-11-01 18:07:05 EDT
My understanding is that IPropertiesSourceObjects could be contributed by external plug-ins. This could be indeed be useful for inspection of query, task and repository objects during testing. This wouldn't have to be released but could be available from the sandbox in CVS only.
Comment 6 Mik Kersten CLA 2007-11-01 18:14:01 EDT
+1 for this being a Sandbox contribution for debugging

For knowing more about tasks without opening the editor Steffen will be improving the tooltips (bug 205861).
Comment 7 maarten meijer CLA 2007-11-05 17:30:51 EST
Created attachment 82136 [details]
mylyn/context/zip

Some new calsses in the spy project
Comment 8 maarten meijer CLA 2007-11-05 17:33:26 EST
Created attachment 82137 [details]
bugzilla task properties view
Comment 9 maarten meijer CLA 2007-11-05 17:34:24 EST
Created attachment 82138 [details]
local task properties view

Any more properties needed?
Comment 10 maarten meijer CLA 2007-11-05 17:35:00 EST
Created attachment 82139 [details]
repository query properties view
Comment 11 maarten meijer CLA 2007-11-05 17:35:37 EST
Created attachment 82141 [details]
task repository properties view
Comment 12 maarten meijer CLA 2007-11-05 17:39:07 EST
- How deep and specific should the adapters be, just the main classes or special as well for bugzilla, jira and trac...
- should properties be editable?
All this in addition to a repository spy that can also DELETE properties
Comment 13 Steffen Pingel CLA 2007-11-05 23:30:36 EST
That looks very useful. Maarten, could you post a patch with your current implementation? 

I think generic implementations that work on the abstract classes suffice for now unless a driver comes up to extend the implementation to connector specific classes.
Comment 14 maarten meijer CLA 2007-11-06 03:40:16 EST
Created attachment 82169 [details]
org.eclipse.mylyn.tasks.spy

Patch don't work when not shared project :-(

I have created a new project: org.eclipse.mylyn.tasks.spy which contains the IPropertySource adapters for AbstractTaks, TaskRepository, RepositoryQuery and TaskCategory plus MylynPropertiesSourceFactory to create them.
There is startup code to register the factory and adapters on startup, so they work immediately.
Also included is a Repository Spy view where you can also DELETE properties.
Comment 15 Mik Kersten CLA 2007-11-06 12:46:58 EST
Maarten: could you make your patch target a package in org.eclipse.mylyn.sandbox.dev instead of a full new project?  We use that project for features of this sort.
Comment 16 maarten meijer CLA 2007-11-06 14:09:07 EST
Created attachment 82249 [details]
Tasks properties & repository spy in mylyn.sandbox.dev 

As per Mik's request in comment 15
Comment 17 maarten meijer CLA 2007-11-06 14:13:29 EST
Please use the properties view on some elements to look at the text representation of dates that are used throughout Mylyn. 
Each and every one of them appears to use a different format :-(
That is why I created and submitted TimestampUtils.java as part of my patch for bug 207498.
Comment 18 maarten meijer CLA 2007-11-07 01:55:32 EST
I think this is it
Comment 19 Mik Kersten CLA 2007-11-07 20:53:02 EST
Patch applied.  Great stuff Maarten!  Should we now get rid of the IntrospectObjectACtion and inline some of what it does into the Properties pages?  The only real functionality that will be missing is provided by the Plug-in Spy, which we can also contribute to if needed.

After getting some mileage on this we can consider moving in to mylyn.tasks.ui, since it doesn't necessarily get in the way.  But I still see the main use cases as developer and not end user oriented.
Comment 20 Steffen Pingel CLA 2007-11-07 21:21:14 EST
The main problem I see with moving it into tasks.ui is that some of the properties on TaskRepository are connector specific and it is not clear how to present them. This could end up being more confusing than helpful to a user. 

+1 for contributing to plug-in spy in favor of introspect actions
Comment 21 Mik Kersten CLA 2007-11-08 18:21:46 EST
Agreed.

Maarten: you added an early startup extension to the plug-in.  I removed this because it's generally a problematic policy to start things eagerly.  Also, it wasn't working because the plug-in did not implement IStartup.  Also, I applied this patch in too much of a rush and should have given you more feedback on the Eclipse conventions that we adhere to for naming.  I have updated the patch to these conventions, so please review them for future reference.  Also note that I added the Repository Spy view to the Mylyn Sandbox category.
Comment 22 maarten meijer CLA 2007-11-09 03:30:47 EST
(In reply to comment #21)
> Maarten: you added an early startup extension to the plug-in.  I removed this
> because it's generally a problematic policy to start things eagerly.  Also, it
> wasn't working because the plug-in did not implement IStartup.
OK, your the lead ;-)
My reason for adding it is I found that the properties weren't showing at first if the plugin wasn't started, as the factory wasn't started yet. So a click in any Mylyn view did not show anything in the properties view. I had to open the Repository Spy view to get the properties to work.

BTW, Is there an update manager URL for the compiled sandbox feature?
Comment 23 Mik Kersten CLA 2007-11-09 18:10:50 EST
(In reply to comment #22)
> OK, your the lead ;-)

This is unrelated to my being a lead, it's an Eclipse convention that we follow, and those are always up for debate if needed.  My job as lead is to arbitrate when such debates come to a stalemate :)  And to ensure consistency in our decisions and design aesthetics.

> My reason for adding it is I found that the properties weren't showing at first
> if the plugin wasn't started, as the factory wasn't started yet. So a click in
> any Mylyn view did not show anything in the properties view. I had to open the
> Repository Spy view to get the properties to work.

Is this still the case?  Note that it never would have worked because the plug-in did not implement IStartup, which is a requirement for early start.

> BTW, Is there an update manager URL for the compiled sandbox feature?

Yup, it's on the extras: http://www.eclipse.org/mylyn/downloads/
Comment 24 Eugene Kuleshov CLA 2007-12-04 14:11:24 EST
(In reply to comment #23)
> > BTW, Is there an update manager URL for the compiled sandbox feature?
> Yup, it's on the extras: http://www.eclipse.org/mylyn/downloads/

Mik probably meant "experimental" update site (not the same as "extras" update site), which can be found under "Archives and other builds" link from Mylyn download page. Direct url for that update site is http://download.eclipse.org/tools/mylyn/update/weekly/experimental  
Comment 25 Mik Kersten CLA 2007-12-05 21:28:17 EST
Yup, sorry, I did mean the Experimental site.