本文整理汇总了Java中com.intellij.ide.browsers.BrowserLauncher类的典型用法代码示例。如果您正苦于以下问题:Java BrowserLauncher类的具体用法?Java BrowserLauncher怎么用?Java BrowserLauncher使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BrowserLauncher类属于com.intellij.ide.browsers包,在下文中一共展示了BrowserLauncher类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: processTerminated
import com.intellij.ide.browsers.BrowserLauncher; //导入依赖的package包/类
@Override
public void processTerminated(ProcessEvent processEvent) {
executionCounter.setEndTime(System.currentTimeMillis());
if (processEvent.getExitCode() == 0) {
try {
LivingDocExecution execution = getLivingDocExecution();
updateStatusLine(execution);
File resultFile = loadResultFile(execution);
BrowserLauncher browser = new BrowserLauncherImpl();
browser.open(resultFile.getPath());
} catch (IOException | LivingDocException e) {
LOG.error(e);
}
} else {
statusLine.setText(I18nSupport.getValue("run.execution.error.process"));
statusLine.setStatusColor(ColorProgressBar.RED);
statusLine.setFraction(100d);
}
}
开发者ID:testIT-LivingDoc,项目名称:livingdoc-intellij,代码行数:26,代码来源:ProcessListenerLivingDoc.java
示例2: launchSearch
import com.intellij.ide.browsers.BrowserLauncher; //导入依赖的package包/类
private void launchSearch(final String query) {
if (query == null) {
Messages.showMessageDialog("query == null",
"Error When Launching the Browser",
Messages.getErrorIcon());
System.err.println("Error When Launching the Browser: query == null");
return;
}
try {
final String uriString = searchEngine.generateSearchUri(query);
BrowserLauncher.getInstance().open(uriString);
} catch (IOException ex) {
Messages.showMessageDialog(ex.toString(),
"Error When Launching the Browser",
Messages.getErrorIcon());
System.err.println("Error When Launching the Browser: " + ex.toString());
}
}
开发者ID:maddouri,项目名称:IntelliJ-OnlineSearch,代码行数:23,代码来源:LaunchSearchAction.java
示例3: openInBrowserHandler
import com.intellij.ide.browsers.BrowserLauncher; //导入依赖的package包/类
public OpenInBrowserHandler openInBrowserHandler()
{
if (!this.hasApplicationService(OpenInBrowserHandler.class)) {
this.registerApplicationService(new OpenInBrowserHandler(BrowserLauncher.getInstance()));
}
return (OpenInBrowserHandler)this.applicationService(OpenInBrowserHandler.class);
}
开发者ID:ben-gibson,项目名称:GitLink,代码行数:9,代码来源:Container.java
示例4: testOpensInBrowser
import com.intellij.ide.browsers.BrowserLauncher; //导入依赖的package包/类
@Test
@UseDataProvider("urlProvider")
public void testOpensInBrowser(URL url, String expected) throws MalformedURLException, UrlHandlerException
{
BrowserLauncher browserLauncher = mock(BrowserLauncher.class);
UrlHandler handler = new OpenInBrowserHandler(browserLauncher);
handler.handle(url);
verify(browserLauncher, times(1)).open(expected);
}
开发者ID:ben-gibson,项目名称:GitLink,代码行数:13,代码来源:OpenInBrowserHandlerTest.java
示例5: getNoJavaFXFoundPanel
import com.intellij.ide.browsers.BrowserLauncher; //导入依赖的package包/类
private static JPanel getNoJavaFXFoundPanel() {
JPanel noJavaFXFoundPanel = new JPanel(new GridBagLayout());
JEditorPane noJavaFXFoundPane = new JEditorPane();
noJavaFXFoundPane.setContentType("text/html");
noJavaFXFoundPane.setEditable(false);
noJavaFXFoundPane.setOpaque(false);
noJavaFXFoundPane.setText(NO_JAVAFX_FOUND_MESSAGE);
noJavaFXFoundPane.addHyperlinkListener(e -> {
if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
BrowserLauncher.getInstance().browse(e.getDescription(), WebBrowserManager.getInstance().getFirstActiveBrowser());
}
});
noJavaFXFoundPanel.add(noJavaFXFoundPane);
return noJavaFXFoundPanel;
}
开发者ID:vcu-swim-lab,项目名称:stack-intheflow,代码行数:16,代码来源:SearchToolWindowFactory.java
示例6: doExecute
import com.intellij.ide.browsers.BrowserLauncher; //导入依赖的package包/类
@Override
protected RunContentDescriptor doExecute(@NotNull RunProfileState state, @NotNull ExecutionEnvironment env) throws ExecutionException {
final RunProfile runProfileRaw = env.getRunProfile();
if (runProfileRaw instanceof UI5RunConfiguration) {
FileDocumentManager.getInstance().saveAllDocuments();
final UI5RunConfiguration runProfile = (UI5RunConfiguration) runProfileRaw;
final UI5RunnerParameters params = runProfile.getRunnerParameters();
BuiltInServerManager serverManager = BuiltInServerManager.getInstance().waitForStart();
BrowserLauncher.getInstance().browse("http://localhost:" + serverManager.getPort()
+ getClientApplicationPath(env.getProject()), params.getWebBrowser(), env.getProject());
}
return super.doExecute(state, env);
}
开发者ID:asebak,项目名称:ui5-intellij-plugin,代码行数:16,代码来源:UI5Runner.java
示例7: OpenInBrowserHandler
import com.intellij.ide.browsers.BrowserLauncher; //导入依赖的package包/类
public OpenInBrowserHandler(BrowserLauncher browserLauncher)
{
this.browserLauncher = browserLauncher;
}
开发者ID:ben-gibson,项目名称:GitLink,代码行数:5,代码来源:OpenInBrowserHandler.java
示例8: actionPerformed
import com.intellij.ide.browsers.BrowserLauncher; //导入依赖的package包/类
public void actionPerformed(AnActionEvent event) {
BrowserLauncher.getInstance().browse(UrlManager.getMainPage() , WebBrowserManager.getInstance().getFirstActiveBrowser());
}
开发者ID:zhengjunbase,项目名称:codehelper.generator,代码行数:4,代码来源:ShowLearnMoreAction.java
示例9: openBrowser
import com.intellij.ide.browsers.BrowserLauncher; //导入依赖的package包/类
public void openBrowser(String url) {
BrowserLauncher.getInstance().browse(url, WebBrowserManager.getInstance().getFirstActiveBrowser());
}
开发者ID:vcu-swim-lab,项目名称:stack-intheflow,代码行数:4,代码来源:SearchToolWindowGUI.java
示例10: getBrowserLauncher
import com.intellij.ide.browsers.BrowserLauncher; //导入依赖的package包/类
private static BrowserLauncher getBrowserLauncher() {
BrowserLauncher launcher = ApplicationManager.getApplication() == null ? null : BrowserLauncher.getInstance();
return launcher == null ? new BrowserLauncherAppless() : launcher;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:BrowserUtil.java
示例11: openUrl
import com.intellij.ide.browsers.BrowserLauncher; //导入依赖的package包/类
@Override
public boolean openUrl(@NotNull WebBrowser browser, @NotNull String url, @Nullable Project project) {
return BrowserLauncher.getInstance().browseUsingPath(url, null, browser, project, ArrayUtil.EMPTY_STRING_ARRAY);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:DefaultUrlOpener.java
示例12: actionPerformed
import com.intellij.ide.browsers.BrowserLauncher; //导入依赖的package包/类
@Override
public void actionPerformed(AnActionEvent event) {
BrowserLauncher.getInstance().browse(formatUrl(), /* browser= */ null, /* project= */ null);
}
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:5,代码来源:CloudToolsFeedbackAction.java
示例13: getBrowserLauncher
import com.intellij.ide.browsers.BrowserLauncher; //导入依赖的package包/类
private static BrowserLauncher getBrowserLauncher() {
BrowserLauncher launcher = ApplicationManager.getApplication() == null ? null : BrowserLauncher.getInstance();
return launcher == null ? BrowserLauncherAppless.INSTANCE : launcher;
}
开发者ID:consulo,项目名称:consulo,代码行数:5,代码来源:BrowserUtil.java
示例14: openUrl
import com.intellij.ide.browsers.BrowserLauncher; //导入依赖的package包/类
@Override
public boolean openUrl(@NotNull WebBrowser browser, @NotNull String url, @Nullable Project project)
{
return BrowserLauncher.getInstance().browseUsingPath(url, null, browser, project, ArrayUtil.EMPTY_STRING_ARRAY);
}
开发者ID:consulo,项目名称:consulo-xml,代码行数:6,代码来源:DefaultUrlOpener.java
示例15: actionPerformed
import com.intellij.ide.browsers.BrowserLauncher; //导入依赖的package包/类
/**
* Action handler. Only specification nodes will open in the web browser.
*
* @param actionEvent Carries information on the invocation place
*/
@Override
public void actionPerformed(AnActionEvent actionEvent) {
DefaultMutableTreeNode[] selectedNodes = repositoryTree.getSelectedNodes(DefaultMutableTreeNode.class, null);
Object userObject = selectedNodes[0].getUserObject();
if (((Node) userObject).getType() == NodeType.SPECIFICATION) {
SpecificationNode specificationNode = (SpecificationNode) userObject;
RepositoryNode repositoryNode = RepositoryViewUtils.getRepositoryNode(specificationNode);
BrowserLauncher browser = new BrowserLauncherImpl();
for (DefaultMutableTreeNode selectedNode : selectedNodes) {
userObject = selectedNode.getUserObject();
specificationNode = (SpecificationNode) userObject;
LivingDocConnector livingDocConnector = LivingDocConnector.newInstance(ProjectSettings.getInstance(actionEvent.getProject()));
String url = livingDocConnector.getSpecificationRemoteUrl(specificationNode, repositoryNode);
browser.open(url);
}
}
}
开发者ID:testIT-LivingDoc,项目名称:livingdoc-intellij,代码行数:32,代码来源:OpenRemoteDocumentAction.java
注:本文中的com.intellij.ide.browsers.BrowserLauncher类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论