mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 06:02:11 +02:00
Remove more deprecated function warnings
This commit is contained in:
parent
4175540e12
commit
76353eb064
1 changed files with 7 additions and 6 deletions
|
@ -53,6 +53,7 @@ import org.eclipse.swt.widgets.Tree;
|
||||||
import org.eclipse.ui.IActionBars;
|
import org.eclipse.ui.IActionBars;
|
||||||
import org.eclipse.ui.IEditorInput;
|
import org.eclipse.ui.IEditorInput;
|
||||||
import org.eclipse.ui.IEditorPart;
|
import org.eclipse.ui.IEditorPart;
|
||||||
|
import org.eclipse.ui.IEditorReference;
|
||||||
import org.eclipse.ui.IFileEditorInput;
|
import org.eclipse.ui.IFileEditorInput;
|
||||||
import org.eclipse.ui.IMemento;
|
import org.eclipse.ui.IMemento;
|
||||||
import org.eclipse.ui.IPartListener;
|
import org.eclipse.ui.IPartListener;
|
||||||
|
@ -994,9 +995,9 @@ public class CView extends ViewPart implements IMenuListener, ISetSelectionTarge
|
||||||
if (obj instanceof IFile && selection.size() == 1) {
|
if (obj instanceof IFile && selection.size() == 1) {
|
||||||
IFile file = (IFile) obj;
|
IFile file = (IFile) obj;
|
||||||
IWorkbenchPage page = getSite().getPage();
|
IWorkbenchPage page = getSite().getPage();
|
||||||
IEditorPart editorArray[] = page.getEditors();
|
IEditorReference[] editorReferences = page.getEditorReferences();
|
||||||
for (int i = 0; i < editorArray.length; ++i) {
|
for (int i = 0; i < editorReferences.length; ++i) {
|
||||||
IEditorPart editor = editorArray[i];
|
IEditorPart editor = editorReferences[i].getEditor(false);
|
||||||
IEditorInput input = editor.getEditorInput();
|
IEditorInput input = editor.getEditorInput();
|
||||||
if (input instanceof IFileEditorInput
|
if (input instanceof IFileEditorInput
|
||||||
&& file.equals(((IFileEditorInput)input).getFile())) {
|
&& file.equals(((IFileEditorInput)input).getFile())) {
|
||||||
|
@ -1010,9 +1011,9 @@ public class CView extends ViewPart implements IMenuListener, ISetSelectionTarge
|
||||||
if (res == null || !(res instanceof IFile))
|
if (res == null || !(res instanceof IFile))
|
||||||
return;
|
return;
|
||||||
IWorkbenchPage page = getSite().getPage();
|
IWorkbenchPage page = getSite().getPage();
|
||||||
IEditorPart editorArray[] = page.getEditors();
|
IEditorReference editorReferences[] = page.getEditorReferences();
|
||||||
for (int i = 0; i < editorArray.length; ++i) {
|
for (int i = 0; i < editorReferences.length; ++i) {
|
||||||
IEditorPart editor = editorArray[i];
|
IEditorPart editor = editorReferences[i].getEditor(false);
|
||||||
IEditorInput input = editor.getEditorInput();
|
IEditorInput input = editor.getEditorInput();
|
||||||
if (input instanceof IFileEditorInput
|
if (input instanceof IFileEditorInput
|
||||||
&& res.equals(((IFileEditorInput)input).getFile())) {
|
&& res.equals(((IFileEditorInput)input).getFile())) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue