本文整理匯總了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());
}