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.

View | Details | Raw Unified | Return to bug 163411
Collapse All | Expand All

(-)a/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/Bundle.properties (-2 / +2 lines)
Lines 106-112 Link Here
106
AvailableTableModel_Columns_Name=Name
106
AvailableTableModel_Columns_Name=Name
107
AvailableTableModel_Source_Category=Source
107
AvailableTableModel_Source_Category=Source
108
AvailableTableModel_Columns_Category=Category
108
AvailableTableModel_Columns_Category=Category
109
InstalledTableModel_Columns_Uninstall=Uninstall
109
InstalledTableModel_Columns_Uninstall=Select
110
InstalledTableModel_Columns_Name=Name
110
InstalledTableModel_Columns_Name=Name
111
InstalledTableModel_Columns_Installed=Installed
111
InstalledTableModel_Columns_Installed=Installed
112
InstalledTableModel_Columns_Category=Category
112
InstalledTableModel_Columns_Category=Category
Lines 185-188 Link Here
185
NetworkProblemPanel_ACD=N/A
185
NetworkProblemPanel_ACD=N/A
186
NetworkProblemPanel_taMessage=Message of Network Problem
186
NetworkProblemPanel_taMessage=Message of Network Problem
187
NetworkProblemPanel_taTitle_ACN=Network Problem
187
NetworkProblemPanel_taTitle_ACN=Network Problem
188
UnitTab.advView.text=Advanced View
188
UnitTab.detailView.text=Sho&w details
(-)a/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/PluginManagerUI.java (-8 / +13 lines)
Lines 95-109 Link Here
95
95
96
    public static final String[] TAB_NAMES = { "update", "available", "local", "installed" }; //NOI18N
96
    public static final String[] TAB_NAMES = { "update", "available", "local", "installed" }; //NOI18N
97
    private int initialTabToSelect;
97
    private int initialTabToSelect;
98
    private boolean advancedView;
98
    private boolean detailView;
99
    public static final String DETAIL_VIEW_SELECTED_PROP = "plugin.manager.detail.view.selected";//NOI18N
99
    
100
    
100
    public PluginManagerUI (JButton closeButton ) {
101
    public PluginManagerUI (JButton closeButton ) {
101
        this(closeButton, null, true);
102
        this(closeButton, null, true);
102
    }
103
    }
104
105
    public PluginManagerUI (JButton closeButton, Object initialTab) {
106
        this(closeButton, initialTab, Boolean.getBoolean(DETAIL_VIEW_SELECTED_PROP));
107
    }
103
    
108
    
104
    /** Creates new form PluginManagerUI */
109
    /** Creates new form PluginManagerUI */
105
    public PluginManagerUI (JButton closeButton, Object initialTab, boolean advancedView) {
110
    public PluginManagerUI (JButton closeButton, Object initialTab, boolean detailView) {
106
        this.advancedView = advancedView;
111
        this.detailView = detailView;
107
        this.closeButton = closeButton;
112
        this.closeButton = closeButton;
108
        int selIndex = -1;
113
        int selIndex = -1;
109
        for( int i=0; i<TAB_NAMES.length; i++ ) {
114
        for( int i=0; i<TAB_NAMES.length; i++ ) {
Lines 126-137 Link Here
126
        });
131
        });
127
    }
132
    }
128
133
129
    boolean isAdvancedView() {
134
    boolean isDetailView() {
130
        return advancedView;
135
        return detailView;
131
    }
136
    }
132
137
133
    void setAdvancedView(boolean advancedView) {
138
    void setDetailView(boolean detailView) {
134
        this.advancedView = advancedView;
139
        this.detailView = detailView;
135
    }
140
    }
136
141
137
    private Window findWindowParent () {
142
    private Window findWindowParent () {
Lines 582-588 Link Here
582
            
587
            
583
            updateTableModel.setUnits(units);
588
            updateTableModel.setUnits(units);
584
            List<UpdateUnit> features = UpdateManager.getDefault().getUpdateUnits(UpdateManager.TYPE.FEATURE);
589
            List<UpdateUnit> features = UpdateManager.getDefault().getUpdateUnits(UpdateManager.TYPE.FEATURE);
585
            if (isAdvancedView() && !features.isEmpty()) {
590
            if (isDetailView() && !features.isEmpty()) {
586
                installTableModel.setUnits(units);
591
                installTableModel.setUnits(units);
587
            } else {
592
            } else {
588
                installTableModel.setUnits(units, features);
593
                installTableModel.setUnits(units, features);
(-)a/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/UnitTab.form (-11 / +22 lines)
Lines 20-26 Link Here
20
              <Group type="103" groupAlignment="0" attributes="0">
20
              <Group type="103" groupAlignment="0" attributes="0">
21
                  <Group type="102" alignment="1" attributes="0">
21
                  <Group type="102" alignment="1" attributes="0">
22
                      <Component id="topButton" min="-2" max="-2" attributes="0"/>
22
                      <Component id="topButton" min="-2" max="-2" attributes="0"/>
23
                      <EmptySpace pref="456" max="32767" attributes="0"/>
23
                      <EmptySpace type="separate" max="-2" attributes="0"/>
24
                      <Component id="detailView" min="-2" max="-2" attributes="0"/>
25
                      <EmptySpace pref="375" max="32767" attributes="0"/>
24
                      <Component id="lSearch" min="-2" max="-2" attributes="0"/>
26
                      <Component id="lSearch" min="-2" max="-2" attributes="0"/>
25
                      <EmptySpace min="-2" pref="4" max="-2" attributes="0"/>
27
                      <EmptySpace min="-2" pref="4" max="-2" attributes="0"/>
26
                      <Component id="tfSearch" min="-2" pref="114" max="-2" attributes="0"/>
28
                      <Component id="tfSearch" min="-2" pref="114" max="-2" attributes="0"/>
Lines 28-39 Link Here
28
                  <Component id="spTab" alignment="0" pref="712" max="32767" attributes="0"/>
30
                  <Component id="spTab" alignment="0" pref="712" max="32767" attributes="0"/>
29
                  <Group type="102" alignment="0" attributes="0">
31
                  <Group type="102" alignment="0" attributes="0">
30
                      <Component id="bTabAction" min="-2" max="-2" attributes="0"/>
32
                      <Component id="bTabAction" min="-2" max="-2" attributes="0"/>
31
                      <EmptySpace min="-2" max="-2" attributes="0"/>
33
                      <EmptySpace max="-2" attributes="0"/>
34
                      <Component id="bTabAction1" min="-2" max="-2" attributes="0"/>
35
                      <EmptySpace max="-2" attributes="0"/>
36
                      <Component id="bTabAction2" min="-2" max="-2" attributes="0"/>
37
                      <EmptySpace max="-2" attributes="0"/>
32
                      <Component id="lSelectionInfo" min="-2" max="-2" attributes="2"/>
38
                      <Component id="lSelectionInfo" min="-2" max="-2" attributes="2"/>
33
                      <EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
39
                      <EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
34
                      <Component id="lWarning" pref="527" max="32767" attributes="0"/>
40
                      <Component id="lWarning" pref="482" max="32767" attributes="0"/>
35
                      <EmptySpace max="-2" attributes="0"/>
41
                      <EmptySpace min="-2" pref="99" max="-2" attributes="0"/>
36
                      <Component id="advView" min="-2" max="-2" attributes="0"/>
37
                  </Group>
42
                  </Group>
38
              </Group>
43
              </Group>
39
              <EmptySpace min="-2" max="-2" attributes="0"/>
44
              <EmptySpace min="-2" max="-2" attributes="0"/>
Lines 48-62 Link Here
48
                  <Component id="tfSearch" alignment="2" min="-2" max="-2" attributes="0"/>
53
                  <Component id="tfSearch" alignment="2" min="-2" max="-2" attributes="0"/>
49
                  <Component id="lSearch" alignment="2" min="-2" max="-2" attributes="0"/>
54
                  <Component id="lSearch" alignment="2" min="-2" max="-2" attributes="0"/>
50
                  <Component id="topButton" alignment="2" min="-2" max="-2" attributes="0"/>
55
                  <Component id="topButton" alignment="2" min="-2" max="-2" attributes="0"/>
56
                  <Component id="detailView" alignment="2" min="-2" max="-2" attributes="0"/>
51
              </Group>
57
              </Group>
52
              <EmptySpace min="-2" max="-2" attributes="0"/>
58
              <EmptySpace min="-2" max="-2" attributes="0"/>
53
              <Component id="spTab" pref="41" max="32767" attributes="0"/>
59
              <Component id="spTab" pref="73" max="32767" attributes="0"/>
54
              <EmptySpace min="-2" max="-2" attributes="0"/>
60
              <EmptySpace min="-2" max="-2" attributes="0"/>
55
              <Group type="103" groupAlignment="2" max="-2" attributes="0">
61
              <Group type="103" groupAlignment="2" max="-2" attributes="0">
56
                  <Component id="bTabAction" alignment="2" min="-2" max="-2" attributes="1"/>
62
                  <Component id="bTabAction" alignment="2" min="-2" max="-2" attributes="1"/>
57
                  <Component id="lSelectionInfo" linkSize="2" alignment="2" max="32767" attributes="1"/>
63
                  <Component id="lSelectionInfo" linkSize="2" alignment="2" max="32767" attributes="1"/>
58
                  <Component id="lWarning" linkSize="2" alignment="2" min="-2" max="-2" attributes="0"/>
64
                  <Component id="lWarning" linkSize="2" alignment="2" min="-2" max="-2" attributes="0"/>
59
                  <Component id="advView" alignment="2" min="-2" max="-2" attributes="0"/>
65
                  <Component id="bTabAction1" alignment="2" min="-2" max="-2" attributes="1"/>
66
                  <Component id="bTabAction2" alignment="2" min="-2" max="-2" attributes="1"/>
60
              </Group>
67
              </Group>
61
              <EmptySpace min="-2" max="-2" attributes="0"/>
68
              <EmptySpace min="-2" max="-2" attributes="0"/>
62
          </Group>
69
          </Group>
Lines 118-135 Link Here
118
        <AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
125
        <AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
119
      </AuxValues>
126
      </AuxValues>
120
    </Component>
127
    </Component>
121
    <Component class="javax.swing.JCheckBox" name="advView">
128
    <Component class="javax.swing.JCheckBox" name="detailView">
122
      <Properties>
129
      <Properties>
123
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
130
        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
124
          <ResourceString bundle="org/netbeans/modules/autoupdate/ui/Bundle.properties" key="UnitTab.advView.text" replaceFormat="org.openide.util.NbBundle.getBundle({sourceFileName}.class).getString(&quot;{key}&quot;)"/>
131
          <ResourceString bundle="org/netbeans/modules/autoupdate/ui/Bundle.properties" key="UnitTab.detailView.text" replaceFormat="org.openide.util.NbBundle.getBundle({sourceFileName}.class).getString(&quot;{key}&quot;)"/>
125
        </Property>
132
        </Property>
126
      </Properties>
133
      </Properties>
127
      <Events>
134
      <Events>
128
        <EventHandler event="itemStateChanged" listener="java.awt.event.ItemListener" parameters="java.awt.event.ItemEvent" handler="advViewItemStateChanged"/>
135
        <EventHandler event="itemStateChanged" listener="java.awt.event.ItemListener" parameters="java.awt.event.ItemEvent" handler="detailViewItemStateChanged"/>
129
      </Events>
136
      </Events>
130
      <AuxValues>
137
      <AuxValues>
131
        <AuxValue name="JavaCodeGenerator_InitCodePre" type="java.lang.String" value="advViewInit();"/>
138
        <AuxValue name="JavaCodeGenerator_InitCodePre" type="java.lang.String" value="detailViewInit();"/>
132
      </AuxValues>
139
      </AuxValues>
133
    </Component>
140
    </Component>
141
    <Component class="javax.swing.JButton" name="bTabAction1">
142
    </Component>
143
    <Component class="javax.swing.JButton" name="bTabAction2">
144
    </Component>
134
  </SubComponents>
145
  </SubComponents>
135
</Form>
146
</Form>
(-)a/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/UnitTab.java (-83 / +165 lines)
Lines 41-46 Link Here
41
41
42
package org.netbeans.modules.autoupdate.ui;
42
package org.netbeans.modules.autoupdate.ui;
43
43
44
import org.netbeans.api.autoupdate.OperationContainer;
45
import org.netbeans.api.autoupdate.OperationSupport;
44
import org.netbeans.modules.autoupdate.ui.wizards.UninstallUnitWizard;
46
import org.netbeans.modules.autoupdate.ui.wizards.UninstallUnitWizard;
45
import org.netbeans.modules.autoupdate.ui.wizards.InstallUnitWizard;
47
import org.netbeans.modules.autoupdate.ui.wizards.InstallUnitWizard;
46
import java.awt.Component;
48
import java.awt.Component;
Lines 69-74 Link Here
69
import java.util.prefs.PreferenceChangeListener;
71
import java.util.prefs.PreferenceChangeListener;
70
import java.util.prefs.Preferences;
72
import java.util.prefs.Preferences;
71
import javax.swing.AbstractAction;
73
import javax.swing.AbstractAction;
74
import javax.swing.AbstractButton;
72
import javax.swing.Action;
75
import javax.swing.Action;
73
import javax.swing.Icon;
76
import javax.swing.Icon;
74
import javax.swing.ImageIcon;
77
import javax.swing.ImageIcon;
Lines 120-133 Link Here
120
    private String filter = "";
123
    private String filter = "";
121
    private PluginManagerUI manager = null;
124
    private PluginManagerUI manager = null;
122
    private PopupActionSupport popupActionsSupport;
125
    private PopupActionSupport popupActionsSupport;
123
    private RowTabAction activateAction;
126
    private TabAction activateAction;
124
    private RowTabAction deactivateAction;
127
    private TabAction deactivateAction;
125
    private TabAction reloadAction;
128
    private TabAction reloadAction;
126
    private RowTabAction moreAction;
129
    private RowTabAction moreAction;
127
    private RowTabAction lessAction;
130
    private RowTabAction lessAction;
128
    private RowTabAction removeLocallyDownloaded;
131
    private RowTabAction removeLocallyDownloaded;
129
    private static final String ADVANCED_VIEW_SELECTED_PROP = "plugin.manager.advanced.view.selected";//NOI18N
132
    
130
131
    private static Boolean isWaitingForExternal = false;
133
    private static Boolean isWaitingForExternal = false;
132
    
134
    
133
    private static final RequestProcessor SEARCH_PROCESSOR = new RequestProcessor ("search-processor");
135
    private static final RequestProcessor SEARCH_PROCESSOR = new RequestProcessor ("search-processor");
Lines 231-239 Link Here
231
        boolean enabled = !waitingState;
233
        boolean enabled = !waitingState;
232
        Component[] all = getComponents ();
234
        Component[] all = getComponents ();
233
        for (Component component : all) {
235
        for (Component component : all) {
234
            if (component == bTabAction) {
236
            if (component == bTabAction || component == bTabAction1 || component == bTabAction2) {
235
                if (enabled) {
237
                if (enabled) {
236
                    component.setEnabled (model.getMarkedUnits ().size () > 0);
238
                    TabAction a = (TabAction) ((AbstractButton)component).getAction();
239
                    component.setEnabled (a == null ? false : a.isEnabled());
237
                } else {
240
                } else {
238
                    component.setEnabled (enabled);
241
                    component.setEnabled (enabled);
239
                }
242
                }
Lines 325-331 Link Here
325
    private Collection<Unit> oldUnits = Collections.emptySet ();
328
    private Collection<Unit> oldUnits = Collections.emptySet ();
326
    
329
    
327
    public void refreshState () {
330
    public void refreshState () {
328
        advView.setVisible(this.model.supportsTwoViews());
331
        detailView.setVisible(this.model.supportsTwoViews());
329
        final Collection<Unit> units = model.getMarkedUnits ();
332
        final Collection<Unit> units = model.getMarkedUnits ();
330
        if (oldUnits.equals (units)) {
333
        if (oldUnits.equals (units)) {
331
            return ;
334
            return ;
Lines 338-344 Link Here
338
        } else {
341
        } else {
339
            setSelectionInfo (null, units.size ());
342
            setSelectionInfo (null, units.size ());
340
        }
343
        }
341
        getDefaultAction ().setEnabled (units.size () > 0);
344
        getDefaultAction ().tableDataChanged(units);
342
        boolean alreadyScheduled = false;
345
        boolean alreadyScheduled = false;
343
        if (getDownloadSizeTask != null) {
346
        if (getDownloadSizeTask != null) {
344
            if (getDownloadSizeTask.getDelay () > 0) {
347
            if (getDownloadSizeTask.getDelay () > 0) {
Lines 383-400 Link Here
383
            
386
            
384
            activateAction = new ActivateAction ();
387
            activateAction = new ActivateAction ();
385
            deactivateAction = new DeactivateAction ();
388
            deactivateAction = new DeactivateAction ();
389
            UninstallAction uninstall = new UninstallAction();
386
            
390
            
387
            forPopup = new TabAction[] {
391
            forPopup = new TabAction[] {
388
                activateAction, deactivateAction,activateCategoryAction,deactivateCategoryAction,
392
                activateAction, deactivateAction,activateCategoryAction,deactivateCategoryAction,
389
                checkCategoryAction, uncheckCategoryAction,
393
                checkCategoryAction, uncheckCategoryAction,
390
                checkAllAction, uncheckAllAction, new CheckAction ()
394
                checkAllAction, uncheckAllAction, new CheckAction (), uninstall
391
            };
395
            };
396
            bTabAction1.setVisible(true);
397
            bTabAction2.setVisible(true);
398
            bTabAction.setAction(activateAction);
399
            bTabAction1.setAction(deactivateAction);
400
            bTabAction2.setAction (uninstall);
401
            prepareTopButton (reloadAction = new ReloadAction ());
402
            table.setEnableRenderer (new EnableRenderer ());
403
            initReloadTooltip();
404
            break;
392
        }
405
        }
393
        bTabAction.setAction (new UninstallAction ());
394
        prepareTopButton (reloadAction = new ReloadAction ());
395
        table.setEnableRenderer (new EnableRenderer ());
396
         initReloadTooltip();
397
        break;
398
        case UPDATE :
406
        case UPDATE :
399
        {
407
        {
400
            RowTabAction selectCategoryAction = new CheckCategoryAction ();
408
            RowTabAction selectCategoryAction = new CheckCategoryAction ();
Lines 411-416 Link Here
411
            };
419
            };
412
        }
420
        }
413
        bTabAction.setAction (new UpdateAction ());
421
        bTabAction.setAction (new UpdateAction ());
422
        bTabAction1.setVisible(false);
423
        bTabAction2.setVisible(false);
414
        prepareTopButton (reloadAction = new ReloadAction ());
424
        prepareTopButton (reloadAction = new ReloadAction ());
415
         initReloadTooltip();
425
         initReloadTooltip();
416
        break;
426
        break;
Lines 430-435 Link Here
430
            };
440
            };
431
        }
441
        }
432
        bTabAction.setAction (new AvailableAction ());
442
        bTabAction.setAction (new AvailableAction ());
443
        bTabAction1.setVisible(false);
444
        bTabAction2.setVisible(false);
433
        prepareTopButton (reloadAction = new ReloadAction ());
445
        prepareTopButton (reloadAction = new ReloadAction ());
434
        table.setEnableRenderer (new SourceCategoryRenderer ());
446
        table.setEnableRenderer (new SourceCategoryRenderer ());
435
         initReloadTooltip();
447
         initReloadTooltip();
Lines 442-447 Link Here
442
                };
454
                };
443
            }
455
            }
444
            bTabAction.setAction (new LocalUpdateAction ());
456
            bTabAction.setAction (new LocalUpdateAction ());
457
            bTabAction1.setVisible(false);
458
            bTabAction2.setVisible(false);
445
            prepareTopButton (new AddLocallyDownloadedAction ());
459
            prepareTopButton (new AddLocallyDownloadedAction ());
446
            break;
460
            break;
447
        }
461
        }
Lines 529-537 Link Here
529
                    //selectedRow is selected
543
                    //selectedRow is selected
530
                    Action action = null;
544
                    Action action = null;
531
                    if (activateAction != null && activateAction.isEnabled ()) {
545
                    if (activateAction != null && activateAction.isEnabled ()) {
532
                        action = activateAction;
546
                        //action = activateAction;
533
                    } else if (deactivateAction != null && deactivateAction.isEnabled ()) {
547
                    } else if (deactivateAction != null && deactivateAction.isEnabled ()) {
534
                        action = deactivateAction;
548
                        //action = deactivateAction;
535
                    } else if (removeLocallyDownloaded != null && removeLocallyDownloaded.isEnabled ()) {
549
                    } else if (removeLocallyDownloaded != null && removeLocallyDownloaded.isEnabled ()) {
536
                        action = removeLocallyDownloaded;
550
                        action = removeLocallyDownloaded;
537
                    }
551
                    }
Lines 589-595 Link Here
589
        spTab = new javax.swing.JSplitPane();
603
        spTab = new javax.swing.JSplitPane();
590
        topButton = new javax.swing.JButton();
604
        topButton = new javax.swing.JButton();
591
        lWarning = new javax.swing.JLabel();
605
        lWarning = new javax.swing.JLabel();
592
        advView = new javax.swing.JCheckBox();
606
        detailView = new javax.swing.JCheckBox();
607
        bTabAction1 = new javax.swing.JButton();
608
        bTabAction2 = new javax.swing.JButton();
593
609
594
        lSearch.setLabelFor(tfSearch);
610
        lSearch.setLabelFor(tfSearch);
595
        org.openide.awt.Mnemonics.setLocalizedText(lSearch, org.openide.util.NbBundle.getMessage(UnitTab.class, "lSearch1.text")); // NOI18N
611
        org.openide.awt.Mnemonics.setLocalizedText(lSearch, org.openide.util.NbBundle.getMessage(UnitTab.class, "lSearch1.text")); // NOI18N
Lines 601-611 Link Here
601
617
602
        org.openide.awt.Mnemonics.setLocalizedText(topButton, "jButton1");
618
        org.openide.awt.Mnemonics.setLocalizedText(topButton, "jButton1");
603
619
604
        advViewInit();
620
        detailViewInit();
605
        org.openide.awt.Mnemonics.setLocalizedText(advView, org.openide.util.NbBundle.getBundle(UnitTab.class).getString("UnitTab.advView.text")); // NOI18N
621
        org.openide.awt.Mnemonics.setLocalizedText(detailView, org.openide.util.NbBundle.getBundle(UnitTab.class).getString("UnitTab.detailView.text")); // NOI18N
606
        advView.addItemListener(new java.awt.event.ItemListener() {
622
        detailView.addItemListener(new java.awt.event.ItemListener() {
607
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
623
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
608
                advViewItemStateChanged(evt);
624
                detailViewItemStateChanged(evt);
609
            }
625
            }
610
        });
626
        });
611
627
Lines 618-624 Link Here
618
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
634
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
619
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
635
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
620
                        .add(topButton)
636
                        .add(topButton)
621
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 456, Short.MAX_VALUE)
637
                        .add(18, 18, 18)
638
                        .add(detailView)
639
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 375, Short.MAX_VALUE)
622
                        .add(lSearch)
640
                        .add(lSearch)
623
                        .add(4, 4, 4)
641
                        .add(4, 4, 4)
624
                        .add(tfSearch, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 114, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
642
                        .add(tfSearch, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 114, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
Lines 626-636 Link Here
626
                    .add(layout.createSequentialGroup()
644
                    .add(layout.createSequentialGroup()
627
                        .add(bTabAction)
645
                        .add(bTabAction)
628
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
646
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
647
                        .add(bTabAction1)
648
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
649
                        .add(bTabAction2)
650
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
629
                        .add(lSelectionInfo)
651
                        .add(lSelectionInfo)
630
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
652
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
631
                        .add(lWarning, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 527, Short.MAX_VALUE)
653
                        .add(lWarning, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 482, Short.MAX_VALUE)
632
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
654
                        .add(99, 99, 99)))
633
                        .add(advView)))
634
                .addContainerGap())
655
                .addContainerGap())
635
        );
656
        );
636
        layout.setVerticalGroup(
657
        layout.setVerticalGroup(
Lines 640-654 Link Here
640
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.CENTER)
661
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.CENTER)
641
                    .add(tfSearch, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
662
                    .add(tfSearch, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
642
                    .add(lSearch)
663
                    .add(lSearch)
643
                    .add(topButton))
664
                    .add(topButton)
665
                    .add(detailView))
644
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
666
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
645
                .add(spTab, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 41, Short.MAX_VALUE)
667
                .add(spTab, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 73, Short.MAX_VALUE)
646
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
668
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
647
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.CENTER, false)
669
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.CENTER, false)
648
                    .add(bTabAction)
670
                    .add(bTabAction)
649
                    .add(lSelectionInfo, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
671
                    .add(lSelectionInfo, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
650
                    .add(lWarning)
672
                    .add(lWarning)
651
                    .add(advView))
673
                    .add(bTabAction1)
674
                    .add(bTabAction2))
652
                .addContainerGap())
675
                .addContainerGap())
653
        );
676
        );
654
677
Lines 659-676 Link Here
659
        topButton.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(UnitTab.class, "ACD_Reload")); // NOI18N
682
        topButton.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(UnitTab.class, "ACD_Reload")); // NOI18N
660
    }// </editor-fold>//GEN-END:initComponents
683
    }// </editor-fold>//GEN-END:initComponents
661
684
662
    private void advViewItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_advViewItemStateChanged
685
    private void detailViewItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_detailViewItemStateChanged
663
        if (this.model.supportsTwoViews()) {
686
        if (this.model.supportsTwoViews()) {
664
            manager.setAdvancedView(advView.isSelected());
687
            manager.setDetailView(detailView.isSelected());
665
            manager.updateUnitsChanged();
688
            manager.updateUnitsChanged();
666
            System.setProperty(ADVANCED_VIEW_SELECTED_PROP, "" + advView.isSelected());
689
            System.setProperty(PluginManagerUI.DETAIL_VIEW_SELECTED_PROP, "" + detailView.isSelected());
667
        }
690
        }
668
    }//GEN-LAST:event_advViewItemStateChanged
691
}//GEN-LAST:event_detailViewItemStateChanged
669
692
670
    private void advViewInit() {
693
    private void detailViewInit() {
671
        advView.setVisible(this.model.supportsTwoViews());
694
        detailView.setVisible(this.model.supportsTwoViews());
672
        if (this.model.supportsTwoViews()) {            
695
        if (this.model.supportsTwoViews()) {            
673
            advView.setSelected(Boolean.getBoolean(ADVANCED_VIEW_SELECTED_PROP));
696
            detailView.setSelected(Boolean.getBoolean(PluginManagerUI.DETAIL_VIEW_SELECTED_PROP));
674
        }
697
        }
675
    }
698
    }
676
    
699
    
Lines 1021-1027 Link Here
1021
        }
1044
        }
1022
        
1045
        
1023
        
1046
        
1024
        public abstract void performerImpl ();        
1047
        public abstract void performerImpl ();
1025
    }
1048
    }
1026
    
1049
    
1027
    private abstract class RowTabAction extends TabAction {
1050
    private abstract class RowTabAction extends TabAction {
Lines 1269-1278 Link Here
1269
        }
1292
        }
1270
    }
1293
    }
1271
    
1294
    
1272
    private class ActivateAction extends RowTabAction {
1295
    private class ActivateAction extends TabAction {
1273
        public ActivateAction () {
1296
        public ActivateAction () {
1274
            super ("UnitTab_ActivateAction", /*KeyStroke.getKeyStroke (KeyEvent.VK_E, KeyEvent.CTRL_DOWN_MASK),*/ "EnableDisable");
1297
            super ("UnitTab_ActivateAction", /*KeyStroke.getKeyStroke (KeyEvent.VK_E, KeyEvent.CTRL_DOWN_MASK),*/ "EnableDisable");
1275
        }
1298
        }
1299
1300
        @Override
1301
        public void tableDataChanged(Collection<Unit> units) {
1302
            if (units.isEmpty()) {
1303
                setEnabled(false);
1304
                return;
1305
            }
1306
            for (Unit u : units) {
1307
                if (!isEnabled(u)) {
1308
                    setEnabled(false);
1309
                    return;
1310
                }
1311
            }
1312
            setEnabled(true);
1313
        }
1314
1315
        @Override
1316
        public void performerImpl() {
1317
            final int row = getSelectedRow ();
1318
            final Map<String, Boolean> state = UnitCategoryTableModel.captureState (model.getUnits ());
1319
            OperationContainer<OperationSupport> c = Containers.forEnable();
1320
            for (Unit u : model.getUnits()) {
1321
                if (u.isMarked()) {
1322
                    c.add(u.updateUnit, u.getRelevantElement());
1323
                }
1324
            }
1325
            UninstallUnitWizard wizard = new UninstallUnitWizard ();
1326
            wizard.invokeWizard (true);
1327
            Containers.forEnable ().removeAll ();
1328
            restoreSelectedRow(row);
1329
            refreshState ();
1330
            focusTable ();
1331
        }
1332
        /*
1333
        public void performerImpl (Unit u) {
1334
            Unit.Installed unit = (Unit.Installed)u;
1335
            final int row = getSelectedRow();
1336
1337
            if (!unit.getRelevantElement ().isEnabled ()) {
1338
                OperationInfo info = Containers.forEnable ().add (unit.updateUnit, unit.getRelevantElement ());
1339
                assert info != null;
1340
                UninstallUnitWizard wizard = new UninstallUnitWizard ();
1341
                wizard.invokeWizard (true);
1342
                Containers.forEnable ().removeAll ();
1343
            }
1344
            fireUpdataUnitChange ();
1345
            restoreSelectedRow(row);
1346
            focusTable();
1347
        }
1348
         */
1276
        
1349
        
1277
        protected boolean isEnabled (Unit u) {
1350
        protected boolean isEnabled (Unit u) {
1278
            boolean retval = false;
1351
            boolean retval = false;
Lines 1290-1316 Link Here
1290
            }*/
1363
            }*/
1291
            return getActionName ();
1364
            return getActionName ();
1292
        }
1365
        }
1293
        public void performerImpl (Unit u) {
1294
            Unit.Installed unit = (Unit.Installed)u;
1295
            final int row = getSelectedRow();
1296
            
1297
            if (!unit.getRelevantElement ().isEnabled ()) {
1298
                OperationInfo info = Containers.forEnable ().add (unit.updateUnit, unit.getRelevantElement ());
1299
                assert info != null;
1300
                UninstallUnitWizard wizard = new UninstallUnitWizard ();
1301
                wizard.invokeWizard (true);
1302
                Containers.forEnable ().removeAll ();
1303
            }
1304
            fireUpdataUnitChange ();
1305
            restoreSelectedRow(row);
1306
            focusTable();
1307
        }
1308
        
1309
        
1310
        @Override
1311
        protected boolean isVisible (Unit u) {
1312
            return  false;
1313
        }
1314
    }
1366
    }
1315
    
1367
    
1316
    private class ActivateCategoryAction extends RowTabAction {
1368
    private class ActivateCategoryAction extends RowTabAction {
Lines 1374-1384 Link Here
1374
    }
1426
    }
1375
    
1427
    
1376
    
1428
    
1377
    private class DeactivateAction extends RowTabAction {
1429
    private class DeactivateAction extends TabAction {
1378
        public DeactivateAction () {
1430
        public DeactivateAction () {
1379
            super ("UnitTab_DeactivateAction", /*KeyStroke.getKeyStroke (KeyEvent.VK_D, KeyEvent.CTRL_DOWN_MASK),*/ "EnableDisable");
1431
            super ("UnitTab_DeactivateAction", /*KeyStroke.getKeyStroke (KeyEvent.VK_D, KeyEvent.CTRL_DOWN_MASK),*/ "EnableDisable");
1380
        }
1432
        }
1381
        
1433
        
1434
        @Override
1435
        public void tableDataChanged(Collection<Unit> units) {
1436
            if (units.isEmpty()) {
1437
                setEnabled(false);
1438
                return;
1439
            }
1440
1441
            for (Unit u : units) {
1442
                if (!isEnabled(u)) {
1443
                    setEnabled(false);
1444
                    return;
1445
                }
1446
            }
1447
            setEnabled(true);
1448
        }
1449
1450
        @Override
1451
        public void performerImpl() {
1452
            final int row = getSelectedRow ();
1453
            OperationContainer<OperationSupport> c = Containers.forDisable();
1454
            for (Unit u : model.getUnits()) {
1455
                if (u.isMarked()) {
1456
                    c.add(u.updateUnit, u.getRelevantElement());
1457
                }
1458
            }
1459
            UninstallUnitWizard wizard = new UninstallUnitWizard ();
1460
            if (wizard.invokeWizard (false)) {
1461
                Containers.forUninstall().removeAll();
1462
            }
1463
            Containers.forDisable().removeAll();
1464
            restoreSelectedRow(row);
1465
            refreshState ();
1466
            focusTable ();
1467
        }
1468
        /*
1469
            Unit.Installed unit = (Unit.Installed)u;
1470
            final int row = getSelectedRow();
1471
1472
            if (unit.getRelevantElement ().isEnabled ()) {
1473
                OperationInfo info = Containers.forDisable ().add (unit.updateUnit, unit.getRelevantElement ());
1474
                assert info != null;
1475
                UninstallUnitWizard wizard = new UninstallUnitWizard ();
1476
                if (wizard.invokeWizard (false)) {
1477
                    Containers.forUninstall ().remove (unit.getRelevantElement ());
1478
                }
1479
                Containers.forDisable ().removeAll ();
1480
            }
1481
            fireUpdataUnitChange ();
1482
            restoreSelectedRow(row);
1483
            focusTable ();
1484
        */
1382
        protected boolean isEnabled (Unit u) {
1485
        protected boolean isEnabled (Unit u) {
1383
            boolean retval = false;
1486
            boolean retval = false;
1384
            if ((u != null) && (u instanceof Unit.Installed)) {
1487
            if ((u != null) && (u instanceof Unit.Installed)) {
Lines 1395-1423 Link Here
1395
            }*/
1498
            }*/
1396
            return getActionName ();
1499
            return getActionName ();
1397
        }
1500
        }
1398
        public void performerImpl (Unit u) {
1399
            Unit.Installed unit = (Unit.Installed)u;
1400
            final int row = getSelectedRow();
1401
            
1402
            if (unit.getRelevantElement ().isEnabled ()) {
1403
                OperationInfo info = Containers.forDisable ().add (unit.updateUnit, unit.getRelevantElement ());
1404
                assert info != null;
1405
                UninstallUnitWizard wizard = new UninstallUnitWizard ();
1406
                if (wizard.invokeWizard (false)) {
1407
                    Containers.forUninstall ().remove (unit.getRelevantElement ());
1408
                }
1409
                Containers.forDisable ().removeAll ();
1410
            }
1411
            fireUpdataUnitChange ();
1412
            restoreSelectedRow(row);
1413
            focusTable ();
1414
        }
1415
        
1416
        
1417
        @Override
1418
        protected boolean isVisible (Unit u) {
1419
            return  false;
1420
        }
1421
    }
1501
    }
1422
    
1502
    
1423
    private class DeactivateCategoryAction extends RowTabAction {
1503
    private class DeactivateCategoryAction extends RowTabAction {
Lines 1830-1837 Link Here
1830
        }
1910
        }
1831
    }    
1911
    }    
1832
    // Variables declaration - do not modify//GEN-BEGIN:variables
1912
    // Variables declaration - do not modify//GEN-BEGIN:variables
1833
    private javax.swing.JCheckBox advView;
1834
    private javax.swing.JButton bTabAction;
1913
    private javax.swing.JButton bTabAction;
1914
    private javax.swing.JButton bTabAction1;
1915
    private javax.swing.JButton bTabAction2;
1916
    private javax.swing.JCheckBox detailView;
1835
    private javax.swing.JLabel lSearch;
1917
    private javax.swing.JLabel lSearch;
1836
    private javax.swing.JLabel lSelectionInfo;
1918
    private javax.swing.JLabel lSelectionInfo;
1837
    private javax.swing.JLabel lWarning;
1919
    private javax.swing.JLabel lWarning;
(-)a/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/actions/PluginManagerAction.java (-3 / +1 lines)
Lines 64-74 Link Here
64
            Mnemonics.setLocalizedText (close,NbBundle.getMessage (PluginManagerAction.class, "PluginManager_CloseButton_Name"));
64
            Mnemonics.setLocalizedText (close,NbBundle.getMessage (PluginManagerAction.class, "PluginManager_CloseButton_Name"));
65
            pluginManagerUI = new PluginManagerUI (
65
            pluginManagerUI = new PluginManagerUI (
66
                close,
66
                close,
67
                getValue("InitialTab"), //NOI18N
67
                getValue("InitialTab")//NOI18N
68
                !Boolean.FALSE.equals(getValue("AdvancedView")) // NOI18N
69
            );
68
            );
70
            putValue("InitialTab", null); //NOI18N
69
            putValue("InitialTab", null); //NOI18N
71
            putValue("AdvancedView", null); //NOI18N
72
            DialogDescriptor dd = new DialogDescriptor (
70
            DialogDescriptor dd = new DialogDescriptor (
73
                                        pluginManagerUI,
71
                                        pluginManagerUI,
74
                                        NbBundle.getMessage (PluginManagerAction.class, "PluginManager_Panel_Name"),
72
                                        NbBundle.getMessage (PluginManagerAction.class, "PluginManager_Panel_Name"),
(-)a/welcome/src/org/netbeans/modules/welcome/ui/PluginsPanel.java (-1 lines)
Lines 104-110 Link Here
104
                Class<CallableSystemAction> clz = (Class<CallableSystemAction>)cl.loadClass("org.netbeans.modules.autoupdate.ui.actions.PluginManagerAction");
104
                Class<CallableSystemAction> clz = (Class<CallableSystemAction>)cl.loadClass("org.netbeans.modules.autoupdate.ui.actions.PluginManagerAction");
105
                CallableSystemAction a = CallableSystemAction.findObject(clz, true);
105
                CallableSystemAction a = CallableSystemAction.findObject(clz, true);
106
                a.putValue("InitialTab", initialTab); // NOI18N
106
                a.putValue("InitialTab", initialTab); // NOI18N
107
                a.putValue("AdvancedView", Boolean.FALSE); // NOI18N
108
                a.performAction ();
107
                a.performAction ();
109
            } catch (Exception ex) {
108
            } catch (Exception ex) {
110
                Exceptions.printStackTrace(ex);
109
                Exceptions.printStackTrace(ex);

Return to bug 163411