Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptessier2012-06-25 10:14:49 -0400
committerptessier2012-06-25 10:14:49 -0400
commita8b1bfb4d4234cc428ac243c00f7e4d8b81699cb (patch)
treee96dde0635095fd94b4de1145950ade965789d94 /plugins/infra
parent87b039902d209f4d5627d9df8139457f8f8fa68a (diff)
downloadorg.eclipse.papyrus-a8b1bfb4d4234cc428ac243c00f7e4d8b81699cb.tar.gz
org.eclipse.papyrus-a8b1bfb4d4234cc428ac243c00f7e4d8b81699cb.tar.xz
org.eclipse.papyrus-a8b1bfb4d4234cc428ac243c00f7e4d8b81699cb.zip
383449: [Direct Editor] the default editor not saved in preferences
https://bugs.eclipse.org/bugs/show_bug.cgi?id=383449
Diffstat (limited to 'plugins/infra')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/src/org/eclipse/papyrus/extensionpoints/editors/definition/DirectEditorRegistry.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/src/org/eclipse/papyrus/extensionpoints/editors/definition/DirectEditorRegistry.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/src/org/eclipse/papyrus/extensionpoints/editors/definition/DirectEditorRegistry.java
index 7c96f7b5793..cbe54bed6c9 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/src/org/eclipse/papyrus/extensionpoints/editors/definition/DirectEditorRegistry.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/src/org/eclipse/papyrus/extensionpoints/editors/definition/DirectEditorRegistry.java
@@ -40,7 +40,7 @@ public class DirectEditorRegistry {
assert(directEditor!=null);
objectToEdits.add(directEditor.getObjectToEdit());
Integer priority=directEditor.getPriority();
-
+
//take in account priority of preferences
String preferedLanguage = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + directEditor.getObjectToEdit());
@@ -69,7 +69,10 @@ public class DirectEditorRegistry {
String id= IDirectEditorsIds.EDITOR_FOR_ELEMENT + defaultDirectEditor.getObjectToEdit();
String language= defaultDirectEditor.getLanguage();
- Activator.getDefault().getPreferenceStore().setValue(id, language);
+ //if preference set direct editor as default, do nothing
+ if(!Activator.getDefault().getPreferenceStore().getString(id).equals(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR)){
+ Activator.getDefault().getPreferenceStore().setValue(id, language);
+ }
}
}
@Override
@@ -118,7 +121,6 @@ public class DirectEditorRegistry {
}
}
-
return null;
}

Back to the top