Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Haug2015-05-12 10:19:05 +0000
committerJuergen Haug2015-06-29 14:52:29 +0000
commit6cfbf45817afc5a6f60afae4c77e76dba08b2faa (patch)
tree0e1d935756f47b12296a270fee9e21a29ad8b422 /plugins/org.eclipse.etrice.ui.common.base
parent5fe8eb1f1c9ea732830594bc9f57f3f5b03d28d0 (diff)
downloadorg.eclipse.etrice-6cfbf45817afc5a6f60afae4c77e76dba08b2faa.tar.gz
org.eclipse.etrice-6cfbf45817afc5a6f60afae4c77e76dba08b2faa.tar.xz
org.eclipse.etrice-6cfbf45817afc5a6f60afae4c77e76dba08b2faa.zip
[ui] diagram context menu allows kieler contributions
Diffstat (limited to 'plugins/org.eclipse.etrice.ui.common.base')
-rw-r--r--plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/CustomContextMenuProvider.java19
1 files changed, 14 insertions, 5 deletions
diff --git a/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/CustomContextMenuProvider.java b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/CustomContextMenuProvider.java
index 5babfe0ca..16a315072 100644
--- a/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/CustomContextMenuProvider.java
+++ b/plugins/org.eclipse.etrice.ui.common.base/src/org/eclipse/etrice/ui/common/base/editor/CustomContextMenuProvider.java
@@ -25,7 +25,7 @@ import com.google.common.collect.Sets;
public class CustomContextMenuProvider extends DiagramEditorContextMenuProvider {
- protected Set<IContributionItem> allowedItems = Sets.newHashSet();
+ protected Set<IContributionItem> graphitiItems = Sets.newHashSet();
public CustomContextMenuProvider(EditPartViewer viewer, ActionRegistry registry,
IConfigurationProvider configurationProvider) {
@@ -37,15 +37,24 @@ public class CustomContextMenuProvider extends DiagramEditorContextMenuProvider
super.buildContextMenu(manager);
// remember built items
- allowedItems = Sets.newHashSet(getItems());
+ graphitiItems = Sets.newHashSet(getItems());
}
@Override
protected void update(boolean force, boolean recursive) {
+
// remove external items
- for(IContributionItem item : getItems().clone())
- if(!allowedItems.contains(item))
- remove(item);
+ for(IContributionItem item : getItems().clone()){
+ if(graphitiItems.contains(item))
+ continue;
+ if(item.getId() != null){
+ if(item.getId().startsWith("de.cau.cs.kieler"))
+ continue;
+
+ }
+
+ remove(item);
+ }
super.update(force, recursive);
}

Back to the top