1 11 package org.eclipse.ui.wizards.datatransfer; 12 13 14 import java.io.File; 15 import java.lang.reflect.InvocationTargetException; 16 import java.util.ArrayList; 17 import java.util.Collection; 18 import java.util.Hashtable; 19 import java.util.Iterator; 20 import java.util.List; 21 import java.util.Map; 22 import org.eclipse.core.resources.IContainer; 23 import org.eclipse.core.runtime.IPath; 24 import org.eclipse.core.runtime.IProgressMonitor; 25 import org.eclipse.core.runtime.IStatus; 26 import org.eclipse.core.runtime.Path; 27 import org.eclipse.jface.dialogs.ErrorDialog; 28 import org.eclipse.jface.dialogs.IDialogConstants; 29 import org.eclipse.jface.dialogs.IDialogSettings; 30 import org.eclipse.jface.dialogs.MessageDialog; 31 import org.eclipse.jface.dialogs.ProgressMonitorDialog; 32 import org.eclipse.jface.operation.IRunnableWithProgress; 33 import org.eclipse.jface.viewers.IStructuredSelection; 34 import org.eclipse.jface.viewers.ITreeContentProvider; 35 import org.eclipse.swt.SWT; 36 import org.eclipse.swt.custom.BusyIndicator; 37 import org.eclipse.swt.events.FocusEvent; 38 import org.eclipse.swt.events.FocusListener; 39 import org.eclipse.swt.events.KeyEvent; 40 import org.eclipse.swt.events.KeyListener; 41 import org.eclipse.swt.events.SelectionAdapter; 42 import org.eclipse.swt.events.SelectionEvent; 43 import org.eclipse.swt.events.SelectionListener; 44 import org.eclipse.swt.layout.GridData; 45 import org.eclipse.swt.layout.GridLayout; 46 import org.eclipse.swt.widgets.Button; 47 import org.eclipse.swt.widgets.Combo; 48 import org.eclipse.swt.widgets.Composite; 49 import org.eclipse.swt.widgets.DirectoryDialog; 50 import org.eclipse.swt.widgets.Event; 51 import org.eclipse.swt.widgets.Group; 52 import org.eclipse.swt.widgets.Label; 53 import org.eclipse.swt.widgets.Listener; 54 import org.eclipse.swt.widgets.Shell; 55 import org.eclipse.ui.IWorkbench; 56 import org.eclipse.ui.dialogs.FileSystemElement; 57 import org.eclipse.ui.dialogs.WizardResourceImportPage; 58 import org.eclipse.ui.help.WorkbenchHelp; 59 import org.eclipse.ui.internal.ide.dialogs.IElementFilter; 60 import org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog; 61 import org.eclipse.ui.model.WorkbenchContentProvider; 62 63 66 67 class WizardFileSystemResourceImportPage1 68 extends WizardResourceImportPage 69 implements Listener { 70 protected Combo sourceNameField; 72 protected Button overwriteExistingResourcesCheckbox; 73 protected Button createContainerStructureButton; 74 protected Button createOnlySelectedButton; 75 protected Button sourceBrowseButton; 76 protected Button selectTypesButton; 77 protected Button selectAllButton; 78 protected Button deselectAllButton; 79 private boolean entryChanged = false; 81 82 private final static String STORE_SOURCE_NAMES_ID = 84 "WizardFileSystemResourceImportPage1.STORE_SOURCE_NAMES_ID"; private final static String STORE_OVERWRITE_EXISTING_RESOURCES_ID = 86 "WizardFileSystemResourceImportPage1.STORE_OVERWRITE_EXISTING_RESOURCES_ID"; private final static String STORE_CREATE_CONTAINER_STRUCTURE_ID = 88 "WizardFileSystemResourceImportPage1.STORE_CREATE_CONTAINER_STRUCTURE_ID"; 90 private static final String SELECT_TYPES_TITLE = DataTransferMessages.getString("DataTransfer.selectTypes"); private static final String SELECT_ALL_TITLE = DataTransferMessages.getString("DataTransfer.selectAll"); private static final String DESELECT_ALL_TITLE = DataTransferMessages.getString("DataTransfer.deselectAll"); private static final String SELECT_SOURCE_TITLE = 94 DataTransferMessages.getString("FileImport.selectSourceTitle"); private static final String SELECT_SOURCE_MESSAGE = 96 DataTransferMessages.getString("FileImport.selectSource"); protected static final String SOURCE_EMPTY_MESSAGE = DataTransferMessages.getString("FileImport.sourceEmpty"); 101 protected WizardFileSystemResourceImportPage1(String name, IWorkbench aWorkbench, IStructuredSelection selection) { 102 super(name,selection); 103 } 104 110 public WizardFileSystemResourceImportPage1(IWorkbench aWorkbench, IStructuredSelection selection) { 111 this("fileSystemImportPage1", aWorkbench, selection); setTitle(DataTransferMessages.getString("DataTransfer.fileSystemTitle")); setDescription(DataTransferMessages.getString("FileImport.importFileSystem")); } 115 136 protected Button createButton(Composite parent, int id, String label, boolean defaultButton) { 137 ((GridLayout)parent.getLayout()).numColumns++; 139 140 Button button = new Button(parent, SWT.PUSH ); 141 button.setFont(parent.getFont()); 142 143 GridData buttonData = new GridData(GridData.FILL_HORIZONTAL); 144 button.setLayoutData(buttonData); 145 146 button.setData(new Integer(id)); 147 button.setText(label); 148 149 if (defaultButton) { 150 Shell shell = parent.getShell(); 151 if (shell != null) { 152 shell.setDefaultButton(button); 153 } 154 button.setFocus(); 155 } 156 return button; 157 } 158 164 protected final void createButtonsGroup(Composite parent) { 165 Composite buttonComposite = new Composite(parent, SWT.NONE); 167 GridLayout layout = new GridLayout(); 168 layout.numColumns = 3; 169 layout.makeColumnsEqualWidth = true; 170 buttonComposite.setLayout(layout); 171 buttonComposite.setFont(parent.getFont()); 172 GridData buttonData = 173 new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL); 174 buttonData.horizontalSpan = 2; 175 buttonComposite.setLayoutData(buttonData); 176 177 selectTypesButton = 179 createButton( 180 buttonComposite, 181 IDialogConstants.SELECT_TYPES_ID, 182 SELECT_TYPES_TITLE, 183 false); 184 185 186 SelectionListener listener = new SelectionAdapter() { 187 public void widgetSelected(SelectionEvent e) { 188 handleTypesEditButtonPressed(); 189 } 190 }; 191 selectTypesButton.addSelectionListener(listener); 192 setButtonLayoutData(selectTypesButton); 193 194 selectAllButton = 195 createButton( 196 buttonComposite, 197 IDialogConstants.SELECT_ALL_ID, 198 SELECT_ALL_TITLE, 199 false); 200 201 listener = new SelectionAdapter() { 202 public void widgetSelected(SelectionEvent e) { 203 setAllSelections(true); 204 } 205 }; 206 selectAllButton.addSelectionListener(listener); 207 setButtonLayoutData(selectAllButton); 208 209 deselectAllButton = 210 createButton( 211 buttonComposite, 212 IDialogConstants.DESELECT_ALL_ID, 213 DESELECT_ALL_TITLE, 214 false); 215 216 listener = new SelectionAdapter() { 217 public void widgetSelected(SelectionEvent e) { 218 setAllSelections(false); 219 } 220 }; 221 deselectAllButton.addSelectionListener(listener); 222 setButtonLayoutData(deselectAllButton); 223 224 } 225 228 public void createControl(Composite parent) { 229 super.createControl(parent); 230 validateSourceGroup(); 231 WorkbenchHelp.setHelp(getControl(), IDataTransferHelpContextIds.FILE_SYSTEM_IMPORT_WIZARD_PAGE); 232 } 233 236 protected void createOptionsGroupButtons(Group optionsGroup) { 237 238 overwriteExistingResourcesCheckbox = new Button(optionsGroup, SWT.CHECK); 240 overwriteExistingResourcesCheckbox.setFont(optionsGroup.getFont()); 241 overwriteExistingResourcesCheckbox.setText( 242 DataTransferMessages.getString("FileImport.overwriteExisting")); 244 createContainerStructureButton = new Button(optionsGroup, SWT.RADIO); 246 createContainerStructureButton.setFont(optionsGroup.getFont()); 247 createContainerStructureButton.setText( 248 DataTransferMessages.getString("FileImport.createComplete")); createContainerStructureButton.setSelection(false); 250 251 createOnlySelectedButton = new Button(optionsGroup, SWT.RADIO); 253 createOnlySelectedButton.setFont(optionsGroup.getFont()); 254 createOnlySelectedButton.setText( 255 DataTransferMessages.getString("FileImport.createSelectedFolders")); createOnlySelectedButton.setSelection(true); 257 258 259 } 260 263 protected void createRootDirectoryGroup(Composite parent) { 264 Composite sourceContainerGroup = new Composite(parent, SWT.NONE); 265 GridLayout layout = new GridLayout(); 266 layout.numColumns = 3; 267 sourceContainerGroup.setLayout(layout); 268 sourceContainerGroup.setFont(parent.getFont()); 269 sourceContainerGroup.setLayoutData( 270 new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL)); 271 272 Label groupLabel = new Label(sourceContainerGroup, SWT.NONE); 273 groupLabel.setText(getSourceLabel()); 274 groupLabel.setFont(parent.getFont()); 275 276 sourceNameField = new Combo(sourceContainerGroup, SWT.BORDER); 278 GridData data = 279 new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL); 280 data.widthHint = SIZING_TEXT_FIELD_WIDTH; 281 sourceNameField.setLayoutData(data); 282 sourceNameField.setFont(parent.getFont()); 283 284 sourceNameField.addSelectionListener(new SelectionAdapter() { 285 public void widgetSelected(SelectionEvent e) { 286 updateFromSourceField(); 287 } 288 }); 289 290 291 sourceNameField.addKeyListener(new KeyListener(){ 292 295 public void keyPressed(KeyEvent e){ 296 entryChanged = true; 298 } 299 300 303 public void keyReleased(KeyEvent e){} 304 }); 305 306 sourceNameField.addFocusListener(new FocusListener(){ 307 310 public void focusGained(FocusEvent e){ 311 } 313 314 317 public void focusLost(FocusEvent e){ 318 if(entryChanged){ 320 entryChanged = false; 321 updateFromSourceField(); 322 } 323 324 } 325 }); 326 327 sourceBrowseButton = new Button(sourceContainerGroup, SWT.PUSH); 329 sourceBrowseButton.setText(DataTransferMessages.getString("DataTransfer.browse")); sourceBrowseButton.addListener(SWT.Selection, this); 331 sourceBrowseButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL)); 332 sourceBrowseButton.setFont(parent.getFont()); 333 setButtonLayoutData(sourceBrowseButton); 334 } 335 336 339 340 private void updateFromSourceField(){ 341 342 setSourceName(sourceNameField.getText()); 343 updateWidgetEnablements(); 345 } 346 347 352 protected MinimizedFileSystemElement createRootElement( 353 Object fileSystemObject, 354 IImportStructureProvider provider) { 355 boolean isContainer = provider.isFolder(fileSystemObject); 356 String elementLabel = provider.getLabel(fileSystemObject); 357 358 MinimizedFileSystemElement dummyParent = 361 new MinimizedFileSystemElement("", null, true); dummyParent.setPopulated(); 363 MinimizedFileSystemElement result = 364 new MinimizedFileSystemElement(elementLabel, dummyParent, isContainer); 365 result.setFileSystemObject(fileSystemObject); 366 367 result.getFiles(provider); 369 370 return dummyParent; 371 } 372 375 protected void createSourceGroup(Composite parent) { 376 377 createRootDirectoryGroup(parent); 378 createFileSelectionGroup(parent); 379 createButtonsGroup(parent); 380 } 381 384 protected void enableButtonGroup(boolean enable) { 385 selectTypesButton.setEnabled(enable); 386 selectAllButton.setEnabled(enable); 387 deselectAllButton.setEnabled(enable); 388 } 389 393 protected boolean ensureSourceIsValid() { 394 if (new File(getSourceDirectoryName()).isDirectory()) 395 return true; 396 397 displayErrorDialog(DataTransferMessages.getString("FileImport.invalidSource")); sourceNameField.setFocus(); 399 return false; 400 } 401 404 protected boolean executeImportOperation(ImportOperation op) { 405 initializeOperation(op); 406 407 try { 408 getContainer().run(true, true, op); 409 } catch (InterruptedException e) { 410 return false; 411 } catch (InvocationTargetException e) { 412 displayErrorDialog(e.getTargetException()); 413 return false; 414 } 415 416 IStatus status = op.getStatus(); 417 if (!status.isOK()) { 418 ErrorDialog.openError(getContainer().getShell(), 419 DataTransferMessages.getString("FileImport.importProblems"), null, status); 422 return false; 423 } 424 425 return true; 426 } 427 434 public boolean finish() { 435 if (!ensureSourceIsValid()) 436 return false; 437 438 saveWidgetValues(); 439 440 Iterator resourcesEnum = getSelectedResources().iterator(); 441 List fileSystemObjects = new ArrayList(); 442 while (resourcesEnum.hasNext()) { 443 fileSystemObjects.add( 444 ((FileSystemElement) resourcesEnum.next()).getFileSystemObject()); 445 } 446 447 if (fileSystemObjects.size() > 0) 448 return importResources(fileSystemObjects); 449 450 MessageDialog 451 .openInformation( 452 getContainer().getShell(), 453 DataTransferMessages.getString("DataTransfer.information"), DataTransferMessages.getString("FileImport.noneSelected")); 456 return false; 457 } 458 462 protected ITreeContentProvider getFileProvider() { 463 return new WorkbenchContentProvider() { 464 public Object[] getChildren(Object o) { 465 if (o instanceof MinimizedFileSystemElement) { 466 MinimizedFileSystemElement element = (MinimizedFileSystemElement) o; 467 return element.getFiles(FileSystemStructureProvider.INSTANCE).getChildren( 468 element); 469 } 470 return new Object[0]; 471 } 472 }; 473 } 474 479 protected MinimizedFileSystemElement getFileSystemTree() { 480 481 File sourceDirectory = getSourceDirectory(); 482 if (sourceDirectory == null) 483 return null; 484 485 return selectFiles(sourceDirectory, FileSystemStructureProvider.INSTANCE); 486 } 487 491 protected ITreeContentProvider getFolderProvider() { 492 return new WorkbenchContentProvider() { 493 public Object[] getChildren(Object o) { 494 if (o instanceof MinimizedFileSystemElement) { 495 MinimizedFileSystemElement element = (MinimizedFileSystemElement) o; 496 return element.getFolders(FileSystemStructureProvider.INSTANCE).getChildren( 497 element); 498 } 499 return new Object[0]; 500 } 501 public boolean hasChildren(Object o) { 502 if (o instanceof MinimizedFileSystemElement) { 503 MinimizedFileSystemElement element = (MinimizedFileSystemElement) o; 504 if (element.isPopulated()) 505 return getChildren(element).length > 0; 506 else { 507 return true; 509 } 510 } 511 return false; 512 } 513 }; 514 } 515 516 520 protected File getSourceDirectory() { 521 return getSourceDirectory(this.sourceNameField.getText()); 522 } 523 529 private File getSourceDirectory(String path) { 530 File sourceDirectory = new File(getSourceDirectoryName(path)); 531 if (!sourceDirectory.exists() || !sourceDirectory.isDirectory()) { 532 return null; 533 } 534 535 return sourceDirectory; 536 } 537 542 private String getSourceDirectoryName() { 543 return getSourceDirectoryName(this.sourceNameField.getText()); 544 } 545 550 private String getSourceDirectoryName(String sourceName) { 551 IPath result = new Path(sourceName.trim()); 552 553 if (result.getDevice() != null && result.segmentCount() == 0) result = result.addTrailingSeparator(); 555 else 556 result = result.removeTrailingSeparator(); 557 558 return result.toOSString(); 559 } 560 563 protected String getSourceLabel() { 564 return DataTransferMessages.getString("FileImport.fromDirectory"); } 566 571 public void handleEvent(Event event) { 572 if (event.widget == sourceBrowseButton) 573 handleSourceBrowseButtonPressed(); 574 575 super.handleEvent(event); 576 } 577 581 protected void handleSourceBrowseButtonPressed() { 582 583 String currentSource = this.sourceNameField.getText(); 584 DirectoryDialog dialog = 585 new DirectoryDialog(sourceNameField.getShell(), SWT.SAVE); 586 dialog.setText(SELECT_SOURCE_TITLE); 587 dialog.setMessage(SELECT_SOURCE_MESSAGE); 588 dialog.setFilterPath(getSourceDirectoryName(currentSource)); 589 590 String selectedDirectory = dialog.open(); 591 if (selectedDirectory != null) { 592 if ((getSourceDirectory(selectedDirectory) == null) 594 || selectedDirectory.equals(currentSource)) 595 return; 596 else { setErrorMessage(null); 598 setSourceName(selectedDirectory); 599 selectionGroup.setFocus(); 600 } 601 } 602 } 603 608 protected void handleTypesEditButtonPressed() { 609 610 super.handleTypesEditButtonPressed(); 611 } 612 615 protected boolean importResources(List fileSystemObjects) { 616 ImportOperation operation = new ImportOperation( 617 getContainerFullPath(), 618 getSourceDirectory(), 619 FileSystemStructureProvider.INSTANCE, 620 this, 621 fileSystemObjects); 622 623 operation.setContext(getShell()); 624 return executeImportOperation(operation); 625 } 626 629 protected void initializeOperation(ImportOperation op) { 630 op.setCreateContainerStructure(createContainerStructureButton.getSelection()); 631 op.setOverwriteResources(overwriteExistingResourcesCheckbox.getSelection()); 632 } 633 641 protected boolean isExportableExtension(String extension) { 642 if (selectedTypes == null) return true; 644 645 Iterator enum = selectedTypes.iterator(); 646 while (enum.hasNext()) { 647 if (extension.equalsIgnoreCase((String)enum.next())) 648 return true; 649 } 650 651 return false; 652 } 653 656 protected void resetSelection() { 657 658 MinimizedFileSystemElement currentRoot = getFileSystemTree(); 659 this.selectionGroup.setRoot(currentRoot); 660 661 662 } 663 667 protected void restoreWidgetValues() { 668 IDialogSettings settings = getDialogSettings(); 669 if (settings != null) { 670 String[] sourceNames = settings.getArray(STORE_SOURCE_NAMES_ID); 671 if (sourceNames == null) 672 return; 674 for (int i = 0; i < sourceNames.length; i++) 676 sourceNameField.add(sourceNames[i]); 677 678 overwriteExistingResourcesCheckbox.setSelection( 680 settings.getBoolean(STORE_OVERWRITE_EXISTING_RESOURCES_ID)); 681 682 boolean createStructure = 683 settings.getBoolean(STORE_CREATE_CONTAINER_STRUCTURE_ID); 684 createContainerStructureButton.setSelection(createStructure); 685 createOnlySelectedButton.setSelection(!createStructure); 686 687 } 688 } 689 693 protected void saveWidgetValues() { 694 IDialogSettings settings = getDialogSettings(); 695 if (settings != null) { 696 String[] sourceNames = settings.getArray(STORE_SOURCE_NAMES_ID); 698 if (sourceNames == null) 699 sourceNames = new String[0]; 700 701 sourceNames = addToHistory(sourceNames, getSourceDirectoryName()); 702 settings.put(STORE_SOURCE_NAMES_ID, sourceNames); 703 704 settings.put( 706 STORE_OVERWRITE_EXISTING_RESOURCES_ID, 707 overwriteExistingResourcesCheckbox.getSelection()); 708 709 settings.put( 710 STORE_CREATE_CONTAINER_STRUCTURE_ID, 711 createContainerStructureButton.getSelection()); 712 713 } 714 } 715 720 protected MinimizedFileSystemElement selectFiles( 721 final Object rootFileSystemObject, 722 final IImportStructureProvider structureProvider) { 723 724 final MinimizedFileSystemElement[] results = new MinimizedFileSystemElement[1]; 725 726 BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() { 727 public void run() { 728 results[0] = createRootElement(rootFileSystemObject, structureProvider); 730 } 731 }); 732 733 return results[0]; 734 } 735 740 protected void setAllSelections(boolean value) { 741 super.setAllSelections(value); 742 } 743 750 protected void setSourceName(String path) { 751 752 if (path.length() > 0) { 753 754 String[] currentItems = this.sourceNameField.getItems(); 755 int selectionIndex = -1; 756 for (int i = 0; i < currentItems.length; i++) { 757 if (currentItems[i].equals(path)) 758 selectionIndex = i; 759 } 760 if (selectionIndex < 0) { 761 int oldLength = currentItems.length; 762 String[] newItems = new String[oldLength + 1]; 763 System.arraycopy(currentItems, 0, newItems, 0, oldLength); 764 newItems[oldLength] = path; 765 this.sourceNameField.setItems(newItems); 766 selectionIndex = oldLength; 767 } 768 this.sourceNameField.select(selectionIndex); 769 770 resetSelection(); 771 } 772 } 773 776 protected void setupSelectionsBasedOnSelectedTypes() { 777 ProgressMonitorDialog dialog = new ProgressMonitorJobsDialog(getContainer().getShell()); 778 final Map selectionMap = new Hashtable(); 779 780 final IElementFilter filter = new IElementFilter() { 781 782 public void filterElements(Collection files,IProgressMonitor monitor) throws InterruptedException{ 783 if(files == null){ 784 throw new InterruptedException(); 785 } 786 Iterator filesList = files.iterator(); 787 while (filesList.hasNext()) { 788 if(monitor.isCanceled()) 789 throw new InterruptedException(); 790 checkFile(filesList.next()); 791 } 792 } 793 794 public void filterElements(Object[] files,IProgressMonitor monitor) throws InterruptedException{ 795 if(files == null){ 796 throw new InterruptedException(); 797 } 798 for(int i =0; i < files.length; i ++){ 799 if(monitor.isCanceled()) 800 throw new InterruptedException(); 801 checkFile(files[i]); 802 } 803 } 804 805 private void checkFile(Object fileElement){ 806 MinimizedFileSystemElement file = (MinimizedFileSystemElement) fileElement; 807 if (isExportableExtension(file.getFileNameExtension())) { 808 List elements = new ArrayList(); 809 FileSystemElement parent = file.getParent(); 810 if (selectionMap.containsKey(parent)) 811 elements = (List) selectionMap.get(parent); 812 elements.add(file); 813 selectionMap.put(parent, elements); 814 } 815 } 816 817 }; 818 819 IRunnableWithProgress runnable = new IRunnableWithProgress() { 820 public void run(final IProgressMonitor monitor) throws InterruptedException{ 821 monitor.beginTask(DataTransferMessages.getString("ImportPage.filterSelections"), IProgressMonitor.UNKNOWN); getSelectedResources(filter,monitor); 823 } 824 }; 825 826 try{ 827 dialog.run(true,true,runnable); 828 } 829 catch (InvocationTargetException exception){ 830 return; 832 } 833 catch (InterruptedException exception){ 834 return; 836 } 837 getShell().update(); 841 if (selectionMap != null) { 845 updateSelections(selectionMap); 846 } 847 } 848 851 public void setVisible(boolean visible) { 852 super.setVisible(visible); 853 resetSelection(); 854 if(visible) 855 this.sourceNameField.setFocus(); 856 } 857 862 protected void updateSelections(Map map) { 863 super.updateSelections(map); 864 } 865 870 protected void updateWidgetEnablements() { 871 872 super.updateWidgetEnablements(); 873 } 874 878 protected boolean validateSourceGroup() { 879 File sourceDirectory = getSourceDirectory(); 880 if (sourceDirectory == null) { 881 setMessage(SOURCE_EMPTY_MESSAGE); 882 enableButtonGroup(false); 883 return false; 884 } 885 886 if(sourceConflictsWithDestination(new Path(sourceDirectory.getPath()))){ 887 setErrorMessage(getSourceConflictMessage()); enableButtonGroup(false); 889 return false; 890 } 891 892 enableButtonGroup(true); 893 return true; 894 } 895 896 904 protected boolean sourceConflictsWithDestination(IPath sourcePath){ 905 906 IContainer container = getSpecifiedContainer(); 907 if(container == null) 908 return false; 909 else { 910 IPath destinationLocation = getSpecifiedContainer().getLocation(); 911 if (destinationLocation != null) { 912 return destinationLocation.isPrefixOf(sourcePath); 913 } 914 else { 915 return false; 918 } 919 } 920 } 921 922 923 } 924 | Popular Tags |