mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-30 03:33:37 +02:00
Move away of the deprecated AbstractUIPlugin.getWorkbench
Use PlatformUI.getWorkbench instead. Change-Id: I8c0eb2c4b3b414e61f03fc9d9becd1d574f7e26d Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
This commit is contained in:
parent
2f20829144
commit
f90f900e48
51 changed files with 104 additions and 79 deletions
|
@ -26,6 +26,7 @@ import org.eclipse.core.runtime.Status;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.ui.IWorkbenchPage;
|
import org.eclipse.ui.IWorkbenchPage;
|
||||||
import org.eclipse.ui.IWorkbenchWindow;
|
import org.eclipse.ui.IWorkbenchWindow;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||||
import org.osgi.framework.BundleContext;
|
import org.osgi.framework.BundleContext;
|
||||||
|
|
||||||
|
@ -139,7 +140,7 @@ public class AutotoolsUIPlugin extends AbstractUIPlugin {
|
||||||
* Returns the active workbench window or <code>null</code> if none
|
* Returns the active workbench window or <code>null</code> if none
|
||||||
*/
|
*/
|
||||||
public static IWorkbenchWindow getActiveWorkbenchWindow() {
|
public static IWorkbenchWindow getActiveWorkbenchWindow() {
|
||||||
return getDefault().getWorkbench().getActiveWorkbenchWindow();
|
return PlatformUI.getWorkbench().getActiveWorkbenchWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -18,7 +18,6 @@ package org.eclipse.cdt.internal.autotools.ui.preferences;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.eclipse.cdt.autotools.ui.AutotoolsUIPlugin;
|
|
||||||
import org.eclipse.cdt.make.ui.IMakeHelpContextIds;
|
import org.eclipse.cdt.make.ui.IMakeHelpContextIds;
|
||||||
import org.eclipse.cdt.ui.PreferenceConstants;
|
import org.eclipse.cdt.ui.PreferenceConstants;
|
||||||
import org.eclipse.jface.preference.IPreferenceStore;
|
import org.eclipse.jface.preference.IPreferenceStore;
|
||||||
|
@ -44,6 +43,7 @@ import org.eclipse.swt.widgets.Control;
|
||||||
import org.eclipse.swt.widgets.Label;
|
import org.eclipse.swt.widgets.Label;
|
||||||
import org.eclipse.swt.widgets.TabFolder;
|
import org.eclipse.swt.widgets.TabFolder;
|
||||||
import org.eclipse.swt.widgets.TabItem;
|
import org.eclipse.swt.widgets.TabItem;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.model.WorkbenchViewerComparator;
|
import org.eclipse.ui.model.WorkbenchViewerComparator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -252,7 +252,7 @@ public class AutoconfEditorPreferencePage extends AbstractEditorPreferencePage {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Control createContents(Composite parent) {
|
protected Control createContents(Composite parent) {
|
||||||
AutotoolsUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(),
|
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(),
|
||||||
IMakeHelpContextIds.MAKE_EDITOR_PREFERENCE_PAGE);
|
IMakeHelpContextIds.MAKE_EDITOR_PREFERENCE_PAGE);
|
||||||
getOverlayStore().load();
|
getOverlayStore().load();
|
||||||
getOverlayStore().start();
|
getOverlayStore().start();
|
||||||
|
|
|
@ -18,7 +18,6 @@ package org.eclipse.cdt.internal.autotools.ui.preferences;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.eclipse.cdt.autotools.ui.AutotoolsUIPlugin;
|
|
||||||
import org.eclipse.cdt.make.ui.IMakeHelpContextIds;
|
import org.eclipse.cdt.make.ui.IMakeHelpContextIds;
|
||||||
import org.eclipse.cdt.ui.PreferenceConstants;
|
import org.eclipse.cdt.ui.PreferenceConstants;
|
||||||
import org.eclipse.jface.preference.IPreferenceStore;
|
import org.eclipse.jface.preference.IPreferenceStore;
|
||||||
|
@ -43,6 +42,7 @@ import org.eclipse.swt.widgets.Control;
|
||||||
import org.eclipse.swt.widgets.Label;
|
import org.eclipse.swt.widgets.Label;
|
||||||
import org.eclipse.swt.widgets.TabFolder;
|
import org.eclipse.swt.widgets.TabFolder;
|
||||||
import org.eclipse.swt.widgets.TabItem;
|
import org.eclipse.swt.widgets.TabItem;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.model.WorkbenchViewerComparator;
|
import org.eclipse.ui.model.WorkbenchViewerComparator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -233,7 +233,7 @@ public class AutomakeEditorPreferencePage extends AbstractEditorPreferencePage {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Control createContents(Composite parent) {
|
protected Control createContents(Composite parent) {
|
||||||
AutotoolsUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(),
|
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(),
|
||||||
IMakeHelpContextIds.MAKE_EDITOR_PREFERENCE_PAGE);
|
IMakeHelpContextIds.MAKE_EDITOR_PREFERENCE_PAGE);
|
||||||
getOverlayStore().load();
|
getOverlayStore().load();
|
||||||
getOverlayStore().start();
|
getOverlayStore().start();
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %pluginName
|
Bundle-Name: %pluginName
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.make.ui; singleton:=true
|
Bundle-SymbolicName: org.eclipse.cdt.make.ui; singleton:=true
|
||||||
Bundle-Version: 7.3.200.qualifier
|
Bundle-Version: 7.3.300.qualifier
|
||||||
Bundle-Activator: org.eclipse.cdt.make.internal.ui.MakeUIPlugin
|
Bundle-Activator: org.eclipse.cdt.make.internal.ui.MakeUIPlugin
|
||||||
Bundle-Vendor: %providerName
|
Bundle-Vendor: %providerName
|
||||||
Bundle-Localization: plugin
|
Bundle-Localization: plugin
|
||||||
|
|
|
@ -39,6 +39,7 @@ import org.eclipse.swt.widgets.Display;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.ui.IWorkbenchPage;
|
import org.eclipse.ui.IWorkbenchPage;
|
||||||
import org.eclipse.ui.IWorkbenchWindow;
|
import org.eclipse.ui.IWorkbenchWindow;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.editors.text.EditorsUI;
|
import org.eclipse.ui.editors.text.EditorsUI;
|
||||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||||
import org.eclipse.ui.preferences.ScopedPreferenceStore;
|
import org.eclipse.ui.preferences.ScopedPreferenceStore;
|
||||||
|
@ -104,7 +105,7 @@ public class MakeUIPlugin extends AbstractUIPlugin {
|
||||||
* Returns the active workbench window or <code>null</code> if none
|
* Returns the active workbench window or <code>null</code> if none
|
||||||
*/
|
*/
|
||||||
public static IWorkbenchWindow getActiveWorkbenchWindow() {
|
public static IWorkbenchWindow getActiveWorkbenchWindow() {
|
||||||
return getDefault().getWorkbench().getActiveWorkbenchWindow();
|
return PlatformUI.getWorkbench().getActiveWorkbenchWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -240,7 +241,7 @@ public class MakeUIPlugin extends AbstractUIPlugin {
|
||||||
if (getActiveWorkbenchShell() != null) {
|
if (getActiveWorkbenchShell() != null) {
|
||||||
return getActiveWorkbenchShell();
|
return getActiveWorkbenchShell();
|
||||||
}
|
}
|
||||||
IWorkbenchWindow[] windows = getDefault().getWorkbench().getWorkbenchWindows();
|
IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
|
||||||
return windows[0].getShell();
|
return windows[0].getShell();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ package org.eclipse.cdt.make.internal.ui.preferences;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.eclipse.cdt.make.internal.ui.MakeUIPlugin;
|
|
||||||
import org.eclipse.cdt.make.internal.ui.preferences.OverlayPreferenceStore.OverlayKey;
|
import org.eclipse.cdt.make.internal.ui.preferences.OverlayPreferenceStore.OverlayKey;
|
||||||
import org.eclipse.cdt.make.internal.ui.text.ColorManager;
|
import org.eclipse.cdt.make.internal.ui.text.ColorManager;
|
||||||
import org.eclipse.cdt.make.ui.IMakeHelpContextIds;
|
import org.eclipse.cdt.make.ui.IMakeHelpContextIds;
|
||||||
|
@ -49,6 +48,7 @@ import org.eclipse.swt.widgets.Control;
|
||||||
import org.eclipse.swt.widgets.Label;
|
import org.eclipse.swt.widgets.Label;
|
||||||
import org.eclipse.swt.widgets.TabFolder;
|
import org.eclipse.swt.widgets.TabFolder;
|
||||||
import org.eclipse.swt.widgets.TabItem;
|
import org.eclipse.swt.widgets.TabItem;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.model.WorkbenchViewerComparator;
|
import org.eclipse.ui.model.WorkbenchViewerComparator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -241,7 +241,7 @@ public class MakefileEditorPreferencePage extends AbstractMakefileEditorPreferen
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Control createContents(Composite parent) {
|
protected Control createContents(Composite parent) {
|
||||||
MakeUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(),
|
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(),
|
||||||
IMakeHelpContextIds.MAKE_EDITOR_PREFERENCE_PAGE);
|
IMakeHelpContextIds.MAKE_EDITOR_PREFERENCE_PAGE);
|
||||||
getOverlayStore().load();
|
getOverlayStore().load();
|
||||||
getOverlayStore().start();
|
getOverlayStore().start();
|
||||||
|
|
|
@ -101,7 +101,7 @@ public class MakeView extends ViewPart {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createPartControl(Composite parent) {
|
public void createPartControl(Composite parent) {
|
||||||
MakeUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(parent, IMakeHelpContextIds.MAKE_VIEW);
|
PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IMakeHelpContextIds.MAKE_VIEW);
|
||||||
fViewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
|
fViewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
|
||||||
fViewer.setUseHashlookup(true);
|
fViewer.setUseHashlookup(true);
|
||||||
fViewer.setContentProvider(new MakeContentProvider());
|
fViewer.setContentProvider(new MakeContentProvider());
|
||||||
|
|
|
@ -23,6 +23,7 @@ import org.eclipse.core.runtime.Status;
|
||||||
import org.eclipse.jface.dialogs.ErrorDialog;
|
import org.eclipse.jface.dialogs.ErrorDialog;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.ui.IWorkbenchWindow;
|
import org.eclipse.ui.IWorkbenchWindow;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||||
|
|
||||||
public class ManagedBuilderUIPlugin extends AbstractUIPlugin {
|
public class ManagedBuilderUIPlugin extends AbstractUIPlugin {
|
||||||
|
@ -54,7 +55,7 @@ public class ManagedBuilderUIPlugin extends AbstractUIPlugin {
|
||||||
* Returns the active workbench window or <code>null</code> if none
|
* Returns the active workbench window or <code>null</code> if none
|
||||||
*/
|
*/
|
||||||
public static IWorkbenchWindow getActiveWorkbenchWindow() {
|
public static IWorkbenchWindow getActiveWorkbenchWindow() {
|
||||||
return getDefault().getWorkbench().getActiveWorkbenchWindow();
|
return PlatformUI.getWorkbench().getActiveWorkbenchWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -121,7 +122,7 @@ public class ManagedBuilderUIPlugin extends AbstractUIPlugin {
|
||||||
if (getActiveWorkbenchShell() != null) {
|
if (getActiveWorkbenchShell() != null) {
|
||||||
return getActiveWorkbenchShell();
|
return getActiveWorkbenchShell();
|
||||||
} else {
|
} else {
|
||||||
IWorkbenchWindow[] windows = getDefault().getWorkbench().getWorkbenchWindows();
|
IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
|
||||||
return windows[0].getShell();
|
return windows[0].getShell();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,11 +13,11 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.ui.cview;
|
package org.eclipse.cdt.internal.ui.cview;
|
||||||
|
|
||||||
import org.eclipse.cdt.ui.CUIPlugin;
|
|
||||||
import org.eclipse.jface.viewers.Viewer;
|
import org.eclipse.jface.viewers.Viewer;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.ui.IWorkbench;
|
import org.eclipse.ui.IWorkbench;
|
||||||
import org.eclipse.ui.IWorkbenchWindow;
|
import org.eclipse.ui.IWorkbenchWindow;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.actions.SelectionProviderAction;
|
import org.eclipse.ui.actions.SelectionProviderAction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -60,7 +60,7 @@ public abstract class CViewAction extends SelectionProviderAction {
|
||||||
* Returns the workbench.
|
* Returns the workbench.
|
||||||
*/
|
*/
|
||||||
protected IWorkbench getWorkbench() {
|
protected IWorkbench getWorkbench() {
|
||||||
return CUIPlugin.getDefault().getWorkbench();
|
return PlatformUI.getWorkbench();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -33,6 +33,7 @@ import org.eclipse.swt.graphics.Point;
|
||||||
import org.eclipse.swt.graphics.RGB;
|
import org.eclipse.swt.graphics.RGB;
|
||||||
import org.eclipse.swt.widgets.Display;
|
import org.eclipse.swt.widgets.Display;
|
||||||
import org.eclipse.ui.IWorkbench;
|
import org.eclipse.ui.IWorkbench;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.ide.IDE;
|
import org.eclipse.ui.ide.IDE;
|
||||||
import org.eclipse.ui.model.IWorkbenchAdapter;
|
import org.eclipse.ui.model.IWorkbenchAdapter;
|
||||||
|
|
||||||
|
@ -68,7 +69,7 @@ class CPElementLabelProvider extends LabelProvider implements IColorProvider {
|
||||||
fOutputImage = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_CONTAINER);
|
fOutputImage = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_CONTAINER);
|
||||||
fContainerImage = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_LIBRARY);
|
fContainerImage = CDTSharedImages.getImageDescriptor(CDTSharedImages.IMG_OBJS_LIBRARY);
|
||||||
|
|
||||||
IWorkbench workbench = CUIPlugin.getDefault().getWorkbench();
|
IWorkbench workbench = PlatformUI.getWorkbench();
|
||||||
|
|
||||||
fProjectImage = workbench.getSharedImages().getImageDescriptor(IDE.SharedImages.IMG_OBJ_PROJECT);
|
fProjectImage = workbench.getSharedImages().getImageDescriptor(IDE.SharedImages.IMG_OBJ_PROJECT);
|
||||||
bShowExported = showExported;
|
bShowExported = showExported;
|
||||||
|
|
|
@ -66,6 +66,7 @@ import org.eclipse.swt.widgets.Button;
|
||||||
import org.eclipse.swt.widgets.Composite;
|
import org.eclipse.swt.widgets.Composite;
|
||||||
import org.eclipse.swt.widgets.DirectoryDialog;
|
import org.eclipse.swt.widgets.DirectoryDialog;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
|
import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
|
||||||
import org.eclipse.ui.model.WorkbenchLabelProvider;
|
import org.eclipse.ui.model.WorkbenchLabelProvider;
|
||||||
|
|
||||||
|
@ -212,8 +213,7 @@ public class CPathIncludeSymbolEntryPage extends CPathIncludeSymbolEntryBasePage
|
||||||
fIncludeSymPathsList.setButtonsMinWidth(buttonBarWidth);
|
fIncludeSymPathsList.setButtonsMinWidth(buttonBarWidth);
|
||||||
setControl(composite);
|
setControl(composite);
|
||||||
fIncludeSymPathsList.getTreeViewer().addFilter(fFilter);
|
fIncludeSymPathsList.getTreeViewer().addFilter(fFilter);
|
||||||
CUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(composite,
|
PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, ICHelpContextIds.PROJECT_INCLUDE_PATHS_SYMBOLS);
|
||||||
ICHelpContextIds.PROJECT_INCLUDE_PATHS_SYMBOLS);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -67,6 +67,7 @@ import org.eclipse.swt.widgets.Button;
|
||||||
import org.eclipse.swt.widgets.Composite;
|
import org.eclipse.swt.widgets.Composite;
|
||||||
import org.eclipse.swt.widgets.DirectoryDialog;
|
import org.eclipse.swt.widgets.DirectoryDialog;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
|
import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
|
||||||
import org.eclipse.ui.model.WorkbenchLabelProvider;
|
import org.eclipse.ui.model.WorkbenchLabelProvider;
|
||||||
|
|
||||||
|
@ -260,8 +261,7 @@ public class CPathIncludeSymbolEntryPerFilePage extends CPathIncludeSymbolEntryB
|
||||||
fIncludeSymPathsList.setButtonsMinWidth(buttonBarWidth);
|
fIncludeSymPathsList.setButtonsMinWidth(buttonBarWidth);
|
||||||
setControl(composite);
|
setControl(composite);
|
||||||
fIncludeSymPathsList.getTreeViewer().addFilter(fFilter);
|
fIncludeSymPathsList.getTreeViewer().addFilter(fFilter);
|
||||||
CUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(composite,
|
PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, ICHelpContextIds.PROJECT_INCLUDE_PATHS_SYMBOLS);
|
||||||
ICHelpContextIds.PROJECT_INCLUDE_PATHS_SYMBOLS);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -14,10 +14,10 @@
|
||||||
package org.eclipse.cdt.internal.ui.dialogs.cpaths;
|
package org.eclipse.cdt.internal.ui.dialogs.cpaths;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.model.IPathEntry;
|
import org.eclipse.cdt.core.model.IPathEntry;
|
||||||
import org.eclipse.cdt.ui.CUIPlugin;
|
|
||||||
import org.eclipse.cdt.ui.wizards.IPathEntryContainerPage;
|
import org.eclipse.cdt.ui.wizards.IPathEntryContainerPage;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.swt.graphics.Image;
|
import org.eclipse.swt.graphics.Image;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.ide.IDE;
|
import org.eclipse.ui.ide.IDE;
|
||||||
|
|
||||||
public class ProjectContainerDescriptor implements IContainerDescriptor {
|
public class ProjectContainerDescriptor implements IContainerDescriptor {
|
||||||
|
@ -39,7 +39,7 @@ public class ProjectContainerDescriptor implements IContainerDescriptor {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Image getImage() {
|
public Image getImage() {
|
||||||
return CUIPlugin.getDefault().getWorkbench().getSharedImages().getImage(IDE.SharedImages.IMG_OBJ_PROJECT);
|
return PlatformUI.getWorkbench().getSharedImages().getImage(IDE.SharedImages.IMG_OBJ_PROJECT);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,7 @@ import org.eclipse.swt.dnd.Transfer;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.ui.IWorkbench;
|
import org.eclipse.ui.IWorkbench;
|
||||||
import org.eclipse.ui.IWorkbenchWindow;
|
import org.eclipse.ui.IWorkbenchWindow;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.actions.WorkspaceModifyOperation;
|
import org.eclipse.ui.actions.WorkspaceModifyOperation;
|
||||||
|
|
||||||
public class FileTransferDragAdapter implements TransferDragSourceListener {
|
public class FileTransferDragAdapter implements TransferDragSourceListener {
|
||||||
|
@ -168,7 +169,7 @@ public class FileTransferDragAdapter implements TransferDragSourceListener {
|
||||||
|
|
||||||
private static void runOperation(IRunnableWithProgress operation, boolean fork, boolean cancelable) {
|
private static void runOperation(IRunnableWithProgress operation, boolean fork, boolean cancelable) {
|
||||||
try {
|
try {
|
||||||
IWorkbench workbench = CUIPlugin.getDefault().getWorkbench();
|
IWorkbench workbench = PlatformUI.getWorkbench();
|
||||||
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
|
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
|
||||||
Shell parent = window.getShell();
|
Shell parent = window.getShell();
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@ import org.eclipse.text.edits.MultiTextEdit;
|
||||||
import org.eclipse.text.undo.DocumentUndoManagerRegistry;
|
import org.eclipse.text.undo.DocumentUndoManagerRegistry;
|
||||||
import org.eclipse.text.undo.IDocumentUndoManager;
|
import org.eclipse.text.undo.IDocumentUndoManager;
|
||||||
import org.eclipse.ui.IEditorInput;
|
import org.eclipse.ui.IEditorInput;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
|
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
|
||||||
import org.eclipse.ui.texteditor.ITextEditor;
|
import org.eclipse.ui.texteditor.ITextEditor;
|
||||||
import org.eclipse.ui.texteditor.TextEditorAction;
|
import org.eclipse.ui.texteditor.TextEditorAction;
|
||||||
|
@ -62,8 +63,7 @@ public class AddIncludeAction extends TextEditorAction {
|
||||||
*/
|
*/
|
||||||
public AddIncludeAction(ITextEditor editor) {
|
public AddIncludeAction(ITextEditor editor) {
|
||||||
super(CEditorMessages.getBundleForConstructedKeys(), "AddInclude.", editor); //$NON-NLS-1$
|
super(CEditorMessages.getBundleForConstructedKeys(), "AddInclude.", editor); //$NON-NLS-1$
|
||||||
CUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(this,
|
PlatformUI.getWorkbench().getHelpSystem().setHelp(this, ICHelpContextIds.ADD_INCLUDE_ON_SELECTION_ACTION);
|
||||||
ICHelpContextIds.ADD_INCLUDE_ON_SELECTION_ACTION);
|
|
||||||
final Shell shell = editor.getEditorSite().getShell();
|
final Shell shell = editor.getEditorSite().getShell();
|
||||||
fAmbiguityResolver = new IElementSelector() {
|
fAmbiguityResolver = new IElementSelector() {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
|
|
|
@ -39,6 +39,7 @@ import org.eclipse.text.edits.MultiTextEdit;
|
||||||
import org.eclipse.text.undo.DocumentUndoManagerRegistry;
|
import org.eclipse.text.undo.DocumentUndoManagerRegistry;
|
||||||
import org.eclipse.text.undo.IDocumentUndoManager;
|
import org.eclipse.text.undo.IDocumentUndoManager;
|
||||||
import org.eclipse.ui.IEditorInput;
|
import org.eclipse.ui.IEditorInput;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.texteditor.ITextEditor;
|
import org.eclipse.ui.texteditor.ITextEditor;
|
||||||
import org.eclipse.ui.texteditor.TextEditorAction;
|
import org.eclipse.ui.texteditor.TextEditorAction;
|
||||||
|
|
||||||
|
@ -52,7 +53,7 @@ public class OrganizeIncludesAction extends TextEditorAction {
|
||||||
*/
|
*/
|
||||||
public OrganizeIncludesAction(ITextEditor editor) {
|
public OrganizeIncludesAction(ITextEditor editor) {
|
||||||
super(CEditorMessages.getBundleForConstructedKeys(), "OrganizeIncludes.", editor); //$NON-NLS-1$
|
super(CEditorMessages.getBundleForConstructedKeys(), "OrganizeIncludes.", editor); //$NON-NLS-1$
|
||||||
CUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(this, ICHelpContextIds.ORGANIZE_INCLUDES_ACTION);
|
PlatformUI.getWorkbench().getHelpSystem().setHelp(this, ICHelpContextIds.ORGANIZE_INCLUDES_ACTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
package org.eclipse.cdt.internal.ui.refactoring.togglefunction;
|
package org.eclipse.cdt.internal.ui.refactoring.togglefunction;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.refactoring.changes.CreateFileChange;
|
import org.eclipse.cdt.internal.ui.refactoring.changes.CreateFileChange;
|
||||||
import org.eclipse.cdt.ui.CUIPlugin;
|
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
|
@ -56,7 +55,7 @@ public class ToggleFileCreator {
|
||||||
}
|
}
|
||||||
final boolean[] answer = new boolean[1];
|
final boolean[] answer = new boolean[1];
|
||||||
Runnable r = () -> {
|
Runnable r = () -> {
|
||||||
Shell shell = CUIPlugin.getDefault().getWorkbench().getWorkbenchWindows()[0].getShell();
|
Shell shell = PlatformUI.getWorkbench().getWorkbenchWindows()[0].getShell();
|
||||||
String functionName;
|
String functionName;
|
||||||
if (context.getDeclaration() != null) {
|
if (context.getDeclaration() != null) {
|
||||||
functionName = context.getDeclaration().getRawSignature();
|
functionName = context.getDeclaration().getRawSignature();
|
||||||
|
|
|
@ -51,6 +51,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
|
||||||
import org.eclipse.swt.graphics.Image;
|
import org.eclipse.swt.graphics.Image;
|
||||||
import org.eclipse.swt.graphics.Point;
|
import org.eclipse.swt.graphics.Point;
|
||||||
import org.eclipse.ui.ISharedImages;
|
import org.eclipse.ui.ISharedImages;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.ide.IDE;
|
import org.eclipse.ui.ide.IDE;
|
||||||
import org.eclipse.ui.model.IWorkbenchAdapter;
|
import org.eclipse.ui.model.IWorkbenchAdapter;
|
||||||
|
|
||||||
|
@ -107,7 +108,7 @@ public class CElementImageProvider {
|
||||||
private static ImageDescriptor DESC_OBJ_PROJECT;
|
private static ImageDescriptor DESC_OBJ_PROJECT;
|
||||||
//private static ImageDescriptor DESC_OBJ_FOLDER;
|
//private static ImageDescriptor DESC_OBJ_FOLDER;
|
||||||
{
|
{
|
||||||
ISharedImages images = CUIPlugin.getDefault().getWorkbench().getSharedImages();
|
ISharedImages images = PlatformUI.getWorkbench().getSharedImages();
|
||||||
DESC_OBJ_PROJECT_CLOSED = images.getImageDescriptor(IDE.SharedImages.IMG_OBJ_PROJECT_CLOSED);
|
DESC_OBJ_PROJECT_CLOSED = images.getImageDescriptor(IDE.SharedImages.IMG_OBJ_PROJECT_CLOSED);
|
||||||
DESC_OBJ_PROJECT = images.getImageDescriptor(IDE.SharedImages.IMG_OBJ_PROJECT);
|
DESC_OBJ_PROJECT = images.getImageDescriptor(IDE.SharedImages.IMG_OBJ_PROJECT);
|
||||||
//DESC_OBJ_FOLDER= images.getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER);
|
//DESC_OBJ_FOLDER= images.getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER);
|
||||||
|
|
|
@ -39,6 +39,7 @@ import org.eclipse.ui.IWorkbenchPart;
|
||||||
import org.eclipse.ui.IWorkbenchWindow;
|
import org.eclipse.ui.IWorkbenchWindow;
|
||||||
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
|
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
|
||||||
import org.eclipse.ui.IWorkbenchWizard;
|
import org.eclipse.ui.IWorkbenchWizard;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.actions.NewProjectAction;
|
import org.eclipse.ui.actions.NewProjectAction;
|
||||||
|
|
||||||
public abstract class AbstractOpenWizardAction extends Action implements IWorkbenchWindowActionDelegate {
|
public abstract class AbstractOpenWizardAction extends Action implements IWorkbenchWindowActionDelegate {
|
||||||
|
@ -78,7 +79,7 @@ public abstract class AbstractOpenWizardAction extends Action implements IWorkbe
|
||||||
}
|
}
|
||||||
|
|
||||||
protected IWorkbench getWorkbench() {
|
protected IWorkbench getWorkbench() {
|
||||||
return CUIPlugin.getDefault().getWorkbench();
|
return PlatformUI.getWorkbench();
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isOfAcceptedType(Object obj) {
|
private boolean isOfAcceptedType(Object obj) {
|
||||||
|
|
|
@ -17,12 +17,12 @@ package org.eclipse.cdt.internal.ui.workingsets;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.eclipse.cdt.ui.CUIPlugin;
|
|
||||||
import org.eclipse.jface.action.IContributionItem;
|
import org.eclipse.jface.action.IContributionItem;
|
||||||
import org.eclipse.jface.action.MenuManager;
|
import org.eclipse.jface.action.MenuManager;
|
||||||
import org.eclipse.osgi.util.NLS;
|
import org.eclipse.osgi.util.NLS;
|
||||||
import org.eclipse.ui.IWorkingSet;
|
import org.eclipse.ui.IWorkingSet;
|
||||||
import org.eclipse.ui.IWorkingSetManager;
|
import org.eclipse.ui.IWorkingSetManager;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.actions.CompoundContributionItem;
|
import org.eclipse.ui.actions.CompoundContributionItem;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -76,7 +76,7 @@ abstract class AbstractWorkingSetsContribution extends CompoundContributionItem
|
||||||
|
|
||||||
private IWorkingSetManager getWorkingsetManager() {
|
private IWorkingSetManager getWorkingsetManager() {
|
||||||
if (workingSetManager == null) {
|
if (workingSetManager == null) {
|
||||||
workingSetManager = CUIPlugin.getDefault().getWorkbench().getWorkingSetManager();
|
workingSetManager = PlatformUI.getWorkbench().getWorkingSetManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
return workingSetManager;
|
return workingSetManager;
|
||||||
|
|
|
@ -36,6 +36,7 @@ import org.eclipse.jface.util.PropertyChangeEvent;
|
||||||
import org.eclipse.ui.IMemento;
|
import org.eclipse.ui.IMemento;
|
||||||
import org.eclipse.ui.IWorkingSet;
|
import org.eclipse.ui.IWorkingSet;
|
||||||
import org.eclipse.ui.IWorkingSetManager;
|
import org.eclipse.ui.IWorkingSetManager;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.XMLMemento;
|
import org.eclipse.ui.XMLMemento;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -58,7 +59,7 @@ public class WorkingSetConfigurationManager {
|
||||||
static final String ATTR_CONFIG = "config"; //$NON-NLS-1$
|
static final String ATTR_CONFIG = "config"; //$NON-NLS-1$
|
||||||
static final String ATTR_FACTORY = "factory"; //$NON-NLS-1$
|
static final String ATTR_FACTORY = "factory"; //$NON-NLS-1$
|
||||||
|
|
||||||
static IWorkingSetManager WS_MGR = CUIPlugin.getDefault().getWorkbench().getWorkingSetManager();
|
static IWorkingSetManager WS_MGR = PlatformUI.getWorkbench().getWorkingSetManager();
|
||||||
|
|
||||||
private static final WorkingSetConfigurationManager INSTANCE = new WorkingSetConfigurationManager();
|
private static final WorkingSetConfigurationManager INSTANCE = new WorkingSetConfigurationManager();
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
package org.eclipse.cdt.ui.actions;
|
package org.eclipse.cdt.ui.actions;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.workingsets.WorkingSetConfigurationDialog;
|
import org.eclipse.cdt.internal.ui.workingsets.WorkingSetConfigurationDialog;
|
||||||
import org.eclipse.cdt.ui.CUIPlugin;
|
|
||||||
import org.eclipse.jface.action.IAction;
|
import org.eclipse.jface.action.IAction;
|
||||||
import org.eclipse.jface.util.IPropertyChangeListener;
|
import org.eclipse.jface.util.IPropertyChangeListener;
|
||||||
import org.eclipse.jface.util.PropertyChangeEvent;
|
import org.eclipse.jface.util.PropertyChangeEvent;
|
||||||
|
@ -25,12 +24,13 @@ import org.eclipse.ui.IWorkbenchWindow;
|
||||||
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
|
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
|
||||||
import org.eclipse.ui.IWorkingSet;
|
import org.eclipse.ui.IWorkingSet;
|
||||||
import org.eclipse.ui.IWorkingSetManager;
|
import org.eclipse.ui.IWorkingSetManager;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
public class WorkingSetConfigAction implements IWorkbenchWindowActionDelegate, IPropertyChangeListener {
|
public class WorkingSetConfigAction implements IWorkbenchWindowActionDelegate, IPropertyChangeListener {
|
||||||
|
|
||||||
private static final IWorkingSetManager wsm = CUIPlugin.getDefault().getWorkbench().getWorkingSetManager();
|
private static final IWorkingSetManager wsm = PlatformUI.getWorkbench().getWorkingSetManager();
|
||||||
private boolean enabled = true;
|
private boolean enabled = true;
|
||||||
private IWorkbenchWindow window;
|
private IWorkbenchWindow window;
|
||||||
private IAction action;
|
private IAction action;
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %pluginName
|
Bundle-Name: %pluginName
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.debug.ui; singleton:=true
|
Bundle-SymbolicName: org.eclipse.cdt.debug.ui; singleton:=true
|
||||||
Bundle-Version: 8.3.300.qualifier
|
Bundle-Version: 8.3.400.qualifier
|
||||||
Bundle-Activator: org.eclipse.cdt.debug.ui.CDebugUIPlugin
|
Bundle-Activator: org.eclipse.cdt.debug.ui.CDebugUIPlugin
|
||||||
Bundle-Vendor: %providerName
|
Bundle-Vendor: %providerName
|
||||||
Bundle-Localization: plugin
|
Bundle-Localization: plugin
|
||||||
|
|
|
@ -23,7 +23,6 @@ import org.eclipse.cdt.debug.core.model.ICStackFrame;
|
||||||
import org.eclipse.cdt.debug.core.model.ICType;
|
import org.eclipse.cdt.debug.core.model.ICType;
|
||||||
import org.eclipse.cdt.debug.core.model.ICValue;
|
import org.eclipse.cdt.debug.core.model.ICValue;
|
||||||
import org.eclipse.cdt.debug.core.model.IEnableDisableTarget;
|
import org.eclipse.cdt.debug.core.model.IEnableDisableTarget;
|
||||||
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
|
|
||||||
import org.eclipse.cdt.debug.ui.breakpoints.CBreakpointPropertyDialogAction;
|
import org.eclipse.cdt.debug.ui.breakpoints.CBreakpointPropertyDialogAction;
|
||||||
import org.eclipse.core.filesystem.URIUtil;
|
import org.eclipse.core.filesystem.URIUtil;
|
||||||
import org.eclipse.core.resources.IMarker;
|
import org.eclipse.core.resources.IMarker;
|
||||||
|
@ -62,6 +61,7 @@ import org.eclipse.ui.IPathEditorInput;
|
||||||
import org.eclipse.ui.IStorageEditorInput;
|
import org.eclipse.ui.IStorageEditorInput;
|
||||||
import org.eclipse.ui.IURIEditorInput;
|
import org.eclipse.ui.IURIEditorInput;
|
||||||
import org.eclipse.ui.IWorkbenchPart;
|
import org.eclipse.ui.IWorkbenchPart;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.progress.UIJob;
|
import org.eclipse.ui.progress.UIJob;
|
||||||
import org.eclipse.ui.texteditor.ITextEditor;
|
import org.eclipse.ui.texteditor.ITextEditor;
|
||||||
import org.eclipse.ui.texteditor.SimpleMarkerAnnotation;
|
import org.eclipse.ui.texteditor.SimpleMarkerAnnotation;
|
||||||
|
@ -252,7 +252,7 @@ public class CDebugUIUtils {
|
||||||
if (e != null)
|
if (e != null)
|
||||||
detail = e.getMessage();
|
detail = e.getMessage();
|
||||||
|
|
||||||
Shell shell = CDebugUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell();
|
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
|
||||||
|
|
||||||
MessageDialog.openError(shell, title, message + "\n" + detail); //$NON-NLS-1$
|
MessageDialog.openError(shell, title, message + "\n" + detail); //$NON-NLS-1$
|
||||||
return Status.OK_STATUS;
|
return Status.OK_STATUS;
|
||||||
|
|
|
@ -19,7 +19,6 @@ import java.util.Map;
|
||||||
import org.eclipse.cdt.debug.core.CDebugCorePlugin;
|
import org.eclipse.cdt.debug.core.CDebugCorePlugin;
|
||||||
import org.eclipse.cdt.debug.core.ICDebugConstants;
|
import org.eclipse.cdt.debug.core.ICDebugConstants;
|
||||||
import org.eclipse.cdt.debug.core.model.ISteppingModeTarget;
|
import org.eclipse.cdt.debug.core.model.ISteppingModeTarget;
|
||||||
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
|
|
||||||
import org.eclipse.core.commands.AbstractHandler;
|
import org.eclipse.core.commands.AbstractHandler;
|
||||||
import org.eclipse.core.commands.ExecutionEvent;
|
import org.eclipse.core.commands.ExecutionEvent;
|
||||||
import org.eclipse.core.commands.ExecutionException;
|
import org.eclipse.core.commands.ExecutionException;
|
||||||
|
@ -28,6 +27,7 @@ import org.eclipse.debug.ui.DebugUITools;
|
||||||
import org.eclipse.jface.viewers.ISelection;
|
import org.eclipse.jface.viewers.ISelection;
|
||||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||||
import org.eclipse.ui.IWorkbenchWindow;
|
import org.eclipse.ui.IWorkbenchWindow;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.commands.ICommandService;
|
import org.eclipse.ui.commands.ICommandService;
|
||||||
import org.eclipse.ui.commands.IElementUpdater;
|
import org.eclipse.ui.commands.IElementUpdater;
|
||||||
import org.eclipse.ui.handlers.HandlerUtil;
|
import org.eclipse.ui.handlers.HandlerUtil;
|
||||||
|
@ -84,7 +84,7 @@ public class SetSteppingModeHandler extends AbstractHandler implements IElementU
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled() {
|
public boolean isEnabled() {
|
||||||
IWorkbenchWindow window = CDebugUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow();
|
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
|
||||||
return (window != null && getSteppingModeTarget(window) != null);
|
return (window != null && getSteppingModeTarget(window) != null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ public class SetSteppingModeHandler extends AbstractHandler implements IElementU
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean isHandled() {
|
public boolean isHandled() {
|
||||||
IWorkbenchWindow window = CDebugUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow();
|
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
|
||||||
return (window != null && getSteppingModeTarget(window) != null);
|
return (window != null && getSteppingModeTarget(window) != null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@ import org.eclipse.ui.IWorkbenchPart;
|
||||||
import org.eclipse.ui.IWorkbenchPartReference;
|
import org.eclipse.ui.IWorkbenchPartReference;
|
||||||
import org.eclipse.ui.IWorkbenchWindow;
|
import org.eclipse.ui.IWorkbenchWindow;
|
||||||
import org.eclipse.ui.PartInitException;
|
import org.eclipse.ui.PartInitException;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.ide.IDE;
|
import org.eclipse.ui.ide.IDE;
|
||||||
import org.eclipse.ui.progress.UIJob;
|
import org.eclipse.ui.progress.UIJob;
|
||||||
|
|
||||||
|
@ -59,8 +60,8 @@ public class DisassemblyEditorManager implements IWindowListener, IDisassemblyCo
|
||||||
fEditorParts = new HashMap<>();
|
fEditorParts = new HashMap<>();
|
||||||
fOpenDisassemblyPolicy = new HashMap<>();
|
fOpenDisassemblyPolicy = new HashMap<>();
|
||||||
fSteppingModePolicy = new HashMap<>();
|
fSteppingModePolicy = new HashMap<>();
|
||||||
CDebugUIPlugin.getDefault().getWorkbench().addWindowListener(this);
|
PlatformUI.getWorkbench().addWindowListener(this);
|
||||||
IWorkbenchWindow window = CDebugUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow();
|
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
|
||||||
if (window != null) {
|
if (window != null) {
|
||||||
window.getPartService().addPartListener(this);
|
window.getPartService().addPartListener(this);
|
||||||
}
|
}
|
||||||
|
@ -69,7 +70,7 @@ public class DisassemblyEditorManager implements IWindowListener, IDisassemblyCo
|
||||||
|
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
getDisassemblyManager().removeDisassemblyContextListener(this);
|
getDisassemblyManager().removeDisassemblyContextListener(this);
|
||||||
CDebugUIPlugin.getDefault().getWorkbench().removeWindowListener(this);
|
PlatformUI.getWorkbench().removeWindowListener(this);
|
||||||
fSteppingModePolicy.clear();
|
fSteppingModePolicy.clear();
|
||||||
fOpenDisassemblyPolicy.clear();
|
fOpenDisassemblyPolicy.clear();
|
||||||
fEditorParts.clear();
|
fEditorParts.clear();
|
||||||
|
|
|
@ -50,6 +50,7 @@ import org.eclipse.ui.IWorkbench;
|
||||||
import org.eclipse.ui.IWorkbenchPage;
|
import org.eclipse.ui.IWorkbenchPage;
|
||||||
import org.eclipse.ui.IWorkbenchPreferencePage;
|
import org.eclipse.ui.IWorkbenchPreferencePage;
|
||||||
import org.eclipse.ui.IWorkbenchWindow;
|
import org.eclipse.ui.IWorkbenchWindow;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.ide.dialogs.EncodingFieldEditor;
|
import org.eclipse.ui.ide.dialogs.EncodingFieldEditor;
|
||||||
import org.osgi.service.prefs.BackingStoreException;
|
import org.osgi.service.prefs.BackingStoreException;
|
||||||
|
|
||||||
|
@ -330,7 +331,7 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr
|
||||||
private void refreshViews() {
|
private void refreshViews() {
|
||||||
BusyIndicator.showWhile(getShell().getDisplay(), () -> {
|
BusyIndicator.showWhile(getShell().getDisplay(), () -> {
|
||||||
// Refresh interested views
|
// Refresh interested views
|
||||||
IWorkbenchWindow[] windows = CDebugUIPlugin.getDefault().getWorkbench().getWorkbenchWindows();
|
IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
|
||||||
IWorkbenchPage page = null;
|
IWorkbenchPage page = null;
|
||||||
for (int i = 0; i < windows.length; i++) {
|
for (int i = 0; i < windows.length; i++) {
|
||||||
page = windows[i].getActivePage();
|
page = windows[i].getActivePage();
|
||||||
|
|
|
@ -51,6 +51,7 @@ import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.ui.IViewPart;
|
import org.eclipse.ui.IViewPart;
|
||||||
import org.eclipse.ui.IViewSite;
|
import org.eclipse.ui.IViewSite;
|
||||||
import org.eclipse.ui.IWorkbenchPart;
|
import org.eclipse.ui.IWorkbenchPart;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.progress.UIJob;
|
import org.eclipse.ui.progress.UIJob;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -174,7 +175,7 @@ public class AddMemoryBlocks implements IAddMemoryBlocksTarget {
|
||||||
|
|
||||||
private void doAddMemoryBlocks(final IMemoryRenderingSite renderingSite, final Object context,
|
private void doAddMemoryBlocks(final IMemoryRenderingSite renderingSite, final Object context,
|
||||||
final IMemorySpaceAwareMemoryBlockRetrieval retrieval, String[] memorySpaces) {
|
final IMemorySpaceAwareMemoryBlockRetrieval retrieval, String[] memorySpaces) {
|
||||||
Shell shell = CDebugUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell();
|
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
|
||||||
|
|
||||||
// create dialog to ask for expression/address to block
|
// create dialog to ask for expression/address to block
|
||||||
AddMemoryBlockDialog dialog = new AddMemoryBlockDialog(shell, memorySpaces);
|
AddMemoryBlockDialog dialog = new AddMemoryBlockDialog(shell, memorySpaces);
|
||||||
|
@ -360,7 +361,7 @@ public class AddMemoryBlocks implements IAddMemoryBlocksTarget {
|
||||||
if (e != null)
|
if (e != null)
|
||||||
detail = e.getMessage();
|
detail = e.getMessage();
|
||||||
|
|
||||||
Shell shell = CDebugUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell();
|
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
|
||||||
|
|
||||||
MessageDialog.openError(shell, title, message + "\n" + detail); //$NON-NLS-1$
|
MessageDialog.openError(shell, title, message + "\n" + detail); //$NON-NLS-1$
|
||||||
return Status.OK_STATUS;
|
return Status.OK_STATUS;
|
||||||
|
|
|
@ -223,7 +223,7 @@ public class CDebugUIPlugin extends AbstractUIPlugin {
|
||||||
* @return the active workbench window
|
* @return the active workbench window
|
||||||
*/
|
*/
|
||||||
public static IWorkbenchWindow getActiveWorkbenchWindow() {
|
public static IWorkbenchWindow getActiveWorkbenchWindow() {
|
||||||
return getDefault().getWorkbench().getActiveWorkbenchWindow();
|
return PlatformUI.getWorkbench().getActiveWorkbenchWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IWorkbenchPage getActivePage() {
|
public static IWorkbenchPage getActivePage() {
|
||||||
|
|
|
@ -60,6 +60,7 @@ import org.eclipse.swt.widgets.DirectoryDialog;
|
||||||
import org.eclipse.swt.widgets.FileDialog;
|
import org.eclipse.swt.widgets.FileDialog;
|
||||||
import org.eclipse.swt.widgets.Label;
|
import org.eclipse.swt.widgets.Label;
|
||||||
import org.eclipse.swt.widgets.Text;
|
import org.eclipse.swt.widgets.Text;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
|
|
||||||
public class ImportExecutablePageOne extends WizardPage {
|
public class ImportExecutablePageOne extends WizardPage {
|
||||||
|
|
||||||
|
@ -209,7 +210,7 @@ public class ImportExecutablePageOne extends WizardPage {
|
||||||
Dialog.applyDialogFont(workArea);
|
Dialog.applyDialogFont(workArea);
|
||||||
selectSingleButton.setSelection(true);
|
selectSingleButton.setSelection(true);
|
||||||
checkControlState();
|
checkControlState();
|
||||||
CDebugUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(),
|
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(),
|
||||||
ICDebugHelpContextIds.IMPORT_EXECUTABLE_PAGE_ONE);
|
ICDebugHelpContextIds.IMPORT_EXECUTABLE_PAGE_ONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@ import org.eclipse.cdt.core.model.ICProject;
|
||||||
import org.eclipse.cdt.core.parser.util.StringUtil;
|
import org.eclipse.cdt.core.parser.util.StringUtil;
|
||||||
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
|
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
|
||||||
import org.eclipse.cdt.debug.internal.ui.ICDebugHelpContextIds;
|
import org.eclipse.cdt.debug.internal.ui.ICDebugHelpContextIds;
|
||||||
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
|
|
||||||
import org.eclipse.cdt.ui.CElementLabelProvider;
|
import org.eclipse.cdt.ui.CElementLabelProvider;
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
|
@ -51,6 +50,7 @@ import org.eclipse.swt.widgets.Combo;
|
||||||
import org.eclipse.swt.widgets.Composite;
|
import org.eclipse.swt.widgets.Composite;
|
||||||
import org.eclipse.swt.widgets.Label;
|
import org.eclipse.swt.widgets.Label;
|
||||||
import org.eclipse.swt.widgets.Text;
|
import org.eclipse.swt.widgets.Text;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
|
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
|
||||||
|
|
||||||
public class ImportExecutablePageTwo extends WizardPage {
|
public class ImportExecutablePageTwo extends WizardPage {
|
||||||
|
@ -304,7 +304,7 @@ public class ImportExecutablePageTwo extends WizardPage {
|
||||||
});
|
});
|
||||||
addLaunchConfigTypes();
|
addLaunchConfigTypes();
|
||||||
updateControls();
|
updateControls();
|
||||||
CDebugUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(),
|
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(),
|
||||||
ICDebugHelpContextIds.IMPORT_EXECUTABLE_PAGE_TWO);
|
ICDebugHelpContextIds.IMPORT_EXECUTABLE_PAGE_TWO);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@ import org.eclipse.swt.graphics.Image;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.ui.IWorkbenchPage;
|
import org.eclipse.ui.IWorkbenchPage;
|
||||||
import org.eclipse.ui.IWorkbenchWindow;
|
import org.eclipse.ui.IWorkbenchWindow;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||||
import org.osgi.framework.BundleContext;
|
import org.osgi.framework.BundleContext;
|
||||||
|
|
||||||
|
@ -162,7 +163,7 @@ public class MulticoreVisualizerUIPlugin extends AbstractUIPlugin {
|
||||||
return debugDialogShell;
|
return debugDialogShell;
|
||||||
debugDialogShell = null;
|
debugDialogShell = null;
|
||||||
}
|
}
|
||||||
IWorkbenchWindow[] windows = getDefault().getWorkbench().getWorkbenchWindows();
|
IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
|
||||||
return windows[0].getShell();
|
return windows[0].getShell();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,7 +177,7 @@ public class MulticoreVisualizerUIPlugin extends AbstractUIPlugin {
|
||||||
* @return the active workbench window
|
* @return the active workbench window
|
||||||
*/
|
*/
|
||||||
public static IWorkbenchWindow getActiveWorkbenchWindow() {
|
public static IWorkbenchWindow getActiveWorkbenchWindow() {
|
||||||
return getDefault().getWorkbench().getActiveWorkbenchWindow();
|
return PlatformUI.getWorkbench().getActiveWorkbenchWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IWorkbenchPage getActivePage() {
|
public static IWorkbenchPage getActivePage() {
|
||||||
|
|
|
@ -34,6 +34,7 @@ import org.eclipse.swt.graphics.Image;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.ui.IWorkbenchPage;
|
import org.eclipse.ui.IWorkbenchPage;
|
||||||
import org.eclipse.ui.IWorkbenchWindow;
|
import org.eclipse.ui.IWorkbenchWindow;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||||
import org.eclipse.ui.preferences.ScopedPreferenceStore;
|
import org.eclipse.ui.preferences.ScopedPreferenceStore;
|
||||||
import org.osgi.framework.BundleContext;
|
import org.osgi.framework.BundleContext;
|
||||||
|
@ -151,7 +152,7 @@ public class GdbUIPlugin extends AbstractUIPlugin {
|
||||||
return debugDialogShell;
|
return debugDialogShell;
|
||||||
debugDialogShell = null;
|
debugDialogShell = null;
|
||||||
}
|
}
|
||||||
IWorkbenchWindow[] windows = getDefault().getWorkbench().getWorkbenchWindows();
|
IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
|
||||||
return windows[0].getShell();
|
return windows[0].getShell();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,7 +209,7 @@ public class GdbUIPlugin extends AbstractUIPlugin {
|
||||||
* @return the active workbench window
|
* @return the active workbench window
|
||||||
*/
|
*/
|
||||||
public static IWorkbenchWindow getActiveWorkbenchWindow() {
|
public static IWorkbenchWindow getActiveWorkbenchWindow() {
|
||||||
return getDefault().getWorkbench().getActiveWorkbenchWindow();
|
return PlatformUI.getWorkbench().getActiveWorkbenchWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IWorkbenchPage getActivePage() {
|
public static IWorkbenchPage getActivePage() {
|
||||||
|
|
|
@ -55,6 +55,7 @@ import org.eclipse.swt.widgets.Group;
|
||||||
import org.eclipse.swt.widgets.Label;
|
import org.eclipse.swt.widgets.Label;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.swt.widgets.Text;
|
import org.eclipse.swt.widgets.Text;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
|
|
||||||
public class CDebuggerTab extends CLaunchConfigurationTab {
|
public class CDebuggerTab extends CLaunchConfigurationTab {
|
||||||
/**
|
/**
|
||||||
|
@ -122,7 +123,7 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
|
||||||
|
|
||||||
fContents = new Composite(fContainer, SWT.NONE);
|
fContents = new Composite(fContainer, SWT.NONE);
|
||||||
setControl(fContainer);
|
setControl(fContainer);
|
||||||
GdbUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(),
|
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(),
|
||||||
ICDTLaunchHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_DEBBUGER_TAB);
|
ICDTLaunchHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_DEBBUGER_TAB);
|
||||||
int numberOfColumns = fAttachMode ? 2 : 1;
|
int numberOfColumns = fAttachMode ? 2 : 1;
|
||||||
GridLayout layout = new GridLayout(numberOfColumns, false);
|
GridLayout layout = new GridLayout(numberOfColumns, false);
|
||||||
|
|
|
@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %pluginName
|
Bundle-Name: %pluginName
|
||||||
Bundle-Vendor: %providerName
|
Bundle-Vendor: %providerName
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.dsf.ui;singleton:=true
|
Bundle-SymbolicName: org.eclipse.cdt.dsf.ui;singleton:=true
|
||||||
Bundle-Version: 2.5.300.qualifier
|
Bundle-Version: 2.5.400.qualifier
|
||||||
Bundle-Activator: org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin
|
Bundle-Activator: org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin
|
||||||
Bundle-Localization: plugin
|
Bundle-Localization: plugin
|
||||||
Require-Bundle: org.eclipse.ui;bundle-version="3.5.0",
|
Require-Bundle: org.eclipse.ui;bundle-version="3.5.0",
|
||||||
|
|
|
@ -55,6 +55,7 @@ import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.swt.widgets.Tree;
|
import org.eclipse.swt.widgets.Tree;
|
||||||
import org.eclipse.ui.IWorkbenchPage;
|
import org.eclipse.ui.IWorkbenchPage;
|
||||||
import org.eclipse.ui.IWorkbenchPartSite;
|
import org.eclipse.ui.IWorkbenchPartSite;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an information control to display an expression in a hover control.
|
* Creates an information control to display an expression in a hover control.
|
||||||
|
@ -439,7 +440,7 @@ public class ExpressionInformationControlCreator implements IInformationControlC
|
||||||
* @return a view to emulate or <code>null</code>
|
* @return a view to emulate or <code>null</code>
|
||||||
*/
|
*/
|
||||||
private AbstractDebugView getViewToEmulate() {
|
private AbstractDebugView getViewToEmulate() {
|
||||||
IWorkbenchPage page = DsfUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
|
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
|
||||||
AbstractDebugView expressionsView = (AbstractDebugView) page.findView(IDebugUIConstants.ID_EXPRESSION_VIEW);
|
AbstractDebugView expressionsView = (AbstractDebugView) page.findView(IDebugUIConstants.ID_EXPRESSION_VIEW);
|
||||||
if (expressionsView != null && expressionsView.isVisible()) {
|
if (expressionsView != null && expressionsView.isVisible()) {
|
||||||
return expressionsView;
|
return expressionsView;
|
||||||
|
|
|
@ -27,6 +27,7 @@ import org.eclipse.ui.IEditorInput;
|
||||||
import org.eclipse.ui.IEditorPart;
|
import org.eclipse.ui.IEditorPart;
|
||||||
import org.eclipse.ui.IWorkbench;
|
import org.eclipse.ui.IWorkbench;
|
||||||
import org.eclipse.ui.IWorkbenchWindow;
|
import org.eclipse.ui.IWorkbenchWindow;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.editors.text.TextEditor;
|
import org.eclipse.ui.editors.text.TextEditor;
|
||||||
import org.eclipse.ui.texteditor.ITextEditor;
|
import org.eclipse.ui.texteditor.ITextEditor;
|
||||||
|
|
||||||
|
@ -109,7 +110,7 @@ public class DsfSourceSelectionResolver implements Runnable {
|
||||||
return fEditorPage;
|
return fEditorPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
final IWorkbench wb = DsfUIPlugin.getDefault().getWorkbench();
|
final IWorkbench wb = PlatformUI.getWorkbench();
|
||||||
// Run in UI thread to access UI resources
|
// Run in UI thread to access UI resources
|
||||||
ResolveEditorRunnable reditorRunnable = new ResolveEditorRunnable() {
|
ResolveEditorRunnable reditorRunnable = new ResolveEditorRunnable() {
|
||||||
TextEditor result = null;
|
TextEditor result = null;
|
||||||
|
|
|
@ -61,6 +61,7 @@ import org.eclipse.ui.ISources;
|
||||||
import org.eclipse.ui.IViewPart;
|
import org.eclipse.ui.IViewPart;
|
||||||
import org.eclipse.ui.IWorkbenchPage;
|
import org.eclipse.ui.IWorkbenchPage;
|
||||||
import org.eclipse.ui.PartInitException;
|
import org.eclipse.ui.PartInitException;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DSF version of handler for viewing variable in memory view command.
|
* DSF version of handler for viewing variable in memory view command.
|
||||||
|
@ -200,7 +201,7 @@ public class DsfViewMemoryHandler extends AbstractHandler {
|
||||||
|
|
||||||
private void showInMemoryView(VariableExpressionVMC contexts[]) {
|
private void showInMemoryView(VariableExpressionVMC contexts[]) {
|
||||||
try {
|
try {
|
||||||
IWorkbenchPage page = DsfUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
|
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
|
||||||
IViewPart memoryView = page.showView(IDebugUIConstants.ID_MEMORY_VIEW, null, IWorkbenchPage.VIEW_ACTIVATE);
|
IViewPart memoryView = page.showView(IDebugUIConstants.ID_MEMORY_VIEW, null, IWorkbenchPage.VIEW_ACTIVATE);
|
||||||
final IMemoryRenderingSite memRendSite = (IMemoryRenderingSite) memoryView;
|
final IMemoryRenderingSite memRendSite = (IMemoryRenderingSite) memoryView;
|
||||||
for (final VariableExpressionVMC context : contexts) {
|
for (final VariableExpressionVMC context : contexts) {
|
||||||
|
|
|
@ -29,6 +29,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
|
||||||
import org.eclipse.jface.resource.ResourceLocator;
|
import org.eclipse.jface.resource.ResourceLocator;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.ui.IWorkbenchWindow;
|
import org.eclipse.ui.IWorkbenchWindow;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||||
import org.osgi.framework.BundleContext;
|
import org.osgi.framework.BundleContext;
|
||||||
|
|
||||||
|
@ -174,7 +175,7 @@ public class DsfUIPlugin extends AbstractUIPlugin {
|
||||||
* @return the active workbench shell or <code>null</code> if none
|
* @return the active workbench shell or <code>null</code> if none
|
||||||
*/
|
*/
|
||||||
public static Shell getActiveWorkbenchShell() {
|
public static Shell getActiveWorkbenchShell() {
|
||||||
IWorkbenchWindow window = getDefault().getWorkbench().getActiveWorkbenchWindow();
|
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
|
||||||
if (window != null) {
|
if (window != null) {
|
||||||
return window.getShell();
|
return window.getShell();
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@ import org.eclipse.core.runtime.Status;
|
||||||
import org.eclipse.jface.dialogs.MessageDialog;
|
import org.eclipse.jface.dialogs.MessageDialog;
|
||||||
import org.eclipse.jface.viewers.ICellModifier;
|
import org.eclipse.jface.viewers.ICellModifier;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.osgi.framework.InvalidSyntaxException;
|
import org.osgi.framework.InvalidSyntaxException;
|
||||||
import org.osgi.util.tracker.ServiceTracker;
|
import org.osgi.util.tracker.ServiceTracker;
|
||||||
|
|
||||||
|
@ -153,8 +154,8 @@ public class TriggerCellModifier implements ICellModifier {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Shell getShell() {
|
private Shell getShell() {
|
||||||
if (DsfExamplesPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow() != null) {
|
if (PlatformUI.getWorkbench().getActiveWorkbenchWindow() != null) {
|
||||||
return DsfExamplesPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell();
|
return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
|
||||||
import org.eclipse.jface.resource.ResourceLocator;
|
import org.eclipse.jface.resource.ResourceLocator;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.ui.IWorkbenchWindow;
|
import org.eclipse.ui.IWorkbenchWindow;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||||
import org.osgi.framework.BundleContext;
|
import org.osgi.framework.BundleContext;
|
||||||
|
|
||||||
|
@ -65,7 +66,7 @@ public class DockerLaunchUIPlugin extends AbstractUIPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Shell getActiveWorkbenchShell() {
|
public static Shell getActiveWorkbenchShell() {
|
||||||
IWorkbenchWindow window = getDefault().getWorkbench().getActiveWorkbenchWindow();
|
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
|
||||||
if (window != null) {
|
if (window != null) {
|
||||||
return window.getShell();
|
return window.getShell();
|
||||||
}
|
}
|
||||||
|
@ -76,7 +77,7 @@ public class DockerLaunchUIPlugin extends AbstractUIPlugin {
|
||||||
if (getActiveWorkbenchShell() != null) {
|
if (getActiveWorkbenchShell() != null) {
|
||||||
return getActiveWorkbenchShell();
|
return getActiveWorkbenchShell();
|
||||||
}
|
}
|
||||||
IWorkbenchWindow[] windows = getDefault().getWorkbench().getWorkbenchWindows();
|
IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
|
||||||
return windows[0].getShell();
|
return windows[0].getShell();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.docker.launcher;
|
package org.eclipse.cdt.internal.docker.launcher;
|
||||||
|
|
||||||
import org.eclipse.cdt.docker.launcher.DockerLaunchUIPlugin;
|
|
||||||
import org.eclipse.jface.viewers.ISelection;
|
import org.eclipse.jface.viewers.ISelection;
|
||||||
import org.eclipse.jface.viewers.ITreeSelection;
|
import org.eclipse.jface.viewers.ITreeSelection;
|
||||||
import org.eclipse.linuxtools.docker.core.IDockerConnection;
|
import org.eclipse.linuxtools.docker.core.IDockerConnection;
|
||||||
|
@ -18,6 +17,7 @@ import org.eclipse.ui.ISelectionListener;
|
||||||
import org.eclipse.ui.IWorkbench;
|
import org.eclipse.ui.IWorkbench;
|
||||||
import org.eclipse.ui.IWorkbenchPart;
|
import org.eclipse.ui.IWorkbenchPart;
|
||||||
import org.eclipse.ui.IWorkbenchWindow;
|
import org.eclipse.ui.IWorkbenchWindow;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
|
|
||||||
public class ConnectionListener implements ISelectionListener {
|
public class ConnectionListener implements ISelectionListener {
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ public class ConnectionListener implements ISelectionListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init() {
|
public void init() {
|
||||||
IWorkbench workbench = DockerLaunchUIPlugin.getDefault().getWorkbench();
|
IWorkbench workbench = PlatformUI.getWorkbench();
|
||||||
if (workbench != null) {
|
if (workbench != null) {
|
||||||
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
|
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
|
||||||
if (window != null) {
|
if (window != null) {
|
||||||
|
|
|
@ -24,6 +24,7 @@ import org.eclipse.jface.dialogs.ErrorDialog;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.ui.IWorkbenchPage;
|
import org.eclipse.ui.IWorkbenchPage;
|
||||||
import org.eclipse.ui.IWorkbenchWindow;
|
import org.eclipse.ui.IWorkbenchWindow;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||||
import org.osgi.framework.BundleContext;
|
import org.osgi.framework.BundleContext;
|
||||||
import org.osgi.framework.ServiceReference;
|
import org.osgi.framework.ServiceReference;
|
||||||
|
@ -78,7 +79,7 @@ public class LaunchUIPlugin extends AbstractUIPlugin implements ILaunchesListene
|
||||||
return debugDialogShell;
|
return debugDialogShell;
|
||||||
debugDialogShell = null;
|
debugDialogShell = null;
|
||||||
}
|
}
|
||||||
IWorkbenchWindow[] windows = getDefault().getWorkbench().getWorkbenchWindows();
|
IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
|
||||||
return windows[0].getShell();
|
return windows[0].getShell();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,7 +136,7 @@ public class LaunchUIPlugin extends AbstractUIPlugin implements ILaunchesListene
|
||||||
* @return the active workbench window
|
* @return the active workbench window
|
||||||
*/
|
*/
|
||||||
public static IWorkbenchWindow getActiveWorkbenchWindow() {
|
public static IWorkbenchWindow getActiveWorkbenchWindow() {
|
||||||
return getDefault().getWorkbench().getActiveWorkbenchWindow();
|
return PlatformUI.getWorkbench().getActiveWorkbenchWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IWorkbenchPage getActivePage() {
|
public static IWorkbenchPage getActivePage() {
|
||||||
|
|
|
@ -39,6 +39,7 @@ import org.eclipse.swt.widgets.Control;
|
||||||
import org.eclipse.swt.widgets.Group;
|
import org.eclipse.swt.widgets.Group;
|
||||||
import org.eclipse.swt.widgets.Label;
|
import org.eclipse.swt.widgets.Label;
|
||||||
import org.eclipse.swt.widgets.Text;
|
import org.eclipse.swt.widgets.Text;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A launch configuration tab that displays and edits program arguments,
|
* A launch configuration tab that displays and edits program arguments,
|
||||||
|
@ -69,7 +70,7 @@ public abstract class CAbstractArgumentsTab extends CLaunchConfigurationTab {
|
||||||
comp.setLayoutData(gd);
|
comp.setLayoutData(gd);
|
||||||
setControl(comp);
|
setControl(comp);
|
||||||
|
|
||||||
LaunchUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(),
|
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(),
|
||||||
ICDTLaunchHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_ARGUMNETS_TAB);
|
ICDTLaunchHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_ARGUMNETS_TAB);
|
||||||
|
|
||||||
createArgumentComponent(comp, 1);
|
createArgumentComponent(comp, 1);
|
||||||
|
|
|
@ -61,6 +61,7 @@ import org.eclipse.swt.widgets.Composite;
|
||||||
import org.eclipse.swt.widgets.FileDialog;
|
import org.eclipse.swt.widgets.FileDialog;
|
||||||
import org.eclipse.swt.widgets.Label;
|
import org.eclipse.swt.widgets.Label;
|
||||||
import org.eclipse.swt.widgets.Text;
|
import org.eclipse.swt.widgets.Text;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.dialogs.TwoPaneElementSelector;
|
import org.eclipse.ui.dialogs.TwoPaneElementSelector;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -114,7 +115,7 @@ public class CMainTab2 extends CAbstractMainTab {
|
||||||
Composite comp = new Composite(parent, SWT.NONE);
|
Composite comp = new Composite(parent, SWT.NONE);
|
||||||
setControl(comp);
|
setControl(comp);
|
||||||
|
|
||||||
LaunchUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(),
|
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(),
|
||||||
ICDTLaunchHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_MAIN_TAB);
|
ICDTLaunchHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_MAIN_TAB);
|
||||||
|
|
||||||
GridLayout topLayout = new GridLayout();
|
GridLayout topLayout = new GridLayout();
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %pluginName
|
Bundle-Name: %pluginName
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.debug.ui.memory.floatingpoint;singleton:=true
|
Bundle-SymbolicName: org.eclipse.cdt.debug.ui.memory.floatingpoint;singleton:=true
|
||||||
Bundle-Version: 1.0.200.qualifier
|
Bundle-Version: 1.0.300.qualifier
|
||||||
Bundle-Localization: plugin
|
Bundle-Localization: plugin
|
||||||
Require-Bundle: org.eclipse.debug.core;bundle-version="3.7.100",
|
Require-Bundle: org.eclipse.debug.core;bundle-version="3.7.100",
|
||||||
org.eclipse.debug.ui;bundle-version="3.8.1",
|
org.eclipse.debug.ui;bundle-version="3.8.1",
|
||||||
|
|
|
@ -1101,7 +1101,7 @@ public class FPRendering extends AbstractMemoryRendering implements IRepositiona
|
||||||
if (fConnection == null) {
|
if (fConnection == null) {
|
||||||
fConnection = () -> {
|
fConnection = () -> {
|
||||||
// update UI asynchronously
|
// update UI asynchronously
|
||||||
Display display = FPRenderingPlugin.getDefault().getWorkbench().getDisplay();
|
Display display = PlatformUI.getWorkbench().getDisplay();
|
||||||
display.asyncExec(() -> {
|
display.asyncExec(() -> {
|
||||||
try {
|
try {
|
||||||
if (fBigBaseAddress != FPRendering.this.fRendering.getMemoryBlock().getBigBaseAddress()) {
|
if (fBigBaseAddress != FPRendering.this.fRendering.getMemoryBlock().getBigBaseAddress()) {
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %pluginName
|
Bundle-Name: %pluginName
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.debug.ui.memory.traditional;singleton:=true
|
Bundle-SymbolicName: org.eclipse.cdt.debug.ui.memory.traditional;singleton:=true
|
||||||
Bundle-Version: 1.5.100.qualifier
|
Bundle-Version: 1.5.200.qualifier
|
||||||
Bundle-Localization: plugin
|
Bundle-Localization: plugin
|
||||||
Require-Bundle: org.eclipse.debug.core,
|
Require-Bundle: org.eclipse.debug.core,
|
||||||
org.eclipse.debug.ui,
|
org.eclipse.debug.ui,
|
||||||
|
|
|
@ -1269,7 +1269,7 @@ public class TraditionalRendering extends AbstractMemoryRendering implements IRe
|
||||||
if (fConnection == null) {
|
if (fConnection == null) {
|
||||||
fConnection = () -> {
|
fConnection = () -> {
|
||||||
// update UI asynchronously
|
// update UI asynchronously
|
||||||
Display display = TraditionalRenderingPlugin.getDefault().getWorkbench().getDisplay();
|
Display display = PlatformUI.getWorkbench().getDisplay();
|
||||||
display.asyncExec(() -> {
|
display.asyncExec(() -> {
|
||||||
try {
|
try {
|
||||||
if (fBigBaseAddress != TraditionalRendering.this.fRendering.getMemoryBlock()
|
if (fBigBaseAddress != TraditionalRendering.this.fRendering.getMemoryBlock()
|
||||||
|
|
|
@ -43,6 +43,7 @@ import org.eclipse.ui.IMemento;
|
||||||
import org.eclipse.ui.IViewSite;
|
import org.eclipse.ui.IViewSite;
|
||||||
import org.eclipse.ui.IWorkbench;
|
import org.eclipse.ui.IWorkbench;
|
||||||
import org.eclipse.ui.PartInitException;
|
import org.eclipse.ui.PartInitException;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.eclipse.ui.actions.ActionFactory;
|
import org.eclipse.ui.actions.ActionFactory;
|
||||||
import org.eclipse.ui.part.ViewPart;
|
import org.eclipse.ui.part.ViewPart;
|
||||||
|
|
||||||
|
@ -121,7 +122,7 @@ public class ResultsView extends ViewPart {
|
||||||
@Override
|
@Override
|
||||||
public void createPartControl(Composite parent) {
|
public void createPartControl(Composite parent) {
|
||||||
sessionsManager = TestsRunnerPlugin.getDefault().getTestingSessionsManager();
|
sessionsManager = TestsRunnerPlugin.getDefault().getTestingSessionsManager();
|
||||||
IWorkbench workbench = TestsRunnerPlugin.getDefault().getWorkbench();
|
IWorkbench workbench = PlatformUI.getWorkbench();
|
||||||
Clipboard clipboard = new Clipboard(parent.getDisplay());
|
Clipboard clipboard = new Clipboard(parent.getDisplay());
|
||||||
|
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
|
|
|
@ -43,6 +43,7 @@ import org.eclipse.swt.widgets.Display;
|
||||||
import org.eclipse.ui.IViewPart;
|
import org.eclipse.ui.IViewPart;
|
||||||
import org.eclipse.ui.IWorkbenchWindow;
|
import org.eclipse.ui.IWorkbenchWindow;
|
||||||
import org.eclipse.ui.PartInitException;
|
import org.eclipse.ui.PartInitException;
|
||||||
|
import org.eclipse.ui.PlatformUI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Launch delegate implementation that redirects its queries to the preferred
|
* Launch delegate implementation that redirects its queries to the preferred
|
||||||
|
@ -239,11 +240,10 @@ public abstract class BaseTestsLaunchDelegate extends LaunchConfigurationDelegat
|
||||||
private void activateTestingView() {
|
private void activateTestingView() {
|
||||||
Display.getDefault().syncExec(() -> {
|
Display.getDefault().syncExec(() -> {
|
||||||
try {
|
try {
|
||||||
IWorkbenchWindow activeWindow = TestsRunnerPlugin.getDefault().getWorkbench()
|
IWorkbenchWindow activeWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
|
||||||
.getActiveWorkbenchWindow();
|
|
||||||
IViewPart view = activeWindow.getActivePage()
|
IViewPart view = activeWindow.getActivePage()
|
||||||
.showView(ITestsRunnerConstants.TESTS_RUNNER_RESULTS_VIEW_ID);
|
.showView(ITestsRunnerConstants.TESTS_RUNNER_RESULTS_VIEW_ID);
|
||||||
TestsRunnerPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().activate(view);
|
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().activate(view);
|
||||||
} catch (PartInitException e) {
|
} catch (PartInitException e) {
|
||||||
TestsRunnerPlugin.log(e);
|
TestsRunnerPlugin.log(e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue