|
Lines 4-10
Link Here
|
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
| 6 |
* http://www.eclipse.org/legal/epl-v10.html |
6 |
* http://www.eclipse.org/legal/epl-v10.html |
| 7 |
* $Id: IACPreferencePage.java,v 1.7 2007/11/30 16:51:23 samwai Exp $ |
7 |
* $Id: IACPreferencePage.java,v 1.6 2007/05/08 15:01:17 nmehrega Exp $ |
| 8 |
* |
8 |
* |
| 9 |
* Contributors: |
9 |
* Contributors: |
| 10 |
* IBM - Initial API and implementation |
10 |
* IBM - Initial API and implementation |
|
Lines 22-27
Link Here
|
| 22 |
import org.eclipse.swt.SWT; |
22 |
import org.eclipse.swt.SWT; |
| 23 |
import org.eclipse.swt.events.ModifyEvent; |
23 |
import org.eclipse.swt.events.ModifyEvent; |
| 24 |
import org.eclipse.swt.events.ModifyListener; |
24 |
import org.eclipse.swt.events.ModifyListener; |
|
|
25 |
import org.eclipse.swt.graphics.Color; |
| 25 |
import org.eclipse.swt.graphics.Point; |
26 |
import org.eclipse.swt.graphics.Point; |
| 26 |
import org.eclipse.swt.layout.GridData; |
27 |
import org.eclipse.swt.layout.GridData; |
| 27 |
import org.eclipse.swt.layout.GridLayout; |
28 |
import org.eclipse.swt.layout.GridLayout; |
|
Lines 112-119
Link Here
|
| 112 |
/* Stores the preference composite. Used for displaying warning when config file has to be regenerated */ |
113 |
/* Stores the preference composite. Used for displaying warning when config file has to be regenerated */ |
| 113 |
private Composite preferenceComposite = null; |
114 |
private Composite preferenceComposite = null; |
| 114 |
|
115 |
|
|
|
116 |
//bug 208831 |
| 117 |
private Composite notSupportPlatformComposite = null; |
| 118 |
private Label notSupportPlatformMsg = null; |
| 119 |
private boolean isSupportedPlatform; |
| 120 |
//end bug 208831 |
| 121 |
|
| 115 |
protected Control createContents(Composite parent) { |
122 |
protected Control createContents(Composite parent) { |
| 116 |
preferenceComposite = parent; |
123 |
preferenceComposite = parent; |
|
|
124 |
|
| 125 |
//bug 208831 |
| 126 |
if(!AdminUtil.isSupportedPlatform()) |
| 127 |
createNotSupportPlatformErrorComposite(parent); |
| 128 |
//end bug 208831 |
| 129 |
|
| 117 |
createEnableDisableComposite(parent); |
130 |
createEnableDisableComposite(parent); |
| 118 |
GridLayout gridLayout = new GridLayout(); |
131 |
GridLayout gridLayout = new GridLayout(); |
| 119 |
gridLayout.horizontalSpacing = 5; |
132 |
gridLayout.horizontalSpacing = 5; |
|
Lines 134-147
Link Here
|
| 134 |
composite.setLayout(gridLayout); |
147 |
composite.setLayout(gridLayout); |
| 135 |
label = new Label(composite, SWT.NONE); |
148 |
label = new Label(composite, SWT.NONE); |
| 136 |
label.setText(PreferenceMessages.JAVA_EXECUTABLE); |
149 |
label.setText(PreferenceMessages.JAVA_EXECUTABLE); |
| 137 |
label.setLayoutData(gridData1); |
150 |
//label.setLayoutData(gridData1); |
| 138 |
createJavaExecutableText(); |
151 |
createJavaExecutableText(); |
| 139 |
createAllowedHostsGroup(); |
152 |
createAllowedHostsGroup(); |
| 140 |
createAcSecurityGroup(); |
153 |
createAcSecurityGroup(); |
| 141 |
|
154 |
|
| 142 |
/* Get the saved values from the preference store */ |
155 |
/* Get the saved values from the preference store */ |
| 143 |
refreshValuesFromPreference(); |
156 |
refreshValuesFromPreference(); |
| 144 |
|
157 |
|
|
|
158 |
|
| 145 |
|
159 |
|
| 146 |
//bug 184625, add CSH |
160 |
//bug 184625, add CSH |
| 147 |
PlatformUI.getWorkbench().getHelpSystem().setHelp(enableIACButton, AdminPlugin.PLUGIN_ID+".iacpp0001"); |
161 |
PlatformUI.getWorkbench().getHelpSystem().setHelp(enableIACButton, AdminPlugin.PLUGIN_ID+".iacpp0001"); |
|
Lines 160-168
Link Here
|
| 160 |
PlatformUI.getWorkbench().getHelpSystem().setHelp(addUserButton, AdminPlugin.PLUGIN_ID+".iacpp0014"); |
174 |
PlatformUI.getWorkbench().getHelpSystem().setHelp(addUserButton, AdminPlugin.PLUGIN_ID+".iacpp0014"); |
| 161 |
PlatformUI.getWorkbench().getHelpSystem().setHelp(removeUserButton, AdminPlugin.PLUGIN_ID+".iacpp0015"); |
175 |
PlatformUI.getWorkbench().getHelpSystem().setHelp(removeUserButton, AdminPlugin.PLUGIN_ID+".iacpp0015"); |
| 162 |
PlatformUI.getWorkbench().getHelpSystem().setHelp(editUserButton, AdminPlugin.PLUGIN_ID+".iacpp0016"); |
176 |
PlatformUI.getWorkbench().getHelpSystem().setHelp(editUserButton, AdminPlugin.PLUGIN_ID+".iacpp0016"); |
|
|
177 |
|
| 178 |
//208831 |
| 179 |
if(!isSupportedPlatform){ |
| 180 |
|
| 181 |
enableIACButton.setSelection(false); |
| 182 |
disableIACButton.setSelection(false); |
| 183 |
enableIACButton.setEnabled(false); |
| 184 |
disableIACButton.setEnabled(false); |
| 185 |
|
| 186 |
setIACEnable(false); |
| 187 |
} |
| 188 |
//end bug 208831 |
| 163 |
return composite; |
189 |
return composite; |
| 164 |
} |
190 |
} |
| 165 |
|
191 |
|
|
|
192 |
|
| 193 |
|
| 166 |
/** |
194 |
/** |
| 167 |
* This helper method is used to extract the preference page values from the preference store. |
195 |
* This helper method is used to extract the preference page values from the preference store. |
| 168 |
* It's called when the preference page is created under 'createContents' |
196 |
* It's called when the preference page is created under 'createContents' |
|
Lines 655-660
Link Here
|
| 655 |
}); |
683 |
}); |
| 656 |
} |
684 |
} |
| 657 |
|
685 |
|
|
|
686 |
//bug 208831 |
| 687 |
private void createNotSupportPlatformErrorComposite(Composite parent) { |
| 688 |
|
| 689 |
GridData gridData1 = new GridData(); |
| 690 |
gridData1.grabExcessHorizontalSpace = true; |
| 691 |
gridData1.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; |
| 692 |
|
| 693 |
GridLayout gridLayout2 = new GridLayout(); |
| 694 |
gridLayout2.numColumns = 17; |
| 695 |
notSupportPlatformComposite = new Composite(parent, SWT.NONE); |
| 696 |
notSupportPlatformComposite.setLayout(gridLayout2); |
| 697 |
notSupportPlatformComposite.setLayoutData(gridData1); |
| 698 |
|
| 699 |
|
| 700 |
GridData gridData3 = new GridData(); |
| 701 |
gridData3.grabExcessHorizontalSpace = false; |
| 702 |
gridData3.horizontalAlignment = org.eclipse.swt.layout.GridData.BEGINNING; |
| 703 |
notSupportPlatformMsg = new Label(notSupportPlatformComposite, SWT.NONE); |
| 704 |
notSupportPlatformMsg.setText(PreferenceMessages.NOT_SUPPORT_PLATFORM); |
| 705 |
notSupportPlatformMsg.setSize(150, 20); |
| 706 |
notSupportPlatformMsg.setForeground(new Color(null, 255, 0, 0)); |
| 707 |
|
| 708 |
notSupportPlatformMsg.setLayoutData(gridData3); |
| 709 |
} |
| 710 |
//end bug 208831 |
| 711 |
|
| 658 |
/** |
712 |
/** |
| 659 |
* This method creates the enable disable buttons |
713 |
* This method creates the enable disable buttons |
| 660 |
* |
714 |
* |