Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2016-09-27 06:39:44 +0000
committerThomas Wolf2016-09-27 06:43:27 +0000
commit8899eeddee8bf1252af00dcd501907b1ba534846 (patch)
tree3804bf6da0e689c74db6ce750de9328d3ca49b22
parente0eacd69e0c5e74fc6ffb8363a5c17081c4614ab (diff)
downloadegit-8899eeddee8bf1252af00dcd501907b1ba534846.tar.gz
egit-8899eeddee8bf1252af00dcd501907b1ba534846.tar.xz
egit-8899eeddee8bf1252af00dcd501907b1ba534846.zip
Eclipse 3.8 compatibility
* The search widget in the history view needs to implement isDynamic() properly. For some reason, it works as expected on 4.2+ without this, but on 3.8 it's needed. After all, a toolbar contribution that toggles its visibility _is_ dynamic. * Use older JFaceResources.format(); the varargs version doesn't exist in Eclipse 3.8. * Don't use FilteredTree.setQuickSelectionMode(); it doesn't exist in Eclipse 3.8. Bug: 502144 Change-Id: I26e3d321bdf3452d383206cd7bbda95459bf859f Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
-rw-r--r--org.eclipse.egit.gitflow.ui/src/org/eclipse/egit/gitflow/ui/internal/dialogs/FilteredBranchesWidget.java1
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java6
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GitPreferenceRoot.java4
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/ProjectsPreferencePage.java4
4 files changed, 10 insertions, 5 deletions
diff --git a/org.eclipse.egit.gitflow.ui/src/org/eclipse/egit/gitflow/ui/internal/dialogs/FilteredBranchesWidget.java b/org.eclipse.egit.gitflow.ui/src/org/eclipse/egit/gitflow/ui/internal/dialogs/FilteredBranchesWidget.java
index fd4d67cdf..9ee95def1 100644
--- a/org.eclipse.egit.gitflow.ui/src/org/eclipse/egit/gitflow/ui/internal/dialogs/FilteredBranchesWidget.java
+++ b/org.eclipse.egit.gitflow.ui/src/org/eclipse/egit/gitflow/ui/internal/dialogs/FilteredBranchesWidget.java
@@ -84,7 +84,6 @@ public class FilteredBranchesWidget {
final FilteredTree tree = new FilteredTree(area, SWT.MULTI | SWT.H_SCROLL
| SWT.V_SCROLL | SWT.BORDER | SWT.FULL_SELECTION, filter,
true);
- tree.setQuickSelectionMode(true);
branchesViewer = tree.getViewer();
branchesViewer.getTree().setLinesVisible(false);
branchesViewer.getTree().setHeaderVisible(true);
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
index 6f6a575b4..4e35eff3d 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
@@ -1021,6 +1021,12 @@ public class GitHistoryPage extends HistoryPage implements RefsChangedListener,
}
@Override
+ public boolean isDynamic() {
+ // We toggle our own visibility
+ return true;
+ }
+
+ @Override
protected Control createControl(Composite parent) {
toolbar = new FindToolbar(parent);
toolbar.setBackground(null);
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GitPreferenceRoot.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GitPreferenceRoot.java
index 38496e3de..5b8cccfc1 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GitPreferenceRoot.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GitPreferenceRoot.java
@@ -100,8 +100,8 @@ public class GitPreferenceRoot extends FieldEditorPreferencePage implements
corePreferences.save();
} catch (IOException e) {
String message = JFaceResources.format(
- "PreferenceDialog.saveErrorMessage", getTitle(), //$NON-NLS-1$
- e.getMessage());
+ "PreferenceDialog.saveErrorMessage", //$NON-NLS-1$
+ new Object[] { getTitle(), e.getMessage() });
Policy.getStatusHandler().show(
new Status(IStatus.ERROR, Policy.JFACE, message, e),
JFaceResources
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/ProjectsPreferencePage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/ProjectsPreferencePage.java
index 3e238d177..0bdf3e807 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/ProjectsPreferencePage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/ProjectsPreferencePage.java
@@ -61,8 +61,8 @@ public class ProjectsPreferencePage extends FieldEditorPreferencePage implements
((IPersistentPreferenceStore) uiPreferences).save();
} catch (IOException e) {
String message = JFaceResources.format(
- "PreferenceDialog.saveErrorMessage", getTitle(), //$NON-NLS-1$
- e.getMessage());
+ "PreferenceDialog.saveErrorMessage", //$NON-NLS-1$
+ new Object[] { getTitle(), e.getMessage() });
Policy.getStatusHandler().show(
new Status(IStatus.ERROR, Policy.JFACE, message, e),
JFaceResources.getString(

Back to the top