Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 114322 Details for
Bug 244579
[api] move task editor extension out of the sandbox
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
reimplemented against head
taskEditorExtension.patch (text/plain), 90.02 KB, created by
David Green
on 2008-10-06 11:40:30 EDT
(
hide
)
Description:
reimplemented against head
Filename:
MIME Type:
Creator:
David Green
Created:
2008-10-06 11:40:30 EDT
Size:
90.02 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.wikitext.tracwiki.ui >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/sandbox/org.eclipse.mylyn.wikitext.tracwiki.ui/plugin.xml,v >retrieving revision 1.3 >diff -u -r1.3 plugin.xml >--- plugin.xml 1 Oct 2008 17:42:30 -0000 1.3 >+++ plugin.xml 6 Oct 2008 15:37:55 -0000 >@@ -2,7 +2,7 @@ > <?eclipse version="3.2"?> > <plugin> > <extension >- point="org.eclipse.mylyn.sandbox.ui.taskEditorExtensions"> >+ point="org.eclipse.mylyn.tasks.ui.taskEditorExtensions"> > <taskEditorExtension > class="org.eclipse.mylyn.internal.wikitext.tracwiki.ui.editors.TracWikiTaskEditorExtension" > id="org.eclipse.mylyn.wikitext.tracwiki.ui.taskEditorExtension" >#P org.eclipse.mylyn.wikitext.mediawiki.ui >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/sandbox/org.eclipse.mylyn.wikitext.mediawiki.ui/plugin.xml,v >retrieving revision 1.1 >diff -u -r1.1 plugin.xml >--- plugin.xml 31 Jul 2008 17:58:33 -0000 1.1 >+++ plugin.xml 6 Oct 2008 15:37:55 -0000 >@@ -34,7 +34,7 @@ > </templates> > </extension> > <extension >- point="org.eclipse.mylyn.sandbox.ui.taskEditorExtensions"> >+ point="org.eclipse.mylyn.tasks.ui.taskEditorExtensions"> > <taskEditorExtension > class="org.eclipse.mylyn.internal.wikitext.mediawiki.ui.editors.TaskEditorExtension" > id="org.eclipse.mylyn.internal.wikitext.mediawiki.ui.taskEditorExtension" >#P org.eclipse.mylyn.wikitext.twiki.ui >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/sandbox/org.eclipse.mylyn.wikitext.twiki.ui/plugin.xml,v >retrieving revision 1.4 >diff -u -r1.4 plugin.xml >--- plugin.xml 1 Oct 2008 15:26:25 -0000 1.4 >+++ plugin.xml 6 Oct 2008 15:37:56 -0000 >@@ -2,7 +2,7 @@ > <?eclipse version="3.2"?> > <plugin> > <extension >- point="org.eclipse.mylyn.sandbox.ui.taskEditorExtensions"> >+ point="org.eclipse.mylyn.tasks.ui.taskEditorExtensions"> > <taskEditorExtension > class="org.eclipse.mylyn.internal.wikitext.twiki.ui.TaskEditorExtension" > id="org.eclipse.mylyn.wikitext.twiki.ui.taskEditorExtension1" >#P org.eclipse.mylyn.wikitext.confluence.ui >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/sandbox/org.eclipse.mylyn.wikitext.confluence.ui/plugin.xml,v >retrieving revision 1.3 >diff -u -r1.3 plugin.xml >--- plugin.xml 3 Oct 2008 15:49:36 -0000 1.3 >+++ plugin.xml 6 Oct 2008 15:37:56 -0000 >@@ -2,7 +2,7 @@ > <?eclipse version="3.2"?> > <plugin> > <extension >- point="org.eclipse.mylyn.sandbox.ui.taskEditorExtensions"> >+ point="org.eclipse.mylyn.tasks.ui.taskEditorExtensions"> > <taskEditorExtension > class="org.eclipse.mylyn.internal.wikitext.confluence.ui.editors.TaskEditorExtension" > id="org.eclipse.mylyn.wikitext.confluence.ui.taskEditorExtension" >#P org.eclipse.mylyn.wikitext.ui >Index: src/org/eclipse/mylyn/wikitext/ui/editor/MarkupTaskEditorExtension.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/sandbox/org.eclipse.mylyn.wikitext.ui/src/org/eclipse/mylyn/wikitext/ui/editor/MarkupTaskEditorExtension.java,v >retrieving revision 1.6 >diff -u -r1.6 MarkupTaskEditorExtension.java >--- src/org/eclipse/mylyn/wikitext/ui/editor/MarkupTaskEditorExtension.java 29 Sep 2008 03:28:25 -0000 1.6 >+++ src/org/eclipse/mylyn/wikitext/ui/editor/MarkupTaskEditorExtension.java 6 Oct 2008 15:37:57 -0000 >@@ -28,7 +28,6 @@ > import org.eclipse.jface.text.source.IAnnotationModel; > import org.eclipse.jface.text.source.ISourceViewer; > import org.eclipse.jface.text.source.SourceViewer; >-import org.eclipse.mylyn.internal.sandbox.ui.editors.AbstractTaskEditorExtension; > import org.eclipse.mylyn.internal.tasks.ui.editors.RepositoryCompletionProcessor; > import org.eclipse.mylyn.internal.wikitext.ui.editor.MarkupEditor; > import org.eclipse.mylyn.internal.wikitext.ui.editor.MarkupSourceViewerConfiguration; >@@ -37,8 +36,10 @@ > import org.eclipse.mylyn.internal.wikitext.ui.viewer.AnnotationHyperlinkDetector; > import org.eclipse.mylyn.tasks.core.ITask; > import org.eclipse.mylyn.tasks.core.TaskRepository; >+import org.eclipse.mylyn.tasks.ui.ITasksUiConstants; > import org.eclipse.mylyn.tasks.ui.TaskHyperlink; > import org.eclipse.mylyn.tasks.ui.TasksUi; >+import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorExtension; > import org.eclipse.mylyn.wikitext.core.parser.markup.MarkupLanguage; > import org.eclipse.mylyn.wikitext.ui.viewer.MarkupViewer; > import org.eclipse.mylyn.wikitext.ui.viewer.MarkupViewerConfiguration; >@@ -192,7 +193,7 @@ > * @see #configureDefaultInternalLinkPattern(TaskRepository, MarkupLanguage) > */ > protected void configureMarkupLanguage(TaskRepository taskRepository, MarkupLanguage markupLanguage) { >- String internalLinkPattern = taskRepository.getProperty(AbstractTaskEditorExtension.INTERNAL_WIKI_LINK_PATTERN); >+ String internalLinkPattern = taskRepository.getProperty(ITasksUiConstants.INTERNAL_WIKI_LINK_PATTERN); > if (internalLinkPattern != null && internalLinkPattern.trim().length() > 0) { > markupLanguage.setInternalLinkPattern(internalLinkPattern.trim()); > } else { >#P org.eclipse.mylyn.sandbox.ui >Index: src/org/eclipse/mylyn/internal/sandbox/ui/editors/ExtensibleRichTextAttributeEditor.java >=================================================================== >RCS file: src/org/eclipse/mylyn/internal/sandbox/ui/editors/ExtensibleRichTextAttributeEditor.java >diff -N src/org/eclipse/mylyn/internal/sandbox/ui/editors/ExtensibleRichTextAttributeEditor.java >--- src/org/eclipse/mylyn/internal/sandbox/ui/editors/ExtensibleRichTextAttributeEditor.java 29 Sep 2008 19:08:57 -0000 1.11 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,342 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2004, 2008 Jingwen Ou and others. >- * All rights reserved. This program and the accompanying materials >- * are made available under the terms of the Eclipse Public License v1.0 >- * which accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: >- * Jingwen Ou - initial API and implementation >- * Tasktop Technologies - improvements >- *******************************************************************************/ >- >-package org.eclipse.mylyn.internal.sandbox.ui.editors; >- >-import java.util.Iterator; >- >-import org.eclipse.jface.action.Action; >-import org.eclipse.jface.action.IAction; >-import org.eclipse.jface.resource.JFaceResources; >-import org.eclipse.jface.text.Document; >-import org.eclipse.jface.text.ITextListener; >-import org.eclipse.jface.text.TextEvent; >-import org.eclipse.jface.text.source.AnnotationModel; >-import org.eclipse.jface.text.source.IAnnotationAccess; >-import org.eclipse.jface.text.source.SourceViewer; >-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonThemes; >-import org.eclipse.mylyn.internal.sandbox.ui.commands.ViewSourceHandler; >-import org.eclipse.mylyn.internal.tasks.ui.editors.EditorUtil; >-import org.eclipse.mylyn.internal.tasks.ui.editors.RepositoryTextViewer; >-import org.eclipse.mylyn.internal.tasks.ui.editors.RepositoryTextViewerConfiguration; >-import org.eclipse.mylyn.internal.tasks.ui.editors.RichTextAttributeEditor; >-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskHyperlinkDetector; >-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskHyperlinkTextPresentationManager; >-import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal; >-import org.eclipse.mylyn.tasks.core.TaskRepository; >-import org.eclipse.mylyn.tasks.core.data.TaskAttribute; >-import org.eclipse.mylyn.tasks.core.data.TaskDataModel; >-import org.eclipse.swt.SWT; >-import org.eclipse.swt.custom.StackLayout; >-import org.eclipse.swt.events.DisposeEvent; >-import org.eclipse.swt.events.DisposeListener; >-import org.eclipse.swt.events.FocusAdapter; >-import org.eclipse.swt.events.FocusEvent; >-import org.eclipse.swt.events.FocusListener; >-import org.eclipse.swt.graphics.Font; >-import org.eclipse.swt.graphics.Point; >-import org.eclipse.swt.widgets.Composite; >-import org.eclipse.swt.widgets.Control; >-import org.eclipse.swt.widgets.Menu; >-import org.eclipse.ui.PlatformUI; >-import org.eclipse.ui.contexts.IContextActivation; >-import org.eclipse.ui.contexts.IContextService; >-import org.eclipse.ui.editors.text.EditorsUI; >-import org.eclipse.ui.forms.widgets.FormToolkit; >-import org.eclipse.ui.texteditor.AnnotationPreference; >-import org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess; >-import org.eclipse.ui.texteditor.MarkerAnnotationPreferences; >-import org.eclipse.ui.texteditor.SourceViewerDecorationSupport; >-import org.eclipse.ui.themes.IThemeManager; >- >-/** >- * A text attribute that can switch between a source editor and a preview using StackLayout. >- * >- * @author Jingwen Ou >- * @author Steffen Pingel >- */ >-public class ExtensibleRichTextAttributeEditor extends RichTextAttributeEditor { >- >- private IContextActivation contextActivation; >- >- private final IContextService contextService; >- >- private SourceViewer defaultViewer; >- >- private Composite editorComposite; >- >- private StackLayout editorLayout; >- >- private final AbstractTaskEditorExtension extension; >- >- private SourceViewer editorViewer; >- >- private SourceViewer previewViewer; >- >- private int styles; >- >- private final TaskRepository taskRepository; >- >- private FormToolkit toolkit; >- >- public class ViewSourceAction extends Action { >- >- public ViewSourceAction() { >- super("Viewer Source", SWT.TOGGLE); >- setChecked(false); >- } >- >- @Override >- public void run() { >- if (isChecked()) { >- showDefault(); >- } else { >- showEditor(); >- } >- } >- >- } >- >- private final IAction viewSourceAction = new ViewSourceAction(); >- >- public ExtensibleRichTextAttributeEditor(IContextService contextService, TaskDataModel manager, >- TaskRepository taskRepository, AbstractTaskEditorExtension extension, TaskAttribute taskAttribute, >- int styles) { >- super(manager, taskRepository, taskAttribute, styles); >- this.contextService = contextService; >- this.taskRepository = taskRepository; >- this.extension = extension; >- this.styles = styles; >- } >- >- /** Configures annontation model for spell checking. */ >- private void configureAsTextEditor(SourceViewer viewer, Document document) { >- AnnotationModel annotationModel = new AnnotationModel(); >- viewer.showAnnotations(false); >- viewer.showAnnotationsOverview(false); >- IAnnotationAccess annotationAccess = new DefaultMarkerAnnotationAccess(); >- final SourceViewerDecorationSupport support = new SourceViewerDecorationSupport(viewer, null, annotationAccess, >- EditorsUI.getSharedTextColors()); >- Iterator<?> e = new MarkerAnnotationPreferences().getAnnotationPreferences().iterator(); >- while (e.hasNext()) { >- support.setAnnotationPreference((AnnotationPreference) e.next()); >- } >- support.install(EditorsUI.getPreferenceStore()); >- viewer.getTextWidget().addDisposeListener(new DisposeListener() { >- public void widgetDisposed(DisposeEvent e) { >- support.uninstall(); >- } >- }); >- viewer.getTextWidget().setIndent(2); >- viewer.setDocument(document, annotationModel); >- } >- >- private SourceViewer configureEditor(final SourceViewer viewer, boolean readOnly) { >- Document document = new Document(getValue()); >- if (readOnly) { >- viewer.setDocument(document); >- // setting view source action >- viewer.getControl().setData(ViewSourceHandler.VIEW_SOURCE_ACTION, viewSourceAction); >- viewer.getControl().addFocusListener(new FocusAdapter() { >- @Override >- public void focusGained(FocusEvent e) { >- ViewSourceHandler.setChecked(getViewer() == defaultViewer); >- } >- }); >- } else { >- configureAsTextEditor(viewer, document); >- viewer.addTextListener(new ITextListener() { >- public void textChanged(TextEvent event) { >- // filter out events caused by text presentation changes, e.g. annotation drawing >- String value = viewer.getTextWidget().getText(); >- if (!getValue().equals(value)) { >- setValue(value); >- EditorUtil.ensureVisible(viewer.getTextWidget()); >- } >- } >- }); >- >- viewer.getControl().setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER); >- >- // drop & drag support, under review >- TaskEditorDropTarget.addDropTargetSupport(viewer); >- } >- >- // enable cut/copy/paste >- EditorUtil.setTextViewer(viewer.getTextWidget(), viewer); >- viewer.setEditable(!readOnly); >- viewer.getTextWidget().setFont(getFont()); >- toolkit.adapt(viewer.getControl(), false, false); >- >- TaskHyperlinkTextPresentationManager hyperlinkTextPresentationManager = new TaskHyperlinkTextPresentationManager(); >- hyperlinkTextPresentationManager.setHyperlinkDetector(new TaskHyperlinkDetector()); >- hyperlinkTextPresentationManager.install(viewer); >- >- return viewer; >- } >- >- @Override >- public void createControl(Composite parent, FormToolkit toolkit) { >- this.toolkit = toolkit; >- >- editorComposite = new Composite(parent, SWT.NULL); >- editorLayout = new StackLayout() { >- @Override >- protected Point computeSize(Composite composite, int hint, int hint2, boolean flushCache) { >- return topControl.computeSize(hint, hint2, flushCache); >- } >- }; >- editorComposite.setLayout(editorLayout); >- setControl(editorComposite); >- >- if (!isReadOnly() && (styles & TasksUiInternal.SWT_NO_SCROLL) == 0) { >- styles |= SWT.V_SCROLL; >- } >- >- if (isReadOnly()) { >- editorViewer = extension.createViewer(taskRepository, editorComposite, styles); >- } else { >- editorViewer = extension.createEditor(taskRepository, editorComposite, styles); >- editorViewer.getTextWidget().addFocusListener(new FocusListener() { >- public void focusGained(FocusEvent e) { >- setContext(); >- } >- >- public void focusLost(FocusEvent e) { >- unsetContext(); >- } >- }); >- editorViewer.getTextWidget().addDisposeListener(new DisposeListener() { >- public void widgetDisposed(DisposeEvent e) { >- unsetContext(); >- } >- }); >- } >- configureEditor(editorViewer, isReadOnly()); >- >- show(editorViewer); >- } >- >- private SourceViewer createDefaultEditor(Composite parent, int styles) { >- SourceViewer defaultEditor = new RepositoryTextViewer(taskRepository, parent, styles | SWT.WRAP); >- >- RepositoryTextViewerConfiguration viewerConfig = new RepositoryTextViewerConfiguration(taskRepository, >- isSpellCheckingEnabled()); >- viewerConfig.setMode(getMode()); >- defaultEditor.configure(viewerConfig); >- >- return defaultEditor; >- } >- >- private SourceViewer getDefaultViewer() { >- if (defaultViewer == null) { >- defaultViewer = createDefaultEditor(editorComposite, styles); >- configureEditor(defaultViewer, isReadOnly()); >- >- // fixed font size >- defaultViewer.getTextWidget().setFont(JFaceResources.getFontRegistry().get(JFaceResources.TEXT_FONT)); >- // adapt maximize action >- defaultViewer.getControl().setData(EditorUtil.KEY_TOGGLE_TO_MAXIMIZE_ACTION, >- editorViewer.getControl().getData(EditorUtil.KEY_TOGGLE_TO_MAXIMIZE_ACTION)); >- // adapt menu to the new viewer >- installMenu(defaultViewer.getControl(), editorViewer.getControl().getMenu()); >- } >- return defaultViewer; >- } >- >- private void installMenu(final Control control, Menu menu) { >- if (menu != null) { >- control.setMenu(menu); >- control.addDisposeListener(new DisposeListener() { >- public void widgetDisposed(DisposeEvent e) { >- control.setMenu(null); >- } >- }); >- } >- } >- >- private Font getFont() { >- IThemeManager themeManager = PlatformUI.getWorkbench().getThemeManager(); >- Font font = themeManager.getCurrentTheme().getFontRegistry().get(CommonThemes.FONT_EDITOR_COMMENT); >- return font; >- } >- >- private SourceViewer getPreviewViewer() { >- // construct as needed >- if (previewViewer == null) { >- previewViewer = extension.createViewer(taskRepository, editorComposite, styles); >- configureEditor(previewViewer, true); >- // adapt maximize action >- previewViewer.getControl().setData(EditorUtil.KEY_TOGGLE_TO_MAXIMIZE_ACTION, >- editorViewer.getControl().getData(EditorUtil.KEY_TOGGLE_TO_MAXIMIZE_ACTION)); >- } >- Document document = new Document(editorViewer.getDocument().get()); >- previewViewer.setDocument(document); >- return previewViewer; >- } >- >- public SourceViewer getEditorViewer() { >- return editorViewer; >- } >- >- @Override >- public SourceViewer getViewer() { >- if (defaultViewer != null && editorLayout.topControl == defaultViewer.getControl()) { >- return defaultViewer; >- } else if (previewViewer != null && editorLayout.topControl == previewViewer.getControl()) { >- return previewViewer; >- } else { >- return editorViewer; >- } >- } >- >- private void setContext() { >- if (contextActivation != null) { >- contextService.deactivateContext(contextActivation); >- contextActivation = null; >- } >- if (contextService != null && extension.getEditorContextId() != null) { >- contextActivation = contextService.activateContext(extension.getEditorContextId()); >- } >- } >- >- /** >- * Brings <code>viewer</code> to top. >- */ >- private void show(SourceViewer viewer) { >- editorLayout.topControl = viewer.getControl(); >- editorComposite.layout(); >- viewer.getControl().setFocus(); >- } >- >- public void showDefault() { >- show(getDefaultViewer()); >- } >- >- public void showPreview() { >- if (!isReadOnly()) { >- show(getPreviewViewer()); >- } >- } >- >- public void showEditor() { >- show(getEditorViewer()); >- } >- >- private void unsetContext() { >- if (contextActivation != null) { >- contextService.deactivateContext(contextActivation); >- contextActivation = null; >- } >- } >- >-} >Index: src/org/eclipse/mylyn/internal/sandbox/ui/editors/ExtensibleTaskEditorNewCommentPart.java >=================================================================== >RCS file: src/org/eclipse/mylyn/internal/sandbox/ui/editors/ExtensibleTaskEditorNewCommentPart.java >diff -N src/org/eclipse/mylyn/internal/sandbox/ui/editors/ExtensibleTaskEditorNewCommentPart.java >--- src/org/eclipse/mylyn/internal/sandbox/ui/editors/ExtensibleTaskEditorNewCommentPart.java 13 Sep 2008 03:38:54 -0000 1.8 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,70 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2004, 2008 Jingwen Ou and others. >- * All rights reserved. This program and the accompanying materials >- * are made available under the terms of the Eclipse Public License v1.0 >- * which accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: >- * Jingwen Ou - initial API and implementation >- *******************************************************************************/ >- >-package org.eclipse.mylyn.internal.sandbox.ui.editors; >- >-import org.eclipse.jface.action.Action; >-import org.eclipse.jface.action.ToolBarManager; >-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages; >-import org.eclipse.mylyn.internal.tasks.ui.editors.EditorUtil; >-import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorNewCommentPart; >-import org.eclipse.swt.SWT; >-import org.eclipse.swt.widgets.Composite; >-import org.eclipse.swt.widgets.Control; >-import org.eclipse.ui.forms.widgets.FormToolkit; >- >-/** >- * @author Jingwen Ou >- */ >-public class ExtensibleTaskEditorNewCommentPart extends TaskEditorNewCommentPart { >- >- @Override >- protected void fillToolBar(ToolBarManager barManager) { >- Action toggleEditingAction = new Action("", SWT.TOGGLE) { >- @Override >- public void run() { >- toggleEditing(this); >- } >- }; >- toggleEditingAction.setImageDescriptor(CommonImages.PREVIEW_WEB); >- toggleEditingAction.setToolTipText("Preview"); >- toggleEditingAction.setChecked(false); >- >- barManager.add(toggleEditingAction); >- barManager.add(getMaximizePartAction()); >- super.fillToolBar(barManager); >- } >- >- private void toggleEditing(Action action) { >- if (getEditor() instanceof ExtensibleRichTextAttributeEditor) { >- ExtensibleRichTextAttributeEditor editor = (ExtensibleRichTextAttributeEditor) getEditor(); >- if (action.isChecked()) { >- editor.showPreview(); >- } else { >- editor.showEditor(); >- } >- } >- } >- >- @Override >- public void createControl(Composite parent, FormToolkit toolkit) { >- super.createControl(parent, toolkit); >- if (getControl() != null) { >- getEditor().getControl().setData(EditorUtil.KEY_TOGGLE_TO_MAXIMIZE_ACTION, getMaximizePartAction()); >- if (getEditor().getControl() instanceof Composite) { >- for (Control control : ((Composite) getEditor().getControl()).getChildren()) { >- control.setData(EditorUtil.KEY_TOGGLE_TO_MAXIMIZE_ACTION, getMaximizePartAction()); >- } >- } >- } >- } >- >-} >\ No newline at end of file >Index: src/org/eclipse/mylyn/internal/sandbox/ui/editors/EditorStyleContributionItem.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/sandbox/org.eclipse.mylyn.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/ui/editors/EditorStyleContributionItem.java,v >retrieving revision 1.4 >diff -u -r1.4 EditorStyleContributionItem.java >--- src/org/eclipse/mylyn/internal/sandbox/ui/editors/EditorStyleContributionItem.java 13 Sep 2008 03:38:54 -0000 1.4 >+++ src/org/eclipse/mylyn/internal/sandbox/ui/editors/EditorStyleContributionItem.java 6 Oct 2008 15:37:57 -0000 >@@ -22,8 +22,10 @@ > import org.eclipse.jface.dialogs.IInputValidator; > import org.eclipse.jface.dialogs.InputDialog; > import org.eclipse.jface.window.Window; >-import org.eclipse.mylyn.internal.sandbox.ui.editors.TaskEditorExtensions.RegisteredTaskEditorExtension; >+import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorExtensions; >+import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorExtensions.RegisteredTaskEditorExtension; > import org.eclipse.mylyn.tasks.core.TaskRepository; >+import org.eclipse.mylyn.tasks.ui.ITasksUiConstants; > import org.eclipse.mylyn.tasks.ui.TasksUiUtil; > import org.eclipse.ui.PlatformUI; > import org.eclipse.ui.actions.CompoundContributionItem; >@@ -119,7 +121,7 @@ > String message = "Set the internal link pattern for choosen markup language,\ne.g. http://wiki.eclipse.org/{0}"; > > TaskRepository taskRepository = TasksUiUtil.getSelectedRepository(); >- String initialValue = taskRepository.getProperty(AbstractTaskEditorExtension.INTERNAL_WIKI_LINK_PATTERN); >+ String initialValue = taskRepository.getProperty(ITasksUiConstants.INTERNAL_WIKI_LINK_PATTERN); > if (initialValue == null) { > initialValue = ""; > } >@@ -139,6 +141,6 @@ > > private static void setInternalLink(String internalLink) { > TaskRepository taskRepository = TasksUiUtil.getSelectedRepository(); >- taskRepository.setProperty(AbstractTaskEditorExtension.INTERNAL_WIKI_LINK_PATTERN, internalLink); >+ taskRepository.setProperty(ITasksUiConstants.INTERNAL_WIKI_LINK_PATTERN, internalLink); > } > } >Index: src/org/eclipse/mylyn/internal/sandbox/ui/editors/TaskEditorExtensionReader.java >=================================================================== >RCS file: src/org/eclipse/mylyn/internal/sandbox/ui/editors/TaskEditorExtensionReader.java >diff -N src/org/eclipse/mylyn/internal/sandbox/ui/editors/TaskEditorExtensionReader.java >--- src/org/eclipse/mylyn/internal/sandbox/ui/editors/TaskEditorExtensionReader.java 13 Sep 2008 03:38:54 -0000 1.5 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,85 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2004, 2008 David Green and others. >- * All rights reserved. This program and the accompanying materials >- * are made available under the terms of the Eclipse Public License v1.0 >- * which accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: >- * David Green - initial API and implementation >- *******************************************************************************/ >- >-package org.eclipse.mylyn.internal.sandbox.ui.editors; >- >-import org.eclipse.core.runtime.CoreException; >-import org.eclipse.core.runtime.IConfigurationElement; >-import org.eclipse.core.runtime.IExtension; >-import org.eclipse.core.runtime.IExtensionPoint; >-import org.eclipse.core.runtime.IExtensionRegistry; >-import org.eclipse.core.runtime.IStatus; >-import org.eclipse.core.runtime.Platform; >-import org.eclipse.core.runtime.Status; >-import org.eclipse.mylyn.commons.core.StatusHandler; >-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin; >- >-/** >- * @author David Green >- */ >-public class TaskEditorExtensionReader { >- >- private static final String CONNECTOR_KIND = "connectorKind"; >- >- public static final String ATTR_ID = "id"; >- >- public static final String ATTR_NAME = "name"; >- >- public static final String EXTENSION_TASK_EDITOR_EXTENSIONS = "org.eclipse.mylyn.sandbox.ui.taskEditorExtensions"; >- >- private static final String REPOSITORY_ASSOCIATION = "repositoryAssociation"; >- >- private static final String TASK_EDITOR_EXTENSION = "taskEditorExtension"; >- >- public static void initExtensions() { >- IExtensionRegistry registry = Platform.getExtensionRegistry(); >- >- IExtensionPoint editorExtensionPoint = registry.getExtensionPoint(EXTENSION_TASK_EDITOR_EXTENSIONS); >- IExtension[] editorExtensions = editorExtensionPoint.getExtensions(); >- for (IExtension extension : editorExtensions) { >- IConfigurationElement[] elements = extension.getConfigurationElements(); >- for (IConfigurationElement element : elements) { >- if (element.getName().equals(TASK_EDITOR_EXTENSION)) { >- readEditorExtension(element); >- } else if (element.getName().equals(REPOSITORY_ASSOCIATION)) { >- readEditorExtensionAssociation(element); >- } >- } >- } >- } >- >- private static void readEditorExtension(IConfigurationElement element) { >- try { >- String id = element.getAttribute(ATTR_ID); >- String name = element.getAttribute(ATTR_NAME); >- AbstractTaskEditorExtension extension = (AbstractTaskEditorExtension) element.createExecutableExtension("class"); >- TaskEditorExtensions.addTaskEditorExtension(id, name, extension); >- } catch (CoreException e) { >- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not load taskEditorExtension", >- e)); >- } catch (Exception e) { >- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not load taskEditorExtension", >- e)); >- } >- } >- >- private static void readEditorExtensionAssociation(IConfigurationElement element) { >- try { >- String repository = element.getAttribute(CONNECTOR_KIND); >- String taskEditorExtension = element.getAttribute(TASK_EDITOR_EXTENSION); >- TaskEditorExtensions.addRepositoryAssociation(repository, taskEditorExtension); >- } catch (Exception e) { >- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, >- "Could not load repositoryAssociation", e)); >- } >- } >- >-} >Index: src/org/eclipse/mylyn/internal/sandbox/ui/editors/AbstractTaskEditorExtension.java >=================================================================== >RCS file: src/org/eclipse/mylyn/internal/sandbox/ui/editors/AbstractTaskEditorExtension.java >diff -N src/org/eclipse/mylyn/internal/sandbox/ui/editors/AbstractTaskEditorExtension.java >--- src/org/eclipse/mylyn/internal/sandbox/ui/editors/AbstractTaskEditorExtension.java 13 Sep 2008 03:38:54 -0000 1.4 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,63 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2004, 2008 David Green and others. >- * All rights reserved. This program and the accompanying materials >- * are made available under the terms of the Eclipse Public License v1.0 >- * which accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: >- * David Green - initial API and implementation >- *******************************************************************************/ >- >-package org.eclipse.mylyn.internal.sandbox.ui.editors; >- >-import org.eclipse.jface.text.source.SourceViewer; >-import org.eclipse.mylyn.tasks.core.TaskRepository; >-import org.eclipse.swt.widgets.Composite; >-import org.eclipse.ui.contexts.IContextService; >- >-/** >- * An extension that provides task editor capabilities beyond the default, oriented towards providing markup-aware >- * editing and viewing >- * >- * @author David Green >- */ >-public abstract class AbstractTaskEditorExtension { >- >- /** >- * The key to access the {@link TaskRepository} property that stores the URL of an associated wiki. >- */ >- public static final String INTERNAL_WIKI_LINK_PATTERN = "wikiLinkPattern"; >- >- /** >- * Creates a source viewer that can be used to view content in the task editor. The source viewer should be >- * configured with a source viewer configuration prior to returning. >- * >- * @param taskRepository >- * the task repository for which the viewer is created >- * @param parent >- * the control parent of the source viewer >- * @param style >- * the styles to use >- */ >- public abstract SourceViewer createViewer(TaskRepository taskRepository, Composite parent, int style); >- >- /** >- * Creates a source viewer that can be used to edit content in the task editor. The source viewer should be >- * configured with a source viewer configuration prior to returning. >- * >- * @param taskRepository >- * the task repository for which the viewer is created >- * @param parent >- * the control parent of the source viewer >- * @param style >- * the styles to use >- */ >- public abstract SourceViewer createEditor(TaskRepository taskRepository, Composite parent, int style); >- >- /** >- * Returns the editor context id, to be passed to the {@link IContextService} when the editor is in focus. >- */ >- public abstract String getEditorContextId(); >- >-} >Index: src/org/eclipse/mylyn/internal/sandbox/ui/editors/ExtensibleBugzillaTaskEditorPage.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/sandbox/org.eclipse.mylyn.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/ui/editors/ExtensibleBugzillaTaskEditorPage.java,v >retrieving revision 1.7 >diff -u -r1.7 ExtensibleBugzillaTaskEditorPage.java >--- src/org/eclipse/mylyn/internal/sandbox/ui/editors/ExtensibleBugzillaTaskEditorPage.java 13 Sep 2008 03:38:54 -0000 1.7 >+++ src/org/eclipse/mylyn/internal/sandbox/ui/editors/ExtensibleBugzillaTaskEditorPage.java 6 Oct 2008 15:37:57 -0000 >@@ -26,8 +26,12 @@ > import org.eclipse.mylyn.internal.bugzilla.ui.editor.BugzillaTaskEditorPage; > import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages; > import org.eclipse.mylyn.internal.tasks.ui.editors.EditorUtil; >+import org.eclipse.mylyn.internal.tasks.ui.editors.ExtensibleRichTextAttributeEditor; >+import org.eclipse.mylyn.internal.tasks.ui.editors.ExtensibleTaskEditorNewCommentPart; >+import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorExtensions; > import org.eclipse.mylyn.tasks.core.data.TaskAttribute; > import org.eclipse.mylyn.tasks.ui.editors.AbstractAttributeEditor; >+import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorExtension; > import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPage; > import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPart; > import org.eclipse.mylyn.tasks.ui.editors.AttributeEditorFactory; >Index: src/org/eclipse/mylyn/internal/sandbox/ui/editors/TaskEditorExtensions.java >=================================================================== >RCS file: src/org/eclipse/mylyn/internal/sandbox/ui/editors/TaskEditorExtensions.java >diff -N src/org/eclipse/mylyn/internal/sandbox/ui/editors/TaskEditorExtensions.java >--- src/org/eclipse/mylyn/internal/sandbox/ui/editors/TaskEditorExtensions.java 13 Sep 2008 03:38:54 -0000 1.4 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,165 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2004, 2008 David Green and others. >- * All rights reserved. This program and the accompanying materials >- * are made available under the terms of the Eclipse Public License v1.0 >- * which accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: >- * David Green - initial API and implementation >- *******************************************************************************/ >- >-package org.eclipse.mylyn.internal.sandbox.ui.editors; >- >-import java.util.HashMap; >-import java.util.Map; >-import java.util.SortedSet; >-import java.util.TreeSet; >- >-import org.eclipse.core.runtime.Assert; >-import org.eclipse.core.runtime.IStatus; >-import org.eclipse.core.runtime.Status; >-import org.eclipse.mylyn.commons.core.StatusHandler; >-import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin; >-import org.eclipse.mylyn.tasks.core.TaskRepository; >- >-/** >- * @author David Green >- */ >-public class TaskEditorExtensions { >- >- public static final String REPOSITORY_PROPERTY_EDITOR_EXTENSION = "editorExtension"; >- >- private static Map<String, RegisteredTaskEditorExtension> extensionsById = new HashMap<String, RegisteredTaskEditorExtension>(); >- >- private static Map<String, String> associationByConnectorKind = new HashMap<String, String>(); >- >- private static boolean initialized; >- >- public static SortedSet<RegisteredTaskEditorExtension> getTaskEditorExtensions() { >- init(); >- return new TreeSet<RegisteredTaskEditorExtension>(extensionsById.values()); >- } >- >- public static void addTaskEditorExtension(String id, String name, AbstractTaskEditorExtension extension) { >- Assert.isNotNull(id); >- RegisteredTaskEditorExtension previous = extensionsById.put(id, new RegisteredTaskEditorExtension(extension, >- id, name)); >- if (previous != null) { >- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Duplicate taskEditorExtension id=" >- + id, null)); >- } >- } >- >- public static void addRepositoryAssociation(String connectorKind, String extensionId) { >- if (connectorKind == null || extensionId == null) { >- throw new IllegalArgumentException(); >- } >- String previous = associationByConnectorKind.put(connectorKind, extensionId); >- if (previous != null) { >- StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, String.format( >- "Duplicate association for repository %s: %s replaces %s", connectorKind, extensionId, previous), >- null)); >- } >- } >- >- /** >- * get a task editor extension for a specific repository >- * >- * @param taskRepository >- * @return the extension, or null if there is none >- * >- * @see #getDefaultTaskEditorExtension(TaskRepository) >- */ >- public static AbstractTaskEditorExtension getTaskEditorExtension(TaskRepository taskRepository) { >- init(); >- String extensionId = getTaskEditorExtensionId(taskRepository); >- if (extensionId != null) { >- RegisteredTaskEditorExtension taskEditorExtension = extensionsById.get(extensionId); >- return taskEditorExtension == null ? null : taskEditorExtension.getExtension(); >- } >- return null; >- } >- >- public static String getTaskEditorExtensionId(TaskRepository taskRepository) { >- init(); >- String id = taskRepository.getProperty(REPOSITORY_PROPERTY_EDITOR_EXTENSION); >- if (id == null) { >- id = getDefaultTaskEditorExtensionId(taskRepository); >- } >- return id; >- } >- >- public static void setTaskEditorExtensionId(TaskRepository repository, String editorExtensionId) { >- repository.setProperty(REPOSITORY_PROPERTY_EDITOR_EXTENSION, editorExtensionId); >- } >- >- public static String getDefaultTaskEditorExtensionId(TaskRepository taskRepository) { >- init(); >- return associationByConnectorKind.get(taskRepository.getConnectorKind()); >- } >- >- /** >- * get a default task editor extension for a specific repository >- * >- * @param taskRepository >- * @return the extension, or null if there is none >- * >- * @see #getTaskEditorExtension(TaskRepository) >- */ >- public static AbstractTaskEditorExtension getDefaultTaskEditorExtension(TaskRepository taskRepository) { >- init(); >- String extensionId = getDefaultTaskEditorExtensionId(taskRepository); >- if (extensionId != null) { >- RegisteredTaskEditorExtension taskEditorExtension = extensionsById.get(extensionId); >- return taskEditorExtension == null ? null : taskEditorExtension.getExtension(); >- } >- return null; >- } >- >- private static void init() { >- if (!initialized) { >- initialized = true; >- TaskEditorExtensionReader.initExtensions(); >- } >- } >- >- public static class RegisteredTaskEditorExtension implements Comparable<RegisteredTaskEditorExtension> { >- >- private final String id; >- >- private final String name; >- >- private final AbstractTaskEditorExtension extension; >- >- private RegisteredTaskEditorExtension(AbstractTaskEditorExtension extension, String id, String name) { >- this.extension = extension; >- this.id = id; >- this.name = name; >- } >- >- public String getId() { >- return id; >- } >- >- public String getName() { >- return name; >- } >- >- public AbstractTaskEditorExtension getExtension() { >- return extension; >- } >- >- public int compareTo(RegisteredTaskEditorExtension o) { >- if (o == this) { >- return 0; >- } >- int i = name.compareTo(o.name); >- if (i == 0) { >- i = id.compareTo(o.id); >- } >- return i; >- } >- } >- >-} >Index: src/org/eclipse/mylyn/internal/sandbox/ui/editors/ExtensibleBugzillaTaskEditorPageFactory.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/sandbox/org.eclipse.mylyn.sandbox.ui/src/org/eclipse/mylyn/internal/sandbox/ui/editors/ExtensibleBugzillaTaskEditorPageFactory.java,v >retrieving revision 1.3 >diff -u -r1.3 ExtensibleBugzillaTaskEditorPageFactory.java >--- src/org/eclipse/mylyn/internal/sandbox/ui/editors/ExtensibleBugzillaTaskEditorPageFactory.java 13 Sep 2008 03:38:54 -0000 1.3 >+++ src/org/eclipse/mylyn/internal/sandbox/ui/editors/ExtensibleBugzillaTaskEditorPageFactory.java 6 Oct 2008 15:37:57 -0000 >@@ -13,6 +13,7 @@ > package org.eclipse.mylyn.internal.sandbox.ui.editors; > > import org.eclipse.mylyn.internal.bugzilla.ui.editor.BugzillaTaskEditorPageFactory; >+import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorExtensions; > import org.eclipse.mylyn.tasks.ui.editors.TaskEditor; > import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput; > import org.eclipse.ui.forms.editor.FormPage; >Index: schema/taskEditorExtensions.exsd >=================================================================== >RCS file: schema/taskEditorExtensions.exsd >diff -N schema/taskEditorExtensions.exsd >--- schema/taskEditorExtensions.exsd 12 Sep 2008 21:11:53 -0000 1.3 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,152 +0,0 @@ >-<?xml version='1.0' encoding='UTF-8'?> >-<!-- Schema file written by PDE --> >-<schema targetNamespace="org.eclipse.mylyn.sandbox.ui" xmlns="http://www.w3.org/2001/XMLSchema"> >-<annotation> >- <appInfo> >- <meta.schema plugin="org.eclipse.mylyn.sandbox.ui" id="taskEditorExtensions" name="Task Editor Extensions"/> >- </appInfo> >- <documentation> >- An extension to the Mylyn task editor that can provide viewing and editing controls that are markup-aware. >- </documentation> >- </annotation> >- >- <element name="extension"> >- <annotation> >- <appInfo> >- <meta.element internal="true" /> >- </appInfo> >- </annotation> >- <complexType> >- <sequence> >- <element ref="taskEditorExtension" minOccurs="0" maxOccurs="unbounded"/> >- <element ref="repositoryAssociation" minOccurs="0" maxOccurs="unbounded"/> >- </sequence> >- <attribute name="point" type="string" use="required"> >- <annotation> >- <documentation> >- >- </documentation> >- </annotation> >- </attribute> >- <attribute name="id" type="string"> >- <annotation> >- <documentation> >- >- </documentation> >- </annotation> >- </attribute> >- <attribute name="name" type="string"> >- <annotation> >- <documentation> >- >- </documentation> >- <appInfo> >- <meta.attribute translatable="true"/> >- </appInfo> >- </annotation> >- </attribute> >- </complexType> >- </element> >- >- <element name="taskEditorExtension"> >- <annotation> >- <documentation> >- Declare an extension to the Mylyn task editor. Extensions are typically capable of providing improved editing capabilities, such as markup-aware. >- </documentation> >- </annotation> >- <complexType> >- <attribute name="class" type="string" use="required"> >- <annotation> >- <documentation> >- the fully qualified class name of the class that extends org.eclipse.mylyn.internal.sandbox.ui.editors.AbstractTaskEditorExtension >- </documentation> >- <appInfo> >- <meta.attribute kind="java" basedOn="org.eclipse.mylyn.internal.sandbox.ui.editors.AbstractTaskEditorExtension:"/> >- </appInfo> >- </annotation> >- </attribute> >- <attribute name="id" type="string" use="required"> >- <annotation> >- <documentation> >- a unique identifier identifying the extension >- </documentation> >- <appInfo> >- <meta.attribute kind="identifier"/> >- </appInfo> >- </annotation> >- </attribute> >- <attribute name="name" type="string" use="required"> >- <annotation> >- <documentation> >- A human-readable name for the extension that is presented to the Eclipse user in the UI. Should be translated. Used in the UI to identify the type of extension, so the name should indicate what the extension is for, and it should be short so that it can be displayed on one line (for example as an option in a combo box.) Example: "TracWiki", or "Textile". >- </documentation> >- <appInfo> >- <meta.attribute translatable="true"/> >- </appInfo> >- </annotation> >- </attribute> >- </complexType> >- </element> >- >- <element name="repositoryAssociation"> >- <annotation> >- <documentation> >- Associate the task editor extension with a kind of repository. Making such an association causes the taskEditorExtension to become the default or preferred setting for a kind of repository. >- </documentation> >- </annotation> >- <complexType> >- <attribute name="connectorKind" type="string" use="required"> >- <annotation> >- <documentation> >- the kind of connector for that this task editor extension should be associated with. >- </documentation> >- </annotation> >- </attribute> >- <attribute name="taskEditorExtension" type="string" use="required"> >- <annotation> >- <documentation> >- the id of the taskEditorExtension to associate >- </documentation> >- </annotation> >- </attribute> >- </complexType> >- </element> >- >- <annotation> >- <appInfo> >- <meta.section type="since"/> >- </appInfo> >- <documentation> >- 3.0 >- </documentation> >- </annotation> >- >- <annotation> >- <appInfo> >- <meta.section type="examples"/> >- </appInfo> >- <documentation> >- [Enter extension point usage example here.] >- </documentation> >- </annotation> >- >- <annotation> >- <appInfo> >- <meta.section type="apiinfo"/> >- </appInfo> >- <documentation> >- [Enter API information here.] >- </documentation> >- </annotation> >- >- <annotation> >- <appInfo> >- <meta.section type="implementation"/> >- </appInfo> >- <documentation> >- [Enter information about supplied implementation of this extension point.] >- </documentation> >- </annotation> >- >- >-</schema> >Index: src/org/eclipse/mylyn/internal/sandbox/ui/commands/ViewSourceHandler.java >=================================================================== >RCS file: src/org/eclipse/mylyn/internal/sandbox/ui/commands/ViewSourceHandler.java >diff -N src/org/eclipse/mylyn/internal/sandbox/ui/commands/ViewSourceHandler.java >--- src/org/eclipse/mylyn/internal/sandbox/ui/commands/ViewSourceHandler.java 13 Sep 2008 03:38:54 -0000 1.4 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,103 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2004, 2008 Jingwen Ou and others. >- * All rights reserved. This program and the accompanying materials >- * are made available under the terms of the Eclipse Public License v1.0 >- * which accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: >- * Jingwen Ou - initial API and implementation >- * Tasktop Technologies - improvements >- *******************************************************************************/ >- >-package org.eclipse.mylyn.internal.sandbox.ui.commands; >- >-import java.util.Map; >- >-import org.eclipse.core.commands.AbstractHandler; >-import org.eclipse.core.commands.ExecutionEvent; >-import org.eclipse.core.commands.ExecutionException; >-import org.eclipse.core.commands.HandlerEvent; >-import org.eclipse.jface.action.IAction; >-import org.eclipse.mylyn.internal.tasks.ui.editors.EditorUtil; >-import org.eclipse.swt.custom.StyledText; >-import org.eclipse.swt.widgets.Control; >-import org.eclipse.ui.IEditorSite; >-import org.eclipse.ui.IWorkbenchPart; >-import org.eclipse.ui.IWorkbenchSite; >-import org.eclipse.ui.PlatformUI; >-import org.eclipse.ui.commands.IElementUpdater; >-import org.eclipse.ui.forms.editor.FormEditor; >-import org.eclipse.ui.forms.editor.IFormPage; >-import org.eclipse.ui.handlers.HandlerUtil; >-import org.eclipse.ui.menus.UIElement; >- >-/** >- * @author Jingwen Ou >- * @author Steffen Pingel >- */ >-public class ViewSourceHandler extends AbstractHandler implements IElementUpdater { >- >- private static boolean checked; >- >- private static ViewSourceHandler instance; >- >- public ViewSourceHandler() { >- instance = this; >- } >- >- public boolean isChecked() { >- return checked; >- } >- >- public static void setChecked(boolean checked) { >- ViewSourceHandler.checked = checked; >- if (instance != null) { >- instance.fireHandlerChanged(new HandlerEvent(instance, true, false)); >- } >- } >- >- private Control getFocusControl() { >- return PlatformUI.getWorkbench().getDisplay().getFocusControl(); >- } >- >- @Override >- public boolean isEnabled() { >- Control focusControl = getFocusControl(); >- if (focusControl instanceof StyledText && focusControl.getData(VIEW_SOURCE_ACTION) instanceof IAction) { >- return true; >- } >- >- return false; >- } >- >- public static final String VIEW_SOURCE_ACTION = "viewSourceAction"; >- >- public Object execute(ExecutionEvent event) throws ExecutionException { >- IWorkbenchSite site = HandlerUtil.getActiveSite(event); >- if (site instanceof IEditorSite) { >- IWorkbenchPart part = ((IEditorSite) site).getPart(); >- if (part instanceof FormEditor) { >- IFormPage page = ((FormEditor) part).getActivePageInstance(); >- Control focusedControl = EditorUtil.getFocusControl(page); >- if (focusedControl != null) { >- Object data = focusedControl.getData(VIEW_SOURCE_ACTION); >- if (data instanceof IAction) { >- IAction action = (IAction) data; >- action.setChecked(!action.isChecked()); >- action.run(); >- setChecked(action.isChecked()); >- EditorUtil.reflow(focusedControl); >- } >- } >- } >- } >- return null; >- } >- >- @SuppressWarnings("unchecked") >- public void updateElement(UIElement element, Map parameters) { >- element.setChecked(checked); >- } >- >-} >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/sandbox/org.eclipse.mylyn.sandbox.ui/plugin.xml,v >retrieving revision 1.92 >diff -u -r1.92 plugin.xml >--- plugin.xml 22 Aug 2008 20:00:09 -0000 1.92 >+++ plugin.xml 6 Oct 2008 15:37:57 -0000 >@@ -1,7 +1,6 @@ > <?xml version="1.0" encoding="UTF-8"?> > <?eclipse version="3.0"?> > <plugin> >- <extension-point id="taskEditorExtensions" name="Task Editor Extension" schema="schema/taskEditorExtensions.exsd"/> > <extension-point id="resourceHyperlinkExtensions" name="Resource Hyperlink Extension" schema="schema/resourceHyperlinkExtensions.exsd"/> > > <extension point="org.eclipse.ui.views"> >@@ -417,29 +416,7 @@ > generatedPrefix="file"> > </resourceHyperlinkExtension> > </extension> >- <extension point="org.eclipse.ui.menus"> >- <menuContribution >- locationURI="popup:org.eclipse.mylyn.tasks.ui.editors.task?after=additions"> >- <command >- commandId="org.eclipse.mylyn.sandbox.ui.viewSource.command" >- id="org.eclipse.mylyn.sandbox.ui.viewSource" >- label="View Source" >- style="toggle"> >- <visibleWhen >- checkEnabled="true"> >- </visibleWhen> >- </command> >- </menuContribution> >- </extension> >- <extension >- point="org.eclipse.ui.commands"> >- <command >- categoryId="org.eclipse.mylyn.tasks.ui.commands" >- defaultHandler="org.eclipse.mylyn.internal.sandbox.ui.commands.ViewSourceHandler" >- id="org.eclipse.mylyn.sandbox.ui.viewSource.command" >- name="View Source"> >- </command> >- </extension> >+ > <!-- > <extension point="org.eclipse.mylyn.tasks.ui.presentations"> > <presentation >#P org.eclipse.mylyn.tasks.ui >Index: src/org/eclipse/mylyn/tasks/ui/ITasksUiConstants.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/ITasksUiConstants.java,v >retrieving revision 1.3 >diff -u -r1.3 ITasksUiConstants.java >--- src/org/eclipse/mylyn/tasks/ui/ITasksUiConstants.java 12 Sep 2008 04:19:27 -0000 1.3 >+++ src/org/eclipse/mylyn/tasks/ui/ITasksUiConstants.java 6 Oct 2008 15:37:58 -0000 >@@ -11,6 +11,8 @@ > > package org.eclipse.mylyn.tasks.ui; > >+import org.eclipse.mylyn.tasks.core.TaskRepository; >+ > /** > * @author Mik Kersten > * @since 3.0 >@@ -28,4 +30,12 @@ > > public static final String ID_PREFERENCES_COLORS_AND_FONTS = "org.eclipse.ui.preferencePages.ColorsAndFonts"; > >+ /** >+ * The key to access the {@link TaskRepository} property that stores the URL of an associated wiki. The URL >+ * typically uses {@link java.text.MessageFormat} with argument 0 being the page name of the desired wiki page. >+ * >+ * @since 3.1 >+ */ >+ public static final String INTERNAL_WIKI_LINK_PATTERN = "wikiLinkPattern"; >+ > } >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/plugin.xml,v >retrieving revision 1.340 >diff -u -r1.340 plugin.xml >--- plugin.xml 12 Sep 2008 18:13:11 -0000 1.340 >+++ plugin.xml 6 Oct 2008 15:37:58 -0000 >@@ -7,6 +7,7 @@ > <extension-point id="projectLinkProviders" name="Linking Provider from Project to the Task Repository" schema="schema/projectLinkProviders.exsd"/> > <extension-point id="duplicateDetectors" name="duplicateDetectors" schema="schema/duplicateDetectors.exsd"/> > <extension-point id="presentations" name="presentations" schema="schema/presentations.exsd"/> >+ <extension-point id="taskEditorExtensions" name="Task Editor Extension" schema="schema/taskEditorExtensions.exsd"/> > > <extension > point="org.eclipse.mylyn.context.core.bridges"> >@@ -858,6 +859,12 @@ > <command id="org.eclipse.mylyn.tasks.ui.command.previousTask" > defaultHandler="org.eclipse.mylyn.internal.tasks.ui.TaskHistoryHandler" > name="Previous Task Command"/> >+ >+ <command >+ categoryId="org.eclipse.mylyn.tasks.ui.commands" >+ defaultHandler="org.eclipse.mylyn.internal.tasks.ui.commands.ViewSourceHandler" >+ id="org.eclipse.mylyn.tasks.ui.viewSource.command" >+ name="View Source"/> > </extension> > > <!-- command-based implementation of the previousTask/history dropdown, >@@ -889,7 +896,17 @@ > </menuContribution> > </extension> > --> >- >+ <extension point="org.eclipse.ui.menus"> >+ <menuContribution >+ locationURI="popup:org.eclipse.mylyn.tasks.ui.editors.task?after=additions"> >+ <command commandId="org.eclipse.mylyn.tasks.ui.viewSource.command" >+ id="org.eclipse.mylyn.sandbox.ui.viewSource" label="View Source" >+ style="toggle"> >+ <visibleWhen checkEnabled="true"/> >+ </command> >+ </menuContribution> >+ </extension> >+ > <extension point="org.eclipse.ui.actionSets"> > <actionSet > id="org.eclipse.mylyn.tasks.ui.navigation.additions" >Index: src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorExtensionReader.java >=================================================================== >RCS file: src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorExtensionReader.java >diff -N src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorExtensionReader.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorExtensionReader.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,88 @@ >+/******************************************************************************* >+ * Copyright (c) 2004, 2008 David Green and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * David Green - initial API and implementation >+ *******************************************************************************/ >+ >+package org.eclipse.mylyn.internal.tasks.ui.editors; >+ >+import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.IConfigurationElement; >+import org.eclipse.core.runtime.IExtension; >+import org.eclipse.core.runtime.IExtensionPoint; >+import org.eclipse.core.runtime.IExtensionRegistry; >+import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.Platform; >+import org.eclipse.core.runtime.Status; >+import org.eclipse.mylyn.commons.core.StatusHandler; >+import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin; >+import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorExtension; >+ >+/** >+ * A utility for initializing {@link TaskEditorExtensions}. >+ * >+ * @author David Green >+ */ >+class TaskEditorExtensionReader { >+ >+ private static final String CONNECTOR_KIND = "connectorKind"; >+ >+ public static final String ATTR_ID = "id"; >+ >+ public static final String ATTR_NAME = "name"; >+ >+ public static final String EXTENSION_TASK_EDITOR_EXTENSIONS = TasksUiPlugin.ID_PLUGIN + ".taskEditorExtensions"; >+ >+ private static final String REPOSITORY_ASSOCIATION = "repositoryAssociation"; >+ >+ private static final String TASK_EDITOR_EXTENSION = "taskEditorExtension"; >+ >+ public static void initExtensions() { >+ IExtensionRegistry registry = Platform.getExtensionRegistry(); >+ >+ IExtensionPoint editorExtensionPoint = registry.getExtensionPoint(EXTENSION_TASK_EDITOR_EXTENSIONS); >+ IExtension[] editorExtensions = editorExtensionPoint.getExtensions(); >+ for (IExtension extension : editorExtensions) { >+ IConfigurationElement[] elements = extension.getConfigurationElements(); >+ for (IConfigurationElement element : elements) { >+ if (element.getName().equals(TASK_EDITOR_EXTENSION)) { >+ readEditorExtension(element); >+ } else if (element.getName().equals(REPOSITORY_ASSOCIATION)) { >+ readEditorExtensionAssociation(element); >+ } >+ } >+ } >+ } >+ >+ private static void readEditorExtension(IConfigurationElement element) { >+ try { >+ String id = element.getAttribute(ATTR_ID); >+ String name = element.getAttribute(ATTR_NAME); >+ AbstractTaskEditorExtension extension = (AbstractTaskEditorExtension) element.createExecutableExtension("class"); >+ TaskEditorExtensions.addTaskEditorExtension(id, name, extension); >+ } catch (CoreException e) { >+ StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not load taskEditorExtension", >+ e)); >+ } catch (Exception e) { >+ StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Could not load taskEditorExtension", >+ e)); >+ } >+ } >+ >+ private static void readEditorExtensionAssociation(IConfigurationElement element) { >+ try { >+ String repository = element.getAttribute(CONNECTOR_KIND); >+ String taskEditorExtension = element.getAttribute(TASK_EDITOR_EXTENSION); >+ TaskEditorExtensions.addRepositoryAssociation(repository, taskEditorExtension); >+ } catch (Exception e) { >+ StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, >+ "Could not load repositoryAssociation", e)); >+ } >+ } >+ >+} >Index: src/org/eclipse/mylyn/internal/tasks/ui/editors/ExtensibleTaskEditorNewCommentPart.java >=================================================================== >RCS file: src/org/eclipse/mylyn/internal/tasks/ui/editors/ExtensibleTaskEditorNewCommentPart.java >diff -N src/org/eclipse/mylyn/internal/tasks/ui/editors/ExtensibleTaskEditorNewCommentPart.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/mylyn/internal/tasks/ui/editors/ExtensibleTaskEditorNewCommentPart.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,68 @@ >+/******************************************************************************* >+ * Copyright (c) 2004, 2008 Jingwen Ou and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Jingwen Ou - initial API and implementation >+ *******************************************************************************/ >+ >+package org.eclipse.mylyn.internal.tasks.ui.editors; >+ >+import org.eclipse.jface.action.Action; >+import org.eclipse.jface.action.ToolBarManager; >+import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages; >+import org.eclipse.swt.SWT; >+import org.eclipse.swt.widgets.Composite; >+import org.eclipse.swt.widgets.Control; >+import org.eclipse.ui.forms.widgets.FormToolkit; >+ >+/** >+ * @author Jingwen Ou >+ */ >+public class ExtensibleTaskEditorNewCommentPart extends TaskEditorNewCommentPart { >+ >+ @Override >+ protected void fillToolBar(ToolBarManager barManager) { >+ Action toggleEditingAction = new Action("", SWT.TOGGLE) { >+ @Override >+ public void run() { >+ toggleEditing(this); >+ } >+ }; >+ toggleEditingAction.setImageDescriptor(CommonImages.PREVIEW_WEB); >+ toggleEditingAction.setToolTipText("Preview"); >+ toggleEditingAction.setChecked(false); >+ >+ barManager.add(toggleEditingAction); >+ barManager.add(getMaximizePartAction()); >+ super.fillToolBar(barManager); >+ } >+ >+ private void toggleEditing(Action action) { >+ if (getEditor() instanceof ExtensibleRichTextAttributeEditor) { >+ ExtensibleRichTextAttributeEditor editor = (ExtensibleRichTextAttributeEditor) getEditor(); >+ if (action.isChecked()) { >+ editor.showPreview(); >+ } else { >+ editor.showEditor(); >+ } >+ } >+ } >+ >+ @Override >+ public void createControl(Composite parent, FormToolkit toolkit) { >+ super.createControl(parent, toolkit); >+ if (getControl() != null) { >+ getEditor().getControl().setData(EditorUtil.KEY_TOGGLE_TO_MAXIMIZE_ACTION, getMaximizePartAction()); >+ if (getEditor().getControl() instanceof Composite) { >+ for (Control control : ((Composite) getEditor().getControl()).getChildren()) { >+ control.setData(EditorUtil.KEY_TOGGLE_TO_MAXIMIZE_ACTION, getMaximizePartAction()); >+ } >+ } >+ } >+ } >+ >+} >Index: schema/taskEditorExtensions.exsd >=================================================================== >RCS file: schema/taskEditorExtensions.exsd >diff -N schema/taskEditorExtensions.exsd >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ schema/taskEditorExtensions.exsd 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,160 @@ >+<?xml version='1.0' encoding='UTF-8'?> >+<!-- Schema file written by PDE --> >+<schema targetNamespace="org.eclipse.mylyn.tasks.ui" xmlns="http://www.w3.org/2001/XMLSchema"> >+<annotation> >+ <appinfo> >+ <meta.schema plugin="org.eclipse.mylyn.tasks.ui" id="taskEditorExtensions" name="Task Editor Extensions"/> >+ </appinfo> >+ <documentation> >+ An extension to the Mylyn task editor that can provide viewing and editing controls that have capabilities beyond basic plain-text. >+For example, WikiText uses this extension to provide editors that are markup-aware. >+ </documentation> >+ </annotation> >+ >+ <element name="extension"> >+ <annotation> >+ <appinfo> >+ <meta.element internal="true" /> >+ </appinfo> >+ </annotation> >+ <complexType> >+ <sequence> >+ <element ref="taskEditorExtension" minOccurs="0" maxOccurs="unbounded"/> >+ <element ref="repositoryAssociation" minOccurs="0" maxOccurs="unbounded"/> >+ </sequence> >+ <attribute name="point" type="string" use="required"> >+ <annotation> >+ <documentation> >+ >+ </documentation> >+ </annotation> >+ </attribute> >+ <attribute name="id" type="string"> >+ <annotation> >+ <documentation> >+ >+ </documentation> >+ </annotation> >+ </attribute> >+ <attribute name="name" type="string"> >+ <annotation> >+ <documentation> >+ >+ </documentation> >+ <appinfo> >+ <meta.attribute translatable="true"/> >+ </appinfo> >+ </annotation> >+ </attribute> >+ </complexType> >+ </element> >+ >+ <element name="taskEditorExtension"> >+ <annotation> >+ <documentation> >+ Declare an extension to the Mylyn task editor. Extensions are typically capable of providing improved editing capabilities, such as markup-aware. >+ </documentation> >+ </annotation> >+ <complexType> >+ <attribute name="class" type="string" use="required"> >+ <annotation> >+ <documentation> >+ the fully qualified class name of the class that extends org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorExtension >+ </documentation> >+ <appinfo> >+ <meta.attribute kind="java" basedOn="org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorExtension:"/> >+ </appinfo> >+ </annotation> >+ </attribute> >+ <attribute name="id" type="string" use="required"> >+ <annotation> >+ <documentation> >+ a unique identifier identifying the extension >+ </documentation> >+ <appinfo> >+ <meta.attribute kind="identifier"/> >+ </appinfo> >+ </annotation> >+ </attribute> >+ <attribute name="name" type="string" use="required"> >+ <annotation> >+ <documentation> >+ A human-readable name for the extension that is presented to the Eclipse user in the UI. Should be translated. Used in the UI to identify the type of extension, so the name should indicate what the extension is for, and it should be short so that it can be displayed on one line (for example as an option in a combo box.) Example: "TracWiki", or "Textile". >+ </documentation> >+ <appinfo> >+ <meta.attribute translatable="true"/> >+ </appinfo> >+ </annotation> >+ </attribute> >+ </complexType> >+ </element> >+ >+ <element name="repositoryAssociation"> >+ <annotation> >+ <documentation> >+ Associate the task editor extension with a kind of repository. Making such an association causes the taskEditorExtension to become the default or preferred setting for a kind of repository. >+ </documentation> >+ </annotation> >+ <complexType> >+ <attribute name="connectorKind" type="string" use="required"> >+ <annotation> >+ <documentation> >+ the kind of connector for that this task editor extension should be associated with. >+ </documentation> >+ </annotation> >+ </attribute> >+ <attribute name="taskEditorExtension" type="string" use="required"> >+ <annotation> >+ <documentation> >+ the id of the taskEditorExtension to associate >+ </documentation> >+ </annotation> >+ </attribute> >+ </complexType> >+ </element> >+ >+ <annotation> >+ <appinfo> >+ <meta.section type="since"/> >+ </appinfo> >+ <documentation> >+ 3.1 >+ </documentation> >+ </annotation> >+ >+ <annotation> >+ <appinfo> >+ <meta.section type="examples"/> >+ </appinfo> >+ <documentation> >+ <extension >+ point="org.eclipse.mylyn.tasks.ui.taskEditorExtensions"> >+ <taskEditorExtension >+ class="org.eclipse.mylyn.internal.wikitext.textile.ui.editors.TextileTaskEditorExtension" >+ id="org.eclipse.mylyn.wikitext.textile.core.ui.taskEditorExtension" >+ name="Textile"> >+ </taskEditorExtension> >+ </extension> >+ </documentation> >+ </annotation> >+ >+ <annotation> >+ <appinfo> >+ <meta.section type="apiinfo"/> >+ </appinfo> >+ <documentation> >+ [Enter API information here.] >+ </documentation> >+ </annotation> >+ >+ <annotation> >+ <appinfo> >+ <meta.section type="implementation"/> >+ </appinfo> >+ <documentation> >+ [Enter information about supplied implementation of this extension point.] >+ </documentation> >+ </annotation> >+ >+ >+</schema> >Index: src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorExtension.java >=================================================================== >RCS file: src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorExtension.java >diff -N src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorExtension.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorExtension.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,60 @@ >+/******************************************************************************* >+ * Copyright (c) 2004, 2008 David Green and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * David Green - initial API and implementation >+ *******************************************************************************/ >+ >+package org.eclipse.mylyn.tasks.ui.editors; >+ >+import org.eclipse.jface.text.source.SourceViewer; >+import org.eclipse.mylyn.tasks.core.TaskRepository; >+import org.eclipse.swt.widgets.Composite; >+import org.eclipse.ui.contexts.IContextService; >+ >+/** >+ * An extension that provides task editor capabilities beyond the default, oriented towards providing markup-aware >+ * editing and viewing >+ * >+ * @author David Green >+ * >+ * @since 3.1 >+ */ >+public abstract class AbstractTaskEditorExtension { >+ >+ /** >+ * Creates a source viewer that can be used to view content in the task editor. The source viewer should be >+ * configured with a source viewer configuration prior to returning. >+ * >+ * @param taskRepository >+ * the task repository for which the viewer is created >+ * @param parent >+ * the control parent of the source viewer >+ * @param style >+ * the styles to use >+ */ >+ public abstract SourceViewer createViewer(TaskRepository taskRepository, Composite parent, int style); >+ >+ /** >+ * Creates a source viewer that can be used to edit content in the task editor. The source viewer should be >+ * configured with a source viewer configuration prior to returning. >+ * >+ * @param taskRepository >+ * the task repository for which the viewer is created >+ * @param parent >+ * the control parent of the source viewer >+ * @param style >+ * the styles to use >+ */ >+ public abstract SourceViewer createEditor(TaskRepository taskRepository, Composite parent, int style); >+ >+ /** >+ * Returns the editor context id, to be passed to the {@link IContextService} when the editor is in focus. >+ */ >+ public abstract String getEditorContextId(); >+ >+} >Index: src/org/eclipse/mylyn/internal/tasks/ui/editors/ExtensibleRichTextAttributeEditor.java >=================================================================== >RCS file: src/org/eclipse/mylyn/internal/tasks/ui/editors/ExtensibleRichTextAttributeEditor.java >diff -N src/org/eclipse/mylyn/internal/tasks/ui/editors/ExtensibleRichTextAttributeEditor.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/mylyn/internal/tasks/ui/editors/ExtensibleRichTextAttributeEditor.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,337 @@ >+/******************************************************************************* >+ * Copyright (c) 2004, 2008 Jingwen Ou and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Jingwen Ou - initial API and implementation >+ * Tasktop Technologies - improvements >+ *******************************************************************************/ >+ >+package org.eclipse.mylyn.internal.tasks.ui.editors; >+ >+import java.util.Iterator; >+ >+import org.eclipse.jface.action.Action; >+import org.eclipse.jface.action.IAction; >+import org.eclipse.jface.resource.JFaceResources; >+import org.eclipse.jface.text.Document; >+import org.eclipse.jface.text.ITextListener; >+import org.eclipse.jface.text.TextEvent; >+import org.eclipse.jface.text.source.AnnotationModel; >+import org.eclipse.jface.text.source.IAnnotationAccess; >+import org.eclipse.jface.text.source.SourceViewer; >+import org.eclipse.mylyn.internal.provisional.commons.ui.CommonThemes; >+import org.eclipse.mylyn.internal.tasks.ui.commands.ViewSourceHandler; >+import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal; >+import org.eclipse.mylyn.tasks.core.TaskRepository; >+import org.eclipse.mylyn.tasks.core.data.TaskAttribute; >+import org.eclipse.mylyn.tasks.core.data.TaskDataModel; >+import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorExtension; >+import org.eclipse.swt.SWT; >+import org.eclipse.swt.custom.StackLayout; >+import org.eclipse.swt.events.DisposeEvent; >+import org.eclipse.swt.events.DisposeListener; >+import org.eclipse.swt.events.FocusAdapter; >+import org.eclipse.swt.events.FocusEvent; >+import org.eclipse.swt.events.FocusListener; >+import org.eclipse.swt.graphics.Font; >+import org.eclipse.swt.graphics.Point; >+import org.eclipse.swt.widgets.Composite; >+import org.eclipse.swt.widgets.Control; >+import org.eclipse.swt.widgets.Menu; >+import org.eclipse.ui.PlatformUI; >+import org.eclipse.ui.contexts.IContextActivation; >+import org.eclipse.ui.contexts.IContextService; >+import org.eclipse.ui.editors.text.EditorsUI; >+import org.eclipse.ui.forms.widgets.FormToolkit; >+import org.eclipse.ui.texteditor.AnnotationPreference; >+import org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess; >+import org.eclipse.ui.texteditor.MarkerAnnotationPreferences; >+import org.eclipse.ui.texteditor.SourceViewerDecorationSupport; >+import org.eclipse.ui.themes.IThemeManager; >+ >+/** >+ * A text attribute that can switch between a source editor and a preview using StackLayout. >+ * >+ * @author Jingwen Ou >+ * @author Steffen Pingel >+ */ >+public class ExtensibleRichTextAttributeEditor extends RichTextAttributeEditor { >+ >+ private IContextActivation contextActivation; >+ >+ private final IContextService contextService; >+ >+ private SourceViewer defaultViewer; >+ >+ private Composite editorComposite; >+ >+ private StackLayout editorLayout; >+ >+ private final AbstractTaskEditorExtension extension; >+ >+ private SourceViewer editorViewer; >+ >+ private SourceViewer previewViewer; >+ >+ private int styles; >+ >+ private final TaskRepository taskRepository; >+ >+ private FormToolkit toolkit; >+ >+ public class ViewSourceAction extends Action { >+ >+ public ViewSourceAction() { >+ super("Viewer Source", SWT.TOGGLE); >+ setChecked(false); >+ } >+ >+ @Override >+ public void run() { >+ if (isChecked()) { >+ showDefault(); >+ } else { >+ showEditor(); >+ } >+ } >+ >+ } >+ >+ private final IAction viewSourceAction = new ViewSourceAction(); >+ >+ public ExtensibleRichTextAttributeEditor(IContextService contextService, TaskDataModel manager, >+ TaskRepository taskRepository, AbstractTaskEditorExtension extension, TaskAttribute taskAttribute, >+ int styles) { >+ super(manager, taskRepository, taskAttribute, styles); >+ this.contextService = contextService; >+ this.taskRepository = taskRepository; >+ this.extension = extension; >+ this.styles = styles; >+ } >+ >+ /** Configures annontation model for spell checking. */ >+ private void configureAsTextEditor(SourceViewer viewer, Document document) { >+ AnnotationModel annotationModel = new AnnotationModel(); >+ viewer.showAnnotations(false); >+ viewer.showAnnotationsOverview(false); >+ IAnnotationAccess annotationAccess = new DefaultMarkerAnnotationAccess(); >+ final SourceViewerDecorationSupport support = new SourceViewerDecorationSupport(viewer, null, annotationAccess, >+ EditorsUI.getSharedTextColors()); >+ Iterator<?> e = new MarkerAnnotationPreferences().getAnnotationPreferences().iterator(); >+ while (e.hasNext()) { >+ support.setAnnotationPreference((AnnotationPreference) e.next()); >+ } >+ support.install(EditorsUI.getPreferenceStore()); >+ viewer.getTextWidget().addDisposeListener(new DisposeListener() { >+ public void widgetDisposed(DisposeEvent e) { >+ support.uninstall(); >+ } >+ }); >+ viewer.getTextWidget().setIndent(2); >+ viewer.setDocument(document, annotationModel); >+ } >+ >+ private SourceViewer configureEditor(final SourceViewer viewer, boolean readOnly) { >+ Document document = new Document(getValue()); >+ if (readOnly) { >+ viewer.setDocument(document); >+ // setting view source action >+ viewer.getControl().setData(ViewSourceHandler.VIEW_SOURCE_ACTION, viewSourceAction); >+ viewer.getControl().addFocusListener(new FocusAdapter() { >+ @Override >+ public void focusGained(FocusEvent e) { >+ ViewSourceHandler.setChecked(getViewer() == defaultViewer); >+ } >+ }); >+ } else { >+ configureAsTextEditor(viewer, document); >+ viewer.addTextListener(new ITextListener() { >+ public void textChanged(TextEvent event) { >+ // filter out events caused by text presentation changes, e.g. annotation drawing >+ String value = viewer.getTextWidget().getText(); >+ if (!getValue().equals(value)) { >+ setValue(value); >+ EditorUtil.ensureVisible(viewer.getTextWidget()); >+ } >+ } >+ }); >+ >+ viewer.getControl().setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER); >+ >+ // drop & drag support, under review >+ // TODO: reenable D&D support org.eclipse.mylyn.internal.sandbox.ui.editors.TaskEditorDropTarget.addDropTargetSupport(viewer); >+ } >+ >+ // enable cut/copy/paste >+ EditorUtil.setTextViewer(viewer.getTextWidget(), viewer); >+ viewer.setEditable(!readOnly); >+ viewer.getTextWidget().setFont(getFont()); >+ toolkit.adapt(viewer.getControl(), false, false); >+ >+ TaskHyperlinkTextPresentationManager hyperlinkTextPresentationManager = new TaskHyperlinkTextPresentationManager(); >+ hyperlinkTextPresentationManager.setHyperlinkDetector(new TaskHyperlinkDetector()); >+ hyperlinkTextPresentationManager.install(viewer); >+ >+ return viewer; >+ } >+ >+ @Override >+ public void createControl(Composite parent, FormToolkit toolkit) { >+ this.toolkit = toolkit; >+ >+ editorComposite = new Composite(parent, SWT.NULL); >+ editorLayout = new StackLayout() { >+ @Override >+ protected Point computeSize(Composite composite, int hint, int hint2, boolean flushCache) { >+ return topControl.computeSize(hint, hint2, flushCache); >+ } >+ }; >+ editorComposite.setLayout(editorLayout); >+ setControl(editorComposite); >+ >+ if (!isReadOnly() && (styles & TasksUiInternal.SWT_NO_SCROLL) == 0) { >+ styles |= SWT.V_SCROLL; >+ } >+ >+ if (isReadOnly()) { >+ editorViewer = extension.createViewer(taskRepository, editorComposite, styles); >+ } else { >+ editorViewer = extension.createEditor(taskRepository, editorComposite, styles); >+ editorViewer.getTextWidget().addFocusListener(new FocusListener() { >+ public void focusGained(FocusEvent e) { >+ setContext(); >+ } >+ >+ public void focusLost(FocusEvent e) { >+ unsetContext(); >+ } >+ }); >+ editorViewer.getTextWidget().addDisposeListener(new DisposeListener() { >+ public void widgetDisposed(DisposeEvent e) { >+ unsetContext(); >+ } >+ }); >+ } >+ configureEditor(editorViewer, isReadOnly()); >+ >+ show(editorViewer); >+ } >+ >+ private SourceViewer createDefaultEditor(Composite parent, int styles) { >+ SourceViewer defaultEditor = new RepositoryTextViewer(taskRepository, parent, styles | SWT.WRAP); >+ >+ RepositoryTextViewerConfiguration viewerConfig = new RepositoryTextViewerConfiguration(taskRepository, >+ isSpellCheckingEnabled()); >+ viewerConfig.setMode(getMode()); >+ defaultEditor.configure(viewerConfig); >+ >+ return defaultEditor; >+ } >+ >+ private SourceViewer getDefaultViewer() { >+ if (defaultViewer == null) { >+ defaultViewer = createDefaultEditor(editorComposite, styles); >+ configureEditor(defaultViewer, isReadOnly()); >+ >+ // fixed font size >+ defaultViewer.getTextWidget().setFont(JFaceResources.getFontRegistry().get(JFaceResources.TEXT_FONT)); >+ // adapt maximize action >+ defaultViewer.getControl().setData(EditorUtil.KEY_TOGGLE_TO_MAXIMIZE_ACTION, >+ editorViewer.getControl().getData(EditorUtil.KEY_TOGGLE_TO_MAXIMIZE_ACTION)); >+ // adapt menu to the new viewer >+ installMenu(defaultViewer.getControl(), editorViewer.getControl().getMenu()); >+ } >+ return defaultViewer; >+ } >+ >+ private void installMenu(final Control control, Menu menu) { >+ if (menu != null) { >+ control.setMenu(menu); >+ control.addDisposeListener(new DisposeListener() { >+ public void widgetDisposed(DisposeEvent e) { >+ control.setMenu(null); >+ } >+ }); >+ } >+ } >+ >+ private Font getFont() { >+ IThemeManager themeManager = PlatformUI.getWorkbench().getThemeManager(); >+ Font font = themeManager.getCurrentTheme().getFontRegistry().get(CommonThemes.FONT_EDITOR_COMMENT); >+ return font; >+ } >+ >+ private SourceViewer getPreviewViewer() { >+ // construct as needed >+ if (previewViewer == null) { >+ previewViewer = extension.createViewer(taskRepository, editorComposite, styles); >+ configureEditor(previewViewer, true); >+ // adapt maximize action >+ previewViewer.getControl().setData(EditorUtil.KEY_TOGGLE_TO_MAXIMIZE_ACTION, >+ editorViewer.getControl().getData(EditorUtil.KEY_TOGGLE_TO_MAXIMIZE_ACTION)); >+ } >+ Document document = new Document(editorViewer.getDocument().get()); >+ previewViewer.setDocument(document); >+ return previewViewer; >+ } >+ >+ public SourceViewer getEditorViewer() { >+ return editorViewer; >+ } >+ >+ @Override >+ public SourceViewer getViewer() { >+ if (defaultViewer != null && editorLayout.topControl == defaultViewer.getControl()) { >+ return defaultViewer; >+ } else if (previewViewer != null && editorLayout.topControl == previewViewer.getControl()) { >+ return previewViewer; >+ } else { >+ return editorViewer; >+ } >+ } >+ >+ private void setContext() { >+ if (contextActivation != null) { >+ contextService.deactivateContext(contextActivation); >+ contextActivation = null; >+ } >+ if (contextService != null && extension.getEditorContextId() != null) { >+ contextActivation = contextService.activateContext(extension.getEditorContextId()); >+ } >+ } >+ >+ /** >+ * Brings <code>viewer</code> to top. >+ */ >+ private void show(SourceViewer viewer) { >+ editorLayout.topControl = viewer.getControl(); >+ editorComposite.layout(); >+ viewer.getControl().setFocus(); >+ } >+ >+ public void showDefault() { >+ show(getDefaultViewer()); >+ } >+ >+ public void showPreview() { >+ if (!isReadOnly()) { >+ show(getPreviewViewer()); >+ } >+ } >+ >+ public void showEditor() { >+ show(getEditorViewer()); >+ } >+ >+ private void unsetContext() { >+ if (contextActivation != null) { >+ contextService.deactivateContext(contextActivation); >+ contextActivation = null; >+ } >+ } >+ >+} >Index: src/org/eclipse/mylyn/internal/tasks/ui/commands/ViewSourceHandler.java >=================================================================== >RCS file: src/org/eclipse/mylyn/internal/tasks/ui/commands/ViewSourceHandler.java >diff -N src/org/eclipse/mylyn/internal/tasks/ui/commands/ViewSourceHandler.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/mylyn/internal/tasks/ui/commands/ViewSourceHandler.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,103 @@ >+/******************************************************************************* >+ * Copyright (c) 2004, 2008 Jingwen Ou and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Jingwen Ou - initial API and implementation >+ * Tasktop Technologies - improvements >+ *******************************************************************************/ >+ >+package org.eclipse.mylyn.internal.tasks.ui.commands; >+ >+import java.util.Map; >+ >+import org.eclipse.core.commands.AbstractHandler; >+import org.eclipse.core.commands.ExecutionEvent; >+import org.eclipse.core.commands.ExecutionException; >+import org.eclipse.core.commands.HandlerEvent; >+import org.eclipse.jface.action.IAction; >+import org.eclipse.mylyn.internal.tasks.ui.editors.EditorUtil; >+import org.eclipse.swt.custom.StyledText; >+import org.eclipse.swt.widgets.Control; >+import org.eclipse.ui.IEditorSite; >+import org.eclipse.ui.IWorkbenchPart; >+import org.eclipse.ui.IWorkbenchSite; >+import org.eclipse.ui.PlatformUI; >+import org.eclipse.ui.commands.IElementUpdater; >+import org.eclipse.ui.forms.editor.FormEditor; >+import org.eclipse.ui.forms.editor.IFormPage; >+import org.eclipse.ui.handlers.HandlerUtil; >+import org.eclipse.ui.menus.UIElement; >+ >+/** >+ * @author Jingwen Ou >+ * @author Steffen Pingel >+ */ >+public class ViewSourceHandler extends AbstractHandler implements IElementUpdater { >+ >+ private static boolean checked; >+ >+ private static ViewSourceHandler instance; >+ >+ public ViewSourceHandler() { >+ instance = this; >+ } >+ >+ public boolean isChecked() { >+ return checked; >+ } >+ >+ public static void setChecked(boolean checked) { >+ ViewSourceHandler.checked = checked; >+ if (instance != null) { >+ instance.fireHandlerChanged(new HandlerEvent(instance, true, false)); >+ } >+ } >+ >+ private Control getFocusControl() { >+ return PlatformUI.getWorkbench().getDisplay().getFocusControl(); >+ } >+ >+ @Override >+ public boolean isEnabled() { >+ Control focusControl = getFocusControl(); >+ if (focusControl instanceof StyledText && focusControl.getData(VIEW_SOURCE_ACTION) instanceof IAction) { >+ return true; >+ } >+ >+ return false; >+ } >+ >+ public static final String VIEW_SOURCE_ACTION = "viewSourceAction"; >+ >+ public Object execute(ExecutionEvent event) throws ExecutionException { >+ IWorkbenchSite site = HandlerUtil.getActiveSite(event); >+ if (site instanceof IEditorSite) { >+ IWorkbenchPart part = ((IEditorSite) site).getPart(); >+ if (part instanceof FormEditor) { >+ IFormPage page = ((FormEditor) part).getActivePageInstance(); >+ Control focusedControl = EditorUtil.getFocusControl(page); >+ if (focusedControl != null) { >+ Object data = focusedControl.getData(VIEW_SOURCE_ACTION); >+ if (data instanceof IAction) { >+ IAction action = (IAction) data; >+ action.setChecked(!action.isChecked()); >+ action.run(); >+ setChecked(action.isChecked()); >+ EditorUtil.reflow(focusedControl); >+ } >+ } >+ } >+ } >+ return null; >+ } >+ >+ @SuppressWarnings("unchecked") >+ public void updateElement(UIElement element, Map parameters) { >+ element.setChecked(checked); >+ } >+ >+} >Index: src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorExtensions.java >=================================================================== >RCS file: src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorExtensions.java >diff -N src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorExtensions.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorExtensions.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,166 @@ >+/******************************************************************************* >+ * Copyright (c) 2004, 2008 David Green and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * David Green - initial API and implementation >+ *******************************************************************************/ >+ >+package org.eclipse.mylyn.internal.tasks.ui.editors; >+ >+import java.util.HashMap; >+import java.util.Map; >+import java.util.SortedSet; >+import java.util.TreeSet; >+ >+import org.eclipse.core.runtime.Assert; >+import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.Status; >+import org.eclipse.mylyn.commons.core.StatusHandler; >+import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin; >+import org.eclipse.mylyn.tasks.core.TaskRepository; >+import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorExtension; >+ >+/** >+ * @author David Green >+ */ >+public class TaskEditorExtensions { >+ >+ public static final String REPOSITORY_PROPERTY_EDITOR_EXTENSION = "editorExtension"; >+ >+ private static Map<String, RegisteredTaskEditorExtension> extensionsById = new HashMap<String, RegisteredTaskEditorExtension>(); >+ >+ private static Map<String, String> associationByConnectorKind = new HashMap<String, String>(); >+ >+ private static boolean initialized; >+ >+ public static SortedSet<RegisteredTaskEditorExtension> getTaskEditorExtensions() { >+ init(); >+ return new TreeSet<RegisteredTaskEditorExtension>(extensionsById.values()); >+ } >+ >+ public static void addTaskEditorExtension(String id, String name, AbstractTaskEditorExtension extension) { >+ Assert.isNotNull(id); >+ RegisteredTaskEditorExtension previous = extensionsById.put(id, new RegisteredTaskEditorExtension(extension, >+ id, name)); >+ if (previous != null) { >+ StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Duplicate taskEditorExtension id=" >+ + id, null)); >+ } >+ } >+ >+ public static void addRepositoryAssociation(String connectorKind, String extensionId) { >+ if (connectorKind == null || extensionId == null) { >+ throw new IllegalArgumentException(); >+ } >+ String previous = associationByConnectorKind.put(connectorKind, extensionId); >+ if (previous != null) { >+ StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, String.format( >+ "Duplicate association for repository %s: %s replaces %s", connectorKind, extensionId, previous), >+ null)); >+ } >+ } >+ >+ /** >+ * get a task editor extension for a specific repository >+ * >+ * @param taskRepository >+ * @return the extension, or null if there is none >+ * >+ * @see #getDefaultTaskEditorExtension(TaskRepository) >+ */ >+ public static AbstractTaskEditorExtension getTaskEditorExtension(TaskRepository taskRepository) { >+ init(); >+ String extensionId = getTaskEditorExtensionId(taskRepository); >+ if (extensionId != null) { >+ RegisteredTaskEditorExtension taskEditorExtension = extensionsById.get(extensionId); >+ return taskEditorExtension == null ? null : taskEditorExtension.getExtension(); >+ } >+ return null; >+ } >+ >+ public static String getTaskEditorExtensionId(TaskRepository taskRepository) { >+ init(); >+ String id = taskRepository.getProperty(REPOSITORY_PROPERTY_EDITOR_EXTENSION); >+ if (id == null) { >+ id = getDefaultTaskEditorExtensionId(taskRepository); >+ } >+ return id; >+ } >+ >+ public static void setTaskEditorExtensionId(TaskRepository repository, String editorExtensionId) { >+ repository.setProperty(REPOSITORY_PROPERTY_EDITOR_EXTENSION, editorExtensionId); >+ } >+ >+ public static String getDefaultTaskEditorExtensionId(TaskRepository taskRepository) { >+ init(); >+ return associationByConnectorKind.get(taskRepository.getConnectorKind()); >+ } >+ >+ /** >+ * get a default task editor extension for a specific repository >+ * >+ * @param taskRepository >+ * @return the extension, or null if there is none >+ * >+ * @see #getTaskEditorExtension(TaskRepository) >+ */ >+ public static AbstractTaskEditorExtension getDefaultTaskEditorExtension(TaskRepository taskRepository) { >+ init(); >+ String extensionId = getDefaultTaskEditorExtensionId(taskRepository); >+ if (extensionId != null) { >+ RegisteredTaskEditorExtension taskEditorExtension = extensionsById.get(extensionId); >+ return taskEditorExtension == null ? null : taskEditorExtension.getExtension(); >+ } >+ return null; >+ } >+ >+ private static void init() { >+ if (!initialized) { >+ initialized = true; >+ TaskEditorExtensionReader.initExtensions(); >+ } >+ } >+ >+ public static class RegisteredTaskEditorExtension implements Comparable<RegisteredTaskEditorExtension> { >+ >+ private final String id; >+ >+ private final String name; >+ >+ private final AbstractTaskEditorExtension extension; >+ >+ private RegisteredTaskEditorExtension(AbstractTaskEditorExtension extension, String id, String name) { >+ this.extension = extension; >+ this.id = id; >+ this.name = name; >+ } >+ >+ public String getId() { >+ return id; >+ } >+ >+ public String getName() { >+ return name; >+ } >+ >+ public AbstractTaskEditorExtension getExtension() { >+ return extension; >+ } >+ >+ public int compareTo(RegisteredTaskEditorExtension o) { >+ if (o == this) { >+ return 0; >+ } >+ int i = name.compareTo(o.name); >+ if (i == 0) { >+ i = id.compareTo(o.id); >+ } >+ return i; >+ } >+ } >+ >+} >#P org.eclipse.mylyn.wikitext.textile.ui >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/sandbox/org.eclipse.mylyn.wikitext.textile.ui/plugin.xml,v >retrieving revision 1.6 >diff -u -r1.6 plugin.xml >--- plugin.xml 6 Oct 2008 15:33:47 -0000 1.6 >+++ plugin.xml 6 Oct 2008 15:37:59 -0000 >@@ -61,7 +61,7 @@ > </templates> > </extension> > <extension >- point="org.eclipse.mylyn.sandbox.ui.taskEditorExtensions"> >+ point="org.eclipse.mylyn.tasks.ui.taskEditorExtensions"> > <taskEditorExtension > class="org.eclipse.mylyn.internal.wikitext.textile.ui.editors.TextileTaskEditorExtension" > id="org.eclipse.mylyn.wikitext.textile.core.ui.taskEditorExtension"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 244579
:
110874
|
110875
| 114322 |
114323
|
115335
|
115336