Skip to content

Commit 28a802b

Browse files
committed
This pr marks removal of several unused deprecated methods, constants
and removes internal deprecated methods which is unused code now.
1 parent d115d2c commit 28a802b

File tree

14 files changed

+24
-228
lines changed

14 files changed

+24
-228
lines changed

bundles/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTMLPrinter.java

Lines changed: 0 additions & 192 deletions
Original file line numberDiff line numberDiff line change
@@ -119,21 +119,6 @@ public static String read(Reader rd) {
119119
return HTMLBuilder.read(rd);
120120
}
121121

122-
/**
123-
*
124-
* @deprecated migrate to new StringBuilder API
125-
*
126-
* @param buffer the output StringBuilder
127-
* @param position offset where the prolog is placed
128-
* @param fgRGB Foreground-Color
129-
* @param bgRGB Background-Color
130-
* @param styleSheet Stylesheet
131-
*/
132-
@Deprecated
133-
public static void insertPageProlog(StringBuffer buffer, int position, RGB fgRGB, RGB bgRGB, String styleSheet) {
134-
runOp(buffer, (sb) -> CORE.insertPageProlog(sb, position, fromRGB(fgRGB), fromRGB(bgRGB), styleSheet));
135-
}
136-
137122
/**
138123
*
139124
* @param buffer the output StringBuilder
@@ -157,18 +142,6 @@ public static void insertStyles(StringBuilder buffer, String[] styles) {
157142
}
158143

159144

160-
/**
161-
*
162-
* @param buffer the output buffer
163-
* @param styles array with styles to be appended
164-
*
165-
* @deprecated As of 3.13, replaced by {@link #insertStyles(StringBuilder, String[])}
166-
*/
167-
@Deprecated
168-
public static void insertStyles(StringBuffer buffer, String[] styles) {
169-
runOp(buffer, (sb) -> CORE.insertStyles(sb, styles));
170-
}
171-
172145
/**
173146
*
174147
* @param buffer the output buffer
@@ -179,31 +152,6 @@ public static void insertPageProlog(StringBuilder buffer, int position) {
179152
CORE.insertPageProlog(buffer, position);
180153
}
181154

182-
/**
183-
*
184-
* @param buffer the output buffer
185-
* @param position the offset
186-
*
187-
* @deprecated migrate to new StringBuilder API
188-
*/
189-
@Deprecated
190-
public static void insertPageProlog(StringBuffer buffer, int position) {
191-
runOp(buffer, (sb) -> CORE.insertPageProlog(sb, position));
192-
}
193-
194-
/**
195-
*
196-
* @param buffer the output buffer
197-
* @param position the offset
198-
* @param styleSheetURL URL to the Stylesheet
199-
*
200-
* @deprecated migrate to new StringBuilder API
201-
*/
202-
@Deprecated
203-
public static void insertPageProlog(StringBuffer buffer, int position, URL styleSheetURL) {
204-
runOp(buffer, (sb) -> CORE.insertPageProlog(sb, position, styleSheetURL));
205-
}
206-
207155
/**
208156
*
209157
* @param buffer the output buffer
@@ -226,54 +174,10 @@ public static void insertPageProlog(StringBuilder buffer, int position, String s
226174
CORE.insertPageProlog(buffer, position, styleSheet);
227175
}
228176

229-
/**
230-
*
231-
* @param buffer the output buffer
232-
* @param position the offset
233-
* @param styleSheet Stylesheet
234-
*
235-
* @deprecated migrate to new StringBuilder API
236-
*/
237-
@Deprecated
238-
public static void insertPageProlog(StringBuffer buffer, int position, String styleSheet) {
239-
runOp(buffer, (sb) -> CORE.insertPageProlog(sb, position, styleSheet));
240-
}
241-
242-
/**
243-
*
244-
* @param buffer the output buffer
245-
*
246-
*/
247-
public static void addPageProlog(StringBuilder buffer) {
248-
CORE.addPageProlog(buffer);
249-
}
250-
251-
/**
252-
*
253-
* @param buffer the output buffer
254-
*
255-
* @deprecated migrate to new StringBuilder API
256-
*/
257-
@Deprecated
258-
public static void addPageProlog(StringBuffer buffer) {
259-
runOp(buffer, CORE::addPageProlog);
260-
}
261-
262177
public static void addPageEpilog(StringBuilder buffer) {
263178
CORE.addPageEpilog(buffer);
264179
}
265180

266-
/**
267-
*
268-
* @param buffer the output buffer
269-
*
270-
* @deprecated migrate to new StringBuilder API
271-
*/
272-
@Deprecated
273-
public static void addPageEpilog(StringBuffer buffer) {
274-
runOp(buffer, CORE::addPageEpilog);
275-
}
276-
277181
/**
278182
*
279183
* @param buffer the output buffer
@@ -283,17 +187,6 @@ public static void startBulletList(StringBuilder buffer) {
283187
CORE.startBulletList(buffer);
284188
}
285189

286-
/**
287-
*
288-
* @param buffer the output buffer
289-
*
290-
* @deprecated migrate to new StringBuilder API
291-
*/
292-
@Deprecated
293-
public static void startBulletList(StringBuffer buffer) {
294-
runOp(buffer, CORE::startBulletList);
295-
}
296-
297190
/**
298191
* ends the bulletpointlist
299192
*
@@ -304,18 +197,6 @@ public static void endBulletList(StringBuilder buffer) {
304197
CORE.endBulletList(buffer);
305198
}
306199

307-
/**
308-
* ends the bulletpointlist
309-
*
310-
* @param buffer the output buffer
311-
*
312-
* @deprecated migrate to new StringBuilder API
313-
*/
314-
@Deprecated
315-
public static void endBulletList(StringBuffer buffer) {
316-
runOp(buffer, CORE::endBulletList);
317-
}
318-
319200
/**
320201
* Adds bulletpoint
321202
*
@@ -327,19 +208,6 @@ public static void addBullet(StringBuilder buffer, String bullet) {
327208
CORE.addBullet(buffer, bullet);
328209
}
329210

330-
/**
331-
* Adds bulletpoint
332-
*
333-
* @param buffer the output buffer
334-
* @param bullet the bulletpoint
335-
*
336-
* @deprecated migrate to new StringBuilder API
337-
*/
338-
@Deprecated
339-
public static void addBullet(StringBuffer buffer, String bullet) {
340-
runOp(buffer, (sb) -> CORE.addBullet(sb, bullet));
341-
}
342-
343211
/**
344212
*
345213
* Adds h5 headline
@@ -352,20 +220,6 @@ public static void addSmallHeader(StringBuilder buffer, String header) {
352220
CORE.addSmallHeader(buffer, header);
353221
}
354222

355-
/**
356-
*
357-
* Adds h5 headline
358-
*
359-
* @param buffer the output buffer
360-
* @param header of h5 headline
361-
*
362-
* @deprecated migrate to new StringBuilder API
363-
*/
364-
@Deprecated
365-
public static void addSmallHeader(StringBuffer buffer, String header) {
366-
runOp(buffer, (sb) -> CORE.addSmallHeader(sb, header));
367-
}
368-
369223
/**
370224
*
371225
* @param buffer the output buffer
@@ -376,18 +230,6 @@ public static void addParagraph(StringBuilder buffer, String paragraph) {
376230
CORE.addParagraph(buffer, paragraph);
377231
}
378232

379-
/**
380-
*
381-
* @param buffer the output buffer
382-
* @param paragraph the content of the paragraph
383-
*
384-
* @deprecated migrate to new StringBuilder API
385-
*/
386-
@Deprecated
387-
public static void addParagraph(StringBuffer buffer, String paragraph) {
388-
runOp(buffer, (sb) -> CORE.addParagraph(sb, paragraph));
389-
}
390-
391233
/**
392234
* Appends a string and keeps its whitespace and newlines.
393235
* <p>
@@ -406,27 +248,6 @@ public static void addPreFormatted(StringBuilder buffer, String preFormatted) {
406248
CORE.addPreFormatted(buffer, preFormatted);
407249
}
408250

409-
/**
410-
* Appends a string and keeps its whitespace and newlines.
411-
* <p>
412-
* <b>Warning:</b> This starts a new paragraph when rendered in a browser, but
413-
* it doesn't starts a new paragraph when rendered with a {@link HTML2TextReader}
414-
* (e.g. in a {@link DefaultInformationControl} that renders simple HTML).
415-
*
416-
* @param buffer the output buffer
417-
* @param preFormatted the string that should be rendered with whitespace preserved
418-
*
419-
* @deprecated migrate to new StringBuilder API
420-
*
421-
* @see #convertToHTMLContent(String)
422-
* @see #convertToHTMLContentWithWhitespace(String)
423-
* @since 3.7
424-
*/
425-
@Deprecated
426-
public static void addPreFormatted(StringBuffer buffer, String preFormatted) {
427-
runOp(buffer, (sb) -> CORE.addPreFormatted(sb, preFormatted));
428-
}
429-
430251
/**
431252
*
432253
* @param buffer the output buffer
@@ -437,19 +258,6 @@ public static void addParagraph(StringBuilder buffer, Reader paragraphReader) {
437258
CORE.addParagraph(buffer, paragraphReader);
438259
}
439260

440-
/**
441-
*
442-
* @param buffer the output buffer
443-
* @param paragraphReader The content of the Read will be added to output buffer
444-
*
445-
* @deprecated migrate to new StringBuilder API
446-
*/
447-
@Deprecated
448-
public static void addParagraph(StringBuffer buffer, Reader paragraphReader) {
449-
runOp(buffer, (sb) -> CORE.addParagraph(sb, paragraphReader));
450-
}
451-
452-
453261
private static interface BuilderBuffer {
454262
void run(StringBuilder sb);
455263
}

bundles/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/RevisionPainter.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -377,18 +377,6 @@ public HoverInformationControlCreator(boolean isFocusable) {
377377
protected IInformationControl doCreateInformationControl(Shell parent) {
378378
if (BrowserInformationControl.isAvailable(parent)) {
379379
return new BrowserInformationControl(parent, JFaceResources.DIALOG_FONT, fIsFocusable) {
380-
/**
381-
* {@inheritDoc}
382-
*
383-
* @deprecated use {@link #setInput(Object)}
384-
*/
385-
@Deprecated
386-
@Override
387-
public void setInformation(String content) {
388-
content= addCSSToHTMLFragment(content);
389-
super.setInformation(content);
390-
}
391-
392380
/**
393381
* Adds a HTML header and CSS info if <code>html</code> is only an HTML fragment (has no
394382
* &lt;html&gt; section).

bundles/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultInformationControl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ public DefaultInformationControl(Shell parent, IInformationPresenter presenter)
232232
* @param presenter the presenter to be used
233233
* @deprecated As of 3.4, replaced by simpler constructors
234234
*/
235-
@Deprecated
235+
@Deprecated(forRemoval= true, since= "2025-12")
236236
public DefaultInformationControl(Shell parent, int shellStyle, int style, IInformationPresenter presenter) {
237237
this(parent, shellStyle, style, presenter, null);
238238
}
@@ -269,7 +269,7 @@ public DefaultInformationControl(Shell parentShell, int shellStyle, final int st
269269
* @param presenter the presenter to be used
270270
* @deprecated As of 3.4, replaced by {@link #DefaultInformationControl(Shell, DefaultInformationControl.IInformationPresenter)}
271271
*/
272-
@Deprecated
272+
@Deprecated(forRemoval= true, since= "2025-12")
273273
public DefaultInformationControl(Shell parent, int textStyles, IInformationPresenter presenter) {
274274
this(parent, textStyles, presenter, null);
275275
}

bundles/org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewer.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2008,7 +2008,7 @@ protected int getEmptySelectionChangedEventDelay() {
20082008
* {@link ITextViewerExtension2#prependAutoEditStrategy(IAutoEditStrategy, String)} and
20092009
* {@link ITextViewerExtension2#removeAutoEditStrategy(IAutoEditStrategy, String)} instead
20102010
*/
2011-
@Deprecated
2011+
@Deprecated(forRemoval= true, since= "2025-12")
20122012
@Override
20132013
public void setAutoIndentStrategy(IAutoIndentStrategy strategy, String contentType) {
20142014
setAutoEditStrategies(new IAutoEditStrategy[] { strategy }, contentType);
@@ -3212,7 +3212,7 @@ public void setTopIndex(int index) {
32123212
* @return the view port height in lines
32133213
* @deprecated as of 3.2
32143214
*/
3215-
@Deprecated
3215+
@Deprecated(forRemoval= true, since= "2025-12")
32163216
protected int getVisibleLinesInViewport() {
32173217
if (fTextWidget != null) {
32183218
Rectangle clArea= fTextWidget.getClientArea();
@@ -3429,7 +3429,7 @@ protected void internalRevealRange(int start, int end) {
34293429
* @return the width of the presentation of the given string
34303430
* @deprecated use <code>getWidthInPixels(int, int)</code> instead
34313431
*/
3432-
@Deprecated
3432+
@Deprecated(forRemoval= true, since= "2025-12")
34333433
final protected int getWidthInPixels(String text) {
34343434
GC gc= new GC(fTextWidget);
34353435
gc.setFont(fTextWidget.getFont());
@@ -4308,7 +4308,7 @@ protected void copyMarkedRegion(boolean delete) {
43084308
*
43094309
* @deprecated use <code>StyledText.invokeAction</code> instead
43104310
*/
4311-
@Deprecated
4311+
@Deprecated(forRemoval= true, since= "2025-12")
43124312
protected void deleteText() {
43134313
fTextWidget.invokeAction(ST.DELETE_NEXT);
43144314
}
@@ -4429,7 +4429,7 @@ private IRegion getTextBlockFromSelection(ITextSelection selection) throws BadLo
44294429
*
44304430
* @deprecated use shift(boolean, boolean, boolean) instead
44314431
*/
4432-
@Deprecated
4432+
@Deprecated(forRemoval= true, since= "2025-12")
44334433
protected void shift(boolean useDefaultPrefixes, boolean right) {
44344434
shift(useDefaultPrefixes, right, false);
44354435
}
@@ -4712,7 +4712,7 @@ protected boolean canPerformFind() {
47124712
* @return the model offset of the first match
47134713
* @deprecated as of 3.0 use {@link #findAndSelect(int, String, boolean, boolean, boolean, boolean)}
47144714
*/
4715-
@Deprecated
4715+
@Deprecated(forRemoval= true, since= "2025-12")
47164716
protected int findAndSelect(int startPosition, String findString, boolean forwardSearch, boolean caseSensitive, boolean wholeWord) {
47174717
try {
47184718
return findAndSelect(startPosition, findString, forwardSearch, caseSensitive, wholeWord, false);

bundles/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/IContentAssistProcessorExtension.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@ public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int
9898
return processor.computeCompletionProposals(viewer, offset);
9999
}
100100

101-
@Deprecated
101+
@Deprecated(forRemoval= true, since= "2025-12")
102102
@Override
103103
public char[] getCompletionProposalAutoActivationCharacters() {
104104
return processor.getCompletionProposalAutoActivationCharacters();
105105
}
106106

107-
@Deprecated
107+
@Deprecated(forRemoval= true, since= "2025-12")
108108
@Override
109109
public char[] getContextInformationAutoActivationCharacters() {
110110
return processor.getContextInformationAutoActivationCharacters();

bundles/org.eclipse.jface.text/src/org/eclipse/jface/text/formatter/ContentFormatter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ public void setFormattingStrategy(IFormattingStrategy strategy, String contentTy
323323
* @deprecated incompatible with an open set of document partitionings. The provided information is only used
324324
* if this formatter can not compute the partition managing position categories.
325325
*/
326-
@Deprecated
326+
@Deprecated(forRemoval= true, since= "2025-12")
327327
public void setPartitionManagingPositionCategories(String[] categories) {
328328
fExternalPartitonManagingCategories= TextUtilities.copy(categories);
329329
}

bundles/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/URLHyperlinkDetector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public URLHyperlinkDetector() {
4747
* @param textViewer the text viewer in which to detect the hyperlink
4848
* @deprecated As of 3.2, replaced by {@link URLHyperlinkDetector}
4949
*/
50-
@Deprecated
50+
@Deprecated(forRemoval= true, since= "2025-12")
5151
public URLHyperlinkDetector(ITextViewer textViewer) {
5252
}
5353

0 commit comments

Comments
 (0)