本文整理汇总了Java中org.eclipse.ui.internal.ide.IDEWorkbenchPlugin.log方法的典型用法代码示例。如果您正苦于以下问题:Java IDEWorkbenchPlugin.log方法的具体用法?Java IDEWorkbenchPlugin.log怎么用?Java IDEWorkbenchPlugin.log使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.ui.internal.ide.IDEWorkbenchPlugin
的用法示例。
在下文中一共展示了IDEWorkbenchPlugin.log方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updatePinActionToolbar
import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin; //导入方法依赖的package包/类
/**
* Update the pin action's tool bar
*/
void updatePinActionToolbar() {
ICoolBarManager coolBarManager = getActionBarConfigurer()
.getCoolBarManager();
IContributionItem cbItem = coolBarManager
.find(IWorkbenchActionConstants.TOOLBAR_NAVIGATE);
if (!(cbItem instanceof IToolBarContributionItem)) {
// This should not happen
IDEWorkbenchPlugin
.log("Navigation toolbar contribution item is missing"); //$NON-NLS-1$
return;
}
IToolBarContributionItem toolBarItem = (IToolBarContributionItem) cbItem;
IToolBarManager toolBarManager = toolBarItem.getToolBarManager();
if (toolBarManager == null) {
// error if this happens, navigation toolbar assumed to always exist
IDEWorkbenchPlugin.log("Navigate toolbar is missing"); //$NON-NLS-1$
return;
}
toolBarManager.update(false);
toolBarItem.update(ICoolBarManager.SIZE);
}
示例2: activateProxyService
import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin; //导入方法依赖的package包/类
/**
* Activate the proxy service by obtaining it.
*/
@SuppressWarnings(
{"rawtypes", "unchecked"})
private void activateProxyService()
{
Bundle bundle = Platform.getBundle("org.eclipse.ui.ide"); //$NON-NLS-1$
Object proxyService = null;
if (bundle != null)
{
ServiceReference ref =
bundle.getBundleContext().getServiceReference(
IProxyService.class.getName());
if (ref != null)
{
proxyService = bundle.getBundleContext().getService(ref);
}
}
if (proxyService == null)
{
IDEWorkbenchPlugin.log("Proxy service could not be found."); //$NON-NLS-1$
}
}
示例3: updatePinActionToolbar
import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin; //导入方法依赖的package包/类
/**
* Update the pin action's tool bar
*/
void updatePinActionToolbar()
{
ICoolBarManager coolBarManager =
getActionBarConfigurer().getCoolBarManager();
IContributionItem cbItem =
coolBarManager.find(IWorkbenchActionConstants.TOOLBAR_NAVIGATE);
if (!(cbItem instanceof IToolBarContributionItem))
{
// This should not happen
IDEWorkbenchPlugin.log("Navigation toolbar contribution item is missing"); //$NON-NLS-1$
return;
}
IToolBarContributionItem toolBarItem = (IToolBarContributionItem) cbItem;
IToolBarManager toolBarManager = toolBarItem.getToolBarManager();
if (toolBarManager == null)
{
// error if this happens, navigation toolbar assumed to always exist
IDEWorkbenchPlugin.log("Navigate toolbar is missing"); //$NON-NLS-1$
return;
}
toolBarManager.update(false);
toolBarItem.update(ICoolBarManager.SIZE);
}
示例4: buildFileStores
import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin; //导入方法依赖的package包/类
/**
* Build the collection of fileStores that map to fileNames. If any of them
* cannot be found then match then return <code>null</code>.
*
* @param uris
* @return IFileStore[]
*/
private IFileStore[] buildFileStores(URI[] uris) {
IFileStore[] stores = new IFileStore[uris.length];
for (int i = 0; i < uris.length; i++) {
IFileStore store;
try {
store = EFS.getStore(uris[i]);
} catch (CoreException e) {
IDEWorkbenchPlugin.log(e.getMessage(), e);
reportFileInfoNotFound(uris[i].toString());
return null;
}
if (store == null) {
reportFileInfoNotFound(uris[i].toString());
return null;
}
stores[i] = store;
}
return stores;
}
示例5: readWorkspaceVersion
import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin; //导入方法依赖的package包/类
/**
* Look at the argument URL for the workspace's version information. Return
* that version if found and null otherwise.
*/
private static String readWorkspaceVersion(URL workspace) {
File versionFile = getVersionFile(workspace, false);
if (versionFile == null || !versionFile.exists()) {
return null;
}
try {
// Although the version file is not spec'ed to be a Java properties
// file, it happens to follow the same format currently, so using
// Properties to read it is convenient.
Properties props = new Properties();
FileInputStream is = new FileInputStream(versionFile);
try {
props.load(is);
} finally {
is.close();
}
return props.getProperty(WORKSPACE_VERSION_KEY);
} catch (IOException e) {
IDEWorkbenchPlugin.log("Could not read version file", new Status( //$NON-NLS-1$
IStatus.ERROR, IDEWorkbenchPlugin.IDE_WORKBENCH,
IStatus.ERROR,
e.getMessage() == null ? "" : e.getMessage(), //$NON-NLS-1$,
e));
return null;
}
}
示例6: getContents
import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin; //导入方法依赖的package包/类
@Override
public InputStream getContents(Object element) {
try {
return new FileInputStream((File) element);
} catch (FileNotFoundException e) {
IDEWorkbenchPlugin.log(e.getLocalizedMessage(), e);
}
return null;
}
示例7: readWorkspaceVersion
import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin; //导入方法依赖的package包/类
/**
* Look at the argument URL for the workspace's version information. Return that version if found
* and null otherwise.
*/
private static String readWorkspaceVersion(URL workspace)
{
File versionFile = getVersionFile(workspace, false);
if (versionFile == null || !versionFile.exists())
{
return null;
}
try
{
// Although the version file is not spec'ed to be a Java properties
// file, it happens to follow the same format currently, so using
// Properties to read it is convenient.
Properties props = new Properties();
FileInputStream is = new FileInputStream(versionFile);
try
{
props.load(is);
}
finally
{
is.close();
}
return props.getProperty(WORKSPACE_VERSION_KEY);
}
catch (IOException e)
{
IDEWorkbenchPlugin.log(
"Could not read version file", new Status(//$NON-NLS-1$
IStatus.ERROR, IDEWorkbenchPlugin.IDE_WORKBENCH, IStatus.ERROR, e
.getMessage() == null ? "" : e.getMessage(), //$NON-NLS-1$,
e));
return null;
}
}
示例8: validateImportDestinationInternal
import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin; //导入方法依赖的package包/类
/**
* Checks whether the destination is valid for copying the source file
* stores.
* <p>
* Note this method is for internal use only. It is not API.
* </p>
* <p>
* TODO Bug 117804. This method has been renamed to avoid a bug in the
* Eclipse compiler with regards to visibility and type resolution when
* linking.
* </p>
*
* @param destination
* the destination container
* @param sourceStores
* the source IFileStore
* @return an error message, or <code>null</code> if the path is valid
*/
private String validateImportDestinationInternal(IContainer destination, IFileStore[] sourceStores) {
if (!isAccessible(destination)) {
return IDEWorkbenchMessages.CopyFilesAndFoldersOperation_destinationAccessError;
}
IFileStore destinationStore;
try {
destinationStore = EFS.getStore(destination.getLocationURI());
} catch (CoreException exception) {
IDEWorkbenchPlugin.log(exception.getLocalizedMessage(), exception);
return NLS.bind(IDEWorkbenchMessages.CopyFilesAndFoldersOperation_internalError,
exception.getLocalizedMessage());
}
for (int i = 0; i < sourceStores.length; i++) {
IFileStore sourceStore = sourceStores[i];
IFileStore sourceParentStore = sourceStore.getParent();
if (sourceStore != null) {
if (destinationStore.equals(sourceStore)
|| (sourceParentStore != null && destinationStore.equals(sourceParentStore))) {
return NLS.bind(IDEWorkbenchMessages.CopyFilesAndFoldersOperation_importSameSourceAndDest,
sourceStore.getName());
}
// work around bug 16202. replacement for
// sourcePath.isPrefixOf(destinationPath)
IFileStore destinationParent = destinationStore.getParent();
if (sourceStore.isParentOf(destinationParent)) {
return IDEWorkbenchMessages.CopyFilesAndFoldersOperation_destinationDescendentError;
}
}
}
return null;
}