1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

2005-03-07 Alain Magloire

Part of plan item 79518: for PathEntry variable manager.
	Not enable.
	* plugin.xml
	* src/org/eclipse/cdt/internal/ui/preferences/PathEntryVariableDialog.java
	* src/org/eclipse/cdt/internal/ui/preferences/PathEntryVariablePreferencePage.java
	* src/org/eclipse/cdt/internal/ui/preferences/PathEntryVariableGroup.java
	* src/org/eclipse/cdt/internal/ui/preferences/PreferencesMessages.properties
This commit is contained in:
Alain Magloire 2005-03-07 21:35:35 +00:00
parent 2b758858a2
commit b10e292cf9
8 changed files with 68 additions and 54 deletions

View file

@ -1,4 +1,4 @@
2005-03-06 Alain Magloire
2005-03-07 Alain Magloire
Part of plan item 79518: for PathEntry variable manager.
Not enable.
* plugin.xml

View file

@ -286,6 +286,9 @@ problemHoverDescription= Shows the description of the selected problem.
#
appearancePrefName= Appearance
# PathEntry Variable Preference Name
pathEntryVariablesPrefName=PathEntry Variables
#--- folding
foldingStructureProvidersExtensionPoint= Folding Structure Providers
defaultFoldingStructureProviderName= Default C Folding

View file

@ -627,7 +627,7 @@
id="org.eclipse.cdt.ui.preferences.AppearancePreferencePage">
</page>
<!--page
name="PathEntry Variable"
name="%pathEntryVariablesPrefName"
category="org.eclipse.cdt.ui.preferences.CPluginPreferencePage"
class="org.eclipse.cdt.internal.ui.preferences.PathEntryVariablePreferencePage"
id="org.eclipse.cdt.ui.preferences.PathEntryVariablePreferencePage">

View file

@ -154,4 +154,6 @@ public interface ICHelpContextIds {
public static final String CPROJECT_VIEW = PREFIX + "projects_view"; //$NON-NLS-1$
public static final String C_SEARCH_VIEW = PREFIX + "search_view"; //$NON-NLS-1$
public static final String PATHENTRY_VARIABLES_PREFERENCE_PAGE= PREFIX + "pathentry_variables_preference_page_context"; //$NON-NLS-1$
}

View file

@ -161,10 +161,10 @@ public class PathEntryVariableDialog extends TitleAreaDialog {
if (newVariable)
this.standardMessage = PreferencesMessages
.getString("PathVariableDialog.message.newVariable"); //$NON-NLS-1$
.getString("PathEntryVariableDialog.message.newVariable"); //$NON-NLS-1$
else
this.standardMessage = PreferencesMessages
.getString("PathVariableDialog.message.existingVariable"); //$NON-NLS-1$
.getString("PathEntryVariableDialog.message.existingVariable"); //$NON-NLS-1$
}
/**
@ -176,11 +176,11 @@ public class PathEntryVariableDialog extends TitleAreaDialog {
super.configureShell(shell);
if (newVariable)
shell.setText(PreferencesMessages
.getString("PathVariableDialog.shellTitle.newVariable")); //$NON-NLS-1$
.getString("PathEntryVariableDialog.shellTitle.newVariable")); //$NON-NLS-1$
else
shell
.setText(PreferencesMessages
.getString("PathVariableDialog.shellTitle.existingVariable")); //$NON-NLS-1$
.getString("PathEntryVariableDialog.shellTitle.existingVariable")); //$NON-NLS-1$
}
/**
@ -227,10 +227,10 @@ public class PathEntryVariableDialog extends TitleAreaDialog {
if (newVariable)
setTitle(PreferencesMessages
.getString("PathVariableDialog.dialogTitle.newVariable")); //$NON-NLS-1$
.getString("PathEntryVariableDialog.dialogTitle.newVariable")); //$NON-NLS-1$
else
setTitle(PreferencesMessages
.getString("PathVariableDialog.dialogTitle.existingVariable")); //$NON-NLS-1$
.getString("PathEntryVariableDialog.dialogTitle.existingVariable")); //$NON-NLS-1$
setMessage(standardMessage);
return contents;
}
@ -245,9 +245,9 @@ public class PathEntryVariableDialog extends TitleAreaDialog {
FormData data;
String nameLabelText = PreferencesMessages
.getString("PathVariableDialog.variableName"); //$NON-NLS-1$
.getString("PathEntryVariableDialog.variableName"); //$NON-NLS-1$
String valueLabelText = PreferencesMessages
.getString("PathVariableDialog.variableValue"); //$NON-NLS-1$
.getString("PathEntryVariableDialog.variableValue"); //$NON-NLS-1$
// variable name label
variableNameLabel = new Label(contents, SWT.LEFT);
@ -311,7 +311,7 @@ public class PathEntryVariableDialog extends TitleAreaDialog {
// select file path button
fileButton = new Button(contents, SWT.PUSH);
fileButton.setText(PreferencesMessages
.getString("PathVariableDialog.file")); //$NON-NLS-1$
.getString("PathEntryVariableDialog.file")); //$NON-NLS-1$
if ((variableType & IResource.FILE) == 0)
fileButton.setEnabled(false);
@ -333,7 +333,7 @@ public class PathEntryVariableDialog extends TitleAreaDialog {
// select folder path button
folderButton = new Button(contents, SWT.PUSH);
folderButton.setText(PreferencesMessages
.getString("PathVariableDialog.folder")); //$NON-NLS-1$
.getString("PathEntryVariableDialog.folder")); //$NON-NLS-1$
if ((variableType & IResource.FOLDER) == 0)
folderButton.setEnabled(false);
@ -401,9 +401,9 @@ public class PathEntryVariableDialog extends TitleAreaDialog {
protected void selectFolder() {
DirectoryDialog dialog = new DirectoryDialog(getShell());
dialog.setText(PreferencesMessages
.getString("PathVariableDialog.selectFolderTitle")); //$NON-NLS-1$
.getString("PathEntryVariableDialog.selectFolderTitle")); //$NON-NLS-1$
dialog.setMessage(PreferencesMessages
.getString("PathVariableDialog.selectFolderMessage")); //$NON-NLS-1$
.getString("PathEntryVariableDialog.selectFolderMessage")); //$NON-NLS-1$
dialog.setFilterPath(variableValue);
String res = dialog.open();
if (res != null) {
@ -418,7 +418,7 @@ public class PathEntryVariableDialog extends TitleAreaDialog {
protected void selectFile() {
FileDialog dialog = new FileDialog(getShell());
dialog.setText(PreferencesMessages
.getString("PathVariableDialog.selectFileTitle")); //$NON-NLS-1$
.getString("PathEntryVariableDialog.selectFileTitle")); //$NON-NLS-1$
dialog.setFilterPath(variableValue);
String res = dialog.open();
if (res != null) {
@ -463,14 +463,14 @@ public class PathEntryVariableDialog extends TitleAreaDialog {
// a name was entered before and is now empty
newValidationStatus = IMessageProvider.ERROR;
message = PreferencesMessages
.getString("PathVariableDialog.variableNameEmptyMessage"); //$NON-NLS-1$
.getString("PathEntryVariableDialog.variableNameEmptyMessage"); //$NON-NLS-1$
}
} else {
if (namesInUse.contains(variableName)
&& !variableName.equals(originalName)) {
// the variable name is already in use
message = PreferencesMessages
.getString("PathVariableDialog.variableAlreadyExistsMessage"); //$NON-NLS-1$
.getString("PathEntryVariableDialog.variableAlreadyExistsMessage"); //$NON-NLS-1$
newValidationStatus = IMessageProvider.ERROR;
} else {
allowFinish = true;
@ -513,22 +513,22 @@ public class PathEntryVariableDialog extends TitleAreaDialog {
// a location value was entered before and is now empty
newValidationStatus = IMessageProvider.ERROR;
message = PreferencesMessages
.getString("PathVariableDialog.variableValueEmptyMessage"); //$NON-NLS-1$
.getString("PathEntryVariableDialog.variableValueEmptyMessage"); //$NON-NLS-1$
}
} else if (!Path.EMPTY.isValidPath(variableValue)) {
// the variable value is an invalid path
message = PreferencesMessages
.getString("PathVariableDialog.variableValueInvalidMessage"); //$NON-NLS-1$
.getString("PathEntryVariableDialog.variableValueInvalidMessage"); //$NON-NLS-1$
newValidationStatus = IMessageProvider.ERROR;
} else if (!new Path(variableValue).isAbsolute()) {
// the variable value is a relative path
message = PreferencesMessages
.getString("PathVariableDialog.pathIsRelativeMessage"); //$NON-NLS-1$
.getString("PathEntryVariableDialog.pathIsRelativeMessage"); //$NON-NLS-1$
newValidationStatus = IMessageProvider.ERROR;
} else if (!new File(variableValue).exists()) {
// the path does not exist (warning)
message = PreferencesMessages
.getString("PathVariableDialog.pathDoesNotExistMessage"); //$NON-NLS-1$
.getString("PathEntryVariableDialog.pathDoesNotExistMessage"); //$NON-NLS-1$
newValidationStatus = IMessageProvider.WARNING;
allowFinish = true;
} else {

View file

@ -50,8 +50,8 @@ implements IWorkbenchPreferencePage {
protected Control createContents(Composite parent) {
Font font = parent.getFont();
// PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
// ICHelpContextIds.LINKED_RESOURCE_PREFERENCE_PAGE);
PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, ICHelpContextIds.PATHENTRY_VARIABLES_PREFERENCE_PAGE);
// define container & its gridding
Composite pageComponent = new Composite(parent, SWT.NULL);
GridLayout layout = new GridLayout();
@ -66,8 +66,7 @@ implements IWorkbenchPreferencePage {
topLabel = new Label(pageComponent, SWT.NONE);
topLabel.setText(PreferencesMessages
.getString("LinkedResourcesPreference.explanation")); //$NON-NLS-1$
topLabel.setText(PreferencesMessages.getString("PathEntryVariablePreference.explanation")); //$NON-NLS-1$
data = new GridData();
data.verticalAlignment = GridData.FILL;
data.horizontalAlignment = GridData.FILL;

View file

@ -199,7 +199,7 @@ public class PathEntryVariablesGroup {
// layout the table & its buttons
variableLabel = new Label(pageComponent, SWT.LEFT);
variableLabel.setText(PreferencesMessages
.getString("PathVariablesBlock.variablesLabel")); //$NON-NLS-1$
.getString("PathEntryVariablesBlock.variablesLabel")); //$NON-NLS-1$
data = new GridData();
data.horizontalAlignment = GridData.FILL;
data.horizontalSpan = 2;
@ -243,7 +243,7 @@ public class PathEntryVariablesGroup {
/**
* Opens a dialog for editing an existing variable.
*
* @see PathVariableDialog
* @see PathEntryVariableDialog
*/
protected void editSelectedVariable() {
// retrieves the name and value for the currently selected variable
@ -335,7 +335,7 @@ public class PathEntryVariablesGroup {
addButton = new Button(groupComponent, SWT.PUSH);
addButton.setText(PreferencesMessages
.getString("PathVariablesBlock.addVariableButton")); //$NON-NLS-1$
.getString("PathEntryVariablesBlock.addVariableButton")); //$NON-NLS-1$
addButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
addNewVariable();
@ -346,7 +346,7 @@ public class PathEntryVariablesGroup {
editButton = new Button(groupComponent, SWT.PUSH);
editButton.setText(PreferencesMessages
.getString("PathVariablesBlock.editVariableButton")); //$NON-NLS-1$
.getString("PathEntryVariablesBlock.editVariableButton")); //$NON-NLS-1$
editButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
editSelectedVariable();
@ -357,7 +357,7 @@ public class PathEntryVariablesGroup {
removeButton = new Button(groupComponent, SWT.PUSH);
removeButton.setText(PreferencesMessages
.getString("PathVariablesBlock.removeVariableButton")); //$NON-NLS-1$
.getString("PathEntryVariablesBlock.removeVariableButton")); //$NON-NLS-1$
removeButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
removeSelectedVariables();

View file

@ -212,31 +212,41 @@ CodeFormatterPreferencePage.title=Code Formatter
CodeFormatterPreferencePage.description=Code Formatter
# --- Linked Resources ---
LinkedResourcesPreference.explanation = Path variables specify locations in the file system. The locations of linked resources\nmay be specified relative to these path variables.
LinkedResourcesPreference.enableLinkedResources = &Enable linked resources
LinkedResourcesPreference.linkedResourcesWarningTitle = Enabled Linked Resources
LinkedResourcesPreference.linkedResourcesWarningMessage = You have enabled a feature which may give rise to incompatibilities if projects are shared by users of different versions of the workbench. Please consult the documentation for further details.
PathEntryVariablePreference.explanation = PathEntry variables.
PathEntryVariablePreference.enableLinkedResources = &Enable linked resources
PathEntryVariablePreference.linkedResourcesWarningTitle = Enabled Linked Resources
PathEntryVariablePreference.linkedResourcesWarningMessage = You have enabled a feature which may give rise to incompatibilities if projects are shared by users of different versions of the workbench. Please consult the documentation for further details.
# The following six keys are marked as unused by the NLS search, but they are indirectly used
# and should be removed.
PathVariableDialog.shellTitle.newVariable = New Variable
PathVariableDialog.shellTitle.existingVariable = Edit Variable
PathVariableDialog.dialogTitle.newVariable = Define a New Path Variable
PathVariableDialog.dialogTitle.existingVariable = Edit an Existing Path Variable
PathVariableDialog.message.newVariable = Enter a new variable name and its associated location.
PathVariableDialog.message.existingVariable = Edit variable's name and path value.
PathEntryVariableDialog.shellTitle.newVariable = New PathEntry Variable
PathEntryVariableDialog.shellTitle.existingVariable = Edit PathEntry Variable
PathEntryVariableDialog.dialogTitle.newVariable = Define a New PathEntry Variable
PathEntryVariableDialog.dialogTitle.existingVariable = Edit an Existing PathEntry Variable
PathEntryVariableDialog.message.newVariable = Enter a new PathEntry variable name and its associated location.
PathEntryVariableDialog.message.existingVariable = Edit PathEntry variable's name and path value.
PathVariableDialog.variableName = &Name:
PathVariableDialog.variableValue = &Location:
PathVariableDialog.variableNameEmptyMessage = You must provide a variable name.
PathVariableDialog.variableValueEmptyMessage = You must provide a file or folder path as variable value.
PathVariableDialog.variableValueInvalidMessage = The provided value is not a valid path.
PathVariableDialog.file = &File...
PathVariableDialog.folder = F&older...
PathVariableDialog.selectFileTitle = File selection
PathVariableDialog.selectFolderTitle = Folder selection
PathVariableDialog.selectFolderMessage = Specify the folder to be represented by the variable.
PathVariableDialog.variableAlreadyExistsMessage = This variable name is already in use.
PathVariableDialog.pathIsRelativeMessage = Path must be absolute.
PathVariableDialog.pathDoesNotExistMessage = Path does not exist.
PathEntryVariableDialog.variableName = &Name:
PathEntryVariableDialog.variableValue = &Location:
PathEntryVariableDialog.variableNameEmptyMessage = You must provide a variable name.
PathEntryVariableDialog.variableValueEmptyMessage = You must provide a file or folder path as variable value.
PathEntryVariableDialog.variableValueInvalidMessage = The provided value is not a valid path.
PathEntryVariableDialog.file = &File...
PathEntryVariableDialog.folder = F&older...
PathEntryVariableDialog.selectFileTitle = File selection
PathEntryVariableDialog.selectFolderTitle = Folder selection
PathEntryVariableDialog.selectFolderMessage = Specify the folder to be represented by the variable.
PathEntryVariableDialog.variableAlreadyExistsMessage = This variable name is already in use.
PathEntryVariableDialog.pathIsRelativeMessage = Path must be absolute.
PathEntryVariableDialog.pathDoesNotExistMessage = Path does not exist.
PathEntryVariablesBlock.variablesLabel = &Defined PathEntry variables:
PathEntryVariablesBlock.addVariableButton = &New...
PathEntryVariablesBlock.editVariableButton = Edi&t...
PathEntryVariablesBlock.removeVariableButton = &Remove
PathEntryVariableSelectionDialog.title = Select Path Variable
PathEntryVariableSelectionDialog.extendButton = &Extend...
PathEntryVariableSelectionDialog.ExtensionDialog.title = Variable Extension
PathEntryVariableSelectionDialog.ExtensionDialog.description = Choose extension to {0}