mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fix deprecation warnings
This commit is contained in:
parent
c1614cb877
commit
3fa42529d9
6 changed files with 13 additions and 31 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007 Wind River Systems, Inc. and others.
|
* Copyright (c) 2007, 2010 Wind River Systems, Inc. and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -19,13 +19,13 @@ import org.eclipse.swt.dnd.Clipboard;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.ui.IActionBars;
|
import org.eclipse.ui.IActionBars;
|
||||||
import org.eclipse.ui.ISharedImages;
|
import org.eclipse.ui.ISharedImages;
|
||||||
|
import org.eclipse.ui.IWorkbenchCommandConstants;
|
||||||
import org.eclipse.ui.PlatformUI;
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.actions.ActionFactory;
|
import org.eclipse.ui.actions.ActionFactory;
|
||||||
import org.eclipse.ui.actions.ActionGroup;
|
import org.eclipse.ui.actions.ActionGroup;
|
||||||
import org.eclipse.ui.actions.DeleteResourceAction;
|
import org.eclipse.ui.actions.DeleteResourceAction;
|
||||||
import org.eclipse.ui.actions.TextActionHandler;
|
import org.eclipse.ui.actions.TextActionHandler;
|
||||||
import org.eclipse.ui.navigator.ICommonMenuConstants;
|
import org.eclipse.ui.navigator.ICommonMenuConstants;
|
||||||
import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
|
|
||||||
import org.eclipse.ui.views.navigator.ResourceSelectionUtil;
|
import org.eclipse.ui.views.navigator.ResourceSelectionUtil;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.cview.CopyAction;
|
import org.eclipse.cdt.internal.ui.cview.CopyAction;
|
||||||
|
@ -121,21 +121,21 @@ public class CNavigatorEditActionGroup extends ActionGroup {
|
||||||
.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE_DISABLED));
|
.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE_DISABLED));
|
||||||
pasteAction.setImageDescriptor(images
|
pasteAction.setImageDescriptor(images
|
||||||
.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
|
.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
|
||||||
pasteAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.PASTE);
|
pasteAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_PASTE);
|
||||||
|
|
||||||
copyAction = new CopyAction(shell, clipboard, pasteAction);
|
copyAction = new CopyAction(shell, clipboard, pasteAction);
|
||||||
copyAction.setDisabledImageDescriptor(images
|
copyAction.setDisabledImageDescriptor(images
|
||||||
.getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED));
|
.getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED));
|
||||||
copyAction.setImageDescriptor(images
|
copyAction.setImageDescriptor(images
|
||||||
.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
|
.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
|
||||||
copyAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.COPY);
|
copyAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_COPY);
|
||||||
|
|
||||||
deleteAction = new DeleteResourceAction(shellProvider);
|
deleteAction = new DeleteResourceAction(shellProvider);
|
||||||
deleteAction.setDisabledImageDescriptor(images
|
deleteAction.setDisabledImageDescriptor(images
|
||||||
.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE_DISABLED));
|
.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE_DISABLED));
|
||||||
deleteAction.setImageDescriptor(images
|
deleteAction.setImageDescriptor(images
|
||||||
.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
|
.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
|
||||||
deleteAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.DELETE);
|
deleteAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_DELETE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2008 IBM Corporation and others.
|
* Copyright (c) 2000, 2010 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -17,12 +17,12 @@ import org.eclipse.jface.viewers.IStructuredSelection;
|
||||||
import org.eclipse.jface.window.IShellProvider;
|
import org.eclipse.jface.window.IShellProvider;
|
||||||
import org.eclipse.swt.widgets.Tree;
|
import org.eclipse.swt.widgets.Tree;
|
||||||
import org.eclipse.ui.IActionBars;
|
import org.eclipse.ui.IActionBars;
|
||||||
|
import org.eclipse.ui.IWorkbenchCommandConstants;
|
||||||
import org.eclipse.ui.actions.ActionFactory;
|
import org.eclipse.ui.actions.ActionFactory;
|
||||||
import org.eclipse.ui.actions.ActionGroup;
|
import org.eclipse.ui.actions.ActionGroup;
|
||||||
import org.eclipse.ui.actions.MoveResourceAction;
|
import org.eclipse.ui.actions.MoveResourceAction;
|
||||||
import org.eclipse.ui.actions.RenameResourceAction;
|
import org.eclipse.ui.actions.RenameResourceAction;
|
||||||
import org.eclipse.ui.navigator.ICommonMenuConstants;
|
import org.eclipse.ui.navigator.ICommonMenuConstants;
|
||||||
import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
|
|
||||||
import org.eclipse.ui.views.navigator.ResourceSelectionUtil;
|
import org.eclipse.ui.views.navigator.ResourceSelectionUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -77,10 +77,10 @@ public class CNavigatorRefactorActionGroup extends ActionGroup {
|
||||||
|
|
||||||
protected void makeActions() {
|
protected void makeActions() {
|
||||||
moveAction = new MoveResourceAction(shellProvider);
|
moveAction = new MoveResourceAction(shellProvider);
|
||||||
moveAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.MOVE);
|
moveAction.setActionDefinitionId(IWorkbenchCommandConstants.FILE_MOVE);
|
||||||
|
|
||||||
renameAction = new RenameResourceAction(shellProvider, tree);
|
renameAction = new RenameResourceAction(shellProvider, tree);
|
||||||
renameAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.RENAME);
|
renameAction.setActionDefinitionId(IWorkbenchCommandConstants.FILE_RENAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2008 IBM Corporation and others.
|
* Copyright (c) 2000, 2010 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -22,8 +22,6 @@ import org.eclipse.ui.IWorkbench;
|
||||||
import org.eclipse.ui.IWorkbenchPreferencePage;
|
import org.eclipse.ui.IWorkbenchPreferencePage;
|
||||||
import org.eclipse.ui.PlatformUI;
|
import org.eclipse.ui.PlatformUI;
|
||||||
|
|
||||||
import org.eclipse.cdt.ui.CUIPlugin;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Abstract preference page which is used to wrap a
|
* Abstract preference page which is used to wrap a
|
||||||
* {@link org.eclipse.cdt.internal.ui.preferences.IPreferenceConfigurationBlock}.
|
* {@link org.eclipse.cdt.internal.ui.preferences.IPreferenceConfigurationBlock}.
|
||||||
|
@ -98,8 +96,6 @@ public abstract class AbstractConfigurationBlockPreferencePage extends Preferenc
|
||||||
|
|
||||||
fOverlayStore.propagate();
|
fOverlayStore.propagate();
|
||||||
|
|
||||||
CUIPlugin.getDefault().savePluginPreferences();
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2002, 2008 QNX Software Systems and others.
|
* Copyright (c) 2002, 2010 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -41,7 +41,6 @@ import org.eclipse.swt.widgets.Text;
|
||||||
import org.eclipse.ui.IWorkbench;
|
import org.eclipse.ui.IWorkbench;
|
||||||
import org.eclipse.ui.IWorkbenchPreferencePage;
|
import org.eclipse.ui.IWorkbenchPreferencePage;
|
||||||
|
|
||||||
import org.eclipse.cdt.ui.CUIPlugin;
|
|
||||||
import org.eclipse.cdt.ui.PreferenceConstants;
|
import org.eclipse.cdt.ui.PreferenceConstants;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.dialogs.StatusInfo;
|
import org.eclipse.cdt.internal.ui.dialogs.StatusInfo;
|
||||||
|
@ -352,7 +351,6 @@ public abstract class AbstractPreferencePage extends PreferencePage implements I
|
||||||
@Override
|
@Override
|
||||||
public boolean performOk() {
|
public boolean performOk() {
|
||||||
fOverlayStore.propagate();
|
fOverlayStore.propagate();
|
||||||
CUIPlugin.getDefault().savePluginPreferences();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2002, 2008 QNX Software Systems and others.
|
* Copyright (c) 2002, 2010 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -127,16 +127,6 @@ public class CTemplatePreferencePage extends TemplatePreferencePage {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @see org.eclipse.jface.preference.IPreferencePage#performOk()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean performOk() {
|
|
||||||
boolean ok= super.performOk();
|
|
||||||
CUIPlugin.getDefault().savePluginPreferences();
|
|
||||||
return ok;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.ui.texteditor.templates.TemplatePreferencePage#createViewer(org.eclipse.swt.widgets.Composite)
|
* @see org.eclipse.ui.texteditor.templates.TemplatePreferencePage#createViewer(org.eclipse.swt.widgets.Composite)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2009 IBM Corporation and others.
|
* Copyright (c) 2000, 2010 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -40,7 +40,6 @@ import org.eclipse.ui.IWorkbench;
|
||||||
import org.eclipse.ui.IWorkbenchPreferencePage;
|
import org.eclipse.ui.IWorkbenchPreferencePage;
|
||||||
import org.eclipse.ui.PlatformUI;
|
import org.eclipse.ui.PlatformUI;
|
||||||
|
|
||||||
import org.eclipse.cdt.ui.CUIPlugin;
|
|
||||||
import org.eclipse.cdt.ui.PreferenceConstants;
|
import org.eclipse.cdt.ui.PreferenceConstants;
|
||||||
import org.eclipse.cdt.utils.ui.controls.ControlFactory;
|
import org.eclipse.cdt.utils.ui.controls.ControlFactory;
|
||||||
|
|
||||||
|
@ -279,7 +278,6 @@ public class ScalabilityPreferencePage extends PreferencePage implements
|
||||||
prefs.setValue(key, b.getSelection());
|
prefs.setValue(key, b.getSelection());
|
||||||
}
|
}
|
||||||
prefs.setValue(PreferenceConstants.SCALABILITY_NUMBER_OF_LINES, fLinesToTrigger.getIntValue());
|
prefs.setValue(PreferenceConstants.SCALABILITY_NUMBER_OF_LINES, fLinesToTrigger.getIntValue());
|
||||||
CUIPlugin.getDefault().savePluginPreferences();
|
|
||||||
return super.performOk();
|
return super.performOk();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue