本文整理汇总了Java中org.eclipse.che.ide.util.browser.BrowserUtils类的典型用法代码示例。如果您正苦于以下问题:Java BrowserUtils类的具体用法?Java BrowserUtils怎么用?Java BrowserUtils使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BrowserUtils类属于org.eclipse.che.ide.util.browser包,在下文中一共展示了BrowserUtils类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: actionPerformed
import org.eclipse.che.ide.util.browser.BrowserUtils; //导入依赖的package包/类
@Override
public void actionPerformed(ActionEvent e) {
final Resource selectedResource = appContext.getResource();
if (Resource.FILE == selectedResource.getResourceType()) {
final String contentUrl = ((File) selectedResource).getContentUrl();
BrowserUtils.openInNewTab(agentURLModifier.modify(contentUrl));
}
}
示例2: onOpenPullRequestOnVcsHost
import org.eclipse.che.ide.util.browser.BrowserUtils; //导入依赖的package包/类
@Override
public void onOpenPullRequestOnVcsHost() {
final Context context = workflowExecutor.getCurrentContext();
BrowserUtils.openInNewTab(
context
.getVcsHostingService()
.makePullRequestUrl(
context.getOriginRepositoryOwner(),
context.getOriginRepositoryName(),
context.getPullRequestIssueNumber()));
}
示例3: downloadPrivateKey
import org.eclipse.che.ide.util.browser.BrowserUtils; //导入依赖的package包/类
private void downloadPrivateKey(final String privateKey) {
dialogFactory
.createConfirmDialog(
constant.downloadPrivateKeyTitle(),
constant.downloadPrivateKeyMessage(),
() ->
BrowserUtils.openInNewTab(
"data:application/x-pem-key," + URL.encodePathSegment(privateKey)),
getCancelCallback())
.show();
}
示例4: actionPerformed
import org.eclipse.che.ide.util.browser.BrowserUtils; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void actionPerformed(ActionEvent e) {
BrowserUtils.openInNewTab(locale.actionOpenDocsUrl());
}
示例5: actionPerformed
import org.eclipse.che.ide.util.browser.BrowserUtils; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void actionPerformed(ActionEvent e) {
BrowserUtils.openInNewTab(locale.redirectToDashboardAccountUrl());
}
示例6: actionPerformed
import org.eclipse.che.ide.util.browser.BrowserUtils; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void actionPerformed(ActionEvent e) {
BrowserUtils.openInNewTab(locale.actionRedirectToEngineerChatChannelUrl());
}
示例7: handleEvent
import org.eclipse.che.ide.util.browser.BrowserUtils; //导入依赖的package包/类
@Override
public void handleEvent(Event evt) {
// Don't even bother to do anything unless we have someone ready to
// handle events.
if (getDelegate() == null
|| (primaryMouseButtonOnly
&& ((MouseEvent) evt).getButton() != MouseEvent.Button.PRIMARY)) {
return;
}
Element eventTarget = (Element) evt.getTarget();
if (CssUtils.containsClassName(eventTarget, css.expandControl())) {
onExpansionControlEvent(evt, eventTarget);
} else {
Element treeNodeBody =
CssUtils.getAncestorOrSelfWithClassName(eventTarget, css.treeNodeBody());
if (treeNodeBody != null) {
// this code emulate double click for tablets
if (Event.MOUSEDOWN.equals(evt.getType())) {
double currentClickMs = Duration.currentTimeMillis();
if (currentClickMs - previousClickMs < MouseGestureListener.MAX_CLICK_TIMEOUT_MS
&& treeNodeBody.equals(previousClickTreeNodeBody)) {
if (BrowserUtils.isAndroid() || BrowserUtils.isIPad() || BrowserUtils.isIphone()) {
evt.stopPropagation();
evt.preventDefault();
doActionsForDoubleClick(treeNodeBody, evt);
}
return;
} else {
this.previousClickMs = currentClickMs;
this.previousClickTreeNodeBody = treeNodeBody;
}
}
onTreeNodeBodyChildEvent(evt, treeNodeBody);
} else {
onOtherEvent(evt);
}
}
}
示例8: onUrlChosen
import org.eclipse.che.ide.util.browser.BrowserUtils; //导入依赖的package包/类
@Override
public void onUrlChosen(String previewUrl) {
BrowserUtils.openInNewTab(previewUrl);
}
示例9: actionPerformed
import org.eclipse.che.ide.util.browser.BrowserUtils; //导入依赖的package包/类
@Override
public void actionPerformed(ActionEvent e) {
BrowserUtils.openInNewTab(productInfoDataProvider.getSupportLink());
}