Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnsgar Radermacher2013-11-30 23:12:43 +0000
committerAnsgar Radermacher2013-11-30 23:19:47 +0000
commit50f7f2f51284bef9feaac749611ffa5d7b6ad4e1 (patch)
treede6ca49c844068ce73402b2cfee5bf7dd70664ab /extraplugins
parent83937dde13ef67c8e7d740c06da4e1950e2826b9 (diff)
downloadorg.eclipse.papyrus-50f7f2f51284bef9feaac749611ffa5d7b6ad4e1.tar.gz
org.eclipse.papyrus-50f7f2f51284bef9feaac749611ffa5d7b6ad4e1.tar.xz
org.eclipse.papyrus-50f7f2f51284bef9feaac749611ffa5d7b6ad4e1.zip
- Minor change of CommandSupport API (trivial)
Diffstat (limited to 'extraplugins')
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/build.properties3
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/AllocationDialog.java5
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ConfigureInstanceDialog.java28
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ConfigurePortDialog.java4
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/handlers/AddProfileAndModelLibsHandler.java4
5 files changed, 27 insertions, 17 deletions
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/build.properties b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/build.properties
index 7e0d71ea1fd..f1e29af020a 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/build.properties
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/build.properties
@@ -6,5 +6,4 @@ bin.includes = META-INF/,\
about.html,\
icons/,\
plugin.xml
-src.includes = about.html,
- plugin.xml
+src.includes = about.html
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/AllocationDialog.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/AllocationDialog.java
index 2a16c75c59a..b76f719b1f6 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/AllocationDialog.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/AllocationDialog.java
@@ -17,6 +17,7 @@ package org.eclipse.papyrus.qompass.designer.ui.dialogs;
import org.eclipse.draw2d.Label;
import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.transaction.util.TransactionUtil;
import org.eclipse.emf.workspace.AbstractEMFOperation;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.papyrus.FCM.DeploymentPlan;
@@ -284,8 +285,8 @@ public class AllocationDialog extends SelectionStatusDialog {
Shell shell = new Shell();
if(MessageDialog.openQuestion(shell, "Error",
"Stereotype application failed. The profile MARTE::Allocation is probably not applied. Try to apply it?")) {
- AbstractEMFOperation applyProfile = new AddMarteAndFcmProfile(Utils.getTop(is), AddMarteAndFcmProfile.APPLY_ALLOC, null);
- CommandSupport.exec(null, applyProfile);
+ AbstractEMFOperation applyProfile = new AddMarteAndFcmProfile(Utils.getTop(is), AddMarteAndFcmProfile.APPLY_ALLOC, TransactionUtil.getEditingDomain(is));
+ CommandSupport.exec(applyProfile);
AllocUtils.allocate(is, newNode);
}
}
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ConfigureInstanceDialog.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ConfigureInstanceDialog.java
index cee61ed33c1..43e26f29a01 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ConfigureInstanceDialog.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ConfigureInstanceDialog.java
@@ -182,10 +182,7 @@ public class ConfigureInstanceDialog extends SelectionStatusDialog {
getInstances(m_instanceList);
if(m_instanceList.size() == 0) {
MessageDialog.openInformation(shell, "Instance configuration",
- "There are still no instances available\n" +
- "Check whether you created already a deployment plan for your system." +
- "Check as well, if the parts in your a composite use \"composite\" as aggregation kind\n." +
- "(Results of deployment plan synchronizations will be unrolled)");
+ "There are still no instances available\n. Check whether you created already a deployment plan for your system. Check as well, if the parts in your a composite use \"composite\" as aggregation kind. (Results of deployment plan synchronizations will be unrolled)");
return false;
}
}
@@ -231,7 +228,7 @@ public class ConfigureInstanceDialog extends SelectionStatusDialog {
// --------------- instance selection -------------------
//
Group instanceSelGroup = new Group(instanceSelection, SWT.BORDER);
- instanceSelGroup.setText(" associated instance specifications ");
+ instanceSelGroup.setText(addSpaces("associated instance specifications"));
// ruleGroup.setLayout(new RowLayout (SWT.VERTICAL));
instanceSelGroup.setLayout(new GridLayout(1, false));
instanceSelGroup.setLayoutData(groupGridData);
@@ -304,7 +301,7 @@ public class ConfigureInstanceDialog extends SelectionStatusDialog {
GridData groupGridData = DialogUtils.createFillGridData();
Group instanceConfigurationGroup = new Group(parent, SWT.BORDER);
- instanceConfigurationGroup.setText(" Configuration ");
+ instanceConfigurationGroup.setText(addSpaces("Configuration"));
instanceConfigurationGroup.setLayout(new RowLayout(SWT.VERTICAL));
instanceConfigurationGroup.setLayout(new GridLayout(1, false));
instanceConfigurationGroup.setLayoutData(groupGridData);
@@ -438,7 +435,7 @@ public class ConfigureInstanceDialog extends SelectionStatusDialog {
}
}
}
- fValue.setText("");
+ fValue.setText(""); //$NON-NLS-1$
}
private void setEnabled(boolean enabled) {
@@ -447,8 +444,8 @@ public class ConfigureInstanceDialog extends SelectionStatusDialog {
fValueLabel.setEnabled(enabled);
fValue.setEnabled(enabled);
if(!enabled) {
- fValue.setText("");
- fDescription.setText("");
+ fValue.setText(""); //$NON-NLS-1$
+ fDescription.setText(""); //$NON-NLS-1$
fValueLabel.setText(valueLabelPrefix);
}
}
@@ -456,7 +453,7 @@ public class ConfigureInstanceDialog extends SelectionStatusDialog {
private String getValueLabel(Property attribute) {
String label = valueLabelPrefix;
if(attribute.getDefault() != null) {
- return label + " (Default = " + attribute.getDefault() + ")";
+ return label + " " + String.format("(default = %s)", attribute.getDefault()); //$NON-NLS-1$
}
return label;
}
@@ -488,7 +485,7 @@ public class ConfigureInstanceDialog extends SelectionStatusDialog {
Element owner = m_feature.getOwner();
if(DepUtils.getImplementation(candidate) == owner) {
// instance is for owner of feature: examine name
- featureCandidateName = candidate.getName() + "." + m_feature.getName();
+ featureCandidateName = candidate.getName() + "." + m_feature.getName(); //$NON-NLS-1$
}
else if(featureCandidateName != null) {
if(featureCandidateName.equals(candidate.getName())) {
@@ -526,4 +523,13 @@ public class ConfigureInstanceDialog extends SelectionStatusDialog {
return list;
}
+ /**
+ * Add a space before and after
+ *
+ * @param text
+ * @return
+ */
+ public static String addSpaces(String text) {
+ return " " + text + " "; //$NON-NLS-1$ //$NON-NLS-2$
+ }
}
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ConfigurePortDialog.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ConfigurePortDialog.java
index 7fa4f7297bc..6c9e7753ff3 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ConfigurePortDialog.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/ConfigurePortDialog.java
@@ -22,6 +22,7 @@ import org.eclipse.emf.common.util.UniqueEList;
import org.eclipse.emf.ecore.EClassifier;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
@@ -199,6 +200,9 @@ public class ConfigurePortDialog extends SelectionStatusDialog {
fKindCombo = new Combo(instanceConfigurationGroup, SWT.NONE);
portKindList = getAvailableKinds(m_model);
+ if (portKindList.size() == 0) {
+ MessageDialog.openInformation(new Shell(), "No port kinds founds", "No port kinds are available. Please import a Qompass model library");
+ }
String[] portKindStrList = new String[portKindList.size() + 1];
portKindStrList[0] = Messages.ConfigurePortDialog_None;
for(int i = 0; i < portKindList.size(); i++) {
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/handlers/AddProfileAndModelLibsHandler.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/handlers/AddProfileAndModelLibsHandler.java
index 5e712ee7d82..38184a3c695 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/handlers/AddProfileAndModelLibsHandler.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/handlers/AddProfileAndModelLibsHandler.java
@@ -78,8 +78,8 @@ public class AddProfileAndModelLibsHandler extends CmdHandler {
int result = dialog.open();
if(result == IDialogConstants.OK_ID) {
addModelLibs.setImportList(dialog.getResult());
- CommandSupport.exec(domain, addModelLibs);
- CommandSupport.exec(domain, addProfiles);
+ CommandSupport.exec(addModelLibs);
+ CommandSupport.exec(addProfiles);
// open dialog?
// MessageDialog.openWarning(new Shell(),
// "Warning", "The MARTE profile is not available."); //$NON-NLS-1$ //$NON-NLS-2$

Back to the top