Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Piggott2011-04-19 01:26:14 -0400
committerMatthew Piggott2011-04-19 01:27:13 -0400
commit9c4c9e6f0c3b7f1636ba2ca0975d8b2aea7ae613 (patch)
tree4bc9be734dcc0a0aaa3fd85e4c38648cfbf7277b
parent903e349338bfabcccb07e9916c3e16c8e6909427 (diff)
downloadm2e-core-9c4c9e6f0c3b7f1636ba2ca0975d8b2aea7ae613.tar.gz
m2e-core-9c4c9e6f0c3b7f1636ba2ca0975d8b2aea7ae613.tar.xz
m2e-core-9c4c9e6f0c3b7f1636ba2ca0975d8b2aea7ae613.zip
Code cleanup
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/console/MavenConsolePageParticipant.java13
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/MavenRepositorySearchDialog.java34
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenInstallationsPreferencePage.java8
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomSelectionComponent.java35
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardArchetypePage.java7
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/index/IndexedArtifactFile.java2
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/ArtifactKeyAdapterFactory.java2
-rw-r--r--org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/MavenDiscovery.java1
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomQuickAssistProcessor.java2
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependenciesComposite.java4
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditor.java2
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/OverviewPage.java3
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenFileEditorInput.java4
-rw-r--r--org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/internal/SaveDirtyFilesDialog.java2
-rw-r--r--org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/rename/RenameRefactoring.java2
15 files changed, 61 insertions, 60 deletions
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/console/MavenConsolePageParticipant.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/console/MavenConsolePageParticipant.java
index 4ac39df7..e42e4ba0 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/console/MavenConsolePageParticipant.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/console/MavenConsolePageParticipant.java
@@ -13,17 +13,18 @@ package org.eclipse.m2e.core.ui.internal.console;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.m2e.core.ui.internal.Messages;
-import org.eclipse.m2e.core.internal.preferences.MavenPreferenceConstants;
-import org.eclipse.m2e.core.ui.internal.MavenImages;
-import org.eclipse.m2e.core.ui.internal.actions.MavenConsoleRemoveAction;
-import org.eclipse.m2e.core.ui.internal.actions.MavenDebugOutputAction;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.console.IConsole;
import org.eclipse.ui.console.IConsoleConstants;
import org.eclipse.ui.console.IConsolePageParticipant;
import org.eclipse.ui.part.IPageBookViewPage;
+import org.eclipse.m2e.core.internal.preferences.MavenPreferenceConstants;
+import org.eclipse.m2e.core.ui.internal.MavenImages;
+import org.eclipse.m2e.core.ui.internal.Messages;
+import org.eclipse.m2e.core.ui.internal.actions.MavenConsoleRemoveAction;
+import org.eclipse.m2e.core.ui.internal.actions.MavenDebugOutputAction;
+
public class MavenConsolePageParticipant implements IConsolePageParticipant {
@@ -65,7 +66,7 @@ public class MavenConsolePageParticipant implements IConsolePageParticipant {
public void deactivated() {
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public Object getAdapter(Class adapter) {
return null;
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/MavenRepositorySearchDialog.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/MavenRepositorySearchDialog.java
index ded8ef75..f078005a 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/MavenRepositorySearchDialog.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/MavenRepositorySearchDialog.java
@@ -15,27 +15,12 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
-import org.apache.maven.model.Dependency;
-import org.apache.maven.model.DependencyManagement;
-import org.apache.maven.model.Parent;
-import org.apache.maven.model.Plugin;
-import org.apache.maven.model.PluginManagement;
-import org.apache.maven.project.MavenProject;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.m2e.core.embedder.ArtifactKey;
-import org.eclipse.m2e.core.index.IIndex;
-import org.eclipse.m2e.core.index.IndexedArtifact;
-import org.eclipse.m2e.core.index.IndexedArtifactFile;
-import org.eclipse.m2e.core.ui.internal.Messages;
-import org.eclipse.m2e.core.ui.internal.search.util.Packaging;
-import org.eclipse.m2e.core.ui.internal.util.M2EUIUtils;
-import org.eclipse.m2e.core.ui.internal.util.ProposalUtil;
-import org.eclipse.m2e.core.ui.internal.wizards.MavenPomSelectionComponent;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -48,6 +33,23 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
+import org.apache.maven.model.Dependency;
+import org.apache.maven.model.DependencyManagement;
+import org.apache.maven.model.Parent;
+import org.apache.maven.model.Plugin;
+import org.apache.maven.model.PluginManagement;
+import org.apache.maven.project.MavenProject;
+
+import org.eclipse.m2e.core.embedder.ArtifactKey;
+import org.eclipse.m2e.core.index.IIndex;
+import org.eclipse.m2e.core.index.IndexedArtifact;
+import org.eclipse.m2e.core.index.IndexedArtifactFile;
+import org.eclipse.m2e.core.ui.internal.Messages;
+import org.eclipse.m2e.core.ui.internal.search.util.Packaging;
+import org.eclipse.m2e.core.ui.internal.util.M2EUIUtils;
+import org.eclipse.m2e.core.ui.internal.util.ProposalUtil;
+import org.eclipse.m2e.core.ui.internal.wizards.MavenPomSelectionComponent;
+
/**
* Maven POM Search dialog
*
@@ -388,7 +390,7 @@ public class MavenRepositorySearchDialog extends AbstractMavenDialog {
if (!managed.contains(new ArtifactKey(selectedIndexedArtifactFile.group, selectedIndexedArtifactFile.artifact, selectedIndexedArtifactFile.version, selectedIndexedArtifactFile.classifier))) {
txtVersion.setText(selectedIndexedArtifactFile.version);
} else {
- txtVersion.setText("");
+ txtVersion.setText(""); //$NON-NLS-1$
}
} finally {
ignoreTextChange = false;
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenInstallationsPreferencePage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenInstallationsPreferencePage.java
index 5c624ac2..09647533 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenInstallationsPreferencePage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenInstallationsPreferencePage.java
@@ -331,7 +331,7 @@ public class MavenInstallationsPreferencePage extends PreferencePage implements
if(f.exists()){
showURL = true;
}
- String openFile = showURL ? Messages.MavenInstallationsPreferencePage_link_open : "";
+ String openFile = showURL ? Messages.MavenInstallationsPreferencePage_link_open : ""; //$NON-NLS-1$
if(runtime instanceof MavenEmbeddedRuntime){
text = NLS.bind(Messages.MavenInstallationsPreferencePage_settings, openFile);
} else {
@@ -539,7 +539,7 @@ public class MavenInstallationsPreferencePage extends PreferencePage implements
IWebBrowser browser = PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser();
browser.openURL(url);
} catch(MalformedURLException ex) {
- log.error("Malformed URL", ex);
+ log.error("Malformed URL", ex); //$NON-NLS-1$
} catch(PartInitException ex) {
log.error(ex.getMessage(), ex);
}
@@ -582,7 +582,7 @@ public class MavenInstallationsPreferencePage extends PreferencePage implements
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
void openEditor(final String fileName) {
// XXX create new settings.xml if does not exist
@@ -615,7 +615,7 @@ public class MavenInstallationsPreferencePage extends PreferencePage implements
editor.addPropertyListener(new IPropertyListener() {
public void propertyChanged(Object source, int propId) {
if(!editor.isDirty()) {
- log.info("Refreshing settings " + fileName);
+ log.info("Refreshing settings " + fileName); //$NON-NLS-1$
invalidateMavenSettings(false);
}
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomSelectionComponent.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomSelectionComponent.java
index f93359d9..2973915f 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomSelectionComponent.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomSelectionComponent.java
@@ -17,7 +17,8 @@ import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
-import org.apache.lucene.search.BooleanQuery;
+import com.ibm.icu.text.DateFormat;
+
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -35,16 +36,6 @@ import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.StyledString;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.embedder.ArtifactKey;
-import org.eclipse.m2e.core.index.IIndex;
-import org.eclipse.m2e.core.index.IndexManager;
-import org.eclipse.m2e.core.index.IndexedArtifact;
-import org.eclipse.m2e.core.index.IndexedArtifactFile;
-import org.eclipse.m2e.core.index.UserInputSearchExpression;
-import org.eclipse.m2e.core.ui.internal.Messages;
-import org.eclipse.m2e.core.ui.internal.MavenImages;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.FocusEvent;
@@ -64,7 +55,18 @@ import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;
-import com.ibm.icu.text.DateFormat;
+import org.apache.lucene.search.BooleanQuery;
+
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.core.IMavenConstants;
+import org.eclipse.m2e.core.embedder.ArtifactKey;
+import org.eclipse.m2e.core.index.IIndex;
+import org.eclipse.m2e.core.index.IndexManager;
+import org.eclipse.m2e.core.index.IndexedArtifact;
+import org.eclipse.m2e.core.index.IndexedArtifactFile;
+import org.eclipse.m2e.core.index.UserInputSearchExpression;
+import org.eclipse.m2e.core.ui.internal.MavenImages;
+import org.eclipse.m2e.core.ui.internal.Messages;
/**
@@ -218,7 +220,7 @@ public class MavenPomSelectionComponent extends Composite {
}
searchResultViewer.setContentProvider(new SearchResultContentProvider());
- searchResultViewer.setLabelProvider(new DelegatingStyledCellLabelProvider(new SearchResultLabelProvider(artifactKeys, managedKeys, queryType)));
+ searchResultViewer.setLabelProvider(new DelegatingStyledCellLabelProvider(new SearchResultLabelProvider(artifactKeys, managedKeys)));
searchResultViewer.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
IStructuredSelection selection = (IStructuredSelection) event.getSelection();
@@ -385,7 +387,7 @@ public class MavenPomSelectionComponent extends Composite {
LinkedHashMap<String, IndexedArtifact> managed = new LinkedHashMap<String, IndexedArtifact>();
LinkedHashMap<String, IndexedArtifact> nonManaged = new LinkedHashMap<String, IndexedArtifact>();
for (Map.Entry<String, IndexedArtifact> art : res.entrySet()) {
- String key = art.getValue().getGroupId() + ":" + art.getValue().getArtifactId();
+ String key = art.getValue().getGroupId() + ":" + art.getValue().getArtifactId(); //$NON-NLS-1$
if (managedKeys.contains(key)) {
managed.put(art.getKey(), art.getValue());
} else {
@@ -431,18 +433,15 @@ public class MavenPomSelectionComponent extends Composite {
public static class SearchResultLabelProvider extends LabelProvider implements IColorProvider, DelegatingStyledCellLabelProvider.IStyledLabelProvider {
private final Set<String> artifactKeys;
- private final String queryType;
private final Set<String> managedKeys;
/**
* both managedkeys and artifctkeys are supposed to hold both gr:art:ver combos and gr:art combos
* @param artifactKeys
* @param managedKeys
- * @param queryType
*/
- public SearchResultLabelProvider(Set<String> artifactKeys, Set<String> managedKeys, String queryType) {
+ public SearchResultLabelProvider(Set<String> artifactKeys, Set<String> managedKeys) {
this.artifactKeys = artifactKeys;
- this.queryType = queryType;
this.managedKeys = managedKeys;
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardArchetypePage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardArchetypePage.java
index c4b6a62b..c501191f 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardArchetypePage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardArchetypePage.java
@@ -186,6 +186,7 @@ public class MavenProjectWizardArchetypePage extends AbstractMavenWizardPage imp
}
/** Creates the archetype table viewer. */
+ @SuppressWarnings({"unchecked", "rawtypes"})
private void createViewer(Composite parent) {
Label catalogsLabel = new Label(parent, SWT.NONE);
catalogsLabel.setText(org.eclipse.m2e.core.ui.internal.Messages.MavenProjectWizardArchetypePage_lblCatalog);
@@ -251,7 +252,6 @@ public class MavenProjectWizardArchetypePage extends AbstractMavenWizardPage imp
});
final ArchetypeManager archetypeManager = MavenPluginActivator.getDefault().getArchetypeManager();
- Collection<ArchetypeCatalogFactory> archetypeCatalogs = archetypeManager.getArchetypeCatalogs();
ArrayList allCatalogs = new ArrayList(archetypeManager.getArchetypeCatalogs());
allCatalogs.add(0, ALL_CATALOGS);
catalogsComboViewer.setInput(allCatalogs);
@@ -495,6 +495,7 @@ public class MavenProjectWizardArchetypePage extends AbstractMavenWizardPage imp
}
}
+ @SuppressWarnings("unchecked")
private List<Archetype> getAllArchetypes() {
ArchetypeManager manager = MavenPluginActivator.getDefault().getArchetypeManager();
Collection<ArchetypeCatalogFactory> archetypeCatalogs = manager.getArchetypeCatalogs();
@@ -507,13 +508,13 @@ public class MavenProjectWizardArchetypePage extends AbstractMavenWizardPage imp
if(catalog.getDescription().startsWith("Test")) { //$NON-NLS-1$
continue;
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
List arcs = catalog.getArchetypeCatalog().getArchetypes();
if(arcs != null) {
list.addAll(arcs);
}
} catch(Exception ce) {
- log.error("Unable to read archetype catalog: " + catalog.getId(), ce);
+ log.error("Unable to read archetype catalog: " + catalog.getId(), ce); //$NON-NLS-1$
}
}
return list;
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/index/IndexedArtifactFile.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/index/IndexedArtifactFile.java
index 46c60100..9fff9bdb 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/index/IndexedArtifactFile.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/index/IndexedArtifactFile.java
@@ -92,7 +92,7 @@ public class IndexedArtifactFile implements IAdaptable {
return new ArtifactKey(group, artifact, version, classifier);
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public Object getAdapter(Class adapter) {
if(adapter==ArtifactKey.class) {
return getArtifactKey();
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/ArtifactKeyAdapterFactory.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/ArtifactKeyAdapterFactory.java
index b0a616cb..419e7929 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/ArtifactKeyAdapterFactory.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/ArtifactKeyAdapterFactory.java
@@ -28,7 +28,7 @@ import org.eclipse.m2e.core.project.IMavenProjectRegistry;
*
* @author Igor Fedorenko
*/
-@SuppressWarnings("unchecked")
+@SuppressWarnings("rawtypes")
public class ArtifactKeyAdapterFactory implements IAdapterFactory {
private static final Class[] ADAPTER_LIST = new Class[] {ArtifactKey.class,};
diff --git a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/MavenDiscovery.java b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/MavenDiscovery.java
index f072eb37..d71698a3 100644
--- a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/MavenDiscovery.java
+++ b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/MavenDiscovery.java
@@ -65,6 +65,7 @@ public class MavenDiscovery {
public static final String PLUGINXML_EXT = ".pluginxml"; //$NON-NLS-1$
+ @SuppressWarnings("unchecked")
public static void launchWizard(Shell shell) {
launchWizard(shell, Collections.EMPTY_LIST, Collections.EMPTY_LIST, Collections.EMPTY_LIST, Collections.EMPTY_LIST);
}
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomQuickAssistProcessor.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomQuickAssistProcessor.java
index cc369ee0..416ced45 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomQuickAssistProcessor.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomQuickAssistProcessor.java
@@ -201,7 +201,6 @@ class SchemaCompletionProposal implements ICompletionProposal, ICompletionPropos
IDOMModel domModel = null;
try {
domModel = (IDOMModel) StructuredModelManager.getModelManager().getExistingModelForRead(doc);
- IStructuredDocument document = domModel.getStructuredDocument();
Element root = domModel.getDocument().getDocumentElement();
//now check parent version and groupid against the current project's ones..
@@ -664,7 +663,6 @@ static class IgnoreWarningProposal implements ICompletionProposal, ICompletionPr
}
if (reg != null && reg instanceof Element) { //just a simple guard against moved marker
try {
- int startLine = doc.getLineOffset(line);
String currentLine = StringUtils.convertToHTMLContent(doc.get(reg.getStartOffset(), reg.getEndOffset() - reg.getStartOffset()));
String insert = StringUtils.convertToHTMLContent("<!--" + markupText + "-->");
return "<html>...<br>" + currentLine + "<b>" + insert + "</b><br>...<html>"; //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependenciesComposite.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependenciesComposite.java
index df6cfd90..623cc95a 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependenciesComposite.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependenciesComposite.java
@@ -82,6 +82,7 @@ import org.w3c.dom.Element;
/**
* @author Eugene Kuleshov
*/
+@SuppressWarnings("synthetic-access")
public class DependenciesComposite extends Composite {
private static final Logger log = LoggerFactory.getLogger(DependenciesComposite.class);
@@ -540,7 +541,6 @@ public class DependenciesComposite extends Composite {
}
- @SuppressWarnings("unchecked")
public void loadData() {
resetDependencies();
resetManagedDependencies();
@@ -971,6 +971,7 @@ public class DependenciesComposite extends Composite {
public Dependency() {}
+ @SuppressWarnings("rawtypes")
public Object getAdapter(Class adapter) {
if (ArtifactKey.class.equals(adapter)) {
return new ArtifactKey(groupId, artifactId, version, classifier);
@@ -978,5 +979,4 @@ public class DependenciesComposite extends Composite {
return null;
}
}
-
}
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditor.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditor.java
index 580ab800..28658929 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditor.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditor.java
@@ -1004,7 +1004,7 @@ public class MavenPomEditor extends FormEditor implements IResourceChangeListene
}
@Override
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public Object getAdapter(Class adapter) {
Object result = super.getAdapter(adapter);
if(result != null && Display.getCurrent() == null) {
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/OverviewPage.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/OverviewPage.java
index 2520c46a..0626dda1 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/OverviewPage.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/OverviewPage.java
@@ -30,7 +30,6 @@ import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.viewers.ICellModifier;
import org.eclipse.jface.viewers.IOpenListener;
import org.eclipse.jface.viewers.OpenEvent;
@@ -101,6 +100,7 @@ import static org.eclipse.m2e.core.ui.internal.editing.PomEdits.*;
/**
* @author Eugene Kuleshov
*/
+@SuppressWarnings("synthetic-access")
public class OverviewPage extends MavenPomEditorPage {
static final Logger LOG = LoggerFactory.getLogger(OverviewPage.class);
@@ -624,7 +624,6 @@ public class OverviewPage extends MavenPomEditorPage {
modulesEditor.setRemoveButtonListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
- IDocument document = getPomEditor().getDocument();
try {
performEditOperation( new Operation() {
public void process(Document document) {
diff --git a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenFileEditorInput.java b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenFileEditorInput.java
index 7e6c1f73..5e522c53 100644
--- a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenFileEditorInput.java
+++ b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenFileEditorInput.java
@@ -81,7 +81,7 @@ public class MavenFileEditorInput implements IStorageEditorInput {
return false;
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public Object getAdapter(Class adapter) {
return null;
}
@@ -102,7 +102,7 @@ public class MavenFileEditorInput implements IStorageEditorInput {
// };
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public Object getAdapter(Class adapter) {
if(adapter==ILocationProvider.class) {
return new ILocationProvider() {
diff --git a/org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/internal/SaveDirtyFilesDialog.java b/org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/internal/SaveDirtyFilesDialog.java
index ec01227e..89465ffb 100644
--- a/org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/internal/SaveDirtyFilesDialog.java
+++ b/org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/internal/SaveDirtyFilesDialog.java
@@ -137,7 +137,7 @@ public class SaveDirtyFilesDialog extends ListDialog {
* This class has been copied from org.eclipse.jdt.internal.ui.viewsupport.ListContentProvider
* This class should be removed once a generic solution is made available.
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
static class ListContentProvider implements IStructuredContentProvider {
List fContents;
diff --git a/org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/rename/RenameRefactoring.java b/org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/rename/RenameRefactoring.java
index 2fe67e74..276cf676 100644
--- a/org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/rename/RenameRefactoring.java
+++ b/org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/rename/RenameRefactoring.java
@@ -41,7 +41,7 @@ import org.eclipse.osgi.util.NLS;
*
* @author Anton Kraev
*/
-@SuppressWarnings("unchecked")
+@SuppressWarnings("rawtypes")
public class RenameRefactoring extends AbstractPomRefactoring {
private static final Object[] EMPTY_OBJECT_ARRAY = new Object[] {};
private static final String VERSION = "version"; //$NON-NLS-1$

Back to the top