### Eclipse Workspace Patch 1.0 #P org.eclipse.rse.efs.ui Index: src/org/eclipse/rse/internal/efs/ui/CreateRemoteProjectActionDelegate.java =================================================================== RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.efs.ui/src/org/eclipse/rse/internal/efs/ui/CreateRemoteProjectActionDelegate.java,v retrieving revision 1.4 diff -u -r1.4 CreateRemoteProjectActionDelegate.java --- src/org/eclipse/rse/internal/efs/ui/CreateRemoteProjectActionDelegate.java 13 Sep 2007 22:01:05 -0000 1.4 +++ src/org/eclipse/rse/internal/efs/ui/CreateRemoteProjectActionDelegate.java 5 May 2008 21:41:32 -0000 @@ -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 * of the Eclipse Public License v1.0 which accompanies this distribution, and is * 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 * 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 + * 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; @@ -48,6 +49,7 @@ import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; 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.RSEFileSystem; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; @@ -185,14 +187,12 @@ IProject editProject = root.getProject(projectName); try { - //FIXME re-enable for 3.0 -- just allowing editProject.create() throw for now to avoid NLS change - //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(), -// NLS.bind(Messages.CreateRemoteProjectActionDelegate_PROJECT_EXISTS, directoryName))); -// } + if (editProject.exists()) + { + throw new CoreException(new Status(IStatus.ERROR, + Activator.getDefault().getBundle().getSymbolicName(), + NLS.bind(Messages.CreateRemoteProjectActionDelegate_PROJECT_EXISTS, projectName))); + } IProjectDescription description = root.getWorkspace().newProjectDescription(projectName); String hostNameOrAddr = directory.getParentRemoteFileSubSystem().getHost().getHostName(); Index: src/org/eclipse/rse/internal/efs/ui/Messages.java =================================================================== RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.efs.ui/src/org/eclipse/rse/internal/efs/ui/Messages.java,v retrieving revision 1.1 diff -u -r1.1 Messages.java --- src/org/eclipse/rse/internal/efs/ui/Messages.java 25 May 2007 17:19:15 -0000 1.1 +++ src/org/eclipse/rse/internal/efs/ui/Messages.java 5 May 2008 21:41:32 -0000 @@ -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 * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -8,6 +8,7 @@ * Contributors: * IBM Corporation - initial API and implementation * 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; @@ -16,6 +17,7 @@ public class Messages extends NLS { 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_PROJECT_EXISTS; static { // initialize resource bundle NLS.initializeMessages(BUNDLE_NAME, Messages.class); Index: src/org/eclipse/rse/internal/efs/ui/messages.properties =================================================================== RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.efs.ui/src/org/eclipse/rse/internal/efs/ui/messages.properties,v retrieving revision 1.1 diff -u -r1.1 messages.properties --- src/org/eclipse/rse/internal/efs/ui/messages.properties 25 May 2007 17:19:15 -0000 1.1 +++ src/org/eclipse/rse/internal/efs/ui/messages.properties 5 May 2008 21:41:32 -0000 @@ -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 # of the Eclipse Public License v1.0 which accompanies this distribution, and is # available at http://www.eclipse.org/legal/epl-v10.html @@ -7,9 +7,11 @@ # Contributors: # David Dykstal (IBM) - initial contribution # 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_ENCODING=UTF-8 CreateRemoteProjectActionDelegate_CREATING_TITLE=Creating Remote Project +CreateRemoteProjectActionDelegate_PROJECT_EXISTS = A project named {0} already exists.