本文整理汇总了Java中org.eclipse.ui.console.ConsolePlugin.log方法的典型用法代码示例。如果您正苦于以下问题:Java ConsolePlugin.log方法的具体用法?Java ConsolePlugin.log怎么用?Java ConsolePlugin.log使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.ui.console.ConsolePlugin
的用法示例。
在下文中一共展示了ConsolePlugin.log方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: run
import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
/**
* Execution of the call to ZAP to stop the running server.
*/
@Override
protected IStatus run(IProgressMonitor monitor) {
if (ZAPHelper.getInstance().isZapRunning()) {
try {
ZAPHelper.getInstance().getZAPClient().core.shutdown(ZAPHelper.getInstance().getZapApiKey());
while (ZAPHelper.getInstance().isZapRunning()) {
Thread.sleep(1000); // give server time to stop
}
} catch (Exception e) {
ConsolePlugin.log(e);
}
} else {
CreatePopupMessageJob job = new CreatePopupMessageJob(MessageDialog.ERROR,
"The ZAP Server is not running.");
job.setPriority(Job.INTERACTIVE);
job.schedule();
}
return Status.OK_STATUS;
}
示例2: updateCsrfTokenList
import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
/**
* When a new anti-CSRF token has been added or removed from the list or
* when the view page is first being loaded, display the list.
*/
private void updateCsrfTokenList() {
csrfTokens.removeAll();
try {
ApiResponseElement response = (ApiResponseElement) ZAPHelper.getInstance().getZAPClient().acsrf
.optionTokensNames();
// The ZAP API returns the CSRF tokens as a string with the format
// "[token1, token2, token3, ... tokenN]"
// so the extra characters need to be parsed out.
String[] csrfTokenValues = response.getValue().replace("[", "").replace("]", "").replace(" ", "")
.split(",");
for (String csrfTokenEntry : csrfTokenValues) {
csrfTokens.add(csrfTokenEntry);
}
} catch (ClientApiException e) {
ConsolePlugin.log(e);
}
}
示例3: openConsole
import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
public void openConsole()
{
IWorkbenchPage activePage = UIHelper.getActivePage();
if (activePage != null)
{
try
{
activePage.showView(IConsoleConstants.ID_CONSOLE_VIEW, TLC_ID, IWorkbenchPage.VIEW_ACTIVATE);
} catch (PartInitException e)
{
ConsolePlugin.log(e);
}
}
}
示例4: openConsole
import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
/**
* Opens a generic console view using {@link TLAPMConsoleFactory#TLAPM_CONSOLE_ID} as the
* console name so that it can be found later.
*/
public void openConsole()
{
IWorkbenchPage activePage = UIHelper.getActivePage();
if (activePage != null)
{
try
{
activePage.showView(IConsoleConstants.ID_CONSOLE_VIEW, TLAPM_CONSOLE_ID, IWorkbenchPage.VIEW_ACTIVATE);
} catch (PartInitException e)
{
ConsolePlugin.log(e);
}
}
}
示例5: run
import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
/**
* Execution of the call to ZAP to clean up after a ZAP scan.
*/
@Override
protected IStatus run(IProgressMonitor monitor) {
try {
ClientApi zapAPI = ZAPHelper.getInstance().getZAPClient();
zapAPI.spider.removeAllScans(ZAPHelper.getInstance().getZapApiKey());
zapAPI.ascan.removeAllScans(ZAPHelper.getInstance().getZapApiKey());
zapAPI.core.deleteAllAlerts(ZAPHelper.getInstance().getZapApiKey());
} catch (ClientApiException e) {
ConsolePlugin.log(e);
}
return Status.OK_STATUS;
}
示例6: executeToggleOn
import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
@Override
protected void executeToggleOn() {
try {
ZAPHelper.getInstance().getZAPClient().ascan
.setOptionAllowAttackOnStart(ZAPHelper.getInstance().getZapApiKey(), true);
} catch (ClientApiException e) {
ConsolePlugin.log(e);
}
}
示例7: initToggleState
import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
@Override
protected boolean initToggleState() {
try {
ApiResponseElement response = (ApiResponseElement) ZAPHelper.getInstance().getZAPClient().ascan
.optionHandleAntiCSRFTokens();
return "true".equalsIgnoreCase(response.getValue());
} catch (ClientApiException e) {
ConsolePlugin.log(e);
}
return false;
}
示例8: executeToggleOn
import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
@Override
protected void executeToggleOn() {
try {
ZAPHelper.getInstance().getZAPClient().spider.setOptionProcessForm(ZAPHelper.getInstance().getZapApiKey(),
true);
} catch (ClientApiException e) {
ConsolePlugin.log(e);
}
}
示例9: executeToggleOn
import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
@Override
protected void executeToggleOn() {
try {
ZAPHelper.getInstance().getZAPClient().spider.setOptionPostForm(ZAPHelper.getInstance().getZapApiKey(),
true);
} catch (ClientApiException e) {
ConsolePlugin.log(e);
}
}
示例10: executeToggleOn
import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
@Override
protected void executeToggleOn() {
try {
ZAPHelper.getInstance().getZAPClient().spider.setOptionParseGit(ZAPHelper.getInstance().getZapApiKey(),
true);
} catch (ClientApiException e) {
ConsolePlugin.log(e);
}
}
示例11: executeToggleOn
import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
@Override
protected void executeToggleOn() {
try {
ZAPHelper.getInstance().getZAPClient().spider
.setOptionParseSVNEntries(ZAPHelper.getInstance().getZapApiKey(), true);
} catch (ClientApiException e) {
ConsolePlugin.log(e);
}
}
示例12: initToggleState
import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
@Override
protected boolean initToggleState() {
try {
ApiResponseElement response = (ApiResponseElement) ZAPHelper.getInstance().getZAPClient().spider
.optionParseSitemapXml();
return "true".equalsIgnoreCase(response.getValue());
} catch (ClientApiException e) {
ConsolePlugin.log(e);
}
return false;
}
示例13: initToggleState
import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
@Override
protected boolean initToggleState() {
try {
ApiResponseElement response = (ApiResponseElement) ZAPHelper.getInstance().getZAPClient().spider
.optionParseComments();
return "true".equalsIgnoreCase(response.getValue());
} catch (ClientApiException e) {
ConsolePlugin.log(e);
}
return false;
}
示例14: executeToggleOn
import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
@Override
protected void executeToggleOn() {
try {
ZAPHelper.getInstance().getZAPClient().ascan
.setOptionHandleAntiCSRFTokens(ZAPHelper.getInstance().getZapApiKey(), true);
} catch (ClientApiException e) {
ConsolePlugin.log(e);
}
}
示例15: executeToggleOff
import org.eclipse.ui.console.ConsolePlugin; //导入方法依赖的package包/类
@Override
protected void executeToggleOff() {
try {
ZAPHelper.getInstance().getZAPClient().ascan
.setOptionRescanInAttackMode(ZAPHelper.getInstance().getZapApiKey(), false);
} catch (ClientApiException e) {
ConsolePlugin.log(e);
}
}