JBoss Tools SVN: r40201 - trunk/build/aggregate/site.
by jbosstools-commits@lists.jboss.org
Author: mickael_istria
Date: 2012-04-16 06:01:20 -0400 (Mon, 16 Apr 2012)
New Revision: 40201
Removed:
trunk/build/aggregate/site/sources/
Log:
JBIDE-11548: Make sources available in the same site as features
* Removed site for sources
* Updated aggregate job
13 years, 8 months
JBoss Tools SVN: r40200 - trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/resources/android.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2012-04-16 05:35:12 -0400 (Mon, 16 Apr 2012)
New Revision: 40200
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/resources/android/time-1.png
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/resources/android/time-2.png
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/resources/android/time-3.png
Log:
https://issues.jboss.org/browse/JBIDE-10945 L BrowserSim: create more skins
- minor: changed font color for android skin
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/resources/android/time-1.png
===================================================================
(Binary files differ)
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/resources/android/time-2.png
===================================================================
(Binary files differ)
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/resources/android/time-3.png
===================================================================
(Binary files differ)
13 years, 8 months
JBoss Tools SVN: r40199 - in trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples: fixes and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-04-16 05:25:44 -0400 (Mon, 16 Apr 2012)
New Revision: 40199
Added:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/runtimes/RuntimeUtils.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/RuntimeTypeFilter.java
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/Messages.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/WTPRuntimeFix.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/messages.properties
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesMainPage.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/SiteFilter.java
Log:
JBIDE-10119: Filter project examples per compatible target runtime
https://issues.jboss.org/browse/JBIDE-10119
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/Messages.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/Messages.java 2012-04-16 09:20:22 UTC (rev 40198)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/Messages.java 2012-04-16 09:25:44 UTC (rev 40199)
@@ -14,6 +14,7 @@
public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.jboss.tools.project.examples.messages"; //$NON-NLS-1$
+ public static String NewProjectExamplesMainPage_TargetedRuntime;
public static String NewProjectExamplesWizardPage_Cannot_access_the_following_sites;
public static String NewProjectExamplesWizardPage_Site;
public static String Category_Other;
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java 2012-04-16 09:20:22 UTC (rev 40198)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java 2012-04-16 09:25:44 UTC (rev 40199)
@@ -146,6 +146,8 @@
// The plug-in ID
public static final String PLUGIN_ID = "org.jboss.tools.project.examples"; //$NON-NLS-1$
public static final String ALL_SITES = Messages.ProjectExamplesActivator_All;
+ public static final String ALL_RUNTIMES = Messages.ProjectExamplesActivator_All;
+
public static final String SHOW_EXPERIMENTAL_SITES = "showExperimentalSites"; //$NON-NLS-1$
public static final String USER_SITES = "userSites"; //$NON-NLS-1$
public static final boolean SHOW_EXPERIMENTAL_SITES_VALUE = false;
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/WTPRuntimeFix.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/WTPRuntimeFix.java 2012-04-16 09:20:22 UTC (rev 40198)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/WTPRuntimeFix.java 2012-04-16 09:25:44 UTC (rev 40199)
@@ -12,7 +12,9 @@
import java.io.File;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
import java.util.StringTokenizer;
import org.eclipse.core.resources.IProject;
@@ -177,8 +179,7 @@
}
private IRuntime getBestRuntime(ProjectExample project, ProjectFix fix) {
- String allowedTypes = fix.getProperties().get(
- ProjectFix.ALLOWED_TYPES);
+ String allowedTypes = fix.getProperties().get(ProjectFix.ALLOWED_TYPES);
if (allowedTypes == null) {
ProjectExamplesActivator.log(NLS.bind(Messages.WTPRuntimeFix_Invalid_WTP_runtime_fix, project.getName()));
return null;
@@ -365,4 +366,41 @@
return null;
}
+
+
+ public static Set<IRuntimeType> getTargetedServerRuntimes(ProjectExample example) {
+ Set<IRuntimeType> targetedRuntimes = new HashSet<IRuntimeType>();
+ List<ProjectFix> fixes = example.getFixes();
+ if (fixes != null && !fixes.isEmpty()) {
+ IRuntime[] runtimes = ServerCore.getRuntimes();
+ if (runtimes.length > 0) {
+ for (ProjectFix fix : fixes) {
+ if (ProjectFix.WTP_RUNTIME.equals(fix.getType())) {
+
+ String allowedTypes = fix.getProperties().get(ProjectFix.ALLOWED_TYPES);
+ if (allowedTypes == null) {
+ continue;
+ }
+
+ StringTokenizer tokenizer = new StringTokenizer(allowedTypes, ","); //$NON-NLS-1$
+ while (tokenizer.hasMoreTokens()) {
+ String allowedType = tokenizer.nextToken().trim();
+ if (allowedType.length() <= 0) {
+ continue;
+ }
+ for (IRuntime runtime:runtimes) {
+ IRuntimeType runtimeType = runtime.getRuntimeType();
+ if (runtimeType != null && (ProjectFix.ANY.equals(allowedType) || runtimeType.getId().equals(allowedType))) {
+ targetedRuntimes.add(runtimeType);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return targetedRuntimes;
+ }
+
+
}
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/messages.properties
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/messages.properties 2012-04-16 09:20:22 UTC (rev 40198)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/messages.properties 2012-04-16 09:25:44 UTC (rev 40199)
@@ -23,6 +23,7 @@
MarkerDialog_Resource=Resource
MarkerDialog_Select_a_marker_and_click_the_Quick_Fix_button=Select a marker and click the Quick Fix button.
MarkerDialog_Type=Type
+NewProjectExamplesMainPage_TargetedRuntime=Targeted runtime
NewProjectExamplesWizard_Detail=Detail
NewProjectExamplesWizard_Downloading=Downloading...
NewProjectExamplesWizard_Error=Error
Added: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/runtimes/RuntimeUtils.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/runtimes/RuntimeUtils.java (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/runtimes/RuntimeUtils.java 2012-04-16 09:25:44 UTC (rev 40199)
@@ -0,0 +1,40 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2012 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.project.examples.runtimes;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.IRuntimeType;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.ServerCore;
+
+public class RuntimeUtils {
+
+ /**
+ * Returns an unmodifiable {@link Set} of all {@link IRuntimeType} having at least one corresponding {@link IServer} instance
+ * configured in this workspace.<br/>
+ *
+ * @return all configured {@link IRuntimeType}
+ */
+ public static Set<IRuntimeType> getInstalledRuntimeTypes() {
+ Set<IRuntimeType> runtimeTypes = new HashSet<IRuntimeType>();
+ for (IServer server : ServerCore.getServers()) {
+ IRuntime runtime = server.getRuntime();
+ if (runtime != null && runtime.getRuntimeType() != null) {
+ runtimeTypes.add(runtime.getRuntimeType());
+ }
+ }
+ return Collections.unmodifiableSet(runtimeTypes);
+ }
+}
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesMainPage.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesMainPage.java 2012-04-16 09:20:22 UTC (rev 40198)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesMainPage.java 2012-04-16 09:25:44 UTC (rev 40199)
@@ -31,6 +31,7 @@
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
@@ -48,14 +49,17 @@
import org.eclipse.swt.widgets.Tree;
import org.eclipse.ui.dialogs.FilteredTree;
import org.eclipse.ui.model.AdaptableList;
+import org.eclipse.wst.server.core.IRuntimeType;
import org.jboss.tools.project.examples.Messages;
import org.jboss.tools.project.examples.ProjectExamplesActivator;
+import org.jboss.tools.project.examples.fixes.WTPRuntimeFix;
import org.jboss.tools.project.examples.model.IImportProjectExample;
import org.jboss.tools.project.examples.model.IProjectExampleSite;
import org.jboss.tools.project.examples.model.ProjectExample;
import org.jboss.tools.project.examples.model.ProjectExampleCategory;
import org.jboss.tools.project.examples.model.ProjectExampleUtil;
import org.jboss.tools.project.examples.model.ProjectFix;
+import org.jboss.tools.project.examples.runtimes.RuntimeUtils;
/**
* @author snjeza
@@ -73,6 +77,7 @@
//private NewProjectExamplesReadyPage readyPage;
private List<IProjectExamplesWizardPage> pages;
private ProjectExample selectedProject;
+ private Combo targetRuntimeTypesCombo;
public NewProjectExamplesMainPage(NewProjectExamplesRequirementsPage requirementsPage, List<IProjectExamplesWizardPage> pages) {
super("org.jboss.tools.project.examples.main"); //$NON-NLS-1$
@@ -109,6 +114,10 @@
new Label(siteComposite,SWT.NONE).setText(Messages.NewProjectExamplesWizardPage_Site);
siteCombo = new Combo(siteComposite,SWT.READ_ONLY);
siteCombo.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
+
+ new Label(siteComposite,SWT.NONE).setText(Messages.NewProjectExamplesMainPage_TargetedRuntime);
+ targetRuntimeTypesCombo = new Combo(siteComposite, SWT.READ_ONLY);
+ targetRuntimeTypesCombo .setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
new Label(composite,SWT.NONE).setText(Messages.NewProjectExamplesWizardPage_Projects);
@@ -132,7 +141,8 @@
viewer.setContentProvider(new ProjectContentProvider());
final SiteFilter siteFilter = new SiteFilter();
- viewer.addFilter(siteFilter);
+ final RuntimeTypeFilter serverFilter = new RuntimeTypeFilter();
+ viewer.setFilters(new ViewerFilter[]{siteFilter, serverFilter});
Label descriptionLabel = new Label(composite,SWT.NONE);
descriptionLabel.setText(Messages.NewProjectExamplesWizardPage_Description);
@@ -225,29 +235,76 @@
public void widgetSelected(SelectionEvent e) {
IPreferenceStore store = ProjectExamplesActivator.getDefault().getPreferenceStore();
store.setValue(ProjectExamplesActivator.SHOW_EXPERIMENTAL_SITES, button.getSelection());
+
+ //Store current combo selections
+ String selectedRuntime = targetRuntimeTypesCombo.getText();
+ String selectedSite = siteCombo.getText();
+
+ //Rebuild the combo lists
refresh(viewer, true);
- if (siteCombo != null) {
- String[] items = getItems();
- int index = siteCombo.getSelectionIndex();
- siteCombo.setItems(items);
- if (items.length > 0 && (index < 0 || index > items.length) ) {
- siteCombo.select(0);
- } else {
- siteCombo.select(index);
- }
- }
+
+ //Restore the combo selections with initial values if possible
+ restoreCombo(targetRuntimeTypesCombo, selectedRuntime);
+ restoreCombo(siteCombo, selectedSite);
+
siteFilter.setSite(siteCombo.getText());
viewer.refresh();
}
});
+
+
+ targetRuntimeTypesCombo.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ serverFilter.setRuntimeType(targetRuntimeTypesCombo.getText());
+ viewer.refresh();
+ }
+ });
+
+
setPageComplete(false);
setControl(composite);
-
+
refresh(viewer, true);
siteCombo.setText(ProjectExamplesActivator.ALL_SITES);
+
+ targetRuntimeTypesCombo.setText(ProjectExamplesActivator.ALL_RUNTIMES);
+
+
+
}
+
+ private void loadRuntimeTypes() {
+ if (targetRuntimeTypesCombo == null) {
+ return;
+ }
+ targetRuntimeTypesCombo.removeAll();
+ targetRuntimeTypesCombo.add(ProjectExamplesActivator.ALL_RUNTIMES);
+
+ Set<IRuntimeType> installedRuntimeTypes = RuntimeUtils.getInstalledRuntimeTypes();
+ List<IRuntimeType> sortedTypes = new ArrayList<IRuntimeType>();
+
+ for (ProjectExampleCategory category : categories) {
+ for (ProjectExample project : category.getProjects()) {
+ for (IRuntimeType type : WTPRuntimeFix.getTargetedServerRuntimes(project)) {
+ if (!sortedTypes.contains(type)) {
+ //If runtime types have a server instance, display them first
+ if (installedRuntimeTypes.contains(type)) {
+ sortedTypes.add(0, type);
+ } else {
+ sortedTypes.add(type);
+ }
+ }
+ }
+ }
+ }
+
+ for (IRuntimeType type : sortedTypes) {
+ targetRuntimeTypesCombo.add(type.getName());
+ }
+ }
private void refresh(final TreeViewer viewer, boolean show) {
AdaptableList input = new AdaptableList(getCategories(show));
@@ -255,6 +312,7 @@
viewer.refresh();
String[] items = getItems();
siteCombo.setItems(items);
+ loadRuntimeTypes();
}
private List<ProjectExampleCategory> getCategories(boolean show) {
@@ -411,5 +469,16 @@
public ProjectExample getSelectedProject() {
return selectedProject;
}
+
+ private static void restoreCombo(Combo combo, String initialValue) {
+ //Look position of initial value
+ int selectedIdx = combo.indexOf(initialValue);
+ if (selectedIdx < 0) {
+ //If initial value not found, reset to first item
+ selectedIdx = 0;
+ }
+ //Reset position of combo to the appropriate item index
+ combo.select(selectedIdx);
+ }
}
Added: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/RuntimeTypeFilter.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/RuntimeTypeFilter.java (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/RuntimeTypeFilter.java 2012-04-16 09:25:44 UTC (rev 40199)
@@ -0,0 +1,80 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2012 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.project.examples.wizard;
+
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.wst.server.core.IRuntimeType;
+import org.jboss.tools.project.examples.Messages;
+import org.jboss.tools.project.examples.ProjectExamplesActivator;
+import org.jboss.tools.project.examples.fixes.WTPRuntimeFix;
+import org.jboss.tools.project.examples.model.ProjectExample;
+import org.jboss.tools.project.examples.model.ProjectExampleCategory;
+import org.jboss.tools.project.examples.model.ProjectModelElement;
+
+/**
+ *
+ * @author Fred Bricon
+ *
+ */
+public class RuntimeTypeFilter extends ViewerFilter {
+
+ private String runtimeType;
+
+ public RuntimeTypeFilter() {
+ super();
+ runtimeType = Messages.ProjectExamplesActivator_All;
+ }
+
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ if (! (element instanceof ProjectModelElement) ) {
+ return false;
+ }
+ if (runtimeType.equals(ProjectExamplesActivator.ALL_RUNTIMES)) {
+ return true;
+ }
+
+ if (element instanceof ProjectExampleCategory) {
+ ProjectExampleCategory category = (ProjectExampleCategory) element;
+ List<ProjectExample> projects = category.getProjects();
+ for (ProjectExample project:projects) {
+ if (hasServer(project)) {
+ return true;
+ }
+ }
+ return false;
+ }
+ boolean select = false;
+ if (element instanceof ProjectExample) {
+ select = hasServer((ProjectExample) element);
+ }
+ return select;
+ }
+
+ private boolean hasServer(ProjectExample project) {
+ Set<IRuntimeType> runtimes = WTPRuntimeFix.getTargetedServerRuntimes(project);
+ for (IRuntimeType r : runtimes) {
+ if (runtimeType.equals(r.getName())) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public void setRuntimeType(String runtimeType) {
+ this.runtimeType = runtimeType;
+ }
+
+}
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/SiteFilter.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/SiteFilter.java 2012-04-16 09:20:22 UTC (rev 40198)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/SiteFilter.java 2012-04-16 09:25:44 UTC (rev 40199)
@@ -39,38 +39,28 @@
if (! (element instanceof ProjectModelElement) ) {
return false;
}
+
+ if (site.equals(ProjectExamplesActivator.ALL_SITES)) {
+ return true;
+ }
+
if (element instanceof ProjectExampleCategory) {
ProjectExampleCategory category = (ProjectExampleCategory) element;
- int size = 0;
- if (site.equals(ProjectExamplesActivator.ALL_SITES)) {
- size += category.getProjects().size();
- } else {
- IProjectExampleSite categorySite = category.getSite();
- if (categorySite == null) {
- return false;
+ IProjectExampleSite categorySite = category.getSite();
+ if (categorySite == null || !site.equals(categorySite.getName())) {
+ return false;
+ }
+ List<ProjectExample> projects = category.getProjects();
+ for (ProjectExample project:projects) {
+ IProjectExampleSite projectSite = project.getSite();
+ if (projectSite != null && site.equals(projectSite.getName())) {
+ return true;
}
- if (!site.equals(categorySite.getName())) {
- return false;
- }
- List<ProjectExample> projects = category.getProjects();
- for (ProjectExample project:projects) {
- IProjectExampleSite projectSite = project.getSite();
- if (projectSite == null) {
- continue;
- }
-
- if (site.equals(projectSite.getName())) {
- size++;
- }
- }
}
- return size > 0;
- }
- ProjectModelElement model = (ProjectModelElement) element;
- if (model.getSite() == null) {
return false;
}
- if ( site.equals(ProjectExamplesActivator.ALL_SITES) || site.equals(model.getSite().getName())) {
+ ProjectModelElement model = (ProjectModelElement) element;
+ if (model.getSite() != null && site.equals(model.getSite().getName())) {
return true;
}
return false;
13 years, 8 months
JBoss Tools SVN: r40198 - in trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools: tests and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-04-16 05:20:22 -0400 (Mon, 16 Apr 2012)
New Revision: 40198
Modified:
trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/util/Debug.java
trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/util/PreferencePageAbstractTest.java
trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractPluginsLoadTest.java
trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractRuntimeTest.java
Log:
Organize imports
Modified: trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/util/Debug.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/util/Debug.java 2012-04-16 09:18:37 UTC (rev 40197)
+++ trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/util/Debug.java 2012-04-16 09:20:22 UTC (rev 40198)
@@ -11,7 +11,6 @@
package org.jboss.tools.test.util;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.ui.PlatformUI;
import org.jboss.tools.tests.TestsPlugin;
public class Debug {
Modified: trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/util/PreferencePageAbstractTest.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/util/PreferencePageAbstractTest.java 2012-04-16 09:18:37 UTC (rev 40197)
+++ trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/util/PreferencePageAbstractTest.java 2012-04-16 09:20:22 UTC (rev 40198)
@@ -10,11 +10,12 @@
******************************************************************************/
package org.jboss.tools.test.util;
+import junit.framework.TestCase;
+
import org.eclipse.jface.preference.PreferenceDialog;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.PreferencesUtil;
-import junit.framework.TestCase;
public class PreferencePageAbstractTest extends TestCase {
Modified: trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractPluginsLoadTest.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractPluginsLoadTest.java 2012-04-16 09:18:37 UTC (rev 40197)
+++ trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractPluginsLoadTest.java 2012-04-16 09:20:22 UTC (rev 40198)
@@ -20,12 +20,7 @@
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
-import junit.framework.TestCase;
-
import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IBundleGroup;
-import org.eclipse.core.runtime.IBundleGroupProvider;
-import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Platform;
import org.osgi.framework.Bundle;
import org.w3c.dom.Document;
Modified: trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractRuntimeTest.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractRuntimeTest.java 2012-04-16 09:18:37 UTC (rev 40197)
+++ trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractRuntimeTest.java 2012-04-16 09:20:22 UTC (rev 40198)
@@ -10,13 +10,13 @@
******************************************************************************/
package org.jboss.tools.tests;
+import junit.framework.TestCase;
+
import org.eclipse.core.runtime.IBundleGroup;
import org.eclipse.core.runtime.IBundleGroupProvider;
import org.eclipse.core.runtime.Platform;
import org.osgi.framework.Bundle;
-import junit.framework.TestCase;
-
public class AbstractRuntimeTest extends TestCase{
public static final String BUNDLE_GROUP_PROVIDER_NAME = "Update Manager Configurator";
13 years, 8 months
JBoss Tools SVN: r40196 - in trunk/central/plugins/org.jboss.tools.central: src/org/jboss/tools/central/editors and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-04-14 15:45:13 -0400 (Sat, 14 Apr 2012)
New Revision: 40196
Added:
trunk/central/plugins/org.jboss.tools.central/icons/toolbar-arrow-down.gif
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/JBossCentralEditor.java
Log:
JBIDE-10429 - Narrow editor area causes broken layout
Added: trunk/central/plugins/org.jboss.tools.central/icons/toolbar-arrow-down.gif
===================================================================
(Binary files differ)
Property changes on: trunk/central/plugins/org.jboss.tools.central/icons/toolbar-arrow-down.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
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 2012-04-14 18:11:05 UTC (rev 40195)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/JBossCentralEditor.java 2012-04-14 19:45:13 UTC (rev 40196)
@@ -11,6 +11,7 @@
package org.jboss.tools.central.editors;
import java.io.UnsupportedEncodingException;
+import java.lang.reflect.Field;
import java.net.URLEncoder;
import org.eclipse.core.commands.AbstractHandler;
@@ -23,20 +24,28 @@
import org.eclipse.jface.action.ControlContribution;
import org.eclipse.jface.action.GroupMarker;
import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.TextViewer;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.ControlAdapter;
import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.ui.IEditorInput;
@@ -46,6 +55,9 @@
import org.eclipse.ui.forms.editor.SharedHeaderFormEditor;
import org.eclipse.ui.forms.widgets.ImageHyperlink;
import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.internal.forms.widgets.BusyIndicator;
+import org.eclipse.ui.internal.forms.widgets.FormHeading;
+import org.eclipse.ui.internal.forms.widgets.TitleRegion;
import org.eclipse.ui.menus.CommandContributionItem;
import org.jboss.tools.central.JBossCentralActivator;
import org.jboss.tools.central.actions.OpenJBossBlogsHandler;
@@ -63,7 +75,7 @@
private static final String UTF_8_ENCODING = "UTF-8";
- private static final String JBOSS_CENTRAL = "JBoss Central";
+ public static final String JBOSS_CENTRAL = "JBoss Central";
public static final String ID = "org.jboss.tools.central.editors.JBossCentralEditor";
@@ -75,6 +87,10 @@
private Image gettingStartedImage;
private Image softwareImage;
+ private Composite toolbarComposite;
+
+ private Composite searchComposite;
+
public JBossCentralEditor() {
super();
}
@@ -164,33 +180,11 @@
@Override
protected void createHeaderContents(IManagedForm headerForm) {
final ScrolledForm form = headerForm.getForm();
- form.setText(JBOSS_CENTRAL);
+ //form.setText(JBOSS_CENTRAL);
+ new HeaderText(form);
form.setToolTipText(JBOSS_CENTRAL);
form.setImage(getHeaderImage());
getToolkit().decorateFormHeading(form.getForm());
-
- form.addControlListener(new ControlAdapter() {
-
- boolean resize;
-
- @Override
- public void controlResized(ControlEvent e) {
- if (resize) {
- return;
- }
- resize = true;
- try {
- Point size = form.getSize();
- if (size.x < 500) {
- form.setSize(500, size.y);
- form.layout(true, true);
- }
- } finally {
- resize = false;
- }
- }
-
- });
IToolBarManager toolbar = form.getToolBarManager();
ControlContribution searchControl = new ControlContribution("Search") {
@@ -214,8 +208,10 @@
}
protected Control createSearchControl(Composite parent) {
+
+ toolbarComposite = parent;
- Composite searchComposite = getToolkit().createComposite(parent);
+ searchComposite = getToolkit().createComposite(parent);
GridData gd = new GridData(SWT.BEGINNING, SWT.FILL, true, true);
gd.widthHint = 200;
searchComposite.setLayoutData(gd);
@@ -235,8 +231,7 @@
gd = new GridData(SWT.FILL, SWT.TOP, false, false);
menuLink.setLayoutData(gd);
menuLink.setBackground(null);
- menuLink.setImage(CommonImages
- .getImage(CommonImages.TOOLBAR_ARROW_DOWN));
+ menuLink.setImage(JBossCentralActivator.getDefault().getImage("/icons/toolbar-arrow-down.gif"));
menuLink.setToolTipText("Search Menu");
final TextSearchControl searchControl = new TextSearchControl(
searchComposite, false);
@@ -362,4 +357,100 @@
return softwarePage;
}
+ private class HeaderText {
+
+ private StyledText titleLabel;
+
+ private BusyIndicator busyLabel;
+
+ private TitleRegion titleRegion;
+
+ private ScrolledForm form;
+
+ public HeaderText(ScrolledForm form) {
+ this.form = form;
+ try {
+ FormHeading heading = (FormHeading) form.getForm().getHead();
+ heading.setBusy(true);
+ heading.setBusy(false);
+
+ Field field = FormHeading.class.getDeclaredField("titleRegion"); //$NON-NLS-1$
+ field.setAccessible(true);
+ titleRegion = (TitleRegion) field.get(heading);
+
+ for (Control child : titleRegion.getChildren())
+ if (child instanceof BusyIndicator) {
+ busyLabel = (BusyIndicator) child;
+ break;
+ }
+ if (busyLabel == null)
+ throw new IllegalArgumentException();
+
+ final TextViewer titleViewer = new TextViewer(titleRegion, SWT.READ_ONLY);
+ titleViewer.setDocument(new Document());
+
+ titleLabel = titleViewer.getTextWidget();
+ titleLabel.setText(JBossCentralEditor.JBOSS_CENTRAL);
+ titleLabel.setForeground(heading.getForeground());
+ titleLabel.setFont(heading.getFont());
+ titleLabel.addFocusListener(new FocusAdapter() {
+ public void focusLost(FocusEvent e) {
+ titleLabel.setSelection(0);
+ Event selectionEvent= new Event();
+ selectionEvent.x = 0;
+ selectionEvent.y = 0;
+ titleLabel.notifyListeners(SWT.Selection, selectionEvent);
+ }
+ });
+
+ Point size = titleLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+
+ final Image emptyImage = new Image(heading.getDisplay(), size.x, size.y);
+ busyLabel.setImage(emptyImage);
+ titleLabel.addDisposeListener(new DisposeListener() {
+
+ @Override
+ public void widgetDisposed(DisposeEvent e) {
+ emptyImage.dispose();
+ }
+ });
+
+ busyLabel.addControlListener(new ControlAdapter() {
+ public void controlMoved(ControlEvent e) {
+ updateSizeAndLocations();
+ }
+ });
+ titleLabel.moveAbove(busyLabel);
+ titleRegion.addControlListener(new ControlAdapter() {
+ public void controlResized(ControlEvent e) {
+ updateSizeAndLocations();
+ }
+ });
+ updateSizeAndLocations();
+ } catch (Exception e) {
+ JBossCentralActivator.log(e);
+ }
+ }
+
+ private void updateSizeAndLocations() {
+ if (busyLabel == null || busyLabel.isDisposed())
+ return;
+ if (titleLabel == null || titleLabel.isDisposed())
+ return;
+ Point size = titleLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
+ int y = (titleLabel.getParent().getSize().y - size.y) / 2;
+ titleLabel.setBounds(busyLabel.getLocation().x + 20, y, size.x, size.y);
+ titleRegion.setBounds(5, 0, size.x + 40, size.y + 8 );
+ if (toolbarComposite != null && !toolbarComposite.isDisposed()) {
+ int formWidth = form.getSize().x;
+ int width = size.x + 40 + toolbarComposite.getSize().x;
+ if (width > formWidth) {
+ searchComposite.setVisible(false);
+ } else{
+ searchComposite.setVisible(true);
+ }
+ }
+ }
+ }
+
}
13 years, 8 months
JBoss Tools SVN: r40195 - in trunk/download.jboss.org/jbosstools/updates/requirements: indigo and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-04-14 14:11:05 -0400 (Sat, 14 Apr 2012)
New Revision: 40195
Removed:
trunk/download.jboss.org/jbosstools/updates/requirements/helios/build-reg...
Modified:
trunk/download.jboss.org/jbosstools/updates/requirements/helios/build.xml
trunk/download.jboss.org/jbosstools/updates/requirements/indigo/build.xml
trunk/download.jboss.org/jbosstools/updates/requirements/juno/build.xml
Log:
fix script so that metadata gets compressed; remove need for build-regen-meta-only.xml
Deleted: trunk/download.jboss.org/jbosstools/updates/requirements/helios/build-reg...
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/requirements/helios/build-reg... 2012-04-14 18:10:51 UTC (rev 40194)
+++ trunk/download.jboss.org/jbosstools/updates/requirements/helios/build-reg... 2012-04-14 18:11:05 UTC (rev 40195)
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project default="mirror">
- <!-- run locally in Eclipse (to resolve p2 tasks) using these commandline options:
-
- -os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}
- -consoleLog -nosplash -data /tmp
- -application org.eclipse.ant.core.antRunner
- -f "/home/nboldt/tru/download.jboss.org/jbosstools/updates/requirements/helios/build.xml"
-
- or, run headless on qa01 server, where Eclipse is installed into ~/helios:
-
- export JAVA_HOME=/opt/jdk1.6.0; \
- ${JAVA_HOME}/bin/java -cp ~/helios/plugins/org.eclipse.equinox.launcher_*.jar \
- org.eclipse.equinox.launcher.Main -vm ${JAVA_HOME} -consoleLog -nosplash -data /tmp \
- -application org.eclipse.ant.core.antRunner \
- -f ~/RHDS/updates/requirements/helios/build.xml -Ddestination=/tmp/helios-repo
- -->
- <target name="mirror">
- <property name="URL" value="http://download.eclipse.org/releases/helios/201102250900/" />
-
- <property name="destination" value="/home/nboldt/tru/download.jboss.org/jbosstools/updates/requirements/helios/" />
- <property name="compress" value="false" />
-
- <p2.publish.featuresAndBundles metadataRepository="file:${destination}/SR2/" artifactRepository="file:${destination}/SR2/" publishartifacts="true" source="${destination}/SR2/" compress="${compress}" />
- </target>
-</project>
Modified: trunk/download.jboss.org/jbosstools/updates/requirements/helios/build.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/requirements/helios/build.xml 2012-04-14 18:10:51 UTC (rev 40194)
+++ trunk/download.jboss.org/jbosstools/updates/requirements/helios/build.xml 2012-04-14 18:11:05 UTC (rev 40195)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project default="mirror">
+<project default="run">
<!-- run locally in Eclipse (to resolve p2 tasks) using these commandline options:
-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}
@@ -15,12 +15,13 @@
-application org.eclipse.ant.core.antRunner \
-f ~/RHDS/updates/requirements/helios/build.xml -Ddestination=/tmp/helios-repo
-->
- <target name="mirror">
<property name="URL" value="http://download.eclipse.org/releases/helios/201102250900/" />
<property name="destination" value="/home/nboldt/tru/download.jboss.org/jbosstools/updates/requirements/helios/" />
<property name="compress" value="true" />
+ <target name="run" depends="mirror,regen"/>
+ <target name="mirror">
<p2.mirror>
<repository location="file:${destination}/SR2/" name="Helios SR2" />
<source>
@@ -29,7 +30,8 @@
<slicingOptions includeFeatures="true" followStrict="true" />
</p2.mirror>
-
+ </target>
+ <target name="regen">
<p2.publish.featuresAndBundles metadataRepository="file:${destination}/SR2/" artifactRepository="file:${destination}/SR2/" publishartifacts="true" source="${destination}/SR2/" compress="${compress}" />
</target>
</project>
Modified: trunk/download.jboss.org/jbosstools/updates/requirements/indigo/build.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/requirements/indigo/build.xml 2012-04-14 18:10:51 UTC (rev 40194)
+++ trunk/download.jboss.org/jbosstools/updates/requirements/indigo/build.xml 2012-04-14 18:11:05 UTC (rev 40195)
@@ -15,16 +15,16 @@
-application org.eclipse.ant.core.antRunner \
-f ~/RHDS/updates/requirements/indigo/build.xml -Ddestination=/tmp/indigo-repo
-->
+ <!-- <property name="URL" value="http://download.eclipse.org/releases/indigo/201202240900/" /> -->
+ <!-- must include BOTH Indigo and Eclipse in the same repo now, since the Indigo site is broken (refs an old Eclipse build which is gone) -->
+ <property name="URL1" value="http://download.eclipse.org/releases/indigo/201202240900/" />
+ <property name="URL2" value="http://download.eclipse.org/eclipse/updates/3.7/R-3.7.2-201202080800/"/>
+
+ <property name="destination" value="/home/nboldt/tru/download.jboss.org/jbosstools/updates/requirements/indigo/" />
+ <property name="compress" value="true" />
+
<target name="run" depends="mirror,regen"/>
<target name="mirror">
- <!-- <property name="URL" value="http://download.eclipse.org/releases/indigo/201202240900/" /> -->
- <!-- must include BOTH Indigo and Eclipse in the same repo now, since the Indigo site is broken (refs an old Eclipse build which is gone) -->
- <property name="URL1" value="http://download.eclipse.org/releases/indigo/201202240900/" />
- <property name="URL2" value="http://download.eclipse.org/eclipse/updates/3.7/R-3.7.2-201202080800/"/>
-
- <property name="destination" value="/home/nboldt/tru/download.jboss.org/jbosstools/updates/requirements/indigo/" />
- <property name="compress" value="true" />
-
<p2.mirror>
<repository location="file:${destination}/201202240900-SR2/" name="Indigo 201202240900-SR2" />
<source>
Modified: trunk/download.jboss.org/jbosstools/updates/requirements/juno/build.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/requirements/juno/build.xml 2012-04-14 18:10:51 UTC (rev 40194)
+++ trunk/download.jboss.org/jbosstools/updates/requirements/juno/build.xml 2012-04-14 18:11:05 UTC (rev 40195)
@@ -21,7 +21,6 @@
<target name="run" depends="mirror,regen"/>
<target name="mirror">
-
<p2.mirror>
<repository location="file:${destination}/201203230900-M6/" name="Juno 201203230900-M6" />
<source>
13 years, 8 months
JBoss Tools SVN: r40192 - trunk/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-04-14 12:27:03 -0400 (Sat, 14 Apr 2012)
New Revision: 40192
Modified:
trunk/build/pom-soa-tooling.xml
Log:
smooks is no longer in JBT/JBDS so remove from the default run of the continuous build
Modified: trunk/build/pom-soa-tooling.xml
===================================================================
--- trunk/build/pom-soa-tooling.xml 2012-04-14 16:21:34 UTC (rev 40191)
+++ trunk/build/pom-soa-tooling.xml 2012-04-14 16:27:03 UTC (rev 40192)
@@ -161,7 +161,7 @@
<profile>
<id>smooks</id>
<activation>
- <activeByDefault>true</activeByDefault>
+ <activeByDefault>false</activeByDefault>
</activation>
<modules>
<module>../smooks</module>
13 years, 8 months