protected void addAttributes() {

    EMFModelViewerDialog dialog =
        new EMFModelViewerDialog(
            new AdapterFactoryLabelProvider(adapterFactory),
            attributes.getInput(),
            attributesFilters,
            attributesBusinessFilters,
            false,
            true) {
          public void process(IStructuredSelection selection) {
            for (Iterator iter = selection.iterator(); iter.hasNext(); ) {
              EObject elem = (EObject) iter.next();
              propertiesEditionComponent.firePropertiesChanged(
                  new PropertiesEditionEvent(
                      IdentifierPropertiesEditionPartForm.this,
                      EntityrelationViewsRepository.Identifier.Properties.attributes,
                      PropertiesEditionEvent.COMMIT,
                      PropertiesEditionEvent.ADD,
                      null,
                      elem));
            }
          }
        };
    // Start of user code for addAttributes

    // End of user code
    dialog.open();
    attributes.refresh();
  }
コード例 #2
0
  protected void addTestRT() {

    EMFModelViewerDialog dialog =
        new EMFModelViewerDialog(
            new AdapterFactoryLabelProvider(adapterFactory),
            resourceSet,
            testRTFilters,
            testRTBusinessFilters,
            false,
            true) {
          public void process(IStructuredSelection selection) {
            for (Iterator iter = selection.iterator(); iter.hasNext(); ) {
              EObject elem = (EObject) iter.next();
              if (!testRTEditUtil.getVirtualList().contains(elem)) {
                testRTEditUtil.addElement(elem);
                propertiesEditionComponent.firePropertiesChanged(
                    new PropertiesEditionEvent(
                        TestFilterPropertiesEditionPartForm.this,
                        NonregViewsRepository.TestFilter.testRT,
                        PropertiesEditionEvent.COMMIT,
                        PropertiesEditionEvent.ADD,
                        null,
                        testRTEditUtil.foundCorrespondingEObject(elem)));
              }
            }
          }
        };
    dialog.open();
  }