Skip to content
Browse files

regenerated some code

got workbench hosted forms project running on dev
resolved session form model issue
resolved jvm 1.6 target issues
  • Loading branch information...
1 parent e00f7d8 commit fa165a973ceadc7c0b35a6f0ea69c1785ee4aed6 @gregjan gregjan committed
Showing with 1,562 additions and 3,206 deletions.
  1. +1 −1 crosswalk-gmf.diagram/META-INF/MANIFEST.MF
  2. +1 −18 crosswalk-gmf.diagram/plugin.xml
  3. +1 −1 crosswalk-gmf.diagram/src/crosswalk/diagram/custom/CompartmentChildCreateCommand.java
  4. +1 −0 crosswalk-gmf.diagram/src/crosswalk/diagram/custom/DictionaryPreference.java
  5. +0 −1 crosswalk-gmf.diagram/src/crosswalk/diagram/custom/ReorderCompartmentEditPolicy.java
  6. +0 −1 crosswalk-gmf.diagram/src/crosswalk/diagram/custom/ReplaceNewObjectWithTemplateCommand.java
  7. +8 −14 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/CrossWalkCreateCommand.java
  8. +7 −14 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/CurrentDateCreateCommand.java
  9. +8 −16 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/CurrentUsernameCreateCommand.java
  10. +8 −16 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/DateInputFieldCreateCommand.java
  11. +8 −17 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/DateRecognizerCreateCommand.java
  12. +8 −16 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/DelimitedFileCreateCommand.java
  13. +8 −14 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/DictionaryCreateCommand.java
  14. +7 −14 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/FormCreateCommand.java
  15. +5 −8 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/InputOutputCreateCommand.java
  16. +7 −10 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/InputOutputReorientCommand.java
  17. +8 −16 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/MappedAttributeCreateCommand.java
  18. +8 −16 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/MappedElement2CreateCommand.java
  19. +8 −17 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/MappedElementCreateCommand.java
  20. +8 −16 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/MetadataBlock2CreateCommand.java
  21. +8 −16 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/MetadataBlock3CreateCommand.java
  22. +8 −16 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/MetadataBlockCreateCommand.java
  23. +8 −17 ...swalk-gmf.diagram/src/crosswalk/diagram/edit/commands/OriginalNameRecordMatcherCreateCommand.java
  24. +8 −14 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/ParagraphCreateCommand.java
  25. +8 −16 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/TabbedDataFieldCreateCommand.java
  26. +7 −15 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/TextCreateCommand.java
  27. +8 −16 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/TextInputFieldCreateCommand.java
  28. +8 −17 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/TrimWhitespaceCreateCommand.java
  29. +68 −2 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/helpers/CrosswalkBaseEditHelper.java
  30. +1 −2 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/helpers/OriginalNameRecordMatcherEditHelper.java
  31. +11 −24 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/CrossWalkEditPart.java
  32. +6 −15 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/CrossWalkModelBoxCompartmentEditPart.java
  33. +206 −125 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/CrosswalkEditPartFactory.java
  34. +6 −13 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/CurrentDateEditPart.java
  35. +6 −13 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/CurrentUsernameEditPart.java
  36. +8 −18 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/DateInputFieldEditPart.java
  37. +60 −154 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/DateInputFieldLabelEditPart.java
  38. +7 −14 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/DateRecognizerEditPart.java
  39. +6 −15 ...swalk-gmf.diagram/src/crosswalk/diagram/edit/parts/DelimitedFileDataFieldCompartmentEditPart.java
  40. +12 −27 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/DelimitedFileEditPart.java
  41. +76 −187 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/DelimitedFileSourceFileEditPart.java
  42. +60 −154 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/DictionaryDescriptionEditPart.java
  43. +11 −21 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/DictionaryEditPart.java
  44. +6 −15 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/DictionaryModelBoxCompartmentEditPart.java
  45. +60 −154 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/DictionaryNameEditPart.java
  46. +3 −11 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/EditingContainerEditPart.java
  47. +60 −154 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/FormDescriptionEditPart.java
  48. +17 −35 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/FormEditPart.java
  49. +7 −15 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/FormModelBoxCompartmentEditPart.java
  50. +60 −154 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/FormTitleEditPart.java
  51. +2 −4 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/InputOutputEditPart.java
  52. +9 −18 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/MappedAttributeEditPart.java
  53. +12 −26 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/MappedElement2EditPart.java
  54. +8 −18 ...-gmf.diagram/src/crosswalk/diagram/edit/parts/MappedElementChildElementsCompartment2EditPart.java
  55. +8 −18 ...k-gmf.diagram/src/crosswalk/diagram/edit/parts/MappedElementChildElementsCompartmentEditPart.java
  56. +12 −26 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/MappedElementEditPart.java
  57. +28 −56 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/MetadataBlock2EditPart.java
  58. +28 −56 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/MetadataBlock3EditPart.java
  59. +28 −56 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/MetadataBlockEditPart.java
  60. +6 −15 ...m/src/crosswalk/diagram/edit/parts/MetadataBlockMetadataBlockInputFieldsCompartment2EditPart.java
  61. +6 −15 ...m/src/crosswalk/diagram/edit/parts/MetadataBlockMetadataBlockInputFieldsCompartment3EditPart.java
  62. +6 −16 ...am/src/crosswalk/diagram/edit/parts/MetadataBlockMetadataBlockInputFieldsCompartmentEditPart.java
  63. +7 −17 ...agram/src/crosswalk/diagram/edit/parts/MetadataBlockMetadataBlockMappingCompartment2EditPart.java
  64. +6 −15 ...agram/src/crosswalk/diagram/edit/parts/MetadataBlockMetadataBlockMappingCompartment3EditPart.java
  65. +7 −17 ...iagram/src/crosswalk/diagram/edit/parts/MetadataBlockMetadataBlockMappingCompartmentEditPart.java
  66. +60 −154 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/MetadataBlockName2EditPart.java
  67. +60 −154 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/MetadataBlockName3EditPart.java
  68. +60 −154 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/MetadataBlockNameEditPart.java
  69. +7 −15 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/OriginalNameRecordMatcherEditPart.java
  70. +7 −16 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/ParagraphEditPart.java
  71. +60 −154 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/ParagraphHeadingEditPart.java
  72. +60 −154 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/ParagraphTextEditPart.java
  73. +9 −18 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/TabbedDataFieldEditPart.java
  74. +61 −154 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/TabbedDataFieldLabelColumnNumberEditPart.java
  75. +6 −13 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/TextEditPart.java
  76. +9 −18 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/TextInputFieldEditPart.java
  77. +60 −154 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/TextInputFieldLabelEditPart.java
Sorry, we could not display the entire diff because it was too big.
View
2 crosswalk-gmf.diagram/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: crosswalk-gmf.diagram; singleton:=true
-Bundle-Version: 4.0.0.qualifier
+Bundle-Version: 4.0.1.qualifier
Bundle-ClassPath: .,juniversalchardet-1.0.3.jar
Bundle-Activator: crosswalk.diagram.part.CrosswalkDiagramEditorPlugin
Bundle-Vendor: %providerName
View
19 crosswalk-gmf.diagram/plugin.xml
@@ -256,24 +256,7 @@ copyright 2010 University of North Carolina at Chapel Hill
<object class="crosswalk.diagram.edit.parts.CrossWalkEditPart" id="CrossWalk_2001"/>
<object class="crosswalk.diagram.edit.parts.DictionaryEditPart" id="Dictionary_2002"/>
<object class="crosswalk.diagram.edit.parts.FormEditPart" id="Form_2003"/>
- <object class="crosswalk.diagram.edit.parts.DelimitedFileEditPart" id="DelimitedFile_3001"/>
- <object class="crosswalk.diagram.edit.parts.TabbedDataFieldEditPart" id="TabbedDataField_3002"/>
- <object class="crosswalk.diagram.edit.parts.OriginalNameRecordMatcherEditPart" id="OriginalNameRecordMatcher_3003"/>
- <object class="crosswalk.diagram.edit.parts.DateRecognizerEditPart" id="DateRecognizer_3004"/>
- <object class="crosswalk.diagram.edit.parts.TextEditPart" id="Text_3005"/>
- <object class="crosswalk.diagram.edit.parts.TrimWhitespaceEditPart" id="TrimWhitespace_3006"/>
- <object class="crosswalk.diagram.edit.parts.MappedElementEditPart" id="MappedElement_3007"/>
- <object class="crosswalk.diagram.edit.parts.MappedElement2EditPart" id="MappedElement_3008"/>
- <object class="crosswalk.diagram.edit.parts.MappedAttributeEditPart" id="MappedAttribute_3009"/>
- <object class="crosswalk.diagram.edit.parts.MetadataBlock2EditPart" id="MetadataBlock_3018"/>
- <object class="crosswalk.diagram.edit.parts.TextInputFieldEditPart" id="TextInputField_3023"/>
- <object class="crosswalk.diagram.edit.parts.CurrentDateEditPart" id="CurrentDate_3021"/>
- <object class="crosswalk.diagram.edit.parts.CurrentUsernameEditPart" id="CurrentUsername_3022"/>
- <object class="crosswalk.diagram.edit.parts.DateInputFieldEditPart" id="DateInputField_3024"/>
- <object class="crosswalk.diagram.edit.parts.MetadataBlockEditPart" id="MetadataBlock_3010"/>
- <object class="crosswalk.diagram.edit.parts.MetadataBlock3EditPart" id="MetadataBlock_3019"/>
- <object class="crosswalk.diagram.edit.parts.ParagraphEditPart" id="Paragraph_3020"/>
- <context elements="EditingContainer_1000,CrossWalk_2001,Dictionary_2002,Form_2003,DelimitedFile_3001,TabbedDataField_3002,OriginalNameRecordMatcher_3003,DateRecognizer_3004,Text_3005,TrimWhitespace_3006,MappedElement_3007,MappedElement_3008,MappedAttribute_3009,MetadataBlock_3018,TextInputField_3023,CurrentDate_3021,CurrentUsername_3022,DateInputField_3024,MetadataBlock_3010,MetadataBlock_3019,Paragraph_3020"/>
+ <context elements="EditingContainer_1000,CrossWalk_2001,Dictionary_2002,Form_2003"/>
</modelingAssistantProvider>
</extension>
View
2 crosswalk-gmf.diagram/src/crosswalk/diagram/custom/CompartmentChildCreateCommand.java
@@ -7,9 +7,9 @@
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
import org.eclipse.gmf.runtime.diagram.ui.commands.CreateCommand;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.util.Assert;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor;
public class CompartmentChildCreateCommand extends CreateCommand {
int index;
View
1 crosswalk-gmf.diagram/src/crosswalk/diagram/custom/DictionaryPreference.java
@@ -2,6 +2,7 @@
import java.util.ArrayList;
import java.util.List;
+
import org.eclipse.emf.common.util.URI;
import crosswalk.diagram.part.CrosswalkDiagramEditorPlugin;
View
1 crosswalk-gmf.diagram/src/crosswalk/diagram/custom/ReorderCompartmentEditPolicy.java
@@ -1,6 +1,5 @@
package crosswalk.diagram.custom;
-import org.eclipse.draw2d.PositionConstants;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
View
1 crosswalk-gmf.diagram/src/crosswalk/diagram/custom/ReplaceNewObjectWithTemplateCommand.java
@@ -9,7 +9,6 @@
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
View
22 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/CrossWalkCreateCommand.java
@@ -33,8 +33,7 @@ public CrossWalkCreateCommand(CreateElementRequest req) {
* @generated
*/
protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest())
- .getContainer();
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
if (container instanceof View) {
container = ((View) container).getElement();
}
@@ -56,8 +55,7 @@ public boolean canExecute() {
/**
* @generated
*/
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
CrossWalk newElement = CrosswalkFactory.eINSTANCE.createCrossWalk();
EditingContainer owner = (EditingContainer) getElementToEdit();
@@ -72,17 +70,13 @@ protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
/**
* @generated
*/
- protected void doConfigure(CrossWalk newElement, IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest) getRequest())
- .getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(
- getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest) getRequest())
- .getClientContext());
+ protected void doConfigure(CrossWalk newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType
- .getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if (configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
View
21 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/CurrentDateCreateCommand.java
@@ -33,8 +33,7 @@ public CurrentDateCreateCommand(CreateElementRequest req) {
* @generated
*/
protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest())
- .getContainer();
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
if (container instanceof View) {
container = ((View) container).getElement();
}
@@ -52,8 +51,7 @@ public boolean canExecute() {
/**
* @generated
*/
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
CurrentDate newElement = CrosswalkFactory.eINSTANCE.createCurrentDate();
MappingContainer owner = (MappingContainer) getElementToEdit();
@@ -68,18 +66,13 @@ protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
/**
* @generated
*/
- protected void doConfigure(CurrentDate newElement,
- IProgressMonitor monitor, IAdaptable info)
+ protected void doConfigure(CurrentDate newElement, IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- IElementType elementType = ((CreateElementRequest) getRequest())
- .getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(
- getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest) getRequest())
- .getClientContext());
+ IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType
- .getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if (configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
View
24 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/CurrentUsernameCreateCommand.java
@@ -33,8 +33,7 @@ public CurrentUsernameCreateCommand(CreateElementRequest req) {
* @generated
*/
protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest())
- .getContainer();
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
if (container instanceof View) {
container = ((View) container).getElement();
}
@@ -52,10 +51,8 @@ public boolean canExecute() {
/**
* @generated
*/
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- CurrentUsername newElement = CrosswalkFactory.eINSTANCE
- .createCurrentUsername();
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ CurrentUsername newElement = CrosswalkFactory.eINSTANCE.createCurrentUsername();
MappingContainer owner = (MappingContainer) getElementToEdit();
owner.getWidgets().add(newElement);
@@ -69,18 +66,13 @@ protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
/**
* @generated
*/
- protected void doConfigure(CurrentUsername newElement,
- IProgressMonitor monitor, IAdaptable info)
+ protected void doConfigure(CurrentUsername newElement, IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- IElementType elementType = ((CreateElementRequest) getRequest())
- .getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(
- getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest) getRequest())
- .getClientContext());
+ IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType
- .getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if (configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
View
24 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/DateInputFieldCreateCommand.java
@@ -33,8 +33,7 @@ public DateInputFieldCreateCommand(CreateElementRequest req) {
* @generated
*/
protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest())
- .getContainer();
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
if (container instanceof View) {
container = ((View) container).getElement();
}
@@ -52,10 +51,8 @@ public boolean canExecute() {
/**
* @generated
*/
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- DateInputField newElement = CrosswalkFactory.eINSTANCE
- .createDateInputField();
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ DateInputField newElement = CrosswalkFactory.eINSTANCE.createDateInputField();
MetadataBlock owner = (MetadataBlock) getElementToEdit();
owner.getPorts().add(newElement);
@@ -69,18 +66,13 @@ protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
/**
* @generated
*/
- protected void doConfigure(DateInputField newElement,
- IProgressMonitor monitor, IAdaptable info)
+ protected void doConfigure(DateInputField newElement, IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- IElementType elementType = ((CreateElementRequest) getRequest())
- .getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(
- getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest) getRequest())
- .getClientContext());
+ IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType
- .getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if (configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
View
25 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/DateRecognizerCreateCommand.java
@@ -27,7 +27,6 @@
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.gmf.runtime.notation.View;
-import crosswalk.CrossWalk;
import crosswalk.CrosswalkFactory;
import crosswalk.DateRecognizer;
import crosswalk.MappingContainer;
@@ -50,8 +49,7 @@ public DateRecognizerCreateCommand(CreateElementRequest req) {
*/
@Override
protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest())
- .getContainer();
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
if (container instanceof View) {
container = ((View) container).getElement();
}
@@ -71,10 +69,8 @@ public boolean canExecute() {
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- DateRecognizer newElement = CrosswalkFactory.eINSTANCE
- .createDateRecognizer();
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ DateRecognizer newElement = CrosswalkFactory.eINSTANCE.createDateRecognizer();
MappingContainer owner = (MappingContainer) getElementToEdit();
owner.getWidgets().add(newElement);
@@ -88,18 +84,13 @@ protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
/**
* @generated
*/
- protected void doConfigure(DateRecognizer newElement,
- IProgressMonitor monitor, IAdaptable info)
+ protected void doConfigure(DateRecognizer newElement, IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- IElementType elementType = ((CreateElementRequest) getRequest())
- .getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(
- getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest) getRequest())
- .getClientContext());
+ IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType
- .getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if (configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
View
24 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/DelimitedFileCreateCommand.java
@@ -36,8 +36,7 @@ public DelimitedFileCreateCommand(CreateElementRequest req) {
* @generated
*/
protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest())
- .getContainer();
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
if (container instanceof View) {
container = ((View) container).getElement();
}
@@ -59,10 +58,8 @@ public boolean canExecute() {
/**
* @generated
*/
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- DelimitedFile newElement = CrosswalkFactory.eINSTANCE
- .createDelimitedFile();
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ DelimitedFile newElement = CrosswalkFactory.eINSTANCE.createDelimitedFile();
CrossWalk owner = (CrossWalk) getElementToEdit();
owner.setDataSource(newElement);
@@ -76,18 +73,13 @@ protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
/**
* @generated
*/
- protected void doConfigure(DelimitedFile newElement,
- IProgressMonitor monitor, IAdaptable info)
+ protected void doConfigure(DelimitedFile newElement, IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- IElementType elementType = ((CreateElementRequest) getRequest())
- .getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(
- getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest) getRequest())
- .getClientContext());
+ IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType
- .getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if (configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
View
22 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/DictionaryCreateCommand.java
@@ -33,8 +33,7 @@ public DictionaryCreateCommand(CreateElementRequest req) {
* @generated
*/
protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest())
- .getContainer();
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
if (container instanceof View) {
container = ((View) container).getElement();
}
@@ -56,8 +55,7 @@ public boolean canExecute() {
/**
* @generated
*/
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Dictionary newElement = CrosswalkFactory.eINSTANCE.createDictionary();
EditingContainer owner = (EditingContainer) getElementToEdit();
@@ -72,17 +70,13 @@ protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
/**
* @generated
*/
- protected void doConfigure(Dictionary newElement, IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest) getRequest())
- .getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(
- getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest) getRequest())
- .getClientContext());
+ protected void doConfigure(Dictionary newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType
- .getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if (configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
View
21 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/FormCreateCommand.java
@@ -33,8 +33,7 @@ public FormCreateCommand(CreateElementRequest req) {
* @generated
*/
protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest())
- .getContainer();
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
if (container instanceof View) {
container = ((View) container).getElement();
}
@@ -56,8 +55,7 @@ public boolean canExecute() {
/**
* @generated
*/
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Form newElement = CrosswalkFactory.eINSTANCE.createForm();
EditingContainer owner = (EditingContainer) getElementToEdit();
@@ -72,17 +70,12 @@ protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
/**
* @generated
*/
- protected void doConfigure(Form newElement, IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest) getRequest())
- .getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(
- getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest) getRequest())
- .getClientContext());
+ protected void doConfigure(Form newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType
- .getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if (configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
View
13 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/InputOutputCreateCommand.java
@@ -30,8 +30,7 @@
/**
* @generated
*/
- public InputOutputCreateCommand(CreateRelationshipRequest request,
- EObject source, EObject target) {
+ public InputOutputCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
super(request.getLabel(), null, request);
this.source = source;
this.target = target;
@@ -54,18 +53,16 @@ public boolean canExecute() {
return true; // link creation is in progress; source is not defined yet
}
// target may be null here but it's possible to check constraint
- return CrosswalkBaseItemSemanticEditPolicy.getLinkConstraints()
- .canCreateInputOutput_4001(getSource(), getTarget());
+ return CrosswalkBaseItemSemanticEditPolicy.getLinkConstraints().canCreateInputOutput_4001(getSource(),
+ getTarget());
}
/**
* @generated
*/
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
if (!canExecute()) {
- throw new ExecutionException(
- "Invalid arguments in create link command"); //$NON-NLS-1$
+ throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
if (getSource() != null && getTarget() != null) {
View
17 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/InputOutputReorientCommand.java
@@ -41,8 +41,7 @@
/**
* @generated
*/
- public InputOutputReorientCommand(
- ReorientReferenceRelationshipRequest request) {
+ public InputOutputReorientCommand(ReorientReferenceRelationshipRequest request) {
super(request.getLabel(), null, request);
reorientDirection = request.getDirection();
referenceOwner = request.getReferenceOwner();
@@ -73,8 +72,8 @@ protected boolean canReorientSource() {
if (!(oldEnd instanceof Output && newEnd instanceof Input)) {
return false;
}
- return CrosswalkBaseItemSemanticEditPolicy.getLinkConstraints()
- .canExistInputOutput_4001(getNewSource(), getOldTarget());
+ return CrosswalkBaseItemSemanticEditPolicy.getLinkConstraints().canExistInputOutput_4001(getNewSource(),
+ getOldTarget());
}
/**
@@ -84,18 +83,16 @@ protected boolean canReorientTarget() {
if (!(oldEnd instanceof Output && newEnd instanceof Output)) {
return false;
}
- return CrosswalkBaseItemSemanticEditPolicy.getLinkConstraints()
- .canExistInputOutput_4001(getOldSource(), getNewTarget());
+ return CrosswalkBaseItemSemanticEditPolicy.getLinkConstraints().canExistInputOutput_4001(getOldSource(),
+ getNewTarget());
}
/**
* @generated
*/
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
if (!canExecute()) {
- throw new ExecutionException(
- "Invalid arguments in reorient link command"); //$NON-NLS-1$
+ throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
}
if (reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
return reorientSource();
View
24 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/MappedAttributeCreateCommand.java
@@ -36,8 +36,7 @@ public MappedAttributeCreateCommand(CreateElementRequest req) {
* @generated
*/
protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest())
- .getContainer();
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
if (container instanceof View) {
container = ((View) container).getElement();
}
@@ -55,10 +54,8 @@ public boolean canExecute() {
/**
* @generated
*/
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- MappedAttribute newElement = CrosswalkFactory.eINSTANCE
- .createMappedAttribute();
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ MappedAttribute newElement = CrosswalkFactory.eINSTANCE.createMappedAttribute();
MappedElement owner = (MappedElement) getElementToEdit();
owner.getAttributes().add(newElement);
@@ -72,18 +69,13 @@ protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
/**
* @generated
*/
- protected void doConfigure(MappedAttribute newElement,
- IProgressMonitor monitor, IAdaptable info)
+ protected void doConfigure(MappedAttribute newElement, IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- IElementType elementType = ((CreateElementRequest) getRequest())
- .getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(
- getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest) getRequest())
- .getClientContext());
+ IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType
- .getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if (configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
View
24 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/MappedElement2CreateCommand.java
@@ -36,8 +36,7 @@ public MappedElement2CreateCommand(CreateElementRequest req) {
*/
@Override
protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest())
- .getContainer();
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
if (container instanceof View) {
container = ((View) container).getElement();
}
@@ -57,10 +56,8 @@ public boolean canExecute() {
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- MappedElement newElement = CrosswalkFactory.eINSTANCE
- .createMappedElement();
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ MappedElement newElement = CrosswalkFactory.eINSTANCE.createMappedElement();
MappedElement owner = (MappedElement) getElementToEdit();
owner.getChildElements().add(newElement);
@@ -74,18 +71,13 @@ protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
/**
* @generated
*/
- protected void doConfigure(MappedElement newElement,
- IProgressMonitor monitor, IAdaptable info)
+ protected void doConfigure(MappedElement newElement, IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- IElementType elementType = ((CreateElementRequest) getRequest())
- .getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(
- getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest) getRequest())
- .getClientContext());
+ IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType
- .getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if (configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
View
25 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/MappedElementCreateCommand.java
@@ -15,7 +15,6 @@
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.gmf.runtime.notation.View;
-import crosswalk.CrossWalk;
import crosswalk.CrosswalkFactory;
import crosswalk.MappedElement;
import crosswalk.MappingContainer;
@@ -39,8 +38,7 @@ public MappedElementCreateCommand(CreateElementRequest req) {
*/
@Override
protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest())
- .getContainer();
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
if (container instanceof View) {
container = ((View) container).getElement();
}
@@ -60,10 +58,8 @@ public boolean canExecute() {
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- MappedElement newElement = CrosswalkFactory.eINSTANCE
- .createMappedElement();
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ MappedElement newElement = CrosswalkFactory.eINSTANCE.createMappedElement();
MappingContainer owner = (MappingContainer) getElementToEdit();
owner.getElements().add(newElement);
@@ -77,18 +73,13 @@ protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
/**
* @generated
*/
- protected void doConfigure(MappedElement newElement,
- IProgressMonitor monitor, IAdaptable info)
+ protected void doConfigure(MappedElement newElement, IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- IElementType elementType = ((CreateElementRequest) getRequest())
- .getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(
- getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest) getRequest())
- .getClientContext());
+ IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType
- .getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if (configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
View
24 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/MetadataBlock2CreateCommand.java
@@ -33,8 +33,7 @@ public MetadataBlock2CreateCommand(CreateElementRequest req) {
* @generated
*/
protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest())
- .getContainer();
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
if (container instanceof View) {
container = ((View) container).getElement();
}
@@ -52,10 +51,8 @@ public boolean canExecute() {
/**
* @generated
*/
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- MetadataBlock newElement = CrosswalkFactory.eINSTANCE
- .createMetadataBlock();
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ MetadataBlock newElement = CrosswalkFactory.eINSTANCE.createMetadataBlock();
MappingContainer owner = (MappingContainer) getElementToEdit();
owner.getElements().add(newElement);
@@ -69,18 +66,13 @@ protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
/**
* @generated
*/
- protected void doConfigure(MetadataBlock newElement,
- IProgressMonitor monitor, IAdaptable info)
+ protected void doConfigure(MetadataBlock newElement, IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- IElementType elementType = ((CreateElementRequest) getRequest())
- .getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(
- getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest) getRequest())
- .getClientContext());
+ IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType
- .getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if (configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
View
24 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/MetadataBlock3CreateCommand.java
@@ -33,8 +33,7 @@ public MetadataBlock3CreateCommand(CreateElementRequest req) {
* @generated
*/
protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest())
- .getContainer();
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
if (container instanceof View) {
container = ((View) container).getElement();
}
@@ -52,10 +51,8 @@ public boolean canExecute() {
/**
* @generated
*/
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- MetadataBlock newElement = CrosswalkFactory.eINSTANCE
- .createMetadataBlock();
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ MetadataBlock newElement = CrosswalkFactory.eINSTANCE.createMetadataBlock();
Form owner = (Form) getElementToEdit();
owner.getElements().add(newElement);
@@ -69,18 +66,13 @@ protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
/**
* @generated
*/
- protected void doConfigure(MetadataBlock newElement,
- IProgressMonitor monitor, IAdaptable info)
+ protected void doConfigure(MetadataBlock newElement, IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- IElementType elementType = ((CreateElementRequest) getRequest())
- .getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(
- getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest) getRequest())
- .getClientContext());
+ IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType
- .getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if (configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
View
24 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/MetadataBlockCreateCommand.java
@@ -33,8 +33,7 @@ public MetadataBlockCreateCommand(CreateElementRequest req) {
* @generated
*/
protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest())
- .getContainer();
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
if (container instanceof View) {
container = ((View) container).getElement();
}
@@ -52,10 +51,8 @@ public boolean canExecute() {
/**
* @generated
*/
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- MetadataBlock newElement = CrosswalkFactory.eINSTANCE
- .createMetadataBlock();
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ MetadataBlock newElement = CrosswalkFactory.eINSTANCE.createMetadataBlock();
Dictionary owner = (Dictionary) getElementToEdit();
owner.getBlocks().add(newElement);
@@ -69,18 +66,13 @@ protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
/**
* @generated
*/
- protected void doConfigure(MetadataBlock newElement,
- IProgressMonitor monitor, IAdaptable info)
+ protected void doConfigure(MetadataBlock newElement, IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- IElementType elementType = ((CreateElementRequest) getRequest())
- .getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(
- getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest) getRequest())
- .getClientContext());
+ IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType
- .getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if (configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
View
25 ...f.diagram/src/crosswalk/diagram/edit/commands/OriginalNameRecordMatcherCreateCommand.java
@@ -27,7 +27,6 @@
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.gmf.runtime.notation.View;
-import crosswalk.CrossWalk;
import crosswalk.CrosswalkFactory;
import crosswalk.MappingContainer;
import crosswalk.OriginalNameRecordMatcher;
@@ -50,8 +49,7 @@ public OriginalNameRecordMatcherCreateCommand(CreateElementRequest req) {
*/
@Override
protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest())
- .getContainer();
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
if (container instanceof View) {
container = ((View) container).getElement();
}
@@ -71,10 +69,8 @@ public boolean canExecute() {
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- OriginalNameRecordMatcher newElement = CrosswalkFactory.eINSTANCE
- .createOriginalNameRecordMatcher();
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ OriginalNameRecordMatcher newElement = CrosswalkFactory.eINSTANCE.createOriginalNameRecordMatcher();
MappingContainer owner = (MappingContainer) getElementToEdit();
owner.getWidgets().add(newElement);
@@ -88,18 +84,13 @@ protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
/**
* @generated
*/
- protected void doConfigure(OriginalNameRecordMatcher newElement,
- IProgressMonitor monitor, IAdaptable info)
+ protected void doConfigure(OriginalNameRecordMatcher newElement, IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- IElementType elementType = ((CreateElementRequest) getRequest())
- .getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(
- getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest) getRequest())
- .getClientContext());
+ IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType
- .getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if (configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
View
22 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/ParagraphCreateCommand.java
@@ -33,8 +33,7 @@ public ParagraphCreateCommand(CreateElementRequest req) {
* @generated
*/
protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest())
- .getContainer();
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
if (container instanceof View) {
container = ((View) container).getElement();
}
@@ -52,8 +51,7 @@ public boolean canExecute() {
/**
* @generated
*/
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Paragraph newElement = CrosswalkFactory.eINSTANCE.createParagraph();
Form owner = (Form) getElementToEdit();
@@ -68,17 +66,13 @@ protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
/**
* @generated
*/
- protected void doConfigure(Paragraph newElement, IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest) getRequest())
- .getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(
- getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest) getRequest())
- .getClientContext());
+ protected void doConfigure(Paragraph newElement, IProgressMonitor monitor, IAdaptable info)
+ throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType
- .getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if (configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
View
24 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/TabbedDataFieldCreateCommand.java
@@ -49,8 +49,7 @@ public TabbedDataFieldCreateCommand(CreateElementRequest req) {
*/
@Override
protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest())
- .getContainer();
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
if (container instanceof View) {
container = ((View) container).getElement();
}
@@ -70,10 +69,8 @@ public boolean canExecute() {
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- TabbedDataField newElement = CrosswalkFactory.eINSTANCE
- .createTabbedDataField();
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ TabbedDataField newElement = CrosswalkFactory.eINSTANCE.createTabbedDataField();
DataSource owner = (DataSource) getElementToEdit();
owner.getFields().add(newElement);
@@ -87,18 +84,13 @@ protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
/**
* @generated
*/
- protected void doConfigure(TabbedDataField newElement,
- IProgressMonitor monitor, IAdaptable info)
+ protected void doConfigure(TabbedDataField newElement, IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- IElementType elementType = ((CreateElementRequest) getRequest())
- .getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(
- getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest) getRequest())
- .getClientContext());
+ IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType
- .getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if (configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
View
22 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/TextCreateCommand.java
@@ -27,7 +27,6 @@
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.gmf.runtime.notation.View;
-import crosswalk.CrossWalk;
import crosswalk.CrosswalkFactory;
import crosswalk.MappingContainer;
import crosswalk.Text;
@@ -49,8 +48,7 @@ public TextCreateCommand(CreateElementRequest req) {
* @generated
*/
protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest())
- .getContainer();
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
if (container instanceof View) {
container = ((View) container).getElement();
}
@@ -68,8 +66,7 @@ public boolean canExecute() {
/**
* @generated
*/
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Text newElement = CrosswalkFactory.eINSTANCE.createText();
MappingContainer owner = (MappingContainer) getElementToEdit();
@@ -84,17 +81,12 @@ protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
/**
* @generated
*/
- protected void doConfigure(Text newElement, IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- IElementType elementType = ((CreateElementRequest) getRequest())
- .getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(
- getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest) getRequest())
- .getClientContext());
+ protected void doConfigure(Text newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType
- .getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if (configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
View
24 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/TextInputFieldCreateCommand.java
@@ -33,8 +33,7 @@ public TextInputFieldCreateCommand(CreateElementRequest req) {
* @generated
*/
protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest())
- .getContainer();
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
if (container instanceof View) {
container = ((View) container).getElement();
}
@@ -52,10 +51,8 @@ public boolean canExecute() {
/**
* @generated
*/
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- TextInputField newElement = CrosswalkFactory.eINSTANCE
- .createTextInputField();
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ TextInputField newElement = CrosswalkFactory.eINSTANCE.createTextInputField();
MetadataBlock owner = (MetadataBlock) getElementToEdit();
owner.getPorts().add(newElement);
@@ -69,18 +66,13 @@ protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
/**
* @generated
*/
- protected void doConfigure(TextInputField newElement,
- IProgressMonitor monitor, IAdaptable info)
+ protected void doConfigure(TextInputField newElement, IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- IElementType elementType = ((CreateElementRequest) getRequest())
- .getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(
- getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest) getRequest())
- .getClientContext());
+ IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType
- .getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if (configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
View
25 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/commands/TrimWhitespaceCreateCommand.java
@@ -27,7 +27,6 @@
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.gmf.runtime.notation.View;
-import crosswalk.CrossWalk;
import crosswalk.CrosswalkFactory;
import crosswalk.MappingContainer;
import crosswalk.TrimWhitespace;
@@ -50,8 +49,7 @@ public TrimWhitespaceCreateCommand(CreateElementRequest req) {
*/
@Override
protected EObject getElementToEdit() {
- EObject container = ((CreateElementRequest) getRequest())
- .getContainer();
+ EObject container = ((CreateElementRequest) getRequest()).getContainer();
if (container instanceof View) {
container = ((View) container).getElement();
}
@@ -71,10 +69,8 @@ public boolean canExecute() {
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
- IAdaptable info) throws ExecutionException {
- TrimWhitespace newElement = CrosswalkFactory.eINSTANCE
- .createTrimWhitespace();
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ TrimWhitespace newElement = CrosswalkFactory.eINSTANCE.createTrimWhitespace();
MappingContainer owner = (MappingContainer) getElementToEdit();
owner.getWidgets().add(newElement);
@@ -88,18 +84,13 @@ protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
/**
* @generated
*/
- protected void doConfigure(TrimWhitespace newElement,
- IProgressMonitor monitor, IAdaptable info)
+ protected void doConfigure(TrimWhitespace newElement, IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- IElementType elementType = ((CreateElementRequest) getRequest())
- .getElementType();
- ConfigureRequest configureRequest = new ConfigureRequest(
- getEditingDomain(), newElement, elementType);
- configureRequest.setClientContext(((CreateElementRequest) getRequest())
- .getClientContext());
+ IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- ICommand configureCommand = elementType
- .getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if (configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
View
70 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/helpers/CrosswalkBaseEditHelper.java
@@ -26,10 +26,76 @@
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
-import org.eclipse.gmf.tooling.runtime.edit.helpers.GeneratedEditHelperBase;
/**
* @generated
*/
-public class CrosswalkBaseEditHelper extends GeneratedEditHelperBase {
+public class CrosswalkBaseEditHelper extends AbstractEditHelper {
+
+ /**
+ * @generated
+ */
+ public static final String EDIT_POLICY_COMMAND = "edit policy command"; //$NON-NLS-1$
+ /**
+ * @generated
+ */
+ public static final String CONTEXT_ELEMENT_TYPE = "context element type"; //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ protected IEditHelperAdvice[] getEditHelperAdvice(IEditCommandRequest req) {
+ if (req.getParameter(CONTEXT_ELEMENT_TYPE) instanceof IElementType) {
+ return ElementTypeRegistry.getInstance().getEditHelperAdvice(
+ (IElementType) req.getParameter(CONTEXT_ELEMENT_TYPE));
+ }
+ return super.getEditHelperAdvice(req);
+ }
+
+ /**
+ * @generated
+ */
+ protected ICommand getInsteadCommand(IEditCommandRequest req) {
+ ICommand epCommand = (ICommand) req.getParameter(EDIT_POLICY_COMMAND);
+ req.setParameter(EDIT_POLICY_COMMAND, null);
+ ICommand ehCommand = super.getInsteadCommand(req);
+ if (epCommand == null) {
+ return ehCommand;
+ }
+ if (ehCommand == null) {
+ return epCommand;
+ }
+ CompositeCommand command = new CompositeCommand(null);
+ command.add(epCommand);
+ command.add(ehCommand);
+ return command;
+ }
+
+ /**
+ * @generated
+ */
+ protected ICommand getCreateCommand(CreateElementRequest req) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected ICommand getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected ICommand getDestroyElementCommand(DestroyElementRequest req) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected ICommand getDestroyReferenceCommand(DestroyReferenceRequest req) {
+ return null;
+ }
}
View
3 ...k-gmf.diagram/src/crosswalk/diagram/edit/helpers/OriginalNameRecordMatcherEditHelper.java
@@ -18,6 +18,5 @@
/**
* @generated
*/
-public class OriginalNameRecordMatcherEditHelper extends
- CrosswalkBaseEditHelper {
+public class OriginalNameRecordMatcherEditHelper extends CrosswalkBaseEditHelper {
}
View
35 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/CrossWalkEditPart.java
@@ -40,7 +40,6 @@
import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.tooling.runtime.edit.policies.reparent.CreationEditPolicyWithCustomReparent;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
@@ -48,7 +47,6 @@
import crosswalk.diagram.edit.policies.CrossWalkCanonicalEditPolicy;
import crosswalk.diagram.edit.policies.CrossWalkItemSemanticEditPolicy;
-import crosswalk.diagram.part.CrosswalkVisualIDRegistry;
/**
* @generated
@@ -82,16 +80,11 @@ public CrossWalkEditPart(View view) {
*/
@Override
protected void createDefaultEditPolicies() {
- installEditPolicy(EditPolicyRoles.CREATION_ROLE,
- new CreationEditPolicyWithCustomReparent(
- CrosswalkVisualIDRegistry.TYPED_INSTANCE));
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationEditPolicy());
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE,
- new CrossWalkItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE,
- new DragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.CANONICAL_ROLE,
- new CrossWalkCanonicalEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CrossWalkItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new CrossWalkCanonicalEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
// XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
// removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
@@ -104,8 +97,7 @@ protected LayoutEditPolicy createLayoutEditPolicy() {
org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
protected EditPolicy createChildEditPolicy(EditPart child) {
- EditPolicy result = child
- .getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
result = new NonResizableEditPolicy();
}
@@ -144,8 +136,7 @@ protected boolean addFixedChild(EditPart childEditPart) {
if (childEditPart instanceof CrossWalkModelBoxCompartmentEditPart) {
IFigure pane = getPrimaryShape().getFigureModelBox();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((CrossWalkModelBoxCompartmentEditPart) childEditPart)
- .getFigure());
+ pane.add(((CrossWalkModelBoxCompartmentEditPart) childEditPart).getFigure());
return true;
}
return false;
@@ -157,8 +148,8 @@ protected boolean addFixedChild(EditPart childEditPart) {
protected boolean removeFixedChild(EditPart childEditPart) {
if (childEditPart instanceof CrossWalkModelBoxCompartmentEditPart) {
IFigure pane = getPrimaryShape().getFigureModelBox();
- pane.remove(((CrossWalkModelBoxCompartmentEditPart) childEditPart)
- .getFigure());
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.remove(((CrossWalkModelBoxCompartmentEditPart) childEditPart).getFigure());
return true;
}
return false;
@@ -310,8 +301,7 @@ public EditableModelFigure() {
this.setLayoutManager(layoutThis);
this.setBackgroundColor(ColorConstants.lightGray);
- this.setPreferredSize(new Dimension(getMapMode().DPtoLP(1000),
- getMapMode().DPtoLP(1000)));
+ this.setPreferredSize(new Dimension(getMapMode().DPtoLP(1000), getMapMode().DPtoLP(1000)));
createContents();
}
@@ -321,7 +311,6 @@ public EditableModelFigure() {
private void createContents() {
fFigureModelLabelFigure = new WrappingLabel();
-
fFigureModelLabelFigure.setText("");
fFigureModelLabelFigure.setFont(FFIGUREMODELLABELFIGURE_FONT);
@@ -337,7 +326,6 @@ private void createContents() {
this.add(fFigureModelLabelFigure, constraintFFigureModelLabelFigure);
fFigureModelNotesFigure = new WrappingLabel();
-
fFigureModelNotesFigure.setText("");
GridData constraintFFigureModelNotesFigure = new GridData();
@@ -390,8 +378,7 @@ public WrappingLabel getFigureModelNotesFigure() {
/**
* @generated
*/
- static final Font FFIGUREMODELLABELFIGURE_FONT = new Font(
- Display.getCurrent(), Display.getDefault().getSystemFont()
- .getFontData()[0].getName(), 26, SWT.BOLD);
+ static final Font FFIGUREMODELLABELFIGURE_FONT = new Font(Display.getCurrent(), Display.getDefault().getSystemFont()
+ .getFontData()[0].getName(), 26, SWT.BOLD);
}
View
21 ...lk-gmf.diagram/src/crosswalk/diagram/edit/parts/CrossWalkModelBoxCompartmentEditPart.java
@@ -9,17 +9,14 @@
import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.tooling.runtime.edit.policies.reparent.CreationEditPolicyWithCustomReparent;
import crosswalk.diagram.edit.policies.CrossWalkModelBoxCompartmentCanonicalEditPolicy;
import crosswalk.diagram.edit.policies.CrossWalkModelBoxCompartmentItemSemanticEditPolicy;
-import crosswalk.diagram.part.CrosswalkVisualIDRegistry;
import crosswalk.diagram.part.Messages;
/**
* @generated
*/
-public class CrossWalkModelBoxCompartmentEditPart extends
- ShapeCompartmentEditPart {
+public class CrossWalkModelBoxCompartmentEditPart extends ShapeCompartmentEditPart {
/**
* @generated
@@ -44,8 +41,7 @@ public String getCompartmentName() {
* @generated
*/
public IFigure createFigure() {
- ResizableCompartmentFigure result = (ResizableCompartmentFigure) super
- .createFigure();
+ ResizableCompartmentFigure result = (ResizableCompartmentFigure) super.createFigure();
result.setTitleVisibility(false);
return result;
}
@@ -55,15 +51,10 @@ public IFigure createFigure() {
*/
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE,
- new CrossWalkModelBoxCompartmentItemSemanticEditPolicy());
- installEditPolicy(EditPolicyRoles.CREATION_ROLE,
- new CreationEditPolicyWithCustomReparent(
- CrosswalkVisualIDRegistry.TYPED_INSTANCE));
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE,
- new DragDropEditPolicy());
- installEditPolicy(EditPolicyRoles.CANONICAL_ROLE,
- new CrossWalkModelBoxCompartmentCanonicalEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CrossWalkModelBoxCompartmentItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new CrossWalkModelBoxCompartmentCanonicalEditPolicy());
}
/**
View
331 crosswalk-gmf.diagram/src/crosswalk/diagram/edit/parts/CrosswalkEditPartFactory.java
@@ -25,7 +25,6 @@
import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.tooling.runtime.directedit.locator.CellEditorLocatorAccess;
import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Text;
@@ -45,182 +44,176 @@ public EditPart createEditPart(EditPart context, Object model) {
View view = (View) model;
switch (CrosswalkVisualIDRegistry.getVisualID(view)) {
- case EditingContainerEditPart.VISUAL_ID:
- return new EditingContainerEditPart(view);
+ case EditingContainerEditPart.VISUAL_ID:
+ return new EditingContainerEditPart(view);
- case CrossWalkEditPart.VISUAL_ID:
- return new CrossWalkEditPart(view);
+ case CrossWalkEditPart.VISUAL_ID:
+ return new CrossWalkEditPart(view);
- case DictionaryEditPart.VISUAL_ID:
- return new DictionaryEditPart(view);
+ case DictionaryEditPart.VISUAL_ID:
+ return new DictionaryEditPart(view);
- case DictionaryNameEditPart.VISUAL_ID:
- return new DictionaryNameEditPart(view);
+ case DictionaryNameEditPart.VISUAL_ID:
+ return new DictionaryNameEditPart(view);
- case DictionaryDescriptionEditPart.VISUAL_ID:
- return new DictionaryDescriptionEditPart(view);
+ case DictionaryDescriptionEditPart.VISUAL_ID:
+ return new DictionaryDescriptionEditPart(view);
- case FormEditPart.VISUAL_ID:
- return new FormEditPart(view);
+ case FormEditPart.VISUAL_ID:
+ return new FormEditPart(view);
- case FormTitleEditPart.VISUAL_ID:
- return new FormTitleEditPart(view);
+ case FormTitleEditPart.VISUAL_ID:
+ return new FormTitleEditPart(view);
- case FormDescriptionEditPart.VISUAL_ID:
- return new FormDescriptionEditPart(view);
+ case FormDescriptionEditPart.VISUAL_ID:
+ return new FormDescriptionEditPart(view);
- case DelimitedFileEditPart.VISUAL_ID:
- return new DelimitedFileEditPart(view);
+ case DelimitedFileEditPart.VISUAL_ID:
+ return new DelimitedFileEditPart(view);
- case DelimitedFileSourceFileEditPart.VISUAL_ID:
- return new DelimitedFileSourceFileEditPart(view);
+ case DelimitedFileSourceFileEditPart.VISUAL_ID:
+ return new DelimitedFileSourceFileEditPart(view);
- case TabbedDataFieldEditPart.VISUAL_ID:
- return new TabbedDataFieldEditPart(view);
+ case TabbedDataFieldEditPart.VISUAL_ID:
+ return new TabbedDataFieldEditPart(view);
- case WrappingLabelEditPart.VISUAL_ID:
- return new WrappingLabelEditPart(view);
+ case WrappingLabelEditPart.VISUAL_ID:
+ return new WrappingLabelEditPart(view);
- case TabbedDataFieldLabelColumnNumberEditPart.VISUAL_ID:
- return new TabbedDataFieldLabelColumnNumberEditPart(view);
+ case TabbedDataFieldLabelColumnNumberEditPart.VISUAL_ID:
+ return new TabbedDataFieldLabelColumnNumberEditPart(view);
- case OriginalNameRecordMatcherEditPart.VISUAL_ID:
- return new OriginalNameRecordMatcherEditPart(view);
+ case OriginalNameRecordMatcherEditPart.VISUAL_ID:
+ return new OriginalNameRecordMatcherEditPart(view);
- case WrappingLabel2EditPart.VISUAL_ID:
- return new WrappingLabel2EditPart(view);
+ case WrappingLabel2EditPart.VISUAL_ID:
+ return new WrappingLabel2EditPart(view);
- case DateRecognizerEditPart.VISUAL_ID:
- return new DateRecognizerEditPart(view);
+ case DateRecognizerEditPart.VISUAL_ID:
+ return new DateRecognizerEditPart(view);
- case WrappingLabel3EditPart.VISUAL_ID:
- return new WrappingLabel3EditPart(view);
+ case WrappingLabel3EditPart.VISUAL_ID:
+ return new WrappingLabel3EditPart(view);
- case TextEditPart.VISUAL_ID:
- return new TextEditPart(view);
+ case TextEditPart.VISUAL_ID:
+ return new TextEditPart(view);
- case TextValueEditPart.VISUAL_ID:
- return new TextValueEditPart(view);
+ case TextValueEditPart.VISUAL_ID:
+ return new TextValueEditPart(view);
- case TrimWhitespaceEditPart.VISUAL_ID:
- return new TrimWhitespaceEditPart(view);
+ case TrimWhitespaceEditPart.VISUAL_ID:
+ return new TrimWhitespaceEditPart(view);
- case WrappingLabel4EditPart.VISUAL_ID:
- return new WrappingLabel4EditPart(view);
+ case WrappingLabel4EditPart.VISUAL_ID:
+ return new WrappingLabel4EditPart(view);
- case MappedElementEditPart.VISUAL_ID:
- return new MappedElementEditPart(view);
+ case MappedElementEditPart.VISUAL_ID:
+ return new MappedElementEditPart(view);
- case WrappingLabel5EditPart.VISUAL_ID:
- return new WrappingLabel5EditPart(view);
+ case WrappingLabel5EditPart.VISUAL_ID:
+ return new WrappingLabel5EditPart(view);
- case MappedElement2EditPart.VISUAL_ID:
- return new MappedElement2EditPart(view);
+ case MappedElement2EditPart.VISUAL_ID:
+ return new MappedElement2EditPart(view);
- case WrappingLabel6EditPart.VISUAL_ID:
- return new WrappingLabel6EditPart(view);
+ case WrappingLabel6EditPart.VISUAL_ID:
+ return new WrappingLabel6EditPart(view);
- case MappedAttributeEditPart.VISUAL_ID:
- return new MappedAttributeEditPart(view);
+ case MappedAttributeEditPart.VISUAL_ID:
+ return new MappedAttributeEditPart(view);
- case WrappingLabel7EditPart.VISUAL_ID:
- return new WrappingLabel7EditPart(view);
+ case WrappingLabel7EditPart.VISUAL_ID:
+ return new WrappingLabel7EditPart(view);
- case MetadataBlock2EditPart.VISUAL_ID:
- return new MetadataBlock2EditPart(view);
+ case MetadataBlock2EditPart.VISUAL_ID:
+ return new MetadataBlock2EditPart(view);
- case MetadataBlockName2EditPart.VISUAL_ID:
- return new MetadataBlockName2EditPart(view);
+ case MetadataBlockName2EditPart.VISUAL_ID:
+ return new MetadataBlockName2EditPart(view);
- case TextInputFieldEditPart.VISUAL_ID:
- return new TextInputFieldEditPart(view);
+ case TextInputFieldEditPart.VISUAL_ID:
+ return new TextInputFieldEditPart(view);
- case TextInputFieldLabelEditPart.VISUAL_ID:
- return new TextInputFieldLabelEditPart(view);
+ case TextInputFieldLabelEditPart.VISUAL_ID:
+ return new TextInputFieldLabelEditPart(view);
- case CurrentDateEditPart.VISUAL_ID:
- return new CurrentDateEditPart(view);
+ case CurrentDateEditPart.VISUAL_ID:
+ return new CurrentDateEditPart(view);
- case WrappingLabel8EditPart.VISUAL_ID:
- return new WrappingLabel8EditPart(view);
+ case WrappingLabel8EditPart.VISUAL_ID:
+ return new WrappingLabel8EditPart(view);
- case CurrentUsernameEditPart.VISUAL_ID:
- return new CurrentUsernameEditPart(view);
+ case CurrentUsernameEditPart.VISUAL_ID:
+ return new CurrentUsernameEditPart(view);
- case WrappingLabel9EditPart.VISUAL_ID:
- return new WrappingLabel9EditPart(view);
+ case WrappingLabel9EditPart.VISUAL_ID:
+ return new WrappingLabel9EditPart(view);
- case DateInputFieldEditPart.VISUAL_ID:
- return new DateInputFieldEditPart(view);
+ case DateInputFieldEditPart.VISUAL_ID:
+ return new DateInputFieldEditPart(view);
- case DateInputFieldLabelEditPart.VISUAL_ID:
- return new DateInputFieldLabelEditPart(view);
+ case DateInputFieldLabelEditPart.VISUAL_ID:
+ return new DateInputFieldLabelEditPart(view);
- case MetadataBlockEditPart.VISUAL_ID:
- return new MetadataBlockEditPart(view);
+ case MetadataBlockEditPart.VISUAL_ID:
+ return new MetadataBlockEditPart(view);
- case MetadataBlockNameEditPart.VISUAL_ID:
- return new MetadataBlockNameEditPart(view);
+ case MetadataBlockNameEditPart.VISUAL_ID:
+ return new MetadataBlockNameEditPart(view);
- case MetadataBlock3EditPart.VISUAL_ID:
- return new MetadataBlock3EditPart(view);
+ case MetadataBlock3EditPart.VISUAL_ID:
+ return new MetadataBlock3EditPart(view);
- case MetadataBlockName3EditPart.VISUAL_ID:
- return new MetadataBlockName3EditPart(view);
+ case MetadataBlockName3EditPart.VISUAL_ID:
+ return new MetadataBlockName3EditPart(view);
- case ParagraphEditPart.VISUAL_ID:
- return new ParagraphEditPart(view);
+ case ParagraphEditPart.VISUAL_ID:
+ return new ParagraphEditPart(view);
- case ParagraphHeadingEditPart.VISUAL_ID:
- return new ParagraphHeadingEditPart(view);
+ case ParagraphHeadingEditPart.VISUAL_ID:
+ return new ParagraphHeadingEditPart(view);
- case ParagraphTextEditPart.VISUAL_ID:
- return new ParagraphTextEditPart(view);
+ case ParagraphTextEditPart.VISUAL_ID:
+ return new ParagraphTextEditPart(view);
- case CrossWalkModelBoxCompartmentEditPart.VISUAL_ID:
- return new CrossWalkModelBoxCompartmentEditPart(view);
+ case CrossWalkModelBoxCompartmentEditPart.VISUAL_ID:
+ return new CrossWalkModelBoxCompartmentEditPart(view);
- case DelimitedFileDataFieldCompartmentEditPart.VISUAL_ID:
- return new DelimitedFileDataFieldCompartmentEditPart(view);
+ case DelimitedFileDataFieldCompartmentEditPart.VISUAL_ID:
+ return new DelimitedFileDataFieldCompartmentEditPart(view);
- case MappedElementChildElementsCompartmentEditPart.VISUAL_ID:
- return new MappedElementChildElementsCompartmentEditPart(view);
+ case MappedElementChildElementsCompartmentEditPart.VISUAL_ID:
+ return new MappedElementChildElementsCompartmentEditPart(view);
- case MappedElementChildElementsCompartment2EditPart.VISUAL_ID:
- return new MappedElementChildElementsCompartment2EditPart(view);
+ case MappedElementChildElementsCompartment2EditPart.VISUAL_ID:
+ return new MappedElementChildElementsCompartment2EditPart(view);
- case MetadataBlockMetadataBlockInputFieldsCompartment2EditPart.VISUAL_ID:
- return new MetadataBlockMetadataBlockInputFieldsCompartment2EditPart(
- view);
+ case MetadataBlockMetadataBlockInputFieldsCompartment2EditPart.VISUAL_ID:
+ return new MetadataBlockMetadataBlockInputFieldsCompartment2EditPart(view);
- case MetadataBlockMetadataBlockMappingCompartment2EditPart.VISUAL_ID:
- return new MetadataBlockMetadataBlockMappingCompartment2EditPart(
- view);
+ case MetadataBlockMetadataBlockMappingCompartment2EditPart.VISUAL_ID:
+ return new MetadataBlockMetadataBlockMappingCompartment2EditPart(view);
- case DictionaryModelBoxCompartmentEditPart.VISUAL_ID:
- return new DictionaryModelBoxCompartmentEditPart(view);
+ case DictionaryModelBoxCompartmentEditPart.VISUAL_ID:
+ return new DictionaryModelBoxCompartmentEditPart(view);
- case MetadataBlockMetadataBlockInputFieldsCompartmentEditPart.VISUAL_ID:
- return new MetadataBlockMetadataBlockInputFieldsCompartmentEditPart(
- view);
+ case MetadataBlockMetadataBlockInputFieldsCompartmentEditPart.VISUAL_ID:
+ return new MetadataBlockMetadataBlockInputFieldsCompartmentEditPart(view);
- case MetadataBlockMetadataBlockMappingCompartmentEditPart.VISUAL_ID:
- return new MetadataBlockMetadataBlockMappingCompartmentEditPart(
- view);
+ case MetadataBlockMetadataBlockMappingCompartmentEditPart.VISUAL_ID:
+ return new MetadataBlockMetadataBlockMappingCompartmentEditPart(view);
- case FormModelBoxCompartmentEditPart.VISUAL_ID:
- return new FormModelBoxCompartmentEditPart(view);
+ case FormModelBoxCompartmentEditPart.VISUAL_ID:
+ return new FormModelBoxCompartmentEditPart(view);
- case MetadataBlockMetadataBlockInputFieldsCompartment3EditPart.VISUAL_ID:
- return new MetadataBlockMetadataBlockInputFieldsCompartment3EditPart(