diff options
4 files changed, 39 insertions, 32 deletions
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/RemoveFromIndexOperationTest.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/RemoveFromIndexOperationTest.java index 3d259e9493..17c7d413fa 100644 --- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/RemoveFromIndexOperationTest.java +++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/RemoveFromIndexOperationTest.java @@ -13,8 +13,8 @@ package org.eclipse.egit.core.test.op; import static java.util.Arrays.asList; -import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import java.io.ByteArrayInputStream; import java.io.File; @@ -103,7 +103,7 @@ public class RemoveFromIndexOperationTest extends GitTestCase { } @Test - public void shouldUnstExistingFile() throws Exception { + public void shouldUnstageExistingFile() throws Exception { // given IFile file1 = createFileInRepo("a.txt"); new AddToIndexOperation(asList(file1)).execute(null); diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GitDecoratorPreferencePage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GitDecoratorPreferencePage.java index d944036777..4ed5f68cf7 100644 --- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GitDecoratorPreferencePage.java +++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GitDecoratorPreferencePage.java @@ -22,6 +22,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Observable; import java.util.Observer; +import java.util.TreeMap; import org.eclipse.core.resources.IResource; import org.eclipse.egit.ui.Activator; @@ -30,9 +31,9 @@ import org.eclipse.egit.ui.internal.GitLabelProvider; import org.eclipse.egit.ui.internal.PreferenceBasedDateFormatter; import org.eclipse.egit.ui.internal.SWTUtils; import org.eclipse.egit.ui.internal.UIText; -import org.eclipse.egit.ui.internal.decorators.GitLightweightDecorator.DecorationHelper; import org.eclipse.egit.ui.internal.decorators.DecoratableResource; import org.eclipse.egit.ui.internal.decorators.DecorationResult; +import org.eclipse.egit.ui.internal.decorators.GitLightweightDecorator.DecorationHelper; import org.eclipse.egit.ui.internal.resources.IResourceState.StagingState; import org.eclipse.egit.ui.internal.synchronize.mapping.GitChangeSetLabelProvider; import org.eclipse.jface.dialogs.Dialog; @@ -164,7 +165,7 @@ public class GitDecoratorPreferencePage extends PreferencePage implements project.children = children; PREVIEW_FILESYSTEM_ROOT = Collections.singleton(project); - FILE_AND_FOLDER_BINDINGS = new HashMap<>(); + FILE_AND_FOLDER_BINDINGS = new TreeMap<>(); FILE_AND_FOLDER_BINDINGS.put(DecorationHelper.BINDING_RESOURCE_NAME, UIText.DecoratorPreferencesPage_bindingResourceName); FILE_AND_FOLDER_BINDINGS.put(DecorationHelper.BINDING_DIRTY_FLAG, @@ -172,7 +173,7 @@ public class GitDecoratorPreferencePage extends PreferencePage implements FILE_AND_FOLDER_BINDINGS.put(DecorationHelper.BINDING_STAGED_FLAG, UIText.DecoratorPreferencesPage_bindingStagedFlag); - PROJECT_BINDINGS = new HashMap<>(); + PROJECT_BINDINGS = new TreeMap<>(); PROJECT_BINDINGS.put(DecorationHelper.BINDING_RESOURCE_NAME, UIText.DecoratorPreferencesPage_bindingResourceName); PROJECT_BINDINGS.put(DecorationHelper.BINDING_DIRTY_FLAG, @@ -189,7 +190,7 @@ public class GitDecoratorPreferencePage extends PreferencePage implements UIText.DecoratorPreferencesPage_bindingCommitMessage); - CHANGESET_LABEL_BINDINGS = new HashMap<>(); + CHANGESET_LABEL_BINDINGS = new TreeMap<>(); CHANGESET_LABEL_BINDINGS.put(removeBraces(GitChangeSetLabelProvider.BINDING_CHANGESET_AUTHOR), UIText.DecoratorPreferencesPage_bindingChangeSetAuthor); CHANGESET_LABEL_BINDINGS.put(removeBraces(GitChangeSetLabelProvider.BINDING_CHANGESET_DATE), diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/HistoryPreferencePage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/HistoryPreferencePage.java index 730d0a2012..8c03996452 100644 --- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/HistoryPreferencePage.java +++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/HistoryPreferencePage.java @@ -16,6 +16,7 @@ import org.eclipse.egit.ui.internal.UIText; import org.eclipse.jface.layout.GridDataFactory; import org.eclipse.jface.layout.GridLayoutFactory; import org.eclipse.jface.preference.BooleanFieldEditor; +import org.eclipse.jface.preference.FieldEditor; import org.eclipse.jface.preference.FieldEditorPreferencePage; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.preference.IntegerFieldEditor; @@ -84,6 +85,8 @@ public class HistoryPreferencePage extends FieldEditorPreferencePage implements UIPreferences.RESOURCEHISTORY_SHOW_EMAIL_ADDRESSES, UIText.HistoryPreferencePage_toggleEmailAddresses, showGroup)); + addField(new BooleanFieldEditor(UIPreferences.HISTORY_CUT_AT_START, + UIText.HistoryPreferencePage_toggleShortenAtStart, showGroup)); addField(new IntegerFieldEditor(UIPreferences.HISTORY_MAX_NUM_COMMITS, UIText.ResourceHistory_MaxNumCommitsInList, showGroup)); @@ -96,10 +99,8 @@ public class HistoryPreferencePage extends FieldEditorPreferencePage implements showGroup)); addField(new IntegerFieldEditor(UIPreferences.HISTORY_MAX_DIFF_LINES, UIText.HistoryPreferencePage_MaxDiffLines, showGroup)); - - addField(new BooleanFieldEditor(UIPreferences.HISTORY_CUT_AT_START, - UIText.HistoryPreferencePage_toggleShortenAtStart, showGroup)); updateMargins(showGroup); + Group commentGroup = new Group(main, SWT.SHADOW_ETCHED_IN); // we need a span of 2 to accommodate the field editors GridDataFactory.fillDefaults().grab(true, false).span(2, 1) @@ -120,12 +121,17 @@ public class HistoryPreferencePage extends FieldEditorPreferencePage implements UIText.ResourceHistory_toggleCommentFill, commentGroup)); updateMargins(commentGroup); - adjustGridLayout(); } + /** + * {@link FieldEditor} sets the margin of its parent to zero in its + * <code>createControl(Composite)</code> method. Therefore fix the group + * margin only after adding the field editors. + * + * @param group + * group control + */ private void updateMargins(Group group) { - // make sure there is some room between the group border - // and the controls in the group GridLayout layout = (GridLayout) group.getLayout(); layout.marginWidth = 5; layout.marginHeight = 5; 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 d51eb3da63..ae69c0f41b 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 @@ -23,7 +23,7 @@ # Denis Zygann <d.zygann@web.de> - 473919 Add tooltip text for sorting files action # Wim Jongman <wim.jongman@remainsoftware.com - 358152 ############################################################################### -AbortRebaseCommand_CancelDialogMessage=The abort operation was canceled +AbortRebaseCommand_CancelDialogMessage=The abort operation was canceled. AbortRebaseCommand_JobName=Aborting Rebase AbstractHistoryCommandHandler_ActionRequiresOneSelectedCommitMessage=Action requires one commit to be selected AbstractHistoryCommanndHandler_CouldNotGetRepositoryMessage=Could not get the repository from the history view @@ -142,7 +142,7 @@ ExistingOrNewPage_RelativePathLabel=&Path within repository: ExistingOrNewPage_RepoCreationInWorkspaceCreationWarning=Creation of repositories in the Eclipse workspace is not recommended ExistingOrNewPage_SymbolicValueEmptyMapping=<empty repository mapping> ExistingOrNewPage_WorkingDirectoryLabel=Working tree: -ExistingOrNewPage_WrongPathErrorDialogMessage=The selected path is not a child of the repository working tree +ExistingOrNewPage_WrongPathErrorDialogMessage=The selected path is not a child of the repository working tree. ExistingOrNewPage_WrongPathErrorDialogTitle=Wrong Path GitCloneSourceProviderExtension_Local=Existing local repository @@ -332,7 +332,7 @@ CompareUtils_errorGettingEncoding=Getting encoding failed CompareUtils_errorGettingHeadCommit=Getting HEAD commit failed CompareUtils_wrongResourceArgument=Given argument is neither a file nor a link: {1} -RebaseCurrentRefCommand_RebaseCanceledMessage=The rebase operation was canceled +RebaseCurrentRefCommand_RebaseCanceledMessage=The rebase operation was canceled. RebaseCurrentRefCommand_RebasingCurrentJobName=Rebasing Branch {0} on {1} RebaseCurrentRefCommand_ErrorGettingCurrentBranchMessage=Error getting the branch to rebase RebaseInteractiveHandler_EditMessageDialogText=Edit the commit message. Lines starting with a \# are comments and will be ignored. @@ -428,7 +428,7 @@ ReplaceWithOursTheirsMenu_TheirsWithCommitLabel=&Theirs: {0} {1} ReplaceWithOursTheirsMenu_TheirsWithoutCommitLabel=&Theirs ReplaceWithPreviousActionHandler_NoParentCommitDialogMessage=No previous revision of {0} could be found in the repository. ReplaceWithPreviousActionHandler_NoParentCommitDialogTitle=Previous revision not found -RepositoryAction_errorFindingRepo=Could not find a repository associated with this project +RepositoryAction_errorFindingRepo=Could not find a repository associated with this project. RepositoryAction_errorFindingRepoTitle=Cannot Find Repository RepositoryAction_multiRepoSelection=Cannot perform action on multiple repositories simultaneously.\n\nPlease select items from only one repository. RepositoryAction_multiRepoSelectionTitle=Multiple Repositories Selection @@ -722,7 +722,7 @@ HistoryPage_findbar_reference=Branch/Tag HistoryPreferencePage_toggleAllBranches=All &Branches and Tags HistoryPreferencePage_toggleAdditionalRefs=&Additional Refs HistoryPreferencePage_toggleEmailAddresses=&E-mail addresses in Author/Committer columns -HistoryPreferencePage_toggleShortenAtStart=&Shorten long tag and branch names at start +HistoryPreferencePage_toggleShortenAtStart=&Shorten long tag and branch names at the front HistoryPreferencePage_MaxBranchLength=Maximum characters to show for a &branch: HistoryPreferencePage_MaxDiffLines=Maximum lines to show for a &diff: HistoryPreferencePage_MaxTagLength=&Maximum characters to show for a tag: @@ -742,7 +742,7 @@ PullOperationUI_PullCanceledWindowTitle=Pull Canceled PullOperationUI_PullFailed=Pull Failed PullOperationUI_PullingMultipleTaskName=Pulling from Multiple Repositories PullOperationUI_PullingTaskName=Pulling Branch {0} - {1} -PullOperationUI_PullOperationCanceledMessage=The pull operation was canceled +PullOperationUI_PullOperationCanceledMessage=The pull operation was canceled. PullResultDialog_NothingToFetchFromLocal=Nothing to fetch (the fetch source is the local Repository) PullResultDialog_DialogTitle=Pull Result for {0} PullResultDialog_FetchResultGroupHeader=Fetch Result @@ -814,7 +814,7 @@ CommitDialog_ErrorAddingFiles=Error when adding files CommitDialog_ErrorInvalidAuthor=Invalid author CommitDialog_ErrorInvalidAuthorSpecified=Invalid author specified. Please use the form\:\nA U Thor <author@example.com> CommitDialog_ErrorInvalidCommitterSpecified=Invalid committer specified. Please use the form\:\nC O Mitter <committer@example.com> -CommitDialog_ErrorMustEnterCommitMessage=You must enter a commit message +CommitDialog_ErrorMustEnterCommitMessage=You must enter a commit message. CommitDialog_ErrorNoItemsSelected=No items selected CommitDialog_ErrorNoItemsSelectedToBeCommitted=No items are currently selected to be committed. CommitDialog_ErrorNoMessage=No message @@ -1039,7 +1039,7 @@ WindowCachePreferencePage_deltaBaseCacheLimit=Delta base cache limit: WindowCachePreferencePage_packedGitMMAP=Use virtual memory mapping WindowCachePreferencePage_streamFileThreshold=Stream File Threshold: -ProcessStepsRebaseCommand_CancelDialogMessage=Processing steps canceled +ProcessStepsRebaseCommand_CancelDialogMessage=Processing steps canceled. ProcessStepsRebaseCommand_JobName=Processing Steps ProjectsPreferencePage_AutoShareProjects=Automatically share projects located in a Git repository ProjectsPreferencePage_RestoreBranchProjects=Track each branch's imported projects and restore on checkout @@ -1171,10 +1171,10 @@ BranchSelectionAndEditDialog_Delete=&Delete MergeAction_CannotMerge=Merge Unavailable MergeAction_HeadIsNoBranch=HEAD is not pointing to a branch MergeAction_JobNameMerge=Merging with {0} -MergeAction_MergeCanceledMessage=The merge operation was canceled +MergeAction_MergeCanceledMessage=The merge operation was canceled. MergeAction_MergeCanceledTitle=Merge Canceled MergeAction_MergeResultTitle=Merge Result -MergeAction_WrongRepositoryState=The current repository state ''{0}'' does not allow merging +MergeAction_WrongRepositoryState=The current repository state ''{0}'' does not allow merging. MergeModeDialog_DialogTitle=Select a Merge Mode MergeModeDialog_DontAskAgainLabel=&Don't ask again MergeModeDialog_MergeMode_1_Label=Use the &workspace version of conflicting files (pre-merged by Git) @@ -1368,7 +1368,7 @@ GitCreateGeneralProjectPage_FileNotDirMessage=File {0} is not a directory GitCreateGeneralProjectPage_PorjectAlreadyExistsMessage=Project {0} already exists GitCreateGeneralProjectPage_ProjectNameLabel=Project name GitCreatePatchAction_cannotCreatePatch=Cannot create patch -GitCreatePatchAction_workingTreeClean=There are no changes in the workspace for the current selection +GitCreatePatchAction_workingTreeClean=There are no changes in the workspace for the current selection. GitCreatePatchWizard_Browse=B&rowse... GitCreatePatchWizard_Clipboard=&Clipboard GitCreatePatchWizard_ContextMustBePositiveInt=Context must be a valid number of lines ( >= 0 ) @@ -1447,7 +1447,7 @@ ConfigurationEditorComponent_RemoveSubsectionTitle=Remove Subsection ConfigurationEditorComponent_ValueColumnHeader=Value ConfigurationEditorComponent_WrongNumberOfTokensMessage=Wrong number of tokens ConfigureGerritWizard_title=Gerrit Configuration -ContinueRebaseCommand_CancelDialogMessage=The continue operation was canceled +ContinueRebaseCommand_CancelDialogMessage=The continue operation was canceled. ContinueRebaseCommand_JobName=Continuing Rebase MixedResetToRevisionAction_mixedReset=Mixed Reset @@ -1579,7 +1579,7 @@ CommitFileDiffViewer_CanNotOpenCompareEditorTitle=Cannot Open Compare Editor CommitFileDiffViewer_CompareMenuLabel=Compare with Previous &Version CommitFileDiffViewer_CompareWorkingDirectoryMenuLabel=Compare with &Working Tree CommitFileDiffViewer_CopyFilePathMenuLabel=&Copy File Path -CommitFileDiffViewer_MergeCommitMultiAncestorMessage=This is a merge commit with more than one ancestor +CommitFileDiffViewer_MergeCommitMultiAncestorMessage=This is a merge commit with more than one ancestor. CommitFileDiffViewer_OpenInEditorMenuLabel=Open &This Version CommitFileDiffViewer_OpenPreviousInEditorMenuLabel=Open &Previous Version CommitFileDiffViewer_OpenWorkingTreeVersionInEditorMenuLabel=&Open Working Tree Version @@ -1674,7 +1674,7 @@ GitTraceConfigurationDialog_ShellTitle=Git Trace Configuration GitTraceConfigurationDialog_TraceFileLocationLabel=Trace File &Location: ImportProjectsWrongSelection = Wrong selection -ImportProjectsSelectionInRepositoryRequired = A folder selection in the Repository View is required +ImportProjectsSelectionInRepositoryRequired = A folder selection in the Repository View is required. ImportChangedProjectsCommand_ImportingChangedProjects=Importing Changed Projects InteractiveRebaseView_abortItem_text= Abort InteractiveRebaseView_continueItem_text= Continue @@ -1735,7 +1735,7 @@ RevertFailureDialog_ReasonChangesInIndex=Local Changes in Index RevertFailureDialog_ReasonChangesInWorkingDirectory=Local Changes in Working Tree RevertFailureDialog_ReasonDeleteFailure=Unable to Delete RevertFailureDialog_Title=Revert Failed -RevertHandler_AlreadyRevertedMessage=The change has already been reverted +RevertHandler_AlreadyRevertedMessage=The change has already been reverted. RevertHandler_CommitsNotOnCurrentBranch=The selected commits cannot be reverted because they are not on the currently checked-out branch. RevertHandler_Error_Title=Error Reverting Commits RevertHandler_ErrorCheckingIfCommitsAreOnCurrentBranch=Error checking if commits are on current branch @@ -1752,12 +1752,12 @@ AbstractConfigureRemoteDialog_DeleteUriLabel=Re&move AbstractConfigureRemoteDialog_DetachedHeadMessage=Detached HEAD AbstractConfigureRemoteDialog_DryRunButton=Dr&y-Run AbstractConfigureRemoteDialog_EditAdvancedLabel=Ad&vanced... -AbstractConfigureRemoteDialog_EmptyClipboardDialogMessage=The clipboard is empty +AbstractConfigureRemoteDialog_EmptyClipboardDialogMessage=The clipboard is empty. AbstractConfigureRemoteDialog_EmptyClipboardDialogTitle=Nothing to Paste AbstractConfigureRemoteDialog_InvalidRefDialogMessage=Refspec {0} does not appear to be valid, do you still want to add it? AbstractConfigureRemoteDialog_InvalidRefDialogTitle=Invalid Ref AbstractConfigureRemoteDialog_MissingUriMessage=Please provide at least one URI -AbstractConfigureRemoteDialog_NoRefSpecDialogMessage=The contents of the clipboard does not appear to be a refspec +AbstractConfigureRemoteDialog_NoRefSpecDialogMessage=The content of the clipboard does not appear to be a refspec. AbstractConfigureRemoteDialog_NoRefSpecDialogTitle=Not a Refspec AbstractConfigureRemoteDialog_PasteRefSpecButton=&Paste AbstractConfigureRemoteDialog_RefMappingGroup=Ref mappings @@ -1783,7 +1783,7 @@ SimpleConfigurePushDialog_DialogTitle=Configure push for remote ''{0}'' SimpleConfigurePushDialog_PushUrisLabel=Push URIs SimpleConfigurePushDialog_SaveAndPushButton=Save and Push -SkipRebaseCommand_CancelDialogMessage=The skip operation was canceled +SkipRebaseCommand_CancelDialogMessage=The skip operation was canceled. SkipRebaseCommand_JobName=Skipping commit during Rebase ValidationUtils_CanNotResolveRefMessage=Cannot resolve {0} @@ -1803,10 +1803,10 @@ GitModelWorkingTree_workingTree=<working tree> EgitUiEditorUtils_openFailed=Opening editor failed -SimpleFetchActionHandler_NothingToFetchDialogMessage=Cannot fetch anything: the currently checked-out branch is based on a local branch +SimpleFetchActionHandler_NothingToFetchDialogMessage=Cannot fetch anything: the currently checked-out branch is based on a local branch. SimpleFetchActionHandler_NothingToFetchDialogTitle=Nothing to Fetch SimpleFetchRefSpecWizard_WizardTitle=Adding a Refspec for Fetch -SimplePushActionHandler_NothingToPushDialogMessage=Cannot push anything: the currently checked-out branch is based on a local branch +SimplePushActionHandler_NothingToPushDialogMessage=Cannot push anything: the currently checked-out branch is based on a local branch. SimplePushActionHandler_NothingToPushDialogTitle=Nothing to Push SquashHandler_CommitsNotOnCurrentBranch=The selected commits cannot be squashed because they are not on the currently checked-out branch. SquashHandler_Error_Title=Error Squashing Commits |