Skip to content

Commit e720d0d

Browse files
committed
Consolidate the GWT Menus.
1 parent 5fda399 commit e720d0d

File tree

5 files changed

+32
-27
lines changed

5 files changed

+32
-27
lines changed

plugins/com.google.gdt.eclipse.core/plugin.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@
3131
<page
3232
class="com.google.gdt.eclipse.core.properties.ui.CoreProjectPropertyPage"
3333
id="com.google.gdt.eclipse.core.properties.coreProjectPropertyPage"
34-
name="Google Classic">
35-
<enabledWhen>
36-
<reference definitionId="com.google.gdt.eclipse.core.isGpeSelected"/>
37-
</enabledWhen>
34+
name="GWT">
3835
</page>
3936
<page
4037
category="com.google.gdt.eclipse.core.properties.coreProjectPropertyPage"

plugins/com.google.gdt.eclipse.core/src/com/google/gdt/eclipse/core/properties/ui/CoreProjectPropertyPage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ protected Control createContents(Composite parent) {
3939
panel.setLayout(new GridLayout(1, false));
4040

4141
Label blank = new Label(panel, SWT.NONE);
42-
blank.setText("Expand the tree to configure your Google project properties.");
42+
blank.setText("Expand the tree to configure your GWT project properties.");
4343

4444
return panel;
4545
}

plugins/com.google.gdt.eclipse.maven/src/com/google/gdt/eclipse/maven/configurators/MavenProjectConfigurator.java

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ private void persistGwtNatureSettings(IProject project, MavenProject mavenProjec
123123
throws BackingStoreException {
124124
IPath warOutDir = getWarOutDir(project, mavenProject);
125125

126-
WebAppProjectProperties.setWarSrcDir(project, new Path(getWarSrcDir(mavenConfig))); // src/main/webapp
126+
WebAppProjectProperties.setWarSrcDir(project, getWarSrcDir(mavenProject, mavenConfig)); // src/main/webapp
127127
WebAppProjectProperties.setWarSrcDirIsOutput(project, getLaunchFromHere(mavenConfig)); // false
128128

129129
// TODO the extension should be used, from WarArgProcessor
@@ -337,29 +337,46 @@ private void resolveGwtDevJar(MavenProject mavenProject, IProgressMonitor monito
337337
} catch (CoreException exception) {
338338
Activator.logError(
339339
"MavenProjectConfigurator: Problem configuring the maven project because it could not download the "
340-
+ "gwt-dev.jar which is used to determine the version.", exception);
340+
+ "gwt-dev.jar which is used to determine the version.",
341+
exception);
341342
}
342343
}
343344
}
344345

345346
/**
346347
* Returns the war source directory such as src/main/webapp
347348
*
349+
* @param mavenProject
350+
*
348351
* @param config
349352
* gwt-maven-maven config DOM
350353
* @return the {@link #WAR_SRC_DIR_PROPERTY_KEY} value from the config if it exists, {@link #WAR_SRC_DIR_DEFAULT}
351354
* otherwise or if config is null
352355
*/
353-
private static final String getWarSrcDir(Xpp3Dom config) {
354-
if (config == null) {
355-
return WAR_SRC_DIR_DEFAULT;
356+
private static final IPath getWarSrcDir(MavenProject mavenProject, Xpp3Dom config) {
357+
String spath = WAR_SRC_DIR_DEFAULT;
358+
359+
if (config != null) {
360+
for (Xpp3Dom child : config.getChildren()) {
361+
if (child != null && WAR_SRC_DIR_PROPERTY_KEY.equals(child.getName())) {
362+
spath = child.getValue() == null ? WAR_SRC_DIR_DEFAULT : child.getValue().trim();
363+
}
364+
}
356365
}
357-
for (Xpp3Dom child : config.getChildren()) {
358-
if (child != null && WAR_SRC_DIR_PROPERTY_KEY.equals(child.getName())) {
359-
return child.getValue() == null ? WAR_SRC_DIR_DEFAULT : child.getValue().trim();
366+
367+
IPath path = null;
368+
if (spath != null) {
369+
path = new Path(spath);
370+
371+
String basePath = mavenProject.getBasedir().toPath().toAbsolutePath().toString();
372+
String fullPath = basePath + "/" + spath;
373+
java.io.File fullPathFile = new java.io.File(fullPath);
374+
if (!fullPathFile.exists()) {
375+
path = null;
360376
}
361377
}
362-
return WAR_SRC_DIR_DEFAULT;
378+
379+
return path;
363380
}
364381

365382
/**
@@ -376,8 +393,8 @@ private final boolean getLaunchFromHere(Xpp3Dom config) {
376393
}
377394
for (Xpp3Dom child : config.getChildren()) {
378395
if (child != null && ECLIPSE_LAUNCH_SRC_DIR_PROPERTY_KEY.equals(child.getName())) {
379-
return child.getValue() == null ? ECLIPSE_LAUNCH_SRC_DIR_DEFAULT : Boolean
380-
.parseBoolean(child.getValue().trim());
396+
return child.getValue() == null ? ECLIPSE_LAUNCH_SRC_DIR_DEFAULT
397+
: Boolean.parseBoolean(child.getValue().trim());
381398
}
382399
}
383400
return ECLIPSE_LAUNCH_SRC_DIR_DEFAULT;

plugins/com.google.gwt.eclipse.core/plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@
691691
category="com.google.gdt.eclipse.core.properties.coreProjectPropertyPage"
692692
class="com.google.gwt.eclipse.core.properties.ui.GWTProjectPropertyPage"
693693
id="com.google.gwt.eclipse.core.properties.ui.gwtProjectPropertyPage"
694-
name="GWT Classic">
694+
name="Settings">
695695
<enabledWhen>
696696
<reference definitionId="com.google.gdt.eclipse.core.isGpeSelected"/>
697697
</enabledWhen>

plugins/com.google.gwt.eclipse.wtp/plugin.xml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -91,18 +91,9 @@
9191
<!-- GWT Facet Properties -->
9292
<extension
9393
point="org.eclipse.ui.propertyPages">
94-
<!-- GWT -->
95-
<page
96-
class="com.google.gwt.eclipse.wtp.properties.ui.GWTRootProjectPropertyPage"
97-
id="com.google.gwt.eclipse.wtp.properties.ui.gwtRootProjectPropertyPage"
98-
name="GWT">
99-
<enabledWhen>
100-
<reference definitionId="com.google.gwt.eclipse.wtp.isGWTFacet"/>
101-
</enabledWhen>
102-
</page>
10394
<!-- GWT Facet -->
10495
<page
105-
category="com.google.gwt.eclipse.wtp.properties.ui.gwtRootProjectPropertyPage"
96+
category="com.google.gdt.eclipse.core.properties.coreProjectPropertyPage"
10697
class="com.google.gwt.eclipse.wtp.properties.ui.GWTFacetProjectPropertyPage"
10798
id="com.google.gwt.eclipse.wtp.properties.ui.gwtFacetProjectPropertyPage"
10899
name="Facet Settings">

0 commit comments

Comments
 (0)