Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
AW: [geclipse-dev] Collect all classes implementing one functionalityinto one package

Hi Mariusz,

The structure of the UI plugin actually follows the Eclipse way of life. The idea is to bundle classes of similar functionality in packages, i.e. having a package for widgets, actions, resources and so on. This is somehow different from the approach I normally organise my files on disk. Here I have for example a directory containing a document. Within this directory (or in subdirectories of this directory) there are also all associated files like pictures in various formats, movies etc. Nevertheless I prefer the Eclipse way for the packaging of classes since this bundles functionality. It is also easier for developers to search one package for interesting actions, providers or views than multiple packages.

And furthermore there is the argument of inheritance. The Grid model views for instance make use of different common classes and their subclasses (like the providers). Now where to put these different shared classes if not in dedicated packages like actions, providers etc.?

Another aspect is of course the separation of public and internal functionality. In your approach we would have to define for each view a public and an internal package. Isn't it easier to have simply an internal action package for instance and the public package for the views?

These are just the arguments that came very quickly to my mind, I'm sure there are a lot of other good reasons why Eclipse handles packages in the way they do ;-)

Cheers, Mathias


-----Ursprüngliche Nachricht-----
Von: geclipse-dev-bounces@xxxxxxxxxxx [mailto:geclipse-dev-bounces@xxxxxxxxxxx] Im Auftrag von Mariusz Wojtysiak
Gesendet: Mittwoch, 30. Mai 2007 12:36
An: geclipse-dev@xxxxxxxxxxx
Betreff: [geclipse-dev] Collect all classes implementing one functionalityinto one package

Hello!

I have proposition about packages structure in ui.

Now I'm developing filters for "Jobs" view.
We have rule that given class should be in package appropriate to its 
base class.

E.g. GridJobView is in package eu.geclipse.ui.views
JobViewLabelProvider - eu.geclipse.ui.providers

Other example:
GridConnectionView is in package: eu.geclipse.ui.views
ConnectionViewActions: eu.geclipse.ui.internal.actions
ConnectionViewLabelProvider: eu.geclipse.ui.providers


To implement view we have to write many classes:
ViewPart, ContentProvider, LabelProvider, Actions, Filters etc.

Problem is that all these classes are in different packages.


Maybe it would be better to gather all classes implementing one 
functionality into one package?


E.g. For Jobs view we will have package eu.geclipse.ui.views.JobsView 
with following classes inside:

GridJobView
JobViewLabelProvider
JobStatusFilter
JobSubmissionDateFilter
ConfigureFiltersAction
ConfigureFiltersDialog


I think we can talk shortly about it during our VRVS meeting.

Regards,
-- 
Mariusz Wojtysiak
_______________________________________________
geclipse-dev mailing list
geclipse-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/geclipse-dev


Back to the top