org.eclipse.jem.util.logger.proxy.Logger.logWarning()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(217)

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

Logger.logWarning介绍

[英]Log the message as warning.
[中]将消息记录为警告。

代码示例

代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.core

public static void warn(String message) {
    org.eclipse.jem.util.logger.proxy.Logger.getLogger().logWarning(message);
  }
}

代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.core

public void warning(SAXParseException exception) throws SAXException {
    Logger.getLogger().logWarning(exception);
  }
};

代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.core

public static void warn(Throwable e){
  org.eclipse.jem.util.logger.proxy.Logger.getLogger().logWarning(e);
}

代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.ejb

public static IPath getInstallLocation() {
  if (location == null) {
    URL url = getInstallURL();
    try {
      String installLocation = ((PlatformURLConnection) url.openConnection()).getURLAsLocal().getFile();
      location = new Path(installLocation);
    } catch (IOException e) {
      org.eclipse.jem.util.logger.proxy.Logger.getLogger().logWarning(J2EEPluginResourceHandler.getString("Install_Location_Error_", new Object[]{url}) + e); //$NON-NLS-1$
    }
  }
  return location;
}

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

public static IPath getInstallLocation() {
  if (location == null) {
    URL url = getInstallURL();
    try {
      String installLocation = ((PlatformURLConnection) url.openConnection()).getURLAsLocal().getFile();
      location = new Path(installLocation);
    } catch (IOException e) {
      org.eclipse.jem.util.logger.proxy.Logger.getLogger().logWarning(J2EEPluginResourceHandler.getString("Install_Location_Error_", new Object[]{url}) + e); //$NON-NLS-1$
    }
  }
  return location;
}

代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee

public static IPath getInstallLocation() {
  if (location == null) {
    URL url = getInstallURL();
    try {
      String installLocation = ((PlatformURLConnection) url.openConnection()).getURLAsLocal().getFile();
      location = new Path(installLocation);
    } catch (IOException e) {
      org.eclipse.jem.util.logger.proxy.Logger.getLogger().logWarning(J2EEPluginResourceHandler.getString("Install_Location_Error_", new Object[]{url}) + e); //$NON-NLS-1$
    }
  }
  return location;
}

代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee

/**
 * This gets a .gif from the icons folder.
 */
public static URL getImageURL(String key, Bundle bundle) {
  String gif = "/" + key + ".gif"; //$NON-NLS-1$ //$NON-NLS-2$
  IPath path = null;
  for (int i = 0; i < ICON_DIRS.length; i++) {
    path = new Path(ICON_DIRS[i]).append(gif);
    if (Platform.find(bundle,path) == null)
      continue;
    try {
      return new URL( bundle.getEntry("/"), path.toString()); //$NON-NLS-1$ 
    } catch (MalformedURLException exception) {
      org.eclipse.jem.util.logger.proxy.Logger.getLogger().logWarning(J2EEPluginResourceHandler.getString("Load_Image_Error_", new Object[]{key})); //$NON-NLS-1$
      exception.printStackTrace();
      continue;
    }
  }
  return null;
}

代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee

/**
 * @param pluginId
 * @return
 */
protected boolean hasOutputDirectory(String pluginId) {
  Bundle bundle = Platform.getBundle(pluginId);
  URL outputDirectory = Platform.find(bundle,new Path("bin")); //$NON-NLS-1$
  if (outputDirectory == null)
    return false;
  URL installLocation = null;
  try {
    installLocation = Platform.asLocalURL(outputDirectory);
  } catch (IOException e) {
    Logger.getLogger().logWarning(J2EEPluginResourceHandler.getString("Install_Location_Error_", new Object[]{installLocation}) + e); //$NON-NLS-1$
  }
  File outputDirectoryFile = new File(installLocation.getPath());// new File(location);
  return outputDirectoryFile.canRead() && outputDirectoryFile.isDirectory() && outputDirectoryFile.listFiles().length > 0;
}

代码示例来源:origin: org.eclipse/org.eclipse.wst.common.emfworkbench.integration

private void addEditModelResource(EditModelResource res) {
  boolean enabled = false;
  try {
    if (res.isCore()) {
      enabled = true;
    } else {
      IEnablementIdentifier identifier = res.getEnablementIdentifier(getProject());
      registerInterest(identifier, res);
      enabled = identifier.isEnabled();
    }
  } catch (RuntimeException re) {
    Logger.getLogger().logWarning(re);
  }
  if (enabled) {
    URI uri = res.getURI();
    knownResourceUris.add(uri);
    if (res.isAutoLoad()) {
      ResourceSetWorkbenchEditSynchronizer sync = (ResourceSetWorkbenchEditSynchronizer) getEmfContext().getResourceSet().getSynchronizer();
      sync.enableAutoload(uri);
      preloadResourceUris.add(uri);
    }
  }
}

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

/**
 * Return a boolean indicating whether reflection had occurred.
 */
public synchronized boolean reflectValuesIfNecessary() {
  if (!hasReflected && !isReflecting) {
    try {
      isReflecting = true;
      EObject etarget = (EObject)getTarget();
      if (!etarget.eIsProxy() && etarget.eResource() != null && etarget.eResource().getResourceSet() != null)
        hasReflected = reflectValues();
      else
        hasReflected = false;	// AS long we are a proxy or is not in a valid resource or set, we won't reflect.
    } catch (Exception e) {
      hasReflected = false;
      Logger logger = Logger.getLogger();
      if (logger.isLoggingLevel(Level.WARNING)) {
        logger.log(ResourceHandler.getString("Failed_reflecting_values_ERROR_"), Level.WARNING); //$NON-NLS-1$ = "Failed reflecting values!!!"
        logger.logWarning(e);
      }
    } finally {
      isReflecting = false;
      getTarget().eNotify(new ENotificationImpl((InternalEObject)getTarget(), EVENT, REFLECTION_EVENT, null, null, Notification.NO_INDEX));
    }
  }
  return hasReflected;
}
public static ReflectionAdaptor retrieveAdaptorFrom(EObject object) {

代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee

Logger.getLogger().logWarning(EARArchiveOpsResourceHandler.bind(EARArchiveOpsResourceHandler.MISSING_CLIENT_JAR, new Object[] {clientJarName, ejbWrapper.getName(), archive.getPath()}));

相关文章