Skip to content

Commit c6e9f0f

Browse files
eclipse-platform-botvogella
authored andcommitted
Perform clean code of bundles/org.eclipse.ui.workbench.texteditor
1 parent c877469 commit c6e9f0f

File tree

7 files changed

+24
-2
lines changed

7 files changed

+24
-2
lines changed

bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/contentassist/ContentAssistHandler.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ public class ContentAssistHandler {
8282
* @param contentAssistant a configured content assistant
8383
* @return a new {@link ContentAssistHandler}
8484
*/
85+
@Deprecated
8586
public static ContentAssistHandler createHandlerForCombo(Combo combo, SubjectControlContentAssistant contentAssistant) {
8687
return new ContentAssistHandler(combo, new ComboContentAssistSubjectAdapter(combo), contentAssistant);
8788
}
@@ -95,6 +96,7 @@ public static ContentAssistHandler createHandlerForCombo(Combo combo, SubjectCon
9596
* @param contentAssistant a configured content assistant
9697
* @return a new {@link ContentAssistHandler}
9798
*/
99+
@Deprecated
98100
public static ContentAssistHandler createHandlerForText(Text text, SubjectControlContentAssistant contentAssistant) {
99101
return new ContentAssistHandler(text, new TextContentAssistSubjectAdapter(text), contentAssistant);
100102
}
@@ -120,6 +122,7 @@ private ContentAssistHandler(
120122
/**
121123
* @return <code>true</code> iff content assist is enabled
122124
*/
125+
@Deprecated
123126
public boolean isEnabled() {
124127
return fFocusListener != null;
125128
}
@@ -131,6 +134,7 @@ public boolean isEnabled() {
131134
*
132135
* @param enable enable content assist iff true
133136
*/
137+
@Deprecated
134138
public void setEnabled(boolean enable) {
135139
if (enable == isEnabled()) {
136140
return;

bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ConvertLineDelimitersAction.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public class ConvertLineDelimitersAction extends TextEditorAction {
5757
* @param editor the editor
5858
* @param lineDelimiter the target line delimiter to convert the editor's document to
5959
*/
60+
@Deprecated
6061
public ConvertLineDelimitersAction(ITextEditor editor, String lineDelimiter) {
6162
this(EditorMessages.getBundleForConstructedKeys(), "dummy", editor, lineDelimiter); //$NON-NLS-1$
6263
}
@@ -69,6 +70,7 @@ public ConvertLineDelimitersAction(ITextEditor editor, String lineDelimiter) {
6970
* @param editor the editor
7071
* @param lineDelimiter the target line delimiter to convert the editor's document to
7172
*/
73+
@Deprecated
7274
public ConvertLineDelimitersAction(ResourceBundle bundle, String prefix, ITextEditor editor, String lineDelimiter) {
7375
super(bundle, prefix, editor);
7476
fLineDelimiter= lineDelimiter;
@@ -79,6 +81,7 @@ public ConvertLineDelimitersAction(ResourceBundle bundle, String prefix, ITextEd
7981
update();
8082
}
8183

84+
@Deprecated
8285
@Override
8386
public void run() {
8487

@@ -276,6 +279,7 @@ private static String getString(String key) {
276279
}
277280
}
278281

282+
@Deprecated
279283
@Override
280284
public void update() {
281285
super.update();

bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/InfoForm.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public class InfoForm {
6363
* Creates a new info form.
6464
* @param parent the parent composite
6565
*/
66+
@Deprecated
6667
public InfoForm(Composite parent) {
6768

6869
Display display= parent.getDisplay();
@@ -113,13 +114,15 @@ public InfoForm(Composite parent) {
113114
* Hook method for creating an appropriate action control.
114115
* @param parent the action control's parent control
115116
*/
117+
@Deprecated
116118
protected void createActionControls(Composite parent) {
117119
}
118120

119121
/**
120122
* Returns the control of this form.
121123
* @return the root control of this form
122124
*/
125+
@Deprecated
123126
public Control getControl() {
124127
return fScrolledComposite;
125128
}
@@ -128,6 +131,7 @@ public Control getControl() {
128131
* Sets the header text of this info form.
129132
* @param header the header text
130133
*/
134+
@Deprecated
131135
public void setHeaderText(String header) {
132136
fHeader.setText(header);
133137
}
@@ -136,6 +140,7 @@ public void setHeaderText(String header) {
136140
* Sets the banner text of this info form.
137141
* @param banner the banner text
138142
*/
143+
@Deprecated
139144
public void setBannerText(String banner) {
140145
fBanner.setText(banner);
141146
}
@@ -144,6 +149,7 @@ public void setBannerText(String banner) {
144149
* Sets the info of this info form
145150
* @param info the info text
146151
*/
152+
@Deprecated
147153
public void setInfo(String info) {
148154
fText.setText(info);
149155
}
@@ -153,6 +159,7 @@ public void setInfo(String info) {
153159
*
154160
* @param event the property change event object describing which property changed and how
155161
*/
162+
@Deprecated
156163
protected void handlePropertyChange(PropertyChangeEvent event) {
157164

158165
if (fHeader != null) {

bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/SaveAction.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,18 @@ public class SaveAction extends TextEditorAction {
4141
* @param editor the text editor
4242
* @see TextEditorAction#TextEditorAction(ResourceBundle, String, ITextEditor)
4343
*/
44+
@Deprecated
4445
public SaveAction(ResourceBundle bundle, String prefix, ITextEditor editor) {
4546
super(bundle, prefix, editor);
4647
}
4748

49+
@Deprecated
4850
@Override
4951
public void run() {
5052
getTextEditor().getSite().getPage().saveEditor(getTextEditor(), false);
5153
}
5254

55+
@Deprecated
5356
@Override
5457
public void update() {
5558
setEnabled(getTextEditor().isDirty());

bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ValidateStateException.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ public class ValidateStateException extends CoreException {
4242
/*
4343
* @see CoreException#CoreException(org.eclipse.core.runtime.IStatus)
4444
*/
45-
public ValidateStateException(IStatus status) {
45+
@Deprecated
46+
public ValidateStateException(IStatus status) {
4647
super(status);
4748
}
4849

bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/WorkbenchChainedTextFontFieldEditor.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public class WorkbenchChainedTextFontFieldEditor extends PropagatingFontFieldEdi
5252
* @param labelText the text shown as editor description
5353
* @param parent the editor's parent widget
5454
*/
55+
@Deprecated
5556
public WorkbenchChainedTextFontFieldEditor(String name, String labelText, Composite parent) {
5657
super(name, labelText, parent, EditorMessages.WorkbenchChainedTextFontFieldEditor_defaultWorkbenchTextFont);
5758
}
@@ -63,6 +64,7 @@ public WorkbenchChainedTextFontFieldEditor(String name, String labelText, Compos
6364
* @param target the target preference store
6465
* @param targetKey the key to be used in the target preference store
6566
*/
67+
@Deprecated
6668
public static void startPropagate(IPreferenceStore target, String targetKey) {
6769
IPreferenceStore store= new ScopedPreferenceStore(InstanceScope.INSTANCE, "org.eclipse.ui.workbench"); //$NON-NLS-1$
6870
PropagatingFontFieldEditor.startPropagate(store, JFaceResources.TEXT_FONT, target, targetKey);

bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatePreferencePage.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -998,8 +998,9 @@ public void setSearchText(String s) {
998998
}
999999
@Override
10001000
public boolean select(Viewer viewer, Object parentElement, Object element) {
1001-
if (searchString.isEmpty())
1001+
if (searchString.isEmpty()) {
10021002
return true;
1003+
}
10031004
Template template = ((TemplatePersistenceData) element).getTemplate();
10041005
return template.getName().toLowerCase().contains(searchString)
10051006
|| template.getContextTypeId().toLowerCase().contains(searchString)

0 commit comments

Comments
 (0)