Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2014-05-13 20:05:44 +0000
committerChristian W. Damus2014-05-13 20:05:44 +0000
commitc3c8f633c4ebe43b9f9579f02799ec5ae0619ef6 (patch)
treeca3a7296547bb438068d1a6f0001d6f22a83b9ea /plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org
parent258d199d1361280c45a44e5fef241f8f3112734f (diff)
downloadorg.eclipse.papyrus-c3c8f633c4ebe43b9f9579f02799ec5ae0619ef6.tar.gz
org.eclipse.papyrus-c3c8f633c4ebe43b9f9579f02799ec5ae0619ef6.tar.xz
org.eclipse.papyrus-c3c8f633c4ebe43b9f9579f02799ec5ae0619ef6.zip
434681: [Search] Remove occurrences of @Nullable and @NonNull annotations from JDT
https://bugs.eclipse.org/bugs/show_bug.cgi?id=434681
Diffstat (limited to 'plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org')
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/pages/PapyrusSearchPage.java10
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/query/PapyrusOCLQuery.java21
2 files changed, 12 insertions, 19 deletions
diff --git a/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/pages/PapyrusSearchPage.java b/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/pages/PapyrusSearchPage.java
index 46e7cfc58f2..9228396ace7 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/pages/PapyrusSearchPage.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/pages/PapyrusSearchPage.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 CEA LIST and others.
+ * Copyright (c) 2013, 2014 CEA LIST and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -11,6 +11,7 @@
* CEA LIST - Initial API and implementation
* Christian W. Damus (CEA LIST) - Fix leaking of all UML models in search results
* Christian W. Damus (CEA LIST) - Replace workspace IResource dependency with URI for CDO compatibility
+ * Christian W. Damus (CEA) - bug 434681
*
*****************************************************************************/
package org.eclipse.papyrus.uml.search.ui.pages;
@@ -33,8 +34,6 @@ import org.eclipse.emf.ecore.EClassifier;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.impl.EClassImpl;
import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.jface.dialogs.DialogPage;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
@@ -1172,8 +1171,7 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla
- public @NonNull
- MetaModelManager getMetaModelManager(@Nullable EObject contextObject) {
+ public MetaModelManager getMetaModelManager(EObject contextObject) {
MetaModelManager metaModelManager = contextObject != null ? PivotUtil.findMetaModelManager(contextObject) : null;
if(metaModelManager != null) {
return metaModelManager;
@@ -1186,7 +1184,7 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla
return nullMetaModelManager2;
}
- public void metaModelManagerDisposed(@NonNull MetaModelManager metaModelManager) {
+ public void metaModelManagerDisposed(MetaModelManager metaModelManager) {
metaModelManager.removeListener(this);
reset();
diff --git a/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/query/PapyrusOCLQuery.java b/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/query/PapyrusOCLQuery.java
index 7ffdcef936f..54bdd408675 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/query/PapyrusOCLQuery.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/query/PapyrusOCLQuery.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2014 CEA LIST and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@
*
* Contributors:
* CEA LIST - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434681
*
*****************************************************************************/
package org.eclipse.papyrus.uml.search.ui.query;
@@ -26,7 +27,6 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Status;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.text.IDocument;
@@ -178,15 +178,13 @@ public class PapyrusOCLQuery extends AbstractPapyrusQuery {
private class EvaluationRunnable implements IRunnableWithProgress {
- private final @NonNull
- BaseResource resource;
+ private final BaseResource resource;
- private final @NonNull
- String expression;
+ private final String expression;
private Object value = null;
- public EvaluationRunnable(@NonNull BaseResource resource, @NonNull String expression) {
+ public EvaluationRunnable(BaseResource resource, String expression) {
this.resource = resource;
this.expression = expression;
}
@@ -219,7 +217,6 @@ public class PapyrusOCLQuery extends AbstractPapyrusQuery {
evaluationEnvironment.add(DomainUtil.nonNullModel(expressionInOCL.getContextVariable()), contextValue);
// if (modelManager == null) {
// let the evaluation environment create one
- @NonNull
DomainModelManager modelManager2 = modelManager = evaluationEnvironment.createModelManager(contextObject);
// }
monitor.worked(2);
@@ -258,17 +255,15 @@ public class PapyrusOCLQuery extends AbstractPapyrusQuery {
*/
protected static class CancelableEvaluationVisitor extends EvaluationVisitorImpl {
- private final @NonNull
- IProgressMonitor monitor;
+ private final IProgressMonitor monitor;
- protected CancelableEvaluationVisitor(@NonNull IProgressMonitor monitor, @NonNull Environment env, @NonNull EvaluationEnvironment evalEnv, @NonNull DomainModelManager modelManager) {
+ protected CancelableEvaluationVisitor(IProgressMonitor monitor, Environment env, EvaluationEnvironment evalEnv, DomainModelManager modelManager) {
super(env, evalEnv, modelManager);
this.monitor = monitor;
}
@Override
- public @NonNull
- EvaluationVisitor createNestedEvaluator() {
+ public EvaluationVisitor createNestedEvaluator() {
EnvironmentFactory factory = environment.getFactory();
EvaluationEnvironment nestedEvalEnv = factory.createEvaluationEnvironment(evaluationEnvironment);
CancelableEvaluationVisitor nestedVisitor = new CancelableEvaluationVisitor(monitor, environment, nestedEvalEnv, modelManager);

Back to the top