Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Keppler2018-07-10 05:04:35 -0400
committerThomas Wolf2018-07-21 16:06:37 -0400
commitabed6d01814ace23f3c0cc7f2c047105257056ae (patch)
tree56e65cfeb5c2399ebe0e1f7960fab7da8f3316b4 /org.eclipse.egit.ui/src/org
parent941ca30a42cb629022052f9128850f7b7f627a7c (diff)
downloadegit-abed6d01814ace23f3c0cc7f2c047105257056ae.tar.gz
egit-abed6d01814ace23f3c0cc7f2c047105257056ae.tar.xz
egit-abed6d01814ace23f3c0cc7f2c047105257056ae.zip
Bug 536863 - No feedback on "Import changed projects"
Show a message dialog if no projects are to be imported. Change-Id: Ia9648fa9262e72f27220c7f26a09ed29ba5fa795 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
Diffstat (limited to 'org.eclipse.egit.ui/src/org')
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java6
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/ImportChangedProjectsCommand.java17
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties2
3 files changed, 24 insertions, 1 deletions
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 399ea6076..2d7e4b9b1 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
@@ -4649,6 +4649,12 @@ public class UIText extends NLS {
public static String ImportChangedProjectsCommand_ImportingChangedProjects;
/** */
+ public static String ImportChangedProjectsCommand_NoProjectsChangedTitle;
+
+ /** */
+ public static String ImportChangedProjectsCommand_NoProjectsChangedMessage;
+
+ /** */
public static String InteractiveRebaseView_abortItem_text;
/** */
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/ImportChangedProjectsCommand.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/ImportChangedProjectsCommand.java
index 551d894ed..9c85e42da 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/ImportChangedProjectsCommand.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/ImportChangedProjectsCommand.java
@@ -32,8 +32,12 @@ import org.eclipse.egit.ui.Activator;
import org.eclipse.egit.ui.internal.UIText;
import org.eclipse.egit.ui.internal.commit.RepositoryCommit;
import org.eclipse.egit.ui.internal.history.FileDiff;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
/**
@@ -59,7 +63,18 @@ public class ImportChangedProjectsCommand
}
Set<File> dotProjectFiles = findDotProjectFiles(changedFiles,
repository);
- importProjects(dotProjectFiles);
+ if (dotProjectFiles.isEmpty()) {
+ Display.getDefault().asyncExec(() -> {
+ Shell shell = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getShell();
+ MessageDialog.openInformation(shell,
+ UIText.ImportChangedProjectsCommand_NoProjectsChangedTitle,
+ UIText.ImportChangedProjectsCommand_NoProjectsChangedMessage);
+
+ });
+ } else {
+ importProjects(dotProjectFiles);
+ }
return null;
}
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 6717b9da9..b0d3500a4 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
@@ -1679,6 +1679,8 @@ GitTraceConfigurationDialog_TraceFileLocationLabel=Trace File &Location:
ImportProjectsWrongSelection = Wrong selection
ImportProjectsSelectionInRepositoryRequired = A folder selection in the Repository View is required.
ImportChangedProjectsCommand_ImportingChangedProjects=Importing Changed Projects
+ImportChangedProjectsCommand_NoProjectsChangedTitle=Import Changed Projects
+ImportChangedProjectsCommand_NoProjectsChangedMessage=No projects changed between these commits.
InteractiveRebaseView_abortItem_text= Abort
InteractiveRebaseView_continueItem_text= Continue
InteractiveRebaseView_LinkSelection=Link with Editor and Selection

Back to the top