[jbosstools-commits] JBoss Tools SVN: r35685 - in trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central: editors and 1 other directories.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Sat Oct 15 14:51:44 EDT 2011


Author: snjeza
Date: 2011-10-15 14:51:43 -0400 (Sat, 15 Oct 2011)
New Revision: 35685

Modified:
   trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java
   trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/JBossCentralEditor.java
   trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/xpl/TextSearchControl.java
Log:
JBIDE-9839 Search field in central has weird/incorrect options

Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java	2011-10-15 18:46:31 UTC (rev 35684)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/JBossCentralActivator.java	2011-10-15 18:51:43 UTC (rev 35685)
@@ -62,7 +62,7 @@
  */
 public class JBossCentralActivator extends AbstractUIPlugin {
 
-	public static final String JBOSS_DISCOVERY_DIRECTORY_3_3_0_XML = "http://download.jboss.org/jbosstools/updates/nightly/trunk/directory.xml";
+	public static final String JBOSS_DISCOVERY_DIRECTORY_3_3_0_XML = "http://download.jboss.org/jbosstools/examples/directory-3.3.0.xml";
 	
 	public static final String ICON = "icon";
 
@@ -112,11 +112,11 @@
 	
 	public static final String TUTORIALS_EXTENSION_ID = "org.jboss.tools.central.tutorials";
 	
-	public static final String SEARCH_PROJECT_PAGES = "Search Project Pages";
+	//public static final String SEARCH_PROJECT_PAGES = "Search Project Pages";
 
-	public static final String SEARCH_THE_COMMUNITY = "Search the Community";
+	public static final String SEARCH_THE_COMMUNITY = "Search JBoss Community";
 
-	public static final String SEARCH_COMMUNITY_PORTAL = "Search Community Portal";
+	public static final String SEARCH_RED_HAT_CUSTOMER_PORTAL = "Search Red Hat Customer Portal ";
 
 	public Map<String, TutorialCategory> tutorialCategories;
 

Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/JBossCentralEditor.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/JBossCentralEditor.java	2011-10-15 18:46:31 UTC (rev 35684)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/JBossCentralEditor.java	2011-10-15 18:51:43 UTC (rev 35685)
@@ -207,7 +207,7 @@
 					try {
 						StringBuffer url = new StringBuffer();
 						String initialMessage = searchControl.getInitialMessage();
-						if (JBossCentralActivator.SEARCH_COMMUNITY_PORTAL.equals(initialMessage)) {
+						if (JBossCentralActivator.SEARCH_RED_HAT_CUSTOMER_PORTAL.equals(initialMessage)) {
 							url.append("https://access.redhat.com/knowledge/searchResults?col=avalon_portal&topSearchForm=topSearchForm&language=en&quickSearch=");
 							url.append(URLEncoder.encode(searchControl.getText(), UTF_8_ENCODING));
 						} else {
@@ -237,18 +237,14 @@
 		});
 		
 		final Menu menu = new Menu(menuLink);
+		final MenuItem searchCommunityPortal = new MenuItem(menu, SWT.CHECK);
+		searchCommunityPortal.setText(JBossCentralActivator.SEARCH_RED_HAT_CUSTOMER_PORTAL);
 		final MenuItem searchCommunity = new MenuItem(menu, SWT.CHECK);
 		searchCommunity.setText(JBossCentralActivator.SEARCH_THE_COMMUNITY);
-		final MenuItem searchProjectPages = new MenuItem(menu, SWT.CHECK);
-		searchProjectPages.setText(JBossCentralActivator.SEARCH_PROJECT_PAGES);
-		final MenuItem searchCommunityPortal = new MenuItem(menu, SWT.CHECK);
-		searchCommunityPortal.setText(JBossCentralActivator.SEARCH_COMMUNITY_PORTAL);
 		
 		String initialMessage = searchControl.getInitialMessage();
-		if (JBossCentralActivator.SEARCH_COMMUNITY_PORTAL.equals(initialMessage)) {
+		if (JBossCentralActivator.SEARCH_RED_HAT_CUSTOMER_PORTAL.equals(initialMessage)) {
 			searchCommunityPortal.setSelection(true);
-		} else if (JBossCentralActivator.SEARCH_PROJECT_PAGES.equals(initialMessage)) {
-			searchProjectPages.setSelection(true);
 		} else {
 			searchCommunity.setSelection(true);
 		}
@@ -257,32 +253,19 @@
 			@Override
 			public void widgetSelected(SelectionEvent e) {
 				searchCommunity.setSelection(true);
-				searchProjectPages.setSelection(false);
 				searchCommunityPortal.setSelection(false);
 				searchControl.setInitialMessage(JBossCentralActivator.SEARCH_THE_COMMUNITY);
 			}
 		
 		});
-		searchProjectPages.addSelectionListener(new SelectionAdapter() {
-
-			@Override
-			public void widgetSelected(SelectionEvent e) {
-				searchProjectPages.setSelection(true);
-				searchCommunity.setSelection(false);
-				searchCommunityPortal.setSelection(false);
-				searchControl.setInitialMessage(JBossCentralActivator.SEARCH_PROJECT_PAGES);
-			}
 		
-		});
-
 		searchCommunityPortal.addSelectionListener(new SelectionAdapter() {
 
 			@Override
 			public void widgetSelected(SelectionEvent e) {
-				searchProjectPages.setSelection(false);
 				searchCommunity.setSelection(false);
 				searchCommunityPortal.setSelection(true);
-				searchControl.setInitialMessage(JBossCentralActivator.SEARCH_COMMUNITY_PORTAL);
+				searchControl.setInitialMessage(JBossCentralActivator.SEARCH_RED_HAT_CUSTOMER_PORTAL);
 			}
 		
 		});

Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/xpl/TextSearchControl.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/xpl/TextSearchControl.java	2011-10-15 18:46:31 UTC (rev 35684)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/xpl/TextSearchControl.java	2011-10-15 18:51:43 UTC (rev 35685)
@@ -225,7 +225,7 @@
 		}
 		String message = section.get(INITIAL_MESSAGE);
 		if (message == null || message.isEmpty()) {
-			message = JBossCentralActivator.SEARCH_THE_COMMUNITY;
+			message = JBossCentralActivator.SEARCH_RED_HAT_CUSTOMER_PORTAL;
 		}
 		setInitialMessage(message);
 		



More information about the jbosstools-commits mailing list