当前位置: 首页>>代码示例>>Java>>正文


Java ConsolePlugin.log方法代码示例

本文整理汇总了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;
}
 
开发者ID:polyhedraltech,项目名称:SecurityTesting,代码行数:24,代码来源:StopZAPJob.java

示例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);
	}
}
 
开发者ID:polyhedraltech,项目名称:SecurityTesting,代码行数:24,代码来源:ZAPConfigureCSRFSettingsDialog.java

示例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);
        }
    }
}
 
开发者ID:tlaplus,项目名称:tlaplus,代码行数:15,代码来源:ConsoleFactory.java

示例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);
        }
    }
}
 
开发者ID:tlaplus,项目名称:tlaplus,代码行数:19,代码来源:TLAPMConsoleFactory.java

示例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;
}
 
开发者ID:polyhedraltech,项目名称:SecurityTesting,代码行数:18,代码来源:ClearZAPJob.java

示例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);
	}
}
 
开发者ID:polyhedraltech,项目名称:SecurityTesting,代码行数:10,代码来源:AllowAttackOnStartToggle.java

示例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;
}
 
开发者ID:polyhedraltech,项目名称:SecurityTesting,代码行数:13,代码来源:HandleAntiCSRFTokensToggle.java

示例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);
	}
}
 
开发者ID:polyhedraltech,项目名称:SecurityTesting,代码行数:10,代码来源:ProcessFormToggle.java

示例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);
	}
}
 
开发者ID:polyhedraltech,项目名称:SecurityTesting,代码行数:10,代码来源:PostFormToggle.java

示例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);
	}
}
 
开发者ID:polyhedraltech,项目名称:SecurityTesting,代码行数:10,代码来源:ParseGitToggle.java

示例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);
	}
}
 
开发者ID:polyhedraltech,项目名称:SecurityTesting,代码行数:10,代码来源:ParseSvnEntriesToggle.java

示例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;
}
 
开发者ID:polyhedraltech,项目名称:SecurityTesting,代码行数:13,代码来源:ParseSitemapXmlToggle.java

示例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;
}
 
开发者ID:polyhedraltech,项目名称:SecurityTesting,代码行数:13,代码来源:ParseCommentsToggle.java

示例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);
	}
}
 
开发者ID:polyhedraltech,项目名称:SecurityTesting,代码行数:10,代码来源:HandleAntiCSRFTokensToggle.java

示例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);
	}
}
 
开发者ID:polyhedraltech,项目名称:SecurityTesting,代码行数:10,代码来源:RescanInAttackModeToggle.java


注:本文中的org.eclipse.ui.console.ConsolePlugin.log方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。