diff --git a/bundles/org.eclipse.e4.ui.css.core/src/org/eclipse/e4/ui/css/core/impl/engine/RegistryCSSPropertyHandlerProvider.java b/bundles/org.eclipse.e4.ui.css.core/src/org/eclipse/e4/ui/css/core/impl/engine/RegistryCSSPropertyHandlerProvider.java index c75df7771de..52f07fb641f 100644 --- a/bundles/org.eclipse.e4.ui.css.core/src/org/eclipse/e4/ui/css/core/impl/engine/RegistryCSSPropertyHandlerProvider.java +++ b/bundles/org.eclipse.e4.ui.css.core/src/org/eclipse/e4/ui/css/core/impl/engine/RegistryCSSPropertyHandlerProvider.java @@ -24,14 +24,12 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Set; -import org.eclipse.core.internal.runtime.RuntimeLog; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.IExtension; import org.eclipse.core.runtime.IExtensionPoint; import org.eclipse.core.runtime.IExtensionRegistry; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.ILog; import org.eclipse.e4.ui.css.core.dom.CSSStylableElement; import org.eclipse.e4.ui.css.core.dom.properties.ICSSPropertyHandler; import org.eclipse.e4.ui.css.core.dom.properties.providers.AbstractCSSPropertyHandlerProvider; @@ -232,7 +230,7 @@ public Collection getCSSProperties(Object element) { protected void logError(String message) { // we log as an error to ensure it's shown - RuntimeLog.log(new Status(IStatus.ERROR, "org.eclipse.e4.ui.css.core", message)); + ILog.get().error(message); } private class DeprecatedPropertyHandlerWrapper implements ICSSPropertyHandler { diff --git a/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/WorkbenchSWTActivator.java b/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/WorkbenchSWTActivator.java index 645e39ec38b..3a7f5a5cad2 100644 --- a/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/WorkbenchSWTActivator.java +++ b/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/WorkbenchSWTActivator.java @@ -38,9 +38,9 @@ import java.net.URL; import java.nio.charset.StandardCharsets; import java.util.Hashtable; -import org.eclipse.core.internal.runtime.InternalPlatform; import org.eclipse.core.runtime.FileLocator; import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.Platform; import org.eclipse.jface.dialogs.DialogSettings; import org.eclipse.jface.dialogs.IDialogSettings; import org.eclipse.osgi.service.datalocation.Location; @@ -266,7 +266,7 @@ private IPath getStateLocationOrNull() { // However, using it causes problems in the activation order // So, for now, we get it directly. try { - return InternalPlatform.getDefault().getStateLocation(context.getBundle(), true); + return Platform.getStateLocation(context.getBundle()); } catch (IllegalStateException e) { // This occurs if -data=@none is explicitly specified, so ignore // this silently. diff --git a/tools/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/resourcelocator/dialogs/NonReferencedActionPage.java b/tools/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/resourcelocator/dialogs/NonReferencedActionPage.java index 65d4d5d6e91..f2a56a5f758 100644 --- a/tools/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/resourcelocator/dialogs/NonReferencedActionPage.java +++ b/tools/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/resourcelocator/dialogs/NonReferencedActionPage.java @@ -39,7 +39,6 @@ import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.pde.internal.core.util.CoreUtility; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; @@ -386,7 +385,7 @@ public void copyResourceToProject() { // file).getContributionData().className + ".class"; IPath newPath = IPath.fromOSString(path); if (newPath.isEmpty() == false) { - CoreUtility.createFolder(project.getFolder(newPath)); + NonReferencedResourceDialog.createFolder(project.getFolder(newPath)); } if (className != null) { newPath.append(className + ".class"); //$NON-NLS-1$ diff --git a/tools/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/resourcelocator/dialogs/NonReferencedResourceDialog.java b/tools/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/resourcelocator/dialogs/NonReferencedResourceDialog.java index e57f9c2a885..5e7d060f5ab 100644 --- a/tools/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/resourcelocator/dialogs/NonReferencedResourceDialog.java +++ b/tools/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/resourcelocator/dialogs/NonReferencedResourceDialog.java @@ -23,7 +23,9 @@ import java.util.jar.Manifest; import java.util.zip.ZipFile; +import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; @@ -39,7 +41,6 @@ import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.dialogs.TitleAreaDialog; -import org.eclipse.pde.internal.core.util.CoreUtility; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; @@ -404,6 +405,16 @@ public IFile getResult() { return result; } + public static void createFolder(IFolder folder) throws CoreException { + if (!folder.exists()) { + IContainer parent = folder.getParent(); + if (parent instanceof IFolder) { + createFolder((IFolder) parent); + } + folder.create(true, true, null); + } + } + public void copyResourceToProject(IProject project) { try { final ProjectFolderPickerDialog dlg = new ProjectFolderPickerDialog(getShell(), project, file.getFullPath() @@ -423,7 +434,7 @@ protected Control createContents(Composite parent) { // file).getContributionData().className + ".class"; IPath newPath = IPath.fromOSString(dlg.getValue()); if (newPath.isEmpty() == false) { - CoreUtility.createFolder(project.getFolder(newPath)); + createFolder(project.getFolder(newPath)); } if (className != null) { newPath.append(className + ".class"); //$NON-NLS-1$