Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Reckord2015-02-04 19:55:07 +0000
committerCarsten Reckord2015-02-04 19:55:07 +0000
commita8d38e87b014d6a541d07778d9772130fcd6ebcd (patch)
treedfae43a837ffc4fb8e67d73eac5bfd90816fc3b3
parent772406b5bcf2aedb839496dc95bccfbc26d6c0a1 (diff)
parentf94cdbe7e73699309f0dceac557c1e6f7422a613 (diff)
downloadorg.eclipse.epp.mpc-a8d38e87b014d6a541d07778d9772130fcd6ebcd.tar.gz
org.eclipse.epp.mpc-a8d38e87b014d6a541d07778d9772130fcd6ebcd.tar.xz
org.eclipse.epp.mpc-a8d38e87b014d6a541d07778d9772130fcd6ebcd.zip
Merge branch '1.3_maintenance'
-rw-r--r--org.eclipse.epp.mpc-target/maintenance.target6
-rw-r--r--org.eclipse.epp.mpc.tests/src/org/eclipse/epp/mpc/tests/ui/wizard/MarketplaceClientServiceTest.java4
-rw-r--r--org.eclipse.epp.mpc.tests/src/org/eclipse/epp/mpc/tests/ui/wizard/MarketplaceWizardTest.java14
-rw-r--r--org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/DiscoveryItem.java7
-rw-r--r--org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/MarketplacePage.java2
-rw-r--r--org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/ShareSolutionLink.java8
6 files changed, 28 insertions, 13 deletions
diff --git a/org.eclipse.epp.mpc-target/maintenance.target b/org.eclipse.epp.mpc-target/maintenance.target
index 45462ccf..5eec1578 100644
--- a/org.eclipse.epp.mpc-target/maintenance.target
+++ b/org.eclipse.epp.mpc-target/maintenance.target
@@ -10,9 +10,9 @@
<repository location="http://download.eclipse.org/releases/maintenance"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
-<unit id="org.apache.httpcomponents.httpclient" version="4.2.6.v201311072007"/>
-<unit id="org.apache.httpcomponents.httpcore" version="4.2.5.v201311072007"/>
-<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20140525021250/repository/"/>
+<unit id="org.apache.httpcomponents.httpclient" version="4.3.6.v201411290715"/>
+<unit id="org.apache.httpcomponents.httpcore" version="4.3.3.v201411290715"/>
+<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20150124073747/repository/"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.license.feature.group" version="0.0.0"/>
diff --git a/org.eclipse.epp.mpc.tests/src/org/eclipse/epp/mpc/tests/ui/wizard/MarketplaceClientServiceTest.java b/org.eclipse.epp.mpc.tests/src/org/eclipse/epp/mpc/tests/ui/wizard/MarketplaceClientServiceTest.java
index 50c48e4a..42f4b208 100644
--- a/org.eclipse.epp.mpc.tests/src/org/eclipse/epp/mpc/tests/ui/wizard/MarketplaceClientServiceTest.java
+++ b/org.eclipse.epp.mpc.tests/src/org/eclipse/epp/mpc/tests/ui/wizard/MarketplaceClientServiceTest.java
@@ -163,8 +163,8 @@ public class MarketplaceClientServiceTest extends AbstractMarketplaceWizardBotTe
initWizardBot();
checkSelectedTab("Search");
SWTBot itemBot = itemBot("206");
- itemBot.button("Install Pending").isEnabled();
- bot.button("Install Now >").isEnabled();
+ assertTrue(itemBot.button("Install Pending").isEnabled());
+ assertTrue(bot.button("Install Now >").isEnabled());
}
@Test
diff --git a/org.eclipse.epp.mpc.tests/src/org/eclipse/epp/mpc/tests/ui/wizard/MarketplaceWizardTest.java b/org.eclipse.epp.mpc.tests/src/org/eclipse/epp/mpc/tests/ui/wizard/MarketplaceWizardTest.java
index d7f2d7c4..0cbbd375 100644
--- a/org.eclipse.epp.mpc.tests/src/org/eclipse/epp/mpc/tests/ui/wizard/MarketplaceWizardTest.java
+++ b/org.eclipse.epp.mpc.tests/src/org/eclipse/epp/mpc/tests/ui/wizard/MarketplaceWizardTest.java
@@ -11,6 +11,8 @@
*******************************************************************************/
package org.eclipse.epp.mpc.tests.ui.wizard;
+import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.*;
+import static org.hamcrest.Matchers.not;
import static org.junit.Assert.*;
import java.util.List;
@@ -20,12 +22,15 @@ import org.eclipse.epp.internal.mpc.ui.wizards.MarketplacePage;
import org.eclipse.epp.mpc.tests.ui.wizard.matcher.NodeMatcher;
import org.eclipse.epp.mpc.tests.ui.wizard.widgets.SWTBotClickableStyledText;
import org.eclipse.swt.custom.StyleRange;
+import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.widgets.Widget;
import org.eclipse.swtbot.swt.finder.waits.DefaultCondition;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotBrowser;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotLink;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotStyledText;
+import org.hamcrest.Matcher;
import org.junit.Ignore;
import org.junit.Test;
@@ -53,8 +58,13 @@ public class MarketplaceWizardTest extends AbstractMarketplaceWizardBotTest {
@Test
public void testSearchTag() {
- SWTBotClickableStyledText tagsLabel = SWTBotClickableStyledText.from(bot.styledTextWithId(
- DiscoveryItem.WIDGET_ID_KEY, DiscoveryItem.WIDGET_ID_TAGS));
+ Matcher<StyledText> widgetOfType = widgetOfType(StyledText.class);
+ Matcher<StyledText> withId = withId(DiscoveryItem.WIDGET_ID_KEY, DiscoveryItem.WIDGET_ID_TAGS);
+ Matcher<StyledText> emptyText = withText("");
+ @SuppressWarnings("unchecked")
+ Matcher<StyledText> nonEmptyTagMatcher = allOf(widgetOfType, withId, not(emptyText));
+ SWTBotClickableStyledText tagsLabel = SWTBotClickableStyledText.from(new SWTBotStyledText(bot.widget(
+ nonEmptyTagMatcher, 0), nonEmptyTagMatcher));
StyleRange linkRange = findLink(tagsLabel);
String tag = getText(linkRange, tagsLabel);
tagsLabel.click(linkRange);
diff --git a/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/DiscoveryItem.java b/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/DiscoveryItem.java
index 81f5bf7f..ee259d2f 100644
--- a/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/DiscoveryItem.java
+++ b/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/DiscoveryItem.java
@@ -128,7 +128,12 @@ public class DiscoveryItem<T extends CatalogItem> extends AbstractDiscoveryItem<
return;
}
StyledText link = (StyledText) e.getSource();
- int offset = link.getOffsetAtLocation(new Point(e.x, e.y));
+ int offset;
+ try {
+ offset = link.getOffsetAtLocation(new Point(e.x, e.y));
+ } catch (IllegalArgumentException ex) {
+ offset = -1;
+ }
if (offset >= 0 && offset < link.getCharCount()) {
StyleRange style = link.getStyleRangeAtOffset(offset);
if (style != null && style.data != null) {
diff --git a/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/MarketplacePage.java b/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/MarketplacePage.java
index b2288d78..5844bd35 100644
--- a/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/MarketplacePage.java
+++ b/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/MarketplacePage.java
@@ -326,7 +326,7 @@ public class MarketplacePage extends CatalogPage {
newsTabItem.setText(Messages.MarketplacePage_DefaultNewsTitle);
newsTabItem.setData(WIDGET_ID_KEY, WIDGET_ID_TAB_NEWS);
- if (newsViewer == null) {
+ if (newsViewer == null || newsViewer.getControl().isDisposed()) {
createNewsViewer(tabFolder);
}
newsTabItem.setControl(newsViewer.getControl());
diff --git a/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/ShareSolutionLink.java b/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/ShareSolutionLink.java
index 34fcdb96..68e83ad2 100644
--- a/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/ShareSolutionLink.java
+++ b/org.eclipse.epp.mpc.ui/src/org/eclipse/epp/internal/mpc/ui/wizards/ShareSolutionLink.java
@@ -126,12 +126,12 @@ public class ShareSolutionLink {
}
private void createOpenInBrowserMenu(final Menu popupMenu) {
- MenuItem copyItem = new MenuItem(popupMenu, SWT.POP_UP);
- copyItem.setText(Messages.ShareSolutionLink_OpenInBrowser);
- copyItem.addSelectionListener(new SelectionAdapter() {
+ MenuItem browserItem = new MenuItem(popupMenu, SWT.POP_UP);
+ browserItem.setText(Messages.ShareSolutionLink_OpenInBrowser);
+ browserItem.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- copyLinkToClipboard();
+ openInBrowser();
}
});
}

Back to the top