protected Composite createESuperTypesReferencesTable( FormToolkit widgetFactory, Composite parent) { this.eSuperTypes = new ReferencesTable( getDescription( EcoreViewsRepository.EClass.Inheritance.eSuperTypes, EcoreMessages.EClassPropertiesEditionPart_ESuperTypesLabel), new ReferencesTableListener() { public void handleAdd() { addESuperTypes(); } public void handleEdit(EObject element) { editESuperTypes(element); } public void handleMove(EObject element, int oldIndex, int newIndex) { moveESuperTypes(element, oldIndex, newIndex); } public void handleRemove(EObject element) { removeFromESuperTypes(element); } public void navigateTo(EObject element) {} }); this.eSuperTypes.setHelpText( propertiesEditionComponent.getHelpContent( EcoreViewsRepository.EClass.Inheritance.eSuperTypes, EcoreViewsRepository.FORM_KIND)); this.eSuperTypes.createControls(parent, widgetFactory); this.eSuperTypes.addSelectionListener( new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { if (e.item != null && e.item.getData() instanceof EObject) { propertiesEditionComponent.firePropertiesChanged( new PropertiesEditionEvent( EClassPropertiesEditionPartForm.this, EcoreViewsRepository.EClass.Inheritance.eSuperTypes, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData())); } } }); GridData eSuperTypesData = new GridData(GridData.FILL_HORIZONTAL); eSuperTypesData.horizontalSpan = 3; this.eSuperTypes.setLayoutData(eSuperTypesData); this.eSuperTypes.disableMove(); eSuperTypes.setID(EcoreViewsRepository.EClass.Inheritance.eSuperTypes); eSuperTypes.setEEFType("eef::AdvancedReferencesTable"); // $NON-NLS-1$ // Start of user code for createESuperTypesReferencesTable // End of user code return parent; }
protected Composite createFromChannelsAdvancedReferencesTable(Composite parent) { String label = getDescription( EipViewsRepository.Transformer.Properties.fromChannels, EipMessages.TransformerPropertiesEditionPart_FromChannelsLabel); this.fromChannels = new ReferencesTable( label, new ReferencesTableListener() { public void handleAdd() { addFromChannels(); } public void handleEdit(EObject element) { editFromChannels(element); } public void handleMove(EObject element, int oldIndex, int newIndex) { moveFromChannels(element, oldIndex, newIndex); } public void handleRemove(EObject element) { removeFromFromChannels(element); } public void navigateTo(EObject element) {} }); this.fromChannels.setHelpText( propertiesEditionComponent.getHelpContent( EipViewsRepository.Transformer.Properties.fromChannels, EipViewsRepository.SWT_KIND)); this.fromChannels.createControls(parent); this.fromChannels.addSelectionListener( new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { if (e.item != null && e.item.getData() instanceof EObject) { propertiesEditionComponent.firePropertiesChanged( new PropertiesEditionEvent( TransformerPropertiesEditionPartImpl.this, EipViewsRepository.Transformer.Properties.fromChannels, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData())); } } }); GridData fromChannelsData = new GridData(GridData.FILL_HORIZONTAL); fromChannelsData.horizontalSpan = 3; this.fromChannels.setLayoutData(fromChannelsData); this.fromChannels.disableMove(); fromChannels.setID(EipViewsRepository.Transformer.Properties.fromChannels); fromChannels.setEEFType("eef::AdvancedReferencesTable"); // $NON-NLS-1$ return parent; }
protected Composite createViewContainersReferencesTable( FormToolkit widgetFactory, Composite parent) { this.viewContainers = new ReferencesTable( getDescription( FlowViewsRepository.ViewState.Properties.viewContainers, FlowMessages.ViewStatePropertiesEditionPart_ViewContainersLabel), new ReferencesTableListener() { public void handleAdd() { addViewContainers(); } public void handleEdit(EObject element) { editViewContainers(element); } public void handleMove(EObject element, int oldIndex, int newIndex) { moveViewContainers(element, oldIndex, newIndex); } public void handleRemove(EObject element) { removeFromViewContainers(element); } public void navigateTo(EObject element) {} }); this.viewContainers.setHelpText( propertiesEditionComponent.getHelpContent( FlowViewsRepository.ViewState.Properties.viewContainers, FlowViewsRepository.FORM_KIND)); this.viewContainers.createControls(parent, widgetFactory); this.viewContainers.addSelectionListener( new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { if (e.item != null && e.item.getData() instanceof EObject) { propertiesEditionComponent.firePropertiesChanged( new PropertiesEditionEvent( ViewStatePropertiesEditionPartForm.this, FlowViewsRepository.ViewState.Properties.viewContainers, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData())); } } }); GridData viewContainersData = new GridData(GridData.FILL_HORIZONTAL); viewContainersData.horizontalSpan = 3; this.viewContainers.setLayoutData(viewContainersData); this.viewContainers.disableMove(); viewContainers.setID(FlowViewsRepository.ViewState.Properties.viewContainers); viewContainers.setEEFType("eef::AdvancedReferencesTable"); // $NON-NLS-1$ return parent; }
protected Composite createReusedPackageReferencesTable( FormToolkit widgetFactory, Composite parent) { this.reusedPackage = new ReferencesTable( UmaMessages.QualificationPackagePropertiesEditionPart_ReusedPackageLabel, new ReferencesTableListener() { public void handleAdd() { addReusedPackage(); } public void handleEdit(EObject element) { editReusedPackage(element); } public void handleMove(EObject element, int oldIndex, int newIndex) { moveReusedPackage(element, oldIndex, newIndex); } public void handleRemove(EObject element) { removeFromReusedPackage(element); } public void navigateTo(EObject element) {} }); this.reusedPackage.setHelpText( propertiesEditionComponent.getHelpContent( UmaViewsRepository.QualificationPackage.Properties.reusedPackage, UmaViewsRepository.FORM_KIND)); this.reusedPackage.createControls(parent, widgetFactory); this.reusedPackage.addSelectionListener( new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { if (e.item != null && e.item.getData() instanceof EObject) { propertiesEditionComponent.firePropertiesChanged( new PropertiesEditionEvent( QualificationPackagePropertiesEditionPartForm.this, UmaViewsRepository.QualificationPackage.Properties.reusedPackage, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData())); } } }); GridData reusedPackageData = new GridData(GridData.FILL_HORIZONTAL); reusedPackageData.horizontalSpan = 3; this.reusedPackage.setLayoutData(reusedPackageData); this.reusedPackage.disableMove(); reusedPackage.setID(UmaViewsRepository.QualificationPackage.Properties.reusedPackage); reusedPackage.setEEFType("eef::AdvancedReferencesTable"); // $NON-NLS-1$ return parent; }
protected Composite createClientDependencyAdvancedReferencesTable(Composite parent) { this.clientDependency = new ReferencesTable( UmlMessages.CreationEventPropertiesEditionPart_ClientDependencyLabel, new ReferencesTableListener() { public void handleAdd() { addClientDependency(); } public void handleEdit(EObject element) { editClientDependency(element); } public void handleMove(EObject element, int oldIndex, int newIndex) { moveClientDependency(element, oldIndex, newIndex); } public void handleRemove(EObject element) { removeFromClientDependency(element); } public void navigateTo(EObject element) {} }); this.clientDependency.setHelpText( propertiesEditionComponent.getHelpContent( UmlViewsRepository.CreationEvent.Properties.clientDependency, UmlViewsRepository.SWT_KIND)); this.clientDependency.createControls(parent); this.clientDependency.addSelectionListener( new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { if (e.item != null && e.item.getData() instanceof EObject) { propertiesEditionComponent.firePropertiesChanged( new PropertiesEditionEvent( CreationEventPropertiesEditionPartImpl.this, UmlViewsRepository.CreationEvent.Properties.clientDependency, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData())); } } }); GridData clientDependencyData = new GridData(GridData.FILL_HORIZONTAL); clientDependencyData.horizontalSpan = 3; this.clientDependency.setLayoutData(clientDependencyData); this.clientDependency.disableMove(); clientDependency.setID(UmlViewsRepository.CreationEvent.Properties.clientDependency); clientDependency.setEEFType("eef::AdvancedReferencesTable"); // $NON-NLS-1$ return parent; }
/** @param container */ protected Composite createActionsTableComposition(FormToolkit widgetFactory, Composite parent) { this.actions = new ReferencesTable( getDescription( FlowViewsRepository.SubflowState.Properties.actions, FlowMessages.SubflowStatePropertiesEditionPart_ActionsLabel), new ReferencesTableListener() { public void handleAdd() { propertiesEditionComponent.firePropertiesChanged( new PropertiesEditionEvent( SubflowStatePropertiesEditionPartForm.this, FlowViewsRepository.SubflowState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null)); actions.refresh(); } public void handleEdit(EObject element) { propertiesEditionComponent.firePropertiesChanged( new PropertiesEditionEvent( SubflowStatePropertiesEditionPartForm.this, FlowViewsRepository.SubflowState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element)); actions.refresh(); } public void handleMove(EObject element, int oldIndex, int newIndex) { propertiesEditionComponent.firePropertiesChanged( new PropertiesEditionEvent( SubflowStatePropertiesEditionPartForm.this, FlowViewsRepository.SubflowState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex)); actions.refresh(); } public void handleRemove(EObject element) { propertiesEditionComponent.firePropertiesChanged( new PropertiesEditionEvent( SubflowStatePropertiesEditionPartForm.this, FlowViewsRepository.SubflowState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element)); actions.refresh(); } public void navigateTo(EObject element) {} }); for (ViewerFilter filter : this.actionsFilters) { this.actions.addFilter(filter); } this.actions.setHelpText( propertiesEditionComponent.getHelpContent( FlowViewsRepository.SubflowState.Properties.actions, FlowViewsRepository.FORM_KIND)); this.actions.createControls(parent, widgetFactory); this.actions.addSelectionListener( new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { if (e.item != null && e.item.getData() instanceof EObject) { propertiesEditionComponent.firePropertiesChanged( new PropertiesEditionEvent( SubflowStatePropertiesEditionPartForm.this, FlowViewsRepository.SubflowState.Properties.actions, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData())); } } }); GridData actionsData = new GridData(GridData.FILL_HORIZONTAL); actionsData.horizontalSpan = 3; this.actions.setLayoutData(actionsData); this.actions.setLowerBound(0); this.actions.setUpperBound(-1); actions.setID(FlowViewsRepository.SubflowState.Properties.actions); actions.setEEFType("eef::AdvancedTableComposition"); // $NON-NLS-1$ // Start of user code for createActionsTableComposition // End of user code return parent; }
/** @param container */ protected Composite createOwnedMethodContentMemberAdvancedTableComposition(Composite parent) { this.ownedMethodContentMember = new ReferencesTable( UmaMessages.GuidancePackagePropertiesEditionPart_OwnedMethodContentMemberLabel, new ReferencesTableListener() { public void handleAdd() { propertiesEditionComponent.firePropertiesChanged( new PropertiesEditionEvent( GuidancePackagePropertiesEditionPartImpl.this, UmaViewsRepository.GuidancePackage.Properties.ownedMethodContentMember, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null)); ownedMethodContentMember.refresh(); } public void handleEdit(EObject element) { propertiesEditionComponent.firePropertiesChanged( new PropertiesEditionEvent( GuidancePackagePropertiesEditionPartImpl.this, UmaViewsRepository.GuidancePackage.Properties.ownedMethodContentMember, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element)); ownedMethodContentMember.refresh(); } public void handleMove(EObject element, int oldIndex, int newIndex) { propertiesEditionComponent.firePropertiesChanged( new PropertiesEditionEvent( GuidancePackagePropertiesEditionPartImpl.this, UmaViewsRepository.GuidancePackage.Properties.ownedMethodContentMember, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex)); ownedMethodContentMember.refresh(); } public void handleRemove(EObject element) { propertiesEditionComponent.firePropertiesChanged( new PropertiesEditionEvent( GuidancePackagePropertiesEditionPartImpl.this, UmaViewsRepository.GuidancePackage.Properties.ownedMethodContentMember, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element)); ownedMethodContentMember.refresh(); } public void navigateTo(EObject element) {} }); for (ViewerFilter filter : this.ownedMethodContentMemberFilters) { this.ownedMethodContentMember.addFilter(filter); } this.ownedMethodContentMember.setHelpText( propertiesEditionComponent.getHelpContent( UmaViewsRepository.GuidancePackage.Properties.ownedMethodContentMember, UmaViewsRepository.SWT_KIND)); this.ownedMethodContentMember.createControls(parent); this.ownedMethodContentMember.addSelectionListener( new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { if (e.item != null && e.item.getData() instanceof EObject) { propertiesEditionComponent.firePropertiesChanged( new PropertiesEditionEvent( GuidancePackagePropertiesEditionPartImpl.this, UmaViewsRepository.GuidancePackage.Properties.ownedMethodContentMember, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData())); } } }); GridData ownedMethodContentMemberData = new GridData(GridData.FILL_HORIZONTAL); ownedMethodContentMemberData.horizontalSpan = 3; this.ownedMethodContentMember.setLayoutData(ownedMethodContentMemberData); this.ownedMethodContentMember.setLowerBound(0); this.ownedMethodContentMember.setUpperBound(-1); ownedMethodContentMember.setID( UmaViewsRepository.GuidancePackage.Properties.ownedMethodContentMember); ownedMethodContentMember.setEEFType("eef::AdvancedTableComposition"); // $NON-NLS-1$ return parent; }
protected Composite createAppliedProfilesReferencesTable( FormToolkit widgetFactory, Composite parent) { this.appliedProfiles = new ReferencesTable( getDescription( CustomUmlViewsRepository.Profiles.appliedProfiles, CustomUmlMessages.ProfilesPropertiesEditionPart_AppliedProfilesLabel), new ReferencesTableListener() { public void handleAdd() { addAppliedProfiles(); } public void handleEdit(EObject element) { editAppliedProfiles(element); } public void handleMove(EObject element, int oldIndex, int newIndex) { moveAppliedProfiles(element, oldIndex, newIndex); } public void handleRemove(EObject element) { removeFromAppliedProfiles(element); } public void navigateTo(EObject element) {} }) { @Override public AdapterFactoryLabelProvider getLabelProvider() { return new AdapterFactoryLabelProvider(adapterFactory) { @Override public String getColumnText(Object object, int columnIndex) { if (object instanceof Profile) { Profile profile = (Profile) object; if (columnIndex == tableColumnService.indexOf(TableColumnName.PROFILE)) { return labelService.caseProfile(profile); } } return ""; } @Override public Image getColumnImage(Object object, int columnIndex) { return null; } }; } }; for (ViewerFilter filter : this.appliedProfilesFilters) { this.appliedProfiles.addFilter(filter); } this.appliedProfiles.setHelpText( propertiesEditionComponent.getHelpContent( CustomUmlViewsRepository.Profiles.appliedProfiles, UmlViewsRepository.FORM_KIND)); this.appliedProfiles.createControls(parent, widgetFactory); this.appliedProfiles.addSelectionListener( new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { if (e.item != null && e.item.getData() instanceof EObject) { propertiesEditionComponent.firePropertiesChanged( new PropertiesEditionEvent( ProfilesPropertiesEditionPartForm.this, CustomUmlViewsRepository.Profiles.appliedProfiles, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData())); } } }); GridData appliedProfilesData = new GridData(GridData.FILL_HORIZONTAL); appliedProfilesData.horizontalSpan = 3; this.appliedProfiles.setLayoutData(appliedProfilesData); this.appliedProfiles.disableMove(); appliedProfiles.setID(CustomUmlViewsRepository.Profiles.appliedProfiles); appliedProfiles.setEEFType("eef::AdvancedReferencesTable"); // $NON-NLS-1$ // Start of user code for createAppliedProfilesTableComposition Table table = appliedProfiles.getTable(); TableColumn[] columns = table.getColumns(); // dispose for (TableColumn tableColumn : columns) { tableColumn.dispose(); } table.setHeaderVisible(true); tableColumnService.createMediumColumn(table, TableColumnName.PROFILE); // End of user code return parent; }
/** @param container */ protected Composite createPropertyAdvancedTableComposition(Composite parent) { this.property = new ReferencesTable( getDescription( EvidenceViewsRepository.Method.Properties.property, EvidenceMessages.MethodPropertiesEditionPart_PropertyLabel), new ReferencesTableListener() { public void handleAdd() { propertiesEditionComponent.firePropertiesChanged( new PropertiesEditionEvent( MethodPropertiesEditionPartImpl.this, EvidenceViewsRepository.Method.Properties.property, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null)); property.refresh(); } public void handleEdit(EObject element) { propertiesEditionComponent.firePropertiesChanged( new PropertiesEditionEvent( MethodPropertiesEditionPartImpl.this, EvidenceViewsRepository.Method.Properties.property, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element)); property.refresh(); } public void handleMove(EObject element, int oldIndex, int newIndex) { propertiesEditionComponent.firePropertiesChanged( new PropertiesEditionEvent( MethodPropertiesEditionPartImpl.this, EvidenceViewsRepository.Method.Properties.property, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex)); property.refresh(); } public void handleRemove(EObject element) { propertiesEditionComponent.firePropertiesChanged( new PropertiesEditionEvent( MethodPropertiesEditionPartImpl.this, EvidenceViewsRepository.Method.Properties.property, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element)); property.refresh(); } public void navigateTo(EObject element) {} }); for (ViewerFilter filter : this.propertyFilters) { this.property.addFilter(filter); } this.property.setHelpText( propertiesEditionComponent.getHelpContent( EvidenceViewsRepository.Method.Properties.property, EvidenceViewsRepository.SWT_KIND)); this.property.createControls(parent); this.property.addSelectionListener( new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { if (e.item != null && e.item.getData() instanceof EObject) { propertiesEditionComponent.firePropertiesChanged( new PropertiesEditionEvent( MethodPropertiesEditionPartImpl.this, EvidenceViewsRepository.Method.Properties.property, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData())); } } }); GridData propertyData = new GridData(GridData.FILL_HORIZONTAL); propertyData.horizontalSpan = 3; this.property.setLayoutData(propertyData); this.property.setLowerBound(0); this.property.setUpperBound(-1); property.setID(EvidenceViewsRepository.Method.Properties.property); property.setEEFType("eef::AdvancedTableComposition"); // $NON-NLS-1$ // Start of user code for createPropertyAdvancedTableComposition // End of user code return parent; }