Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 208831 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/hyades/security/internal/util/messages.properties (-1 / +1 lines)
Lines 83-89 Link Here
83
_64  = Unknown
83
_64  = Unknown
84
_65  = Alias name can not be empty
84
_65  = Alias name can not be empty
85
_66  = This alias name already exists, use another one
85
_66  = This alias name already exists, use another one
86
_67  = IWAT0284E The agent controller is not available on host {0}.\n Make sure that:\n* the agent controller is installed.\n* the agent controller is configured to communicate with your machine.\n* you have the correct host name and port number for the agent controller.
86
_67  = IWAT0284E The agent controller is not available on host {0}.\n Make sure that:\n* the internal agent controller is supported on your platform. \n* the agent controller is installed.\n* the agent controller is configured to communicate with your machine.\n* you have the correct host name and port number for the agent controller.
87
_68  = IWAT0017E Security Certificate not available for host {0}.\n Make sure that you have the correct security certificates imported into the workspace.
87
_68  = IWAT0017E Security Certificate not available for host {0}.\n Make sure that you have the correct security certificates imported into the workspace.
88
_69  = IWAT0111E Security Certificate not found.\n To be able to connect, please import a Security Certificate into the workspace.
88
_69  = IWAT0111E Security Certificate not found.\n To be able to connect, please import a Security Certificate into the workspace.
89
_70  = Information you exchange with this Agent Controller cannot be viewed or changed by others.\nHowever, it cannot be determined whether this Agent Controller is the intended target on host {0}.\nThe security certificate is unknown. You may view the certificate to determine whether you want to accept.\n\nDo you want to accept this certificate?
89
_70  = Information you exchange with this Agent Controller cannot be viewed or changed by others.\nHowever, it cannot be determined whether this Agent Controller is the intended target on host {0}.\nThe security certificate is unknown. You may view the certificate to determine whether you want to accept.\n\nDo you want to accept this certificate?
(-)src/org/eclipse/tptp/platform/iac/administrator/internal/startstop/AutoStartStop.java (-1 / +10 lines)
Lines 40-45 Link Here
40
	/* Set to true when WE start IAC; false otherwise.  
40
	/* Set to true when WE start IAC; false otherwise.  
41
	 * This boolean is unaffected if the user has manually started an instance the stand-alone AC */
41
	 * This boolean is unaffected if the user has manually started an instance the stand-alone AC */
42
	private static boolean iacStarted = false;
42
	private static boolean iacStarted = false;
43
	private static boolean hasShownNotSupportPlatformError = false;
43
		
44
		
44
	/* Instance of the plugin activator class */
45
	/* Instance of the plugin activator class */
45
	private static AdminPlugin adminPlugin = AdminPlugin.getDefault();
46
	private static AdminPlugin adminPlugin = AdminPlugin.getDefault();
Lines 50-56 Link Here
50
	 * @return  Indicates the status of starting IAC.  0 if successful, nonzero if not.         
51
	 * @return  Indicates the status of starting IAC.  0 if successful, nonzero if not.         
51
	 */
52
	 */
52
	public static synchronized int startIAC()
53
	public static synchronized int startIAC()
53
	{
54
	{		
55
		//bug 208831: Popup error for not supported platform.   
56
		if(! hasShownNotSupportPlatformError && !AdminUtil.isSupportedPlatform() ){
57
			AdminUtil.openErrorDialog(PreferenceMessages.ERROR_DIALOG_TITLE, PreferenceMessages.NOT_SUPPORT_PLATFORM);
58
			hasShownNotSupportPlatformError = true;
59
			return 3;
60
		}
61
		//end bug 208831
62
		
54
		/* Do we have an instance of our plugin activator */
63
		/* Do we have an instance of our plugin activator */
55
		if (adminPlugin == null)
64
		if (adminPlugin == null)
56
		{
65
		{
(-)src/org/eclipse/tptp/platform/iac/administrator/internal/common/CommonConstants.java (-1 / +7 lines)
Lines 11-16 Link Here
11
 **********************************************************************/
11
 **********************************************************************/
12
package org.eclipse.tptp.platform.iac.administrator.internal.common;
12
package org.eclipse.tptp.platform.iac.administrator.internal.common;
13
13
14
14
/**
15
/**
15
 * Common constants used for this plugin
16
 * Common constants used for this plugin
16
 * @author Navid Mehregani
17
 * @author Navid Mehregani
Lines 70-74 Link Here
70
	
71
	
71
	/* Execution framework Plugin */
72
	/* Execution framework Plugin */
72
	public static final String EXECUTION_FRAMEWORK = "org.eclipse.hyades.execution";
73
	public static final String EXECUTION_FRAMEWORK = "org.eclipse.hyades.execution";
73
	 
74
	
75
	//208831, add supported platforms
76
	public static String[] supportedPlatforms = {WIN_IA32,WIN_EM64T, WIN_IPF,LINUX_IA32, LINUX_EM64T,LINUX_IPF};
77
	
78
79
	                                        	
74
}
80
}
(-)src/org/eclipse/tptp/platform/iac/administrator/internal/common/AdminUtil.java (+59 lines)
Lines 22-41 Link Here
22
import javax.xml.parsers.DocumentBuilder;
22
import javax.xml.parsers.DocumentBuilder;
23
import javax.xml.parsers.DocumentBuilderFactory;
23
import javax.xml.parsers.DocumentBuilderFactory;
24
24
25
import org.eclipse.core.resources.IResourceStatus;
26
import org.eclipse.core.resources.ResourcesPlugin;
25
import org.eclipse.core.runtime.FileLocator;
27
import org.eclipse.core.runtime.FileLocator;
26
import org.eclipse.core.runtime.IBundleGroup;
28
import org.eclipse.core.runtime.IBundleGroup;
27
import org.eclipse.core.runtime.IBundleGroupProvider;
29
import org.eclipse.core.runtime.IBundleGroupProvider;
28
import org.eclipse.core.runtime.Platform;
30
import org.eclipse.core.runtime.Platform;
29
import org.eclipse.core.runtime.Status;
31
import org.eclipse.core.runtime.Status;
30
import org.eclipse.jdt.launching.JavaRuntime;
32
import org.eclipse.jdt.launching.JavaRuntime;
33
import org.eclipse.jface.dialogs.ErrorDialog;
31
import org.eclipse.jface.dialogs.IDialogConstants;
34
import org.eclipse.jface.dialogs.IDialogConstants;
32
import org.eclipse.jface.dialogs.MessageDialog;
35
import org.eclipse.jface.dialogs.MessageDialog;
33
import org.eclipse.swt.SWT;
36
import org.eclipse.swt.SWT;
34
import org.eclipse.swt.layout.GridData;
37
import org.eclipse.swt.layout.GridData;
38
import org.eclipse.swt.widgets.Display;
35
import org.eclipse.swt.widgets.Shell;
39
import org.eclipse.swt.widgets.Shell;
36
import org.eclipse.tptp.platform.iac.administrator.AdminPlugin;
40
import org.eclipse.tptp.platform.iac.administrator.AdminPlugin;
37
import org.eclipse.tptp.platform.iac.administrator.internal.config.ConfigGenerator;
41
import org.eclipse.tptp.platform.iac.administrator.internal.config.ConfigGenerator;
38
import org.eclipse.tptp.platform.iac.administrator.internal.preference.PreferenceMessages;
42
import org.eclipse.tptp.platform.iac.administrator.internal.preference.PreferenceMessages;
43
import org.eclipse.ui.IWorkbench;
44
import org.eclipse.ui.PlatformUI;
39
import org.osgi.framework.Bundle;
45
import org.osgi.framework.Bundle;
40
import org.w3c.dom.Document;
46
import org.w3c.dom.Document;
41
import org.w3c.dom.Element;
47
import org.w3c.dom.Element;
Lines 658-661 Link Here
658
		return valid;
664
		return valid;
659
	}
665
	}
660
	
666
	
667
	
668
	//bug 208831
669
	public static boolean isSupportedPlatform(){
670
		
671
		String platform = getPlatformSymbolicName();
672
		
673
		for(int i = 0; i < CommonConstants.supportedPlatforms.length; i++){
674
			if(CommonConstants.supportedPlatforms[i].equalsIgnoreCase(platform))
675
					return true;
676
		
677
		}
678
		return false;
679
	}
680
	
681
	/*
682
	 * Copy from ConnectUtilUI.java because can't import that class because of circular reference.
683
	 * 
684
	 **/
685
	private static Shell getValidShell() {
686
		Shell shell = null;
687
		IWorkbench workbench = PlatformUI.getWorkbench();
688
		if (workbench != null) {
689
			if (workbench.getActiveWorkbenchWindow() != null) {
690
				shell = workbench.getActiveWorkbenchWindow().getShell();
691
				if ((shell != null) && (!shell.isDisposed()))
692
					return shell;
693
			}
694
695
			if (workbench.getWorkbenchWindows().length > 0) {
696
				shell = workbench.getWorkbenchWindows()[0].getShell();
697
				if ((shell != null) && (!shell.isDisposed()))
698
					return shell;
699
			}
700
		}
701
702
		return null;
703
	}
704
	
705
	
706
	/*
707
	 * Copy from ConnectUtilUI.java because can't import that class because of circular reference.
708
	 * 
709
	 **/
710
	public static void openErrorDialog(final String title, final String message){
711
		Display.getDefault().syncExec(new Runnable() {
712
			public void run() {
713
				
714
				Status err = new Status(Status.ERROR, ResourcesPlugin.PI_RESOURCES, IResourceStatus.ERROR, message,new Exception(message));
715
				ErrorDialog.openError(getValidShell(), title,PreferenceMessages.ERROR_GENERAL, err);
716
			}
717
		});
718
		
719
	}
661
}
720
}
(-)src/org/eclipse/tptp/platform/iac/administrator/internal/preference/messages.properties (+3 lines)
Lines 34-39 Link Here
34
  ADD_BUTTON = Add...
34
  ADD_BUTTON = Add...
35
  EDIT_BUTTON = Edit...
35
  EDIT_BUTTON = Edit...
36
  REMOVE_BUTTON = Remove...
36
  REMOVE_BUTTON = Remove...
37
  NOT_SUPPORT_PLATFORM=Your platform is not supported by this version of Eclipse TPTP.  Agent Controller would be disabled.  \nTo profile your localhost, please install and use a stand along Agent Controller. 
38
  ERROR_DIALOG_TITLE=Error
39
  ERROR_GENERAL=An error has happened within the interal agent controller.
37
  
40
  
38
# Confirmation dialog. Do not translate IAC.
41
# Confirmation dialog. Do not translate IAC.
39
  CONFIRMATION_TITLE = Confirmation Dialog
42
  CONFIRMATION_TITLE = Confirmation Dialog
(-)src/org/eclipse/tptp/platform/iac/administrator/internal/preference/PreferenceMessages.java (-1 / +4 lines)
Lines 45-51 Link Here
45
	public static String ADD_BUTTON;
45
	public static String ADD_BUTTON;
46
	public static String EDIT_BUTTON;
46
	public static String EDIT_BUTTON;
47
	public static String REMOVE_BUTTON;
47
	public static String REMOVE_BUTTON;
48
		
48
	public static String NOT_SUPPORT_PLATFORM;
49
	public static String ERROR_DIALOG_TITLE;
50
	public static String ERROR_GENERAL;
51
	
49
	/* Confirmation dialog */
52
	/* Confirmation dialog */
50
	public static String CONFIRMATION_TITLE;
53
	public static String CONFIRMATION_TITLE;
51
	public static String CONFIRMATION_MESSAGE;
54
	public static String CONFIRMATION_MESSAGE;
(-)src/org/eclipse/tptp/platform/iac/administrator/internal/preference/IACPreferencePage.java (-3 / +57 lines)
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
	 *

Return to bug 208831