1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-11 10:15:39 +02:00

[188718] fixing remote search dialog mnemonics, fixing create remote project strings

This commit is contained in:
David Dykstal 2007-05-23 18:47:43 +00:00
parent a99711b80a
commit 1d9e074af1
6 changed files with 53 additions and 9 deletions

View file

@ -41,8 +41,8 @@ Kushal Munir (IBM) - Changed paths to reflect internal packages
<objectState name="isdirectory" value="true"/>
</visibility>
<action
label="%CreateRemoteProject.label"
tooltip="%CreateRemoteProject.tooltip"
label="%createRemoteProject.label"
tooltip="%createRemoteProject.tooltip"
class="org.eclipse.rse.internal.eclipse.filesystem.ui.actions.CreateRemoteProjectActionDelegate"
menubarPath="group.importexport"
enablesFor="1"

View file

@ -118,7 +118,7 @@ public class CreateRemoteProjectActionDelegate implements IActionDelegate {
* @return java.lang.String
*/
protected String getErrorsTitle() {
return "Error creating remote project";
return "Error creating remote project"; //$NON-NLS-1$
}
/**
@ -152,14 +152,14 @@ public class CreateRemoteProjectActionDelegate implements IActionDelegate {
ProgressMonitorDialog mon = new ProgressMonitorDialog(getShell()) {
protected void configureShell(Shell shell) {
super.configureShell(shell);
shell.setText("Creating remote Project");
shell.setText(Messages.CreateRemoteProjectActionDelegate_CREATING_TITLE);
}
};
mon.run(true, true, op);
} catch (InterruptedException e) {
return false;
} catch (InvocationTargetException e) {
displayError("Internal Error: "+e.getTargetException().getMessage());
displayError("Internal Error: "+e.getTargetException().getMessage()); //$NON-NLS-1$
return false;
}
@ -202,11 +202,11 @@ public class CreateRemoteProjectActionDelegate implements IActionDelegate {
}
catch (CoreException e)
{
SystemBasePlugin.logError("Error creating temp project", e);
SystemBasePlugin.logError("Error creating temp project", e); //$NON-NLS-1$
}
catch (Exception e)
{
SystemBasePlugin.logError("Error creating temp project", e);
SystemBasePlugin.logError("Error creating temp project", e); //$NON-NLS-1$
}
return editProject;
}

View file

@ -0,0 +1,15 @@
package org.eclipse.rse.internal.eclipse.filesystem.ui.actions;
import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.rse.internal.eclipse.filesystem.ui.actions.messages"; //$NON-NLS-1$
public static String CreateRemoteProjectActionDelegate_CREATING_TITLE;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
}
private Messages() {
}
}

View file

@ -0,0 +1,14 @@
################################################################################
# Copyright (c) 2007 IBM Corporation. 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
#
# Contributors:
# David Dykstal (IBM) - initial contribution
################################################################################
# NLS_MESSAGEFORMAT_NONE
# NLS_ENCODING=UTF-8
CreateRemoteProjectActionDelegate_CREATING_TITLE=Creating Remote Project

View file

@ -48,10 +48,12 @@ import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSyst
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
import org.eclipse.rse.ui.ISystemMessages;
import org.eclipse.rse.ui.Mnemonics;
import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.ui.SystemBasePlugin;
import org.eclipse.rse.ui.SystemWidgetHelpers;
import org.eclipse.rse.ui.messages.SystemMessageDialog;
import org.eclipse.search.internal.ui.SearchMessages;
import org.eclipse.search.ui.ISearchPage;
import org.eclipse.search.ui.ISearchPageContainer;
import org.eclipse.swt.SWT;
@ -1001,7 +1003,12 @@ public class SystemSearchPage extends DialogPage implements ISearchPage {
createAdvancedControls(main);
// set mnemonics
SystemWidgetHelpers.setMnemonics(parent);
Mnemonics m = new Mnemonics();
StringBuffer usedMnemonics = new StringBuffer(5);
usedMnemonics.append(Mnemonics.getMnemonic(SearchMessages.SearchDialog_customize));
usedMnemonics.append(Mnemonics.getMnemonic(SearchMessages.SearchDialog_searchAction));
m.clear(usedMnemonics.toString());
m.setMnemonics(parent);
// set the top level control
setControl(main);

View file

@ -139,6 +139,14 @@ public class Mnemonics {
public void clear() {
usedSet.clear();
}
/**
* Resets the list of used mnemonic characters to those in the string.
* @param usedMnemonics
*/
public void clear(String usedMnemonics) {
makeUsed(usedMnemonics);
}
/**
* Given a string, this starts at the first character and iterates until
@ -491,7 +499,7 @@ public class Mnemonics {
}
}
}
/**
* Set if the mnemonics are for a preference page
* Preference pages already have a few buttons with mnemonics set by Eclipse