本文整理了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
[英]Log an error string.
[中]记录一个错误字符串。
代码示例来源:origin: org.eclipse/org.eclipse.jem.util
public boolean readElement(IConfigurationElement element) {
if (element.getName().equals("factoryClass")) //$NON-NLS-1$
try {
factoryHolder[0] = (EMFWorkbenchContextFactory)element.createExecutableExtension("name"); //$NON-NLS-1$
return true;
} catch (CoreException e) {
Logger.getLogger().logError(e);
}
return false;
}
};
代码示例来源:origin: org.eclipse/org.eclipse.wst.common.emfworkbench.integration
public AdapterFactory createInstance() {
if (element == null)
return null;
AdapterFactory factory = null;
try {
factory = (AdapterFactory) element.createExecutableExtension(AdapterFactoryRegistry.CLASS_NAME);
} catch (CoreException e) {
JEMUtilPlugin.getLogger().logError(e);
factory = null;
}
return factory;
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.common.frameworks.ui
private void validateSettings() {
if (wizardID == null || wizardPageFactoryElement == null) {
Logger.getLogger().logError("Incomplete page extension specification."); //$NON-NLS-1$
}
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.core
protected void primHandleException(String aMessage, Throwable anException)
{
org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(anException);
throw new RuntimeException(aMessage);
}
/**
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.core
protected IRoleShapeStrategy getDefaultRoleShapeStrategy() {
try {
return (IRoleShapeStrategy) getRoleStrategyConstructor(this).newInstance(new Object[] { this });
} catch (Throwable t) {
Logger.getLogger().logError("EJBRelationshipRoleImpl:Could not instantiate role shape strategy; this requires extensions"); //$NON-NLS-1$
Logger.getLogger().logError(t);
return null;
}
}
代码示例来源:origin: org.eclipse/org.eclipse.jem.util
/**
* @param natureId
*/
private void registerNatureID(String natureId) {
if (!REGISTERED_NATURE_IDS.contains(natureId))
REGISTERED_NATURE_IDS.add(natureId);
else
Logger.getLogger().logError(EMFWorkbenchResourceHandler.getString("EMFNatureRegistry_ERROR_0", new Object[] {natureId})); //$NON-NLS-1$
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.common.frameworks.ui
public IExtensibleViewFactory createFactoryInstance() {
IExtensibleViewFactory factoryInstance = null;
try {
factoryInstance = (IExtensibleViewFactory) this.element.createExecutableExtension(getFactoryClass());
} catch (CoreException e) {
WTPUIPlugin.getLogger().logError(e);
}
return factoryInstance;
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.common.frameworks
public static void logError(IConfigurationElement element, String text) {
IExtension extension = element.getDeclaringExtension();
StringBuffer buf = new StringBuffer();
buf.append("Plugin " + extension.getNamespace() + ", extension " + extension.getExtensionPointUniqueIdentifier()); //$NON-NLS-1$ //$NON-NLS-2$
buf.append("\n" + text); //$NON-NLS-1$
Logger.getLogger().logError(buf.toString());
}
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee
/**
* @param existingClasspathEntries
*/
public static void removeNonSeverTargetClasspathEntries(IProject project, List existingClasspathEntries) {
try {
JemProjectUtilities.removeFromJavaClassPath(project, existingClasspathEntries);
} catch (JavaModelException jme) {
Logger.getLogger().logError(jme);
}
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.common.emfworkbench.integration
private void init() {
id = element.getAttribute(ID_ATTR);
if (id == null) {
Logger.getLogger().logError("Incorrect usage of editModelExtension extension point. Element must contain id attribute. Plugin: " + getPluginId()); //$NON-NLS-1$
return;
}
editModelID = element.getAttribute(EditModelExtensionRegistry.EDIT_MODEL_ID_ATTR);
resources = new ArrayList();
IConfigurationElement[] editModelResources = element.getChildren(EditModelResource.EDIT_MODEL_RESOURCE_ELEMENT);
for (int j = 0; j < editModelResources.length; j++)
resources.add(new EditModelResource(editModelResources[j], id));
}
代码示例来源:origin: org.eclipse/org.eclipse.jem.util
protected void logError(IConfigurationElement element, String text) {
IExtension extension = element.getDeclaringExtension();
StringBuffer buf = new StringBuffer();
buf.append("Plugin " + extension.getContributor().getName() + ", extension " + extension.getExtensionPointUniqueIdentifier()); //$NON-NLS-1$ //$NON-NLS-2$
buf.append("\n" + text); //$NON-NLS-1$
Logger.getLogger().logError(buf.toString());
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.common.frameworks
/**
* shouldContinueAndMakeFileEditable method comment.
*/
public boolean shouldContinueAndMakeFileEditable(org.eclipse.core.resources.IFile aFile) {
if (aFile == null)
return false;
String error = WTPResourceHandler.getString("Unable_to_save_read-only_f_ERROR_", new Object[]{aFile.getFullPath()}); //$NON-NLS-1$ = "Unable to save read-only file: "
Logger.getLogger().logError(error);
return false;
}
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.core
protected Archive openNestedArchive(String uri) {
try {
return ((Archive) getContainer()).openNestedArchive(uri);
} catch (OpenFailureException e) {
//Caught an exception trying to open the nested archive
Logger.getLogger().logError(e);
return null;
}
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee
protected void handleManifestException(IOException ex, Archive anArchive) throws ValidationException {
Logger.getLogger().logError(ex);
String tmp = NLS.bind(EARValidationMessageResourceHandler.ERROR_READING_MANIFEST_ERROR_, new String[]{anArchive.getURI()});
IMessage message = new LocalizedMessage(IMessage.HIGH_SEVERITY, tmp);
throw new ValidationException(message, ex);
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee
public void close() {
try {
if (commonArchive != null) {
commonArchive.close();
}
if (archive != null) {
JavaEEArchiveUtilities.INSTANCE.closeArchive(archive);
}
} catch (RuntimeException e) {
Logger.getLogger().logError(e);
throw e;
}
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.core
protected Archive openNestedArchive(LooseArchive loose) {
try {
return ((Archive) getContainer()).openNestedArchive(loose);
} catch (OpenFailureException e) {
//Caught an exception trying to open the nested archive
Logger.getLogger().logError(e);
return null;
}
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.ui
protected IStatus run(IProgressMonitor monitor) {
IStatus result = null;
J2EEDeployOperation op = new J2EEDeployOperation(deploySelection.toArray());
try {
result = op.execute(monitor, null);
} catch (Exception e) {
result = new Status(IStatus.ERROR, WTPCommonPlugin.PLUGIN_ID, IStatus.ERROR, WTPResourceHandler.getString("27"), e); //$NON-NLS-1$
Logger.getLogger().logError(e);
} finally {
}
return result;
}
};
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee
protected void createImportedClassesFolder() {
importedClassesFolderCreated = true;
IContainer jarParent = vComponent.getRootFolder().getUnderlyingFolder().getParent();
importedClassesFolder = jarParent.getFolder(new Path(IMPORTED_CLASSES));
try {
importedClassesFolder.create(true, true, null);
} catch (CoreException e1) {
Logger.getLogger().logError(e1);
}
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee
protected void createImportedClassesFolder() {
importedClassesFolderCreated = true;
IContainer jarParent = vComponent.getRootFolder().getUnderlyingFolder().getParent();
importedClassesFolder = jarParent.getFolder(new Path(IMPORTED_CLASSES));
try {
importedClassesFolder.create(true, true, null);
} catch (CoreException e1) {
Logger.getLogger().logError(e1);
}
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee
public IClasspathContainer getWebAppLibrariesContainer(IProject webProject, boolean create) {
IJavaProject jproj = JavaCore.create(webProject);
IClasspathContainer container = null;
IClasspathEntry entry = create ? null : getExistingContainer(jproj, WEB_APP_LIBS_PATH);
if (entry != null || create) {
try {
container = JavaCore.getClasspathContainer(WEB_APP_LIBS_PATH, jproj);
} catch (JavaModelException e) {
J2EEPlugin.getDefault().getLogger().logError(e);
}
}
return container;
}
内容来源于网络,如有侵权,请联系作者删除!