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 74801 Details for
Bug 29692
[find/replace] Highlight all matches in editor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Highlight All source patch (updated for 20070724-0800 HEAD)
findreplace-highlightall.diff (text/plain), 25.43 KB, created by
Cagatay Calli
on 2007-07-27 11:36:07 EDT
(
hide
)
Description:
Highlight All source patch (updated for 20070724-0800 HEAD)
Filename:
MIME Type:
Creator:
Cagatay Calli
Created:
2007-07-27 11:36:07 EDT
Size:
25.43 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.workbench.texteditor >Index: src/org/eclipse/ui/texteditor/EditorMessages.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.properties,v >retrieving revision 1.39 >diff -u -r1.39 EditorMessages.properties >--- src/org/eclipse/ui/texteditor/EditorMessages.properties 26 Jan 2007 12:41:54 -0000 1.39 >+++ src/org/eclipse/ui/texteditor/EditorMessages.properties 27 Jul 2007 14:55:00 -0000 >@@ -118,3 +118,6 @@ > Editor_MoveLines_IllegalMove_status= Move not possible - Uncheck "Show Source of Selected Element Only" to see the entire document > > Editor_error_clipboard_copy_failed_message= Copy to clipboard failed. >+FindReplaceDialog_FindReplace_HighlightAllButton_label=Highlight All >+FindReplaceDialog_FindReplace_Status_highlights_label={0} matches highlighted >+FindReplaceDialog_FindReplace_Status_highlight_label=1 Match highlighted >Index: src/org/eclipse/ui/texteditor/FindReplaceDialog.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/FindReplaceDialog.java,v >retrieving revision 1.72 >diff -u -r1.72 FindReplaceDialog.java >--- src/org/eclipse/ui/texteditor/FindReplaceDialog.java 24 Jul 2007 09:25:47 -0000 1.72 >+++ src/org/eclipse/ui/texteditor/FindReplaceDialog.java 27 Jul 2007 14:55:03 -0000 >@@ -7,6 +7,7 @@ > * > * Contributors: > * IBM Corporation - initial API and implementation >+ * Cagatay Calli - https://bugs.eclipse.org/bugs/show_bug.cgi?id=29692 > *******************************************************************************/ > package org.eclipse.ui.texteditor; > >@@ -16,6 +17,19 @@ > import java.util.Set; > import java.util.regex.PatternSyntaxException; > >+import org.eclipse.jface.dialogs.Dialog; >+import org.eclipse.jface.dialogs.IDialogSettings; >+import org.eclipse.jface.fieldassist.ComboContentAdapter; >+import org.eclipse.jface.fieldassist.FieldDecoration; >+import org.eclipse.jface.fieldassist.FieldDecorationRegistry; >+import org.eclipse.jface.resource.JFaceColors; >+import org.eclipse.jface.text.IFindReplaceTarget; >+import org.eclipse.jface.text.IFindReplaceTargetExtension; >+import org.eclipse.jface.text.IFindReplaceTargetExtension3; >+import org.eclipse.jface.text.IFindReplaceTargetExtension4; >+import org.eclipse.jface.text.IRegion; >+import org.eclipse.jface.text.Region; >+import org.eclipse.jface.text.TextUtilities; > import org.eclipse.swt.SWT; > import org.eclipse.swt.custom.BusyIndicator; > import org.eclipse.swt.events.ModifyEvent; >@@ -36,21 +50,6 @@ > import org.eclipse.swt.widgets.Group; > import org.eclipse.swt.widgets.Label; > import org.eclipse.swt.widgets.Shell; >- >-import org.eclipse.jface.dialogs.Dialog; >-import org.eclipse.jface.dialogs.IDialogSettings; >-import org.eclipse.jface.fieldassist.ComboContentAdapter; >-import org.eclipse.jface.fieldassist.FieldDecoration; >-import org.eclipse.jface.fieldassist.FieldDecorationRegistry; >-import org.eclipse.jface.resource.JFaceColors; >- >-import org.eclipse.jface.text.IFindReplaceTarget; >-import org.eclipse.jface.text.IFindReplaceTargetExtension; >-import org.eclipse.jface.text.IFindReplaceTargetExtension3; >-import org.eclipse.jface.text.IRegion; >-import org.eclipse.jface.text.Region; >-import org.eclipse.jface.text.TextUtilities; >- > import org.eclipse.ui.IEditorPart; > import org.eclipse.ui.IWorkbenchPage; > import org.eclipse.ui.IWorkbenchWindow; >@@ -203,6 +202,19 @@ > */ > private boolean fGiveFocusToFindField= true; > >+ /** >+ * "Highlight All" toggle button >+ * @since 3.4 >+ */ >+ private Button fHighlightAllButton; >+ >+ /** >+ * whether anything is highlighted >+ * after pressing "Highlight All" >+ * @since 3.4 >+ */ >+ private boolean fIsHighlighted; >+ > > /** > * Creates a new dialog with the given shell as parent. >@@ -341,11 +353,41 @@ > > // Make the all the buttons the same size as the Remove Selection button. > fReplaceAllButton.setEnabled(isEditable()); >+ >+ fHighlightAllButton = new Button(panel,SWT.TOGGLE); >+ fHighlightAllButton.setText(EditorMessages.FindReplaceDialog_FindReplace_HighlightAllButton_label); >+ fHighlightAllButton.setSelection(false); >+ fHighlightAllButton.addSelectionListener(new SelectionAdapter(){ >+ public void widgetSelected(SelectionEvent e){ >+ if(fHighlightAllButton.getSelection()){ >+ performHighlightAll(); >+ updateFindHistory(); >+ } >+ else { >+ if(fIsHighlighted){ >+ clearHighlights(); >+ } >+ } >+ } >+ }); >+ setGridData(fHighlightAllButton, SWT.FILL, true, SWT.FILL, false); > > return panel; > } > > /** >+ * Clears all highlights and corresponding annotations. >+ * >+ * @since 3.4 >+ */ >+ private void clearHighlights() { >+ if(fTarget instanceof IFindReplaceTargetExtension4){ >+ ((IFindReplaceTargetExtension4) fTarget).clearHighlights(); >+ } >+ fIsHighlighted = false; >+ } >+ >+ /** > * Creates the options configuration section of the find replace dialog. > * > * @param parent the parent composite >@@ -947,7 +989,11 @@ > * Removes focus changed listener from browser and stores settings for re-open. > */ > private void handleDialogClose() { >- >+ // clear highlights >+ if(fIsHighlighted){ >+ clearHighlights(); >+ } >+ > // remove listeners > if (okToUse(fFindField)) { > fFindField.removeModifyListener(fFindModifyListener); >@@ -1827,4 +1873,45 @@ > settings.put(sectionName, names); > > } >+ >+ /** >+ * Highlights all occurrences of the user's findString >+ * in the text of the target. >+ * >+ * @since 3.4 >+ */ >+ private void performHighlightAll() { >+ >+ String findString= getFindString(); >+ int matchCount; >+ >+ if(!(fTarget instanceof IFindReplaceTargetExtension4)) return; >+ >+ if (findString != null && findString.length() > 0) { >+ >+ try { >+ matchCount= ((IFindReplaceTargetExtension4) fTarget).highlightAll(findString, isCaseSensitiveSearch(), isWholeWordSearch(), isRegExSearchAvailableAndChecked()); >+ >+ if (matchCount != 0) { >+ if(matchCount == 1){ >+ String msg = EditorMessages.FindReplaceDialog_FindReplace_Status_highlight_label; >+ statusMessage(msg); >+ } else { >+ String msg= EditorMessages.FindReplaceDialog_FindReplace_Status_highlights_label; >+ msg= NLSUtility.format(msg, String.valueOf(matchCount)); >+ statusMessage(msg); >+ } >+ fIsHighlighted = true; >+ } else { >+ statusMessage(EditorMessages.FindReplace_Status_noMatch_label); >+ fIsHighlighted = false; >+ } >+ } catch (PatternSyntaxException ex) { >+ statusError(ex.getLocalizedMessage()); >+ } catch (IllegalStateException ex) { >+ // we don't keep state in this dialog >+ } >+ } >+ writeSelection(); >+ } > } >Index: src/org/eclipse/ui/texteditor/EditorMessages.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.java,v >retrieving revision 1.8 >diff -u -r1.8 EditorMessages.java >--- src/org/eclipse/ui/texteditor/EditorMessages.java 26 Jan 2007 12:41:54 -0000 1.8 >+++ src/org/eclipse/ui/texteditor/EditorMessages.java 27 Jul 2007 14:55:00 -0000 >@@ -7,6 +7,7 @@ > * > * Contributors: > * IBM Corporation - initial API and implementation >+ * Cagatay Calli - https://bugs.eclipse.org/bugs/show_bug.cgi?id=29692 > *******************************************************************************/ > package org.eclipse.ui.texteditor; > >@@ -71,6 +72,9 @@ > public static String Editor_mark_status_message_mark_set; > public static String Editor_mark_status_message_mark_cleared; > public static String Editor_mark_status_message_mark_swapped; >+ public static String FindReplaceDialog_FindReplace_HighlightAllButton_label; >+ public static String FindReplaceDialog_FindReplace_Status_highlight_label; >+ public static String FindReplaceDialog_FindReplace_Status_highlights_label; > public static String MarkRegionTarget_markNotSet; > public static String MarkRegionTarget_markNotVisible; > public static String Editor_FindIncremental_name; >Index: src/org/eclipse/ui/texteditor/FindReplaceTarget.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/FindReplaceTarget.java,v >retrieving revision 1.12 >diff -u -r1.12 FindReplaceTarget.java >--- src/org/eclipse/ui/texteditor/FindReplaceTarget.java 20 Jun 2007 14:30:51 -0000 1.12 >+++ src/org/eclipse/ui/texteditor/FindReplaceTarget.java 27 Jul 2007 14:55:03 -0000 >@@ -7,6 +7,7 @@ > * > * Contributors: > * IBM Corporation - initial API and implementation >+ * Cagatay Calli - https://bugs.eclipse.org/bugs/show_bug.cgi?id=29692 > *******************************************************************************/ > package org.eclipse.ui.texteditor; > >@@ -16,6 +17,7 @@ > import org.eclipse.jface.text.IFindReplaceTarget; > import org.eclipse.jface.text.IFindReplaceTargetExtension; > import org.eclipse.jface.text.IFindReplaceTargetExtension3; >+import org.eclipse.jface.text.IFindReplaceTargetExtension4; > import org.eclipse.jface.text.IRegion; > > >@@ -23,7 +25,7 @@ > * Internal find/replace target wrapping the editor's source viewer. > * @since 2.1 > */ >-class FindReplaceTarget implements IFindReplaceTarget, IFindReplaceTargetExtension, IFindReplaceTargetExtension2, IFindReplaceTargetExtension3 { >+class FindReplaceTarget implements IFindReplaceTarget, IFindReplaceTargetExtension, IFindReplaceTargetExtension2, IFindReplaceTargetExtension3, IFindReplaceTargetExtension4 { > > /** The editor */ > private AbstractTextEditor fEditor; >@@ -219,4 +221,19 @@ > public boolean validateTargetState() { > return fEditor.validateEditorInputState(); > } >+ >+ /* >+ * @see org.eclipse.jface.text.IFindReplaceTargetExtension4#highlightAll(String, boolean, boolean, boolean) >+ */ >+ public int highlightAll(String findString, boolean caseSensitive, >+ boolean wholeWord, boolean regExSearch) { >+ return ((IFindReplaceTargetExtension4) fTarget).highlightAll(findString, caseSensitive, wholeWord, regExSearch); >+ } >+ >+ /* >+ * @see org.eclipse.jface.text.IFindReplaceTargetExtension4#clearHighlights() >+ */ >+ public void clearHighlights() { >+ ((IFindReplaceTargetExtension4) fTarget).clearHighlights(); >+ } > } >Index: build.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench.texteditor/build.properties,v >retrieving revision 1.13 >diff -u -r1.13 build.properties >--- build.properties 17 Jun 2005 15:48:43 -0000 1.13 >+++ build.properties 27 Jul 2007 14:55:00 -0000 >@@ -1,5 +1,5 @@ > ############################################################################### >-# Copyright (c) 2000, 2005 IBM Corporation and others. >+# Copyright (c) 2000, 2007 IBM Corporation 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 >#P org.eclipse.jface.text >Index: src/org/eclipse/jface/text/TextViewer.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewer.java,v >retrieving revision 1.180 >diff -u -r1.180 TextViewer.java >--- src/org/eclipse/jface/text/TextViewer.java 20 Jun 2007 14:30:54 -0000 1.180 >+++ src/org/eclipse/jface/text/TextViewer.java 27 Jul 2007 14:55:24 -0000 >@@ -7,6 +7,7 @@ > * > * Contributors: > * IBM Corporation - initial API and implementation >+ * Cagatay Calli - https://bugs.eclipse.org/bugs/show_bug.cgi?id=29692 > *******************************************************************************/ > package org.eclipse.jface.text; > >@@ -74,6 +75,10 @@ > import org.eclipse.jface.text.hyperlink.IHyperlinkPresenter; > import org.eclipse.jface.text.projection.ChildDocument; > import org.eclipse.jface.text.projection.ChildDocumentManager; >+import org.eclipse.jface.text.source.Annotation; >+import org.eclipse.jface.text.source.AnnotationModel; >+import org.eclipse.jface.text.source.ISourceViewer; >+import org.eclipse.jface.text.source.SourceViewer; > > > /** >@@ -754,7 +759,7 @@ > /** > * This viewer's find/replace target. > */ >- class FindReplaceTarget implements IFindReplaceTarget, IFindReplaceTargetExtension, IFindReplaceTargetExtension3 { >+ class FindReplaceTarget implements IFindReplaceTarget, IFindReplaceTargetExtension, IFindReplaceTargetExtension3, IFindReplaceTargetExtension4 { > > /** The range for this target. */ > private FindReplaceRange fRange; >@@ -997,7 +1002,47 @@ > } > } > } >+ >+ /* >+ * @see IFindReplaceTargetExtension4#highlightAll(String, boolean, boolean, boolean) >+ * @since 3.4 >+ */ >+ public int highlightAll(String findString, boolean caseSensitive, >+ boolean wholeWord, boolean regExSearch) { >+ int matchCount; >+ >+ if (fRange != null) { >+ IRegion range= fRange.getRange(); >+ matchCount = TextViewer.this.highlightAllInRange(findString, caseSensitive, wholeWord, range.getOffset(), range.getLength(), regExSearch); >+ } else { >+ matchCount = TextViewer.this.highlightAll(findString, caseSensitive, wholeWord, regExSearch); >+ } >+ >+ return matchCount; >+ } >+ >+ /* >+ * @see IFindReplaceTargetExtension4#clearHighlights() >+ * @since 3.4 >+ */ >+ public void clearHighlights() { >+ // TODO This removes annotations if target supports it. Remove highlights from non-supporting targets. >+ if(TextViewer.this instanceof SourceViewer){ >+ AnnotationModel model = (AnnotationModel) ((SourceViewer) TextViewer.this).getAnnotationModel(); >+ Iterator iter = model.getAnnotationIterator(); >+ while(iter.hasNext()){ >+ Annotation currentAnnotation = (Annotation) iter.next(); >+ if(currentAnnotation.getType().equals("org.eclipse.jface.text.find")){ //$NON-NLS-1$ >+ model.removeAnnotation(currentAnnotation); >+ } >+ } >+ } >+ } >+ > } >+ >+ >+ > > > /** >@@ -5331,5 +5376,145 @@ > public void setTabsToSpacesConverter(IAutoEditStrategy converter) { > fTabsToSpacesConverter= converter; > } >+ >+ /** >+ * Returns whether this TextViewer is annotatible. >+ * @return whether this TextViewer is annotatible >+ * @since 3.4 >+ */ >+ public boolean isAnnotatible(){ >+ return (this instanceof ISourceViewer); >+ } >+ >+ /** >+ * Adheres to the contract of {@link org.eclipse.jface.text.IFindReplaceTargetExtension4#highlightAll(String, boolean, boolean, boolean)}. >+ * >+ * @param findString the find string specification >+ * @param caseSensitive <code>true</code> if case sensitive, <code>false</code> otherwise >+ * @param wholeWord <code>true</code> if matches must be whole words, <code>false</code> otherwise >+ * @param regExSearch <code>true</code> if <code>findString</code> is a regular expression, <code>false</code> otherwise >+ * @return number of occurrences in range >+ * @since 3.4 >+ */ >+ protected int highlightAll(String findString, boolean caseSensitive, >+ boolean wholeWord, boolean regExSearch) { >+ int matchCounter = 0; >+ >+ try { >+ >+ int widgetOffset= 0; >+ int firstMatch = -1; >+ IRegion matchRegion; >+ FindReplaceDocumentAdapter adapter= getFindReplaceDocumentAdapter(); >+ >+ while((matchRegion= adapter.find(widgetOffset, findString, true, caseSensitive, wholeWord, regExSearch))!=null){ >+ int widgetPos= matchRegion.getOffset(); >+ int length= matchRegion.getLength(); >+ >+ if(matchCounter == 0) firstMatch = widgetPos; >+ else { >+ if(firstMatch == widgetPos) >+ return matchCounter; >+ } >+ >+ if(isAnnotatible()){ >+ AnnotationModel model = (AnnotationModel) ((ISourceViewer) TextViewer.this).getAnnotationModel(); >+ Annotation findAnnotation = new Annotation("org.eclipse.jface.text.find",true,adapter.subSequence(widgetPos, widgetPos+length).toString()); //$NON-NLS-1$ >+ Position position = new Position(widgetPos,length); >+ model.addAnnotation(findAnnotation, position); >+ } >+ else { >+ // TODO Add raw highlighing for targets that don't support annotations >+// Color highlight = new Color(getTextWidget().getDisplay(),255,0,0); >+// setTextColor(highlight, widgetPos, length, false); >+ return 0; >+ } >+ >+ matchCounter++; >+ widgetOffset = widgetPos + length; >+ } >+ >+ } catch (BadLocationException x) { >+ if (TRACE_ERRORS) >+ System.out.println(JFaceTextMessages.getString("TextViewer.error.bad_location.findAndSelect")); //$NON-NLS-1$ >+ } >+ >+ return matchCounter; >+ >+ } >+ >+ /** >+ * Adheres to the contract of {@link org.eclipse.jface.text.IFindReplaceTargetExtension4#highlightAll(String, boolean, boolean, boolean)}. >+ * >+ * @param findString the find string specification >+ * @param caseSensitive <code>true</code> if case sensitive, <code>false</code> otherwise >+ * @param wholeWord <code>true</code> if matches must be whole words, <code>false</code> otherwise >+ * @param rangeOffset the search scope offset >+ * @param rangeLength the search scope length >+ * @param regExSearch <code>true</code> if <code>findString</code> is a regular expression, <code>false</code> otherwise >+ * @return number of occurrences in range >+ * @since 3.4 >+ */ >+ protected int highlightAllInRange(String findString, boolean caseSensitive, >+ boolean wholeWord, int rangeOffset, int rangeLength, boolean regExSearch){ >+ int matchCounter = 0; >+ >+ try { >+ >+ int firstMatch = -1; >+ int widgetOffset= modelOffset2WidgetOffset(rangeOffset); >+ if (widgetOffset == -1) >+ return -1; >+ >+ FindReplaceDocumentAdapter adapter= getFindReplaceDocumentAdapter(); >+ IRegion matchRegion; >+ int widgetPos= -1; >+ int length= 0; >+ while((matchRegion= adapter.find(widgetOffset, findString, true, caseSensitive, wholeWord, regExSearch)) != null) { >+ widgetPos= matchRegion.getOffset(); >+ length= matchRegion.getLength(); >+ >+ if(matchCounter == 0) firstMatch = widgetPos; >+ else { >+ if(firstMatch == widgetPos) >+ return matchCounter; >+ } >+ >+ int modelPos= widgetPos == -1 ? -1 : widgetOffset2ModelOffset(widgetPos); >+ >+ if (widgetPos != -1 && (modelPos < rangeOffset || modelPos + length > rangeOffset + rangeLength)) >+ widgetPos= -1; >+ >+ if (widgetPos > -1) { >+ >+ if(isAnnotatible()){ >+ AnnotationModel model = (AnnotationModel) ((ISourceViewer) TextViewer.this).getAnnotationModel(); >+ Annotation findAnnotation = new Annotation("org.eclipse.jface.text.find",true,adapter.subSequence(widgetPos, widgetPos+length).toString()); //$NON-NLS-1$ >+ Position position = new Position(widgetPos,length); >+ model.addAnnotation(findAnnotation, position); >+ } >+ else { >+ // TODO Add raw highlighing for targets that don't support annotations >+// Color highlight = new Color(getTextWidget().getDisplay(),255,0,0); >+// setTextColor(highlight, widgetPos, length, false); >+ return 0; >+ } >+ >+ matchCounter++; >+ >+ widgetOffset = widgetPos + length; >+ } >+ >+ else break; >+ } >+ >+ >+ } catch (BadLocationException x) { >+ if (TRACE_ERRORS) >+ System.out.println(JFaceTextMessages.getString("TextViewer.error.bad_location.findAndSelect")); //$NON-NLS-1$ >+ } >+ >+ return matchCounter; >+ } > > } >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.text/META-INF/MANIFEST.MF,v >retrieving revision 1.21 >diff -u -r1.21 MANIFEST.MF >--- META-INF/MANIFEST.MF 25 Jul 2007 07:21:59 -0000 1.21 >+++ META-INF/MANIFEST.MF 27 Jul 2007 14:55:18 -0000 >@@ -1,7 +1,7 @@ > Manifest-Version: 1.0 > Bundle-ManifestVersion: 2 > Bundle-Name: %pluginName >-Bundle-SymbolicName: org.eclipse.jface.text >+Bundle-SymbolicName: org.eclipse.jface.text;singleton:=true > Bundle-Version: 3.4.0.qualifier > Bundle-Vendor: %providerName > Bundle-Localization: plugin >Index: plugin.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.text/plugin.properties,v >retrieving revision 1.5 >diff -u -r1.5 plugin.properties >--- plugin.properties 17 Jun 2005 15:49:07 -0000 1.5 >+++ plugin.properties 27 Jul 2007 14:55:18 -0000 >@@ -10,3 +10,6 @@ > ############################################################################### > pluginName = JFace Text > providerName = Eclipse.org >+ >+findSpecificationLabel = Highlight All >+findMarkerName = Highlight All Marker >Index: build.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.text/build.properties,v >retrieving revision 1.13 >diff -u -r1.13 build.properties >--- build.properties 16 Dec 2005 07:13:29 -0000 1.13 >+++ build.properties 27 Jul 2007 14:55:18 -0000 >@@ -1,5 +1,5 @@ > ############################################################################### >-# Copyright (c) 2000, 2005 IBM Corporation and others. >+# Copyright (c) 2000, 2007 IBM Corporation 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 >@@ -12,7 +12,10 @@ > .options,\ > .,\ > about.html,\ >- META-INF/ >+ META-INF/,\ >+ icons/,\ >+ plugin.xml,\ >+ component.xml > > src.includes = about.html > >Index: src/org/eclipse/jface/text/IFindReplaceTargetExtension4.java >=================================================================== >RCS file: src/org/eclipse/jface/text/IFindReplaceTargetExtension4.java >diff -N src/org/eclipse/jface/text/IFindReplaceTargetExtension4.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/jface/text/IFindReplaceTargetExtension4.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,42 @@ >+/******************************************************************************* >+ * Copyright (c) 2000, 2007 IBM Corporation 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: >+ * Cagatay Calli - initial API and implementation (https://bugs.eclipse.org/bugs/show_bug.cgi?id=29692) >+ *******************************************************************************/ >+ >+package org.eclipse.jface.text; >+ >+/** >+ * Extension interface for {@link org.eclipse.jface.text.IFindReplaceTarget}. >+ * <p> >+ * Extends the find replace target to add "highlight all" functionality. >+ * >+ * @since 3.4 >+ */ >+public interface IFindReplaceTargetExtension4 { >+ /** >+ * Finds and highlights all occurrences of the user's findString. >+ * Returns the number of all occurrences. >+ * >+ * @param findString the string to search for >+ * @param caseSensitive should the search be case sensitive >+ * @param wholeWord does the search string represent a complete word >+ * @param regExSearch if <code>true</code> findString represents a regular expression >+ * @return number of occurrences >+ * >+ * @since 3.4 >+ */ >+ int highlightAll(String findString, boolean caseSensitive, boolean wholeWord, boolean regExSearch); >+ >+ /** >+ * Clears all highlights and corresponding annotations. >+ * >+ * @since 3.4 >+ */ >+ void clearHighlights(); >+} >Index: plugin.xml >=================================================================== >RCS file: plugin.xml >diff -N plugin.xml >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ plugin.xml 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,55 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<?eclipse version="3.0"?> >+<plugin> >+ <extension >+ point="org.eclipse.ui.editors.annotationTypes"> >+ <type >+ name="org.eclipse.jface.text.find" >+ markerType="org.eclipse.jface.text.findMarker"> >+ </type> >+ </extension> >+ <extension >+ point="org.eclipse.ui.ide.markerImageProviders"> >+ <imageprovider >+ id="org.eclipse.jface.text.findMarkerProvider" >+ markertype="org.eclipse.jface.text.findMarker"> >+ </imageprovider> >+ </extension> >+ <extension >+ id="org.eclipse.jface.text.findMarker" >+ name="%findMarkerName" >+ point="org.eclipse.core.resources.markers"> >+ <super type="org.eclipse.core.resources.textmarker" /> >+ <persistent value="false" /> >+ <attribute name="issueId" /> >+ <attribute name="summary" /> >+ <attribute name="description" /> >+ <attribute name="message" /> >+ </extension> >+ <extension >+ point="org.eclipse.ui.editors.markerAnnotationSpecification"> >+ <specification >+ annotationType="org.eclipse.jface.text.find" >+ label="%findSpecificationLabel" >+ icon="$nl$/icons/full/obj16/searchm_obj.gif" >+ textPreferenceKey="findIndication" >+ textPreferenceValue="true" >+ highlightPreferenceKey="findIndicationHighlighting" >+ highlightPreferenceValue="true" >+ contributesToHeader="true" >+ overviewRulerPreferenceKey="findIndicationInOverviewRuler" >+ overviewRulerPreferenceValue="true" >+ verticalRulerPreferenceKey="findIndicationInVerticalRuler" >+ verticalRulerPreferenceValue="true" >+ colorPreferenceKey="findIndicationColor" >+ colorPreferenceValue="255,255,0" >+ presentationLayer="3" >+ showInNextPrevDropdownToolbarActionKey="showFindInNextPrevDropdownToolbarAction" >+ showInNextPrevDropdownToolbarAction="true" >+ isGoToNextNavigationTargetKey="isFindGoToNextNavigationTarget" >+ isGoToNextNavigationTarget="true" >+ isGoToPreviousNavigationTargetKey="isFindGoToPreviousNavigationTarget" >+ isGoToPreviousNavigationTarget="true"> >+ </specification> >+ </extension> >+</plugin>
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
Flags:
daniel_megert
:
review-
Actions:
View
|
Diff
Attachments on
bug 29692
:
33046
|
74001
|
74158
|
74197
|
74294
|
74295
|
74445
|
74447
|
74449
|
74801
|
264257