Fixed: [ Issue 61 ] The Directory box under "Add directory path" looks editable
https://code.google.com/p/protobuf-dt/issues/detail?id=61
diff --git a/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/preferences/paths/AddDirectoryDialog.java b/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/preferences/paths/AddDirectoryDialog.java
index 2d6d412..e06a8be 100644
--- a/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/preferences/paths/AddDirectoryDialog.java
+++ b/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/preferences/paths/AddDirectoryDialog.java
@@ -8,18 +8,19 @@
*/
package com.google.eclipse.protobuf.ui.preferences.paths;
-import static com.google.eclipse.protobuf.ui.preferences.paths.Messages.*;
import static com.google.eclipse.protobuf.ui.preferences.paths.DirectorySelectionDialogs.*;
+import static com.google.eclipse.protobuf.ui.preferences.paths.Messages.*;
import static org.eclipse.jface.dialogs.IDialogConstants.OK_ID;
import static org.eclipse.xtext.util.Strings.isEmpty;
+import com.google.eclipse.protobuf.ui.preferences.InputDialog;
+
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.*;
+import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;
-import com.google.eclipse.protobuf.ui.preferences.InputDialog;
-
/**
* Dialog where users can select a path (in the workspace or file system) to be included in resolution of imports.
*
@@ -54,6 +55,7 @@
label.setText(includeDirectoryPrompt);
txtPath = new Text(cmpDialogArea, SWT.BORDER);
+ txtPath.setBackground(getColor(SWT.COLOR_WIDGET_BACKGROUND));
txtPath.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
txtPath.setEditable(false);
@@ -131,6 +133,10 @@
return txtPath.getText().trim();
}
+ private static Color getColor(int systemColorID) {
+ return Display.getCurrent().getSystemColor(systemColorID);
+ }
+
/**
* Returns the path selected by the user.
* @return the path selected by the user.