Fix ResourceException in drag and drop to experiment from same project
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / internal / tmf / ui / project / handlers / DropAdapterAssistant.java
1 /*******************************************************************************
2 * Copyright (c) 2012, 2013 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Patrick Tasse - Initial API and implementation
11 * Patrick Tasse - Add support for DROP_LINK and rename prompt on name clash
12 *******************************************************************************/
13
14 package org.eclipse.linuxtools.internal.tmf.ui.project.handlers;
15
16 import java.io.File;
17 import java.io.FileInputStream;
18 import java.io.FileNotFoundException;
19 import java.io.InputStream;
20 import java.lang.reflect.InvocationTargetException;
21 import java.util.Arrays;
22 import java.util.List;
23 import java.util.Map;
24
25 import org.eclipse.core.resources.IFile;
26 import org.eclipse.core.resources.IFolder;
27 import org.eclipse.core.resources.IProject;
28 import org.eclipse.core.resources.IResource;
29 import org.eclipse.core.resources.IWorkspace;
30 import org.eclipse.core.resources.ResourcesPlugin;
31 import org.eclipse.core.runtime.CoreException;
32 import org.eclipse.core.runtime.IPath;
33 import org.eclipse.core.runtime.IProgressMonitor;
34 import org.eclipse.core.runtime.IStatus;
35 import org.eclipse.core.runtime.NullProgressMonitor;
36 import org.eclipse.core.runtime.Path;
37 import org.eclipse.core.runtime.QualifiedName;
38 import org.eclipse.core.runtime.Status;
39 import org.eclipse.jface.operation.IRunnableWithProgress;
40 import org.eclipse.jface.viewers.IStructuredSelection;
41 import org.eclipse.linuxtools.internal.tmf.ui.Activator;
42 import org.eclipse.linuxtools.tmf.core.TmfCommonConstants;
43 import org.eclipse.linuxtools.tmf.core.trace.TmfTrace;
44 import org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement;
45 import org.eclipse.linuxtools.tmf.ui.project.model.TmfExperimentElement;
46 import org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectElement;
47 import org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectRegistry;
48 import org.eclipse.linuxtools.tmf.ui.project.model.TmfTraceElement;
49 import org.eclipse.linuxtools.tmf.ui.project.model.TmfTraceFolder;
50 import org.eclipse.osgi.util.NLS;
51 import org.eclipse.swt.SWT;
52 import org.eclipse.swt.dnd.DND;
53 import org.eclipse.swt.dnd.DropTargetEvent;
54 import org.eclipse.swt.dnd.FileTransfer;
55 import org.eclipse.swt.dnd.TransferData;
56 import org.eclipse.swt.widgets.MessageBox;
57 import org.eclipse.ui.PlatformUI;
58 import org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation;
59 import org.eclipse.ui.dialogs.IOverwriteQuery;
60 import org.eclipse.ui.navigator.CommonDropAdapter;
61 import org.eclipse.ui.navigator.CommonDropAdapterAssistant;
62 import org.eclipse.ui.wizards.datatransfer.FileSystemStructureProvider;
63 import org.eclipse.ui.wizards.datatransfer.ImportOperation;
64
65 /**
66 * Drop adapter assistant for project explorer
67 */
68 public class DropAdapterAssistant extends CommonDropAdapterAssistant {
69
70 /**
71 * Default constructor
72 */
73 public DropAdapterAssistant() {
74 }
75
76 /* (non-Javadoc)
77 * @see org.eclipse.ui.navigator.CommonDropAdapterAssistant#isSupportedType(org.eclipse.swt.dnd.TransferData)
78 */
79 @Override
80 public boolean isSupportedType(TransferData aTransferType) {
81 return super.isSupportedType(aTransferType) || FileTransfer.getInstance().isSupportedType(aTransferType);
82 }
83
84 /* (non-Javadoc)
85 * @see org.eclipse.ui.navigator.CommonDropAdapterAssistant#validateDrop(java.lang.Object, int, org.eclipse.swt.dnd.TransferData)
86 */
87 @Override
88 public IStatus validateDrop(Object target, int operation, TransferData transferType) {
89 if (target instanceof TmfTraceFolder) {
90 return Status.OK_STATUS;
91 }
92 if (target instanceof TmfExperimentElement) {
93 return Status.OK_STATUS;
94 }
95 if (target instanceof TmfTraceElement) {
96 ITmfProjectModelElement parent = ((TmfTraceElement) target).getParent();
97 if (parent instanceof TmfTraceFolder) {
98 return Status.OK_STATUS;
99 }
100 if (parent instanceof TmfExperimentElement) {
101 return Status.OK_STATUS;
102 }
103 }
104 if (target instanceof IProject) {
105 return Status.OK_STATUS;
106 }
107 return Status.CANCEL_STATUS;
108 }
109
110 /* (non-Javadoc)
111 * @see org.eclipse.ui.navigator.CommonDropAdapterAssistant#handleDrop(org.eclipse.ui.navigator.CommonDropAdapter, org.eclipse.swt.dnd.DropTargetEvent, java.lang.Object)
112 */
113 @Override
114 public IStatus handleDrop(CommonDropAdapter aDropAdapter, DropTargetEvent aDropTargetEvent, Object aTarget) {
115 boolean ok = false;
116
117 // Use local variable to avoid parameter assignment
118 Object targetToUse = aTarget;
119
120 int operation = aDropTargetEvent.detail;
121 if (operation != DND.DROP_LINK) {
122 operation = DND.DROP_COPY;
123 }
124
125 // If target is a trace, use its parent (either trace folder or experiment)
126 if (targetToUse instanceof TmfTraceElement) {
127 targetToUse = ((TmfTraceElement) targetToUse).getParent();
128 }
129
130 // If target is a project, use its trace folder
131 if (targetToUse instanceof IProject) {
132 TmfProjectElement projectElement = TmfProjectRegistry.getProject((IProject) targetToUse);
133 if (projectElement != null) {
134 targetToUse = projectElement.getTracesFolder();
135 }
136 }
137
138 if (aDropTargetEvent.data instanceof IStructuredSelection) {
139 IStructuredSelection selection = (IStructuredSelection) aDropTargetEvent.data;
140 for (Object source : selection.toArray()) {
141 if (source instanceof IResource) {
142 // If source resource is a trace, use the trace element
143 IResource sourceResource = (IResource) source;
144 TmfProjectElement projectElement = TmfProjectRegistry.getProject(sourceResource.getProject());
145 if (projectElement != null && projectElement.getTracesFolder() != null) {
146 for (TmfTraceElement trace : projectElement.getTracesFolder().getTraces()) {
147 if (trace.getResource().equals(sourceResource)) {
148 source = trace;
149 break;
150 }
151 }
152 }
153 }
154 if (source instanceof TmfTraceElement) {
155 TmfTraceElement sourceTrace = (TmfTraceElement) source;
156 // If source trace is under an experiment, use the original trace from the traces folder
157 sourceTrace = sourceTrace.getElementUnderTraceFolder();
158 if (targetToUse instanceof TmfExperimentElement) {
159 TmfExperimentElement targetExperiment = (TmfExperimentElement) targetToUse;
160 ok |= drop(sourceTrace, targetExperiment, operation);
161 } else if (targetToUse instanceof TmfTraceFolder) {
162 TmfTraceFolder traceFolder = (TmfTraceFolder) targetToUse;
163 ok |= drop(sourceTrace, traceFolder, operation);
164 }
165 } else if (source instanceof IResource) {
166 IResource sourceResource = (IResource) source;
167 if (sourceResource.getType() != IResource.FILE && sourceResource.getType() != IResource.FOLDER) {
168 continue;
169 }
170 if (targetToUse instanceof TmfExperimentElement) {
171 TmfExperimentElement targetExperiment = (TmfExperimentElement) targetToUse;
172 ok |= (drop(sourceResource, targetExperiment, operation) != null);
173 } else if (targetToUse instanceof TmfTraceFolder) {
174 TmfTraceFolder traceFolder = (TmfTraceFolder) targetToUse;
175 ok |= (drop(sourceResource, traceFolder, operation) != null);
176 }
177 }
178 }
179 } else if (aDropTargetEvent.data instanceof String[]) {
180 String[] sources = (String[]) aDropTargetEvent.data;
181 for (String source : sources) {
182 Path path = new Path(source);
183 if (targetToUse instanceof TmfExperimentElement) {
184 TmfExperimentElement targetExperiment = (TmfExperimentElement) targetToUse;
185 ok |= drop(path, targetExperiment, operation);
186 } else if (targetToUse instanceof TmfTraceFolder) {
187 TmfTraceFolder traceFolder = (TmfTraceFolder) targetToUse;
188 ok |= drop(path, traceFolder, operation);
189 }
190 }
191 }
192 return (ok ? Status.OK_STATUS : Status.CANCEL_STATUS);
193 }
194
195
196 /**
197 * Drop a trace by copying/linking a trace element in a target experiment
198 *
199 * @param sourceTrace the source trace element to copy
200 * @param targetExperiment the target experiment
201 * @param operation the drop operation (DND.DROP_COPY | DND.DROP_LINK)
202 * @return true if successful
203 */
204 private static boolean drop(TmfTraceElement sourceTrace,
205 TmfExperimentElement targetExperiment,
206 int operation) {
207
208 IResource sourceResource = sourceTrace.getResource();
209 IResource targetResource = drop(sourceResource, targetExperiment, operation);
210
211 if (targetResource != null) {
212 if (! sourceTrace.getProject().equals(targetExperiment.getProject())) {
213 IFolder destinationSupplementaryFolder = targetExperiment.getTraceSupplementaryFolder(targetResource.getName());
214 sourceTrace.copySupplementaryFolder(destinationSupplementaryFolder);
215 }
216 return true;
217 }
218 return false;
219 }
220
221 /**
222 * Drop a trace by copying/linking a resource in a target experiment
223 *
224 * @param sourceResource the source resource
225 * @param targetExperiment the target experiment
226 * @param operation the drop operation (DND.DROP_COPY | DND.DROP_LINK)
227 * @return the target resource or null if unsuccessful
228 */
229 private static IResource drop(IResource sourceResource,
230 TmfExperimentElement targetExperiment,
231 int operation) {
232
233 IResource traceResource = sourceResource;
234
235 TmfProjectElement projectElement = TmfProjectRegistry.getProject(sourceResource.getProject());
236 for (TmfTraceElement trace : targetExperiment.getTraces()) {
237 if (trace.getName().equals(sourceResource.getName()) && targetExperiment.getProject().equals(projectElement)) {
238 return null;
239 }
240 }
241 if (!targetExperiment.getProject().equals(projectElement)) {
242 String targetName = sourceResource.getName();
243 for (TmfTraceElement trace : targetExperiment.getProject().getTracesFolder().getTraces()) {
244 if (trace.getName().equals(targetName)) {
245 targetName = promptRename(trace);
246 if (targetName == null) {
247 return null;
248 }
249 break;
250 }
251 }
252 try {
253 if (operation == DND.DROP_COPY) {
254 IPath destination = targetExperiment.getProject().getTracesFolder().getResource().getFullPath().addTrailingSeparator().append(targetName);
255 sourceResource.copy(destination, false, null);
256 cleanupBookmarks(destination);
257 } else {
258 createLink(targetExperiment.getProject().getTracesFolder().getResource(), sourceResource, targetName);
259 }
260 // use the copied resource for the experiment
261 if (sourceResource.getType() == IResource.FILE) {
262 traceResource = targetExperiment.getProject().getTracesFolder().getResource().getFile(targetName);
263 } else if (sourceResource.getType() == IResource.FOLDER) {
264 traceResource = targetExperiment.getProject().getTracesFolder().getResource().getFolder(targetName);
265 }
266 } catch (CoreException e) {
267 displayException(e);
268 return null;
269 }
270 }
271 if (traceResource != null && traceResource.exists()) {
272 createLink(targetExperiment.getResource(), traceResource, traceResource.getName());
273 return traceResource;
274 }
275 return null;
276 }
277
278 /**
279 * Drop a trace by copying/linking a trace element in a trace folder
280 *
281 * @param sourceTrace the source trace
282 * @param traceFolder the target trace folder
283 * @param operation the drop operation (DND.DROP_COPY | DND.DROP_LINK)
284 * @return true if successful
285 */
286 private static boolean drop(TmfTraceElement sourceTrace,
287 TmfTraceFolder traceFolder,
288 int operation) {
289
290 IResource sourceResource = sourceTrace.getResource();
291 IResource targetResource = drop(sourceResource, traceFolder, operation);
292
293 if (targetResource != null) {
294 IFolder destinationSupplementaryFolder = traceFolder.getTraceSupplementaryFolder(targetResource.getName());
295 sourceTrace.copySupplementaryFolder(destinationSupplementaryFolder);
296 return true;
297 }
298 return false;
299 }
300
301 /**
302 * Drop a trace by copying/linking a resource in a trace folder
303 *
304 * @param sourceResource the source resource
305 * @param traceFolder the target trace folder
306 * @param operation the drop operation (DND.DROP_COPY | DND.DROP_LINK)
307 * @return the target resource or null if unsuccessful
308 */
309 private static IResource drop(IResource sourceResource,
310 TmfTraceFolder traceFolder,
311 int operation) {
312
313 if (sourceResource.getProject().equals(traceFolder.getResource().getProject())) {
314 return null;
315 }
316 String targetName = sourceResource.getName();
317 for (TmfTraceElement trace : traceFolder.getTraces()) {
318 if (trace.getName().equals(targetName)) {
319 targetName = promptRename(trace);
320 if (targetName == null) {
321 return null;
322 }
323 break;
324 }
325 }
326 try {
327 if (operation == DND.DROP_COPY) {
328 IPath destination = traceFolder.getResource().getFullPath().addTrailingSeparator().append(targetName);
329 sourceResource.copy(destination, false, null);
330 cleanupBookmarks(destination);
331 } else {
332 createLink(traceFolder.getResource(), sourceResource, targetName);
333 }
334 return traceFolder.getResource().findMember(targetName);
335 } catch (CoreException e) {
336 displayException(e);
337 }
338 return null;
339 }
340
341 /**
342 * Drop a trace by importing/linking a path in a target experiment
343 *
344 * @param path the source path
345 * @param targetExperiment the target experiment
346 * @param operation the drop operation (DND.DROP_COPY | DND.DROP_LINK)
347 * @return true if successful
348 */
349 private static boolean drop(Path path,
350 TmfExperimentElement targetExperiment,
351 int operation) {
352
353 // Use local variable to avoid parameter assignment
354 Path pathToUse = path;
355
356 for (TmfTraceElement trace : targetExperiment.getTraces()) {
357 if (trace.getName().equals(pathToUse.lastSegment()) && pathToUse.toString().startsWith(targetExperiment.getProject().getResource().getLocation().toString())) {
358 return false;
359 }
360 }
361 if (!pathToUse.toString().startsWith(targetExperiment.getProject().getResource().getLocation().toString())) {
362 String targetName = pathToUse.lastSegment();
363 for (TmfTraceElement trace : targetExperiment.getProject().getTracesFolder().getTraces()) {
364 if (trace.getName().equals(targetName)) {
365 targetName = promptRename(trace);
366 if (targetName == null) {
367 return false;
368 }
369 break;
370 }
371 }
372 if (operation == DND.DROP_COPY) {
373 importTrace(targetExperiment.getProject().getTracesFolder().getResource(), pathToUse, targetName);
374 } else {
375 createLink(targetExperiment.getProject().getTracesFolder().getResource(), pathToUse, targetName);
376 }
377 // use the copied resource for the experiment
378 IResource resource = null;
379 File file = new File(pathToUse.toString());
380 if (file.exists() && file.isFile()) {
381 resource = targetExperiment.getProject().getTracesFolder().getResource().getFile(targetName);
382 } else if (file.exists() && file.isDirectory()) {
383 resource = targetExperiment.getProject().getTracesFolder().getResource().getFolder(targetName);
384 }
385 if (resource != null && resource.exists()) {
386 createLink(targetExperiment.getResource(), resource, resource.getName());
387 return true;
388 }
389 }
390 return false;
391 }
392
393 /**
394 * Drop a trace by importing/linking a path in a trace folder
395 *
396 * @param path the source path
397 * @param traceFolder the target trace folder
398 * @param operation the drop operation (DND.DROP_COPY | DND.DROP_LINK)
399 * @return true if successful
400 */
401 private static boolean drop(Path path,
402 TmfTraceFolder traceFolder,
403 int operation) {
404
405 String targetName = path.lastSegment();
406 for (TmfTraceElement trace : traceFolder.getTraces()) {
407 if (trace.getName().equals(targetName)) {
408 targetName = promptRename(trace);
409 if (targetName == null) {
410 return false;
411 }
412 break;
413 }
414 }
415 if (operation == DND.DROP_COPY) {
416 importTrace(traceFolder.getResource(), path, targetName);
417 } else {
418 createLink(traceFolder.getResource(), path, targetName);
419 }
420 return true;
421 }
422
423 /**
424 * Import a trace to the trace folder
425 *
426 * @param folder the trace folder resource
427 * @param path the path to the trace to import
428 * @param targetName the target name
429 */
430 private static void importTrace(final IFolder folder, final Path path, final String targetName) {
431 final File source = new File(path.toString());
432 if (source.isDirectory()) {
433 IPath containerPath = folder.getFullPath().addTrailingSeparator().append(targetName);
434 IOverwriteQuery overwriteImplementor = new IOverwriteQuery() {
435 @Override
436 public String queryOverwrite(String pathString) {
437 return IOverwriteQuery.NO_ALL;
438 }
439 };
440 List<File> filesToImport = Arrays.asList(source.listFiles());
441 ImportOperation operation = new ImportOperation(
442 containerPath,
443 source,
444 FileSystemStructureProvider.INSTANCE,
445 overwriteImplementor,
446 filesToImport);
447 operation.setCreateContainerStructure(false);
448 try {
449 operation.run(new NullProgressMonitor());
450 } catch (InvocationTargetException e) {
451 displayException(e);
452 } catch (InterruptedException e) {
453 displayException(e);
454 }
455 } else {
456 IRunnableWithProgress runnable = new IRunnableWithProgress() {
457 @Override
458 public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
459 try {
460 InputStream inputStream = new FileInputStream(source);
461 IFile targetFile = folder.getFile(targetName);
462 targetFile.create(inputStream, IResource.NONE, monitor);
463 } catch (CoreException e) {
464 displayException(e);
465 } catch (FileNotFoundException e) {
466 displayException(e);
467 }
468 }
469 };
470 WorkspaceModifyDelegatingOperation operation = new WorkspaceModifyDelegatingOperation(runnable);
471 try {
472 operation.run(new NullProgressMonitor());
473 } catch (InvocationTargetException e) {
474 displayException(e);
475 } catch (InterruptedException e) {
476 displayException(e);
477 }
478 }
479 }
480
481 /**
482 * Create a link to the actual trace and set the trace type
483 *
484 * @param parentFolder the parent folder
485 * @param resource the resource
486 * @param targetName the target name
487 */
488 private static void createLink(IFolder parentFolder, IResource resource, String targetName) {
489 IPath location = resource.getLocation();
490 IWorkspace workspace = ResourcesPlugin.getWorkspace();
491 try {
492 Map<QualifiedName, String> properties = resource.getPersistentProperties();
493 String bundleName = properties.get(TmfCommonConstants.TRACEBUNDLE);
494 String traceType = properties.get(TmfCommonConstants.TRACETYPE);
495 String iconUrl = properties.get(TmfCommonConstants.TRACEICON);
496 String supplFolder = properties.get(TmfCommonConstants.TRACE_SUPPLEMENTARY_FOLDER);
497
498 if (resource instanceof IFolder) {
499 IFolder folder = parentFolder.getFolder(targetName);
500 if (workspace.validateLinkLocation(folder, location).isOK()) {
501 folder.createLink(location, IResource.REPLACE, null);
502 setProperties(folder, bundleName, traceType, iconUrl, supplFolder);
503
504 } else {
505 Activator.getDefault().logError("Invalid Trace Location"); //$NON-NLS-1$
506 }
507 } else {
508 IFile file = parentFolder.getFile(targetName);
509 if (workspace.validateLinkLocation(file, location).isOK()) {
510 file.createLink(location, IResource.REPLACE, null);
511 setProperties(file, bundleName, traceType, iconUrl, supplFolder);
512 } else {
513 Activator.getDefault().logError("Invalid Trace Location"); //$NON-NLS-1$
514 }
515 }
516 } catch (CoreException e) {
517 displayException(e);
518 }
519 }
520
521 /**
522 * Create a link to a file or folder
523 *
524 * @param parentFolder the parent folder
525 * @param source the file or folder
526 * @param targetName the target name
527 */
528 private static void createLink(IFolder parentFolder, IPath location, String targetName) {
529 File source = new File(location.toString());
530 IWorkspace workspace = ResourcesPlugin.getWorkspace();
531 try {
532
533 if (source.isDirectory()) {
534 IFolder folder = parentFolder.getFolder(targetName);
535 if (workspace.validateLinkLocation(folder, location).isOK()) {
536 folder.createLink(location, IResource.REPLACE, null);
537 } else {
538 Activator.getDefault().logError("Invalid Trace Location"); //$NON-NLS-1$
539 }
540 } else {
541 IFile file = parentFolder.getFile(targetName);
542 if (workspace.validateLinkLocation(file, location).isOK()) {
543 file.createLink(location, IResource.REPLACE, null);
544 } else {
545 Activator.getDefault().logError("Invalid Trace Location"); //$NON-NLS-1$
546 }
547 }
548 } catch (CoreException e) {
549 displayException(e);
550 }
551 }
552
553 /**
554 * Prompts the user to rename a trace
555 *
556 * @param trace the existing trace
557 * @return the new name to use or null if rename is canceled
558 */
559 private static String promptRename(TmfTraceElement trace) {
560 MessageBox mb = new MessageBox(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.ICON_QUESTION | SWT.CANCEL | SWT.OK);
561 mb.setText(Messages.DropAdapterAssistant_RenameTraceTitle);
562 mb.setMessage(NLS.bind(Messages.DropAdapterAssistant_RenameTraceMessage, trace.getName()));
563 if (mb.open() != SWT.OK) {
564 return null;
565 }
566 IFolder folder = trace.getProject().getTracesFolder().getResource();
567 int i = 2;
568 while (true) {
569 String name = trace.getName() + '-' + Integer.toString(i++);
570 IResource resource = folder.findMember(name);
571 if (resource == null) {
572 return name;
573 }
574 }
575 }
576
577 /**
578 * Cleanup bookmarks file in copied trace
579 */
580 private static void cleanupBookmarks(IPath path) {
581 IFolder folder = ResourcesPlugin.getWorkspace().getRoot().getFolder(path);
582 if (folder.exists()) {
583 try {
584 for (IResource member : folder.members()) {
585 if (TmfTrace.class.getCanonicalName().equals(member.getPersistentProperty(TmfCommonConstants.TRACETYPE))) {
586 member.delete(true, null);
587 }
588 }
589 } catch (CoreException e) {
590 displayException(e);
591 }
592 }
593 }
594
595 /**
596 * Set the trace persistent properties
597 *
598 * @param resource the trace resource
599 * @param bundleName the bundle name
600 * @param traceType the trace type
601 * @param iconUrl the icon URL
602 * @param supplFolder the directory of the directory for supplementary information or null to ignore the property
603 * @throws CoreException
604 */
605 private static void setProperties(IResource resource, String bundleName,
606 String traceType, String iconUrl, String supplFolder)
607 throws CoreException {
608 resource.setPersistentProperty(TmfCommonConstants.TRACEBUNDLE, bundleName);
609 resource.setPersistentProperty(TmfCommonConstants.TRACETYPE, traceType);
610 resource.setPersistentProperty(TmfCommonConstants.TRACEICON, iconUrl);
611 resource.setPersistentProperty(TmfCommonConstants.TRACE_SUPPLEMENTARY_FOLDER, supplFolder);
612 }
613
614 /**
615 * Display an exception in a message box
616 *
617 * @param e the exception
618 */
619 private static void displayException(Exception e) {
620 MessageBox mb = new MessageBox(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
621 mb.setText(e.getClass().getName());
622 mb.setMessage(e.getMessage());
623 mb.open();
624 }
625
626 }
This page took 0.047024 seconds and 6 git commands to generate.