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 75019 Details for
Bug 195514
support spell checking in description, comment and summary field
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
spell checking support for summary line
clipboard.txt (text/plain), 9.43 KB, created by
Raphael Ackermann
on 2007-07-31 06:55:48 EDT
(
hide
)
Description:
spell checking support for summary line
Filename:
MIME Type:
Creator:
Raphael Ackermann
Created:
2007-07-31 06:55:48 EDT
Size:
9.43 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.tasks.ui >Index: src/org/eclipse/mylyn/tasks/ui/editors/AbstractNewRepositoryTaskEditor.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractNewRepositoryTaskEditor.java,v >retrieving revision 1.42 >diff -u -r1.42 AbstractNewRepositoryTaskEditor.java >--- src/org/eclipse/mylyn/tasks/ui/editors/AbstractNewRepositoryTaskEditor.java 19 Jul 2007 00:45:11 -0000 1.42 >+++ src/org/eclipse/mylyn/tasks/ui/editors/AbstractNewRepositoryTaskEditor.java 31 Jul 2007 10:44:48 -0000 >@@ -24,7 +24,6 @@ > import org.eclipse.jface.viewers.SelectionChangedEvent; > import org.eclipse.jface.viewers.StructuredSelection; > import org.eclipse.mylyn.internal.tasks.core.TaskCategory; >-import org.eclipse.mylyn.internal.tasks.ui.TaskListColorsAndFonts; > import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages; > import org.eclipse.mylyn.internal.tasks.ui.TasksUiPreferenceConstants; > import org.eclipse.mylyn.internal.tasks.ui.editors.RepositoryTaskOutlineNode; >@@ -43,7 +42,6 @@ > import org.eclipse.swt.events.ModifyListener; > import org.eclipse.swt.events.SelectionAdapter; > import org.eclipse.swt.events.SelectionEvent; >-import org.eclipse.swt.graphics.Font; > import org.eclipse.swt.layout.GridData; > import org.eclipse.swt.layout.GridLayout; > import org.eclipse.swt.widgets.Button; >@@ -63,7 +61,6 @@ > import org.eclipse.ui.forms.widgets.FormToolkit; > import org.eclipse.ui.forms.widgets.ImageHyperlink; > import org.eclipse.ui.forms.widgets.Section; >-import org.eclipse.ui.themes.IThemeManager; > > /** > * An editor used to view a locally created bug that does not yet exist on a server. >@@ -143,6 +140,7 @@ > > @Override > protected void createSummaryLayout(Composite composite) { >+ > Composite summaryComposite = getManagedForm().getToolkit().createComposite(composite); > GridLayout summaryLayout = new GridLayout(2, false); > summaryLayout.verticalSpacing = 0; >@@ -150,28 +148,35 @@ > summaryComposite.setLayout(summaryLayout); > GridDataFactory.fillDefaults().grab(true, false).applyTo(summaryComposite); > >- RepositoryTaskAttribute attribute = taskData.getAttribute(RepositoryTaskAttribute.SUMMARY); >- if (attribute != null) { >- createLabel(summaryComposite, attribute); >- summaryText = createTextField(summaryComposite, attribute, SWT.FLAT); >- summaryText.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER); >- IThemeManager themeManager = getSite().getWorkbenchWindow().getWorkbench().getThemeManager(); >- Font summaryFont = themeManager.getCurrentTheme().getFontRegistry().get( >- TaskListColorsAndFonts.TASK_EDITOR_FONT); >- summaryText.setFont(summaryFont); >- >- GridDataFactory.fillDefaults().grab(true, false).hint(DESCRIPTION_WIDTH, SWT.DEFAULT).applyTo(summaryText); >- summaryText.addModifyListener(new ModifyListener() { >- public void modifyText(ModifyEvent e) { >- String sel = summaryText.getText(); >- if (!(newSummary.equals(sel))) { >- newSummary = sel; >- markDirty(true); >+ if (taskData != null) { >+ final RepositoryTaskAttribute attribute = taskData.getAttribute(RepositoryTaskAttribute.SUMMARY); >+ if (attribute != null) { >+ >+ newSummaryTextViewer = addTextEditor(repository, summaryComposite, attribute.getValue(), true, SWT.FLAT); >+ newSummaryTextViewer.setEditable(true); >+ >+ GridDataFactory.fillDefaults().grab(true, false).hint(DESCRIPTION_WIDTH, SUMMARY_HEIGHT).applyTo( >+ newSummaryTextViewer.getControl()); >+ newSummaryTextViewer.getControl().setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER); >+ >+ newSummaryTextViewer.getTextWidget().addModifyListener(new ModifyListener() { >+ >+ public void modifyText(ModifyEvent e) { >+ String sel = summaryText.getText(); >+ if (!(newSummary.equals(sel))) { >+ newSummary = sel; >+ markDirty(true); >+ } > } >- } >- }); >+ }); >+ >+ //raphael ackermann: not sure whether a listener is needed here. >+ // newSummaryTextViewer.getTextWidget().addListener(SWT.FocusIn, new NewCommentListener()); >+ summaryText = newSummaryTextViewer.getTextWidget(); >+ } > } > getManagedForm().getToolkit().paintBordersFor(summaryComposite); >+ > } > > // @Override >Index: src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java,v >retrieving revision 1.206 >diff -u -r1.206 AbstractRepositoryTaskEditor.java >--- src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java 28 Jul 2007 23:14:52 -0000 1.206 >+++ src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java 31 Jul 2007 10:44:50 -0000 >@@ -232,6 +232,8 @@ > > private static final int DESCRIPTION_HEIGHT = 10 * 14; > >+ protected static final int SUMMARY_HEIGHT = 20; >+ > private static final String LABEL_BUTTON_SUBMIT = "Submit"; > > private static final String LABEL_COPY_TO_CLIPBOARD = "Copy to Clipboard"; >@@ -250,7 +252,7 @@ > > private boolean expandedStateAttributes = false; > >- protected Text summaryText; >+ protected StyledText summaryText; > > protected Button submitButton; > >@@ -264,6 +266,8 @@ > > private Composite editorComposite; > >+ protected TextViewer newSummaryTextViewer; >+ > private TextViewer newCommentTextViewer; > > private org.eclipse.swt.widgets.List ccList; >@@ -809,7 +813,42 @@ > > protected void createSummaryLayout(Composite composite) { > >- addSummaryText(composite); >+ Composite summaryComposite = toolkit.createComposite(composite); >+ GridLayout summaryLayout = new GridLayout(2, false); >+ summaryLayout.verticalSpacing = 0; >+ summaryLayout.marginHeight = 2; >+ summaryComposite.setLayout(summaryLayout); >+ GridDataFactory.fillDefaults().grab(true, false).applyTo(summaryComposite); >+ >+ if (taskData != null) { >+ final RepositoryTaskAttribute attribute = taskData.getAttribute(RepositoryTaskAttribute.SUMMARY); >+ if (attribute != null) { >+ >+ newSummaryTextViewer = addTextEditor(repository, summaryComposite, attribute.getValue(), true, SWT.FLAT); >+ newSummaryTextViewer.setEditable(true); >+ >+ GridDataFactory.fillDefaults().grab(true, false).hint(DESCRIPTION_WIDTH, SUMMARY_HEIGHT).applyTo( >+ newSummaryTextViewer.getControl()); >+ newSummaryTextViewer.getControl().setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER); >+ >+ newSummaryTextViewer.getTextWidget().addModifyListener(new ModifyListener() { >+ >+ public void modifyText(ModifyEvent e) { >+ String sel = summaryText.getText(); >+ RepositoryTaskAttribute a = taskData.getAttribute(RepositoryTaskAttribute.SUMMARY); >+ if (!(a.getValue().equals(sel))) { >+ a.setValue(sel); >+ markDirty(true); >+ } >+ } >+ }); >+ >+ //raphael ackermann: not sure whether a listener is needed here. >+ // newSummaryTextViewer.getTextWidget().addListener(SWT.FocusIn, new NewCommentListener()); >+ summaryText = newSummaryTextViewer.getTextWidget(); >+ } >+ } >+ toolkit.paintBordersFor(summaryComposite); > > Composite headerInfoComposite = toolkit.createComposite(composite); > GridLayout headerLayout = new GridLayout(11, false); >@@ -1218,48 +1257,6 @@ > return false; > } > >- /** >- * Adds a text field to display and edit the task's summary. >- * >- * @param attributesComposite >- * The composite to add the text field to. >- */ >- protected void addSummaryText(Composite attributesComposite) { >- Composite summaryComposite = toolkit.createComposite(attributesComposite); >- GridLayout summaryLayout = new GridLayout(2, false); >- summaryLayout.verticalSpacing = 0; >- summaryLayout.marginHeight = 2; >- summaryComposite.setLayout(summaryLayout); >- GridDataFactory.fillDefaults().grab(true, false).applyTo(summaryComposite); >- >- if (taskData != null) { >- RepositoryTaskAttribute attribute = taskData.getAttribute(RepositoryTaskAttribute.SUMMARY); >- if (attribute != null) { >- // Label summaryLabel = createLabel(summaryComposite, >- // attribute); >- // summaryLabel.setFont(TITLE_FONT); >- summaryText = createTextField(summaryComposite, attribute, SWT.FLAT); >- IThemeManager themeManager = getSite().getWorkbenchWindow().getWorkbench().getThemeManager(); >- Font summaryFont = themeManager.getCurrentTheme().getFontRegistry().get( >- TaskListColorsAndFonts.TASK_EDITOR_FONT); >- summaryText.setFont(summaryFont); >- >- GridDataFactory.fillDefaults().grab(true, false).hint(DESCRIPTION_WIDTH, SWT.DEFAULT).applyTo( >- summaryText); >- summaryText.addModifyListener(new ModifyListener() { >- public void modifyText(ModifyEvent e) { >- String sel = summaryText.getText(); >- RepositoryTaskAttribute a = taskData.getAttribute(RepositoryTaskAttribute.SUMMARY); >- if (!(a.getValue().equals(sel))) { >- a.setValue(sel); >- markDirty(true); >- } >- } >- }); >- } >- } >- toolkit.paintBordersFor(summaryComposite); >- } > > protected boolean supportsAttachmentDelete() { > return false; >@@ -2789,7 +2786,8 @@ > public void handleEvent(Event event) { > fireSelectionChanged(new SelectionChangedEvent(selectionProvider, new StructuredSelection( > new RepositoryTaskSelection(taskData.getId(), taskData.getRepositoryUrl(), >- taskData.getRepositoryKind(), "New Comment", false, taskData.getSummary())))); >+ taskData.getRepositoryKind(), getSectionLabel(SECTION_NAME.NEWCOMMENT_SECTION), false, >+ taskData.getSummary())))); > } > }
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 195514
:
75019
|
75020
|
75922
|
75923
|
76388
|
76389