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

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

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

Logger.logError介绍

[英]Log an error string.
[中]记录一个错误字符串。

代码示例

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

  1. public boolean readElement(IConfigurationElement element) {
  2. if (element.getName().equals("factoryClass")) //$NON-NLS-1$
  3. try {
  4. factoryHolder[0] = (EMFWorkbenchContextFactory)element.createExecutableExtension("name"); //$NON-NLS-1$
  5. return true;
  6. } catch (CoreException e) {
  7. Logger.getLogger().logError(e);
  8. }
  9. return false;
  10. }
  11. };

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

  1. public AdapterFactory createInstance() {
  2. if (element == null)
  3. return null;
  4. AdapterFactory factory = null;
  5. try {
  6. factory = (AdapterFactory) element.createExecutableExtension(AdapterFactoryRegistry.CLASS_NAME);
  7. } catch (CoreException e) {
  8. JEMUtilPlugin.getLogger().logError(e);
  9. factory = null;
  10. }
  11. return factory;
  12. }

代码示例来源:origin: org.eclipse/org.eclipse.wst.common.frameworks.ui

  1. private void validateSettings() {
  2. if (wizardID == null || wizardPageFactoryElement == null) {
  3. Logger.getLogger().logError("Incomplete page extension specification."); //$NON-NLS-1$
  4. }
  5. }

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

  1. protected void primHandleException(String aMessage, Throwable anException)
  2. {
  3. org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(anException);
  4. throw new RuntimeException(aMessage);
  5. }
  6. /**

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

  1. protected IRoleShapeStrategy getDefaultRoleShapeStrategy() {
  2. try {
  3. return (IRoleShapeStrategy) getRoleStrategyConstructor(this).newInstance(new Object[] { this });
  4. } catch (Throwable t) {
  5. Logger.getLogger().logError("EJBRelationshipRoleImpl:Could not instantiate role shape strategy; this requires extensions"); //$NON-NLS-1$
  6. Logger.getLogger().logError(t);
  7. return null;
  8. }
  9. }

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

  1. /**
  2. * @param natureId
  3. */
  4. private void registerNatureID(String natureId) {
  5. if (!REGISTERED_NATURE_IDS.contains(natureId))
  6. REGISTERED_NATURE_IDS.add(natureId);
  7. else
  8. Logger.getLogger().logError(EMFWorkbenchResourceHandler.getString("EMFNatureRegistry_ERROR_0", new Object[] {natureId})); //$NON-NLS-1$
  9. }

代码示例来源:origin: org.eclipse/org.eclipse.wst.common.frameworks.ui

  1. public IExtensibleViewFactory createFactoryInstance() {
  2. IExtensibleViewFactory factoryInstance = null;
  3. try {
  4. factoryInstance = (IExtensibleViewFactory) this.element.createExecutableExtension(getFactoryClass());
  5. } catch (CoreException e) {
  6. WTPUIPlugin.getLogger().logError(e);
  7. }
  8. return factoryInstance;
  9. }

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

  1. public static void logError(IConfigurationElement element, String text) {
  2. IExtension extension = element.getDeclaringExtension();
  3. StringBuffer buf = new StringBuffer();
  4. buf.append("Plugin " + extension.getNamespace() + ", extension " + extension.getExtensionPointUniqueIdentifier()); //$NON-NLS-1$ //$NON-NLS-2$
  5. buf.append("\n" + text); //$NON-NLS-1$
  6. Logger.getLogger().logError(buf.toString());
  7. }
  8. }

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

  1. /**
  2. * @param existingClasspathEntries
  3. */
  4. public static void removeNonSeverTargetClasspathEntries(IProject project, List existingClasspathEntries) {
  5. try {
  6. JemProjectUtilities.removeFromJavaClassPath(project, existingClasspathEntries);
  7. } catch (JavaModelException jme) {
  8. Logger.getLogger().logError(jme);
  9. }
  10. }

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

  1. private void init() {
  2. id = element.getAttribute(ID_ATTR);
  3. if (id == null) {
  4. Logger.getLogger().logError("Incorrect usage of editModelExtension extension point. Element must contain id attribute. Plugin: " + getPluginId()); //$NON-NLS-1$
  5. return;
  6. }
  7. editModelID = element.getAttribute(EditModelExtensionRegistry.EDIT_MODEL_ID_ATTR);
  8. resources = new ArrayList();
  9. IConfigurationElement[] editModelResources = element.getChildren(EditModelResource.EDIT_MODEL_RESOURCE_ELEMENT);
  10. for (int j = 0; j < editModelResources.length; j++)
  11. resources.add(new EditModelResource(editModelResources[j], id));
  12. }

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

  1. protected void logError(IConfigurationElement element, String text) {
  2. IExtension extension = element.getDeclaringExtension();
  3. StringBuffer buf = new StringBuffer();
  4. buf.append("Plugin " + extension.getContributor().getName() + ", extension " + extension.getExtensionPointUniqueIdentifier()); //$NON-NLS-1$ //$NON-NLS-2$
  5. buf.append("\n" + text); //$NON-NLS-1$
  6. Logger.getLogger().logError(buf.toString());
  7. }

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

  1. /**
  2. * shouldContinueAndMakeFileEditable method comment.
  3. */
  4. public boolean shouldContinueAndMakeFileEditable(org.eclipse.core.resources.IFile aFile) {
  5. if (aFile == null)
  6. return false;
  7. String error = WTPResourceHandler.getString("Unable_to_save_read-only_f_ERROR_", new Object[]{aFile.getFullPath()}); //$NON-NLS-1$ = "Unable to save read-only file: "
  8. Logger.getLogger().logError(error);
  9. return false;
  10. }
  11. }

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

  1. protected Archive openNestedArchive(String uri) {
  2. try {
  3. return ((Archive) getContainer()).openNestedArchive(uri);
  4. } catch (OpenFailureException e) {
  5. //Caught an exception trying to open the nested archive
  6. Logger.getLogger().logError(e);
  7. return null;
  8. }
  9. }

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

  1. protected void handleManifestException(IOException ex, Archive anArchive) throws ValidationException {
  2. Logger.getLogger().logError(ex);
  3. String tmp = NLS.bind(EARValidationMessageResourceHandler.ERROR_READING_MANIFEST_ERROR_, new String[]{anArchive.getURI()});
  4. IMessage message = new LocalizedMessage(IMessage.HIGH_SEVERITY, tmp);
  5. throw new ValidationException(message, ex);
  6. }

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

  1. public void close() {
  2. try {
  3. if (commonArchive != null) {
  4. commonArchive.close();
  5. }
  6. if (archive != null) {
  7. JavaEEArchiveUtilities.INSTANCE.closeArchive(archive);
  8. }
  9. } catch (RuntimeException e) {
  10. Logger.getLogger().logError(e);
  11. throw e;
  12. }
  13. }

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

  1. protected Archive openNestedArchive(LooseArchive loose) {
  2. try {
  3. return ((Archive) getContainer()).openNestedArchive(loose);
  4. } catch (OpenFailureException e) {
  5. //Caught an exception trying to open the nested archive
  6. Logger.getLogger().logError(e);
  7. return null;
  8. }
  9. }

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

  1. protected IStatus run(IProgressMonitor monitor) {
  2. IStatus result = null;
  3. J2EEDeployOperation op = new J2EEDeployOperation(deploySelection.toArray());
  4. try {
  5. result = op.execute(monitor, null);
  6. } catch (Exception e) {
  7. result = new Status(IStatus.ERROR, WTPCommonPlugin.PLUGIN_ID, IStatus.ERROR, WTPResourceHandler.getString("27"), e); //$NON-NLS-1$
  8. Logger.getLogger().logError(e);
  9. } finally {
  10. }
  11. return result;
  12. }
  13. };

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

  1. protected void createImportedClassesFolder() {
  2. importedClassesFolderCreated = true;
  3. IContainer jarParent = vComponent.getRootFolder().getUnderlyingFolder().getParent();
  4. importedClassesFolder = jarParent.getFolder(new Path(IMPORTED_CLASSES));
  5. try {
  6. importedClassesFolder.create(true, true, null);
  7. } catch (CoreException e1) {
  8. Logger.getLogger().logError(e1);
  9. }
  10. }

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

  1. protected void createImportedClassesFolder() {
  2. importedClassesFolderCreated = true;
  3. IContainer jarParent = vComponent.getRootFolder().getUnderlyingFolder().getParent();
  4. importedClassesFolder = jarParent.getFolder(new Path(IMPORTED_CLASSES));
  5. try {
  6. importedClassesFolder.create(true, true, null);
  7. } catch (CoreException e1) {
  8. Logger.getLogger().logError(e1);
  9. }
  10. }

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

  1. public IClasspathContainer getWebAppLibrariesContainer(IProject webProject, boolean create) {
  2. IJavaProject jproj = JavaCore.create(webProject);
  3. IClasspathContainer container = null;
  4. IClasspathEntry entry = create ? null : getExistingContainer(jproj, WEB_APP_LIBS_PATH);
  5. if (entry != null || create) {
  6. try {
  7. container = JavaCore.getClasspathContainer(WEB_APP_LIBS_PATH, jproj);
  8. } catch (JavaModelException e) {
  9. J2EEPlugin.getDefault().getLogger().logError(e);
  10. }
  11. }
  12. return container;
  13. }

相关文章