org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/wizards/WRTProjectDetailsWizardPage.java
author Eugene Ostroukhov <eugeneo@symbian.org>
Tue, 13 Jul 2010 11:11:00 -0700
changeset 441 85f06000ab13
parent 439 57fff6202b74
child 442 980aaebb8022
permissions -rw-r--r--
Bug 3184 - Reorganize new project wizard
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
     1
/**
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
     2
 * Copyright (c) 2009 Symbian Foundation and/or its subsidiary(-ies).
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
     3
 * All rights reserved.
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
     4
 * This component and the accompanying materials are made available
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
     5
 * under the terms of the License "Eclipse Public License v1.0"
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
     6
 * which accompanies this distribution, and is available
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
     7
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
     8
 *
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
     9
 * Initial Contributors:
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
    10
 * Symbian Foundation - initial contribution.
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
    11
 * Contributors:
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
    12
 * Description:
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
    13
 * Overview:
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
    14
 * Details:
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
    15
 * Platforms/Drives/Compatibility:
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
    16
 * Assumptions/Requirement/Pre-requisites:
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
    17
 * Failures and causes:
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
    18
 */
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
    19
package org.symbian.tools.wrttools.wizards;
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
    20
439
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    21
import java.net.URI;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    22
3
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
    23
import org.eclipse.core.databinding.DataBindingContext;
439
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    24
import org.eclipse.core.databinding.validation.IValidator;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    25
import org.eclipse.core.resources.IProject;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    26
import org.eclipse.core.resources.IResource;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    27
import org.eclipse.core.resources.IWorkspace;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    28
import org.eclipse.core.resources.ResourcesPlugin;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    29
import org.eclipse.core.runtime.IPath;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    30
import org.eclipse.core.runtime.IStatus;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    31
import org.eclipse.core.runtime.Path;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    32
import org.eclipse.core.runtime.Status;
3
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
    33
import org.eclipse.jface.databinding.wizard.WizardPageSupport;
439
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    34
import org.eclipse.jface.dialogs.Dialog;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    35
import org.eclipse.jface.wizard.WizardPage;
3
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
    36
import org.eclipse.swt.SWT;
439
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    37
import org.eclipse.swt.layout.GridData;
3
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
    38
import org.eclipse.swt.layout.GridLayout;
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
    39
import org.eclipse.swt.widgets.Composite;
439
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    40
import org.eclipse.swt.widgets.Event;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    41
import org.eclipse.swt.widgets.Label;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    42
import org.eclipse.swt.widgets.Listener;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    43
import org.eclipse.swt.widgets.Text;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    44
import org.eclipse.ui.PlatformUI;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    45
import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    46
import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    47
import org.eclipse.ui.internal.ide.IIDEHelpContextIds;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    48
import org.eclipse.ui.internal.ide.dialogs.ProjectContentsLocationArea;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    49
import org.eclipse.ui.internal.ide.dialogs.ProjectContentsLocationArea.IErrorMessageReporter;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    50
import org.symbian.tools.wrttools.Activator;
17
f1b0259bb410 Validation was added to new project creation wizard
Eugene Ostroukhov <eostroukhov@symbian.org>
parents: 3
diff changeset
    51
import org.symbian.tools.wrttools.util.RegexpValidator;
3
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
    52
439
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    53
@SuppressWarnings("restriction")
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    54
public final class WRTProjectDetailsWizardPage extends WizardPage {
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    55
    public static final class ProjectNameValidator implements IValidator {
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    56
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    57
        public IStatus validate(Object value) {
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    58
            IWorkspace workspace = IDEWorkbenchPlugin.getPluginWorkspace();
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    59
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    60
            String projectFieldContents = (String) value;
441
85f06000ab13 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 439
diff changeset
    61
            IStatus nameStatus = workspace.validateName(projectFieldContents, IResource.PROJECT);
439
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    62
            if (!nameStatus.isOK()) {
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    63
                return nameStatus;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    64
            }
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    65
441
85f06000ab13 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 439
diff changeset
    66
            IProject handle = ResourcesPlugin.getWorkspace().getRoot().getProject(projectFieldContents);
439
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    67
            if (handle.exists()) {
441
85f06000ab13 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 439
diff changeset
    68
                return new Status(IStatus.ERROR, Activator.PLUGIN_ID,
439
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    69
                        IDEWorkbenchMessages.WizardNewProjectCreationPage_projectExistsMessage);
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    70
            }
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    71
            return Status.OK_STATUS;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    72
        }
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    73
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    74
    }
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    75
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    76
    private ProjectContentsLocationArea locationArea;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    77
    private final DataBindingContext bindingContext;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    78
    private final WizardContext context;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    79
441
85f06000ab13 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 439
diff changeset
    80
    public WRTProjectDetailsWizardPage(WizardContext context, DataBindingContext bindingContext) {
439
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    81
        super("WRTApp");
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    82
        setImageDescriptor(null);
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    83
        setTitle("Application Details");
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    84
        setDescription("Specify application details");
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    85
        this.context = context;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    86
        this.bindingContext = bindingContext;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    87
    }
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    88
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    89
    public void createControl(Composite parent) {
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    90
        Composite root = new Composite(parent, SWT.NONE);
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    91
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    92
        initializeDialogUnits(parent);
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    93
441
85f06000ab13 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 439
diff changeset
    94
        PlatformUI.getWorkbench().getHelpSystem().setHelp(root, IIDEHelpContextIds.NEW_PROJECT_WIZARD_PAGE);
439
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    95
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    96
        WizardPageSupport.create(this, bindingContext);
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    97
        root.setLayout(new GridLayout(2, false));
441
85f06000ab13 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 439
diff changeset
    98
        createProjectNameGroup(root);
439
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
    99
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   100
        context.createLabel(root, "");
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   101
        context.createLabel(root, "");
441
85f06000ab13 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 439
diff changeset
   102
        context.createLabel(root, "Application identifier:");
439
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   103
441
85f06000ab13 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 439
diff changeset
   104
        context.createText(root, WizardContext.WIDGET_ID, "applicatoin identifier", bindingContext, null,
85f06000ab13 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 439
diff changeset
   105
                new RegexpValidator("[\\w]*(\\.\\w[\\w]*)*", "{0} is not a valid applicatoin ID", true));
439
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   106
        context.createLabel(root, "");
441
85f06000ab13 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 439
diff changeset
   107
        context.createLabel(root, "This id should be unique for succesful installation of application on the device");
85f06000ab13 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 439
diff changeset
   108
439
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   109
        context.createLabel(root, "");
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   110
        context.createLabel(root, "");
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   111
441
85f06000ab13 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 439
diff changeset
   112
        context.createLabel(root, "Application name:");
85f06000ab13 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 439
diff changeset
   113
85f06000ab13 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 439
diff changeset
   114
        context.createText(root, WizardContext.WIDGET_NAME, "application name", bindingContext, null,
85f06000ab13 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 439
diff changeset
   115
                new RegexpValidator("[^\\w\\. ]", "Application name cannot contain {0} character", false));
85f06000ab13 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 439
diff changeset
   116
85f06000ab13 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 439
diff changeset
   117
        context.createLabel(root, "");
85f06000ab13 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 439
diff changeset
   118
        context.createLabel(root, "This will be the application display name on the device");
439
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   119
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   120
        Composite composite = new Composite(root, SWT.NONE);
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   121
        GridLayout gridLayout = new GridLayout(1, false);
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   122
        gridLayout.marginWidth = 0;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   123
        composite.setLayout(gridLayout);
441
85f06000ab13 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 439
diff changeset
   124
        composite.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, true, 2, 1));
439
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   125
441
85f06000ab13 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 439
diff changeset
   126
        locationArea = new ProjectContentsLocationArea(getErrorReporter(), composite);
85f06000ab13 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 439
diff changeset
   127
        if (context.getProjectName() != null && context.getProjectName().trim().length() > 0) {
439
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   128
            locationArea.updateProjectName(context.getProjectName());
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   129
        }
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   130
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   131
        // Scale the button based on the rest of the dialog
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   132
        setButtonLayoutData(locationArea.getBrowseButton());
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   133
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   134
        setPageComplete(validatePage());
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   135
        // Show description on opening
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   136
        setErrorMessage(null);
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   137
        setMessage(null);
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   138
        setControl(root);
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   139
        Dialog.applyDialogFont(root);
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   140
    }
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   141
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   142
    /**
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   143
     * Creates the project name specification controls.
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   144
     *
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   145
     * @param parent
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   146
     *            the parent composite
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   147
     */
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   148
    private final void createProjectNameGroup(Composite parent) {
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   149
        // new project label
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   150
        Label projectLabel = new Label(parent, SWT.NONE);
441
85f06000ab13 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 439
diff changeset
   151
        projectLabel.setText(IDEWorkbenchMessages.WizardNewProjectCreationPage_nameLabel);
439
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   152
        projectLabel.setFont(parent.getFont());
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   153
441
85f06000ab13 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 439
diff changeset
   154
        Text projectNameField = context.createText(parent, WizardContext.PROJECT_NAME, "project name", bindingContext,
439
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   155
                null, new ProjectNameValidator());
3
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
   156
439
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   157
        projectNameField.setFont(parent.getFont());
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   158
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   159
        projectNameField.addListener(SWT.Modify, nameModifyListener);
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   160
    }
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   161
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   162
    /**
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   163
     * Returns the current project location path as entered by the user, or its
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   164
     * anticipated initial value. Note that if the default has been returned the
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   165
     * path in a project description used to create a project should not be set.
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   166
     *
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   167
     * @return the project location path or its anticipated initial value.
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   168
     */
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   169
    public IPath getLocationPath() {
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   170
        return new Path(locationArea.getProjectLocation());
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   171
    }
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   172
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   173
    /**
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   174
     * /** Returns the current project location URI as entered by the user, or
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   175
     * <code>null</code> if a valid project location has not been entered.
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   176
     *
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   177
     * @return the project location URI, or <code>null</code>
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   178
     * @since 3.2
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   179
     */
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   180
    public URI getLocationURI() {
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   181
        return locationArea.getProjectLocationURI();
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   182
    }
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   183
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   184
    private final Listener nameModifyListener = new Listener() {
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   185
        public void handleEvent(Event e) {
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   186
            if (isPageComplete()) {
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   187
                setLocationForSelection();
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   188
                boolean valid = validatePage();
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   189
                setPageComplete(valid);
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   190
            }
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   191
        }
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   192
    };
3
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
   193
439
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   194
    /**
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   195
     * Get an error reporter for the receiver.
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   196
     *
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   197
     * @return IErrorMessageReporter
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   198
     */
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   199
    private IErrorMessageReporter getErrorReporter() {
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   200
        return new IErrorMessageReporter() {
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   201
            /*
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   202
             * (non-Javadoc)
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   203
             *
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   204
             * @see
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   205
             * org.eclipse.ui.internal.ide.dialogs.ProjectContentsLocationArea
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   206
             * .IErrorMessageReporter#reportError(java.lang.String)
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   207
             */
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   208
            public void reportError(String errorMessage, boolean infoOnly) {
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   209
                if (infoOnly) {
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   210
                    setMessage(errorMessage, IStatus.INFO);
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   211
                    setErrorMessage(null);
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   212
                } else {
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   213
                    setErrorMessage(errorMessage);
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   214
                }
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   215
                boolean valid = errorMessage == null;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   216
                if (valid) {
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   217
                    valid = validatePage();
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   218
                }
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   219
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   220
                setPageComplete(valid);
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   221
            }
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   222
        };
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   223
    }
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   224
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   225
    /**
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   226
     * Set the location to the default location if we are set to useDefaults.
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   227
     */
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   228
    void setLocationForSelection() {
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   229
        locationArea.updateProjectName(context.getProjectName());
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   230
    }
3
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
   231
439
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   232
    /**
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   233
     * Returns whether this page's controls currently all contain valid values.
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   234
     *
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   235
     * @return <code>true</code> if all controls are valid, and
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   236
     *         <code>false</code> if at least one is invalid
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   237
     */
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   238
    protected boolean validatePage() {
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   239
        if (isPageComplete() || context.getProjectName().trim().length() == 0) {
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   240
            return false;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   241
        }
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   242
        String projectName = context.getProjectName();
441
85f06000ab13 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 439
diff changeset
   243
        IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
439
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   244
        locationArea.setExistingProject(project);
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   245
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   246
        String validLocationMessage = locationArea.checkValidLocation();
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   247
        if (validLocationMessage != null) { // there is no destination location
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   248
                                            // given
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   249
            setErrorMessage(validLocationMessage);
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   250
            return false;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   251
        }
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   252
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   253
        setErrorMessage(null);
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   254
        setMessage(null);
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   255
        return true;
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   256
    }
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   257
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   258
    /**
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   259
     * Returns the useDefaults.
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   260
     *
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   261
     * @return boolean
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   262
     */
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   263
    public boolean useDefaults() {
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   264
        return locationArea.isDefault();
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   265
    }
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   266
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   267
    @Override
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   268
    public void setVisible(boolean visible) {
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   269
        // TODO Auto-generated method stub
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   270
        super.setVisible(visible);
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   271
        setErrorMessage(null);
57fff6202b74 Bug 3184 - Reorganize new project wizard
Eugene Ostroukhov <eugeneo@symbian.org>
parents: 155
diff changeset
   272
    }
3
d3477de62514 Added new wizards for importing WRT projects. Added CSS Validator.
TasneemS@US-TASNEEMS
parents:
diff changeset
   273
}