|
38 | 38 | import com.google.common.base.Preconditions; |
39 | 39 | import com.google.common.base.Predicate; |
40 | 40 | import com.google.common.base.Strings; |
| 41 | +import com.google.common.net.UrlEscapers; |
41 | 42 | import java.util.Collection; |
42 | 43 | import java.util.Collections; |
43 | 44 | import java.util.Map; |
@@ -90,8 +91,12 @@ public abstract class AppEngineDeployPreferencesPanel extends DeployPreferencesP |
90 | 91 |
|
91 | 92 | private static final String APPENGINE_VERSIONS_URL = |
92 | 93 | "https://console.cloud.google.com/appengine/versions"; |
93 | | - private static final String CREATE_GCP_PROJECT_WITH_GAE_URL = |
94 | | - "https://console.cloud.google.com/projectselector/appengine/create?lang=java"; |
| 94 | + private static final String APP_ENGINE_APPLICATION_CREATE_PATH = |
| 95 | + "/projectselector/appengine/create?lang=java"; |
| 96 | + @VisibleForTesting |
| 97 | + static final String CREATE_GCP_PROJECT_URL = |
| 98 | + "https://console.cloud.google.com/projectcreate?previousPage=" |
| 99 | + + UrlEscapers.urlFormParameterEscaper().escape(APP_ENGINE_APPLICATION_CREATE_PATH); |
95 | 100 |
|
96 | 101 | private static final Logger logger = Logger.getLogger( |
97 | 102 | AppEngineDeployPreferencesPanel.class.getName()); |
@@ -335,7 +340,7 @@ private void createProjectIdSection() { |
335 | 340 | Composite linkComposite = new Composite(this, SWT.NONE); |
336 | 341 | Link createNewProject = new Link(linkComposite, SWT.WRAP); |
337 | 342 | createNewProject.setText(Messages.getString("projectselector.createproject", |
338 | | - CREATE_GCP_PROJECT_WITH_GAE_URL)); |
| 343 | + CREATE_GCP_PROJECT_URL)); |
339 | 344 | createNewProject.setToolTipText(Messages.getString("projectselector.createproject.tooltip")); |
340 | 345 | FontUtil.convertFontToItalic(createNewProject); |
341 | 346 | createNewProject.addSelectionListener( |
|
0 commit comments