Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.egit.ui/src/org')
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/PluginPreferenceInitializer.java1
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIPreferences.java2
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/ConfigurationChecker.java12
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java18
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/ConfigurationEditorComponent.java87
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/DialogsPreferencePage.java2
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GlobalConfigurationPreferencePage.java15
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoryPropertyPage.java2
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoryPropertySource.java2
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties12
10 files changed, 7 insertions, 146 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/PluginPreferenceInitializer.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/PluginPreferenceInitializer.java
index dcaeef7b47..8a81f3cd54 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/PluginPreferenceInitializer.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/PluginPreferenceInitializer.java
@@ -85,7 +85,6 @@ public class PluginPreferenceInitializer extends AbstractPreferenceInitializer {
store.setDefault(UIPreferences.SHOW_REBASE_CONFIRM, true);
store.setDefault(UIPreferences.SHOW_INITIAL_CONFIG_DIALOG, true);
store.setDefault(UIPreferences.SHOW_HOME_DIR_WARNING, true);
- store.setDefault(UIPreferences.SHOW_GIT_PREFIX_WARNING, true);
store.setDefault(UIPreferences.SHOW_DETACHED_HEAD_WARNING, true);
store.setDefault(UIPreferences.SHOW_CHECKOUT_CONFIRMATION, true);
store.setDefault(UIPreferences.SHOW_RUNNING_LAUNCH_ON_CHECKOUT_WARNING,
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIPreferences.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIPreferences.java
index 9d182dcf1d..5fcd470ec8 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIPreferences.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIPreferences.java
@@ -172,8 +172,6 @@ public class UIPreferences {
/** */
public static final String SHOW_HOME_DIR_WARNING = "show_home_drive_warning"; //$NON-NLS-1$
/** */
- public static final String SHOW_GIT_PREFIX_WARNING = "show_git_prefix_warning"; //$NON-NLS-1$
- /** */
public static final String SHOW_DETACHED_HEAD_WARNING = "show_detached_head_warning"; //$NON-NLS-1$
/** */
public static final String SHOW_CHECKOUT_CONFIRMATION = "show_checkout_confirmation"; //$NON-NLS-1$
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/ConfigurationChecker.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/ConfigurationChecker.java
index 10cfb68ddc..0674e2af71 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/ConfigurationChecker.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/ConfigurationChecker.java
@@ -18,7 +18,6 @@ import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.egit.ui.Activator;
import org.eclipse.egit.ui.UIPreferences;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jgit.util.FS;
import org.eclipse.jgit.util.SystemReader;
import org.eclipse.osgi.util.NLS;
import org.eclipse.ui.PlatformUI;
@@ -59,20 +58,9 @@ public class ConfigurationChecker {
}
private static void check() {
- checkGitPrefix();
checkHome();
}
- private static void checkGitPrefix() {
- IPreferenceStore store = Activator.getDefault().getPreferenceStore();
- boolean hidden = !store
- .getBoolean(UIPreferences.SHOW_GIT_PREFIX_WARNING);
- if (!hidden && FS.DETECTED.gitPrefix() == null)
- Activator.handleIssue(IStatus.WARNING,
- UIText.ConfigurationChecker_gitPrefixWarningMessage, null,
- false);
- }
-
private static void checkHome() {
String home = System.getenv("HOME"); //$NON-NLS-1$
if (home != null)
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java
index e915024793..d37385454c 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java
@@ -2342,33 +2342,18 @@ public class UIText extends NLS {
public static String CommitDialog_Title;
/** */
- public static String ConfigurationChecker_gitPrefixWarningMessage;
-
- /** */
public static String ConfigurationChecker_checkConfiguration;
/** */
public static String ConfigurationChecker_homeNotSet;
/** */
- public static String ConfigurationEditorComponent_BrowseForPrefix;
-
- /** */
- public static String ConfigurationEditorComponent_CannotChangeGitPrefixError;
-
- /** */
public static String ConfigurationEditorComponent_ConfigLocationLabel;
/** */
public static String ConfigurationEditorComponent_EmptyStringNotAllowed;
/** */
- public static String ConfigurationEditorComponent_GitPrefixSelectionErrorMessage;
-
- /** */
- public static String ConfigurationEditorComponent_GitPrefixSelectionErrorTitle;
-
- /** */
public static String ConfigurationEditorComponent_KeyColumnHeader;
/** */
@@ -3482,9 +3467,6 @@ public class UIText extends NLS {
public static String DialogsPreferencePage_HomeDirWarning;
/** */
- public static String DialogsPreferencePage_GitPrefixWarning;
-
- /** */
public static String DialogsPreferencePage_RebaseCheckbox;
/** */
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 e5ac409de6..39e8a81cc1 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
@@ -23,9 +23,6 @@ import java.util.StringTokenizer;
import org.eclipse.core.filesystem.EFS;
import org.eclipse.core.filesystem.IFileStore;
import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.egit.core.GitCorePreferences;
import org.eclipse.egit.ui.Activator;
import org.eclipse.egit.ui.internal.UIText;
import org.eclipse.jface.dialogs.MessageDialog;
@@ -52,7 +49,6 @@ import org.eclipse.jgit.errors.ConfigInvalidException;
import org.eclipse.jgit.lib.Config;
import org.eclipse.jgit.lib.StoredConfig;
import org.eclipse.jgit.storage.file.FileBasedConfig;
-import org.eclipse.jgit.util.FS;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
@@ -64,7 +60,6 @@ import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.DirectoryDialog;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
@@ -112,8 +107,6 @@ public class ConfigurationEditorComponent {
private Text location;
- private final boolean changeablePath;
-
private boolean editable;
/**
@@ -123,16 +116,13 @@ public class ConfigurationEditorComponent {
* to be used instead of the user configuration
* @param useDialogFont
* if <code>true</code>, the current dialog font is used
- * @param changeablePath
- * The user can change the path of the configuration file
*/
public ConfigurationEditorComponent(Composite parent, StoredConfig config,
- boolean useDialogFont, boolean changeablePath) {
+ boolean useDialogFont) {
editableConfig = config;
this.shellProvider = new SameShellProvider(parent);
this.parent = parent;
this.useDialogFont = useDialogFont;
- this.changeablePath = changeablePath;
}
void setConfig(FileBasedConfig config) throws IOException {
@@ -163,26 +153,6 @@ public class ConfigurationEditorComponent {
* @throws IOException
*/
public void restore() throws IOException {
- if (changeablePath) {
- try {
- IEclipsePreferences node = InstanceScope.INSTANCE
- .getNode(org.eclipse.egit.core.Activator.getPluginId());
- node.remove(GitCorePreferences.core_gitPrefix);
- node.flush();
- // Create a temporary FS instance to compute the Git prefix
- File gitPrefix = FS.detect().gitPrefix();
- // Update THE FS instance.
- // TODO: This works today when there is only one FS
- // instance, but much of the JGit code is actually
- // written to work if there are multiple instances.
- FS.DETECTED.setGitPrefix(gitPrefix);
- } catch (Exception e1) {
- Activator
- .logError(
- UIText.ConfigurationEditorComponent_CannotChangeGitPrefixError,
- e1);
- }
- }
try {
editableConfig.clear();
editableConfig.load();
@@ -213,52 +183,6 @@ public class ConfigurationEditorComponent {
location = new Text(locationPanel, locationStyle);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER)
.grab(true, false).applyTo(location);
- if (changeablePath) {
- Button selectPath = new Button(locationPanel, SWT.PUSH);
- selectPath
- .setText(UIText.ConfigurationEditorComponent_BrowseForPrefix);
- selectPath.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- DirectoryDialog dialog = new DirectoryDialog(
- getShell(), SWT.OPEN);
- dialog.setText(UIText.ConfigurationEditorComponent_SelectGitInstallation);
- String file = dialog.open();
- if (file != null) {
- File etc = new File(file, "etc"); //$NON-NLS-1$
- File bin = new File(file, "bin"); //$NON-NLS-1$
- if (!new File(etc, "gitconfig").exists() //$NON-NLS-1$
- && !new File(bin, "git").exists() //$NON-NLS-1$
- && (!System
- .getProperty("os.name").startsWith("Windows") || //$NON-NLS-1$ //$NON-NLS-2$
- !new File(bin, "git.exe").exists())) { //$NON-NLS-1$
- MessageDialog
- .open(SWT.ERROR,
- getShell(),
- UIText.ConfigurationEditorComponent_GitPrefixSelectionErrorTitle,
- UIText.ConfigurationEditorComponent_GitPrefixSelectionErrorMessage,
- SWT.NONE);
- return;
- }
- location.setText(file);
- try {
- IEclipsePreferences node = InstanceScope.INSTANCE
- .getNode(org.eclipse.egit.core.Activator
- .getPluginId());
- node.put(GitCorePreferences.core_gitPrefix,
- file);
- node.flush();
- setChangeSystemPrefix(file);
- } catch (Exception e1) {
- Activator
- .logError(
- UIText.ConfigurationEditorComponent_CannotChangeGitPrefixError,
- e1);
- }
- }
- }
- });
- }
Button openEditor = new Button(locationPanel, SWT.PUSH);
openEditor
.setText(UIText.ConfigurationEditorComponent_OpenEditorButton);
@@ -570,15 +494,6 @@ public class ConfigurationEditorComponent {
// the default implementation does nothing
}
- /**
- * @param prefix
- * new System prefix
- * @throws IOException
- */
- protected void setChangeSystemPrefix(String prefix) throws IOException {
- // the default implementation does nothing
- }
-
private void updateEnablement() {
remove.setEnabled(editable);
newValue.setEnabled(editable);
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/DialogsPreferencePage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/DialogsPreferencePage.java
index 4d3dd1bed6..0215edcbaf 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/DialogsPreferencePage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/DialogsPreferencePage.java
@@ -90,8 +90,6 @@ public class DialogsPreferencePage extends FieldEditorPreferencePage implements
.applyTo(warningsGroup);
addField(new BooleanFieldEditor(UIPreferences.SHOW_HOME_DIR_WARNING,
UIText.DialogsPreferencePage_HomeDirWarning, warningsGroup));
- addField(new BooleanFieldEditor(UIPreferences.SHOW_GIT_PREFIX_WARNING,
- UIText.DialogsPreferencePage_GitPrefixWarning, warningsGroup));
updateMargins(warningsGroup);
}
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GlobalConfigurationPreferencePage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GlobalConfigurationPreferencePage.java
index a28e896f67..ae55187e4a 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GlobalConfigurationPreferencePage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GlobalConfigurationPreferencePage.java
@@ -89,7 +89,7 @@ public class GlobalConfigurationPreferencePage extends PreferencePage implements
SWTUtils.MARGINS_NONE);
TabFolder tabFolder = new TabFolder(composite, SWT.NONE);
tabFolder.setLayoutData(SWTUtils.createHVFillGridData());
- userConfigEditor = new ConfigurationEditorComponent(tabFolder, userConfig, true, false) {
+ userConfigEditor = new ConfigurationEditorComponent(tabFolder, userConfig, true) {
@Override
protected void setErrorMessage(String message) {
GlobalConfigurationPreferencePage.this.setErrorMessage(message);
@@ -101,7 +101,7 @@ public class GlobalConfigurationPreferencePage extends PreferencePage implements
updateApplyButton();
}
};
- sysConfigEditor = new ConfigurationEditorComponent(tabFolder, sysConfig, true, true) {
+ sysConfigEditor = new ConfigurationEditorComponent(tabFolder, sysConfig, true) {
@Override
protected void setErrorMessage(String message) {
GlobalConfigurationPreferencePage.this.setErrorMessage(message);
@@ -112,14 +112,6 @@ public class GlobalConfigurationPreferencePage extends PreferencePage implements
sysIsDirty = dirty;
updateApplyButton();
}
- @Override
- protected void setChangeSystemPrefix(String prefix) throws IOException {
- FS.DETECTED.setGitPrefix(new File(prefix));
- sysConfig = SystemReader.getInstance().openSystemConfig(null,
- FS.DETECTED);
- setConfig(sysConfig);
- }
-
};
Control result = userConfigEditor.createContents();
Dialog.applyDialogFont(result);
@@ -315,7 +307,8 @@ public class GlobalConfigurationPreferencePage extends PreferencePage implements
} else {
repositoryConfig = repository.getConfig();
}
- ConfigurationEditorComponent editorComponent = new ConfigurationEditorComponent(repoConfigComposite, repositoryConfig, true, false) {
+ ConfigurationEditorComponent editorComponent = new ConfigurationEditorComponent(
+ repoConfigComposite, repositoryConfig, true) {
@Override
protected void setErrorMessage(String message) {
GlobalConfigurationPreferencePage.this.setErrorMessage(message);
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoryPropertyPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoryPropertyPage.java
index 9f88c9ab90..4af20a850a 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoryPropertyPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoryPropertyPage.java
@@ -57,7 +57,7 @@ public class RepositoryPropertyPage extends PropertyPage {
}
});
}
- editor = new ConfigurationEditorComponent(displayArea, config, true, false) {
+ editor = new ConfigurationEditorComponent(displayArea, config, true) {
@Override
protected void setErrorMessage(String message) {
RepositoryPropertyPage.this.setErrorMessage(message);
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoryPropertySource.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoryPropertySource.java
index 2136cdaada..92ebb4711f 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoryPropertySource.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoryPropertySource.java
@@ -507,7 +507,7 @@ public class RepositoryPropertySource implements IPropertySource {
Composite main = (Composite) super.createDialogArea(parent);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true,
true).applyTo(main);
- editor = new ConfigurationEditorComponent(main, myConfig, true, false) {
+ editor = new ConfigurationEditorComponent(main, myConfig, true) {
@Override
protected void setErrorMessage(String message) {
EditDialog.this.setErrorMessage(message);
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties
index 2dd37727ea..b11240ec24 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties
@@ -1225,7 +1225,6 @@ DialogsPreferencePage_DetachedHeadCombo=D&etached HEAD and checkout of remote-tr
DialogsPreferencePage_HideConfirmationGroupHeader=Show confirmation dialogs
DialogsPreferencePage_HideWarningGroupHeader=Log warnings
DialogsPreferencePage_HomeDirWarning=&Home directory warning (Windows only)
-DialogsPreferencePage_GitPrefixWarning=&Git prefix warning (Windows typically)
DialogsPreferencePage_RebaseCheckbox=&Rebase confirmation
DialogsPreferencePage_RunningLaunchOnCheckout=Warn about running launches when switching branches
DialogsPreferencePage_ShowInitialConfigCheckbox=&Initial configuration
@@ -1317,13 +1316,6 @@ GitSelectWizardPage_ImportAsGeneralButton=Import as &general project
GitSelectWizardPage_ImportExistingButton=Import &existing Eclipse projects
GitSelectWizardPage_ProjectCreationHeader=Wizard for project import
GitSelectWizardPage_UseNewProjectsWizardButton=Import using the New &Project wizard
-ConfigurationChecker_gitPrefixWarningMessage=\
-Warning: EGit couldn't detect the installation path "gitPrefix" of native Git. Hence EGit can't respect system level\n\
-Git settings which might be configured in ${gitPrefix}/etc/gitconfig under the native Git installation directory.\n\
-The most important of these settings is core.autocrlf. Git for Windows by default sets this parameter to true in\n\
-this system level configuration. The Git installation location can be configured on the\n\
-Team > Git > Configuration preference page's 'System Settings' tab.\n\
-This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
ConfigurationChecker_checkConfiguration=Check Configuration
ConfigurationChecker_homeNotSet=\
Warning: The environment variable HOME is not set. The following directory will be used to store the Git\n\
@@ -1331,8 +1323,6 @@ user global configuration and to define the default location to store repositori
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and\n\
EGit might behave differently since they see different configuration options.\n\
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
-ConfigurationEditorComponent_BrowseForPrefix=&Browse...
-ConfigurationEditorComponent_CannotChangeGitPrefixError=Cannot change Git prefix
ConfigurationEditorComponent_ConfigLocationLabel=&Location:
ConfigurationEditorComponent_EmptyStringNotAllowed=Empty string is not allowed
ConfigurationEditorComponent_KeyColumnHeader=Key
@@ -1344,8 +1334,6 @@ ConfigurationEditorComponent_OpenEditorTooltip=Open a text editor for this confi
ConfigurationEditorComponent_ReadOnlyLocationFormat={0} (non-writable)
ConfigurationEditorComponent_RemoveButton=&Remove
ConfigurationEditorComponent_RemoveTooltip=Removes the selected entry or all entries in the selected section or subsection
-ConfigurationEditorComponent_GitPrefixSelectionErrorMessage=This directory does not look like a Git installation directory.\nYou do not need this setting unless you have a system wide configuration file.
-ConfigurationEditorComponent_GitPrefixSelectionErrorTitle=Git Prefix Selection
ConfigurationEditorComponent_RemoveSectionMessage=All entries in section ''{0}'' will be removed.\n\nDo you want to continue?
ConfigurationEditorComponent_RemoveSectionTitle=Remove Section
ConfigurationEditorComponent_RemoveSubsectionMessage=All entries in subsection ''{0}'' will be removed.\n\nDo you want to continue?

Back to the top