Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(433)

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui.web/src/com/google/dart/tools/ui/web/pubspec/OverviewFormPage.java

Issue 24235011: add a view for users to explore pub packages (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.tools.ui.web/src/com/google/dart/tools/ui/web/pubspec/OverviewFormPage.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.ui.web/src/com/google/dart/tools/ui/web/pubspec/OverviewFormPage.java (revision 27769)
+++ editor/tools/plugins/com.google.dart.tools.ui.web/src/com/google/dart/tools/ui/web/pubspec/OverviewFormPage.java (working copy)
@@ -51,6 +51,7 @@
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.PartInitException;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.SectionPart;
import org.eclipse.ui.forms.editor.FormEditor;
@@ -292,12 +293,19 @@
GridLayoutFactory.fillDefaults().spacing(15, 5).applyTo(links);
+ Hyperlink link = toolkit.createHyperlink(client, "Show packages on pub.dartlang.org", SWT.NONE);
+ link.addHyperlinkListener(new HyperlinkAdapter() {
+ @Override
+ public void linkActivated(HyperlinkEvent e) {
+ try {
+ getSite().getPage().showView("com.google.dart.tools.ui.view.packages");
+ } catch (PartInitException exception) {
+ DartWebPlugin.logError(exception);
+ }
+ }
+ });
createExternalLink(
links,
- "Show packages on pub.dartlang.org",
- "http://pub.dartlang.org/packages");
- createExternalLink(
- links,
"View Pubspec documentation",
"http://pub.dartlang.org/doc/pubspec.html");
createExternalLink(links, "View Semantic versioning documentation", "http://semver.org/");

Powered by Google App Engine
This is Rietveld 408576698