Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ public interface ISaveableWorkbenchPart extends ISaveablePart, IWorkbenchPart {
/**
* The property id for <code>isDirty</code>.
*/
@Deprecated
public static final int PROP_DIRTY = ISaveablePart.PROP_DIRTY;
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
public abstract class PageSaveablePart extends SaveablePartAdapter implements IContentChangeListener{

private final CompareConfiguration cc;
@Deprecated
Shell shell;

// Tracking of dirty state
Expand All @@ -87,6 +88,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC
* @param shell the shell for the part
* @param compareConfiguration the compare configuration
*/
@Deprecated
protected PageSaveablePart(Shell shell, CompareConfiguration compareConfiguration){
this.shell = shell;
this.cc = compareConfiguration;
Expand All @@ -104,11 +106,13 @@ protected PageSaveablePart(Shell shell, CompareConfiguration compareConfiguratio
};
}

@Deprecated
@Override
public boolean isDirty() {
return fDirty || fDirtyViewers.size() > 0;
}

@Deprecated
@Override
public void createPartControl(Composite parent) {
Composite composite = new Composite(parent, SWT.NULL);
Expand Down Expand Up @@ -185,6 +189,7 @@ protected Viewer getViewer(Viewer oldViewer, Object input) {
* selection listener on the page.
* @return the selection provider for the page
*/
@Deprecated
protected abstract ISelectionProvider getSelectionProvider();

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

/**
* Set the title of the page's page to the given text. The title
* will appear in the header of the pane containing the page.
* @param title the page's title
*/
@Deprecated
protected void setPageDescription(String title) {
fEditionPane.setText(title);
}
Expand All @@ -209,6 +216,7 @@ protected void setPageDescription(String title) {
* Set the saveable part's dirty state to the given state.
* @param dirty the dirty state
*/
@Deprecated
protected void setDirty(boolean dirty) {
boolean confirmSave= true;
Object o= cc.getProperty(CompareEditor.CONFIRM_SAVE_PROPERTY);
Expand Down Expand Up @@ -263,6 +271,7 @@ private void feedInput2(ISelection sel) {
* with a progress monitor.
* @param input the compare input to be prepared
*/
@Deprecated
protected void prepareCompareInput(final ICompareInput input) {
if (input == null) {
return;
Expand Down Expand Up @@ -295,6 +304,7 @@ protected void prepareCompareInput(final ICompareInput input) {
* @param monitor a progress monitor
* @throws InvocationTargetException if an error occurs
*/
@Deprecated
protected abstract void prepareInput(ICompareInput input, CompareConfiguration configuration, IProgressMonitor monitor) throws InvocationTargetException;

private void hookContentChangeListener(ICompareInput node) {
Expand All @@ -313,6 +323,7 @@ private void hookContentChangeListener(ICompareInput node) {
* Return the parent shell of this part.
* @return the parent shell of this part
*/
@Deprecated
protected Shell getShell() {
return shell;
}
Expand All @@ -321,6 +332,7 @@ protected Shell getShell() {
* This method is internal to the framework and should not be called by clients
* outside of the framework.
*/
@Deprecated
protected void setNavigator(ISynchronizePageConfiguration configuration) {
configuration.setProperty(SynchronizePageConfiguration.P_NAVIGATOR, new CompareEditorInputNavigator(
new Object[] {
Expand Down Expand Up @@ -366,6 +378,7 @@ private Viewer findContentViewer(Composite parent, Viewer oldViewer, ICompareInp
* @param selection the selection
* @return a compare input representing the selection
*/
@Deprecated
protected ICompareInput getCompareInput(ISelection selection) {
if (selection != null && selection instanceof IStructuredSelection ss) {
if (ss.size() == 1) {
Expand All @@ -384,6 +397,7 @@ protected ICompareInput getCompareInput(ISelection selection) {
*
* @param showContentPanes whether to show contents pane
*/
@Deprecated
public void setShowContentPanes(boolean showContentPanes) {
this.showContentPanes = showContentPanes;
}
Expand All @@ -393,6 +407,7 @@ public void setShowContentPanes(boolean showContentPanes) {
*
* @return the primary control for this part.
*/
@Deprecated
public Control getControl() {
return control;
}
Expand All @@ -413,6 +428,7 @@ private CompareConfiguration getCompareConfiguration() {
* @param monitor
* a progress monitor
*/
@Deprecated
@Override
public void doSave(IProgressMonitor monitor) {
flushViewers(monitor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,46 +34,56 @@
@Deprecated
public abstract class SaveablePartAdapter implements ISaveableWorkbenchPart {

@Deprecated
@Override
public void doSaveAs() {
}

@Deprecated
@Override
public boolean isSaveAsAllowed() {
return false;
}

@Deprecated
@Override
public boolean isSaveOnCloseNeeded() {
return false;
}

@Deprecated
@Override
public void addPropertyListener(IPropertyListener listener) {
}

@Deprecated
@Override
public void dispose() {
}

@Deprecated
@Override
public IWorkbenchPartSite getSite() {
return null;
}

@Deprecated
@Override
public String getTitleToolTip() {
return null;
}

@Deprecated
@Override
public void removePropertyListener(IPropertyListener listener) {
}

@Deprecated
@Override
public void setFocus() {
}

@Deprecated
@Override
public <T> T getAdapter(Class<T> adapter) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,20 @@ public class SaveablePartDialog extends TrayDialog {
* @param shell the parent shell or <code>null</code> to create a top level shell.
* @param input the part to show in the dialog.
*/
@Deprecated
public SaveablePartDialog(Shell shell, ISaveableWorkbenchPart input) {
super(shell);
setShellStyle(getShellStyle() | SWT.RESIZE | SWT.MAX);
this.input = input;
}

@Deprecated
@Override
protected void createButtonsForButtonBar(Composite parent) {
createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
}

@Deprecated
@Override
protected Control createDialogArea(Composite parent2) {
Composite parent = (Composite) super.createDialogArea(parent2);
Expand All @@ -77,6 +80,7 @@ protected Control createDialogArea(Composite parent2) {
return parent;
}

@Deprecated
@Override
public boolean close() {
saveChanges();
Expand All @@ -102,10 +106,12 @@ private void saveChanges() {
* @return the input to the dialog
* @since 3.2
*/
@Deprecated
protected ISaveableWorkbenchPart getInput() {
return input;
}

@Deprecated
@Override
protected IDialogSettings getDialogBoundsSettings() {
IDialogSettings compareSettings = PlatformUI.getDialogSettingsProvider(FrameworkUtil.getBundle(SaveablePartDialog.class)).getDialogSettings();
Expand All @@ -122,10 +128,12 @@ protected IDialogSettings getDialogBoundsSettings() {
* Set the help content id of this dialog.
* @param contextId the help context id
*/
@Deprecated
public void setHelpContextId(String contextId) {
fContextId= contextId;
}

@Deprecated
@Override
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
Expand All @@ -134,6 +142,7 @@ protected void configureShell(Shell newShell) {
}
}

@Deprecated
@Override
protected Point getInitialSize() {
Point initialSize = super.getInitialSize();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public class HistoryPageSaveablePart extends PageSaveablePart {
* @param object the object
* @return whether the object had an {@link IHistoryPageSource} available or not
*/
@Deprecated
public static boolean showHistoryInDialog(Shell shell, Object object) {
IHistoryPageSource pageSource = HistoryPageSource.getHistoryPageSource(object);
if (pageSource != null && pageSource.canShowHistoryFor(object)) {
Expand Down Expand Up @@ -88,26 +89,31 @@ private static boolean isFile(Object object) {
* @param pageSource the page source
* @param object the object whose history is to be displayed
*/
@Deprecated
public HistoryPageSaveablePart(Shell shell, CompareConfiguration configuration, IHistoryPageSource pageSource, Object object) {
super(shell,configuration);
this.pageSource = pageSource;
this.object = object;
}

@Deprecated
@Override
public String getTitle() {
return historyPage.getName();
}

@Deprecated
@Override
public Image getTitleImage() {
return null;
}

@Deprecated
@Override
public void contentChanged(IContentChangeNotifier source) {
}

@Deprecated
@Override
protected Control createPage(Composite parent, ToolBarManager toolBarManager) {
site = new DialogHistoryPageSite(getShell());
Expand All @@ -124,11 +130,13 @@ protected Control createPage(Composite parent, ToolBarManager toolBarManager) {
return ((Page) historyPage).getControl();
}

@Deprecated
@Override
protected final ISelectionProvider getSelectionProvider() {
return site.getSelectionProvider();
}

@Deprecated
@Override
protected ICompareInput getCompareInput(ISelection selection) {
ICompareInput compareInput = super.getCompareInput(selection);
Expand All @@ -147,6 +155,7 @@ protected ICompareInput getCompareInput(ISelection selection) {
return null;
}

@Deprecated
@Override
protected void prepareInput(ICompareInput input, CompareConfiguration configuration, IProgressMonitor monitor) throws InvocationTargetException {
IHistoryCompareAdapter compareAdapter = Adapters.adapt(historyPage, IHistoryCompareAdapter.class);
Expand All @@ -155,6 +164,7 @@ protected void prepareInput(ICompareInput input, CompareConfiguration configurat
}
}

@Deprecated
@Override
public void dispose() {
super.dispose();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@ public class ParticipantPageDialog extends SaveablePartDialog {
* @param input the compare input to show in the dialog
* @param participant the given participant
*/
@Deprecated
public ParticipantPageDialog(Shell shell, SaveablePartAdapter input, ISynchronizeParticipant participant) {
super(shell, input);
this.participant = participant;
}

@Deprecated
@Override
protected Control createDialogArea(Composite parent2) {
Composite parent = (Composite) super.createDialogArea(parent2);
Expand All @@ -67,6 +69,7 @@ protected Control createDialogArea(Composite parent2) {
return parent;
}

@Deprecated
@Override
protected void buttonPressed(int buttonId) {
if(buttonId == IDialogConstants.OK_ID && isRememberParticipant()) {
Expand Down Expand Up @@ -97,6 +100,7 @@ private void rememberParticipant() {
*
* @return the participant showing in this dialog.
*/
@Deprecated
protected ISynchronizeParticipant getParticipant() {
return participant;
}
Expand All @@ -109,6 +113,7 @@ protected ISynchronizeParticipant getParticipant() {
* view should be presented to the user
* @since 3.2
*/
@Deprecated
protected boolean isOfferToRememberParticipant() {
return true;
}
Expand Down
Loading
Loading