[jbosstools-commits] JBoss Tools SVN: r41639 - in branches/jbosstools-3.3.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples: preferences and 1 other directory.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Fri Jun 1 13:06:58 EDT 2012


Author: snjeza
Date: 2012-06-01 13:06:57 -0400 (Fri, 01 Jun 2012)
New Revision: 41639

Modified:
   branches/jbosstools-3.3.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectExampleUtil.java
   branches/jbosstools-3.3.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencePage.java
   branches/jbosstools-3.3.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/Sites.java
Log:
JBIDE-11727 - explore providing an .project_example.xml file in root of quickstarts distributions for easy loading/detection in jboss tools

Modified: branches/jbosstools-3.3.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectExampleUtil.java
===================================================================
--- branches/jbosstools-3.3.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectExampleUtil.java	2012-06-01 16:53:01 UTC (rev 41638)
+++ branches/jbosstools-3.3.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectExampleUtil.java	2012-06-01 17:06:57 UTC (rev 41639)
@@ -146,11 +146,17 @@
 	}
 
 	public static Set<IProjectExampleSite> getRuntimeSites() {
+		return getRuntimeSites(false);
+	}
+	
+	public static Set<IProjectExampleSite> getRuntimeSites(boolean force) {
 		Set<IProjectExampleSite> sites = new HashSet<IProjectExampleSite>();
-		IPreferenceStore store = ProjectExamplesActivator.getDefault()
-				.getPreferenceStore();
-		if (!store.getBoolean(ProjectExamplesActivator.SHOW_RUNTIME_SITES)) {
-			return sites;
+		if (!force) {
+			IPreferenceStore store = ProjectExamplesActivator.getDefault()
+					.getPreferenceStore();
+			if (!store.getBoolean(ProjectExamplesActivator.SHOW_RUNTIME_SITES)) {
+				return sites;
+			}
 		}
 		IServer[] servers = ServerCore.getServers();
 		for (IServer server:servers) {

Modified: branches/jbosstools-3.3.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencePage.java
===================================================================
--- branches/jbosstools-3.3.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencePage.java	2012-06-01 16:53:01 UTC (rev 41638)
+++ branches/jbosstools-3.3.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencePage.java	2012-06-01 17:06:57 UTC (rev 41639)
@@ -154,8 +154,6 @@
 		showInvalidSites.setText(Messages.ProjectExamplesPreferencePage_Show_invalid_sites);
 		showInvalidSites.setSelection(store.getBoolean(ProjectExamplesActivator.SHOW_INVALID_SITES));
 		
-		
-		
 		Group sitesGroup = new Group(composite,SWT.NONE);
 		sitesGroup.setText(Messages.ProjectExamplesPreferencePage_Sites);
 		GridLayout gl = new GridLayout(2,false);

Modified: branches/jbosstools-3.3.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/Sites.java
===================================================================
--- branches/jbosstools-3.3.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/Sites.java	2012-06-01 16:53:01 UTC (rev 41638)
+++ branches/jbosstools-3.3.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/Sites.java	2012-06-01 17:06:57 UTC (rev 41639)
@@ -45,7 +45,7 @@
 			siteCategories[1]=pluginSite;
 			
 			runtimeSite = new SiteCategory(Messages.Sites_Runtime_sites);
-			Set<IProjectExampleSite> runtimeSites = ProjectExampleUtil.getRuntimeSites();
+			Set<IProjectExampleSite> runtimeSites = ProjectExampleUtil.getRuntimeSites(true);
 			runtimeSite.setSites(runtimeSites);
 			siteCategories[2]= runtimeSite;
 			



More information about the jbosstools-commits mailing list