Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/preferences/LinkPreferencePage.xpt')
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/preferences/LinkPreferencePage.xpt92
1 files changed, 0 insertions, 92 deletions
diff --git a/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/preferences/LinkPreferencePage.xpt b/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/preferences/LinkPreferencePage.xpt
deleted file mode 100644
index 0568f5f9e21..00000000000
--- a/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/preferences/LinkPreferencePage.xpt
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2008 Atos Origin
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Thibault Landre (Atos Origin) - initial API and implementation
- * Vincent Lorenzo (CEA-LIST) - 335987: [General][Enhancement] Show/Hide Connectors Labels https://bugs.eclipse.org/bugs/show_bug.cgi?id=335987
- */
-
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/papyrus/2009/papyrusgmfgenextension'»
-
-«EXTENSION xpt::preferences::PrefsConstant»
-
-«DEFINE className FOR gmfgen::GenLink»«elementType.displayName»«getPreferencePageSuffix()»«ENDDEFINE»
-
-«DEFINE LinkPreferencePage FOR gmfgen::GenLink-»
-package «getDiagram().preferencesPackageName»;
-
-«EXPAND xpt::Common::generatedClassComment»
-public class «EXPAND className» extends org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusLinkPreferencePage {
-
-«EXPAND xpt::Common::generatedClassComment»
- public «EXPAND className»() {
- super();
- setPreferenceKey( «getDiagram().editPartsPackageName».«getDiagram().editPartClassName».MODEL_ID+"_«elementType.displayName»");
- }
- «EXPAND xpt::Common::generatedClassComment»
- @Override
- protected String getBundleId() {
- return «getDiagram().editorGen.plugin.getActivatorQualifiedClassName()».ID;
- }
-
- «EXPAND xpt::Common::generatedClassComment»
- public static void initDefaults(org.eclipse.jface.preference.IPreferenceStore store) {
- «REM» executed, only if the element has labels with defined role (using papyrusgmfgenextension::LabelVisibilityPreference) «ENDREM»
- «IF self.labels->exists(lbl0 : gmfgen::GenLinkLabel | (papyrusgmfgenextension::LabelVisibilityPreference.allInstances()->select(label0 : papyrusgmfgenextension::LabelVisibilityPreference | label0.linkLabels->includes(lbl0))->size()<>0))-»
- String key = «getDiagram().editPartsPackageName».«getDiagram().editPartClassName».MODEL_ID+"_«elementType.displayName»";
- java.util.Map<String, Boolean> map = getStaticLabelVisibilityPreferences();
- for(String role : map.keySet()){
- String preferenceName = org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.getLabelElementConstant(key, role, org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper.LABEL_VISIBILITY);
- store.setDefault(preferenceName, map.get(role));
- }
- «ENDIF-»
- «REM» end of the add for papyrusgmfgenextension::LabelVisibilityPreference«ENDREM»
- }
-
- «REM» executed, only if the element has labels with defined role (using papyrusgmfgenextension::LabelVisibilityPreference) «ENDREM»
- «IF self.labels->exists(lbl0 : gmfgen::GenLinkLabel | (papyrusgmfgenextension::LabelVisibilityPreference.allInstances()->select(label0 : papyrusgmfgenextension::LabelVisibilityPreference | label0.linkLabels->includes(lbl0))->size()<>0))-»
- «EXPAND xpt::Common::generatedClassComment»
- private static java.util.TreeMap<String,String> getStaticLabelRole(){
- java.util.TreeMap<String,String> map = new java.util.TreeMap<String, String>(new org.eclipse.papyrus.uml.diagram.common.util.StringComparator());
- «FOREACH labels AS lbl-»
- «IF papyrusgmfgenextension::LabelVisibilityPreference.allInstances()->select(label : papyrusgmfgenextension::LabelVisibilityPreference | label.linkLabels->includes(lbl))->size()<>0-»
- map.put(
- "«papyrusgmfgenextension::LabelVisibilityPreference.allInstances()->select(label : papyrusgmfgenextension::LabelVisibilityPreference | label.linkLabels->includes(lbl))->asSequence()->first().role»"
- ,"«papyrusgmfgenextension::LabelVisibilityPreference.allInstances()->select(label : papyrusgmfgenextension::LabelVisibilityPreference | label.linkLabels->includes(lbl))->asSequence()->first().iconPathRole»"
- );//$NON-NLS-1$ //$NON-NLS-2$
- «ENDIF-»
- «ENDFOREACH-»
- return map;
- }
-
- «EXPAND xpt::Common::generatedClassComment»
- private static java.util.TreeMap<String,Boolean> getStaticLabelVisibilityPreferences(){
- java.util.TreeMap<String,Boolean> map = new java.util.TreeMap<String,Boolean>();
- «FOREACH labels AS lbl-»
- «IF papyrusgmfgenextension::LabelVisibilityPreference.allInstances()->select(label : papyrusgmfgenextension::LabelVisibilityPreference | label.linkLabels->includes(lbl))->size()<>0-»
- «IF papyrusgmfgenextension::LabelVisibilityPreference.allInstances()->select(label : papyrusgmfgenextension::LabelVisibilityPreference | label.linkLabels->includes(lbl))->asSequence()->first().visibleByDefault=true-»
- map.put("«papyrusgmfgenextension::LabelVisibilityPreference.allInstances()->select(label : papyrusgmfgenextension::LabelVisibilityPreference | label.linkLabels->includes(lbl))->asSequence()->first().role»"
- ,Boolean.TRUE);
- «ELSE»
- map.put("«papyrusgmfgenextension::LabelVisibilityPreference.allInstances()->select(label : papyrusgmfgenextension::LabelVisibilityPreference | label.linkLabels->includes(lbl))->asSequence()->first().role»"
- ,Boolean.FALSE);//$NON-NLS-1$
- «ENDIF»
- «ENDIF-»
- «ENDFOREACH-»
- return map;
- }
-
- «EXPAND xpt::Common::generatedClassComment»
- protected java.util.TreeMap<String,String> getLabelRole(){
- return getStaticLabelRole();
- }
- «ENDIF»
- «REM» end of the code used to managed papyrusgmfgenextension::LabelVisibilityPreference«ENDREM»
-}
-«ENDDEFINE»

Back to the top