mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-16 12:45:41 +02:00
get workbench from platformui
This commit is contained in:
parent
e04d843c3a
commit
4ca08f2627
1 changed files with 6 additions and 3 deletions
|
@ -62,6 +62,7 @@ import org.eclipse.ui.IEditorReference;
|
||||||
import org.eclipse.ui.IEditorRegistry;
|
import org.eclipse.ui.IEditorRegistry;
|
||||||
import org.eclipse.ui.IFileEditorInput;
|
import org.eclipse.ui.IFileEditorInput;
|
||||||
import org.eclipse.ui.IPartListener;
|
import org.eclipse.ui.IPartListener;
|
||||||
|
import org.eclipse.ui.IWorkbench;
|
||||||
import org.eclipse.ui.IWorkbenchPage;
|
import org.eclipse.ui.IWorkbenchPage;
|
||||||
import org.eclipse.ui.IWorkbenchPart;
|
import org.eclipse.ui.IWorkbenchPart;
|
||||||
import org.eclipse.ui.IWorkbenchWindow;
|
import org.eclipse.ui.IWorkbenchWindow;
|
||||||
|
@ -890,9 +891,10 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
||||||
{
|
{
|
||||||
// first we check if it's open in the active page
|
// first we check if it's open in the active page
|
||||||
IWorkbenchPage activePage = this.page;
|
IWorkbenchPage activePage = this.page;
|
||||||
|
IWorkbench wb = PlatformUI.getWorkbench();
|
||||||
if (activePage == null)
|
if (activePage == null)
|
||||||
{
|
{
|
||||||
IWorkbenchWindow activeWindow = SystemBasePlugin.getActiveWorkbenchWindow();
|
IWorkbenchWindow activeWindow = wb.getActiveWorkbenchWindow();
|
||||||
activePage = activeWindow.getActivePage();
|
activePage = activeWindow.getActivePage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -929,7 +931,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IWorkbenchWindow[] windows = RSEUIPlugin.getDefault().getWorkbench().getWorkbenchWindows();
|
IWorkbenchWindow[] windows = wb.getWorkbenchWindows();
|
||||||
|
|
||||||
for (int i = 0; i < windows.length; i++)
|
for (int i = 0; i < windows.length; i++)
|
||||||
{
|
{
|
||||||
|
@ -1279,9 +1281,10 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
||||||
public void openEditor() throws PartInitException
|
public void openEditor() throws PartInitException
|
||||||
{
|
{
|
||||||
IWorkbenchPage activePage = this.page;
|
IWorkbenchPage activePage = this.page;
|
||||||
|
IWorkbench wb = PlatformUI.getWorkbench();
|
||||||
if (activePage == null)
|
if (activePage == null)
|
||||||
{
|
{
|
||||||
activePage = SystemBasePlugin.getActiveWorkbenchWindow().getActivePage();
|
activePage = wb.getActiveWorkbenchWindow().getActivePage();
|
||||||
}
|
}
|
||||||
IFile file = getLocalResource();
|
IFile file = getLocalResource();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue