jeandersonbc / gsoc14-planning

Planning for accepted project on Google Summer of Code 14
1 stars 0 forks source link

List all JFace viewers that are not generified #24

Open jeandersonbc opened 10 years ago

jeandersonbc commented 10 years ago

Create a list for the remaining viewers.

jeandersonbc commented 10 years ago

Summary

This is a review of all classes from the JFace Viewers package

JFace Viewers

As listed in the JFace's FAQ page [1], JFace provides the following viewers:

  1. TreeViewer (connected to an SWT Tree widget)
  2. TableViewer (connected to an SWT Table widget)
  3. ListViewer (connected to an SWT List widget)
  4. TableTreeViewer (connected to an SWT TableTree widget)
  5. TextViewer (connected to an SWT StyledText widget).
  6. CheckboxTreeViewer
  7. CheckboxTableViewer

Status

Note: A <: B means that B is a child class of A

TreeViewer

According the implementation, all super classes in the type hierarchy are generified: Viewer <: ContentViewer <: StructuredViewer <: ColumnViewer <: AbstractTreeViewer <: TreeViewer

TableViewer

Similar to the previous viewer: Viewer <: ContentViewer <: StructuredViewer <: ColumnViewer <: AbstractTableViewer <: TableViewer

ListViewer

Similar to the previous viewer: Viewer <: ContentViewer <: StructuredViewer <: AbstractListViewer <: ListViewer

TableTreeViewer

This viewer is deprecated and marked for deletion, as reported in a bugzilla entry [2]. Therefore, this viewer should not be a concern.

TextViewer

I didn't find the source for org.eclipse.jface.text.* although I did find the .class files related to this package, including attached sources. According to the attached source, it is not generified.

CheckboxTreeViewer

This viewer is a subclass of TreeViewer, which is a generic type, but it is not generified.

CheckboxTableViewer

This viewer is a subclass of TableViewer. It is also not generified like the previous viewer.

Directly related components

There are other viewers rather than only the viewers mentioned here (e.g. ComboViewer). Assuming that a class related to any JFace Viewers components matches the string pattern *Viewer* with its name, there are several other classes classes to be considered:

AbstractListViewer.java (already generified) AbstractTableViewer.java (already generified) AbstractTreeViewer.java (already generified) ColumnViewer.java (already generified) ColumnViewerEditor.java (already generified) ColumnViewerEditorActivationEvent.java (supports generic ViewerCell) ColumnViewerEditorActivationListener.java (maybe it does not apply) ColumnViewerEditorActivationStrategy.java (already generified) ColumnViewerEditorDeactivationEvent.java (maybe it does not apply) ColumnViewerToolTipSupport.java (already generified) ComboBoxViewerCellEditor.java (already generified) ComboViewer.java (already generified) ContentViewer.java (already generified) ITreeViewerListener.java (already generified) IViewerLabelProvider.java (already generified) StructuredViewer.java (already generified) StructuredViewerInternals.java (supports generic StructuredViewer) TableColumnViewerLabelProvider.java (already generified) TableViewerColumn.java (already generified) TableViewerEditor.java (already generified) TableViewerFocusCellManager.java (already generified) TableViewerRow.java (already generified) TreeColumnViewerLabelProvider.java (already generified) TreePathViewerSorter.java (maybe generic methods should be considered) TreeViewerColumn.java (already generified) TreeViewerEditor.java (already generified) TreeViewerFocusCellManager.java (already generified) TreeViewerRow.java (already generified) Viewer.java (already generified) ViewerCell.java (already generified) ViewerColumn.java (already generified) ViewerComparator.java (already generified) ViewerDropAdapter.java (uses rawtypes) ViewerFilter.java (already generified) ViewerLabel.java (maybe it does not apply) ViewerRow.java (already generified) ViewerSorter.java (uses rawtypes) WrappedViewerLabelProvider.java (already generified)

Indirectly related components

In addition, there object references related with the mentioned viewers that must be considered (e.g providers, editors, and others). There are 88 classes/interfaces from the package viewers that doesn’t match the *Viewer* pattern but are related to JFace Viewers.

References

[1] http://wiki.eclipse.org/FAQ_What_kinds_of_viewers_does_JFace_provide%3F [2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=434575

jeandersonbc commented 10 years ago

@vogella @hendrikstill,

I think a good start point would be the inheritance tree of ChecboxTreeViewer and CheckboxTableViewer. Later, I will take a look at those highlighted components.

What do you think about it?

jeandersonbc commented 10 years ago

Also, how should we report our changes? I noticed that @hendrikstill used bugzilla (https://bugs.eclipse.org/bugs/show_bug.cgi?id=414057). We will stick with this workflow?

vogella commented 10 years ago

Impressive list and analysis. Looks very good to me.

2014-07-03 23:01 GMT+02:00 Jeanderson Barros Candido < notifications@github.com>:

@vogella https://github.com/vogella @hendrikstill https://github.com/hendrikstill,

I think a good start point would be the inheritance tree of ChecboxTreeViewer and CheckboxTableViewer. Later, I will take a look at those highlighted components.

What do you think about it?

— Reply to this email directly or view it on GitHub https://github.com/jeandersonbc/gsoc14-eclipse-planning/issues/24#issuecomment-47984323 .

jeandersonbc commented 10 years ago

@vogella thank you for your feedback.

Do you think we should file bugs on Eclipse bugzilla for each generefication, as @hendrikstill was doing, or should we use Github's issue tracker? In my opinion, having everything documented on Eclipse bugzilla will be easier to follow up but I'm afraid it will be annoying to the others developers. On the other hand, we are already documenting our work here on Github. Therefore, I think Github's issue tracker is also an option.

Regarding the activity workflow, after identifying the component to be generified, I will make the necessary changes. Then, it is expected to have warnings due to the use of raw types. However, related snippets and tests must execute with no problems. After that, I will adjust tests and snippets to remove related warnings.

How does that sounds to you?

Thanks in advance.

jeandersonbc commented 10 years ago

@vogella just for information, I choose to work with bugzilla. According to my schedule, I'm a little behind from what I've planned but I expect to be synchronized next week.

Best regards

vogella commented 10 years ago

Great. Sorry for being really busy after my vacation. I plan to review all your work the week after next week. If possible I also want to merge it in Eclipse Master. Am 11.07.2014 20:19 schrieb "Jeanderson Barros Candido" < notifications@github.com>:

@vogella https://github.com/vogella just for information, I choose to work with bugzilla. According to my schedule, I'm a little behind from what I've planned but I expect to be synchronized next week.

Best regards

— Reply to this email directly or view it on GitHub https://github.com/jeandersonbc/gsoc14-eclipse-planning/issues/24#issuecomment-48764923 .

jeandersonbc commented 10 years ago

No problems, I was expecting that you would have work to update after vacation :-) Also, I'm keeping track of Eclipse master. I think that it will be easier to migrate our work to Eclipse Master by my merging Eclipse code with our work. What do you think?

jeandersonbc commented 10 years ago

Didn't have much trouble adding Generics to IStructuredSelection and its children (i.e. StructuredSelection and ITreeSelection).

However, I couldn't make significant changes in TreeSelection. Static entities and having Java Collections coexisting with arrays make this class a little harder to upgrade without breaking anything or having to change other classes.