View | Details | Raw Unified | Return to bug 218630 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskExportAction.java (-2 / +12 lines)
Lines 87-93 Link Here
87
			dialog.setFilterExtensions(new String[] { "*" + ITasksUiConstants.FILE_EXTENSION });
87
			dialog.setFilterExtensions(new String[] { "*" + ITasksUiConstants.FILE_EXTENSION });
88
88
89
			AbstractTask task = tasks.get(0);
89
			AbstractTask task = tasks.get(0);
90
			dialog.setFileName(encodeName(task) + ITasksUiConstants.FILE_EXTENSION);
90
			String fileName = task.getSummary();
91
92
			if (fileName.length() > 50) {
93
				fileName = fileName.substring(0, 50);
94
			}
95
96
			try {
97
				fileName = URLEncoder.encode(fileName, ITasksUiConstants.FILENAME_ENCODING);
98
			} catch (UnsupportedEncodingException e) {
99
			}
100
101
			dialog.setFileName(fileName + ITasksUiConstants.FILE_EXTENSION);
91
			String path = dialog.open();
102
			String path = dialog.open();
92
103
93
			if (path != null) {
104
			if (path != null) {
Lines 97-103 Link Here
97
							"Could not export task because specified location is a folder");
108
							"Could not export task because specified location is a folder");
98
					return;
109
					return;
99
				}
110
				}
100
101
				taskFiles.put(task, file);
111
				taskFiles.put(task, file);
102
			}
112
			}
103
		} else {
113
		} else {
(-)src/org/eclipse/mylyn/tasks/ui/editors/TaskFormPage.java (+25 lines)
Lines 100-105 Link Here
100
100
101
	private IHandlerActivation handlerActivation;
101
	private IHandlerActivation handlerActivation;
102
102
103
	private IHandlerActivation handlerCompletion;
104
	
103
	private void addTextViewer(TextViewer viewer) {
105
	private void addTextViewer(TextViewer viewer) {
104
		textViewers.add(viewer);
106
		textViewers.add(viewer);
105
	}
107
	}
Lines 382-387 Link Here
382
							createQuickFixActionHandler(commentViewer), new ActiveShellExpression(
384
							createQuickFixActionHandler(commentViewer), new ActiveShellExpression(
383
									commentViewer.getTextWidget().getShell()));
385
									commentViewer.getTextWidget().getShell()));
384
				}
386
				}
387
				if (handlerCompletion == null) {
388
					handlerCompletion = handlerService.activateHandler(
389
							ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS, //
390
							createContentAssistActionHandler(commentViewer), //
391
									new ActiveShellExpression(commentViewer.getTextWidget().getShell()));
392
				}
385
			}
393
			}
386
394
387
			private void deactivate() {
395
			private void deactivate() {
Lines 389-394 Link Here
389
					handlerService.deactivateHandler(handlerActivation);
397
					handlerService.deactivateHandler(handlerActivation);
390
					handlerActivation = null;
398
					handlerActivation = null;
391
				}
399
				}
400
				if (handlerCompletion != null) {
401
					handlerService.deactivateHandler(handlerCompletion);
402
					handlerCompletion = null;
403
				}
392
			}
404
			}
393
		});
405
		});
394
 
406
 
Lines 446-451 Link Here
446
		return new ActionHandler(quickFixAction);
458
		return new ActionHandler(quickFixAction);
447
	}
459
	}
448
460
461
462
	private IHandler createContentAssistActionHandler(final SourceViewer viewer) {
463
		Action quickFixAction = new Action() {
464
			public void run() {
465
				if (viewer.canDoOperation(ISourceViewer.CONTENTASSIST_PROPOSALS)) {
466
					viewer.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS);
467
				}
468
			}
469
		};
470
		quickFixAction.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
471
		return new ActionHandler(quickFixAction);
472
	}
473
449
	@Override
474
	@Override
450
	public boolean isDirty() {
475
	public boolean isDirty() {
451
		return isDirty;
476
		return isDirty;

Return to bug 218630