Skip to content

Commit 889d003

Browse files
eclipse-platform-botakurtakov
authored andcommitted
Perform clean code of team/bundles/org.eclipse.team.ui
1 parent 42c2edb commit 889d003

File tree

7 files changed

+64
-0
lines changed

7 files changed

+64
-0
lines changed

team/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISaveableWorkbenchPart.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,6 @@ public interface ISaveableWorkbenchPart extends ISaveablePart, IWorkbenchPart {
3333
/**
3434
* The property id for <code>isDirty</code>.
3535
*/
36+
@Deprecated
3637
public static final int PROP_DIRTY = ISaveablePart.PROP_DIRTY;
3738
}

team/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageSaveablePart.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
public abstract class PageSaveablePart extends SaveablePartAdapter implements IContentChangeListener{
6767

6868
private final CompareConfiguration cc;
69+
@Deprecated
6970
Shell shell;
7071

7172
// Tracking of dirty state
@@ -87,6 +88,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC
8788
* @param shell the shell for the part
8889
* @param compareConfiguration the compare configuration
8990
*/
91+
@Deprecated
9092
protected PageSaveablePart(Shell shell, CompareConfiguration compareConfiguration){
9193
this.shell = shell;
9294
this.cc = compareConfiguration;
@@ -104,11 +106,13 @@ protected PageSaveablePart(Shell shell, CompareConfiguration compareConfiguratio
104106
};
105107
}
106108

109+
@Deprecated
107110
@Override
108111
public boolean isDirty() {
109112
return fDirty || fDirtyViewers.size() > 0;
110113
}
111114

115+
@Deprecated
112116
@Override
113117
public void createPartControl(Composite parent) {
114118
Composite composite = new Composite(parent, SWT.NULL);
@@ -185,6 +189,7 @@ protected Viewer getViewer(Viewer oldViewer, Object input) {
185189
* selection listener on the page.
186190
* @return the selection provider for the page
187191
*/
192+
@Deprecated
188193
protected abstract ISelectionProvider getSelectionProvider();
189194

190195
/**
@@ -194,13 +199,15 @@ protected Viewer getViewer(Viewer oldViewer, Object input) {
194199
* @param toolBarManager the toolbar manager for the page
195200
* @return the top-level control for the page
196201
*/
202+
@Deprecated
197203
protected abstract Control createPage(Composite parent, ToolBarManager toolBarManager);
198204

199205
/**
200206
* Set the title of the page's page to the given text. The title
201207
* will appear in the header of the pane containing the page.
202208
* @param title the page's title
203209
*/
210+
@Deprecated
204211
protected void setPageDescription(String title) {
205212
fEditionPane.setText(title);
206213
}
@@ -209,6 +216,7 @@ protected void setPageDescription(String title) {
209216
* Set the saveable part's dirty state to the given state.
210217
* @param dirty the dirty state
211218
*/
219+
@Deprecated
212220
protected void setDirty(boolean dirty) {
213221
boolean confirmSave= true;
214222
Object o= cc.getProperty(CompareEditor.CONFIRM_SAVE_PROPERTY);
@@ -263,6 +271,7 @@ private void feedInput2(ISelection sel) {
263271
* with a progress monitor.
264272
* @param input the compare input to be prepared
265273
*/
274+
@Deprecated
266275
protected void prepareCompareInput(final ICompareInput input) {
267276
if (input == null) {
268277
return;
@@ -295,6 +304,7 @@ protected void prepareCompareInput(final ICompareInput input) {
295304
* @param monitor a progress monitor
296305
* @throws InvocationTargetException if an error occurs
297306
*/
307+
@Deprecated
298308
protected abstract void prepareInput(ICompareInput input, CompareConfiguration configuration, IProgressMonitor monitor) throws InvocationTargetException;
299309

300310
private void hookContentChangeListener(ICompareInput node) {
@@ -313,6 +323,7 @@ private void hookContentChangeListener(ICompareInput node) {
313323
* Return the parent shell of this part.
314324
* @return the parent shell of this part
315325
*/
326+
@Deprecated
316327
protected Shell getShell() {
317328
return shell;
318329
}
@@ -321,6 +332,7 @@ protected Shell getShell() {
321332
* This method is internal to the framework and should not be called by clients
322333
* outside of the framework.
323334
*/
335+
@Deprecated
324336
protected void setNavigator(ISynchronizePageConfiguration configuration) {
325337
configuration.setProperty(SynchronizePageConfiguration.P_NAVIGATOR, new CompareEditorInputNavigator(
326338
new Object[] {
@@ -366,6 +378,7 @@ private Viewer findContentViewer(Composite parent, Viewer oldViewer, ICompareInp
366378
* @param selection the selection
367379
* @return a compare input representing the selection
368380
*/
381+
@Deprecated
369382
protected ICompareInput getCompareInput(ISelection selection) {
370383
if (selection != null && selection instanceof IStructuredSelection ss) {
371384
if (ss.size() == 1) {
@@ -384,6 +397,7 @@ protected ICompareInput getCompareInput(ISelection selection) {
384397
*
385398
* @param showContentPanes whether to show contents pane
386399
*/
400+
@Deprecated
387401
public void setShowContentPanes(boolean showContentPanes) {
388402
this.showContentPanes = showContentPanes;
389403
}
@@ -393,6 +407,7 @@ public void setShowContentPanes(boolean showContentPanes) {
393407
*
394408
* @return the primary control for this part.
395409
*/
410+
@Deprecated
396411
public Control getControl() {
397412
return control;
398413
}
@@ -413,6 +428,7 @@ private CompareConfiguration getCompareConfiguration() {
413428
* @param monitor
414429
* a progress monitor
415430
*/
431+
@Deprecated
416432
@Override
417433
public void doSave(IProgressMonitor monitor) {
418434
flushViewers(monitor);

team/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartAdapter.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,46 +34,56 @@
3434
@Deprecated
3535
public abstract class SaveablePartAdapter implements ISaveableWorkbenchPart {
3636

37+
@Deprecated
3738
@Override
3839
public void doSaveAs() {
3940
}
4041

42+
@Deprecated
4143
@Override
4244
public boolean isSaveAsAllowed() {
4345
return false;
4446
}
4547

48+
@Deprecated
4649
@Override
4750
public boolean isSaveOnCloseNeeded() {
4851
return false;
4952
}
5053

54+
@Deprecated
5155
@Override
5256
public void addPropertyListener(IPropertyListener listener) {
5357
}
5458

59+
@Deprecated
5560
@Override
5661
public void dispose() {
5762
}
5863

64+
@Deprecated
5965
@Override
6066
public IWorkbenchPartSite getSite() {
6167
return null;
6268
}
6369

70+
@Deprecated
6471
@Override
6572
public String getTitleToolTip() {
6673
return null;
6774
}
6875

76+
@Deprecated
6977
@Override
7078
public void removePropertyListener(IPropertyListener listener) {
7179
}
7280

81+
@Deprecated
7382
@Override
7483
public void setFocus() {
7584
}
7685

86+
@Deprecated
7787
@Override
7888
public <T> T getAdapter(Class<T> adapter) {
7989
return null;

team/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartDialog.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,20 @@ public class SaveablePartDialog extends TrayDialog {
5555
* @param shell the parent shell or <code>null</code> to create a top level shell.
5656
* @param input the part to show in the dialog.
5757
*/
58+
@Deprecated
5859
public SaveablePartDialog(Shell shell, ISaveableWorkbenchPart input) {
5960
super(shell);
6061
setShellStyle(getShellStyle() | SWT.RESIZE | SWT.MAX);
6162
this.input = input;
6263
}
6364

65+
@Deprecated
6466
@Override
6567
protected void createButtonsForButtonBar(Composite parent) {
6668
createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
6769
}
6870

71+
@Deprecated
6972
@Override
7073
protected Control createDialogArea(Composite parent2) {
7174
Composite parent = (Composite) super.createDialogArea(parent2);
@@ -77,6 +80,7 @@ protected Control createDialogArea(Composite parent2) {
7780
return parent;
7881
}
7982

83+
@Deprecated
8084
@Override
8185
public boolean close() {
8286
saveChanges();
@@ -102,10 +106,12 @@ private void saveChanges() {
102106
* @return the input to the dialog
103107
* @since 3.2
104108
*/
109+
@Deprecated
105110
protected ISaveableWorkbenchPart getInput() {
106111
return input;
107112
}
108113

114+
@Deprecated
109115
@Override
110116
protected IDialogSettings getDialogBoundsSettings() {
111117
IDialogSettings compareSettings = PlatformUI.getDialogSettingsProvider(FrameworkUtil.getBundle(SaveablePartDialog.class)).getDialogSettings();
@@ -122,10 +128,12 @@ protected IDialogSettings getDialogBoundsSettings() {
122128
* Set the help content id of this dialog.
123129
* @param contextId the help context id
124130
*/
131+
@Deprecated
125132
public void setHelpContextId(String contextId) {
126133
fContextId= contextId;
127134
}
128135

136+
@Deprecated
129137
@Override
130138
protected void configureShell(Shell newShell) {
131139
super.configureShell(newShell);
@@ -134,6 +142,7 @@ protected void configureShell(Shell newShell) {
134142
}
135143
}
136144

145+
@Deprecated
137146
@Override
138147
protected Point getInitialSize() {
139148
Point initialSize = super.getInitialSize();

team/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSaveablePart.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public class HistoryPageSaveablePart extends PageSaveablePart {
5757
* @param object the object
5858
* @return whether the object had an {@link IHistoryPageSource} available or not
5959
*/
60+
@Deprecated
6061
public static boolean showHistoryInDialog(Shell shell, Object object) {
6162
IHistoryPageSource pageSource = HistoryPageSource.getHistoryPageSource(object);
6263
if (pageSource != null && pageSource.canShowHistoryFor(object)) {
@@ -88,26 +89,31 @@ private static boolean isFile(Object object) {
8889
* @param pageSource the page source
8990
* @param object the object whose history is to be displayed
9091
*/
92+
@Deprecated
9193
public HistoryPageSaveablePart(Shell shell, CompareConfiguration configuration, IHistoryPageSource pageSource, Object object) {
9294
super(shell,configuration);
9395
this.pageSource = pageSource;
9496
this.object = object;
9597
}
9698

99+
@Deprecated
97100
@Override
98101
public String getTitle() {
99102
return historyPage.getName();
100103
}
101104

105+
@Deprecated
102106
@Override
103107
public Image getTitleImage() {
104108
return null;
105109
}
106110

111+
@Deprecated
107112
@Override
108113
public void contentChanged(IContentChangeNotifier source) {
109114
}
110115

116+
@Deprecated
111117
@Override
112118
protected Control createPage(Composite parent, ToolBarManager toolBarManager) {
113119
site = new DialogHistoryPageSite(getShell());
@@ -124,11 +130,13 @@ protected Control createPage(Composite parent, ToolBarManager toolBarManager) {
124130
return ((Page) historyPage).getControl();
125131
}
126132

133+
@Deprecated
127134
@Override
128135
protected final ISelectionProvider getSelectionProvider() {
129136
return site.getSelectionProvider();
130137
}
131138

139+
@Deprecated
132140
@Override
133141
protected ICompareInput getCompareInput(ISelection selection) {
134142
ICompareInput compareInput = super.getCompareInput(selection);
@@ -147,6 +155,7 @@ protected ICompareInput getCompareInput(ISelection selection) {
147155
return null;
148156
}
149157

158+
@Deprecated
150159
@Override
151160
protected void prepareInput(ICompareInput input, CompareConfiguration configuration, IProgressMonitor monitor) throws InvocationTargetException {
152161
IHistoryCompareAdapter compareAdapter = Adapters.adapt(historyPage, IHistoryCompareAdapter.class);
@@ -155,6 +164,7 @@ protected void prepareInput(ICompareInput input, CompareConfiguration configurat
155164
}
156165
}
157166

167+
@Deprecated
158168
@Override
159169
public void dispose() {
160170
super.dispose();

team/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageDialog.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,13 @@ public class ParticipantPageDialog extends SaveablePartDialog {
5151
* @param input the compare input to show in the dialog
5252
* @param participant the given participant
5353
*/
54+
@Deprecated
5455
public ParticipantPageDialog(Shell shell, SaveablePartAdapter input, ISynchronizeParticipant participant) {
5556
super(shell, input);
5657
this.participant = participant;
5758
}
5859

60+
@Deprecated
5961
@Override
6062
protected Control createDialogArea(Composite parent2) {
6163
Composite parent = (Composite) super.createDialogArea(parent2);
@@ -67,6 +69,7 @@ protected Control createDialogArea(Composite parent2) {
6769
return parent;
6870
}
6971

72+
@Deprecated
7073
@Override
7174
protected void buttonPressed(int buttonId) {
7275
if(buttonId == IDialogConstants.OK_ID && isRememberParticipant()) {
@@ -97,6 +100,7 @@ private void rememberParticipant() {
97100
*
98101
* @return the participant showing in this dialog.
99102
*/
103+
@Deprecated
100104
protected ISynchronizeParticipant getParticipant() {
101105
return participant;
102106
}
@@ -109,6 +113,7 @@ protected ISynchronizeParticipant getParticipant() {
109113
* view should be presented to the user
110114
* @since 3.2
111115
*/
116+
@Deprecated
112117
protected boolean isOfferToRememberParticipant() {
113118
return true;
114119
}

0 commit comments

Comments
 (0)