Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2018-02-10 22:03:35 +0000
committerStephan Herrmann2018-02-10 22:08:23 +0000
commit20c2bef85c7298d2cfa88c1e0cef56b9d405bb98 (patch)
tree57ceff8e470d3f98dbfb127e76be7a8ebc750b15
parent70e721eda897f2abcc66dbde301200660454bc52 (diff)
downloadorg.eclipse.objectteams-20c2bef85c7298d2cfa88c1e0cef56b9d405bb98.tar.gz
org.eclipse.objectteams-20c2bef85c7298d2cfa88c1e0cef56b9d405bb98.tar.xz
org.eclipse.objectteams-20c2bef85c7298d2cfa88c1e0cef56b9d405bb98.zip
Backport Bug 513260 - [test] JDT tests that fail with OTDT
- fix failure in QuickFixTest9.testAddModuleRequiresProposal() cherry-pick of commit 6a11ac819f453a2f9820d8c4fc096a1603360a1d
-rw-r--r--plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/assist/OTQuickFixes.java9
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/.settings/org.eclipse.jdt.core.prefs20
2 files changed, 25 insertions, 4 deletions
diff --git a/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/assist/OTQuickFixes.java b/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/assist/OTQuickFixes.java
index 432997f95..d3110bdc5 100644
--- a/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/assist/OTQuickFixes.java
+++ b/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/assist/OTQuickFixes.java
@@ -18,7 +18,6 @@ package org.eclipse.objectteams.otdt.internal.ui.assist;
import static org.eclipse.objectteams.otdt.ui.ImageConstants.CALLINMETHOD_IMG;
-import java.io.Closeable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Hashtable;
@@ -227,9 +226,11 @@ public team class OTQuickFixes {
if (proposal instanceof AddImportCorrectionProposal)
{
// if importRewrite suppressed a base import in a role file, don't propose empty changes, but redirect to the team:
- ImportRewrite importRewrite = ((AddImportCorrectionProposal) proposal).getImportRewrite();
- if (importRewrite != null && !importRewrite.myHasRecordedChanges())
- proposal = TypeProposalSubProcessor.createImportInRoFisTeamProposal(cu, fullName, node, relevance, maxProposals);
+ if (OTModelManager.isRole(cu.findPrimaryType())) {
+ ImportRewrite importRewrite = ((AddImportCorrectionProposal) proposal).getImportRewrite();
+ if (importRewrite != null && !importRewrite.myHasRecordedChanges())
+ proposal = TypeProposalSubProcessor.createImportInRoFisTeamProposal(cu, fullName, node, relevance, maxProposals);
+ }
// we cannot import roles, check if it is a role:
try {
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/.settings/org.eclipse.jdt.core.prefs b/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/.settings/org.eclipse.jdt.core.prefs
index 9c52a821a..dec20016c 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/.settings/org.eclipse.jdt.core.prefs
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/.settings/org.eclipse.jdt.core.prefs
@@ -74,3 +74,23 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.objectteams.otdt.compiler.option.weaving_scheme=OTDRE
+org.eclipse.objectteams.otdt.compiler.problem.abstract_potential_relevant_role=warning
+org.eclipse.objectteams.otdt.compiler.problem.adapting_deprecated=error
+org.eclipse.objectteams.otdt.compiler.problem.ambiguous_lowering=warning
+org.eclipse.objectteams.otdt.compiler.problem.basecall=warning
+org.eclipse.objectteams.otdt.compiler.problem.baseclass_cycle=warning
+org.eclipse.objectteams.otdt.compiler.problem.binding_conventions=warning
+org.eclipse.objectteams.otdt.compiler.problem.decapsulation=warning
+org.eclipse.objectteams.otdt.compiler.problem.decapsulation_write=warning
+org.eclipse.objectteams.otdt.compiler.problem.deprecated_path_syntax=warning
+org.eclipse.objectteams.otdt.compiler.problem.effectless_fieldaccess=warning
+org.eclipse.objectteams.otdt.compiler.problem.exception_in_guard=error
+org.eclipse.objectteams.otdt.compiler.problem.fragile_callin=warning
+org.eclipse.objectteams.otdt.compiler.problem.ignoring_role_return=warning
+org.eclipse.objectteams.otdt.compiler.problem.inferred_callout=error
+org.eclipse.objectteams.otdt.compiler.problem.override_final_role=error
+org.eclipse.objectteams.otdt.compiler.problem.potential_ambiguous_playedby=warning
+org.eclipse.objectteams.otdt.compiler.problem.unsafe_role_instantiation=warning
+org.eclipse.objectteams.otdt.compiler.problem.unused_parammap=warning
+org.eclipse.objectteams.otdt.compiler.problem.weave_into_system_class=warning

Back to the top