Skip to content

Commit 06e7ff0

Browse files
committed
GWT Maven 2 plugin enhancements, GWT added to naming, new icon for dev
mode launcher, removal of the legacy super dev mode launching for 2.5.
1 parent eb9a1ac commit 06e7ff0

File tree

34 files changed

+325
-334
lines changed

34 files changed

+325
-334
lines changed

build-deploy-test.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/sh
2+
3+
# build plugin
4+
mvn clean install
5+
6+
#build mirror
7+
cd mirrors
8+
mvn clean install
9+
cd ..
10+
11+
12+
# upload
13+
sh ./repo/upload-test.sh
14+

features/com.google.gdt.eclipse.suite.e44.feature/feature.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -250,13 +250,6 @@
250250
version="0.0.0.qualifier"
251251
unpack="false"/>
252252

253-
<plugin
254-
id="com.google.gwt.eclipse.libs"
255-
download-size="0"
256-
install-size="0"
257-
version="0.0.0.qualifier"
258-
unpack="false"/>
259-
260253
<plugin
261254
id="com.google.gwt.eclipse.oophm"
262255
download-size="0"
Binary file not shown.

plugins/com.google.gdt.eclipse.core/src/com/google/gdt/eclipse/core/properties/WebAppProjectProperties.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ public interface IWarOutLocationChangedListener {
7474
*/
7575
private static final String GWT_MAVEN_MODULE_NAME = "gwtMavenModuleName";
7676

77+
/**
78+
* GWT Maven Plugin 2 ModuleName Short
79+
*/
80+
private static final String GWT_MAVEN_MODULE_SHORT_NAME = "gwtMavenModuleShortName";
81+
7782
public static void addWarOutLocationChangedListener(
7883
IWarOutLocationChangedListener listener) {
7984
synchronized (warOutLocationChangedListeners) {
@@ -246,6 +251,10 @@ public static String getGwtMavenModuleName(IProject project) {
246251
return getProjectProperties(project).get(GWT_MAVEN_MODULE_NAME, "");
247252
}
248253

254+
public static String getGwtMavenModuleShortName(IProject project) {
255+
return getProjectProperties(project).get(GWT_MAVEN_MODULE_SHORT_NAME, "");
256+
}
257+
249258
public static void setGwtMavenModuleName(IProject project, String gwtMavenModuleName) throws BackingStoreException {
250259
IEclipsePreferences prefs = getProjectProperties(project);
251260
if (gwtMavenModuleName == null) {
@@ -260,6 +269,19 @@ public static void setGwtMavenModuleName(IProject project, String gwtMavenModule
260269
}
261270
}
262271

272+
public static void setGwtMavenModuleShortName(IProject project, String gwtMavenModuleShortName) throws BackingStoreException {
273+
IEclipsePreferences prefs = getProjectProperties(project);
274+
if (gwtMavenModuleShortName == null) {
275+
try {
276+
prefs.remove(GWT_MAVEN_MODULE_SHORT_NAME);
277+
} catch (Exception e) {
278+
e.printStackTrace();
279+
}
280+
} else {
281+
prefs.put(GWT_MAVEN_MODULE_SHORT_NAME, gwtMavenModuleShortName);
282+
prefs.flush();
283+
}
284+
}
263285

264286
private WebAppProjectProperties() {
265287
// Not instantiable

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

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public class MavenProjectConfigurator extends AbstracMavenProjectConfigurator {
5959
private static final String WEB_APP_DIRECTORY = "webappDirectory";
6060
private static final String HOSTED_WEB_APP_DIRECTORY = "hostedWebapp"; // GWT Maven Plugin 1 only
6161
private static final String GWT_MAVEN_MODULENAME = "moduleName";
62-
62+
private static final String GWT_MAVEN_MODULESHORTNAME = "moduleShortName";
6363
private static final String WAR_SRC_DIR_DEFAULT = "src/main/webapp";
6464

6565
@Override
@@ -130,6 +130,7 @@ private void persistGwtNatureSettings(IProject project, MavenProject mavenProjec
130130
WebAppProjectProperties.setLastUsedWarOutLocation(project, warOutDir);
131131

132132
WebAppProjectProperties.setGwtMavenModuleName(project, getGwtModuleName(mavenProject));
133+
WebAppProjectProperties.setGwtMavenModuleShortName(project, getGwtModuleShortName(mavenProject));
133134

134135
String message = "MavenProjectConfiguratior Maven: Success with setting up GWT Nature\n";
135136
message += "\tartifactId=" + mavenProject.getArtifactId() + "\n";
@@ -168,6 +169,36 @@ private String getGwtModuleName(MavenProject mavenProject) {
168169
return moduleName;
169170
}
170171

172+
/**
173+
* Get the GWT Maven plugin 2 <moduleShort=Name/>.
174+
*
175+
* @param mavenProject
176+
* @return the moduleName from configuration
177+
*/
178+
private String getGwtModuleShortName(MavenProject mavenProject) {
179+
if (!isGwtMavenPlugin2(mavenProject)) {
180+
return null;
181+
}
182+
183+
Plugin gwtPlugin2 = getGwtMavenPlugin2(mavenProject);
184+
if (gwtPlugin2 == null) {
185+
return null;
186+
}
187+
188+
Xpp3Dom gwtPluginConfig = (Xpp3Dom) gwtPlugin2.getConfiguration();
189+
if (gwtPluginConfig == null) {
190+
return null;
191+
}
192+
193+
String moduleName = null;
194+
for (Xpp3Dom child : gwtPluginConfig.getChildren()) {
195+
if (child != null && GWT_MAVEN_MODULESHORTNAME.equals(child.getName())) {
196+
moduleName = child.getValue().trim();
197+
}
198+
}
199+
return moduleName;
200+
}
201+
171202
/**
172203
* Get the war output directory.
173204
*
785 Bytes
Loading

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

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,24 @@
2525
</page>
2626
</extension>
2727

28+
<!-- Web Application -->
2829
<extension
2930
point="org.eclipse.debug.core.launchConfigurationTypes">
3031
<launchConfigurationType
3132
delegate="com.google.gdt.eclipse.suite.launch.WebAppLaunchDelegate"
3233
delegateDescription="Runs a Web Application"
33-
delegateName="Web Application Launcher"
34+
delegateName="GWT Web Application Launcher"
3435
id="com.google.gdt.eclipse.suite.webapp"
3536
modes="run, debug"
36-
name="Web Application"
37+
name="GWT Web Application"
3738
sourceLocatorId="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"
3839
sourcePathComputerId="org.eclipse.jdt.launching.sourceLookup.javaSourcePathComputer"/>
3940
</extension>
4041

41-
<extension
42+
<extension
4243
point="org.eclipse.debug.ui.launchConfigurationTypeImages">
4344
<launchConfigurationTypeImage
44-
icon="icons/gdt_16x16.png"
45+
icon="icons/gwt_server_16x16.png"
4546
configTypeID="com.google.gdt.eclipse.suite.webapp"
4647
id="com.google.gdt.eclipse.suite.launch.webappImage">
4748
</launchConfigurationTypeImage>
@@ -68,7 +69,8 @@
6869
<launchConfigurationTabGroup
6970
class="com.google.gdt.eclipse.suite.launch.ui.tab_groups.GwtSuperDevModeCodeServerTabGroup"
7071
id="com.google.gwt.eclipse.core.launch.gwtSdmCodeServerTabGroup"
71-
type="com.google.gwt.eclipse.core.sdmCodeServer">
72+
type="com.google.gwt.eclipse.core.sdmCodeServer"
73+
description="Launch GWT Super Dev Mode with the CodeServer">
7274
<launchMode
7375
description="Run GWT Super Dev Mode"
7476
mode="debug"
@@ -81,24 +83,22 @@
8183
</launchConfigurationTabGroup>
8284
</extension>
8385

84-
<!-- Web Application shortcut -->
86+
<!-- Shortcuts -->
8587
<extension
8688
point="org.eclipse.debug.ui.launchShortcuts">
87-
<shortcut
89+
<!-- Web Application shortcut -->
90+
<!-- <shortcut
8891
class="com.google.gdt.eclipse.suite.launch.ui.shortcuts.WebAppLaunchShortcut"
89-
description="Launch a Web Application"
90-
icon="icons/gdt_16x16.png"
92+
description="Launch a Web Application with GWT DevMode"
93+
icon="icons/gwt_server_16x16.png"
9194
id="com.google.gdt.eclipse.suite.launch.ui.webappLaunchShortcut"
92-
label="Web Application"
95+
label="GWT Web Application with DevMode"
9396
modes="run, debug">
9497
<contextualLaunch>
9598
<enablement>
9699
<with variable="selection">
97100
<count value= "1"/>
98101
<iterate>
99-
<!--
100-
see code in com.google.gdt.eclipse.suite.propertytesters.LaunchTargetTester.java
101-
-->
102102
<test property="com.google.gdt.eclipse.suite.isLaunchTarget"/>
103103
</iterate>
104104
</with>
@@ -113,15 +113,15 @@
113113
mode="debug" />
114114
<configurationType
115115
id="com.google.gdt.eclipse.suite.webapp"/>
116-
</shortcut>
116+
</shortcut> -->
117117

118118
<!-- Web Application No Server shortcut -->
119119
<shortcut
120120
class="com.google.gdt.eclipse.suite.launch.ui.shortcuts.WebAppNoServerLaunchShortcut"
121-
description="Launch a Web Application using an External Server"
122-
icon="icons/gdt_16x16.png"
121+
description="Launch a Web Application with DevMode using an External Server"
122+
icon="icons/gwt_server_16x16.png"
123123
id="com.google.gdt.eclipse.suite.ui.webappNoServerLaunchShortcut"
124-
label="Web Application (running on an external server)"
124+
label="GWT Web Application with DevMode (Super Dev Mode with External Server)"
125125
modes="run, debug">
126126
<contextualLaunch>
127127
<enablement>
@@ -154,10 +154,10 @@
154154
<!-- GWT Super Dev Mode Launch shortcut when using GWT -->
155155
<shortcut
156156
class="com.google.gdt.eclipse.suite.launch.ui.shortcuts.WebAppGWTSuperDevModeLaunchShortcut"
157-
description="Launch a Web Application using GWT super dev mode"
158-
icon="icons/gdt_16x16.png"
157+
description="Launch a Web Application using GWT super dev mode with DevMode"
158+
icon="icons/gwt_server_16x16.png"
159159
id="com.google.gdt.eclipse.suite.launch.ui.webappLaunchShortcutGwtSuperDevMode"
160-
label="Web Application (GWT Super Dev Mode)"
160+
label="GWT Web Application with DevMode (Super Dev Mode)"
161161
modes="run, debug">
162162
<contextualLaunch>
163163
<enablement>
@@ -170,21 +170,21 @@
170170
</enablement>
171171
</contextualLaunch>
172172
<description
173-
description="Run a Web Application (GWT Super Dev Mode)"
173+
description="Run a Web Application with DevMode (SDM)"
174174
mode="run" />
175175
<description
176-
description="Debug a Web Application (GWT Super Dev Mode)"
176+
description="Debug a Web Application (GWT SDM)"
177177
mode="debug" />
178178
<configurationType
179179
id="com.google.gdt.eclipse.suite.webapp"/>
180180
</shortcut>
181181
<!-- GWT Classic Dev Mode Launch shortcut when using GWT -->
182182
<shortcut
183183
class="com.google.gdt.eclipse.suite.launch.ui.shortcuts.WebAppGWTClassicDevModeLaunchShortcut"
184-
description="Launch a Web Application using GWT classic dev mode"
185-
icon="icons/gdt_16x16.png"
184+
description="Launch a Web Application using GWT classic DevMode"
185+
icon="icons/gwt_server_16x16.png"
186186
id="com.google.gdt.eclipse.suite.launch.ui.webappLaunchShortcutGwtClassicDevMode"
187-
label="Web Application (GWT Classic Dev Mode)"
187+
label="GWT Web Application with DevMode (Classic Dev Mode)"
188188
modes="run, debug">
189189
<contextualLaunch>
190190
<enablement>
@@ -197,10 +197,10 @@
197197
</enablement>
198198
</contextualLaunch>
199199
<description
200-
description="Run a Web Application (GWT Classic Dev Mode)"
200+
description="Run a Web Application with DevMode (Classic Dev Mode)"
201201
mode="run" />
202202
<description
203-
description="Debug a Web Application (GWT Classic Dev Mode)"
203+
description="Debug a Web Application With DevMode (Classic Dev Mode)"
204204
mode="debug" />
205205
<configurationType
206206
id="com.google.gdt.eclipse.suite.webapp"/>
@@ -237,7 +237,7 @@
237237
class="com.google.gdt.eclipse.suite.wizards.NewWebAppProjectWizard"
238238
icon="icons/gdt-new-project_16x16.png"
239239
id="com.google.gdt.eclipse.suite.wizards.newProjectWizard"
240-
name="Web Application Project"
240+
name="GWT Web Application Project"
241241
preferredPerspectives="org.eclipse.jdt.ui.JavaPerspective"
242242
project="true">
243243
</wizard>

0 commit comments

Comments
 (0)