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

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/wizard/NewApplicationWizard.java

Issue 9120017: modified New Application Wizard to allow for generation of web/command line application (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 11 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/src/com/google/dart/tools/ui/wizard/NewApplicationWizard.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/wizard/NewApplicationWizard.java (revision 3100)
+++ editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/wizard/NewApplicationWizard.java (working copy)
@@ -20,6 +20,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
@@ -36,12 +37,13 @@
*/
public class NewApplicationWizard extends AbstractDartWizard implements INewWizard {
+ private static final String WEB_APPLICATION = "webApplication";
+
private final ApplicationGenerator appGenerator = new ApplicationGenerator();
private IWorkbench workbench;
public NewApplicationWizard() {
-
setWindowTitle(WizardMessages.NewApplicationWizard_title);
}
@@ -57,10 +59,19 @@
public void init(IWorkbench workbench, IStructuredSelection selection) {
super.init(workbench, selection);
this.workbench = workbench;
+ IDialogSettings settings = DartToolsPlugin.getDefault().getDialogSettingsSection(
+ getClass().getName());
+ if (settings.get(WEB_APPLICATION) != null) {
+ appGenerator.setWebApplication(settings.getBoolean(WEB_APPLICATION));
+ } else {
+ settings.put(WEB_APPLICATION, true);
+ appGenerator.setWebApplication(true);
+ }
}
@Override
public boolean performFinish() {
+ saveSettings();
try {
getContainer().run(true, true, new WorkspaceModifyOperation() {
@Override
@@ -116,4 +127,10 @@
newFileCommandStateProvider.checkState();
}
}
+
+ private void saveSettings() {
+ IDialogSettings settings = DartToolsPlugin.getDefault().getDialogSettingsSection(
+ getClass().getName());
+ settings.put(WEB_APPLICATION, appGenerator.isWebApplication());
+ }
}

Powered by Google App Engine
This is Rietveld 408576698