|
Lines 50-64
Link Here
|
| 50 |
import org.eclipse.swt.widgets.Composite; |
50 |
import org.eclipse.swt.widgets.Composite; |
| 51 |
import org.eclipse.swt.widgets.Label; |
51 |
import org.eclipse.swt.widgets.Label; |
| 52 |
import org.eclipse.swt.widgets.Text; |
52 |
import org.eclipse.swt.widgets.Text; |
|
|
53 |
import org.eclipse.ui.PlatformUI; |
| 53 |
import org.eclipse.ui.forms.events.HyperlinkAdapter; |
54 |
import org.eclipse.ui.forms.events.HyperlinkAdapter; |
| 54 |
import org.eclipse.ui.forms.events.HyperlinkEvent; |
55 |
import org.eclipse.ui.forms.events.HyperlinkEvent; |
| 55 |
import org.eclipse.ui.forms.widgets.ExpandableComposite; |
56 |
import org.eclipse.ui.forms.widgets.ExpandableComposite; |
| 56 |
import org.eclipse.ui.forms.widgets.FormToolkit; |
57 |
import org.eclipse.ui.forms.widgets.FormToolkit; |
| 57 |
import org.eclipse.ui.forms.widgets.ImageHyperlink; |
58 |
import org.eclipse.ui.forms.widgets.ImageHyperlink; |
| 58 |
import org.eclipse.ui.forms.widgets.Section; |
59 |
import org.eclipse.ui.forms.widgets.Section; |
|
|
60 |
import org.eclipse.ui.handlers.IHandlerService; |
| 59 |
|
61 |
|
| 60 |
public class CommandDetails { |
62 |
public class CommandDetails { |
| 61 |
|
63 |
|
|
|
64 |
private static IHandlerService getHandlerService() { |
| 65 |
return (IHandlerService) PlatformUI.getWorkbench().getService( |
| 66 |
IHandlerService.class); |
| 67 |
} |
| 68 |
|
| 62 |
private final HashMap fParameterToValue = new HashMap(); |
69 |
private final HashMap fParameterToValue = new HashMap(); |
| 63 |
private final ArrayList fObjectParamList = new ArrayList(); |
70 |
private final ArrayList fObjectParamList = new ArrayList(); |
| 64 |
private final ArrayList fValueParamList = new ArrayList(); |
71 |
private final ArrayList fValueParamList = new ArrayList(); |
|
Lines 200-206
Link Here
|
| 200 |
public void linkActivated(HyperlinkEvent e) { |
207 |
public void linkActivated(HyperlinkEvent e) { |
| 201 |
ParameterizedCommand pCommand = buildParameterizedCommand(); |
208 |
ParameterizedCommand pCommand = buildParameterizedCommand(); |
| 202 |
try { |
209 |
try { |
| 203 |
Object obj = pCommand.executeWithChecks(null, null); |
210 |
Object obj = getHandlerService().executeCommand(pCommand, null); |
| 204 |
String resultString = null; |
211 |
String resultString = null; |
| 205 |
if (obj instanceof String) { |
212 |
if (obj instanceof String) { |
| 206 |
resultString = (String)obj; |
213 |
resultString = (String)obj; |