org.eclipse.jface.util.Util.isLinux()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(141)

本文整理了Java中org.eclipse.jface.util.Util.isLinux()方法的一些代码示例,展示了Util.isLinux()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.isLinux()方法的具体详情如下:
包路径:org.eclipse.jface.util.Util
类名称:Util
方法名:isLinux

Util.isLinux介绍

[英]Common WS query helper method.
[中]通用WS-query助手方法。

代码示例

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide

private String quotePath(String path) {
  if (Util.isLinux() || Util.isMac()) {
    // Quote for usage inside "", man sh, topic QUOTING:
    path = path.replaceAll("[\"$`]", "\\\\$0"); //$NON-NLS-1$ //$NON-NLS-2$
  }
  // Windows: Can't quote, since explorer.exe has a very special command line parsing strategy.
  return path;
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide

if (count > MAX_RESOURCES_TO_TRANSFER) {
  String message = "Transfer aborted, too many resources: " + count + "."; //$NON-NLS-1$ //$NON-NLS-2$
  if (Util.isLinux()) {
    message += "\nIf you are running in x11vnc environment please consider to switch to vncserver " + //$NON-NLS-1$
        "+ vncviewer or to run x11vnc without clipboard support " + //$NON-NLS-1$

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench.texteditor

/**
 * Called after executed find action to update the history.
 */
private void updateFindHistory() {
  if (okToUse(fFindField)) {
    fFindField.removeModifyListener(fFindModifyListener);
    // XXX: Workaround for Combo bug on Linux (see bug 404202 and bug 410603)
    if (Util.isLinux())
      fFindModifyListener.ignoreNextEvent();
    updateHistory(fFindField, fFindHistory);
    fFindField.addModifyListener(fFindModifyListener);
  }
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.workbench.texteditor

/**
 * Called after executed find action to update the history.
 */
private void updateFindHistory() {
  if (okToUse(fFindField)) {
    fFindField.removeModifyListener(fFindModifyListener);
    // XXX: Workaround for Combo bug on Linux (see bug 404202 and bug 410603)
    if (Util.isLinux())
      fFindModifyListener.ignoreNextEvent();
    updateHistory(fFindField, fFindHistory);
    fFindField.addModifyListener(fFindModifyListener);
  }
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui

checkBox.setFont(JFaceResources.getDialogFont());
gd= new GridData(GridData.FILL, GridData.CENTER, false, false);
int offset= Util.isMac() ? -4 : Util.isLinux() ? -2 : /* Windows et al. */ 3;
gd.widthHint= checkBox.computeSize(SWT.DEFAULT, SWT.DEFAULT).x + offset;
checkBox.setLayoutData(gd);

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

checkBox.setFont(JFaceResources.getDialogFont());
gd= new GridData(GridData.FILL, GridData.CENTER, false, false);
int offset= Util.isMac() ? -4 : Util.isLinux() ? -2 : /* Windows et al. */ 3;
gd.widthHint= checkBox.computeSize(SWT.DEFAULT, SWT.DEFAULT).x + offset;
checkBox.setLayoutData(gd);

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide

if (Util.isLinux() || Util.isMac()) {
  p = Runtime.getRuntime().exec(new String[] { "/bin/sh", "-c", launchCmd }, null, dir); //$NON-NLS-1$ //$NON-NLS-2$
} else {

相关文章