📄 obfuscationerrorhandler.java
字号:
/**
* Copyright (c) 2003-2005 Craig Setera
* All Rights Reserved.
* Licensed under the Eclipse Public License - v 1.0
* For more information see http://www.eclipse.org/legal/epl-v10.html
*/
package eclipseme.ui.internal.statusHandlers;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.debug.core.IStatusHandler;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import eclipseme.ui.internal.dialog.ErrorTextWithContinueDialog;
/**
* Status handler for the case when an error occurs during
* obfuscation processing.
* <p />
* Copyright (c) 2003-2005 Craig Setera<br>
* All Rights Reserved.<br>
* Licensed under the Eclipse Public License - v 1.0<p/>
* <br>
* $Revision: 1.3 $
* <br>
* $Date: 2005/07/07 02:36:26 $
* <br>
* @author Craig Setera
*/
public class ObfuscationErrorHandler implements IStatusHandler
{
/**
* @see org.eclipse.debug.core.IStatusHandler#handleStatus(org.eclipse.core.runtime.IStatus, java.lang.Object)
*/
public Object handleStatus(final IStatus status, Object source)
throws CoreException
{
Display display = Display.getCurrent();
Shell shell = display.getActiveShell();
if (shell == null) {
shell = new Shell(display, SWT.NONE);
}
final Shell finalShell = shell;
final boolean[] result = new boolean[1];
display.syncExec(new Runnable() {
public void run() {
String title = "Obfuscation Problems";
result[0] = ErrorTextWithContinueDialog.promptToContinue(
finalShell,
title,
status.getMessage());
}
});
return new Boolean(result[0]);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -