Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ptp-user] PTP initalizastion of widget values

Hello;

I have a question about the PerformanceAnalysisTab class in PTP, more specifically about the handleUpdate method.

The method is fairly simple:

        private void handleUpdate() {
                launchTabParent.initializeFrom(this.launchConfiguration);

                for (IJAXBLaunchConfigurationTab tabControl : tabControllers) {
                        for (IUpdateModel m : tabControl.getLocalWidgets().values()) {
                                m.initialize(this.launchConfiguration, vmap, launchTabParent.getVariableMap());
                        }

                        ((JAXBDynamicLaunchConfigurationTab) tabControl).initializeFrom(this.launchConfiguration);
                }
        }

The question I have is why do I need to initialize all the widget values before calling initializeFrom, when that method initializes them again?

        public RMLaunchValidation initializeFrom(ILaunchConfiguration configuration) {
                listenerConfiguration = configuration;
                try {
                        IUpdateHandler handler = getParent().getUpdateHandler();

                        viewers.clear();
                        for (Map.Entry<Object, IUpdateModel> e : localWidgets.entrySet()) {
                                Object key = e.getKey();
                                if (key instanceof Viewer) {
                                        Viewer viewer = (Viewer) key;
                                        viewers.add(viewer);
                                }
                                handler.addUpdateModelEntry(key, e.getValue());
                        }

                        LCVariableMap lcMap = parentTab.getVariableMap();
                        IVariableMap rmMap = fControl.getEnvironment();

                        for (IUpdateModel m : localWidgets.values()) {
                                m.initialize(configuration, rmMap, lcMap);        <--- initialized again
                        }

Do I need to explicitly initialize the widget values before calling initializeFrom? The problem I have is that the initialization may pop up some error windows and I get them twice.

Thanks,



Serban Maerean, CISSP 120913
HPC Tools Team
HPC Security/IPv6
T/L: 293-9770, Tel.: 845-433-9770
E-mail: serban@xxxxxxxxxx

Back to the top