Lines 28-41
Link Here
|
28 |
|
28 |
|
29 |
private ResourceCompareInput fInput; |
29 |
private ResourceCompareInput fInput; |
30 |
private IWorkbenchPage fWorkbenchPage; |
30 |
private IWorkbenchPage fWorkbenchPage; |
|
|
31 |
private boolean needsSelectionSetting = true; |
31 |
|
32 |
|
32 |
|
33 |
|
33 |
public void run(ISelection selection) { |
34 |
public void run(ISelection selection) { |
|
|
35 |
boolean ok; |
34 |
if (fInput != null) { |
36 |
if (fInput != null) { |
35 |
// Pass the shell so setSelection can prompt the user for which |
37 |
if (needsSelectionSetting) |
36 |
// resource should be the ancestor |
38 |
// Pass the shell so setSelection can prompt the user for which |
37 |
boolean ok = fInput.setSelection(selection, |
39 |
// resource should be the ancestor |
38 |
fWorkbenchPage.getWorkbenchWindow().getShell()); |
40 |
ok = fInput.setSelection(selection, |
|
|
41 |
fWorkbenchPage.getWorkbenchWindow().getShell()); |
42 |
else |
43 |
ok = fInput.setSelection(selection, null); |
39 |
if (!ok) return; |
44 |
if (!ok) return; |
40 |
fInput.initializeCompareConfiguration(); |
45 |
fInput.initializeCompareConfiguration(); |
41 |
CompareUI.openCompareEditorOnPage(fInput, fWorkbenchPage); |
46 |
CompareUI.openCompareEditorOnPage(fInput, fWorkbenchPage); |
Lines 61-64
Link Here
|
61 |
public void setActivePart(IAction action, IWorkbenchPart targetPart) { |
66 |
public void setActivePart(IAction action, IWorkbenchPart targetPart) { |
62 |
fWorkbenchPage= targetPart.getSite().getPage(); |
67 |
fWorkbenchPage= targetPart.getSite().getPage(); |
63 |
} |
68 |
} |
|
|
69 |
|
70 |
public void doesntNeedSelection() { |
71 |
needsSelectionSetting = false; |
72 |
} |
64 |
} |
73 |
} |