當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。