JBoss Tools SVN: r38034 - in trunk/usage: plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/reporting and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-01-23 13:18:05 -0500 (Mon, 23 Jan 2012)
New Revision: 38034
Modified:
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/AbstractGoogleAnalyticsParameters.java
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsUrlStrategy.java
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/IGoogleAnalyticsParameters.java
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/reporting/JBossToolsEclipseEnvironment.java
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GoogleAnalyticsUrlStrategyTest.java
Log:
[JBIDE-10653] renamed #getCentralEnabled to #getEvent, added testcase
Modified: trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/AbstractGoogleAnalyticsParameters.java
===================================================================
--- trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/AbstractGoogleAnalyticsParameters.java 2012-01-23 18:07:12 UTC (rev 38033)
+++ trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/AbstractGoogleAnalyticsParameters.java 2012-01-23 18:18:05 UTC (rev 38034)
@@ -10,7 +10,9 @@
******************************************************************************/
package org.jboss.tools.usage.googleanalytics;
+import java.text.MessageFormat;
+
/**
* @author Andre Dietisheim
*/
@@ -47,4 +49,33 @@
public String getUserDefined() {
return userDefined;
}
+
+ public static class GoogleAnalyticsEvent {
+
+ private String name;
+ private String label;
+ private String value;
+
+ public GoogleAnalyticsEvent(String name, String label, String value) {
+ this.name = name;
+ this.label = label;
+ this.value = value;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getLabel() {
+ return label;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public String toString() {
+ return MessageFormat.format("5({0}*{1}*{2})", name, label, value);
+ }
+ }
}
Modified: trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsUrlStrategy.java
===================================================================
--- trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsUrlStrategy.java 2012-01-23 18:07:12 UTC (rev 38033)
+++ trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/GoogleAnalyticsUrlStrategy.java 2012-01-23 18:18:05 UTC (rev 38034)
@@ -70,7 +70,10 @@
// appendParameter(IGoogleAnalyticsParameters.PARAM_HID,
// getRandomNumber(), builder);
appendParameter(IGoogleAnalyticsParameters.PARAM_FLASH_VERSION, googleParameters.getFlashVersion(), builder);
- appendParameter(IGoogleAnalyticsParameters.PARAM_EVENT_TRACKING, googleParameters.getCentralEnabled(), builder);
+ /**
+ * TODO: support multiple events. Obviously these would just get appended to the very same string
+ */
+ appendParameter(IGoogleAnalyticsParameters.PARAM_EVENT_TRACKING, googleParameters.getEvent().toString(), builder);
appendParameter(IGoogleAnalyticsParameters.PARAM_REFERRAL, googleParameters.getReferral(), builder);
appendParameter(IGoogleAnalyticsParameters.PARAM_PAGE_REQUEST, focusPoint.getURI(), builder);
Modified: trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/IGoogleAnalyticsParameters.java
===================================================================
--- trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/IGoogleAnalyticsParameters.java 2012-01-23 18:07:12 UTC (rev 38033)
+++ trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/googleanalytics/IGoogleAnalyticsParameters.java 2012-01-23 18:18:05 UTC (rev 38034)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.usage.googleanalytics;
+import org.jboss.tools.usage.googleanalytics.AbstractGoogleAnalyticsParameters.GoogleAnalyticsEvent;
+
/**
* An interface that provides methods for all parameters that google analytics
* needs to know about.
@@ -112,7 +114,10 @@
*/
public String getUserDefined();
- public String getCentralEnabled();
+ /**
+ * TODO: support multiple events.
+ */
+ public GoogleAnalyticsEvent getEvent();
public String getCentralEnabledValue();
}
Modified: trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/reporting/JBossToolsEclipseEnvironment.java
===================================================================
--- trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/reporting/JBossToolsEclipseEnvironment.java 2012-01-23 18:07:12 UTC (rev 38033)
+++ trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/reporting/JBossToolsEclipseEnvironment.java 2012-01-23 18:18:05 UTC (rev 38034)
@@ -27,14 +27,12 @@
public class JBossToolsEclipseEnvironment extends AbstractEclipseEnvironment implements IJBossToolsEclipseEnvironment {
private static final String NOT_INSTALLED = "N/A"; //$NON-NLS-1$
- private static final String CLOSED_BRACKET = ")"; //$NON-NLS-1$
private static final String TRUE = "true";
private static final String FALSE = "false";
private static final char JBOSS_COMPONENTS_DELIMITER = '-';
private static final String JBOSS_CENTRAL_PLUGIN_ID = "org.jboss.tools.central"; //$NON-NLS-1$
private static final String SHOW_JBOSS_CENTRAL_ON_STARTUP = "showJBossCentralOnStartup"; //$NON-NLS-1$
private static final boolean SHOW_JBOSS_CENTRAL_ON_STARTUP_DEFAULT_VALUE = true;
- private static final String JBOSS_CENTRAL_PARAMETER = "5(central*showOnStartup*"; //$NON-NLS-1$
public JBossToolsEclipseEnvironment(String accountName, String hostName, IEclipsePreferences preferences) {
super(accountName, hostName, preferences);
@@ -68,8 +66,11 @@
return getLinuxDistroNameAndVersion() != null;
}
- public String getCentralEnabled() {
- return JBOSS_CENTRAL_PARAMETER + getCentralEnabledValue() + CLOSED_BRACKET;
+ /**
+ * TODO: support multiple events.
+ */
+ public GoogleAnalyticsEvent getEvent() {
+ return new GoogleAnalyticsEvent("central", "showOnStartup", getCentralEnabledValue());
}
public String getCentralEnabledValue() {
Modified: trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GoogleAnalyticsUrlStrategyTest.java
===================================================================
--- trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GoogleAnalyticsUrlStrategyTest.java 2012-01-23 18:07:12 UTC (rev 38033)
+++ trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GoogleAnalyticsUrlStrategyTest.java 2012-01-23 18:18:05 UTC (rev 38034)
@@ -13,6 +13,7 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
+import java.io.IOException;
import java.io.UnsupportedEncodingException;
import org.jboss.tools.usage.googleanalytics.GoogleAnalyticsUrlStrategy;
@@ -91,6 +92,19 @@
assertEquals(3, eclipseEnvironment.getVisitCount());
}
+ @Test
+ public void verifyCentralIsStarted() throws IOException {
+ IFocusPoint focusPoint = new FocusPoint("testing").setChild(new FocusPoint("strategy"));
+ String url = urlStrategy.build(focusPoint);
+
+ String centralEnabled = new ReportingEclipseEnvironmentFake().getCentralEnabledValue();
+
+ assertTrue(areEqualParameterValues(
+ IGoogleAnalyticsParameters.PARAM_EVENT_TRACKING
+ , url
+ , IGoogleAnalyticsParameters.PARAM_EVENT_TRACKING + "=5(central*showOnStartup*" + centralEnabled + ")&"));
+ }
+
private boolean areEqualParameterValues(String paramName, String url, String targetUrl) {
return areEqualParameterValues(paramName, url, targetUrl, String.valueOf(IGoogleAnalyticsParameters.AMPERSAND));
}
12 years, 11 months
JBoss Tools SVN: r38033 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2012-01-23 13:07:12 -0500 (Mon, 23 Jan 2012)
New Revision: 38033
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPage.java
Log:
fixed grammar
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPage.java 2012-01-23 18:03:37 UTC (rev 38032)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPage.java 2012-01-23 18:07:12 UTC (rev 38033)
@@ -57,7 +57,7 @@
public NewApplicationWizardPage(ApplicationWizardModel wizardModel, IWizard wizard) {
super("New OpenShift Express Application",
- "Select a name and an type for your new OpenShift Express application",
+ "Enter a name and select a type for your new OpenShift Express application",
"NewOpenShiftExpressApplication", wizard);
this.wizardModel = wizardModel;
this.model = new NewApplicationWizardPageModel(wizardModel);
12 years, 11 months
JBoss Tools SVN: r38032 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2012-01-23 13:03:37 -0500 (Mon, 23 Jan 2012)
New Revision: 38032
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java
Log:
fixed delete app wording JBIDE-10694
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java 2012-01-23 17:59:33 UTC (rev 38031)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java 2012-01-23 18:03:37 UTC (rev 38032)
@@ -283,8 +283,8 @@
getShell(),
"Delete Application",
NLS.bind(
- "You're up to delete all data within an application. The data may not be recovered. "
- + "Are you sure that you want to delete application {0}?",
+ "This action will permanently remove the application and all of its data. The data cannot be recovered. "
+ + "Are you sure that you want to delete application '{0}' ?",
model.getSelectedApplication().getName()))) {
WizardUtils.runInWizard(
new Job(NLS.bind("Deleting application \"{0}\"...",
12 years, 11 months
JBoss Tools SVN: r38031 - trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/reporting.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-01-23 12:59:33 -0500 (Mon, 23 Jan 2012)
New Revision: 38031
Modified:
trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/reporting/JBossToolsEclipseEnvironment.java
Log:
JBIDE-10653 detect who have central enabled
Modified: trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/reporting/JBossToolsEclipseEnvironment.java
===================================================================
--- trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/reporting/JBossToolsEclipseEnvironment.java 2012-01-23 17:55:05 UTC (rev 38030)
+++ trunk/usage/plugins/org.jboss.tools.usage/src/org/jboss/tools/usage/internal/reporting/JBossToolsEclipseEnvironment.java 2012-01-23 17:59:33 UTC (rev 38031)
@@ -26,6 +26,7 @@
*/
public class JBossToolsEclipseEnvironment extends AbstractEclipseEnvironment implements IJBossToolsEclipseEnvironment {
+ private static final String NOT_INSTALLED = "N/A"; //$NON-NLS-1$
private static final String CLOSED_BRACKET = ")"; //$NON-NLS-1$
private static final String TRUE = "true";
private static final String FALSE = "false";
@@ -74,7 +75,7 @@
public String getCentralEnabledValue() {
Bundle bundle = Platform.getBundle(JBOSS_CENTRAL_PLUGIN_ID);
if (bundle == null) {
- return FALSE;
+ return NOT_INSTALLED;
}
IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode(JBOSS_CENTRAL_PLUGIN_ID);
boolean showOnStartup = prefs.getBoolean(SHOW_JBOSS_CENTRAL_ON_STARTUP,
12 years, 11 months
JBoss Tools SVN: r38030 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2012-01-23 12:55:05 -0500 (Mon, 23 Jan 2012)
New Revision: 38030
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java
Log:
removed wrong comma
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java 2012-01-23 15:26:42 UTC (rev 38029)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java 2012-01-23 17:55:05 UTC (rev 38030)
@@ -74,7 +74,7 @@
private ImportProjectWizardModel wizardModel;
public ApplicationWizardPage(IWizard wizard, ImportProjectWizardModel wizardModel) {
- super("Application selection", "Please select an application to start with, or create a new one.",
+ super("Application selection", "Please select an application to start with or create a new one.",
"Application selection", wizard);
this.wizardModel = wizardModel;
this.model = new ApplicationWizardPageModel(wizardModel);
12 years, 11 months
JBoss Tools SVN: r38029 - trunk/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-01-23 10:26:42 -0500 (Mon, 23 Jan 2012)
New Revision: 38029
Modified:
trunk/build/build.xml
Log:
JBIDE-10690 bump from maven 3.0.3 to 3.0.4
Modified: trunk/build/build.xml
===================================================================
--- trunk/build/build.xml 2012-01-23 15:23:24 UTC (rev 38028)
+++ trunk/build/build.xml 2012-01-23 15:26:42 UTC (rev 38029)
@@ -2,7 +2,7 @@
<!-- ****************************** Configuration ****************************** -->
<!-- default maven version -->
- <property name="maven.version" value="3.0.3" />
+ <property name="maven.version" value="3.0.4" />
<!-- set name of component(s) to build+test, IN ORDER; if no subcomponents, use "." -->
<property name="COMPONENTS"
12 years, 11 months
JBoss Tools SVN: r38028 - trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk.
by jbosstools-commits@lists.jboss.org
Author: dpalmer
Date: 2012-01-23 10:23:24 -0500 (Mon, 23 Jan 2012)
New Revision: 38028
Modified:
trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp...
trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp...
Log:
[JBIDE-10672] Fixed URL
Modified: trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp...
===================================================================
--- trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp... 2012-01-23 12:33:09 UTC (rev 38027)
+++ trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp... 2012-01-23 15:23:24 UTC (rev 38028)
@@ -27,14 +27,14 @@
<child location='../../../staging/jbosstools-3.3_trunk.component--common/all/repo/'/>
<child location='../../../staging/jbosstools-3.3_trunk.component--deltacloud/all/repo/'/>
<child location='../../../staging/jbosstools-3.3_trunk.component--esb/all/repo/'/>
-<child location='../../../staging/jbosstools-3.3_trunk.component--switchyard/all/repo/'/>
+<child location='../../../staging/SwitchYard-Tools/all/repo/'/>
<child location='../../../staging/jbosstools-3.3_trunk.component--examples/all/repo/'/>
<child location='../../../staging.previous/jbosstools-3.3_trunk.component--central/all/repo/'/>
<child location='../../../staging.previous/jbosstools-3.3_trunk.component--common/all/repo/'/>
<child location='../../../staging.previous/jbosstools-3.3_trunk.component--deltacloud/all/repo/'/>
<child location='../../../staging.previous/jbosstools-3.3_trunk.component--esb/all/repo/'/>
-<child location='../../../staging.previous/jbosstools-3.3_trunk.component--switchyard/all/repo/'/>
+<child location='../../../staging.previous/SwitchYard-Tools/all/repo/'/>
<child location='../../../staging.previous/jbosstools-3.3_trunk.component--examples/all/repo/'/>
<child location='../../../staging/jbosstools-3.3_trunk.component--flow/all/repo/'/>
Modified: trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp...
===================================================================
--- trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp... 2012-01-23 12:33:09 UTC (rev 38027)
+++ trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp... 2012-01-23 15:23:24 UTC (rev 38028)
@@ -27,14 +27,14 @@
<child location='../../../staging/jbosstools-3.3_trunk.component--common/all/repo/'/>
<child location='../../../staging/jbosstools-3.3_trunk.component--deltacloud/all/repo/'/>
<child location='../../../staging/jbosstools-3.3_trunk.component--esb/all/repo/'/>
-<child location='../../../staging/jbosstools-3.3_trunk.component--switchyard/all/repo/'/>
+<child location='../../../staging/SwitchYard-Tools/all/repo/'/>
<child location='../../../staging/jbosstools-3.3_trunk.component--examples/all/repo/'/>
<child location='../../../staging.previous/jbosstools-3.3_trunk.component--central/all/repo/'/>
<child location='../../../staging.previous/jbosstools-3.3_trunk.component--common/all/repo/'/>
<child location='../../../staging.previous/jbosstools-3.3_trunk.component--deltacloud/all/repo/'/>
<child location='../../../staging.previous/jbosstools-3.3_trunk.component--esb/all/repo/'/>
-<child location='../../../staging.previous/jbosstools-3.3_trunk.component--switchyard/all/repo/'/>
+<child location='../../../staging.previous/SwitchYard-Tools/all/repo/'/>
<child location='../../../staging.previous/jbosstools-3.3_trunk.component--examples/all/repo/'/>
<child location='../../../staging/jbosstools-3.3_trunk.component--flow/all/repo/'/>
12 years, 11 months
JBoss Tools SVN: r38027 - in trunk/openshift: tests/org.jboss.tools.openshift.egit.test/META-INF and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-01-23 07:33:09 -0500 (Mon, 23 Jan 2012)
New Revision: 38027
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/GitIgnore.java
trunk/openshift/tests/org.jboss.tools.openshift.egit.test/META-INF/MANIFEST.MF
trunk/openshift/tests/org.jboss.tools.openshift.egit.test/src/org/jboss/tools/openshift/egit/internal/test/GitIgnoreTest.java
Log:
[JBIDE-10687] switched internal set to LinkedHashSet. Added tests to ensure the ordering of the entries is not altered when adding,writing.
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/GitIgnore.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/GitIgnore.java 2012-01-23 11:03:36 UTC (rev 38026)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/GitIgnore.java 2012-01-23 12:33:09 UTC (rev 38027)
@@ -15,7 +15,7 @@
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
-import java.util.HashSet;
+import java.util.LinkedHashSet;
import java.util.Set;
import org.eclipse.core.resources.IFile;
@@ -45,7 +45,7 @@
}
private void initEntries(IFile gitIgnore) throws IOException, CoreException {
- this.entries = new HashSet<String>();
+ this.entries = new LinkedHashSet<String>();
if (gitIgnore == null
|| !gitIgnore.isAccessible()) {
return;
Modified: trunk/openshift/tests/org.jboss.tools.openshift.egit.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.egit.test/META-INF/MANIFEST.MF 2012-01-23 11:03:36 UTC (rev 38026)
+++ trunk/openshift/tests/org.jboss.tools.openshift.egit.test/META-INF/MANIFEST.MF 2012-01-23 12:33:09 UTC (rev 38027)
@@ -14,3 +14,4 @@
org.jboss.tools.openshift.egit.core;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
+Import-Package: org.jboss.tools.common.util
Modified: trunk/openshift/tests/org.jboss.tools.openshift.egit.test/src/org/jboss/tools/openshift/egit/internal/test/GitIgnoreTest.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.egit.test/src/org/jboss/tools/openshift/egit/internal/test/GitIgnoreTest.java 2012-01-23 11:03:36 UTC (rev 38026)
+++ trunk/openshift/tests/org.jboss.tools.openshift.egit.test/src/org/jboss/tools/openshift/egit/internal/test/GitIgnoreTest.java 2012-01-23 12:33:09 UTC (rev 38027)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.openshift.egit.internal.test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.io.ByteArrayInputStream;
@@ -21,6 +23,7 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jgit.lib.Constants;
+import org.jboss.tools.common.util.FileUtil;
import org.jboss.tools.openshift.egit.core.GitIgnore;
import org.junit.Test;
@@ -87,7 +90,65 @@
silentlyDelete(project);
}
}
+
+ @Test
+ public void writingDoesNotAlterOrdering() throws CoreException, IOException {
+ IFile gitIgnoreFile = null;
+ IProject project = null;
+ try {
+ project = createRandomProject();
+ gitIgnoreFile = createGitFile(project, "redhat", "jboss", "tools");
+ String entries = FileUtil.readStream(gitIgnoreFile);
+ GitIgnore gitIgnore = new GitIgnore(gitIgnoreFile);
+ gitIgnore.write(null);
+ String entriesAfterWrite = FileUtil.readStream(gitIgnoreFile);
+ assertEquals(entries, entriesAfterWrite);
+
+ } finally {
+ silentlyDelete(project);
+ }
+ }
+
+ @Test
+ public void newEntriesAreAddedToTheEnd() throws CoreException, IOException {
+ IFile gitIgnoreFile = null;
+ IProject project = null;
+ try {
+ project = createRandomProject();
+ gitIgnoreFile = createGitFile(project, "redhat", "jboss", "tools");
+ String entries = FileUtil.readStream(gitIgnoreFile);
+ GitIgnore gitIgnore = new GitIgnore(gitIgnoreFile);
+ gitIgnore.add("adietish");
+ gitIgnore.write(null);
+
+ String entriesAfterWrite = FileUtil.readStream(gitIgnoreFile);
+ assertFalse(entries.equals(entriesAfterWrite));
+ assertTrue(entriesAfterWrite.indexOf(entries) == 0);
+ } finally {
+ silentlyDelete(project);
+ }
+ }
+
+ @Test
+ public void addingExistingEntryDoesNotMoveItToTheEnd() throws CoreException, IOException {
+ IFile gitIgnoreFile = null;
+ IProject project = null;
+ try {
+ project = createRandomProject();
+ gitIgnoreFile = createGitFile(project, "redhat", "jboss", "tools");
+ String entries = FileUtil.readStream(gitIgnoreFile);
+ GitIgnore gitIgnore = new GitIgnore(gitIgnoreFile);
+ gitIgnore.add("jboss");
+ gitIgnore.write(null);
+
+ String entriesAfterWrite = FileUtil.readStream(gitIgnoreFile);
+ assertEquals(entries, entriesAfterWrite);
+ } finally {
+ silentlyDelete(project);
+ }
+ }
+
private IFile createGitFile(IProject project, String... gitIgnoreEntries) throws CoreException {
IFile gitFile = project.getFile(Constants.GITIGNORE_FILENAME);
StringBuilder builder = new StringBuilder();
12 years, 11 months
JBoss Tools SVN: r38026 - trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2012-01-23 06:03:36 -0500 (Mon, 23 Jan 2012)
New Revision: 38026
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java
Log:
https://issues.jboss.org/browse/JBIDE-10431 : browsersim should be sexy
- fixed the problem when the progress bar is never hidden on linux (progress 100% is reported)
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java 2012-01-23 10:56:57 UTC (rev 38025)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java 2012-01-23 11:03:36 UTC (rev 38026)
@@ -157,8 +157,12 @@
browser.addProgressListener(new ProgressListener() {
public void changed(ProgressEvent event) {
- if (event.total == 0) return;
- int ratio = event.current * 100 / event.total;
+ int ratio;
+ if (event.current == event.total || event.total == 0) {
+ ratio = -1;
+ } else {
+ ratio = event.current * 100 / event.total;
+ }
skin.progressChanged(ratio);
}
public void completed(ProgressEvent event) {
12 years, 11 months
JBoss Tools SVN: r38025 - in trunk: download.jboss.org/jbosstools/builds/staging/_composite_/trunk and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dpalmer
Date: 2012-01-23 05:56:57 -0500 (Mon, 23 Jan 2012)
New Revision: 38025
Modified:
trunk/build/aggregate/soa-site/site.xml
trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp...
trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp...
Log:
[JBIDE-10672] Added switchyard to the soa site
Modified: trunk/build/aggregate/soa-site/site.xml
===================================================================
--- trunk/build/aggregate/soa-site/site.xml 2012-01-23 04:45:00 UTC (rev 38024)
+++ trunk/build/aggregate/soa-site/site.xml 2012-01-23 10:56:57 UTC (rev 38025)
@@ -8,6 +8,11 @@
<category name="AbridgedTools" />
<category name="SOATools" />
</feature>
+ <feature url="features/org.switchyard.tools.feature_0.0.0.jar" id="org.switchyard.tools.feature" version="0.0.0">
+ <category name="AbridgedTools" />
+ <category name="SOATools" />
+ </feature>
+
<feature url="features/org.jboss.tools.smooks.feature_0.0.0.jar" id="org.jboss.tools.smooks.feature" version="0.0.0">
<category name="AbridgedTools" />
<category name="SOATools" />
Modified: trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp...
===================================================================
--- trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp... 2012-01-23 04:45:00 UTC (rev 38024)
+++ trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp... 2012-01-23 10:56:57 UTC (rev 38025)
@@ -27,12 +27,14 @@
<child location='../../../staging/jbosstools-3.3_trunk.component--common/all/repo/'/>
<child location='../../../staging/jbosstools-3.3_trunk.component--deltacloud/all/repo/'/>
<child location='../../../staging/jbosstools-3.3_trunk.component--esb/all/repo/'/>
+<child location='../../../staging/jbosstools-3.3_trunk.component--switchyard/all/repo/'/>
<child location='../../../staging/jbosstools-3.3_trunk.component--examples/all/repo/'/>
<child location='../../../staging.previous/jbosstools-3.3_trunk.component--central/all/repo/'/>
<child location='../../../staging.previous/jbosstools-3.3_trunk.component--common/all/repo/'/>
<child location='../../../staging.previous/jbosstools-3.3_trunk.component--deltacloud/all/repo/'/>
<child location='../../../staging.previous/jbosstools-3.3_trunk.component--esb/all/repo/'/>
+<child location='../../../staging.previous/jbosstools-3.3_trunk.component--switchyard/all/repo/'/>
<child location='../../../staging.previous/jbosstools-3.3_trunk.component--examples/all/repo/'/>
<child location='../../../staging/jbosstools-3.3_trunk.component--flow/all/repo/'/>
Modified: trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp...
===================================================================
--- trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp... 2012-01-23 04:45:00 UTC (rev 38024)
+++ trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp... 2012-01-23 10:56:57 UTC (rev 38025)
@@ -27,12 +27,14 @@
<child location='../../../staging/jbosstools-3.3_trunk.component--common/all/repo/'/>
<child location='../../../staging/jbosstools-3.3_trunk.component--deltacloud/all/repo/'/>
<child location='../../../staging/jbosstools-3.3_trunk.component--esb/all/repo/'/>
+<child location='../../../staging/jbosstools-3.3_trunk.component--switchyard/all/repo/'/>
<child location='../../../staging/jbosstools-3.3_trunk.component--examples/all/repo/'/>
<child location='../../../staging.previous/jbosstools-3.3_trunk.component--central/all/repo/'/>
<child location='../../../staging.previous/jbosstools-3.3_trunk.component--common/all/repo/'/>
<child location='../../../staging.previous/jbosstools-3.3_trunk.component--deltacloud/all/repo/'/>
<child location='../../../staging.previous/jbosstools-3.3_trunk.component--esb/all/repo/'/>
+<child location='../../../staging.previous/jbosstools-3.3_trunk.component--switchyard/all/repo/'/>
<child location='../../../staging.previous/jbosstools-3.3_trunk.component--examples/all/repo/'/>
<child location='../../../staging/jbosstools-3.3_trunk.component--flow/all/repo/'/>
12 years, 11 months