-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add context help to new Maven project wizard (#1083)
* Add help contexts for Maven new project wizard * Allow getting Workbench in tests * Lower-case "standard" in normal text body
- Loading branch information
1 parent
d78c141
commit a56b4d9
Showing
9 changed files
with
98 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...en.test/src/com/google/cloud/tools/eclipse/appengine/newproject/maven/ContextXmlTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright 2016 Google Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.cloud.tools.eclipse.appengine.newproject.maven; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
import java.io.FileInputStream; | ||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import javax.xml.parsers.DocumentBuilder; | ||
import javax.xml.parsers.DocumentBuilderFactory; | ||
import javax.xml.parsers.ParserConfigurationException; | ||
import org.junit.Test; | ||
import org.w3c.dom.Document; | ||
import org.xml.sax.SAXException; | ||
|
||
public class ContextXmlTest { | ||
|
||
@Test | ||
public void testWellFormed() throws ParserConfigurationException, IOException, SAXException { | ||
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); | ||
factory.setNamespaceAware(true); | ||
DocumentBuilder builder = factory.newDocumentBuilder(); | ||
|
||
try (InputStream contentXml = new FileInputStream( | ||
"../com.google.cloud.tools.eclipse.appengine.newproject.maven/helpContexts.xml")) { | ||
Document document = builder.parse(contentXml); | ||
assertEquals(2, document.getElementsByTagName("context").getLength()); | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
plugins/com.google.cloud.tools.eclipse.appengine.newproject.maven/helpContexts.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<contexts> | ||
<context id="NewMavenProjectContext" title="Create Maven-based App Engine Standard Project"> | ||
<description>Create a new Maven-based Eclipse project that can be deployed to the App Engine standard environment. | ||
|
||
<b>Group ID:</b> The Maven Group ID. Should be an alphanumeric path separated by periods. | ||
|
||
<b>Artifact ID:</b> The Maven Artifact ID. Should be an alphanumeric name separated by dashes. | ||
|
||
<b>Libraries to add to build path:</b> Adds useful libraries for the App Engine standard environment for your project build path.</description> | ||
</context> | ||
<context id="ArchetypeSelectionContext" title="Select Maven Archetype"> | ||
<description>Choose one of the Maven archetypes pre-configured for the App Engine standard environment.</description> | ||
</context> | ||
</contexts> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,5 +72,3 @@ | |
</plugins> | ||
</build> | ||
</project> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
plugins/com.google.cloud.tools.eclipse.appengine.newproject/helpContexts.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<contexts> | ||
<context id="NewProjectContext" title="Create App Engine Standard Project"> | ||
<description>Create a new Eclipse project that can be deployed to the App Engine Standard environment. | ||
<description>Create a new Eclipse project that can be deployed to the App Engine standard environment. | ||
|
||
<b>Project name:</b> An Eclipse project name. | ||
|
||
<b>Libraries to add to build path:</b> Add some libraries on the App Engine Standard environment to your build path.</description> | ||
<b>Libraries to add to build path:</b> Adds useful libraries for the App Engine standard environment for your project build path.</description> | ||
</context> | ||
</contexts> |