Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 93299 - API for adding a component to Run customizer panel
API for adding a component to Run customizer panel
Product: java
Classification: Unclassified
Component: Project
All All
: P2 (vote)
: 6.x
Assigned To: Milan Kubec
Depends on:
  Show dependency treegraph
Reported: 2007-01-26 12:41 UTC by Milan Kubec
Modified: 2007-02-07 10:36 UTC (History)
0 users

See Also:

patch file (12.37 KB, patch)
2007-01-29 15:31 UTC, Milan Kubec
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Kubec 2007-01-26 12:41:33 UTC
API for adding additional component into the Run customizer panel is needed. The
component will be used for setting additional properties for given configuration.

I propose following interface:

import org.netbeans.api.project.Project;

public interface ConfigComponentProvider {
     * Provides component that is added to Run Customizer panel of j2seproject
    JComponent createComponent(Project p, ConfigChangedListener listener);
     * Is called when the config is changed (or created), 
     * component is updated according to properties of the config
    void configUpdated(Map<String,String> props);
     * Callback listener for setting properties that are changed by changing
     * the component; null prop value means property will be removed from the
     * prop file
    interface ConfigChangedListener {
        void propertiesChanged(Map<String,String> updates);

Implementation of the interface will be set through META-INF/services.
Comment 1 Milan Kubec 2007-01-29 15:31:39 UTC
Created attachment 37781 [details]
patch file
Comment 2 Milan Kubec 2007-01-29 15:34:37 UTC
Please review attached diff with implementation. The API will be used by
javawebstart module. Thanks.
Comment 3 Milos Kleint 2007-01-31 09:42:42 UTC
minor nitpick.

given that the impl gets registered in meta-inf services and it's just for the
run panel in j2se customizer, I would expect a more specific name

ConfigComponentProvider --> J2SERunConfigProvider

Comment 4 Jesse Glick 2007-02-01 18:07:27 UTC
[JG01] "Implementation of the interface will be registered via
META-INF/services/." - "should be", not "will be", I guess. Also should say that
it should be registered to default lookup (e.g. META-INF/services).

[JG02] s/ConfigChangedListener/ConfigChangeListener/g for consistency.

[JG03] configUpdated leaves it unclear whether 'props' are evaluated properties
(from PropertyEvaluator.getProperties()), or raw properties (of the shared kind?).

[JG04; already mentioned in person, but repeating here for reference]
propertiesChanged also fails to specify whether these should be evaluated or raw
properties; and it unclear whether only shared properties can be set in this
way, or private properties as well.
Comment 5 Milan Kubec 2007-02-05 14:43:35 UTC
Milos: You are right the name should not be so general, I will change it.

[JG01], [JG02]: Done

[JG03]: props are not evaluated and it's all properties of given config (shared
+ private)

[JG04]: props are not evaluated and only shared properties can be set this way.

If JG03 and JG04 are considered OK I will update the javadoc and integrate.
Comment 6 Jesse Glick 2007-02-05 17:39:46 UTC
JG03 & JG04 are OK if it is documented that way.
Comment 7 Milan Kubec 2007-02-07 10:34:10 UTC

Checking in ui/customizer/CustomizerRun.form;
 <--  CustomizerRun.form
new revision: 1.14; previous revision: 1.13
Checking in ui/customizer/;
new revision: 1.23; previous revision: 1.22
RCS file:
Checking in api/;
initial revision: 1.1

Checking in;
new revision: 1.2; previous revision: 1.1
Comment 8 Milan Kubec 2007-02-07 10:35:04 UTC
Reopening to reassign.
Comment 9 Milan Kubec 2007-02-07 10:36:35 UTC

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo