本文整理汇总了Java中org.eclipse.debug.internal.ui.DebugUIPlugin类的典型用法代码示例。如果您正苦于以下问题:Java DebugUIPlugin类的具体用法?Java DebugUIPlugin怎么用?Java DebugUIPlugin使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DebugUIPlugin类属于org.eclipse.debug.internal.ui包,在下文中一共展示了DebugUIPlugin类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: schedulePerspectiveSwitchJob
import org.eclipse.debug.internal.ui.DebugUIPlugin; //导入依赖的package包/类
protected void schedulePerspectiveSwitchJob(final String perspectiveID) {
Job switchJob = new UIJob(DebugUIPlugin.getStandardDisplay(), "Perspective Switch Job") { //$NON-NLS-1$
public IStatus runInUIThread(IProgressMonitor monitor) {
IWorkbenchWindow window = DebugUIPlugin.getActiveWorkbenchWindow();
if (window != null && !(isCurrentPerspective(window, perspectiveID))) {
switchToPerspective(window, perspectiveID);
}
// Force the debug view to open
if (window != null) {
try {
window.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(SIMULATION_VIEW_ID);
} catch (PartInitException e) {
e.printStackTrace();
}
}
return Status.OK_STATUS;
}
};
switchJob.setSystem(true);
switchJob.setPriority(Job.INTERACTIVE);
switchJob.setRule(AsynchronousSchedulingRuleFactory.getDefault().newSerialPerObjectRule(this));
switchJob.schedule();
}
示例2: hotCodeReplaceFailed
import org.eclipse.debug.internal.ui.DebugUIPlugin; //导入依赖的package包/类
public void hotCodeReplaceFailed(final List<IDebugTarget> targets) {
final Display display = Display.getDefault();
try {
final String title = "Model changed during simulation";
display.asyncExec(new Runnable() {
public void run() {
if (display.isDisposed()) {
return;
}
SimulationLaunchErrorDialog dialog = new SimulationLaunchErrorDialog(
DebugUIPlugin.getShell(), title, MESSAGE, status,
targets);
dialog.setBlockOnOpen(false);
dialog.open();
}
});
} catch (Exception ex) {
ex.printStackTrace();
}
}
示例3: addCustomException
import org.eclipse.debug.internal.ui.DebugUIPlugin; //导入依赖的package包/类
/**
* Add the new exception in the content pane
*
*/
private void addCustomException() {
String customException = addNewExceptionField.getText().trim();
Object[] currentElements = contentProvider.getElements(inputElement);
ArrayList<Object> currentElementsList = new ArrayList<Object>();
for (int i = 0; i < currentElements.length; ++i) {
Object element = currentElements[i];
currentElementsList.add(element);
}
if (customException.isEmpty()) {
return;
}
if (!currentElementsList.contains(customException)) {
getViewer().add(customException);
addNewExceptionField.setText("");
((PyExceptionListProvider) contentProvider).addUserConfiguredException(customException);
} else {
IStatus status = new Status(IStatus.WARNING, DebugUIPlugin.getUniqueIdentifier(),
"Duplicate: This exception already exists");
DebugUIPlugin.errorDialog(getShell(), DebugUIPlugin.removeAccelerators("Add Custom User Exception"),
"Error", status);
}
}
示例4: handleDebugEvents
import org.eclipse.debug.internal.ui.DebugUIPlugin; //导入依赖的package包/类
@Override
public void handleDebugEvents(DebugEvent[] events) {
for (int i = 0; i < events.length; i++) {
DebugEvent event = events[i];
if (event.getSource().equals(getProcess())) {
Runnable r = new Runnable() {
@Override
public void run() {
if (restartLaunchAction != null) {
restartLaunchAction.update();
}
if (terminateAllLaunchesAction != null) {
terminateAllLaunchesAction.update();
}
}
};
DebugUIPlugin.getStandardDisplay().asyncExec(r);
}
}
}
示例5: handleStatus
import org.eclipse.debug.internal.ui.DebugUIPlugin; //导入依赖的package包/类
@Override
public Object handleStatus(IStatus status, Object source) throws CoreException {
if (source instanceof ILaunchConfiguration) {
ILaunchConfiguration config = (ILaunchConfiguration) source;
if (DebugUITools.isPrivate(config)) {
return Boolean.FALSE;
}
}
Shell activeShell = DebugUIPlugin.getShell();
// should consider using MessageDialogWithToggle?
return MessageDialog.openQuestion(activeShell, Messages.getString("STALE_RESOURCES_DETECTED"),
Messages.getString("STALE_RESOURCES_LAUNCH_CONFIRMATION"));
}
示例6: handleStatus
import org.eclipse.debug.internal.ui.DebugUIPlugin; //导入依赖的package包/类
public Object handleStatus(final IStatus status, final Object source) {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
Shell shell = DebugUIPlugin.getShell();
SimulationLaunchErrorDialog dialog = new SimulationLaunchErrorDialog(shell,
"Exception occured during simulation", ERROR_MSG, status, Collections
.singletonList((IDebugTarget) source));
dialog.setBlockOnOpen(false);
dialog.open();
}
});
return null;
}
示例7: okPressed
import org.eclipse.debug.internal.ui.DebugUIPlugin; //导入依赖的package包/类
protected void okPressed()
{
IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore();
String val = (savePref.getSelection() ? MessageDialogWithToggle.ALWAYS : MessageDialogWithToggle.PROMPT);
store.setValue(IInternalDebugUIConstants.PREF_SAVE_DIRTY_EDITORS_BEFORE_LAUNCH, val);
super.okPressed();
}
示例8: performAction
import org.eclipse.debug.internal.ui.DebugUIPlugin; //导入依赖的package包/类
@Override
protected void performAction(Object target, ISelection selection, IWorkbenchPart part) throws CoreException {
boolean result = ((ISetNextTarget) target).setNextToLine(part, selection, fTargetElement);
if (result == false) {
IStatus status = new Status(IStatus.WARNING, DebugUIPlugin.getUniqueIdentifier(),
"Unable to set the next statement to this location. The next statement cannot be set to another function/loop.");
DebugUIPlugin.errorDialog(DebugUIPlugin.getShell(), DebugUIPlugin.removeAccelerators("Set Next Statement"),
"Error", status);
}
}
示例9: getPresentation
import org.eclipse.debug.internal.ui.DebugUIPlugin; //导入依赖的package包/类
private ISourcePresentation getPresentation() {
String id = Activator.DEBUG_MODEL_ID;
return ((DelegatingModelPresentation)DebugUIPlugin.getModelPresentation()).getPresentation(id);
}
示例10: getText
import org.eclipse.debug.internal.ui.DebugUIPlugin; //导入依赖的package包/类
@Override
public String getText(Object element) {
return DebugUIPlugin.getDefaultLabelProvider().getText(element);
}
示例11: SCTPerspectiveManager
import org.eclipse.debug.internal.ui.DebugUIPlugin; //导入依赖的package包/类
public SCTPerspectiveManager() {
DebugUIPlugin.getDefault().getPreferenceStore().setValue(IInternalDebugUIConstants.PREF_ACTIVATE_DEBUG_VIEW,
false);
}