1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52: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. Part of plan item 79518: for PathEntry variable manager.
Not enable. Not enable.
* plugin.xml * plugin.xml

View file

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

View file

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

View file

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

View file

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

View file

@ -212,31 +212,41 @@ CodeFormatterPreferencePage.title=Code Formatter
CodeFormatterPreferencePage.description=Code Formatter CodeFormatterPreferencePage.description=Code Formatter
# --- Linked Resources --- # --- 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. PathEntryVariablePreference.explanation = PathEntry variables.
LinkedResourcesPreference.enableLinkedResources = &Enable linked resources PathEntryVariablePreference.enableLinkedResources = &Enable linked resources
LinkedResourcesPreference.linkedResourcesWarningTitle = Enabled Linked Resources PathEntryVariablePreference.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.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 # The following six keys are marked as unused by the NLS search, but they are indirectly used
# and should be removed. # and should be removed.
PathVariableDialog.shellTitle.newVariable = New Variable PathEntryVariableDialog.shellTitle.newVariable = New PathEntry Variable
PathVariableDialog.shellTitle.existingVariable = Edit Variable PathEntryVariableDialog.shellTitle.existingVariable = Edit PathEntry Variable
PathVariableDialog.dialogTitle.newVariable = Define a New Path Variable PathEntryVariableDialog.dialogTitle.newVariable = Define a New PathEntry Variable
PathVariableDialog.dialogTitle.existingVariable = Edit an Existing Path Variable PathEntryVariableDialog.dialogTitle.existingVariable = Edit an Existing PathEntry Variable
PathVariableDialog.message.newVariable = Enter a new variable name and its associated location. PathEntryVariableDialog.message.newVariable = Enter a new PathEntry variable name and its associated location.
PathVariableDialog.message.existingVariable = Edit variable's name and path value. PathEntryVariableDialog.message.existingVariable = Edit PathEntry variable's name and path value.
PathVariableDialog.variableName = &Name: PathEntryVariableDialog.variableName = &Name:
PathVariableDialog.variableValue = &Location: PathEntryVariableDialog.variableValue = &Location:
PathVariableDialog.variableNameEmptyMessage = You must provide a variable name. PathEntryVariableDialog.variableNameEmptyMessage = You must provide a variable name.
PathVariableDialog.variableValueEmptyMessage = You must provide a file or folder path as variable value. PathEntryVariableDialog.variableValueEmptyMessage = You must provide a file or folder path as variable value.
PathVariableDialog.variableValueInvalidMessage = The provided value is not a valid path. PathEntryVariableDialog.variableValueInvalidMessage = The provided value is not a valid path.
PathVariableDialog.file = &File... PathEntryVariableDialog.file = &File...
PathVariableDialog.folder = F&older... PathEntryVariableDialog.folder = F&older...
PathVariableDialog.selectFileTitle = File selection PathEntryVariableDialog.selectFileTitle = File selection
PathVariableDialog.selectFolderTitle = Folder selection PathEntryVariableDialog.selectFolderTitle = Folder selection
PathVariableDialog.selectFolderMessage = Specify the folder to be represented by the variable. PathEntryVariableDialog.selectFolderMessage = Specify the folder to be represented by the variable.
PathVariableDialog.variableAlreadyExistsMessage = This variable name is already in use. PathEntryVariableDialog.variableAlreadyExistsMessage = This variable name is already in use.
PathVariableDialog.pathIsRelativeMessage = Path must be absolute. PathEntryVariableDialog.pathIsRelativeMessage = Path must be absolute.
PathVariableDialog.pathDoesNotExistMessage = Path does not exist. 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}