This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 231687 - create javaee.project module
Summary: create javaee.project module
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.3.1
Hardware: All All
: P3 normal (vote)
Assignee: issues@javaee
URL:
Keywords:
Depends on:
Blocks: 230820
  Show dependency tree
 
Reported: 2013-06-23 23:27 UTC by David Konecny
Modified: 2013-07-11 04:13 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Konecny 2013-06-23 23:27:41 UTC
This should be next logical step of http://wiki.netbeans.org/J2eeCommonRefactoring right? To create new module named javaee.project and move following packages from javaee.common there (I tried to select only packages which are non controversial):

o.n.m.j.c.project.ArtifactCopyOnSaveSupport
o.n.m.j.c.project.BaseClientSideDevelopmentSupport
o.n.m.j.c.SharabilityUtility
o.n.m.j.c.project.ui.AbstractLogicalViewProvider
o.n.m.j.c.project.ui.ExtraLibrariesNode
o.n.m.j.c.project.ui.J2EEProjectProperties
o.n.m.j.c.project.ui.J2eePlatformUiSupport
o.n.m.j.c.project.ui.ProjectImportLocationWizardPanel
o.n.m.j.c.project.ui.ProjectLocationWizardPanel
o.n.m.j.c.project.ui.ProjectServerWizardPanel 
o.n.m.j.c.project.ui.UserProjectSettings
o.n.m.j.c.project.WhiteListUpdater

Let's discuss this and reach an agreement and then we can decide who is going to implement it. I do not mind doing it but I'm also OK if one of you want to do it themselves.

Deprecated code should be removed during the move if possible.

The code should be repackaged. The root package will be org.netbeans.modules.javaee.project and above classes will move into these subpacakges:

ArtifactCopyOnSaveSupport
BaseClientSideDevelopmentSupport
SharabilityUtility
ui.logicalview.AbstractLogicalViewProvider
ui.logicalview.ExtraLibrariesNode
ui.J2EEProjectProperties
ui.utils.J2eePlatformUiSupport
ui.wizard.ProjectImportLocationWizardPanel
ui.wizard.ProjectLocationWizardPanel
ui.wizard.ProjectServerWizardPanel 
ui.UserProjectSettings
WhiteListUpdater

This is just a proposal. What do you think?
Comment 1 Martin Fousek 2013-06-24 05:33:45 UTC
(In reply to comment #0)
> This should be next logical step of
> http://wiki.netbeans.org/J2eeCommonRefactoring right? 

Agreement. This will refactor out and move project specific classes into exclusive module. I suppose, on such a module should depend only project modules. As a side-effect it will clean up the list of classes unrelated to j2ee.common (it still depends whether the j2ee.common will survive as the Util's module or not).

> This is just a proposal. What do you think?

I agree with all described! I didn't study all classes in detail, but I suppose that all of them have similar purpose - be shared project's class.
Comment 2 Petr Jiricka 2013-06-24 08:59:27 UTC
I thought that we did not want to do this because moving UI code with a lot of bundle files is risky, but of course if it gets done, it will speed up the much needed refactoring of j2ee.common!
Comment 3 Martin Janicek 2013-06-24 11:41:11 UTC
(In reply to comment #0)
> This should be next logical step of
> http://wiki.netbeans.org/J2eeCommonRefactoring right?

I'm 100% for it! Only thing I would like to discuss is whether we should try to make the module "build-system independent" or not.

Most of the classes you have listed are Ant-dependent but there are some unrelated to any build system.

Ant-dependent (these are typically used by j2ee.clientproject, j2ee.ejbjarproject, j2ee.earproject and web.project):
o.n.m.j.c.SharabilityUtility
o.n.m.j.c.project.ArtifactCopyOnSaveSupport
o.n.m.j.c.project.ui.AbstractLogicalViewProvider
o.n.m.j.c.project.ui.ExtraLibrariesNode
o.n.m.j.c.project.ui.J2EEProjectProperties
o.n.m.j.c.project.ui.ProjectImportLocationPanel
o.n.m.j.c.project.ui.ProjectImportLocationWizardPanel
o.n.m.j.c.project.ui.ProjectLocationPanel
o.n.m.j.c.project.ui.ProjectLocationWizardPanel

Build-system independent: 
o.n.m.j.c.project.JavaEEProjectSettings
o.n.m.j.c.project.spi.JavaEEProjectSettingsImplementation
o.n.m.j.c.project.BaseClientSideDevelopmentSupport
o.n.m.j.c.project.ui.J2eePlatformUiSupport
o.n.m.j.c.project.ui.UserProjectSettings
o.n.m.j.c.project.WhiteListUpdater (this one is currently Ant-related but I'm going to rewrite it using JavaEEProjectSettings to be independent)

..I would like to see these two categories logically spited somehow. Simplest seems to be to create javaee.project.ant sub-package which will contains all of these. What do you think David?
Comment 4 David Konecny 2013-06-24 23:23:14 UTC
> I thought that we did not want to do this because moving UI code with a lot of
> bundle files is risky

It is an extra work but it would be beneficial I think.

Re. "ant" versus "maven" - we could do that

I'm also thinking that despite most of the packages being API packages we should include "api" in the package names. Here are proposed package names:

api.BaseClientSideDevelopmentSupport
api.ui.utils.J2eePlatformUiSupport
api.ui.UserProjectSettings
api.WhiteListUpdater
api.JavaEEProjectSettings
spi.JavaEEProjectSettingsImplementation

api.ant.ArtifactCopyOnSaveSupport
api.ant.SharabilityUtility
api.ant.ui.logicalview.AbstractLogicalViewProvider
api.ant.ui.logicalview.ExtraLibrariesNode
api.ant.ui.J2EEProjectProperties
api.ant.ui.wizard.ProjectImportLocationWizardPanel
api.ant.ui.wizard.ProjectLocationWizardPanel
api.ant.ui.wizard.ProjectServerWizardPanel
Comment 5 Quality Engineering 2013-06-25 02:46:17 UTC
Integrated into 'main-golden', will be available in build *201306242301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/c2e792e7c7d1
User: David Konecny <dkonecny@netbeans.org>
Log: #231687 - removing deprecated or unused APIs
Comment 6 Martin Janicek 2013-06-25 05:27:29 UTC
(In reply to comment #4)
> I'm also thinking that despite most of the packages being API packages we
> should include "api" in the package names.

Awesome, I was thinking about the same.

> Here are proposed package names:

Like it!
Comment 7 Martin Janicek 2013-06-25 05:31:39 UTC
BTW: I'm going to vacation on Thursday and won't be online for a week and a half, so I can help with the implementation only if the agreement about the final state will be by tomorrow
Comment 8 Martin Fousek 2013-06-25 07:35:14 UTC
(In reply to comment #4)
> I'm also thinking that despite most of the packages being API packages we
> should include "api" in the package names. Here are proposed package names:

Great idea guys! I was a little bit worry about making the base package as the API one (although in case of purely API modules it can be probably OK), but this will be solved by your proposal too.
Comment 9 David Konecny 2013-06-25 22:01:54 UTC
Sounds like we have an agreement.

Enjoy your holiday MartinJ. I would not worry about this issue much before your holiday but if you want to do some work on it I will not stop you. :-) When I have a spare moment at the end of the day I usually try to delete something from j2ee.common. :-) So I may do some work on this issue too.
Comment 10 David Konecny 2013-07-08 23:58:07 UTC
web-main#592a97c1d8cc - module established with some API/SPI. More classes to be moved later.
Comment 11 David Konecny 2013-07-09 04:35:52 UTC
38415bc59ad0 - moving WhiteListUpdater
Comment 12 David Konecny 2013-07-09 22:28:00 UTC
web-main#9e0807914a1d - most of remaining project APIs were moved
Comment 13 David Konecny 2013-07-10 01:39:13 UTC
be03937df357 - module layer were not updated properly

I think this issue is *overall* resolved. I can imagine there might be few small things to be improved. Feel free to file them here or as a new issues or in the wiki page. I updated it little bit to reflect current state: http://wiki.netbeans.org/J2eeCommonRefactoring
Comment 14 Quality Engineering 2013-07-11 04:13:09 UTC
Integrated into 'main-silver', will be available in build *201307102300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/592a97c1d8cc
User: David Konecny <dkonecny@netbeans.org>
Log: #231687 - create javaee.project module; first part; TBC