diff options
author | Tomasz Zarna | 2008-01-15 15:13:02 +0000 |
---|---|---|
committer | Tomasz Zarna | 2008-01-15 15:13:02 +0000 |
commit | 88cc9626bf0116757393c25deab6de056eed86db (patch) | |
tree | 7bf2cd2066e6e667c0dc91dee7860b2903b93acf /bundles/org.eclipse.compare/compare/org | |
parent | 9c092e1b81fc5e878bd7e69698bd5d34147e760a (diff) | |
download | eclipse.platform.team-88cc9626bf0116757393c25deab6de056eed86db.tar.gz eclipse.platform.team-88cc9626bf0116757393c25deab6de056eed86db.tar.xz eclipse.platform.team-88cc9626bf0116757393c25deab6de056eed86db.zip |
bug 188682: [Apply Patch] Apply Patch wizard says "Project does not exist" when all files excluded
Diffstat (limited to 'bundles/org.eclipse.compare/compare/org')
-rw-r--r-- | bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchCompareEditorInput.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchCompareEditorInput.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchCompareEditorInput.java index bfad98af7..b5b82ce40 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchCompareEditorInput.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchCompareEditorInput.java @@ -53,10 +53,13 @@ public abstract class PatchCompareEditorInput extends CompareEditorInput { String text = wrappedProvider.getText(element); if (element instanceof PatchDiffNode){ PatchDiffNode node = (PatchDiffNode) element; - if (!node.isEnabled()) { - if (node instanceof PatchProjectDiffNode) { - return NLS.bind(PatchMessages.Diff_2Args, new String[]{text, PatchMessages.PreviewPatchLabelDecorator_ProjectDoesNotExist}); + if (node instanceof PatchProjectDiffNode) { + PatchProjectDiffNode projectNode = (PatchProjectDiffNode) node; + if (!projectNode.getDiffProject().getProject().exists()) { + text = NLS.bind(PatchMessages.Diff_2Args, new String[]{text, PatchMessages.PreviewPatchLabelDecorator_ProjectDoesNotExist}); } + } + if (!node.isEnabled()) { return NLS.bind(PatchMessages.Diff_2Args, new String[]{text, PatchMessages.PatcherCompareEditorInput_NotIncluded}); } |