mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-29 03:03:10 +02:00
[202098][efs][nls] Improve error message when creating a remote project with existing name (apply patch from Remy Suen)
This commit is contained in:
parent
6535099c75
commit
92e300dc3f
3 changed files with 15 additions and 11 deletions
|
@ -1,5 +1,5 @@
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Copyright (c) 2000, 2007 IBM Corporation and others. All rights reserved.
|
* Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
|
||||||
* This program and the accompanying materials are made available under the terms
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -23,6 +23,7 @@
|
||||||
* Martin Oberhuber (Wind River) - [188360] renamed from plugin org.eclipse.rse.eclipse.filesystem
|
* Martin Oberhuber (Wind River) - [188360] renamed from plugin org.eclipse.rse.eclipse.filesystem
|
||||||
* Remy Chi Jian Suen (IBM) - [192906][efs] No Error when trying to Create Remote Project when project with name exists
|
* Remy Chi Jian Suen (IBM) - [192906][efs] No Error when trying to Create Remote Project when project with name exists
|
||||||
* Martin Oberhuber (Wind River) - [182350] Support creating remote project on Windows Drive
|
* Martin Oberhuber (Wind River) - [182350] Support creating remote project on Windows Drive
|
||||||
|
* Remy Chi Jian Suen (IBM) - [202098][efs][nls] Improve error message when creating a remote project with existing name
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.efs.ui;
|
package org.eclipse.rse.internal.efs.ui;
|
||||||
|
@ -48,6 +49,7 @@ import org.eclipse.jface.operation.IRunnableWithProgress;
|
||||||
import org.eclipse.jface.viewers.ISelection;
|
import org.eclipse.jface.viewers.ISelection;
|
||||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||||
import org.eclipse.jface.viewers.StructuredSelection;
|
import org.eclipse.jface.viewers.StructuredSelection;
|
||||||
|
import org.eclipse.osgi.util.NLS;
|
||||||
import org.eclipse.rse.internal.efs.Activator;
|
import org.eclipse.rse.internal.efs.Activator;
|
||||||
import org.eclipse.rse.internal.efs.RSEFileSystem;
|
import org.eclipse.rse.internal.efs.RSEFileSystem;
|
||||||
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
|
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
|
||||||
|
@ -185,14 +187,12 @@ public class CreateRemoteProjectActionDelegate implements IActionDelegate {
|
||||||
IProject editProject = root.getProject(projectName);
|
IProject editProject = root.getProject(projectName);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
//FIXME re-enable for 3.0 -- just allowing editProject.create() throw for now to avoid NLS change
|
if (editProject.exists())
|
||||||
//Should apply the patch from bug 192906 to Messages.java and messages.properties
|
{
|
||||||
// if (editProject.exists())
|
throw new CoreException(new Status(IStatus.ERROR,
|
||||||
// {
|
Activator.getDefault().getBundle().getSymbolicName(),
|
||||||
// throw new CoreException(new Status(IStatus.ERROR,
|
NLS.bind(Messages.CreateRemoteProjectActionDelegate_PROJECT_EXISTS, projectName)));
|
||||||
// Activator.getDefault().getBundle().getSymbolicName(),
|
}
|
||||||
// NLS.bind(Messages.CreateRemoteProjectActionDelegate_PROJECT_EXISTS, directoryName)));
|
|
||||||
// }
|
|
||||||
|
|
||||||
IProjectDescription description = root.getWorkspace().newProjectDescription(projectName);
|
IProjectDescription description = root.getWorkspace().newProjectDescription(projectName);
|
||||||
String hostNameOrAddr = directory.getParentRemoteFileSubSystem().getHost().getHostName();
|
String hostNameOrAddr = directory.getParentRemoteFileSubSystem().getHost().getHostName();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007 IBM Corporation and others.
|
* Copyright (c) 2007, 2008 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -8,6 +8,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* IBM Corporation - initial API and implementation
|
* IBM Corporation - initial API and implementation
|
||||||
* Martin Oberhuber (Wind River) - [188360] renamed from plugin org.eclipse.rse.eclipse.filesystem
|
* Martin Oberhuber (Wind River) - [188360] renamed from plugin org.eclipse.rse.eclipse.filesystem
|
||||||
|
* Remy Chi Jian Suen (IBM) - [202098][efs][nls] Improve error message when creating a remote project with existing name
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.rse.internal.efs.ui;
|
package org.eclipse.rse.internal.efs.ui;
|
||||||
|
|
||||||
|
@ -16,6 +17,7 @@ import org.eclipse.osgi.util.NLS;
|
||||||
public class Messages extends NLS {
|
public class Messages extends NLS {
|
||||||
private static final String BUNDLE_NAME = "org.eclipse.rse.internal.efs.ui.messages"; //$NON-NLS-1$
|
private static final String BUNDLE_NAME = "org.eclipse.rse.internal.efs.ui.messages"; //$NON-NLS-1$
|
||||||
public static String CreateRemoteProjectActionDelegate_CREATING_TITLE;
|
public static String CreateRemoteProjectActionDelegate_CREATING_TITLE;
|
||||||
|
public static String CreateRemoteProjectActionDelegate_PROJECT_EXISTS;
|
||||||
static {
|
static {
|
||||||
// initialize resource bundle
|
// initialize resource bundle
|
||||||
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
|
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
# Copyright (c) 2007 IBM Corporation and others. All rights reserved.
|
# Copyright (c) 2007, 2008 IBM Corporation and others. All rights reserved.
|
||||||
# This program and the accompanying materials are made available under the terms
|
# This program and the accompanying materials are made available under the terms
|
||||||
# of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
# of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
# available at http://www.eclipse.org/legal/epl-v10.html
|
# available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -7,9 +7,11 @@
|
||||||
# Contributors:
|
# Contributors:
|
||||||
# David Dykstal (IBM) - initial contribution
|
# David Dykstal (IBM) - initial contribution
|
||||||
# Martin Oberhuber (Wind River) - [188360] renamed from plugin org.eclipse.rse.eclipse.filesystem
|
# Martin Oberhuber (Wind River) - [188360] renamed from plugin org.eclipse.rse.eclipse.filesystem
|
||||||
|
# Remy Chi Jian Suen (IBM) - [202098][efs][nls] Improve error message when creating a remote project with existing name
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
# NLS_MESSAGEFORMAT_NONE
|
# NLS_MESSAGEFORMAT_NONE
|
||||||
# NLS_ENCODING=UTF-8
|
# NLS_ENCODING=UTF-8
|
||||||
|
|
||||||
CreateRemoteProjectActionDelegate_CREATING_TITLE=Creating Remote Project
|
CreateRemoteProjectActionDelegate_CREATING_TITLE=Creating Remote Project
|
||||||
|
CreateRemoteProjectActionDelegate_PROJECT_EXISTS = A project named {0} already exists.
|
||||||
|
|
Loading…
Add table
Reference in a new issue