From 3394c50e06b0a42cd0a19383f45a8208917af4b2 Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Mon, 27 Sep 2021 17:00:29 +0200 Subject: [PATCH] SLE-470 Restore backward compatibility with Eclipse < 2018-09 --- README.md | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../internal/utils/CompatibilityUtils.java | 5 + .../JavaProjectConfiguratorExtension.java | 4 +- .../eclipse/jdt/internal/JdtUtils.java | 94 ++-------------- .../internal/MarkerResolverJdtAdapter.java | 101 ++++++++++++++++++ .../MarkerResolverRelevanceJdtAdapter.java | 30 ++++++ .../MarkerResolutionRelevanceAdapter.java | 60 +++++++++++ .../SonarLintMarkerResolutionGenerator.java | 15 ++- .../markers/SortableMarkerResolver.java | 7 +- .../quickfixes/IMarkerResolutionEnhancer.java | 3 +- .../quickfixes/ISonarLintMarkerResolver.java | 28 +++++ 12 files changed, 251 insertions(+), 100 deletions(-) create mode 100644 org.sonarlint.eclipse.jdt/src/org/sonarlint/eclipse/jdt/internal/MarkerResolverJdtAdapter.java create mode 100644 org.sonarlint.eclipse.jdt/src/org/sonarlint/eclipse/jdt/internal/MarkerResolverRelevanceJdtAdapter.java create mode 100644 org.sonarlint.eclipse.ui/src/org/sonarlint/eclipse/ui/internal/markers/MarkerResolutionRelevanceAdapter.java create mode 100644 org.sonarlint.eclipse.ui/src/org/sonarlint/eclipse/ui/quickfixes/ISonarLintMarkerResolver.java diff --git a/README.md b/README.md index e4d6f9855..360318f78 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ http://stackoverflow.com/questions/36317684/eclipse-jsdt-internal-error-noclassd Adding a dependency ------------------- -Must be osgi bundle. +Must be an osgi bundle. ### For Maven diff --git a/org.sonarlint.eclipse.core/META-INF/MANIFEST.MF b/org.sonarlint.eclipse.core/META-INF/MANIFEST.MF index aa8d44dc6..0896802b4 100644 --- a/org.sonarlint.eclipse.core/META-INF/MANIFEST.MF +++ b/org.sonarlint.eclipse.core/META-INF/MANIFEST.MF @@ -27,7 +27,7 @@ Export-Package: org.sonarlint.eclipse.core, org.sonarlint.eclipse.core.internal.resources;x-friends:="org.sonarlint.eclipse.ui,org.sonarlint.eclipse.core.tests", org.sonarlint.eclipse.core.internal.telemetry;x-friends:="org.sonarlint.eclipse.ui,org.sonarlint.eclipse.core.tests", org.sonarlint.eclipse.core.internal.tracking;x-friends:="org.sonarlint.eclipse.core.tests", - org.sonarlint.eclipse.core.internal.utils;x-friends:="org.sonarlint.eclipse.core.tests,org.sonarlint.eclipse.ui", + org.sonarlint.eclipse.core.internal.utils;x-friends:="org.sonarlint.eclipse.core.tests,org.sonarlint.eclipse.jdt,org.sonarlint.eclipse.ui", org.sonarlint.eclipse.core.listener, org.sonarlint.eclipse.core.resource Require-Bundle: org.eclipse.equinox.security, diff --git a/org.sonarlint.eclipse.core/src/org/sonarlint/eclipse/core/internal/utils/CompatibilityUtils.java b/org.sonarlint.eclipse.core/src/org/sonarlint/eclipse/core/internal/utils/CompatibilityUtils.java index 0ee5fee24..419669234 100644 --- a/org.sonarlint.eclipse.core/src/org/sonarlint/eclipse/core/internal/utils/CompatibilityUtils.java +++ b/org.sonarlint.eclipse.core/src/org/sonarlint/eclipse/core/internal/utils/CompatibilityUtils.java @@ -39,4 +39,9 @@ private static Version platformVersion() { return platform != null ? platform.getVersion() : Version.emptyVersion; } + public static boolean supportMarkerResolutionRelevance() { + Bundle eclipseUiIde = Platform.getBundle("org.eclipse.ui.ide"); + return eclipseUiIde != null && eclipseUiIde.getVersion().compareTo(Version.parseVersion("3.14")) >= 0; + } + } diff --git a/org.sonarlint.eclipse.jdt/src/org/sonarlint/eclipse/jdt/internal/JavaProjectConfiguratorExtension.java b/org.sonarlint.eclipse.jdt/src/org/sonarlint/eclipse/jdt/internal/JavaProjectConfiguratorExtension.java index d5c9d0dd7..897c5e70c 100644 --- a/org.sonarlint.eclipse.jdt/src/org/sonarlint/eclipse/jdt/internal/JavaProjectConfiguratorExtension.java +++ b/org.sonarlint.eclipse.jdt/src/org/sonarlint/eclipse/jdt/internal/JavaProjectConfiguratorExtension.java @@ -25,7 +25,6 @@ import org.eclipse.core.resources.IMarker; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.ui.IMarkerResolution2; import org.sonarlint.eclipse.core.analysis.IAnalysisConfigurator; import org.sonarlint.eclipse.core.analysis.IFileTypeProvider; import org.sonarlint.eclipse.core.analysis.IPreAnalysisContext; @@ -33,6 +32,7 @@ import org.sonarlint.eclipse.core.resource.ISonarLintFileAdapterParticipant; import org.sonarlint.eclipse.core.resource.ISonarLintProject; import org.sonarlint.eclipse.ui.quickfixes.IMarkerResolutionEnhancer; +import org.sonarlint.eclipse.ui.quickfixes.ISonarLintMarkerResolver; import org.sonarsource.sonarlint.core.client.api.common.Language; public class JavaProjectConfiguratorExtension implements IAnalysisConfigurator, ISonarLintFileAdapterParticipant, IFileTypeProvider, IMarkerResolutionEnhancer { @@ -90,7 +90,7 @@ public ISonarLintFileType qualify(ISonarLintFile file) { } @Override - public IMarkerResolution2 enhance(IMarkerResolution2 resolution, IMarker marker) { + public ISonarLintMarkerResolver enhance(ISonarLintMarkerResolver resolution, IMarker marker) { if (jdtPresent) { return JdtUtils.enhance(resolution, marker); } diff --git a/org.sonarlint.eclipse.jdt/src/org/sonarlint/eclipse/jdt/internal/JdtUtils.java b/org.sonarlint.eclipse.jdt/src/org/sonarlint/eclipse/jdt/internal/JdtUtils.java index 9dfb59b67..2a19caae5 100644 --- a/org.sonarlint.eclipse.jdt/src/org/sonarlint/eclipse/jdt/internal/JdtUtils.java +++ b/org.sonarlint.eclipse.jdt/src/org/sonarlint/eclipse/jdt/internal/JdtUtils.java @@ -42,19 +42,13 @@ import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.JavaModelException; -import org.eclipse.jdt.internal.ui.text.correction.IProposalRelevance; -import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal; -import org.eclipse.jface.text.IDocument; -import org.eclipse.jface.text.contentassist.IContextInformation; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Point; -import org.eclipse.ui.IMarkerResolution2; -import org.eclipse.ui.IMarkerResolutionRelevance; import org.osgi.framework.Version; import org.sonarlint.eclipse.core.SonarLintLogger; import org.sonarlint.eclipse.core.analysis.IFileTypeProvider.ISonarLintFileType; import org.sonarlint.eclipse.core.analysis.IPreAnalysisContext; +import org.sonarlint.eclipse.core.internal.utils.CompatibilityUtils; import org.sonarlint.eclipse.core.resource.ISonarLintFile; +import org.sonarlint.eclipse.ui.quickfixes.ISonarLintMarkerResolver; public class JdtUtils { @@ -358,85 +352,11 @@ public static ISonarLintFileType qualify(ISonarLintFile slFile) { return ISonarLintFileType.UNKNOWN; } - public static IMarkerResolution2 enhance(IMarkerResolution2 resolution, IMarker marker) { - return new EnhancedMarkerResolution(resolution, marker); - } - - /** - * Inspired by MarkerResolutionProposal - */ - private static class EnhancedMarkerResolution implements IMarkerResolution2, IMarkerResolutionRelevance, IJavaCompletionProposal { - - private final IMarkerResolution2 wrapped; - private final IMarker marker; - - public EnhancedMarkerResolution(IMarkerResolution2 resolution, IMarker marker) { - this.wrapped = resolution; - this.marker = marker; - } - - @Override - public String getLabel() { - return wrapped.getLabel(); - } - - @Override - public void run(IMarker marker) { - wrapped.run(marker); - } - - @Override - public void apply(IDocument document) { - wrapped.run(marker); - } - - @Nullable - @Override - public Point getSelection(IDocument document) { - return null; - } - - @Override - public String getAdditionalProposalInfo() { - return wrapped.getDescription(); - } - - @Override - public String getDisplayString() { - return getLabel(); - } - - @Nullable - @Override - public IContextInformation getContextInformation() { - return null; - } - - @Override - public int getRelevance() { - if (wrapped instanceof IMarkerResolutionRelevance) { - return ((IMarkerResolutionRelevance) wrapped).getRelevanceForResolution(); - } - return IProposalRelevance.MARKER_RESOLUTION; - } - - @Override - public String getDescription() { - return wrapped.getDescription(); - } - - @Override - public Image getImage() { - return wrapped.getImage(); - } - - @Override - public int getRelevanceForResolution() { - if (wrapped instanceof IMarkerResolutionRelevance) { - return ((IMarkerResolutionRelevance) wrapped).getRelevanceForResolution(); - } - return IMarkerResolutionRelevance.super.getRelevanceForResolution(); + public static ISonarLintMarkerResolver enhance(ISonarLintMarkerResolver resolution, IMarker marker) { + if (CompatibilityUtils.supportMarkerResolutionRelevance()) { + return new MarkerResolverRelevanceJdtAdapter(resolution, marker); + } else { + return new MarkerResolverJdtAdapter(resolution, marker); } - } } diff --git a/org.sonarlint.eclipse.jdt/src/org/sonarlint/eclipse/jdt/internal/MarkerResolverJdtAdapter.java b/org.sonarlint.eclipse.jdt/src/org/sonarlint/eclipse/jdt/internal/MarkerResolverJdtAdapter.java new file mode 100644 index 000000000..9f3f7be99 --- /dev/null +++ b/org.sonarlint.eclipse.jdt/src/org/sonarlint/eclipse/jdt/internal/MarkerResolverJdtAdapter.java @@ -0,0 +1,101 @@ +/* + * SonarLint for Eclipse + * Copyright (C) 2015-2021 SonarSource SA + * sonarlint@sonarsource.com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.sonarlint.eclipse.jdt.internal; + +import org.eclipse.core.resources.IMarker; +import org.eclipse.jdt.annotation.Nullable; +import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.contentassist.IContextInformation; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Point; +import org.sonarlint.eclipse.ui.quickfixes.ISonarLintMarkerResolver; + +/** + * Inspired by MarkerResolutionProposal + */ +class MarkerResolverJdtAdapter implements ISonarLintMarkerResolver, IJavaCompletionProposal { + + private final ISonarLintMarkerResolver wrapped; + private final IMarker marker; + + public MarkerResolverJdtAdapter(ISonarLintMarkerResolver resolution, IMarker marker) { + this.wrapped = resolution; + this.marker = marker; + } + + @Override + public String getLabel() { + return wrapped.getLabel(); + } + + @Override + public void run(IMarker marker) { + wrapped.run(marker); + } + + @Override + public void apply(IDocument document) { + wrapped.run(marker); + } + + @Nullable + @Override + public Point getSelection(IDocument document) { + return null; + } + + @Override + public String getAdditionalProposalInfo() { + return wrapped.getDescription(); + } + + @Override + public String getDisplayString() { + return getLabel(); + } + + @Nullable + @Override + public IContextInformation getContextInformation() { + return null; + } + + @Override + public int getRelevance() { + return wrapped.getRelevanceForResolution(); + } + + @Override + public String getDescription() { + return wrapped.getDescription(); + } + + @Override + public Image getImage() { + return wrapped.getImage(); + } + + @Override + public int getRelevanceForResolution() { + return wrapped.getRelevanceForResolution(); + } + +} diff --git a/org.sonarlint.eclipse.jdt/src/org/sonarlint/eclipse/jdt/internal/MarkerResolverRelevanceJdtAdapter.java b/org.sonarlint.eclipse.jdt/src/org/sonarlint/eclipse/jdt/internal/MarkerResolverRelevanceJdtAdapter.java new file mode 100644 index 000000000..836701f8c --- /dev/null +++ b/org.sonarlint.eclipse.jdt/src/org/sonarlint/eclipse/jdt/internal/MarkerResolverRelevanceJdtAdapter.java @@ -0,0 +1,30 @@ +/* + * SonarLint for Eclipse + * Copyright (C) 2015-2021 SonarSource SA + * sonarlint@sonarsource.com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.sonarlint.eclipse.jdt.internal; + +import org.eclipse.core.resources.IMarker; +import org.eclipse.ui.IMarkerResolutionRelevance; +import org.sonarlint.eclipse.ui.quickfixes.ISonarLintMarkerResolver; + +class MarkerResolverRelevanceJdtAdapter extends MarkerResolverJdtAdapter implements IMarkerResolutionRelevance { + public MarkerResolverRelevanceJdtAdapter(ISonarLintMarkerResolver resolution, IMarker marker) { + super(resolution, marker); + } +} diff --git a/org.sonarlint.eclipse.ui/src/org/sonarlint/eclipse/ui/internal/markers/MarkerResolutionRelevanceAdapter.java b/org.sonarlint.eclipse.ui/src/org/sonarlint/eclipse/ui/internal/markers/MarkerResolutionRelevanceAdapter.java new file mode 100644 index 000000000..2141d67f6 --- /dev/null +++ b/org.sonarlint.eclipse.ui/src/org/sonarlint/eclipse/ui/internal/markers/MarkerResolutionRelevanceAdapter.java @@ -0,0 +1,60 @@ +/* + * SonarLint for Eclipse + * Copyright (C) 2015-2021 SonarSource SA + * sonarlint@sonarsource.com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.sonarlint.eclipse.ui.internal.markers; + +import org.eclipse.core.resources.IMarker; +import org.eclipse.swt.graphics.Image; +import org.eclipse.ui.IMarkerResolutionRelevance; +import org.sonarlint.eclipse.ui.quickfixes.ISonarLintMarkerResolver; + +public class MarkerResolutionRelevanceAdapter implements ISonarLintMarkerResolver, IMarkerResolutionRelevance { + + private final ISonarLintMarkerResolver wrapped; + + public MarkerResolutionRelevanceAdapter(ISonarLintMarkerResolver wrapped) { + this.wrapped = wrapped; + } + + @Override + public String getLabel() { + return wrapped.getLabel(); + } + + @Override + public void run(IMarker marker) { + wrapped.run(marker); + } + + @Override + public String getDescription() { + return wrapped.getDescription(); + } + + @Override + public Image getImage() { + return wrapped.getImage(); + } + + @Override + public int getRelevanceForResolution() { + return wrapped.getRelevanceForResolution(); + } + +} diff --git a/org.sonarlint.eclipse.ui/src/org/sonarlint/eclipse/ui/internal/markers/SonarLintMarkerResolutionGenerator.java b/org.sonarlint.eclipse.ui/src/org/sonarlint/eclipse/ui/internal/markers/SonarLintMarkerResolutionGenerator.java index 1faa8eb8c..bd34abeb1 100644 --- a/org.sonarlint.eclipse.ui/src/org/sonarlint/eclipse/ui/internal/markers/SonarLintMarkerResolutionGenerator.java +++ b/org.sonarlint.eclipse.ui/src/org/sonarlint/eclipse/ui/internal/markers/SonarLintMarkerResolutionGenerator.java @@ -25,15 +25,16 @@ import org.eclipse.core.resources.IMarker; import org.eclipse.core.runtime.CoreException; import org.eclipse.ui.IMarkerResolution; -import org.eclipse.ui.IMarkerResolution2; import org.eclipse.ui.IMarkerResolutionGenerator2; import org.sonarlint.eclipse.core.internal.SonarLintCorePlugin; import org.sonarlint.eclipse.core.internal.adapter.Adapters; import org.sonarlint.eclipse.core.internal.markers.MarkerUtils; import org.sonarlint.eclipse.core.internal.quickfixes.MarkerQuickFix; +import org.sonarlint.eclipse.core.internal.utils.CompatibilityUtils; import org.sonarlint.eclipse.core.resource.ISonarLintFile; import org.sonarlint.eclipse.ui.internal.extension.SonarLintUiExtensionTracker; import org.sonarlint.eclipse.ui.quickfixes.IMarkerResolutionEnhancer; +import org.sonarlint.eclipse.ui.quickfixes.ISonarLintMarkerResolver; import static java.util.stream.Collectors.toList; @@ -69,6 +70,7 @@ public IMarkerResolution[] getResolutions(final IMarker marker) { } return resolutions.stream() + .map(SonarLintMarkerResolutionGenerator::enhanceWithResolutionRelevance) .map(r -> enhance(r, marker)) .collect(Collectors.toList()) .toArray(new IMarkerResolution[resolutions.size()]); @@ -82,14 +84,21 @@ private static List getQuickFixesResolutions(IMarker mar .collect(toList()); } - private static IMarkerResolution2 enhance(IMarkerResolution2 target, IMarker marker) { - IMarkerResolution2 enhanced = target; + private static ISonarLintMarkerResolver enhance(ISonarLintMarkerResolver target, IMarker marker) { + ISonarLintMarkerResolver enhanced = target; for (IMarkerResolutionEnhancer markerResolutionEnhancer : SonarLintUiExtensionTracker.getInstance().getMarkerResolutionEnhancers()) { enhanced = markerResolutionEnhancer.enhance(enhanced, marker); } return enhanced; } + private static ISonarLintMarkerResolver enhanceWithResolutionRelevance(ISonarLintMarkerResolver target) { + if (CompatibilityUtils.supportMarkerResolutionRelevance()) { + return new MarkerResolutionRelevanceAdapter(target); + } + return target; + } + private static boolean isSonarLintIssueMarker(IMarker marker) { try { return MarkerUtils.SONARLINT_PRIMARY_MARKER_IDS.contains(marker.getType()); diff --git a/org.sonarlint.eclipse.ui/src/org/sonarlint/eclipse/ui/internal/markers/SortableMarkerResolver.java b/org.sonarlint.eclipse.ui/src/org/sonarlint/eclipse/ui/internal/markers/SortableMarkerResolver.java index 9f031e90b..235417d14 100644 --- a/org.sonarlint.eclipse.ui/src/org/sonarlint/eclipse/ui/internal/markers/SortableMarkerResolver.java +++ b/org.sonarlint.eclipse.ui/src/org/sonarlint/eclipse/ui/internal/markers/SortableMarkerResolver.java @@ -19,11 +19,10 @@ */ package org.sonarlint.eclipse.ui.internal.markers; -import org.eclipse.ui.IMarkerResolution2; -import org.eclipse.ui.IMarkerResolutionRelevance; +import org.sonarlint.eclipse.ui.quickfixes.ISonarLintMarkerResolver; -public abstract class SortableMarkerResolver implements IMarkerResolution2, IMarkerResolutionRelevance { - private int relevance; +public abstract class SortableMarkerResolver implements ISonarLintMarkerResolver { + private final int relevance; protected SortableMarkerResolver(int relevance) { this.relevance = relevance; diff --git a/org.sonarlint.eclipse.ui/src/org/sonarlint/eclipse/ui/quickfixes/IMarkerResolutionEnhancer.java b/org.sonarlint.eclipse.ui/src/org/sonarlint/eclipse/ui/quickfixes/IMarkerResolutionEnhancer.java index 70ac1faa2..e461f0b2c 100644 --- a/org.sonarlint.eclipse.ui/src/org/sonarlint/eclipse/ui/quickfixes/IMarkerResolutionEnhancer.java +++ b/org.sonarlint.eclipse.ui/src/org/sonarlint/eclipse/ui/quickfixes/IMarkerResolutionEnhancer.java @@ -20,10 +20,9 @@ package org.sonarlint.eclipse.ui.quickfixes; import org.eclipse.core.resources.IMarker; -import org.eclipse.ui.IMarkerResolution2; public interface IMarkerResolutionEnhancer { - IMarkerResolution2 enhance(IMarkerResolution2 resolution, IMarker marker); + ISonarLintMarkerResolver enhance(ISonarLintMarkerResolver resolution, IMarker marker); } diff --git a/org.sonarlint.eclipse.ui/src/org/sonarlint/eclipse/ui/quickfixes/ISonarLintMarkerResolver.java b/org.sonarlint.eclipse.ui/src/org/sonarlint/eclipse/ui/quickfixes/ISonarLintMarkerResolver.java new file mode 100644 index 000000000..9af839e77 --- /dev/null +++ b/org.sonarlint.eclipse.ui/src/org/sonarlint/eclipse/ui/quickfixes/ISonarLintMarkerResolver.java @@ -0,0 +1,28 @@ +/* + * SonarLint for Eclipse + * Copyright (C) 2015-2021 SonarSource SA + * sonarlint@sonarsource.com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.sonarlint.eclipse.ui.quickfixes; + +import org.eclipse.ui.IMarkerResolution2; + +public interface ISonarLintMarkerResolver extends IMarkerResolution2 { + + int getRelevanceForResolution(); + +}