Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/ConfigurationEditorComponent.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/ConfigurationEditorComponent.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/ConfigurationEditorComponent.java
index 2dd454762..b55ed8843 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/ConfigurationEditorComponent.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/ConfigurationEditorComponent.java
@@ -340,6 +340,7 @@ public class ConfigurationEditorComponent {
else
entry.addValue(dlg.getValue());
markDirty();
+ reveal(sectionName, null, entryName);
} else if (st.countTokens() > 2) {
int n = st.countTokens();
String sectionName = st.nextToken();
@@ -358,6 +359,7 @@ public class ConfigurationEditorComponent {
else
entry.addValue(dlg.getValue());
markDirty();
+ reveal(sectionName, subSectionName, entryName);
} else
Activator
.handleError(
@@ -511,6 +513,15 @@ public class ConfigurationEditorComponent {
tv.refresh();
}
+ private void reveal(String sectionName, String subSectionName,
+ String entryName) {
+ Entry entry = ((GitConfig) tv.getInput()).getEntry(sectionName,
+ subSectionName, entryName);
+ if (entry != null) {
+ tv.reveal(entry);
+ }
+ }
+
private final static class GitConfig extends WorkbenchAdapter {
private final Config config;
@@ -898,6 +909,14 @@ public class ConfigurationEditorComponent {
return false;
return true;
}
+
+ @Override
+ public Object getParent(Object object) {
+ if (sectionparent != null)
+ return sectionparent;
+ else
+ return subsectionparent;
+ }
}
private static final class ConfigEditorLabelProvider extends

Back to the top