Similar methods in ModuleBuildProperties and BuildProvider Follow
Why there are similar methods in ModuleBuildProperties and BuildProvider (getBuildConfigurable and getBuildParticipants)? When methods of ModuleBuildProperties are invoked? Is it correct to delegate from them to appropriate BuildProvider?
Please sign in to leave a comment.
BuildProvider delegates to ModuleBuildProperties, so it's more right to
implement something in ModuleBuildProperties. J2EEBuildParticipant's are
also collected from module components that implement this interface.
getBuildParticipants() is called on Java EE module build.
getBuildConfigurable() is now called only in our internal EJB, JavaEE
application and Web module settings editors (see
ModuleConfigurationEditorProvider), so it's up to you when to call them.
"Marat Radchenko" <valder@yandex.ru> wrote in message
news:1639341.1163792283978.JavaMail.itn@is.intellij.net...
No, it does not delegate :) It's up to module type developer to write a BuildProvider.
Will ModuleBuildProperties#getBuildParticipant be invoked from IDEA code?
Hmm... Could you provide more info on this?
As I've understood, this method is called upon building of any module type.
So it will never be invoked for my module type?
OK, then I'll throw UnsupportedOperationException :)
>> BuildProvider delegates to ModuleBuildProperties, so
>> it's more right to
>> implement something in ModuleBuildProperties.
Oh, yes, more precisely, it's DefaultBuildProvider that does the delegation.
It also collects module components.
>> J2EEBuildParticipant's are
>> also collected from module components that implement
>> this interface.
module.getComponents(J2EEBuildParticipant.class), and then append to this
array the participant from ModuleBuildProperties.
>
>> getBuildParticipants() is called on Java EE module
>> build.
For any module type where isJ2EE() is true.
>> getBuildConfigurable() is now called only in our
>> internal EJB, JavaEE
>> application and Web module settings editors (see
>> ModuleConfigurationEditorProvider), so it's up to you
>> when to call them.
Yes
BTW, there will be another (similar, but simpler) API for the same things in
6.5
"Marat Radchenko" <valder@yandex.ru> wrote in message
news:22745560.1163845966755.JavaMail.itn@is.intellij.net...
>> BuildProvider delegates to ModuleBuildProperties, so
>> it's more right to
>> implement something in ModuleBuildProperties.
>
>> J2EEBuildParticipant's are
>> also collected from module components that implement
>> this interface.
>
>> getBuildParticipants() is called on Java EE module
>> build.
>
>> getBuildConfigurable() is now called only in our
>> internal EJB, JavaEE
>> application and Web module settings editors (see
>> ModuleConfigurationEditorProvider), so it's up to you
>> when to call them.
Hmm... isJ2EE() == true??? Then how modules with isJ2EE() == false are built?
DefaultBuildProvider is good. And is there DefaultBuildDescriptor? :)
My plugin contains several module types and it seems to me I have to make N absolutely identical BuildDescriptors, which differ only in component name. Not very beautiful. Or, maybe, there is some way to attach one module component to several module types?
Currently I have:
com.intellij.javaee.make.ModuleBuildDescriptor com.mycompany.AModuleBuildDescriptor com.intellij.javaee.make.ModuleBuildDescriptor com.mycompany.BModuleBuildDescriptor ]]>
DefaultBuildProvider is good. And is there DefaultBuildDescriptor? :)
My plugin contains several module types and it seems to me I have to make N absolutely identical BuildDescriptors, which differ only in component name. Not very beautiful. Or, maybe, there is some way to attach one module component to several module types?
Currently I have:
com.intellij.javaee.make.ModuleBuildDescriptor com.mycompany.AModuleBuildDescriptor com.intellij.javaee.make.ModuleBuildDescriptor com.mycompany.BModuleBuildDescriptor ]]>
DefaultBuildProvider is good. And is there DefaultBuildDescriptor? :)
My plugin contains several module types and it seems to me I have to make N absolutely identical BuildDescriptors, which differ only in component name. Not very beautiful. Or, maybe, there is some way to attach one module component to several module types?
Currently I have:
com.intellij.javaee.make.ModuleBuildDescriptor com.mycompany.AModuleBuildDescriptor com.intellij.javaee.make.ModuleBuildDescriptor com.mycompany.BModuleBuildDescriptor ]]>
Damn :) it wasn't intentional :)
As usual. Without all this jar packing and copying stuff.
J2EEModuleBuildDescriptor seems to be very default. Absolutely empty.
>
>
You can write
com.intellij.javaee.make.ModuleBuildDescriptor com.mycompany.ModuleBuildDescriptor ]]>
I love it :) Somehow skipped it when was searching.
Thanks. Hope this will go into docs so others will know that there is such useful feature.
I disagree :) I have module type with isJ2EE() == false and all the same machinery is invoked for it (BuildProvider & friends). Actually I don't see difference at this point between J2EE and not-J2EE module type. Have I missed something?
Oh yes... It wasn't very evident from the code, sorry. I think that it's
more bug than feature.
"Marat Radchenko" <valder@yandex.ru> wrote in message
news:23135466.1164052294154.JavaMail.itn@is.intellij.net...
>I disagree :) I have module type with isJ2EE() == false and all the same
>machinery is invoked for it (BuildProvider & friends). Actually I don't see
>difference at this point between J2EE and not-J2EE module type. Have I
>missed something?